@mcp-use/inspector 1.0.0-canary.8 → 1.0.0

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 (246) hide show
  1. package/dist/cdn/inspector.css +1 -1
  2. package/dist/cdn/inspector.js +81264 -80633
  3. package/dist/client/hooks/useMCPPrompts.d.ts +3 -3
  4. package/dist/client/index.js +13657 -775
  5. package/dist/web/assets/browser-BwHKNEau.js +380 -0
  6. package/dist/web/assets/chunk-BBSBHVGK-D4wCPq_w.js +1 -0
  7. package/dist/web/assets/{chunk-KJ5RBDDO-DJkMH4KI.js → chunk-ECXMLUNG-CSRGaMIB.js} +1 -1
  8. package/dist/web/assets/chunk-JU7W27UC-CMTI_w7A.js +1 -0
  9. package/dist/web/assets/{chunk-QWQYAQCK-CyFuZlX8.js → chunk-QWQYAQCK-BR4V0xsV.js} +1 -1
  10. package/dist/web/assets/{chunk-RPN2XO5I-Boiv0wCv.js → chunk-RPN2XO5I-Cr13Miz-.js} +1 -1
  11. package/dist/web/assets/{chunk-UJPHRNQP-C81GjauI.js → chunk-UJPHRNQP-B14ZPq5a.js} +1 -1
  12. package/dist/web/assets/chunk_array-Bw1lTtex.js +1 -0
  13. package/dist/web/assets/{client-MLH2Q2DK-UzuK4Kji.js → client-2BTCLEUX-BhvJZmo-.js} +3 -3
  14. package/dist/web/assets/client-z1GrRUEs.js +68 -0
  15. package/dist/web/assets/{core-DktjxGrT.js → core-CsUyNVs5.js} +1 -1
  16. package/dist/web/assets/{core-B6Kp8rMh.js → core-GZZnkE26.js} +1 -1
  17. package/dist/web/assets/{display-A5IEINAP-BFwsYEHq.js → display-A5IEINAP-B8BJrcag.js} +2 -2
  18. package/dist/web/assets/{dist-CY62NsuD.js → dist-BZmXa__p.js} +2 -2
  19. package/dist/web/assets/{dist-B_dkmahO.js → dist-DlypDwtn.js} +1 -1
  20. package/dist/web/assets/dist-JsQmV3pO.js +21 -0
  21. package/dist/web/assets/dist-t5Yo0YiG.js +41 -0
  22. package/dist/web/assets/function_calling-kK7um7Ye.js +61 -0
  23. package/dist/web/assets/index-CM9P_1sf.css +2 -0
  24. package/dist/web/assets/index-zlrXpRSB.js +720 -0
  25. package/dist/web/assets/{json-schema-processors-DSIsU0go.js → json-schema-processors-DNSjFPrk.js} +1 -1
  26. package/dist/web/assets/langfuse-U2OEF7K7-BF5JV8uu.js +1 -0
  27. package/dist/web/assets/{llms-ByHaqvCr.js → llms-ByyTYk2T.js} +2 -2
  28. package/dist/web/assets/messages-D4_mH1tk.js +36 -0
  29. package/dist/web/assets/{module-DCsrdi7m.js → module-DbiflUeG.js} +2 -2
  30. package/dist/web/assets/react-C6BFTceN.js +1 -0
  31. package/dist/web/assets/rpc-logger-TPNV75J4-CMVlzCN7.js +1 -0
  32. package/dist/web/assets/{schemas-79owEkeD.js → schemas-BrqAD_Qo.js} +1 -1
  33. package/dist/web/assets/{source-1h9sRCfR.js → source-DeHaVNLZ.js} +1 -1
  34. package/dist/web/assets/stan-r2rUHRuO.js +1 -0
  35. package/dist/web/assets/{stdio-DH6BP75M-C4--HtGN.js → stdio-RWLH66ZO-C753VwJ7.js} +1 -1
  36. package/dist/web/assets/tools-kLe9X8V8.js +2 -0
  37. package/dist/web/index.html +13 -10
  38. package/package.json +8 -17
  39. package/dist/web/assets/browser-DeFVa-Up.js +0 -380
  40. package/dist/web/assets/chunk_array-CT_rI3GZ.js +0 -1
  41. package/dist/web/assets/client-DaI4JaTs.js +0 -68
  42. package/dist/web/assets/dist-Cjn62jmL.js +0 -21
  43. package/dist/web/assets/dist-DWk4vNzA.js +0 -41
  44. package/dist/web/assets/function_calling-BHFkMa4W.js +0 -61
  45. package/dist/web/assets/index-Bd0WP6Xj.js +0 -465
  46. package/dist/web/assets/index-DAB6h2wg.css +0 -2
  47. package/dist/web/assets/langfuse-U2OEF7K7-UPVEn4-O.js +0 -1
  48. package/dist/web/assets/messages-DQuC8BOl.js +0 -1
  49. package/dist/web/assets/react-C-wC1s-h.js +0 -1
  50. package/dist/web/assets/rpc-logger-TPNV75J4-DBofHjaa.js +0 -1
  51. package/dist/web/assets/stan-btJKTWsQ.js +0 -1
  52. package/dist/web/assets/tools-CFpbqXW1.js +0 -2
  53. /package/dist/web/assets/{1c-xAwF9KHw.js → 1c-AGlpZ3Bo.js} +0 -0
  54. /package/dist/web/assets/{abnf-57JF8nOy.js → abnf-CY04oKOo.js} +0 -0
  55. /package/dist/web/assets/{accesslog-C2D2ESC1.js → accesslog-BW-XYbZ-.js} +0 -0
  56. /package/dist/web/assets/{actionscript-BA90Z6ek.js → actionscript-CyrdwIe8.js} +0 -0
  57. /package/dist/web/assets/{ada-BOZemNeY.js → ada-C-TrrrBy.js} +0 -0
  58. /package/dist/web/assets/{angelscript-BPuRd7Au.js → angelscript-CRTYantF.js} +0 -0
  59. /package/dist/web/assets/{apache-CRejwSR0.js → apache-BtWb7jui.js} +0 -0
  60. /package/dist/web/assets/{applescript-DRWfnP7q.js → applescript-B5uiivcX.js} +0 -0
  61. /package/dist/web/assets/{arcade-c4fxT6cy.js → arcade-CKXflcFV.js} +0 -0
  62. /package/dist/web/assets/{arduino-D-GQgoAg.js → arduino-9WdEHP7F.js} +0 -0
  63. /package/dist/web/assets/{armasm-DW6aLB45.js → armasm-B1n3-9gm.js} +0 -0
  64. /package/dist/web/assets/{asciidoc-l4rRUjBn.js → asciidoc-DnpyabXI.js} +0 -0
  65. /package/dist/web/assets/{aspectj-CBoSaF_P.js → aspectj-DHfRYIO6.js} +0 -0
  66. /package/dist/web/assets/{autohotkey-oklQZH_e.js → autohotkey-D4kyAzbx.js} +0 -0
  67. /package/dist/web/assets/{autoit-CCOhikpq.js → autoit-Dkm5j0Id.js} +0 -0
  68. /package/dist/web/assets/{avrasm-DQyyIbM0.js → avrasm-DDWyveTc.js} +0 -0
  69. /package/dist/web/assets/{awk-Bpx3OGwB.js → awk-0C9tJhw5.js} +0 -0
  70. /package/dist/web/assets/{axapta-ConOtNUD.js → axapta-7WyvVgTr.js} +0 -0
  71. /package/dist/web/assets/{bash-CG9dvFVQ.js → bash-BU3h1nvY.js} +0 -0
  72. /package/dist/web/assets/{basic-D55fg9VU.js → basic-cvnVWdBh.js} +0 -0
  73. /package/dist/web/assets/{bnf-BRHfvdnF.js → bnf-DqQP6RvA.js} +0 -0
  74. /package/dist/web/assets/{brainfuck-CvIc7KgZ.js → brainfuck-9Gnm7MFh.js} +0 -0
  75. /package/dist/web/assets/{c-BYqCyjPu.js → c-CR0xII_C.js} +0 -0
  76. /package/dist/web/assets/{c-like-BiZIVjlk.js → c-like-DQRMjEeJ.js} +0 -0
  77. /package/dist/web/assets/{cal-BI45EWE9.js → cal-BupHjSW7.js} +0 -0
  78. /package/dist/web/assets/{capnproto-CT4_QH7U.js → capnproto-BJz3QcqE.js} +0 -0
  79. /package/dist/web/assets/{ceylon-DEhPqbQs.js → ceylon-Cm5BiqjN.js} +0 -0
  80. /package/dist/web/assets/{chunk-3GQAWCBQ-C-9Cm0Np.js → chunk-3GQAWCBQ-ntjTDD_C.js} +0 -0
  81. /package/dist/web/assets/{clean-Dj90Ldo4.js → clean-yd5cdwwQ.js} +0 -0
  82. /package/dist/web/assets/{clojure-nGPdvoWZ.js → clojure-BEy8uY0S.js} +0 -0
  83. /package/dist/web/assets/{clojure-repl-CoLrBnNB.js → clojure-repl-4mYnspW8.js} +0 -0
  84. /package/dist/web/assets/{cmake-Cau5qcoL.js → cmake-D6UxhUeW.js} +0 -0
  85. /package/dist/web/assets/{coffeescript-CRI19SN5.js → coffeescript-BKMS6sen.js} +0 -0
  86. /package/dist/web/assets/{coq-cKQTGfiT.js → coq-ByIcAboL.js} +0 -0
  87. /package/dist/web/assets/{cos-BvDn-C7W.js → cos-WtGXvK46.js} +0 -0
  88. /package/dist/web/assets/{cpp-Cm8w5GBK.js → cpp-7GTPyvMa.js} +0 -0
  89. /package/dist/web/assets/{crmsh-BphFuWfQ.js → crmsh-C5mOafXq.js} +0 -0
  90. /package/dist/web/assets/{crystal-CjeRzStm.js → crystal-CDkEXhx-.js} +0 -0
  91. /package/dist/web/assets/{csharp-BjNNmcwi.js → csharp-BB5evbyJ.js} +0 -0
  92. /package/dist/web/assets/{csp-BDakTyDq.js → csp-C5gCtA0-.js} +0 -0
  93. /package/dist/web/assets/{css-BS5Bw9la.js → css-BxJzVbPg.js} +0 -0
  94. /package/dist/web/assets/{d-iafwvjhA.js → d-pa4_Cp7t.js} +0 -0
  95. /package/dist/web/assets/{dart-CJj6VfDK.js → dart-BX2VLXw3.js} +0 -0
  96. /package/dist/web/assets/{delphi-CiYfdpeB.js → delphi-DdHGjuIZ.js} +0 -0
  97. /package/dist/web/assets/{diff-C0_uVc7j.js → diff-CBEZzUzk.js} +0 -0
  98. /package/dist/web/assets/{django-D2hgH-Q1.js → django-D4YuT7a9.js} +0 -0
  99. /package/dist/web/assets/{dns-Cl4dGnK7.js → dns-r4HMRPCv.js} +0 -0
  100. /package/dist/web/assets/{dockerfile-meWkyaPv.js → dockerfile-ZfcC6nOD.js} +0 -0
  101. /package/dist/web/assets/{dos-AwMP_0oM.js → dos-CIXc_2yf.js} +0 -0
  102. /package/dist/web/assets/{dsconfig-CnDR2ZdU.js → dsconfig-DlugHtUP.js} +0 -0
  103. /package/dist/web/assets/{dts-BzC-HwM_.js → dts-DaEIYGjQ.js} +0 -0
  104. /package/dist/web/assets/{dust-C7Vcl3-X.js → dust-D5BPeLmO.js} +0 -0
  105. /package/dist/web/assets/{ebnf-CL9qQEga.js → ebnf-FDSeI3Uq.js} +0 -0
  106. /package/dist/web/assets/{elixir-CfaDenjY.js → elixir-BW6MO0JC.js} +0 -0
  107. /package/dist/web/assets/{elm-Cy8gaJOl.js → elm-DlEB7oVS.js} +0 -0
  108. /package/dist/web/assets/{erb-C-4IIk8K.js → erb-Cfqar-lN.js} +0 -0
  109. /package/dist/web/assets/{erlang-B1M6fLuV.js → erlang-CAmVwVgE.js} +0 -0
  110. /package/dist/web/assets/{erlang-repl-BejU3MB_.js → erlang-repl-ynjzGTyJ.js} +0 -0
  111. /package/dist/web/assets/{excel-BkfhIrhj.js → excel-B4xDzPh0.js} +0 -0
  112. /package/dist/web/assets/{fix-BVmdZVAA.js → fix-DrIaqPya.js} +0 -0
  113. /package/dist/web/assets/{flix-D0avEvQY.js → flix-C1QBAYX7.js} +0 -0
  114. /package/dist/web/assets/{fortran-DakqiesO.js → fortran-13hn1qLz.js} +0 -0
  115. /package/dist/web/assets/{fsharp-DA54xfXW.js → fsharp-DsthWJmP.js} +0 -0
  116. /package/dist/web/assets/{gams-CXTQKphs.js → gams-CCIHfrc2.js} +0 -0
  117. /package/dist/web/assets/{gauss-CG12HF6_.js → gauss-DPE0fKXo.js} +0 -0
  118. /package/dist/web/assets/{gcode-BCEABt45.js → gcode-Cnu_Eke-.js} +0 -0
  119. /package/dist/web/assets/{gherkin-ZM-mRt_J.js → gherkin-6DphholZ.js} +0 -0
  120. /package/dist/web/assets/{glsl-CsBoWmwk.js → glsl-bxnyXALN.js} +0 -0
  121. /package/dist/web/assets/{gml-BpvmFz5F.js → gml-CNHkNLih.js} +0 -0
  122. /package/dist/web/assets/{go-oa77k3Q1.js → go-CNn2XrbH.js} +0 -0
  123. /package/dist/web/assets/{golo-DnSZZkzZ.js → golo-DiSoln2k.js} +0 -0
  124. /package/dist/web/assets/{gradle-xhSl5jRG.js → gradle-DwRwgn-A.js} +0 -0
  125. /package/dist/web/assets/{groovy-BUGEyqOY.js → groovy-B5vHRPUi.js} +0 -0
  126. /package/dist/web/assets/{haml-Q5moYl6B.js → haml-DyyQV85z.js} +0 -0
  127. /package/dist/web/assets/{handlebars-B8gHazwq.js → handlebars-BAEJweq7.js} +0 -0
  128. /package/dist/web/assets/{haskell-C_nTNVTF.js → haskell-ChxeibtB.js} +0 -0
  129. /package/dist/web/assets/{haxe-DEa-mhEM.js → haxe-Bnvb8PoO.js} +0 -0
  130. /package/dist/web/assets/{hsp-DAtUNrWr.js → hsp-BdBjqG0g.js} +0 -0
  131. /package/dist/web/assets/{htmlbars-IZ5H55KS.js → htmlbars-Dco0ls0x.js} +0 -0
  132. /package/dist/web/assets/{http-BlfIsTrN.js → http-BQrDnbm9.js} +0 -0
  133. /package/dist/web/assets/{hy-BKHwYI3U.js → hy-j_gy-_-v.js} +0 -0
  134. /package/dist/web/assets/{inform7-DBoQipSc.js → inform7-4lpsdkpY.js} +0 -0
  135. /package/dist/web/assets/{ini-rm_5Fj36.js → ini-CyoU_M9N.js} +0 -0
  136. /package/dist/web/assets/{irpf90-R1rxRBNO.js → irpf90-CA5ICZkt.js} +0 -0
  137. /package/dist/web/assets/{isbl-WbUbjWRI.js → isbl-D5MCB9gL.js} +0 -0
  138. /package/dist/web/assets/{java-flBTnDBg.js → java-C_cNvtw0.js} +0 -0
  139. /package/dist/web/assets/{javascript-Bi9wT7IL.js → javascript-Cx9Fh-yC.js} +0 -0
  140. /package/dist/web/assets/{jboss-cli-BVqHepEU.js → jboss-cli-n0a6upZq.js} +0 -0
  141. /package/dist/web/assets/{json-BvAVz8jQ.js → json-pS218i2Y.js} +0 -0
  142. /package/dist/web/assets/{julia-B3zW89kP.js → julia-ByIGgcyj.js} +0 -0
  143. /package/dist/web/assets/{julia-repl-Cpt_AFpB.js → julia-repl-DoKEpX79.js} +0 -0
  144. /package/dist/web/assets/{kotlin-CMZ_9XJI.js → kotlin-D7EVUsdH.js} +0 -0
  145. /package/dist/web/assets/{lasso-DVqtNSau.js → lasso-CfHzza_u.js} +0 -0
  146. /package/dist/web/assets/{latex-CFJv-UA6.js → latex-DEpVEzU4.js} +0 -0
  147. /package/dist/web/assets/{ldif-BS-KKOy0.js → ldif-CztKIlXq.js} +0 -0
  148. /package/dist/web/assets/{leaf--Z87tMVa.js → leaf-BeXHCQvG.js} +0 -0
  149. /package/dist/web/assets/{less-CXBPSZIU.js → less-BYuoMNFC.js} +0 -0
  150. /package/dist/web/assets/{lisp-cVmS95gk.js → lisp-DENj9Gb0.js} +0 -0
  151. /package/dist/web/assets/{livecodeserver-BOOiQrUz.js → livecodeserver-DzZuZBA6.js} +0 -0
  152. /package/dist/web/assets/{livescript-CVxJe7N1.js → livescript-Dcoaf4MP.js} +0 -0
  153. /package/dist/web/assets/{llvm-DQeHJJ2W.js → llvm-B_NkXFs1.js} +0 -0
  154. /package/dist/web/assets/{lsl-Bfxi34aD.js → lsl-sr9xRjsv.js} +0 -0
  155. /package/dist/web/assets/{lua-DXxL7Qnq.js → lua-DOwApfze.js} +0 -0
  156. /package/dist/web/assets/{makefile-B5Fr6EdB.js → makefile-Dnbo7dYF.js} +0 -0
  157. /package/dist/web/assets/{markdown-DTODmQHl.js → markdown-DGgwjJWS.js} +0 -0
  158. /package/dist/web/assets/{mathematica-XsKNpYVI.js → mathematica-DvU9l120.js} +0 -0
  159. /package/dist/web/assets/{matlab-BQHIwHUE.js → matlab-flr6798G.js} +0 -0
  160. /package/dist/web/assets/{maxima-4gc2wOHL.js → maxima-DCd2nSGc.js} +0 -0
  161. /package/dist/web/assets/{mel-tWDc8R_0.js → mel-NmXTNXHL.js} +0 -0
  162. /package/dist/web/assets/{mercury-CMAR8Kmo.js → mercury-PVmYLiQ2.js} +0 -0
  163. /package/dist/web/assets/{mipsasm-CuThUvs6.js → mipsasm-LHYPiOXU.js} +0 -0
  164. /package/dist/web/assets/{mizar-DJiOXbyw.js → mizar-BbJKfTOL.js} +0 -0
  165. /package/dist/web/assets/{mojolicious-BHZ1FyrY.js → mojolicious-Dw8SBiyk.js} +0 -0
  166. /package/dist/web/assets/{monkey-Ckr0R6Af.js → monkey-CYCsHKco.js} +0 -0
  167. /package/dist/web/assets/{moonscript-rPHoYTbB.js → moonscript-BndWJdyg.js} +0 -0
  168. /package/dist/web/assets/{n1ql-CVbFFpfR.js → n1ql-p64i6r1f.js} +0 -0
  169. /package/dist/web/assets/{nginx-piKHOi7C.js → nginx-Clg11n23.js} +0 -0
  170. /package/dist/web/assets/{nim-D2ljN6dK.js → nim-BF6erjkH.js} +0 -0
  171. /package/dist/web/assets/{nix-BE-MXto5.js → nix-aqHU_7Cj.js} +0 -0
  172. /package/dist/web/assets/{node-repl-DywEPp9w.js → node-repl-DuuOln4U.js} +0 -0
  173. /package/dist/web/assets/{nsis-DQnnPyE6.js → nsis-BZNwabo3.js} +0 -0
  174. /package/dist/web/assets/{objectivec-DVFSpwpL.js → objectivec-BD-A2eRS.js} +0 -0
  175. /package/dist/web/assets/{ocaml-B9_ypEp1.js → ocaml-Dtfm3HD8.js} +0 -0
  176. /package/dist/web/assets/{openscad-Cquxty4i.js → openscad-3uP221Jx.js} +0 -0
  177. /package/dist/web/assets/{oxygene-BtOMSMR6.js → oxygene-DBIMAfJO.js} +0 -0
  178. /package/dist/web/assets/{parser3-CWVyPD7l.js → parser3-C9bjRYvd.js} +0 -0
  179. /package/dist/web/assets/{path-BzTN_bR6.js → path-CG3438uq.js} +0 -0
  180. /package/dist/web/assets/{perl-DQMBOVA5.js → perl-Be1CLDbh.js} +0 -0
  181. /package/dist/web/assets/{pf-DhGORkJd.js → pf-BEYn9RX1.js} +0 -0
  182. /package/dist/web/assets/{pgsql-awwi5nDK.js → pgsql-Bp-7Jjz8.js} +0 -0
  183. /package/dist/web/assets/{php-_c_VoeVa.js → php-D8HtobZG.js} +0 -0
  184. /package/dist/web/assets/{php-template-Dsp4D0jE.js → php-template-5wDTa_KR.js} +0 -0
  185. /package/dist/web/assets/{plaintext-7v3vLFp3.js → plaintext-DF3cBN5Y.js} +0 -0
  186. /package/dist/web/assets/{pony-BVahP-cB.js → pony-CA_LuLTd.js} +0 -0
  187. /package/dist/web/assets/{powershell-DDAkbMgT.js → powershell-CfylS3qM.js} +0 -0
  188. /package/dist/web/assets/{preload-helper-XLr9-hSf.js → preload-helper-ckxxtgMM.js} +0 -0
  189. /package/dist/web/assets/{processing-CCja83Ot.js → processing-BOdw1uey.js} +0 -0
  190. /package/dist/web/assets/{profile-BjuA8z3S.js → profile-BMNLdTbz.js} +0 -0
  191. /package/dist/web/assets/{prolog-jJiPeztA.js → prolog-wnuVaQNI.js} +0 -0
  192. /package/dist/web/assets/{properties-DK40DOVd.js → properties-BY2UjzIx.js} +0 -0
  193. /package/dist/web/assets/{protobuf-DJs85Lp7.js → protobuf-W4tuiDUG.js} +0 -0
  194. /package/dist/web/assets/{puppet-BPdGz-Jp.js → puppet-CcAPsi7F.js} +0 -0
  195. /package/dist/web/assets/{purebasic-C8c2xseX.js → purebasic-Cx_iSilj.js} +0 -0
  196. /package/dist/web/assets/{python-B-gHuzXK.js → python-DtGc5unX.js} +0 -0
  197. /package/dist/web/assets/{python-repl-CLJQcHH8.js → python-repl-B1V7zIpU.js} +0 -0
  198. /package/dist/web/assets/{q-VmMkCWpr.js → q-DwgFecwj.js} +0 -0
  199. /package/dist/web/assets/{qml-BkIM5RCI.js → qml-CxtqwNEV.js} +0 -0
  200. /package/dist/web/assets/{r-CHi-Wrw8.js → r-Vyl1b83h.js} +0 -0
  201. /package/dist/web/assets/{reasonml-B05iQ6f2.js → reasonml-D1BWml10.js} +0 -0
  202. /package/dist/web/assets/{rib-DzxrqgFS.js → rib-WKK4Jb_l.js} +0 -0
  203. /package/dist/web/assets/{roboconf-DVxtd4X5.js → roboconf-DD9St8Le.js} +0 -0
  204. /package/dist/web/assets/{routeros-C7PRtmmR.js → routeros-DIyDrw3W.js} +0 -0
  205. /package/dist/web/assets/{rsl-CcIHTLD_.js → rsl-CfigMFVZ.js} +0 -0
  206. /package/dist/web/assets/{ruby-BGhMoiTk.js → ruby-YHScF8rv.js} +0 -0
  207. /package/dist/web/assets/{ruleslanguage-2nOGmUbL.js → ruleslanguage-BYwdQsZF.js} +0 -0
  208. /package/dist/web/assets/{rust-Bn5K3sZf.js → rust-B5YXnMyV.js} +0 -0
  209. /package/dist/web/assets/{sas-BOCzodK2.js → sas-CCTr8w16.js} +0 -0
  210. /package/dist/web/assets/{scala-BRv9Y1Gl.js → scala-Cbxd3VFS.js} +0 -0
  211. /package/dist/web/assets/{scheme-DgxU7T27.js → scheme-BsN3DINT.js} +0 -0
  212. /package/dist/web/assets/{scilab-CDpHNnol.js → scilab-DPKVNXPG.js} +0 -0
  213. /package/dist/web/assets/{scss-_DXiA8XH.js → scss-DbQAKOek.js} +0 -0
  214. /package/dist/web/assets/{shell-JZbpHYqw.js → shell-DWzkAqOf.js} +0 -0
  215. /package/dist/web/assets/{smali-D-pxIQI6.js → smali-BftjeLb5.js} +0 -0
  216. /package/dist/web/assets/{smalltalk-BgHXrgWH.js → smalltalk-CRiQmXNN.js} +0 -0
  217. /package/dist/web/assets/{sml-XMsOdlaX.js → sml-StzcQc9I.js} +0 -0
  218. /package/dist/web/assets/{sqf-BAJmpDEs.js → sqf-DD5HJChz.js} +0 -0
  219. /package/dist/web/assets/{sql-qDDDtU5U.js → sql-DPgh6LFW.js} +0 -0
  220. /package/dist/web/assets/{sql_more-OsRq2zw0.js → sql_more-CtzXbTQc.js} +0 -0
  221. /package/dist/web/assets/{stata-Bk4QaRj1.js → stata-BVbnRiot.js} +0 -0
  222. /package/dist/web/assets/{step21-JBksYMyW.js → step21-Dq-6Zq9y.js} +0 -0
  223. /package/dist/web/assets/{stylus-B2-KoW99.js → stylus-BBnpEkBq.js} +0 -0
  224. /package/dist/web/assets/{subunit-Dms0B4fv.js → subunit-ELCErEkQ.js} +0 -0
  225. /package/dist/web/assets/{swift-BDkC6DWd.js → swift-DaAs7qTh.js} +0 -0
  226. /package/dist/web/assets/{taggerscript-BQuVNykw.js → taggerscript-1FPav-0a.js} +0 -0
  227. /package/dist/web/assets/{tap-Bwup7RHy.js → tap-EToQ4lhN.js} +0 -0
  228. /package/dist/web/assets/{tcl-CbpGYImD.js → tcl-D3o49C6L.js} +0 -0
  229. /package/dist/web/assets/{thrift-B_z8wKcZ.js → thrift-CWhyiqPB.js} +0 -0
  230. /package/dist/web/assets/{tp-BJLBEN3J.js → tp-B6O9yM_7.js} +0 -0
  231. /package/dist/web/assets/{twig-nUEnJWT1.js → twig-CtXlonbL.js} +0 -0
  232. /package/dist/web/assets/{typescript-CrQbuH5h.js → typescript-CCrKHjvE.js} +0 -0
  233. /package/dist/web/assets/{util-BS7JSiXp.js → util-_DavpSWv.js} +0 -0
  234. /package/dist/web/assets/{vala-2XexN6SZ.js → vala-DqTbJvZE.js} +0 -0
  235. /package/dist/web/assets/{vbnet-BAt8krwo.js → vbnet-BIMC8kyn.js} +0 -0
  236. /package/dist/web/assets/{vbscript--ebsjfOw.js → vbscript-CwHfrTEX.js} +0 -0
  237. /package/dist/web/assets/{vbscript-html-yaZI43iV.js → vbscript-html-6BIOjkqb.js} +0 -0
  238. /package/dist/web/assets/{verilog-emU2h0-4.js → verilog-Br3eYmwZ.js} +0 -0
  239. /package/dist/web/assets/{vhdl-CPuOZFR2.js → vhdl-CDlnDphM.js} +0 -0
  240. /package/dist/web/assets/{vim-ZfleAGCY.js → vim-BOZojkV6.js} +0 -0
  241. /package/dist/web/assets/{x86asm-BHTiWqya.js → x86asm-Br9iqCtX.js} +0 -0
  242. /package/dist/web/assets/{xl-MlLWG0U8.js → xl-eSTclZWH.js} +0 -0
  243. /package/dist/web/assets/{xml-CJKMw8W2.js → xml-C775tW_n.js} +0 -0
  244. /package/dist/web/assets/{xquery-B4Yi49S8.js → xquery-DimlVJ6h.js} +0 -0
  245. /package/dist/web/assets/{yaml-5C-oV2Cp.js → yaml-Dnhus5cp.js} +0 -0
  246. /package/dist/web/assets/{zephir-Dig9AotJ.js → zephir-j3mL6he_.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{t as e}from"./chunk-zsgVPwQN.js";var t=e(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];typeof r==`object`&&!Object.isFrozen(r)&&n(r)}),e}var r=n;r.default=n;var i=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function a(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`)}function o(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var s=`</span>`,c=e=>!!e.kind,l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=a(e)}openNode(e){if(!c(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){c(e)&&(this.buffer+=s)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=class e{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},d=class extends u{constructor(e){super(),this.options=e}addKeyword(e,t){e!==``&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){e!==``&&this.add(e)}addSublanguage(e,t){let n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}};function ee(e){return new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,`\\$&`),`m`)}function f(e){return e?typeof e==`string`?e:e.source:null}function p(...e){return e.map(e=>f(e)).join(``)}function m(...e){return`(`+e.map(e=>f(e)).join(`|`)+`)`}function h(e){return RegExp(e.toString()+`|`).exec(``).length-1}function te(e,t){let n=e&&e.exec(t);return n&&n.index===0}var g=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _(e,t=`|`){let n=0;return e.map(e=>{n+=1;let t=n,r=f(e),i=``;for(;r.length>0;){let e=g.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var v=/\b\B/,y=`[a-zA-Z]\\w*`,b=`[a-zA-Z_]\\w*`,x=`\\b\\d+(\\.\\d+)?`,S=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,C=`\\b(0b[01]+)`,w=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,T=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=p(t,/.*\b/,e.binary,/\b.*/)),o({className:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},E={begin:`\\\\[\\s\\S]`,relevance:0},D={className:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[E]},O={className:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[E]},k={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},A=function(e,t,n={}){let r=o({className:`comment`,begin:e,end:t,contains:[]},n);return r.contains.push(k),r.contains.push({className:`doctag`,begin:`(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):`,relevance:0}),r},j=A(`//`,`$`),M=A(`/\\*`,`\\*/`),N=A(`#`,`$`),P={className:`number`,begin:x,relevance:0},F={className:`number`,begin:S,relevance:0},I={className:`number`,begin:C,relevance:0},L={className:`number`,begin:x+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},R={begin:/(?=\/[^/\n]*\/)/,contains:[{className:`regexp`,begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[E,{begin:/\[/,end:/\]/,relevance:0,contains:[E]}]}]},z={className:`title`,begin:y,relevance:0},B={className:`title`,begin:b,relevance:0},V={begin:`\\.\\s*`+b,relevance:0},H=Object.freeze({__proto__:null,MATCH_NOTHING_RE:v,IDENT_RE:y,UNDERSCORE_IDENT_RE:b,NUMBER_RE:x,C_NUMBER_RE:S,BINARY_NUMBER_RE:C,RE_STARTERS_RE:w,SHEBANG:T,BACKSLASH_ESCAPE:E,APOS_STRING_MODE:D,QUOTE_STRING_MODE:O,PHRASAL_WORDS_MODE:k,COMMENT:A,C_LINE_COMMENT_MODE:j,C_BLOCK_COMMENT_MODE:M,HASH_COMMENT_MODE:N,NUMBER_MODE:P,C_NUMBER_MODE:F,BINARY_NUMBER_MODE:I,CSS_NUMBER_MODE:L,REGEXP_MODE:R,TITLE_MODE:z,UNDERSCORE_TITLE_MODE:B,METHOD_GUARD:V,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function ne(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function re(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ne,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ie(e,t){Array.isArray(e.illegal)&&(e.illegal=m(...e.illegal))}function ae(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function oe(e,t){e.relevance===void 0&&(e.relevance=1)}var se=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],ce=`keyword`;function U(e,t,n=ce){let r={};return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,U(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,le(n[0],n[1])]})}}function le(e,t){return t?Number(t):ue(e)?0:1}function ue(e){return se.includes(e.toLowerCase())}function de(e,{plugins:t}){function n(t,n){return new RegExp(f(t),`m`+(e.case_insensitive?`i`:``)+(n?`g`:``))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=h(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null),this.matcherRe=n(_(this.regexes.map(e=>e[1])),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new r;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function a(e){let t=new i;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function s(t,r){let i=t;if(t.isCompiled)return i;[ae].forEach(e=>e(t,r)),e.compilerExtensions.forEach(e=>e(t,r)),t.__beforeBegin=null,[re,ie,oe].forEach(e=>e(t,r)),t.isCompiled=!0;let o=null;if(typeof t.keywords==`object`&&(o=t.keywords.$pattern,delete t.keywords.$pattern),t.keywords&&=U(t.keywords,e.case_insensitive),t.lexemes&&o)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return o=o||t.lexemes||/\w+/,i.keywordPatternRe=n(o,!0),r&&(t.begin||=/\B|\b/,i.beginRe=n(t.begin),t.endSameAsBegin&&(t.end=t.begin),!t.end&&!t.endsWithParent&&(t.end=/\B|\b/),t.end&&(i.endRe=n(t.end)),i.terminatorEnd=f(t.end)||``,t.endsWithParent&&r.terminatorEnd&&(i.terminatorEnd+=(t.end?`|`:``)+r.terminatorEnd)),t.illegal&&(i.illegalRe=n(t.illegal)),t.contains||=[],t.contains=[].concat(...t.contains.map(function(e){return fe(e===`self`?t:e)})),t.contains.forEach(function(e){s(e,i)}),t.starts&&s(t.starts,r),i.matcher=a(i),i}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=o(e.classNameAliases||{}),s(e)}function W(e){return e?e.endsWithParent||W(e.starts):!1}function fe(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return o(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:W(e)?o(e,{starts:e.starts?o(e.starts):null}):Object.isFrozen(e)?o(e):e}var pe=`10.7.3`;function me(e){return!!(e||e===``)}function he(e){let t={props:[`language`,`code`,`autodetect`],data:function(){return{detectedLanguage:``,unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?``:`hljs `+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,a(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||me(this.autodetect)},ignoreIllegals(){return!0}},render(e){return e(`pre`,{},[e(`code`,{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component(`highlightjs`,t)}}}}var ge={"after:highlightElement":({el:e,result:t,text:n})=>{let r=K(e);if(!r.length)return;let i=document.createElement(`div`);i.innerHTML=t.value,t.value=_e(r,K(i),n)}};function G(e){return e.nodeName.toLowerCase()}function K(e){let t=[];return(function e(n,r){for(let i=n.firstChild;i;i=i.nextSibling)i.nodeType===3?r+=i.nodeValue.length:i.nodeType===1&&(t.push({event:`start`,offset:r,node:i}),r=e(i,r),G(i).match(/br|hr|img|input/)||t.push({event:`stop`,offset:r,node:i}));return r})(e,0),t}function _e(e,t,n){let r=0,i=``,o=[];function s(){return!e.length||!t.length?e.length?e:t:e[0].offset===t[0].offset?t[0].event===`start`?e:t:e[0].offset<t[0].offset?e:t}function c(e){function t(e){return` `+e.nodeName+`="`+a(e.value)+`"`}i+=`<`+G(e)+[].map.call(e.attributes,t).join(``)+`>`}function l(e){i+=`</`+G(e)+`>`}function u(e){(e.event===`start`?c:l)(e.node)}for(;e.length||t.length;){let t=s();if(i+=a(n.substring(r,t[0].offset)),r=t[0].offset,t===e){o.reverse().forEach(l);do u(t.splice(0,1)[0]),t=s();while(t===e&&t.length&&t[0].offset===r);o.reverse().forEach(c)}else t[0].event===`start`?o.push(t[0].node):o.pop(),u(t.splice(0,1)[0])}return i+a(n.substr(r))}var q={},J=e=>{console.error(e)},Y=(e,...t)=>{console.log(`WARN: ${e}`,...t)},X=(e,t)=>{q[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),q[`${e}/${t}`]=!0)},Z=a,Q=o,$=Symbol(`nomatch`);t.exports=function(e){let t=Object.create(null),n=Object.create(null),a=[],o=!0,s=/(^(<[^>]+>|\t|)+|\n)/gm,c=`Could not find the language '{}', did you forget to load/include a language module?`,l={disableAutodetect:!0,name:`Plain text`,contains:[]},u={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,tabReplace:null,useBR:!1,languages:null,__emitter:d};function f(e){return u.noHighlightRe.test(e)}function p(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=u.languageDetectRe.exec(t);if(n){let t=P(n[1]);return t||(Y(c.replace(`{}`,n[1])),Y(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>f(e)||P(e))}function m(e,t,n,r){let i=``,a=``;typeof t==`object`?(i=e,n=t.ignoreIllegals,a=t.language,r=void 0):(X(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),X(`10.7.0`,`Please use highlight(code, options) instead.
1
+ import{t as e}from"./chunk-zsgVPwQN.js";var t=e(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];typeof r==`object`&&!Object.isFrozen(r)&&n(r)}),e}var r=n;r.default=n;var i=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function a(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`)}function o(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var s=`</span>`,c=e=>!!e.kind,l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=a(e)}openNode(e){if(!c(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){c(e)&&(this.buffer+=s)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=class e{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},d=class extends u{constructor(e){super(),this.options=e}addKeyword(e,t){e!==``&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){e!==``&&this.add(e)}addSublanguage(e,t){let n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}};function ee(e){return new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,`\\$&`),`m`)}function f(e){return e?typeof e==`string`?e:e.source:null}function p(...e){return e.map(e=>f(e)).join(``)}function m(...e){return`(`+e.map(e=>f(e)).join(`|`)+`)`}function h(e){return RegExp(e.toString()+`|`).exec(``).length-1}function te(e,t){let n=e&&e.exec(t);return n&&n.index===0}var g=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _(e,t=`|`){let n=0;return e.map(e=>{n+=1;let t=n,r=f(e),i=``;for(;r.length>0;){let e=g.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var v=/\b\B/,y=`[a-zA-Z]\\w*`,b=`[a-zA-Z_]\\w*`,x=`\\b\\d+(\\.\\d+)?`,S=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,C=`\\b(0b[01]+)`,w=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,T=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=p(t,/.*\b/,e.binary,/\b.*/)),o({className:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},E={begin:`\\\\[\\s\\S]`,relevance:0},D={className:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[E]},O={className:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[E]},k={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},A=function(e,t,n={}){let r=o({className:`comment`,begin:e,end:t,contains:[]},n);return r.contains.push(k),r.contains.push({className:`doctag`,begin:`(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):`,relevance:0}),r},j=A(`//`,`$`),M=A(`/\\*`,`\\*/`),N=A(`#`,`$`),P={className:`number`,begin:x,relevance:0},F={className:`number`,begin:S,relevance:0},I={className:`number`,begin:C,relevance:0},L={className:`number`,begin:x+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},R={begin:/(?=\/[^/\n]*\/)/,contains:[{className:`regexp`,begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[E,{begin:/\[/,end:/\]/,relevance:0,contains:[E]}]}]},z={className:`title`,begin:y,relevance:0},B={className:`title`,begin:b,relevance:0},V={begin:`\\.\\s*`+b,relevance:0},H=Object.freeze({__proto__:null,MATCH_NOTHING_RE:v,IDENT_RE:y,UNDERSCORE_IDENT_RE:b,NUMBER_RE:x,C_NUMBER_RE:S,BINARY_NUMBER_RE:C,RE_STARTERS_RE:w,SHEBANG:T,BACKSLASH_ESCAPE:E,APOS_STRING_MODE:D,QUOTE_STRING_MODE:O,PHRASAL_WORDS_MODE:k,COMMENT:A,C_LINE_COMMENT_MODE:j,C_BLOCK_COMMENT_MODE:M,HASH_COMMENT_MODE:N,NUMBER_MODE:P,C_NUMBER_MODE:F,BINARY_NUMBER_MODE:I,CSS_NUMBER_MODE:L,REGEXP_MODE:R,TITLE_MODE:z,UNDERSCORE_TITLE_MODE:B,METHOD_GUARD:V,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function ne(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function re(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ne,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ie(e,t){Array.isArray(e.illegal)&&(e.illegal=m(...e.illegal))}function ae(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function oe(e,t){e.relevance===void 0&&(e.relevance=1)}var se=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],ce=`keyword`;function U(e,t,n=ce){let r={};return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,U(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,le(n[0],n[1])]})}}function le(e,t){return t?Number(t):+!ue(e)}function ue(e){return se.includes(e.toLowerCase())}function de(e,{plugins:t}){function n(t,n){return new RegExp(f(t),`m`+(e.case_insensitive?`i`:``)+(n?`g`:``))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=h(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null),this.matcherRe=n(_(this.regexes.map(e=>e[1])),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new r;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function a(e){let t=new i;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function s(t,r){let i=t;if(t.isCompiled)return i;[ae].forEach(e=>e(t,r)),e.compilerExtensions.forEach(e=>e(t,r)),t.__beforeBegin=null,[re,ie,oe].forEach(e=>e(t,r)),t.isCompiled=!0;let o=null;if(typeof t.keywords==`object`&&(o=t.keywords.$pattern,delete t.keywords.$pattern),t.keywords&&=U(t.keywords,e.case_insensitive),t.lexemes&&o)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return o=o||t.lexemes||/\w+/,i.keywordPatternRe=n(o,!0),r&&(t.begin||=/\B|\b/,i.beginRe=n(t.begin),t.endSameAsBegin&&(t.end=t.begin),!t.end&&!t.endsWithParent&&(t.end=/\B|\b/),t.end&&(i.endRe=n(t.end)),i.terminatorEnd=f(t.end)||``,t.endsWithParent&&r.terminatorEnd&&(i.terminatorEnd+=(t.end?`|`:``)+r.terminatorEnd)),t.illegal&&(i.illegalRe=n(t.illegal)),t.contains||=[],t.contains=[].concat(...t.contains.map(function(e){return fe(e===`self`?t:e)})),t.contains.forEach(function(e){s(e,i)}),t.starts&&s(t.starts,r),i.matcher=a(i),i}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=o(e.classNameAliases||{}),s(e)}function W(e){return e?e.endsWithParent||W(e.starts):!1}function fe(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return o(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:W(e)?o(e,{starts:e.starts?o(e.starts):null}):Object.isFrozen(e)?o(e):e}var pe=`10.7.3`;function me(e){return!!(e||e===``)}function he(e){let t={props:[`language`,`code`,`autodetect`],data:function(){return{detectedLanguage:``,unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?``:`hljs `+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,a(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||me(this.autodetect)},ignoreIllegals(){return!0}},render(e){return e(`pre`,{},[e(`code`,{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component(`highlightjs`,t)}}}}var ge={"after:highlightElement":({el:e,result:t,text:n})=>{let r=K(e);if(!r.length)return;let i=document.createElement(`div`);i.innerHTML=t.value,t.value=_e(r,K(i),n)}};function G(e){return e.nodeName.toLowerCase()}function K(e){let t=[];return(function e(n,r){for(let i=n.firstChild;i;i=i.nextSibling)i.nodeType===3?r+=i.nodeValue.length:i.nodeType===1&&(t.push({event:`start`,offset:r,node:i}),r=e(i,r),G(i).match(/br|hr|img|input/)||t.push({event:`stop`,offset:r,node:i}));return r})(e,0),t}function _e(e,t,n){let r=0,i=``,o=[];function s(){return!e.length||!t.length?e.length?e:t:e[0].offset===t[0].offset?t[0].event===`start`?e:t:e[0].offset<t[0].offset?e:t}function c(e){function t(e){return` `+e.nodeName+`="`+a(e.value)+`"`}i+=`<`+G(e)+[].map.call(e.attributes,t).join(``)+`>`}function l(e){i+=`</`+G(e)+`>`}function u(e){(e.event===`start`?c:l)(e.node)}for(;e.length||t.length;){let t=s();if(i+=a(n.substring(r,t[0].offset)),r=t[0].offset,t===e){o.reverse().forEach(l);do u(t.splice(0,1)[0]),t=s();while(t===e&&t.length&&t[0].offset===r);o.reverse().forEach(c)}else t[0].event===`start`?o.push(t[0].node):o.pop(),u(t.splice(0,1)[0])}return i+a(n.substr(r))}var q={},J=e=>{console.error(e)},Y=(e,...t)=>{console.log(`WARN: ${e}`,...t)},X=(e,t)=>{q[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),q[`${e}/${t}`]=!0)},Z=a,Q=o,$=Symbol(`nomatch`);t.exports=function(e){let t=Object.create(null),n=Object.create(null),a=[],o=!0,s=/(^(<[^>]+>|\t|)+|\n)/gm,c=`Could not find the language '{}', did you forget to load/include a language module?`,l={disableAutodetect:!0,name:`Plain text`,contains:[]},u={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,tabReplace:null,useBR:!1,languages:null,__emitter:d};function f(e){return u.noHighlightRe.test(e)}function p(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=u.languageDetectRe.exec(t);if(n){let t=P(n[1]);return t||(Y(c.replace(`{}`,n[1])),Y(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>f(e)||P(e))}function m(e,t,n,r){let i=``,a=``;typeof t==`object`?(i=e,n=t.ignoreIllegals,a=t.language,r=void 0):(X(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),X(`10.7.0`,`Please use highlight(code, options) instead.
2
2
  https://github.com/highlightjs/highlight.js/issues/2277`),a=e,i=t);let o={code:i,language:a};z(`before:highlight`,o);let s=o.result?o.result:h(o.language,o.code,n,r);return s.code=o.code,z(`after:highlight`,s),s}function h(e,n,r,s){function l(e,t){let n=w.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function d(){if(!D.keywords){k.addText(A);return}let e=0;D.keywordPatternRe.lastIndex=0;let t=D.keywordPatternRe.exec(A),n=``;for(;t;){n+=A.substring(e,t.index);let r=l(D,t);if(r){let[e,i]=r;if(k.addText(n),n=``,j+=i,e.startsWith(`_`))n+=t[0];else{let n=w.classNameAliases[e]||e;k.addKeyword(t[0],n)}}else n+=t[0];e=D.keywordPatternRe.lastIndex,t=D.keywordPatternRe.exec(A)}n+=A.substr(e),k.addText(n)}function f(){if(A===``)return;let e=null;if(typeof D.subLanguage==`string`){if(!t[D.subLanguage]){k.addText(A);return}e=h(D.subLanguage,A,!0,O[D.subLanguage]),O[D.subLanguage]=e.top}else e=_(A,D.subLanguage.length?D.subLanguage:null);D.relevance>0&&(j+=e.relevance),k.addSublanguage(e.emitter,e.language)}function p(){D.subLanguage==null?d():f(),A=``}function m(e){return e.className&&k.openNode(w.classNameAliases[e.className]||e.className),D=Object.create(e,{parent:{value:D}}),D}function g(e,t,n){let r=te(e.endRe,n);if(r){if(e[`on:end`]){let n=new i(e);e[`on:end`](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function v(e){return D.matcher.regexIndex===0?(A+=e[0],1):(F=!0,0)}function y(e){let t=e[0],n=e.rule,r=new i(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,r),r.isMatchIgnored))return v(t);return n&&n.endSameAsBegin&&(n.endRe=ee(t)),n.skip?A+=t:(n.excludeBegin&&(A+=t),p(),!n.returnBegin&&!n.excludeBegin&&(A=t)),m(n),n.returnBegin?0:t.length}function b(e){let t=e[0],r=n.substr(e.index),i=g(D,e,r);if(!i)return $;let a=D;a.skip?A+=t:(a.returnEnd||a.excludeEnd||(A+=t),p(),a.excludeEnd&&(A=t));do D.className&&k.closeNode(),!D.skip&&!D.subLanguage&&(j+=D.relevance),D=D.parent;while(D!==i.parent);return i.starts&&(i.endSameAsBegin&&(i.starts.endRe=i.endRe),m(i.starts)),a.returnEnd?0:t.length}function x(){let e=[];for(let t=D;t!==w;t=t.parent)t.className&&e.unshift(t.className);e.forEach(e=>k.openNode(e))}let S={};function C(t,i){let a=i&&i[0];if(A+=t,a==null)return p(),0;if(S.type===`begin`&&i.type===`end`&&S.index===i.index&&a===``){if(A+=n.slice(i.index,i.index+1),!o){let t=Error(`0 width match regex`);throw t.languageName=e,t.badRule=S.rule,t}return 1}if(S=i,i.type===`begin`)return y(i);if(i.type===`illegal`&&!r){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(D.className||`<unnamed>`)+`"`);throw e.mode=D,e}else if(i.type===`end`){let e=b(i);if(e!==$)return e}if(i.type===`illegal`&&a===``)return 1;if(N>1e5&&N>i.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return A+=a,a.length}let w=P(e);if(!w)throw J(c.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let T=de(w,{plugins:a}),E=``,D=s||T,O={},k=new u.__emitter(u);x();let A=``,j=0,M=0,N=0,F=!1;try{for(D.matcher.considerAll();;){N++,F?F=!1:D.matcher.considerAll(),D.matcher.lastIndex=M;let e=D.matcher.exec(n);if(!e)break;let t=C(n.substring(M,e.index),e);M=e.index+t}return C(n.substr(M)),k.closeAllNodes(),k.finalize(),E=k.toHTML(),{relevance:Math.floor(j),value:E,language:e,illegal:!1,emitter:k,top:D}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(M-100,M+100),mode:t.mode},sofar:E,relevance:0,value:Z(n),emitter:k};if(o)return{illegal:!1,relevance:0,value:Z(n),emitter:k,language:e,top:D,errorRaised:t};throw t}}function g(e){let t={relevance:0,emitter:new u.__emitter(u),value:Z(e),illegal:!1,top:l};return t.emitter.addText(e),t}function _(e,n){n=n||u.languages||Object.keys(t);let r=g(e),i=n.filter(P).filter(I).map(t=>h(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(P(e.language).supersetOf===t.language)return 1;if(P(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.second_best=o,s}function v(e){return u.tabReplace||u.useBR?e.replace(s,e=>e===`
3
3
  `?u.useBR?`<br>`:e:u.tabReplace?e.replace(/\t/g,u.tabReplace):e):e}function y(e,t,r){let i=t?n[t]:r;e.classList.add(`hljs`),i&&e.classList.add(i)}let b={"before:highlightElement":({el:e})=>{u.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,``).replace(/<br[ /]*>/g,`
4
4
  `))},"after:highlightElement":({result:e})=>{u.useBR&&(e.value=e.value.replace(/\n/g,`<br>`))}},x=/^(<[^>]+>|\t)+/gm,S={"after:highlightElement":({result:e})=>{u.tabReplace&&(e.value=e.value.replace(x,e=>e.replace(/\t/g,u.tabReplace)))}};function C(e){let t=null,n=p(e);if(f(n))return;z(`before:highlightElement`,{el:e,language:n}),t=e;let r=t.textContent,i=n?m(r,{language:n,ignoreIllegals:!0}):_(r);z(`after:highlightElement`,{el:e,result:i,text:r}),e.innerHTML=i.value,y(e,n,i.language),e.result={language:i.language,re:i.relevance,relavance:i.relevance},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.relevance,relavance:i.second_best.relevance})}function w(e){e.useBR&&(X(`10.3.0`,`'useBR' will be removed entirely in v11.0`),X(`10.3.0`,`Please see https://github.com/highlightjs/highlight.js/issues/2559`)),u=Q(u,e)}let T=()=>{T.called||(T.called=!0,X(`10.6.0`,`initHighlighting() is deprecated. Use highlightAll() instead.`),document.querySelectorAll(`pre code`).forEach(C))};function E(){X(`10.6.0`,`initHighlightingOnLoad() is deprecated. Use highlightAll() instead.`),D=!0}let D=!1;function O(){if(document.readyState===`loading`){D=!0;return}document.querySelectorAll(`pre code`).forEach(C)}function k(){D&&O()}typeof window<`u`&&window.addEventListener&&window.addEventListener(`DOMContentLoaded`,k,!1);function A(n,r){let i=null;try{i=r(e)}catch(e){if(J(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)J(e);else throw e;i=l}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&F(i.aliases,{languageName:n})}function j(e){delete t[e];for(let t of Object.keys(n))n[t]===e&&delete n[t]}function M(){return Object.keys(t)}function N(e){X(`10.4.0`,`requireLanguage will be removed entirely in v11.`),X(`10.4.0`,`Please see https://github.com/highlightjs/highlight.js/pull/2844`);let t=P(e);if(t)return t;throw Error(`The '{}' language is required, but not loaded.`.replace(`{}`,e))}function P(e){return e=(e||``).toLowerCase(),t[e]||t[n[e]]}function F(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{n[e.toLowerCase()]=t})}function I(e){let t=P(e);return t&&!t.disableAutodetect}function L(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function R(e){L(e),a.push(e)}function z(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function B(e){return X(`10.2.0`,`fixMarkup will be removed entirely in v11.0`),X(`10.2.0`,`Please see https://github.com/highlightjs/highlight.js/issues/2534`),v(e)}function V(e){return X(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),X(`10.7.0`,`Please use highlightElement now.`),C(e)}Object.assign(e,{highlight:m,highlightAuto:_,highlightAll:O,fixMarkup:B,highlightElement:C,highlightBlock:V,configure:w,initHighlighting:T,initHighlightingOnLoad:E,registerLanguage:A,unregisterLanguage:j,listLanguages:M,getLanguage:P,registerAliases:F,requireLanguage:N,autoDetection:I,inherit:Q,addPlugin:R,vuePlugin:he(e).VuePlugin}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=pe;for(let e in H)typeof H[e]==`object`&&r(H[e]);return Object.assign(e,H),e.addPlugin(b),e.addPlugin(ge),e.addPlugin(S),e}({})}));export{t};
@@ -1 +1 @@
1
- import{t as e}from"./chunk-zsgVPwQN.js";import{t}from"./core-DktjxGrT.js";var n=e(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()})),r=e(((e,t)=>{var r=n(),i=a(Error);t.exports=i,i.eval=a(EvalError),i.range=a(RangeError),i.reference=a(ReferenceError),i.syntax=a(SyntaxError),i.type=a(TypeError),i.uri=a(URIError),i.create=a;function a(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&=r.apply(null,arguments),new e(t)}}})),i=e((e=>{var n=t(),i=r();e.highlight=o,e.highlightAuto=s,e.registerLanguage=c,e.listLanguages=l,e.registerAlias=u,d.prototype.addText=m,d.prototype.addKeyword=f,d.prototype.addSublanguage=p,d.prototype.openNode=h,d.prototype.closeNode=g,d.prototype.closeAllNodes=v,d.prototype.finalize=v,d.prototype.toHTML=_;var a=`hljs-`;function o(e,t,r){var o=n.configure({}),s=(r||{}).prefix,c;if(typeof e!=`string`)throw i("Expected `string` for name, got `%s`",e);if(!n.getLanguage(e))throw i("Unknown language: `%s` is not registered",e);if(typeof t!=`string`)throw i("Expected `string` for value, got `%s`",t);if(s??=a,n.configure({__emitter:d,classPrefix:s}),c=n.highlight(t,{language:e,ignoreIllegals:!0}),n.configure(o||{}),c.errorRaised)throw c.errorRaised;return{relevance:c.relevance,language:c.language,value:c.emitter.rootNode.children}}function s(e,t){var r=t||{},a=r.subset||n.listLanguages();r.prefix;var s=a.length,c=-1,l,u,d,f;if(typeof e!=`string`)throw i("Expected `string` for value, got `%s`",e);for(u={relevance:0,language:null,value:[]},l={relevance:0,language:null,value:[]};++c<s;)f=a[c],n.getLanguage(f)&&(d=o(f,e,t),d.language=f,d.relevance>u.relevance&&(u=d),d.relevance>l.relevance&&(u=l,l=d));return u.language&&(l.secondBest=u),l}function c(e,t){n.registerLanguage(e,t)}function l(){return n.listLanguages()}function u(e,t){var r=e,i;for(i in t&&(r={},r[e]=t),r)n.registerAliases(r[i],{languageName:i})}function d(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function f(e,t){this.openNode(t),this.addText(e),this.closeNode()}function p(e,t){var n=this.stack,r=n[n.length-1],i=e.rootNode.children,a=t?{type:`element`,tagName:`span`,properties:{className:[t]},children:i}:i;r.children=r.children.concat(a)}function m(e){var t=this.stack,n,r;e!==``&&(n=t[t.length-1],r=n.children[n.children.length-1],r&&r.type===`text`?r.value+=e:n.children.push({type:`text`,value:e}))}function h(e){var t=this.stack,n=this.options.classPrefix+e,r=t[t.length-1],i={type:`element`,tagName:`span`,properties:{className:[n]},children:[]};r.children.push(i),t.push(i)}function g(){this.stack.pop()}function _(){return``}function v(){}}));export default i();
1
+ import{t as e}from"./chunk-zsgVPwQN.js";import{t}from"./core-CsUyNVs5.js";var n=e(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()})),r=e(((e,t)=>{var r=n(),i=a(Error);t.exports=i,i.eval=a(EvalError),i.range=a(RangeError),i.reference=a(ReferenceError),i.syntax=a(SyntaxError),i.type=a(TypeError),i.uri=a(URIError),i.create=a;function a(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&=r.apply(null,arguments),new e(t)}}})),i=e((e=>{var n=t(),i=r();e.highlight=o,e.highlightAuto=s,e.registerLanguage=c,e.listLanguages=l,e.registerAlias=u,d.prototype.addText=m,d.prototype.addKeyword=f,d.prototype.addSublanguage=p,d.prototype.openNode=h,d.prototype.closeNode=g,d.prototype.closeAllNodes=v,d.prototype.finalize=v,d.prototype.toHTML=_;var a=`hljs-`;function o(e,t,r){var o=n.configure({}),s=(r||{}).prefix,c;if(typeof e!=`string`)throw i("Expected `string` for name, got `%s`",e);if(!n.getLanguage(e))throw i("Unknown language: `%s` is not registered",e);if(typeof t!=`string`)throw i("Expected `string` for value, got `%s`",t);if(s??=a,n.configure({__emitter:d,classPrefix:s}),c=n.highlight(t,{language:e,ignoreIllegals:!0}),n.configure(o||{}),c.errorRaised)throw c.errorRaised;return{relevance:c.relevance,language:c.language,value:c.emitter.rootNode.children}}function s(e,t){var r=t||{},a=r.subset||n.listLanguages();r.prefix;var s=a.length,c=-1,l,u,d,f;if(typeof e!=`string`)throw i("Expected `string` for value, got `%s`",e);for(u={relevance:0,language:null,value:[]},l={relevance:0,language:null,value:[]};++c<s;)f=a[c],n.getLanguage(f)&&(d=o(f,e,t),d.language=f,d.relevance>u.relevance&&(u=d),d.relevance>l.relevance&&(u=l,l=d));return u.language&&(l.secondBest=u),l}function c(e,t){n.registerLanguage(e,t)}function l(){return n.listLanguages()}function u(e,t){var r=e,i;for(i in t&&(r={},r[e]=t),r)n.registerAliases(r[i],{languageName:i})}function d(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function f(e,t){this.openNode(t),this.addText(e),this.closeNode()}function p(e,t){var n=this.stack,r=n[n.length-1],i=e.rootNode.children,a=t?{type:`element`,tagName:`span`,properties:{className:[t]},children:i}:i;r.children=r.children.concat(a)}function m(e){var t=this.stack,n,r;e!==``&&(n=t[t.length-1],r=n.children[n.children.length-1],r&&r.type===`text`?r.value+=e:n.children.push({type:`text`,value:e}))}function h(e){var t=this.stack,n=this.options.classPrefix+e,r=t[t.length-1],i={type:`element`,tagName:`span`,properties:{className:[n]},children:[]};r.children.push(i),t.push(i)}function g(){this.stack.pop()}function _(){return``}function v(){}}));export default i();
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-B_dkmahO.js","assets/chunk-zsgVPwQN.js","assets/core-DktjxGrT.js","assets/1c-xAwF9KHw.js","assets/abnf-57JF8nOy.js","assets/accesslog-C2D2ESC1.js","assets/actionscript-BA90Z6ek.js","assets/ada-BOZemNeY.js","assets/angelscript-BPuRd7Au.js","assets/apache-CRejwSR0.js","assets/applescript-DRWfnP7q.js","assets/arcade-c4fxT6cy.js","assets/arduino-D-GQgoAg.js","assets/armasm-DW6aLB45.js","assets/asciidoc-l4rRUjBn.js","assets/aspectj-CBoSaF_P.js","assets/autohotkey-oklQZH_e.js","assets/autoit-CCOhikpq.js","assets/avrasm-DQyyIbM0.js","assets/awk-Bpx3OGwB.js","assets/axapta-ConOtNUD.js","assets/bash-CG9dvFVQ.js","assets/basic-D55fg9VU.js","assets/bnf-BRHfvdnF.js","assets/brainfuck-CvIc7KgZ.js","assets/c-like-BiZIVjlk.js","assets/c-BYqCyjPu.js","assets/cal-BI45EWE9.js","assets/capnproto-CT4_QH7U.js","assets/ceylon-DEhPqbQs.js","assets/clean-Dj90Ldo4.js","assets/clojure-repl-CoLrBnNB.js","assets/clojure-nGPdvoWZ.js","assets/cmake-Cau5qcoL.js","assets/coffeescript-CRI19SN5.js","assets/coq-cKQTGfiT.js","assets/cos-BvDn-C7W.js","assets/cpp-Cm8w5GBK.js","assets/crmsh-BphFuWfQ.js","assets/crystal-CjeRzStm.js","assets/csharp-BjNNmcwi.js","assets/csp-BDakTyDq.js","assets/css-BS5Bw9la.js","assets/d-iafwvjhA.js","assets/dart-CJj6VfDK.js","assets/delphi-CiYfdpeB.js","assets/diff-C0_uVc7j.js","assets/django-D2hgH-Q1.js","assets/dns-Cl4dGnK7.js","assets/dockerfile-meWkyaPv.js","assets/dos-AwMP_0oM.js","assets/dsconfig-CnDR2ZdU.js","assets/dts-BzC-HwM_.js","assets/dust-C7Vcl3-X.js","assets/ebnf-CL9qQEga.js","assets/elixir-CfaDenjY.js","assets/elm-Cy8gaJOl.js","assets/erb-C-4IIk8K.js","assets/erlang-repl-BejU3MB_.js","assets/erlang-B1M6fLuV.js","assets/excel-BkfhIrhj.js","assets/fix-BVmdZVAA.js","assets/flix-D0avEvQY.js","assets/fortran-DakqiesO.js","assets/fsharp-DA54xfXW.js","assets/gams-CXTQKphs.js","assets/gauss-CG12HF6_.js","assets/gcode-BCEABt45.js","assets/gherkin-ZM-mRt_J.js","assets/glsl-CsBoWmwk.js","assets/gml-BpvmFz5F.js","assets/go-oa77k3Q1.js","assets/golo-DnSZZkzZ.js","assets/gradle-xhSl5jRG.js","assets/groovy-BUGEyqOY.js","assets/haml-Q5moYl6B.js","assets/handlebars-B8gHazwq.js","assets/haskell-C_nTNVTF.js","assets/haxe-DEa-mhEM.js","assets/hsp-DAtUNrWr.js","assets/htmlbars-IZ5H55KS.js","assets/http-BlfIsTrN.js","assets/hy-BKHwYI3U.js","assets/inform7-DBoQipSc.js","assets/ini-rm_5Fj36.js","assets/irpf90-R1rxRBNO.js","assets/isbl-WbUbjWRI.js","assets/java-flBTnDBg.js","assets/javascript-Bi9wT7IL.js","assets/jboss-cli-BVqHepEU.js","assets/json-BvAVz8jQ.js","assets/julia-repl-Cpt_AFpB.js","assets/julia-B3zW89kP.js","assets/kotlin-CMZ_9XJI.js","assets/lasso-DVqtNSau.js","assets/latex-CFJv-UA6.js","assets/ldif-BS-KKOy0.js","assets/leaf--Z87tMVa.js","assets/less-CXBPSZIU.js","assets/lisp-cVmS95gk.js","assets/livecodeserver-BOOiQrUz.js","assets/livescript-CVxJe7N1.js","assets/llvm-DQeHJJ2W.js","assets/lsl-Bfxi34aD.js","assets/lua-DXxL7Qnq.js","assets/makefile-B5Fr6EdB.js","assets/markdown-DTODmQHl.js","assets/mathematica-XsKNpYVI.js","assets/matlab-BQHIwHUE.js","assets/maxima-4gc2wOHL.js","assets/mel-tWDc8R_0.js","assets/mercury-CMAR8Kmo.js","assets/mipsasm-CuThUvs6.js","assets/mizar-DJiOXbyw.js","assets/mojolicious-BHZ1FyrY.js","assets/monkey-Ckr0R6Af.js","assets/moonscript-rPHoYTbB.js","assets/n1ql-CVbFFpfR.js","assets/nginx-piKHOi7C.js","assets/nim-D2ljN6dK.js","assets/nix-BE-MXto5.js","assets/node-repl-DywEPp9w.js","assets/nsis-DQnnPyE6.js","assets/objectivec-DVFSpwpL.js","assets/ocaml-B9_ypEp1.js","assets/openscad-Cquxty4i.js","assets/oxygene-BtOMSMR6.js","assets/parser3-CWVyPD7l.js","assets/perl-DQMBOVA5.js","assets/pf-DhGORkJd.js","assets/pgsql-awwi5nDK.js","assets/php-template-Dsp4D0jE.js","assets/php-_c_VoeVa.js","assets/plaintext-7v3vLFp3.js","assets/pony-BVahP-cB.js","assets/powershell-DDAkbMgT.js","assets/processing-CCja83Ot.js","assets/profile-BjuA8z3S.js","assets/prolog-jJiPeztA.js","assets/properties-DK40DOVd.js","assets/protobuf-DJs85Lp7.js","assets/puppet-BPdGz-Jp.js","assets/purebasic-C8c2xseX.js","assets/python-repl-CLJQcHH8.js","assets/python-B-gHuzXK.js","assets/q-VmMkCWpr.js","assets/qml-BkIM5RCI.js","assets/r-CHi-Wrw8.js","assets/reasonml-B05iQ6f2.js","assets/rib-DzxrqgFS.js","assets/roboconf-DVxtd4X5.js","assets/routeros-C7PRtmmR.js","assets/rsl-CcIHTLD_.js","assets/ruby-BGhMoiTk.js","assets/ruleslanguage-2nOGmUbL.js","assets/rust-Bn5K3sZf.js","assets/sas-BOCzodK2.js","assets/scala-BRv9Y1Gl.js","assets/scheme-DgxU7T27.js","assets/scilab-CDpHNnol.js","assets/scss-_DXiA8XH.js","assets/shell-JZbpHYqw.js","assets/smali-D-pxIQI6.js","assets/smalltalk-BgHXrgWH.js","assets/sml-XMsOdlaX.js","assets/sqf-BAJmpDEs.js","assets/sql-qDDDtU5U.js","assets/sql_more-OsRq2zw0.js","assets/stan-btJKTWsQ.js","assets/stata-Bk4QaRj1.js","assets/step21-JBksYMyW.js","assets/stylus-B2-KoW99.js","assets/subunit-Dms0B4fv.js","assets/swift-BDkC6DWd.js","assets/taggerscript-BQuVNykw.js","assets/tap-Bwup7RHy.js","assets/tcl-CbpGYImD.js","assets/thrift-B_z8wKcZ.js","assets/tp-BJLBEN3J.js","assets/twig-nUEnJWT1.js","assets/typescript-CrQbuH5h.js","assets/vala-2XexN6SZ.js","assets/vbnet-BAt8krwo.js","assets/vbscript-html-yaZI43iV.js","assets/vbscript--ebsjfOw.js","assets/verilog-emU2h0-4.js","assets/vhdl-CPuOZFR2.js","assets/vim-ZfleAGCY.js","assets/x86asm-BHTiWqya.js","assets/xl-MlLWG0U8.js","assets/xml-CJKMw8W2.js","assets/xquery-B4Yi49S8.js","assets/yaml-5C-oV2Cp.js","assets/zephir-Dig9AotJ.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./chunk-zsgVPwQN.js";import{t}from"./chunk-3GQAWCBQ-C-9Cm0Np.js";import{t as n}from"./preload-helper-XLr9-hSf.js";var r=null,i=null,a=null,o=!1,s=typeof process<`u`&&process.versions?.node;(async()=>{if(s)try{a=(await n(()=>import(`./util-BS7JSiXp.js`),[])).stripVTControlCharacters}catch{}try{r=(await n(()=>import(`./source-1h9sRCfR.js`),[])).default}catch{}try{i=(await n(()=>import(`./dist-B_dkmahO.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193]))).highlight}catch{}s&&(!r||!i)&&(o||(o=!0,console.warn(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-DlypDwtn.js","assets/chunk-zsgVPwQN.js","assets/core-CsUyNVs5.js","assets/1c-AGlpZ3Bo.js","assets/abnf-CY04oKOo.js","assets/accesslog-BW-XYbZ-.js","assets/actionscript-CyrdwIe8.js","assets/ada-C-TrrrBy.js","assets/angelscript-CRTYantF.js","assets/apache-BtWb7jui.js","assets/applescript-B5uiivcX.js","assets/arcade-CKXflcFV.js","assets/arduino-9WdEHP7F.js","assets/armasm-B1n3-9gm.js","assets/asciidoc-DnpyabXI.js","assets/aspectj-DHfRYIO6.js","assets/autohotkey-D4kyAzbx.js","assets/autoit-Dkm5j0Id.js","assets/avrasm-DDWyveTc.js","assets/awk-0C9tJhw5.js","assets/axapta-7WyvVgTr.js","assets/bash-BU3h1nvY.js","assets/basic-cvnVWdBh.js","assets/bnf-DqQP6RvA.js","assets/brainfuck-9Gnm7MFh.js","assets/c-like-DQRMjEeJ.js","assets/c-CR0xII_C.js","assets/cal-BupHjSW7.js","assets/capnproto-BJz3QcqE.js","assets/ceylon-Cm5BiqjN.js","assets/clean-yd5cdwwQ.js","assets/clojure-repl-4mYnspW8.js","assets/clojure-BEy8uY0S.js","assets/cmake-D6UxhUeW.js","assets/coffeescript-BKMS6sen.js","assets/coq-ByIcAboL.js","assets/cos-WtGXvK46.js","assets/cpp-7GTPyvMa.js","assets/crmsh-C5mOafXq.js","assets/crystal-CDkEXhx-.js","assets/csharp-BB5evbyJ.js","assets/csp-C5gCtA0-.js","assets/css-BxJzVbPg.js","assets/d-pa4_Cp7t.js","assets/dart-BX2VLXw3.js","assets/delphi-DdHGjuIZ.js","assets/diff-CBEZzUzk.js","assets/django-D4YuT7a9.js","assets/dns-r4HMRPCv.js","assets/dockerfile-ZfcC6nOD.js","assets/dos-CIXc_2yf.js","assets/dsconfig-DlugHtUP.js","assets/dts-DaEIYGjQ.js","assets/dust-D5BPeLmO.js","assets/ebnf-FDSeI3Uq.js","assets/elixir-BW6MO0JC.js","assets/elm-DlEB7oVS.js","assets/erb-Cfqar-lN.js","assets/erlang-repl-ynjzGTyJ.js","assets/erlang-CAmVwVgE.js","assets/excel-B4xDzPh0.js","assets/fix-DrIaqPya.js","assets/flix-C1QBAYX7.js","assets/fortran-13hn1qLz.js","assets/fsharp-DsthWJmP.js","assets/gams-CCIHfrc2.js","assets/gauss-DPE0fKXo.js","assets/gcode-Cnu_Eke-.js","assets/gherkin-6DphholZ.js","assets/glsl-bxnyXALN.js","assets/gml-CNHkNLih.js","assets/go-CNn2XrbH.js","assets/golo-DiSoln2k.js","assets/gradle-DwRwgn-A.js","assets/groovy-B5vHRPUi.js","assets/haml-DyyQV85z.js","assets/handlebars-BAEJweq7.js","assets/haskell-ChxeibtB.js","assets/haxe-Bnvb8PoO.js","assets/hsp-BdBjqG0g.js","assets/htmlbars-Dco0ls0x.js","assets/http-BQrDnbm9.js","assets/hy-j_gy-_-v.js","assets/inform7-4lpsdkpY.js","assets/ini-CyoU_M9N.js","assets/irpf90-CA5ICZkt.js","assets/isbl-D5MCB9gL.js","assets/java-C_cNvtw0.js","assets/javascript-Cx9Fh-yC.js","assets/jboss-cli-n0a6upZq.js","assets/json-pS218i2Y.js","assets/julia-repl-DoKEpX79.js","assets/julia-ByIGgcyj.js","assets/kotlin-D7EVUsdH.js","assets/lasso-CfHzza_u.js","assets/latex-DEpVEzU4.js","assets/ldif-CztKIlXq.js","assets/leaf-BeXHCQvG.js","assets/less-BYuoMNFC.js","assets/lisp-DENj9Gb0.js","assets/livecodeserver-DzZuZBA6.js","assets/livescript-Dcoaf4MP.js","assets/llvm-B_NkXFs1.js","assets/lsl-sr9xRjsv.js","assets/lua-DOwApfze.js","assets/makefile-Dnbo7dYF.js","assets/markdown-DGgwjJWS.js","assets/mathematica-DvU9l120.js","assets/matlab-flr6798G.js","assets/maxima-DCd2nSGc.js","assets/mel-NmXTNXHL.js","assets/mercury-PVmYLiQ2.js","assets/mipsasm-LHYPiOXU.js","assets/mizar-BbJKfTOL.js","assets/mojolicious-Dw8SBiyk.js","assets/monkey-CYCsHKco.js","assets/moonscript-BndWJdyg.js","assets/n1ql-p64i6r1f.js","assets/nginx-Clg11n23.js","assets/nim-BF6erjkH.js","assets/nix-aqHU_7Cj.js","assets/node-repl-DuuOln4U.js","assets/nsis-BZNwabo3.js","assets/objectivec-BD-A2eRS.js","assets/ocaml-Dtfm3HD8.js","assets/openscad-3uP221Jx.js","assets/oxygene-DBIMAfJO.js","assets/parser3-C9bjRYvd.js","assets/perl-Be1CLDbh.js","assets/pf-BEYn9RX1.js","assets/pgsql-Bp-7Jjz8.js","assets/php-template-5wDTa_KR.js","assets/php-D8HtobZG.js","assets/plaintext-DF3cBN5Y.js","assets/pony-CA_LuLTd.js","assets/powershell-CfylS3qM.js","assets/processing-BOdw1uey.js","assets/profile-BMNLdTbz.js","assets/prolog-wnuVaQNI.js","assets/properties-BY2UjzIx.js","assets/protobuf-W4tuiDUG.js","assets/puppet-CcAPsi7F.js","assets/purebasic-Cx_iSilj.js","assets/python-repl-B1V7zIpU.js","assets/python-DtGc5unX.js","assets/q-DwgFecwj.js","assets/qml-CxtqwNEV.js","assets/r-Vyl1b83h.js","assets/reasonml-D1BWml10.js","assets/rib-WKK4Jb_l.js","assets/roboconf-DD9St8Le.js","assets/routeros-DIyDrw3W.js","assets/rsl-CfigMFVZ.js","assets/ruby-YHScF8rv.js","assets/ruleslanguage-BYwdQsZF.js","assets/rust-B5YXnMyV.js","assets/sas-CCTr8w16.js","assets/scala-Cbxd3VFS.js","assets/scheme-BsN3DINT.js","assets/scilab-DPKVNXPG.js","assets/scss-DbQAKOek.js","assets/shell-DWzkAqOf.js","assets/smali-BftjeLb5.js","assets/smalltalk-CRiQmXNN.js","assets/sml-StzcQc9I.js","assets/sqf-DD5HJChz.js","assets/sql-DPgh6LFW.js","assets/sql_more-CtzXbTQc.js","assets/stan-r2rUHRuO.js","assets/stata-BVbnRiot.js","assets/step21-Dq-6Zq9y.js","assets/stylus-BBnpEkBq.js","assets/subunit-ELCErEkQ.js","assets/swift-DaAs7qTh.js","assets/taggerscript-1FPav-0a.js","assets/tap-EToQ4lhN.js","assets/tcl-D3o49C6L.js","assets/thrift-CWhyiqPB.js","assets/tp-B6O9yM_7.js","assets/twig-CtXlonbL.js","assets/typescript-CCrKHjvE.js","assets/vala-DqTbJvZE.js","assets/vbnet-BIMC8kyn.js","assets/vbscript-html-6BIOjkqb.js","assets/vbscript-CwHfrTEX.js","assets/verilog-Br3eYmwZ.js","assets/vhdl-CDlnDphM.js","assets/vim-BOZojkV6.js","assets/x86asm-Br9iqCtX.js","assets/xl-eSTclZWH.js","assets/xml-C775tW_n.js","assets/xquery-DimlVJ6h.js","assets/yaml-Dnhus5cp.js","assets/zephir-j3mL6he_.js"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./chunk-zsgVPwQN.js";import{t}from"./chunk-3GQAWCBQ-ntjTDD_C.js";import{t as n}from"./preload-helper-ckxxtgMM.js";var r=null,i=null,a=null,o=!1,s=typeof process<`u`&&process.versions?.node;(async()=>{if(s)try{a=(await n(()=>import(`./util-_DavpSWv.js`),[])).stripVTControlCharacters}catch{}try{r=(await n(()=>import(`./source-DeHaVNLZ.js`),[])).default}catch{}try{i=(await n(()=>import(`./dist-DlypDwtn.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193]))).highlight}catch{}s&&(!r||!i)&&(o||(o=!0,console.warn(`
3
3
  ✨ For enhanced console output with colors and syntax highlighting, install:
4
4
 
5
5
  npm install chalk cli-highlight
@@ -1,2 +1,2 @@
1
- import{En as e,G as t,I as n,Kt as r,Pn as i,cr as a,fr as o,g as s,nn as c,or as l,ot as u,qn as d,rn as f,tn as p,w as ee}from"./index-Bd0WP6Xj.js";import{A as te,M as m,O as ne,p as h,r as g,s as re,w as ie}from"./function_calling-BHFkMa4W.js";import"./chunk_array-CT_rI3GZ.js";function _(e){if(typeof e==`object`&&e){let t={...e};`additionalProperties`in t&&delete t.additionalProperties,`$schema`in t&&delete t.$schema,`strict`in t&&delete t.strict;for(let e in t)e in t&&(Array.isArray(t[e])?t[e]=t[e].map(_):typeof t[e]==`object`&&t[e]!==null&&(t[e]=_(t[e])));return t}return e}function v(e){let{$schema:n,...r}=_(t(e)?ee(e):e);return r}function ae(e){let{$schema:t,...n}=_(e);return n}function y(e,t,n=[]){if(typeof e!=`object`||!e)return;let r=e;if(Array.isArray(r.enum)&&r.enum.some(e=>e===``)){let e=n.length?` at path "${n.join(`.`)}"`:``,r=t?` in tool "${t}"`:``;throw Error(`Invalid enum: empty string not allowed${r}${e}. Gemini API rejects empty strings in enums.`)}if(r.type===`object`&&r.properties&&typeof r.properties==`object`)for(let[e,i]of Object.entries(r.properties))y(i,t,[...n,e]);r.items&&y(r.items,t,[...n,`[]`]);for(let e of[`anyOf`,`oneOf`,`allOf`]){let i=r[e];Array.isArray(i)&&i.forEach((r,i)=>y(r,t,[...n,`${e}[${i}]`]))}r.additionalProperties&&typeof r.additionalProperties==`object`&&y(r.additionalProperties,t,[...n,`additionalProperties`])}var b=[];for(let e=0;e<256;++e)b.push((e+256).toString(16).slice(1));function oe(e,t=0){return(b[e[t+0]]+b[e[t+1]]+b[e[t+2]]+b[e[t+3]]+`-`+b[e[t+4]]+b[e[t+5]]+`-`+b[e[t+6]]+b[e[t+7]]+`-`+b[e[t+8]]+b[e[t+9]]+`-`+b[e[t+10]]+b[e[t+11]]+b[e[t+12]]+b[e[t+13]]+b[e[t+14]]+b[e[t+15]]).toLowerCase()}var x,se=new Uint8Array(16);function ce(){if(!x){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);x=crypto.getRandomValues.bind(crypto)}return x(se)}var S={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function C(e,t,n){if(S.randomUUID&&!t&&!e)return S.randomUUID();e||={};let r=e.random??e.rng?.()??ce();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return oe(r)}var w=`__gemini_function_call_thought_signatures__`,le=`ErYCCrMCAdHtim9kOoOkrPiCNVsmlpMIKd7ZMxgiFbVQOkgp7nlLcDMzVsZwIzvuT7nQROivoXA72ccC2lSDvR0Gh7dkWaGuj7ctv6t7ZceHnecx0QYa+ix8tYpRfjhyWozQ49lWiws6+YGjCt10KRTyWsZ2h6O7iHTYJwKIRwGUHRKy/qK/6kFxJm5ML00gLq4D8s5Z6DBpp2ZlR+uF4G8jJgeWQgyHWVdx2wGYElaceVAc66tZdPQRdOHpWtgYSI1YdaXgVI8KHY3/EfNc2YqqMIulvkDBAnuMhkAjV9xmBa54Tq+ih3Im4+r3DzqhGqYdsSkhS0kZMwte4Hjs65dZzCw9lANxIqYi1DJ639WNPYihp/DCJCos7o+/EeSPJaio5sgWDyUnMGkY1atsJZ+m7pj7DD5tvQ==`,ue=e=>e();function de(t){return e.isInstance(t)?t.role:t.type}function fe(e){switch(e){case`supervisor`:case`ai`:case`model`:return`model`;case`system`:return`system`;case`human`:return`user`;case`tool`:case`function`:return`function`;default:throw Error(`Unknown / unsupported author: ${e}`)}}function pe(e){if(`mimeType`in e&&`data`in e)return{inlineData:{mimeType:e.mimeType,data:e.data}};if(`mimeType`in e&&`fileUri`in e)return{fileData:{mimeType:e.mimeType,fileUri:e.fileUri}};throw Error(`Invalid media content`)}function me(e,t){return t.map(e=>f(e)?e.tool_calls??[]:[]).flat().find(t=>t.id===e.tool_call_id)?.name}function he(e){return{providerName:`Google Gemini`,fromStandardTextBlock(e){return{text:e.text}},fromStandardImageBlock(t){if(!e)throw Error(`This model does not support images`);if(t.source_type===`url`){let e=o({dataUrl:t.url});return e?{inlineData:{mimeType:e.mime_type,data:e.data}}:{fileData:{mimeType:t.mime_type??``,fileUri:t.url}}}if(t.source_type===`base64`)return{inlineData:{mimeType:t.mime_type??``,data:t.data}};throw Error(`Unsupported source type: ${t.source_type}`)},fromStandardAudioBlock(t){if(!e)throw Error(`This model does not support audio`);if(t.source_type===`url`){let e=o({dataUrl:t.url});return e?{inlineData:{mimeType:e.mime_type,data:e.data}}:{fileData:{mimeType:t.mime_type??``,fileUri:t.url}}}if(t.source_type===`base64`)return{inlineData:{mimeType:t.mime_type??``,data:t.data}};throw Error(`Unsupported source type: ${t.source_type}`)},fromStandardFileBlock(t){if(!e)throw Error(`This model does not support files`);if(t.source_type===`text`)return{text:t.text};if(t.source_type===`url`){let e=o({dataUrl:t.url});return e?{inlineData:{mimeType:e.mime_type,data:e.data}}:{fileData:{mimeType:t.mime_type??``,fileUri:t.url}}}if(t.source_type===`base64`)return{inlineData:{mimeType:t.mime_type??``,data:t.data}};throw Error(`Unsupported source type: ${t.source_type}`)}}}function T(e,t){if(a(e))return l(e,he(t));if(e.type===`text`)return{text:e.text};if(e.type===`executableCode`)return{executableCode:e.executableCode};if(e.type===`codeExecutionResult`)return{codeExecutionResult:e.codeExecutionResult};if(e.type===`image_url`){if(!t)throw Error(`This model does not support images`);let n;if(typeof e.image_url==`string`)n=e.image_url;else if(typeof e.image_url==`object`&&`url`in e.image_url)n=e.image_url.url;else throw Error(`Please provide image as base64 encoded data URL`);let[r,i]=n.split(`,`);if(!r.startsWith(`data:`))throw Error(`Please provide image as base64 encoded data URL`);let[a,o]=r.replace(/^data:/,``).split(`;`);if(o!==`base64`)throw Error(`Please provide image as base64 encoded data URL`);return{inlineData:{data:i,mimeType:a}}}else if(e.type===`media`)return pe(e);else if(e.type===`tool_use`)return{functionCall:{name:e.name,args:e.input}};else if(e.type===`tool_call`)return{functionCall:{name:e.name,args:e.args}};else if(e.type?.includes(`/`)&&e.type.split(`/`).length===2&&`data`in e&&typeof e.data==`string`)return{inlineData:{mimeType:e.type,data:e.data}};else if(`functionCall`in e)return;else if(`type`in e)throw Error(`Unknown content type ${e.type}`);else throw Error(`Unknown content ${JSON.stringify(e)}`)}function ge(e,t,n,r){if(i(e)){let r=e.name??me(e,n);if(r===void 0)throw Error(`Google requires a tool name for each tool call response, and we could not infer a called tool name for ToolMessage "${e.id}" from your passed messages. Please populate a "name" field on that ToolMessage explicitly.`);let i=Array.isArray(e.content)?e.content.map(e=>T(e,t)).filter(e=>e!==void 0):e.content;return e.status===`error`?[{functionResponse:{name:r,response:{error:{details:i}}}}]:[{functionResponse:{name:r,response:{result:i}}}]}let a=[],o=[];typeof e.content==`string`&&e.content&&o.push({text:e.content}),Array.isArray(e.content)&&o.push(...e.content.map(e=>T(e,t)).filter(e=>e!==void 0));let s=e.additional_kwargs?.[w];return f(e)&&e.tool_calls?.length&&(a=e.tool_calls.map(e=>{let t=ue(()=>{if(e.id){let t=s?.[e.id];if(t)return t}return r?.includes(`gemini-3`)?le:``});return{functionCall:{name:e.name,args:e.args},...t?{thoughtSignature:t}:{}}})),[...o,...a]}function E(e,t,n=!1,r){return e.reduce((i,a,o)=>{if(!d(a))throw Error(`Unsupported message input`);let s=de(a);if(s===`system`&&o!==0)throw Error(`System message should be the first one`);let c=fe(s),l=i.content[i.content.length];if(!i.mergeWithPreviousContent&&l&&l.role===c)throw Error(`Google Generative AI requires alternate messages between authors`);let u=ge(a,t,e.slice(0,o),r);if(i.mergeWithPreviousContent){let e=i.content[i.content.length-1];if(!e)throw Error(`There was a problem parsing your system message. Please try a prompt without one.`);return e.parts.push(...u),{mergeWithPreviousContent:!1,content:i.content}}let f=c;(f===`function`||f===`system`&&!n)&&(f=`user`);let p={role:f,parts:u};return{mergeWithPreviousContent:s===`system`&&!n,content:[...i.content,p]}},{content:[],mergeWithPreviousContent:!1}).content}function _e(e,t){if(!e.candidates||e.candidates.length===0||!e.candidates[0])return{generations:[],llmOutput:{filters:e.promptFeedback}};let[n]=e.candidates,{content:r,...i}=n,a=r.parts?.reduce((e,t)=>(`functionCall`in t&&t.functionCall&&e.push({...t,id:`id`in t.functionCall&&typeof t.functionCall.id==`string`?t.functionCall.id:C()}),e),[]),o,s=r?.parts;o=Array.isArray(s)&&s.length===1&&`text`in s[0]&&s[0].text&&!s[0].thought?s[0].text:Array.isArray(s)&&s.length>0?s.map(e=>e.thought&&`text`in e&&e.text?{type:`thinking`,thinking:e.text,...e.thoughtSignature?{signature:e.thoughtSignature}:{}}:`text`in e?{type:`text`,text:e.text}:`inlineData`in e?{type:`inlineData`,inlineData:e.inlineData}:`functionCall`in e?{type:`functionCall`,functionCall:e.functionCall}:`functionResponse`in e?{type:`functionResponse`,functionResponse:e.functionResponse}:`fileData`in e?{type:`fileData`,fileData:e.fileData}:`executableCode`in e?{type:`executableCode`,executableCode:e.executableCode}:`codeExecutionResult`in e?{type:`codeExecutionResult`,codeExecutionResult:e.codeExecutionResult}:e):[];let c=a?.reduce((e,t)=>(`thoughtSignature`in t&&typeof t.thoughtSignature==`string`&&(e[t.id]=t.thoughtSignature),e),{}),l=``;return typeof o==`string`?l=o:Array.isArray(o)&&o.length>0&&(l=o.find(e=>`text`in e)?.text??l),{generations:[{text:l,message:new p({content:o??``,tool_calls:a?.map(e=>({type:`tool_call`,id:e.id,name:e.functionCall.name,args:e.functionCall.args})),additional_kwargs:{...i,[w]:c},usage_metadata:t?.usageMetadata}),generationInfo:i}],llmOutput:{tokenUsage:{promptTokens:t?.usageMetadata?.input_tokens,completionTokens:t?.usageMetadata?.output_tokens,totalTokens:t?.usageMetadata?.total_tokens}}}}function ve(e,t){if(!e.candidates||e.candidates.length===0)return null;let[n]=e.candidates,{content:r,...i}=n,a=r.parts?.reduce((e,t)=>(`functionCall`in t&&t.functionCall&&e.push({...t,id:`id`in t.functionCall&&typeof t.functionCall.id==`string`?t.functionCall.id:C()}),e),[]),o,s=r?.parts;o=Array.isArray(s)&&s.every(e=>`text`in e&&!e.thought)?s.map(e=>e.text).join(``):Array.isArray(s)?s.map(e=>e.thought&&`text`in e&&e.text?{type:`thinking`,thinking:e.text,...e.thoughtSignature?{signature:e.thoughtSignature}:{}}:`text`in e?{type:`text`,text:e.text}:`inlineData`in e?{type:`inlineData`,inlineData:e.inlineData}:`functionCall`in e?{type:`functionCall`,functionCall:e.functionCall}:`functionResponse`in e?{type:`functionResponse`,functionResponse:e.functionResponse}:`fileData`in e?{type:`fileData`,fileData:e.fileData}:`executableCode`in e?{type:`executableCode`,executableCode:e.executableCode}:`codeExecutionResult`in e?{type:`codeExecutionResult`,codeExecutionResult:e.codeExecutionResult}:e):[];let l=``;o&&typeof o==`string`?l=o:Array.isArray(o)&&(l=o.find(e=>`text`in e)?.text??``);let d=[];a&&d.push(...a.map(e=>({type:`tool_call_chunk`,id:e.id,name:e.functionCall.name,args:JSON.stringify(e.functionCall.args)})));let f=a?.reduce((e,t)=>(`thoughtSignature`in t&&typeof t.thoughtSignature==`string`&&(e[t.id]=t.thoughtSignature),e),{});return new u({text:l,message:new c({content:o||``,name:r?r.role:void 0,tool_call_chunks:d,additional_kwargs:{[w]:f},response_metadata:{model_provider:`google-genai`},usage_metadata:t.usageMetadata}),generationInfo:i})}function ye(e){return e.every(e=>`functionDeclarations`in e&&Array.isArray(e.functionDeclarations))?e:[{functionDeclarations:e.map(e=>{if(g(e)){let t=v(e.schema);return t.type===`object`&&`properties`in t&&Object.keys(t.properties).length===0?{name:e.name,description:e.description}:(y(t,e.name),{name:e.name,description:e.description,parameters:t})}if(h(e)){let t=ae(e.function.parameters);return y(t,e.function.name),{name:e.function.name,description:e.function.description??`A function available to call.`,parameters:t}}return e})}]}function D(e,t){let n={input_tokens:e?.promptTokenCount??0,output_tokens:e?.candidatesTokenCount??0,total_tokens:e?.totalTokenCount??0};if(e?.cachedContentTokenCount&&(n.input_token_details??={},n.input_token_details.cache_read=e.cachedContentTokenCount),t===`gemini-3-pro-preview`){let t=Math.max(0,e?.promptTokenCount??-2e5),r=Math.max(0,e?.cachedContentTokenCount??-2e5);t&&(n.input_token_details={...n.input_token_details,over_200k:t}),r&&(n.input_token_details={...n.input_token_details,cache_read_over_200k:r})}return n}var O=class extends ne{static lc_name(){return`GoogleGenerativeAIToolsOutputParser`}lc_namespace=[`langchain`,`google_genai`,`output_parsers`];returnId=!1;keyName;returnSingle=!1;zodSchema;constructor(e){super(e),this.keyName=e.keyName,this.returnSingle=e.returnSingle??this.returnSingle,this.zodSchema=e.zodSchema}async _validateResult(e){if(this.zodSchema===void 0)return e;let t=await n(this.zodSchema,e);if(t.success)return t.data;throw new te(`Failed to parse. Text: "${JSON.stringify(e,null,2)}". Error: ${JSON.stringify(t.error.issues)}`,JSON.stringify(e,null,2))}async parseResult(e){let t=e.flatMap(e=>{let{message:t}=e;return!(`tool_calls`in t)||!Array.isArray(t.tool_calls)?[]:t.tool_calls});if(t[0]===void 0)throw Error(`No parseable tool calls provided to GoogleGenerativeAIToolsOutputParser.`);let[n]=t;return await this._validateResult(n.args)}},be;(function(e){e.STRING=`string`,e.NUMBER=`number`,e.INTEGER=`integer`,e.BOOLEAN=`boolean`,e.ARRAY=`array`,e.OBJECT=`object`})(be||={});var xe;(function(e){e.LANGUAGE_UNSPECIFIED=`language_unspecified`,e.PYTHON=`python`})(xe||={});var Se;(function(e){e.OUTCOME_UNSPECIFIED=`outcome_unspecified`,e.OUTCOME_OK=`outcome_ok`,e.OUTCOME_FAILED=`outcome_failed`,e.OUTCOME_DEADLINE_EXCEEDED=`outcome_deadline_exceeded`})(Se||={});var k=[`user`,`model`,`function`,`system`],Ce;(function(e){e.HARM_CATEGORY_UNSPECIFIED=`HARM_CATEGORY_UNSPECIFIED`,e.HARM_CATEGORY_HATE_SPEECH=`HARM_CATEGORY_HATE_SPEECH`,e.HARM_CATEGORY_SEXUALLY_EXPLICIT=`HARM_CATEGORY_SEXUALLY_EXPLICIT`,e.HARM_CATEGORY_HARASSMENT=`HARM_CATEGORY_HARASSMENT`,e.HARM_CATEGORY_DANGEROUS_CONTENT=`HARM_CATEGORY_DANGEROUS_CONTENT`,e.HARM_CATEGORY_CIVIC_INTEGRITY=`HARM_CATEGORY_CIVIC_INTEGRITY`})(Ce||={});var we;(function(e){e.HARM_BLOCK_THRESHOLD_UNSPECIFIED=`HARM_BLOCK_THRESHOLD_UNSPECIFIED`,e.BLOCK_LOW_AND_ABOVE=`BLOCK_LOW_AND_ABOVE`,e.BLOCK_MEDIUM_AND_ABOVE=`BLOCK_MEDIUM_AND_ABOVE`,e.BLOCK_ONLY_HIGH=`BLOCK_ONLY_HIGH`,e.BLOCK_NONE=`BLOCK_NONE`})(we||={});var Te;(function(e){e.HARM_PROBABILITY_UNSPECIFIED=`HARM_PROBABILITY_UNSPECIFIED`,e.NEGLIGIBLE=`NEGLIGIBLE`,e.LOW=`LOW`,e.MEDIUM=`MEDIUM`,e.HIGH=`HIGH`})(Te||={});var Ee;(function(e){e.BLOCKED_REASON_UNSPECIFIED=`BLOCKED_REASON_UNSPECIFIED`,e.SAFETY=`SAFETY`,e.OTHER=`OTHER`})(Ee||={});var A;(function(e){e.FINISH_REASON_UNSPECIFIED=`FINISH_REASON_UNSPECIFIED`,e.STOP=`STOP`,e.MAX_TOKENS=`MAX_TOKENS`,e.SAFETY=`SAFETY`,e.RECITATION=`RECITATION`,e.LANGUAGE=`LANGUAGE`,e.BLOCKLIST=`BLOCKLIST`,e.PROHIBITED_CONTENT=`PROHIBITED_CONTENT`,e.SPII=`SPII`,e.MALFORMED_FUNCTION_CALL=`MALFORMED_FUNCTION_CALL`,e.OTHER=`OTHER`})(A||={});var De;(function(e){e.TASK_TYPE_UNSPECIFIED=`TASK_TYPE_UNSPECIFIED`,e.RETRIEVAL_QUERY=`RETRIEVAL_QUERY`,e.RETRIEVAL_DOCUMENT=`RETRIEVAL_DOCUMENT`,e.SEMANTIC_SIMILARITY=`SEMANTIC_SIMILARITY`,e.CLASSIFICATION=`CLASSIFICATION`,e.CLUSTERING=`CLUSTERING`})(De||={});var j;(function(e){e.MODE_UNSPECIFIED=`MODE_UNSPECIFIED`,e.AUTO=`AUTO`,e.ANY=`ANY`,e.NONE=`NONE`})(j||={});var Oe;(function(e){e.MODE_UNSPECIFIED=`MODE_UNSPECIFIED`,e.MODE_DYNAMIC=`MODE_DYNAMIC`})(Oe||={});var M=class extends Error{constructor(e){super(`[GoogleGenerativeAI Error]: ${e}`)}},N=class extends M{constructor(e,t){super(e),this.response=t}},P=class extends M{constructor(e,t,n,r){super(e),this.status=t,this.statusText=n,this.errorDetails=r}},F=class extends M{},I=class extends M{},ke=`https://generativelanguage.googleapis.com`,Ae=`v1beta`,je=`0.24.1`,Me=`genai-js`,L;(function(e){e.GENERATE_CONTENT=`generateContent`,e.STREAM_GENERATE_CONTENT=`streamGenerateContent`,e.COUNT_TOKENS=`countTokens`,e.EMBED_CONTENT=`embedContent`,e.BATCH_EMBED_CONTENTS=`batchEmbedContents`})(L||={});var Ne=class{constructor(e,t,n,r,i){this.model=e,this.task=t,this.apiKey=n,this.stream=r,this.requestOptions=i}toString(){let e=this.requestOptions?.apiVersion||Ae,t=`${this.requestOptions?.baseUrl||ke}/${e}/${this.model}:${this.task}`;return this.stream&&(t+=`?alt=sse`),t}};function Pe(e){let t=[];return e?.apiClient&&t.push(e.apiClient),t.push(`${Me}/${je}`),t.join(` `)}async function Fe(e){let t=new Headers;t.append(`Content-Type`,`application/json`),t.append(`x-goog-api-client`,Pe(e.requestOptions)),t.append(`x-goog-api-key`,e.apiKey);let n=e.requestOptions?.customHeaders;if(n){if(!(n instanceof Headers))try{n=new Headers(n)}catch(e){throw new F(`unable to convert customHeaders value ${JSON.stringify(n)} to Headers: ${e.message}`)}for(let[e,r]of n.entries()){if(e===`x-goog-api-key`)throw new F(`Cannot set reserved header name ${e}`);if(e===`x-goog-api-client`)throw new F(`Header name ${e} can only be set using the apiClient field`);t.append(e,r)}}return t}async function Ie(e,t,n,r,i,a){let o=new Ne(e,t,n,r,a);return{url:o.toString(),fetchOptions:Object.assign(Object.assign({},Be(a)),{method:`POST`,headers:await Fe(o),body:i})}}async function R(e,t,n,r,i,a={},o=fetch){let{url:s,fetchOptions:c}=await Ie(e,t,n,r,i,a);return Le(s,c,o)}async function Le(e,t,n=fetch){let r;try{r=await n(e,t)}catch(t){Re(t,e)}return r.ok||await ze(r,e),r}function Re(e,t){let n=e;throw n.name===`AbortError`?(n=new I(`Request aborted when fetching ${t.toString()}: ${e.message}`),n.stack=e.stack):e instanceof P||e instanceof F||(n=new M(`Error fetching from ${t.toString()}: ${e.message}`),n.stack=e.stack),n}async function ze(e,t){let n=``,r;try{let t=await e.json();n=t.error.message,t.error.details&&(n+=` ${JSON.stringify(t.error.details)}`,r=t.error.details)}catch{}throw new P(`Error fetching from ${t.toString()}: [${e.status} ${e.statusText}] ${n}`,e.status,e.statusText,r)}function Be(e){let t={};if(e?.signal!==void 0||e?.timeout>=0){let n=new AbortController;e?.timeout>=0&&setTimeout(()=>n.abort(),e.timeout),e?.signal&&e.signal.addEventListener(`abort`,()=>{n.abort()}),t.signal=n.signal}return t}function z(e){return e.text=()=>{if(e.candidates&&e.candidates.length>0){if(e.candidates.length>1&&console.warn(`This response had ${e.candidates.length} candidates. Returning text from the first candidate only. Access response.candidates directly to use the other candidates.`),V(e.candidates[0]))throw new N(`${H(e)}`,e);return Ve(e)}else if(e.promptFeedback)throw new N(`Text not available. ${H(e)}`,e);return``},e.functionCall=()=>{if(e.candidates&&e.candidates.length>0){if(e.candidates.length>1&&console.warn(`This response had ${e.candidates.length} candidates. Returning function calls from the first candidate only. Access response.candidates directly to use the other candidates.`),V(e.candidates[0]))throw new N(`${H(e)}`,e);return console.warn(`response.functionCall() is deprecated. Use response.functionCalls() instead.`),B(e)[0]}else if(e.promptFeedback)throw new N(`Function call not available. ${H(e)}`,e)},e.functionCalls=()=>{if(e.candidates&&e.candidates.length>0){if(e.candidates.length>1&&console.warn(`This response had ${e.candidates.length} candidates. Returning function calls from the first candidate only. Access response.candidates directly to use the other candidates.`),V(e.candidates[0]))throw new N(`${H(e)}`,e);return B(e)}else if(e.promptFeedback)throw new N(`Function call not available. ${H(e)}`,e)},e}function Ve(e){let t=[];if(e.candidates?.[0].content?.parts)for(let n of e.candidates?.[0].content?.parts)n.text&&t.push(n.text),n.executableCode&&t.push("\n```"+n.executableCode.language+`
2
- `+n.executableCode.code+"\n```\n"),n.codeExecutionResult&&t.push("\n```\n"+n.codeExecutionResult.output+"\n```\n");return t.length>0?t.join(``):``}function B(e){let t=[];if(e.candidates?.[0].content?.parts)for(let n of e.candidates?.[0].content?.parts)n.functionCall&&t.push(n.functionCall);if(t.length>0)return t}var He=[A.RECITATION,A.SAFETY,A.LANGUAGE];function V(e){return!!e.finishReason&&He.includes(e.finishReason)}function H(e){let t=``;if((!e.candidates||e.candidates.length===0)&&e.promptFeedback)t+=`Response was blocked`,e.promptFeedback?.blockReason&&(t+=` due to ${e.promptFeedback.blockReason}`),e.promptFeedback?.blockReasonMessage&&(t+=`: ${e.promptFeedback.blockReasonMessage}`);else if(e.candidates?.[0]){let n=e.candidates[0];V(n)&&(t+=`Candidate was blocked due to ${n.finishReason}`,n.finishMessage&&(t+=`: ${n.finishMessage}`))}return t}function U(e){return this instanceof U?(this.v=e,this):new U(e)}function Ue(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i={},o(`next`),o(`throw`),o(`return`),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{c(r[e](t))}catch(e){d(a[0][3],e)}}function c(e){e.value instanceof U?Promise.resolve(e.value.v).then(l,u):d(a[0][2],e)}function l(e){s(`next`,e)}function u(e){s(`throw`,e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}var W=/^data\: (.*)(?:\n\n|\r\r|\r\n\r\n)/;function We(e){let[t,n]=qe(e.body.pipeThrough(new TextDecoderStream(`utf8`,{fatal:!0}))).tee();return{stream:Ke(t),response:Ge(n)}}async function Ge(e){let t=[],n=e.getReader();for(;;){let{done:e,value:r}=await n.read();if(e)return z(Je(t));t.push(r)}}function Ke(e){return Ue(this,arguments,function*(){let t=e.getReader();for(;;){let{value:e,done:n}=yield U(t.read());if(n)break;yield yield U(z(e))}})}function qe(e){let t=e.getReader();return new ReadableStream({start(e){let n=``;return r();function r(){return t.read().then(({value:t,done:i})=>{if(i){if(n.trim()){e.error(new M(`Failed to parse stream`));return}e.close();return}n+=t;let a=n.match(W),o;for(;a;){try{o=JSON.parse(a[1])}catch{e.error(new M(`Error parsing JSON response: "${a[1]}"`));return}e.enqueue(o),n=n.substring(a[0].length),a=n.match(W)}return r()}).catch(e=>{let t=e;throw t.stack=e.stack,t=t.name===`AbortError`?new I(`Request aborted when reading from the stream`):new M(`Error reading from the stream`),t})}}})}function Je(e){let t={promptFeedback:e[e.length-1]?.promptFeedback};for(let n of e){if(n.candidates){let e=0;for(let r of n.candidates)if(t.candidates||=[],t.candidates[e]||(t.candidates[e]={index:e}),t.candidates[e].citationMetadata=r.citationMetadata,t.candidates[e].groundingMetadata=r.groundingMetadata,t.candidates[e].finishReason=r.finishReason,t.candidates[e].finishMessage=r.finishMessage,t.candidates[e].safetyRatings=r.safetyRatings,r.content&&r.content.parts){t.candidates[e].content||(t.candidates[e].content={role:r.content.role||`user`,parts:[]});let n={};for(let i of r.content.parts)i.text&&(n.text=i.text),i.functionCall&&(n.functionCall=i.functionCall),i.executableCode&&(n.executableCode=i.executableCode),i.codeExecutionResult&&(n.codeExecutionResult=i.codeExecutionResult),Object.keys(n).length===0&&(n.text=``),t.candidates[e].content.parts.push(n)}e++}n.usageMetadata&&(t.usageMetadata=n.usageMetadata)}return t}async function G(e,t,n,r){return We(await R(t,L.STREAM_GENERATE_CONTENT,e,!0,JSON.stringify(n),r))}async function K(e,t,n,r){return{response:z(await(await R(t,L.GENERATE_CONTENT,e,!1,JSON.stringify(n),r)).json())}}function q(e){if(e!=null){if(typeof e==`string`)return{role:`system`,parts:[{text:e}]};if(e.text)return{role:`system`,parts:[e]};if(e.parts)return e.role?e:{role:`system`,parts:e.parts}}}function J(e){let t=[];if(typeof e==`string`)t=[{text:e}];else for(let n of e)typeof n==`string`?t.push({text:n}):t.push(n);return Ye(t)}function Ye(e){let t={role:`user`,parts:[]},n={role:`function`,parts:[]},r=!1,i=!1;for(let a of e)`functionResponse`in a?(n.parts.push(a),i=!0):(t.parts.push(a),r=!0);if(r&&i)throw new M(`Within a single message, FunctionResponse cannot be mixed with other type of part in the request for sending chat message.`);if(!r&&!i)throw new M(`No content is provided for sending chat message.`);return r?t:n}function Xe(e,t){let n={model:t?.model,generationConfig:t?.generationConfig,safetySettings:t?.safetySettings,tools:t?.tools,toolConfig:t?.toolConfig,systemInstruction:t?.systemInstruction,cachedContent:t?.cachedContent?.name,contents:[]},r=e.generateContentRequest!=null;if(e.contents){if(r)throw new F(`CountTokensRequest must have one of contents or generateContentRequest, not both.`);n.contents=e.contents}else if(r)n=Object.assign(Object.assign({},n),e.generateContentRequest);else{let t=J(e);n.contents=[t]}return{generateContentRequest:n}}function Y(e){let t;return t=e.contents?e:{contents:[J(e)]},e.systemInstruction&&(t.systemInstruction=q(e.systemInstruction)),t}function Ze(e){return typeof e==`string`||Array.isArray(e)?{content:J(e)}:e}var X=[`text`,`inlineData`,`functionCall`,`functionResponse`,`executableCode`,`codeExecutionResult`],Qe={user:[`text`,`inlineData`],function:[`functionResponse`],model:[`text`,`functionCall`,`executableCode`,`codeExecutionResult`],system:[`text`]};function $e(e){let t=!1;for(let n of e){let{role:e,parts:r}=n;if(!t&&e!==`user`)throw new M(`First content should be with role 'user', got ${e}`);if(!k.includes(e))throw new M(`Each item should include role field. Got ${e} but valid roles are: ${JSON.stringify(k)}`);if(!Array.isArray(r))throw new M(`Content should have 'parts' property with an array of Parts`);if(r.length===0)throw new M(`Each Content should have at least one part`);let i={text:0,inlineData:0,functionCall:0,functionResponse:0,fileData:0,executableCode:0,codeExecutionResult:0};for(let e of r)for(let t of X)t in e&&(i[t]+=1);let a=Qe[e];for(let t of X)if(!a.includes(t)&&i[t]>0)throw new M(`Content with role '${e}' can't contain '${t}' part`);t=!0}}function Z(e){if(e.candidates===void 0||e.candidates.length===0)return!1;let t=e.candidates[0]?.content;if(t===void 0||t.parts===void 0||t.parts.length===0)return!1;for(let e of t.parts)if(e===void 0||Object.keys(e).length===0||e.text!==void 0&&e.text===``)return!1;return!0}var Q=`SILENT_ERROR`,et=class{constructor(e,t,n,r={}){this.model=t,this.params=n,this._requestOptions=r,this._history=[],this._sendPromise=Promise.resolve(),this._apiKey=e,n?.history&&($e(n.history),this._history=n.history)}async getHistory(){return await this._sendPromise,this._history}async sendMessage(e,t={}){await this._sendPromise;let n=J(e),r={safetySettings:this.params?.safetySettings,generationConfig:this.params?.generationConfig,tools:this.params?.tools,toolConfig:this.params?.toolConfig,systemInstruction:this.params?.systemInstruction,cachedContent:this.params?.cachedContent,contents:[...this._history,n]},i=Object.assign(Object.assign({},this._requestOptions),t),a;return this._sendPromise=this._sendPromise.then(()=>K(this._apiKey,this.model,r,i)).then(e=>{if(Z(e.response)){this._history.push(n);let t=Object.assign({parts:[],role:`model`},e.response.candidates?.[0].content);this._history.push(t)}else{let t=H(e.response);t&&console.warn(`sendMessage() was unsuccessful. ${t}. Inspect response object for details.`)}a=e}).catch(e=>{throw this._sendPromise=Promise.resolve(),e}),await this._sendPromise,a}async sendMessageStream(e,t={}){await this._sendPromise;let n=J(e),r={safetySettings:this.params?.safetySettings,generationConfig:this.params?.generationConfig,tools:this.params?.tools,toolConfig:this.params?.toolConfig,systemInstruction:this.params?.systemInstruction,cachedContent:this.params?.cachedContent,contents:[...this._history,n]},i=Object.assign(Object.assign({},this._requestOptions),t),a=G(this._apiKey,this.model,r,i);return this._sendPromise=this._sendPromise.then(()=>a).catch(e=>{throw Error(Q)}).then(e=>e.response).then(e=>{if(Z(e)){this._history.push(n);let t=Object.assign({},e.candidates[0].content);t.role||=`model`,this._history.push(t)}else{let t=H(e);t&&console.warn(`sendMessageStream() was unsuccessful. ${t}. Inspect response object for details.`)}}).catch(e=>{e.message!==Q&&console.error(e)}),a}};async function tt(e,t,n,r){return(await R(t,L.COUNT_TOKENS,e,!1,JSON.stringify(n),r)).json()}async function nt(e,t,n,r){return(await R(t,L.EMBED_CONTENT,e,!1,JSON.stringify(n),r)).json()}async function rt(e,t,n,r){let i=n.requests.map(e=>Object.assign(Object.assign({},e),{model:t}));return(await R(t,L.BATCH_EMBED_CONTENTS,e,!1,JSON.stringify({requests:i}),r)).json()}var $=class{constructor(e,t,n={}){this.apiKey=e,this._requestOptions=n,t.model.includes(`/`)?this.model=t.model:this.model=`models/${t.model}`,this.generationConfig=t.generationConfig||{},this.safetySettings=t.safetySettings||[],this.tools=t.tools,this.toolConfig=t.toolConfig,this.systemInstruction=q(t.systemInstruction),this.cachedContent=t.cachedContent}async generateContent(e,t={}){let n=Y(e),r=Object.assign(Object.assign({},this._requestOptions),t);return K(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent?.name},n),r)}async generateContentStream(e,t={}){let n=Y(e),r=Object.assign(Object.assign({},this._requestOptions),t);return G(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent?.name},n),r)}startChat(e){return new et(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent?.name},e),this._requestOptions)}async countTokens(e,t={}){let n=Xe(e,{model:this.model,generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent}),r=Object.assign(Object.assign({},this._requestOptions),t);return tt(this.apiKey,this.model,n,r)}async embedContent(e,t={}){let n=Ze(e),r=Object.assign(Object.assign({},this._requestOptions),t);return nt(this.apiKey,this.model,n,r)}async batchEmbedContents(e,t={}){let n=Object.assign(Object.assign({},this._requestOptions),t);return rt(this.apiKey,this.model,e,n)}},it=class{constructor(e){this.apiKey=e}getGenerativeModel(e,t){if(!e.model)throw new M(`Must provide a model name. Example: genai.getGenerativeModel({ model: 'my-model-name' })`);return new $(this.apiKey,e,t)}getGenerativeModelFromCachedContent(e,t,n){if(!e.name)throw new F("Cached content must contain a `name` field.");if(!e.model)throw new F("Cached content must contain a `model` field.");for(let n of[`model`,`systemInstruction`])if(t?.[n]&&e[n]&&t?.[n]!==e[n]){if(n===`model`&&(t.model.startsWith(`models/`)?t.model.replace(`models/`,``):t.model)===(e.model.startsWith(`models/`)?e.model.replace(`models/`,``):e.model))continue;throw new F(`Different value for "${n}" specified in modelParams (${t[n]}) and cachedContent (${e[n]})`)}let r=Object.assign(Object.assign({},t),{model:e.model,tools:e.tools,toolConfig:e.toolConfig,systemInstruction:e.systemInstruction,cachedContent:e});return new $(this.apiKey,r,n)}};function at(e,t){let n=ot(e);return{tools:n,toolConfig:ct(n,t)}}function ot(e){let t=[],n=[];return e.forEach(e=>{if(g(e)){let[n]=ye([e]);n.functionDeclarations&&t.push(...n.functionDeclarations)}else if(h(e)){let{functionDeclarations:n}=st(e);if(n)t.push(...n);else throw Error(`Failed to convert OpenAI structured tool to GenerativeAI tool`)}else n.push(e)}),n.find(e=>`functionDeclarations`in e)?n.map(e=>{if(t?.length>0&&`functionDeclarations`in e){let n={functionDeclarations:[...e.functionDeclarations||[],...t]};return t=[],n}return e}):[...n,...t.length>0?[{functionDeclarations:t}]:[]]}function st(e){return{functionDeclarations:[{name:e.function.name,description:e.function.description,parameters:_(e.function.parameters)}]}}function ct(e,t){if(!e.length||!t)return;let{toolChoice:n,allowedFunctionNames:r}=t,i={any:j.ANY,auto:j.AUTO,none:j.NONE};if(n&&[`any`,`auto`,`none`].includes(n))return{functionCallingConfig:{mode:i[n]??`MODE_UNSPECIFIED`,allowedFunctionNames:r}};if(typeof n==`string`||r)return{functionCallingConfig:{mode:j.ANY,allowedFunctionNames:[...r??[],...n&&typeof n==`string`?[n]:[]]}}}var lt={"gemini-embedding-001":{maxInputTokens:2048,imageInputs:!1,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:3072,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-2.5-flash-lite-preview-09-2025":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-pro-preview-06-05":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-preview-04-17":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-2.5-flash-preview-09-2025":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-pro-preview-05-06":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-preview-05-20":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-live-2.5-flash":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-3-flash-preview":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-live-2.5-flash-preview-native-audio":{maxInputTokens:131072,imageInputs:!1,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-2.5-flash-lite":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-preview-tts":{maxInputTokens:8e3,imageInputs:!1,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:16e3,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-flash-latest":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-lite-preview-06-17":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-2.5-flash-image":{maxInputTokens:32768,imageInputs:!0,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:32768,reasoningOutput:!0,imageOutputs:!0,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-2.5-pro-preview-tts":{maxInputTokens:8e3,imageInputs:!1,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:16e3,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-2.5-flash-image-preview":{maxInputTokens:32768,imageInputs:!0,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:32768,reasoningOutput:!0,imageOutputs:!0,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-1.5-flash-8b":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-3-pro-preview":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.0-flash-lite":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-1.5-flash":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-flash-lite-latest":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-pro":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.0-flash":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-1.5-pro":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1}},ut=class extends re{static lc_name(){return`ChatGoogleGenerativeAI`}lc_serializable=!0;get lc_secrets(){return{apiKey:`GOOGLE_API_KEY`}}lc_namespace=[`langchain`,`chat_models`,`google_genai`];get lc_aliases(){return{apiKey:`google_api_key`}}model;temperature;maxOutputTokens;topP;topK;stopSequences=[];safetySettings;apiKey;streaming=!1;json;streamUsage=!0;convertSystemMessageToHumanContent;thinkingConfig;client;get _isMultimodalModel(){return this.model.includes(`vision`)||this.model.startsWith(`gemini-1.5`)||this.model.startsWith(`gemini-2`)||this.model.startsWith(`gemma-3-`)&&!this.model.startsWith(`gemma-3-1b`)||this.model.startsWith(`gemini-3`)}constructor(e){if(super(e),this.model=e.model.replace(/^models\//,``),this.maxOutputTokens=e.maxOutputTokens??this.maxOutputTokens,this.maxOutputTokens&&this.maxOutputTokens<0)throw Error("`maxOutputTokens` must be a positive integer");if(this.temperature=e.temperature??this.temperature,this.temperature&&(this.temperature<0||this.temperature>2))throw Error("`temperature` must be in the range of [0.0,2.0]");if(this.topP=e.topP??this.topP,this.topP&&this.topP<0)throw Error("`topP` must be a positive integer");if(this.topP&&this.topP>1)throw Error("`topP` must be below 1.");if(this.topK=e.topK??this.topK,this.topK&&this.topK<0)throw Error("`topK` must be a positive integer");if(this.stopSequences=e.stopSequences??this.stopSequences,this.apiKey=e.apiKey??r(`GOOGLE_API_KEY`),!this.apiKey)throw Error("Please set an API key for Google GenerativeAI in the environment variable GOOGLE_API_KEY or in the `apiKey` field of the ChatGoogleGenerativeAI constructor");if(this.safetySettings=e.safetySettings??this.safetySettings,this.safetySettings&&this.safetySettings.length>0&&new Set(this.safetySettings.map(e=>e.category)).size!==this.safetySettings.length)throw Error("The categories in `safetySettings` array must be unique");this.streaming=e.streaming??this.streaming,this.json=e.json,this.thinkingConfig=e.thinkingConfig??this.thinkingConfig,this.client=new it(this.apiKey).getGenerativeModel({model:this.model,safetySettings:this.safetySettings,generationConfig:{stopSequences:this.stopSequences,maxOutputTokens:this.maxOutputTokens,temperature:this.temperature,topP:this.topP,topK:this.topK,...this.json?{responseMimeType:`application/json`}:{},...this.thinkingConfig?{thinkingConfig:this.thinkingConfig}:{}}},{apiVersion:e.apiVersion,baseUrl:e.baseUrl,customHeaders:e.customHeaders}),this.streamUsage=e.streamUsage??this.streamUsage}useCachedContent(e,t,n){this.apiKey&&(this.client=new it(this.apiKey).getGenerativeModelFromCachedContent(e,t,n))}get useSystemInstruction(){return typeof this.convertSystemMessageToHumanContent==`boolean`?!this.convertSystemMessageToHumanContent:this.computeUseSystemInstruction}get computeUseSystemInstruction(){return this.model===`gemini-1.0-pro-001`||this.model.startsWith(`gemini-pro-vision`)||this.model.startsWith(`gemini-1.0-pro-vision`)?!1:this.model!==`gemini-pro`}getLsParams(e){return{ls_provider:`google_genai`,ls_model_name:this.model,ls_model_type:`chat`,ls_temperature:this.client.generationConfig.temperature,ls_max_tokens:this.client.generationConfig.maxOutputTokens,ls_stop:e.stop}}_combineLLMOutput(){return[]}_llmType(){return`googlegenerativeai`}bindTools(e,t){return this.withConfig({tools:at(e)?.tools,...t})}invocationParams(e){let t=e?.tools?.length?at(e.tools,{toolChoice:e.tool_choice,allowedFunctionNames:e.allowedFunctionNames}):void 0;return e?.responseSchema?(this.client.generationConfig.responseSchema=e.responseSchema,this.client.generationConfig.responseMimeType=`application/json`):(this.client.generationConfig.responseSchema=void 0,this.client.generationConfig.responseMimeType=this.json?`application/json`:void 0),{...t?.tools?{tools:t.tools}:{},...t?.toolConfig?{toolConfig:t.toolConfig}:{}}}async _generate(e,t,n){t.signal?.throwIfAborted();let r=E(e,this._isMultimodalModel,this.useSystemInstruction,this.model),i=r;if(r[0].role===`system`){let[e]=r;this.client.systemInstruction=e,i=r.slice(1)}let a=this.invocationParams(t);if(this.streaming){let r={},i=this._streamResponseChunks(e,t,n),a=[];for await(let e of i){let t=e.generationInfo?.completion??0;a[t]===void 0?a[t]=e:a[t]=a[t].concat(e)}return{generations:a.filter(e=>e!==void 0),llmOutput:{estimatedTokenUsage:r}}}let o=await this.completionWithRetry({...a,contents:i}),s;`usageMetadata`in o.response&&(s=D(o.response.usageMetadata,this.model));let c=_e(o.response,{usageMetadata:s});return c.generations?.length>0&&await n?.handleLLMNewToken(c.generations[0]?.text??``),c}async*_streamResponseChunks(e,t,n){let r=E(e,this._isMultimodalModel,this.useSystemInstruction,this.model),i=r;if(r[0].role===`system`){let[e]=r;this.client.systemInstruction=e,i=r.slice(1)}let a={...this.invocationParams(t),contents:i},o=await this.caller.callWithOptions({signal:t?.signal},async()=>{let{stream:e}=await this.client.generateContentStream(a,{signal:t?.signal});return e}),s,c=0,l=0,u=0,d=0;for await(let e of o){if(t.signal?.aborted)return;if(`usageMetadata`in e&&e.usageMetadata!==void 0&&this.streamUsage!==!1&&t.streamUsage!==!1){s=D(e.usageMetadata,this.model);let t=e.usageMetadata.promptTokenCount??0;s.input_tokens=Math.max(0,t-c),c=t;let n=e.usageMetadata.candidatesTokenCount??0;s.output_tokens=Math.max(0,n-l),l=n;let r=e.usageMetadata.totalTokenCount??0;s.total_tokens=Math.max(0,r-u),u=r}let r=ve(e,{usageMetadata:s,index:d});d+=1,r&&(yield r,await n?.handleLLMNewToken(r.text??``))}}async completionWithRetry(e,t){return this.caller.callWithOptions({signal:t?.signal},async()=>{try{return await this.client.generateContent(e,{signal:t?.signal})}catch(e){throw e.message?.includes(`400 Bad Request`)&&(e.status=400),e}})}get profile(){return lt[this.model]??{}}withStructuredOutput(e,n){let r=e,i=n?.name,a=n?.method,o=n?.includeRaw;if(a===`jsonMode`)throw Error(`ChatGoogleGenerativeAI only supports "jsonSchema" or "functionCalling" as a method.`);let c,l;if(a===`functionCalling`){let e=i??`extract`,n;if(t(r)){let t=v(r);n=[{functionDeclarations:[{name:e,description:t.description??`A function available to call.`,parameters:t}]}],l=new O({returnSingle:!0,keyName:e,zodSchema:r})}else{let t;typeof r.name==`string`&&typeof r.parameters==`object`&&r.parameters!=null?(t=r,t.parameters=_(r.parameters),e=r.name):t={name:e,description:r.description??``,parameters:_(r)},n=[{functionDeclarations:[t]}],l=new O({returnSingle:!0,keyName:e})}c=this.bindTools(n).withConfig({allowedFunctionNames:[e]})}else{let e=v(r);c=this.withConfig({responseSchema:e}),l=new ie}if(!o)return c.pipe(l).withConfig({runName:`ChatGoogleGenerativeAIStructuredOutput`});let u=m.assign({parsed:(e,t)=>l.invoke(e.raw,t)}),d=m.assign({parsed:()=>null}),f=u.withFallbacks({fallbacks:[d]});return s.from([{raw:c},f]).withConfig({runName:`StructuredOutputRunnable`})}};export{ut as ChatGoogleGenerativeAI};
1
+ import{Cn as e,Fn as t,Ln as n,Nn as r,P as i,Qt as a,S as o,U as s,Wt as c,Xt as l,Zt as u,it as d,m as f,mn as p,yn as ee}from"./messages-D4_mH1tk.js";import{A as te,M as m,O as ne,p as h,r as g,s as re,w as ie}from"./function_calling-kK7um7Ye.js";import"./chunk_array-Bw1lTtex.js";function _(e){if(typeof e==`object`&&e){let t={...e};`additionalProperties`in t&&delete t.additionalProperties,`$schema`in t&&delete t.$schema,`strict`in t&&delete t.strict;for(let e in t)e in t&&(Array.isArray(t[e])?t[e]=t[e].map(_):typeof t[e]==`object`&&t[e]!==null&&(t[e]=_(t[e])));return t}return e}function v(e){let{$schema:t,...n}=_(s(e)?o(e):e);return n}function ae(e){let{$schema:t,...n}=_(e);return n}function y(e,t,n=[]){if(typeof e!=`object`||!e)return;let r=e;if(Array.isArray(r.enum)&&r.enum.some(e=>e===``)){let e=n.length?` at path "${n.join(`.`)}"`:``,r=t?` in tool "${t}"`:``;throw Error(`Invalid enum: empty string not allowed${r}${e}. Gemini API rejects empty strings in enums.`)}if(r.type===`object`&&r.properties&&typeof r.properties==`object`)for(let[e,i]of Object.entries(r.properties))y(i,t,[...n,e]);r.items&&y(r.items,t,[...n,`[]`]);for(let e of[`anyOf`,`oneOf`,`allOf`]){let i=r[e];Array.isArray(i)&&i.forEach((r,i)=>y(r,t,[...n,`${e}[${i}]`]))}r.additionalProperties&&typeof r.additionalProperties==`object`&&y(r.additionalProperties,t,[...n,`additionalProperties`])}var b=[];for(let e=0;e<256;++e)b.push((e+256).toString(16).slice(1));function oe(e,t=0){return(b[e[t+0]]+b[e[t+1]]+b[e[t+2]]+b[e[t+3]]+`-`+b[e[t+4]]+b[e[t+5]]+`-`+b[e[t+6]]+b[e[t+7]]+`-`+b[e[t+8]]+b[e[t+9]]+`-`+b[e[t+10]]+b[e[t+11]]+b[e[t+12]]+b[e[t+13]]+b[e[t+14]]+b[e[t+15]]).toLowerCase()}var x,se=new Uint8Array(16);function ce(){if(!x){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);x=crypto.getRandomValues.bind(crypto)}return x(se)}var S={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function C(e,t,n){if(S.randomUUID&&!t&&!e)return S.randomUUID();e||={};let r=e.random??e.rng?.()??ce();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return oe(r)}var w=`__gemini_function_call_thought_signatures__`,le=`ErYCCrMCAdHtim9kOoOkrPiCNVsmlpMIKd7ZMxgiFbVQOkgp7nlLcDMzVsZwIzvuT7nQROivoXA72ccC2lSDvR0Gh7dkWaGuj7ctv6t7ZceHnecx0QYa+ix8tYpRfjhyWozQ49lWiws6+YGjCt10KRTyWsZ2h6O7iHTYJwKIRwGUHRKy/qK/6kFxJm5ML00gLq4D8s5Z6DBpp2ZlR+uF4G8jJgeWQgyHWVdx2wGYElaceVAc66tZdPQRdOHpWtgYSI1YdaXgVI8KHY3/EfNc2YqqMIulvkDBAnuMhkAjV9xmBa54Tq+ih3Im4+r3DzqhGqYdsSkhS0kZMwte4Hjs65dZzCw9lANxIqYi1DJ639WNPYihp/DCJCos7o+/EeSPJaio5sgWDyUnMGkY1atsJZ+m7pj7DD5tvQ==`,ue=e=>e();function de(e){return p.isInstance(e)?e.role:e.type}function fe(e){switch(e){case`supervisor`:case`ai`:case`model`:return`model`;case`system`:return`system`;case`human`:return`user`;case`tool`:case`function`:return`function`;default:throw Error(`Unknown / unsupported author: ${e}`)}}function pe(e){if(`mimeType`in e&&`data`in e)return{inlineData:{mimeType:e.mimeType,data:e.data}};if(`mimeType`in e&&`fileUri`in e)return{fileData:{mimeType:e.mimeType,fileUri:e.fileUri}};throw Error(`Invalid media content`)}function me(e,t){return t.map(e=>a(e)?e.tool_calls??[]:[]).flat().find(t=>t.id===e.tool_call_id)?.name}function he(e){return{providerName:`Google Gemini`,fromStandardTextBlock(e){return{text:e.text}},fromStandardImageBlock(t){if(!e)throw Error(`This model does not support images`);if(t.source_type===`url`){let e=n({dataUrl:t.url});return e?{inlineData:{mimeType:e.mime_type,data:e.data}}:{fileData:{mimeType:t.mime_type??``,fileUri:t.url}}}if(t.source_type===`base64`)return{inlineData:{mimeType:t.mime_type??``,data:t.data}};throw Error(`Unsupported source type: ${t.source_type}`)},fromStandardAudioBlock(t){if(!e)throw Error(`This model does not support audio`);if(t.source_type===`url`){let e=n({dataUrl:t.url});return e?{inlineData:{mimeType:e.mime_type,data:e.data}}:{fileData:{mimeType:t.mime_type??``,fileUri:t.url}}}if(t.source_type===`base64`)return{inlineData:{mimeType:t.mime_type??``,data:t.data}};throw Error(`Unsupported source type: ${t.source_type}`)},fromStandardFileBlock(t){if(!e)throw Error(`This model does not support files`);if(t.source_type===`text`)return{text:t.text};if(t.source_type===`url`){let e=n({dataUrl:t.url});return e?{inlineData:{mimeType:e.mime_type,data:e.data}}:{fileData:{mimeType:t.mime_type??``,fileUri:t.url}}}if(t.source_type===`base64`)return{inlineData:{mimeType:t.mime_type??``,data:t.data}};throw Error(`Unsupported source type: ${t.source_type}`)}}}function T(e,n){if(t(e))return r(e,he(n));if(e.type===`text`)return{text:e.text};if(e.type===`executableCode`)return{executableCode:e.executableCode};if(e.type===`codeExecutionResult`)return{codeExecutionResult:e.codeExecutionResult};if(e.type===`image_url`){if(!n)throw Error(`This model does not support images`);let t;if(typeof e.image_url==`string`)t=e.image_url;else if(typeof e.image_url==`object`&&`url`in e.image_url)t=e.image_url.url;else throw Error(`Please provide image as base64 encoded data URL`);let[r,i]=t.split(`,`);if(!r.startsWith(`data:`))throw Error(`Please provide image as base64 encoded data URL`);let[a,o]=r.replace(/^data:/,``).split(`;`);if(o!==`base64`)throw Error(`Please provide image as base64 encoded data URL`);return{inlineData:{data:i,mimeType:a}}}else if(e.type===`media`)return pe(e);else if(e.type===`tool_use`)return{functionCall:{name:e.name,args:e.input}};else if(e.type===`tool_call`)return{functionCall:{name:e.name,args:e.args}};else if(e.type?.includes(`/`)&&e.type.split(`/`).length===2&&`data`in e&&typeof e.data==`string`)return{inlineData:{mimeType:e.type,data:e.data}};else if(`functionCall`in e)return;else if(`type`in e)throw Error(`Unknown content type ${e.type}`);else throw Error(`Unknown content ${JSON.stringify(e)}`)}function ge(e,t,n,r){if(ee(e)){let r=e.name??me(e,n);if(r===void 0)throw Error(`Google requires a tool name for each tool call response, and we could not infer a called tool name for ToolMessage "${e.id}" from your passed messages. Please populate a "name" field on that ToolMessage explicitly.`);let i=Array.isArray(e.content)?e.content.map(e=>T(e,t)).filter(e=>e!==void 0):e.content;return e.status===`error`?[{functionResponse:{name:r,response:{error:{details:i}}}}]:[{functionResponse:{name:r,response:{result:i}}}]}let i=[],o=[];typeof e.content==`string`&&e.content&&o.push({text:e.content}),Array.isArray(e.content)&&o.push(...e.content.map(e=>T(e,t)).filter(e=>e!==void 0));let s=e.additional_kwargs?.[w];return a(e)&&e.tool_calls?.length&&(i=e.tool_calls.map(e=>{let t=ue(()=>{if(e.id){let t=s?.[e.id];if(t)return t}return r?.includes(`gemini-3`)?le:``});return{functionCall:{name:e.name,args:e.args},...t?{thoughtSignature:t}:{}}})),[...o,...i]}function E(t,n,r=!1,i){return t.reduce((a,o,s)=>{if(!e(o))throw Error(`Unsupported message input`);let c=de(o);if(c===`system`&&s!==0)throw Error(`System message should be the first one`);let l=fe(c),u=a.content[a.content.length];if(!a.mergeWithPreviousContent&&u&&u.role===l)throw Error(`Google Generative AI requires alternate messages between authors`);let d=ge(o,n,t.slice(0,s),i);if(a.mergeWithPreviousContent){let e=a.content[a.content.length-1];if(!e)throw Error(`There was a problem parsing your system message. Please try a prompt without one.`);return e.parts.push(...d),{mergeWithPreviousContent:!1,content:a.content}}let f=l;(f===`function`||f===`system`&&!r)&&(f=`user`);let p={role:f,parts:d};return{mergeWithPreviousContent:c===`system`&&!r,content:[...a.content,p]}},{content:[],mergeWithPreviousContent:!1}).content}function _e(e,t){if(!e.candidates||e.candidates.length===0||!e.candidates[0])return{generations:[],llmOutput:{filters:e.promptFeedback}};let[n]=e.candidates,{content:r,...i}=n,a=r.parts?.reduce((e,t)=>(`functionCall`in t&&t.functionCall&&e.push({...t,id:`id`in t.functionCall&&typeof t.functionCall.id==`string`?t.functionCall.id:C()}),e),[]),o,s=r?.parts;o=Array.isArray(s)&&s.length===1&&`text`in s[0]&&s[0].text&&!s[0].thought?s[0].text:Array.isArray(s)&&s.length>0?s.map(e=>e.thought&&`text`in e&&e.text?{type:`thinking`,thinking:e.text,...e.thoughtSignature?{signature:e.thoughtSignature}:{}}:`text`in e?{type:`text`,text:e.text}:`inlineData`in e?{type:`inlineData`,inlineData:e.inlineData}:`functionCall`in e?{type:`functionCall`,functionCall:e.functionCall}:`functionResponse`in e?{type:`functionResponse`,functionResponse:e.functionResponse}:`fileData`in e?{type:`fileData`,fileData:e.fileData}:`executableCode`in e?{type:`executableCode`,executableCode:e.executableCode}:`codeExecutionResult`in e?{type:`codeExecutionResult`,codeExecutionResult:e.codeExecutionResult}:e):[];let c=a?.reduce((e,t)=>(`thoughtSignature`in t&&typeof t.thoughtSignature==`string`&&(e[t.id]=t.thoughtSignature),e),{}),u=``;return typeof o==`string`?u=o:Array.isArray(o)&&o.length>0&&(u=o.find(e=>`text`in e)?.text??u),{generations:[{text:u,message:new l({content:o??``,tool_calls:a?.map(e=>({type:`tool_call`,id:e.id,name:e.functionCall.name,args:e.functionCall.args})),additional_kwargs:{...i,[w]:c},usage_metadata:t?.usageMetadata}),generationInfo:i}],llmOutput:{tokenUsage:{promptTokens:t?.usageMetadata?.input_tokens,completionTokens:t?.usageMetadata?.output_tokens,totalTokens:t?.usageMetadata?.total_tokens}}}}function ve(e,t){if(!e.candidates||e.candidates.length===0)return null;let[n]=e.candidates,{content:r,...i}=n,a=r.parts?.reduce((e,t)=>(`functionCall`in t&&t.functionCall&&e.push({...t,id:`id`in t.functionCall&&typeof t.functionCall.id==`string`?t.functionCall.id:C()}),e),[]),o,s=r?.parts;o=Array.isArray(s)&&s.every(e=>`text`in e&&!e.thought)?s.map(e=>e.text).join(``):Array.isArray(s)?s.map(e=>e.thought&&`text`in e&&e.text?{type:`thinking`,thinking:e.text,...e.thoughtSignature?{signature:e.thoughtSignature}:{}}:`text`in e?{type:`text`,text:e.text}:`inlineData`in e?{type:`inlineData`,inlineData:e.inlineData}:`functionCall`in e?{type:`functionCall`,functionCall:e.functionCall}:`functionResponse`in e?{type:`functionResponse`,functionResponse:e.functionResponse}:`fileData`in e?{type:`fileData`,fileData:e.fileData}:`executableCode`in e?{type:`executableCode`,executableCode:e.executableCode}:`codeExecutionResult`in e?{type:`codeExecutionResult`,codeExecutionResult:e.codeExecutionResult}:e):[];let c=``;o&&typeof o==`string`?c=o:Array.isArray(o)&&(c=o.find(e=>`text`in e)?.text??``);let l=[];a&&l.push(...a.map(e=>({type:`tool_call_chunk`,id:e.id,name:e.functionCall.name,args:JSON.stringify(e.functionCall.args)})));let f=a?.reduce((e,t)=>(`thoughtSignature`in t&&typeof t.thoughtSignature==`string`&&(e[t.id]=t.thoughtSignature),e),{});return new d({text:c,message:new u({content:o||``,name:r?r.role:void 0,tool_call_chunks:l,additional_kwargs:{[w]:f},response_metadata:{model_provider:`google-genai`},usage_metadata:t.usageMetadata}),generationInfo:i})}function ye(e){return e.every(e=>`functionDeclarations`in e&&Array.isArray(e.functionDeclarations))?e:[{functionDeclarations:e.map(e=>{if(g(e)){let t=v(e.schema);return t.type===`object`&&`properties`in t&&Object.keys(t.properties).length===0?{name:e.name,description:e.description}:(y(t,e.name),{name:e.name,description:e.description,parameters:t})}if(h(e)){let t=ae(e.function.parameters);return y(t,e.function.name),{name:e.function.name,description:e.function.description??`A function available to call.`,parameters:t}}return e})}]}function D(e,t){let n={input_tokens:e?.promptTokenCount??0,output_tokens:e?.candidatesTokenCount??0,total_tokens:e?.totalTokenCount??0};if(e?.cachedContentTokenCount&&(n.input_token_details??={},n.input_token_details.cache_read=e.cachedContentTokenCount),t===`gemini-3-pro-preview`){let t=Math.max(0,e?.promptTokenCount??-2e5),r=Math.max(0,e?.cachedContentTokenCount??-2e5);t&&(n.input_token_details={...n.input_token_details,over_200k:t}),r&&(n.input_token_details={...n.input_token_details,cache_read_over_200k:r})}return n}var O=class extends ne{static lc_name(){return`GoogleGenerativeAIToolsOutputParser`}lc_namespace=[`langchain`,`google_genai`,`output_parsers`];returnId=!1;keyName;returnSingle=!1;zodSchema;constructor(e){super(e),this.keyName=e.keyName,this.returnSingle=e.returnSingle??this.returnSingle,this.zodSchema=e.zodSchema}async _validateResult(e){if(this.zodSchema===void 0)return e;let t=await i(this.zodSchema,e);if(t.success)return t.data;throw new te(`Failed to parse. Text: "${JSON.stringify(e,null,2)}". Error: ${JSON.stringify(t.error.issues)}`,JSON.stringify(e,null,2))}async parseResult(e){let t=e.flatMap(e=>{let{message:t}=e;return!(`tool_calls`in t)||!Array.isArray(t.tool_calls)?[]:t.tool_calls});if(t[0]===void 0)throw Error(`No parseable tool calls provided to GoogleGenerativeAIToolsOutputParser.`);let[n]=t;return await this._validateResult(n.args)}},be;(function(e){e.STRING=`string`,e.NUMBER=`number`,e.INTEGER=`integer`,e.BOOLEAN=`boolean`,e.ARRAY=`array`,e.OBJECT=`object`})(be||={});var xe;(function(e){e.LANGUAGE_UNSPECIFIED=`language_unspecified`,e.PYTHON=`python`})(xe||={});var Se;(function(e){e.OUTCOME_UNSPECIFIED=`outcome_unspecified`,e.OUTCOME_OK=`outcome_ok`,e.OUTCOME_FAILED=`outcome_failed`,e.OUTCOME_DEADLINE_EXCEEDED=`outcome_deadline_exceeded`})(Se||={});var k=[`user`,`model`,`function`,`system`],Ce;(function(e){e.HARM_CATEGORY_UNSPECIFIED=`HARM_CATEGORY_UNSPECIFIED`,e.HARM_CATEGORY_HATE_SPEECH=`HARM_CATEGORY_HATE_SPEECH`,e.HARM_CATEGORY_SEXUALLY_EXPLICIT=`HARM_CATEGORY_SEXUALLY_EXPLICIT`,e.HARM_CATEGORY_HARASSMENT=`HARM_CATEGORY_HARASSMENT`,e.HARM_CATEGORY_DANGEROUS_CONTENT=`HARM_CATEGORY_DANGEROUS_CONTENT`,e.HARM_CATEGORY_CIVIC_INTEGRITY=`HARM_CATEGORY_CIVIC_INTEGRITY`})(Ce||={});var we;(function(e){e.HARM_BLOCK_THRESHOLD_UNSPECIFIED=`HARM_BLOCK_THRESHOLD_UNSPECIFIED`,e.BLOCK_LOW_AND_ABOVE=`BLOCK_LOW_AND_ABOVE`,e.BLOCK_MEDIUM_AND_ABOVE=`BLOCK_MEDIUM_AND_ABOVE`,e.BLOCK_ONLY_HIGH=`BLOCK_ONLY_HIGH`,e.BLOCK_NONE=`BLOCK_NONE`})(we||={});var Te;(function(e){e.HARM_PROBABILITY_UNSPECIFIED=`HARM_PROBABILITY_UNSPECIFIED`,e.NEGLIGIBLE=`NEGLIGIBLE`,e.LOW=`LOW`,e.MEDIUM=`MEDIUM`,e.HIGH=`HIGH`})(Te||={});var Ee;(function(e){e.BLOCKED_REASON_UNSPECIFIED=`BLOCKED_REASON_UNSPECIFIED`,e.SAFETY=`SAFETY`,e.OTHER=`OTHER`})(Ee||={});var A;(function(e){e.FINISH_REASON_UNSPECIFIED=`FINISH_REASON_UNSPECIFIED`,e.STOP=`STOP`,e.MAX_TOKENS=`MAX_TOKENS`,e.SAFETY=`SAFETY`,e.RECITATION=`RECITATION`,e.LANGUAGE=`LANGUAGE`,e.BLOCKLIST=`BLOCKLIST`,e.PROHIBITED_CONTENT=`PROHIBITED_CONTENT`,e.SPII=`SPII`,e.MALFORMED_FUNCTION_CALL=`MALFORMED_FUNCTION_CALL`,e.OTHER=`OTHER`})(A||={});var De;(function(e){e.TASK_TYPE_UNSPECIFIED=`TASK_TYPE_UNSPECIFIED`,e.RETRIEVAL_QUERY=`RETRIEVAL_QUERY`,e.RETRIEVAL_DOCUMENT=`RETRIEVAL_DOCUMENT`,e.SEMANTIC_SIMILARITY=`SEMANTIC_SIMILARITY`,e.CLASSIFICATION=`CLASSIFICATION`,e.CLUSTERING=`CLUSTERING`})(De||={});var j;(function(e){e.MODE_UNSPECIFIED=`MODE_UNSPECIFIED`,e.AUTO=`AUTO`,e.ANY=`ANY`,e.NONE=`NONE`})(j||={});var Oe;(function(e){e.MODE_UNSPECIFIED=`MODE_UNSPECIFIED`,e.MODE_DYNAMIC=`MODE_DYNAMIC`})(Oe||={});var M=class extends Error{constructor(e){super(`[GoogleGenerativeAI Error]: ${e}`)}},N=class extends M{constructor(e,t){super(e),this.response=t}},P=class extends M{constructor(e,t,n,r){super(e),this.status=t,this.statusText=n,this.errorDetails=r}},F=class extends M{},I=class extends M{},ke=`https://generativelanguage.googleapis.com`,Ae=`v1beta`,je=`0.24.1`,Me=`genai-js`,L;(function(e){e.GENERATE_CONTENT=`generateContent`,e.STREAM_GENERATE_CONTENT=`streamGenerateContent`,e.COUNT_TOKENS=`countTokens`,e.EMBED_CONTENT=`embedContent`,e.BATCH_EMBED_CONTENTS=`batchEmbedContents`})(L||={});var Ne=class{constructor(e,t,n,r,i){this.model=e,this.task=t,this.apiKey=n,this.stream=r,this.requestOptions=i}toString(){let e=this.requestOptions?.apiVersion||Ae,t=`${this.requestOptions?.baseUrl||ke}/${e}/${this.model}:${this.task}`;return this.stream&&(t+=`?alt=sse`),t}};function Pe(e){let t=[];return e?.apiClient&&t.push(e.apiClient),t.push(`${Me}/${je}`),t.join(` `)}async function Fe(e){let t=new Headers;t.append(`Content-Type`,`application/json`),t.append(`x-goog-api-client`,Pe(e.requestOptions)),t.append(`x-goog-api-key`,e.apiKey);let n=e.requestOptions?.customHeaders;if(n){if(!(n instanceof Headers))try{n=new Headers(n)}catch(e){throw new F(`unable to convert customHeaders value ${JSON.stringify(n)} to Headers: ${e.message}`)}for(let[e,r]of n.entries()){if(e===`x-goog-api-key`)throw new F(`Cannot set reserved header name ${e}`);if(e===`x-goog-api-client`)throw new F(`Header name ${e} can only be set using the apiClient field`);t.append(e,r)}}return t}async function Ie(e,t,n,r,i,a){let o=new Ne(e,t,n,r,a);return{url:o.toString(),fetchOptions:Object.assign(Object.assign({},Be(a)),{method:`POST`,headers:await Fe(o),body:i})}}async function R(e,t,n,r,i,a={},o=fetch){let{url:s,fetchOptions:c}=await Ie(e,t,n,r,i,a);return Le(s,c,o)}async function Le(e,t,n=fetch){let r;try{r=await n(e,t)}catch(t){Re(t,e)}return r.ok||await ze(r,e),r}function Re(e,t){let n=e;throw n.name===`AbortError`?(n=new I(`Request aborted when fetching ${t.toString()}: ${e.message}`),n.stack=e.stack):e instanceof P||e instanceof F||(n=new M(`Error fetching from ${t.toString()}: ${e.message}`),n.stack=e.stack),n}async function ze(e,t){let n=``,r;try{let t=await e.json();n=t.error.message,t.error.details&&(n+=` ${JSON.stringify(t.error.details)}`,r=t.error.details)}catch{}throw new P(`Error fetching from ${t.toString()}: [${e.status} ${e.statusText}] ${n}`,e.status,e.statusText,r)}function Be(e){let t={};if(e?.signal!==void 0||e?.timeout>=0){let n=new AbortController;e?.timeout>=0&&setTimeout(()=>n.abort(),e.timeout),e?.signal&&e.signal.addEventListener(`abort`,()=>{n.abort()}),t.signal=n.signal}return t}function z(e){return e.text=()=>{if(e.candidates&&e.candidates.length>0){if(e.candidates.length>1&&console.warn(`This response had ${e.candidates.length} candidates. Returning text from the first candidate only. Access response.candidates directly to use the other candidates.`),V(e.candidates[0]))throw new N(`${H(e)}`,e);return Ve(e)}else if(e.promptFeedback)throw new N(`Text not available. ${H(e)}`,e);return``},e.functionCall=()=>{if(e.candidates&&e.candidates.length>0){if(e.candidates.length>1&&console.warn(`This response had ${e.candidates.length} candidates. Returning function calls from the first candidate only. Access response.candidates directly to use the other candidates.`),V(e.candidates[0]))throw new N(`${H(e)}`,e);return console.warn(`response.functionCall() is deprecated. Use response.functionCalls() instead.`),B(e)[0]}else if(e.promptFeedback)throw new N(`Function call not available. ${H(e)}`,e)},e.functionCalls=()=>{if(e.candidates&&e.candidates.length>0){if(e.candidates.length>1&&console.warn(`This response had ${e.candidates.length} candidates. Returning function calls from the first candidate only. Access response.candidates directly to use the other candidates.`),V(e.candidates[0]))throw new N(`${H(e)}`,e);return B(e)}else if(e.promptFeedback)throw new N(`Function call not available. ${H(e)}`,e)},e}function Ve(e){let t=[];if(e.candidates?.[0].content?.parts)for(let n of e.candidates?.[0].content?.parts)n.text&&t.push(n.text),n.executableCode&&t.push("\n```"+n.executableCode.language+`
2
+ `+n.executableCode.code+"\n```\n"),n.codeExecutionResult&&t.push("\n```\n"+n.codeExecutionResult.output+"\n```\n");return t.length>0?t.join(``):``}function B(e){let t=[];if(e.candidates?.[0].content?.parts)for(let n of e.candidates?.[0].content?.parts)n.functionCall&&t.push(n.functionCall);if(t.length>0)return t}var He=[A.RECITATION,A.SAFETY,A.LANGUAGE];function V(e){return!!e.finishReason&&He.includes(e.finishReason)}function H(e){let t=``;if((!e.candidates||e.candidates.length===0)&&e.promptFeedback)t+=`Response was blocked`,e.promptFeedback?.blockReason&&(t+=` due to ${e.promptFeedback.blockReason}`),e.promptFeedback?.blockReasonMessage&&(t+=`: ${e.promptFeedback.blockReasonMessage}`);else if(e.candidates?.[0]){let n=e.candidates[0];V(n)&&(t+=`Candidate was blocked due to ${n.finishReason}`,n.finishMessage&&(t+=`: ${n.finishMessage}`))}return t}function U(e){return this instanceof U?(this.v=e,this):new U(e)}function Ue(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i={},o(`next`),o(`throw`),o(`return`),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{c(r[e](t))}catch(e){d(a[0][3],e)}}function c(e){e.value instanceof U?Promise.resolve(e.value.v).then(l,u):d(a[0][2],e)}function l(e){s(`next`,e)}function u(e){s(`throw`,e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}var W=/^data\: (.*)(?:\n\n|\r\r|\r\n\r\n)/;function We(e){let[t,n]=qe(e.body.pipeThrough(new TextDecoderStream(`utf8`,{fatal:!0}))).tee();return{stream:Ke(t),response:Ge(n)}}async function Ge(e){let t=[],n=e.getReader();for(;;){let{done:e,value:r}=await n.read();if(e)return z(Je(t));t.push(r)}}function Ke(e){return Ue(this,arguments,function*(){let t=e.getReader();for(;;){let{value:e,done:n}=yield U(t.read());if(n)break;yield yield U(z(e))}})}function qe(e){let t=e.getReader();return new ReadableStream({start(e){let n=``;return r();function r(){return t.read().then(({value:t,done:i})=>{if(i){if(n.trim()){e.error(new M(`Failed to parse stream`));return}e.close();return}n+=t;let a=n.match(W),o;for(;a;){try{o=JSON.parse(a[1])}catch{e.error(new M(`Error parsing JSON response: "${a[1]}"`));return}e.enqueue(o),n=n.substring(a[0].length),a=n.match(W)}return r()}).catch(e=>{let t=e;throw t.stack=e.stack,t=t.name===`AbortError`?new I(`Request aborted when reading from the stream`):new M(`Error reading from the stream`),t})}}})}function Je(e){let t={promptFeedback:e[e.length-1]?.promptFeedback};for(let n of e){if(n.candidates){let e=0;for(let r of n.candidates)if(t.candidates||=[],t.candidates[e]||(t.candidates[e]={index:e}),t.candidates[e].citationMetadata=r.citationMetadata,t.candidates[e].groundingMetadata=r.groundingMetadata,t.candidates[e].finishReason=r.finishReason,t.candidates[e].finishMessage=r.finishMessage,t.candidates[e].safetyRatings=r.safetyRatings,r.content&&r.content.parts){t.candidates[e].content||(t.candidates[e].content={role:r.content.role||`user`,parts:[]});let n={};for(let i of r.content.parts)i.text&&(n.text=i.text),i.functionCall&&(n.functionCall=i.functionCall),i.executableCode&&(n.executableCode=i.executableCode),i.codeExecutionResult&&(n.codeExecutionResult=i.codeExecutionResult),Object.keys(n).length===0&&(n.text=``),t.candidates[e].content.parts.push(n)}e++}n.usageMetadata&&(t.usageMetadata=n.usageMetadata)}return t}async function G(e,t,n,r){return We(await R(t,L.STREAM_GENERATE_CONTENT,e,!0,JSON.stringify(n),r))}async function K(e,t,n,r){return{response:z(await(await R(t,L.GENERATE_CONTENT,e,!1,JSON.stringify(n),r)).json())}}function q(e){if(e!=null){if(typeof e==`string`)return{role:`system`,parts:[{text:e}]};if(e.text)return{role:`system`,parts:[e]};if(e.parts)return e.role?e:{role:`system`,parts:e.parts}}}function J(e){let t=[];if(typeof e==`string`)t=[{text:e}];else for(let n of e)typeof n==`string`?t.push({text:n}):t.push(n);return Ye(t)}function Ye(e){let t={role:`user`,parts:[]},n={role:`function`,parts:[]},r=!1,i=!1;for(let a of e)`functionResponse`in a?(n.parts.push(a),i=!0):(t.parts.push(a),r=!0);if(r&&i)throw new M(`Within a single message, FunctionResponse cannot be mixed with other type of part in the request for sending chat message.`);if(!r&&!i)throw new M(`No content is provided for sending chat message.`);return r?t:n}function Xe(e,t){let n={model:t?.model,generationConfig:t?.generationConfig,safetySettings:t?.safetySettings,tools:t?.tools,toolConfig:t?.toolConfig,systemInstruction:t?.systemInstruction,cachedContent:t?.cachedContent?.name,contents:[]},r=e.generateContentRequest!=null;if(e.contents){if(r)throw new F(`CountTokensRequest must have one of contents or generateContentRequest, not both.`);n.contents=e.contents}else if(r)n=Object.assign(Object.assign({},n),e.generateContentRequest);else{let t=J(e);n.contents=[t]}return{generateContentRequest:n}}function Y(e){let t;return t=e.contents?e:{contents:[J(e)]},e.systemInstruction&&(t.systemInstruction=q(e.systemInstruction)),t}function Ze(e){return typeof e==`string`||Array.isArray(e)?{content:J(e)}:e}var X=[`text`,`inlineData`,`functionCall`,`functionResponse`,`executableCode`,`codeExecutionResult`],Qe={user:[`text`,`inlineData`],function:[`functionResponse`],model:[`text`,`functionCall`,`executableCode`,`codeExecutionResult`],system:[`text`]};function $e(e){let t=!1;for(let n of e){let{role:e,parts:r}=n;if(!t&&e!==`user`)throw new M(`First content should be with role 'user', got ${e}`);if(!k.includes(e))throw new M(`Each item should include role field. Got ${e} but valid roles are: ${JSON.stringify(k)}`);if(!Array.isArray(r))throw new M(`Content should have 'parts' property with an array of Parts`);if(r.length===0)throw new M(`Each Content should have at least one part`);let i={text:0,inlineData:0,functionCall:0,functionResponse:0,fileData:0,executableCode:0,codeExecutionResult:0};for(let e of r)for(let t of X)t in e&&(i[t]+=1);let a=Qe[e];for(let t of X)if(!a.includes(t)&&i[t]>0)throw new M(`Content with role '${e}' can't contain '${t}' part`);t=!0}}function Z(e){if(e.candidates===void 0||e.candidates.length===0)return!1;let t=e.candidates[0]?.content;if(t===void 0||t.parts===void 0||t.parts.length===0)return!1;for(let e of t.parts)if(e===void 0||Object.keys(e).length===0||e.text!==void 0&&e.text===``)return!1;return!0}var Q=`SILENT_ERROR`,et=class{constructor(e,t,n,r={}){this.model=t,this.params=n,this._requestOptions=r,this._history=[],this._sendPromise=Promise.resolve(),this._apiKey=e,n?.history&&($e(n.history),this._history=n.history)}async getHistory(){return await this._sendPromise,this._history}async sendMessage(e,t={}){await this._sendPromise;let n=J(e),r={safetySettings:this.params?.safetySettings,generationConfig:this.params?.generationConfig,tools:this.params?.tools,toolConfig:this.params?.toolConfig,systemInstruction:this.params?.systemInstruction,cachedContent:this.params?.cachedContent,contents:[...this._history,n]},i=Object.assign(Object.assign({},this._requestOptions),t),a;return this._sendPromise=this._sendPromise.then(()=>K(this._apiKey,this.model,r,i)).then(e=>{if(Z(e.response)){this._history.push(n);let t=Object.assign({parts:[],role:`model`},e.response.candidates?.[0].content);this._history.push(t)}else{let t=H(e.response);t&&console.warn(`sendMessage() was unsuccessful. ${t}. Inspect response object for details.`)}a=e}).catch(e=>{throw this._sendPromise=Promise.resolve(),e}),await this._sendPromise,a}async sendMessageStream(e,t={}){await this._sendPromise;let n=J(e),r={safetySettings:this.params?.safetySettings,generationConfig:this.params?.generationConfig,tools:this.params?.tools,toolConfig:this.params?.toolConfig,systemInstruction:this.params?.systemInstruction,cachedContent:this.params?.cachedContent,contents:[...this._history,n]},i=Object.assign(Object.assign({},this._requestOptions),t),a=G(this._apiKey,this.model,r,i);return this._sendPromise=this._sendPromise.then(()=>a).catch(e=>{throw Error(Q)}).then(e=>e.response).then(e=>{if(Z(e)){this._history.push(n);let t=Object.assign({},e.candidates[0].content);t.role||=`model`,this._history.push(t)}else{let t=H(e);t&&console.warn(`sendMessageStream() was unsuccessful. ${t}. Inspect response object for details.`)}}).catch(e=>{e.message!==Q&&console.error(e)}),a}};async function tt(e,t,n,r){return(await R(t,L.COUNT_TOKENS,e,!1,JSON.stringify(n),r)).json()}async function nt(e,t,n,r){return(await R(t,L.EMBED_CONTENT,e,!1,JSON.stringify(n),r)).json()}async function rt(e,t,n,r){let i=n.requests.map(e=>Object.assign(Object.assign({},e),{model:t}));return(await R(t,L.BATCH_EMBED_CONTENTS,e,!1,JSON.stringify({requests:i}),r)).json()}var $=class{constructor(e,t,n={}){this.apiKey=e,this._requestOptions=n,t.model.includes(`/`)?this.model=t.model:this.model=`models/${t.model}`,this.generationConfig=t.generationConfig||{},this.safetySettings=t.safetySettings||[],this.tools=t.tools,this.toolConfig=t.toolConfig,this.systemInstruction=q(t.systemInstruction),this.cachedContent=t.cachedContent}async generateContent(e,t={}){let n=Y(e),r=Object.assign(Object.assign({},this._requestOptions),t);return K(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent?.name},n),r)}async generateContentStream(e,t={}){let n=Y(e),r=Object.assign(Object.assign({},this._requestOptions),t);return G(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent?.name},n),r)}startChat(e){return new et(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent?.name},e),this._requestOptions)}async countTokens(e,t={}){let n=Xe(e,{model:this.model,generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent}),r=Object.assign(Object.assign({},this._requestOptions),t);return tt(this.apiKey,this.model,n,r)}async embedContent(e,t={}){let n=Ze(e),r=Object.assign(Object.assign({},this._requestOptions),t);return nt(this.apiKey,this.model,n,r)}async batchEmbedContents(e,t={}){let n=Object.assign(Object.assign({},this._requestOptions),t);return rt(this.apiKey,this.model,e,n)}},it=class{constructor(e){this.apiKey=e}getGenerativeModel(e,t){if(!e.model)throw new M(`Must provide a model name. Example: genai.getGenerativeModel({ model: 'my-model-name' })`);return new $(this.apiKey,e,t)}getGenerativeModelFromCachedContent(e,t,n){if(!e.name)throw new F("Cached content must contain a `name` field.");if(!e.model)throw new F("Cached content must contain a `model` field.");for(let n of[`model`,`systemInstruction`])if(t?.[n]&&e[n]&&t?.[n]!==e[n]){if(n===`model`&&(t.model.startsWith(`models/`)?t.model.replace(`models/`,``):t.model)===(e.model.startsWith(`models/`)?e.model.replace(`models/`,``):e.model))continue;throw new F(`Different value for "${n}" specified in modelParams (${t[n]}) and cachedContent (${e[n]})`)}let r=Object.assign(Object.assign({},t),{model:e.model,tools:e.tools,toolConfig:e.toolConfig,systemInstruction:e.systemInstruction,cachedContent:e});return new $(this.apiKey,r,n)}};function at(e,t){let n=ot(e);return{tools:n,toolConfig:ct(n,t)}}function ot(e){let t=[],n=[];return e.forEach(e=>{if(g(e)){let[n]=ye([e]);n.functionDeclarations&&t.push(...n.functionDeclarations)}else if(h(e)){let{functionDeclarations:n}=st(e);if(n)t.push(...n);else throw Error(`Failed to convert OpenAI structured tool to GenerativeAI tool`)}else n.push(e)}),n.find(e=>`functionDeclarations`in e)?n.map(e=>{if(t?.length>0&&`functionDeclarations`in e){let n={functionDeclarations:[...e.functionDeclarations||[],...t]};return t=[],n}return e}):[...n,...t.length>0?[{functionDeclarations:t}]:[]]}function st(e){return{functionDeclarations:[{name:e.function.name,description:e.function.description,parameters:_(e.function.parameters)}]}}function ct(e,t){if(!e.length||!t)return;let{toolChoice:n,allowedFunctionNames:r}=t,i={any:j.ANY,auto:j.AUTO,none:j.NONE};if(n&&[`any`,`auto`,`none`].includes(n))return{functionCallingConfig:{mode:i[n]??`MODE_UNSPECIFIED`,allowedFunctionNames:r}};if(typeof n==`string`||r)return{functionCallingConfig:{mode:j.ANY,allowedFunctionNames:[...r??[],...n&&typeof n==`string`?[n]:[]]}}}var lt={"gemini-embedding-001":{maxInputTokens:2048,imageInputs:!1,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:3072,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-2.5-flash-lite-preview-09-2025":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-pro-preview-06-05":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-preview-04-17":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-2.5-flash-preview-09-2025":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-pro-preview-05-06":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-preview-05-20":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-live-2.5-flash":{maxInputTokens:128e3,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-3-flash-preview":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-live-2.5-flash-preview-native-audio":{maxInputTokens:131072,imageInputs:!1,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-2.5-flash-lite":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-preview-tts":{maxInputTokens:8e3,imageInputs:!1,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:16e3,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-flash-latest":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-flash-lite-preview-06-17":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-2.5-flash-image":{maxInputTokens:32768,imageInputs:!0,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:32768,reasoningOutput:!0,imageOutputs:!0,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-2.5-pro-preview-tts":{maxInputTokens:8e3,imageInputs:!1,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:16e3,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!0,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-2.5-flash-image-preview":{maxInputTokens:32768,imageInputs:!0,audioInputs:!1,pdfInputs:!1,videoInputs:!1,maxOutputTokens:32768,reasoningOutput:!0,imageOutputs:!0,audioOutputs:!1,videoOutputs:!1,toolCalling:!1,structuredOutput:!1},"gemini-1.5-flash-8b":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-3-pro-preview":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:64e3,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.0-flash-lite":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-1.5-flash":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1},"gemini-flash-lite-latest":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.5-pro":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:65536,reasoningOutput:!0,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-2.0-flash":{maxInputTokens:1048576,imageInputs:!0,audioInputs:!0,pdfInputs:!0,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!0},"gemini-1.5-pro":{maxInputTokens:1e6,imageInputs:!0,audioInputs:!0,pdfInputs:!1,videoInputs:!0,maxOutputTokens:8192,reasoningOutput:!1,imageOutputs:!1,audioOutputs:!1,videoOutputs:!1,toolCalling:!0,structuredOutput:!1}},ut=class extends re{static lc_name(){return`ChatGoogleGenerativeAI`}lc_serializable=!0;get lc_secrets(){return{apiKey:`GOOGLE_API_KEY`}}lc_namespace=[`langchain`,`chat_models`,`google_genai`];get lc_aliases(){return{apiKey:`google_api_key`}}model;temperature;maxOutputTokens;topP;topK;stopSequences=[];safetySettings;apiKey;streaming=!1;json;streamUsage=!0;convertSystemMessageToHumanContent;thinkingConfig;client;get _isMultimodalModel(){return this.model.includes(`vision`)||this.model.startsWith(`gemini-1.5`)||this.model.startsWith(`gemini-2`)||this.model.startsWith(`gemma-3-`)&&!this.model.startsWith(`gemma-3-1b`)||this.model.startsWith(`gemini-3`)}constructor(e){if(super(e),this.model=e.model.replace(/^models\//,``),this.maxOutputTokens=e.maxOutputTokens??this.maxOutputTokens,this.maxOutputTokens&&this.maxOutputTokens<0)throw Error("`maxOutputTokens` must be a positive integer");if(this.temperature=e.temperature??this.temperature,this.temperature&&(this.temperature<0||this.temperature>2))throw Error("`temperature` must be in the range of [0.0,2.0]");if(this.topP=e.topP??this.topP,this.topP&&this.topP<0)throw Error("`topP` must be a positive integer");if(this.topP&&this.topP>1)throw Error("`topP` must be below 1.");if(this.topK=e.topK??this.topK,this.topK&&this.topK<0)throw Error("`topK` must be a positive integer");if(this.stopSequences=e.stopSequences??this.stopSequences,this.apiKey=e.apiKey??c(`GOOGLE_API_KEY`),!this.apiKey)throw Error("Please set an API key for Google GenerativeAI in the environment variable GOOGLE_API_KEY or in the `apiKey` field of the ChatGoogleGenerativeAI constructor");if(this.safetySettings=e.safetySettings??this.safetySettings,this.safetySettings&&this.safetySettings.length>0&&new Set(this.safetySettings.map(e=>e.category)).size!==this.safetySettings.length)throw Error("The categories in `safetySettings` array must be unique");this.streaming=e.streaming??this.streaming,this.json=e.json,this.thinkingConfig=e.thinkingConfig??this.thinkingConfig,this.client=new it(this.apiKey).getGenerativeModel({model:this.model,safetySettings:this.safetySettings,generationConfig:{stopSequences:this.stopSequences,maxOutputTokens:this.maxOutputTokens,temperature:this.temperature,topP:this.topP,topK:this.topK,...this.json?{responseMimeType:`application/json`}:{},...this.thinkingConfig?{thinkingConfig:this.thinkingConfig}:{}}},{apiVersion:e.apiVersion,baseUrl:e.baseUrl,customHeaders:e.customHeaders}),this.streamUsage=e.streamUsage??this.streamUsage}useCachedContent(e,t,n){this.apiKey&&(this.client=new it(this.apiKey).getGenerativeModelFromCachedContent(e,t,n))}get useSystemInstruction(){return typeof this.convertSystemMessageToHumanContent==`boolean`?!this.convertSystemMessageToHumanContent:this.computeUseSystemInstruction}get computeUseSystemInstruction(){return this.model===`gemini-1.0-pro-001`||this.model.startsWith(`gemini-pro-vision`)||this.model.startsWith(`gemini-1.0-pro-vision`)?!1:this.model!==`gemini-pro`}getLsParams(e){return{ls_provider:`google_genai`,ls_model_name:this.model,ls_model_type:`chat`,ls_temperature:this.client.generationConfig.temperature,ls_max_tokens:this.client.generationConfig.maxOutputTokens,ls_stop:e.stop}}_combineLLMOutput(){return[]}_llmType(){return`googlegenerativeai`}bindTools(e,t){return this.withConfig({tools:at(e)?.tools,...t})}invocationParams(e){let t=e?.tools?.length?at(e.tools,{toolChoice:e.tool_choice,allowedFunctionNames:e.allowedFunctionNames}):void 0;return e?.responseSchema?(this.client.generationConfig.responseSchema=e.responseSchema,this.client.generationConfig.responseMimeType=`application/json`):(this.client.generationConfig.responseSchema=void 0,this.client.generationConfig.responseMimeType=this.json?`application/json`:void 0),{...t?.tools?{tools:t.tools}:{},...t?.toolConfig?{toolConfig:t.toolConfig}:{}}}async _generate(e,t,n){t.signal?.throwIfAborted();let r=E(e,this._isMultimodalModel,this.useSystemInstruction,this.model),i=r;if(r[0].role===`system`){let[e]=r;this.client.systemInstruction=e,i=r.slice(1)}let a=this.invocationParams(t);if(this.streaming){let r={},i=this._streamResponseChunks(e,t,n),a=[];for await(let e of i){let t=e.generationInfo?.completion??0;a[t]===void 0?a[t]=e:a[t]=a[t].concat(e)}return{generations:a.filter(e=>e!==void 0),llmOutput:{estimatedTokenUsage:r}}}let o=await this.completionWithRetry({...a,contents:i}),s;`usageMetadata`in o.response&&(s=D(o.response.usageMetadata,this.model));let c=_e(o.response,{usageMetadata:s});return c.generations?.length>0&&await n?.handleLLMNewToken(c.generations[0]?.text??``),c}async*_streamResponseChunks(e,t,n){let r=E(e,this._isMultimodalModel,this.useSystemInstruction,this.model),i=r;if(r[0].role===`system`){let[e]=r;this.client.systemInstruction=e,i=r.slice(1)}let a={...this.invocationParams(t),contents:i},o=await this.caller.callWithOptions({signal:t?.signal},async()=>{let{stream:e}=await this.client.generateContentStream(a,{signal:t?.signal});return e}),s,c=0,l=0,u=0,d=0;for await(let e of o){if(t.signal?.aborted)return;if(`usageMetadata`in e&&e.usageMetadata!==void 0&&this.streamUsage!==!1&&t.streamUsage!==!1){s=D(e.usageMetadata,this.model);let t=e.usageMetadata.promptTokenCount??0;s.input_tokens=Math.max(0,t-c),c=t;let n=e.usageMetadata.candidatesTokenCount??0;s.output_tokens=Math.max(0,n-l),l=n;let r=e.usageMetadata.totalTokenCount??0;s.total_tokens=Math.max(0,r-u),u=r}let r=ve(e,{usageMetadata:s,index:d});d+=1,r&&(yield r,await n?.handleLLMNewToken(r.text??``))}}async completionWithRetry(e,t){return this.caller.callWithOptions({signal:t?.signal},async()=>{try{return await this.client.generateContent(e,{signal:t?.signal})}catch(e){throw e.message?.includes(`400 Bad Request`)&&(e.status=400),e}})}get profile(){return lt[this.model]??{}}withStructuredOutput(e,t){let n=e,r=t?.name,i=t?.method,a=t?.includeRaw;if(i===`jsonMode`)throw Error(`ChatGoogleGenerativeAI only supports "jsonSchema" or "functionCalling" as a method.`);let o,c;if(i===`functionCalling`){let e=r??`extract`,t;if(s(n)){let r=v(n);t=[{functionDeclarations:[{name:e,description:r.description??`A function available to call.`,parameters:r}]}],c=new O({returnSingle:!0,keyName:e,zodSchema:n})}else{let r;typeof n.name==`string`&&typeof n.parameters==`object`&&n.parameters!=null?(r=n,r.parameters=_(n.parameters),e=n.name):r={name:e,description:n.description??``,parameters:_(n)},t=[{functionDeclarations:[r]}],c=new O({returnSingle:!0,keyName:e})}o=this.bindTools(t).withConfig({allowedFunctionNames:[e]})}else{let e=v(n);o=this.withConfig({responseSchema:e}),c=new ie}if(!a)return o.pipe(c).withConfig({runName:`ChatGoogleGenerativeAIStructuredOutput`});let l=m.assign({parsed:(e,t)=>c.invoke(e.raw,t)}),u=m.assign({parsed:()=>null}),d=l.withFallbacks({fallbacks:[u]});return f.from([{raw:o},d]).withConfig({runName:`StructuredOutputRunnable`})}};export{ut as ChatGoogleGenerativeAI};