@thebase/ui 0.0.6 → 0.0.8

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 (203) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +2 -2
  3. package/dist/baseui.esm.js +10 -10
  4. package/dist/baseui.min.js +10 -10
  5. package/dist/baseui.registry.json +4 -4
  6. package/dist/icons/lucide.json +2 -2
  7. package/dist/runtime/milkdown/block-G2R773CV.js +1 -0
  8. package/dist/runtime/milkdown/{chunk-LIY3GISO.js → chunk-2EZOVVY4.js} +12 -12
  9. package/dist/runtime/milkdown/chunk-2TBUBNYK.js +3 -0
  10. package/dist/runtime/milkdown/{chunk-373V6XMI.js → chunk-5ILY25KD.js} +1 -1
  11. package/dist/runtime/milkdown/{chunk-6HASM4ZR.js → chunk-7GZI2HGN.js} +1 -1
  12. package/dist/runtime/milkdown/{chunk-TTCZLSO2.js → chunk-7YQMEBMQ.js} +1 -1
  13. package/dist/runtime/milkdown/chunk-BJC3HW5B.js +1 -0
  14. package/dist/runtime/milkdown/chunk-CFWAU3WN.js +1 -0
  15. package/dist/runtime/milkdown/{chunk-SMRDMV2Q.js → chunk-DWBFWB4X.js} +1 -1
  16. package/dist/runtime/milkdown/{chunk-KXKDEYCC.js → chunk-JA3LDFRC.js} +1 -1
  17. package/dist/runtime/milkdown/{chunk-R7FZKCAV.js → chunk-LDCXUKI3.js} +1 -1
  18. package/dist/runtime/milkdown/{chunk-XOIKFU3P.js → chunk-MYC7FIB2.js} +1 -1
  19. package/dist/runtime/milkdown/{chunk-PSGXCQNW.js → chunk-NX66TKTH.js} +1 -1
  20. package/dist/runtime/milkdown/{chunk-6RGD2KUU.js → chunk-NXQJDWPI.js} +1 -1
  21. package/dist/runtime/milkdown/{chunk-VPKKXG6L.js → chunk-OF2BVG4E.js} +1 -1
  22. package/dist/runtime/milkdown/{chunk-GHRUWTEV.js → chunk-R43NMSZO.js} +1 -1
  23. package/dist/runtime/milkdown/{chunk-SFCQEU26.js → chunk-SIRQEE7R.js} +1 -1
  24. package/dist/runtime/milkdown/{chunk-GVZW4OO4.js → chunk-SZCOI4YV.js} +1 -1
  25. package/dist/runtime/milkdown/{chunk-GAWLLGNO.js → chunk-TFG5E5LZ.js} +1 -1
  26. package/dist/runtime/milkdown/{chunk-VBVMNS5A.js → chunk-TOUPIB5N.js} +1 -1
  27. package/dist/runtime/milkdown/{chunk-WGUKYDQQ.js → chunk-VFZ7ST3H.js} +1 -1
  28. package/dist/runtime/milkdown/{chunk-E5R7FPWA.js → chunk-VJBGANAS.js} +4 -4
  29. package/dist/runtime/milkdown/{chunk-UBIXYWAI.js → chunk-WMT3RNOX.js} +1 -1
  30. package/dist/runtime/milkdown/chunk-XNCXGIZE.js +41 -0
  31. package/dist/runtime/milkdown/chunk-Y4CBBIL4.js +1 -0
  32. package/dist/runtime/milkdown/{chunk-3EORQGKQ.js → chunk-ZGHJJLEG.js} +1 -1
  33. package/dist/runtime/milkdown/{chunk-37CATSBM.js → chunk-ZIYJY6SA.js} +1 -1
  34. package/dist/runtime/milkdown/clipboard-5NOA4E34.js +1 -0
  35. package/dist/runtime/milkdown/{commonmark-KYRQSFY7.js → commonmark-263P63KC.js} +1 -1
  36. package/dist/runtime/milkdown/{core-SZ3VAN2E.js → core-T2SC7EXQ.js} +1 -1
  37. package/dist/runtime/milkdown/cursor-Z4UWEH5V.js +1 -0
  38. package/dist/runtime/milkdown/{diff-WJOHA5PX.js → diff-K3BORLOX.js} +1 -1
  39. package/dist/runtime/milkdown/{dist-TKSPPVS4.js → dist-24V6SL4V.js} +1 -1
  40. package/dist/runtime/milkdown/{dist-EHUNF6M5.js → dist-34ZP4UZ2.js} +1 -1
  41. package/dist/runtime/milkdown/{dist-I3JGQGWS.js → dist-3LQISA7E.js} +1 -1
  42. package/dist/runtime/milkdown/{dist-I3LMG6JF.js → dist-4QC5HFKT.js} +1 -1
  43. package/dist/runtime/milkdown/{dist-U6ZG6DV6.js → dist-562GM6I6.js} +1 -1
  44. package/dist/runtime/milkdown/{dist-7277C2KF.js → dist-5QJ34QYN.js} +1 -1
  45. package/dist/runtime/milkdown/{dist-UHXLU77N.js → dist-657PKZSF.js} +1 -1
  46. package/dist/runtime/milkdown/{dist-ZBCFN6O5.js → dist-6TS6SSJR.js} +1 -1
  47. package/dist/runtime/milkdown/{dist-X2CT5LDV.js → dist-7JICPTVR.js} +1 -1
  48. package/dist/runtime/milkdown/{dist-KY7AL6FL.js → dist-DERKVUMC.js} +1 -1
  49. package/dist/runtime/milkdown/{dist-QB3U2COU.js → dist-MK4VEXBD.js} +1 -1
  50. package/dist/runtime/milkdown/{dist-5HJGMMBO.js → dist-NYN7ZJXK.js} +1 -1
  51. package/dist/runtime/milkdown/dist-OPQE4Z43.js +1 -0
  52. package/dist/runtime/milkdown/{dist-J2KSREXK.js → dist-P4TF777A.js} +1 -1
  53. package/dist/runtime/milkdown/{dist-IIRHY5PY.js → dist-PEJBUU6H.js} +1 -1
  54. package/dist/runtime/milkdown/{dist-WNQ5J4WR.js → dist-R2X7SQDZ.js} +1 -1
  55. package/dist/runtime/milkdown/{dist-QMASZW6X.js → dist-RE2FJN7S.js} +1 -1
  56. package/dist/runtime/milkdown/{dist-RS6ERIZS.js → dist-THIQIX3E.js} +1 -1
  57. package/dist/runtime/milkdown/{dist-EG2OA4VS.js → dist-VEPIKH2V.js} +1 -1
  58. package/dist/runtime/milkdown/dist-X22ABN6K.js +1 -0
  59. package/dist/runtime/milkdown/{dist-63GMFB3D.js → dist-YH3NI4VG.js} +1 -1
  60. package/dist/runtime/milkdown/{dockerfile-NAEEVAQU.js → dockerfile-2B5D6FTU.js} +1 -1
  61. package/dist/runtime/milkdown/{esm-W3C6FIFD.js → esm-H2D66MX5.js} +68 -68
  62. package/dist/runtime/milkdown/{factor-MYKNDQPQ.js → factor-JBYSQG3O.js} +1 -1
  63. package/dist/runtime/milkdown/{gfm-E3RPWLDM.js → gfm-IHXC5DQO.js} +1 -1
  64. package/dist/runtime/milkdown/history-VOPZ3HXQ.js +1 -0
  65. package/dist/runtime/milkdown/indent-WYLZY3CZ.js +1 -0
  66. package/dist/runtime/milkdown/{javascript-43PROIAY.js → javascript-375RXK5M.js} +1 -1
  67. package/dist/runtime/milkdown/{lib-ULUU3LBY.js → lib-32AGHSKT.js} +1 -1
  68. package/dist/runtime/milkdown/lib-QZEOHNSS.js +1 -0
  69. package/dist/runtime/milkdown/listener-GNT2L5RH.js +1 -0
  70. package/dist/runtime/milkdown/milkdown-editor.js +1 -1
  71. package/dist/runtime/milkdown/milkdown-text-editor.js +1 -1
  72. package/dist/runtime/milkdown/{model-YUHBWZ3A.js → model-VKXPTJEQ.js} +1 -1
  73. package/dist/runtime/milkdown/{nsis-2G5LLGBI.js → nsis-XAIDIMGO.js} +1 -1
  74. package/dist/runtime/milkdown/{pug-VWTHDU4H.js → pug-SMVC7NDW.js} +1 -1
  75. package/dist/runtime/milkdown/slash-3TY5YM2E.js +1 -0
  76. package/dist/runtime/milkdown/{streaming-ODT2C2AX.js → streaming-S7JA52O3.js} +1 -1
  77. package/dist/runtime/milkdown/tooltip-5CTXOYIA.js +1 -0
  78. package/dist/runtime/milkdown/upload-DA4OHNVQ.js +1 -0
  79. package/dist/runtime/milkdown/utils-H6AH4ARX.js +1 -0
  80. package/dist/runtime/milkdown/y-webrtc-VQGJXSXG.js +2 -0
  81. package/dist/runtime/milkdown/y-websocket-YOL5ECIU.js +2 -0
  82. package/dist/runtime/milkdown/yjs-H3MVN7TP.js +1 -0
  83. package/docs/components/text-editor.md +37 -5
  84. package/package.json +2 -1
  85. package/dist/runtime/milkdown/block-B3H3PJID.js +0 -1
  86. package/dist/runtime/milkdown/chunk-7CVS4AGG.js +0 -3
  87. package/dist/runtime/milkdown/chunk-FGZNEC46.js +0 -1
  88. package/dist/runtime/milkdown/chunk-VKELS2FZ.js +0 -41
  89. package/dist/runtime/milkdown/clipboard-SGEGWVIL.js +0 -1
  90. package/dist/runtime/milkdown/cursor-4RIJS7XF.js +0 -1
  91. package/dist/runtime/milkdown/dist-6JDVYEX3.js +0 -1
  92. package/dist/runtime/milkdown/dist-WWUPY2DM.js +0 -1
  93. package/dist/runtime/milkdown/history-MXXSC4BB.js +0 -1
  94. package/dist/runtime/milkdown/indent-DPZPSW7O.js +0 -1
  95. package/dist/runtime/milkdown/lib-OHEPSUTR.js +0 -1
  96. package/dist/runtime/milkdown/listener-YERMSFXE.js +0 -1
  97. package/dist/runtime/milkdown/slash-WRZAFLVA.js +0 -1
  98. package/dist/runtime/milkdown/tooltip-MQR7E3GN.js +0 -1
  99. package/dist/runtime/milkdown/upload-4DLRUKG7.js +0 -1
  100. package/dist/runtime/milkdown/utils-RGFMAFOI.js +0 -1
  101. package/dist/runtime/milkdown/y-webrtc-MVXVFPYO.js +0 -2
  102. package/dist/runtime/milkdown/yjs-L4ZX4CJ5.js +0 -1
  103. /package/dist/runtime/milkdown/{apl-2VCEVXBO.js → apl-A2CKMNHU.js} +0 -0
  104. /package/dist/runtime/milkdown/{asciiarmor-ND4TKJ2V.js → asciiarmor-LYWOUGA4.js} +0 -0
  105. /package/dist/runtime/milkdown/{asn1-5NCC72L6.js → asn1-NB5F53MP.js} +0 -0
  106. /package/dist/runtime/milkdown/{asterisk-V3QQOGYS.js → asterisk-SIDVUCAX.js} +0 -0
  107. /package/dist/runtime/milkdown/{brainfuck-SETQDLAI.js → brainfuck-K7DBLI5P.js} +0 -0
  108. /package/dist/runtime/milkdown/{chunk-CS3PHHYU.js → chunk-2FDN6WYA.js} +0 -0
  109. /package/dist/runtime/milkdown/{chunk-UPNN5QP4.js → chunk-2XECCVBE.js} +0 -0
  110. /package/dist/runtime/milkdown/{chunk-E6JE25ZM.js → chunk-DLMWAKB5.js} +0 -0
  111. /package/dist/runtime/milkdown/{chunk-HDKYYBRG.js → chunk-DO4RO6KD.js} +0 -0
  112. /package/dist/runtime/milkdown/{chunk-KJCZ4UN6.js → chunk-ILE44FN6.js} +0 -0
  113. /package/dist/runtime/milkdown/{chunk-MSEQNMGN.js → chunk-IPNUYGNC.js} +0 -0
  114. /package/dist/runtime/milkdown/{chunk-FOZORPFE.js → chunk-K2ROPYIW.js} +0 -0
  115. /package/dist/runtime/milkdown/{chunk-XOU65PX7.js → chunk-KP5VFDTE.js} +0 -0
  116. /package/dist/runtime/milkdown/{chunk-KOCVWYBK.js → chunk-MAWHENWJ.js} +0 -0
  117. /package/dist/runtime/milkdown/{chunk-BV6CAHIM.js → chunk-OQJVATGH.js} +0 -0
  118. /package/dist/runtime/milkdown/{chunk-Q5FF4VKZ.js → chunk-TEMVRH7B.js} +0 -0
  119. /package/dist/runtime/milkdown/{chunk-VYL5RGSY.js → chunk-U6C7MJSD.js} +0 -0
  120. /package/dist/runtime/milkdown/{clike-WKR6QU6G.js → clike-EOWJN572.js} +0 -0
  121. /package/dist/runtime/milkdown/{clojure-7C5XMSLE.js → clojure-VLG72YFE.js} +0 -0
  122. /package/dist/runtime/milkdown/{cmake-VX6UCCMV.js → cmake-2PXWCEDK.js} +0 -0
  123. /package/dist/runtime/milkdown/{cobol-IUBDOVSU.js → cobol-PMRFKEKB.js} +0 -0
  124. /package/dist/runtime/milkdown/{coffeescript-OEAM3K5M.js → coffeescript-B5G6C2AR.js} +0 -0
  125. /package/dist/runtime/milkdown/{commonlisp-LRFHKBQZ.js → commonlisp-CFTTVW6U.js} +0 -0
  126. /package/dist/runtime/milkdown/{crystal-7XKMI75H.js → crystal-M6S3MKED.js} +0 -0
  127. /package/dist/runtime/milkdown/{css-DTJ74K4A.js → css-HESFBL5J.js} +0 -0
  128. /package/dist/runtime/milkdown/{cypher-Y7ZMLKQ4.js → cypher-IIJXY2ZS.js} +0 -0
  129. /package/dist/runtime/milkdown/{d-NSEMXQMQ.js → d-ZHLFM7BM.js} +0 -0
  130. /package/dist/runtime/milkdown/{diff-BO3JC62N.js → diff-7YFE6XTG.js} +0 -0
  131. /package/dist/runtime/milkdown/{dtd-3HSCMPBI.js → dtd-NPOQOSDS.js} +0 -0
  132. /package/dist/runtime/milkdown/{dylan-UCUZF6KU.js → dylan-KB7QIKGL.js} +0 -0
  133. /package/dist/runtime/milkdown/{ebnf-3LHOCFAJ.js → ebnf-TBCUHQC6.js} +0 -0
  134. /package/dist/runtime/milkdown/{ecl-5R3NXF6N.js → ecl-OXWKHIHJ.js} +0 -0
  135. /package/dist/runtime/milkdown/{eiffel-CQ4L5MSH.js → eiffel-WRBXQVBO.js} +0 -0
  136. /package/dist/runtime/milkdown/{elm-6QYNGBQ3.js → elm-MZAQSXJY.js} +0 -0
  137. /package/dist/runtime/milkdown/{erlang-6NH23EDV.js → erlang-PNSW52ER.js} +0 -0
  138. /package/dist/runtime/milkdown/{fcl-ACRUXLOI.js → fcl-6ZY3XINI.js} +0 -0
  139. /package/dist/runtime/milkdown/{forth-MGVKD22I.js → forth-BAIG3TGB.js} +0 -0
  140. /package/dist/runtime/milkdown/{fortran-Y2LH5YJY.js → fortran-MQWYHO5L.js} +0 -0
  141. /package/dist/runtime/milkdown/{gas-DGW2BQT5.js → gas-Q6YL6AQO.js} +0 -0
  142. /package/dist/runtime/milkdown/{gherkin-YE56IVZ5.js → gherkin-W5ZB2USN.js} +0 -0
  143. /package/dist/runtime/milkdown/{groovy-ACMNYCLF.js → groovy-JTF2GBED.js} +0 -0
  144. /package/dist/runtime/milkdown/{haskell-MIB6HZSL.js → haskell-HFE6BWET.js} +0 -0
  145. /package/dist/runtime/milkdown/{haxe-TANQRBYK.js → haxe-WWIJK4Z5.js} +0 -0
  146. /package/dist/runtime/milkdown/{http-QUK2BL6J.js → http-NZKSSIDP.js} +0 -0
  147. /package/dist/runtime/milkdown/{idl-54U6ONEE.js → idl-CMM2WWSO.js} +0 -0
  148. /package/dist/runtime/milkdown/{julia-7E2ZIO2U.js → julia-BMA4W7GB.js} +0 -0
  149. /package/dist/runtime/milkdown/{livescript-SUEXR7PK.js → livescript-3UKKDN45.js} +0 -0
  150. /package/dist/runtime/milkdown/{lua-QNGITPQK.js → lua-SWEBXZV4.js} +0 -0
  151. /package/dist/runtime/milkdown/{mathematica-HJQQXVFC.js → mathematica-CJOQYQFY.js} +0 -0
  152. /package/dist/runtime/milkdown/{mbox-F6SUCJVD.js → mbox-Y4XZOKOO.js} +0 -0
  153. /package/dist/runtime/milkdown/{mirc-7S5H76VB.js → mirc-5HDV5JC4.js} +0 -0
  154. /package/dist/runtime/milkdown/{mllike-TTW7I7W4.js → mllike-2EOQGIBG.js} +0 -0
  155. /package/dist/runtime/milkdown/{modelica-3POMKZFY.js → modelica-XKNFUSSN.js} +0 -0
  156. /package/dist/runtime/milkdown/{mscgen-IKAT43RT.js → mscgen-2X7TXJM6.js} +0 -0
  157. /package/dist/runtime/milkdown/{mumps-XZE3RMGJ.js → mumps-R6QPEBAR.js} +0 -0
  158. /package/dist/runtime/milkdown/{nginx-QCVWU6DV.js → nginx-7TJP7GQA.js} +0 -0
  159. /package/dist/runtime/milkdown/{ntriples-T6AMEY2C.js → ntriples-SCDRUUH2.js} +0 -0
  160. /package/dist/runtime/milkdown/{octave-64EAJHKR.js → octave-RV2OSSMQ.js} +0 -0
  161. /package/dist/runtime/milkdown/{oz-7QHCZG72.js → oz-6VL77R5Z.js} +0 -0
  162. /package/dist/runtime/milkdown/{pascal-KWNZTZKE.js → pascal-TQWMLNUO.js} +0 -0
  163. /package/dist/runtime/milkdown/{perl-KX75FRG7.js → perl-MJLZUOI2.js} +0 -0
  164. /package/dist/runtime/milkdown/{pig-YA2LFBUW.js → pig-MQKMXNXN.js} +0 -0
  165. /package/dist/runtime/milkdown/{powershell-SONNWKJG.js → powershell-RJOL52GR.js} +0 -0
  166. /package/dist/runtime/milkdown/{properties-MEUWSNZY.js → properties-XL2YBZDU.js} +0 -0
  167. /package/dist/runtime/milkdown/{protobuf-RKCPHWGY.js → protobuf-NQWTK3Z6.js} +0 -0
  168. /package/dist/runtime/milkdown/{puppet-JMZDB2TG.js → puppet-POQGMO34.js} +0 -0
  169. /package/dist/runtime/milkdown/{python-GVEPBHD7.js → python-NMGCKPUX.js} +0 -0
  170. /package/dist/runtime/milkdown/{q-QBK3FAEX.js → q-ILHJCNOR.js} +0 -0
  171. /package/dist/runtime/milkdown/{r-QZYPZHNL.js → r-XNO7UDHK.js} +0 -0
  172. /package/dist/runtime/milkdown/{rpm-DU7TLFAI.js → rpm-TPSVG357.js} +0 -0
  173. /package/dist/runtime/milkdown/{ruby-DMEPZV6P.js → ruby-3ZLDCDCY.js} +0 -0
  174. /package/dist/runtime/milkdown/{sas-UQCOIXSD.js → sas-X4IZVM55.js} +0 -0
  175. /package/dist/runtime/milkdown/{scheme-ABXYL6GU.js → scheme-JSRTR252.js} +0 -0
  176. /package/dist/runtime/milkdown/{shell-M3XELTMZ.js → shell-IJ2JLDQQ.js} +0 -0
  177. /package/dist/runtime/milkdown/{sieve-MUKKCDBZ.js → sieve-4ACSKBHV.js} +0 -0
  178. /package/dist/runtime/milkdown/{smalltalk-P4FKOVAU.js → smalltalk-AHTDIHSN.js} +0 -0
  179. /package/dist/runtime/milkdown/{solr-HHKG4NNK.js → solr-HDS3YMCJ.js} +0 -0
  180. /package/dist/runtime/milkdown/{sparql-5YJAIBWN.js → sparql-OPR2SX5E.js} +0 -0
  181. /package/dist/runtime/milkdown/{spreadsheet-M3SEYOFV.js → spreadsheet-YMJBRXJ6.js} +0 -0
  182. /package/dist/runtime/milkdown/{sql-Z6C3KTS5.js → sql-4LK5AARR.js} +0 -0
  183. /package/dist/runtime/milkdown/{stex-MO67FBMF.js → stex-CBOLYXFQ.js} +0 -0
  184. /package/dist/runtime/milkdown/{stylus-JEMVT3OU.js → stylus-5SYL4OMN.js} +0 -0
  185. /package/dist/runtime/milkdown/{swift-HP7RYRJA.js → swift-W3IKYGAN.js} +0 -0
  186. /package/dist/runtime/milkdown/{tcl-WPHRLNQC.js → tcl-QKBH3MVM.js} +0 -0
  187. /package/dist/runtime/milkdown/{textile-3LZDM6IW.js → textile-KRYPADXN.js} +0 -0
  188. /package/dist/runtime/milkdown/{tiddlywiki-LMGAXCWG.js → tiddlywiki-XNSPF27C.js} +0 -0
  189. /package/dist/runtime/milkdown/{tiki-SC7NYLRG.js → tiki-ZZLJUPPJ.js} +0 -0
  190. /package/dist/runtime/milkdown/{toml-VBRI3ILD.js → toml-FCAM6ZFK.js} +0 -0
  191. /package/dist/runtime/milkdown/{troff-MZNIC3MS.js → troff-7BWGQP4Z.js} +0 -0
  192. /package/dist/runtime/milkdown/{ttcn-ZUOU74GM.js → ttcn-K3WYQPKS.js} +0 -0
  193. /package/dist/runtime/milkdown/{ttcn-cfg-2JJUM5CY.js → ttcn-cfg-LDHTKWFO.js} +0 -0
  194. /package/dist/runtime/milkdown/{turtle-SNBPEJHA.js → turtle-6Q2P3NLY.js} +0 -0
  195. /package/dist/runtime/milkdown/{vb-U45Y75DV.js → vb-BYDJL3EX.js} +0 -0
  196. /package/dist/runtime/milkdown/{vbscript-XTRRB36U.js → vbscript-WOMP2PYW.js} +0 -0
  197. /package/dist/runtime/milkdown/{velocity-Y7TX26SP.js → velocity-ZG7EESTK.js} +0 -0
  198. /package/dist/runtime/milkdown/{verilog-IFT4S6MZ.js → verilog-MW2R7Q2Y.js} +0 -0
  199. /package/dist/runtime/milkdown/{vhdl-CK4X465M.js → vhdl-GQOJ6JVT.js} +0 -0
  200. /package/dist/runtime/milkdown/{webidl-N7XOMHHB.js → webidl-5Q6QYACY.js} +0 -0
  201. /package/dist/runtime/milkdown/{xquery-EPMIEXTW.js → xquery-MD4ZCF7M.js} +0 -0
  202. /package/dist/runtime/milkdown/{yacas-A74LVH45.js → yacas-EKNE7G24.js} +0 -0
  203. /package/dist/runtime/milkdown/{z80-NVBCD5FV.js → z80-44FRSRYD.js} +0 -0
@@ -7,16 +7,16 @@
7
7
  /* Vendored from @odoo/owl@2.8.3's dist/owl.iife.min.js, patched to key off globalThis instead of top-level `this` (safe in both classic scripts and ES modules) — see scripts/build.mjs and src/owl/owl-dev-shim.js. */
8
8
  !function(t){"use strict";function e(t){t=t.slice();const e=[];let n;for(;(n=t[0])&&"string"==typeof n;)e.push(t.shift());return{modifiers:e,data:t}}const n={shouldNormalizeDom:!0,mainEventHandler:(t,n,o)=>("function"==typeof t?t(n):Array.isArray(t)&&(t=e(t).data)[0](t[1],n),!1)};class o{constructor(t,e){this.key=t,this.child=e}mount(t,e){this.parentEl=t,this.child.mount(t,e)}moveBeforeDOMNode(t,e){this.child.moveBeforeDOMNode(t,e)}moveBeforeVNode(t,e){this.moveBeforeDOMNode(t&&t.firstNode()||e)}patch(t,e){if(this===t)return;let n=this.child,o=t.child;this.key===t.key?n.patch(o,e):(o.mount(this.parentEl,n.firstNode()),e&&n.beforeRemove(),n.remove(),this.child=o,this.key=t.key)}beforeRemove(){this.child.beforeRemove()}remove(){this.child.remove()}firstNode(){return this.child.firstNode()}toString(){return this.child.toString()}}function s(t,e){return new o(t,e)}class r extends Error{}let i,l,a,c;if("undefined"!=typeof Element){({setAttribute:i,removeAttribute:l}=Element.prototype);const t=DOMTokenList.prototype;a=t.add,c=t.remove}const h=Array.isArray,{split:u,trim:d}=String.prototype,f=/\s+/;function p(t,e){switch(e){case!1:case void 0:l.call(this,t);break;case!0:i.call(this,t,"");break;default:i.call(this,t,e)}}function m(t){return function(e){p.call(this,t,e)}}function g(t){if(h(t))"class"===t[0]?y.call(this,t[1]):p.call(this,t[0],t[1]);else for(let e in t)"class"===e?y.call(this,t[e]):p.call(this,e,t[e])}function b(t,e){if(h(t)){const n=t[0],o=t[1];if(n===e[0]){if(o===e[1])return;"class"===n?w.call(this,o,e[1]):p.call(this,n,o)}else l.call(this,e[0]),p.call(this,n,o)}else{for(let n in e)n in t||("class"===n?w.call(this,"",e[n]):l.call(this,n));for(let n in t){const o=t[n];o!==e[n]&&("class"===n?w.call(this,o,e[n]):p.call(this,n,o))}}}function v(t){const e={};switch(typeof t){case"string":const n=d.call(t);if(!n)return{};let o=u.call(n,f);for(let t=0,n=o.length;t<n;t++)e[o[t]]=!0;return e;case"object":for(let n in t){const o=t[n];if(o){if(n=d.call(n),!n)continue;const t=u.call(n,f);for(let n of t)e[n]=o}}return e;case"undefined":return{};case"number":return{[t]:!0};default:return{[t]:!0}}}function y(t){t=""===t?{}:v(t);const e=this.classList;for(let n in t)a.call(e,n)}function w(t,e){e=""===e?{}:v(e),t=""===t?{}:v(t);const n=this.classList;for(let o in e)o in t||c.call(n,o);for(let o in t)o in e||a.call(n,o)}function $(t){let e=!1;return async(...n)=>{e||(e=!0,await Promise.resolve(),e=!1,t(...n))}}function x(t){if(!t)return!1;if(t.ownerDocument.contains(t))return!0;const e=t.getRootNode();return e instanceof ShadowRoot&&t.ownerDocument.contains(e.host)}class N extends EventTarget{trigger(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e}))}}class k extends String{}function T(t){return t instanceof k?t:void 0===t?E(""):"number"==typeof t?E(String(t)):([["&","&amp;"],["<","&lt;"],[">","&gt;"],["'","&#x27;"],['"',"&quot;"],["`","&#x60;"]].forEach((e=>{t=String(t).replace(new RegExp(e[0],"g"),e[1])})),E(t))}function E(t,...e){if(!Array.isArray(t))return new k(t);const n=t;let o="",s=0;for(;s<e.length;++s)o+=n[s]+T(e[s]);return o+=n[s],new k(o)}function A(t){const e=t.split(".")[0],o=t.includes(".capture");return t.includes(".synthetic")?function(t,e=!1){let o=`__event__synthetic_${t}`;e&&(o=`${o}_capture`);!function(t,e,o=!1){if(D[e])return;document.addEventListener(t,(t=>function(t,e){let o=e.target;for(;null!==o;){const s=o[t];if(s)for(const t of Object.values(s)){if(n.mainEventHandler(t,e,o))return}o=o.parentNode}}(e,t)),{capture:o}),D[e]=!0}(t,o,e);const s=C++;function r(t){const e=this[o]||{};e[s]=t,this[o]=e}function i(){delete this[o]}return{setup:r,update:r,remove:i}}(e,o):function(t,e=!1){let o=`__event__${t}_${_++}`;e&&(o=`${o}_capture`);function s(t){const e=t.currentTarget;if(!e||!x(e))return;const s=e[o];s&&n.mainEventHandler(s,t,e)}function r(n){this[o]=n,this.addEventListener(t,s,{capture:e})}function i(){delete this[o],this.removeEventListener(t,s,{capture:e})}function l(t){this[o]=t}return{setup:r,update:l,remove:i}}(e,o)}let _=1;let C=1;const D={};let S,O,R;if("undefined"!=typeof Node){const t=Node.prototype;S=t.insertBefore,O=(L=t,B="textContent",Object.getOwnPropertyDescriptor(L,B)).set,R=t.removeChild}var L,B;class P{constructor(t){this.children=t}mount(t,e){const n=this.children,o=n.length,s=new Array(o);for(let r=0;r<o;r++){let o=n[r];if(o)o.mount(t,e);else{const n=document.createTextNode("");s[r]=n,S.call(t,n,e)}}this.anchors=s,this.parentEl=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;const n=this.children,o=this.anchors;for(let s=0,r=n.length;s<r;s++){let r=n[s];if(r)r.moveBeforeDOMNode(t,e);else{const n=o[s];S.call(e,n,t)}}}moveBeforeVNode(t,e){if(t){const n=t.children[0];e=(n?n.firstNode():t.anchors[0])||null}const n=this.children,o=this.parentEl,s=this.anchors;for(let t=0,r=n.length;t<r;t++){let r=n[t];if(r)r.moveBeforeVNode(null,e);else{const n=s[t];S.call(o,n,e)}}}patch(t,e){if(this===t)return;const n=this.children,o=t.children,s=this.anchors,r=this.parentEl;for(let t=0,i=n.length;t<i;t++){const i=n[t],l=o[t];if(i)if(l)i.patch(l,e);else{const o=i.firstNode(),l=document.createTextNode("");s[t]=l,S.call(r,l,o),e&&i.beforeRemove(),i.remove(),n[t]=void 0}else if(l){n[t]=l;const e=s[t];l.mount(r,e),R.call(r,e)}}}beforeRemove(){const t=this.children;for(let e=0,n=t.length;e<n;e++){const n=t[e];n&&n.beforeRemove()}}remove(){const t=this.parentEl;if(this.isOnlyChild)O.call(t,"");else{const e=this.children,n=this.anchors;for(let o=0,s=e.length;o<s;o++){const s=e[o];s?s.remove():R.call(t,n[o])}}}firstNode(){const t=this.children[0];return t?t.firstNode():this.anchors[0]}toString(){return this.children.map((t=>t?t.toString():"")).join("")}}function j(t){return new P(t)}let M,I,W;if("undefined"!=typeof Node){const t=Node.prototype;M=t.insertBefore,W=t.removeChild,I=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(CharacterData.prototype,"data").set}class V{constructor(t){this.text=t}mountNode(t,e,n){this.parentEl=e,M.call(e,t,n),this.el=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,M.call(e,this.el,t)}moveBeforeVNode(t,e){M.call(this.parentEl,this.el,t?t.el:e)}beforeRemove(){}remove(){W.call(this.parentEl,this.el)}firstNode(){return this.el}toString(){return this.text}}class F extends V{mount(t,e){this.mountNode(document.createTextNode(U(this.text)),t,e)}patch(t){const e=t.text;this.text!==e&&(I.call(this.el,U(e)),this.text=e)}}class K extends V{mount(t,e){this.mountNode(document.createComment(U(this.text)),t,e)}patch(){}}function z(t){return new F(t)}function H(t){return new K(t)}function U(t){switch(typeof t){case"string":return t;case"number":return String(t);case"boolean":return t?"true":"false";default:return t||""}}const q=(t,e)=>Object.getOwnPropertyDescriptor(t,e);let G,X,Y,Z,J;"undefined"!=typeof Node&&(G=Node.prototype,X=Element.prototype,Y=q(CharacterData.prototype,"data").set,Z=q(G,"firstChild").get,J=q(G,"nextSibling").get);const Q=()=>{};function tt(t){return function(e){this[t]=0===e?0:e?e.valueOf():""}}const et={};function nt(t){if(t in et)return et[t];const e=(new DOMParser).parseFromString(`<t>${t}</t>`,"text/xml").firstChild.firstChild;n.shouldNormalizeDom&&ot(e);const o=st(e),s=lt(o),r=function(t,e){let n=function(t,e){const{refN:n,collectors:o,children:s}=e,r=o.length;e.locations.sort(((t,e)=>t.idx-e.idx));const i=e.locations.map((t=>({refIdx:t.refIdx,setData:t.setData,updateData:t.updateData}))),l=i.length,a=s.length,c=s,h=n>0,u=G.cloneNode,d=G.insertBefore,f=X.remove;class p{constructor(t){this.data=t}beforeRemove(){}remove(){f.call(this.el)}firstNode(){return this.el}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,d.call(e,this.el,t)}moveBeforeVNode(t,e){d.call(this.parentEl,this.el,t?t.el:e)}toString(){const t=document.createElement("div");return this.mount(t,null),t.innerHTML}mount(e,n){const o=u.call(t,!0);d.call(e,o,n),this.el=o,this.parentEl=e}patch(t,e){}}h&&(p.prototype.mount=function(e,s){const h=u.call(t,!0),f=new Array(n);this.refs=f,f[0]=h;for(let t=0;t<r;t++){const e=o[t];f[e.idx]=e.getVal.call(f[e.prevIdx])}if(l){const t=this.data;for(let e=0;e<l;e++){const n=i[e];n.setData.call(f[n.refIdx],t[e])}}if(d.call(e,h,s),a){const t=this.children;for(let e=0;e<a;e++){const n=t[e];if(n){const t=c[e],o=t.afterRefIdx?f[t.afterRefIdx]:null;n.isOnlyChild=t.isOnlyChild,n.mount(f[t.parentRefIdx],o)}}}this.el=h,this.parentEl=e},p.prototype.patch=function(t,e){if(this===t)return;const n=this.refs;if(l){const e=this.data,o=t.data;for(let t=0;t<l;t++){const s=e[t],r=o[t];if(s!==r){const e=i[t];e.updateData.call(n[e.refIdx],r,s)}}this.data=o}if(a){let o=this.children;const s=t.children;for(let t=0;t<a;t++){const r=o[t],i=s[t];if(r)i?r.patch(i,e):(e&&r.beforeRemove(),r.remove(),o[t]=void 0);else if(i){const e=c[t],s=e.afterRefIdx?n[e.afterRefIdx]:null;i.mount(n[e.parentRefIdx],s),o[t]=i}}}});return p}(t,e);if(e.cbRefs.length){const t=e.cbRefs,o=e.refList;let s=t.length;n=class extends n{mount(t,e){o.push(new Array(s)),super.mount(t,e);for(let t of o.pop())t()}remove(){super.remove();for(let e of t){(0,this.data[e])(null)}}}}if(e.children.length)return n=class extends n{constructor(t,e){super(t),this.children=e}},n.prototype.beforeRemove=P.prototype.beforeRemove,(t,e=[])=>new n(t,e);return t=>new n(t)}(o.el,s);return et[t]=r,r}function ot(t){if(t.nodeType!==Node.TEXT_NODE||/\S/.test(t.textContent)){if(t.nodeType!==Node.ELEMENT_NODE||"pre"!==t.tagName)for(let e=t.childNodes.length-1;e>=0;--e)ot(t.childNodes.item(e))}else t.remove()}function st(t,e=null,n=null){switch(t.nodeType){case Node.ELEMENT_NODE:{let o=n&&n.currentNS;const s=t.tagName;let r;const i=[];if(s.startsWith("block-text-")){const t=parseInt(s.slice(11),10);i.push({type:"text",idx:t}),r=document.createTextNode("")}if(s.startsWith("block-child-")){n.isRef||rt(n);const t=parseInt(s.slice(12),10);i.push({type:"child",idx:t}),r=document.createTextNode("")}if(o||(o=t.namespaceURI),r||(r=o?document.createElementNS(o,s):document.createElement(s)),r instanceof Element){if(!n){document.createElement("template").content.appendChild(r)}const e=t.attributes;for(let t=0;t<e.length;t++){const n=e[t].name,o=e[t].value;if(n.startsWith("block-handler-")){const t=parseInt(n.slice(14),10);i.push({type:"handler",idx:t,event:o})}else if(n.startsWith("block-attribute-")){const t=parseInt(n.slice(16),10);i.push({type:"attribute",idx:t,name:o,tag:s})}else if(n.startsWith("block-property-")){const t=parseInt(n.slice(15),10);i.push({type:"property",idx:t,name:o,tag:s})}else"block-attributes"===n?i.push({type:"attributes",idx:parseInt(o,10)}):"block-ref"===n?i.push({type:"ref",idx:parseInt(o,10)}):r.setAttribute(e[t].name,o)}}const l={parent:e,firstChild:null,nextSibling:null,el:r,info:i,refN:0,currentNS:o};if(t.firstChild){const e=t.childNodes[0];if(1===t.childNodes.length&&e.nodeType===Node.ELEMENT_NODE&&e.tagName.startsWith("block-child-")){const t=e.tagName,n=parseInt(t.slice(12),10);i.push({idx:n,type:"child",isOnlyChild:!0})}else{l.firstChild=st(t.firstChild,l,l),r.appendChild(l.firstChild.el);let e=t.firstChild,n=l.firstChild;for(;e=e.nextSibling;)n.nextSibling=st(e,n,l),r.appendChild(n.nextSibling.el),n=n.nextSibling}}return l.info.length&&rt(l),l}case Node.TEXT_NODE:case Node.COMMENT_NODE:return{parent:e,firstChild:null,nextSibling:null,el:t.nodeType===Node.TEXT_NODE?document.createTextNode(t.textContent):document.createComment(t.textContent),info:[],refN:0,currentNS:null}}throw new r("boom")}function rt(t){t.isRef=!0;do{t.refN++}while(t=t.parent)}function it(t){let e=t.parent;for(;e&&e.nextSibling===t;)t=e,e=e.parent;return e}function lt(t,e,n){if(!e){e={collectors:[],locations:[],children:new Array(t.info.filter((t=>"child"===t.type)).length),cbRefs:[],refN:t.refN,refList:[]},n=0}if(t.refN){const o=n,s=t.isRef,r=t.firstChild?t.firstChild.refN:0,i=t.nextSibling?t.nextSibling.refN:0;if(s){for(let e of t.info)e.refIdx=o;t.refIdx=o,function(t,e){for(let n of e.info)switch(n.type){case"text":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:at,updateData:at});break;case"child":n.isOnlyChild?t.children[n.idx]={parentRefIdx:n.refIdx,isOnlyChild:!0}:t.children[n.idx]={parentRefIdx:it(e).refIdx,afterRefIdx:n.refIdx};break;case"property":{const e=n.refIdx,o=tt(n.name);t.locations.push({idx:n.idx,refIdx:e,setData:o,updateData:o});break}case"attribute":{const e=n.refIdx;let o,s;"class"===n.name?(s=y,o=w):(s=m(n.name),o=s),t.locations.push({idx:n.idx,refIdx:e,setData:s,updateData:o});break}case"attributes":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:g,updateData:b});break;case"handler":{const{setup:e,update:o}=A(n.event);t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:e,updateData:o});break}case"ref":const o=t.cbRefs.push(n.idx)-1;t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:ct(o,t.refList),updateData:Q})}}(e,t),n++}if(i){const s=n+r;e.collectors.push({idx:s,prevIdx:o,getVal:J}),lt(t.nextSibling,e,s)}r&&(e.collectors.push({idx:n,prevIdx:o,getVal:Z}),lt(t.firstChild,e,n))}return e}function at(t){Y.call(this,U(t))}function ct(t,e){return function(n){e[e.length-1][t]=()=>n(this)}}let ht,ut,dt,ft,pt,mt;if("undefined"!=typeof Node){const t=Node.prototype;ht=t.insertBefore,ut=t.appendChild,dt=t.removeChild,ft=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(t,"textContent").set}class gt{constructor(t){this.children=t}mount(t,e){const n=this.children,o=document.createTextNode("");this.anchor=o,ht.call(t,o,e);const s=n.length;if(s){const e=n[0].mount;for(let r=0;r<s;r++)e.call(n[r],t,o)}this.parentEl=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;const n=this.children;for(let o=0,s=n.length;o<s;o++)n[o].moveBeforeDOMNode(t,e);e.insertBefore(this.anchor,t)}moveBeforeVNode(t,e){if(t){const n=t.children[0];e=(n?n.firstNode():t.anchor)||null}const n=this.children;for(let t=0,o=n.length;t<o;t++)n[t].moveBeforeVNode(null,e);this.parentEl.insertBefore(this.anchor,e)}patch(t,e){if(this===t)return;const n=this.children,o=t.children;if(0===o.length&&0===n.length)return;this.children=o;const s=o[0]||n[0],{mount:r,patch:i,remove:l,beforeRemove:a,moveBeforeVNode:c,firstNode:h}=s,u=this.anchor,d=this.isOnlyChild,f=this.parentEl;if(0===o.length&&d){if(e)for(let t=0,e=n.length;t<e;t++)a.call(n[t]);return ft.call(f,""),void ut.call(f,u)}let p,m=0,g=0,b=n[0],v=o[0],y=n.length-1,w=o.length-1,$=n[y],x=o[w];for(;m<=y&&g<=w;){if(null===b){b=n[++m];continue}if(null===$){$=n[--y];continue}let t=b.key,s=v.key;if(t===s){i.call(b,v,e),o[g]=b,b=n[++m],v=o[++g];continue}let l=$.key,a=x.key;if(l===a){i.call($,x,e),o[w]=$,$=n[--y],x=o[--w];continue}if(t===a){i.call(b,x,e),o[w]=b;const t=o[w+1];c.call(b,t,u),b=n[++m],x=o[--w];continue}if(l===s){i.call($,v,e),o[g]=$;const t=n[m];c.call($,t,u),$=n[--y],v=o[++g];continue}p=p||vt(n,m,y);let d=p[s];if(void 0===d)r.call(v,f,h.call(b)||null);else{const t=n[d];c.call(t,b,null),i.call(t,v,e),o[g]=t,n[d]=null}v=o[++g]}if(m<=y||g<=w)if(m>y){const t=o[w+1],e=t?h.call(t)||null:u;for(let t=g;t<=w;t++)r.call(o[t],f,e)}else for(let t=m;t<=y;t++){let o=n[t];o&&(e&&a.call(o),l.call(o))}}beforeRemove(){const t=this.children,e=t.length;if(e){const n=t[0].beforeRemove;for(let o=0;o<e;o++)n.call(t[o])}}remove(){const{parentEl:t,anchor:e}=this;if(this.isOnlyChild)ft.call(t,"");else{const n=this.children,o=n.length;if(o){const t=n[0].remove;for(let e=0;e<o;e++)t.call(n[e])}dt.call(t,e)}}firstNode(){const t=this.children[0];return t?t.firstNode():void 0}toString(){return this.children.map((t=>t.toString())).join("")}}function bt(t){return new gt(t)}function vt(t,e,n){let o={};for(let s=e;s<=n;s++)o[t[s].key]=s;return o}if("undefined"!=typeof Node){const t=Node.prototype;pt=t.insertBefore,mt=t.removeChild}class yt{constructor(t){this.content=[],this.html=t}mount(t,e){this.parentEl=t;const n=document.createElement("template");n.innerHTML=this.html,this.content=[...n.content.childNodes];for(let n of this.content)pt.call(t,n,e);if(!this.content.length){const n=document.createTextNode("");this.content.push(n),pt.call(t,n,e)}}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;for(let n of this.content)pt.call(e,n,t)}moveBeforeVNode(t,e){const n=t?t.content[0]:e;this.moveBeforeDOMNode(n)}patch(t){if(this===t)return;const e=t.html;if(this.html!==e){const n=this.parentEl,o=this.content[0],s=document.createElement("template");s.innerHTML=e;const r=[...s.content.childNodes];for(let t of r)pt.call(n,t,o);if(!r.length){const t=document.createTextNode("");r.push(t),pt.call(n,t,o)}this.remove(),this.content=r,this.html=t.html}}beforeRemove(){}remove(){const t=this.parentEl;for(let e of this.content)mt.call(t,e)}firstNode(){return this.content[0]}toString(){return this.html}}function wt(t){return new yt(t)}function $t(t,e,n=null){t.mount(e,n)}const xt=new WeakMap,Nt=new WeakMap;function kt(t,e){if(!t)return!1;const n=t.fiber;n&&xt.set(n,e);const o=Nt.get(t);if(o){let t=!1;for(let n=o.length-1;n>=0;n--)try{o[n](e),t=!0;break}catch(t){e=t}if(t)return!0}return kt(t.parent,e)}function Tt(t){let{error:e}=t;e instanceof r||(e=Object.assign(new r('An error occured in the owl lifecycle (see this Error\'s "cause" property)'),{cause:e}));const n="node"in t?t.node:t.fiber.node,o="fiber"in t?t.fiber:n.fiber;if(o){let t=o;do{t.node.fiber=t,xt.set(t,e),t=t.parent}while(t);xt.set(o.root,e)}if(!kt(n,e)){console.warn("[Owl] Unhandled error. Destroying the root component");try{n.app.destroy()}catch(t){console.error(t)}throw e}}function Et(){throw new r("Attempted to render cancelled fiber")}function At(t){let e=0;for(let n of t){let t=n.node;n.render=Et,0===t.status&&t.cancel(),t.fiber=null,n.bdom?t.forceNextRender=!0:e++,e+=At(n.children)}return e}class _t{constructor(t,e){if(this.bdom=null,this.children=[],this.appliedToDom=!1,this.deep=!1,this.childrenMap={},this.node=t,this.parent=e,e){this.deep=e.deep;const t=e.root;t.setCounter(t.counter+1),this.root=t,e.children.push(this)}else this.root=this}render(){let t=this.root.node,e=t.app.scheduler,n=t.parent;for(;n;){if(n.fiber){let o=n.fiber.root;if(0!==o.counter||!(t.parentKey in n.fiber.childrenMap))return void e.delayedRenders.push(this);n=o.node}t=n,n=n.parent}this._render()}_render(){const t=this.node,e=this.root;if(e){try{this.bdom=!0,this.bdom=t.renderFn()}catch(e){t.app.handleError({node:t,error:e})}e.setCounter(e.counter-1)}}}class Ct extends _t{constructor(){super(...arguments),this.counter=1,this.willPatch=[],this.patched=[],this.mounted=[],this.locked=!1}complete(){const t=this.node;let e;this.locked=!0;let n=this.mounted;try{for(e of this.willPatch){let t=e.node;if(t.fiber===e){const e=t.component;for(let n of t.willPatch)n.call(e)}}for(e=void 0,t._patch(),this.locked=!1;e=n.pop();)if(e.appliedToDom)for(let t of e.node.mounted)t();let o=this.patched;for(;e=o.pop();)if(e.appliedToDom)for(let t of e.node.patched)t()}catch(o){for(let t of n)t.node.willUnmount=[];this.locked=!1,t.app.handleError({fiber:e||this,error:o})}}setCounter(t){this.counter=t,0===t&&this.node.app.scheduler.flush()}}class Dt extends Ct{constructor(t,e,n={}){super(t,null),this.target=e,this.position=n.position||"last-child"}complete(){let t=this;try{const e=this.node;if(e.children=this.childrenMap,e.app.constructor.validateTarget(this.target),e.bdom)e.updateDom();else if(e.bdom=this.bdom,"last-child"===this.position||0===this.target.childNodes.length)$t(e.bdom,this.target);else{const t=this.target.childNodes[0];$t(e.bdom,this.target,t)}e.fiber=null,e.status=1,this.appliedToDom=!0;let n=this.mounted;for(;t=n.pop();)if(t.appliedToDom)for(let e of t.node.mounted)e()}catch(e){this.node.app.handleError({fiber:t,error:e})}}}const St=Symbol("Key changes"),Ot=()=>{throw new Error("Called NO_CALLBACK. Owl is broken, please report this to the maintainers.")},Rt=Object.prototype.toString,Lt=Object.prototype.hasOwnProperty,Bt=["Object","Array","Set","Map","WeakMap"],Pt=["Set","Map","WeakMap"];function jt(t){return Rt.call(Ft(t)).slice(8,-1)}function Mt(t){return"object"==typeof t&&Bt.includes(jt(t))}function It(t,e){return Mt(t)?Yt(t,e):t}const Wt=new WeakSet;function Vt(t){return Wt.add(t),t}function Ft(t){return Gt.has(t)?Gt.get(t):t}const Kt=new WeakMap;function zt(t,e,n){if(n===Ot)return;Kt.get(t)||Kt.set(t,new Map);const o=Kt.get(t);o.get(e)||o.set(e,new Set),o.get(e).add(n),Ut.has(n)||Ut.set(n,new Set),Ut.get(n).add(t)}function Ht(t,e){const n=Kt.get(t);if(!n)return;const o=n.get(e);if(o)for(const t of[...o])qt(t),t()}const Ut=new WeakMap;function qt(t){const e=Ut.get(t);if(e){for(const n of e){const e=Kt.get(n);if(e)for(const[n,o]of e.entries())o.delete(t),o.size||e.delete(n)}e.clear()}}const Gt=new WeakMap,Xt=new WeakMap;function Yt(t,e=Ot){if(!Mt(t))throw new r("Cannot make the given value reactive");if(Wt.has(t))return t;if(Gt.has(t))return Yt(Gt.get(t),e);Xt.has(t)||Xt.set(t,new WeakMap);const n=Xt.get(t);if(!n.has(e)){const o=jt(t),s=Pt.includes(o)?function(t,e,n){const o=oe[n](t,e);return Object.assign(Zt(e),{get:(t,n)=>Lt.call(o,n)?o[n]:(zt(t,n,e),It(t[n],e))})}(t,e,o):Zt(e),r=new Proxy(t,s);n.set(e,r),Gt.set(r,t)}return n.get(e)}function Zt(t){return{get(e,n,o){const s=Object.getOwnPropertyDescriptor(e,n);return!s||s.writable||s.configurable?(zt(e,n,t),It(Reflect.get(e,n,o),t)):Reflect.get(e,n,o)},set(t,e,n,o){const s=Lt.call(t,e),r=Reflect.get(t,e,o),i=Reflect.set(t,e,Ft(n),o);return!s&&Lt.call(t,e)&&Ht(t,St),(r!==Reflect.get(t,e,o)||"length"===e&&Array.isArray(t))&&Ht(t,e),i},deleteProperty(t,e){const n=Reflect.deleteProperty(t,e);return Ht(t,St),Ht(t,e),n},ownKeys:e=>(zt(e,St,t),Reflect.ownKeys(e)),has:(e,n)=>(zt(e,St,t),Reflect.has(e,n))}}function Jt(t,e,n){return o=>(o=Ft(o),zt(e,o,n),It(e[t](o),n))}function Qt(t,e,n){return function*(){zt(e,St,n);const o=e.keys();for(const s of e[t]()){const t=o.next().value;zt(e,t,n),yield It(s,n)}}}function te(t,e){return function(n,o){zt(t,St,e),t.forEach((function(s,r,i){zt(t,r,e),n.call(o,It(s,e),It(r,e),It(i,e))}),o)}}function ee(t,e,n){return(o,s)=>{o=Ft(o);const r=n.has(o),i=n[e](o),l=n[t](o,s);return r!==n.has(o)&&Ht(n,St),i!==n[e](o)&&Ht(n,o),l}}function ne(t){return()=>{const e=[...t.keys()];t.clear(),Ht(t,St);for(const n of e)Ht(t,n)}}const oe={Set:(t,e)=>({has:Jt("has",t,e),add:ee("add","has",t),delete:ee("delete","has",t),keys:Qt("keys",t,e),values:Qt("values",t,e),entries:Qt("entries",t,e),[Symbol.iterator]:Qt(Symbol.iterator,t,e),forEach:te(t,e),clear:ne(t),get size(){return zt(t,St,e),t.size}}),Map:(t,e)=>({has:Jt("has",t,e),get:Jt("get",t,e),set:ee("set","get",t),delete:ee("delete","has",t),keys:Qt("keys",t,e),values:Qt("values",t,e),entries:Qt("entries",t,e),[Symbol.iterator]:Qt(Symbol.iterator,t,e),forEach:te(t,e),clear:ne(t),get size(){return zt(t,St,e),t.size}}),WeakMap:(t,e)=>({has:Jt("has",t,e),get:Jt("get",t,e),set:ee("set","get",t),delete:ee("delete","has",t)})};let se=null;function re(){if(!se)throw new r("No active component (a hook function should only be called in 'setup')");return se}function ie(t,e){for(let n in e)void 0===t[n]&&(t[n]=e[n])}const le=new WeakMap;function ae(t){const e=re();let n=le.get(e);if(!n){const t={fn:$(e.render.bind(e,!1))};n=(...e)=>t.fn(...e),le.set(e,n),e.willDestroy.push(he.bind(null,t,n))}return Yt(t,n)}const ce=()=>{};function he(t,e){t.fn=ce,qt(e)}class ue{constructor(t,e,n,o,s){this.fiber=null,this.bdom=null,this.status=0,this.forceNextRender=!1,this.nextProps=null,this.children=Object.create(null),this.refs={},this.willStart=[],this.willUpdateProps=[],this.willUnmount=[],this.mounted=[],this.willPatch=[],this.patched=[],this.willDestroy=[],se=this,this.app=n,this.parent=o,this.props=e,this.parentKey=s;const r=t.defaultProps;e=Object.assign({},e),r&&ie(e,r);const i=o&&o.childEnv||n.env;this.childEnv=i;for(const t in e){const n=e[t];n&&"object"==typeof n&&Gt.has(n)&&(e[t]=ae(n))}this.component=new t(e,i,this);const l=Object.assign(Object.create(this.component),{this:this.component});this.renderFn=n.getTemplate(t.template).bind(this.component,l,this),this.component.setup(),se=null}mountComponent(t,e){const n=new Dt(this,t,e);this.app.scheduler.addFiber(n),this.initiateRender(n)}async initiateRender(t){this.fiber=t,this.mounted.length&&t.root.mounted.push(t);const e=this.component;try{await Promise.all(this.willStart.map((t=>t.call(e))))}catch(t){return void this.app.handleError({node:this,error:t})}0===this.status&&this.fiber===t&&t.render()}async render(t){if(this.status>=2)return;let e=this.fiber;if(e&&(e.root.locked||!0===e.bdom)&&(await Promise.resolve(),e=this.fiber),e){if(!e.bdom&&!xt.has(e))return void(t&&(e.deep=t));t=t||e.deep}else if(!this.bdom)return;const n=function(t){let e=t.fiber;if(e){let t=e.root;return t.locked=!0,t.setCounter(t.counter+1-At(e.children)),t.locked=!1,e.children=[],e.childrenMap={},e.bdom=null,xt.has(e)&&(xt.delete(e),xt.delete(t),e.appliedToDom=!1,e instanceof Ct&&(e.mounted=e instanceof Dt?[e]:[])),e}const n=new Ct(t,null);return t.willPatch.length&&n.willPatch.push(n),t.patched.length&&n.patched.push(n),n}(this);n.deep=t,this.fiber=n,this.app.scheduler.addFiber(n),await Promise.resolve(),this.status>=2||this.fiber!==n||!e&&n.parent||n.render()}cancel(){this._cancel(),delete this.parent.children[this.parentKey],this.app.scheduler.scheduleDestroy(this)}_cancel(){this.status=2;const t=this.children;for(let e in t)t[e]._cancel()}destroy(){let t=1===this.status;this._destroy(),t&&this.bdom.remove()}_destroy(){const t=this.component;if(1===this.status)for(let e of this.willUnmount)e.call(t);for(let t of Object.values(this.children))t._destroy();if(this.willDestroy.length)try{for(let e of this.willDestroy)e.call(t)}catch(t){this.app.handleError({error:t,node:this})}this.status=3}async updateAndRender(t,e){this.nextProps=t,t=Object.assign({},t);const n=function(t,e){let n=t.fiber;return n&&(At(n.children),n.root=null),new _t(t,e)}(this,e);this.fiber=n;const o=this.component,s=o.constructor.defaultProps;s&&ie(t,s),se=this;for(const e in t){const n=t[e];n&&"object"==typeof n&&Gt.has(n)&&(t[e]=ae(n))}se=null;const r=Promise.all(this.willUpdateProps.map((e=>e.call(o,t))));if(await r,n!==this.fiber)return;o.props=t,n.render();const i=e.root;this.willPatch.length&&i.willPatch.push(n),this.patched.length&&i.patched.push(n)}updateDom(){if(this.fiber)if(this.bdom===this.fiber.bdom)for(let t in this.children){this.children[t].updateDom()}else this.bdom.patch(this.fiber.bdom,!1),this.fiber.appliedToDom=!0,this.fiber=null}setRef(t,e){e&&(this.refs[t]=e)}firstNode(){const t=this.bdom;return t?t.firstNode():void 0}mount(t,e){const n=this.fiber.bdom;this.bdom=n,n.mount(t,e),this.status=1,this.fiber.appliedToDom=!0,this.children=this.fiber.childrenMap,this.fiber=null}moveBeforeDOMNode(t,e){this.bdom.moveBeforeDOMNode(t,e)}moveBeforeVNode(t,e){this.bdom.moveBeforeVNode(t?t.bdom:null,e)}patch(){this.fiber&&this.fiber.parent&&(this._patch(),this.props=this.nextProps)}_patch(){let t=!1;for(let e in this.children){t=!0;break}const e=this.fiber;this.children=e.childrenMap,this.bdom.patch(e.bdom,t),e.appliedToDom=!0,this.fiber=null}beforeRemove(){this._destroy()}remove(){this.bdom.remove()}get name(){return this.component.constructor.name}get subscriptions(){const t=le.get(this);return t?(e=t,[...Ut.get(e)||[]].map((t=>{const n=Kt.get(t);let o=[];if(n)for(const[t,s]of n)s.has(e)&&o.push(t);return{target:t,keys:o}}))):[];var e}}const de=Symbol("timeout"),fe={onWillStart:3e3,onWillUpdateProps:3e3};function pe(t,e){const n=new r,o=new r,s=re();return(...r)=>{const i=t=>{throw n.cause=t,n.message=t instanceof Error?`The following error occurred in ${e}: "${t.message}"`:`Something that is not an Error was thrown in ${e} (see this Error's "cause" property)`,n};let l;try{l=t(...r)}catch(t){i(t)}if(!(l instanceof Promise))return l;const a=fe[e];if(a){const t=s.fiber;Promise.race([l.catch((()=>{})),new Promise((t=>setTimeout((()=>t(de)),a)))]).then((n=>{n===de&&s.fiber===t&&s.status<=2&&(o.message=`${e}'s promise hasn't resolved after ${a/1e3} seconds`,console.log(o))}))}return l.catch(i)}}function me(t){const e=re(),n=e.app.dev?pe:t=>t;e.mounted.push(n(t.bind(e.component),"onMounted"))}function ge(t){const e=re(),n=e.app.dev?pe:t=>t;e.patched.push(n(t.bind(e.component),"onPatched"))}function be(t){const e=re(),n=e.app.dev?pe:t=>t;e.willUnmount.unshift(n(t.bind(e.component),"onWillUnmount"))}class ve{constructor(t,e,n){this.props=t,this.env=e,this.__owl__=n}setup(){}render(t=!1){this.__owl__.render(!0===t)}}ve.template="";const ye=z("").constructor;class we extends ye{constructor(t,e){super(""),this.target=null,this.selector=t,this.content=e}mount(t,e){super.mount(t,e),this.target=document.querySelector(this.selector),this.target?this.content.mount(this.target,null):this.content.mount(t,e)}beforeRemove(){this.content.beforeRemove()}remove(){this.content&&(super.remove(),this.content.remove(),this.content=null)}patch(t){super.patch(t),this.content?this.content.patch(t.content,!0):(this.content=t.content,this.content.mount(this.target,null))}}class $e extends ve{setup(){const t=this.__owl__;me((()=>{const e=t.bdom;if(!e.target){const t=document.querySelector(this.props.target);if(!t)throw new r("invalid portal target");e.content.moveBeforeDOMNode(t.firstChild,t)}})),be((()=>{t.bdom.remove()}))}}$e.template="__portal__",$e.props={target:{type:String},slots:!0};const xe=t=>Array.isArray(t),Ne=t=>"object"!=typeof t,ke=t=>"object"==typeof t&&t&&"value"in t;function Te(t){return"object"==typeof t&&"optional"in t&&t.optional||!1}function Ee(t){return"*"===t||!0===t?"value":t.name.toLowerCase()}function Ae(t){return Ne(t)?Ee(t):xe(t)?t.map(Ae).join(" or "):ke(t)?String(t.value):"element"in t?`list of ${Ae({type:t.element,optional:!1})}s`:"shape"in t?"object":Ae(t.type||"*")}function _e(t,e){var n;Array.isArray(e)&&(n=e,e=Object.fromEntries(n.map((t=>t.endsWith("?")?[t.slice(0,-1),{optional:!0}]:[t,{type:"*",optional:!1}])))),t=Ft(t);let o=[];for(let n in t)if(n in e){let s=Ce(n,t[n],e[n]);s&&o.push(s)}else"*"in e||o.push(`unknown key '${n}'`);for(let n in e){const s=e[n];if("*"!==n&&!Te(s)&&!(n in t)){const t="object"==typeof s&&!Array.isArray(s);let e="*"===s||(t&&"type"in s?"*"===s.type:t)?"":` (should be a ${Ae(s)})`;o.push(`'${n}' is missing${e}`)}}return o}function Ce(t,e,n){if(void 0===e)return Te(n)?null:`'${t}' is undefined (should be a ${Ae(n)})`;if(Ne(n))return function(t,e,n){if("function"==typeof n)if("object"==typeof e){if(!(e instanceof n))return`'${t}' is not a ${Ee(n)}`}else if(typeof e!==n.name.toLowerCase())return`'${t}' is not a ${Ee(n)}`;return null}(t,e,n);if(ke(n))return e===n.value?null:`'${t}' is not equal to '${n.value}'`;if(xe(n)){let o=n.find((n=>!Ce(t,e,n)));return o?null:`'${t}' is not a ${Ae(n)}`}let o=null;if("element"in n)o=function(t,e,n){if(!Array.isArray(e))return`'${t}' is not a list of ${Ae(n)}s`;for(let o=0;o<e.length;o++){const s=Ce(`${t}[${o}]`,e[o],n);if(s)return s}return null}(t,e,n.element);else if("shape"in n)if("object"!=typeof e||Array.isArray(e))o=`'${t}' is not an object`;else{const s=_e(e,n.shape);s.length&&(o=`'${t}' doesn't have the correct shape (${s.join(", ")})`)}else if("values"in n)if("object"!=typeof e||Array.isArray(e))o=`'${t}' is not an object`;else{const s=Object.entries(e).map((([t,e])=>Ce(t,e,n.values))).filter(Boolean);s.length&&(o=`some of the values in '${t}' are invalid (${s.join(", ")})`)}return"type"in n&&!o&&(o=Ce(t,e,n.type)),"validate"in n&&!o&&(o=n.validate(e)?null:`'${t}' is not valid`),o}const De=Object.create;function Se(t){const e=De(t);for(let n in t)e[n]=t[n];return e}const Oe=Symbol("isBoundary");class Re{constructor(t,e,n,o,s){this.fn=t,this.ctx=Se(e),this.component=n,this.node=o,this.key=s}evaluate(){return this.fn.call(this.component,this.ctx,this.node,this.key)}toString(){return this.evaluate().toString()}}function Le(t,e,n){const o="string"!=typeof t?t:n.constructor.components[t];if(!o)return;const s=o.props;if(!s)return void(n.__owl__.app.warnIfNoStaticProps&&console.warn(`Component '${o.name}' does not have a static props description`));const i=o.defaultProps;if(i){let t=t=>Array.isArray(s)?s.includes(t):t in s&&!("*"in s)&&!Te(s[t]);for(let e in i)if(t(e))throw new r(`A default value cannot be defined for a mandatory prop (name: '${e}', component: ${o.name})`)}const l=_e(e,s);if(l.length)throw new r(`Invalid props for component '${o.name}': `+l.join(", "))}const Be={withDefault:function(t,e){return null==t||!1===t?e:t},zero:Symbol("zero"),isBoundary:Oe,callSlot:function(t,e,n,o,r,i,l){n=n+"__slot_"+o;const a=t.props.slots||{},{__render:c,__ctx:h,__scope:u}=a[o]||{},d=De(h||{});u&&(d[u]=i);const f=c?c(d,e,n):null;if(l){let i,a;return f?i=r?s(o,f):f:a=l(t,e,n),j([i,a])}return f||z("")},capture:Se,withKey:function(t,e){return t.key=e,t},prepareList:function(t){let e,n;if(Array.isArray(t))e=t,n=t;else if(t instanceof Map)e=[...t.keys()],n=[...t.values()];else if(Symbol.iterator in Object(t))e=[...t],n=e;else{if(!t||"object"!=typeof t)throw new r(`Invalid loop expression: "${t}" is not iterable`);n=Object.values(t),e=Object.keys(t)}const o=n.length;return[e,n,o,new Array(o)]},setContextValue:function(t,e,n){const o=t;for(;!t.hasOwnProperty(e)&&!t.hasOwnProperty(Oe);){const e=t.__proto__;if(!e){t=o;break}t=e}t[e]=n},shallowEqual:function(t,e){for(let n=0,o=t.length;n<o;n++)if(t[n]!==e[n])return!1;return!0},toNumber:function(t){const e=parseFloat(t);return isNaN(e)?t:e},validateProps:Le,LazyValue:Re,safeOutput:function(t,e){if(null==t)return e?s("default",e):s("undefined",z(""));let n,o;switch(typeof t){case"object":t instanceof k?(n="string_safe",o=wt(t)):t instanceof Re?(n="lazy_value",o=t.evaluate()):t instanceof String?(n="string_unsafe",o=z(t)):(n="block_safe",o=t);break;case"string":n="string_unsafe",o=z(t);break;default:n="string_unsafe",o=z(String(t))}return s(n,o)},createCatcher:function(t){const e=Object.keys(t).length;class n{constructor(t,e){this.handlerFns=[],this.afterNode=null,this.child=t,this.handlerData=e}mount(e,n){this.parentEl=e,this.child.mount(e,n),this.afterNode=document.createTextNode(""),e.insertBefore(this.afterNode,n),this.wrapHandlerData();for(let n in t){const o=t[n],s=A(n);this.handlerFns[o]=s,s.setup.call(e,this.handlerData[o])}}wrapHandlerData(){for(let t=0;t<e;t++){let e=this.handlerData[t],n=e.length-2,o=e[n];const s=this;e[n]=function(t){const e=t.target;let n=s.child.firstNode();const r=s.afterNode;for(;n&&n!==r;){if(n.contains(e))return o.call(this,t);n=n.nextSibling}}}}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,this.child.moveBeforeDOMNode(t,e),e.insertBefore(this.afterNode,t)}moveBeforeVNode(t,e){t&&(e=t.firstNode()||e),this.child.moveBeforeVNode(t?t.child:null,e),this.parentEl.insertBefore(this.afterNode,e)}patch(t,n){if(this!==t){this.handlerData=t.handlerData,this.wrapHandlerData();for(let t=0;t<e;t++)this.handlerFns[t].update.call(this.parentEl,this.handlerData[t]);this.child.patch(t.child,n)}}beforeRemove(){this.child.beforeRemove()}remove(){for(let t=0;t<e;t++)this.handlerFns[t].remove.call(this.parentEl);this.child.remove(),this.afterNode.remove()}firstNode(){return this.child.firstNode()}toString(){return this.child.toString()}}return function(t,e){return new n(t,e)}},markRaw:Vt,OwlError:r,makeRefWrapper:function(t){let e=new Set;return(n,o)=>{if(e.has(n))throw new r(`Cannot set the same ref more than once in the same component, ref "${n}" was set multiple times in ${t.name}`);return e.add(n),o}}};function Pe(t){const e=(new DOMParser).parseFromString(t,"text/xml");if(e.getElementsByTagName("parsererror").length){let n="Invalid XML in template.";const o=e.getElementsByTagName("parsererror")[0].textContent;if(o){n+="\nThe parser has produced the following error message:\n"+o;const e=/\d+/g,s=e.exec(o);if(s){const r=Number(s[0]),i=t.split("\n")[r-1],l=e.exec(o);if(i&&l){const t=Number(l[0])-1;i[t]&&(n+=`\nThe error might be located at xml line ${r} column ${t}\n${i}\n${"-".repeat(t-1)}^`)}}}throw new r(n)}return e}const je={text:z,createBlock:nt,list:bt,multi:j,html:wt,toggler:s,comment:H};class Me{constructor(t={}){if(this.rawTemplates=Object.create(Ie),this.templates={},this.Portal=$e,this.dev=t.dev||!1,this.translateFn=t.translateFn,this.translatableAttributes=t.translatableAttributes,t.templates)if(t.templates instanceof Document||"string"==typeof t.templates)this.addTemplates(t.templates);else for(const e in t.templates)this.addTemplate(e,t.templates[e]);this.getRawTemplate=t.getTemplate,this.customDirectives=t.customDirectives||{},this.runtimeUtils={...Be,__globals__:t.globalValues||{}},this.hasGlobalValues=Boolean(t.globalValues&&Object.keys(t.globalValues).length)}static registerTemplate(t,e){Ie[t]=e}addTemplate(t,e){if(t in this.rawTemplates){if(!this.dev)return;const n=this.rawTemplates[t];if(("string"==typeof n?n:n instanceof Element?n.outerHTML:n.toString())===("string"==typeof e?e:e.outerHTML))return;throw new r(`Template ${t} already defined with different content`)}this.rawTemplates[t]=e}addTemplates(t){if(t){t=t instanceof Document?t:Pe(t);for(const e of t.querySelectorAll("[t-name]")){const t=e.getAttribute("t-name");this.addTemplate(t,e)}}}getTemplate(t){var e;if(!(t in this.templates)){const n=(null===(e=this.getRawTemplate)||void 0===e?void 0:e.call(this,t))||this.rawTemplates[t];if(void 0===n){let e="";try{e=` (for component "${re().component.constructor.name}")`}catch{}throw new r(`Missing template: "${t}"${e}`)}const o="function"==typeof n&&!(n instanceof Element)?n:this._compileTemplate(t,n),s=this.templates;this.templates[t]=function(e,n){return s[t].call(this,e,n)};const i=o(this,je,this.runtimeUtils);this.templates[t]=i}return this.templates[t]}_compileTemplate(t,e){throw new r("Unable to compile a template. Please use owl full build instead")}callTemplate(t,e,n,o,r){return s(e,this.getTemplate(e).call(t,n,o,r+e))}}const Ie={};function We(...t){const e="__template__"+We.nextId++,n=String.raw(...t);return Ie[e]=n,e}We.nextId=1,Me.registerTemplate("__portal__",(function(t,e,n){let{callSlot:o}=n;return function(t,e,n=""){return new we(t.props.target,o(t,e,n,"default",!1,null))}}));const Ve="true,false,NaN,null,undefined,debugger,console,window,in,instanceof,new,function,return,eval,void,Math,RegExp,Array,Object,Date,__globals__".split(","),Fe=Object.assign(Object.create(null),{and:"&&",or:"||",gt:">",gte:">=",lt:"<",lte:"<="}),Ke=Object.assign(Object.create(null),{"{":"LEFT_BRACE","}":"RIGHT_BRACE","[":"LEFT_BRACKET","]":"RIGHT_BRACKET",":":"COLON",",":"COMMA","(":"LEFT_PAREN",")":"RIGHT_PAREN"}),ze="...,.,===,==,+,!==,!=,!,||,&&,>=,>,<=,<,?,-,*,/,%,typeof ,=>,=,;,in ,new ,|,&,^,~".split(",");const He=[function(t){let e=t[0],n=e;if("'"!==e&&'"'!==e&&"`"!==e)return!1;let o,s=1;for(;t[s]&&t[s]!==n;){if(o=t[s],e+=o,"\\"===o){if(s++,o=t[s],!o)throw new r("Invalid expression");e+=o}s++}if(t[s]!==n)throw new r("Invalid expression");return e+=n,"`"===n?{type:"TEMPLATE_STRING",value:e,replace:t=>e.replace(/\$\{(.*?)\}/g,((e,n)=>"${"+t(n)+"}"))}:{type:"VALUE",value:e}},function(t){let e=t[0];if(e&&e.match(/[0-9]/)){let n=1;for(;t[n]&&t[n].match(/[0-9]|\./);)e+=t[n],n++;return{type:"VALUE",value:e}}return!1},function(t){for(let e of ze)if(t.startsWith(e))return{type:"OPERATOR",value:e};return!1},function(t){let e=t[0];if(e&&e.match(/[a-zA-Z_\$]/)){let n=1;for(;t[n]&&t[n].match(/\w/);)e+=t[n],n++;return e in Fe?{type:"OPERATOR",value:Fe[e],size:e.length}:{type:"SYMBOL",value:e}}return!1},function(t){const e=t[0];return!(!e||!(e in Ke))&&{type:Ke[e],value:e}}];const Ue=t=>t&&("LEFT_BRACE"===t.type||"COMMA"===t.type),qe=t=>t&&("RIGHT_BRACE"===t.type||"COMMA"===t.type);function Ge(t){const e=new Set,n=function(t){const e=[];let n,o=!0,s=t;try{for(;o;)if(s=s.trim(),s){for(let t of He)if(o=t(s),o){e.push(o),s=s.slice(o.size||o.value.length);break}}else o=!1}catch(t){n=t}if(s.length||n)throw new r(`Tokenizer error: could not tokenize \`${t}\``);return e}(t);let o=0,s=[];for(;o<n.length;){let t=n[o],r=n[o-1],i=n[o+1],l=s[s.length-1];switch(t.type){case"LEFT_BRACE":case"LEFT_BRACKET":case"LEFT_PAREN":s.push(t.type);break;case"RIGHT_BRACE":case"RIGHT_BRACKET":case"RIGHT_PAREN":s.pop()}let a="SYMBOL"===t.type&&!Ve.includes(t.value);if("SYMBOL"!==t.type||Ve.includes(t.value)||r&&("LEFT_BRACE"===l&&Ue(r)&&qe(i)&&(n.splice(o+1,0,{type:"COLON",value:":"},{...t}),i=n[o+1]),"OPERATOR"===r.type&&"."===r.value?a=!1:"LEFT_BRACE"!==r.type&&"COMMA"!==r.type||i&&"COLON"===i.type&&(a=!1)),"TEMPLATE_STRING"===t.type&&(t.value=t.replace((t=>Ye(t)))),i&&"OPERATOR"===i.type&&"=>"===i.value)if("RIGHT_PAREN"===t.type){let t=o-1;for(;t>0&&"LEFT_PAREN"!==n[t].type;)"SYMBOL"===n[t].type&&n[t].originalValue&&(n[t].value=n[t].originalValue,e.add(n[t].value)),t--}else e.add(t.value);a&&(t.varName=t.value,e.has(t.value)||(t.originalValue=t.value,t.value=`ctx['${t.value}']`)),o++}for(const t of n)"SYMBOL"===t.type&&t.varName&&e.has(t.value)&&(t.originalValue=t.value,t.value=`_${t.value}`,t.isLocal=!0);return n}const Xe=new Map([["in "," in "]]);function Ye(t){return Ge(t).map((t=>Xe.get(t.value)||t.value)).join("")}const Ze=/\{\{.*?\}\}|\#\{.*?\}/g;function Je(t,e){let n=t.match(Ze);if(n&&n[0].length===t.length)return`(${e(t.slice(2,"{"===n[0][0]?-2:-1))})`;let o=t.replace(Ze,(t=>"${"+e(t.slice(2,"{"===t[0]?-2:-1))+"}"));return"`"+o+"`"}function Qe(t){return Je(t,Ye)}const tn=/\s+/g;let en;"undefined"!=typeof document&&(en=document.implementation.createDocument(null,null,null));const nn=new Set(["stop","capture","prevent","self","synthetic"]);let on={};function sn(t=""){return on[t]=(on[t]||0)+1,t+on[t]}function rn(t,e){switch(t){case"input":return"checked"===e||"indeterminate"===e||"value"===e||"readonly"===e||"readOnly"===e||"disabled"===e;case"option":return"selected"===e||"disabled"===e;case"textarea":return"value"===e||"readonly"===e||"readOnly"===e||"disabled"===e;case"select":return"value"===e||"disabled"===e;case"button":case"optgroup":return"disabled"===e}return!1}function ln(t){return`\`${t.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/,"\\${")}\``}class an{constructor(t,e){this.dynamicTagName=null,this.isRoot=!1,this.hasDynamicChildren=!1,this.children=[],this.data=[],this.childNumber=0,this.parentVar="",this.id=an.nextBlockId++,this.varName="b"+this.id,this.blockName="block"+this.id,this.target=t,this.type=e}insertData(t,e="d"){const n=sn(e);return this.target.addLine(`let ${n} = ${t};`),this.data.push(n)-1}insert(t){this.currentDom?this.currentDom.appendChild(t):this.dom=t}generateExpr(t){if("block"===this.type){const t=this.children.length;let e=this.data.length?`[${this.data.join(", ")}]`:t?"[]":"";return t&&(e+=", ["+this.children.map((t=>t.varName)).join(", ")+"]"),this.dynamicTagName?`toggler(${this.dynamicTagName}, ${this.blockName}(${this.dynamicTagName})(${e}))`:`${this.blockName}(${e})`}return"list"===this.type?`list(c_block${this.id})`:t}asXmlString(){const t=en.createElement("t");return t.appendChild(this.dom),t.innerHTML}}function cn(t,e){return Object.assign({block:null,index:0,forceNewBlock:!0,translate:t.translate,translationCtx:t.translationCtx,tKeyExpr:null,nameSpace:t.nameSpace,tModelSelectedExpr:t.tModelSelectedExpr},e)}an.nextBlockId=1;class hn{constructor(t,e){this.indentLevel=0,this.loopLevel=0,this.code=[],this.hasRoot=!1,this.hasCache=!1,this.shouldProtectScope=!1,this.hasRefWrapper=!1,this.name=t,this.on=e||null}addLine(t,e){const n=new Array(this.indentLevel+2).join(" ");void 0===e?this.code.push(n+t):this.code.splice(e,0,n+t)}generateCode(){let t=[];t.push(`function ${this.name}(ctx, node, key = "") {`),this.shouldProtectScope&&(t.push(" ctx = Object.create(ctx);"),t.push(" ctx[isBoundary] = 1")),this.hasRefWrapper&&t.push(" let refWrapper = makeRefWrapper(this.__owl__);"),this.hasCache&&(t.push(" let cache = ctx.cache || {};"),t.push(" let nextCache = ctx.cache = {};"));for(let e of this.code)t.push(e);return this.hasRoot||t.push("return text('');"),t.push("}"),t.join("\n ")}currentKey(t){let e=this.loopLevel?`key${this.loopLevel}`:"key";return t.tKeyExpr&&(e=`${t.tKeyExpr} + ${e}`),e}}const un=["alt","aria-label","aria-placeholder","aria-roledescription","aria-valuetext","label","placeholder","title"],dn=/^(\s*)([\s\S]+?)(\s*)$/;class fn{constructor(t,e){if(this.blocks=[],this.nextBlockId=1,this.isDebug=!1,this.targets=[],this.target=new hn("template"),this.translatableAttributes=un,this.staticDefs=[],this.slotNames=new Set,this.helpers=new Set,this.translateFn=e.translateFn||(t=>t),e.translatableAttributes){const t=new Set(un);for(let n of e.translatableAttributes)n.startsWith("-")?t.delete(n.slice(1)):t.add(n);this.translatableAttributes=[...t]}this.hasSafeContext=e.hasSafeContext||!1,this.dev=e.dev||!1,this.ast=t,this.templateName=e.name,e.hasGlobalValues&&this.helpers.add("__globals__")}generateCode(){const t=this.ast;this.isDebug=12===t.type,an.nextBlockId=1,on={},this.compileAST(t,{block:null,index:0,forceNewBlock:!1,isLast:!0,translate:!0,translationCtx:"",tKeyExpr:null});let e=[" let { text, createBlock, list, multi, html, toggler, comment } = bdom;"];this.helpers.size&&e.push(`let { ${[...this.helpers].join(", ")} } = helpers;`),this.templateName&&e.push(`// Template name: "${this.templateName}"`);for(let{id:t,expr:n}of this.staticDefs)e.push(`const ${t} = ${n};`);if(this.blocks.length){e.push("");for(let t of this.blocks)if(t.dom){let n=ln(t.asXmlString());t.dynamicTagName?(n=n.replace(/^`<\w+/,`\`<\${tag || '${t.dom.nodeName}'}`),n=n.replace(/\w+>`$/,`\${tag || '${t.dom.nodeName}'}>\``),e.push(`let ${t.blockName} = tag => createBlock(${n});`)):e.push(`let ${t.blockName} = createBlock(${n});`)}}if(this.targets.length)for(let t of this.targets)e.push(""),e=e.concat(t.generateCode());e.push(""),e=e.concat("return "+this.target.generateCode());const n=e.join("\n ");if(this.isDebug){const t=`[Owl Debug]\n${n}`;console.log(t)}return n}compileInNewTarget(t,e,n,o){const s=sn(t),r=this.target,i=new hn(s,o);return this.targets.push(i),this.target=i,this.compileAST(e,cn(n)),this.target=r,s}addLine(t,e){this.target.addLine(t,e)}define(t,e){this.addLine(`const ${t} = ${e};`)}insertAnchor(t,e=t.children.length){const n=`block-child-${e}`,o=en.createElement(n);t.insert(o)}createBlock(t,e,n){const o=this.target.hasRoot,s=new an(this.target,e);return o||(this.target.hasRoot=!0,s.isRoot=!0),t&&(t.children.push(s),"list"===t.type&&(s.parentVar=`c_block${t.id}`)),s}insertBlock(t,e,n){let o=e.generateExpr(t);if(e.parentVar){let t=this.target.currentKey(n);return this.helpers.add("withKey"),void this.addLine(`${e.parentVar}[${n.index}] = withKey(${o}, ${t});`)}n.tKeyExpr&&(o=`toggler(${n.tKeyExpr}, ${o})`),e.isRoot?(this.target.on&&(o=this.wrapWithEventCatcher(o,this.target.on)),this.addLine(`return ${o};`)):this.define(e.varName,o)}captureExpression(t,e=!1){if(!e&&!t.includes("=>"))return Ye(t);const n=Ge(t),o=new Map;return n.map((t=>{if(t.varName&&!t.isLocal){if(!o.has(t.varName)){const e=sn("v");o.set(t.varName,e),this.define(e,t.value)}t.value=o.get(t.varName)}return t.value})).join("")}translate(t,e){const n=dn.exec(t);return n[1]+this.translateFn(n[2],e)+n[3]}compileAST(t,e){switch(t.type){case 1:return this.compileComment(t,e);case 0:return this.compileText(t,e);case 2:return this.compileTDomNode(t,e);case 4:return this.compileTEsc(t,e);case 8:return this.compileTOut(t,e);case 5:return this.compileTIf(t,e);case 9:return this.compileTForeach(t,e);case 10:return this.compileTKey(t,e);case 3:return this.compileMulti(t,e);case 7:return this.compileTCall(t,e);case 15:return this.compileTCallBlock(t,e);case 6:return this.compileTSet(t,e);case 11:return this.compileComponent(t,e);case 12:return this.compileDebug(t,e);case 13:return this.compileLog(t,e);case 14:return this.compileTSlot(t,e);case 16:return this.compileTTranslation(t,e);case 17:return this.compileTTranslationContext(t,e);case 18:return this.compileTPortal(t,e)}}compileDebug(t,e){return this.addLine("debugger;"),t.content?this.compileAST(t.content,e):null}compileLog(t,e){return this.addLine(`console.log(${Ye(t.expr)});`),t.content?this.compileAST(t.content,e):null}compileComment(t,e){let{block:n,forceNewBlock:o}=e;if(!n||o)n=this.createBlock(n,"comment",e),this.insertBlock(`comment(${ln(t.value)})`,n,{...e,forceNewBlock:o&&!n});else{const e=en.createComment(t.value);n.insert(e)}return n.varName}compileText(t,e){let{block:n,forceNewBlock:o}=e,s=t.value;if(s&&!1!==e.translate&&(s=this.translate(s,e.translationCtx)),e.inPreTag||(s=s.replace(tn," ")),!n||o)n=this.createBlock(n,"text",e),this.insertBlock(`text(${ln(s)})`,n,{...e,forceNewBlock:o&&!n});else{const e=0===t.type?en.createTextNode:en.createComment;n.insert(e.call(en,s))}return n.varName}generateHandlerCode(t,e){const n=t.split(".").slice(1).map((t=>{if(!nn.has(t))throw new r(`Unknown event modifier: '${t}'`);return`"${t}"`}));let o="";return n.length&&(o=`${n.join(",")}, `),`[${o}${this.captureExpression(e)}, ctx]`}compileTDomNode(t,e){var n;let{block:o,forceNewBlock:s}=e;const r=!o||s||null!==t.dynamicTag||t.ns;let i=this.target.code.length;if(r&&((t.dynamicTag||e.tKeyExpr||t.ns)&&e.block&&this.insertAnchor(e.block),o=this.createBlock(o,"block",e),this.blocks.push(o),t.dynamicTag)){const e=sn("tag");this.define(e,Ye(t.dynamicTag)),o.dynamicTagName=e}const l={};for(let s in t.attrs){let r,i;if(s.startsWith("t-attf")){r=Qe(t.attrs[s]);const e=o.insertData(r,"attr");i=s.slice(7),l["block-attribute-"+e]=i}else if(s.startsWith("t-att"))if(i="t-att"===s?null:s.slice(6),r=Ye(t.attrs[s]),i&&rn(t.tag,i)){"readonly"===i&&(i="readOnly"),r="value"===i?`new String((${r}) === 0 ? 0 : ((${r}) || ""))`:`new Boolean(${r})`;l[`block-property-${o.insertData(r,"prop")}`]=i}else{const t=o.insertData(r,"attr");"t-att"===s?l["block-attributes"]=String(t):l[`block-attribute-${t}`]=i}else if(this.translatableAttributes.includes(s)){const o=(null===(n=t.attrsTranslationCtx)||void 0===n?void 0:n[s])||e.translationCtx;l[s]=this.translateFn(t.attrs[s],o)}else r=`"${t.attrs[s]}"`,i=s,l[s]=t.attrs[s];if("value"===i&&e.tModelSelectedExpr){l[`block-attribute-${o.insertData(`${e.tModelSelectedExpr} === ${r}`,"attr")}`]="selected"}}let a;if(t.model){const{hasDynamicChildren:e,baseExpr:n,expr:s,eventType:r,shouldNumberize:i,shouldTrim:c,targetAttr:h,specialInitTargetAttr:u}=t.model,d=Ye(n),f=sn("bExpr");this.define(f,d);const p=Ye(s),m=sn("expr");this.define(m,p);const g=`${f}[${m}]`;let b;if(u){let e=h in l&&`'${l[h]}'`;if(!e&&t.attrs){const n=t.attrs[`t-att-${h}`];n&&(e=Ye(n))}b=o.insertData(`${g} === ${e}`,"prop"),l[`block-property-${b}`]=u}else if(e){a=`${sn("bValue")}`,this.define(a,g)}else b=o.insertData(`${g}`,"prop"),l[`block-property-${b}`]=h;this.helpers.add("toNumber");let v=`ev.target.${h}`;v=c?`${v}.trim()`:v,v=i?`toNumber(${v})`:v;const y=`[(ev) => { ${g} = ${v}; }]`;b=o.insertData(y,"hdlr"),l[`block-handler-${b}`]=r}for(let e in t.on){const n=this.generateHandlerCode(e,t.on[e]);l[`block-handler-${o.insertData(n,"hdlr")}`]=e}if(t.ref){this.dev&&(this.helpers.add("makeRefWrapper"),this.target.hasRefWrapper=!0);const e=Ze.test(t.ref);let n=`\`${t.ref}\``;e&&(n=Je(t.ref,(t=>this.captureExpression(t,!0))));let s=`(el) => this.__owl__.setRef((${n}), el)`;this.dev&&(s=`refWrapper(${n}, ${s})`);const r=o.insertData(s,"ref");l["block-ref"]=String(r)}const c=t.ns||e.nameSpace,h=c?en.createElementNS(c,t.tag):en.createElement(t.tag);for(const[t,e]of Object.entries(l))"class"===t&&""===e||h.setAttribute(t,e);if(o.insert(h),t.content.length){const n=o.currentDom;o.currentDom=h;const s=t.content;for(let n=0;n<s.length;n++){const r=t.content[n],i=cn(e,{block:o,index:o.childNumber,forceNewBlock:!1,isLast:e.isLast&&n===s.length-1,tKeyExpr:e.tKeyExpr,nameSpace:c,tModelSelectedExpr:a,inPreTag:e.inPreTag||"pre"===t.tag});this.compileAST(r,i)}o.currentDom=n}if(r&&(this.insertBlock(`${o.blockName}(ddd)`,o,e),o.children.length&&o.hasDynamicChildren)){const t=this.target.code,e=o.children.slice();let n=e.shift();for(let o=i;o<t.length&&(!t[o].trimStart().startsWith(`const ${n.varName} `)||(t[o]=t[o].replace(`const ${n.varName}`,n.varName),n=e.shift(),n));o++);this.addLine(`let ${o.children.map((t=>t.varName)).join(", ")};`,i)}return o.varName}compileTEsc(t,e){let n,{block:o,forceNewBlock:s}=e;if("0"===t.expr?(this.helpers.add("zero"),n="ctx[zero]"):(n=Ye(t.expr),t.defaultValue&&(this.helpers.add("withDefault"),n=`withDefault(${n}, ${ln(t.defaultValue)})`)),!o||s)o=this.createBlock(o,"text",e),this.insertBlock(`text(${n})`,o,{...e,forceNewBlock:s&&!o});else{const t=o.insertData(n,"txt"),e=en.createElement(`block-text-${t}`);o.insert(e)}return o.varName}compileTOut(t,e){let n,{block:o}=e;if(o&&this.insertAnchor(o),o=this.createBlock(o,"html",e),"0"===t.expr)this.helpers.add("zero"),n="ctx[zero]";else if(t.body){let o=null;o=an.nextBlockId;const s=cn(e);this.compileAST({type:3,content:t.body},s),this.helpers.add("safeOutput"),n=`safeOutput(${Ye(t.expr)}, b${o})`}else this.helpers.add("safeOutput"),n=`safeOutput(${Ye(t.expr)})`;return this.insertBlock(n,o,e),o.varName}compileTIfBranch(t,e,n){this.target.indentLevel++;let o=e.children.length;this.compileAST(t,cn(n,{block:e,index:n.index})),e.children.length>o&&this.insertAnchor(e,o),this.target.indentLevel--}compileTIf(t,e,n){let{block:o,forceNewBlock:s}=e;const r=this.target.code.length,i=!o||"multi"!==o.type&&s;if(o&&(o.hasDynamicChildren=!0),(!o||"multi"!==o.type&&s)&&(o=this.createBlock(o,"multi",e)),this.addLine(`if (${Ye(t.condition)}) {`),this.compileTIfBranch(t.content,o,e),t.tElif)for(let n of t.tElif)this.addLine(`} else if (${Ye(n.condition)}) {`),this.compileTIfBranch(n.content,o,e);if(t.tElse&&(this.addLine("} else {"),this.compileTIfBranch(t.tElse,o,e)),this.addLine("}"),i){if(o.children.length){const t=this.target.code,e=o.children.slice();let n=e.shift();for(let o=r;o<t.length&&(!t[o].trimStart().startsWith(`const ${n.varName} `)||(t[o]=t[o].replace(`const ${n.varName}`,n.varName),n=e.shift(),n));o++);this.addLine(`let ${o.children.map((t=>t.varName)).join(", ")};`,r)}const t=o.children.map((t=>t.varName)).join(", ");this.insertBlock(`multi([${t}])`,o,e)}return o.varName}compileTForeach(t,e){let{block:n}=e;n&&this.insertAnchor(n),n=this.createBlock(n,"list",e),this.target.loopLevel++;const o=`i${this.target.loopLevel}`;this.addLine("ctx = Object.create(ctx);");const s=`v_block${n.id}`,r=`k_block${n.id}`,i=`l_block${n.id}`,l=`c_block${n.id}`;let a;this.helpers.add("prepareList"),this.define(`[${r}, ${s}, ${i}, ${l}]`,`prepareList(${Ye(t.collection)});`),this.dev&&this.define(`keys${n.id}`,"new Set()"),this.addLine(`for (let ${o} = 0; ${o} < ${i}; ${o}++) {`),this.target.indentLevel++,this.addLine(`ctx[\`${t.elem}\`] = ${r}[${o}];`),t.hasNoFirst||this.addLine(`ctx[\`${t.elem}_first\`] = ${o} === 0;`),t.hasNoLast||this.addLine(`ctx[\`${t.elem}_last\`] = ${o} === ${r}.length - 1;`),t.hasNoIndex||this.addLine(`ctx[\`${t.elem}_index\`] = ${o};`),t.hasNoValue||this.addLine(`ctx[\`${t.elem}_value\`] = ${s}[${o}];`),this.define(`key${this.target.loopLevel}`,t.key?Ye(t.key):o),this.dev&&(this.helpers.add("OwlError"),this.addLine(`if (keys${n.id}.has(String(key${this.target.loopLevel}))) { throw new OwlError(\`Got duplicate key in t-foreach: \${key${this.target.loopLevel}}\`)}`),this.addLine(`keys${n.id}.add(String(key${this.target.loopLevel}));`)),t.memo&&(this.target.hasCache=!0,a=sn(),this.define(`memo${a}`,Ye(t.memo)),this.define(`vnode${a}`,`cache[key${this.target.loopLevel}];`),this.addLine(`if (vnode${a}) {`),this.target.indentLevel++,this.addLine(`if (shallowEqual(vnode${a}.memo, memo${a})) {`),this.target.indentLevel++,this.addLine(`${l}[${o}] = vnode${a};`),this.addLine(`nextCache[key${this.target.loopLevel}] = vnode${a};`),this.addLine("continue;"),this.target.indentLevel--,this.addLine("}"),this.target.indentLevel--,this.addLine("}"));const c=cn(e,{block:n,index:o});return this.compileAST(t.body,c),t.memo&&this.addLine(`nextCache[key${this.target.loopLevel}] = Object.assign(${l}[${o}], {memo: memo${a}});`),this.target.indentLevel--,this.target.loopLevel--,this.addLine("}"),e.isLast||this.addLine("ctx = ctx.__proto__;"),this.insertBlock("l",n,e),n.varName}compileTKey(t,e){const n=sn("tKey_");return this.define(n,Ye(t.expr)),e=cn(e,{tKeyExpr:n,block:e.block,index:e.index}),this.compileAST(t.content,e)}compileMulti(t,e){let{block:n,forceNewBlock:o}=e;const s=!n||o;let r=this.target.code.length;if(s){let o=null;if(t.content.filter((t=>!t.hasNoRepresentation)).length<=1){for(let n of t.content){const t=this.compileAST(n,e);o=o||t}return o}n=this.createBlock(n,"multi",e)}let i=0;for(let o=0,s=t.content.length;o<s;o++){const r=t.content[o],l=!r.hasNoRepresentation,a=cn(e,{block:n,index:i,forceNewBlock:l,isLast:e.isLast&&o===s-1});this.compileAST(r,a),l&&i++}if(s){if(n.hasDynamicChildren&&n.children.length){const t=this.target.code,e=n.children.slice();let o=e.shift();for(let n=r;n<t.length&&(!t[n].trimStart().startsWith(`const ${o.varName} `)||(t[n]=t[n].replace(`const ${o.varName}`,o.varName),o=e.shift(),o));n++);this.addLine(`let ${n.children.map((t=>t.varName)).join(", ")};`,r)}const t=n.children.map((t=>t.varName)).join(", ");this.insertBlock(`multi([${t}])`,n,e)}return n.varName}compileTCall(t,e){let{block:n,forceNewBlock:o}=e,s=e.ctxVar||"ctx";t.context&&(s=sn("ctx"),this.addLine(`let ${s} = ${Ye(t.context)};`));const r=Ze.test(t.name),i=r?Qe(t.name):"`"+t.name+"`";if(n&&!o&&this.insertAnchor(n),n=this.createBlock(n,"multi",e),t.body){this.addLine(`${s} = Object.create(${s});`),this.addLine(`${s}[isBoundary] = 1;`),this.helpers.add("isBoundary");const n=cn(e,{ctxVar:s}),o=this.compileMulti({type:3,content:t.body},n);o&&(this.helpers.add("zero"),this.addLine(`${s}[zero] = ${o};`))}const l=this.generateComponentKey();if(r){const t=sn("template");this.staticDefs.find((t=>"call"===t.id))||this.staticDefs.push({id:"call",expr:"app.callTemplate.bind(app)"}),this.define(t,i),this.insertBlock(`call(this, ${t}, ${s}, node, ${l})`,n,{...e,forceNewBlock:!n})}else{const t=sn("callTemplate_");this.staticDefs.push({id:t,expr:`app.getTemplate(${i})`}),this.insertBlock(`${t}.call(this, ${s}, node, ${l})`,n,{...e,forceNewBlock:!n})}return t.body&&!e.isLast&&this.addLine(`${s} = ${s}.__proto__;`),n.varName}compileTCallBlock(t,e){let{block:n,forceNewBlock:o}=e;return n&&(o||this.insertAnchor(n)),n=this.createBlock(n,"multi",e),this.insertBlock(Ye(t.name),n,{...e,forceNewBlock:!n}),n.varName}compileTSet(t,e){this.target.shouldProtectScope=!0,this.helpers.add("isBoundary").add("withDefault");const n=t.value?Ye(t.value||""):"null";if(t.body){this.helpers.add("LazyValue");const o={type:3,content:t.body};let s=`new LazyValue(${this.compileInNewTarget("value",o,e)}, ctx, this, node, ${this.target.currentKey(e)})`;s=t.value?s?`withDefault(${n}, ${s})`:n:s,this.addLine(`ctx[\`${t.name}\`] = ${s};`)}else{let o;if(t.defaultValue){const s=ln(e.translate?this.translate(t.defaultValue,e.translationCtx):t.defaultValue);o=t.value?`withDefault(${n}, ${s})`:s}else o=n;this.helpers.add("setContextValue"),this.addLine(`setContextValue(${e.ctxVar||"ctx"}, "${t.name}", ${o});`)}return null}generateComponentKey(t="key"){const e=[sn("__")];for(let t=0;t<this.target.loopLevel;t++)e.push(`\${key${t+1}}`);return`${t} + \`${e.join("__")}\``}formatProp(t,e,n,o){if(t.endsWith(".translate")){const s=(null==n?void 0:n[t])||o;e=ln(this.translateFn(e,s))}else e=this.captureExpression(e);if(t.includes(".")){let[n,o]=t.split(".");switch(t=n,o){case"bind":e=`(${e}).bind(this)`;break;case"alike":case"translate":break;default:throw new r(`Invalid prop suffix: ${o}`)}}return`${t=/^[a-z_]+$/i.test(t)?t:`'${t}'`}: ${e||void 0}`}formatPropObject(t,e,n){return Object.entries(t).map((([t,o])=>this.formatProp(t,o,e,n)))}getPropString(t,e){let n=`{${t.join(",")}}`;return e&&(n=`Object.assign({}, ${Ye(e)}${t.length?", "+n:""})`),n}compileComponent(t,e){let{block:n}=e;const o="slots"in(t.props||{}),s=t.props?this.formatPropObject(t.props,t.propsTranslationCtx,e.translationCtx):[];let r="";if(t.slots){let n="ctx";!this.target.loopLevel&&this.hasSafeContext||(n=sn("ctx"),this.helpers.add("capture"),this.define(n,"capture(ctx)"));let o=[];for(let s in t.slots){const r=t.slots[s],i=[];if(r.content){const t=this.compileInNewTarget("slot",r.content,e,r.on);i.push(`__render: ${t}.bind(this), __ctx: ${n}`)}const l=t.slots[s].scope;l&&i.push(`__scope: "${l}"`),t.slots[s].attrs&&i.push(...this.formatPropObject(t.slots[s].attrs,t.slots[s].attrsTranslationCtx,e.translationCtx));const a=`{${i.join(", ")}}`;o.push(`'${s}': ${a}`)}r=`{${o.join(", ")}}`}!r||t.dynamicProps||o||(this.helpers.add("markRaw"),s.push(`slots: markRaw(${r})`));let i,l,a=this.getPropString(s,t.dynamicProps);(r&&(t.dynamicProps||o)||this.dev)&&(i=sn("props"),this.define(i,a),a=i),r&&(t.dynamicProps||o)&&(this.helpers.add("markRaw"),this.addLine(`${i}.slots = markRaw(Object.assign(${r}, ${i}.slots))`)),t.isDynamic?(l=sn("Comp"),this.define(l,Ye(t.name))):l=`\`${t.name}\``,this.dev&&this.addLine(`helpers.validateProps(${l}, ${i}, this);`),n&&(!1===e.forceNewBlock||e.tKeyExpr)&&this.insertAnchor(n);let c=this.generateComponentKey();e.tKeyExpr&&(c=`${e.tKeyExpr} + ${c}`);let h=sn("comp");const u=[];for(let e in t.props||{}){let[t,n]=e.split(".");n||u.push(`"${t}"`)}this.staticDefs.push({id:h,expr:`app.createComponent(${t.isDynamic?null:l}, ${!t.isDynamic}, ${!!t.slots}, ${!!t.dynamicProps}, [${u}])`}),t.isDynamic&&(c=`(${l}).name + ${c}`);let d=`${h}(${a}, ${c}, node, this, ${t.isDynamic?l:null})`;return t.isDynamic&&(d=`toggler(${l}, ${d})`),t.on&&(d=this.wrapWithEventCatcher(d,t.on)),n=this.createBlock(n,"multi",e),this.insertBlock(d,n,e),n.varName}wrapWithEventCatcher(t,e){this.helpers.add("createCatcher");let n=sn("catcher"),o={},s=[];for(let t in e){let n=sn("hdlr"),r=s.push(n)-1;o[t]=r;const i=this.generateHandlerCode(t,e[t]);this.define(n,i)}return this.staticDefs.push({id:n,expr:`createCatcher(${JSON.stringify(o)})`}),`${n}(${t}, [${s.join(",")}])`}compileTSlot(t,e){this.helpers.add("callSlot");let n,o,{block:s}=e,r=!1,i=!1;t.name.match(Ze)?(r=!0,i=!0,o=Qe(t.name)):(o="'"+t.name+"'",i=i||this.slotNames.has(t.name),this.slotNames.add(t.name));const l={...t.attrs},a=l["t-props"];delete l["t-props"];let c=this.target.loopLevel?`key${this.target.loopLevel}`:"key";i&&(c=this.generateComponentKey(c));const h=t.attrs?this.formatPropObject(l,t.attrsTranslationCtx,e.translationCtx):[],u=this.getPropString(h,a);if(t.defaultContent){n=`callSlot(ctx, node, ${c}, ${o}, ${r}, ${u}, ${this.compileInNewTarget("defaultContent",t.defaultContent,e)}.bind(this))`}else if(r){let t=sn("slot");this.define(t,o),n=`toggler(${t}, callSlot(ctx, node, ${c}, ${t}, ${r}, ${u}))`}else n=`callSlot(ctx, node, ${c}, ${o}, ${r}, ${u})`;return t.on&&(n=this.wrapWithEventCatcher(n,t.on)),s&&this.insertAnchor(s),s=this.createBlock(s,"multi",e),this.insertBlock(n,s,{...e,forceNewBlock:!1}),s.varName}compileTTranslation(t,e){return t.content?this.compileAST(t.content,Object.assign({},e,{translate:!1})):null}compileTTranslationContext(t,e){return t.content?this.compileAST(t.content,Object.assign({},e,{translationCtx:t.translationCtx})):null}compileTPortal(t,e){this.staticDefs.find((t=>"Portal"===t.id))||this.staticDefs.push({id:"Portal",expr:"app.Portal"});let{block:n}=e;const o=this.compileInNewTarget("slot",t.content,e);let s="ctx";!this.target.loopLevel&&this.hasSafeContext||(s=sn("ctx"),this.helpers.add("capture"),this.define(s,"capture(ctx)"));let r=sn("comp");this.staticDefs.push({id:r,expr:"app.createComponent(null, false, true, false, false)"});const i=`${r}({target: ${Ye(t.target)},slots: {'default': {__render: ${o}.bind(this), __ctx: ${s}}}}, ${this.generateComponentKey()}, node, ctx, Portal)`;return n&&this.insertAnchor(n),n=this.createBlock(n,"multi",e),this.insertBlock(i,n,{...e,forceNewBlock:!1}),n.varName}}const pn=new WeakMap;function mn(t,e){var n;return function(t){let e=t.querySelectorAll("[t-elif], [t-else]");for(let t=0,n=e.length;t<n;t++){let n=e[t],o=n.previousElementSibling,s=t=>o.getAttribute(t),i=t=>+!!n.getAttribute(t);if(!o||!s("t-if")&&!s("t-elif"))throw new r("t-elif and t-else directives must be preceded by a t-if or t-elif directive");{if(s("t-foreach"))throw new r("t-if cannot stay at the same level as t-foreach when using t-elif or t-else");if(["t-if","t-elif","t-else"].map(i).reduce((function(t,e){return t+e}))>1)throw new r("Only one conditional branching directive is allowed per node");let t;for(;(t=n.previousSibling)!==o;){if(t.nodeValue.trim().length&&8!==t.nodeType)throw new r("text is not allowed between branching directives");t.remove()}}}}(n=t),function(t){for(const e of["t-esc","t-out"]){const n=[...t.querySelectorAll(`[${e}]`)].filter((t=>t.tagName[0]===t.tagName[0].toUpperCase()||t.hasAttribute("t-component")));for(const t of n){if(t.childNodes.length)throw new r(`Cannot have ${e} on a component that already has content`);const n=t.getAttribute(e);t.removeAttribute(e);const o=t.ownerDocument.createElement("t");null!=n&&o.setAttribute(e,n),t.appendChild(o)}}}(n),gn(t,e)||{type:0,value:""}}function gn(t,e){return t instanceof Element?function(t,e){if(!e.customDirectives)return null;const n=t.getAttributeNames();for(let o of n){if("t-custom"===o||"t-custom-"===o)throw new r("Missing custom directive name with t-custom directive");if(o.startsWith("t-custom-")){const n=o.split(".")[0].slice(9),s=e.customDirectives[n];if(!s)throw new r(`Custom directive "${n}" is not defined`);const i=t.getAttribute(o),l=o.split(".").slice(1);t.removeAttribute(o);try{s(t,i,l)}catch(t){throw new r(`Custom directive "${n}" throw the following error: ${t}`)}return gn(t,e)}}return null}(t,e)||function(t,e){if(t.hasAttribute("t-debug")){t.removeAttribute("t-debug");const n=gn(t,e),o={type:12,content:n};return(null==n?void 0:n.hasNoRepresentation)&&(o.hasNoRepresentation=!0),o}if(t.hasAttribute("t-log")){const n=t.getAttribute("t-log");t.removeAttribute("t-log");const o=gn(t,e),s={type:13,expr:n,content:o};return(null==o?void 0:o.hasNoRepresentation)&&(s.hasNoRepresentation=!0),s}return null}(t,e)||function(t,e){if(!t.hasAttribute("t-foreach"))return null;const n=t.outerHTML,o=t.getAttribute("t-foreach");t.removeAttribute("t-foreach");const s=t.getAttribute("t-as")||"";t.removeAttribute("t-as");const i=t.getAttribute("t-key");if(!i)throw new r(`"Directive t-foreach should always be used with a t-key!" (expression: t-foreach="${o}" t-as="${s}")`);t.removeAttribute("t-key");const l=t.getAttribute("t-memo")||"";t.removeAttribute("t-memo");const a=gn(t,e);if(!a)return null;const c=!n.includes("t-call"),h=c&&!n.includes(`${s}_first`),u=c&&!n.includes(`${s}_last`),d=c&&!n.includes(`${s}_index`),f=c&&!n.includes(`${s}_value`);return{type:9,collection:o,elem:s,body:a,memo:l,key:i,hasNoFirst:h,hasNoLast:u,hasNoIndex:d,hasNoValue:f}}(t,e)||function(t,e){if(!t.hasAttribute("t-if"))return null;const n=t.getAttribute("t-if");t.removeAttribute("t-if");const o=gn(t,e)||{type:0,value:""};let s=t.nextElementSibling;const r=[];for(;s&&s.hasAttribute("t-elif");){const t=s.getAttribute("t-elif");s.removeAttribute("t-elif");const n=gn(s,e),o=s.nextElementSibling;s.remove(),s=o,n&&r.push({condition:t,content:n})}let i=null;s&&s.hasAttribute("t-else")&&(s.removeAttribute("t-else"),i=gn(s,e),s.remove());return{type:5,condition:n,content:o,tElif:r.length?r:null,tElse:i}}(t,e)||function(t,e){if(!t.hasAttribute("t-portal"))return null;const n=t.getAttribute("t-portal");t.removeAttribute("t-portal");const o=gn(t,e);if(!o)return{type:0,value:""};return{type:18,target:n,content:o}}(t,e)||function(t,e){if(!t.hasAttribute("t-call"))return null;const n=t.getAttribute("t-call"),o=t.getAttribute("t-call-context");if(t.removeAttribute("t-call"),t.removeAttribute("t-call-context"),"t"!==t.tagName){const s=gn(t,e),r={type:7,name:n,body:null,context:o};if(s&&2===s.type)return s.content=[r],s;if(s&&11===s.type)return{...s,slots:{default:{content:r,scope:null,on:null,attrs:null,attrsTranslationCtx:null}}}}const s=kn(t,e);return{type:7,name:n,body:s.length?s:null,context:o}}(t,e)||function(t,e){if(!t.hasAttribute("t-call-block"))return null;const n=t.getAttribute("t-call-block");return{type:15,name:n}}(t)||function(t,e){if("off"!==t.getAttribute("t-translation"))return null;t.removeAttribute("t-translation");const n=gn(t,e);if(3===(null==n?void 0:n.type)){return Tn(n.content.map(xn))}return xn(n)}(t,e)||function(t,e){const n=t.getAttribute("t-translation-context");if(!n)return null;t.removeAttribute("t-translation-context");const o=gn(t,e);if(3===(null==o?void 0:o.type)){return Tn(o.content.map((t=>Nn(t,n))))}return Nn(o,n)}(t,e)||function(t,e){if(!t.hasAttribute("t-key"))return null;const n=t.getAttribute("t-key");t.removeAttribute("t-key");const o=gn(t,e);if(!o)return null;const s={type:10,expr:n,content:o};o.hasNoRepresentation&&(s.hasNoRepresentation=!0);return s}(t,e)||function(t,e){if(!t.hasAttribute("t-esc"))return null;const n=t.getAttribute("t-esc");t.removeAttribute("t-esc");const o={type:4,expr:n,defaultValue:t.textContent||""};let s=t.getAttribute("t-ref");t.removeAttribute("t-ref");const r=gn(t,e);if(!r)return o;if(2===r.type)return{...r,ref:s,content:[o]};return o}(t,e)||function(t,e){if(!t.hasAttribute("t-out")&&!t.hasAttribute("t-raw"))return null;t.hasAttribute("t-raw")&&console.warn('t-raw has been deprecated in favor of t-out. If the value to render is not wrapped by the "markup" function, it will be escaped');const n=t.getAttribute("t-out")||t.getAttribute("t-raw");t.removeAttribute("t-out"),t.removeAttribute("t-raw");const o={type:8,expr:n,body:null},s=t.getAttribute("t-ref");t.removeAttribute("t-ref");const r=gn(t,e);if(!r)return o;if(2===r.type)return o.body=r.content.length?r.content:null,{...r,ref:s,content:[o]};return o}(t,e)||function(t,e){if(!t.hasAttribute("t-slot"))return null;const n=t.getAttribute("t-slot");t.removeAttribute("t-slot");let o=null,s=null,r=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if(e.startsWith("t-on-"))r=r||{},r[e.slice(5)]=n;else if(e.startsWith("t-translation-context-")){s=s||{},s[e.slice(22)]=n}else o=o||{},o[e]=n}return{type:14,name:n,attrs:o,attrsTranslationCtx:s,on:r,defaultContent:En(t,e)}}(t,e)||function(t,e){let n=t.tagName;const o=n[0];let s=t.hasAttribute("t-component");if(s&&"t"!==n)throw new r(`Directive 't-component' can only be used on <t> nodes (used on a <${n}>)`);if(o!==o.toUpperCase()&&!s)return null;s&&(n=t.getAttribute("t-component"),t.removeAttribute("t-component"));const i=t.getAttribute("t-props");t.removeAttribute("t-props");const l=t.getAttribute("t-slot-scope");t.removeAttribute("t-slot-scope");let a=null,c=null,h=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if(e.startsWith("t-translation-context-")){h=h||{},h[e.slice(22)]=n}else if(e.startsWith("t-")){if(!e.startsWith("t-on-")){const t=$n.get(e.split("-").slice(0,2).join("-"));throw new r(t||`unsupported directive on Component: ${e}`)}a=a||{},a[e.slice(5)]=n}else c=c||{},c[e]=n}let u=null;if(t.hasChildNodes()){const n=t.cloneNode(!0),o=Array.from(n.querySelectorAll("[t-set-slot]"));for(let t of o){if("t"!==t.tagName)throw new r(`Directive 't-set-slot' can only be used on <t> nodes (used on a <${t.tagName}>)`);const o=t.getAttribute("t-set-slot");let s=t.parentElement,i=!1;for(;s&&s!==n;){if(s.hasAttribute("t-component")||s.tagName[0]===s.tagName[0].toUpperCase()){i=!0;break}s=s.parentElement}if(i||!s)continue;t.removeAttribute("t-set-slot"),t.remove();const l=gn(t,e);let a=null,c=null,h=null,d=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if("t-slot-scope"!==e)if(e.startsWith("t-translation-context-")){h=h||{},h[e.slice(22)]=n}else e.startsWith("t-on-")?(a=a||{},a[e.slice(5)]=n):(c=c||{},c[e]=n);else d=n}u=u||{},u[o]={content:l,on:a,attrs:c,attrsTranslationCtx:h,scope:d}}const s=En(n,e);u=u||{},s&&!u.default&&(u.default={content:s,on:a,attrs:null,attrsTranslationCtx:null,scope:l})}return{type:11,name:n,isDynamic:s,dynamicProps:i,props:c,propsTranslationCtx:h,slots:u,on:a}}(t,e)||function(t,e){const{tagName:n}=t,o=t.getAttribute("t-tag");if(t.removeAttribute("t-tag"),"t"===n&&!o)return null;if(n.startsWith("block-"))throw new r(`Invalid tag name: '${n}'`);e=Object.assign({},e),"pre"===n&&(e.inPreTag=!0);let s=!e.nameSpace&&wn.has(n)?"http://www.w3.org/2000/svg":null;const i=t.getAttribute("t-ref");t.removeAttribute("t-ref");const l=t.getAttributeNames();let a=null,c=null,h=null,u=null;for(let o of l){const i=t.getAttribute(o);if("t-on"===o||"t-on-"===o)throw new r("Missing event name with t-on directive");if(o.startsWith("t-on-"))h=h||{},h[o.slice(5)]=i;else if(o.startsWith("t-model")){if(!["input","select","textarea"].includes(n))throw new r("The t-model directive only works with <input>, <textarea> and <select>");let s,l;if(vn.test(i)){const t=i.lastIndexOf(".");s=i.slice(0,t),l=`'${i.slice(t+1)}'`}else{if(!yn.test(i))throw new r(`Invalid t-model expression: "${i}" (it should be assignable)`);{const t=i.lastIndexOf("[");s=i.slice(0,t),l=i.slice(t+1,-1)}}const a=t.getAttribute("type"),c="input"===n,h="select"===n,d=c&&"checkbox"===a,f=c&&"radio"===a,p=o.includes(".trim"),m=p||o.includes(".lazy");u={baseExpr:s,expr:l,targetAttr:d?"checked":"value",specialInitTargetAttr:f?"checked":null,eventType:f?"click":h||m?"change":"input",hasDynamicChildren:!1,shouldTrim:p,shouldNumberize:o.includes(".number")},h&&((e=Object.assign({},e)).tModelInfo=u)}else{if(o.startsWith("block-"))throw new r(`Invalid attribute: '${o}'`);if("xmlns"===o)s=i;else if(o.startsWith("t-translation-context-")){c=c||{},c[o.slice(22)]=i}else if("t-name"!==o){if(o.startsWith("t-")&&!o.startsWith("t-att"))throw new r(`Unknown QWeb directive: '${o}'`);const t=e.tModelInfo;t&&["t-att-value","t-attf-value"].includes(o)&&(t.hasDynamicChildren=!0),a=a||{},a[o]=i}}}s&&(e.nameSpace=s);const d=kn(t,e);return{type:2,tag:n,dynamicTag:o,attrs:a,attrsTranslationCtx:c,on:h,ref:i,content:d,model:u,ns:s}}(t,e)||function(t,e){if(!t.hasAttribute("t-set"))return null;const n=t.getAttribute("t-set"),o=t.getAttribute("t-value")||null,s=t.innerHTML===t.textContent&&t.textContent||null;let r=null;t.textContent!==t.innerHTML&&(r=kn(t,e));return{type:6,name:n,value:o,defaultValue:s,body:r,hasNoRepresentation:!0}}(t,e)||function(t,e){if("t"!==t.tagName)return null;return En(t,e)}(t,e):function(t,e){if(t.nodeType===Node.TEXT_NODE){let n=t.textContent||"";return e.inPreTag||!bn.test(n)||n.trim()?{type:0,value:n}:null}if(t.nodeType===Node.COMMENT_NODE)return{type:1,value:t.textContent||""};return null}(t,e)}const bn=/[\r\n]/;const vn=/\.[\w_]+\s*$/,yn=/\[[^\[]+\]\s*$/,wn=new Set(["svg","g","path"]);const $n=new Map([["t-ref","t-ref is no longer supported on components. Consider exposing only the public part of the component's API through a callback prop."],["t-att","t-att makes no sense on component: props are already treated as expressions"],["t-attf","t-attf is not supported on components: use template strings for string interpolation in props"]]);function xn(t){const e={type:16,content:t};return(null==t?void 0:t.hasNoRepresentation)&&(e.hasNoRepresentation=!0),e}function Nn(t,e){const n={type:17,content:t,translationCtx:e};return(null==t?void 0:t.hasNoRepresentation)&&(n.hasNoRepresentation=!0),n}function kn(t,e){const n=[];for(let o of t.childNodes){const t=gn(o,e);t&&(3===t.type?n.push(...t.content):n.push(t))}return n}function Tn(t){const e={type:3,content:t};return t.every((t=>t.hasNoRepresentation))&&(e.hasNoRepresentation=!0),e}function En(t,e){const n=kn(t,e);switch(n.length){case 0:return null;case 1:return n[0];default:return Tn(n)}}function An(t,e={hasGlobalValues:!1}){const n=function(t,e){const n={inPreTag:!1,customDirectives:e};if("string"==typeof t)return mn(Pe(`<t>${t}</t>`).firstChild,n);let o=pn.get(t);return o||(o=mn(t.cloneNode(!0),n),pn.set(t,o)),o}(t,e.customDirectives),o=t instanceof Node?!(t instanceof Element)||null===t.querySelector("[t-set], [t-call]"):!t.includes("t-set")&&!t.includes("t-call"),s=new fn(n,{...e,hasSafeContext:o}).generateCode();try{return new Function("app, bdom, helpers",s)}catch(t){const{name:n}=e,o=new r(`Failed to compile ${n?`template "${n}"`:"anonymous template"}: ${t.message}\n\ngenerated code:\nfunction(app, bdom, helpers) {\n${s}\n}`);throw o.cause=t,o}}let _n;"undefined"!=typeof window&&(_n=window.requestAnimationFrame.bind(window));class Cn{constructor(){this.tasks=new Set,this.frame=0,this.delayedRenders=[],this.cancelledNodes=new Set,this.processing=!1,this.requestAnimationFrame=Cn.requestAnimationFrame}addFiber(t){this.tasks.add(t.root)}scheduleDestroy(t){this.cancelledNodes.add(t),0===this.frame&&(this.frame=this.requestAnimationFrame((()=>this.processTasks())))}flush(){if(this.delayedRenders.length){let t=this.delayedRenders;this.delayedRenders=[];for(let e of t)e.root&&3!==e.node.status&&e.node.fiber===e&&e.render()}0===this.frame&&(this.frame=this.requestAnimationFrame((()=>this.processTasks())))}processTasks(){if(!this.processing){this.processing=!0,this.frame=0;for(let t of this.cancelledNodes)t._destroy();this.cancelledNodes.clear();for(let t of this.tasks)this.processFiber(t);for(let t of this.tasks)3===t.node.status&&this.tasks.delete(t);this.processing=!1}}processFiber(t){if(t.root!==t)return void this.tasks.delete(t);const e=xt.has(t);e&&0!==t.counter?this.tasks.delete(t):3!==t.node.status?0===t.counter&&(e||t.complete(),t.appliedToDom&&this.tasks.delete(t)):this.tasks.delete(t)}}Cn.requestAnimationFrame=_n;let Dn=!1;const Sn=new Set;"undefined"!=typeof window&&(window.__OWL_DEVTOOLS__||(window.__OWL_DEVTOOLS__={apps:Sn,Fiber:_t,RootFiber:Ct,toRaw:Ft,reactive:Yt}));class On extends Me{constructor(t,e={}){super(e),this.scheduler=new Cn,this.subRoots=new Set,this.root=null,this.name=e.name||"",this.Root=t,Sn.add(this),e.test&&(this.dev=!0),this.warnIfNoStaticProps=e.warnIfNoStaticProps||!1,!this.dev||e.test||Dn||(console.info("Owl is running in 'dev' mode."),Dn=!0);const n=e.env||{},o=Object.getOwnPropertyDescriptors(n);this.env=Object.freeze(Object.create(Object.getPrototypeOf(n),o)),this.props=e.props||{}}mount(t,e){const n=this.createRoot(this.Root,{props:this.props});return this.root=n.node,this.subRoots.delete(n.node),n.mount(t,e)}createRoot(t,e={}){const n=e.props||{},o=this.env;e.env&&(this.env=e.env);const s=function(){let t=se;return()=>{se=t}}(),r=this.makeNode(t,n);return s(),e.env&&(this.env=o),this.subRoots.add(r),{node:r,mount:(e,o)=>{On.validateTarget(e),this.dev&&Le(t,n,{__owl__:{app:this}});return this.mountNode(r,e,o)},destroy:()=>{this.subRoots.delete(r),r.destroy(),this.scheduler.processTasks()}}}makeNode(t,e){return new ue(t,e,this,null,null)}mountNode(t,e,n){const o=new Promise(((e,n)=>{let o=!1;t.mounted.push((()=>{e(t.component),o=!0}));let s=Nt.get(t);s||(s=[],Nt.set(t,s)),s.unshift((t=>{throw o||n(t),t}))}));return t.mountComponent(e,n),o}destroy(){if(this.root){for(let t of this.subRoots)t.destroy();this.root.destroy(),this.scheduler.processTasks()}Sn.delete(this)}createComponent(t,e,n,o,s){const i=!e;let l;const a=0===s.length;l=n?(t,e)=>!0:o?function(t,e){for(let n in t)if(t[n]!==e[n])return!0;return Object.keys(t).length!==Object.keys(e).length}:a?(t,e)=>!1:function(t,e){for(let n of s)if(t[n]!==e[n])return!0;return!1};const c=ue.prototype.updateAndRender,h=ue.prototype.initiateRender;return(n,o,s,a,u)=>{let d=s.children,f=d[o];i&&f&&f.component.constructor!==u&&(f=void 0);const p=s.fiber;if(f)(l(f.props,n)||p.deep||f.forceNextRender)&&(f.forceNextRender=!1,c.call(f,n,p));else{if(e){const e=a.constructor.components;if(!e)throw new r(`Cannot find the definition of component "${t}", missing static components key in parent`);if(!(u=e[t]))throw new r(`Cannot find the definition of component "${t}"`);if(!(u.prototype instanceof ve))throw new r(`"${t}" is not a Component. It must inherit from the Component class`)}f=new ue(u,n,this,s,o),d[o]=f,h.call(f,new _t(f,p))}return p.childrenMap[o]=f,f}}handleError(...t){return Tt(...t)}}On.validateTarget=function(t){const e=t&&t.ownerDocument;if(e){if(!e.defaultView)throw new r("Cannot mount a component: the target document is not attached to a window (defaultView is missing)");if(t instanceof e.defaultView.HTMLElement||t instanceof ShadowRoot){if(!function(t,e){let n=t;const o=e.defaultView.ShadowRoot;for(;n;){if(n===e)return!0;if(n.parentNode)n=n.parentNode;else{if(!(n instanceof o&&n.host))return!1;n=n.host}}return!1}(t,e))throw new r("Cannot mount a component on a detached dom node");return}}throw new r("Cannot mount component: the target is not a valid DOM element")},On.apps=Sn,On.version="2.8.3";function Rn(t,e){const n=Object.create(t),o=Object.getOwnPropertyDescriptors(e);return Object.freeze(Object.defineProperties(n,o))}function Ln(t){const e=re();e.childEnv=Rn(e.childEnv,t)}n.shouldNormalizeDom=!1,n.mainEventHandler=(t,n,o)=>{const{data:s,modifiers:i}=e(t);t=s;let l=!1;if(i.length){let t=!1;const e=n.target===o;for(const o of i)switch(o){case"self":if(t=!0,e)continue;return l;case"prevent":(t&&e||!t)&&n.preventDefault();continue;case"stop":(t&&e||!t)&&n.stopPropagation(),l=!0;continue}}if(Object.hasOwnProperty.call(t,0)){const e=t[0];if("function"!=typeof e)throw new r(`Invalid handler (expected a function, received: '${e}')`);let o=t[1]?t[1].__owl__:null;o&&1!==o.status||e.call(o?o.component:null,n)}return l};const Bn={config:n,mount:$t,patch:function(t,e,n=!1){t.patch(e,n)},remove:function(t,e=!1){e&&t.beforeRemove(),t.remove()},list:bt,multi:j,text:z,toggler:s,createBlock:nt,html:wt,comment:H},Pn={version:On.version};Me.prototype._compileTemplate=function(t,e){return An(e,{name:t,dev:this.dev,translateFn:this.translateFn,translatableAttributes:this.translatableAttributes,customDirectives:this.customDirectives,hasGlobalValues:this.hasGlobalValues})},t.App=On,t.Component=ve,t.EventBus=N,t.OwlError=r,t.__info__=Pn,t.batched=$,t.blockDom=Bn,t.htmlEscape=T,t.loadFile=async function(t){const e=await fetch(t);if(!e.ok)throw new r("Error while fetching xml templates");return await e.text()},t.markRaw=Vt,t.markup=E,t.mount=async function(t,e,n={}){return new On(t,n).mount(e,n)},t.onError=function(t){const e=re();let n=Nt.get(e);n||(n=[],Nt.set(e,n)),n.push(t.bind(e.component))},t.onMounted=me,t.onPatched=ge,t.onRendered=function(t){const e=re(),n=e.renderFn,o=e.app.dev?pe:t=>t;t=o(t.bind(e.component),"onRendered"),e.renderFn=()=>{const e=n();return t(),e}},t.onWillDestroy=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willDestroy.push(n(t.bind(e.component),"onWillDestroy"))},t.onWillPatch=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willPatch.unshift(n(t.bind(e.component),"onWillPatch"))},t.onWillRender=function(t){const e=re(),n=e.renderFn,o=e.app.dev?pe:t=>t;t=o(t.bind(e.component),"onWillRender"),e.renderFn=()=>(t(),n())},t.onWillStart=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willStart.push(n(t.bind(e.component),"onWillStart"))},t.onWillUnmount=be,t.onWillUpdateProps=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willUpdateProps.push(n(t.bind(e.component),"onWillUpdateProps"))},t.reactive=Yt,t.status=function(t){switch(t.__owl__.status){case 0:return"new";case 2:return"cancelled";case 1:return"mounted";case 3:return"destroyed"}},t.toRaw=Ft,t.useChildSubEnv=Ln,t.useComponent=function(){return se.component},t.useEffect=function(t,e=(()=>[NaN])){let n,o;me((()=>{o=e(),n=t(...o)})),ge((()=>{const s=e();s.some(((t,e)=>t!==o[e]))&&(o=s,n&&n(),n=t(...o))})),be((()=>n&&n()))},t.useEnv=function(){return re().component.env},t.useExternalListener=function(t,e,n,o){const s=re(),r=n.bind(s.component);me((()=>t.addEventListener(e,r,o))),be((()=>t.removeEventListener(e,r,o)))},t.useRef=function(t){const e=re().refs;return{get el(){const n=e[t];return x(n)?n:null}}},t.useState=ae,t.useSubEnv=function(t){const e=re();e.component.env=Rn(e.component.env,t),Ln(t)},t.validate=function(t,e){let n=_e(t,e);if(n.length)throw new r("Invalid object: "+n.join(", "))},t.validateType=Ce,t.whenReady=function(t){return new Promise((function(t){"loading"!==document.readyState?t(!0):document.addEventListener("DOMContentLoaded",t,!1)})).then(t||function(){})},t.xml=We,Object.defineProperty(t,"__esModule",{value:!0}),Pn.date="2026-03-30T13:05:32.099Z",Pn.hash="efae3e4",Pn.url="https://github.com/odoo/owl"}(globalThis.owl=globalThis.owl||{});
9
9
 
10
- var hi=Object.defineProperty;var Ap=(t,e,s)=>e in t?hi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var b=(t,e,s)=>()=>{if(s)throw s[0];try{return t&&(e=t(t=0)),e}catch(r){throw s=[r],r}};var Ca=(t,e)=>{for(var s in e)hi(t,s,{get:e[s],enumerable:!0})};var o=(t,e,s)=>Ap(t,typeof e!="symbol"?e+"":e,s);function Lp(t){return typeof t=="string"?document.querySelector(t):t instanceof Element?t:null}function Na(t,e,s={}){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:s}))}function Np(t,e={}){return t.hasAttribute("b-icon")?"icon":e.name||t.getAttribute("b-ui")}function kp(t,e){return e===document||e===t||e.contains(t)}function Op(t,e={}){return!e.allowBootstrapControl&&t.matches(Cp)}function gi(t){return c.version=t,c}function mi(){if(typeof MutationObserver>"u")return;let t=new MutationObserver(e=>{for(let s of e)for(let r of s.addedNodes)r instanceof Element&&c.mountAll(r)});return t.observe(document.documentElement,{childList:!0,subtree:!0}),t}function fi(){typeof document>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{c.mountAll(),mi()},{once:!0}):(c.mountAll(),mi()))}var Ep,La,_r,ta,Cp,jp,c,y=b(()=>{Ep="__BASEUI_VERSION__",La=new Map,_r=new WeakMap,ta="[b-ui], [b-icon]",Cp="[data-bs-toggle], [data-bs-target], [data-bs-dismiss]";jp=typeof window<"u"?window.BaseUI:void 0,c=jp||{version:Ep,register(t,e){if(!t||!e)throw new Error("BaseUI.register requires a name and component definition.");return La.set(t,e),this},component(t){return La.get(t)},mount(t,e={}){let s=Lp(t);if(!s||Op(s,e))return null;let r=Np(s,e),i=La.get(r);if(!i)return null;let a=_r.get(s);if(a?.name===r)return a;a&&(a.destroy?.(),_r.delete(s),Na(s,"baseui:destroyed",{name:a.name}));let p=i.mount?.(s,this,e)||{},l={name:r,element:s,destroy:p.destroy};return _r.set(s,l),Na(s,"baseui:mounted",{name:r,instance:l}),l},mountAll(t=document){let e=t||document,s=[...e.querySelectorAll?.(ta)||[]];return e instanceof Element&&e.matches(ta)&&s.unshift(e),s.map(r=>this.mount(r)).filter(Boolean)},destroy(t=document){let e=t||document,s=[...e.querySelectorAll?.(ta)||[]];e instanceof Element&&e.matches(ta)&&s.unshift(e);for(let r of s){let i=_r.get(r);i&&kp(r,e)&&(i.destroy?.(),_r.delete(r),Na(r,"baseui:destroyed",{name:i.name}))}},theme:{set(t){let e=document.documentElement;if(typeof t=="string"){e.setAttribute("b-theme",t),e.dataset.bsTheme=t;return}for(let[s,r]of Object.entries(t||{})){let i=s==="radius"||s==="--baseui-radius"?"--base-radius":s.startsWith("--")?s:`--baseui-${s}`;e.style.setProperty(i,r)}}}};typeof window<"u"&&(window.BaseUI=c)});var L,Ip,n,Rp,$p,Tp,Up,qp,Mp,Hr,zp,ka,Oa,Pp,k,D,Fp,Wr,Dp,_p,Qt,O,R,Hp,Wp,Kp,A,Vp,G,Zp,Or,S,f,Xp,Gp,Yp,Jp,ea,ja=b(()=>{L=globalThis.owl;if(!L)throw new Error("BaseUI: load dist/baseui.min.js or dist/baseui.esm.js before this script (globalThis.owl is not set).");Ip=L.App,n=L.Component,Rp=L.EventBus,$p=L.OwlError,Tp=L.__info__,Up=L.batched,qp=L.blockDom,Mp=L.htmlEscape,Hr=L.loadFile,zp=L.markRaw,ka=L.markup,Oa=L.mount,Pp=L.onError,k=L.onMounted,D=L.onPatched,Fp=L.onRendered,Wr=L.onWillDestroy,Dp=L.onWillPatch,_p=L.onWillRender,Qt=L.onWillStart,O=L.onWillUnmount,R=L.onWillUpdateProps,Hp=L.reactive,Wp=L.status,Kp=L.toRaw,A=L.useChildSubEnv,Vp=L.useComponent,G=L.useEffect,Zp=L.useEnv,Or=L.useExternalListener,S=L.useRef,f=L.useState,Xp=L.useSubEnv,Gp=L.validate,Yp=L.validateType,Jp=L.whenReady,ea=L.xml});function sa(t){Object.assign(vi,t)}function Si(t){return typeof t!="string"||!/\st-(att|attf|model)([.\s=-]|$)/.test(t)?t:t.replace(/<([A-Z][\w.:-]*)(\s[^<>]*?)?(\/?)>/g,(e,s,r="",i="")=>`<${s}${Qp(s,r)}${i}>`)}function Qp(t,e){let s=/\st-(att|attf|model|on)([.\s=-]|$)/.test(e),r=e.replace(/(\s)t-att\s*=/g,"$1t-props=").replace(/(\s)t-att-([A-Za-z_][\w:.-]*)\s*=/g,"$1$2=").replace(/(\s)t-attf-([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(i,a,p,l,u)=>`${a}${p}=${l}${ol(u)}${l}`);return r=r.replace(/(\s)t-model((?:\.[\w-]+)*)\s*=\s*(["'])(.*?)\3/g,(i,a,p,l,u)=>rl(t,a,p,l,u,r)),s?tl(r):r}function tl(t){return t.replace(/(\s)([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(e,s,r,i,a)=>r.startsWith("t-")||r==="t-props"||sl(a)?e:`${s}${r}=${i}${el(a)}${i}`)}function el(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function sl(t){let e=t.trim();return!e||/^(['"`[{(]|-?\d+(?:\.\d+)?$)/.test(e)||/[?.()[\]+*/]|=>|===|!==|&&|\|\|/.test(e)||/^(true|false|null|undefined)$/.test(e)}function ol(t){return`\`${t.replace(/`/g,"\\`").replace(/{{\s*([\s\S]*?)\s*}}|#\{\s*([\s\S]*?)\s*\}/g,(e,s,r)=>`\${${s||r}}`)}\``}function rl(t,e,s,r,i,a){let p=/^(Checkbox|Switch)$/.test(t),l=al(t,s),u=p?"checked":"value",d=new RegExp(`\\s${u}\\s*=`).test(a)?"":`${e}${u}=${r}${i}${r}`,h=new RegExp(`\\s${l}\\s*=`).test(a)?"":`${e}${l}=${r}${il(i,s,p)}${r}`;return`${d}${h}`}function al(t,e){return e.includes(".lazy")?"onChange":/^(Input|Textarea|InputGroupInput|InputGroupTextarea)$/.test(t)?"onInput":"onChange"}function il(t,e,s){if(s)return`(value) => { ${t} = value; }`;let r="value";return e.includes(".trim")&&(r=`(typeof ${r} === 'string' ? ${r}.trim() : ${r})`),e.includes(".number")&&(r=`Number.isNaN(Number(${r})) ? ${r} : Number(${r})`),`(value) => { ${t} = ${r}; }`}function xi(t,...e){return Array.isArray(t?.raw)?ea({raw:t.raw.map(Si)},...e):ea(t,...e)}function oa(t,e,s={}){let r=Si(s.templates);return t.components={...vi,...t.components||{}},Oa(t,e,r===s.templates?s:{...s,templates:r})}async function gd(t){let e=await(await fetch(t,{cache:"reload"})).text(),r=new DOMParser().parseFromString(e,"application/xml").querySelector("templates > t[t-name]");return r?r.innerHTML:e}var hd,md,vi,m=b(()=>{ja();ja();hd=Oa,md=ea,vi={}});function W(...t){return t.filter(Boolean).join(" ")}function Z(t,e,s){return t[e]??(s?t[s]:void 0)}function _(t){return t===!0||t==="open"||t==="on"||t==="active"}function J(...t){let e=[];for(let s of t)if(s){if(typeof s=="string"){let r=s.trim().replace(/;$/,"");r&&e.push(r)}else if(typeof s=="object")for(let[r,i]of Object.entries(s)){if(i==null||i==="")continue;let a=r.replace(/[A-Z]/g,p=>"-"+p.toLowerCase());e.push(`${a}:${i}`)}}return e.join(";")}function $(t){return t.state!==void 0?_(t.state):t.open!==void 0?t.open:t["default-open"]!==void 0?t["default-open"]:t.defaultOpen??!1}function T(t){return t.state!==void 0||t.open!==void 0}var U=b(()=>{});function ll(t){return typeof Image>"u"?Promise.resolve(!0):(Ba.has(t)||Ba.set(t,new Promise(e=>{let s=new Image;s.onload=()=>e(!0),s.onerror=()=>e(!1),s.src=t})),Ba.get(t))}function ra(t){return String(t||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Kr(t,e={}){let s=ra(t);if(!pl.test(s))throw new Error(`BaseUI icon name is invalid: ${t}`);return`${String(e.baseUrl||c.icons.lucide.cdnBaseUrl).replace(/\/+$/,"")}/${s}.svg`}function z(t,e,s={}){let r=s.url||Kr(e,s),i=s.label??t.getAttribute("aria-label")??"";t.classList.add("baseui-icon"),t.style.setProperty("--baseui-icon-url",`url("${r.replace(/"/g,"%22")}")`),(s.size||t.getAttribute("b-att-size"))&&t.style.setProperty("--baseui-icon-size",s.size||t.getAttribute("b-att-size")),i?(t.setAttribute("role","img"),t.setAttribute("aria-label",i)):t.setAttribute("aria-hidden","true");let a=s.fallback===!1?null:s.fallback||aa;return a&&!s.url&&ra(e)!==ra(a)&&ll(r).then(p=>{if(p||!t.isConnected)return;let l=Kr(a,s);t.style.setProperty("--baseui-icon-url",`url("${l.replace(/"/g,"%22")}")`)}),t}var wi,nl,aa,pl,Ba,st=b(()=>{y();wi="1.31.0",nl=`https://cdn.jsdelivr.net/npm/lucide-static@${wi}/icons`,aa="file",pl=/^[a-z0-9][a-z0-9-]*$/,Ba=new Map;c.icons={...c.icons||{},lucide:{version:wi,cdnBaseUrl:nl,normalizeName:ra,url:Kr,render:z}}});function Ia(t){return class extends N{get name(){return Z(this.props,"icon","name")||t}}}var N,Y=b(()=>{m();st();U();N=class extends n{setup(){this.state=f({failed:!1}),G(e=>{if(this.state.failed=!1,typeof Image>"u"||!e||e===aa)return;let s=new Image;return s.onerror=()=>{this.state.failed=!0},s.src=this.buildUrl(e),()=>{s.onload=null,s.onerror=null}},()=>[this.name])}buildUrl(e){return Kr(e,{baseUrl:Z(this.props,"base-url","baseUrl")})}get name(){return Z(this.props,"icon","name")}get url(){return this.buildUrl(this.state.failed?aa:this.name)}get style(){let e=[`--baseui-icon-url:url("${this.url.replace(/"/g,"%22")}")`];return this.props.size&&e.push(`--baseui-icon-size:${this.props.size}`),J(e.join(";"),this.props.style)}get classNames(){let e=["baseui-icon"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(N,"template","baseui.Icon"),o(N,"props",{icon:{type:String,optional:!0},name:{type:String,optional:!0},label:{type:String,optional:!0},title:{type:String,optional:!0},size:{type:String,optional:!0},"base-url":{type:String,optional:!0},baseUrl:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var P,M,te=b(()=>{P={default:"btn-primary",secondary:"btn-secondary",destructive:"btn-danger",outline:"btn-outline-secondary",ghost:"btn-light",link:"btn-link"},M={xs:"btn-xs",sm:"btn-sm",lg:"btn-lg",icon:"btn-icon","icon-xs":"btn-icon-xs","icon-sm":"btn-icon-sm","icon-lg":"btn-icon-lg"}});var K,jr=b(()=>{m();U();Y();te();K=class extends n{get classNames(){let e=["btn","baseui-button",P[this.props.variant]||P.default];return M[this.props.size]&&e.push(M[this.props.size]),this.isIconOnly&&e.push("baseui-button-icon"),this.props.className&&e.push(this.props.className),e.join(" ")}get iconPosition(){return Z(this.props,"icon-position","iconPosition")==="end"?"end":"start"}get ariaLabel(){return Z(this.props,"aria-label","ariaLabel")}get ariaPressed(){return Z(this.props,"aria-pressed","ariaPressed")}get ariaInvalid(){let e=Z(this.props,"aria-invalid","ariaInvalid");return e===!0?"true":e}get isIconOnly(){return!!(this.props.icon&&!this.props.label&&!this.props.slots?.default)}onClick(e){if(this.props.href&&this.props.disabled){e.preventDefault();return}this.props.onClick?.(e)}};o(K,"template","baseui.Button"),o(K,"components",{Icon:N}),o(K,"props",{variant:{type:String,optional:!0},size:{type:String,optional:!0},type:{type:String,optional:!0},href:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},label:{type:String,optional:!0},icon:{type:String,optional:!0},"icon-position":{type:String,optional:!0},iconPosition:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},id:{type:String,optional:!0},title:{type:String,optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},"aria-pressed":{type:String,optional:!0},ariaPressed:{type:String,optional:!0},"aria-invalid":{type:[String,Boolean],optional:!0},ariaInvalid:{type:[String,Boolean],optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});function ia({variant:t="default",size:e,className:s}={}){let r=["btn","baseui-button","baseui-clipboard-button",P[t]||P.default];return M[e]&&r.push(M[e]),s&&r.push(s),r.join(" ")}async function Br(t){let e=String(t??"");if(globalThis.navigator?.clipboard?.writeText)try{await globalThis.navigator.clipboard.writeText(e);return}catch{}if(typeof document>"u")throw new Error("BaseUI ClipboardButton: no clipboard API available in this environment.");let s=document.createElement("textarea");s.value=e,s.setAttribute("readonly",""),s.style.position="fixed",s.style.opacity="0",s.style.pointerEvents="none",document.body.append(s),s.select(),s.setSelectionRange(0,e.length);let r;try{r=document.execCommand("copy")}catch{r=!1}if(s.remove(),!r)throw new Error("BaseUI ClipboardButton: clipboard copy is unavailable in this browser/context.")}var Ra,na=b(()=>{te();Ra=["btn","baseui-button","baseui-clipboard-button",...Object.values(P),...Object.values(M)]});var jt,Ai=b(()=>{m();U();Y();na();jt=class extends n{setup(){this.state=f({copied:!1}),this.resetTimer=null,O(()=>window.clearTimeout(this.resetTimer))}get classNames(){return ia(this.props)}get resetDelay(){return Z(this.props,"reset-delay","resetDelay")??2e3}get iconName(){return this.state.copied?this.props.copiedIcon||"check":this.props.icon||"copy"}get label(){return this.state.copied&&this.props.copiedLabel?this.props.copiedLabel:this.props.label}get ariaLabel(){return Z(this.props,"aria-label","ariaLabel")||this.label}get isIconOnly(){return!this.props.label&&!this.props.slots?.default}async onClick(e){if(this.props.disabled)return;let s=this.props.getValue?this.props.getValue():this.props.value??"";try{await Br(s),this.state.copied=!0,window.clearTimeout(this.resetTimer),this.resetTimer=window.setTimeout(()=>{this.state.copied=!1},this.resetDelay),this.props.onCopy?.({value:s,event:e})}catch(r){this.props.onCopyError?.({error:r,event:e})}}};o(jt,"template","baseui.ClipboardButton"),o(jt,"components",{Icon:N}),o(jt,"props",{variant:{type:String,optional:!0},size:{type:String,optional:!0},value:{type:String,optional:!0},getValue:{type:Function,optional:!0},label:{type:String,optional:!0},copiedLabel:{type:String,optional:!0},icon:{type:String,optional:!0},copiedIcon:{type:String,optional:!0},"reset-delay":{type:Number,optional:!0},resetDelay:{type:Number,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},onCopy:{type:Function,optional:!0},onCopyError:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var ee,$a=b(()=>{ee={primary:"baseui-badge-primary",secondary:"baseui-badge-secondary",success:"baseui-badge-success",warning:"baseui-badge-warning",danger:"baseui-badge-danger",info:"baseui-badge-info",muted:"baseui-badge-muted"}});var pt,Ta=b(()=>{m();$a();pt=class extends n{get classNames(){let e=["badge",ee[this.props.variant]||ee.secondary];return this.props.pill&&e.push("rounded-pill"),this.props.className&&e.push(this.props.className),e.join(" ")}};o(pt,"template","baseui.Badge"),o(pt,"props",{variant:{type:String,optional:!0},pill:{type:Boolean,optional:!0},label:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Ir,lt,se,ct,oe,re,ae,Ua=b(()=>{m();Ir={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},lt=class extends n{get tag(){return this.props.tag||"div"}};o(lt,"template","baseui.Card"),o(lt,"props",{...Ir,tag:{type:String,optional:!0}});se=class extends n{};o(se,"template","baseui.CardHeader"),o(se,"props",Ir);ct=class extends n{};o(ct,"template","baseui.CardBody"),o(ct,"props",Ir);oe=class extends n{};o(oe,"template","baseui.CardFooter"),o(oe,"props",Ir);re=class extends n{};o(re,"template","baseui.CardTitle"),o(re,"props",Ir);ae=class extends n{};o(ae,"template","baseui.CardDescription"),o(ae,"props",Ir)});function pa({tag:t="input",type:e}={}){return t==="select"?"form-select":e==="checkbox"||e==="radio"?"form-check-input":"form-control"}var qa=b(()=>{});var ie,Ei=b(()=>{m();qa();ie=class extends n{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){let e=["baseui-input",pa({tag:"input",type:this.props.type})];return this.props.invalid&&e.push("is-invalid"),this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};o(ie,"template","baseui.Input"),o(ie,"props",{value:{type:String,optional:!0},placeholder:{type:String,optional:!0},type:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},readonly:{type:Boolean,optional:!0},invalid:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},id:{type:String,optional:!0},list:{type:String,optional:!0},autocomplete:{type:String,optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},min:{type:[String,Number],optional:!0},max:{type:[String,Number],optional:!0},step:{type:[String,Number],optional:!0},onInput:{type:Function,optional:!0},onChange:{type:Function,optional:!0}})});function x(){let t=globalThis.bootstrap;if(!t)throw new Error("BaseUI: load dist/bootstrap.bundle.min.js before this script (globalThis.bootstrap is not set).");return t}var q=b(()=>{});function la(t,e,s){let r=t==="ArrowRight"?1:t==="ArrowLeft"?-1:0;return!r||s===0?-1:(e+r+s)%s}var Ma=b(()=>{});function Ci(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"_")}var cl,ne,pe,le,ce,Bt,Li=b(()=>{m();q();Ua();Ma();cl=0;ne=class extends n{setup(){this.tabsState=f({active:this.props.value??this.props.defaultValue??""}),this.instanceId=`t${++cl}`,A({tabs:this.tabsState,selectTab:e=>this.select(e),tabsId:this.instanceId}),R(e=>{e.value!==void 0&&(this.tabsState.active=e.value)})}select(e){this.props.value===void 0&&(this.tabsState.active=e),this.props.onChange?.(e)}};o(ne,"template","baseui.Tabs"),o(ne,"props",{value:{type:String,optional:!0},defaultValue:{type:String,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});pe=class extends n{};o(pe,"template","baseui.TabsContainer"),o(pe,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});le=class extends n{setup(){this.listRef=S("list")}onKeyDown(e){let s=[...this.listRef.el.querySelectorAll("[role='tab']")],r=s.indexOf(e.target),i=la(e.key,r,s.length);i!==-1&&(e.preventDefault(),s[i].focus(),s[i].click())}};o(le,"template","baseui.TabsList"),o(le,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ce=class extends n{setup(){this.rootRef=S("root"),this.tabInstance=null,this.onShown=()=>this.env.selectTab(this.props.value),k(()=>{this.tabInstance=x().Tab.getOrCreateInstance(this.rootRef.el),this.rootRef.el.addEventListener("shown.bs.tab",this.onShown)}),O(()=>{this.rootRef.el.removeEventListener("shown.bs.tab",this.onShown),this.tabInstance?.dispose()})}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`baseui-tabs-panel-${this.env.tabsId}-${Ci(this.props.value)}`}get classNames(){let e=["nav-link"];return this.isActive&&e.push("active"),this.props.className&&e.push(this.props.className),e.join(" ")}onClick(){this.props.disabled||this.tabInstance?.show()}};o(ce,"template","baseui.TabTrigger"),o(ce,"props",{value:{type:String},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Bt=class extends n{setup(){this.initialActive=this.isActive}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`baseui-tabs-panel-${this.env.tabsId}-${Ci(this.props.value)}`}};o(Bt,"template","baseui.TabContent"),o(Bt,"components",{Card:lt,CardBody:ct}),o(Bt,"props",{value:{type:String},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Rr,ue,de,It,be,he,me,ge,fe,Ni=b(()=>{m();q();Y();U();Rr={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},ue=class extends n{setup(){this.dialogState=f({open:$(this.props)}),this.control={instance:null},A({dialog:this.dialogState,dialogControl:this.control,setDialogOpen:e=>this.setOpen(e)}),R(e=>{if(T(e)){let s=$(e);this.dialogState.open=s,s?this.control.instance?.show():this.control.instance?.hide()}})}setOpen(e){T(this.props)||(this.dialogState.open=e),this.props.onOpenChange?.(e)}};o(ue,"template","baseui.Dialog"),o(ue,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});de=class extends n{onClick(){this.env.dialogControl.instance?.show()}};o(de,"template","baseui.DialogTrigger"),o(de,"props",Rr);It=class extends n{setup(){this.rootRef=S("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setDialogOpen(!0),this.onHidden=()=>{this.env.setDialogOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},k(()=>{this.env.dialogControl.instance=x().Modal.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,focus:!0}),this.rootRef.el.addEventListener("show.bs.modal",this.onShow),this.rootRef.el.addEventListener("shown.bs.modal",this.onShown),this.rootRef.el.addEventListener("hidden.bs.modal",this.onHidden),this.env.dialog.open&&this.env.dialogControl.instance.show()}),O(()=>{this.rootRef.el.removeEventListener("show.bs.modal",this.onShow),this.rootRef.el.removeEventListener("shown.bs.modal",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.modal",this.onHidden),this.env.dialogControl.instance?.dispose(),this.env.dialogControl.instance=null})}get showCloseButton(){return this.props.showCloseButton!==!1&&this.props["show-close-button"]!==!1}};o(It,"template","baseui.DialogContent"),o(It,"components",{Icon:N}),o(It,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},showCloseButton:{type:Boolean,optional:!0},"show-close-button":{type:Boolean,optional:!0},slots:{type:Object,optional:!0}});be=class extends n{};o(be,"template","baseui.DialogHeader"),o(be,"props",Rr);he=class extends n{};o(he,"template","baseui.DialogFooter"),o(he,"props",Rr);me=class extends n{};o(me,"template","baseui.DialogTitle"),o(me,"props",Rr);ge=class extends n{};o(ge,"template","baseui.DialogDescription"),o(ge,"props",Rr);fe=class extends n{};o(fe,"template","baseui.DialogClose"),o(fe,"props",Rr)});var ki,za,ye,ve,Se,xe,Oi=b(()=>{m();q();ki={default:"baseui-alert-default",destructive:"baseui-alert-destructive",info:"baseui-alert-default",success:"alert-success",warning:"alert-warning",danger:"baseui-alert-destructive"},za={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},ye=class extends n{setup(){this.rootRef=S("root"),this.bootstrapAlert=null,this.props.dismissible&&(k(()=>{this.bootstrapAlert=new(x()).Alert(this.rootRef.el)}),O(()=>{this.bootstrapAlert?.dispose()}))}get classNames(){let e=["alert","baseui-alert",ki[this.props.variant]||ki.default];return this.props.dismissible&&e.push("alert-dismissible","fade","show"),this.props.className&&e.push(this.props.className),e.join(" ")}};o(ye,"template","baseui.Alert"),o(ye,"props",{variant:{type:String,optional:!0},dismissible:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ve=class extends n{};o(ve,"template","baseui.AlertTitle"),o(ve,"props",za);Se=class extends n{};o(Se,"template","baseui.AlertDescription"),o(Se,"props",za);xe=class extends n{};o(xe,"template","baseui.AlertAction"),o(xe,"props",za)});var ca,ji,ul,we,Ae,Ee,Ce,Le,Ne,Bi=b(()=>{m();ca={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},ji={default:"baseui-empty-default",outline:"baseui-empty-outline",background:"baseui-empty-background"},ul={default:"baseui-empty-media-default",icon:"baseui-empty-media-icon"},we=class extends n{get classNames(){let e=["baseui-empty",ji[this.props.variant]||ji.default];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(we,"template","baseui.Empty"),o(we,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ae=class extends n{};o(Ae,"template","baseui.EmptyHeader"),o(Ae,"props",ca);Ee=class extends n{get variant(){return this.props.variant==="icon"?"icon":"default"}get classNames(){let e=["baseui-empty-media",ul[this.variant]];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Ee,"template","baseui.EmptyMedia"),o(Ee,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ce=class extends n{};o(Ce,"template","baseui.EmptyTitle"),o(Ce,"props",ca);Le=class extends n{};o(Le,"template","baseui.EmptyDescription"),o(Le,"props",ca);Ne=class extends n{};o(Ne,"template","baseui.EmptyContent"),o(Ne,"props",ca)});var ke,Ii=b(()=>{m();ke=class extends n{get vertical(){return this.props.orientation==="vertical"}get classNames(){let e=["baseui-separator",this.vertical?"baseui-separator-vertical":"baseui-separator-horizontal"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(ke,"template","baseui.Separator"),o(ke,"props",{orientation:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var ut,Pa=b(()=>{m();ut=class extends n{get classNames(){let e=["baseui-skeleton",this.props.shape==="circle"?"baseui-skeleton-circle":"baseui-skeleton-block"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(ut,"template","baseui.Skeleton"),o(ut,"props",{shape:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var Oe,Ri=b(()=>{m();Oe=class extends n{get classNames(){let e=["baseui-spinner",this.props.type==="grow"?"spinner-grow":"spinner-border"];return this.props.className&&e.push(this.props.className),e.join(" ")}get label(){return this.props.label||"Loading"}};o(Oe,"template","baseui.Spinner"),o(Oe,"props",{type:{type:String,optional:!0},label:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var dl,je,$i=b(()=>{m();dl={lead:"lead",muted:"text-body-secondary",code:"baseui-code",kbd:"baseui-kbd"},je=class extends n{get classNames(){let e=["baseui-typography"],s=dl[this.props.variant];return s&&e.push(s),this.props.className&&e.push(this.props.className),e.join(" ")}};o(je,"template","baseui.Typography"),o(je,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Be,Ti=b(()=>{m();Be=class extends n{get classNames(){let e=["baseui-kbd"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Be,"template","baseui.Kbd"),o(Be,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Ie,Ui=b(()=>{m();Ie=class extends n{get classNames(){let e=["baseui-marker"];return this.props.className&&e.push(this.props.className),e.join(" ")}get variant(){return this.props.variant}};o(Ie,"template","baseui.Marker"),o(Ie,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Re,qi=b(()=>{m();Re=class extends n{get classNames(){let e=["form-control"];return this.props.resize==="none"&&e.push("baseui-textarea-no-resize"),this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};o(Re,"template","baseui.Textarea"),o(Re,"props",{value:{type:String,optional:!0},placeholder:{type:String,optional:!0},rows:{type:Number,optional:!0},disabled:{type:Boolean,optional:!0},readonly:{type:Boolean,optional:!0},resize:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},id:{type:String,optional:!0},onInput:{type:Function,optional:!0},onChange:{type:Function,optional:!0}})});var $e,Mi=b(()=>{m();$e=class extends n{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){let e=["baseui-native-select","form-select"];return(this.props.size==="sm"||this.props.size==="lg")&&e.push(`form-select-${this.props.size}`),this.props.className&&e.push(this.props.className),e.join(" ")}onChange(e){this.props.onChange?.(e.target.value,e)}};o($e,"template","baseui.NativeSelect"),o($e,"props",{value:{type:String,optional:!0},size:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},id:{type:String,optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var Te,zi=b(()=>{m();Te=class extends n{onChange(e){this.props.onChange?.(e.target.checked,e)}};o(Te,"template","baseui.Checkbox"),o(Te,"props",{checked:{type:Boolean,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},id:{type:String,optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var Ue,qe,Pi=b(()=>{m();Ue=class extends n{setup(){A({radioGroupValue:()=>this.props.value,radioGroupDisabled:()=>this.props.disabled,radioGroupName:()=>this.props.name||"baseui-radio-group",selectRadio:e=>this.props.onChange?.(e)})}get classNames(){let e=["baseui-radio-group"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Ue,"template","baseui.RadioGroup"),o(Ue,"props",{value:{type:String,optional:!0},name:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});qe=class extends n{get checked(){return this.env.radioGroupValue()===this.props.value}get disabled(){return this.props.disabled||this.env.radioGroupDisabled()}onChange(){this.disabled||this.env.selectRadio(this.props.value)}};o(qe,"template","baseui.RadioGroupItem"),o(qe,"props",{value:{type:String},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Me,Fi=b(()=>{m();Me=class extends n{onChange(e){this.props.onChange?.(e.target.checked,e)}};o(Me,"template","baseui.Switch"),o(Me,"props",{checked:{type:Boolean,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var ze,Di=b(()=>{m();ze=class extends n{get classNames(){let e=["baseui-slider"];return this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){e.target.style.setProperty("--baseui-slider-value",`${e.target.value}%`),this.props.onChange?.(e.target.value,e)}};o(ze,"template","baseui.Slider"),o(ze,"props",{value:{type:[Number,String],optional:!0},min:{type:[Number,String],optional:!0},max:{type:[Number,String],optional:!0},step:{type:[Number,String],optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0}})});function ua(t){t.parentElement?.querySelector("[data-slot='input-group-control'], input, textarea")?.focus()}var Pe,Fe,De,Fa=b(()=>{Pe={"inline-start":"baseui-input-group-addon-inline-start","inline-end":"baseui-input-group-addon-inline-end","block-start":"baseui-input-group-addon-block-start","block-end":"baseui-input-group-addon-block-end"},Fe={default:"btn-primary",primary:"btn-primary",destructive:"btn-danger",danger:"btn-danger",outline:"btn-outline-secondary",secondary:"btn-secondary",ghost:"btn-light",link:"btn-link"},De={xs:"baseui-input-group-button-xs",sm:"baseui-input-group-button-sm","icon-xs":"baseui-input-group-button-icon-xs","icon-sm":"baseui-input-group-button-icon-sm"}});var _e,He,We,Ke,Ve,Ze,_i=b(()=>{m();Fa();_e=class extends n{get classNames(){let e=["baseui-input-group"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(_e,"template","baseui.InputGroup"),o(_e,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});He=class extends n{get align(){return Pe[this.props.align]?this.props.align:"inline-start"}get classNames(){let e=["baseui-input-group-addon",Pe[this.align]];return this.props.className&&e.push(this.props.className),e.join(" ")}onClick(e){this.props.onClick?.(e),e.target.closest("button")||ua(e.currentTarget)}};o(He,"template","baseui.InputGroupAddon"),o(He,"props",{align:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}});We=class extends n{get size(){return De[this.props.size]?this.props.size:"xs"}get classNames(){let e=["btn","baseui-button","baseui-input-group-button"];return e.push(Fe[this.props.variant]||Fe.ghost),e.push(De[this.size]),(this.props.className||this.props.class)&&e.push(this.props.className||this.props.class),e.join(" ")}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};o(We,"template","baseui.InputGroupButton"),o(We,"props",{variant:{type:String,optional:!0},size:{type:String,optional:!0},type:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},label:{type:String,optional:!0},class:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}});Ke=class extends n{get classNames(){let e=["baseui-input-group-text"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Ke,"template","baseui.InputGroupText"),o(Ke,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ve=class extends n{get classNames(){let e=["form-control","baseui-input-group-control","baseui-input-group-input"];return this.props.invalid&&e.push("is-invalid"),this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};o(Ve,"template","baseui.InputGroupInput"),o(Ve,"props",{value:{type:String,optional:!0},id:{type:String,optional:!0},name:{type:String,optional:!0},autocomplete:{type:String,optional:!0},placeholder:{type:String,optional:!0},type:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},readonly:{type:Boolean,optional:!0},invalid:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onInput:{type:Function,optional:!0},onChange:{type:Function,optional:!0}});Ze=class extends n{get classNames(){let e=["form-control","baseui-input-group-control","baseui-input-group-textarea"];return this.props.resize==="none"&&e.push("baseui-textarea-no-resize"),this.props.invalid&&e.push("is-invalid"),this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};o(Ze,"template","baseui.InputGroupTextarea"),o(Ze,"props",{value:{type:String,optional:!0},placeholder:{type:String,optional:!0},rows:{type:Number,optional:!0},disabled:{type:Boolean,optional:!0},readonly:{type:Boolean,optional:!0},invalid:{type:Boolean,optional:!0},resize:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onInput:{type:Function,optional:!0},onChange:{type:Function,optional:!0}})});var Xe,Hi=b(()=>{m();Xe=class extends n{setup(){this.length=this.props.length||6;let e=(this.props.value||"").split("");this.state=f({digits:Array.from({length:this.length},(s,r)=>e[r]||"")}),this.rootRef=S("root")}get classNames(){let e=["baseui-input-otp"];return this.props.className&&e.push(this.props.className),e.join(" ")}get boxes(){return this.state.digits.map((e,s)=>({index:s,value:e}))}emit(){this.props.onChange?.(this.state.digits.join(""))}onInput(e,s){let r=s.target.value.slice(-1);this.state.digits[e]=r,r&&this.rootRef.el&&[...this.rootRef.el.querySelectorAll("input")][e+1]?.focus(),this.emit()}onPaste(e){let s=e.clipboardData.getData("text").trim();if(s){e.preventDefault();for(let r=0;r<this.length;r++)this.state.digits[r]=s[r]||"";this.emit()}}};o(Xe,"template","baseui.InputOtp"),o(Xe,"props",{length:{type:Number,optional:!0},value:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0}})});function $r(t,{defaultOpen:e=!1,onOpenChange:s}={}){let r=f({open:e}),i=u=>{r.open!==u&&(r.open=u,s?.(u))},a=()=>i(!r.open),p=u=>{t.el&&!t.el.contains(u.target)&&i(!1)},l=u=>{u.key==="Escape"&&i(!1)};return G(u=>{if(u)return document.addEventListener("click",p),document.addEventListener("keydown",l),()=>{document.removeEventListener("click",p),document.removeEventListener("keydown",l)}},()=>[r.open]),O(()=>{document.removeEventListener("click",p),document.removeEventListener("keydown",l)}),{state:r,setOpen:i,toggle:a}}var da=b(()=>{m()});var Da,Ge,Ye,Je,Qe,Wi=b(()=>{m();da();U();Da={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Ge=class extends n{setup(){this.rootRef=S("root");let{state:e,setOpen:s,toggle:r}=$r(this.rootRef,{defaultOpen:_(this.props.state)});this.disclosure=e,A({select:this.disclosure,selectValue:()=>this.props.value,selectToggle:r,selectClose:()=>s(!1),selectChoose:i=>{this.props.onChange?.(i),s(!1)}})}get classNames(){let e=["baseui-select"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Ge,"template","baseui.Select"),o(Ge,"props",{value:{type:String,optional:!0},state:{type:String,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ye=class extends n{onClick(){this.env.selectToggle()}};o(Ye,"template","baseui.SelectTrigger"),o(Ye,"props",Da);Je=class extends n{get open(){return this.env.select.open}};o(Je,"template","baseui.SelectContent"),o(Je,"props",Da);Qe=class extends n{get selected(){return this.env.selectValue()===this.props.value}onClick(){this.env.selectChoose(this.props.value)}};o(Qe,"template","baseui.SelectItem"),o(Qe,"props",{value:{type:String},...Da})});function Tr(t){return[...t.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])")].filter(e=>!e.disabled&&!e.hidden)}function _a(t,e){if(t.key!=="Tab")return;let s=Tr(e);if(!s.length){t.preventDefault();return}let r=s[0],i=s[s.length-1];t.shiftKey&&document.activeElement===r?(t.preventDefault(),i.focus()):!t.shiftKey&&document.activeElement===i&&(t.preventDefault(),r.focus())}function ba(t,{closeSelector:e,trapFocus:s=!1}={}){let r=t.getAttribute("b-att-trigger"),i=r?document.querySelector(r):null,a=[...t.querySelectorAll(e)],p=null,l=()=>Tr(t),u=()=>{p=document.activeElement,t.hidden=!1,t.setAttribute("b-att-state","open"),t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),l()[0]?.focus(),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},d=()=>{t.hidden=!0,t.setAttribute("b-att-state","closed"),p?.focus?.(),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},h=v=>{if(v.key==="Escape"){d();return}!s||t.hidden||_a(v,t)},g=v=>{v.target===t&&d()};return i?.addEventListener("click",u),a.forEach(v=>v.addEventListener("click",d)),t.addEventListener("keydown",h),t.addEventListener("click",g),(!t.getAttribute("b-att-state")||t.getAttribute("b-att-state")==="closed")&&(t.hidden=!0),{open:u,close:d,destroy:()=>{i?.removeEventListener("click",u),a.forEach(v=>v.removeEventListener("click",d)),t.removeEventListener("keydown",h),t.removeEventListener("click",g)}}}var Vr=b(()=>{});var dt,ts,es,ss,os,rs,as,is,ns,ps,ls,Ki=b(()=>{m();Vr();U();dt={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},ts=class extends n{setup(){this.alertDialogState=f({open:$(this.props)}),A({alertDialog:this.alertDialogState,setAlertDialogOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.alertDialogState.open=$(e))})}setOpen(e){T(this.props)||(this.alertDialogState.open=e),this.props.onOpenChange?.(e)}};o(ts,"template","baseui.AlertDialog"),o(ts,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});es=class extends n{onClick(){this.env.setAlertDialogOpen(!0)}};o(es,"template","baseui.AlertDialogTrigger"),o(es,"props",dt);ss=class extends n{get size(){return this.props.size==="sm"?"sm":"default"}setup(){this.rootRef=S("root"),G(e=>{if(!e)return;let s=document.activeElement;return Tr(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.alertDialog.open])}get open(){return this.env.alertDialog.open}onKeyDown(e){if(e.key==="Escape"){this.env.setAlertDialogOpen(!1);return}_a(e,this.rootRef.el)}};o(ss,"template","baseui.AlertDialogContent"),o(ss,"props",{...dt,size:{type:String,optional:!0}});os=class extends n{};o(os,"template","baseui.AlertDialogHeader"),o(os,"props",dt);rs=class extends n{};o(rs,"template","baseui.AlertDialogFooter"),o(rs,"props",dt);as=class extends n{};o(as,"template","baseui.AlertDialogMedia"),o(as,"props",dt);is=class extends n{};o(is,"template","baseui.AlertDialogTitle"),o(is,"props",dt);ns=class extends n{};o(ns,"template","baseui.AlertDialogDescription"),o(ns,"props",dt);ps=class extends n{onClick(){this.env.setAlertDialogOpen(!1)}};o(ps,"template","baseui.AlertDialogCancel"),o(ps,"props",dt);ls=class extends n{onClick(){this.props.onClick?.(),this.env.setAlertDialogOpen(!1)}};o(ls,"template","baseui.AlertDialogAction"),o(ls,"props",{...dt,onClick:{type:Function,optional:!0}})});var ys,cs,us,ds,bs,hs,ms,gs,fs,Vi=b(()=>{m();q();U();ys={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},cs=class extends n{setup(){this.drawerState=f({open:$(this.props)}),this.control={instance:null},A({drawer:this.drawerState,drawerControl:this.control,setDrawerOpen:e=>this.setOpen(e)}),R(e=>{if(T(e)){let s=$(e);this.drawerState.open=s,s?this.control.instance?.show():this.control.instance?.hide()}})}setOpen(e){T(this.props)||(this.drawerState.open=e),this.props.onOpenChange?.(e)}};o(cs,"template","baseui.Drawer"),o(cs,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});us=class extends n{onClick(){this.env.drawerControl.instance?.show()}};o(us,"template","baseui.DrawerTrigger"),o(us,"props",ys);ds=class extends n{setup(){this.rootRef=S("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setDrawerOpen(!0),this.onHidden=()=>{this.env.setDrawerOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},k(()=>{this.env.drawerControl.instance=x().Offcanvas.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,scroll:!1}),this.rootRef.el.addEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.addEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.addEventListener("hidden.bs.offcanvas",this.onHidden),this.env.drawer.open&&this.env.drawerControl.instance.show()}),O(()=>{this.rootRef.el.removeEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.removeEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.offcanvas",this.onHidden),this.env.drawerControl.instance?.dispose(),this.env.drawerControl.instance=null})}get open(){return this.env.drawer.open}};o(ds,"template","baseui.DrawerContent"),o(ds,"props",ys);bs=class extends n{};o(bs,"template","baseui.DrawerHeader"),o(bs,"props",ys);hs=class extends n{};o(hs,"template","baseui.DrawerFooter"),o(hs,"props",ys);ms=class extends n{};o(ms,"template","baseui.DrawerTitle"),o(ms,"props",ys);gs=class extends n{};o(gs,"template","baseui.DrawerDescription"),o(gs,"props",ys);fs=class extends n{};o(fs,"template","baseui.DrawerClose"),o(fs,"props",ys)});var Ns,vs,Ss,xs,ws,As,Es,Cs,Ls,Zi=b(()=>{m();q();U();Ns={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},vs=class extends n{setup(){this.sheetState=f({open:$(this.props),side:this.props.side}),this.control={instance:null},A({sheet:this.sheetState,sheetControl:this.control,setSheetOpen:e=>this.setOpen(e)}),R(e=>{if(T(e)){let s=$(e);this.sheetState.open=s,s?this.control.instance?.show():this.control.instance?.hide()}this.sheetState.side=e.side})}setOpen(e){T(this.props)||(this.sheetState.open=e),this.props.onOpenChange?.(e)}};o(vs,"template","baseui.Sheet"),o(vs,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},side:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});Ss=class extends n{onClick(){this.env.sheetControl.instance?.show()}};o(Ss,"template","baseui.SheetTrigger"),o(Ss,"props",Ns);xs=class extends n{setup(){this.rootRef=S("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setSheetOpen(!0),this.onHidden=()=>{this.env.setSheetOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},k(()=>{this.env.sheetControl.instance=x().Offcanvas.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,scroll:!1}),this.rootRef.el.addEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.addEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.addEventListener("hidden.bs.offcanvas",this.onHidden),this.env.sheet.open&&this.env.sheetControl.instance.show()}),O(()=>{this.rootRef.el.removeEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.removeEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.offcanvas",this.onHidden),this.env.sheetControl.instance?.dispose(),this.env.sheetControl.instance=null})}get open(){return this.env.sheet.open}get side(){return this.props.side??this.env.sheet.side}get placementClass(){return this.side==="left"?"offcanvas-start":"offcanvas-end"}};o(xs,"template","baseui.SheetContent"),o(xs,"props",{...Ns,side:{type:String,optional:!0}});ws=class extends n{};o(ws,"template","baseui.SheetHeader"),o(ws,"props",Ns);As=class extends n{};o(As,"template","baseui.SheetFooter"),o(As,"props",Ns);Es=class extends n{};o(Es,"template","baseui.SheetTitle"),o(Es,"props",Ns);Cs=class extends n{};o(Cs,"template","baseui.SheetDescription"),o(Cs,"props",Ns);Ls=class extends n{};o(Ls,"template","baseui.SheetClose"),o(Ls,"props",Ns)});var Xi,ks,Os,js,Gi=b(()=>{m();q();U();Xi={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},ks=class extends n{setup(){let e=f({open:_(this.props.state)});this.control={instance:null,bufferEl:null,lastContentHtml:null};let s=r=>{e.open!==r&&(e.open=r,this.props.onOpenChange?.(r))};A({popover:e,popoverControl:this.control,popoverSetOpen:s,popoverToggle:()=>this.control.instance?.toggle(),popoverClose:()=>this.control.instance?.hide()})}};o(ks,"template","baseui.Popover"),o(ks,"props",{state:{type:String,optional:!0},onOpenChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Os=class extends n{setup(){this.rootRef=S("root"),this.onShown=()=>this.env.popoverSetOpen(!0),this.onHidden=()=>this.env.popoverSetOpen(!1),k(()=>{let e=this.env.popoverControl,s=e.bufferEl?.innerHTML??"";e.lastContentHtml=s,e.instance=new(x()).Popover(this.rootRef.el,{content:s,html:!0,trigger:"manual"}),this.rootRef.el.addEventListener("shown.bs.popover",this.onShown),this.rootRef.el.addEventListener("hidden.bs.popover",this.onHidden)}),O(()=>{this.rootRef.el.removeEventListener("shown.bs.popover",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.popover",this.onHidden),this.env.popoverControl.instance?.dispose(),this.env.popoverControl.instance=null})}onClick(){this.env.popoverControl.instance?.toggle()}};o(Os,"template","baseui.PopoverTrigger"),o(Os,"props",Xi);js=class extends n{get style(){return J("display:none",this.props.style)}setup(){this.bufferRef=S("buffer"),k(()=>{this.env.popoverControl.bufferEl=this.bufferRef.el}),D(()=>{let e=this.env.popoverControl;e.bufferEl=this.bufferRef.el;let s=this.currentContentHtml();e.instance&&s!==e.lastContentHtml&&(e.lastContentHtml=s,e.instance.setContent({".popover-body":s}))})}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}};o(js,"template","baseui.PopoverContent"),o(js,"props",{...Xi,content:{type:String,optional:!0}})});var Yi,Bs,Is,Rs,Ji=b(()=>{m();Yi={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Bs=class extends n{setup(){this.state=f({open:!1}),A({hoverCard:this.state})}open(){this.state.open=!0}close(){this.state.open=!1}onKeyDown(e){e.key==="Escape"&&this.close()}};o(Bs,"template","baseui.HoverCard"),o(Bs,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Is=class extends n{};o(Is,"template","baseui.HoverCardTrigger"),o(Is,"props",Yi);Rs=class extends n{get open(){return this.env.hoverCard.open}};o(Rs,"template","baseui.HoverCardContent"),o(Rs,"props",Yi)});var $s,Qi=b(()=>{m();q();U();$s=class extends n{setup(){this.state=f({open:_(this.props.state)}),this.triggerRef=S("trigger"),this.bufferRef=S("buffer"),this.bootstrapTooltip=null,this.lastContentHtml=null,this.onShown=()=>{this.state.open=!0},this.onHidden=()=>{this.state.open=!1},k(()=>{this.lastContentHtml=this.currentContentHtml();let e=this.triggerElement();this.bootstrapTooltip=new(x()).Tooltip(e,{title:this.lastContentHtml,html:!0,trigger:"hover focus"}),e.addEventListener("shown.bs.tooltip",this.onShown),e.addEventListener("hidden.bs.tooltip",this.onHidden),_(this.props.state)&&this.bootstrapTooltip.show()}),D(()=>{let e=this.currentContentHtml();e!==this.lastContentHtml&&(this.lastContentHtml=e,this.bootstrapTooltip?.setContent({".tooltip-inner":e}))}),O(()=>{let e=this.triggerElement();e?.removeEventListener("shown.bs.tooltip",this.onShown),e?.removeEventListener("hidden.bs.tooltip",this.onHidden),this.bootstrapTooltip?.dispose()})}triggerElement(){return this.triggerRef.el?.firstElementChild||this.triggerRef.el}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}show(){this.bootstrapTooltip?.show()}hide(){this.bootstrapTooltip?.hide()}};o($s,"template","baseui.Tooltip"),o($s,"props",{content:{type:String,optional:!0},state:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var et,Ha,bt,ht,mt,Ts,Us,gt,Rt,qs,$t,Ms,zs,ft,ot,yt,Wa=b(()=>{m();da();q();U();Y();et={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Ha={...et,disabled:{type:Boolean,optional:!0},inset:{type:Boolean,optional:!0},onClick:{type:Function,optional:!0},onSelect:{type:Function,optional:!0},variant:{type:String,optional:!0}},bt=class extends n{setup(){this.rootRef=S("root");let e=f({open:_(this.props.state)});this.control={instance:null};let s=a=>{e.open!==a&&(e.open=a,this.props.onOpenChange?.(a))};A({dropdownMenu:e,dropdownControl:this.control,dropdownSetOpen:s,dropdownToggle:()=>this.control.instance?.toggle(),dropdownClose:()=>this.control.instance?.hide()});let r=a=>{this.rootRef.el&&!this.rootRef.el.contains(a.target)&&this.control.instance?.hide()},i=a=>{a.key==="Escape"&&this.control.instance?.hide()};G(a=>{if(a)return document.addEventListener("click",r),document.addEventListener("keydown",i),()=>{document.removeEventListener("click",r),document.removeEventListener("keydown",i)}},()=>[e.open]),O(()=>{document.removeEventListener("click",r),document.removeEventListener("keydown",i)})}};o(bt,"template","baseui.DropdownMenu"),o(bt,"props",{state:{type:String,optional:!0},onOpenChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ht=class extends n{setup(){this.rootRef=S("root"),this.onShown=()=>this.env.dropdownSetOpen(!0),this.onHidden=()=>this.env.dropdownSetOpen(!1),k(()=>{this.env.dropdownControl.instance=x().Dropdown.getOrCreateInstance(this.rootRef.el),this.rootRef.el.addEventListener("shown.bs.dropdown",this.onShown),this.rootRef.el.addEventListener("hidden.bs.dropdown",this.onHidden)}),O(()=>{this.rootRef.el.removeEventListener("shown.bs.dropdown",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.dropdown",this.onHidden),this.env.dropdownControl.instance?.dispose(),this.env.dropdownControl.instance=null})}get classNames(){return W("btn","baseui-button","btn-outline-secondary","baseui-dropdown-menu-trigger",this.props.className)}onClick(){this.env.dropdownToggle()}};o(ht,"template","baseui.DropdownMenuTrigger"),o(ht,"props",et);mt=class extends n{get open(){return this.env.dropdownMenu.open}get classNames(){return W("baseui-dropdown-menu-content","dropdown-menu",this.open?"show":"",this.props.className)}};o(mt,"template","baseui.DropdownMenuContent"),o(mt,"props",{...et,align:{type:String,optional:!0},alignOffset:{type:Number,optional:!0},side:{type:String,optional:!0},sideOffset:{type:Number,optional:!0}});Ts=class extends n{};o(Ts,"template","baseui.DropdownMenuGroup"),o(Ts,"props",et);Us=class extends n{};o(Us,"template","baseui.DropdownMenuLabel"),o(Us,"props",{...et,inset:{type:Boolean,optional:!0}});gt=class extends n{get variant(){return this.props.variant||"default"}onClick(e){this.props.disabled||(this.props.onClick?.(e),this.props.onSelect?.(e),this.env.dropdownClose())}};o(gt,"template","baseui.DropdownMenuItem"),o(gt,"props",Ha);Rt=class extends n{onClick(e){this.props.disabled||(this.props.onCheckedChange?.(!this.props.checked,e),this.props.onClick?.(e),this.props.onSelect?.(e))}};o(Rt,"template","baseui.DropdownMenuCheckboxItem"),o(Rt,"components",{Icon:N}),o(Rt,"props",{...Ha,checked:{type:Boolean,optional:!0},onCheckedChange:{type:Function,optional:!0}});qs=class extends n{setup(){A({dropdownRadio:{value:this.props.value,onValueChange:this.props.onValueChange}})}};o(qs,"template","baseui.DropdownMenuRadioGroup"),o(qs,"props",{...et,value:{type:String,optional:!0},onValueChange:{type:Function,optional:!0}});$t=class extends n{get checked(){return this.env.dropdownRadio?.value===this.props.value}onClick(e){this.props.disabled||(this.env.dropdownRadio?.onValueChange?.(this.props.value,e),this.props.onClick?.(e),this.props.onSelect?.(e))}};o($t,"template","baseui.DropdownMenuRadioItem"),o($t,"components",{Icon:N}),o($t,"props",{...Ha,value:{type:String,optional:!0}});Ms=class extends n{};o(Ms,"template","baseui.DropdownMenuSeparator"),o(Ms,"props",et);zs=class extends n{};o(zs,"template","baseui.DropdownMenuShortcut"),o(zs,"props",et);ft=class extends n{setup(){this.rootRef=S("root");let{state:e,setOpen:s,toggle:r}=$r(this.rootRef);A({dropdownSub:e,dropdownSubToggle:r,dropdownSubOpen:()=>s(!0),dropdownSubClose:()=>s(!1)})}};o(ft,"template","baseui.DropdownMenuSub"),o(ft,"props",et);ot=class extends n{onMouseEnter(){this.props.disabled||this.env.dropdownSubOpen()}onClick(){this.props.disabled||this.env.dropdownSubToggle()}};o(ot,"template","baseui.DropdownMenuSubTrigger"),o(ot,"components",{Icon:N}),o(ot,"props",{...et,disabled:{type:Boolean,optional:!0},inset:{type:Boolean,optional:!0}});yt=class extends n{get open(){return this.env.dropdownSub.open}};o(yt,"template","baseui.DropdownMenuSubContent"),o(yt,"props",et)});var Ka,Ps,Fs,Ds,_s,tn=b(()=>{m();U();Ka={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Ps=class extends n{setup(){this.state=f({open:!1,x:0,y:0});let e=()=>{this.state.open=!1};this.close=e,A({contextMenu:this.state,contextMenuOpenAt:(s,r)=>{this.state.open=!0,this.state.x=s,this.state.y=r},contextMenuClose:e}),document.addEventListener("click",e),O(()=>document.removeEventListener("click",e))}};o(Ps,"template","baseui.ContextMenu"),o(Ps,"props",{className:{type:String,optional:!0},slots:{type:Object,optional:!0}});Fs=class extends n{onContextMenu(e){e.preventDefault(),this.env.contextMenuOpenAt(e.clientX,e.clientY)}};o(Fs,"template","baseui.ContextMenuTrigger"),o(Fs,"props",Ka);Ds=class extends n{setup(){this.rootRef=S("root")}get open(){return this.env.contextMenu.open}get style(){return J(`left:${this.env.contextMenu.x}px;top:${this.env.contextMenu.y}px`,this.props.style)}};o(Ds,"template","baseui.ContextMenuContent"),o(Ds,"props",Ka);_s=class extends n{onClick(){this.props.onClick?.(),this.env.contextMenuClose()}};o(_s,"template","baseui.ContextMenuItem"),o(_s,"props",{...Ka,onClick:{type:Function,optional:!0}})});var vt,Va=b(()=>{m();q();U();vt=class extends n{setup(){this.state=f({open:$(this.props)}),this.rootRef=S("root"),this.bootstrapToast=null,this.handleShown=()=>{this.state.open=!0},this.handleHidden=()=>{this.state.open=!1,this.props.onOpenChange?.(!1)},k(()=>{this.mountBootstrapToast(this.props.delay),this.state.open&&this.bootstrapToast.show()}),R(e=>{let s=T(e)?$(e):this.state.open;e.delay!==this.props.delay?(this.bootstrapToast?.dispose(),this.mountBootstrapToast(e.delay),s&&this.bootstrapToast.show()):s!==this.state.open&&(s?this.bootstrapToast?.show():this.bootstrapToast?.hide())}),O(()=>{this.bootstrapToast?.dispose()})}mountBootstrapToast(e){let s=this.rootRef.el,r=e??3e3;this.bootstrapToast=new(x()).Toast(s,{autohide:r>0,delay:r||3e3}),s.addEventListener("shown.bs.toast",this.handleShown),s.addEventListener("hidden.bs.toast",this.handleHidden)}get classNames(){let e=["toast","fade","baseui-toast"];return this.props.className&&e.push(this.props.className),e.join(" ")}get role(){return this.props.variant==="danger"?"alert":"status"}};o(vt,"template","baseui.Toast"),o(vt,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},variant:{type:String,optional:!0},delay:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var Za,Hs,Ws,Tt,Ks,en=b(()=>{m();q();U();Y();Za={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Hs=class extends n{setup(){this.state=f({open:new Set}),A({accordion:this.state,accordionToggle:e=>this.toggle(e)})}toggle(e){let s=!this.state.open.has(e);this.props.multiple||this.state.open.clear(),s?this.state.open.add(e):this.state.open.delete(e),this.props.onChange?.(s)}};o(Hs,"template","baseui.Accordion"),o(Hs,"props",{multiple:{type:Boolean,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ws=class extends n{setup(){A({accordionItemState:this.props.state,accordionItemValue:this.props.value})}};o(Ws,"template","baseui.AccordionItem"),o(Ws,"props",{value:{type:String},state:{type:String,optional:!0},...Za});Tt=class extends n{get open(){return this.env.accordionItemState!==void 0?_(this.env.accordionItemState):this.env.accordion.open.has(this.env.accordionItemValue)}onClick(){this.env.accordionToggle(this.env.accordionItemValue)}};o(Tt,"template","baseui.AccordionTrigger"),o(Tt,"components",{Icon:N}),o(Tt,"props",Za);Ks=class extends n{setup(){this.rootRef=S("root"),this.initialOpen=this.open,this.bootstrapCollapse=null,k(()=>{this.bootstrapCollapse=new(x()).Collapse(this.rootRef.el,{toggle:!1})}),D(()=>{if(!this.bootstrapCollapse)return;let e=this.rootRef.el.classList.contains("show");this.open&&!e?this.bootstrapCollapse.show():!this.open&&e&&this.bootstrapCollapse.hide()}),O(()=>{this.bootstrapCollapse?.dispose()})}get open(){return this.env.accordionItemState!==void 0?_(this.env.accordionItemState):this.env.accordion.open.has(this.env.accordionItemValue)}};o(Ks,"template","baseui.AccordionContent"),o(Ks,"props",Za)});var sn,Vs,Zs,Xs,on=b(()=>{m();q();U();sn={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Vs=class extends n{setup(){this.state=f({open:$(this.props)}),A({collapsible:this.state,collapsibleToggle:()=>this.toggle()}),R(e=>{T(e)&&(this.state.open=$(e))})}toggle(){let e=!this.state.open;T(this.props)||(this.state.open=e),this.props.onOpenChange?.(e)}};o(Vs,"template","baseui.Collapsible"),o(Vs,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Zs=class extends n{onClick(){this.env.collapsibleToggle()}};o(Zs,"template","baseui.CollapsibleTrigger"),o(Zs,"props",sn);Xs=class extends n{setup(){this.rootRef=S("root"),this.initialOpen=this.open,this.bootstrapCollapse=null,k(()=>{this.bootstrapCollapse=new(x()).Collapse(this.rootRef.el,{toggle:!1})}),D(()=>{if(!this.bootstrapCollapse)return;let e=this.rootRef.el.classList.contains("show");this.open&&!e?this.bootstrapCollapse.show():!this.open&&e&&this.bootstrapCollapse.hide()}),O(()=>{this.bootstrapCollapse?.dispose()})}get open(){return this.env.collapsible.open}};o(Xs,"template","baseui.CollapsibleContent"),o(Xs,"props",sn)});var Gs,Ys,Js,Qs,to,Ut,qt,rn=b(()=>{m();Y();Gs=class extends n{};o(Gs,"template","baseui.Breadcrumb"),o(Gs,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ys=class extends n{};o(Ys,"template","baseui.BreadcrumbList"),o(Ys,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Js=class extends n{get classNames(){let e=["baseui-breadcrumb-item"];return this.props.current&&e.push("baseui-breadcrumb-page"),this.props.className&&e.push(this.props.className),e.join(" ")}};o(Js,"template","baseui.BreadcrumbItem"),o(Js,"props",{current:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Qs=class extends n{get classNames(){let e=["baseui-breadcrumb-link"];return this.props.className&&e.push(this.props.className),e.join(" ")}onClick(e){this.props.onClick?.(e)}};o(Qs,"template","baseui.BreadcrumbLink"),o(Qs,"props",{href:{type:String,optional:!0},target:{type:String,optional:!0},rel:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}});to=class extends n{get classNames(){let e=["baseui-breadcrumb-page"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(to,"template","baseui.BreadcrumbPage"),o(to,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ut=class extends n{get classNames(){let e=["baseui-breadcrumb-separator"];return this.props.className&&e.push(this.props.className),e.join(" ")}get hasCustomContent(){return!!this.props.slots?.default}};o(Ut,"template","baseui.BreadcrumbSeparator"),o(Ut,"components",{Icon:N}),o(Ut,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});qt=class extends n{get classNames(){let e=["baseui-breadcrumb-ellipsis"];return this.props.className&&e.push(this.props.className),e.join(" ")}get hasCustomContent(){return!!this.props.slots?.default}};o(qt,"template","baseui.BreadcrumbEllipsis"),o(qt,"components",{Icon:N}),o(qt,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var eo,so,an=b(()=>{m();eo=class extends n{get classNames(){let e=["baseui-pagination"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(eo,"template","baseui.Pagination"),o(eo,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});so=class extends n{get classNames(){let e=["page-item"];return this.props.current&&e.push("active"),this.props.disabled&&e.push("disabled"),e.join(" ")}onClick(){this.props.disabled||this.props.onClick?.()}};o(so,"template","baseui.PaginationItem"),o(so,"props",{current:{type:Boolean,optional:!0},disabled:{type:Boolean,optional:!0},style:{type:[String,Object],optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var oo,ro,nn=b(()=>{m();oo=class extends n{setup(){this.rootRef=S("root")}onKeyDown(e){let s=[...this.rootRef.el.querySelectorAll("a, button")].filter(a=>!a.disabled),r=s.indexOf(e.target),i=e.key==="ArrowRight"?1:e.key==="ArrowLeft"?-1:0;!i||r<0||(e.preventDefault(),s[(r+i+s.length)%s.length]?.focus())}};o(oo,"template","baseui.NavigationMenu"),o(oo,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ro=class extends n{};o(ro,"template","baseui.NavigationMenuItem"),o(ro,"props",{href:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var ao,pn=b(()=>{m();ao=class extends n{get classNames(){let e=["baseui-menubar"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(ao,"template","baseui.Menubar"),o(ao,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});function cn(t){globalThis.matchMedia?.("(max-width: 767.98px)").matches&&t.setSidebarOpen?.(!1)}var V,ln,at,Ur,Mt,St,io,no,po,lo,co,uo,zt,xt,wt,Pt,bo,Ft,it,At,rt,Dt,ho,mo,go,fo,yo,ha=b(()=>{m();U();Y();V={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},ln={...V,href:{type:String,optional:!0}};at=class extends n{setup(){this.state=f({open:$(this.props)}),A({sidebar:this.state,setSidebarOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.state.open=$(e))})}setOpen(e){T(this.props)||(this.state.open=e),this.props.onOpenChange?.(e)}get sidebarState(){return this.state.open?"expanded":"collapsed"}get side(){return this.props.side||"left"}get variant(){return this.props.variant||"sidebar"}get collapsible(){return this.props.collapsible||"offcanvas"}get classNames(){return W("baseui-sidebar-root",this.props.className)}onKeyDown(e){e.key==="Escape"&&this.setOpen(!1)}};o(at,"template","baseui.Sidebar"),o(at,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},side:{type:String,optional:!0},variant:{type:String,optional:!0},collapsible:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ur=class extends at{};o(Ur,"template","baseui.Sidebar");Mt=class extends n{onClick(){if(this.env.setShellCollapsed&&!globalThis.matchMedia?.("(max-width: 767.98px)").matches){this.env.setShellCollapsed(!this.env.shell.collapsed);return}this.env.setSidebarOpen(!this.env.sidebar.open)}};o(Mt,"template","baseui.SidebarTrigger"),o(Mt,"components",{Icon:N}),o(Mt,"props",{...V,icon:{type:String,optional:!0},label:{type:String,optional:!0}});St=class extends n{get open(){return this.env.sidebar.open}};o(St,"template","baseui.SidebarContent"),o(St,"props",V);io=class extends n{};o(io,"template","baseui.SidebarHeader"),o(io,"props",V);no=class extends n{};o(no,"template","baseui.SidebarFooter"),o(no,"props",V);po=class extends n{};o(po,"template","baseui.SidebarInset"),o(po,"props",V);lo=class extends n{onClick(){this.env.setSidebarOpen(!this.env.sidebar.open)}};o(lo,"template","baseui.SidebarRail"),o(lo,"props",V);co=class extends n{};o(co,"template","baseui.SidebarInput"),o(co,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},placeholder:{type:String,optional:!0},value:{type:String,optional:!0},type:{type:String,optional:!0}});uo=class extends n{};o(uo,"template","baseui.SidebarSeparator"),o(uo,"props",V);zt=class extends n{onClick(){this.env.setSidebarOpen(!1)}};o(zt,"template","baseui.SidebarClose"),o(zt,"components",{Icon:N}),o(zt,"props",{...V,icon:{type:String,optional:!0},label:{type:String,optional:!0}});xt=class extends n{};o(xt,"template","baseui.SidebarGroup"),o(xt,"props",{muted:{type:Boolean,optional:!0},...V});wt=class extends n{};o(wt,"template","baseui.SidebarGroupLabel"),o(wt,"props",ln);Pt=class extends n{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};o(Pt,"template","baseui.SidebarGroupAction"),o(Pt,"components",{Icon:N}),o(Pt,"props",{icon:{type:String,optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},onClick:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});bo=class extends n{};o(bo,"template","baseui.SidebarGroupContent"),o(bo,"props",V);Ft=class extends n{setup(){let e=this.props["default-open"]!==void 0||this.props.defaultOpen!==void 0;this.state=f({open:T(this.props)||e?$(this.props):!0}),R(s=>{T(s)&&(this.state.open=$(s))})}get open(){return this.state.open}toggle(){let e=!this.state.open;T(this.props)||(this.state.open=e),this.props.onOpenChange?.(e)}};o(Ft,"template","baseui.SidebarGroupCollapsible"),o(Ft,"components",{Icon:N}),o(Ft,"props",{label:{type:String},open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});it=class extends n{};o(it,"template","baseui.SidebarMenu"),o(it,"props",V);At=class extends n{};o(At,"template","baseui.SidebarMenuItem"),o(At,"props",V);rt=class extends n{get classNames(){let e=["baseui-sidebar-menu-button"];return this.isActive&&e.push("is-active"),this.props.variant&&e.push(`is-${this.props.variant}`),this.props.size&&e.push(`is-${this.props.size}`),this.props.className&&e.push(this.props.className),e.join(" ")}get isActive(){return this.props.active||this.props.isActive}onClick(e){this.props.onClick?.(e),cn(this.env)}};o(rt,"template","baseui.SidebarMenuButton"),o(rt,"components",{Icon:N}),o(rt,"props",{href:{type:String,optional:!0},icon:{type:String,optional:!0},active:{type:Boolean,optional:!0},isActive:{type:Boolean,optional:!0},variant:{type:String,optional:!0},size:{type:String,optional:!0},tooltip:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},onClick:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Dt=class extends n{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};o(Dt,"template","baseui.SidebarMenuAction"),o(Dt,"components",{Icon:N}),o(Dt,"props",{icon:{type:String,optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},showOnHover:{type:Boolean,optional:!0},onClick:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ho=class extends n{};o(ho,"template","baseui.SidebarMenuSub"),o(ho,"props",V);mo=class extends n{};o(mo,"template","baseui.SidebarMenuBadge"),o(mo,"props",V);go=class extends n{setup(){this.state=f({width:this.props.width||`${Math.floor(Math.random()*40)+50}%`})}get style(){return J(`--baseui-sidebar-skeleton-width:${this.state.width}`,this.props.style)}};o(go,"template","baseui.SidebarMenuSkeleton"),o(go,"props",{showIcon:{type:Boolean,optional:!0},width:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}});fo=class extends n{};o(fo,"template","baseui.SidebarMenuSubItem"),o(fo,"props",V);yo=class extends n{get classNames(){let e=["baseui-sidebar-menu-sub-button"];return(this.props.active||this.props.isActive)&&e.push("is-active"),this.props.size&&e.push(`is-${this.props.size}`),this.props.className&&e.push(this.props.className),e.join(" ")}onClick(e){this.props.onClick?.(e),cn(this.env)}};o(yo,"template","baseui.SidebarMenuSubButton"),o(yo,"props",{...ln,active:{type:Boolean,optional:!0},isActive:{type:Boolean,optional:!0},size:{type:String,optional:!0},onClick:{type:Function,optional:!0}})});var qr,_t,Ht,vo,So,xo,wo,Wt,Ao,un=b(()=>{m();ha();Pa();Va();jr();qr={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},_t=class extends n{setup(){this.state=f({collapsed:this.props.collapsed??this.props.defaultCollapsed??!1,authState:this.props.authState??null}),A({shell:this.state,setShellCollapsed:e=>this.setCollapsed(e)}),R(e=>{e.collapsed!==void 0&&(this.state.collapsed=e.collapsed),this.state.authState=e.authState??null})}setCollapsed(e){this.props.collapsed===void 0&&(this.state.collapsed=e),this.props.onCollapsedChange?.(e)}dismissToast(){this.props.onToastOpenChange?.(!1)}runToastAction(){this.props.toast?.onAction?.()}};o(_t,"template","baseui.Shell"),o(_t,"components",{Sidebar:at,Toast:vt,Button:K}),o(_t,"props",{open:{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},collapsed:{type:Boolean,optional:!0},defaultCollapsed:{type:Boolean,optional:!0},onCollapsedChange:{type:Function,optional:!0},authState:{type:Object,optional:!0},toast:{type:Object,optional:!0},onToastOpenChange:{type:Function,optional:!0},notificationPage:{type:Function,optional:!0},pwa:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ht=class extends n{};o(Ht,"template","baseui.ShellSidebar"),o(Ht,"components",{SidebarContent:St}),o(Ht,"props",qr);vo=class extends n{};o(vo,"template","baseui.ShellSidebarHeader"),o(vo,"props",qr);So=class extends n{};o(So,"template","baseui.ShellNav"),o(So,"props",qr);xo=class extends n{};o(xo,"template","baseui.ShellMain"),o(xo,"props",qr);wo=class extends n{};o(wo,"template","baseui.ShellHeader"),o(wo,"props",qr);Wt=class extends n{};o(Wt,"template","baseui.ShellContent"),o(Wt,"components",{Skeleton:ut}),o(Wt,"props",{loading:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ao=class extends n{get authState(){return this.env.shell.authState}logout(){this.authState?.onLogout?.()}};o(Ao,"template","baseui.ShellUserMenu"),o(Ao,"props",qr)});var Eo,dn=b(()=>{m();Eo=class extends n{get classNames(){let e=["table","baseui-table"];return this.props.striped!==!1&&e.push("table-striped"),this.props.hover!==!1&&e.push("table-hover"),this.props.className&&e.push(this.props.className),e.join(" ")}};o(Eo,"template","baseui.Table"),o(Eo,"props",{striped:{type:Boolean,optional:!0},hover:{type:Boolean,optional:!0},responsive:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var bl,hl,ml,Co,Lo,gl,Kt,bn=b(()=>{m();jr();Y();bl=[{key:"status",label:"Status",format:"capitalize"},{key:"email",label:"Email",sortable:!0,filterable:!0},{key:"amount",label:"Amount",align:"right",format:"currency"}],hl=[{id:"728ed52f",status:"success",email:"ken99@example.com",amount:316},{id:"489e1d42",status:"success",email:"abe45@example.com",amount:242},{id:"6b0888f6",status:"processing",email:"monserrat44@example.com",amount:837},{id:"a1dc8c4e",status:"success",email:"silas22@example.com",amount:874},{id:"15b96de0",status:"failed",email:"carmella@example.com",amount:721}],ml=[{label:"Copy payment ID"},{label:"View customer"},{label:"View payment details"}],Co=4,Lo=8,gl=32,Kt=class extends n{setup(){this.state=f({query:"",sortKey:null,sortDir:1,page:0,pageSize:this.initialPageSize,selectedKeys:[],hiddenColumns:this.columns.filter(e=>e.hidden||e.visible===!1).map(e=>e.key),columnsOpen:!1,actionRowKey:null,actionMenuStyle:null}),this.actionsMenuRef=S("actionsMenu"),this.actionsMenuTriggerEl=null,Or(window,"click",this.onWindowClick,!0),Or(window,"keydown",this.onWindowKeydown),Or(window,"resize",this.closeRowActions),Or(window,"scroll",this.closeRowActions,!0),D(()=>this.refreshActionsMenuPosition())}get columns(){return this.props.columns?.length?this.props.columns:bl}get rows(){return this.props.rows?.length?this.props.rows:hl}get usesDefaultRows(){return!this.props.rows?.length}get initialPageSize(){return this.props["page-size"]??this.props.pageSize??10}get pageSizeOptions(){return this.props["page-size-options"]??this.props.pageSizeOptions??[10,20,50,80]}get rowActions(){return this.props["row-actions"]??this.props.rowActions??(this.usesDefaultRows?ml:[])}get variant(){return this.props.variant||"default"}get classNames(){let e=["baseui-data-table",`baseui-data-table-${this.variant}`];return this.props.className&&e.push(this.props.className),e.join(" ")}get viewportStyle(){let e=this.props["max-height"]??this.props.maxHeight;return e?`max-height: ${typeof e=="number"?`${e}px`:e};`:""}get hasSearch(){return this.props.searchable!==!1}get hasSorting(){return this.props.sortable!==!1}get hasPagination(){return this.props.pagination!==!1}get hasColumnToggle(){return this.props["column-toggle"]??this.props.columnToggle??!0}get hasToolbarActions(){return!!this.props.slots?.toolbarActions}get hasSelection(){return this.props.selectable??this.usesDefaultRows}get visibleColumns(){return this.columns.filter(e=>!this.state.hiddenColumns.includes(e.key))}get visibleRows(){let e=this.state.query.toLowerCase(),s=this.columns.filter(a=>a.filterable===!0),r=(s.length?s:this.columns).map(a=>a.key),i=this.rows.filter(a=>!e||r.some(p=>String(a[p]).toLowerCase().includes(e)));return this.state.sortKey&&(i=[...i].sort((a,p)=>String(a[this.state.sortKey]).localeCompare(String(p[this.state.sortKey]))*this.state.sortDir)),i}get pageCount(){return Math.max(1,Math.ceil(this.visibleRows.length/this.state.pageSize))}get pageRows(){if(!this.hasPagination)return this.visibleRows;let s=Math.min(this.state.page,this.pageCount-1)*this.state.pageSize;return this.visibleRows.slice(s,s+this.state.pageSize)}get selectedCount(){return this.state.selectedKeys.length}get selectionLabel(){return`${this.selectedCount} of ${this.visibleRows.length} row(s) selected.`}get emptyLabel(){return this.props["empty-label"]??this.props.emptyLabel??"No results."}get filterPlaceholder(){return this.props["filter-placeholder"]??this.props.filterPlaceholder??"Filter emails..."}get canPreviousPage(){return this.hasPagination&&this.state.page>0}get canNextPage(){return this.hasPagination&&this.state.page<this.pageCount-1}get pageLabel(){return`Page ${Math.min(this.state.page,this.pageCount-1)+1} of ${this.pageCount}`}rowKey(e,s){return e.id??e.key??s}isSelected(e,s){return this.state.selectedKeys.includes(this.rowKey(e,s))}isColumnSortable(e){return this.hasSorting&&e.sortable===!0}onSearchInput(e){this.state.query=e.target.value,this.state.page=0}sortBy(e){let s=this.columns.find(r=>r.key===e);!s||!this.isColumnSortable(s)||(this.state.sortKey===e?this.state.sortDir=-this.state.sortDir:(this.state.sortKey=e,this.state.sortDir=1))}sortIcon(e){return this.state.sortKey!==e?"arrow-up-down":this.state.sortDir===1?"arrow-up":"arrow-down"}toggleColumn(e){this.state.hiddenColumns.includes(e)?this.state.hiddenColumns=this.state.hiddenColumns.filter(s=>s!==e):this.state.hiddenColumns=[...this.state.hiddenColumns,e]}toggleColumnsMenu(){this.state.columnsOpen=!this.state.columnsOpen}toggleRowActions(e,s,r){let i=this.rowKey(e,s);if(this.state.actionRowKey===i){this.closeRowActions();return}this.actionsMenuTriggerEl=r.currentTarget,this.state.actionRowKey=i,this.state.actionMenuStyle=this.estimateActionMenuStyle(r.currentTarget)}closeRowActions(){this.state.actionRowKey!==null&&(this.state.actionRowKey=null,this.state.actionMenuStyle=null,this.actionsMenuTriggerEl=null)}get openRowAction(){if(this.state.actionRowKey===null)return null;let e=this.pageRows.findIndex((s,r)=>this.rowKey(s,r)===this.state.actionRowKey);return e===-1?null:{row:this.pageRows[e],index:e}}estimateActionMenuStyle(e){let s=e.getBoundingClientRect(),r=this.rowActions.length*gl+Co*2,i=window.innerHeight-s.bottom,p=i<r+Co&&s.top>i?Math.max(Lo,s.top-Co-r):s.bottom+Co,l=Math.min(Math.max(Lo,s.right-160),window.innerWidth-160-Lo);return`position: fixed; top: ${Math.round(p)}px; left: ${Math.round(l)}px;`}refreshActionsMenuPosition(){if(this.state.actionRowKey===null||!this.actionsMenuTriggerEl)return;let e=this.actionsMenuRef.el;if(!e)return;let s=this.actionsMenuTriggerEl.getBoundingClientRect(),r=e.getBoundingClientRect(),i=window.innerHeight-s.bottom,a=s.top,l=i<r.height+Co&&a>i?Math.max(Lo,s.top-Co-r.height):Math.min(s.bottom+Co,window.innerHeight-r.height-Lo),u=Math.min(Math.max(Lo,s.right-r.width),window.innerWidth-r.width-Lo),d=`position: fixed; top: ${Math.round(l)}px; left: ${Math.round(u)}px;`;this.state.actionMenuStyle!==d&&(this.state.actionMenuStyle=d)}onWindowClick(e){this.state.actionRowKey===null||this.actionsMenuRef.el?.contains(e.target)||this.actionsMenuTriggerEl?.contains(e.target)||this.closeRowActions()}onWindowKeydown(e){e.key==="Escape"&&this.closeRowActions()}setPage(e){this.state.page=Math.max(0,Math.min(e,this.pageCount-1))}setPageSize(e){this.state.pageSize=Number(e),this.state.page=0}optionValue(e){return`${e}`}toggleRow(e,s,r){let i=this.rowKey(e,s);this.state.selectedKeys=r?[...new Set([...this.state.selectedKeys,i])]:this.state.selectedKeys.filter(a=>a!==i),this.props.onSelectionChange?.(this.state.selectedKeys)}toggleAllVisible(e){let s=this.pageRows.map((r,i)=>this.rowKey(r,i));this.state.selectedKeys=e?[...new Set([...this.state.selectedKeys,...s])]:this.state.selectedKeys.filter(r=>!s.includes(r)),this.props.onSelectionChange?.(this.state.selectedKeys)}onAction(e,s,r){e.onSelect?.(s,r),this.props.onRowAction?.(e,s,r),this.closeRowActions()}columnLabel(e){return e.label??e.key}cellValue(e,s){let r=e[s.key];if(s.format==="currency"){let i=Number(r);return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(Number.isFinite(i)?i:0)}if(s.format==="capitalize"){let i=String(r??"");return i.charAt(0).toUpperCase()+i.slice(1)}return r??""}cellComponentProps(e,s){return s.componentProps?s.componentProps(e,s):{row:e,column:s,value:e[s.key]}}};o(Kt,"template","baseui.DataTable"),o(Kt,"components",{Button:K,Icon:N}),o(Kt,"props",{columns:{type:Array,optional:!0},rows:{type:Array,optional:!0},variant:{type:String,optional:!0},searchable:{type:Boolean,optional:!0},sortable:{type:Boolean,optional:!0},pagination:{type:Boolean,optional:!0},selectable:{type:Boolean,optional:!0},"column-toggle":{type:Boolean,optional:!0},columnToggle:{type:Boolean,optional:!0},"row-actions":{type:Array,optional:!0},rowActions:{type:Array,optional:!0},"page-size":{type:Number,optional:!0},pageSize:{type:Number,optional:!0},"page-size-options":{type:Array,optional:!0},pageSizeOptions:{type:Array,optional:!0},"filter-placeholder":{type:String,optional:!0},filterPlaceholder:{type:String,optional:!0},"empty-label":{type:String,optional:!0},emptyLabel:{type:String,optional:!0},onRowAction:{type:Function,optional:!0},onSelectionChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"max-height":{type:[String,Number],optional:!0},maxHeight:{type:[String,Number],optional:!0},slots:{type:Object,optional:!0}})});var fl,yl,No,hn=b(()=>{m();fl=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}),yl=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],No=class extends n{get baseDate(){return this.props.selected?new Date(`${this.props.selected}T00:00:00`):new Date}get month0(){return(this.props.month??this.baseDate.getMonth()+1)-1}get year(){return this.props.year??this.baseDate.getFullYear()}get headerLabel(){return fl.format(new Date(this.year,this.month0,1))}get weekdays(){return yl}get days(){let e=new Date(this.year,this.month0+1,0).getDate(),s=new Date(this.year,this.month0,1).getDay(),r=[];for(let i=0;i<s;i++)r.push(null);for(let i=1;i<=e;i++){let a=`${this.year}-${String(this.month0+1).padStart(2,"0")}-${String(i).padStart(2,"0")}`;r.push({day:i,value:a,selected:a===this.props.selected})}return r}onSelect(e){this.props.onChange?.(e)}};o(No,"template","baseui.Calendar"),o(No,"props",{selected:{type:String,optional:!0},month:{type:Number,optional:!0},year:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0}})});var ko,mn=b(()=>{m();ko=class extends n{get classNames(){let e=["baseui-date-picker","form-control"];return this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){this.props.onChange?.(e.target.value,e)}};o(ko,"template","baseui.DatePicker"),o(ko,"props",{value:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0}})});var Oo,gn=b(()=>{m();da();Oo=class extends n{setup(){this.rootRef=S("root");let{state:e}=$r(this.rootRef);this.disclosure=e,this.state=f({query:this.selectedLabel})}get selectedLabel(){return this.props.options.find(e=>e.value===this.props.value)?.label||""}get filteredOptions(){let e=this.state.query.toLowerCase();return this.props.options.filter(s=>s.label.toLowerCase().includes(e))}onInput(e){this.state.query=e.target.value,this.disclosure.open=!0}onFocus(){this.disclosure.open=!0}choose(e){this.state.query=e.label,this.disclosure.open=!1,this.props.onChange?.(e.value)}};o(Oo,"template","baseui.Combobox"),o(Oo,"props",{options:{type:Array},value:{type:String,optional:!0},placeholder:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},id:{type:String,optional:!0},onChange:{type:Function,optional:!0}})});var jo,fn=b(()=>{m();jo=class extends n{setup(){this.state=f({query:""})}get filteredItems(){let e=this.state.query.toLowerCase();return this.props.items.filter(s=>s.label.toLowerCase().includes(e))}onInput(e){this.state.query=e.target.value}select(e){this.props.onSelect?.(e.value)}};o(jo,"template","baseui.Command"),o(jo,"props",{items:{type:Array},placeholder:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onSelect:{type:Function,optional:!0}})});var Bo,yn=b(()=>{m();Bo=class extends n{get classNames(){let e=["baseui-chart"];return this.props.type&&e.push(`baseui-chart-${this.props.type}`),this.props.variant&&e.push(`baseui-chart-${this.props.variant}`),this.props.className&&e.push(this.props.className),e.join(" ")}};o(Bo,"template","baseui.Chart"),o(Bo,"props",{config:{type:[String,Object],optional:!0},label:{type:String,optional:!0},type:{type:String,optional:!0},value:{type:[String,Number],optional:!0},variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Xa,Io,Ro,$o,To,vn=b(()=>{m();q();U();Xa={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Io=class extends n{setup(){this.state=f({index:this.props.defaultIndex??0}),this.rootRef=S("root"),this.bootstrapCarousel=null,this.onSlid=e=>{this.state.index=e.to,this.props.onChange?.(this.state.index)},A({carousel:this.state,carouselInstance:()=>this.bootstrapCarousel}),k(()=>{this.bootstrapCarousel=new(x()).Carousel(this.rootRef.el,{interval:!1,wrap:!0,touch:!0}),this.rootRef.el.addEventListener("slid.bs.carousel",this.onSlid)}),O(()=>{this.rootRef.el.removeEventListener("slid.bs.carousel",this.onSlid),this.bootstrapCarousel?.dispose()})}};o(Io,"template","baseui.Carousel"),o(Io,"props",{slideCount:{type:Number},defaultIndex:{type:Number,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ro=class extends n{setup(){this.rootRef=S("root"),this.initialActive=this.active,D(()=>{if(!this.rootRef.el)return;let e=this.rootRef.el.classList.contains("active");this.active&&!e?this.rootRef.el.classList.add("active"):!this.active&&e&&this.rootRef.el.classList.remove("active")})}get active(){return this.props.state!==void 0?_(this.props.state):this.env.carousel.index===this.props.index}};o(Ro,"template","baseui.CarouselSlide"),o(Ro,"props",{index:{type:Number},state:{type:String,optional:!0},...Xa});$o=class extends n{onClick(){this.env.carouselInstance()?.prev()}};o($o,"template","baseui.CarouselPrevious"),o($o,"props",Xa);To=class extends n{onClick(){this.env.carouselInstance()?.next()}};o(To,"template","baseui.CarouselNext"),o(To,"props",Xa)});var Uo,Sn=b(()=>{m();Uo=class extends n{setup(){this.panelRef=S("panel"),this.state=f({width:null})}get panelStyle(){return this.state.width?`width:${this.state.width}px`:""}onPointerDown(e){let s=e.clientX,r=this.panelRef.el.getBoundingClientRect().width,i=this.props.min||160,a=this.props.max||720,p=u=>{this.state.width=Math.min(a,Math.max(i,r+u.clientX-s))},l=()=>{document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",l),this.props.onChange?.(this.state.width)};document.addEventListener("pointermove",p),document.addEventListener("pointerup",l)}};o(Uo,"template","baseui.Resizable"),o(Uo,"props",{min:{type:Number,optional:!0},max:{type:Number,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var qo,xn=b(()=>{m();qo=class extends n{get classNames(){let e=["baseui-scroll-area"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(qo,"template","baseui.ScrollArea"),o(qo,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var wn,An,ma,Mo,zo,Po,Fo,Do,_o,Ho,Wo,Ko,Vo,En=b(()=>{m();te();wn={idle:"baseui-attachment-idle",uploading:"baseui-attachment-uploading",processing:"baseui-attachment-processing",error:"baseui-attachment-error",done:"baseui-attachment-done"},An={default:"baseui-attachment-default",sm:"baseui-attachment-sm",xs:"baseui-attachment-xs"},ma={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Mo=class extends n{get state(){return wn[this.props.state]?this.props.state:"done"}get size(){return An[this.props.size]?this.props.size:"default"}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){let e=["baseui-attachment",wn[this.state],An[this.size],`baseui-attachment-${this.orientation}`];return this.hasContent||e.push("baseui-attachment-picker"),this.props.className&&e.push(this.props.className),e.join(" ")}get hasContent(){return!!this.props.slots?.default}onChange(e){this.props.onChange?.([...e.target.files])}};o(Mo,"template","baseui.Attachment"),o(Mo,"props",{state:{type:String,optional:!0},size:{type:String,optional:!0},orientation:{type:String,optional:!0},multiple:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});zo=class extends n{get variant(){return this.props.variant==="image"?"image":"icon"}get classNames(){let e=["baseui-attachment-media",`baseui-attachment-media-${this.variant}`];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(zo,"template","baseui.AttachmentMedia"),o(zo,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Po=class extends n{};o(Po,"template","baseui.AttachmentContent"),o(Po,"props",ma);Fo=class extends n{};o(Fo,"template","baseui.AttachmentTitle"),o(Fo,"props",ma);Do=class extends n{};o(Do,"template","baseui.AttachmentDescription"),o(Do,"props",ma);_o=class extends n{};o(_o,"template","baseui.AttachmentActions"),o(_o,"props",ma);Ho=class extends n{get classNames(){let e=this.props.size||"icon-xs",s=["btn","baseui-button",P[this.props.variant]||P.ghost,M[e]||M["icon-xs"],"baseui-button-icon","baseui-attachment-action"];return this.props.className&&s.push(this.props.className),s.join(" ")}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};o(Ho,"template","baseui.AttachmentAction"),o(Ho,"props",{type:{type:String,optional:!0},variant:{type:String,optional:!0},size:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},label:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}});Wo=class extends n{get classNames(){let e=["baseui-attachment-trigger"];return this.props.className&&e.push(this.props.className),e.join(" ")}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};o(Wo,"template","baseui.AttachmentTrigger"),o(Wo,"props",{href:{type:String,optional:!0},target:{type:String,optional:!0},rel:{type:String,optional:!0},type:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},onClick:{type:Function,optional:!0}});Ko=class extends n{get classNames(){let e=["baseui-attachment-group"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Ko,"template","baseui.AttachmentGroup"),o(Ko,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Vo=class extends n{setup(){this.state=f({dragging:!1}),this.fileInput=S("fileInput")}get hasContent(){return!!this.props.slots?.default}get classNames(){let e=["baseui-attachment-dropzone"];return this.state.dragging&&e.push("baseui-attachment-dropzone-dragging"),this.props.disabled&&e.push("baseui-attachment-dropzone-disabled"),this.props.className&&e.push(this.props.className),e.join(" ")}openPicker(){this.props.disabled||this.fileInput.el?.click()}onInputChange(e){let s=Array.from(e.target.files??[]);e.target.value="",s.length&&this.props.onFilesSelected?.(s)}onDragOver(e){e.preventDefault(),!this.props.disabled&&(this.state.dragging=!0)}onDragLeave(){this.state.dragging=!1}onDrop(e){if(e.preventDefault(),this.state.dragging=!1,this.props.disabled)return;let s=Array.from(e.dataTransfer?.files??[]);s.length&&this.props.onFilesSelected?.(s)}};o(Vo,"template","baseui.AttachmentDropzone"),o(Vo,"props",{multiple:{type:Boolean,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onFilesSelected:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var Zo,Cn=b(()=>{m();Zo=class extends n{setup(){this.state=f({errored:!1})}get showImage(){return!!this.props.src&&!this.state.errored}onError(){this.state.errored=!0}};o(Zo,"template","baseui.Avatar"),o(Zo,"props",{src:{type:String,optional:!0},alt:{type:String,optional:!0},title:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Xo,Ln=b(()=>{m();Xo=class extends n{get classNames(){let e=["baseui-message"];return this.props.className&&e.push(this.props.className),e.join(" ")}get side(){return this.props.side||"incoming"}};o(Xo,"template","baseui.Message"),o(Xo,"props",{side:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Go,Nn=b(()=>{m();Go=class extends n{setup(){this.rootRef=S("root"),G(()=>{this.props.autoscroll!==!1&&this.rootRef.el&&(this.rootRef.el.scrollTop=this.rootRef.el.scrollHeight)})}};o(Go,"template","baseui.MessageScroller"),o(Go,"props",{autoscroll:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Ga,Yo,Jo,Qo,tr,kn=b(()=>{m();U();Ga={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Yo=class extends n{setup(){this.state=f({index:0}),A({questionnaire:this.state,questionnaireShow:e=>this.show(e)})}show(e){this.state.index=Math.min(this.props.stepCount-1,Math.max(0,e)),this.props.onChange?.(this.state.index)}};o(Yo,"template","baseui.Questionnaire"),o(Yo,"props",{stepCount:{type:Number},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Jo=class extends n{get active(){return this.props.state!==void 0?_(this.props.state):this.env.questionnaire.index===this.props.index}};o(Jo,"template","baseui.QuestionnaireStep"),o(Jo,"props",{index:{type:Number},state:{type:String,optional:!0},...Ga});Qo=class extends n{get disabled(){return this.env.questionnaire.index===0}onClick(){this.env.questionnaireShow(this.env.questionnaire.index-1)}};o(Qo,"template","baseui.QuestionnairePrevious"),o(Qo,"props",Ga);tr=class extends n{onClick(){this.env.questionnaireShow(this.env.questionnaire.index+1)}};o(tr,"template","baseui.QuestionnaireNext"),o(tr,"props",{...Ga,stepCount:{type:Number,optional:!0}})});var er,On=b(()=>{m();U();er=class extends n{get max(){return this.props.max||100}get value(){return Math.min(this.max,Math.max(0,this.props.value||0))}get style(){return J(`--baseui-progress-value:${this.value/this.max*100}%`,this.props.style)}get classNames(){let e=["baseui-progress"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(er,"template","baseui.Progress"),o(er,"props",{value:{type:Number,optional:!0},max:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var sr,jn=b(()=>{m();U();sr=class extends n{get classNames(){let e=["baseui-aspect-ratio"];return this.props.className&&e.push(this.props.className),e.join(" ")}get style(){let e=this.props.ratio||`${this.props.width||16} / ${this.props.height||9}`;return J(`--baseui-aspect-ratio:${e}`,this.props.style)}};o(sr,"template","baseui.AspectRatio"),o(sr,"props",{ratio:{type:String,optional:!0},width:{type:Number,optional:!0},height:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var or,Bn=b(()=>{m();or=class extends n{get classNames(){let e=["baseui-bubble"];return this.props.className&&e.push(this.props.className),e.join(" ")}get side(){return this.props.side}};o(or,"template","baseui.Bubble"),o(or,"props",{side:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var rr,In=b(()=>{m();rr=class extends n{get dir(){return this.props.dir==="rtl"?"rtl":"ltr"}};o(rr,"template","baseui.Direction"),o(rr,"props",{dir:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var ar,Rn=b(()=>{m();ar=class extends n{get classNames(){let e=["baseui-item"];return this.props.className&&e.push(this.props.className),e.join(" ")}get variant(){return this.props.variant}};o(ar,"template","baseui.Item"),o(ar,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var ir,nr,pr,$n=b(()=>{m();ir=class extends n{get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){let e=["baseui-button-group",this.orientation==="vertical"?"btn-group-vertical":"btn-group"];return(this.props.size==="sm"||this.props.size==="lg")&&e.push(`btn-group-${this.props.size}`),this.props.className&&e.push(this.props.className),e.join(" ")}get ariaLabel(){return this.props["aria-label"]}get ariaLabelledby(){return this.props["aria-labelledby"]}};o(ir,"template","baseui.ButtonGroup"),o(ir,"props",{orientation:{type:String,optional:!0},size:{type:String,optional:!0},"aria-label":{type:String,optional:!0},"aria-labelledby":{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});nr=class extends n{get orientation(){return this.props.orientation==="horizontal"?"horizontal":"vertical"}get classNames(){let e=["baseui-button-group-separator",`baseui-button-group-separator-${this.orientation}`];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(nr,"template","baseui.ButtonGroupSeparator"),o(nr,"props",{orientation:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}});pr=class extends n{get classNames(){let e=["baseui-button-group-text"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(pr,"template","baseui.ButtonGroupText"),o(pr,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var lr,cr,Et,Ct,ur,Lt,dr,Nt,br,kt,Ya=b(()=>{m();U();lr=class extends n{get classNames(){return W("baseui-field-set",this.props.className)}};o(lr,"template","baseui.FieldSet"),o(lr,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});cr=class extends n{get variant(){return this.props.variant||"legend"}get classNames(){return W("baseui-field-legend",this.props.className)}};o(cr,"template","baseui.FieldLegend"),o(cr,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Et=class extends n{get classNames(){return W("baseui-field-group",this.props.className)}};o(Et,"template","baseui.FieldGroup"),o(Et,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ct=class extends n{get orientation(){return this.props.orientation||"vertical"}get classNames(){return W("baseui-field",`baseui-field-orientation-${this.orientation}`,this.props.className)}};o(Ct,"template","baseui.Field"),o(Ct,"props",{orientation:{type:String,optional:!0},invalid:{type:Boolean,optional:!0},label:{type:String,optional:!0},error:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ur=class extends n{get classNames(){return W("baseui-field-content",this.props.className)}};o(ur,"template","baseui.FieldContent"),o(ur,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Lt=class extends n{get classNames(){return W("baseui-field-label",this.props.className)}};o(Lt,"template","baseui.FieldLabel"),o(Lt,"props",{for:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});dr=class extends n{get classNames(){return W("baseui-field-title",this.props.className)}};o(dr,"template","baseui.FieldTitle"),o(dr,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Nt=class extends n{get classNames(){return W("baseui-field-description",this.props.className)}};o(Nt,"template","baseui.FieldDescription"),o(Nt,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});br=class extends n{get hasContent(){return!!this.props.slots?.default}get classNames(){return W("baseui-field-separator",this.props.className)}};o(br,"template","baseui.FieldSeparator"),o(br,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});kt=class extends n{get classNames(){return W("baseui-field-error",this.props.className)}};o(kt,"template","baseui.FieldError"),o(kt,"props",{message:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});function Ja(t){return`Icon${String(t).split("-").filter(Boolean).map(s=>s[0].toUpperCase()+s.slice(1)).join("")}`}var Tn=b(()=>{});var hr,Un=b(()=>{m();hr=class extends n{get classNames(){let e=["form-label","b-label","baseui-label"];return this.props.className&&e.push(this.props.className),e.join(" ")}get state(){return this.props.state||(this.props.required?"required":void 0)}};o(hr,"template","baseui.Label"),o(hr,"props",{for:{type:String,optional:!0},required:{type:Boolean,optional:!0},state:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});function Qa(t){return t==="dark"?"dark":"light"}function Al(t){return typeof globalThis.location>"u"?null:new URLSearchParams(globalThis.location.search).get(t)}function El(t,e=document.documentElement){let s=Qa(t);return globalThis.BaseUI?.theme?.set?globalThis.BaseUI.theme.set(s):e&&(e.setAttribute("b-theme",s),e.setAttribute("data-bs-theme",s)),s}function qn(t,e,s){try{t.contentWindow?.BaseUI?.theme.set(e),t.contentDocument?.documentElement.setAttribute("b-theme",e),t.contentDocument?.documentElement.setAttribute("data-bs-theme",e)}catch{let r=new URL(t.getAttribute("src"),globalThis.location.href);r.searchParams.set(s,e),t.setAttribute("src",r.pathname+r.search+r.hash)}}function Cl(t){typeof document>"u"||typeof CustomEvent>"u"||document.dispatchEvent(new CustomEvent("baseui:theme-change",{detail:{theme:t}}))}function Vt(t={}){let e=t.storageKey||vl,s=t.queryKey||Sl,r=t.toggleSelector??xl,i=t.labelSelector??wl,a=t.root||(typeof document>"u"?null:document.documentElement);function p(){return Al(s)}function l(){return Qa(p()||globalThis.localStorage?.getItem(e)||a?.getAttribute("b-theme")||"light")}function u(w){typeof document>"u"||!r||document.querySelectorAll(r).forEach(j=>{j.setAttribute("aria-pressed",w==="dark"?"true":"false");let C=i?j.querySelector(i):null;C&&(C.textContent=w==="dark"?"Light theme":"Dark theme")})}function d(w){typeof document>"u"||document.querySelectorAll("iframe").forEach(j=>qn(j,w,s))}function h(w,j={}){let C=El(w,a);return!j.skipStorage&&!p()&&globalThis.localStorage?.setItem(e,C),u(C),d(C),Cl(C),C}function g(){return h(a?.getAttribute("b-theme")==="dark"?"light":"dark")}function v(){if(typeof document>"u")return l();let w=l();return h(w,{skipStorage:!!p()}),r&&document.addEventListener("click",j=>{j.target.closest?.(r)&&g()}),document.querySelectorAll("iframe").forEach(j=>{j.addEventListener("load",()=>qn(j,a?.getAttribute("b-theme")||w,s))}),w}return{current:l,set:h,toggle:g,syncFrames:d,init:v}}var vl,Sl,xl,wl,Mn,Zr=b(()=>{vl="baseui-theme",Sl="theme",xl="[b-theme-toggle]",wl="[b-theme-label]";Mn=Vt();typeof window<"u"&&(window.BaseUITheme=Mn)});function Mr(t){let e=t==="dark";return{icon:e?"sun":"moon",label:e?"Switch to light theme":"Switch to dark theme",pressed:e?"true":"false"}}function ga({variant:t="outline",size:e,className:s}={}){let r=["btn","baseui-theme-button",P[t]||P.outline];return M[e]&&r.push(M[e]),s&&r.push(s),r.join(" ")}var zn,ti=b(()=>{te();zn=["btn","baseui-theme-button",...Object.values(P),...Object.values(M)]});var nt,ei=b(()=>{m();Zr();Y();U();ti();nt=class extends n{setup(){this.theme=Vt({storageKey:Z(this.props,"storage-key","storageKey")}),this.state=f({theme:this.theme.current()}),this.onThemeChange=e=>{this.state.theme=e.detail?.theme||this.theme.current()},k(()=>{this.state.theme=this.theme.set(this.theme.current(),{skipStorage:!0}),document.addEventListener("baseui:theme-change",this.onThemeChange)}),O(()=>document.removeEventListener("baseui:theme-change",this.onThemeChange))}get iconName(){return Mr(this.state.theme).icon}get baseUrl(){return Z(this.props,"base-url")}get label(){return Mr(this.state.theme).label}get pressed(){return Mr(this.state.theme).pressed}get classNames(){return ga(this.props)}onClick(){let e=this.theme.toggle();this.state.theme=e,this.props.onChange?.(e)}};o(nt,"template","baseui.ThemeButton"),o(nt,"components",{Icon:N}),o(nt,"props",{variant:{type:String,optional:!0},size:{type:String,optional:!0},"base-url":{type:String,optional:!0},"storage-key":{type:String,optional:!0},storageKey:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0}})});var mr,Pn=b(()=>{m();U();mr=class extends n{get classNames(){let e=["baseui-toggle","btn",this.props.variant==="outline"?"btn-outline-secondary":"btn-light"];return this.props.className&&e.push(this.props.className),e.join(" ")}get pressed(){return this.props.state!==void 0?_(this.props.state):!!this.props.pressed}onClick(){this.props.onChange?.(!this.pressed)}};o(mr,"template","baseui.Toggle"),o(mr,"props",{pressed:{type:Boolean,optional:!0},state:{type:String,optional:!0},variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var Ll,gr,fr,Fn=b(()=>{m();Ll={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},gr=class extends n{setup(){this.state=f({selected:new Set}),A({toggleGroup:this.state,toggleGroupSelect:e=>this.select(e)})}select(e){this.props.multiple?this.state.selected.has(e)?this.state.selected.delete(e):this.state.selected.add(e):this.state.selected=this.state.selected.has(e)?new Set:new Set([e]);let s=this.props.multiple?[...this.state.selected]:[...this.state.selected][0];this.props.onChange?.(s)}};o(gr,"template","baseui.ToggleGroup"),o(gr,"props",{multiple:{type:Boolean,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});fr=class extends n{get pressed(){return this.env.toggleGroup.selected.has(this.props.value)}onClick(){this.env.toggleGroupSelect(this.props.value)}};o(fr,"template","baseui.ToggleGroupItem"),o(fr,"props",{value:{type:String},...Ll})});var Xn={};Ca(Xn,{destroyBaseUiPreviews:()=>zr,enhanceMarkdownDiagrams:()=>Gr,expandSelfClosingTags:()=>Zl,extractTagCaseMap:()=>Rl,mountMarkdownEditor:()=>Yr,normalizeOwlPreviewMarkup:()=>Gl,parseMarkdown:()=>Xr,primeBaseUiTemplates:()=>Yl,renderBaseUiBlocks:()=>Zn,renderMermaidBlocks:()=>Kn});function kl(){return si??(si=import("./runtime/marked/marked.min.js").then(t=>{let e=t.marked||t.default?.marked||globalThis.marked;if(!e?.parse)throw new Error("BaseUI markdown: failed to load src/runtime/marked/marked.min.js");return e})),si}function Ol(){return oi??(oi=import("./runtime/mermaid/mermaid.esm.min.mjs").then(t=>{let e=t.default||t;return e.initialize({startOnLoad:!1,securityLevel:"strict"}),e})),oi}function jl(){return ri??(ri=import("./runtime/milkdown/milkdown-editor.js")),ri}async function Xr(t,e={}){return(await kl()).parse(String(t??""),{gfm:!0,breaks:!1,...e})}function ii(t,e,s,r=""){t.classList.add("baseui-markdown-diagram-error"),t.replaceChildren();let i=document.createElement("p");if(i.className="baseui-markdown-diagram-error-message",i.textContent=`Unable to render ${e} diagram: ${s?.message||s}`,t.append(i),r){let a=document.createElement("pre"),p=document.createElement("code");p.textContent=r,a.append(p),t.append(a)}}async function Kn(t){let e=[...t.querySelectorAll("pre > code.language-mermaid")];if(!e.length)return;let s;try{s=await Ol()}catch(r){e.forEach(i=>{let a=i.closest("pre");a.replaceChildren(),a.className="baseui-markdown-diagram baseui-markdown-mermaid",ii(a,"mermaid",r,i.textContent)});return}for(let r of e){let i=r.textContent,a=r.closest("pre");a.replaceChildren(),a.className="baseui-markdown-diagram baseui-markdown-mermaid";try{let{svg:p}=await s.render(`baseui-mermaid-${++Nl}`,i);a.innerHTML=p}catch(p){ii(a,"mermaid",p,i)}}}function Bl(t){let e=globalThis.BaseUI;if(!e?.mountAll)return;let s=document.createElement("div");s.setAttribute("b-ui","toast"),s.setAttribute("b-att-state","open"),s.setAttribute("b-att-delay","2000"),s.className="baseui-markdown-baseui-copy-toast",s.textContent=t,document.body.append(s),e.mountAll(s),s.addEventListener("baseui:close",()=>s.remove(),{once:!0})}function Il(t){let e=document.createElement("div");e.className="baseui-markdown-baseui-code";let s=document.createElement("button");s.type="button",s.className="baseui-markdown-baseui-copy";let r=document.createElement("span");z(r,"copy",{label:"Copy code"}),s.append(r),s.addEventListener("click",async()=>{try{await Br(t),s.dispatchEvent(new CustomEvent("baseui:markdown-copy",{bubbles:!0,detail:{source:t}})),Bl("Copied to clipboard")}catch(p){s.dispatchEvent(new CustomEvent("baseui:markdown-copy-error",{bubbles:!0,detail:{error:p}}))}}),e.append(s);let i=document.createElement("pre"),a=document.createElement("code");a.className="baseui-markdown-baseui-code-lines";for(let p of t.replace(/\n$/,"").split(`
11
- `)){let l=document.createElement("span");l.className="baseui-markdown-baseui-code-line",l.textContent=p,a.append(l)}return i.append(a),e.append(i),e}function Dn(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Rl(t){let e=new Map;for(let s of t.matchAll(/<\/?([A-Z][A-Za-z0-9]*)\b/g))e.set(s[1].toLowerCase(),s[1]);return e}function $l(t){return e=>{if(e.hasAttribute("b-ui"))return e;let s=globalThis.BaseUI,r=t.get(e.localName)||e.localName,i=Dn(r),a=!!s?.component?.(i),p=I(e.getAttribute("className")||e.getAttribute("class"));if(!a){let l=`baseui-${i}`;return e.className=p?`${l} ${p}`:l,e}e.setAttribute("b-ui",i),p&&(e.className=p);for(let l of[...e.attributes]){if(l.name==="class"||l.name==="className"||l.name==="b-ui"||/^on[A-Z]/.test(l.name))continue;let u=I(l.value);e.removeAttribute(l.name),!(u===""||u==="false")&&e.setAttribute(`b-att-${Dn(l.name)}`,u==="true"?"true":u)}return e}}function I(t){if(!t)return"";let e=t.trim();return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function ya(t,e){for(;t.firstChild;)e.append(t.firstChild)}function tt(t,e){return ya(t,e),t.replaceWith(e),e}function Tl(t){let e=document.createElement("div");e.setAttribute("b-field-group","");let s=I(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),tt(t,e)}function Ul(t){let e=document.createElement("div");e.setAttribute("b-ui","field");let s=I(t.getAttribute("orientation")||""),r=I(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("b-att-orientation",s),r&&(e.className=r),tt(t,e)}function ql(t){let e=document.createElement("label");e.setAttribute("b-field-label","");let s=I(t.getAttribute("for")||""),r=I(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("for",s),r&&(e.className=r),tt(t,e)}function _n(t,e,s){let r=document.createElement(e);r.setAttribute(s,"");let i=I(t.getAttribute("className")||t.getAttribute("class"));return i&&(r.className=i),tt(t,r)}function Ml(t){let e=t.getAttribute("type")||"",s=t.hasAttribute("variant")||t.hasAttribute("size")||t.hasAttribute("className")||t.hasAttribute("onClick")||t.hasAttribute("label")||e.trim().startsWith("'")||e.trim().startsWith('"');if(t.hasAttribute("b-ui")||!s)return t;let r=document.createElement("button");r.setAttribute("b-ui","button");let i=I(e||"button"),a=I(t.getAttribute("variant")||""),p=I(t.getAttribute("size")||""),l=I(t.getAttribute("className")||t.getAttribute("class")),u=I(t.getAttribute("label")||"");return r.type=i||"button",a&&r.setAttribute("b-att-variant",a),p&&r.setAttribute("b-att-size",p),l&&(r.className=l),u&&!t.childNodes.length&&(r.textContent=u),tt(t,r)}function zl(t){if(t.hasAttribute("b-ui")||t.hasAttribute("b-icon"))return t;let e=I(t.getAttribute("name")||t.getAttribute("icon")||"");if(!e)return t;let s=document.createElement("span");s.setAttribute("b-ui","icon"),s.setAttribute("b-att-icon",e);let r=I(t.getAttribute("size")||""),i=I(t.getAttribute("label")||""),a=I(t.getAttribute("className")||t.getAttribute("class"));return r&&s.setAttribute("b-att-size",r),i&&s.setAttribute("b-att-label",i),a&&(s.className=a),tt(t,s)}function Pl(t){if(t.hasAttribute("b-ui"))return t;let e=document.createElement("div");e.setAttribute("b-ui","alert");let s=I(t.getAttribute("variant")||""),r=I(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("b-att-variant",s),r&&(e.className=r),tt(t,e)}function ai(t){return e=>{if(e.hasAttribute("b-ui"))return e;let s=document.createElement("div"),r=I(e.getAttribute("className")||e.getAttribute("class"));return s.className=r?`${t} ${r}`:t,tt(e,s)}}function Fl(t){if(t.hasAttribute("b-ui"))return t;let e=document.createElement("div");e.setAttribute("b-ui","accordion"),I(t.getAttribute("multiple"))==="true"&&e.setAttribute("b-att-multiple","true");let s=I(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),tt(t,e)}function Dl(t){if(t.hasAttribute("b-accordion-item"))return t;let e=document.createElement("div");e.setAttribute("b-accordion-item",""),I(t.getAttribute("state"))==="open"&&e.setAttribute("b-att-state","open");let s=I(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),tt(t,e)}function _l(t){if(t.hasAttribute("b-accordion-trigger"))return t;let e=document.createElement("button");e.type="button",e.setAttribute("b-accordion-trigger","");let s=I(t.getAttribute("className")||t.getAttribute("class"));s&&(e.className=s),ya(t,e);let r=document.createElement("span");return r.setAttribute("b-icon","chevron-down"),r.className="baseui-accordion-trigger-icon",e.append(r),t.replaceWith(e),e}function Hl(t){if(t.hasAttribute("b-accordion-panel"))return t;let e=document.createElement("div");e.setAttribute("b-accordion-panel","");let s=I(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),tt(t,e)}function Wl(t){return Hn+=1,`${t}-${Hn}`}function Q(t,e,s){return r=>{if(r.hasAttribute("b-ui"))return r;let i=document.createElement(t);t==="button"&&(i.type="button"),s&&i.setAttribute(s,"");let a=I(r.getAttribute("className")||r.getAttribute("class"));return i.className=a?`${e} ${a}`:e,tt(r,i)}}function Kl(){let t=document.createElement("button");t.type="button",t.className="btn baseui-button btn-light btn-icon-sm baseui-dialog-close baseui-dialog-close-control",t.setAttribute("b-dialog-close",""),t.setAttribute("aria-label","Close");let e=document.createElement("span");e.setAttribute("b-ui","icon"),e.setAttribute("b-att-icon","x");let s=document.createElement("span");return s.className="visually-hidden",s.textContent="Close",t.append(e,s),t}function Wn({tagPrefix:t,componentName:e,triggerTag:s,triggerClassName:r,panelClassName:i,closeButton:a}){return p=>{if(p.hasAttribute("b-ui"))return p;let l=p.querySelector(`:scope > ${t}trigger`),u=p.querySelector(`:scope > ${t}content`);if(!u)return p;let d=Wl(`baseui-preview-${e}`),h=document.createElement(s);s==="button"&&(h.type="button"),h.className=r,h.setAttribute("b-att-trigger",`#${d}`),l&&ya(l,h);let g=document.createElement("div");g.setAttribute("b-ui",e),g.id=d,g.setAttribute("b-att-trigger",`[b-att-trigger='#${d}']`);let v=document.createElement("div");v.className=i;let w=I(u.getAttribute("size")||"");return w&&v.setAttribute("data-size",w),ya(u,v),a&&v.append(a()),g.append(v),p.before(h,g),p.remove(),g}}function Zl(t){return t.replace(/<([a-zA-Z][a-zA-Z0-9-]*)((?:"[^"]*"|'[^']*'|[^"'>])*?)\/>/g,(e,s,r)=>Vl.has(s.toLowerCase())?e:`<${s}${r}></${s}>`)}function Xl(t){t.querySelectorAll("t[t-esc]").forEach(e=>{let r=e.getAttribute("t-esc")?.includes(".length")?"0":"";e.replaceWith(document.createTextNode(`${r}${e.textContent||""}`))})}function Gl(t,e){Xl(t);let s={fieldgroup:Tl,field:Ul,fieldlabel:ql,fielddescription:i=>_n(i,"p","b-field-description"),fielderror:i=>_n(i,"p","b-field-error"),button:Ml,icon:zl,alert:Pl,alerttitle:ai("baseui-alert-title"),alertdescription:ai("baseui-alert-description"),alertaction:ai("baseui-alert-action"),accordion:Fl,accordionitem:Dl,accordiontrigger:_l,accordioncontent:Hl,dialog:Wn({tagPrefix:"dialog",componentName:"dialog",triggerTag:"span",triggerClassName:"baseui-dialog-trigger",panelClassName:"baseui-dialog-panel",closeButton:Kl}),dialogheader:Q("div","baseui-dialog-header"),dialogfooter:Q("div","baseui-dialog-footer"),dialogtitle:Q("h2","baseui-dialog-title"),dialogdescription:Q("p","baseui-dialog-description"),dialogclose:Q("button","btn baseui-button btn-outline-secondary baseui-dialog-close","b-dialog-close"),alertdialog:Wn({tagPrefix:"alertdialog",componentName:"alert-dialog",triggerTag:"button",triggerClassName:"btn baseui-button btn-outline-secondary baseui-alert-dialog-trigger",panelClassName:"baseui-dialog-panel baseui-alert-dialog-panel"}),alertdialogheader:Q("div","baseui-dialog-header baseui-alert-dialog-header"),alertdialogfooter:Q("div","baseui-dialog-footer baseui-alert-dialog-footer"),alertdialogmedia:Q("div","baseui-alert-dialog-media"),alertdialogtitle:Q("h2","baseui-dialog-title baseui-alert-dialog-title"),alertdialogdescription:Q("p","baseui-dialog-description baseui-alert-dialog-description"),alertdialogcancel:Q("button","btn baseui-button btn-outline-secondary baseui-alert-dialog-cancel","b-alert-dialog-cancel"),alertdialogaction:Q("button","btn baseui-button btn-primary baseui-alert-dialog-action","b-alert-dialog-action")},r=$l(e);for(let i of[...t.querySelectorAll("*")]){let a=i.localName.toLowerCase();s[a]?s[a](i):e.has(a)&&r(i)}}function Yl(t){fa=Promise.resolve(t)}function Jl(){return fa??(fa=Hr("/dist/baseui.templates.xml")),fa}function zr(t){let e=ni.get(t);if(e){ni.delete(t);for(let s of e)try{s.destroy()}catch{}}}function tc(t){return new Set([...t.matchAll(Ql)].map(e=>e[1]))}function oc(t){let e=new Set;for(let s of t.matchAll(ec))e.add(s[1]);for(let s of t.matchAll(sc))e.add(s[2]);return e}function rc(t){let e=xi({raw:[t]}),s=tc(t);class r extends n{setup(){this.state=f(Object.fromEntries([...s].map(a=>[a,""])))}}o(r,"template",e);for(let i of oc(t))r.prototype[i]=function(){};return r}function Vn(t){t.querySelector("[data-slot='dropdown-menu'], .baseui-dropdown-menu, [b-ui='dropdown-menu'], [b-dropdown-menu]")&&t.classList.add("baseui-markdown-baseui-preview-overlay")}async function ac(t,e){let[s,r]=await Promise.all([Jl(),rc(e)]),i=await oa(r,t,{templates:s});return Vn(t),i}function ic(t,e){let s=globalThis.BaseUI;if(!s?.mountAll)throw new Error("BaseUI runtime not found on the page \u2014 load dist/baseui.min.js before mounting Markdown.");t.innerHTML=e,Vn(t),s.mountAll(t)}async function Zn(t){zr(t);let e=[...t.querySelectorAll("pre > code.language-base-ui")];if(!e.length)return;let s=new Set;for(let r of e){let i=r.textContent,a=r.closest("pre");a.replaceChildren(),a.className="baseui-markdown-live baseui-markdown-baseui";let p=document.createElement("div");p.className="baseui-markdown-baseui-preview",a.append(p,Il(i));try{/<[A-Z]/.test(i)?s.add(await ac(p,i)):ic(p,i)}catch(l){ii(a,"BaseUI component",l,i)}}s.size&&ni.set(t,s)}async function Gr(t,{mermaid:e=!0,baseUi:s=!0}={}){e&&await Kn(t),s&&await Zn(t)}async function Yr(t){return(await jl()).createMilkdownMarkdownEditor(t)}var si,oi,ri,Nl,Hn,Vl,fa,ni,Ql,ec,sc,va=b(()=>{m();st();na();Nl=0;Hn=0;Vl=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);ni=new WeakMap;Ql=/\bstate\.([A-Za-z_$][\w$]*)/g;ec=/\bthis\.([A-Za-z_$][\w$]*)\s*\(/g,sc=/\bt-on-[\w:-]+\s*=\s*(["'])([A-Za-z_$][\w$]*)\1/g});function Sa(t){let e=String(t??""),s=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e);if(!s)return{data:{},content:e};let r={};for(let i of s[1].split(/\r?\n/)){let a=i.trim();if(!a||a.startsWith("#"))continue;let p=a.indexOf(":");if(p===-1)continue;let l=a.slice(0,p).trim();l&&(r[l]=nc(a.slice(p+1).trim()))}return{data:r,content:e.slice(s[0].length)}}function Gn(t){return t.length>=2&&(t[0]==='"'&&t.at(-1)==='"'||t[0]==="'"&&t.at(-1)==="'")?t.slice(1,-1):t}function nc(t){if(t==="")return"";if(t==="true")return!0;if(t==="false")return!1;if(/^-?\d+(\.\d+)?$/.test(t))return Number(t);if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1).trim();return e?e.split(",").map(s=>Gn(s.trim())):[]}return Gn(t)}var pi=b(()=>{});var Zt,Yn=b(()=>{m();Ta();va();pi();Zt=class extends n{setup(){this.rootRef=S("root"),this.editorRef=S("editor"),this.editorHandle=null,this.state=f({html:"",source:"",status:"loading",error:"",frontmatter:{}}),Qt(()=>this.load(this.props)),R(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),k(()=>this.afterRender()),D(()=>this.afterRender()),Wr(()=>{this.destroyEditor(),this.rootRef.el&&zr(this.rootRef.el)})}get classNames(){let e=["baseui-markdown"];return this.props.className&&e.push(this.props.className),e.join(" ")}get editorLabel(){return this.props.collaborative?"Collaborative Markdown editor":"Markdown editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.editable!==this.props.editable||e.collaborative!==this.props.collaborative||e.room!==this.props.room||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);s=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}try{this.state.source=s;let{data:r,content:i}=Sa(s);this.state.frontmatter=r,this.state.html=ka(await Xr(i)),this.state.status="ready"}catch(r){this.state.status="error",this.state.error=r.message||String(r)}}get hasFrontmatterMeta(){let e=this.state.frontmatter;return!!(e.tags?.length||e.authors?.length)}enhance(){let e=this.rootRef.el;!e||this.state.status!=="ready"||Gr(e,{mermaid:this.props.mermaid!==!1,baseUi:this.props.baseUi!==!1})}afterRender(){this.props.editable?this.mountEditor():this.enhance()}async mountEditor(){let e=this.editorRef.el;if(!(!e||this.editorHandle||this.state.status!=="ready"))try{this.editorHandle=await Yr({root:e,value:this.state.source,collaborative:!!this.props.collaborative,room:this.props.room||"baseui-markdown",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(s,r,i)=>{this.state.source=s,this.props.onChange?.(s,r,i)}})}catch(s){this.state.status="error",this.state.error=s.message||String(s)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};o(Zt,"template","baseui.Markdown"),o(Zt,"components",{Badge:pt}),o(Zt,"props",{content:{type:String,optional:!0},src:{type:String,optional:!0},mermaid:{type:Boolean,optional:!0},baseUi:{type:Boolean,optional:!0},editable:{type:Boolean,optional:!0},collaborative:{type:Boolean,optional:!0},room:{type:String,optional:!0},password:{type:String,optional:!0},signaling:{type:Array,optional:!0},user:{type:Object,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});function xa(t,e){if(!t)return null;if(t.type==="file"&&(t.path===e||t.meta?.slug===e))return t;for(let s of t.children||[]){let r=xa(s,e);if(r)return r}return null}function pc(t){return t.replace(/\.[^./]+$/,"").replace(/[_-]+/g," ").trim().split(/\s+/).map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}var Pr,Fr,Xt,Jn=b(()=>{m();Y();ha();Wa();Pr=class Pr extends n{get label(){let e=this.props.node.meta;return e?.sidebar_label||e?.title||pc(this.props.node.name)}get hasSubfolders(){return(this.props.node.children||[]).some(e=>e.type==="dir")}select(e){this.props.onSelect(e)}};o(Pr,"template","baseui.MarkdownTreeNode"),o(Pr,"components",{MarkdownTreeNode:Pr,Icon:N,SidebarGroupLabel:wt,SidebarMenu:it,SidebarMenuItem:At,SidebarMenuButton:rt,DropdownMenu:bt,DropdownMenuTrigger:ht,DropdownMenuContent:mt,DropdownMenuItem:gt,DropdownMenuSub:ft,DropdownMenuSubTrigger:ot,DropdownMenuSubContent:yt}),o(Pr,"props",{node:{type:Object},activePath:{type:String,optional:!0},onSelect:{type:Function},nested:{type:Boolean,optional:!0}});Fr=Pr,Xt=class extends n{setup(){this.state=f({tree:null,status:"loading",error:""}),Qt(()=>this.load())}async load(){this.state.status="loading",this.state.error="";try{let e=await fetch(this.props.src);if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);this.state.tree=await e.json(),this.state.status="ready"}catch(e){this.state.status="error",this.state.error=e.message||String(e)}}};o(Xt,"template","baseui.MarkdownTree"),o(Xt,"components",{MarkdownTreeNode:Fr,SidebarGroup:xt,SidebarMenu:it}),o(Xt,"props",{src:{type:String},activePath:{type:String,optional:!0},onSelect:{type:Function},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});function Qn(t=document.querySelector("[b-block-code-template]")){let r=((t?.tagName==="SCRIPT"?t.textContent:t?.innerHTML)?.replace(/^\n/,"").replace(/\s+$/,"")||"").split(`
10
+ var mi=Object.defineProperty;var Ep=(t,e,s)=>e in t?mi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var b=(t,e,s)=>()=>{if(s)throw s[0];try{return t&&(e=t(t=0)),e}catch(r){throw s=[r],r}};var La=(t,e)=>{for(var s in e)mi(t,s,{get:e[s],enumerable:!0})};var o=(t,e,s)=>Ep(t,typeof e!="symbol"?e+"":e,s);function Np(t){return typeof t=="string"?document.querySelector(t):t instanceof Element?t:null}function ka(t,e,s={}){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:s}))}function kp(t,e={}){return t.hasAttribute("b-icon")?"icon":e.name||t.getAttribute("b-ui")}function Op(t,e){return e===document||e===t||e.contains(t)}function jp(t,e={}){return!e.allowBootstrapControl&&t.matches(Lp)}function fi(t){return c.version=t,c}function gi(){if(typeof MutationObserver>"u")return;let t=new MutationObserver(e=>{for(let s of e)for(let r of s.addedNodes)r instanceof Element&&c.mountAll(r)});return t.observe(document.documentElement,{childList:!0,subtree:!0}),t}function yi(){typeof document>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{c.mountAll(),gi()},{once:!0}):(c.mountAll(),gi()))}var Cp,Na,_r,ta,Lp,Bp,c,y=b(()=>{Cp="__BASEUI_VERSION__",Na=new Map,_r=new WeakMap,ta="[b-ui], [b-icon]",Lp="[data-bs-toggle], [data-bs-target], [data-bs-dismiss]";Bp=typeof window<"u"?window.BaseUI:void 0,c=Bp||{version:Cp,register(t,e){if(!t||!e)throw new Error("BaseUI.register requires a name and component definition.");return Na.set(t,e),this},component(t){return Na.get(t)},mount(t,e={}){let s=Np(t);if(!s||jp(s,e))return null;let r=kp(s,e),i=Na.get(r);if(!i)return null;let a=_r.get(s);if(a?.name===r)return a;a&&(a.destroy?.(),_r.delete(s),ka(s,"baseui:destroyed",{name:a.name}));let p=i.mount?.(s,this,e)||{},l={name:r,element:s,destroy:p.destroy};return _r.set(s,l),ka(s,"baseui:mounted",{name:r,instance:l}),l},mountAll(t=document){let e=t||document,s=[...e.querySelectorAll?.(ta)||[]];return e instanceof Element&&e.matches(ta)&&s.unshift(e),s.map(r=>this.mount(r)).filter(Boolean)},destroy(t=document){let e=t||document,s=[...e.querySelectorAll?.(ta)||[]];e instanceof Element&&e.matches(ta)&&s.unshift(e);for(let r of s){let i=_r.get(r);i&&Op(r,e)&&(i.destroy?.(),_r.delete(r),ka(r,"baseui:destroyed",{name:i.name}))}},theme:{set(t){let e=document.documentElement;if(typeof t=="string"){e.setAttribute("b-theme",t),e.dataset.bsTheme=t;return}for(let[s,r]of Object.entries(t||{})){let i=s==="radius"||s==="--baseui-radius"?"--base-radius":s.startsWith("--")?s:`--baseui-${s}`;e.style.setProperty(i,r)}}}};typeof window<"u"&&(window.BaseUI=c)});var N,Rp,n,$p,Tp,Up,qp,Mp,zp,Hr,Pp,Oa,ja,Dp,O,F,Fp,Wr,_p,Hp,Qt,j,R,Wp,Kp,Vp,A,Zp,G,Xp,Or,S,g,Gp,Yp,Jp,Qp,ea,Ba=b(()=>{N=globalThis.owl;if(!N)throw new Error("BaseUI: load dist/baseui.min.js or dist/baseui.esm.js before this script (globalThis.owl is not set).");Rp=N.App,n=N.Component,$p=N.EventBus,Tp=N.OwlError,Up=N.__info__,qp=N.batched,Mp=N.blockDom,zp=N.htmlEscape,Hr=N.loadFile,Pp=N.markRaw,Oa=N.markup,ja=N.mount,Dp=N.onError,O=N.onMounted,F=N.onPatched,Fp=N.onRendered,Wr=N.onWillDestroy,_p=N.onWillPatch,Hp=N.onWillRender,Qt=N.onWillStart,j=N.onWillUnmount,R=N.onWillUpdateProps,Wp=N.reactive,Kp=N.status,Vp=N.toRaw,A=N.useChildSubEnv,Zp=N.useComponent,G=N.useEffect,Xp=N.useEnv,Or=N.useExternalListener,S=N.useRef,g=N.useState,Gp=N.useSubEnv,Yp=N.validate,Jp=N.validateType,Qp=N.whenReady,ea=N.xml});function sa(t){Object.assign(Si,t)}function xi(t){return typeof t!="string"||!/\st-(att|attf|model)([.\s=-]|$)/.test(t)?t:t.replace(/<([A-Z][\w.:-]*)(\s[^<>]*?)?(\/?)>/g,(e,s,r="",i="")=>`<${s}${tl(s,r)}${i}>`)}function tl(t,e){let s=/\st-(att|attf|model|on)([.\s=-]|$)/.test(e),r=e.replace(/(\s)t-att\s*=/g,"$1t-props=").replace(/(\s)t-att-([A-Za-z_][\w:.-]*)\s*=/g,"$1$2=").replace(/(\s)t-attf-([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(i,a,p,l,u)=>`${a}${p}=${l}${rl(u)}${l}`);return r=r.replace(/(\s)t-model((?:\.[\w-]+)*)\s*=\s*(["'])(.*?)\3/g,(i,a,p,l,u)=>al(t,a,p,l,u,r)),s?el(r):r}function el(t){return t.replace(/(\s)([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(e,s,r,i,a)=>r.startsWith("t-")||r==="t-props"||ol(a)?e:`${s}${r}=${i}${sl(a)}${i}`)}function sl(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function ol(t){let e=t.trim();return!e||/^(['"`[{(]|-?\d+(?:\.\d+)?$)/.test(e)||/[?.()[\]+*/]|=>|===|!==|&&|\|\|/.test(e)||/^(true|false|null|undefined)$/.test(e)}function rl(t){return`\`${t.replace(/`/g,"\\`").replace(/{{\s*([\s\S]*?)\s*}}|#\{\s*([\s\S]*?)\s*\}/g,(e,s,r)=>`\${${s||r}}`)}\``}function al(t,e,s,r,i,a){let p=/^(Checkbox|Switch)$/.test(t),l=il(t,s),u=p?"checked":"value",d=new RegExp(`\\s${u}\\s*=`).test(a)?"":`${e}${u}=${r}${i}${r}`,h=new RegExp(`\\s${l}\\s*=`).test(a)?"":`${e}${l}=${r}${nl(i,s,p)}${r}`;return`${d}${h}`}function il(t,e){return e.includes(".lazy")?"onChange":/^(Input|Textarea|InputGroupInput|InputGroupTextarea)$/.test(t)?"onInput":"onChange"}function nl(t,e,s){if(s)return`(value) => { ${t} = value; }`;let r="value";return e.includes(".trim")&&(r=`(typeof ${r} === 'string' ? ${r}.trim() : ${r})`),e.includes(".number")&&(r=`Number.isNaN(Number(${r})) ? ${r} : Number(${r})`),`(value) => { ${t} = ${r}; }`}function wi(t,...e){return Array.isArray(t?.raw)?ea({raw:t.raw.map(xi)},...e):ea(t,...e)}function oa(t,e,s={}){let r=xi(s.templates);return t.components={...Si,...t.components||{}},ja(t,e,r===s.templates?s:{...s,templates:r})}async function fd(t){let e=await(await fetch(t,{cache:"reload"})).text(),r=new DOMParser().parseFromString(e,"application/xml").querySelector("templates > t[t-name]");return r?r.innerHTML:e}var md,gd,Si,m=b(()=>{Ba();Ba();md=ja,gd=ea,Si={}});function W(...t){return t.filter(Boolean).join(" ")}function Z(t,e,s){return t[e]??(s?t[s]:void 0)}function _(t){return t===!0||t==="open"||t==="on"||t==="active"}function J(...t){let e=[];for(let s of t)if(s){if(typeof s=="string"){let r=s.trim().replace(/;$/,"");r&&e.push(r)}else if(typeof s=="object")for(let[r,i]of Object.entries(s)){if(i==null||i==="")continue;let a=r.replace(/[A-Z]/g,p=>"-"+p.toLowerCase());e.push(`${a}:${i}`)}}return e.join(";")}function $(t){return t.state!==void 0?_(t.state):t.open!==void 0?t.open:t["default-open"]!==void 0?t["default-open"]:t.defaultOpen??!1}function T(t){return t.state!==void 0||t.open!==void 0}var U=b(()=>{});function cl(t){return typeof Image>"u"?Promise.resolve(!0):(Ia.has(t)||Ia.set(t,new Promise(e=>{let s=new Image;s.onload=()=>e(!0),s.onerror=()=>e(!1),s.src=t})),Ia.get(t))}function ra(t){return String(t||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Kr(t,e={}){let s=ra(t);if(!ll.test(s))throw new Error(`BaseUI icon name is invalid: ${t}`);return`${String(e.baseUrl||c.icons.lucide.cdnBaseUrl).replace(/\/+$/,"")}/${s}.svg`}function z(t,e,s={}){let r=s.url||Kr(e,s),i=s.label??t.getAttribute("aria-label")??"";t.classList.add("baseui-icon"),t.style.setProperty("--baseui-icon-url",`url("${r.replace(/"/g,"%22")}")`),(s.size||t.getAttribute("b-att-size"))&&t.style.setProperty("--baseui-icon-size",s.size||t.getAttribute("b-att-size")),i?(t.setAttribute("role","img"),t.setAttribute("aria-label",i)):t.setAttribute("aria-hidden","true");let a=s.fallback===!1?null:s.fallback||aa;return a&&!s.url&&ra(e)!==ra(a)&&cl(r).then(p=>{if(p||!t.isConnected)return;let l=Kr(a,s);t.style.setProperty("--baseui-icon-url",`url("${l.replace(/"/g,"%22")}")`)}),t}var Ai,pl,aa,ll,Ia,st=b(()=>{y();Ai="1.31.0",pl=`https://cdn.jsdelivr.net/npm/lucide-static@${Ai}/icons`,aa="file",ll=/^[a-z0-9][a-z0-9-]*$/,Ia=new Map;c.icons={...c.icons||{},lucide:{version:Ai,cdnBaseUrl:pl,normalizeName:ra,url:Kr,render:z}}});function Ra(t){return class extends k{get name(){return Z(this.props,"icon","name")||t}}}var k,Y=b(()=>{m();st();U();k=class extends n{setup(){this.state=g({failed:!1}),G(e=>{if(this.state.failed=!1,typeof Image>"u"||!e||e===aa)return;let s=new Image;return s.onerror=()=>{this.state.failed=!0},s.src=this.buildUrl(e),()=>{s.onload=null,s.onerror=null}},()=>[this.name])}buildUrl(e){return Kr(e,{baseUrl:Z(this.props,"base-url","baseUrl")})}get name(){return Z(this.props,"icon","name")}get url(){return this.buildUrl(this.state.failed?aa:this.name)}get style(){let e=[`--baseui-icon-url:url("${this.url.replace(/"/g,"%22")}")`];return this.props.size&&e.push(`--baseui-icon-size:${this.props.size}`),J(e.join(";"),this.props.style)}get classNames(){let e=["baseui-icon"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(k,"template","baseui.Icon"),o(k,"props",{icon:{type:String,optional:!0},name:{type:String,optional:!0},label:{type:String,optional:!0},title:{type:String,optional:!0},size:{type:String,optional:!0},"base-url":{type:String,optional:!0},baseUrl:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var P,M,te=b(()=>{P={default:"btn-primary",secondary:"btn-secondary",destructive:"btn-danger",outline:"btn-outline-secondary",ghost:"btn-light",link:"btn-link"},M={xs:"btn-xs",sm:"btn-sm",lg:"btn-lg",icon:"btn-icon","icon-xs":"btn-icon-xs","icon-sm":"btn-icon-sm","icon-lg":"btn-icon-lg"}});var K,jr=b(()=>{m();U();Y();te();K=class extends n{get classNames(){let e=["btn","baseui-button",P[this.props.variant]||P.default];return M[this.props.size]&&e.push(M[this.props.size]),this.isIconOnly&&e.push("baseui-button-icon"),this.props.className&&e.push(this.props.className),e.join(" ")}get iconPosition(){return Z(this.props,"icon-position","iconPosition")==="end"?"end":"start"}get ariaLabel(){return Z(this.props,"aria-label","ariaLabel")}get ariaPressed(){return Z(this.props,"aria-pressed","ariaPressed")}get ariaInvalid(){let e=Z(this.props,"aria-invalid","ariaInvalid");return e===!0?"true":e}get isIconOnly(){return!!(this.props.icon&&!this.props.label&&!this.props.slots?.default)}onClick(e){if(this.props.href&&this.props.disabled){e.preventDefault();return}this.props.onClick?.(e)}};o(K,"template","baseui.Button"),o(K,"components",{Icon:k}),o(K,"props",{variant:{type:String,optional:!0},size:{type:String,optional:!0},type:{type:String,optional:!0},href:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},label:{type:String,optional:!0},icon:{type:String,optional:!0},"icon-position":{type:String,optional:!0},iconPosition:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},id:{type:String,optional:!0},title:{type:String,optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},"aria-pressed":{type:String,optional:!0},ariaPressed:{type:String,optional:!0},"aria-invalid":{type:[String,Boolean],optional:!0},ariaInvalid:{type:[String,Boolean],optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});function ia({variant:t="default",size:e,className:s}={}){let r=["btn","baseui-button","baseui-clipboard-button",P[t]||P.default];return M[e]&&r.push(M[e]),s&&r.push(s),r.join(" ")}async function Br(t){let e=String(t??"");if(globalThis.navigator?.clipboard?.writeText)try{await globalThis.navigator.clipboard.writeText(e);return}catch{}if(typeof document>"u")throw new Error("BaseUI ClipboardButton: no clipboard API available in this environment.");let s=document.createElement("textarea");s.value=e,s.setAttribute("readonly",""),s.style.position="fixed",s.style.opacity="0",s.style.pointerEvents="none",document.body.append(s),s.select(),s.setSelectionRange(0,e.length);let r;try{r=document.execCommand("copy")}catch{r=!1}if(s.remove(),!r)throw new Error("BaseUI ClipboardButton: clipboard copy is unavailable in this browser/context.")}var $a,na=b(()=>{te();$a=["btn","baseui-button","baseui-clipboard-button",...Object.values(P),...Object.values(M)]});var jt,Ei=b(()=>{m();U();Y();na();jt=class extends n{setup(){this.state=g({copied:!1}),this.resetTimer=null,j(()=>window.clearTimeout(this.resetTimer))}get classNames(){return ia(this.props)}get resetDelay(){return Z(this.props,"reset-delay","resetDelay")??2e3}get iconName(){return this.state.copied?this.props.copiedIcon||"check":this.props.icon||"copy"}get label(){return this.state.copied&&this.props.copiedLabel?this.props.copiedLabel:this.props.label}get ariaLabel(){return Z(this.props,"aria-label","ariaLabel")||this.label}get isIconOnly(){return!this.props.label&&!this.props.slots?.default}async onClick(e){if(this.props.disabled)return;let s=this.props.getValue?this.props.getValue():this.props.value??"";try{await Br(s),this.state.copied=!0,window.clearTimeout(this.resetTimer),this.resetTimer=window.setTimeout(()=>{this.state.copied=!1},this.resetDelay),this.props.onCopy?.({value:s,event:e})}catch(r){this.props.onCopyError?.({error:r,event:e})}}};o(jt,"template","baseui.ClipboardButton"),o(jt,"components",{Icon:k}),o(jt,"props",{variant:{type:String,optional:!0},size:{type:String,optional:!0},value:{type:String,optional:!0},getValue:{type:Function,optional:!0},label:{type:String,optional:!0},copiedLabel:{type:String,optional:!0},icon:{type:String,optional:!0},copiedIcon:{type:String,optional:!0},"reset-delay":{type:Number,optional:!0},resetDelay:{type:Number,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},onCopy:{type:Function,optional:!0},onCopyError:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var ee,Ta=b(()=>{ee={primary:"baseui-badge-primary",secondary:"baseui-badge-secondary",success:"baseui-badge-success",warning:"baseui-badge-warning",danger:"baseui-badge-danger",info:"baseui-badge-info",muted:"baseui-badge-muted"}});var pt,Ua=b(()=>{m();Ta();pt=class extends n{get classNames(){let e=["badge",ee[this.props.variant]||ee.secondary];return this.props.pill&&e.push("rounded-pill"),this.props.className&&e.push(this.props.className),e.join(" ")}};o(pt,"template","baseui.Badge"),o(pt,"props",{variant:{type:String,optional:!0},pill:{type:Boolean,optional:!0},label:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Ir,lt,se,ct,oe,re,ae,qa=b(()=>{m();Ir={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},lt=class extends n{get tag(){return this.props.tag||"div"}};o(lt,"template","baseui.Card"),o(lt,"props",{...Ir,tag:{type:String,optional:!0}});se=class extends n{};o(se,"template","baseui.CardHeader"),o(se,"props",Ir);ct=class extends n{};o(ct,"template","baseui.CardBody"),o(ct,"props",Ir);oe=class extends n{};o(oe,"template","baseui.CardFooter"),o(oe,"props",Ir);re=class extends n{};o(re,"template","baseui.CardTitle"),o(re,"props",Ir);ae=class extends n{};o(ae,"template","baseui.CardDescription"),o(ae,"props",Ir)});function pa({tag:t="input",type:e}={}){return t==="select"?"form-select":e==="checkbox"||e==="radio"?"form-check-input":"form-control"}var Ma=b(()=>{});var ie,Ci=b(()=>{m();Ma();ie=class extends n{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){let e=["baseui-input",pa({tag:"input",type:this.props.type})];return this.props.invalid&&e.push("is-invalid"),this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};o(ie,"template","baseui.Input"),o(ie,"props",{value:{type:String,optional:!0},placeholder:{type:String,optional:!0},type:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},readonly:{type:Boolean,optional:!0},invalid:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},id:{type:String,optional:!0},list:{type:String,optional:!0},autocomplete:{type:String,optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},min:{type:[String,Number],optional:!0},max:{type:[String,Number],optional:!0},step:{type:[String,Number],optional:!0},onInput:{type:Function,optional:!0},onChange:{type:Function,optional:!0}})});function w(){let t=globalThis.bootstrap;if(!t)throw new Error("BaseUI: load dist/bootstrap.bundle.min.js before this script (globalThis.bootstrap is not set).");return t}var q=b(()=>{});function la(t,e,s){let r=t==="ArrowRight"?1:t==="ArrowLeft"?-1:0;return!r||s===0?-1:(e+r+s)%s}var za=b(()=>{});function Li(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"_")}var ul,ne,pe,le,ce,Bt,Ni=b(()=>{m();q();qa();za();ul=0;ne=class extends n{setup(){this.tabsState=g({active:this.props.value??this.props.defaultValue??""}),this.instanceId=`t${++ul}`,A({tabs:this.tabsState,selectTab:e=>this.select(e),tabsId:this.instanceId}),R(e=>{e.value!==void 0&&(this.tabsState.active=e.value)})}select(e){this.props.value===void 0&&(this.tabsState.active=e),this.props.onChange?.(e)}};o(ne,"template","baseui.Tabs"),o(ne,"props",{value:{type:String,optional:!0},defaultValue:{type:String,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});pe=class extends n{};o(pe,"template","baseui.TabsContainer"),o(pe,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});le=class extends n{setup(){this.listRef=S("list")}onKeyDown(e){let s=[...this.listRef.el.querySelectorAll("[role='tab']")],r=s.indexOf(e.target),i=la(e.key,r,s.length);i!==-1&&(e.preventDefault(),s[i].focus(),s[i].click())}};o(le,"template","baseui.TabsList"),o(le,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ce=class extends n{setup(){this.rootRef=S("root"),this.tabInstance=null,this.onShown=()=>this.env.selectTab(this.props.value),O(()=>{this.tabInstance=w().Tab.getOrCreateInstance(this.rootRef.el),this.rootRef.el.addEventListener("shown.bs.tab",this.onShown)}),j(()=>{this.rootRef.el.removeEventListener("shown.bs.tab",this.onShown),this.tabInstance?.dispose()})}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`baseui-tabs-panel-${this.env.tabsId}-${Li(this.props.value)}`}get classNames(){let e=["nav-link"];return this.isActive&&e.push("active"),this.props.className&&e.push(this.props.className),e.join(" ")}onClick(){this.props.disabled||this.tabInstance?.show()}};o(ce,"template","baseui.TabTrigger"),o(ce,"props",{value:{type:String},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Bt=class extends n{setup(){this.initialActive=this.isActive}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`baseui-tabs-panel-${this.env.tabsId}-${Li(this.props.value)}`}};o(Bt,"template","baseui.TabContent"),o(Bt,"components",{Card:lt,CardBody:ct}),o(Bt,"props",{value:{type:String},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Rr,ue,de,It,be,he,me,ge,fe,ki=b(()=>{m();q();Y();U();Rr={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},ue=class extends n{setup(){this.dialogState=g({open:$(this.props)}),this.control={instance:null},A({dialog:this.dialogState,dialogControl:this.control,setDialogOpen:e=>this.setOpen(e)}),R(e=>{if(T(e)){let s=$(e);this.dialogState.open=s,s?this.control.instance?.show():this.control.instance?.hide()}})}setOpen(e){T(this.props)||(this.dialogState.open=e),this.props.onOpenChange?.(e)}};o(ue,"template","baseui.Dialog"),o(ue,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});de=class extends n{onClick(){this.env.dialogControl.instance?.show()}};o(de,"template","baseui.DialogTrigger"),o(de,"props",Rr);It=class extends n{setup(){this.rootRef=S("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setDialogOpen(!0),this.onHidden=()=>{this.env.setDialogOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},O(()=>{this.env.dialogControl.instance=w().Modal.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,focus:!0}),this.rootRef.el.addEventListener("show.bs.modal",this.onShow),this.rootRef.el.addEventListener("shown.bs.modal",this.onShown),this.rootRef.el.addEventListener("hidden.bs.modal",this.onHidden),this.env.dialog.open&&this.env.dialogControl.instance.show()}),j(()=>{this.rootRef.el.removeEventListener("show.bs.modal",this.onShow),this.rootRef.el.removeEventListener("shown.bs.modal",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.modal",this.onHidden),this.env.dialogControl.instance?.dispose(),this.env.dialogControl.instance=null})}get showCloseButton(){return this.props.showCloseButton!==!1&&this.props["show-close-button"]!==!1}};o(It,"template","baseui.DialogContent"),o(It,"components",{Icon:k}),o(It,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},showCloseButton:{type:Boolean,optional:!0},"show-close-button":{type:Boolean,optional:!0},slots:{type:Object,optional:!0}});be=class extends n{};o(be,"template","baseui.DialogHeader"),o(be,"props",Rr);he=class extends n{};o(he,"template","baseui.DialogFooter"),o(he,"props",Rr);me=class extends n{};o(me,"template","baseui.DialogTitle"),o(me,"props",Rr);ge=class extends n{};o(ge,"template","baseui.DialogDescription"),o(ge,"props",Rr);fe=class extends n{};o(fe,"template","baseui.DialogClose"),o(fe,"props",Rr)});var Oi,Pa,ye,ve,Se,xe,ji=b(()=>{m();q();Oi={default:"baseui-alert-default",destructive:"baseui-alert-destructive",info:"baseui-alert-default",success:"alert-success",warning:"alert-warning",danger:"baseui-alert-destructive"},Pa={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},ye=class extends n{setup(){this.rootRef=S("root"),this.bootstrapAlert=null,this.props.dismissible&&(O(()=>{this.bootstrapAlert=new(w()).Alert(this.rootRef.el)}),j(()=>{this.bootstrapAlert?.dispose()}))}get classNames(){let e=["alert","baseui-alert",Oi[this.props.variant]||Oi.default];return this.props.dismissible&&e.push("alert-dismissible","fade","show"),this.props.className&&e.push(this.props.className),e.join(" ")}};o(ye,"template","baseui.Alert"),o(ye,"props",{variant:{type:String,optional:!0},dismissible:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ve=class extends n{};o(ve,"template","baseui.AlertTitle"),o(ve,"props",Pa);Se=class extends n{};o(Se,"template","baseui.AlertDescription"),o(Se,"props",Pa);xe=class extends n{};o(xe,"template","baseui.AlertAction"),o(xe,"props",Pa)});var ca,Bi,dl,we,Ae,Ee,Ce,Le,Ne,Ii=b(()=>{m();ca={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Bi={default:"baseui-empty-default",outline:"baseui-empty-outline",background:"baseui-empty-background"},dl={default:"baseui-empty-media-default",icon:"baseui-empty-media-icon"},we=class extends n{get classNames(){let e=["baseui-empty",Bi[this.props.variant]||Bi.default];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(we,"template","baseui.Empty"),o(we,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ae=class extends n{};o(Ae,"template","baseui.EmptyHeader"),o(Ae,"props",ca);Ee=class extends n{get variant(){return this.props.variant==="icon"?"icon":"default"}get classNames(){let e=["baseui-empty-media",dl[this.variant]];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Ee,"template","baseui.EmptyMedia"),o(Ee,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ce=class extends n{};o(Ce,"template","baseui.EmptyTitle"),o(Ce,"props",ca);Le=class extends n{};o(Le,"template","baseui.EmptyDescription"),o(Le,"props",ca);Ne=class extends n{};o(Ne,"template","baseui.EmptyContent"),o(Ne,"props",ca)});var ke,Ri=b(()=>{m();ke=class extends n{get vertical(){return this.props.orientation==="vertical"}get classNames(){let e=["baseui-separator",this.vertical?"baseui-separator-vertical":"baseui-separator-horizontal"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(ke,"template","baseui.Separator"),o(ke,"props",{orientation:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var ut,Da=b(()=>{m();ut=class extends n{get classNames(){let e=["baseui-skeleton",this.props.shape==="circle"?"baseui-skeleton-circle":"baseui-skeleton-block"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(ut,"template","baseui.Skeleton"),o(ut,"props",{shape:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var Oe,$i=b(()=>{m();Oe=class extends n{get classNames(){let e=["baseui-spinner",this.props.type==="grow"?"spinner-grow":"spinner-border"];return this.props.className&&e.push(this.props.className),e.join(" ")}get label(){return this.props.label||"Loading"}};o(Oe,"template","baseui.Spinner"),o(Oe,"props",{type:{type:String,optional:!0},label:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var bl,je,Ti=b(()=>{m();bl={lead:"lead",muted:"text-body-secondary",code:"baseui-code",kbd:"baseui-kbd"},je=class extends n{get classNames(){let e=["baseui-typography"],s=bl[this.props.variant];return s&&e.push(s),this.props.className&&e.push(this.props.className),e.join(" ")}};o(je,"template","baseui.Typography"),o(je,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Be,Ui=b(()=>{m();Be=class extends n{get classNames(){let e=["baseui-kbd"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Be,"template","baseui.Kbd"),o(Be,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Ie,qi=b(()=>{m();Ie=class extends n{get classNames(){let e=["baseui-marker"];return this.props.className&&e.push(this.props.className),e.join(" ")}get variant(){return this.props.variant}};o(Ie,"template","baseui.Marker"),o(Ie,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Re,Mi=b(()=>{m();Re=class extends n{get classNames(){let e=["form-control"];return this.props.resize==="none"&&e.push("baseui-textarea-no-resize"),this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};o(Re,"template","baseui.Textarea"),o(Re,"props",{value:{type:String,optional:!0},placeholder:{type:String,optional:!0},rows:{type:Number,optional:!0},disabled:{type:Boolean,optional:!0},readonly:{type:Boolean,optional:!0},resize:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},id:{type:String,optional:!0},onInput:{type:Function,optional:!0},onChange:{type:Function,optional:!0}})});var $e,zi=b(()=>{m();$e=class extends n{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){let e=["baseui-native-select","form-select"];return(this.props.size==="sm"||this.props.size==="lg")&&e.push(`form-select-${this.props.size}`),this.props.className&&e.push(this.props.className),e.join(" ")}onChange(e){this.props.onChange?.(e.target.value,e)}};o($e,"template","baseui.NativeSelect"),o($e,"props",{value:{type:String,optional:!0},size:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},id:{type:String,optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var Te,Pi=b(()=>{m();Te=class extends n{onChange(e){this.props.onChange?.(e.target.checked,e)}};o(Te,"template","baseui.Checkbox"),o(Te,"props",{checked:{type:Boolean,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},id:{type:String,optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var Ue,qe,Di=b(()=>{m();Ue=class extends n{setup(){A({radioGroupValue:()=>this.props.value,radioGroupDisabled:()=>this.props.disabled,radioGroupName:()=>this.props.name||"baseui-radio-group",selectRadio:e=>this.props.onChange?.(e)})}get classNames(){let e=["baseui-radio-group"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Ue,"template","baseui.RadioGroup"),o(Ue,"props",{value:{type:String,optional:!0},name:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});qe=class extends n{get checked(){return this.env.radioGroupValue()===this.props.value}get disabled(){return this.props.disabled||this.env.radioGroupDisabled()}onChange(){this.disabled||this.env.selectRadio(this.props.value)}};o(qe,"template","baseui.RadioGroupItem"),o(qe,"props",{value:{type:String},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Me,Fi=b(()=>{m();Me=class extends n{onChange(e){this.props.onChange?.(e.target.checked,e)}};o(Me,"template","baseui.Switch"),o(Me,"props",{checked:{type:Boolean,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var ze,_i=b(()=>{m();ze=class extends n{get classNames(){let e=["baseui-slider"];return this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){e.target.style.setProperty("--baseui-slider-value",`${e.target.value}%`),this.props.onChange?.(e.target.value,e)}};o(ze,"template","baseui.Slider"),o(ze,"props",{value:{type:[Number,String],optional:!0},min:{type:[Number,String],optional:!0},max:{type:[Number,String],optional:!0},step:{type:[Number,String],optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0}})});function ua(t){t.parentElement?.querySelector("[data-slot='input-group-control'], input, textarea")?.focus()}var Pe,De,Fe,Fa=b(()=>{Pe={"inline-start":"baseui-input-group-addon-inline-start","inline-end":"baseui-input-group-addon-inline-end","block-start":"baseui-input-group-addon-block-start","block-end":"baseui-input-group-addon-block-end"},De={default:"btn-primary",primary:"btn-primary",destructive:"btn-danger",danger:"btn-danger",outline:"btn-outline-secondary",secondary:"btn-secondary",ghost:"btn-light",link:"btn-link"},Fe={xs:"baseui-input-group-button-xs",sm:"baseui-input-group-button-sm","icon-xs":"baseui-input-group-button-icon-xs","icon-sm":"baseui-input-group-button-icon-sm"}});var _e,He,We,Ke,Ve,Ze,Hi=b(()=>{m();Fa();_e=class extends n{get classNames(){let e=["baseui-input-group"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(_e,"template","baseui.InputGroup"),o(_e,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});He=class extends n{get align(){return Pe[this.props.align]?this.props.align:"inline-start"}get classNames(){let e=["baseui-input-group-addon",Pe[this.align]];return this.props.className&&e.push(this.props.className),e.join(" ")}onClick(e){this.props.onClick?.(e),e.target.closest("button")||ua(e.currentTarget)}};o(He,"template","baseui.InputGroupAddon"),o(He,"props",{align:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}});We=class extends n{get size(){return Fe[this.props.size]?this.props.size:"xs"}get classNames(){let e=["btn","baseui-button","baseui-input-group-button"];return e.push(De[this.props.variant]||De.ghost),e.push(Fe[this.size]),(this.props.className||this.props.class)&&e.push(this.props.className||this.props.class),e.join(" ")}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};o(We,"template","baseui.InputGroupButton"),o(We,"props",{variant:{type:String,optional:!0},size:{type:String,optional:!0},type:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},label:{type:String,optional:!0},class:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}});Ke=class extends n{get classNames(){let e=["baseui-input-group-text"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Ke,"template","baseui.InputGroupText"),o(Ke,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ve=class extends n{get classNames(){let e=["form-control","baseui-input-group-control","baseui-input-group-input"];return this.props.invalid&&e.push("is-invalid"),this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};o(Ve,"template","baseui.InputGroupInput"),o(Ve,"props",{value:{type:String,optional:!0},id:{type:String,optional:!0},name:{type:String,optional:!0},autocomplete:{type:String,optional:!0},placeholder:{type:String,optional:!0},type:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},readonly:{type:Boolean,optional:!0},invalid:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onInput:{type:Function,optional:!0},onChange:{type:Function,optional:!0}});Ze=class extends n{get classNames(){let e=["form-control","baseui-input-group-control","baseui-input-group-textarea"];return this.props.resize==="none"&&e.push("baseui-textarea-no-resize"),this.props.invalid&&e.push("is-invalid"),this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};o(Ze,"template","baseui.InputGroupTextarea"),o(Ze,"props",{value:{type:String,optional:!0},placeholder:{type:String,optional:!0},rows:{type:Number,optional:!0},disabled:{type:Boolean,optional:!0},readonly:{type:Boolean,optional:!0},invalid:{type:Boolean,optional:!0},resize:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onInput:{type:Function,optional:!0},onChange:{type:Function,optional:!0}})});var Xe,Wi=b(()=>{m();Xe=class extends n{setup(){this.length=this.props.length||6;let e=(this.props.value||"").split("");this.state=g({digits:Array.from({length:this.length},(s,r)=>e[r]||"")}),this.rootRef=S("root")}get classNames(){let e=["baseui-input-otp"];return this.props.className&&e.push(this.props.className),e.join(" ")}get boxes(){return this.state.digits.map((e,s)=>({index:s,value:e}))}emit(){this.props.onChange?.(this.state.digits.join(""))}onInput(e,s){let r=s.target.value.slice(-1);this.state.digits[e]=r,r&&this.rootRef.el&&[...this.rootRef.el.querySelectorAll("input")][e+1]?.focus(),this.emit()}onPaste(e){let s=e.clipboardData.getData("text").trim();if(s){e.preventDefault();for(let r=0;r<this.length;r++)this.state.digits[r]=s[r]||"";this.emit()}}};o(Xe,"template","baseui.InputOtp"),o(Xe,"props",{length:{type:Number,optional:!0},value:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0}})});function $r(t,{defaultOpen:e=!1,onOpenChange:s}={}){let r=g({open:e}),i=u=>{r.open!==u&&(r.open=u,s?.(u))},a=()=>i(!r.open),p=u=>{t.el&&!t.el.contains(u.target)&&i(!1)},l=u=>{u.key==="Escape"&&i(!1)};return G(u=>{if(u)return document.addEventListener("click",p),document.addEventListener("keydown",l),()=>{document.removeEventListener("click",p),document.removeEventListener("keydown",l)}},()=>[r.open]),j(()=>{document.removeEventListener("click",p),document.removeEventListener("keydown",l)}),{state:r,setOpen:i,toggle:a}}var da=b(()=>{m()});var _a,Ge,Ye,Je,Qe,Ki=b(()=>{m();da();U();_a={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Ge=class extends n{setup(){this.rootRef=S("root");let{state:e,setOpen:s,toggle:r}=$r(this.rootRef,{defaultOpen:_(this.props.state)});this.disclosure=e,A({select:this.disclosure,selectValue:()=>this.props.value,selectToggle:r,selectClose:()=>s(!1),selectChoose:i=>{this.props.onChange?.(i),s(!1)}})}get classNames(){let e=["baseui-select"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Ge,"template","baseui.Select"),o(Ge,"props",{value:{type:String,optional:!0},state:{type:String,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ye=class extends n{onClick(){this.env.selectToggle()}};o(Ye,"template","baseui.SelectTrigger"),o(Ye,"props",_a);Je=class extends n{get open(){return this.env.select.open}};o(Je,"template","baseui.SelectContent"),o(Je,"props",_a);Qe=class extends n{get selected(){return this.env.selectValue()===this.props.value}onClick(){this.env.selectChoose(this.props.value)}};o(Qe,"template","baseui.SelectItem"),o(Qe,"props",{value:{type:String},..._a})});function Tr(t){return[...t.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])")].filter(e=>!e.disabled&&!e.hidden)}function Ha(t,e){if(t.key!=="Tab")return;let s=Tr(e);if(!s.length){t.preventDefault();return}let r=s[0],i=s[s.length-1];t.shiftKey&&document.activeElement===r?(t.preventDefault(),i.focus()):!t.shiftKey&&document.activeElement===i&&(t.preventDefault(),r.focus())}function ba(t,{closeSelector:e,trapFocus:s=!1}={}){let r=t.getAttribute("b-att-trigger"),i=r?document.querySelector(r):null,a=[...t.querySelectorAll(e)],p=null,l=()=>Tr(t),u=()=>{p=document.activeElement,t.hidden=!1,t.setAttribute("b-att-state","open"),t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),l()[0]?.focus(),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},d=()=>{t.hidden=!0,t.setAttribute("b-att-state","closed"),p?.focus?.(),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},h=v=>{if(v.key==="Escape"){d();return}!s||t.hidden||Ha(v,t)},f=v=>{v.target===t&&d()};return i?.addEventListener("click",u),a.forEach(v=>v.addEventListener("click",d)),t.addEventListener("keydown",h),t.addEventListener("click",f),(!t.getAttribute("b-att-state")||t.getAttribute("b-att-state")==="closed")&&(t.hidden=!0),{open:u,close:d,destroy:()=>{i?.removeEventListener("click",u),a.forEach(v=>v.removeEventListener("click",d)),t.removeEventListener("keydown",h),t.removeEventListener("click",f)}}}var Vr=b(()=>{});var dt,ts,es,ss,os,rs,as,is,ns,ps,ls,Vi=b(()=>{m();Vr();U();dt={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},ts=class extends n{setup(){this.alertDialogState=g({open:$(this.props)}),A({alertDialog:this.alertDialogState,setAlertDialogOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.alertDialogState.open=$(e))})}setOpen(e){T(this.props)||(this.alertDialogState.open=e),this.props.onOpenChange?.(e)}};o(ts,"template","baseui.AlertDialog"),o(ts,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});es=class extends n{onClick(){this.env.setAlertDialogOpen(!0)}};o(es,"template","baseui.AlertDialogTrigger"),o(es,"props",dt);ss=class extends n{get size(){return this.props.size==="sm"?"sm":"default"}setup(){this.rootRef=S("root"),G(e=>{if(!e)return;let s=document.activeElement;return Tr(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.alertDialog.open])}get open(){return this.env.alertDialog.open}onKeyDown(e){if(e.key==="Escape"){this.env.setAlertDialogOpen(!1);return}Ha(e,this.rootRef.el)}};o(ss,"template","baseui.AlertDialogContent"),o(ss,"props",{...dt,size:{type:String,optional:!0}});os=class extends n{};o(os,"template","baseui.AlertDialogHeader"),o(os,"props",dt);rs=class extends n{};o(rs,"template","baseui.AlertDialogFooter"),o(rs,"props",dt);as=class extends n{};o(as,"template","baseui.AlertDialogMedia"),o(as,"props",dt);is=class extends n{};o(is,"template","baseui.AlertDialogTitle"),o(is,"props",dt);ns=class extends n{};o(ns,"template","baseui.AlertDialogDescription"),o(ns,"props",dt);ps=class extends n{onClick(){this.env.setAlertDialogOpen(!1)}};o(ps,"template","baseui.AlertDialogCancel"),o(ps,"props",dt);ls=class extends n{onClick(){this.props.onClick?.(),this.env.setAlertDialogOpen(!1)}};o(ls,"template","baseui.AlertDialogAction"),o(ls,"props",{...dt,onClick:{type:Function,optional:!0}})});var ys,cs,us,ds,bs,hs,ms,gs,fs,Zi=b(()=>{m();q();U();ys={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},cs=class extends n{setup(){this.drawerState=g({open:$(this.props)}),this.control={instance:null},A({drawer:this.drawerState,drawerControl:this.control,setDrawerOpen:e=>this.setOpen(e)}),R(e=>{if(T(e)){let s=$(e);this.drawerState.open=s,s?this.control.instance?.show():this.control.instance?.hide()}})}setOpen(e){T(this.props)||(this.drawerState.open=e),this.props.onOpenChange?.(e)}};o(cs,"template","baseui.Drawer"),o(cs,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});us=class extends n{onClick(){this.env.drawerControl.instance?.show()}};o(us,"template","baseui.DrawerTrigger"),o(us,"props",ys);ds=class extends n{setup(){this.rootRef=S("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setDrawerOpen(!0),this.onHidden=()=>{this.env.setDrawerOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},O(()=>{this.env.drawerControl.instance=w().Offcanvas.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,scroll:!1}),this.rootRef.el.addEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.addEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.addEventListener("hidden.bs.offcanvas",this.onHidden),this.env.drawer.open&&this.env.drawerControl.instance.show()}),j(()=>{this.rootRef.el.removeEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.removeEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.offcanvas",this.onHidden),this.env.drawerControl.instance?.dispose(),this.env.drawerControl.instance=null})}get open(){return this.env.drawer.open}};o(ds,"template","baseui.DrawerContent"),o(ds,"props",ys);bs=class extends n{};o(bs,"template","baseui.DrawerHeader"),o(bs,"props",ys);hs=class extends n{};o(hs,"template","baseui.DrawerFooter"),o(hs,"props",ys);ms=class extends n{};o(ms,"template","baseui.DrawerTitle"),o(ms,"props",ys);gs=class extends n{};o(gs,"template","baseui.DrawerDescription"),o(gs,"props",ys);fs=class extends n{};o(fs,"template","baseui.DrawerClose"),o(fs,"props",ys)});var Ns,vs,Ss,xs,ws,As,Es,Cs,Ls,Xi=b(()=>{m();q();U();Ns={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},vs=class extends n{setup(){this.sheetState=g({open:$(this.props),side:this.props.side}),this.control={instance:null},A({sheet:this.sheetState,sheetControl:this.control,setSheetOpen:e=>this.setOpen(e)}),R(e=>{if(T(e)){let s=$(e);this.sheetState.open=s,s?this.control.instance?.show():this.control.instance?.hide()}this.sheetState.side=e.side})}setOpen(e){T(this.props)||(this.sheetState.open=e),this.props.onOpenChange?.(e)}};o(vs,"template","baseui.Sheet"),o(vs,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},side:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});Ss=class extends n{onClick(){this.env.sheetControl.instance?.show()}};o(Ss,"template","baseui.SheetTrigger"),o(Ss,"props",Ns);xs=class extends n{setup(){this.rootRef=S("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setSheetOpen(!0),this.onHidden=()=>{this.env.setSheetOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},O(()=>{this.env.sheetControl.instance=w().Offcanvas.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,scroll:!1}),this.rootRef.el.addEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.addEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.addEventListener("hidden.bs.offcanvas",this.onHidden),this.env.sheet.open&&this.env.sheetControl.instance.show()}),j(()=>{this.rootRef.el.removeEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.removeEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.offcanvas",this.onHidden),this.env.sheetControl.instance?.dispose(),this.env.sheetControl.instance=null})}get open(){return this.env.sheet.open}get side(){return this.props.side??this.env.sheet.side}get placementClass(){return this.side==="left"?"offcanvas-start":"offcanvas-end"}};o(xs,"template","baseui.SheetContent"),o(xs,"props",{...Ns,side:{type:String,optional:!0}});ws=class extends n{};o(ws,"template","baseui.SheetHeader"),o(ws,"props",Ns);As=class extends n{};o(As,"template","baseui.SheetFooter"),o(As,"props",Ns);Es=class extends n{};o(Es,"template","baseui.SheetTitle"),o(Es,"props",Ns);Cs=class extends n{};o(Cs,"template","baseui.SheetDescription"),o(Cs,"props",Ns);Ls=class extends n{};o(Ls,"template","baseui.SheetClose"),o(Ls,"props",Ns)});var Gi,ks,Os,js,Yi=b(()=>{m();q();U();Gi={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},ks=class extends n{setup(){let e=g({open:_(this.props.state)});this.control={instance:null,bufferEl:null,lastContentHtml:null};let s=r=>{e.open!==r&&(e.open=r,this.props.onOpenChange?.(r))};A({popover:e,popoverControl:this.control,popoverSetOpen:s,popoverToggle:()=>this.control.instance?.toggle(),popoverClose:()=>this.control.instance?.hide()})}};o(ks,"template","baseui.Popover"),o(ks,"props",{state:{type:String,optional:!0},onOpenChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Os=class extends n{setup(){this.rootRef=S("root"),this.onShown=()=>this.env.popoverSetOpen(!0),this.onHidden=()=>this.env.popoverSetOpen(!1),O(()=>{let e=this.env.popoverControl,s=e.bufferEl?.innerHTML??"";e.lastContentHtml=s,e.instance=new(w()).Popover(this.rootRef.el,{content:s,html:!0,trigger:"manual"}),this.rootRef.el.addEventListener("shown.bs.popover",this.onShown),this.rootRef.el.addEventListener("hidden.bs.popover",this.onHidden)}),j(()=>{this.rootRef.el.removeEventListener("shown.bs.popover",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.popover",this.onHidden),this.env.popoverControl.instance?.dispose(),this.env.popoverControl.instance=null})}onClick(){this.env.popoverControl.instance?.toggle()}};o(Os,"template","baseui.PopoverTrigger"),o(Os,"props",Gi);js=class extends n{get style(){return J("display:none",this.props.style)}setup(){this.bufferRef=S("buffer"),O(()=>{this.env.popoverControl.bufferEl=this.bufferRef.el}),F(()=>{let e=this.env.popoverControl;e.bufferEl=this.bufferRef.el;let s=this.currentContentHtml();e.instance&&s!==e.lastContentHtml&&(e.lastContentHtml=s,e.instance.setContent({".popover-body":s}))})}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}};o(js,"template","baseui.PopoverContent"),o(js,"props",{...Gi,content:{type:String,optional:!0}})});var Ji,Bs,Is,Rs,Qi=b(()=>{m();Ji={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Bs=class extends n{setup(){this.state=g({open:!1}),A({hoverCard:this.state})}open(){this.state.open=!0}close(){this.state.open=!1}onKeyDown(e){e.key==="Escape"&&this.close()}};o(Bs,"template","baseui.HoverCard"),o(Bs,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Is=class extends n{};o(Is,"template","baseui.HoverCardTrigger"),o(Is,"props",Ji);Rs=class extends n{get open(){return this.env.hoverCard.open}};o(Rs,"template","baseui.HoverCardContent"),o(Rs,"props",Ji)});var $s,tn=b(()=>{m();q();U();$s=class extends n{setup(){this.state=g({open:_(this.props.state)}),this.triggerRef=S("trigger"),this.bufferRef=S("buffer"),this.bootstrapTooltip=null,this.lastContentHtml=null,this.onShown=()=>{this.state.open=!0},this.onHidden=()=>{this.state.open=!1},O(()=>{this.lastContentHtml=this.currentContentHtml();let e=this.triggerElement();this.bootstrapTooltip=new(w()).Tooltip(e,{title:this.lastContentHtml,html:!0,trigger:"hover focus"}),e.addEventListener("shown.bs.tooltip",this.onShown),e.addEventListener("hidden.bs.tooltip",this.onHidden),_(this.props.state)&&this.bootstrapTooltip.show()}),F(()=>{let e=this.currentContentHtml();e!==this.lastContentHtml&&(this.lastContentHtml=e,this.bootstrapTooltip?.setContent({".tooltip-inner":e}))}),j(()=>{let e=this.triggerElement();e?.removeEventListener("shown.bs.tooltip",this.onShown),e?.removeEventListener("hidden.bs.tooltip",this.onHidden),this.bootstrapTooltip?.dispose()})}triggerElement(){return this.triggerRef.el?.firstElementChild||this.triggerRef.el}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}show(){this.bootstrapTooltip?.show()}hide(){this.bootstrapTooltip?.hide()}};o($s,"template","baseui.Tooltip"),o($s,"props",{content:{type:String,optional:!0},state:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var et,Wa,bt,ht,mt,Ts,Us,gt,Rt,qs,$t,Ms,zs,ft,ot,yt,Ka=b(()=>{m();da();q();U();Y();et={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Wa={...et,disabled:{type:Boolean,optional:!0},inset:{type:Boolean,optional:!0},onClick:{type:Function,optional:!0},onSelect:{type:Function,optional:!0},variant:{type:String,optional:!0}},bt=class extends n{setup(){this.rootRef=S("root");let e=g({open:_(this.props.state)});this.control={instance:null};let s=a=>{e.open!==a&&(e.open=a,this.props.onOpenChange?.(a))};A({dropdownMenu:e,dropdownControl:this.control,dropdownSetOpen:s,dropdownToggle:()=>this.control.instance?.toggle(),dropdownClose:()=>this.control.instance?.hide()});let r=a=>{this.rootRef.el&&!this.rootRef.el.contains(a.target)&&this.control.instance?.hide()},i=a=>{a.key==="Escape"&&this.control.instance?.hide()};G(a=>{if(a)return document.addEventListener("click",r),document.addEventListener("keydown",i),()=>{document.removeEventListener("click",r),document.removeEventListener("keydown",i)}},()=>[e.open]),j(()=>{document.removeEventListener("click",r),document.removeEventListener("keydown",i)})}};o(bt,"template","baseui.DropdownMenu"),o(bt,"props",{state:{type:String,optional:!0},onOpenChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ht=class extends n{setup(){this.rootRef=S("root"),this.onShown=()=>this.env.dropdownSetOpen(!0),this.onHidden=()=>this.env.dropdownSetOpen(!1),O(()=>{this.env.dropdownControl.instance=w().Dropdown.getOrCreateInstance(this.rootRef.el),this.rootRef.el.addEventListener("shown.bs.dropdown",this.onShown),this.rootRef.el.addEventListener("hidden.bs.dropdown",this.onHidden)}),j(()=>{this.rootRef.el.removeEventListener("shown.bs.dropdown",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.dropdown",this.onHidden),this.env.dropdownControl.instance?.dispose(),this.env.dropdownControl.instance=null})}get classNames(){return W("btn","baseui-button","btn-outline-secondary","baseui-dropdown-menu-trigger",this.props.className)}onClick(){this.env.dropdownToggle()}};o(ht,"template","baseui.DropdownMenuTrigger"),o(ht,"props",et);mt=class extends n{get open(){return this.env.dropdownMenu.open}get classNames(){return W("baseui-dropdown-menu-content","dropdown-menu",this.open?"show":"",this.props.className)}};o(mt,"template","baseui.DropdownMenuContent"),o(mt,"props",{...et,align:{type:String,optional:!0},alignOffset:{type:Number,optional:!0},side:{type:String,optional:!0},sideOffset:{type:Number,optional:!0}});Ts=class extends n{};o(Ts,"template","baseui.DropdownMenuGroup"),o(Ts,"props",et);Us=class extends n{};o(Us,"template","baseui.DropdownMenuLabel"),o(Us,"props",{...et,inset:{type:Boolean,optional:!0}});gt=class extends n{get variant(){return this.props.variant||"default"}onClick(e){this.props.disabled||(this.props.onClick?.(e),this.props.onSelect?.(e),this.env.dropdownClose())}};o(gt,"template","baseui.DropdownMenuItem"),o(gt,"props",Wa);Rt=class extends n{onClick(e){this.props.disabled||(this.props.onCheckedChange?.(!this.props.checked,e),this.props.onClick?.(e),this.props.onSelect?.(e))}};o(Rt,"template","baseui.DropdownMenuCheckboxItem"),o(Rt,"components",{Icon:k}),o(Rt,"props",{...Wa,checked:{type:Boolean,optional:!0},onCheckedChange:{type:Function,optional:!0}});qs=class extends n{setup(){A({dropdownRadio:{value:this.props.value,onValueChange:this.props.onValueChange}})}};o(qs,"template","baseui.DropdownMenuRadioGroup"),o(qs,"props",{...et,value:{type:String,optional:!0},onValueChange:{type:Function,optional:!0}});$t=class extends n{get checked(){return this.env.dropdownRadio?.value===this.props.value}onClick(e){this.props.disabled||(this.env.dropdownRadio?.onValueChange?.(this.props.value,e),this.props.onClick?.(e),this.props.onSelect?.(e))}};o($t,"template","baseui.DropdownMenuRadioItem"),o($t,"components",{Icon:k}),o($t,"props",{...Wa,value:{type:String,optional:!0}});Ms=class extends n{};o(Ms,"template","baseui.DropdownMenuSeparator"),o(Ms,"props",et);zs=class extends n{};o(zs,"template","baseui.DropdownMenuShortcut"),o(zs,"props",et);ft=class extends n{setup(){this.rootRef=S("root");let{state:e,setOpen:s,toggle:r}=$r(this.rootRef);A({dropdownSub:e,dropdownSubToggle:r,dropdownSubOpen:()=>s(!0),dropdownSubClose:()=>s(!1)})}};o(ft,"template","baseui.DropdownMenuSub"),o(ft,"props",et);ot=class extends n{onMouseEnter(){this.props.disabled||this.env.dropdownSubOpen()}onClick(){this.props.disabled||this.env.dropdownSubToggle()}};o(ot,"template","baseui.DropdownMenuSubTrigger"),o(ot,"components",{Icon:k}),o(ot,"props",{...et,disabled:{type:Boolean,optional:!0},inset:{type:Boolean,optional:!0}});yt=class extends n{get open(){return this.env.dropdownSub.open}};o(yt,"template","baseui.DropdownMenuSubContent"),o(yt,"props",et)});var Va,Ps,Ds,Fs,_s,en=b(()=>{m();U();Va={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Ps=class extends n{setup(){this.state=g({open:!1,x:0,y:0});let e=()=>{this.state.open=!1};this.close=e,A({contextMenu:this.state,contextMenuOpenAt:(s,r)=>{this.state.open=!0,this.state.x=s,this.state.y=r},contextMenuClose:e}),document.addEventListener("click",e),j(()=>document.removeEventListener("click",e))}};o(Ps,"template","baseui.ContextMenu"),o(Ps,"props",{className:{type:String,optional:!0},slots:{type:Object,optional:!0}});Ds=class extends n{onContextMenu(e){e.preventDefault(),this.env.contextMenuOpenAt(e.clientX,e.clientY)}};o(Ds,"template","baseui.ContextMenuTrigger"),o(Ds,"props",Va);Fs=class extends n{setup(){this.rootRef=S("root")}get open(){return this.env.contextMenu.open}get style(){return J(`left:${this.env.contextMenu.x}px;top:${this.env.contextMenu.y}px`,this.props.style)}};o(Fs,"template","baseui.ContextMenuContent"),o(Fs,"props",Va);_s=class extends n{onClick(){this.props.onClick?.(),this.env.contextMenuClose()}};o(_s,"template","baseui.ContextMenuItem"),o(_s,"props",{...Va,onClick:{type:Function,optional:!0}})});var vt,Za=b(()=>{m();q();U();vt=class extends n{setup(){this.state=g({open:$(this.props)}),this.rootRef=S("root"),this.bootstrapToast=null,this.handleShown=()=>{this.state.open=!0},this.handleHidden=()=>{this.state.open=!1,this.props.onOpenChange?.(!1)},O(()=>{this.mountBootstrapToast(this.props.delay),this.state.open&&this.bootstrapToast.show()}),R(e=>{let s=T(e)?$(e):this.state.open;e.delay!==this.props.delay?(this.bootstrapToast?.dispose(),this.mountBootstrapToast(e.delay),s&&this.bootstrapToast.show()):s!==this.state.open&&(s?this.bootstrapToast?.show():this.bootstrapToast?.hide())}),j(()=>{this.bootstrapToast?.dispose()})}mountBootstrapToast(e){let s=this.rootRef.el,r=e??3e3;this.bootstrapToast=new(w()).Toast(s,{autohide:r>0,delay:r||3e3}),s.addEventListener("shown.bs.toast",this.handleShown),s.addEventListener("hidden.bs.toast",this.handleHidden)}get classNames(){let e=["toast","fade","baseui-toast"];return this.props.className&&e.push(this.props.className),e.join(" ")}get role(){return this.props.variant==="danger"?"alert":"status"}};o(vt,"template","baseui.Toast"),o(vt,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},variant:{type:String,optional:!0},delay:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var Xa,Hs,Ws,Tt,Ks,sn=b(()=>{m();q();U();Y();Xa={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Hs=class extends n{setup(){this.state=g({open:new Set}),A({accordion:this.state,accordionToggle:e=>this.toggle(e)})}toggle(e){let s=!this.state.open.has(e);this.props.multiple||this.state.open.clear(),s?this.state.open.add(e):this.state.open.delete(e),this.props.onChange?.(s)}};o(Hs,"template","baseui.Accordion"),o(Hs,"props",{multiple:{type:Boolean,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ws=class extends n{setup(){A({accordionItemState:this.props.state,accordionItemValue:this.props.value})}};o(Ws,"template","baseui.AccordionItem"),o(Ws,"props",{value:{type:String},state:{type:String,optional:!0},...Xa});Tt=class extends n{get open(){return this.env.accordionItemState!==void 0?_(this.env.accordionItemState):this.env.accordion.open.has(this.env.accordionItemValue)}onClick(){this.env.accordionToggle(this.env.accordionItemValue)}};o(Tt,"template","baseui.AccordionTrigger"),o(Tt,"components",{Icon:k}),o(Tt,"props",Xa);Ks=class extends n{setup(){this.rootRef=S("root"),this.initialOpen=this.open,this.bootstrapCollapse=null,O(()=>{this.bootstrapCollapse=new(w()).Collapse(this.rootRef.el,{toggle:!1})}),F(()=>{if(!this.bootstrapCollapse)return;let e=this.rootRef.el.classList.contains("show");this.open&&!e?this.bootstrapCollapse.show():!this.open&&e&&this.bootstrapCollapse.hide()}),j(()=>{this.bootstrapCollapse?.dispose()})}get open(){return this.env.accordionItemState!==void 0?_(this.env.accordionItemState):this.env.accordion.open.has(this.env.accordionItemValue)}};o(Ks,"template","baseui.AccordionContent"),o(Ks,"props",Xa)});var on,Vs,Zs,Xs,rn=b(()=>{m();q();U();on={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Vs=class extends n{setup(){this.state=g({open:$(this.props)}),A({collapsible:this.state,collapsibleToggle:()=>this.toggle()}),R(e=>{T(e)&&(this.state.open=$(e))})}toggle(){let e=!this.state.open;T(this.props)||(this.state.open=e),this.props.onOpenChange?.(e)}};o(Vs,"template","baseui.Collapsible"),o(Vs,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Zs=class extends n{onClick(){this.env.collapsibleToggle()}};o(Zs,"template","baseui.CollapsibleTrigger"),o(Zs,"props",on);Xs=class extends n{setup(){this.rootRef=S("root"),this.initialOpen=this.open,this.bootstrapCollapse=null,O(()=>{this.bootstrapCollapse=new(w()).Collapse(this.rootRef.el,{toggle:!1})}),F(()=>{if(!this.bootstrapCollapse)return;let e=this.rootRef.el.classList.contains("show");this.open&&!e?this.bootstrapCollapse.show():!this.open&&e&&this.bootstrapCollapse.hide()}),j(()=>{this.bootstrapCollapse?.dispose()})}get open(){return this.env.collapsible.open}};o(Xs,"template","baseui.CollapsibleContent"),o(Xs,"props",on)});var Gs,Ys,Js,Qs,to,Ut,qt,an=b(()=>{m();Y();Gs=class extends n{};o(Gs,"template","baseui.Breadcrumb"),o(Gs,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ys=class extends n{};o(Ys,"template","baseui.BreadcrumbList"),o(Ys,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Js=class extends n{get classNames(){let e=["baseui-breadcrumb-item"];return this.props.current&&e.push("baseui-breadcrumb-page"),this.props.className&&e.push(this.props.className),e.join(" ")}};o(Js,"template","baseui.BreadcrumbItem"),o(Js,"props",{current:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Qs=class extends n{get classNames(){let e=["baseui-breadcrumb-link"];return this.props.className&&e.push(this.props.className),e.join(" ")}onClick(e){this.props.onClick?.(e)}};o(Qs,"template","baseui.BreadcrumbLink"),o(Qs,"props",{href:{type:String,optional:!0},target:{type:String,optional:!0},rel:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}});to=class extends n{get classNames(){let e=["baseui-breadcrumb-page"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(to,"template","baseui.BreadcrumbPage"),o(to,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ut=class extends n{get classNames(){let e=["baseui-breadcrumb-separator"];return this.props.className&&e.push(this.props.className),e.join(" ")}get hasCustomContent(){return!!this.props.slots?.default}};o(Ut,"template","baseui.BreadcrumbSeparator"),o(Ut,"components",{Icon:k}),o(Ut,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});qt=class extends n{get classNames(){let e=["baseui-breadcrumb-ellipsis"];return this.props.className&&e.push(this.props.className),e.join(" ")}get hasCustomContent(){return!!this.props.slots?.default}};o(qt,"template","baseui.BreadcrumbEllipsis"),o(qt,"components",{Icon:k}),o(qt,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var eo,so,nn=b(()=>{m();eo=class extends n{get classNames(){let e=["baseui-pagination"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(eo,"template","baseui.Pagination"),o(eo,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});so=class extends n{get classNames(){let e=["page-item"];return this.props.current&&e.push("active"),this.props.disabled&&e.push("disabled"),e.join(" ")}onClick(){this.props.disabled||this.props.onClick?.()}};o(so,"template","baseui.PaginationItem"),o(so,"props",{current:{type:Boolean,optional:!0},disabled:{type:Boolean,optional:!0},style:{type:[String,Object],optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var oo,ro,pn=b(()=>{m();oo=class extends n{setup(){this.rootRef=S("root")}onKeyDown(e){let s=[...this.rootRef.el.querySelectorAll("a, button")].filter(a=>!a.disabled),r=s.indexOf(e.target),i=e.key==="ArrowRight"?1:e.key==="ArrowLeft"?-1:0;!i||r<0||(e.preventDefault(),s[(r+i+s.length)%s.length]?.focus())}};o(oo,"template","baseui.NavigationMenu"),o(oo,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ro=class extends n{};o(ro,"template","baseui.NavigationMenuItem"),o(ro,"props",{href:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var ao,ln=b(()=>{m();ao=class extends n{get classNames(){let e=["baseui-menubar"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(ao,"template","baseui.Menubar"),o(ao,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});function un(t){globalThis.matchMedia?.("(max-width: 767.98px)").matches&&t.setSidebarOpen?.(!1)}var V,cn,at,Ur,Mt,St,io,no,po,lo,co,uo,zt,xt,wt,Pt,bo,Dt,it,At,rt,Ft,ho,mo,go,fo,yo,ha=b(()=>{m();U();Y();V={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},cn={...V,href:{type:String,optional:!0}};at=class extends n{setup(){this.state=g({open:$(this.props)}),A({sidebar:this.state,setSidebarOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.state.open=$(e))})}setOpen(e){T(this.props)||(this.state.open=e),this.props.onOpenChange?.(e)}get sidebarState(){return this.state.open?"expanded":"collapsed"}get side(){return this.props.side||"left"}get variant(){return this.props.variant||"sidebar"}get collapsible(){return this.props.collapsible||"offcanvas"}get classNames(){return W("baseui-sidebar-root",this.props.className)}onKeyDown(e){e.key==="Escape"&&this.setOpen(!1)}};o(at,"template","baseui.Sidebar"),o(at,"props",{open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},side:{type:String,optional:!0},variant:{type:String,optional:!0},collapsible:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ur=class extends at{};o(Ur,"template","baseui.Sidebar");Mt=class extends n{onClick(){if(this.env.setShellCollapsed&&!globalThis.matchMedia?.("(max-width: 767.98px)").matches){this.env.setShellCollapsed(!this.env.shell.collapsed);return}this.env.setSidebarOpen(!this.env.sidebar.open)}};o(Mt,"template","baseui.SidebarTrigger"),o(Mt,"components",{Icon:k}),o(Mt,"props",{...V,icon:{type:String,optional:!0},label:{type:String,optional:!0}});St=class extends n{get open(){return this.env.sidebar.open}};o(St,"template","baseui.SidebarContent"),o(St,"props",V);io=class extends n{};o(io,"template","baseui.SidebarHeader"),o(io,"props",V);no=class extends n{};o(no,"template","baseui.SidebarFooter"),o(no,"props",V);po=class extends n{};o(po,"template","baseui.SidebarInset"),o(po,"props",V);lo=class extends n{onClick(){this.env.setSidebarOpen(!this.env.sidebar.open)}};o(lo,"template","baseui.SidebarRail"),o(lo,"props",V);co=class extends n{};o(co,"template","baseui.SidebarInput"),o(co,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},placeholder:{type:String,optional:!0},value:{type:String,optional:!0},type:{type:String,optional:!0}});uo=class extends n{};o(uo,"template","baseui.SidebarSeparator"),o(uo,"props",V);zt=class extends n{onClick(){this.env.setSidebarOpen(!1)}};o(zt,"template","baseui.SidebarClose"),o(zt,"components",{Icon:k}),o(zt,"props",{...V,icon:{type:String,optional:!0},label:{type:String,optional:!0}});xt=class extends n{};o(xt,"template","baseui.SidebarGroup"),o(xt,"props",{muted:{type:Boolean,optional:!0},...V});wt=class extends n{};o(wt,"template","baseui.SidebarGroupLabel"),o(wt,"props",cn);Pt=class extends n{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};o(Pt,"template","baseui.SidebarGroupAction"),o(Pt,"components",{Icon:k}),o(Pt,"props",{icon:{type:String,optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},onClick:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});bo=class extends n{};o(bo,"template","baseui.SidebarGroupContent"),o(bo,"props",V);Dt=class extends n{setup(){let e=this.props["default-open"]!==void 0||this.props.defaultOpen!==void 0;this.state=g({open:T(this.props)||e?$(this.props):!0}),R(s=>{T(s)&&(this.state.open=$(s))})}get open(){return this.state.open}toggle(){let e=!this.state.open;T(this.props)||(this.state.open=e),this.props.onOpenChange?.(e)}};o(Dt,"template","baseui.SidebarGroupCollapsible"),o(Dt,"components",{Icon:k}),o(Dt,"props",{label:{type:String},open:{type:Boolean,optional:!0},state:{type:String,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});it=class extends n{};o(it,"template","baseui.SidebarMenu"),o(it,"props",V);At=class extends n{};o(At,"template","baseui.SidebarMenuItem"),o(At,"props",V);rt=class extends n{get classNames(){let e=["baseui-sidebar-menu-button"];return this.isActive&&e.push("is-active"),this.props.variant&&e.push(`is-${this.props.variant}`),this.props.size&&e.push(`is-${this.props.size}`),this.props.className&&e.push(this.props.className),e.join(" ")}get isActive(){return this.props.active||this.props.isActive}onClick(e){this.props.onClick?.(e),un(this.env)}};o(rt,"template","baseui.SidebarMenuButton"),o(rt,"components",{Icon:k}),o(rt,"props",{href:{type:String,optional:!0},icon:{type:String,optional:!0},active:{type:Boolean,optional:!0},isActive:{type:Boolean,optional:!0},variant:{type:String,optional:!0},size:{type:String,optional:!0},tooltip:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},onClick:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ft=class extends n{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};o(Ft,"template","baseui.SidebarMenuAction"),o(Ft,"components",{Icon:k}),o(Ft,"props",{icon:{type:String,optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},showOnHover:{type:Boolean,optional:!0},onClick:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ho=class extends n{};o(ho,"template","baseui.SidebarMenuSub"),o(ho,"props",V);mo=class extends n{};o(mo,"template","baseui.SidebarMenuBadge"),o(mo,"props",V);go=class extends n{setup(){this.state=g({width:this.props.width||`${Math.floor(Math.random()*40)+50}%`})}get style(){return J(`--baseui-sidebar-skeleton-width:${this.state.width}`,this.props.style)}};o(go,"template","baseui.SidebarMenuSkeleton"),o(go,"props",{showIcon:{type:Boolean,optional:!0},width:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}});fo=class extends n{};o(fo,"template","baseui.SidebarMenuSubItem"),o(fo,"props",V);yo=class extends n{get classNames(){let e=["baseui-sidebar-menu-sub-button"];return(this.props.active||this.props.isActive)&&e.push("is-active"),this.props.size&&e.push(`is-${this.props.size}`),this.props.className&&e.push(this.props.className),e.join(" ")}onClick(e){this.props.onClick?.(e),un(this.env)}};o(yo,"template","baseui.SidebarMenuSubButton"),o(yo,"props",{...cn,active:{type:Boolean,optional:!0},isActive:{type:Boolean,optional:!0},size:{type:String,optional:!0},onClick:{type:Function,optional:!0}})});var qr,_t,Ht,vo,So,xo,wo,Wt,Ao,dn=b(()=>{m();ha();Da();Za();jr();qr={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},_t=class extends n{setup(){this.state=g({collapsed:this.props.collapsed??this.props.defaultCollapsed??!1,authState:this.props.authState??null}),A({shell:this.state,setShellCollapsed:e=>this.setCollapsed(e)}),R(e=>{e.collapsed!==void 0&&(this.state.collapsed=e.collapsed),this.state.authState=e.authState??null})}setCollapsed(e){this.props.collapsed===void 0&&(this.state.collapsed=e),this.props.onCollapsedChange?.(e)}dismissToast(){this.props.onToastOpenChange?.(!1)}runToastAction(){this.props.toast?.onAction?.()}};o(_t,"template","baseui.Shell"),o(_t,"components",{Sidebar:at,Toast:vt,Button:K}),o(_t,"props",{open:{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},collapsed:{type:Boolean,optional:!0},defaultCollapsed:{type:Boolean,optional:!0},onCollapsedChange:{type:Function,optional:!0},authState:{type:Object,optional:!0},toast:{type:Object,optional:!0},onToastOpenChange:{type:Function,optional:!0},notificationPage:{type:Function,optional:!0},pwa:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ht=class extends n{};o(Ht,"template","baseui.ShellSidebar"),o(Ht,"components",{SidebarContent:St}),o(Ht,"props",qr);vo=class extends n{};o(vo,"template","baseui.ShellSidebarHeader"),o(vo,"props",qr);So=class extends n{};o(So,"template","baseui.ShellNav"),o(So,"props",qr);xo=class extends n{};o(xo,"template","baseui.ShellMain"),o(xo,"props",qr);wo=class extends n{};o(wo,"template","baseui.ShellHeader"),o(wo,"props",qr);Wt=class extends n{};o(Wt,"template","baseui.ShellContent"),o(Wt,"components",{Skeleton:ut}),o(Wt,"props",{loading:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ao=class extends n{get authState(){return this.env.shell.authState}logout(){this.authState?.onLogout?.()}};o(Ao,"template","baseui.ShellUserMenu"),o(Ao,"props",qr)});var Eo,bn=b(()=>{m();Eo=class extends n{get classNames(){let e=["table","baseui-table"];return this.props.striped!==!1&&e.push("table-striped"),this.props.hover!==!1&&e.push("table-hover"),this.props.className&&e.push(this.props.className),e.join(" ")}};o(Eo,"template","baseui.Table"),o(Eo,"props",{striped:{type:Boolean,optional:!0},hover:{type:Boolean,optional:!0},responsive:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var hl,ml,gl,Co,Lo,fl,Kt,hn=b(()=>{m();jr();Y();hl=[{key:"status",label:"Status",format:"capitalize"},{key:"email",label:"Email",sortable:!0,filterable:!0},{key:"amount",label:"Amount",align:"right",format:"currency"}],ml=[{id:"728ed52f",status:"success",email:"ken99@example.com",amount:316},{id:"489e1d42",status:"success",email:"abe45@example.com",amount:242},{id:"6b0888f6",status:"processing",email:"monserrat44@example.com",amount:837},{id:"a1dc8c4e",status:"success",email:"silas22@example.com",amount:874},{id:"15b96de0",status:"failed",email:"carmella@example.com",amount:721}],gl=[{label:"Copy payment ID"},{label:"View customer"},{label:"View payment details"}],Co=4,Lo=8,fl=32,Kt=class extends n{setup(){this.state=g({query:"",sortKey:null,sortDir:1,page:0,pageSize:this.initialPageSize,selectedKeys:[],hiddenColumns:this.columns.filter(e=>e.hidden||e.visible===!1).map(e=>e.key),columnsOpen:!1,actionRowKey:null,actionMenuStyle:null}),this.actionsMenuRef=S("actionsMenu"),this.actionsMenuTriggerEl=null,Or(window,"click",this.onWindowClick,!0),Or(window,"keydown",this.onWindowKeydown),Or(window,"resize",this.closeRowActions),Or(window,"scroll",this.closeRowActions,!0),F(()=>this.refreshActionsMenuPosition())}get columns(){return this.props.columns?.length?this.props.columns:hl}get rows(){return this.props.rows?.length?this.props.rows:ml}get usesDefaultRows(){return!this.props.rows?.length}get initialPageSize(){return this.props["page-size"]??this.props.pageSize??10}get pageSizeOptions(){return this.props["page-size-options"]??this.props.pageSizeOptions??[10,20,50,80]}get rowActions(){return this.props["row-actions"]??this.props.rowActions??(this.usesDefaultRows?gl:[])}get variant(){return this.props.variant||"default"}get classNames(){let e=["baseui-data-table",`baseui-data-table-${this.variant}`];return this.props.className&&e.push(this.props.className),e.join(" ")}get viewportStyle(){let e=this.props["max-height"]??this.props.maxHeight;return e?`max-height: ${typeof e=="number"?`${e}px`:e};`:""}get hasSearch(){return this.props.searchable!==!1}get hasSorting(){return this.props.sortable!==!1}get hasPagination(){return this.props.pagination!==!1}get hasColumnToggle(){return this.props["column-toggle"]??this.props.columnToggle??!0}get hasToolbarActions(){return!!this.props.slots?.toolbarActions}get hasSelection(){return this.props.selectable??this.usesDefaultRows}get visibleColumns(){return this.columns.filter(e=>!this.state.hiddenColumns.includes(e.key))}get visibleRows(){let e=this.state.query.toLowerCase(),s=this.columns.filter(a=>a.filterable===!0),r=(s.length?s:this.columns).map(a=>a.key),i=this.rows.filter(a=>!e||r.some(p=>String(a[p]).toLowerCase().includes(e)));return this.state.sortKey&&(i=[...i].sort((a,p)=>String(a[this.state.sortKey]).localeCompare(String(p[this.state.sortKey]))*this.state.sortDir)),i}get pageCount(){return Math.max(1,Math.ceil(this.visibleRows.length/this.state.pageSize))}get pageRows(){if(!this.hasPagination)return this.visibleRows;let s=Math.min(this.state.page,this.pageCount-1)*this.state.pageSize;return this.visibleRows.slice(s,s+this.state.pageSize)}get selectedCount(){return this.state.selectedKeys.length}get selectionLabel(){return`${this.selectedCount} of ${this.visibleRows.length} row(s) selected.`}get emptyLabel(){return this.props["empty-label"]??this.props.emptyLabel??"No results."}get filterPlaceholder(){return this.props["filter-placeholder"]??this.props.filterPlaceholder??"Filter emails..."}get canPreviousPage(){return this.hasPagination&&this.state.page>0}get canNextPage(){return this.hasPagination&&this.state.page<this.pageCount-1}get pageLabel(){return`Page ${Math.min(this.state.page,this.pageCount-1)+1} of ${this.pageCount}`}rowKey(e,s){return e.id??e.key??s}isSelected(e,s){return this.state.selectedKeys.includes(this.rowKey(e,s))}isColumnSortable(e){return this.hasSorting&&e.sortable===!0}onSearchInput(e){this.state.query=e.target.value,this.state.page=0}sortBy(e){let s=this.columns.find(r=>r.key===e);!s||!this.isColumnSortable(s)||(this.state.sortKey===e?this.state.sortDir=-this.state.sortDir:(this.state.sortKey=e,this.state.sortDir=1))}sortIcon(e){return this.state.sortKey!==e?"arrow-up-down":this.state.sortDir===1?"arrow-up":"arrow-down"}toggleColumn(e){this.state.hiddenColumns.includes(e)?this.state.hiddenColumns=this.state.hiddenColumns.filter(s=>s!==e):this.state.hiddenColumns=[...this.state.hiddenColumns,e]}toggleColumnsMenu(){this.state.columnsOpen=!this.state.columnsOpen}toggleRowActions(e,s,r){let i=this.rowKey(e,s);if(this.state.actionRowKey===i){this.closeRowActions();return}this.actionsMenuTriggerEl=r.currentTarget,this.state.actionRowKey=i,this.state.actionMenuStyle=this.estimateActionMenuStyle(r.currentTarget)}closeRowActions(){this.state.actionRowKey!==null&&(this.state.actionRowKey=null,this.state.actionMenuStyle=null,this.actionsMenuTriggerEl=null)}get openRowAction(){if(this.state.actionRowKey===null)return null;let e=this.pageRows.findIndex((s,r)=>this.rowKey(s,r)===this.state.actionRowKey);return e===-1?null:{row:this.pageRows[e],index:e}}estimateActionMenuStyle(e){let s=e.getBoundingClientRect(),r=this.rowActions.length*fl+Co*2,i=window.innerHeight-s.bottom,p=i<r+Co&&s.top>i?Math.max(Lo,s.top-Co-r):s.bottom+Co,l=Math.min(Math.max(Lo,s.right-160),window.innerWidth-160-Lo);return`position: fixed; top: ${Math.round(p)}px; left: ${Math.round(l)}px;`}refreshActionsMenuPosition(){if(this.state.actionRowKey===null||!this.actionsMenuTriggerEl)return;let e=this.actionsMenuRef.el;if(!e)return;let s=this.actionsMenuTriggerEl.getBoundingClientRect(),r=e.getBoundingClientRect(),i=window.innerHeight-s.bottom,a=s.top,l=i<r.height+Co&&a>i?Math.max(Lo,s.top-Co-r.height):Math.min(s.bottom+Co,window.innerHeight-r.height-Lo),u=Math.min(Math.max(Lo,s.right-r.width),window.innerWidth-r.width-Lo),d=`position: fixed; top: ${Math.round(l)}px; left: ${Math.round(u)}px;`;this.state.actionMenuStyle!==d&&(this.state.actionMenuStyle=d)}onWindowClick(e){this.state.actionRowKey===null||this.actionsMenuRef.el?.contains(e.target)||this.actionsMenuTriggerEl?.contains(e.target)||this.closeRowActions()}onWindowKeydown(e){e.key==="Escape"&&this.closeRowActions()}setPage(e){this.state.page=Math.max(0,Math.min(e,this.pageCount-1))}setPageSize(e){this.state.pageSize=Number(e),this.state.page=0}optionValue(e){return`${e}`}toggleRow(e,s,r){let i=this.rowKey(e,s);this.state.selectedKeys=r?[...new Set([...this.state.selectedKeys,i])]:this.state.selectedKeys.filter(a=>a!==i),this.props.onSelectionChange?.(this.state.selectedKeys)}toggleAllVisible(e){let s=this.pageRows.map((r,i)=>this.rowKey(r,i));this.state.selectedKeys=e?[...new Set([...this.state.selectedKeys,...s])]:this.state.selectedKeys.filter(r=>!s.includes(r)),this.props.onSelectionChange?.(this.state.selectedKeys)}onAction(e,s,r){e.onSelect?.(s,r),this.props.onRowAction?.(e,s,r),this.closeRowActions()}columnLabel(e){return e.label??e.key}cellValue(e,s){let r=e[s.key];if(s.format==="currency"){let i=Number(r);return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(Number.isFinite(i)?i:0)}if(s.format==="capitalize"){let i=String(r??"");return i.charAt(0).toUpperCase()+i.slice(1)}return r??""}cellComponentProps(e,s){return s.componentProps?s.componentProps(e,s):{row:e,column:s,value:e[s.key]}}};o(Kt,"template","baseui.DataTable"),o(Kt,"components",{Button:K,Icon:k}),o(Kt,"props",{columns:{type:Array,optional:!0},rows:{type:Array,optional:!0},variant:{type:String,optional:!0},searchable:{type:Boolean,optional:!0},sortable:{type:Boolean,optional:!0},pagination:{type:Boolean,optional:!0},selectable:{type:Boolean,optional:!0},"column-toggle":{type:Boolean,optional:!0},columnToggle:{type:Boolean,optional:!0},"row-actions":{type:Array,optional:!0},rowActions:{type:Array,optional:!0},"page-size":{type:Number,optional:!0},pageSize:{type:Number,optional:!0},"page-size-options":{type:Array,optional:!0},pageSizeOptions:{type:Array,optional:!0},"filter-placeholder":{type:String,optional:!0},filterPlaceholder:{type:String,optional:!0},"empty-label":{type:String,optional:!0},emptyLabel:{type:String,optional:!0},onRowAction:{type:Function,optional:!0},onSelectionChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"max-height":{type:[String,Number],optional:!0},maxHeight:{type:[String,Number],optional:!0},slots:{type:Object,optional:!0}})});var yl,vl,No,mn=b(()=>{m();yl=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}),vl=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],No=class extends n{get baseDate(){return this.props.selected?new Date(`${this.props.selected}T00:00:00`):new Date}get month0(){return(this.props.month??this.baseDate.getMonth()+1)-1}get year(){return this.props.year??this.baseDate.getFullYear()}get headerLabel(){return yl.format(new Date(this.year,this.month0,1))}get weekdays(){return vl}get days(){let e=new Date(this.year,this.month0+1,0).getDate(),s=new Date(this.year,this.month0,1).getDay(),r=[];for(let i=0;i<s;i++)r.push(null);for(let i=1;i<=e;i++){let a=`${this.year}-${String(this.month0+1).padStart(2,"0")}-${String(i).padStart(2,"0")}`;r.push({day:i,value:a,selected:a===this.props.selected})}return r}onSelect(e){this.props.onChange?.(e)}};o(No,"template","baseui.Calendar"),o(No,"props",{selected:{type:String,optional:!0},month:{type:Number,optional:!0},year:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0}})});var ko,gn=b(()=>{m();ko=class extends n{get classNames(){let e=["baseui-date-picker","form-control"];return this.props.className&&e.push(this.props.className),e.join(" ")}onInput(e){this.props.onChange?.(e.target.value,e)}};o(ko,"template","baseui.DatePicker"),o(ko,"props",{value:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0}})});var Oo,fn=b(()=>{m();da();Oo=class extends n{setup(){this.rootRef=S("root");let{state:e}=$r(this.rootRef);this.disclosure=e,this.state=g({query:this.selectedLabel})}get selectedLabel(){return this.props.options.find(e=>e.value===this.props.value)?.label||""}get filteredOptions(){let e=this.state.query.toLowerCase();return this.props.options.filter(s=>s.label.toLowerCase().includes(e))}onInput(e){this.state.query=e.target.value,this.disclosure.open=!0}onFocus(){this.disclosure.open=!0}choose(e){this.state.query=e.label,this.disclosure.open=!1,this.props.onChange?.(e.value)}};o(Oo,"template","baseui.Combobox"),o(Oo,"props",{options:{type:Array},value:{type:String,optional:!0},placeholder:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},id:{type:String,optional:!0},onChange:{type:Function,optional:!0}})});var jo,yn=b(()=>{m();jo=class extends n{setup(){this.state=g({query:""})}get filteredItems(){let e=this.state.query.toLowerCase();return this.props.items.filter(s=>s.label.toLowerCase().includes(e))}onInput(e){this.state.query=e.target.value}select(e){this.props.onSelect?.(e.value)}};o(jo,"template","baseui.Command"),o(jo,"props",{items:{type:Array},placeholder:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onSelect:{type:Function,optional:!0}})});var Bo,vn=b(()=>{m();Bo=class extends n{get classNames(){let e=["baseui-chart"];return this.props.type&&e.push(`baseui-chart-${this.props.type}`),this.props.variant&&e.push(`baseui-chart-${this.props.variant}`),this.props.className&&e.push(this.props.className),e.join(" ")}};o(Bo,"template","baseui.Chart"),o(Bo,"props",{config:{type:[String,Object],optional:!0},label:{type:String,optional:!0},type:{type:String,optional:!0},value:{type:[String,Number],optional:!0},variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Ga,Io,Ro,$o,To,Sn=b(()=>{m();q();U();Ga={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Io=class extends n{setup(){this.state=g({index:this.props.defaultIndex??0}),this.rootRef=S("root"),this.bootstrapCarousel=null,this.onSlid=e=>{this.state.index=e.to,this.props.onChange?.(this.state.index)},A({carousel:this.state,carouselInstance:()=>this.bootstrapCarousel}),O(()=>{this.bootstrapCarousel=new(w()).Carousel(this.rootRef.el,{interval:!1,wrap:!0,touch:!0}),this.rootRef.el.addEventListener("slid.bs.carousel",this.onSlid)}),j(()=>{this.rootRef.el.removeEventListener("slid.bs.carousel",this.onSlid),this.bootstrapCarousel?.dispose()})}};o(Io,"template","baseui.Carousel"),o(Io,"props",{slideCount:{type:Number},defaultIndex:{type:Number,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ro=class extends n{setup(){this.rootRef=S("root"),this.initialActive=this.active,F(()=>{if(!this.rootRef.el)return;let e=this.rootRef.el.classList.contains("active");this.active&&!e?this.rootRef.el.classList.add("active"):!this.active&&e&&this.rootRef.el.classList.remove("active")})}get active(){return this.props.state!==void 0?_(this.props.state):this.env.carousel.index===this.props.index}};o(Ro,"template","baseui.CarouselSlide"),o(Ro,"props",{index:{type:Number},state:{type:String,optional:!0},...Ga});$o=class extends n{onClick(){this.env.carouselInstance()?.prev()}};o($o,"template","baseui.CarouselPrevious"),o($o,"props",Ga);To=class extends n{onClick(){this.env.carouselInstance()?.next()}};o(To,"template","baseui.CarouselNext"),o(To,"props",Ga)});var Uo,xn=b(()=>{m();Uo=class extends n{setup(){this.panelRef=S("panel"),this.state=g({width:null})}get panelStyle(){return this.state.width?`width:${this.state.width}px`:""}onPointerDown(e){let s=e.clientX,r=this.panelRef.el.getBoundingClientRect().width,i=this.props.min||160,a=this.props.max||720,p=u=>{this.state.width=Math.min(a,Math.max(i,r+u.clientX-s))},l=()=>{document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",l),this.props.onChange?.(this.state.width)};document.addEventListener("pointermove",p),document.addEventListener("pointerup",l)}};o(Uo,"template","baseui.Resizable"),o(Uo,"props",{min:{type:Number,optional:!0},max:{type:Number,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var qo,wn=b(()=>{m();qo=class extends n{get classNames(){let e=["baseui-scroll-area"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(qo,"template","baseui.ScrollArea"),o(qo,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var An,En,ma,Mo,zo,Po,Do,Fo,_o,Ho,Wo,Ko,Vo,Cn=b(()=>{m();te();An={idle:"baseui-attachment-idle",uploading:"baseui-attachment-uploading",processing:"baseui-attachment-processing",error:"baseui-attachment-error",done:"baseui-attachment-done"},En={default:"baseui-attachment-default",sm:"baseui-attachment-sm",xs:"baseui-attachment-xs"},ma={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Mo=class extends n{get state(){return An[this.props.state]?this.props.state:"done"}get size(){return En[this.props.size]?this.props.size:"default"}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){let e=["baseui-attachment",An[this.state],En[this.size],`baseui-attachment-${this.orientation}`];return this.hasContent||e.push("baseui-attachment-picker"),this.props.className&&e.push(this.props.className),e.join(" ")}get hasContent(){return!!this.props.slots?.default}onChange(e){this.props.onChange?.([...e.target.files])}};o(Mo,"template","baseui.Attachment"),o(Mo,"props",{state:{type:String,optional:!0},size:{type:String,optional:!0},orientation:{type:String,optional:!0},multiple:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});zo=class extends n{get variant(){return this.props.variant==="image"?"image":"icon"}get classNames(){let e=["baseui-attachment-media",`baseui-attachment-media-${this.variant}`];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(zo,"template","baseui.AttachmentMedia"),o(zo,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Po=class extends n{};o(Po,"template","baseui.AttachmentContent"),o(Po,"props",ma);Do=class extends n{};o(Do,"template","baseui.AttachmentTitle"),o(Do,"props",ma);Fo=class extends n{};o(Fo,"template","baseui.AttachmentDescription"),o(Fo,"props",ma);_o=class extends n{};o(_o,"template","baseui.AttachmentActions"),o(_o,"props",ma);Ho=class extends n{get classNames(){let e=this.props.size||"icon-xs",s=["btn","baseui-button",P[this.props.variant]||P.ghost,M[e]||M["icon-xs"],"baseui-button-icon","baseui-attachment-action"];return this.props.className&&s.push(this.props.className),s.join(" ")}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};o(Ho,"template","baseui.AttachmentAction"),o(Ho,"props",{type:{type:String,optional:!0},variant:{type:String,optional:!0},size:{type:String,optional:!0},disabled:{type:Boolean,optional:!0},label:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},onClick:{type:Function,optional:!0},slots:{type:Object,optional:!0}});Wo=class extends n{get classNames(){let e=["baseui-attachment-trigger"];return this.props.className&&e.push(this.props.className),e.join(" ")}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};o(Wo,"template","baseui.AttachmentTrigger"),o(Wo,"props",{href:{type:String,optional:!0},target:{type:String,optional:!0},rel:{type:String,optional:!0},type:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},"aria-label":{type:String,optional:!0},ariaLabel:{type:String,optional:!0},onClick:{type:Function,optional:!0}});Ko=class extends n{get classNames(){let e=["baseui-attachment-group"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(Ko,"template","baseui.AttachmentGroup"),o(Ko,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Vo=class extends n{setup(){this.state=g({dragging:!1}),this.fileInput=S("fileInput")}get hasContent(){return!!this.props.slots?.default}get classNames(){let e=["baseui-attachment-dropzone"];return this.state.dragging&&e.push("baseui-attachment-dropzone-dragging"),this.props.disabled&&e.push("baseui-attachment-dropzone-disabled"),this.props.className&&e.push(this.props.className),e.join(" ")}openPicker(){this.props.disabled||this.fileInput.el?.click()}onInputChange(e){let s=Array.from(e.target.files??[]);e.target.value="",s.length&&this.props.onFilesSelected?.(s)}onDragOver(e){e.preventDefault(),!this.props.disabled&&(this.state.dragging=!0)}onDragLeave(){this.state.dragging=!1}onDrop(e){if(e.preventDefault(),this.state.dragging=!1,this.props.disabled)return;let s=Array.from(e.dataTransfer?.files??[]);s.length&&this.props.onFilesSelected?.(s)}};o(Vo,"template","baseui.AttachmentDropzone"),o(Vo,"props",{multiple:{type:Boolean,optional:!0},disabled:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onFilesSelected:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var Zo,Ln=b(()=>{m();Zo=class extends n{setup(){this.state=g({errored:!1})}get showImage(){return!!this.props.src&&!this.state.errored}onError(){this.state.errored=!0}};o(Zo,"template","baseui.Avatar"),o(Zo,"props",{src:{type:String,optional:!0},alt:{type:String,optional:!0},title:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Xo,Nn=b(()=>{m();Xo=class extends n{get classNames(){let e=["baseui-message"];return this.props.className&&e.push(this.props.className),e.join(" ")}get side(){return this.props.side||"incoming"}};o(Xo,"template","baseui.Message"),o(Xo,"props",{side:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Go,kn=b(()=>{m();Go=class extends n{setup(){this.rootRef=S("root"),G(()=>{this.props.autoscroll!==!1&&this.rootRef.el&&(this.rootRef.el.scrollTop=this.rootRef.el.scrollHeight)})}};o(Go,"template","baseui.MessageScroller"),o(Go,"props",{autoscroll:{type:Boolean,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var Ya,Yo,Jo,Qo,tr,On=b(()=>{m();U();Ya={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},Yo=class extends n{setup(){this.state=g({index:0}),A({questionnaire:this.state,questionnaireShow:e=>this.show(e)})}show(e){this.state.index=Math.min(this.props.stepCount-1,Math.max(0,e)),this.props.onChange?.(this.state.index)}};o(Yo,"template","baseui.Questionnaire"),o(Yo,"props",{stepCount:{type:Number},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Jo=class extends n{get active(){return this.props.state!==void 0?_(this.props.state):this.env.questionnaire.index===this.props.index}};o(Jo,"template","baseui.QuestionnaireStep"),o(Jo,"props",{index:{type:Number},state:{type:String,optional:!0},...Ya});Qo=class extends n{get disabled(){return this.env.questionnaire.index===0}onClick(){this.env.questionnaireShow(this.env.questionnaire.index-1)}};o(Qo,"template","baseui.QuestionnairePrevious"),o(Qo,"props",Ya);tr=class extends n{onClick(){this.env.questionnaireShow(this.env.questionnaire.index+1)}};o(tr,"template","baseui.QuestionnaireNext"),o(tr,"props",{...Ya,stepCount:{type:Number,optional:!0}})});var er,jn=b(()=>{m();U();er=class extends n{get max(){return this.props.max||100}get value(){return Math.min(this.max,Math.max(0,this.props.value||0))}get style(){return J(`--baseui-progress-value:${this.value/this.max*100}%`,this.props.style)}get classNames(){let e=["baseui-progress"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(er,"template","baseui.Progress"),o(er,"props",{value:{type:Number,optional:!0},max:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var sr,Bn=b(()=>{m();U();sr=class extends n{get classNames(){let e=["baseui-aspect-ratio"];return this.props.className&&e.push(this.props.className),e.join(" ")}get style(){let e=this.props.ratio||`${this.props.width||16} / ${this.props.height||9}`;return J(`--baseui-aspect-ratio:${e}`,this.props.style)}};o(sr,"template","baseui.AspectRatio"),o(sr,"props",{ratio:{type:String,optional:!0},width:{type:Number,optional:!0},height:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var or,In=b(()=>{m();or=class extends n{get classNames(){let e=["baseui-bubble"];return this.props.className&&e.push(this.props.className),e.join(" ")}get side(){return this.props.side}};o(or,"template","baseui.Bubble"),o(or,"props",{side:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var rr,Rn=b(()=>{m();rr=class extends n{get dir(){return this.props.dir==="rtl"?"rtl":"ltr"}};o(rr,"template","baseui.Direction"),o(rr,"props",{dir:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var ar,$n=b(()=>{m();ar=class extends n{get classNames(){let e=["baseui-item"];return this.props.className&&e.push(this.props.className),e.join(" ")}get variant(){return this.props.variant}};o(ar,"template","baseui.Item"),o(ar,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var ir,nr,pr,Tn=b(()=>{m();ir=class extends n{get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){let e=["baseui-button-group",this.orientation==="vertical"?"btn-group-vertical":"btn-group"];return(this.props.size==="sm"||this.props.size==="lg")&&e.push(`btn-group-${this.props.size}`),this.props.className&&e.push(this.props.className),e.join(" ")}get ariaLabel(){return this.props["aria-label"]}get ariaLabelledby(){return this.props["aria-labelledby"]}};o(ir,"template","baseui.ButtonGroup"),o(ir,"props",{orientation:{type:String,optional:!0},size:{type:String,optional:!0},"aria-label":{type:String,optional:!0},"aria-labelledby":{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});nr=class extends n{get orientation(){return this.props.orientation==="horizontal"?"horizontal":"vertical"}get classNames(){let e=["baseui-button-group-separator",`baseui-button-group-separator-${this.orientation}`];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(nr,"template","baseui.ButtonGroupSeparator"),o(nr,"props",{orientation:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}});pr=class extends n{get classNames(){let e=["baseui-button-group-text"];return this.props.className&&e.push(this.props.className),e.join(" ")}};o(pr,"template","baseui.ButtonGroupText"),o(pr,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});var lr,cr,Et,Ct,ur,Lt,dr,Nt,br,kt,Ja=b(()=>{m();U();lr=class extends n{get classNames(){return W("baseui-field-set",this.props.className)}};o(lr,"template","baseui.FieldSet"),o(lr,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});cr=class extends n{get variant(){return this.props.variant||"legend"}get classNames(){return W("baseui-field-legend",this.props.className)}};o(cr,"template","baseui.FieldLegend"),o(cr,"props",{variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Et=class extends n{get classNames(){return W("baseui-field-group",this.props.className)}};o(Et,"template","baseui.FieldGroup"),o(Et,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Ct=class extends n{get orientation(){return this.props.orientation||"vertical"}get classNames(){return W("baseui-field",`baseui-field-orientation-${this.orientation}`,this.props.className)}};o(Ct,"template","baseui.Field"),o(Ct,"props",{orientation:{type:String,optional:!0},invalid:{type:Boolean,optional:!0},label:{type:String,optional:!0},error:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});ur=class extends n{get classNames(){return W("baseui-field-content",this.props.className)}};o(ur,"template","baseui.FieldContent"),o(ur,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Lt=class extends n{get classNames(){return W("baseui-field-label",this.props.className)}};o(Lt,"template","baseui.FieldLabel"),o(Lt,"props",{for:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});dr=class extends n{get classNames(){return W("baseui-field-title",this.props.className)}};o(dr,"template","baseui.FieldTitle"),o(dr,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});Nt=class extends n{get classNames(){return W("baseui-field-description",this.props.className)}};o(Nt,"template","baseui.FieldDescription"),o(Nt,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});br=class extends n{get hasContent(){return!!this.props.slots?.default}get classNames(){return W("baseui-field-separator",this.props.className)}};o(br,"template","baseui.FieldSeparator"),o(br,"props",{className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});kt=class extends n{get classNames(){return W("baseui-field-error",this.props.className)}};o(kt,"template","baseui.FieldError"),o(kt,"props",{message:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});function Qa(t){return`Icon${String(t).split("-").filter(Boolean).map(s=>s[0].toUpperCase()+s.slice(1)).join("")}`}var Un=b(()=>{});var hr,qn=b(()=>{m();hr=class extends n{get classNames(){let e=["form-label","b-label","baseui-label"];return this.props.className&&e.push(this.props.className),e.join(" ")}get state(){return this.props.state||(this.props.required?"required":void 0)}};o(hr,"template","baseui.Label"),o(hr,"props",{for:{type:String,optional:!0},required:{type:Boolean,optional:!0},state:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}})});function ti(t){return t==="dark"?"dark":"light"}function El(t){return typeof globalThis.location>"u"?null:new URLSearchParams(globalThis.location.search).get(t)}function Cl(t,e=document.documentElement){let s=ti(t);return globalThis.BaseUI?.theme?.set?globalThis.BaseUI.theme.set(s):e&&(e.setAttribute("b-theme",s),e.setAttribute("data-bs-theme",s)),s}function Mn(t,e,s){try{t.contentWindow?.BaseUI?.theme.set(e),t.contentDocument?.documentElement.setAttribute("b-theme",e),t.contentDocument?.documentElement.setAttribute("data-bs-theme",e)}catch{let r=new URL(t.getAttribute("src"),globalThis.location.href);r.searchParams.set(s,e),t.setAttribute("src",r.pathname+r.search+r.hash)}}function Ll(t){typeof document>"u"||typeof CustomEvent>"u"||document.dispatchEvent(new CustomEvent("baseui:theme-change",{detail:{theme:t}}))}function Vt(t={}){let e=t.storageKey||Sl,s=t.queryKey||xl,r=t.toggleSelector??wl,i=t.labelSelector??Al,a=t.root||(typeof document>"u"?null:document.documentElement);function p(){return El(s)}function l(){return ti(p()||globalThis.localStorage?.getItem(e)||a?.getAttribute("b-theme")||"light")}function u(E){typeof document>"u"||!r||document.querySelectorAll(r).forEach(L=>{L.setAttribute("aria-pressed",E==="dark"?"true":"false");let x=i?L.querySelector(i):null;x&&(x.textContent=E==="dark"?"Light theme":"Dark theme")})}function d(E){typeof document>"u"||document.querySelectorAll("iframe").forEach(L=>Mn(L,E,s))}function h(E,L={}){let x=Cl(E,a);return!L.skipStorage&&!p()&&globalThis.localStorage?.setItem(e,x),u(x),d(x),Ll(x),x}function f(){return h(a?.getAttribute("b-theme")==="dark"?"light":"dark")}function v(){if(typeof document>"u")return l();let E=l();return h(E,{skipStorage:!!p()}),r&&document.addEventListener("click",L=>{L.target.closest?.(r)&&f()}),document.querySelectorAll("iframe").forEach(L=>{L.addEventListener("load",()=>Mn(L,a?.getAttribute("b-theme")||E,s))}),E}return{current:l,set:h,toggle:f,syncFrames:d,init:v}}var Sl,xl,wl,Al,zn,Zr=b(()=>{Sl="baseui-theme",xl="theme",wl="[b-theme-toggle]",Al="[b-theme-label]";zn=Vt();typeof window<"u"&&(window.BaseUITheme=zn)});function Mr(t){let e=t==="dark";return{icon:e?"sun":"moon",label:e?"Switch to light theme":"Switch to dark theme",pressed:e?"true":"false"}}function ga({variant:t="outline",size:e,className:s}={}){let r=["btn","baseui-theme-button",P[t]||P.outline];return M[e]&&r.push(M[e]),s&&r.push(s),r.join(" ")}var Pn,ei=b(()=>{te();Pn=["btn","baseui-theme-button",...Object.values(P),...Object.values(M)]});var nt,si=b(()=>{m();Zr();Y();U();ei();nt=class extends n{setup(){this.theme=Vt({storageKey:Z(this.props,"storage-key","storageKey")}),this.state=g({theme:this.theme.current()}),this.onThemeChange=e=>{this.state.theme=e.detail?.theme||this.theme.current()},O(()=>{this.state.theme=this.theme.set(this.theme.current(),{skipStorage:!0}),document.addEventListener("baseui:theme-change",this.onThemeChange)}),j(()=>document.removeEventListener("baseui:theme-change",this.onThemeChange))}get iconName(){return Mr(this.state.theme).icon}get baseUrl(){return Z(this.props,"base-url")}get label(){return Mr(this.state.theme).label}get pressed(){return Mr(this.state.theme).pressed}get classNames(){return ga(this.props)}onClick(){let e=this.theme.toggle();this.state.theme=e,this.props.onChange?.(e)}};o(nt,"template","baseui.ThemeButton"),o(nt,"components",{Icon:k}),o(nt,"props",{variant:{type:String,optional:!0},size:{type:String,optional:!0},"base-url":{type:String,optional:!0},"storage-key":{type:String,optional:!0},storageKey:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0}})});var mr,Dn=b(()=>{m();U();mr=class extends n{get classNames(){let e=["baseui-toggle","btn",this.props.variant==="outline"?"btn-outline-secondary":"btn-light"];return this.props.className&&e.push(this.props.className),e.join(" ")}get pressed(){return this.props.state!==void 0?_(this.props.state):!!this.props.pressed}onClick(){this.props.onChange?.(!this.pressed)}};o(mr,"template","baseui.Toggle"),o(mr,"props",{pressed:{type:Boolean,optional:!0},state:{type:String,optional:!0},variant:{type:String,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}})});var Nl,gr,fr,Fn=b(()=>{m();Nl={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},gr=class extends n{setup(){this.state=g({selected:new Set}),A({toggleGroup:this.state,toggleGroupSelect:e=>this.select(e)})}select(e){this.props.multiple?this.state.selected.has(e)?this.state.selected.delete(e):this.state.selected.add(e):this.state.selected=this.state.selected.has(e)?new Set:new Set([e]);let s=this.props.multiple?[...this.state.selected]:[...this.state.selected][0];this.props.onChange?.(s)}};o(gr,"template","baseui.ToggleGroup"),o(gr,"props",{multiple:{type:Boolean,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}});fr=class extends n{get pressed(){return this.env.toggleGroup.selected.has(this.props.value)}onClick(){this.env.toggleGroupSelect(this.props.value)}};o(fr,"template","baseui.ToggleGroupItem"),o(fr,"props",{value:{type:String},...Nl})});var Gn={};La(Gn,{destroyBaseUiPreviews:()=>zr,enhanceMarkdownDiagrams:()=>Gr,expandSelfClosingTags:()=>Xl,extractTagCaseMap:()=>$l,mountMarkdownEditor:()=>Yr,normalizeOwlPreviewMarkup:()=>Yl,parseMarkdown:()=>Xr,primeBaseUiTemplates:()=>Jl,renderBaseUiBlocks:()=>Xn,renderMermaidBlocks:()=>Vn});function Ol(){return oi??(oi=import("./runtime/marked/marked.min.js").then(t=>{let e=t.marked||t.default?.marked||globalThis.marked;if(!e?.parse)throw new Error("BaseUI markdown: failed to load src/runtime/marked/marked.min.js");return e})),oi}function jl(){return ri??(ri=import("./runtime/mermaid/mermaid.esm.min.mjs").then(t=>{let e=t.default||t;return e.initialize({startOnLoad:!1,securityLevel:"strict"}),e})),ri}function Bl(){return ai??(ai=import("./runtime/milkdown/milkdown-editor.js")),ai}async function Xr(t,e={}){return(await Ol()).parse(String(t??""),{gfm:!0,breaks:!1,...e})}function ni(t,e,s,r=""){t.classList.add("baseui-markdown-diagram-error"),t.replaceChildren();let i=document.createElement("p");if(i.className="baseui-markdown-diagram-error-message",i.textContent=`Unable to render ${e} diagram: ${s?.message||s}`,t.append(i),r){let a=document.createElement("pre"),p=document.createElement("code");p.textContent=r,a.append(p),t.append(a)}}async function Vn(t){let e=[...t.querySelectorAll("pre > code.language-mermaid")];if(!e.length)return;let s;try{s=await jl()}catch(r){e.forEach(i=>{let a=i.closest("pre");a.replaceChildren(),a.className="baseui-markdown-diagram baseui-markdown-mermaid",ni(a,"mermaid",r,i.textContent)});return}for(let r of e){let i=r.textContent,a=r.closest("pre");a.replaceChildren(),a.className="baseui-markdown-diagram baseui-markdown-mermaid";try{let{svg:p}=await s.render(`baseui-mermaid-${++kl}`,i);a.innerHTML=p}catch(p){ni(a,"mermaid",p,i)}}}function Il(t){let e=globalThis.BaseUI;if(!e?.mountAll)return;let s=document.createElement("div");s.setAttribute("b-ui","toast"),s.setAttribute("b-att-state","open"),s.setAttribute("b-att-delay","2000"),s.className="baseui-markdown-baseui-copy-toast",s.textContent=t,document.body.append(s),e.mountAll(s),s.addEventListener("baseui:close",()=>s.remove(),{once:!0})}function Rl(t){let e=document.createElement("div");e.className="baseui-markdown-baseui-code";let s=document.createElement("button");s.type="button",s.className="baseui-markdown-baseui-copy";let r=document.createElement("span");z(r,"copy",{label:"Copy code"}),s.append(r),s.addEventListener("click",async()=>{try{await Br(t),s.dispatchEvent(new CustomEvent("baseui:markdown-copy",{bubbles:!0,detail:{source:t}})),Il("Copied to clipboard")}catch(p){s.dispatchEvent(new CustomEvent("baseui:markdown-copy-error",{bubbles:!0,detail:{error:p}}))}}),e.append(s);let i=document.createElement("pre"),a=document.createElement("code");a.className="baseui-markdown-baseui-code-lines";for(let p of t.replace(/\n$/,"").split(`
11
+ `)){let l=document.createElement("span");l.className="baseui-markdown-baseui-code-line",l.textContent=p,a.append(l)}return i.append(a),e.append(i),e}function _n(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function $l(t){let e=new Map;for(let s of t.matchAll(/<\/?([A-Z][A-Za-z0-9]*)\b/g))e.set(s[1].toLowerCase(),s[1]);return e}function Tl(t){return e=>{if(e.hasAttribute("b-ui"))return e;let s=globalThis.BaseUI,r=t.get(e.localName)||e.localName,i=_n(r),a=!!s?.component?.(i),p=I(e.getAttribute("className")||e.getAttribute("class"));if(!a){let l=`baseui-${i}`;return e.className=p?`${l} ${p}`:l,e}e.setAttribute("b-ui",i),p&&(e.className=p);for(let l of[...e.attributes]){if(l.name==="class"||l.name==="className"||l.name==="b-ui"||/^on[A-Z]/.test(l.name))continue;let u=I(l.value);e.removeAttribute(l.name),!(u===""||u==="false")&&e.setAttribute(`b-att-${_n(l.name)}`,u==="true"?"true":u)}return e}}function I(t){if(!t)return"";let e=t.trim();return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function ya(t,e){for(;t.firstChild;)e.append(t.firstChild)}function tt(t,e){return ya(t,e),t.replaceWith(e),e}function Ul(t){let e=document.createElement("div");e.setAttribute("b-field-group","");let s=I(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),tt(t,e)}function ql(t){let e=document.createElement("div");e.setAttribute("b-ui","field");let s=I(t.getAttribute("orientation")||""),r=I(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("b-att-orientation",s),r&&(e.className=r),tt(t,e)}function Ml(t){let e=document.createElement("label");e.setAttribute("b-field-label","");let s=I(t.getAttribute("for")||""),r=I(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("for",s),r&&(e.className=r),tt(t,e)}function Hn(t,e,s){let r=document.createElement(e);r.setAttribute(s,"");let i=I(t.getAttribute("className")||t.getAttribute("class"));return i&&(r.className=i),tt(t,r)}function zl(t){let e=t.getAttribute("type")||"",s=t.hasAttribute("variant")||t.hasAttribute("size")||t.hasAttribute("className")||t.hasAttribute("onClick")||t.hasAttribute("label")||e.trim().startsWith("'")||e.trim().startsWith('"');if(t.hasAttribute("b-ui")||!s)return t;let r=document.createElement("button");r.setAttribute("b-ui","button");let i=I(e||"button"),a=I(t.getAttribute("variant")||""),p=I(t.getAttribute("size")||""),l=I(t.getAttribute("className")||t.getAttribute("class")),u=I(t.getAttribute("label")||"");return r.type=i||"button",a&&r.setAttribute("b-att-variant",a),p&&r.setAttribute("b-att-size",p),l&&(r.className=l),u&&!t.childNodes.length&&(r.textContent=u),tt(t,r)}function Pl(t){if(t.hasAttribute("b-ui")||t.hasAttribute("b-icon"))return t;let e=I(t.getAttribute("name")||t.getAttribute("icon")||"");if(!e)return t;let s=document.createElement("span");s.setAttribute("b-ui","icon"),s.setAttribute("b-att-icon",e);let r=I(t.getAttribute("size")||""),i=I(t.getAttribute("label")||""),a=I(t.getAttribute("className")||t.getAttribute("class"));return r&&s.setAttribute("b-att-size",r),i&&s.setAttribute("b-att-label",i),a&&(s.className=a),tt(t,s)}function Dl(t){if(t.hasAttribute("b-ui"))return t;let e=document.createElement("div");e.setAttribute("b-ui","alert");let s=I(t.getAttribute("variant")||""),r=I(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("b-att-variant",s),r&&(e.className=r),tt(t,e)}function ii(t){return e=>{if(e.hasAttribute("b-ui"))return e;let s=document.createElement("div"),r=I(e.getAttribute("className")||e.getAttribute("class"));return s.className=r?`${t} ${r}`:t,tt(e,s)}}function Fl(t){if(t.hasAttribute("b-ui"))return t;let e=document.createElement("div");e.setAttribute("b-ui","accordion"),I(t.getAttribute("multiple"))==="true"&&e.setAttribute("b-att-multiple","true");let s=I(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),tt(t,e)}function _l(t){if(t.hasAttribute("b-accordion-item"))return t;let e=document.createElement("div");e.setAttribute("b-accordion-item",""),I(t.getAttribute("state"))==="open"&&e.setAttribute("b-att-state","open");let s=I(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),tt(t,e)}function Hl(t){if(t.hasAttribute("b-accordion-trigger"))return t;let e=document.createElement("button");e.type="button",e.setAttribute("b-accordion-trigger","");let s=I(t.getAttribute("className")||t.getAttribute("class"));s&&(e.className=s),ya(t,e);let r=document.createElement("span");return r.setAttribute("b-icon","chevron-down"),r.className="baseui-accordion-trigger-icon",e.append(r),t.replaceWith(e),e}function Wl(t){if(t.hasAttribute("b-accordion-panel"))return t;let e=document.createElement("div");e.setAttribute("b-accordion-panel","");let s=I(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),tt(t,e)}function Kl(t){return Wn+=1,`${t}-${Wn}`}function Q(t,e,s){return r=>{if(r.hasAttribute("b-ui"))return r;let i=document.createElement(t);t==="button"&&(i.type="button"),s&&i.setAttribute(s,"");let a=I(r.getAttribute("className")||r.getAttribute("class"));return i.className=a?`${e} ${a}`:e,tt(r,i)}}function Vl(){let t=document.createElement("button");t.type="button",t.className="btn baseui-button btn-light btn-icon-sm baseui-dialog-close baseui-dialog-close-control",t.setAttribute("b-dialog-close",""),t.setAttribute("aria-label","Close");let e=document.createElement("span");e.setAttribute("b-ui","icon"),e.setAttribute("b-att-icon","x");let s=document.createElement("span");return s.className="visually-hidden",s.textContent="Close",t.append(e,s),t}function Kn({tagPrefix:t,componentName:e,triggerTag:s,triggerClassName:r,panelClassName:i,closeButton:a}){return p=>{if(p.hasAttribute("b-ui"))return p;let l=p.querySelector(`:scope > ${t}trigger`),u=p.querySelector(`:scope > ${t}content`);if(!u)return p;let d=Kl(`baseui-preview-${e}`),h=document.createElement(s);s==="button"&&(h.type="button"),h.className=r,h.setAttribute("b-att-trigger",`#${d}`),l&&ya(l,h);let f=document.createElement("div");f.setAttribute("b-ui",e),f.id=d,f.setAttribute("b-att-trigger",`[b-att-trigger='#${d}']`);let v=document.createElement("div");v.className=i;let E=I(u.getAttribute("size")||"");return E&&v.setAttribute("data-size",E),ya(u,v),a&&v.append(a()),f.append(v),p.before(h,f),p.remove(),f}}function Xl(t){return t.replace(/<([a-zA-Z][a-zA-Z0-9-]*)((?:"[^"]*"|'[^']*'|[^"'>])*?)\/>/g,(e,s,r)=>Zl.has(s.toLowerCase())?e:`<${s}${r}></${s}>`)}function Gl(t){t.querySelectorAll("t[t-esc]").forEach(e=>{let r=e.getAttribute("t-esc")?.includes(".length")?"0":"";e.replaceWith(document.createTextNode(`${r}${e.textContent||""}`))})}function Yl(t,e){Gl(t);let s={fieldgroup:Ul,field:ql,fieldlabel:Ml,fielddescription:i=>Hn(i,"p","b-field-description"),fielderror:i=>Hn(i,"p","b-field-error"),button:zl,icon:Pl,alert:Dl,alerttitle:ii("baseui-alert-title"),alertdescription:ii("baseui-alert-description"),alertaction:ii("baseui-alert-action"),accordion:Fl,accordionitem:_l,accordiontrigger:Hl,accordioncontent:Wl,dialog:Kn({tagPrefix:"dialog",componentName:"dialog",triggerTag:"span",triggerClassName:"baseui-dialog-trigger",panelClassName:"baseui-dialog-panel",closeButton:Vl}),dialogheader:Q("div","baseui-dialog-header"),dialogfooter:Q("div","baseui-dialog-footer"),dialogtitle:Q("h2","baseui-dialog-title"),dialogdescription:Q("p","baseui-dialog-description"),dialogclose:Q("button","btn baseui-button btn-outline-secondary baseui-dialog-close","b-dialog-close"),alertdialog:Kn({tagPrefix:"alertdialog",componentName:"alert-dialog",triggerTag:"button",triggerClassName:"btn baseui-button btn-outline-secondary baseui-alert-dialog-trigger",panelClassName:"baseui-dialog-panel baseui-alert-dialog-panel"}),alertdialogheader:Q("div","baseui-dialog-header baseui-alert-dialog-header"),alertdialogfooter:Q("div","baseui-dialog-footer baseui-alert-dialog-footer"),alertdialogmedia:Q("div","baseui-alert-dialog-media"),alertdialogtitle:Q("h2","baseui-dialog-title baseui-alert-dialog-title"),alertdialogdescription:Q("p","baseui-dialog-description baseui-alert-dialog-description"),alertdialogcancel:Q("button","btn baseui-button btn-outline-secondary baseui-alert-dialog-cancel","b-alert-dialog-cancel"),alertdialogaction:Q("button","btn baseui-button btn-primary baseui-alert-dialog-action","b-alert-dialog-action")},r=Tl(e);for(let i of[...t.querySelectorAll("*")]){let a=i.localName.toLowerCase();s[a]?s[a](i):e.has(a)&&r(i)}}function Jl(t){fa=Promise.resolve(t)}function Ql(){return fa??(fa=Hr("/dist/baseui.templates.xml")),fa}function zr(t){let e=pi.get(t);if(e){pi.delete(t);for(let s of e)try{s.destroy()}catch{}}}function ec(t){return new Set([...t.matchAll(tc)].map(e=>e[1]))}function rc(t){let e=new Set;for(let s of t.matchAll(sc))e.add(s[1]);for(let s of t.matchAll(oc))e.add(s[2]);return e}function ac(t){let e=wi({raw:[t]}),s=ec(t);class r extends n{setup(){this.state=g(Object.fromEntries([...s].map(a=>[a,""])))}}o(r,"template",e);for(let i of rc(t))r.prototype[i]=function(){};return r}function Zn(t){t.querySelector("[data-slot='dropdown-menu'], .baseui-dropdown-menu, [b-ui='dropdown-menu'], [b-dropdown-menu]")&&t.classList.add("baseui-markdown-baseui-preview-overlay")}async function ic(t,e){let[s,r]=await Promise.all([Ql(),ac(e)]),i=await oa(r,t,{templates:s});return Zn(t),i}function nc(t,e){let s=globalThis.BaseUI;if(!s?.mountAll)throw new Error("BaseUI runtime not found on the page \u2014 load dist/baseui.min.js before mounting Markdown.");t.innerHTML=e,Zn(t),s.mountAll(t)}async function Xn(t){zr(t);let e=[...t.querySelectorAll("pre > code.language-base-ui")];if(!e.length)return;let s=new Set;for(let r of e){let i=r.textContent,a=r.closest("pre");a.replaceChildren(),a.className="baseui-markdown-live baseui-markdown-baseui";let p=document.createElement("div");p.className="baseui-markdown-baseui-preview",a.append(p,Rl(i));try{/<[A-Z]/.test(i)?s.add(await ic(p,i)):nc(p,i)}catch(l){ni(a,"BaseUI component",l,i)}}s.size&&pi.set(t,s)}async function Gr(t,{mermaid:e=!0,baseUi:s=!0}={}){e&&await Vn(t),s&&await Xn(t)}async function Yr(t){return(await Bl()).createMilkdownMarkdownEditor(t)}var oi,ri,ai,kl,Wn,Zl,fa,pi,tc,sc,oc,va=b(()=>{m();st();na();kl=0;Wn=0;Zl=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);pi=new WeakMap;tc=/\bstate\.([A-Za-z_$][\w$]*)/g;sc=/\bthis\.([A-Za-z_$][\w$]*)\s*\(/g,oc=/\bt-on-[\w:-]+\s*=\s*(["'])([A-Za-z_$][\w$]*)\1/g});function Sa(t){let e=String(t??""),s=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e);if(!s)return{data:{},content:e};let r={};for(let i of s[1].split(/\r?\n/)){let a=i.trim();if(!a||a.startsWith("#"))continue;let p=a.indexOf(":");if(p===-1)continue;let l=a.slice(0,p).trim();l&&(r[l]=pc(a.slice(p+1).trim()))}return{data:r,content:e.slice(s[0].length)}}function Yn(t){return t.length>=2&&(t[0]==='"'&&t.at(-1)==='"'||t[0]==="'"&&t.at(-1)==="'")?t.slice(1,-1):t}function pc(t){if(t==="")return"";if(t==="true")return!0;if(t==="false")return!1;if(/^-?\d+(\.\d+)?$/.test(t))return Number(t);if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1).trim();return e?e.split(",").map(s=>Yn(s.trim())):[]}return Yn(t)}var li=b(()=>{});var Zt,Jn=b(()=>{m();Ua();va();li();Zt=class extends n{setup(){this.rootRef=S("root"),this.editorRef=S("editor"),this.editorHandle=null,this.state=g({html:"",source:"",status:"loading",error:"",frontmatter:{}}),Qt(()=>this.load(this.props)),R(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),O(()=>this.afterRender()),F(()=>this.afterRender()),Wr(()=>{this.destroyEditor(),this.rootRef.el&&zr(this.rootRef.el)})}get classNames(){let e=["baseui-markdown"];return this.props.className&&e.push(this.props.className),e.join(" ")}get editorLabel(){return this.props.collaborative?"Collaborative Markdown editor":"Markdown editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.editable!==this.props.editable||e.collaborative!==this.props.collaborative||e.room!==this.props.room||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);s=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}try{this.state.source=s;let{data:r,content:i}=Sa(s);this.state.frontmatter=r,this.state.html=Oa(await Xr(i)),this.state.status="ready"}catch(r){this.state.status="error",this.state.error=r.message||String(r)}}get hasFrontmatterMeta(){let e=this.state.frontmatter;return!!(e.tags?.length||e.authors?.length)}enhance(){let e=this.rootRef.el;!e||this.state.status!=="ready"||Gr(e,{mermaid:this.props.mermaid!==!1,baseUi:this.props.baseUi!==!1})}afterRender(){this.props.editable?this.mountEditor():this.enhance()}async mountEditor(){let e=this.editorRef.el;if(!(!e||this.editorHandle||this.state.status!=="ready"))try{this.editorHandle=await Yr({root:e,value:this.state.source,collaborative:!!this.props.collaborative,room:this.props.room||"baseui-markdown",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(s,r,i)=>{this.state.source=s,this.props.onChange?.(s,r,i)}})}catch(s){this.state.status="error",this.state.error=s.message||String(s)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};o(Zt,"template","baseui.Markdown"),o(Zt,"components",{Badge:pt}),o(Zt,"props",{content:{type:String,optional:!0},src:{type:String,optional:!0},mermaid:{type:Boolean,optional:!0},baseUi:{type:Boolean,optional:!0},editable:{type:Boolean,optional:!0},collaborative:{type:Boolean,optional:!0},room:{type:String,optional:!0},password:{type:String,optional:!0},signaling:{type:Array,optional:!0},user:{type:Object,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});function xa(t,e){if(!t)return null;if(t.type==="file"&&(t.path===e||t.meta?.slug===e))return t;for(let s of t.children||[]){let r=xa(s,e);if(r)return r}return null}function lc(t){return t.replace(/\.[^./]+$/,"").replace(/[_-]+/g," ").trim().split(/\s+/).map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}var Pr,Dr,Xt,Qn=b(()=>{m();Y();ha();Ka();Pr=class Pr extends n{get label(){let e=this.props.node.meta;return e?.sidebar_label||e?.title||lc(this.props.node.name)}get hasSubfolders(){return(this.props.node.children||[]).some(e=>e.type==="dir")}select(e){this.props.onSelect(e)}};o(Pr,"template","baseui.MarkdownTreeNode"),o(Pr,"components",{MarkdownTreeNode:Pr,Icon:k,SidebarGroupLabel:wt,SidebarMenu:it,SidebarMenuItem:At,SidebarMenuButton:rt,DropdownMenu:bt,DropdownMenuTrigger:ht,DropdownMenuContent:mt,DropdownMenuItem:gt,DropdownMenuSub:ft,DropdownMenuSubTrigger:ot,DropdownMenuSubContent:yt}),o(Pr,"props",{node:{type:Object},activePath:{type:String,optional:!0},onSelect:{type:Function},nested:{type:Boolean,optional:!0}});Dr=Pr,Xt=class extends n{setup(){this.state=g({tree:null,status:"loading",error:""}),Qt(()=>this.load())}async load(){this.state.status="loading",this.state.error="";try{let e=await fetch(this.props.src);if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);this.state.tree=await e.json(),this.state.status="ready"}catch(e){this.state.status="error",this.state.error=e.message||String(e)}}};o(Xt,"template","baseui.MarkdownTree"),o(Xt,"components",{MarkdownTreeNode:Dr,SidebarGroup:xt,SidebarMenu:it}),o(Xt,"props",{src:{type:String},activePath:{type:String,optional:!0},onSelect:{type:Function},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});function tp(t=document.querySelector("[b-block-code-template]")){let r=((t?.tagName==="SCRIPT"?t.textContent:t?.innerHTML)?.replace(/^\n/,"").replace(/\s+$/,"")||"").split(`
12
12
  `),i=r.filter(p=>p.trim()).map(p=>p.match(/^\s*/)?.[0].length||0),a=i.length?Math.min(...i):0;return r.map(p=>p.slice(a)).join(`
13
- `)}function tp(t,e=0){let s=" ".repeat(e),r=[];for(let i of t.childNodes){if(i.nodeType===Node.TEXT_NODE){let l=i.textContent.trim();l&&r.push(`${s}${l}`);continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let a=[...i.attributes].map(l=>` ${l.name}="${l.value}"`).join("");if(![...i.childNodes].some(l=>l.nodeType===Node.ELEMENT_NODE||l.nodeType===Node.TEXT_NODE&&l.textContent.trim())){r.push(`${s}<${i.localName}${a}>${i.textContent.trim()}</${i.localName}>`);continue}r.push(`${s}<${i.localName}${a}>`),r.push(...tp(i,e+1)),r.push(`${s}</${i.localName}>`)}return r}async function ep(t){if(!t?.trim())return"";let{expandSelfClosingTags:e,extractTagCaseMap:s,normalizeOwlPreviewMarkup:r}=await Promise.resolve().then(()=>(va(),Xn)),i=document.createElement("div");return i.innerHTML=e(t),r(i,s(t)),tp(i).join(`
14
- `)}function sp(t){t.querySelectorAll('[b-block="dashboard-01"], [b-block^="sidebar-"]').forEach(e=>{let s=e.querySelector("[b-block-sidebar-toggle], button[aria-label='Toggle sidebar']"),r=e.querySelector("[b-block-sidebar]");!s||!r||(e.setAttribute("b-att-sidebar",e.getAttribute("b-att-sidebar")||"open"),s.setAttribute("b-block-sidebar-toggle",""),s.setAttribute("aria-expanded",e.getAttribute("b-att-sidebar")==="open"?"true":"false"),s.addEventListener("click",()=>{let i=e.getAttribute("b-att-sidebar")!=="open";e.setAttribute("b-att-sidebar",i?"open":"collapsed"),s.setAttribute("aria-expanded",i?"true":"false")}))}),t.querySelectorAll('[b-block^="sidebar-"] [b-block-subnav]').forEach(e=>{let s=e.previousElementSibling;s&&(s.setAttribute("b-block-subnav-toggle",""),s.setAttribute("aria-expanded","true"),e.setAttribute("b-att-state","open"),s.addEventListener("click",r=>{r.preventDefault();let i=e.getAttribute("b-att-state")!=="open";e.setAttribute("b-att-state",i?"open":"collapsed"),s.setAttribute("aria-expanded",i?"true":"false")}))})}var op=b(()=>{});var rp={};Ca(rp,{Accordion:()=>Hs,AccordionContent:()=>Ks,AccordionItem:()=>Ws,AccordionTrigger:()=>Tt,Alert:()=>ye,AlertAction:()=>xe,AlertDescription:()=>Se,AlertDialog:()=>ts,AlertDialogAction:()=>ls,AlertDialogCancel:()=>ps,AlertDialogContent:()=>ss,AlertDialogDescription:()=>ns,AlertDialogFooter:()=>rs,AlertDialogHeader:()=>os,AlertDialogMedia:()=>as,AlertDialogTitle:()=>is,AlertDialogTrigger:()=>es,AlertTitle:()=>ve,AspectRatio:()=>sr,Attachment:()=>Mo,AttachmentAction:()=>Ho,AttachmentActions:()=>_o,AttachmentContent:()=>Po,AttachmentDescription:()=>Do,AttachmentDropzone:()=>Vo,AttachmentGroup:()=>Ko,AttachmentMedia:()=>zo,AttachmentTitle:()=>Fo,AttachmentTrigger:()=>Wo,Avatar:()=>Zo,Badge:()=>pt,BaseUIComponents:()=>Dr,BlockViewer:()=>Gt,Breadcrumb:()=>Gs,BreadcrumbEllipsis:()=>qt,BreadcrumbItem:()=>Js,BreadcrumbLink:()=>Qs,BreadcrumbList:()=>Ys,BreadcrumbPage:()=>to,BreadcrumbSeparator:()=>Ut,Bubble:()=>or,Button:()=>K,ButtonGroup:()=>ir,ButtonGroupSeparator:()=>nr,ButtonGroupText:()=>pr,Calendar:()=>No,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>ae,CardFooter:()=>oe,CardHeader:()=>se,CardTitle:()=>re,Carousel:()=>Io,CarouselNext:()=>To,CarouselPrevious:()=>$o,CarouselSlide:()=>Ro,Chart:()=>Bo,Checkbox:()=>Te,ClipboardButton:()=>jt,Collapsible:()=>Vs,CollapsibleContent:()=>Xs,CollapsibleTrigger:()=>Zs,Combobox:()=>Oo,Command:()=>jo,ContextMenu:()=>Ps,ContextMenuContent:()=>Ds,ContextMenuItem:()=>_s,ContextMenuTrigger:()=>Fs,DataTable:()=>Kt,DatePicker:()=>ko,Dialog:()=>ue,DialogClose:()=>fe,DialogContent:()=>It,DialogDescription:()=>ge,DialogFooter:()=>he,DialogHeader:()=>be,DialogTitle:()=>me,DialogTrigger:()=>de,Direction:()=>rr,Drawer:()=>cs,DrawerClose:()=>fs,DrawerContent:()=>ds,DrawerDescription:()=>gs,DrawerFooter:()=>hs,DrawerHeader:()=>bs,DrawerTitle:()=>ms,DrawerTrigger:()=>us,DropdownMenu:()=>bt,DropdownMenuCheckboxItem:()=>Rt,DropdownMenuContent:()=>mt,DropdownMenuGroup:()=>Ts,DropdownMenuItem:()=>gt,DropdownMenuLabel:()=>Us,DropdownMenuRadioGroup:()=>qs,DropdownMenuRadioItem:()=>$t,DropdownMenuSeparator:()=>Ms,DropdownMenuShortcut:()=>zs,DropdownMenuSub:()=>ft,DropdownMenuSubContent:()=>yt,DropdownMenuSubTrigger:()=>ot,DropdownMenuTrigger:()=>ht,Empty:()=>we,EmptyContent:()=>Ne,EmptyDescription:()=>Le,EmptyHeader:()=>Ae,EmptyMedia:()=>Ee,EmptyTitle:()=>Ce,Field:()=>Ct,FieldContent:()=>ur,FieldDescription:()=>Nt,FieldError:()=>kt,FieldGroup:()=>Et,FieldLabel:()=>Lt,FieldLegend:()=>cr,FieldSeparator:()=>br,FieldSet:()=>lr,FieldTitle:()=>dr,Form:()=>Yt,HoverCard:()=>Bs,HoverCardContent:()=>Rs,HoverCardTrigger:()=>Is,Icon:()=>N,Input:()=>ie,InputGroup:()=>_e,InputGroupAddon:()=>He,InputGroupButton:()=>We,InputGroupInput:()=>Ve,InputGroupText:()=>Ke,InputGroupTextarea:()=>Ze,InputOtp:()=>Xe,Item:()=>ar,Kbd:()=>Be,Label:()=>hr,Markdown:()=>Zt,MarkdownTree:()=>Xt,MarkdownTreeNode:()=>Fr,Marker:()=>Ie,Menubar:()=>ao,Message:()=>Xo,MessageScroller:()=>Go,NativeSelect:()=>$e,NavigationMenu:()=>oo,NavigationMenuItem:()=>ro,Pagination:()=>eo,PaginationItem:()=>so,Popover:()=>ks,PopoverContent:()=>js,PopoverTrigger:()=>Os,Progress:()=>er,Pwa:()=>yr,PwaBody:()=>Er,PwaClose:()=>Nr,PwaContent:()=>Sr,PwaDescription:()=>Ar,PwaFooter:()=>Lr,PwaHeader:()=>xr,PwaSteps:()=>Cr,PwaTitle:()=>wr,PwaTrigger:()=>vr,Questionnaire:()=>Yo,QuestionnaireNext:()=>tr,QuestionnairePrevious:()=>Qo,QuestionnaireStep:()=>Jo,RadioGroup:()=>Ue,RadioGroupItem:()=>qe,Resizable:()=>Uo,ScrollArea:()=>qo,Select:()=>Ge,SelectContent:()=>Je,SelectItem:()=>Qe,SelectTrigger:()=>Ye,Separator:()=>ke,Sheet:()=>vs,SheetClose:()=>Ls,SheetContent:()=>xs,SheetDescription:()=>Cs,SheetFooter:()=>As,SheetHeader:()=>ws,SheetTitle:()=>Es,SheetTrigger:()=>Ss,Shell:()=>_t,ShellContent:()=>Wt,ShellHeader:()=>wo,ShellMain:()=>xo,ShellNav:()=>So,ShellSidebar:()=>Ht,ShellSidebarHeader:()=>vo,ShellUserMenu:()=>Ao,Sidebar:()=>at,SidebarClose:()=>zt,SidebarContent:()=>St,SidebarFooter:()=>no,SidebarGroup:()=>xt,SidebarGroupAction:()=>Pt,SidebarGroupCollapsible:()=>Ft,SidebarGroupContent:()=>bo,SidebarGroupLabel:()=>wt,SidebarHeader:()=>io,SidebarInput:()=>co,SidebarInset:()=>po,SidebarMenu:()=>it,SidebarMenuAction:()=>Dt,SidebarMenuBadge:()=>mo,SidebarMenuButton:()=>rt,SidebarMenuItem:()=>At,SidebarMenuSkeleton:()=>go,SidebarMenuSub:()=>ho,SidebarMenuSubButton:()=>yo,SidebarMenuSubItem:()=>fo,SidebarProvider:()=>Ur,SidebarRail:()=>lo,SidebarSeparator:()=>uo,SidebarTrigger:()=>Mt,Skeleton:()=>ut,Slider:()=>ze,Spinner:()=>Oe,Switch:()=>Me,TabContent:()=>Bt,TabTrigger:()=>ce,Table:()=>Eo,Tabs:()=>ne,TabsContainer:()=>pe,TabsList:()=>le,TextEditor:()=>kr,Textarea:()=>Re,ThemeButton:()=>nt,Toast:()=>vt,Toggle:()=>mr,ToggleGroup:()=>gr,ToggleGroupItem:()=>fr,Tooltip:()=>$s,Typography:()=>je,createNamedIcon:()=>Ia,findMarkdownTreeNode:()=>xa,iconComponentName:()=>Ja});var ap=b(()=>{m();Jr();Jr();sa(Dr)});function dc(){return document.querySelector("[b-block-code-template]")}function bc(t){return t.match(/<templates[^>]*>([\s\S]*)<\/templates>/)?.[1]||t}function hc(t){for(let e of t.querySelectorAll?.("[b-block] [b-icon], [b-block] [b-ui='icon']")||[])!e.hasAttribute("b-icon-base-url")&&!e.hasAttribute("b-att-base-url")&&e.setAttribute("b-icon-base-url",uc)}var wa,lc,cc,uc,Gt,ip=b(()=>{m();Zr();jr();Y();ei();op();wa=Vt({storageKey:"baseui-example-theme",toggleSelector:"",labelSelector:""}),lc=[{key:"docs",label:"Docs",href:"/docs"},{key:"icons",label:"Icons",href:"/docs/icons"},{key:"examples",label:"Examples",href:"/examples/index.html"},{key:"blocks",label:"Blocks",href:"/blocks"}],cc={desktop:"",tablet:"768px",mobile:"390px"},uc="/dist/icons/lucide";Gt=class extends n{setup(){this.navItems=this.props.navItems||lc,this.previewFrame=S("previewFrame"),this.embedRoot=S("embedRoot"),this.code=Qn(),this.state=f({mode:"preview",viewport:"desktop",copyLabel:"Copy code",embed:new URLSearchParams(globalThis.location.search).get("embed")==="1",codeVariant:"owl",staticTemplate:"",staticTemplateStatus:"idle"}),k(()=>this.mountPreview()),D(()=>this.mountStaticBaseUI())}get activeCode(){return this.state.codeVariant==="template"?this.state.staticTemplateStatus==="ready"?this.state.staticTemplate:"Converting to a static template...":this.code}async setCodeVariant(e){if(this.state.codeVariant=e,e==="template"&&this.state.staticTemplateStatus==="idle"){this.state.staticTemplateStatus="loading";let s=await ep(this.code);this.state.staticTemplate=s,this.state.staticTemplateStatus="ready"}}get title(){return document.body.dataset.blockTitle||document.title||"Block"}get description(){return document.body.dataset.blockDescription||"Preview and copy this BaseUI block."}get previewStyle(){let e=cc[this.state.viewport]||"";return e?`max-width:${e}`:""}setMode(e){this.state.mode=e}setViewport(e){this.state.viewport=e}async copyCode(){await globalThis.navigator?.clipboard?.writeText(this.activeCode),this.state.copyLabel="Copied"}mountPreview(){this.state.embed&&(document.body.className="m-0");let e=this.state.embed?this.embedRoot.el:this.previewFrame.el,s=dc();if(!(!e||!s)){if(s.tagName==="SCRIPT"){this.mountOwlPreview(e,s);return}e.replaceChildren(s.content.cloneNode(!0)),this.mountStaticBaseUI(e),sp(e)}}async mountOwlPreview(e,s){e.replaceChildren();let r=await Promise.resolve().then(()=>(ap(),rp));class i extends n{setup(){this.state=f({collapsed:!1})}}o(i,"components",r),o(i,"template","examples.SidebarBlock");let a=[await Hr("/dist/baseui.templates.xml"),s.textContent].map(bc).join(`
15
- `);await oa(i,e,{templates:`<templates>${a}</templates>`}),wa.set(wa.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){hc(e),globalThis.BaseUI?.mountAll(e),wa.set(wa.current(),{skipStorage:!0})}};o(Gt,"template","baseui.BlockViewer"),o(Gt,"components",{Button:K,Icon:N,ThemeButton:nt}),o(Gt,"props",{navItems:{type:Array,optional:!0}})});var Ot,yr,vr,Sr,xr,wr,Ar,Er,Cr,Lr,Nr,np=b(()=>{m();Vr();U();Ot={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},yr=class extends n{setup(){this.pwaState=f({open:$(this.props)}),A({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.pwaState.open=$(e))})}setOpen(e){T(this.props)||(this.pwaState.open=e),this.props.onOpenChange?.(e)}};o(yr,"template","baseui.Pwa"),o(yr,"props",{open:{type:Boolean,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});vr=class extends n{onClick(){this.env.setPwaOpen(!0)}};o(vr,"template","baseui.PwaTrigger"),o(vr,"props",Ot);Sr=class extends n{setup(){this.rootRef=S("root"),G(e=>{if(!e)return;let s=document.activeElement;return Tr(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(e){e.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(e){e.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};o(Sr,"template","baseui.PwaContent"),o(Sr,"props",Ot);xr=class extends n{};o(xr,"template","baseui.PwaHeader"),o(xr,"props",Ot);wr=class extends n{};o(wr,"template","baseui.PwaTitle"),o(wr,"props",Ot);Ar=class extends n{};o(Ar,"template","baseui.PwaDescription"),o(Ar,"props",Ot);Er=class extends n{};o(Er,"template","baseui.PwaBody"),o(Er,"props",Ot);Cr=class extends n{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};o(Cr,"template","baseui.PwaSteps"),o(Cr,"props",{...Ot,steps:{type:Array,optional:!0}});Lr=class extends n{};o(Lr,"template","baseui.PwaFooter"),o(Lr,"props",Ot);Nr=class extends n{onClick(){this.env.setPwaOpen(!1)}};o(Nr,"template","baseui.PwaClose"),o(Nr,"props",Ot)});function cp(t,e){return typeof t=="string"?t:e}function mc(t){return{title:t.submitted&&t.title.trim().length>0&&t.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:t.submitted&&t.description.length>0&&t.description.length<20?"Description must be at least 20 characters.":""}}var pp,lp,Yt,up=b(()=>{m();jr();U();Ya();pp="",lp="";Yt=class extends n{setup(){this.state=f({title:cp(this.props.title,pp),description:cp(this.props.description,lp),submitted:!1})}get classNames(){return W("baseui-form",this.props.className)}get titlePlaceholder(){return this.props.titlePlaceholder||"Login button not working on mobile"}get descriptionPlaceholder(){return this.props.descriptionPlaceholder||"I'm having an issue with the login button on mobile."}get maxDescriptionLength(){return this.props.maxDescriptionLength||100}get descriptionLength(){return this.state.description.length}get errors(){return mc(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=pp,this.state.description=lp,this.state.submitted=!1}submit(e){e.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};o(Yt,"template","baseui.Form"),o(Yt,"components",{Button:K,Field:Ct,FieldDescription:Nt,FieldError:kt,FieldGroup:Et,FieldLabel:Lt}),o(Yt,"props",{title:{type:String,optional:!0},description:{type:String,optional:!0},titlePlaceholder:{type:String,optional:!0},descriptionPlaceholder:{type:String,optional:!0},maxDescriptionLength:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onSubmit:{type:Function,optional:!0}})});function gc(){return li??(li=import("./runtime/milkdown/milkdown-text-editor.js")),li}async function Aa(t){return(await gc()).createMilkdownTextEditor(t)}var li,ci=b(()=>{});var kr,dp=b(()=>{m();ci();kr=class extends n{setup(){this.editorRef=S("editor"),this.editorHandle=null,this.state=f({content:"",status:"loading",error:""}),Qt(()=>this.load(this.props)),R(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),k(()=>this.mountEditor()),D(()=>this.mountEditor()),Wr(()=>this.destroyEditor())}get classNames(){let e=["baseui-text-editor"];return this.props.className&&e.push(this.props.className),e.join(" ")}get editorLabel(){return this.props.collaborative?"Collaborative rich text editor":"Rich text editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.collaborative!==this.props.collaborative||e.room!==this.props.room||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);s=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}this.state.content=s,this.state.status="ready"}async mountEditor(){let e=this.editorRef.el;if(!(!e||this.editorHandle||this.state.status!=="ready"))try{this.editorHandle=await Aa({root:e,value:this.state.content,placeholder:this.props.placeholder,collaborative:!!this.props.collaborative,room:this.props.room||"baseui-text-editor",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(s,r,i)=>{this.state.content=s,this.props.onChange?.(s,r,i)}})}catch(s){this.state.status="error",this.state.error=s.message||String(s)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};o(kr,"template","baseui.TextEditor"),o(kr,"props",{content:{type:String,optional:!0},src:{type:String,optional:!0},placeholder:{type:String,optional:!0},collaborative:{type:Boolean,optional:!0},room:{type:String,optional:!0},password:{type:String,optional:!0},signaling:{type:Array,optional:!0},user:{type:Object,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var Dr={};Ca(Dr,{Accordion:()=>Hs,AccordionContent:()=>Ks,AccordionItem:()=>Ws,AccordionTrigger:()=>Tt,Alert:()=>ye,AlertAction:()=>xe,AlertDescription:()=>Se,AlertDialog:()=>ts,AlertDialogAction:()=>ls,AlertDialogCancel:()=>ps,AlertDialogContent:()=>ss,AlertDialogDescription:()=>ns,AlertDialogFooter:()=>rs,AlertDialogHeader:()=>os,AlertDialogMedia:()=>as,AlertDialogTitle:()=>is,AlertDialogTrigger:()=>es,AlertTitle:()=>ve,AspectRatio:()=>sr,Attachment:()=>Mo,AttachmentAction:()=>Ho,AttachmentActions:()=>_o,AttachmentContent:()=>Po,AttachmentDescription:()=>Do,AttachmentDropzone:()=>Vo,AttachmentGroup:()=>Ko,AttachmentMedia:()=>zo,AttachmentTitle:()=>Fo,AttachmentTrigger:()=>Wo,Avatar:()=>Zo,Badge:()=>pt,BlockViewer:()=>Gt,Breadcrumb:()=>Gs,BreadcrumbEllipsis:()=>qt,BreadcrumbItem:()=>Js,BreadcrumbLink:()=>Qs,BreadcrumbList:()=>Ys,BreadcrumbPage:()=>to,BreadcrumbSeparator:()=>Ut,Bubble:()=>or,Button:()=>K,ButtonGroup:()=>ir,ButtonGroupSeparator:()=>nr,ButtonGroupText:()=>pr,Calendar:()=>No,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>ae,CardFooter:()=>oe,CardHeader:()=>se,CardTitle:()=>re,Carousel:()=>Io,CarouselNext:()=>To,CarouselPrevious:()=>$o,CarouselSlide:()=>Ro,Chart:()=>Bo,Checkbox:()=>Te,ClipboardButton:()=>jt,Collapsible:()=>Vs,CollapsibleContent:()=>Xs,CollapsibleTrigger:()=>Zs,Combobox:()=>Oo,Command:()=>jo,ContextMenu:()=>Ps,ContextMenuContent:()=>Ds,ContextMenuItem:()=>_s,ContextMenuTrigger:()=>Fs,DataTable:()=>Kt,DatePicker:()=>ko,Dialog:()=>ue,DialogClose:()=>fe,DialogContent:()=>It,DialogDescription:()=>ge,DialogFooter:()=>he,DialogHeader:()=>be,DialogTitle:()=>me,DialogTrigger:()=>de,Direction:()=>rr,Drawer:()=>cs,DrawerClose:()=>fs,DrawerContent:()=>ds,DrawerDescription:()=>gs,DrawerFooter:()=>hs,DrawerHeader:()=>bs,DrawerTitle:()=>ms,DrawerTrigger:()=>us,DropdownMenu:()=>bt,DropdownMenuCheckboxItem:()=>Rt,DropdownMenuContent:()=>mt,DropdownMenuGroup:()=>Ts,DropdownMenuItem:()=>gt,DropdownMenuLabel:()=>Us,DropdownMenuRadioGroup:()=>qs,DropdownMenuRadioItem:()=>$t,DropdownMenuSeparator:()=>Ms,DropdownMenuShortcut:()=>zs,DropdownMenuSub:()=>ft,DropdownMenuSubContent:()=>yt,DropdownMenuSubTrigger:()=>ot,DropdownMenuTrigger:()=>ht,Empty:()=>we,EmptyContent:()=>Ne,EmptyDescription:()=>Le,EmptyHeader:()=>Ae,EmptyMedia:()=>Ee,EmptyTitle:()=>Ce,Field:()=>Ct,FieldContent:()=>ur,FieldDescription:()=>Nt,FieldError:()=>kt,FieldGroup:()=>Et,FieldLabel:()=>Lt,FieldLegend:()=>cr,FieldSeparator:()=>br,FieldSet:()=>lr,FieldTitle:()=>dr,Form:()=>Yt,HoverCard:()=>Bs,HoverCardContent:()=>Rs,HoverCardTrigger:()=>Is,Icon:()=>N,Input:()=>ie,InputGroup:()=>_e,InputGroupAddon:()=>He,InputGroupButton:()=>We,InputGroupInput:()=>Ve,InputGroupText:()=>Ke,InputGroupTextarea:()=>Ze,InputOtp:()=>Xe,Item:()=>ar,Kbd:()=>Be,Label:()=>hr,Markdown:()=>Zt,MarkdownTree:()=>Xt,MarkdownTreeNode:()=>Fr,Marker:()=>Ie,Menubar:()=>ao,Message:()=>Xo,MessageScroller:()=>Go,NativeSelect:()=>$e,NavigationMenu:()=>oo,NavigationMenuItem:()=>ro,Pagination:()=>eo,PaginationItem:()=>so,Popover:()=>ks,PopoverContent:()=>js,PopoverTrigger:()=>Os,Progress:()=>er,Pwa:()=>yr,PwaBody:()=>Er,PwaClose:()=>Nr,PwaContent:()=>Sr,PwaDescription:()=>Ar,PwaFooter:()=>Lr,PwaHeader:()=>xr,PwaSteps:()=>Cr,PwaTitle:()=>wr,PwaTrigger:()=>vr,Questionnaire:()=>Yo,QuestionnaireNext:()=>tr,QuestionnairePrevious:()=>Qo,QuestionnaireStep:()=>Jo,RadioGroup:()=>Ue,RadioGroupItem:()=>qe,Resizable:()=>Uo,ScrollArea:()=>qo,Select:()=>Ge,SelectContent:()=>Je,SelectItem:()=>Qe,SelectTrigger:()=>Ye,Separator:()=>ke,Sheet:()=>vs,SheetClose:()=>Ls,SheetContent:()=>xs,SheetDescription:()=>Cs,SheetFooter:()=>As,SheetHeader:()=>ws,SheetTitle:()=>Es,SheetTrigger:()=>Ss,Shell:()=>_t,ShellContent:()=>Wt,ShellHeader:()=>wo,ShellMain:()=>xo,ShellNav:()=>So,ShellSidebar:()=>Ht,ShellSidebarHeader:()=>vo,ShellUserMenu:()=>Ao,Sidebar:()=>at,SidebarClose:()=>zt,SidebarContent:()=>St,SidebarFooter:()=>no,SidebarGroup:()=>xt,SidebarGroupAction:()=>Pt,SidebarGroupCollapsible:()=>Ft,SidebarGroupContent:()=>bo,SidebarGroupLabel:()=>wt,SidebarHeader:()=>io,SidebarInput:()=>co,SidebarInset:()=>po,SidebarMenu:()=>it,SidebarMenuAction:()=>Dt,SidebarMenuBadge:()=>mo,SidebarMenuButton:()=>rt,SidebarMenuItem:()=>At,SidebarMenuSkeleton:()=>go,SidebarMenuSub:()=>ho,SidebarMenuSubButton:()=>yo,SidebarMenuSubItem:()=>fo,SidebarProvider:()=>Ur,SidebarRail:()=>lo,SidebarSeparator:()=>uo,SidebarTrigger:()=>Mt,Skeleton:()=>ut,Slider:()=>ze,Spinner:()=>Oe,Switch:()=>Me,TabContent:()=>Bt,TabTrigger:()=>ce,Table:()=>Eo,Tabs:()=>ne,TabsContainer:()=>pe,TabsList:()=>le,TextEditor:()=>kr,Textarea:()=>Re,ThemeButton:()=>nt,Toast:()=>vt,Toggle:()=>mr,ToggleGroup:()=>gr,ToggleGroupItem:()=>fr,Tooltip:()=>$s,Typography:()=>je,createNamedIcon:()=>Ia,findMarkdownTreeNode:()=>xa,iconComponentName:()=>Ja});var Jr=b(()=>{jr();Ai();Ta();Ua();Ei();Li();Ni();Oi();Bi();Ii();Pa();Ri();$i();Ti();Ui();qi();Mi();zi();Pi();Fi();Di();_i();Hi();Wi();Ki();Vi();Zi();Gi();Ji();Qi();Wa();tn();Va();en();on();rn();an();nn();pn();ha();un();dn();bn();hn();mn();gn();fn();yn();vn();Sn();xn();En();Cn();Ln();Nn();kn();On();jn();Bn();In();Rn();$n();Ya();Y();Tn();Un();ei();Pn();Fn();Yn();Jn();ip();np();up();dp()});y();var yi="0.0.6";m();Jr();y();Vr();function fc(t){let{open:e,close:s,destroy:r}=ba(t,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return t.setAttribute("role","alertdialog"),t.BaseUIAlertDialog={open:e,close:s},{destroy:()=>{r(),delete t.BaseUIAlertDialog}}}c.register("alert-dialog",{type:"owl",mount:fc});y();q();var ui={default:"baseui-alert-default",destructive:"baseui-alert-destructive",info:"baseui-alert-default",success:"alert-success",warning:"alert-warning",danger:"baseui-alert-destructive"};function yc(t){t.classList.add("alert","baseui-alert",ui[t.getAttribute("b-att-variant")||"default"]||ui.default),t.setAttribute("role",t.getAttribute("role")||"alert");let e=null;if(!!t.getAttribute("b-att-dismissible")){if(t.classList.add("alert-dismissible","fade","show"),!t.querySelector('[data-bs-dismiss="alert"]')){let r=document.createElement("button");r.type="button",r.className="btn-close",r.setAttribute("data-bs-dismiss","alert"),r.setAttribute("aria-label","Close"),t.appendChild(r)}e=new(x()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","baseui-alert","alert-dismissible","fade","show",...Object.values(ui))}}}c.register("alert",{type:"static",mount:yc});y();q();function vc(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",r=new Map,i=new Map,a=new Map,p=(l,u)=>{let d=l.querySelector("[b-accordion-trigger]");l.setAttribute("b-att-state",u?"open":"closed"),d?.setAttribute("aria-expanded",String(u)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:u}}))};return t.setAttribute("role","presentation"),e.forEach((l,u)=>{let d=l.querySelector("[b-accordion-trigger]"),h=l.querySelector("[b-accordion-panel]");if(!h)return;let g=h.id||`baseui-accordion-panel-${u}`;h.id=g;let v=l.getAttribute("b-att-state")==="open";h.classList.add("collapse"),v&&h.classList.add("show");let w=new(x()).Collapse(h,{toggle:!1});a.set(l,w);let j=()=>p(l,!0),C=()=>p(l,!1);h.addEventListener("shown.bs.collapse",j),h.addEventListener("hidden.bs.collapse",C),i.set(l,{onShown:j,onHidden:C}),d?.setAttribute("aria-expanded",String(v)),d?.setAttribute("aria-controls",g);let B=()=>{let F=h.classList.contains("show");!s&&!F&&e.forEach(E=>{if(E===l)return;let H=a.get(E),X=E.querySelector("[b-accordion-panel]");H&&X?.classList.contains("show")&&H.hide()}),F?w.hide():w.show()};r.set(l,B),d?.addEventListener("click",B)}),{destroy:()=>{e.forEach(l=>{let u=l.querySelector("[b-accordion-trigger]"),d=l.querySelector("[b-accordion-panel]");u?.removeEventListener("click",r.get(l));let h=i.get(l);d&&h&&(d.removeEventListener("shown.bs.collapse",h.onShown),d.removeEventListener("hidden.bs.collapse",h.onHidden)),a.get(l)?.dispose()}),r.clear(),i.clear(),a.clear()}}}c.register("accordion",{type:"owl",mount:vc});y();function Sc(t){let e=t.getAttribute("b-att-ratio")||`${t.getAttribute("b-att-width")||16} / ${t.getAttribute("b-att-height")||9}`;return t.classList.add("baseui-aspect-ratio"),t.style.setProperty("--baseui-aspect-ratio",e),{destroy:()=>t.classList.remove("baseui-aspect-ratio")}}c.register("aspect-ratio",{type:"static",mount:Sc});y();te();var xc=["idle","uploading","processing","error","done"],wc=["default","sm","xs"],Ac=["content","title","description","actions"];function bp(t,e){t.classList.add(`baseui-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function Ec(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),r=xc.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",i=wc.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",a=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("baseui-attachment"),t.classList.add(`baseui-attachment-${r}`,`baseui-attachment-${i}`,`baseui-attachment-${a}`),t.setAttribute("data-state",r),t.setAttribute("data-size",i),t.setAttribute("data-orientation",a),t.setAttribute("data-slot","attachment"),e&&t.classList.add("baseui-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(l=>{let u=l.getAttribute("b-att-variant")==="image"?"image":"icon";bp(l,"media"),l.classList.add(`baseui-attachment-media-${u}`),l.setAttribute("data-variant",u)}),Ac.forEach(l=>t.querySelectorAll(`[b-attachment-${l}]`).forEach(u=>bp(u,l))),t.querySelectorAll("[b-attachment-action]").forEach(l=>{let u=P[l.getAttribute("b-att-variant")]||P.ghost,d=M[l.getAttribute("b-att-size")]||M["icon-xs"];l.classList.add("btn","baseui-button",u,d,"baseui-button-icon","baseui-attachment-action"),l.setAttribute("data-slot","attachment-action"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),t.querySelectorAll("[b-attachment-trigger]").forEach(l=>{l.classList.add("baseui-attachment-trigger"),l.setAttribute("data-slot","attachment-trigger"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),e?.classList.add("form-control");let p=()=>{s&&(s.innerHTML=[...e.files].map(l=>`<li>${l.name}</li>`).join("")),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...e.files]}}))};return e?.addEventListener("change",p),{destroy:()=>e?.removeEventListener("change",p)}}function Cc(t){return t.classList.add("baseui-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("baseui-attachment-group")}}function Lc(t){let e=t.querySelector("input[type='file']");t.classList.add("baseui-attachment-dropzone"),t.setAttribute("data-slot","attachment-dropzone");let s=()=>e?.click(),r=u=>{u.preventDefault(),t.classList.add("baseui-attachment-dropzone-dragging")},i=()=>t.classList.remove("baseui-attachment-dropzone-dragging"),a=u=>{u.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:u}}))},p=u=>{u.preventDefault(),t.classList.remove("baseui-attachment-dropzone-dragging"),a([...u.dataTransfer?.files??[]])},l=()=>{a([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",r),t.addEventListener("dragleave",i),t.addEventListener("drop",p),e?.addEventListener("change",l),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",r),t.removeEventListener("dragleave",i),t.removeEventListener("drop",p),e?.removeEventListener("change",l)}}}c.register("attachment",{type:"owl",mount:Ec});c.register("attachment-group",{type:"static",mount:Cc});c.register("attachment-dropzone",{type:"static",mount:Lc});y();function Nc(t){t.classList.add("baseui-avatar");let e=t.querySelector("img"),s=t.querySelector("[b-avatar-fallback]");if(e&&s){let r=()=>{e.hidden=!0,s.hidden=!1};return s.hidden=!!e.getAttribute("src"),e.addEventListener("error",r),{destroy:()=>e.removeEventListener("error",r)}}return{}}c.register("avatar",{type:"static",mount:Nc});y();$a();function kc(t){let e=ee[t.getAttribute("b-att-variant")||"secondary"]||ee.secondary;return t.classList.add("badge",e),t.getAttribute("b-att-pill")==="true"&&t.classList.add("rounded-pill"),{destroy:()=>t.classList.remove("badge","rounded-pill",...Object.values(ee))}}c.register("badge",{type:"static",mount:kc});y();st();function hp(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))}function gp(t,e,s){return z(t,e,{size:s}),t}function Oc(){let t=document.createElement("li"),e=document.createElement("span");return t.setAttribute("b-breadcrumb-separator",""),t.setAttribute("data-slot","breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t.className="baseui-breadcrumb-separator",e.className="baseui-breadcrumb-separator-icon",t.append(gp(e,"chevron-right","var(--b3_5)")),t}function jc(t){t.classList.add("baseui-breadcrumb-separator"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true")}function Bc(t){if(t.classList.add("baseui-breadcrumb-ellipsis"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-ellipsis"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),!t.querySelector(".baseui-icon")){let e=document.createElement("span");e.className="baseui-breadcrumb-ellipsis-icon",t.prepend(gp(e,"ellipsis","var(--b4)"))}if(!t.querySelector(".visually-hidden")){let e=document.createElement("span");e.className="visually-hidden",e.textContent="More",t.append(e)}}function mp(t){t.classList.add("baseui-breadcrumb-page"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-page"),t.setAttribute("role",t.getAttribute("role")||"link"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-current","page")}function Ic(t){let e=t.querySelector("ol, ul")||t;t.classList.add("baseui-breadcrumb"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb"),t.setAttribute("aria-label",t.getAttribute("aria-label")||"breadcrumb"),e.classList.add("breadcrumb","baseui-breadcrumb-list"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))jc(r);for(let r of e.querySelectorAll("[b-breadcrumb-ellipsis], .baseui-breadcrumb-ellipsis"))Bc(r);for(let r of e.querySelectorAll("[b-breadcrumb-page], .baseui-breadcrumb-page"))mp(r);e.querySelector("[b-breadcrumb-separator], .baseui-breadcrumb-separator")||hp(e).slice(0,-1).forEach(i=>i.after(Oc()));let s=hp(e);return s.forEach((r,i)=>{r.classList.add("baseui-breadcrumb-item"),r.setAttribute("data-slot",r.getAttribute("data-slot")||"breadcrumb-item");for(let a of r.querySelectorAll("a"))a.classList.add("baseui-breadcrumb-link"),a.setAttribute("data-slot",a.getAttribute("data-slot")||"breadcrumb-link");if(i===s.length-1){let a=r.querySelector("[b-breadcrumb-page], .baseui-breadcrumb-page");a?mp(a):(r.classList.add("baseui-breadcrumb-page"),r.setAttribute("aria-current",r.getAttribute("aria-current")||"page"))}}),{destroy:()=>{t.classList.remove("baseui-breadcrumb"),e.classList.remove("breadcrumb","baseui-breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator]"))r.remove()}}}c.register("breadcrumb",{type:"owl",mount:Ic});y();function Rc(t){return t.classList.add("baseui-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("baseui-bubble")}}c.register("bubble",{type:"static",mount:Rc});y();st();te();function $c(t){return[...t.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).map(e=>{let s=document.createElement("span");return s.textContent=e.textContent.trim(),e.replaceWith(s),s})}function Tc(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",r=!!t.textContent.trim(),i=e&&r?$c(t):[],a=null;return t.classList.add("btn","baseui-button",P[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),M[t.getAttribute("b-att-size")]&&t.classList.add(M[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(a=document.createElement("span"),a.setAttribute("b-icon",e),a.dataset.icon=`inline-${s}`,z(a,e,{label:""}),t.insertBefore(a,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,r||(t.dataset.iconOnly="true",t.classList.add("baseui-button-icon"))),{destroy:()=>{a?.remove();for(let p of i)p.replaceWith(document.createTextNode(p.textContent));t.classList.remove("btn","baseui-button","baseui-button-icon",...Object.values(P),...Object.values(M)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}c.register("button",{type:"static",mount:Tc});y();function Uc(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),r=[...t.querySelectorAll("[b-button-group-separator]")],i=[...t.querySelectorAll("[b-button-group-text]")];return t.classList.add("baseui-button-group",e?"btn-group-vertical":"btn-group"),(s==="sm"||s==="lg")&&t.classList.add(`btn-group-${s}`),t.setAttribute("role",t.getAttribute("role")||"group"),r.forEach(a=>{let p=a.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";a.classList.add("baseui-button-group-separator",`baseui-button-group-separator-${p}`),a.setAttribute("data-orientation",p),a.setAttribute("role","separator")}),i.forEach(a=>{a.classList.add("baseui-button-group-text")}),{destroy:()=>{t.classList.remove("baseui-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}c.register("button-group",{type:"static",mount:Uc});y();var qc=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function Mc(t){let e=t.getAttribute("b-att-selected")?new Date(`${t.getAttribute("b-att-selected")}T00:00:00`):new Date,s=Number(t.getAttribute("b-att-month")??e.getMonth()+1)-1,r=Number(t.getAttribute("b-att-year")??e.getFullYear()),i=new Date(r,s,1),a=new Date(r,s+1,0).getDate(),p=i.getDay();t.classList.add("baseui-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
16
- <div class="baseui-calendar__header">${qc.format(i)}</div>
13
+ `)}function ep(t,e=0){let s=" ".repeat(e),r=[];for(let i of t.childNodes){if(i.nodeType===Node.TEXT_NODE){let l=i.textContent.trim();l&&r.push(`${s}${l}`);continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let a=[...i.attributes].map(l=>` ${l.name}="${l.value}"`).join("");if(![...i.childNodes].some(l=>l.nodeType===Node.ELEMENT_NODE||l.nodeType===Node.TEXT_NODE&&l.textContent.trim())){r.push(`${s}<${i.localName}${a}>${i.textContent.trim()}</${i.localName}>`);continue}r.push(`${s}<${i.localName}${a}>`),r.push(...ep(i,e+1)),r.push(`${s}</${i.localName}>`)}return r}async function sp(t){if(!t?.trim())return"";let{expandSelfClosingTags:e,extractTagCaseMap:s,normalizeOwlPreviewMarkup:r}=await Promise.resolve().then(()=>(va(),Gn)),i=document.createElement("div");return i.innerHTML=e(t),r(i,s(t)),ep(i).join(`
14
+ `)}function op(t){t.querySelectorAll('[b-block="dashboard-01"], [b-block^="sidebar-"]').forEach(e=>{let s=e.querySelector("[b-block-sidebar-toggle], button[aria-label='Toggle sidebar']"),r=e.querySelector("[b-block-sidebar]");!s||!r||(e.setAttribute("b-att-sidebar",e.getAttribute("b-att-sidebar")||"open"),s.setAttribute("b-block-sidebar-toggle",""),s.setAttribute("aria-expanded",e.getAttribute("b-att-sidebar")==="open"?"true":"false"),s.addEventListener("click",()=>{let i=e.getAttribute("b-att-sidebar")!=="open";e.setAttribute("b-att-sidebar",i?"open":"collapsed"),s.setAttribute("aria-expanded",i?"true":"false")}))}),t.querySelectorAll('[b-block^="sidebar-"] [b-block-subnav]').forEach(e=>{let s=e.previousElementSibling;s&&(s.setAttribute("b-block-subnav-toggle",""),s.setAttribute("aria-expanded","true"),e.setAttribute("b-att-state","open"),s.addEventListener("click",r=>{r.preventDefault();let i=e.getAttribute("b-att-state")!=="open";e.setAttribute("b-att-state",i?"open":"collapsed"),s.setAttribute("aria-expanded",i?"true":"false")}))})}var rp=b(()=>{});var ap={};La(ap,{Accordion:()=>Hs,AccordionContent:()=>Ks,AccordionItem:()=>Ws,AccordionTrigger:()=>Tt,Alert:()=>ye,AlertAction:()=>xe,AlertDescription:()=>Se,AlertDialog:()=>ts,AlertDialogAction:()=>ls,AlertDialogCancel:()=>ps,AlertDialogContent:()=>ss,AlertDialogDescription:()=>ns,AlertDialogFooter:()=>rs,AlertDialogHeader:()=>os,AlertDialogMedia:()=>as,AlertDialogTitle:()=>is,AlertDialogTrigger:()=>es,AlertTitle:()=>ve,AspectRatio:()=>sr,Attachment:()=>Mo,AttachmentAction:()=>Ho,AttachmentActions:()=>_o,AttachmentContent:()=>Po,AttachmentDescription:()=>Fo,AttachmentDropzone:()=>Vo,AttachmentGroup:()=>Ko,AttachmentMedia:()=>zo,AttachmentTitle:()=>Do,AttachmentTrigger:()=>Wo,Avatar:()=>Zo,Badge:()=>pt,BaseUIComponents:()=>Fr,BlockViewer:()=>Gt,Breadcrumb:()=>Gs,BreadcrumbEllipsis:()=>qt,BreadcrumbItem:()=>Js,BreadcrumbLink:()=>Qs,BreadcrumbList:()=>Ys,BreadcrumbPage:()=>to,BreadcrumbSeparator:()=>Ut,Bubble:()=>or,Button:()=>K,ButtonGroup:()=>ir,ButtonGroupSeparator:()=>nr,ButtonGroupText:()=>pr,Calendar:()=>No,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>ae,CardFooter:()=>oe,CardHeader:()=>se,CardTitle:()=>re,Carousel:()=>Io,CarouselNext:()=>To,CarouselPrevious:()=>$o,CarouselSlide:()=>Ro,Chart:()=>Bo,Checkbox:()=>Te,ClipboardButton:()=>jt,Collapsible:()=>Vs,CollapsibleContent:()=>Xs,CollapsibleTrigger:()=>Zs,Combobox:()=>Oo,Command:()=>jo,ContextMenu:()=>Ps,ContextMenuContent:()=>Fs,ContextMenuItem:()=>_s,ContextMenuTrigger:()=>Ds,DataTable:()=>Kt,DatePicker:()=>ko,Dialog:()=>ue,DialogClose:()=>fe,DialogContent:()=>It,DialogDescription:()=>ge,DialogFooter:()=>he,DialogHeader:()=>be,DialogTitle:()=>me,DialogTrigger:()=>de,Direction:()=>rr,Drawer:()=>cs,DrawerClose:()=>fs,DrawerContent:()=>ds,DrawerDescription:()=>gs,DrawerFooter:()=>hs,DrawerHeader:()=>bs,DrawerTitle:()=>ms,DrawerTrigger:()=>us,DropdownMenu:()=>bt,DropdownMenuCheckboxItem:()=>Rt,DropdownMenuContent:()=>mt,DropdownMenuGroup:()=>Ts,DropdownMenuItem:()=>gt,DropdownMenuLabel:()=>Us,DropdownMenuRadioGroup:()=>qs,DropdownMenuRadioItem:()=>$t,DropdownMenuSeparator:()=>Ms,DropdownMenuShortcut:()=>zs,DropdownMenuSub:()=>ft,DropdownMenuSubContent:()=>yt,DropdownMenuSubTrigger:()=>ot,DropdownMenuTrigger:()=>ht,Empty:()=>we,EmptyContent:()=>Ne,EmptyDescription:()=>Le,EmptyHeader:()=>Ae,EmptyMedia:()=>Ee,EmptyTitle:()=>Ce,Field:()=>Ct,FieldContent:()=>ur,FieldDescription:()=>Nt,FieldError:()=>kt,FieldGroup:()=>Et,FieldLabel:()=>Lt,FieldLegend:()=>cr,FieldSeparator:()=>br,FieldSet:()=>lr,FieldTitle:()=>dr,Form:()=>Yt,HoverCard:()=>Bs,HoverCardContent:()=>Rs,HoverCardTrigger:()=>Is,Icon:()=>k,Input:()=>ie,InputGroup:()=>_e,InputGroupAddon:()=>He,InputGroupButton:()=>We,InputGroupInput:()=>Ve,InputGroupText:()=>Ke,InputGroupTextarea:()=>Ze,InputOtp:()=>Xe,Item:()=>ar,Kbd:()=>Be,Label:()=>hr,Markdown:()=>Zt,MarkdownTree:()=>Xt,MarkdownTreeNode:()=>Dr,Marker:()=>Ie,Menubar:()=>ao,Message:()=>Xo,MessageScroller:()=>Go,NativeSelect:()=>$e,NavigationMenu:()=>oo,NavigationMenuItem:()=>ro,Pagination:()=>eo,PaginationItem:()=>so,Popover:()=>ks,PopoverContent:()=>js,PopoverTrigger:()=>Os,Progress:()=>er,Pwa:()=>yr,PwaBody:()=>Er,PwaClose:()=>Nr,PwaContent:()=>Sr,PwaDescription:()=>Ar,PwaFooter:()=>Lr,PwaHeader:()=>xr,PwaSteps:()=>Cr,PwaTitle:()=>wr,PwaTrigger:()=>vr,Questionnaire:()=>Yo,QuestionnaireNext:()=>tr,QuestionnairePrevious:()=>Qo,QuestionnaireStep:()=>Jo,RadioGroup:()=>Ue,RadioGroupItem:()=>qe,Resizable:()=>Uo,ScrollArea:()=>qo,Select:()=>Ge,SelectContent:()=>Je,SelectItem:()=>Qe,SelectTrigger:()=>Ye,Separator:()=>ke,Sheet:()=>vs,SheetClose:()=>Ls,SheetContent:()=>xs,SheetDescription:()=>Cs,SheetFooter:()=>As,SheetHeader:()=>ws,SheetTitle:()=>Es,SheetTrigger:()=>Ss,Shell:()=>_t,ShellContent:()=>Wt,ShellHeader:()=>wo,ShellMain:()=>xo,ShellNav:()=>So,ShellSidebar:()=>Ht,ShellSidebarHeader:()=>vo,ShellUserMenu:()=>Ao,Sidebar:()=>at,SidebarClose:()=>zt,SidebarContent:()=>St,SidebarFooter:()=>no,SidebarGroup:()=>xt,SidebarGroupAction:()=>Pt,SidebarGroupCollapsible:()=>Dt,SidebarGroupContent:()=>bo,SidebarGroupLabel:()=>wt,SidebarHeader:()=>io,SidebarInput:()=>co,SidebarInset:()=>po,SidebarMenu:()=>it,SidebarMenuAction:()=>Ft,SidebarMenuBadge:()=>mo,SidebarMenuButton:()=>rt,SidebarMenuItem:()=>At,SidebarMenuSkeleton:()=>go,SidebarMenuSub:()=>ho,SidebarMenuSubButton:()=>yo,SidebarMenuSubItem:()=>fo,SidebarProvider:()=>Ur,SidebarRail:()=>lo,SidebarSeparator:()=>uo,SidebarTrigger:()=>Mt,Skeleton:()=>ut,Slider:()=>ze,Spinner:()=>Oe,Switch:()=>Me,TabContent:()=>Bt,TabTrigger:()=>ce,Table:()=>Eo,Tabs:()=>ne,TabsContainer:()=>pe,TabsList:()=>le,TextEditor:()=>kr,Textarea:()=>Re,ThemeButton:()=>nt,Toast:()=>vt,Toggle:()=>mr,ToggleGroup:()=>gr,ToggleGroupItem:()=>fr,Tooltip:()=>$s,Typography:()=>je,createNamedIcon:()=>Ra,findMarkdownTreeNode:()=>xa,iconComponentName:()=>Qa});var ip=b(()=>{m();Jr();Jr();sa(Fr)});function bc(){return document.querySelector("[b-block-code-template]")}function hc(t){return t.match(/<templates[^>]*>([\s\S]*)<\/templates>/)?.[1]||t}function mc(t){for(let e of t.querySelectorAll?.("[b-block] [b-icon], [b-block] [b-ui='icon']")||[])!e.hasAttribute("b-icon-base-url")&&!e.hasAttribute("b-att-base-url")&&e.setAttribute("b-icon-base-url",dc)}var wa,cc,uc,dc,Gt,np=b(()=>{m();Zr();jr();Y();si();rp();wa=Vt({storageKey:"baseui-example-theme",toggleSelector:"",labelSelector:""}),cc=[{key:"docs",label:"Docs",href:"/docs"},{key:"icons",label:"Icons",href:"/docs/icons"},{key:"examples",label:"Examples",href:"/examples/index.html"},{key:"blocks",label:"Blocks",href:"/blocks"}],uc={desktop:"",tablet:"768px",mobile:"390px"},dc="/dist/icons/lucide";Gt=class extends n{setup(){this.navItems=this.props.navItems||cc,this.previewFrame=S("previewFrame"),this.embedRoot=S("embedRoot"),this.code=tp(),this.state=g({mode:"preview",viewport:"desktop",copyLabel:"Copy code",embed:new URLSearchParams(globalThis.location.search).get("embed")==="1",codeVariant:"owl",staticTemplate:"",staticTemplateStatus:"idle"}),O(()=>this.mountPreview()),F(()=>this.mountStaticBaseUI())}get activeCode(){return this.state.codeVariant==="template"?this.state.staticTemplateStatus==="ready"?this.state.staticTemplate:"Converting to a static template...":this.code}async setCodeVariant(e){if(this.state.codeVariant=e,e==="template"&&this.state.staticTemplateStatus==="idle"){this.state.staticTemplateStatus="loading";let s=await sp(this.code);this.state.staticTemplate=s,this.state.staticTemplateStatus="ready"}}get title(){return document.body.dataset.blockTitle||document.title||"Block"}get description(){return document.body.dataset.blockDescription||"Preview and copy this BaseUI block."}get previewStyle(){let e=uc[this.state.viewport]||"";return e?`max-width:${e}`:""}setMode(e){this.state.mode=e}setViewport(e){this.state.viewport=e}async copyCode(){await globalThis.navigator?.clipboard?.writeText(this.activeCode),this.state.copyLabel="Copied"}mountPreview(){this.state.embed&&(document.body.className="m-0");let e=this.state.embed?this.embedRoot.el:this.previewFrame.el,s=bc();if(!(!e||!s)){if(s.tagName==="SCRIPT"){this.mountOwlPreview(e,s);return}e.replaceChildren(s.content.cloneNode(!0)),this.mountStaticBaseUI(e),op(e)}}async mountOwlPreview(e,s){e.replaceChildren();let r=await Promise.resolve().then(()=>(ip(),ap));class i extends n{setup(){this.state=g({collapsed:!1})}}o(i,"components",r),o(i,"template","examples.SidebarBlock");let a=[await Hr("/dist/baseui.templates.xml"),s.textContent].map(hc).join(`
15
+ `);await oa(i,e,{templates:`<templates>${a}</templates>`}),wa.set(wa.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){mc(e),globalThis.BaseUI?.mountAll(e),wa.set(wa.current(),{skipStorage:!0})}};o(Gt,"template","baseui.BlockViewer"),o(Gt,"components",{Button:K,Icon:k,ThemeButton:nt}),o(Gt,"props",{navItems:{type:Array,optional:!0}})});var Ot,yr,vr,Sr,xr,wr,Ar,Er,Cr,Lr,Nr,pp=b(()=>{m();Vr();U();Ot={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},yr=class extends n{setup(){this.pwaState=g({open:$(this.props)}),A({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.pwaState.open=$(e))})}setOpen(e){T(this.props)||(this.pwaState.open=e),this.props.onOpenChange?.(e)}};o(yr,"template","baseui.Pwa"),o(yr,"props",{open:{type:Boolean,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});vr=class extends n{onClick(){this.env.setPwaOpen(!0)}};o(vr,"template","baseui.PwaTrigger"),o(vr,"props",Ot);Sr=class extends n{setup(){this.rootRef=S("root"),G(e=>{if(!e)return;let s=document.activeElement;return Tr(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(e){e.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(e){e.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};o(Sr,"template","baseui.PwaContent"),o(Sr,"props",Ot);xr=class extends n{};o(xr,"template","baseui.PwaHeader"),o(xr,"props",Ot);wr=class extends n{};o(wr,"template","baseui.PwaTitle"),o(wr,"props",Ot);Ar=class extends n{};o(Ar,"template","baseui.PwaDescription"),o(Ar,"props",Ot);Er=class extends n{};o(Er,"template","baseui.PwaBody"),o(Er,"props",Ot);Cr=class extends n{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};o(Cr,"template","baseui.PwaSteps"),o(Cr,"props",{...Ot,steps:{type:Array,optional:!0}});Lr=class extends n{};o(Lr,"template","baseui.PwaFooter"),o(Lr,"props",Ot);Nr=class extends n{onClick(){this.env.setPwaOpen(!1)}};o(Nr,"template","baseui.PwaClose"),o(Nr,"props",Ot)});function up(t,e){return typeof t=="string"?t:e}function gc(t){return{title:t.submitted&&t.title.trim().length>0&&t.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:t.submitted&&t.description.length>0&&t.description.length<20?"Description must be at least 20 characters.":""}}var lp,cp,Yt,dp=b(()=>{m();jr();U();Ja();lp="",cp="";Yt=class extends n{setup(){this.state=g({title:up(this.props.title,lp),description:up(this.props.description,cp),submitted:!1})}get classNames(){return W("baseui-form",this.props.className)}get titlePlaceholder(){return this.props.titlePlaceholder||"Login button not working on mobile"}get descriptionPlaceholder(){return this.props.descriptionPlaceholder||"I'm having an issue with the login button on mobile."}get maxDescriptionLength(){return this.props.maxDescriptionLength||100}get descriptionLength(){return this.state.description.length}get errors(){return gc(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=lp,this.state.description=cp,this.state.submitted=!1}submit(e){e.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};o(Yt,"template","baseui.Form"),o(Yt,"components",{Button:K,Field:Ct,FieldDescription:Nt,FieldError:kt,FieldGroup:Et,FieldLabel:Lt}),o(Yt,"props",{title:{type:String,optional:!0},description:{type:String,optional:!0},titlePlaceholder:{type:String,optional:!0},descriptionPlaceholder:{type:String,optional:!0},maxDescriptionLength:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onSubmit:{type:Function,optional:!0}})});function fc(){return ci??(ci=import("./runtime/milkdown/milkdown-text-editor.js")),ci}async function Aa(t){return(await fc()).createMilkdownTextEditor(t)}function Ea({collaborative:t,providerType:e,url:s}={}){return!!t||!!(e&&s)}var ci,ui=b(()=>{});var kr,bp=b(()=>{m();ui();kr=class extends n{setup(){this.editorRef=S("editor"),this.editorHandle=null,this.mountPromise=null,this.mountToken=0,this.isDestroyed=!1,this.state=g({content:"",status:"loading",error:""}),Qt(()=>this.load(this.props)),R(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),O(()=>this.mountEditor()),F(()=>this.mountEditor()),Wr(()=>{this.isDestroyed=!0,this.destroyEditor()})}get classNames(){let e=["baseui-text-editor"];return this.props.className&&e.push(this.props.className),e.join(" ")}get isCollaborative(){return Ea({collaborative:this.props.collaborative,providerType:this.props.provider,url:this.props.url})}get editorLabel(){return this.isCollaborative?"Collaborative rich text editor":"Rich text editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.collaborative!==this.props.collaborative||e.provider!==this.props.provider||e.room!==this.props.room||e.url!==this.props.url||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);s=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}this.state.content=s,this.state.status="ready"}async mountEditor(){let e=this.editorRef.el;if(this.isDestroyed||!e||this.editorHandle||this.mountPromise||this.state.status!=="ready")return;let s=++this.mountToken;return this.mountPromise=(async()=>{try{let r=await Aa({root:e,value:this.state.content,placeholder:this.props.placeholder,collaborative:this.isCollaborative,providerType:this.props.provider,room:this.props.room||"baseui-text-editor",url:this.props.url,password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(i,a,p)=>{this.state.content=i,this.props.onChange?.(i,a,p)}});if(s!==this.mountToken){r.destroy?.();return}this.editorHandle=r}catch(r){s===this.mountToken&&(this.state.status="error",this.state.error=r.message||String(r))}finally{this.mountPromise=null,this.isDestroyed||this.mountEditor()}})(),this.mountPromise}destroyEditor(){this.mountToken++,this.editorHandle?.destroy?.(),this.editorHandle=null}};o(kr,"template","baseui.TextEditor"),o(kr,"props",{content:{type:String,optional:!0},src:{type:String,optional:!0},placeholder:{type:String,optional:!0},collaborative:{type:Boolean,optional:!0},provider:{type:String,optional:!0},room:{type:String,optional:!0},url:{type:String,optional:!0},password:{type:String,optional:!0},signaling:{type:Array,optional:!0},user:{type:Object,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var Fr={};La(Fr,{Accordion:()=>Hs,AccordionContent:()=>Ks,AccordionItem:()=>Ws,AccordionTrigger:()=>Tt,Alert:()=>ye,AlertAction:()=>xe,AlertDescription:()=>Se,AlertDialog:()=>ts,AlertDialogAction:()=>ls,AlertDialogCancel:()=>ps,AlertDialogContent:()=>ss,AlertDialogDescription:()=>ns,AlertDialogFooter:()=>rs,AlertDialogHeader:()=>os,AlertDialogMedia:()=>as,AlertDialogTitle:()=>is,AlertDialogTrigger:()=>es,AlertTitle:()=>ve,AspectRatio:()=>sr,Attachment:()=>Mo,AttachmentAction:()=>Ho,AttachmentActions:()=>_o,AttachmentContent:()=>Po,AttachmentDescription:()=>Fo,AttachmentDropzone:()=>Vo,AttachmentGroup:()=>Ko,AttachmentMedia:()=>zo,AttachmentTitle:()=>Do,AttachmentTrigger:()=>Wo,Avatar:()=>Zo,Badge:()=>pt,BlockViewer:()=>Gt,Breadcrumb:()=>Gs,BreadcrumbEllipsis:()=>qt,BreadcrumbItem:()=>Js,BreadcrumbLink:()=>Qs,BreadcrumbList:()=>Ys,BreadcrumbPage:()=>to,BreadcrumbSeparator:()=>Ut,Bubble:()=>or,Button:()=>K,ButtonGroup:()=>ir,ButtonGroupSeparator:()=>nr,ButtonGroupText:()=>pr,Calendar:()=>No,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>ae,CardFooter:()=>oe,CardHeader:()=>se,CardTitle:()=>re,Carousel:()=>Io,CarouselNext:()=>To,CarouselPrevious:()=>$o,CarouselSlide:()=>Ro,Chart:()=>Bo,Checkbox:()=>Te,ClipboardButton:()=>jt,Collapsible:()=>Vs,CollapsibleContent:()=>Xs,CollapsibleTrigger:()=>Zs,Combobox:()=>Oo,Command:()=>jo,ContextMenu:()=>Ps,ContextMenuContent:()=>Fs,ContextMenuItem:()=>_s,ContextMenuTrigger:()=>Ds,DataTable:()=>Kt,DatePicker:()=>ko,Dialog:()=>ue,DialogClose:()=>fe,DialogContent:()=>It,DialogDescription:()=>ge,DialogFooter:()=>he,DialogHeader:()=>be,DialogTitle:()=>me,DialogTrigger:()=>de,Direction:()=>rr,Drawer:()=>cs,DrawerClose:()=>fs,DrawerContent:()=>ds,DrawerDescription:()=>gs,DrawerFooter:()=>hs,DrawerHeader:()=>bs,DrawerTitle:()=>ms,DrawerTrigger:()=>us,DropdownMenu:()=>bt,DropdownMenuCheckboxItem:()=>Rt,DropdownMenuContent:()=>mt,DropdownMenuGroup:()=>Ts,DropdownMenuItem:()=>gt,DropdownMenuLabel:()=>Us,DropdownMenuRadioGroup:()=>qs,DropdownMenuRadioItem:()=>$t,DropdownMenuSeparator:()=>Ms,DropdownMenuShortcut:()=>zs,DropdownMenuSub:()=>ft,DropdownMenuSubContent:()=>yt,DropdownMenuSubTrigger:()=>ot,DropdownMenuTrigger:()=>ht,Empty:()=>we,EmptyContent:()=>Ne,EmptyDescription:()=>Le,EmptyHeader:()=>Ae,EmptyMedia:()=>Ee,EmptyTitle:()=>Ce,Field:()=>Ct,FieldContent:()=>ur,FieldDescription:()=>Nt,FieldError:()=>kt,FieldGroup:()=>Et,FieldLabel:()=>Lt,FieldLegend:()=>cr,FieldSeparator:()=>br,FieldSet:()=>lr,FieldTitle:()=>dr,Form:()=>Yt,HoverCard:()=>Bs,HoverCardContent:()=>Rs,HoverCardTrigger:()=>Is,Icon:()=>k,Input:()=>ie,InputGroup:()=>_e,InputGroupAddon:()=>He,InputGroupButton:()=>We,InputGroupInput:()=>Ve,InputGroupText:()=>Ke,InputGroupTextarea:()=>Ze,InputOtp:()=>Xe,Item:()=>ar,Kbd:()=>Be,Label:()=>hr,Markdown:()=>Zt,MarkdownTree:()=>Xt,MarkdownTreeNode:()=>Dr,Marker:()=>Ie,Menubar:()=>ao,Message:()=>Xo,MessageScroller:()=>Go,NativeSelect:()=>$e,NavigationMenu:()=>oo,NavigationMenuItem:()=>ro,Pagination:()=>eo,PaginationItem:()=>so,Popover:()=>ks,PopoverContent:()=>js,PopoverTrigger:()=>Os,Progress:()=>er,Pwa:()=>yr,PwaBody:()=>Er,PwaClose:()=>Nr,PwaContent:()=>Sr,PwaDescription:()=>Ar,PwaFooter:()=>Lr,PwaHeader:()=>xr,PwaSteps:()=>Cr,PwaTitle:()=>wr,PwaTrigger:()=>vr,Questionnaire:()=>Yo,QuestionnaireNext:()=>tr,QuestionnairePrevious:()=>Qo,QuestionnaireStep:()=>Jo,RadioGroup:()=>Ue,RadioGroupItem:()=>qe,Resizable:()=>Uo,ScrollArea:()=>qo,Select:()=>Ge,SelectContent:()=>Je,SelectItem:()=>Qe,SelectTrigger:()=>Ye,Separator:()=>ke,Sheet:()=>vs,SheetClose:()=>Ls,SheetContent:()=>xs,SheetDescription:()=>Cs,SheetFooter:()=>As,SheetHeader:()=>ws,SheetTitle:()=>Es,SheetTrigger:()=>Ss,Shell:()=>_t,ShellContent:()=>Wt,ShellHeader:()=>wo,ShellMain:()=>xo,ShellNav:()=>So,ShellSidebar:()=>Ht,ShellSidebarHeader:()=>vo,ShellUserMenu:()=>Ao,Sidebar:()=>at,SidebarClose:()=>zt,SidebarContent:()=>St,SidebarFooter:()=>no,SidebarGroup:()=>xt,SidebarGroupAction:()=>Pt,SidebarGroupCollapsible:()=>Dt,SidebarGroupContent:()=>bo,SidebarGroupLabel:()=>wt,SidebarHeader:()=>io,SidebarInput:()=>co,SidebarInset:()=>po,SidebarMenu:()=>it,SidebarMenuAction:()=>Ft,SidebarMenuBadge:()=>mo,SidebarMenuButton:()=>rt,SidebarMenuItem:()=>At,SidebarMenuSkeleton:()=>go,SidebarMenuSub:()=>ho,SidebarMenuSubButton:()=>yo,SidebarMenuSubItem:()=>fo,SidebarProvider:()=>Ur,SidebarRail:()=>lo,SidebarSeparator:()=>uo,SidebarTrigger:()=>Mt,Skeleton:()=>ut,Slider:()=>ze,Spinner:()=>Oe,Switch:()=>Me,TabContent:()=>Bt,TabTrigger:()=>ce,Table:()=>Eo,Tabs:()=>ne,TabsContainer:()=>pe,TabsList:()=>le,TextEditor:()=>kr,Textarea:()=>Re,ThemeButton:()=>nt,Toast:()=>vt,Toggle:()=>mr,ToggleGroup:()=>gr,ToggleGroupItem:()=>fr,Tooltip:()=>$s,Typography:()=>je,createNamedIcon:()=>Ra,findMarkdownTreeNode:()=>xa,iconComponentName:()=>Qa});var Jr=b(()=>{jr();Ei();Ua();qa();Ci();Ni();ki();ji();Ii();Ri();Da();$i();Ti();Ui();qi();Mi();zi();Pi();Di();Fi();_i();Hi();Wi();Ki();Vi();Zi();Xi();Yi();Qi();tn();Ka();en();Za();sn();rn();an();nn();pn();ln();ha();dn();bn();hn();mn();gn();fn();yn();vn();Sn();xn();wn();Cn();Ln();Nn();kn();On();jn();Bn();In();Rn();$n();Tn();Ja();Y();Un();qn();si();Dn();Fn();Jn();Qn();np();pp();dp();bp()});y();var vi="0.0.8";m();Jr();y();Vr();function yc(t){let{open:e,close:s,destroy:r}=ba(t,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return t.setAttribute("role","alertdialog"),t.BaseUIAlertDialog={open:e,close:s},{destroy:()=>{r(),delete t.BaseUIAlertDialog}}}c.register("alert-dialog",{type:"owl",mount:yc});y();q();var di={default:"baseui-alert-default",destructive:"baseui-alert-destructive",info:"baseui-alert-default",success:"alert-success",warning:"alert-warning",danger:"baseui-alert-destructive"};function vc(t){t.classList.add("alert","baseui-alert",di[t.getAttribute("b-att-variant")||"default"]||di.default),t.setAttribute("role",t.getAttribute("role")||"alert");let e=null;if(!!t.getAttribute("b-att-dismissible")){if(t.classList.add("alert-dismissible","fade","show"),!t.querySelector('[data-bs-dismiss="alert"]')){let r=document.createElement("button");r.type="button",r.className="btn-close",r.setAttribute("data-bs-dismiss","alert"),r.setAttribute("aria-label","Close"),t.appendChild(r)}e=new(w()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","baseui-alert","alert-dismissible","fade","show",...Object.values(di))}}}c.register("alert",{type:"static",mount:vc});y();q();function Sc(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",r=new Map,i=new Map,a=new Map,p=(l,u)=>{let d=l.querySelector("[b-accordion-trigger]");l.setAttribute("b-att-state",u?"open":"closed"),d?.setAttribute("aria-expanded",String(u)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:u}}))};return t.setAttribute("role","presentation"),e.forEach((l,u)=>{let d=l.querySelector("[b-accordion-trigger]"),h=l.querySelector("[b-accordion-panel]");if(!h)return;let f=h.id||`baseui-accordion-panel-${u}`;h.id=f;let v=l.getAttribute("b-att-state")==="open";h.classList.add("collapse"),v&&h.classList.add("show");let E=new(w()).Collapse(h,{toggle:!1});a.set(l,E);let L=()=>p(l,!0),x=()=>p(l,!1);h.addEventListener("shown.bs.collapse",L),h.addEventListener("hidden.bs.collapse",x),i.set(l,{onShown:L,onHidden:x}),d?.setAttribute("aria-expanded",String(v)),d?.setAttribute("aria-controls",f);let B=()=>{let D=h.classList.contains("show");!s&&!D&&e.forEach(C=>{if(C===l)return;let H=a.get(C),X=C.querySelector("[b-accordion-panel]");H&&X?.classList.contains("show")&&H.hide()}),D?E.hide():E.show()};r.set(l,B),d?.addEventListener("click",B)}),{destroy:()=>{e.forEach(l=>{let u=l.querySelector("[b-accordion-trigger]"),d=l.querySelector("[b-accordion-panel]");u?.removeEventListener("click",r.get(l));let h=i.get(l);d&&h&&(d.removeEventListener("shown.bs.collapse",h.onShown),d.removeEventListener("hidden.bs.collapse",h.onHidden)),a.get(l)?.dispose()}),r.clear(),i.clear(),a.clear()}}}c.register("accordion",{type:"owl",mount:Sc});y();function xc(t){let e=t.getAttribute("b-att-ratio")||`${t.getAttribute("b-att-width")||16} / ${t.getAttribute("b-att-height")||9}`;return t.classList.add("baseui-aspect-ratio"),t.style.setProperty("--baseui-aspect-ratio",e),{destroy:()=>t.classList.remove("baseui-aspect-ratio")}}c.register("aspect-ratio",{type:"static",mount:xc});y();te();var wc=["idle","uploading","processing","error","done"],Ac=["default","sm","xs"],Ec=["content","title","description","actions"];function hp(t,e){t.classList.add(`baseui-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function Cc(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),r=wc.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",i=Ac.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",a=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("baseui-attachment"),t.classList.add(`baseui-attachment-${r}`,`baseui-attachment-${i}`,`baseui-attachment-${a}`),t.setAttribute("data-state",r),t.setAttribute("data-size",i),t.setAttribute("data-orientation",a),t.setAttribute("data-slot","attachment"),e&&t.classList.add("baseui-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(l=>{let u=l.getAttribute("b-att-variant")==="image"?"image":"icon";hp(l,"media"),l.classList.add(`baseui-attachment-media-${u}`),l.setAttribute("data-variant",u)}),Ec.forEach(l=>t.querySelectorAll(`[b-attachment-${l}]`).forEach(u=>hp(u,l))),t.querySelectorAll("[b-attachment-action]").forEach(l=>{let u=P[l.getAttribute("b-att-variant")]||P.ghost,d=M[l.getAttribute("b-att-size")]||M["icon-xs"];l.classList.add("btn","baseui-button",u,d,"baseui-button-icon","baseui-attachment-action"),l.setAttribute("data-slot","attachment-action"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),t.querySelectorAll("[b-attachment-trigger]").forEach(l=>{l.classList.add("baseui-attachment-trigger"),l.setAttribute("data-slot","attachment-trigger"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),e?.classList.add("form-control");let p=()=>{s&&(s.innerHTML=[...e.files].map(l=>`<li>${l.name}</li>`).join("")),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...e.files]}}))};return e?.addEventListener("change",p),{destroy:()=>e?.removeEventListener("change",p)}}function Lc(t){return t.classList.add("baseui-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("baseui-attachment-group")}}function Nc(t){let e=t.querySelector("input[type='file']");t.classList.add("baseui-attachment-dropzone"),t.setAttribute("data-slot","attachment-dropzone");let s=()=>e?.click(),r=u=>{u.preventDefault(),t.classList.add("baseui-attachment-dropzone-dragging")},i=()=>t.classList.remove("baseui-attachment-dropzone-dragging"),a=u=>{u.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:u}}))},p=u=>{u.preventDefault(),t.classList.remove("baseui-attachment-dropzone-dragging"),a([...u.dataTransfer?.files??[]])},l=()=>{a([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",r),t.addEventListener("dragleave",i),t.addEventListener("drop",p),e?.addEventListener("change",l),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",r),t.removeEventListener("dragleave",i),t.removeEventListener("drop",p),e?.removeEventListener("change",l)}}}c.register("attachment",{type:"owl",mount:Cc});c.register("attachment-group",{type:"static",mount:Lc});c.register("attachment-dropzone",{type:"static",mount:Nc});y();function kc(t){t.classList.add("baseui-avatar");let e=t.querySelector("img"),s=t.querySelector("[b-avatar-fallback]");if(e&&s){let r=()=>{e.hidden=!0,s.hidden=!1};return s.hidden=!!e.getAttribute("src"),e.addEventListener("error",r),{destroy:()=>e.removeEventListener("error",r)}}return{}}c.register("avatar",{type:"static",mount:kc});y();Ta();function Oc(t){let e=ee[t.getAttribute("b-att-variant")||"secondary"]||ee.secondary;return t.classList.add("badge",e),t.getAttribute("b-att-pill")==="true"&&t.classList.add("rounded-pill"),{destroy:()=>t.classList.remove("badge","rounded-pill",...Object.values(ee))}}c.register("badge",{type:"static",mount:Oc});y();st();function mp(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))}function fp(t,e,s){return z(t,e,{size:s}),t}function jc(){let t=document.createElement("li"),e=document.createElement("span");return t.setAttribute("b-breadcrumb-separator",""),t.setAttribute("data-slot","breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t.className="baseui-breadcrumb-separator",e.className="baseui-breadcrumb-separator-icon",t.append(fp(e,"chevron-right","var(--b3_5)")),t}function Bc(t){t.classList.add("baseui-breadcrumb-separator"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true")}function Ic(t){if(t.classList.add("baseui-breadcrumb-ellipsis"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-ellipsis"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),!t.querySelector(".baseui-icon")){let e=document.createElement("span");e.className="baseui-breadcrumb-ellipsis-icon",t.prepend(fp(e,"ellipsis","var(--b4)"))}if(!t.querySelector(".visually-hidden")){let e=document.createElement("span");e.className="visually-hidden",e.textContent="More",t.append(e)}}function gp(t){t.classList.add("baseui-breadcrumb-page"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-page"),t.setAttribute("role",t.getAttribute("role")||"link"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-current","page")}function Rc(t){let e=t.querySelector("ol, ul")||t;t.classList.add("baseui-breadcrumb"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb"),t.setAttribute("aria-label",t.getAttribute("aria-label")||"breadcrumb"),e.classList.add("breadcrumb","baseui-breadcrumb-list"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))Bc(r);for(let r of e.querySelectorAll("[b-breadcrumb-ellipsis], .baseui-breadcrumb-ellipsis"))Ic(r);for(let r of e.querySelectorAll("[b-breadcrumb-page], .baseui-breadcrumb-page"))gp(r);e.querySelector("[b-breadcrumb-separator], .baseui-breadcrumb-separator")||mp(e).slice(0,-1).forEach(i=>i.after(jc()));let s=mp(e);return s.forEach((r,i)=>{r.classList.add("baseui-breadcrumb-item"),r.setAttribute("data-slot",r.getAttribute("data-slot")||"breadcrumb-item");for(let a of r.querySelectorAll("a"))a.classList.add("baseui-breadcrumb-link"),a.setAttribute("data-slot",a.getAttribute("data-slot")||"breadcrumb-link");if(i===s.length-1){let a=r.querySelector("[b-breadcrumb-page], .baseui-breadcrumb-page");a?gp(a):(r.classList.add("baseui-breadcrumb-page"),r.setAttribute("aria-current",r.getAttribute("aria-current")||"page"))}}),{destroy:()=>{t.classList.remove("baseui-breadcrumb"),e.classList.remove("breadcrumb","baseui-breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator]"))r.remove()}}}c.register("breadcrumb",{type:"owl",mount:Rc});y();function $c(t){return t.classList.add("baseui-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("baseui-bubble")}}c.register("bubble",{type:"static",mount:$c});y();st();te();function Tc(t){return[...t.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).map(e=>{let s=document.createElement("span");return s.textContent=e.textContent.trim(),e.replaceWith(s),s})}function Uc(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",r=!!t.textContent.trim(),i=e&&r?Tc(t):[],a=null;return t.classList.add("btn","baseui-button",P[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),M[t.getAttribute("b-att-size")]&&t.classList.add(M[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(a=document.createElement("span"),a.setAttribute("b-icon",e),a.dataset.icon=`inline-${s}`,z(a,e,{label:""}),t.insertBefore(a,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,r||(t.dataset.iconOnly="true",t.classList.add("baseui-button-icon"))),{destroy:()=>{a?.remove();for(let p of i)p.replaceWith(document.createTextNode(p.textContent));t.classList.remove("btn","baseui-button","baseui-button-icon",...Object.values(P),...Object.values(M)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}c.register("button",{type:"static",mount:Uc});y();function qc(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),r=[...t.querySelectorAll("[b-button-group-separator]")],i=[...t.querySelectorAll("[b-button-group-text]")];return t.classList.add("baseui-button-group",e?"btn-group-vertical":"btn-group"),(s==="sm"||s==="lg")&&t.classList.add(`btn-group-${s}`),t.setAttribute("role",t.getAttribute("role")||"group"),r.forEach(a=>{let p=a.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";a.classList.add("baseui-button-group-separator",`baseui-button-group-separator-${p}`),a.setAttribute("data-orientation",p),a.setAttribute("role","separator")}),i.forEach(a=>{a.classList.add("baseui-button-group-text")}),{destroy:()=>{t.classList.remove("baseui-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}c.register("button-group",{type:"static",mount:qc});y();var Mc=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function zc(t){let e=t.getAttribute("b-att-selected")?new Date(`${t.getAttribute("b-att-selected")}T00:00:00`):new Date,s=Number(t.getAttribute("b-att-month")??e.getMonth()+1)-1,r=Number(t.getAttribute("b-att-year")??e.getFullYear()),i=new Date(r,s,1),a=new Date(r,s+1,0).getDate(),p=i.getDay();t.classList.add("baseui-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
16
+ <div class="baseui-calendar__header">${Mc.format(i)}</div>
17
17
  <div class="baseui-calendar__weekdays">${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(d=>`<span>${d}</span>`).join("")}</div>
18
18
  <div b-calendar-grid class="baseui-calendar__grid"></div>
19
- `);let l=t.querySelector("[b-calendar-grid]");l.innerHTML="";for(let d=0;d<p;d+=1)l.append(document.createElement("span"));for(let d=1;d<=a;d+=1){let h=document.createElement("button"),g=`${r}-${String(s+1).padStart(2,"0")}-${String(d).padStart(2,"0")}`;h.type="button",h.textContent=String(d),h.setAttribute("b-att-value",g),h.setAttribute("aria-pressed",String(g===t.getAttribute("b-att-selected"))),l.append(h)}let u=d=>{let h=d.target.closest("button[b-att-value]");h&&(t.setAttribute("b-att-selected",h.getAttribute("b-att-value")),l.querySelectorAll("button").forEach(g=>g.setAttribute("aria-pressed",String(g===h))),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:h.getAttribute("b-att-value")}})))};return l.addEventListener("click",u),{destroy:()=>l.removeEventListener("click",u)}}c.register("calendar",{type:"owl",mount:Mc});y();function zc(t){return t.classList.add("card","baseui-card"),t.querySelector("[b-card-header]")?.classList.add("card-header"),t.querySelector("[b-card-body]")?.classList.add("card-body"),t.querySelector("[b-card-footer]")?.classList.add("card-footer"),{destroy:()=>t.classList.remove("card","baseui-card")}}c.register("card",{type:"static",mount:zc});y();q();function Pc(t){let e=[...t.querySelectorAll("[b-carousel-slide]")],s=t.querySelector("[b-carousel-prev]"),r=t.querySelector("[b-carousel-next]");if(t.classList.add("carousel","slide"),e.length&&!e[0].parentElement.classList.contains("carousel-inner")){let d=document.createElement("div");d.classList.add("carousel-inner"),e[0].before(d),e.forEach(h=>d.appendChild(h))}let i=Math.max(0,e.findIndex(d=>d.getAttribute("b-att-state")==="active"));e.forEach((d,h)=>{d.classList.add("carousel-item"),h===i&&d.classList.add("active"),d.setAttribute("b-att-state",h===i?"active":"inactive")});let a=e.length?new(x()).Carousel(t,{interval:!1,wrap:!0,touch:!0}):null,p=d=>{e.forEach((h,g)=>{h.setAttribute("b-att-state",g===d.to?"active":"inactive")}),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:d.to}}))};t.addEventListener("slid.bs.carousel",p);let l=()=>a?.prev(),u=()=>a?.next();return s?.addEventListener("click",l),r?.addEventListener("click",u),{destroy:()=>{s?.removeEventListener("click",l),r?.removeEventListener("click",u),t.removeEventListener("slid.bs.carousel",p),a?.dispose()}}}c.register("carousel",{type:"owl",mount:Pc});y();function fp(t,e,s=0){let r=Number(t.getAttribute(e));return Number.isFinite(r)?r:s}function Fc(t){let e=t.getAttribute("b-att-config")||t.querySelector("script[type='application/json']")?.textContent;if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Dc(t,e){let s=globalThis.getComputedStyle(t),r=[1,2,3,4,5].map(p=>s.getPropertyValue(`--baseui-chart-${p}`).trim()),i=s.getPropertyValue("--baseui-muted-foreground").trim(),a=s.getPropertyValue("--baseui-chart-grid").trim()||s.getPropertyValue("--baseui-border").trim();return e.options={maintainAspectRatio:!1,plugins:{legend:{labels:{boxWidth:8,boxHeight:8,color:i,font:{size:12}}},tooltip:{titleFont:{size:12},bodyFont:{size:12},cornerRadius:10,padding:10},...e.options?.plugins||{}},scales:{x:{border:{display:!1},grid:{display:!1},ticks:{color:i,font:{size:12}}},y:{border:{display:!1},grid:{color:a},ticks:{color:i,font:{size:12}}},...e.options?.scales||{}},...e.options},e.data?.datasets?.forEach((p,l)=>{p.backgroundColor||(p.backgroundColor=r[l%r.length]),p.borderColor||(p.borderColor=r[l%r.length]),p.borderRadius??(p.borderRadius=4)}),e}function _c(t,e,s){if(t.querySelector("[b-chart-tooltip]"))return;let r=document.createElement("span");r.setAttribute("b-chart-tooltip",""),r.textContent=`${e}: ${s}`,t.append(r)}function Hc(t){t.classList.add("baseui-chart"),t.setAttribute("role",t.getAttribute("role")||"figure");let e=t.querySelector("canvas"),s=null;if(e&&globalThis.Chart){let a=Fc(t);a&&(s=new globalThis.Chart(e,Dc(t,a)))}let r=[...t.querySelectorAll("[b-att-value]")],i=Math.max(1,...r.map(a=>fp(a,"b-att-value")));return r.forEach((a,p)=>{let l=fp(a,"b-att-value"),u=a.getAttribute("b-att-label")||a.textContent.trim()||`Series ${p+1}`,d=Math.max(0,Math.min(100,l/i*100));a.style.setProperty("--baseui-chart-value",`${d}%`),a.style.setProperty("--baseui-chart-index",String(p%5+1)),a.style.setProperty("--baseui-chart-color",`var(--baseui-chart-${p%5+1})`),a.setAttribute("role",a.getAttribute("role")||"listitem"),a.setAttribute("aria-label",a.getAttribute("aria-label")||`${u} ${l}`),_c(a,u,l)}),[...t.querySelectorAll("[b-chart-series], [b-chart-legend] > *")].forEach((a,p)=>{a.style.setProperty("--baseui-chart-color",a.style.getPropertyValue("--baseui-chart-color")||`var(--baseui-chart-${p%5+1})`)}),{destroy:()=>{s?.destroy?.(),t.classList.remove("baseui-chart")}}}c.register("chart",{type:"static",mount:Hc});y();function Wc(t){let e=t.matches("input")?t:t.querySelector("input[type='checkbox']"),s=t.matches("input")?t.closest("label, .form-check"):t;return e?.classList.add("form-check-input"),s?.classList.add("form-check","baseui-check"),{destroy:()=>{e?.classList.remove("form-check-input"),s?.classList.remove("form-check","baseui-check")}}}c.register("checkbox",{type:"static",mount:Wc});y();st();na();function Kc(t){let e=t.getAttribute("b-att-value");if(e!==null)return e;let s=t.getAttribute("b-att-target");if(s){let r=document.querySelector(s);if(r)return r.textContent??""}return t.textContent??""}function Vc(t){t.classList.remove(...Ra),t.className=`${t.className} ${ia({variant:t.getAttribute("b-att-variant")||"default",size:t.getAttribute("b-att-size")})}`.trim(),t.type=t.getAttribute("type")||"button";let e=t.querySelector("[b-clipboard-button-icon]");e||(e=document.createElement("span"),e.setAttribute("b-clipboard-button-icon",""),t.prepend(e));let s=t.getAttribute("b-att-icon")||"copy",r=t.getAttribute("b-att-copied-icon")||"check";z(e,s,{label:""});let i=null,a=async()=>{if(t.disabled)return;let p=Kc(t);try{await Br(p),z(e,r,{label:""}),t.setAttribute("data-copied","true"),t.dispatchEvent(new CustomEvent("baseui:clipboard-copy",{bubbles:!0,detail:{value:p}})),window.clearTimeout(i),i=window.setTimeout(()=>{z(e,s,{label:""}),t.removeAttribute("data-copied")},Number(t.getAttribute("b-att-reset-delay"))||2e3)}catch(l){t.dispatchEvent(new CustomEvent("baseui:clipboard-copy-error",{bubbles:!0,detail:{error:l}}))}};return t.addEventListener("click",a),{destroy:()=>{t.removeEventListener("click",a),window.clearTimeout(i),e.remove(),t.classList.remove(...Ra),t.removeAttribute("data-copied")}}}c.register("clipboard-button",{type:"static",mount:Vc});y();q();function Zc(t){let e=t.querySelector("[b-collapsible-trigger]"),s=t.querySelector("[b-collapsible-panel]"),r=d=>{t.setAttribute("b-att-state",d?"open":"closed"),e?.setAttribute("aria-expanded",String(d)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:d}}))};if(!s){let d=()=>r(t.getAttribute("b-att-state")!=="open");return e?.setAttribute("aria-expanded",String(t.getAttribute("b-att-state")==="open")),e?.addEventListener("click",d),{destroy:()=>e?.removeEventListener("click",d)}}let i=t.getAttribute("b-att-state")==="open";s.classList.add("collapse"),i&&s.classList.add("show");let a=new(x()).Collapse(s,{toggle:!1}),p=()=>r(!0),l=()=>r(!1);s.addEventListener("shown.bs.collapse",p),s.addEventListener("hidden.bs.collapse",l),e?.setAttribute("aria-expanded",String(i));let u=()=>{s.classList.contains("show")?a.hide():a.show()};return e?.addEventListener("click",u),{destroy:()=>{e?.removeEventListener("click",u),s.removeEventListener("shown.bs.collapse",p),s.removeEventListener("hidden.bs.collapse",l),a.dispose()}}}c.register("collapsible",{type:"owl",mount:Zc});y();function Xc(t){let e=t.querySelector("input"),s=t.querySelector("[b-combobox-list]"),r=()=>[...s?.querySelectorAll("[b-att-value]")||[]];t.classList.add("baseui-combobox"),e?.setAttribute("role","combobox"),e?.setAttribute("aria-expanded","false"),s?.setAttribute("role","listbox"),s&&(s.hidden=!0);let i=l=>{s&&(s.hidden=!l),e?.setAttribute("aria-expanded",String(l))},a=()=>{let l=e.value.toLowerCase();r().forEach(u=>{u.hidden=!u.textContent.toLowerCase().includes(l)}),i(!0)},p=l=>{let u=l.target.closest("[b-att-value]");u&&(e.value=u.textContent.trim(),t.setAttribute("b-att-value",u.getAttribute("b-att-value")),i(!1),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:u.getAttribute("b-att-value")}})))};return e?.addEventListener("input",a),e?.addEventListener("focus",()=>i(!0)),s?.addEventListener("click",p),{destroy:()=>{e?.removeEventListener("input",a),s?.removeEventListener("click",p)}}}c.register("combobox",{type:"owl",mount:Xc});y();function Gc(t){let e=t.querySelector("input"),s=()=>[...t.querySelectorAll("[b-command-item]")];t.classList.add("baseui-command"),t.setAttribute("role",t.getAttribute("role")||"dialog"),e?.classList.add("form-control");let r=()=>{let a=(e?.value||"").toLowerCase();s().forEach(p=>{p.hidden=!p.textContent.toLowerCase().includes(a)})},i=a=>{let p=a.target.closest("[b-command-item]");p&&t.dispatchEvent(new CustomEvent("baseui:select",{bubbles:!0,detail:{value:p.getAttribute("b-att-value")||p.textContent.trim()}}))};return e?.addEventListener("input",r),t.addEventListener("click",i),{destroy:()=>{e?.removeEventListener("input",r),t.removeEventListener("click",i)}}}c.register("command",{type:"owl",mount:Gc});y();function Yc(t){let e=t.querySelector("[b-context-menu-content]");if(!e)return{};e.hidden=!0,e.setAttribute("role","menu");let s=a=>{a.preventDefault(),e.hidden=!1,e.style.left=`${a.clientX}px`,e.style.top=`${a.clientY}px`,t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},r=()=>{e.hidden=!0,t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},i=a=>{a.key==="Escape"&&r()};return t.addEventListener("contextmenu",s),document.addEventListener("click",r),t.addEventListener("keydown",i),{destroy:()=>{t.removeEventListener("contextmenu",s),document.removeEventListener("click",r),t.removeEventListener("keydown",i)}}}c.register("context-menu",{type:"owl",mount:Yc});y();st();var yp=[["728ed52f","Success","ken99@example.com","$316.00"],["489e1d42","Success","abe45@example.com","$242.00"],["6b0888f6","Processing","monserrat44@example.com","$837.00"],["a1dc8c4e","Success","silas22@example.com","$874.00"],["15b96de0","Failed","carmella@example.com","$721.00"]];function Jc(t){t.querySelector("table")||(t.innerHTML=`
19
+ `);let l=t.querySelector("[b-calendar-grid]");l.innerHTML="";for(let d=0;d<p;d+=1)l.append(document.createElement("span"));for(let d=1;d<=a;d+=1){let h=document.createElement("button"),f=`${r}-${String(s+1).padStart(2,"0")}-${String(d).padStart(2,"0")}`;h.type="button",h.textContent=String(d),h.setAttribute("b-att-value",f),h.setAttribute("aria-pressed",String(f===t.getAttribute("b-att-selected"))),l.append(h)}let u=d=>{let h=d.target.closest("button[b-att-value]");h&&(t.setAttribute("b-att-selected",h.getAttribute("b-att-value")),l.querySelectorAll("button").forEach(f=>f.setAttribute("aria-pressed",String(f===h))),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:h.getAttribute("b-att-value")}})))};return l.addEventListener("click",u),{destroy:()=>l.removeEventListener("click",u)}}c.register("calendar",{type:"owl",mount:zc});y();function Pc(t){return t.classList.add("card","baseui-card"),t.querySelector("[b-card-header]")?.classList.add("card-header"),t.querySelector("[b-card-body]")?.classList.add("card-body"),t.querySelector("[b-card-footer]")?.classList.add("card-footer"),{destroy:()=>t.classList.remove("card","baseui-card")}}c.register("card",{type:"static",mount:Pc});y();q();function Dc(t){let e=[...t.querySelectorAll("[b-carousel-slide]")],s=t.querySelector("[b-carousel-prev]"),r=t.querySelector("[b-carousel-next]");if(t.classList.add("carousel","slide"),e.length&&!e[0].parentElement.classList.contains("carousel-inner")){let d=document.createElement("div");d.classList.add("carousel-inner"),e[0].before(d),e.forEach(h=>d.appendChild(h))}let i=Math.max(0,e.findIndex(d=>d.getAttribute("b-att-state")==="active"));e.forEach((d,h)=>{d.classList.add("carousel-item"),h===i&&d.classList.add("active"),d.setAttribute("b-att-state",h===i?"active":"inactive")});let a=e.length?new(w()).Carousel(t,{interval:!1,wrap:!0,touch:!0}):null,p=d=>{e.forEach((h,f)=>{h.setAttribute("b-att-state",f===d.to?"active":"inactive")}),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:d.to}}))};t.addEventListener("slid.bs.carousel",p);let l=()=>a?.prev(),u=()=>a?.next();return s?.addEventListener("click",l),r?.addEventListener("click",u),{destroy:()=>{s?.removeEventListener("click",l),r?.removeEventListener("click",u),t.removeEventListener("slid.bs.carousel",p),a?.dispose()}}}c.register("carousel",{type:"owl",mount:Dc});y();function yp(t,e,s=0){let r=Number(t.getAttribute(e));return Number.isFinite(r)?r:s}function Fc(t){let e=t.getAttribute("b-att-config")||t.querySelector("script[type='application/json']")?.textContent;if(!e)return null;try{return JSON.parse(e)}catch{return null}}function _c(t,e){let s=globalThis.getComputedStyle(t),r=[1,2,3,4,5].map(p=>s.getPropertyValue(`--baseui-chart-${p}`).trim()),i=s.getPropertyValue("--baseui-muted-foreground").trim(),a=s.getPropertyValue("--baseui-chart-grid").trim()||s.getPropertyValue("--baseui-border").trim();return e.options={maintainAspectRatio:!1,plugins:{legend:{labels:{boxWidth:8,boxHeight:8,color:i,font:{size:12}}},tooltip:{titleFont:{size:12},bodyFont:{size:12},cornerRadius:10,padding:10},...e.options?.plugins||{}},scales:{x:{border:{display:!1},grid:{display:!1},ticks:{color:i,font:{size:12}}},y:{border:{display:!1},grid:{color:a},ticks:{color:i,font:{size:12}}},...e.options?.scales||{}},...e.options},e.data?.datasets?.forEach((p,l)=>{p.backgroundColor||(p.backgroundColor=r[l%r.length]),p.borderColor||(p.borderColor=r[l%r.length]),p.borderRadius??(p.borderRadius=4)}),e}function Hc(t,e,s){if(t.querySelector("[b-chart-tooltip]"))return;let r=document.createElement("span");r.setAttribute("b-chart-tooltip",""),r.textContent=`${e}: ${s}`,t.append(r)}function Wc(t){t.classList.add("baseui-chart"),t.setAttribute("role",t.getAttribute("role")||"figure");let e=t.querySelector("canvas"),s=null;if(e&&globalThis.Chart){let a=Fc(t);a&&(s=new globalThis.Chart(e,_c(t,a)))}let r=[...t.querySelectorAll("[b-att-value]")],i=Math.max(1,...r.map(a=>yp(a,"b-att-value")));return r.forEach((a,p)=>{let l=yp(a,"b-att-value"),u=a.getAttribute("b-att-label")||a.textContent.trim()||`Series ${p+1}`,d=Math.max(0,Math.min(100,l/i*100));a.style.setProperty("--baseui-chart-value",`${d}%`),a.style.setProperty("--baseui-chart-index",String(p%5+1)),a.style.setProperty("--baseui-chart-color",`var(--baseui-chart-${p%5+1})`),a.setAttribute("role",a.getAttribute("role")||"listitem"),a.setAttribute("aria-label",a.getAttribute("aria-label")||`${u} ${l}`),Hc(a,u,l)}),[...t.querySelectorAll("[b-chart-series], [b-chart-legend] > *")].forEach((a,p)=>{a.style.setProperty("--baseui-chart-color",a.style.getPropertyValue("--baseui-chart-color")||`var(--baseui-chart-${p%5+1})`)}),{destroy:()=>{s?.destroy?.(),t.classList.remove("baseui-chart")}}}c.register("chart",{type:"static",mount:Wc});y();function Kc(t){let e=t.matches("input")?t:t.querySelector("input[type='checkbox']"),s=t.matches("input")?t.closest("label, .form-check"):t;return e?.classList.add("form-check-input"),s?.classList.add("form-check","baseui-check"),{destroy:()=>{e?.classList.remove("form-check-input"),s?.classList.remove("form-check","baseui-check")}}}c.register("checkbox",{type:"static",mount:Kc});y();st();na();function Vc(t){let e=t.getAttribute("b-att-value");if(e!==null)return e;let s=t.getAttribute("b-att-target");if(s){let r=document.querySelector(s);if(r)return r.textContent??""}return t.textContent??""}function Zc(t){t.classList.remove(...$a),t.className=`${t.className} ${ia({variant:t.getAttribute("b-att-variant")||"default",size:t.getAttribute("b-att-size")})}`.trim(),t.type=t.getAttribute("type")||"button";let e=t.querySelector("[b-clipboard-button-icon]");e||(e=document.createElement("span"),e.setAttribute("b-clipboard-button-icon",""),t.prepend(e));let s=t.getAttribute("b-att-icon")||"copy",r=t.getAttribute("b-att-copied-icon")||"check";z(e,s,{label:""});let i=null,a=async()=>{if(t.disabled)return;let p=Vc(t);try{await Br(p),z(e,r,{label:""}),t.setAttribute("data-copied","true"),t.dispatchEvent(new CustomEvent("baseui:clipboard-copy",{bubbles:!0,detail:{value:p}})),window.clearTimeout(i),i=window.setTimeout(()=>{z(e,s,{label:""}),t.removeAttribute("data-copied")},Number(t.getAttribute("b-att-reset-delay"))||2e3)}catch(l){t.dispatchEvent(new CustomEvent("baseui:clipboard-copy-error",{bubbles:!0,detail:{error:l}}))}};return t.addEventListener("click",a),{destroy:()=>{t.removeEventListener("click",a),window.clearTimeout(i),e.remove(),t.classList.remove(...$a),t.removeAttribute("data-copied")}}}c.register("clipboard-button",{type:"static",mount:Zc});y();q();function Xc(t){let e=t.querySelector("[b-collapsible-trigger]"),s=t.querySelector("[b-collapsible-panel]"),r=d=>{t.setAttribute("b-att-state",d?"open":"closed"),e?.setAttribute("aria-expanded",String(d)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:d}}))};if(!s){let d=()=>r(t.getAttribute("b-att-state")!=="open");return e?.setAttribute("aria-expanded",String(t.getAttribute("b-att-state")==="open")),e?.addEventListener("click",d),{destroy:()=>e?.removeEventListener("click",d)}}let i=t.getAttribute("b-att-state")==="open";s.classList.add("collapse"),i&&s.classList.add("show");let a=new(w()).Collapse(s,{toggle:!1}),p=()=>r(!0),l=()=>r(!1);s.addEventListener("shown.bs.collapse",p),s.addEventListener("hidden.bs.collapse",l),e?.setAttribute("aria-expanded",String(i));let u=()=>{s.classList.contains("show")?a.hide():a.show()};return e?.addEventListener("click",u),{destroy:()=>{e?.removeEventListener("click",u),s.removeEventListener("shown.bs.collapse",p),s.removeEventListener("hidden.bs.collapse",l),a.dispose()}}}c.register("collapsible",{type:"owl",mount:Xc});y();function Gc(t){let e=t.querySelector("input"),s=t.querySelector("[b-combobox-list]"),r=()=>[...s?.querySelectorAll("[b-att-value]")||[]];t.classList.add("baseui-combobox"),e?.setAttribute("role","combobox"),e?.setAttribute("aria-expanded","false"),s?.setAttribute("role","listbox"),s&&(s.hidden=!0);let i=l=>{s&&(s.hidden=!l),e?.setAttribute("aria-expanded",String(l))},a=()=>{let l=e.value.toLowerCase();r().forEach(u=>{u.hidden=!u.textContent.toLowerCase().includes(l)}),i(!0)},p=l=>{let u=l.target.closest("[b-att-value]");u&&(e.value=u.textContent.trim(),t.setAttribute("b-att-value",u.getAttribute("b-att-value")),i(!1),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:u.getAttribute("b-att-value")}})))};return e?.addEventListener("input",a),e?.addEventListener("focus",()=>i(!0)),s?.addEventListener("click",p),{destroy:()=>{e?.removeEventListener("input",a),s?.removeEventListener("click",p)}}}c.register("combobox",{type:"owl",mount:Gc});y();function Yc(t){let e=t.querySelector("input"),s=()=>[...t.querySelectorAll("[b-command-item]")];t.classList.add("baseui-command"),t.setAttribute("role",t.getAttribute("role")||"dialog"),e?.classList.add("form-control");let r=()=>{let a=(e?.value||"").toLowerCase();s().forEach(p=>{p.hidden=!p.textContent.toLowerCase().includes(a)})},i=a=>{let p=a.target.closest("[b-command-item]");p&&t.dispatchEvent(new CustomEvent("baseui:select",{bubbles:!0,detail:{value:p.getAttribute("b-att-value")||p.textContent.trim()}}))};return e?.addEventListener("input",r),t.addEventListener("click",i),{destroy:()=>{e?.removeEventListener("input",r),t.removeEventListener("click",i)}}}c.register("command",{type:"owl",mount:Yc});y();function Jc(t){let e=t.querySelector("[b-context-menu-content]");if(!e)return{};e.hidden=!0,e.setAttribute("role","menu");let s=a=>{a.preventDefault(),e.hidden=!1,e.style.left=`${a.clientX}px`,e.style.top=`${a.clientY}px`,t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},r=()=>{e.hidden=!0,t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},i=a=>{a.key==="Escape"&&r()};return t.addEventListener("contextmenu",s),document.addEventListener("click",r),t.addEventListener("keydown",i),{destroy:()=>{t.removeEventListener("contextmenu",s),document.removeEventListener("click",r),t.removeEventListener("keydown",i)}}}c.register("context-menu",{type:"owl",mount:Jc});y();st();var vp=[["728ed52f","Success","ken99@example.com","$316.00"],["489e1d42","Success","abe45@example.com","$242.00"],["6b0888f6","Processing","monserrat44@example.com","$837.00"],["a1dc8c4e","Success","silas22@example.com","$874.00"],["15b96de0","Failed","carmella@example.com","$721.00"]];function Qc(t){t.querySelector("table")||(t.innerHTML=`
20
20
  <div class="baseui-data-table__toolbar">
21
21
  <input b-table-search type="search" class="form-control baseui-data-table__search" placeholder="Filter emails...">
22
22
  <div class="baseui-data-table__columns"><button type="button" class="btn baseui-button btn-outline-secondary" data-slot="button" data-icon="inline-end" aria-label="Toggle columns"><span>Columns</span><span b-icon="chevron-down" data-icon="inline-end"></span></button></div>
@@ -24,11 +24,11 @@ var hi=Object.defineProperty;var Ap=(t,e,s)=>e in t?hi(t,e,{enumerable:!0,config
24
24
  <div class="baseui-data-table__viewport">
25
25
  <table class="table baseui-data-table__table">
26
26
  <thead><tr><th class="baseui-data-table__selection-cell"><input type="checkbox" class="form-check-input" aria-label="Select all rows"></th><th>Status</th><th b-att-sortable="true">Email <span class="baseui-data-table__sort-icon" data-icon="arrow-up-down" aria-hidden="true"></span></th><th class="text-end">Amount</th><th class="baseui-data-table__actions-cell"><span class="visually-hidden">Actions</span></th></tr></thead>
27
- <tbody>${yp.map(e=>`<tr data-row-key="${e[0]}"><td class="baseui-data-table__selection-cell"><input type="checkbox" class="form-check-input" aria-label="Select row"></td><td>${e[1]}</td><td>${e[2]}</td><td class="text-end"><span class="baseui-data-table__money">${e[3]}</span></td><td class="baseui-data-table__actions-cell"><button type="button" class="btn baseui-button btn-ghost baseui-button-icon" aria-label="Open menu" data-slot="button" data-icon="inline-start" data-icon-only="true"><span b-icon="ellipsis"></span></button></td></tr>`).join("")}</tbody>
27
+ <tbody>${vp.map(e=>`<tr data-row-key="${e[0]}"><td class="baseui-data-table__selection-cell"><input type="checkbox" class="form-check-input" aria-label="Select row"></td><td>${e[1]}</td><td>${e[2]}</td><td class="text-end"><span class="baseui-data-table__money">${e[3]}</span></td><td class="baseui-data-table__actions-cell"><button type="button" class="btn baseui-button btn-ghost baseui-button-icon" aria-label="Open menu" data-slot="button" data-icon="inline-start" data-icon-only="true"><span b-icon="ellipsis"></span></button></td></tr>`).join("")}</tbody>
28
28
  </table>
29
29
  </div>
30
30
  <div class="baseui-data-table__cards">
31
- ${yp.map(e=>`<div class="baseui-data-table__card" data-row-key="${e[0]}">
31
+ ${vp.map(e=>`<div class="baseui-data-table__card" data-row-key="${e[0]}">
32
32
  <div class="baseui-data-table__card-header"><input type="checkbox" class="form-check-input" aria-label="Select row"><div class="baseui-data-table__actions"><button type="button" class="btn baseui-button btn-ghost baseui-button-icon" aria-label="Open menu" data-slot="button" data-icon="inline-start" data-icon-only="true"><span b-icon="ellipsis"></span></button></div></div>
33
33
  <div class="baseui-data-table__card-field"><span class="baseui-data-table__card-label">Status</span><span class="baseui-data-table__card-value">${e[1]}</span></div>
34
34
  <div class="baseui-data-table__card-field"><span class="baseui-data-table__card-label">Email</span><span class="baseui-data-table__card-value">${e[2]}</span></div>
@@ -36,4 +36,4 @@ var hi=Object.defineProperty;var Ap=(t,e,s)=>e in t?hi(t,e,{enumerable:!0,config
36
36
  </div>`).join("")}
37
37
  </div>
38
38
  <div class="baseui-data-table__pagination"><div class="baseui-data-table__selection-summary">0 of 5 row(s) selected.</div><div class="baseui-data-table__pager"><button type="button" class="btn baseui-button btn-outline-secondary btn-sm" disabled>Previous</button><button type="button" class="btn baseui-button btn-outline-secondary btn-sm" disabled>Next</button></div></div>
39
- `)}function Qc(t){Jc(t),t.querySelectorAll("[b-icon]").forEach(C=>z(C,C.getAttribute("b-icon"),{label:""}));let e=t.querySelector("table")||t,s=t.querySelector("[b-table-search]"),r=t.querySelector(".baseui-data-table__selection-summary"),i=t.getAttribute("b-att-variant");t.classList.add("baseui-data-table"),i&&t.classList.add(`baseui-data-table-${i}`),e.classList.add("table");let a=t.querySelector(".baseui-data-table__cards"),p=()=>[...e.querySelectorAll("tbody tr")],l=C=>a?.querySelector(`[data-row-key="${C.dataset.rowKey}"]`),u=()=>[...e.querySelectorAll("tbody input[type='checkbox']")],d=()=>{r&&(r.textContent=`${u().filter(C=>C.checked).length} of ${p().filter(C=>!C.hidden).length} row(s) selected.`)},h=()=>{let C=(s?.value||"").toLowerCase();p().forEach(B=>{let E=!(B.cells[2]||B.cells[1]||B.cells[0]).textContent.toLowerCase().includes(C);B.hidden=E;let H=l(B);H&&(H.hidden=E)}),d()},g=(C,B)=>{let F=e.tBodies[0];p().sort((E,H)=>E.cells[C].textContent.localeCompare(H.cells[C].textContent)*B).forEach(E=>{F.append(E);let H=l(E);H&&a.append(H)})},v=C=>{let B=C.target.closest("th");if(!B)return;let F=B.getAttribute("b-att-sort")==="asc"?-1:1;e.querySelectorAll("th").forEach(E=>E.removeAttribute("b-att-sort")),B.setAttribute("b-att-sort",F===1?"asc":"desc"),g([...B.parentElement.children].indexOf(B),F)},w=(C,B)=>{let E=l(C)?.querySelector("input[type='checkbox']");E&&E.checked!==B&&(E.checked=B)},j=C=>{let B=C.target;if(B?.matches("input[type='checkbox']")){let F=B.closest("tr"),E=B.closest(".baseui-data-table__card");if(F)w(F,B.checked);else if(E){let X=p().find(Qr=>Qr.dataset.rowKey===E.dataset.rowKey)?.querySelector("input[type='checkbox']");X&&X.checked!==B.checked&&(X.checked=B.checked)}}d()};return s?.addEventListener("input",h),e.tHead?.addEventListener("click",v),e.addEventListener("change",j),a?.addEventListener("change",j),d(),{destroy:()=>{s?.removeEventListener("input",h),e.tHead?.removeEventListener("click",v),e.removeEventListener("change",j),a?.removeEventListener("change",j)}}}c.register("data-table",{type:"owl",mount:Qc});y();function tu(t){let e=t.matches("input")?t:t.querySelector("input[type='date'], input");t.classList.add("baseui-date-picker"),e?.classList.add("form-control"),e?.setAttribute("type",e.getAttribute("type")||"date");let s=()=>{t.setAttribute("b-att-value",e.value),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:e.value}}))};return e?.addEventListener("input",s),{destroy:()=>e?.removeEventListener("input",s)}}c.register("date-picker",{type:"owl",mount:tu});y();q();function eu(t){let e=t.getAttribute("b-att-trigger"),s=e?document.querySelector(e):null,r=t.querySelector("[b-dialog-panel]");if(t.classList.add("modal","fade","baseui-dialog-backdrop"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),r){let v=document.createElement("div");v.className="modal-dialog modal-dialog-centered",r.replaceWith(v),v.append(r),r.classList.add("modal-content")}[...t.querySelectorAll("[b-dialog-close]")].forEach(v=>v.setAttribute("data-bs-dismiss","modal"));let a=x().Modal.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,focus:!0}),p=null,l=()=>{p=document.activeElement},u=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},d=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0})),p?.focus?.(),p=null};t.addEventListener("show.bs.modal",l),t.addEventListener("shown.bs.modal",u),t.addEventListener("hidden.bs.modal",d);let h=()=>a.show(),g=()=>a.hide();return s?.addEventListener("click",h),t.setAttribute("b-att-state","closed"),t.BaseUIDialog={open:h,close:g},{destroy:()=>{s?.removeEventListener("click",h),t.removeEventListener("show.bs.modal",l),t.removeEventListener("shown.bs.modal",u),t.removeEventListener("hidden.bs.modal",d),a.dispose(),delete t.BaseUIDialog}}}c.register("dialog",{type:"owl",mount:eu});y();function su(t){let e=t.getAttribute("b-att-dir")||t.getAttribute("dir")||"ltr";return t.setAttribute("dir",e==="rtl"?"rtl":"ltr"),{}}c.register("direction",{type:"static",mount:su});y();q();function ou(t){let e=t.getAttribute("b-att-trigger"),s=e?document.querySelector(e):null;t.classList.add("offcanvas","offcanvas-bottom","baseui-drawer-overlay"),t.setAttribute("tabindex","-1"),[...t.querySelectorAll("[b-drawer-close]")].forEach(g=>g.setAttribute("data-bs-dismiss","offcanvas"));let i=x().Offcanvas.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,scroll:!1}),a=null,p=()=>{a=document.activeElement},l=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},u=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0})),a?.focus?.(),a=null};t.addEventListener("show.bs.offcanvas",p),t.addEventListener("shown.bs.offcanvas",l),t.addEventListener("hidden.bs.offcanvas",u);let d=()=>i.show(),h=()=>i.hide();return s?.addEventListener("click",d),t.setAttribute("b-att-state","closed"),t.BaseUIDrawer={open:d,close:h},{destroy:()=>{s?.removeEventListener("click",d),t.removeEventListener("show.bs.offcanvas",p),t.removeEventListener("shown.bs.offcanvas",l),t.removeEventListener("hidden.bs.offcanvas",u),i.dispose(),delete t.BaseUIDrawer}}}c.register("drawer",{type:"owl",mount:ou});y();q();st();var Sp="a, button, [role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']";function vp(t,e){t?.classList.add(e)}function ru(t,e){if(!e||t.querySelector("[b-dropdown-indicator], [data-slot$='indicator']"))return;let s=document.createElement("span");s.setAttribute("b-dropdown-indicator",""),s.append(z(document.createElement("span"),"check")),t.prepend(s)}function au(t){t.setAttribute("data-slot",t.getAttribute("data-slot")||"dropdown-menu-content"),t.querySelectorAll("[b-dropdown-group]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-group"),e.setAttribute("role",e.getAttribute("role")||"group")}),t.querySelectorAll("[b-dropdown-label]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-label")}),t.querySelectorAll("[b-dropdown-separator]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-separator"),e.setAttribute("role",e.getAttribute("role")||"separator")}),t.querySelectorAll("[b-dropdown-shortcut]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-shortcut")}),t.querySelectorAll("[b-dropdown-checkbox-item], [b-dropdown-radio-item]").forEach(e=>{let s=e.hasAttribute("b-dropdown-radio-item");e.setAttribute("role",s?"menuitemradio":"menuitemcheckbox"),e.setAttribute("data-slot",s?"dropdown-menu-radio-item":"dropdown-menu-checkbox-item"),e.setAttribute("aria-checked",e.hasAttribute("checked")||e.getAttribute("aria-checked")==="true"?"true":"false"),ru(e,e.getAttribute("aria-checked")==="true")}),t.querySelectorAll(Sp).forEach(e=>{e.setAttribute("role",e.getAttribute("role")||"menuitem"),e.setAttribute("tabindex",e.getAttribute("tabindex")||"0"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"dropdown-menu-item")})}function iu(t){let e=[];return t.querySelectorAll("[b-dropdown-sub]").forEach(s=>{let r=s.querySelector("[b-dropdown-sub-trigger]"),i=s.querySelector("[b-dropdown-sub-content]");if(!r||!i)return;if(vp(r,"baseui-dropdown-menu-sub-trigger"),vp(i,"baseui-dropdown-menu-sub-content"),r.setAttribute("data-slot","dropdown-menu-sub-trigger"),r.setAttribute("role","menuitem"),r.setAttribute("aria-haspopup","menu"),i.setAttribute("data-slot","dropdown-menu-sub-content"),i.setAttribute("role","menu"),i.hidden=!0,!r.querySelector(".baseui-dropdown-menu-sub-trigger-icon")){let d=z(document.createElement("span"),"chevron-right");d.classList.add("baseui-dropdown-menu-sub-trigger-icon"),r.append(d)}let a=d=>{i.hidden=!d,r.setAttribute("data-state",d?"open":"closed"),r.setAttribute("aria-expanded",String(d))},p=()=>a(!0),l=()=>a(!1),u=d=>{d.preventDefault(),a(i.hidden)};s.addEventListener("mouseenter",p),s.addEventListener("mouseleave",l),r.addEventListener("focus",p),r.addEventListener("click",u),e.push(()=>{s.removeEventListener("mouseenter",p),s.removeEventListener("mouseleave",l),r.removeEventListener("focus",p),r.removeEventListener("click",u)})}),()=>e.forEach(s=>s())}function nu(t){let e=t.querySelector("[b-dropdown-trigger]"),s=t.querySelector("[b-dropdown-menu]");if(!e||!s)return{destroy:()=>{}};t.classList.add("dropdown"),s.classList.add("dropdown-menu"),e.setAttribute("aria-haspopup","menu"),s.setAttribute("role","menu");let r=x().Dropdown.getOrCreateInstance(e),i=v=>{t.setAttribute("b-att-state",v?"open":"closed"),e.setAttribute("aria-expanded",String(v)),t.dispatchEvent(new CustomEvent(v?"baseui:open":"baseui:close",{bubbles:!0}))},a=()=>i(!0),p=()=>i(!1);e.addEventListener("shown.bs.dropdown",a),e.addEventListener("hidden.bs.dropdown",p);let l=()=>r.toggle();e.addEventListener("click",l);let u=v=>{v.key==="Escape"?(r.hide(),e.focus()):v.key==="ArrowDown"&&!s.classList.contains("show")&&(v.preventDefault(),r.show(),[...s.querySelectorAll("a, button, [tabindex]:not([tabindex='-1'])")][0]?.focus())};t.addEventListener("keydown",u);let d=v=>{t.contains(v.target)||r.hide()};document.addEventListener("click",d),au(s);let h=iu(s),g=v=>{let w=v.target.closest(Sp);!w||w.closest("[b-dropdown-sub]")||r.hide()};return s.addEventListener("click",g),{destroy:()=>{h(),s.removeEventListener("click",g),document.removeEventListener("click",d),t.removeEventListener("keydown",u),e.removeEventListener("click",l),e.removeEventListener("shown.bs.dropdown",a),e.removeEventListener("hidden.bs.dropdown",p),r.dispose()}}}c.register("dropdown-menu",{type:"owl",mount:nu});y();var di={default:"baseui-empty-default",outline:"baseui-empty-outline",background:"baseui-empty-background"};function pu(t){let e=t.getAttribute("b-att-variant")||"default",s=[...t.querySelectorAll("[b-empty-media]")];return t.setAttribute("role",t.getAttribute("role")||"status"),t.classList.add("baseui-empty",di[e]||di.default),t.querySelectorAll("[b-empty-header]").forEach(r=>r.classList.add("baseui-empty-header")),t.querySelectorAll("[b-empty-title]").forEach(r=>r.classList.add("baseui-empty-title")),t.querySelectorAll("[b-empty-description]").forEach(r=>r.classList.add("baseui-empty-description")),t.querySelectorAll("[b-empty-content]").forEach(r=>r.classList.add("baseui-empty-content")),s.forEach(r=>{let i=r.getAttribute("b-att-variant")==="icon"?"icon":"default";r.classList.add("baseui-empty-media",`baseui-empty-media-${i}`),r.setAttribute("data-variant",i)}),{destroy:()=>{t.classList.remove("baseui-empty",...Object.values(di))}}}c.register("empty",{type:"owl",mount:pu});y();function Ea(t,e){t?.classList.add(...e.filter(Boolean))}function Jt(t,e,s,r){t.querySelectorAll(e).forEach(i=>{i.setAttribute("data-slot",s),Ea(i,[r])})}function lu(t){return t.querySelector("input, textarea, select, [role='checkbox'], [role='radio'], [role='switch']")}function cu(t,e){return e.id?e.id:`${t?.id||"baseui-field"}-error`}function uu(t){let e=t.getAttribute("b-att-slot")||t.getAttribute("data-slot")||"field",s=[];if(e==="field-set")t.setAttribute("data-slot","field-set"),Ea(t,["baseui-field-set"]),s.push("baseui-field-set");else if(e==="field-group")t.setAttribute("data-slot","field-group"),Ea(t,["baseui-field-group"]),s.push("baseui-field-group");else{let a=t.getAttribute("b-att-orientation")||t.getAttribute("data-orientation")||"vertical";t.setAttribute("role",t.getAttribute("role")||"group"),t.setAttribute("data-slot","field"),t.setAttribute("data-orientation",a),Ea(t,["baseui-field",`baseui-field-orientation-${a}`]),s.push("baseui-field",`baseui-field-orientation-${a}`)}Jt(t,"legend[b-field-legend], [b-field-legend]","field-legend","baseui-field-legend"),Jt(t,"[b-field-group]","field-group","baseui-field-group"),Jt(t,"[b-field-content]","field-content","baseui-field-content"),Jt(t,"label[b-field-label], [b-field-label], [b-label]","field-label","baseui-field-label"),Jt(t,"[b-field-title]","field-label","baseui-field-title"),Jt(t,"[b-field-description]","field-description","baseui-field-description"),Jt(t,"[b-field-separator]","field-separator","baseui-field-separator"),Jt(t,"[b-field-error], [b-error]","field-error","baseui-field-error"),t.querySelectorAll("[b-field-separator]").forEach(a=>{if(!a.querySelector(".baseui-field-separator-line")){let p=document.createElement("span");p.className="baseui-field-separator-line",p.setAttribute("aria-hidden","true"),a.prepend(p)}a.textContent.trim()&&a.setAttribute("data-content","true")});let r=lu(t),i=t.querySelector("[b-field-error], [b-error], [data-slot='field-error']");if(r&&i){i.setAttribute("role",i.getAttribute("role")||"alert");let a=cu(r,i);i.id=a,r.setAttribute("aria-describedby",a),r.setAttribute("aria-invalid","true"),t.setAttribute("data-invalid","true")}return{destroy:()=>t.classList.remove(...s)}}c.register("field",{type:"static",mount:uu});y();function du(t){t.classList.add("baseui-form"),t.setAttribute("data-slot","form"),t.setAttribute("novalidate","");let e=t.querySelector("[name='title']"),s=t.querySelector("[name='description']"),r=t.querySelector("[b-form-counter], .baseui-form-counter-text"),i=Number(s?.getAttribute("maxlength")||100),a=()=>{r&&s&&(r.textContent=`${s.value.length}/${i} characters`)},p=()=>{e&&(e.value=""),s&&(s.value=""),a()},l=t.querySelector("[b-form-reset]");return l?.addEventListener("click",p),s?.addEventListener("input",a),a(),{destroy(){l?.removeEventListener("click",p),s?.removeEventListener("input",a)}}}c.register("form",{type:"static",mount:du});y();function bu(t){let e=t.querySelector("[b-hover-card-trigger]"),s=t.querySelector("[b-hover-card-content]");if(!e||!s)return{};let r=()=>{s.hidden=!1,e.setAttribute("aria-expanded","true")},i=()=>{s.hidden=!0,e.setAttribute("aria-expanded","false")},a=p=>{p.key==="Escape"&&i()};return e.setAttribute("aria-haspopup","dialog"),s.setAttribute("role","dialog"),i(),t.addEventListener("mouseenter",r),t.addEventListener("mouseleave",i),t.addEventListener("focusin",r),t.addEventListener("focusout",i),t.addEventListener("keydown",a),{destroy:()=>{t.removeEventListener("mouseenter",r),t.removeEventListener("mouseleave",i),t.removeEventListener("focusin",r),t.removeEventListener("focusout",i),t.removeEventListener("keydown",a)}}}c.register("hover-card",{type:"owl",mount:bu});y();st();function hu(t){let e=t.getAttribute("b-icon")||t.getAttribute("b-att-icon")||t.getAttribute("aria-label");return e?(z(t,e,{baseUrl:t.getAttribute("b-icon-base-url")||t.getAttribute("b-att-base-url"),label:t.getAttribute("b-att-label")??t.getAttribute("aria-label")??"",size:t.getAttribute("b-icon-size")||t.getAttribute("b-att-size")}),{destroy:()=>{t.classList.remove("baseui-icon"),t.style.removeProperty("--baseui-icon-url"),t.style.removeProperty("--baseui-icon-size"),!t.getAttribute("b-att-label")&&!t.getAttribute("aria-label")&&t.removeAttribute("aria-hidden")}}):{}}c.register("icon",{type:"static",mount:hu});y();qa();function mu(t){let e=pa({tag:t.tagName.toLowerCase(),type:t.getAttribute("type")});return t.classList.add(e),{destroy:()=>t.classList.remove(e)}}c.register("input",{type:"static",mount:mu});y();Fa();function gu(t){t.classList.add("baseui-input-group"),t.setAttribute("role",t.getAttribute("role")||"group"),t.setAttribute("data-slot","input-group");let e=[...t.querySelectorAll("[b-input-group-addon], [b-input-group-text], [b-input-group-button]")],s=[...t.querySelectorAll("[b-input-group-button]")],r=[...t.querySelectorAll("input, textarea, [data-slot='input-group-control']")],i=a=>{a.target.closest("button")||ua(a.currentTarget)};return e.forEach(a=>{if(a.matches("[b-input-group-addon]")){let p=Pe[a.getAttribute("b-att-align")]?a.getAttribute("b-att-align"):"inline-start";a.classList.add("baseui-input-group-addon",Pe[p]),a.setAttribute("data-align",p),a.setAttribute("data-slot","input-group-addon"),a.setAttribute("role",a.getAttribute("role")||"group"),a.addEventListener("click",i)}a.matches("[b-input-group-text]")&&(a.classList.add("baseui-input-group-text"),a.setAttribute("data-slot","input-group-text"))}),s.forEach(a=>{let p=De[a.getAttribute("b-att-size")]?a.getAttribute("b-att-size"):"xs",l=Fe[a.getAttribute("b-att-variant")]||Fe.ghost;a.classList.add("btn","baseui-button","baseui-input-group-button",l,De[p]),a.setAttribute("data-size",p),a.setAttribute("data-slot","input-group-button"),a.getAttribute("type")||a.setAttribute("type","button")}),r.forEach(a=>{a.classList.add("baseui-input-group-control"),a.setAttribute("data-slot","input-group-control"),a.matches("input")&&a.classList.add("baseui-input-group-input"),a.matches("textarea")&&a.classList.add("baseui-input-group-textarea")}),{destroy:()=>{t.classList.remove("baseui-input-group"),t.removeAttribute("data-slot"),e.forEach(a=>{a.removeEventListener("click",i),a.classList.remove("baseui-input-group-addon","baseui-input-group-text",...Object.values(Pe)),a.removeAttribute("data-align"),a.removeAttribute("data-slot")}),s.forEach(a=>{a.classList.remove("btn","baseui-button","baseui-input-group-button",...Object.values(Fe),...Object.values(De)),a.removeAttribute("data-size"),a.removeAttribute("data-slot")}),r.forEach(a=>{a.classList.remove("baseui-input-group-control","baseui-input-group-input","baseui-input-group-textarea"),a.removeAttribute("data-slot")})}}}c.register("input-group",{type:"static",mount:gu});y();function fu(t){let e=[...t.querySelectorAll("input")];t.classList.add("baseui-input-otp"),e.forEach(a=>{a.classList.add("form-control"),a.inputMode=a.inputMode||"numeric",a.maxLength=a.maxLength>0?a.maxLength:1});let s=()=>{let a=e.map(p=>p.value).join("");t.setAttribute("b-att-value",a),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:a}}))},r=a=>{let p=e.indexOf(a.target);a.target.value&&e[p+1]&&e[p+1].focus(),s()},i=a=>{let p=a.clipboardData.getData("text").trim();p&&(a.preventDefault(),e.forEach((l,u)=>{l.value=p[u]||""}),s())};return e.forEach(a=>a.addEventListener("input",r)),t.addEventListener("paste",i),{destroy:()=>{e.forEach(a=>a.removeEventListener("input",r)),t.removeEventListener("paste",i)}}}c.register("input-otp",{type:"owl",mount:fu});y();function yu(t){return t.classList.add("baseui-item"),{destroy:()=>t.classList.remove("baseui-item")}}c.register("item",{type:"static",mount:yu});y();function vu(t){return t.classList.add("baseui-kbd"),{destroy:()=>t.classList.remove("baseui-kbd")}}c.register("kbd",{type:"static",mount:vu});y();function Su(t){return t.classList.add("form-label","b-label","baseui-label"),t.getAttribute("b-att-required")==="true"&&t.setAttribute("b-att-state","required"),{destroy:()=>t.classList.remove("form-label","b-label","baseui-label")}}c.register("label",{type:"static",mount:Su});y();function xu(t){return t.classList.add("baseui-marker"),{destroy:()=>t.classList.remove("baseui-marker")}}c.register("marker",{type:"static",mount:xu});y();va();pi();function wu(t){let e=t.querySelector("script[type='text/markdown'], template");return e?e.tagName==="TEMPLATE"?e.content.textContent:e.textContent:t.getAttribute("b-att-content")||t.textContent||""}function Au(t){return String(t||"").split(",").map(e=>e.trim()).filter(Boolean)}function Eu(t){t.classList.add("baseui-markdown");let e=t.getAttribute("b-att-src"),s=t.getAttribute("b-att-mermaid")!=="false",r=t.getAttribute("b-att-base-ui")!=="false",i=t.getAttribute("b-att-editable")==="true",a=t.getAttribute("b-att-collaborative")==="true",p=t.getAttribute("b-att-room")||"baseui-markdown",l=t.getAttribute("b-att-password")||void 0,u=Au(t.getAttribute("b-att-signaling")),d=!1,h=null;function g(w){d||(t.setAttribute("data-status","error"),t.textContent=`Unable to render Markdown: ${w?.message||w}`,t.dispatchEvent(new CustomEvent("baseui:markdown-error",{bubbles:!0,detail:{error:w}})))}async function v(){let w=wu(t);t.setAttribute("data-status","loading");let j=w;if(e)try{let E=await fetch(e);if(!E.ok)throw new Error(`${E.status} ${E.statusText}`);j=await E.text()}catch(E){g(E);return}if(i){t.replaceChildren(),t.classList.add("baseui-markdown-editable"),t.setAttribute("data-status","ready");let E=document.createElement("div");E.className="baseui-markdown-editor",E.setAttribute("data-slot","markdown-editor"),E.setAttribute("role","group"),E.setAttribute("aria-label",a?"Collaborative Markdown editor":"Markdown editor"),t.append(E);try{if(h=await Yr({root:E,value:j,collaborative:a,room:p,password:l,signaling:u,onChange:(H,X)=>{t.dispatchEvent(new CustomEvent("baseui:markdown-change",{bubbles:!0,detail:{markdown:H,previousMarkdown:X}}))}}),d){h?.destroy?.(),h=null;return}}catch(H){g(H);return}t.dispatchEvent(new CustomEvent("baseui:markdown-editor-ready",{bubbles:!0,detail:{collaborative:a,room:p}}));return}let{data:C,content:B}=Sa(j),F;try{F=await Xr(B)}catch(E){g(E);return}d||(t.innerHTML=F,t.setAttribute("data-status","ready"),await Gr(t,{mermaid:s,baseUi:r}),d||t.dispatchEvent(new CustomEvent("baseui:markdown-render",{bubbles:!0,detail:{html:F,frontmatter:C}})))}return v(),{destroy:()=>{d=!0,h?.destroy?.(),h=null,zr(t),t.classList.remove("baseui-markdown"),t.classList.remove("baseui-markdown-editable"),t.removeAttribute("data-status")}}}c.register("markdown",{type:"static",mount:Eu});y();function Cu(t){return t.classList.add("baseui-message"),t.setAttribute("b-att-side",t.getAttribute("b-att-side")||"incoming"),t.setAttribute("role",t.getAttribute("role")||"listitem"),{}}c.register("message",{type:"static",mount:Cu});y();function Lu(t){t.classList.add("baseui-message-scroller");let e=()=>{t.getAttribute("b-att-autoscroll")!=="false"&&(t.scrollTop=t.scrollHeight)},s=new window.MutationObserver(e);return s.observe(t,{childList:!0,subtree:!0}),window.requestAnimationFrame(e),{destroy:()=>s.disconnect()}}c.register("message-scroller",{type:"owl",mount:Lu});y();function Nu(t){t.setAttribute("role","menubar"),t.classList.add("baseui-menubar");for(let e of t.querySelectorAll("a, button"))e.setAttribute("role","menuitem");return{destroy:()=>t.classList.remove("baseui-menubar")}}c.register("menubar",{type:"static",mount:Nu});y();function ku(t){return t.classList.add("form-select"),(t.getAttribute("b-att-size")==="sm"||t.getAttribute("b-att-size")==="lg")&&t.classList.add(`form-select-${t.getAttribute("b-att-size")}`),{destroy:()=>t.classList.remove("form-select","form-select-sm","form-select-lg")}}c.register("native-select",{type:"static",mount:ku});y();function Ou(t){let e=[...t.querySelectorAll("a, button")].filter(r=>!r.disabled),s=r=>{let i=e.indexOf(r.target),a=r.key==="ArrowRight"?1:r.key==="ArrowLeft"?-1:0;!a||i<0||(r.preventDefault(),e[(i+a+e.length)%e.length]?.focus())};return t.setAttribute("role",t.getAttribute("role")||"menubar"),e.forEach(r=>r.setAttribute("role","menuitem")),t.addEventListener("keydown",s),{destroy:()=>t.removeEventListener("keydown",s)}}c.register("navigation-menu",{type:"owl",mount:Ou});y();function ju(t){let e=t.querySelector("ol, ul")||t,s=[...e.children];return t.classList.add("baseui-pagination"),e.classList.add("pagination"),s.forEach(r=>{let i=r.querySelector("a, button");r.classList.add("page-item"),i?.classList.add("page-link"),i?.getAttribute("aria-current")==="page"&&r.classList.add("active"),(i?.hasAttribute("disabled")||i?.getAttribute("aria-disabled")==="true")&&r.classList.add("disabled")}),t.setAttribute("aria-label",t.getAttribute("aria-label")||"Pagination"),{destroy:()=>{t.classList.remove("baseui-pagination"),e.classList.remove("pagination")}}}c.register("pagination",{type:"owl",mount:ju});y();q();function Bu(t){let e=t.querySelector("[b-popover-trigger]")||t,s=t.querySelector("[b-popover-content]"),r=s?s.innerHTML:"";s?.remove(),e.setAttribute("aria-haspopup","dialog");let i=new(x()).Popover(e,{content:r,html:!0,trigger:"click"}),a=()=>{t.setAttribute("b-att-state","open"),e.setAttribute("aria-expanded","true"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},p=()=>{t.setAttribute("b-att-state","closed"),e.setAttribute("aria-expanded","false"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))};return e.addEventListener("shown.bs.popover",a),e.addEventListener("hidden.bs.popover",p),t.setAttribute("b-att-state","closed"),e.setAttribute("aria-expanded","false"),{destroy:()=>{e.removeEventListener("shown.bs.popover",a),e.removeEventListener("hidden.bs.popover",p),i.dispose()}}}c.register("popover",{type:"owl",mount:Bu});y();function Iu(t){let e=Number(t.getAttribute("b-att-max")||t.getAttribute("aria-valuemax")||100),s=Math.min(e,Math.max(0,Number(t.getAttribute("b-att-value")||t.getAttribute("aria-valuenow")||0)));if(t.classList.add("baseui-progress"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuemin","0"),t.setAttribute("aria-valuemax",String(e)),t.setAttribute("aria-valuenow",String(s)),t.style.setProperty("--baseui-progress-value",`${s/e*100}%`),!t.querySelector("[b-progress-indicator]")){let r=document.createElement("span");r.setAttribute("b-progress-indicator",""),t.append(r)}return{destroy:()=>t.classList.remove("baseui-progress")}}c.register("progress",{type:"static",mount:Iu});y();Vr();function Ru(t){let{open:e,close:s,destroy:r}=ba(t,{closeSelector:"[b-pwa-close]"});return t.BaseUIPwa={open:e,close:s},{destroy:()=>{r(),delete t.BaseUIPwa}}}c.register("pwa",{type:"owl",mount:Ru});y();function $u(t){let e=[...t.querySelectorAll("[b-question]")],s=t.querySelector("[b-question-prev]"),r=t.querySelector("[b-question-next]"),i=0,a=u=>{i=Math.min(e.length-1,Math.max(0,u)),e.forEach((d,h)=>{d.hidden=h!==i,d.setAttribute("b-att-state",h===i?"active":"inactive")}),s&&(s.disabled=i===0),r&&(r.disabled=i===e.length-1),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:i}}))},p=()=>a(i-1),l=()=>a(i+1);return s?.addEventListener("click",p),r?.addEventListener("click",l),e.length&&a(0),{destroy:()=>{s?.removeEventListener("click",p),r?.removeEventListener("click",l)}}}c.register("questionnaire",{type:"owl",mount:$u});y();function Tu(t){let e=t.matches("input")?t:t.querySelector("input[type='radio']"),s=t.matches("input")?t.closest("label, .form-check"):t;return e?.classList.add("form-check-input"),s?.classList.add("form-check","baseui-check"),{destroy:()=>{e?.classList.remove("form-check-input"),s?.classList.remove("form-check","baseui-check")}}}c.register("radio-group",{type:"static",mount:Tu});y();function Uu(t){let e=t.querySelector("[b-resizable-panel]")||t,s=t.querySelector("[b-resizable-handle]");if(!s)return{};let r=Number(t.getAttribute("b-att-min")||160),i=Number(t.getAttribute("b-att-max")||720),a=p=>{let l=p.clientX,u=e.getBoundingClientRect().width,d=g=>{e.style.width=`${Math.min(i,Math.max(r,u+g.clientX-l))}px`},h=()=>{document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",h),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{width:e.style.width}}))};document.addEventListener("pointermove",d),document.addEventListener("pointerup",h)};return s.addEventListener("pointerdown",a),{destroy:()=>s.removeEventListener("pointerdown",a)}}c.register("resizable",{type:"owl",mount:Uu});y();function qu(t){return t.classList.add("baseui-scroll-area"),t.tabIndex=t.tabIndex>=0?t.tabIndex:0,t.setAttribute("role",t.getAttribute("role")||"region"),{}}c.register("scroll-area",{type:"static",mount:qu});y();function Mu(t){let e=t.getAttribute("b-att-orientation")==="vertical";return t.classList.add("baseui-separator",e?"baseui-separator-vertical":"baseui-separator-horizontal"),t.setAttribute("role",t.getAttribute("role")||"separator"),t.setAttribute("aria-orientation",e?"vertical":"horizontal"),{destroy:()=>t.classList.remove("baseui-separator","baseui-separator-vertical","baseui-separator-horizontal")}}c.register("separator",{type:"static",mount:Mu});y();function xp(t,{triggerSelector:e,panelSelector:s,ariaHaspopup:r,panelRole:i,onKeyDown:a}={}){let p=t.querySelector(e),l=t.querySelector(s),u=v=>{!l||!p||(l.hidden=!v,t.setAttribute("b-att-state",v?"open":"closed"),p.setAttribute("aria-expanded",String(v)),t.dispatchEvent(new CustomEvent(v?"baseui:open":"baseui:close",{bubbles:!0})))},d=()=>u(l?.hidden!==!1),h=v=>{v.key==="Escape"&&(u(!1),p?.focus()),a?.(v,{setOpen:u,panel:l,trigger:p})},g=v=>{t.contains(v.target)||u(!1)};return p?.setAttribute("aria-haspopup",r),l?.setAttribute("role",i),l&&(l.hidden=!0),p?.addEventListener("click",d),t.addEventListener("keydown",h),document.addEventListener("click",g),{trigger:p,panel:l,setOpen:u,destroy:()=>{p?.removeEventListener("click",d),t.removeEventListener("keydown",h),document.removeEventListener("click",g)}}}function zu(t){let{setOpen:e,destroy:s}=xp(t,{triggerSelector:"[b-select-trigger]",panelSelector:"[b-select-content]",ariaHaspopup:"listbox",panelRole:"listbox"}),r=t.querySelector("[b-select-trigger]"),i=t.querySelector("[b-select-value]"),a=p=>{let l=p.target.closest("[b-select-item]");if(!(!l||!t.contains(l))){for(let u of t.querySelectorAll("[b-select-item]"))u.setAttribute("aria-selected",String(u===l));i&&(i.textContent=l.textContent.trim()),t.setAttribute("b-att-value",l.getAttribute("b-att-value")||l.textContent.trim()),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:t.getAttribute("b-att-value")}})),e(!1),r?.focus()}};for(let p of t.querySelectorAll("[b-select-item]"))p.setAttribute("role","option");return t.addEventListener("click",a),{destroy:()=>{t.removeEventListener("click",a),s()}}}c.register("select",{type:"owl",mount:zu});y();function Pu(t){let e=[...t.querySelectorAll("[b-shell-collapse-trigger]")],s=i=>{t.setAttribute("b-att-collapsed",i?"true":"false"),t.dispatchEvent(new CustomEvent(i?"baseui:collapse":"baseui:expand",{bubbles:!0}))},r=()=>s(t.getAttribute("b-att-collapsed")!=="true");return e.forEach(i=>i.addEventListener("click",r)),s(t.getAttribute("b-att-collapsed")==="true"),t.BaseUIShell={collapse:()=>s(!0),expand:()=>s(!1),toggle:r},{destroy:()=>{e.forEach(i=>i.removeEventListener("click",r)),delete t.BaseUIShell}}}c.register("shell",{type:"owl",mount:Pu});y();q();function Fu(t){let e=t.getAttribute("b-att-trigger"),s=e?document.querySelector(e):null,r=t.getAttribute("b-att-side")==="left"?"offcanvas-start":"offcanvas-end";t.classList.add("offcanvas",r,"baseui-sheet-overlay"),t.setAttribute("tabindex","-1"),[...t.querySelectorAll("[b-sheet-close]")].forEach(v=>v.setAttribute("data-bs-dismiss","offcanvas"));let a=x().Offcanvas.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,scroll:!1}),p=null,l=()=>{p=document.activeElement},u=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},d=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0})),p?.focus?.(),p=null};t.addEventListener("show.bs.offcanvas",l),t.addEventListener("shown.bs.offcanvas",u),t.addEventListener("hidden.bs.offcanvas",d);let h=()=>a.show(),g=()=>a.hide();return s?.addEventListener("click",h),t.setAttribute("b-att-state","closed"),t.BaseUISheet={open:h,close:g},{destroy:()=>{s?.removeEventListener("click",h),t.removeEventListener("show.bs.offcanvas",l),t.removeEventListener("shown.bs.offcanvas",u),t.removeEventListener("hidden.bs.offcanvas",d),a.dispose(),delete t.BaseUISheet}}}c.register("sheet",{type:"owl",mount:Fu});y();var Du={"[b-sidebar-header]":["baseui-sidebar-header","sidebar-header","header"],"[b-sidebar-content]":["baseui-sidebar-content","sidebar-content","content"],"[b-sidebar-footer]":["baseui-sidebar-footer","sidebar-footer","footer"],"[b-sidebar-group]":["baseui-sidebar-group","sidebar-group","group"],"[b-sidebar-group-label]":["baseui-sidebar-group-label","sidebar-group-label","group-label"],"[b-sidebar-group-action]":["baseui-sidebar-group-action","sidebar-group-action","group-action"],"[b-sidebar-group-content]":["baseui-sidebar-group-content","sidebar-group-content","group-content"],"[b-sidebar-menu]":["baseui-sidebar-menu","sidebar-menu","menu"],"[b-sidebar-menu-item]":["baseui-sidebar-menu-item","sidebar-menu-item","menu-item"],"[b-sidebar-menu-button]":["baseui-sidebar-menu-button","sidebar-menu-button","menu-button"],"[b-sidebar-menu-action]":["baseui-sidebar-menu-action","sidebar-menu-action","menu-action"],"[b-sidebar-menu-badge]":["baseui-sidebar-menu-badge","sidebar-menu-badge","menu-badge"],"[b-sidebar-menu-sub]":["baseui-sidebar-menu-sub","sidebar-menu-sub","menu-sub"],"[b-sidebar-menu-sub-item]":["baseui-sidebar-menu-sub-item","sidebar-menu-sub-item","menu-sub-item"],"[b-sidebar-menu-sub-button]":["baseui-sidebar-menu-sub-button","sidebar-menu-sub-button","menu-sub-button"],"[b-sidebar-separator]":["baseui-sidebar-separator","sidebar-separator","separator"]};function _u(t){let e=[];for(let[s,[r,i,a]]of Object.entries(Du))for(let p of t.querySelectorAll(s))p.classList.add(r),p.dataset.slot=i,p.dataset.sidebar=a,(p.hasAttribute("b-att-active")||p.getAttribute("aria-current")==="page")&&(p.classList.add("is-active"),p.dataset.active="true"),e.push([p,r]);return e}function Hu(t){let e=t.getAttribute("b-att-trigger")?document.querySelector(t.getAttribute("b-att-trigger")):null,s=[...t.querySelectorAll("[b-sidebar-close]")],r=_u(t),i=u=>{t.setAttribute("b-att-state",u?"open":"closed"),t.classList.toggle("is-open",u),t.dataset.state=u?"expanded":"collapsed",t.dispatchEvent(new CustomEvent(u?"baseui:open":"baseui:close",{bubbles:!0}))},a=()=>i(!0),p=()=>i(!1),l=u=>{u.key==="Escape"&&p()};return e?.addEventListener("click",a),s.forEach(u=>u.addEventListener("click",p)),t.addEventListener("keydown",l),t.dataset.sidebar="sidebar",t.dataset.slot="sidebar",i(t.getAttribute("b-att-state")==="open"),t.BaseUISidebar={open:a,close:p},{destroy:()=>{e?.removeEventListener("click",a),s.forEach(u=>u.removeEventListener("click",p)),t.removeEventListener("keydown",l);for(let[u,d]of r)u.classList.remove(d,"is-active"),u.removeAttribute("data-slot"),u.removeAttribute("data-sidebar"),u.removeAttribute("data-active");t.removeAttribute("data-sidebar"),t.removeAttribute("data-slot"),t.removeAttribute("data-state"),delete t.BaseUISidebar}}}c.register("sidebar",{type:"owl",mount:Hu});y();function Wu(t){t.classList.add("baseui-slider");let e=()=>{t.style.setProperty("--baseui-slider-value",`${t.value}%`),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:t.value}}))};return e(),t.addEventListener("input",e),{destroy:()=>{t.removeEventListener("input",e),t.classList.remove("baseui-slider")}}}c.register("slider",{type:"static",mount:Wu});y();function Ku(t){let e=t.getAttribute("b-att-shape")==="circle"?"baseui-skeleton-circle":"baseui-skeleton-block";return t.classList.add("baseui-skeleton",e),t.setAttribute("aria-hidden",t.getAttribute("aria-hidden")||"true"),{destroy:()=>t.classList.remove("baseui-skeleton","baseui-skeleton-circle","baseui-skeleton-block")}}c.register("skeleton",{type:"static",mount:Ku});y();function Vu(t){let e=t.getAttribute("b-att-type")==="grow",s=t.getAttribute("b-att-label")||"Loading";if(t.classList.add(e?"spinner-grow":"spinner-border"),t.setAttribute("role",t.getAttribute("role")||"status"),!t.querySelector(".visually-hidden")){let r=document.createElement("span");r.className="visually-hidden",r.textContent=s,t.append(r)}return{destroy:()=>t.classList.remove("spinner-border","spinner-grow")}}c.register("spinner",{type:"static",mount:Vu});y();function Zu(t){let e=t.matches("input")?t:t.querySelector("input[type='checkbox']"),s=t.matches("input")?t.closest("label, .form-check"):t;return e?.classList.add("form-check-input"),e?.setAttribute("role",e.getAttribute("role")||"switch"),s?.classList.add("form-check","form-switch","baseui-switch"),{destroy:()=>{e?.classList.remove("form-check-input"),s?.classList.remove("form-check","form-switch","baseui-switch")}}}c.register("switch",{type:"static",mount:Zu});y();function Xu(t){if(t.classList.add("table","baseui-table"),t.getAttribute("b-att-striped")!=="false"&&t.classList.add("table-striped"),t.getAttribute("b-att-hover")!=="false"&&t.classList.add("table-hover"),t.getAttribute("b-att-responsive")==="true"&&!t.parentElement?.classList.contains("table-responsive")){let e=document.createElement("div");return e.className="table-responsive",t.before(e),e.append(t),{destroy:()=>{e.before(t),e.remove(),t.classList.remove("table","baseui-table","table-striped","table-hover")}}}return{destroy:()=>t.classList.remove("table","baseui-table","table-striped","table-hover")}}c.register("table",{type:"static",mount:Xu});y();q();Ma();function Gu(t){if(t.querySelector(":scope > .baseui-tabs-panel-card"))return;let e=document.createElement("div");e.className="card baseui-card baseui-tabs-panel-card rounded-0",e.style.cssText="border-end-start-radius: 8px !important; border-end-end-radius: 4px !important;";let s=document.createElement("div");for(s.className="card-body";t.firstChild;)s.appendChild(t.firstChild);e.appendChild(s),t.appendChild(e)}function Yu(t){t.classList.add("baseui-tabs-host");let e=[...t.querySelectorAll("[b-tab]")],s=[...t.querySelectorAll("[b-panel]")],r=new Map(s.map(g=>[g.getAttribute("b-panel"),g])),i=new Map,a=new Map,p=new Map,l=new Map,u=e[0]?.parentElement;u&&!u.hasAttribute("role")&&u.setAttribute("role","tablist");let d=t.getAttribute("b-att-value")||e[0]?.getAttribute("b-tab")||"",h=g=>{t.setAttribute("b-att-value",g),e.forEach(v=>{v.tabIndex=v.getAttribute("b-tab")===g?0:-1}),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:g}}))};return e.forEach((g,v)=>{let w=g.getAttribute("b-tab"),j=r.get(w),C=w===d;if(g.setAttribute("role","tab"),g.tabIndex=C?0:-1,C&&g.classList.add("active"),j){let X=j.id||`baseui-tabs-panel-${w}`;j.id=X,j.setAttribute("role","tabpanel"),j.classList.add("tab-pane","fade"),C&&j.classList.add("show","active"),Gu(j),g.setAttribute("data-bs-target",`#${X}`)}let B=x().Tab.getOrCreateInstance(g);i.set(g,B);let F=()=>B.show();g.addEventListener("click",F),a.set(g,F);let E=()=>h(w);g.addEventListener("shown.bs.tab",E),l.set(g,E);let H=X=>{let Qr=la(X.key,v,e.length);if(Qr===-1)return;X.preventDefault();let bi=e[Qr];bi.focus(),i.get(bi)?.show()};g.addEventListener("keydown",H),p.set(g,H)}),d&&t.setAttribute("b-att-value",d),{destroy:()=>{e.forEach(g=>{g.removeEventListener("click",a.get(g)),g.removeEventListener("keydown",p.get(g)),g.removeEventListener("shown.bs.tab",l.get(g)),i.get(g)?.dispose()}),a.clear(),p.clear(),l.clear(),i.clear()}}}c.register("tabs",{type:"owl",mount:Yu});y();function Ju(t){return t.classList.add("form-control"),t.getAttribute("b-att-resize")==="none"&&t.classList.add("baseui-textarea-no-resize"),{destroy:()=>t.classList.remove("form-control","baseui-textarea-no-resize")}}c.register("textarea",{type:"static",mount:Ju});y();ci();function Qu(t){let e=t.querySelector("template, script[type='text/html']");return e?e.tagName==="TEMPLATE"?e.innerHTML:e.textContent:t.getAttribute("b-att-content")||t.innerHTML||""}function td(t){return String(t||"").split(",").map(e=>e.trim()).filter(Boolean)}function ed(t){t.classList.add("baseui-text-editor");let e=t.getAttribute("b-att-src"),s=t.getAttribute("b-att-collaborative")==="true",r=t.getAttribute("b-att-room")||"baseui-text-editor",i=t.getAttribute("b-att-password")||void 0,a=td(t.getAttribute("b-att-signaling")),p=t.getAttribute("b-att-placeholder")||void 0,l=!1,u=null;function d(g){l||(t.setAttribute("data-status","error"),t.textContent=`Unable to mount text editor: ${g?.message||g}`,t.dispatchEvent(new CustomEvent("baseui:text-editor-error",{bubbles:!0,detail:{error:g}})))}async function h(){t.setAttribute("data-status","loading");let g=Qu(t);if(e)try{let w=await fetch(e);if(!w.ok)throw new Error(`${w.status} ${w.statusText}`);g=await w.text()}catch(w){d(w);return}t.replaceChildren();let v=document.createElement("div");v.className="baseui-text-editor-shell",v.setAttribute("data-slot","text-editor-shell"),v.setAttribute("role","group"),v.setAttribute("aria-label",s?"Collaborative rich text editor":"Rich text editor"),t.append(v);try{if(u=await Aa({root:v,value:g,placeholder:p,collaborative:s,room:r,password:i,signaling:a,onChange:(w,j)=>{t.dispatchEvent(new CustomEvent("baseui:text-editor-change",{bubbles:!0,detail:{html:w,previousHtml:j}}))}}),l){u?.destroy?.(),u=null;return}}catch(w){d(w);return}t.setAttribute("data-status","ready"),t.dispatchEvent(new CustomEvent("baseui:text-editor-ready",{bubbles:!0,detail:{collaborative:s,room:r}}))}return h(),{destroy:()=>{l=!0,u?.destroy?.(),u=null,t.classList.remove("baseui-text-editor"),t.removeAttribute("data-status")}}}c.register("text-editor",{type:"static",mount:ed});st();y();Zr();ti();function sd(t,e){let s=Mr(e);t.classList.remove(...zn),t.className=`${t.className} ${ga({variant:t.getAttribute("b-att-variant")||"outline",size:t.getAttribute("b-att-size")})}`.trim(),t.type=t.getAttribute("type")||"button",t.setAttribute("aria-label",s.label),t.setAttribute("title",s.label),t.setAttribute("aria-pressed",s.pressed);let r=t.querySelector("[b-theme-button-icon]");r||(r=document.createElement("span"),r.setAttribute("b-theme-button-icon",""),t.prepend(r)),r.setAttribute("b-icon",s.icon),z(r,s.icon,{baseUrl:t.getAttribute("b-icon-base-url")||t.getAttribute("b-att-base-url")});let i=t.querySelector("[b-theme-button-label]");i||(i=document.createElement("span"),i.className="visually-hidden",i.setAttribute("b-theme-button-label",""),t.append(i)),i.textContent=s.label}function od(t){let e=Vt({storageKey:t.getAttribute("b-att-storage-key")||void 0,toggleSelector:"[b-theme-toggle]",labelSelector:"[b-theme-label]"}),s=(a=e.current())=>sd(t,a),r=()=>s(e.toggle()),i=a=>s(a.detail?.theme);return s(e.set(e.current(),{skipStorage:!0})),t.addEventListener("click",r),document.addEventListener("baseui:theme-change",i),{destroy:()=>{t.removeEventListener("click",r),document.removeEventListener("baseui:theme-change",i)}}}c.register("theme-button",{type:"static",mount:od});y();q();function rd(t){let e=[...t.querySelectorAll("[b-toast-close]")],s=t.getAttribute("b-att-delay"),r=s===null?3e3:Number(s);t.classList.add("toast","fade"),t.setAttribute("role",t.getAttribute("b-att-variant")==="danger"?"alert":"status"),e.forEach(d=>d.setAttribute("data-bs-dismiss","toast"));let i=new(x()).Toast(t,{autohide:r>0,delay:r||3e3}),a=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},p=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))};t.addEventListener("shown.bs.toast",a),t.addEventListener("hidden.bs.toast",p);let l=()=>i.show(),u=()=>i.hide();return t.getAttribute("b-att-state")==="open"&&l(),t.BaseUIToast={show:l,hide:u},{destroy:()=>{t.removeEventListener("shown.bs.toast",a),t.removeEventListener("hidden.bs.toast",p),i.dispose(),delete t.BaseUIToast}}}c.register("toast",{type:"owl",mount:rd});y();q();function ad(t){let e=t.querySelector("[b-tooltip-trigger]")||t,s=t.querySelector("[b-tooltip-content]");!s&&t.getAttribute("b-att-content")&&(s=document.createElement("span"),s.setAttribute("b-tooltip-content",""),s.textContent=t.getAttribute("b-att-content"),t.appendChild(s));let r=s?s.innerHTML:"";s?.remove();let i=new(x()).Tooltip(e,{title:r,html:!0,trigger:"hover focus"}),a=()=>t.setAttribute("b-att-state","open"),p=()=>t.setAttribute("b-att-state","closed");return e.addEventListener("shown.bs.tooltip",a),e.addEventListener("hidden.bs.tooltip",p),t.setAttribute("b-att-state","closed"),{destroy:()=>{e.removeEventListener("shown.bs.tooltip",a),e.removeEventListener("hidden.bs.tooltip",p),i.dispose()}}}c.register("tooltip",{type:"owl",mount:ad});y();function id(t){t.classList.add("btn",t.getAttribute("b-att-variant")==="outline"?"btn-outline-secondary":"btn-light"),t.setAttribute("aria-pressed",t.getAttribute("aria-pressed")||"false");let e=()=>{let s=t.getAttribute("aria-pressed")!=="true";t.setAttribute("aria-pressed",String(s)),t.setAttribute("b-att-state",s?"on":"off"),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{pressed:s}}))};return t.addEventListener("click",e),{destroy:()=>t.removeEventListener("click",e)}}c.register("toggle",{type:"owl",mount:id});y();function nd(t){let e=[...t.querySelectorAll("[b-att-value], button")],s=t.getAttribute("b-att-multiple")==="true";t.classList.add("btn-group"),t.setAttribute("role",s?"group":"radiogroup"),e.forEach(i=>{i.classList.add("btn","btn-outline-secondary"),i.setAttribute("aria-pressed",i.getAttribute("aria-pressed")||"false")});let r=i=>{let a=i.target.closest("button, [b-att-value]");if(!a||!t.contains(a))return;s||e.forEach(l=>l.setAttribute("aria-pressed","false")),a.setAttribute("aria-pressed",String(a.getAttribute("aria-pressed")!=="true"));let p=e.filter(l=>l.getAttribute("aria-pressed")==="true").map(l=>l.getAttribute("b-att-value")||l.textContent.trim());t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:s?p:p[0]}}))};return t.addEventListener("click",r),{destroy:()=>t.removeEventListener("click",r)}}c.register("toggle-group",{type:"owl",mount:nd});y();var wp={lead:"lead",muted:"text-body-secondary",code:"baseui-code",kbd:"baseui-kbd"};function pd(t){let e=wp[t.getAttribute("b-att-variant")||"body"];return t.classList.add("baseui-typography"),e&&t.classList.add(e),{destroy:()=>t.classList.remove("baseui-typography",...Object.values(wp))}}c.register("typography",{type:"static",mount:pd});Jr();m();Zr();sa(Dr);gi(yi);fi();var hA=c;export{Hs as Accordion,Ks as AccordionContent,Ws as AccordionItem,Tt as AccordionTrigger,ye as Alert,xe as AlertAction,Se as AlertDescription,ts as AlertDialog,ls as AlertDialogAction,ps as AlertDialogCancel,ss as AlertDialogContent,ns as AlertDialogDescription,rs as AlertDialogFooter,os as AlertDialogHeader,as as AlertDialogMedia,is as AlertDialogTitle,es as AlertDialogTrigger,ve as AlertTitle,Ip as App,sr as AspectRatio,Mo as Attachment,Ho as AttachmentAction,_o as AttachmentActions,Po as AttachmentContent,Do as AttachmentDescription,Vo as AttachmentDropzone,Ko as AttachmentGroup,zo as AttachmentMedia,Fo as AttachmentTitle,Wo as AttachmentTrigger,Zo as Avatar,pt as Badge,c as BaseUI,Dr as BaseUIComponents,Mn as BaseUITheme,Gt as BlockViewer,Gs as Breadcrumb,qt as BreadcrumbEllipsis,Js as BreadcrumbItem,Qs as BreadcrumbLink,Ys as BreadcrumbList,to as BreadcrumbPage,Ut as BreadcrumbSeparator,or as Bubble,K as Button,ir as ButtonGroup,nr as ButtonGroupSeparator,pr as ButtonGroupText,No as Calendar,lt as Card,ct as CardBody,ae as CardDescription,oe as CardFooter,se as CardHeader,re as CardTitle,Io as Carousel,To as CarouselNext,$o as CarouselPrevious,Ro as CarouselSlide,Bo as Chart,Te as Checkbox,jt as ClipboardButton,Vs as Collapsible,Xs as CollapsibleContent,Zs as CollapsibleTrigger,Oo as Combobox,jo as Command,n as Component,Ps as ContextMenu,Ds as ContextMenuContent,_s as ContextMenuItem,Fs as ContextMenuTrigger,Kt as DataTable,ko as DatePicker,ue as Dialog,fe as DialogClose,It as DialogContent,ge as DialogDescription,he as DialogFooter,be as DialogHeader,me as DialogTitle,de as DialogTrigger,rr as Direction,cs as Drawer,fs as DrawerClose,ds as DrawerContent,gs as DrawerDescription,hs as DrawerFooter,bs as DrawerHeader,ms as DrawerTitle,us as DrawerTrigger,bt as DropdownMenu,Rt as DropdownMenuCheckboxItem,mt as DropdownMenuContent,Ts as DropdownMenuGroup,gt as DropdownMenuItem,Us as DropdownMenuLabel,qs as DropdownMenuRadioGroup,$t as DropdownMenuRadioItem,Ms as DropdownMenuSeparator,zs as DropdownMenuShortcut,ft as DropdownMenuSub,yt as DropdownMenuSubContent,ot as DropdownMenuSubTrigger,ht as DropdownMenuTrigger,we as Empty,Ne as EmptyContent,Le as EmptyDescription,Ae as EmptyHeader,Ee as EmptyMedia,Ce as EmptyTitle,Rp as EventBus,Ct as Field,ur as FieldContent,Nt as FieldDescription,kt as FieldError,Et as FieldGroup,Lt as FieldLabel,cr as FieldLegend,br as FieldSeparator,lr as FieldSet,dr as FieldTitle,Yt as Form,Bs as HoverCard,Rs as HoverCardContent,Is as HoverCardTrigger,N as Icon,ie as Input,_e as InputGroup,He as InputGroupAddon,We as InputGroupButton,Ve as InputGroupInput,Ke as InputGroupText,Ze as InputGroupTextarea,Xe as InputOtp,ar as Item,Be as Kbd,hr as Label,Zt as Markdown,Xt as MarkdownTree,Fr as MarkdownTreeNode,Ie as Marker,ao as Menubar,Xo as Message,Go as MessageScroller,$e as NativeSelect,oo as NavigationMenu,ro as NavigationMenuItem,$p as OwlError,eo as Pagination,so as PaginationItem,ks as Popover,js as PopoverContent,Os as PopoverTrigger,er as Progress,yr as Pwa,Er as PwaBody,Nr as PwaClose,Sr as PwaContent,Ar as PwaDescription,Lr as PwaFooter,xr as PwaHeader,Cr as PwaSteps,wr as PwaTitle,vr as PwaTrigger,Yo as Questionnaire,tr as QuestionnaireNext,Qo as QuestionnairePrevious,Jo as QuestionnaireStep,Ue as RadioGroup,qe as RadioGroupItem,Uo as Resizable,qo as ScrollArea,Ge as Select,Je as SelectContent,Qe as SelectItem,Ye as SelectTrigger,ke as Separator,vs as Sheet,Ls as SheetClose,xs as SheetContent,Cs as SheetDescription,As as SheetFooter,ws as SheetHeader,Es as SheetTitle,Ss as SheetTrigger,_t as Shell,Wt as ShellContent,wo as ShellHeader,xo as ShellMain,So as ShellNav,Ht as ShellSidebar,vo as ShellSidebarHeader,Ao as ShellUserMenu,at as Sidebar,zt as SidebarClose,St as SidebarContent,no as SidebarFooter,xt as SidebarGroup,Pt as SidebarGroupAction,Ft as SidebarGroupCollapsible,bo as SidebarGroupContent,wt as SidebarGroupLabel,io as SidebarHeader,co as SidebarInput,po as SidebarInset,it as SidebarMenu,Dt as SidebarMenuAction,mo as SidebarMenuBadge,rt as SidebarMenuButton,At as SidebarMenuItem,go as SidebarMenuSkeleton,ho as SidebarMenuSub,yo as SidebarMenuSubButton,fo as SidebarMenuSubItem,Ur as SidebarProvider,lo as SidebarRail,uo as SidebarSeparator,Mt as SidebarTrigger,ut as Skeleton,ze as Slider,Oe as Spinner,Me as Switch,Bt as TabContent,ce as TabTrigger,Eo as Table,ne as Tabs,pe as TabsContainer,le as TabsList,kr as TextEditor,Re as Textarea,nt as ThemeButton,vt as Toast,mr as Toggle,gr as ToggleGroup,fr as ToggleGroupItem,$s as Tooltip,je as Typography,Tp as __info__,Up as batched,qp as blockDom,Ia as createNamedIcon,Vt as createThemeController,hA as default,xa as findMarkdownTreeNode,Mp as htmlEscape,Ja as iconComponentName,Hr as loadFile,gd as loadTemplate,zp as markRaw,ka as markup,oa as mount,Qa as normalizeTheme,Pp as onError,k as onMounted,D as onPatched,Fp as onRendered,Wr as onWillDestroy,Dp as onWillPatch,_p as onWillRender,Qt as onWillStart,O as onWillUnmount,R as onWillUpdateProps,hd as rawMount,md as rawXml,Hp as reactive,sa as registerGlobalComponents,Wp as status,Kp as toRaw,A as useChildSubEnv,Vp as useComponent,G as useEffect,Zp as useEnv,Or as useExternalListener,S as useRef,f as useState,Xp as useSubEnv,Gp as validate,Yp as validateType,Jp as whenReady,xi as xml};
39
+ `)}function tu(t){Qc(t),t.querySelectorAll("[b-icon]").forEach(x=>z(x,x.getAttribute("b-icon"),{label:""}));let e=t.querySelector("table")||t,s=t.querySelector("[b-table-search]"),r=t.querySelector(".baseui-data-table__selection-summary"),i=t.getAttribute("b-att-variant");t.classList.add("baseui-data-table"),i&&t.classList.add(`baseui-data-table-${i}`),e.classList.add("table");let a=t.querySelector(".baseui-data-table__cards"),p=()=>[...e.querySelectorAll("tbody tr")],l=x=>a?.querySelector(`[data-row-key="${x.dataset.rowKey}"]`),u=()=>[...e.querySelectorAll("tbody input[type='checkbox']")],d=()=>{r&&(r.textContent=`${u().filter(x=>x.checked).length} of ${p().filter(x=>!x.hidden).length} row(s) selected.`)},h=()=>{let x=(s?.value||"").toLowerCase();p().forEach(B=>{let C=!(B.cells[2]||B.cells[1]||B.cells[0]).textContent.toLowerCase().includes(x);B.hidden=C;let H=l(B);H&&(H.hidden=C)}),d()},f=(x,B)=>{let D=e.tBodies[0];p().sort((C,H)=>C.cells[x].textContent.localeCompare(H.cells[x].textContent)*B).forEach(C=>{D.append(C);let H=l(C);H&&a.append(H)})},v=x=>{let B=x.target.closest("th");if(!B)return;let D=B.getAttribute("b-att-sort")==="asc"?-1:1;e.querySelectorAll("th").forEach(C=>C.removeAttribute("b-att-sort")),B.setAttribute("b-att-sort",D===1?"asc":"desc"),f([...B.parentElement.children].indexOf(B),D)},E=(x,B)=>{let C=l(x)?.querySelector("input[type='checkbox']");C&&C.checked!==B&&(C.checked=B)},L=x=>{let B=x.target;if(B?.matches("input[type='checkbox']")){let D=B.closest("tr"),C=B.closest(".baseui-data-table__card");if(D)E(D,B.checked);else if(C){let X=p().find(Qr=>Qr.dataset.rowKey===C.dataset.rowKey)?.querySelector("input[type='checkbox']");X&&X.checked!==B.checked&&(X.checked=B.checked)}}d()};return s?.addEventListener("input",h),e.tHead?.addEventListener("click",v),e.addEventListener("change",L),a?.addEventListener("change",L),d(),{destroy:()=>{s?.removeEventListener("input",h),e.tHead?.removeEventListener("click",v),e.removeEventListener("change",L),a?.removeEventListener("change",L)}}}c.register("data-table",{type:"owl",mount:tu});y();function eu(t){let e=t.matches("input")?t:t.querySelector("input[type='date'], input");t.classList.add("baseui-date-picker"),e?.classList.add("form-control"),e?.setAttribute("type",e.getAttribute("type")||"date");let s=()=>{t.setAttribute("b-att-value",e.value),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:e.value}}))};return e?.addEventListener("input",s),{destroy:()=>e?.removeEventListener("input",s)}}c.register("date-picker",{type:"owl",mount:eu});y();q();function su(t){let e=t.getAttribute("b-att-trigger"),s=e?document.querySelector(e):null,r=t.querySelector("[b-dialog-panel]");if(t.classList.add("modal","fade","baseui-dialog-backdrop"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),r){let v=document.createElement("div");v.className="modal-dialog modal-dialog-centered",r.replaceWith(v),v.append(r),r.classList.add("modal-content")}[...t.querySelectorAll("[b-dialog-close]")].forEach(v=>v.setAttribute("data-bs-dismiss","modal"));let a=w().Modal.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,focus:!0}),p=null,l=()=>{p=document.activeElement},u=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},d=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0})),p?.focus?.(),p=null};t.addEventListener("show.bs.modal",l),t.addEventListener("shown.bs.modal",u),t.addEventListener("hidden.bs.modal",d);let h=()=>a.show(),f=()=>a.hide();return s?.addEventListener("click",h),t.setAttribute("b-att-state","closed"),t.BaseUIDialog={open:h,close:f},{destroy:()=>{s?.removeEventListener("click",h),t.removeEventListener("show.bs.modal",l),t.removeEventListener("shown.bs.modal",u),t.removeEventListener("hidden.bs.modal",d),a.dispose(),delete t.BaseUIDialog}}}c.register("dialog",{type:"owl",mount:su});y();function ou(t){let e=t.getAttribute("b-att-dir")||t.getAttribute("dir")||"ltr";return t.setAttribute("dir",e==="rtl"?"rtl":"ltr"),{}}c.register("direction",{type:"static",mount:ou});y();q();function ru(t){let e=t.getAttribute("b-att-trigger"),s=e?document.querySelector(e):null;t.classList.add("offcanvas","offcanvas-bottom","baseui-drawer-overlay"),t.setAttribute("tabindex","-1"),[...t.querySelectorAll("[b-drawer-close]")].forEach(f=>f.setAttribute("data-bs-dismiss","offcanvas"));let i=w().Offcanvas.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,scroll:!1}),a=null,p=()=>{a=document.activeElement},l=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},u=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0})),a?.focus?.(),a=null};t.addEventListener("show.bs.offcanvas",p),t.addEventListener("shown.bs.offcanvas",l),t.addEventListener("hidden.bs.offcanvas",u);let d=()=>i.show(),h=()=>i.hide();return s?.addEventListener("click",d),t.setAttribute("b-att-state","closed"),t.BaseUIDrawer={open:d,close:h},{destroy:()=>{s?.removeEventListener("click",d),t.removeEventListener("show.bs.offcanvas",p),t.removeEventListener("shown.bs.offcanvas",l),t.removeEventListener("hidden.bs.offcanvas",u),i.dispose(),delete t.BaseUIDrawer}}}c.register("drawer",{type:"owl",mount:ru});y();q();st();var xp="a, button, [role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']";function Sp(t,e){t?.classList.add(e)}function au(t,e){if(!e||t.querySelector("[b-dropdown-indicator], [data-slot$='indicator']"))return;let s=document.createElement("span");s.setAttribute("b-dropdown-indicator",""),s.append(z(document.createElement("span"),"check")),t.prepend(s)}function iu(t){t.setAttribute("data-slot",t.getAttribute("data-slot")||"dropdown-menu-content"),t.querySelectorAll("[b-dropdown-group]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-group"),e.setAttribute("role",e.getAttribute("role")||"group")}),t.querySelectorAll("[b-dropdown-label]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-label")}),t.querySelectorAll("[b-dropdown-separator]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-separator"),e.setAttribute("role",e.getAttribute("role")||"separator")}),t.querySelectorAll("[b-dropdown-shortcut]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-shortcut")}),t.querySelectorAll("[b-dropdown-checkbox-item], [b-dropdown-radio-item]").forEach(e=>{let s=e.hasAttribute("b-dropdown-radio-item");e.setAttribute("role",s?"menuitemradio":"menuitemcheckbox"),e.setAttribute("data-slot",s?"dropdown-menu-radio-item":"dropdown-menu-checkbox-item"),e.setAttribute("aria-checked",e.hasAttribute("checked")||e.getAttribute("aria-checked")==="true"?"true":"false"),au(e,e.getAttribute("aria-checked")==="true")}),t.querySelectorAll(xp).forEach(e=>{e.setAttribute("role",e.getAttribute("role")||"menuitem"),e.setAttribute("tabindex",e.getAttribute("tabindex")||"0"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"dropdown-menu-item")})}function nu(t){let e=[];return t.querySelectorAll("[b-dropdown-sub]").forEach(s=>{let r=s.querySelector("[b-dropdown-sub-trigger]"),i=s.querySelector("[b-dropdown-sub-content]");if(!r||!i)return;if(Sp(r,"baseui-dropdown-menu-sub-trigger"),Sp(i,"baseui-dropdown-menu-sub-content"),r.setAttribute("data-slot","dropdown-menu-sub-trigger"),r.setAttribute("role","menuitem"),r.setAttribute("aria-haspopup","menu"),i.setAttribute("data-slot","dropdown-menu-sub-content"),i.setAttribute("role","menu"),i.hidden=!0,!r.querySelector(".baseui-dropdown-menu-sub-trigger-icon")){let d=z(document.createElement("span"),"chevron-right");d.classList.add("baseui-dropdown-menu-sub-trigger-icon"),r.append(d)}let a=d=>{i.hidden=!d,r.setAttribute("data-state",d?"open":"closed"),r.setAttribute("aria-expanded",String(d))},p=()=>a(!0),l=()=>a(!1),u=d=>{d.preventDefault(),a(i.hidden)};s.addEventListener("mouseenter",p),s.addEventListener("mouseleave",l),r.addEventListener("focus",p),r.addEventListener("click",u),e.push(()=>{s.removeEventListener("mouseenter",p),s.removeEventListener("mouseleave",l),r.removeEventListener("focus",p),r.removeEventListener("click",u)})}),()=>e.forEach(s=>s())}function pu(t){let e=t.querySelector("[b-dropdown-trigger]"),s=t.querySelector("[b-dropdown-menu]");if(!e||!s)return{destroy:()=>{}};t.classList.add("dropdown"),s.classList.add("dropdown-menu"),e.setAttribute("aria-haspopup","menu"),s.setAttribute("role","menu");let r=w().Dropdown.getOrCreateInstance(e),i=v=>{t.setAttribute("b-att-state",v?"open":"closed"),e.setAttribute("aria-expanded",String(v)),t.dispatchEvent(new CustomEvent(v?"baseui:open":"baseui:close",{bubbles:!0}))},a=()=>i(!0),p=()=>i(!1);e.addEventListener("shown.bs.dropdown",a),e.addEventListener("hidden.bs.dropdown",p);let l=()=>r.toggle();e.addEventListener("click",l);let u=v=>{v.key==="Escape"?(r.hide(),e.focus()):v.key==="ArrowDown"&&!s.classList.contains("show")&&(v.preventDefault(),r.show(),[...s.querySelectorAll("a, button, [tabindex]:not([tabindex='-1'])")][0]?.focus())};t.addEventListener("keydown",u);let d=v=>{t.contains(v.target)||r.hide()};document.addEventListener("click",d),iu(s);let h=nu(s),f=v=>{let E=v.target.closest(xp);!E||E.closest("[b-dropdown-sub]")||r.hide()};return s.addEventListener("click",f),{destroy:()=>{h(),s.removeEventListener("click",f),document.removeEventListener("click",d),t.removeEventListener("keydown",u),e.removeEventListener("click",l),e.removeEventListener("shown.bs.dropdown",a),e.removeEventListener("hidden.bs.dropdown",p),r.dispose()}}}c.register("dropdown-menu",{type:"owl",mount:pu});y();var bi={default:"baseui-empty-default",outline:"baseui-empty-outline",background:"baseui-empty-background"};function lu(t){let e=t.getAttribute("b-att-variant")||"default",s=[...t.querySelectorAll("[b-empty-media]")];return t.setAttribute("role",t.getAttribute("role")||"status"),t.classList.add("baseui-empty",bi[e]||bi.default),t.querySelectorAll("[b-empty-header]").forEach(r=>r.classList.add("baseui-empty-header")),t.querySelectorAll("[b-empty-title]").forEach(r=>r.classList.add("baseui-empty-title")),t.querySelectorAll("[b-empty-description]").forEach(r=>r.classList.add("baseui-empty-description")),t.querySelectorAll("[b-empty-content]").forEach(r=>r.classList.add("baseui-empty-content")),s.forEach(r=>{let i=r.getAttribute("b-att-variant")==="icon"?"icon":"default";r.classList.add("baseui-empty-media",`baseui-empty-media-${i}`),r.setAttribute("data-variant",i)}),{destroy:()=>{t.classList.remove("baseui-empty",...Object.values(bi))}}}c.register("empty",{type:"owl",mount:lu});y();function Ca(t,e){t?.classList.add(...e.filter(Boolean))}function Jt(t,e,s,r){t.querySelectorAll(e).forEach(i=>{i.setAttribute("data-slot",s),Ca(i,[r])})}function cu(t){return t.querySelector("input, textarea, select, [role='checkbox'], [role='radio'], [role='switch']")}function uu(t,e){return e.id?e.id:`${t?.id||"baseui-field"}-error`}function du(t){let e=t.getAttribute("b-att-slot")||t.getAttribute("data-slot")||"field",s=[];if(e==="field-set")t.setAttribute("data-slot","field-set"),Ca(t,["baseui-field-set"]),s.push("baseui-field-set");else if(e==="field-group")t.setAttribute("data-slot","field-group"),Ca(t,["baseui-field-group"]),s.push("baseui-field-group");else{let a=t.getAttribute("b-att-orientation")||t.getAttribute("data-orientation")||"vertical";t.setAttribute("role",t.getAttribute("role")||"group"),t.setAttribute("data-slot","field"),t.setAttribute("data-orientation",a),Ca(t,["baseui-field",`baseui-field-orientation-${a}`]),s.push("baseui-field",`baseui-field-orientation-${a}`)}Jt(t,"legend[b-field-legend], [b-field-legend]","field-legend","baseui-field-legend"),Jt(t,"[b-field-group]","field-group","baseui-field-group"),Jt(t,"[b-field-content]","field-content","baseui-field-content"),Jt(t,"label[b-field-label], [b-field-label], [b-label]","field-label","baseui-field-label"),Jt(t,"[b-field-title]","field-label","baseui-field-title"),Jt(t,"[b-field-description]","field-description","baseui-field-description"),Jt(t,"[b-field-separator]","field-separator","baseui-field-separator"),Jt(t,"[b-field-error], [b-error]","field-error","baseui-field-error"),t.querySelectorAll("[b-field-separator]").forEach(a=>{if(!a.querySelector(".baseui-field-separator-line")){let p=document.createElement("span");p.className="baseui-field-separator-line",p.setAttribute("aria-hidden","true"),a.prepend(p)}a.textContent.trim()&&a.setAttribute("data-content","true")});let r=cu(t),i=t.querySelector("[b-field-error], [b-error], [data-slot='field-error']");if(r&&i){i.setAttribute("role",i.getAttribute("role")||"alert");let a=uu(r,i);i.id=a,r.setAttribute("aria-describedby",a),r.setAttribute("aria-invalid","true"),t.setAttribute("data-invalid","true")}return{destroy:()=>t.classList.remove(...s)}}c.register("field",{type:"static",mount:du});y();function bu(t){t.classList.add("baseui-form"),t.setAttribute("data-slot","form"),t.setAttribute("novalidate","");let e=t.querySelector("[name='title']"),s=t.querySelector("[name='description']"),r=t.querySelector("[b-form-counter], .baseui-form-counter-text"),i=Number(s?.getAttribute("maxlength")||100),a=()=>{r&&s&&(r.textContent=`${s.value.length}/${i} characters`)},p=()=>{e&&(e.value=""),s&&(s.value=""),a()},l=t.querySelector("[b-form-reset]");return l?.addEventListener("click",p),s?.addEventListener("input",a),a(),{destroy(){l?.removeEventListener("click",p),s?.removeEventListener("input",a)}}}c.register("form",{type:"static",mount:bu});y();function hu(t){let e=t.querySelector("[b-hover-card-trigger]"),s=t.querySelector("[b-hover-card-content]");if(!e||!s)return{};let r=()=>{s.hidden=!1,e.setAttribute("aria-expanded","true")},i=()=>{s.hidden=!0,e.setAttribute("aria-expanded","false")},a=p=>{p.key==="Escape"&&i()};return e.setAttribute("aria-haspopup","dialog"),s.setAttribute("role","dialog"),i(),t.addEventListener("mouseenter",r),t.addEventListener("mouseleave",i),t.addEventListener("focusin",r),t.addEventListener("focusout",i),t.addEventListener("keydown",a),{destroy:()=>{t.removeEventListener("mouseenter",r),t.removeEventListener("mouseleave",i),t.removeEventListener("focusin",r),t.removeEventListener("focusout",i),t.removeEventListener("keydown",a)}}}c.register("hover-card",{type:"owl",mount:hu});y();st();function mu(t){let e=t.getAttribute("b-icon")||t.getAttribute("b-att-icon")||t.getAttribute("aria-label");return e?(z(t,e,{baseUrl:t.getAttribute("b-icon-base-url")||t.getAttribute("b-att-base-url"),label:t.getAttribute("b-att-label")??t.getAttribute("aria-label")??"",size:t.getAttribute("b-icon-size")||t.getAttribute("b-att-size")}),{destroy:()=>{t.classList.remove("baseui-icon"),t.style.removeProperty("--baseui-icon-url"),t.style.removeProperty("--baseui-icon-size"),!t.getAttribute("b-att-label")&&!t.getAttribute("aria-label")&&t.removeAttribute("aria-hidden")}}):{}}c.register("icon",{type:"static",mount:mu});y();Ma();function gu(t){let e=pa({tag:t.tagName.toLowerCase(),type:t.getAttribute("type")});return t.classList.add(e),{destroy:()=>t.classList.remove(e)}}c.register("input",{type:"static",mount:gu});y();Fa();function fu(t){t.classList.add("baseui-input-group"),t.setAttribute("role",t.getAttribute("role")||"group"),t.setAttribute("data-slot","input-group");let e=[...t.querySelectorAll("[b-input-group-addon], [b-input-group-text], [b-input-group-button]")],s=[...t.querySelectorAll("[b-input-group-button]")],r=[...t.querySelectorAll("input, textarea, [data-slot='input-group-control']")],i=a=>{a.target.closest("button")||ua(a.currentTarget)};return e.forEach(a=>{if(a.matches("[b-input-group-addon]")){let p=Pe[a.getAttribute("b-att-align")]?a.getAttribute("b-att-align"):"inline-start";a.classList.add("baseui-input-group-addon",Pe[p]),a.setAttribute("data-align",p),a.setAttribute("data-slot","input-group-addon"),a.setAttribute("role",a.getAttribute("role")||"group"),a.addEventListener("click",i)}a.matches("[b-input-group-text]")&&(a.classList.add("baseui-input-group-text"),a.setAttribute("data-slot","input-group-text"))}),s.forEach(a=>{let p=Fe[a.getAttribute("b-att-size")]?a.getAttribute("b-att-size"):"xs",l=De[a.getAttribute("b-att-variant")]||De.ghost;a.classList.add("btn","baseui-button","baseui-input-group-button",l,Fe[p]),a.setAttribute("data-size",p),a.setAttribute("data-slot","input-group-button"),a.getAttribute("type")||a.setAttribute("type","button")}),r.forEach(a=>{a.classList.add("baseui-input-group-control"),a.setAttribute("data-slot","input-group-control"),a.matches("input")&&a.classList.add("baseui-input-group-input"),a.matches("textarea")&&a.classList.add("baseui-input-group-textarea")}),{destroy:()=>{t.classList.remove("baseui-input-group"),t.removeAttribute("data-slot"),e.forEach(a=>{a.removeEventListener("click",i),a.classList.remove("baseui-input-group-addon","baseui-input-group-text",...Object.values(Pe)),a.removeAttribute("data-align"),a.removeAttribute("data-slot")}),s.forEach(a=>{a.classList.remove("btn","baseui-button","baseui-input-group-button",...Object.values(De),...Object.values(Fe)),a.removeAttribute("data-size"),a.removeAttribute("data-slot")}),r.forEach(a=>{a.classList.remove("baseui-input-group-control","baseui-input-group-input","baseui-input-group-textarea"),a.removeAttribute("data-slot")})}}}c.register("input-group",{type:"static",mount:fu});y();function yu(t){let e=[...t.querySelectorAll("input")];t.classList.add("baseui-input-otp"),e.forEach(a=>{a.classList.add("form-control"),a.inputMode=a.inputMode||"numeric",a.maxLength=a.maxLength>0?a.maxLength:1});let s=()=>{let a=e.map(p=>p.value).join("");t.setAttribute("b-att-value",a),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:a}}))},r=a=>{let p=e.indexOf(a.target);a.target.value&&e[p+1]&&e[p+1].focus(),s()},i=a=>{let p=a.clipboardData.getData("text").trim();p&&(a.preventDefault(),e.forEach((l,u)=>{l.value=p[u]||""}),s())};return e.forEach(a=>a.addEventListener("input",r)),t.addEventListener("paste",i),{destroy:()=>{e.forEach(a=>a.removeEventListener("input",r)),t.removeEventListener("paste",i)}}}c.register("input-otp",{type:"owl",mount:yu});y();function vu(t){return t.classList.add("baseui-item"),{destroy:()=>t.classList.remove("baseui-item")}}c.register("item",{type:"static",mount:vu});y();function Su(t){return t.classList.add("baseui-kbd"),{destroy:()=>t.classList.remove("baseui-kbd")}}c.register("kbd",{type:"static",mount:Su});y();function xu(t){return t.classList.add("form-label","b-label","baseui-label"),t.getAttribute("b-att-required")==="true"&&t.setAttribute("b-att-state","required"),{destroy:()=>t.classList.remove("form-label","b-label","baseui-label")}}c.register("label",{type:"static",mount:xu});y();function wu(t){return t.classList.add("baseui-marker"),{destroy:()=>t.classList.remove("baseui-marker")}}c.register("marker",{type:"static",mount:wu});y();va();li();function Au(t){let e=t.querySelector("script[type='text/markdown'], template");return e?e.tagName==="TEMPLATE"?e.content.textContent:e.textContent:t.getAttribute("b-att-content")||t.textContent||""}function Eu(t){return String(t||"").split(",").map(e=>e.trim()).filter(Boolean)}function Cu(t){t.classList.add("baseui-markdown");let e=t.getAttribute("b-att-src"),s=t.getAttribute("b-att-mermaid")!=="false",r=t.getAttribute("b-att-base-ui")!=="false",i=t.getAttribute("b-att-editable")==="true",a=t.getAttribute("b-att-collaborative")==="true",p=t.getAttribute("b-att-room")||"baseui-markdown",l=t.getAttribute("b-att-password")||void 0,u=Eu(t.getAttribute("b-att-signaling")),d=!1,h=null;function f(E){d||(t.setAttribute("data-status","error"),t.textContent=`Unable to render Markdown: ${E?.message||E}`,t.dispatchEvent(new CustomEvent("baseui:markdown-error",{bubbles:!0,detail:{error:E}})))}async function v(){let E=Au(t);t.setAttribute("data-status","loading");let L=E;if(e)try{let C=await fetch(e);if(!C.ok)throw new Error(`${C.status} ${C.statusText}`);L=await C.text()}catch(C){f(C);return}if(i){t.replaceChildren(),t.classList.add("baseui-markdown-editable"),t.setAttribute("data-status","ready");let C=document.createElement("div");C.className="baseui-markdown-editor",C.setAttribute("data-slot","markdown-editor"),C.setAttribute("role","group"),C.setAttribute("aria-label",a?"Collaborative Markdown editor":"Markdown editor"),t.append(C);try{if(h=await Yr({root:C,value:L,collaborative:a,room:p,password:l,signaling:u,onChange:(H,X)=>{t.dispatchEvent(new CustomEvent("baseui:markdown-change",{bubbles:!0,detail:{markdown:H,previousMarkdown:X}}))}}),d){h?.destroy?.(),h=null;return}}catch(H){f(H);return}t.dispatchEvent(new CustomEvent("baseui:markdown-editor-ready",{bubbles:!0,detail:{collaborative:a,room:p}}));return}let{data:x,content:B}=Sa(L),D;try{D=await Xr(B)}catch(C){f(C);return}d||(t.innerHTML=D,t.setAttribute("data-status","ready"),await Gr(t,{mermaid:s,baseUi:r}),d||t.dispatchEvent(new CustomEvent("baseui:markdown-render",{bubbles:!0,detail:{html:D,frontmatter:x}})))}return v(),{destroy:()=>{d=!0,h?.destroy?.(),h=null,zr(t),t.classList.remove("baseui-markdown"),t.classList.remove("baseui-markdown-editable"),t.removeAttribute("data-status")}}}c.register("markdown",{type:"static",mount:Cu});y();function Lu(t){return t.classList.add("baseui-message"),t.setAttribute("b-att-side",t.getAttribute("b-att-side")||"incoming"),t.setAttribute("role",t.getAttribute("role")||"listitem"),{}}c.register("message",{type:"static",mount:Lu});y();function Nu(t){t.classList.add("baseui-message-scroller");let e=()=>{t.getAttribute("b-att-autoscroll")!=="false"&&(t.scrollTop=t.scrollHeight)},s=new window.MutationObserver(e);return s.observe(t,{childList:!0,subtree:!0}),window.requestAnimationFrame(e),{destroy:()=>s.disconnect()}}c.register("message-scroller",{type:"owl",mount:Nu});y();function ku(t){t.setAttribute("role","menubar"),t.classList.add("baseui-menubar");for(let e of t.querySelectorAll("a, button"))e.setAttribute("role","menuitem");return{destroy:()=>t.classList.remove("baseui-menubar")}}c.register("menubar",{type:"static",mount:ku});y();function Ou(t){return t.classList.add("form-select"),(t.getAttribute("b-att-size")==="sm"||t.getAttribute("b-att-size")==="lg")&&t.classList.add(`form-select-${t.getAttribute("b-att-size")}`),{destroy:()=>t.classList.remove("form-select","form-select-sm","form-select-lg")}}c.register("native-select",{type:"static",mount:Ou});y();function ju(t){let e=[...t.querySelectorAll("a, button")].filter(r=>!r.disabled),s=r=>{let i=e.indexOf(r.target),a=r.key==="ArrowRight"?1:r.key==="ArrowLeft"?-1:0;!a||i<0||(r.preventDefault(),e[(i+a+e.length)%e.length]?.focus())};return t.setAttribute("role",t.getAttribute("role")||"menubar"),e.forEach(r=>r.setAttribute("role","menuitem")),t.addEventListener("keydown",s),{destroy:()=>t.removeEventListener("keydown",s)}}c.register("navigation-menu",{type:"owl",mount:ju});y();function Bu(t){let e=t.querySelector("ol, ul")||t,s=[...e.children];return t.classList.add("baseui-pagination"),e.classList.add("pagination"),s.forEach(r=>{let i=r.querySelector("a, button");r.classList.add("page-item"),i?.classList.add("page-link"),i?.getAttribute("aria-current")==="page"&&r.classList.add("active"),(i?.hasAttribute("disabled")||i?.getAttribute("aria-disabled")==="true")&&r.classList.add("disabled")}),t.setAttribute("aria-label",t.getAttribute("aria-label")||"Pagination"),{destroy:()=>{t.classList.remove("baseui-pagination"),e.classList.remove("pagination")}}}c.register("pagination",{type:"owl",mount:Bu});y();q();function Iu(t){let e=t.querySelector("[b-popover-trigger]")||t,s=t.querySelector("[b-popover-content]"),r=s?s.innerHTML:"";s?.remove(),e.setAttribute("aria-haspopup","dialog");let i=new(w()).Popover(e,{content:r,html:!0,trigger:"click"}),a=()=>{t.setAttribute("b-att-state","open"),e.setAttribute("aria-expanded","true"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},p=()=>{t.setAttribute("b-att-state","closed"),e.setAttribute("aria-expanded","false"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))};return e.addEventListener("shown.bs.popover",a),e.addEventListener("hidden.bs.popover",p),t.setAttribute("b-att-state","closed"),e.setAttribute("aria-expanded","false"),{destroy:()=>{e.removeEventListener("shown.bs.popover",a),e.removeEventListener("hidden.bs.popover",p),i.dispose()}}}c.register("popover",{type:"owl",mount:Iu});y();function Ru(t){let e=Number(t.getAttribute("b-att-max")||t.getAttribute("aria-valuemax")||100),s=Math.min(e,Math.max(0,Number(t.getAttribute("b-att-value")||t.getAttribute("aria-valuenow")||0)));if(t.classList.add("baseui-progress"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuemin","0"),t.setAttribute("aria-valuemax",String(e)),t.setAttribute("aria-valuenow",String(s)),t.style.setProperty("--baseui-progress-value",`${s/e*100}%`),!t.querySelector("[b-progress-indicator]")){let r=document.createElement("span");r.setAttribute("b-progress-indicator",""),t.append(r)}return{destroy:()=>t.classList.remove("baseui-progress")}}c.register("progress",{type:"static",mount:Ru});y();Vr();function $u(t){let{open:e,close:s,destroy:r}=ba(t,{closeSelector:"[b-pwa-close]"});return t.BaseUIPwa={open:e,close:s},{destroy:()=>{r(),delete t.BaseUIPwa}}}c.register("pwa",{type:"owl",mount:$u});y();function Tu(t){let e=[...t.querySelectorAll("[b-question]")],s=t.querySelector("[b-question-prev]"),r=t.querySelector("[b-question-next]"),i=0,a=u=>{i=Math.min(e.length-1,Math.max(0,u)),e.forEach((d,h)=>{d.hidden=h!==i,d.setAttribute("b-att-state",h===i?"active":"inactive")}),s&&(s.disabled=i===0),r&&(r.disabled=i===e.length-1),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:i}}))},p=()=>a(i-1),l=()=>a(i+1);return s?.addEventListener("click",p),r?.addEventListener("click",l),e.length&&a(0),{destroy:()=>{s?.removeEventListener("click",p),r?.removeEventListener("click",l)}}}c.register("questionnaire",{type:"owl",mount:Tu});y();function Uu(t){let e=t.matches("input")?t:t.querySelector("input[type='radio']"),s=t.matches("input")?t.closest("label, .form-check"):t;return e?.classList.add("form-check-input"),s?.classList.add("form-check","baseui-check"),{destroy:()=>{e?.classList.remove("form-check-input"),s?.classList.remove("form-check","baseui-check")}}}c.register("radio-group",{type:"static",mount:Uu});y();function qu(t){let e=t.querySelector("[b-resizable-panel]")||t,s=t.querySelector("[b-resizable-handle]");if(!s)return{};let r=Number(t.getAttribute("b-att-min")||160),i=Number(t.getAttribute("b-att-max")||720),a=p=>{let l=p.clientX,u=e.getBoundingClientRect().width,d=f=>{e.style.width=`${Math.min(i,Math.max(r,u+f.clientX-l))}px`},h=()=>{document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",h),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{width:e.style.width}}))};document.addEventListener("pointermove",d),document.addEventListener("pointerup",h)};return s.addEventListener("pointerdown",a),{destroy:()=>s.removeEventListener("pointerdown",a)}}c.register("resizable",{type:"owl",mount:qu});y();function Mu(t){return t.classList.add("baseui-scroll-area"),t.tabIndex=t.tabIndex>=0?t.tabIndex:0,t.setAttribute("role",t.getAttribute("role")||"region"),{}}c.register("scroll-area",{type:"static",mount:Mu});y();function zu(t){let e=t.getAttribute("b-att-orientation")==="vertical";return t.classList.add("baseui-separator",e?"baseui-separator-vertical":"baseui-separator-horizontal"),t.setAttribute("role",t.getAttribute("role")||"separator"),t.setAttribute("aria-orientation",e?"vertical":"horizontal"),{destroy:()=>t.classList.remove("baseui-separator","baseui-separator-vertical","baseui-separator-horizontal")}}c.register("separator",{type:"static",mount:zu});y();function wp(t,{triggerSelector:e,panelSelector:s,ariaHaspopup:r,panelRole:i,onKeyDown:a}={}){let p=t.querySelector(e),l=t.querySelector(s),u=v=>{!l||!p||(l.hidden=!v,t.setAttribute("b-att-state",v?"open":"closed"),p.setAttribute("aria-expanded",String(v)),t.dispatchEvent(new CustomEvent(v?"baseui:open":"baseui:close",{bubbles:!0})))},d=()=>u(l?.hidden!==!1),h=v=>{v.key==="Escape"&&(u(!1),p?.focus()),a?.(v,{setOpen:u,panel:l,trigger:p})},f=v=>{t.contains(v.target)||u(!1)};return p?.setAttribute("aria-haspopup",r),l?.setAttribute("role",i),l&&(l.hidden=!0),p?.addEventListener("click",d),t.addEventListener("keydown",h),document.addEventListener("click",f),{trigger:p,panel:l,setOpen:u,destroy:()=>{p?.removeEventListener("click",d),t.removeEventListener("keydown",h),document.removeEventListener("click",f)}}}function Pu(t){let{setOpen:e,destroy:s}=wp(t,{triggerSelector:"[b-select-trigger]",panelSelector:"[b-select-content]",ariaHaspopup:"listbox",panelRole:"listbox"}),r=t.querySelector("[b-select-trigger]"),i=t.querySelector("[b-select-value]"),a=p=>{let l=p.target.closest("[b-select-item]");if(!(!l||!t.contains(l))){for(let u of t.querySelectorAll("[b-select-item]"))u.setAttribute("aria-selected",String(u===l));i&&(i.textContent=l.textContent.trim()),t.setAttribute("b-att-value",l.getAttribute("b-att-value")||l.textContent.trim()),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:t.getAttribute("b-att-value")}})),e(!1),r?.focus()}};for(let p of t.querySelectorAll("[b-select-item]"))p.setAttribute("role","option");return t.addEventListener("click",a),{destroy:()=>{t.removeEventListener("click",a),s()}}}c.register("select",{type:"owl",mount:Pu});y();function Du(t){let e=[...t.querySelectorAll("[b-shell-collapse-trigger]")],s=i=>{t.setAttribute("b-att-collapsed",i?"true":"false"),t.dispatchEvent(new CustomEvent(i?"baseui:collapse":"baseui:expand",{bubbles:!0}))},r=()=>s(t.getAttribute("b-att-collapsed")!=="true");return e.forEach(i=>i.addEventListener("click",r)),s(t.getAttribute("b-att-collapsed")==="true"),t.BaseUIShell={collapse:()=>s(!0),expand:()=>s(!1),toggle:r},{destroy:()=>{e.forEach(i=>i.removeEventListener("click",r)),delete t.BaseUIShell}}}c.register("shell",{type:"owl",mount:Du});y();q();function Fu(t){let e=t.getAttribute("b-att-trigger"),s=e?document.querySelector(e):null,r=t.getAttribute("b-att-side")==="left"?"offcanvas-start":"offcanvas-end";t.classList.add("offcanvas",r,"baseui-sheet-overlay"),t.setAttribute("tabindex","-1"),[...t.querySelectorAll("[b-sheet-close]")].forEach(v=>v.setAttribute("data-bs-dismiss","offcanvas"));let a=w().Offcanvas.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,scroll:!1}),p=null,l=()=>{p=document.activeElement},u=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},d=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0})),p?.focus?.(),p=null};t.addEventListener("show.bs.offcanvas",l),t.addEventListener("shown.bs.offcanvas",u),t.addEventListener("hidden.bs.offcanvas",d);let h=()=>a.show(),f=()=>a.hide();return s?.addEventListener("click",h),t.setAttribute("b-att-state","closed"),t.BaseUISheet={open:h,close:f},{destroy:()=>{s?.removeEventListener("click",h),t.removeEventListener("show.bs.offcanvas",l),t.removeEventListener("shown.bs.offcanvas",u),t.removeEventListener("hidden.bs.offcanvas",d),a.dispose(),delete t.BaseUISheet}}}c.register("sheet",{type:"owl",mount:Fu});y();var _u={"[b-sidebar-header]":["baseui-sidebar-header","sidebar-header","header"],"[b-sidebar-content]":["baseui-sidebar-content","sidebar-content","content"],"[b-sidebar-footer]":["baseui-sidebar-footer","sidebar-footer","footer"],"[b-sidebar-group]":["baseui-sidebar-group","sidebar-group","group"],"[b-sidebar-group-label]":["baseui-sidebar-group-label","sidebar-group-label","group-label"],"[b-sidebar-group-action]":["baseui-sidebar-group-action","sidebar-group-action","group-action"],"[b-sidebar-group-content]":["baseui-sidebar-group-content","sidebar-group-content","group-content"],"[b-sidebar-menu]":["baseui-sidebar-menu","sidebar-menu","menu"],"[b-sidebar-menu-item]":["baseui-sidebar-menu-item","sidebar-menu-item","menu-item"],"[b-sidebar-menu-button]":["baseui-sidebar-menu-button","sidebar-menu-button","menu-button"],"[b-sidebar-menu-action]":["baseui-sidebar-menu-action","sidebar-menu-action","menu-action"],"[b-sidebar-menu-badge]":["baseui-sidebar-menu-badge","sidebar-menu-badge","menu-badge"],"[b-sidebar-menu-sub]":["baseui-sidebar-menu-sub","sidebar-menu-sub","menu-sub"],"[b-sidebar-menu-sub-item]":["baseui-sidebar-menu-sub-item","sidebar-menu-sub-item","menu-sub-item"],"[b-sidebar-menu-sub-button]":["baseui-sidebar-menu-sub-button","sidebar-menu-sub-button","menu-sub-button"],"[b-sidebar-separator]":["baseui-sidebar-separator","sidebar-separator","separator"]};function Hu(t){let e=[];for(let[s,[r,i,a]]of Object.entries(_u))for(let p of t.querySelectorAll(s))p.classList.add(r),p.dataset.slot=i,p.dataset.sidebar=a,(p.hasAttribute("b-att-active")||p.getAttribute("aria-current")==="page")&&(p.classList.add("is-active"),p.dataset.active="true"),e.push([p,r]);return e}function Wu(t){let e=t.getAttribute("b-att-trigger")?document.querySelector(t.getAttribute("b-att-trigger")):null,s=[...t.querySelectorAll("[b-sidebar-close]")],r=Hu(t),i=u=>{t.setAttribute("b-att-state",u?"open":"closed"),t.classList.toggle("is-open",u),t.dataset.state=u?"expanded":"collapsed",t.dispatchEvent(new CustomEvent(u?"baseui:open":"baseui:close",{bubbles:!0}))},a=()=>i(!0),p=()=>i(!1),l=u=>{u.key==="Escape"&&p()};return e?.addEventListener("click",a),s.forEach(u=>u.addEventListener("click",p)),t.addEventListener("keydown",l),t.dataset.sidebar="sidebar",t.dataset.slot="sidebar",i(t.getAttribute("b-att-state")==="open"),t.BaseUISidebar={open:a,close:p},{destroy:()=>{e?.removeEventListener("click",a),s.forEach(u=>u.removeEventListener("click",p)),t.removeEventListener("keydown",l);for(let[u,d]of r)u.classList.remove(d,"is-active"),u.removeAttribute("data-slot"),u.removeAttribute("data-sidebar"),u.removeAttribute("data-active");t.removeAttribute("data-sidebar"),t.removeAttribute("data-slot"),t.removeAttribute("data-state"),delete t.BaseUISidebar}}}c.register("sidebar",{type:"owl",mount:Wu});y();function Ku(t){t.classList.add("baseui-slider");let e=()=>{t.style.setProperty("--baseui-slider-value",`${t.value}%`),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:t.value}}))};return e(),t.addEventListener("input",e),{destroy:()=>{t.removeEventListener("input",e),t.classList.remove("baseui-slider")}}}c.register("slider",{type:"static",mount:Ku});y();function Vu(t){let e=t.getAttribute("b-att-shape")==="circle"?"baseui-skeleton-circle":"baseui-skeleton-block";return t.classList.add("baseui-skeleton",e),t.setAttribute("aria-hidden",t.getAttribute("aria-hidden")||"true"),{destroy:()=>t.classList.remove("baseui-skeleton","baseui-skeleton-circle","baseui-skeleton-block")}}c.register("skeleton",{type:"static",mount:Vu});y();function Zu(t){let e=t.getAttribute("b-att-type")==="grow",s=t.getAttribute("b-att-label")||"Loading";if(t.classList.add(e?"spinner-grow":"spinner-border"),t.setAttribute("role",t.getAttribute("role")||"status"),!t.querySelector(".visually-hidden")){let r=document.createElement("span");r.className="visually-hidden",r.textContent=s,t.append(r)}return{destroy:()=>t.classList.remove("spinner-border","spinner-grow")}}c.register("spinner",{type:"static",mount:Zu});y();function Xu(t){let e=t.matches("input")?t:t.querySelector("input[type='checkbox']"),s=t.matches("input")?t.closest("label, .form-check"):t;return e?.classList.add("form-check-input"),e?.setAttribute("role",e.getAttribute("role")||"switch"),s?.classList.add("form-check","form-switch","baseui-switch"),{destroy:()=>{e?.classList.remove("form-check-input"),s?.classList.remove("form-check","form-switch","baseui-switch")}}}c.register("switch",{type:"static",mount:Xu});y();function Gu(t){if(t.classList.add("table","baseui-table"),t.getAttribute("b-att-striped")!=="false"&&t.classList.add("table-striped"),t.getAttribute("b-att-hover")!=="false"&&t.classList.add("table-hover"),t.getAttribute("b-att-responsive")==="true"&&!t.parentElement?.classList.contains("table-responsive")){let e=document.createElement("div");return e.className="table-responsive",t.before(e),e.append(t),{destroy:()=>{e.before(t),e.remove(),t.classList.remove("table","baseui-table","table-striped","table-hover")}}}return{destroy:()=>t.classList.remove("table","baseui-table","table-striped","table-hover")}}c.register("table",{type:"static",mount:Gu});y();q();za();function Yu(t){if(t.querySelector(":scope > .baseui-tabs-panel-card"))return;let e=document.createElement("div");e.className="card baseui-card baseui-tabs-panel-card rounded-0",e.style.cssText="border-end-start-radius: 8px !important; border-end-end-radius: 4px !important;";let s=document.createElement("div");for(s.className="card-body";t.firstChild;)s.appendChild(t.firstChild);e.appendChild(s),t.appendChild(e)}function Ju(t){t.classList.add("baseui-tabs-host");let e=[...t.querySelectorAll("[b-tab]")],s=[...t.querySelectorAll("[b-panel]")],r=new Map(s.map(f=>[f.getAttribute("b-panel"),f])),i=new Map,a=new Map,p=new Map,l=new Map,u=e[0]?.parentElement;u&&!u.hasAttribute("role")&&u.setAttribute("role","tablist");let d=t.getAttribute("b-att-value")||e[0]?.getAttribute("b-tab")||"",h=f=>{t.setAttribute("b-att-value",f),e.forEach(v=>{v.tabIndex=v.getAttribute("b-tab")===f?0:-1}),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:f}}))};return e.forEach((f,v)=>{let E=f.getAttribute("b-tab"),L=r.get(E),x=E===d;if(f.setAttribute("role","tab"),f.tabIndex=x?0:-1,x&&f.classList.add("active"),L){let X=L.id||`baseui-tabs-panel-${E}`;L.id=X,L.setAttribute("role","tabpanel"),L.classList.add("tab-pane","fade"),x&&L.classList.add("show","active"),Yu(L),f.setAttribute("data-bs-target",`#${X}`)}let B=w().Tab.getOrCreateInstance(f);i.set(f,B);let D=()=>B.show();f.addEventListener("click",D),a.set(f,D);let C=()=>h(E);f.addEventListener("shown.bs.tab",C),l.set(f,C);let H=X=>{let Qr=la(X.key,v,e.length);if(Qr===-1)return;X.preventDefault();let hi=e[Qr];hi.focus(),i.get(hi)?.show()};f.addEventListener("keydown",H),p.set(f,H)}),d&&t.setAttribute("b-att-value",d),{destroy:()=>{e.forEach(f=>{f.removeEventListener("click",a.get(f)),f.removeEventListener("keydown",p.get(f)),f.removeEventListener("shown.bs.tab",l.get(f)),i.get(f)?.dispose()}),a.clear(),p.clear(),l.clear(),i.clear()}}}c.register("tabs",{type:"owl",mount:Ju});y();function Qu(t){return t.classList.add("form-control"),t.getAttribute("b-att-resize")==="none"&&t.classList.add("baseui-textarea-no-resize"),{destroy:()=>t.classList.remove("form-control","baseui-textarea-no-resize")}}c.register("textarea",{type:"static",mount:Qu});y();ui();function td(t){let e=t.querySelector("template, script[type='text/html']");return e?e.tagName==="TEMPLATE"?e.innerHTML:e.textContent:t.getAttribute("b-att-content")||t.innerHTML||""}function ed(t){return String(t||"").split(",").map(e=>e.trim()).filter(Boolean)}function sd(t){t.classList.add("baseui-text-editor");let e=t.getAttribute("b-att-src"),s=t.getAttribute("b-att-provider")||void 0,r=t.getAttribute("b-att-room")||"baseui-text-editor",i=t.getAttribute("b-att-url")||void 0,a=Ea({collaborative:t.getAttribute("b-att-collaborative")==="true",providerType:s,url:i}),p=t.getAttribute("b-att-password")||void 0,l=ed(t.getAttribute("b-att-signaling")),u=t.getAttribute("b-att-placeholder")||void 0,d=!1,h=null;function f(E){d||(t.setAttribute("data-status","error"),t.textContent=`Unable to mount text editor: ${E?.message||E}`,t.dispatchEvent(new CustomEvent("baseui:text-editor-error",{bubbles:!0,detail:{error:E}})))}async function v(){t.setAttribute("data-status","loading");let E=td(t);if(e)try{let x=await fetch(e);if(!x.ok)throw new Error(`${x.status} ${x.statusText}`);E=await x.text()}catch(x){f(x);return}t.replaceChildren();let L=document.createElement("div");L.className="baseui-text-editor-shell",L.setAttribute("data-slot","text-editor-shell"),L.setAttribute("role","group"),L.setAttribute("aria-label",a?"Collaborative rich text editor":"Rich text editor"),t.append(L);try{if(h=await Aa({root:L,value:E,placeholder:u,collaborative:a,providerType:s,room:r,url:i,password:p,signaling:l,onChange:(x,B)=>{t.dispatchEvent(new CustomEvent("baseui:text-editor-change",{bubbles:!0,detail:{html:x,previousHtml:B}}))}}),d){h?.destroy?.(),h=null;return}}catch(x){f(x);return}t.setAttribute("data-status","ready"),t.dispatchEvent(new CustomEvent("baseui:text-editor-ready",{bubbles:!0,detail:{collaborative:a,room:r}}))}return v(),{destroy:()=>{d=!0,h?.destroy?.(),h=null,t.classList.remove("baseui-text-editor"),t.removeAttribute("data-status")}}}c.register("text-editor",{type:"static",mount:sd});st();y();Zr();ei();function od(t,e){let s=Mr(e);t.classList.remove(...Pn),t.className=`${t.className} ${ga({variant:t.getAttribute("b-att-variant")||"outline",size:t.getAttribute("b-att-size")})}`.trim(),t.type=t.getAttribute("type")||"button",t.setAttribute("aria-label",s.label),t.setAttribute("title",s.label),t.setAttribute("aria-pressed",s.pressed);let r=t.querySelector("[b-theme-button-icon]");r||(r=document.createElement("span"),r.setAttribute("b-theme-button-icon",""),t.prepend(r)),r.setAttribute("b-icon",s.icon),z(r,s.icon,{baseUrl:t.getAttribute("b-icon-base-url")||t.getAttribute("b-att-base-url")});let i=t.querySelector("[b-theme-button-label]");i||(i=document.createElement("span"),i.className="visually-hidden",i.setAttribute("b-theme-button-label",""),t.append(i)),i.textContent=s.label}function rd(t){let e=Vt({storageKey:t.getAttribute("b-att-storage-key")||void 0,toggleSelector:"[b-theme-toggle]",labelSelector:"[b-theme-label]"}),s=(a=e.current())=>od(t,a),r=()=>s(e.toggle()),i=a=>s(a.detail?.theme);return s(e.set(e.current(),{skipStorage:!0})),t.addEventListener("click",r),document.addEventListener("baseui:theme-change",i),{destroy:()=>{t.removeEventListener("click",r),document.removeEventListener("baseui:theme-change",i)}}}c.register("theme-button",{type:"static",mount:rd});y();q();function ad(t){let e=[...t.querySelectorAll("[b-toast-close]")],s=t.getAttribute("b-att-delay"),r=s===null?3e3:Number(s);t.classList.add("toast","fade"),t.setAttribute("role",t.getAttribute("b-att-variant")==="danger"?"alert":"status"),e.forEach(d=>d.setAttribute("data-bs-dismiss","toast"));let i=new(w()).Toast(t,{autohide:r>0,delay:r||3e3}),a=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},p=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))};t.addEventListener("shown.bs.toast",a),t.addEventListener("hidden.bs.toast",p);let l=()=>i.show(),u=()=>i.hide();return t.getAttribute("b-att-state")==="open"&&l(),t.BaseUIToast={show:l,hide:u},{destroy:()=>{t.removeEventListener("shown.bs.toast",a),t.removeEventListener("hidden.bs.toast",p),i.dispose(),delete t.BaseUIToast}}}c.register("toast",{type:"owl",mount:ad});y();q();function id(t){let e=t.querySelector("[b-tooltip-trigger]")||t,s=t.querySelector("[b-tooltip-content]");!s&&t.getAttribute("b-att-content")&&(s=document.createElement("span"),s.setAttribute("b-tooltip-content",""),s.textContent=t.getAttribute("b-att-content"),t.appendChild(s));let r=s?s.innerHTML:"";s?.remove();let i=new(w()).Tooltip(e,{title:r,html:!0,trigger:"hover focus"}),a=()=>t.setAttribute("b-att-state","open"),p=()=>t.setAttribute("b-att-state","closed");return e.addEventListener("shown.bs.tooltip",a),e.addEventListener("hidden.bs.tooltip",p),t.setAttribute("b-att-state","closed"),{destroy:()=>{e.removeEventListener("shown.bs.tooltip",a),e.removeEventListener("hidden.bs.tooltip",p),i.dispose()}}}c.register("tooltip",{type:"owl",mount:id});y();function nd(t){t.classList.add("btn",t.getAttribute("b-att-variant")==="outline"?"btn-outline-secondary":"btn-light"),t.setAttribute("aria-pressed",t.getAttribute("aria-pressed")||"false");let e=()=>{let s=t.getAttribute("aria-pressed")!=="true";t.setAttribute("aria-pressed",String(s)),t.setAttribute("b-att-state",s?"on":"off"),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{pressed:s}}))};return t.addEventListener("click",e),{destroy:()=>t.removeEventListener("click",e)}}c.register("toggle",{type:"owl",mount:nd});y();function pd(t){let e=[...t.querySelectorAll("[b-att-value], button")],s=t.getAttribute("b-att-multiple")==="true";t.classList.add("btn-group"),t.setAttribute("role",s?"group":"radiogroup"),e.forEach(i=>{i.classList.add("btn","btn-outline-secondary"),i.setAttribute("aria-pressed",i.getAttribute("aria-pressed")||"false")});let r=i=>{let a=i.target.closest("button, [b-att-value]");if(!a||!t.contains(a))return;s||e.forEach(l=>l.setAttribute("aria-pressed","false")),a.setAttribute("aria-pressed",String(a.getAttribute("aria-pressed")!=="true"));let p=e.filter(l=>l.getAttribute("aria-pressed")==="true").map(l=>l.getAttribute("b-att-value")||l.textContent.trim());t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:s?p:p[0]}}))};return t.addEventListener("click",r),{destroy:()=>t.removeEventListener("click",r)}}c.register("toggle-group",{type:"owl",mount:pd});y();var Ap={lead:"lead",muted:"text-body-secondary",code:"baseui-code",kbd:"baseui-kbd"};function ld(t){let e=Ap[t.getAttribute("b-att-variant")||"body"];return t.classList.add("baseui-typography"),e&&t.classList.add(e),{destroy:()=>t.classList.remove("baseui-typography",...Object.values(Ap))}}c.register("typography",{type:"static",mount:ld});Jr();m();Zr();sa(Fr);fi(vi);yi();var mA=c;export{Hs as Accordion,Ks as AccordionContent,Ws as AccordionItem,Tt as AccordionTrigger,ye as Alert,xe as AlertAction,Se as AlertDescription,ts as AlertDialog,ls as AlertDialogAction,ps as AlertDialogCancel,ss as AlertDialogContent,ns as AlertDialogDescription,rs as AlertDialogFooter,os as AlertDialogHeader,as as AlertDialogMedia,is as AlertDialogTitle,es as AlertDialogTrigger,ve as AlertTitle,Rp as App,sr as AspectRatio,Mo as Attachment,Ho as AttachmentAction,_o as AttachmentActions,Po as AttachmentContent,Fo as AttachmentDescription,Vo as AttachmentDropzone,Ko as AttachmentGroup,zo as AttachmentMedia,Do as AttachmentTitle,Wo as AttachmentTrigger,Zo as Avatar,pt as Badge,c as BaseUI,Fr as BaseUIComponents,zn as BaseUITheme,Gt as BlockViewer,Gs as Breadcrumb,qt as BreadcrumbEllipsis,Js as BreadcrumbItem,Qs as BreadcrumbLink,Ys as BreadcrumbList,to as BreadcrumbPage,Ut as BreadcrumbSeparator,or as Bubble,K as Button,ir as ButtonGroup,nr as ButtonGroupSeparator,pr as ButtonGroupText,No as Calendar,lt as Card,ct as CardBody,ae as CardDescription,oe as CardFooter,se as CardHeader,re as CardTitle,Io as Carousel,To as CarouselNext,$o as CarouselPrevious,Ro as CarouselSlide,Bo as Chart,Te as Checkbox,jt as ClipboardButton,Vs as Collapsible,Xs as CollapsibleContent,Zs as CollapsibleTrigger,Oo as Combobox,jo as Command,n as Component,Ps as ContextMenu,Fs as ContextMenuContent,_s as ContextMenuItem,Ds as ContextMenuTrigger,Kt as DataTable,ko as DatePicker,ue as Dialog,fe as DialogClose,It as DialogContent,ge as DialogDescription,he as DialogFooter,be as DialogHeader,me as DialogTitle,de as DialogTrigger,rr as Direction,cs as Drawer,fs as DrawerClose,ds as DrawerContent,gs as DrawerDescription,hs as DrawerFooter,bs as DrawerHeader,ms as DrawerTitle,us as DrawerTrigger,bt as DropdownMenu,Rt as DropdownMenuCheckboxItem,mt as DropdownMenuContent,Ts as DropdownMenuGroup,gt as DropdownMenuItem,Us as DropdownMenuLabel,qs as DropdownMenuRadioGroup,$t as DropdownMenuRadioItem,Ms as DropdownMenuSeparator,zs as DropdownMenuShortcut,ft as DropdownMenuSub,yt as DropdownMenuSubContent,ot as DropdownMenuSubTrigger,ht as DropdownMenuTrigger,we as Empty,Ne as EmptyContent,Le as EmptyDescription,Ae as EmptyHeader,Ee as EmptyMedia,Ce as EmptyTitle,$p as EventBus,Ct as Field,ur as FieldContent,Nt as FieldDescription,kt as FieldError,Et as FieldGroup,Lt as FieldLabel,cr as FieldLegend,br as FieldSeparator,lr as FieldSet,dr as FieldTitle,Yt as Form,Bs as HoverCard,Rs as HoverCardContent,Is as HoverCardTrigger,k as Icon,ie as Input,_e as InputGroup,He as InputGroupAddon,We as InputGroupButton,Ve as InputGroupInput,Ke as InputGroupText,Ze as InputGroupTextarea,Xe as InputOtp,ar as Item,Be as Kbd,hr as Label,Zt as Markdown,Xt as MarkdownTree,Dr as MarkdownTreeNode,Ie as Marker,ao as Menubar,Xo as Message,Go as MessageScroller,$e as NativeSelect,oo as NavigationMenu,ro as NavigationMenuItem,Tp as OwlError,eo as Pagination,so as PaginationItem,ks as Popover,js as PopoverContent,Os as PopoverTrigger,er as Progress,yr as Pwa,Er as PwaBody,Nr as PwaClose,Sr as PwaContent,Ar as PwaDescription,Lr as PwaFooter,xr as PwaHeader,Cr as PwaSteps,wr as PwaTitle,vr as PwaTrigger,Yo as Questionnaire,tr as QuestionnaireNext,Qo as QuestionnairePrevious,Jo as QuestionnaireStep,Ue as RadioGroup,qe as RadioGroupItem,Uo as Resizable,qo as ScrollArea,Ge as Select,Je as SelectContent,Qe as SelectItem,Ye as SelectTrigger,ke as Separator,vs as Sheet,Ls as SheetClose,xs as SheetContent,Cs as SheetDescription,As as SheetFooter,ws as SheetHeader,Es as SheetTitle,Ss as SheetTrigger,_t as Shell,Wt as ShellContent,wo as ShellHeader,xo as ShellMain,So as ShellNav,Ht as ShellSidebar,vo as ShellSidebarHeader,Ao as ShellUserMenu,at as Sidebar,zt as SidebarClose,St as SidebarContent,no as SidebarFooter,xt as SidebarGroup,Pt as SidebarGroupAction,Dt as SidebarGroupCollapsible,bo as SidebarGroupContent,wt as SidebarGroupLabel,io as SidebarHeader,co as SidebarInput,po as SidebarInset,it as SidebarMenu,Ft as SidebarMenuAction,mo as SidebarMenuBadge,rt as SidebarMenuButton,At as SidebarMenuItem,go as SidebarMenuSkeleton,ho as SidebarMenuSub,yo as SidebarMenuSubButton,fo as SidebarMenuSubItem,Ur as SidebarProvider,lo as SidebarRail,uo as SidebarSeparator,Mt as SidebarTrigger,ut as Skeleton,ze as Slider,Oe as Spinner,Me as Switch,Bt as TabContent,ce as TabTrigger,Eo as Table,ne as Tabs,pe as TabsContainer,le as TabsList,kr as TextEditor,Re as Textarea,nt as ThemeButton,vt as Toast,mr as Toggle,gr as ToggleGroup,fr as ToggleGroupItem,$s as Tooltip,je as Typography,Up as __info__,qp as batched,Mp as blockDom,Ra as createNamedIcon,Vt as createThemeController,mA as default,xa as findMarkdownTreeNode,zp as htmlEscape,Qa as iconComponentName,Hr as loadFile,fd as loadTemplate,Pp as markRaw,Oa as markup,oa as mount,ti as normalizeTheme,Dp as onError,O as onMounted,F as onPatched,Fp as onRendered,Wr as onWillDestroy,_p as onWillPatch,Hp as onWillRender,Qt as onWillStart,j as onWillUnmount,R as onWillUpdateProps,md as rawMount,gd as rawXml,Wp as reactive,sa as registerGlobalComponents,Kp as status,Vp as toRaw,A as useChildSubEnv,Zp as useComponent,G as useEffect,Xp as useEnv,Or as useExternalListener,S as useRef,g as useState,Gp as useSubEnv,Yp as validate,Jp as validateType,Qp as whenReady,wi as xml};