@malloy-publisher/server 0.0.113 → 0.0.115

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 (308) hide show
  1. package/dist/app/api-doc.yaml +621 -350
  2. package/dist/app/assets/{Chip-BPFN-2iK.js → Chip-Dnjptjx_.js} +1 -1
  3. package/dist/app/assets/{Container-S_LHoTtj.js → Container-DkO95q-4.js} +1 -1
  4. package/dist/app/assets/{DialogTitle-BoaRUY5e.js → DialogTitle-CxFBjEhG.js} +1 -1
  5. package/dist/app/assets/{Edit-DxSFhHwr.js → Edit-RtMOPNzT.js} +1 -1
  6. package/dist/app/assets/FormControlContext-CQ0UyOaU.js +1 -0
  7. package/dist/app/assets/{HomePage-Ciykl78O.js → HomePage-R3qOQ1KM.js} +1 -1
  8. package/dist/app/assets/{MainPage-DQs1DLly.js → MainPage-3WQF-B84.js} +1 -1
  9. package/dist/app/assets/{MenuItem-CKcvMIiT.js → MenuItem-CIuBJELU.js} +1 -1
  10. package/dist/app/assets/{Modal-B09ILQKb.js → Modal-BkzfZV9H.js} +1 -1
  11. package/dist/app/assets/{ModelPage-B4pPCb_A.js → ModelPage-DcKgMUK5.js} +1 -1
  12. package/dist/app/assets/{MoreVert-CBj2COu2.js → MoreVert-CE4XrzBZ.js} +1 -1
  13. package/dist/app/assets/{PackagePage-v9ybKZsV.js → PackagePage-rqHRexK9.js} +1 -1
  14. package/dist/app/assets/{ProjectPage--ytNIoOY.js → ProjectPage-Dpeja96H.js} +1 -1
  15. package/dist/app/assets/{RouteError-DODx40fJ.js → RouteError-B_elzXbG.js} +1 -1
  16. package/dist/app/assets/{WorkbookPage-DEmSMCHP.js → WorkbookPage-wNC0nP-1.js} +2 -2
  17. package/dist/app/assets/index-CMlGQMcl.css +1 -0
  18. package/dist/app/assets/{index-CPPmFTED.js → index-CW4KpAGn.js} +38 -38
  19. package/dist/app/assets/{index-BNDPWBNi.js → index-DAUp_Rhk.js} +235 -235
  20. package/dist/app/assets/index-DGH620i5.js +1184 -0
  21. package/dist/app/assets/{index.es20-lNMjicWC.js → index.es20-DNbouiSj.js} +1 -1
  22. package/dist/app/assets/{index.es23-BYJIDfXQ.js → index.es23-BkzSXaI_.js} +2 -2
  23. package/dist/app/assets/{index.es323-Cmd8ebKW.js → index.es304-CrENfdE2.js} +1 -1
  24. package/dist/app/assets/{index.es324-BllQIgQd.js → index.es305-ALZNB_0P.js} +1 -1
  25. package/dist/app/assets/{index.es327-DhM3xEyp.js → index.es308-v-jHhg78.js} +1 -1
  26. package/dist/app/assets/{index.es332-Dn786pMK.js → index.es313-C9sX9eQP.js} +1 -1
  27. package/dist/app/assets/{index.es340-JoyRj8Ul.js → index.es321-BhOnb8US.js} +1 -1
  28. package/dist/app/assets/{index.es341-9uOuiCzh.js → index.es322-CESu47j5.js} +1 -1
  29. package/dist/app/assets/{index.es344-hoFJ9wLz.js → index.es325-B_Pq63a1.js} +1 -1
  30. package/dist/app/assets/{index.es348-D8pWOBN4.js → index.es329-V0H_1fHZ.js} +1 -1
  31. package/dist/app/assets/{index.es351-CuxSqnpe.js → index.es332-DFf4bP34.js} +1 -1
  32. package/dist/app/assets/{index.es354-DvlPdd_8.js → index.es335-CiVlZW4U.js} +1 -1
  33. package/dist/app/assets/{index.es355-CunDDQIR.js → index.es336-CQwcBYvF.js} +1 -1
  34. package/dist/app/assets/{index.es369-CYf8oS2b.js → index.es350-fhQtHvke.js} +1 -1
  35. package/dist/app/assets/{index.es370-Cbr8LiAr.js → index.es351-CeT79lHU.js} +1 -1
  36. package/dist/app/assets/{index.es371--q2H8od3.js → index.es352-C0iVgwlN.js} +1 -1
  37. package/dist/app/assets/{index.es373-BuiMQ1bX.js → index.es354-LOpOq_OY.js} +1 -1
  38. package/dist/app/assets/{index.es378-CkjxECEH.js → index.es359-DQgr4IMq.js} +1 -1
  39. package/dist/app/assets/{index.es380-C6KQCo6t.js → index.es361-Dl5czYEp.js} +1 -1
  40. package/dist/app/assets/{index.es381-CwHcQBsW.js → index.es362-DoAi1yx4.js} +1 -1
  41. package/dist/app/assets/{index.es386-FC0u_O0U.js → index.es367-E0H2xfYP.js} +1 -1
  42. package/dist/app/assets/{index.es387-xHeBAFPr.js → index.es368-Br2VeB3w.js} +1 -1
  43. package/dist/app/assets/{index.es389-BwaLxarl.js → index.es370-Creu8B6Y.js} +1 -1
  44. package/dist/app/assets/{index.es390-B3IQVAJV.js → index.es371-V_7wYv1m.js} +1 -1
  45. package/dist/app/assets/{index.es391-BwkoCHxh.js → index.es372-Bsnsw9Ay.js} +1 -1
  46. package/dist/app/assets/{index.es394-BPWLHcqA.js → index.es375-C71BNclw.js} +1 -1
  47. package/dist/app/assets/{index.es396-COP1dwQ2.js → index.es377-DNrypLci.js} +1 -1
  48. package/dist/app/assets/{index.es397-Ba4K4mAk.js → index.es378--t_dR8Xp.js} +1 -1
  49. package/dist/app/assets/{index.es398-BSYOs98v.js → index.es379-Bg_TjUoS.js} +1 -1
  50. package/dist/app/assets/{index.es404-DGUWv76G.js → index.es385-C0Jv713Y.js} +1 -1
  51. package/dist/app/assets/{index.es405-DBe4EGNb.js → index.es386-CWrdwjiF.js} +1 -1
  52. package/dist/app/assets/{index.es406-CFlwXxP9.js → index.es387-CZmqkd86.js} +1 -1
  53. package/dist/app/assets/{index.es407-DTR_lE2r.js → index.es388-C69z_WZw.js} +1 -1
  54. package/dist/app/assets/{index.es409-DrFr_RuK.js → index.es390-CbbyQcIk.js} +1 -1
  55. package/dist/app/assets/{index.es413-DaCYI7j4.js → index.es394-BeMYMBvc.js} +1 -1
  56. package/dist/app/assets/{index.es414-C7v51edE.js → index.es395-B2i1EAbH.js} +1 -1
  57. package/dist/app/assets/{index.es422-BCUhEH3B.js → index.es403-BvX0ohuZ.js} +1 -1
  58. package/dist/app/assets/{index.es425-BZfdHlSw.js → index.es406-POkH-quI.js} +1 -1
  59. package/dist/app/assets/{index.es428-BX-XuKJl.js → index.es409-DHfiUAnz.js} +1 -1
  60. package/dist/app/assets/{index.es431-BVtQbGWk.js → index.es412-bQvISsbk.js} +1 -1
  61. package/dist/app/assets/{index.es435-CzRAsM7q.js → index.es416-C7CtwCRJ.js} +1 -1
  62. package/dist/app/assets/{index.es437-D_UmiHxH.js → index.es418-B5hkHXr8.js} +1 -1
  63. package/dist/app/assets/{index.es445-Bm8V_39j.js → index.es426-BXHyjal4.js} +1 -1
  64. package/dist/app/assets/{index.es446-Wf2I0eqD.js → index.es427-BM_6XnyC.js} +1 -1
  65. package/dist/app/assets/{index.es453-Gs69FCIA.js → index.es434-DBpGJNhA.js} +1 -1
  66. package/dist/app/assets/{index.es454-3-JraJzM.js → index.es435-Bb1HE9Xt.js} +1 -1
  67. package/dist/app/assets/{index.es464-C7bC7aMW.js → index.es445-B3f0M06D.js} +1 -1
  68. package/dist/app/assets/{index.es468-DfkjH5vL.js → index.es449-CMglr8ti.js} +1 -1
  69. package/dist/app/assets/{index.es474-D78hU9hI.js → index.es455-C30KPANW.js} +1 -1
  70. package/dist/app/assets/{index.es479-De4o0oHW.js → index.es460-CKn3c2mr.js} +1 -1
  71. package/dist/app/assets/{index.es480-CLNDiA6D.js → index.es461-J5oGAc1s.js} +1 -1
  72. package/dist/app/assets/{index.es482-CnRcoveV.js → index.es463-Ckr015aR.js} +1 -1
  73. package/dist/app/assets/{index.es486-qlG5fVnA.js → index.es467-D69mlHrC.js} +1 -1
  74. package/dist/app/assets/{index.es488-DTMS730P.js → index.es469-C3BGVGox.js} +1 -1
  75. package/dist/app/assets/{index.es490-C06M4v41.js → index.es471-YOGsheo0.js} +1 -1
  76. package/dist/app/assets/{index.es493-BxjgJJow.js → index.es474-D1T-bslv.js} +1 -1
  77. package/dist/app/assets/{index.es494-DlbKs2fg.js → index.es475-C3EZ2A1a.js} +1 -1
  78. package/dist/app/assets/{index.es498-DalR4GX0.js → index.es479-BQsJ3Zlj.js} +1 -1
  79. package/dist/app/assets/{index.es500-BcWqEBYK.js → index.es481-Bc6XZnwJ.js} +1 -1
  80. package/dist/app/assets/{index.es507-BOX6c_Kn.js → index.es488-0uez_V7d.js} +1 -1
  81. package/dist/app/assets/{index.es509--wACVBhv.js → index.es490-CNos752j.js} +1 -1
  82. package/dist/app/assets/{index.es511-C-Y0Jtd1.js → index.es492-BMmehJ54.js} +1 -1
  83. package/dist/app/assets/{index.es515-RpK-kOK2.js → index.es496-BboA0KbW.js} +1 -1
  84. package/dist/app/assets/{index.es525-DuRYU1r6.js → index.es506-C9Z1rj4W.js} +1 -1
  85. package/dist/app/assets/{index.es526-DWCmcnaA.js → index.es507-DzVnVufD.js} +1 -1
  86. package/dist/app/assets/{index.es533-DsvhN0ks.js → index.es514-DDrMl5dV.js} +1 -1
  87. package/dist/app/assets/{index.es534-BGVyZEaI.js → index.es515-C5B33TrU.js} +1 -1
  88. package/dist/app/assets/{index.es7-Baro92Ee.js → index.es7-B111sUH2.js} +1 -1
  89. package/dist/app/assets/{index.modern-BPeknk47.js → index.modern-GhdSpX2l.js} +1 -1
  90. package/dist/app/assets/{index.umd-DgCSOv4v.js → index.umd-CEs4Lu_D.js} +1 -1
  91. package/dist/app/assets/{listItemTextClasses-BS6WKuj5.js → listItemTextClasses-C21Iyvgy.js} +1 -1
  92. package/dist/app/index.html +2 -2
  93. package/dist/server.js +3473 -30
  94. package/package.json +2 -1
  95. package/src/service/connection.ts +87 -17
  96. package/src/service/db_utils.ts +60 -0
  97. package/src/service/model.ts +1 -0
  98. package/dist/app/assets/FormControlContext-DB8XoAZ6.js +0 -1
  99. package/dist/app/assets/index-BV8rQ2ml.css +0 -1
  100. package/dist/app/assets/index-Dd2_AgmS.js +0 -287
  101. /package/dist/app/assets/{index.es312-CG6Dc4jp.js → index.es293-CG6Dc4jp.js} +0 -0
  102. /package/dist/app/assets/{index.es320-DsBKuouk.js → index.es301-DsBKuouk.js} +0 -0
  103. /package/dist/app/assets/{index.es321-D_z4Izcz.js → index.es302-D_z4Izcz.js} +0 -0
  104. /package/dist/app/assets/{index.es322-727ZlQH0.js → index.es303-727ZlQH0.js} +0 -0
  105. /package/dist/app/assets/{index.es325-Dn00JSTd.js → index.es306-Dn00JSTd.js} +0 -0
  106. /package/dist/app/assets/{index.es326-COJ4H7py.js → index.es307-COJ4H7py.js} +0 -0
  107. /package/dist/app/assets/{index.es328-Bu5BbsvL.js → index.es309-Bu5BbsvL.js} +0 -0
  108. /package/dist/app/assets/{index.es329-7O62HKoU.js → index.es310-7O62HKoU.js} +0 -0
  109. /package/dist/app/assets/{index.es330-BPT9niGB.js → index.es311-BPT9niGB.js} +0 -0
  110. /package/dist/app/assets/{index.es331-Dhn9LcZ4.js → index.es312-Dhn9LcZ4.js} +0 -0
  111. /package/dist/app/assets/{index.es333-eg146-Ew.js → index.es314-eg146-Ew.js} +0 -0
  112. /package/dist/app/assets/{index.es334-Du268qiB.js → index.es315-Du268qiB.js} +0 -0
  113. /package/dist/app/assets/{index.es335-fje9CFhw.js → index.es316-fje9CFhw.js} +0 -0
  114. /package/dist/app/assets/{index.es336-BwXTMy5W.js → index.es317-BwXTMy5W.js} +0 -0
  115. /package/dist/app/assets/{index.es337-3xVqZejG.js → index.es318-3xVqZejG.js} +0 -0
  116. /package/dist/app/assets/{index.es338-xW4inM5L.js → index.es319-xW4inM5L.js} +0 -0
  117. /package/dist/app/assets/{index.es339-DHo0CJ0O.js → index.es320-DHo0CJ0O.js} +0 -0
  118. /package/dist/app/assets/{index.es342-C3t2pwGQ.js → index.es323-C3t2pwGQ.js} +0 -0
  119. /package/dist/app/assets/{index.es343-DNquZEk8.js → index.es324-DNquZEk8.js} +0 -0
  120. /package/dist/app/assets/{index.es345-BHOwM8T6.js → index.es326-BHOwM8T6.js} +0 -0
  121. /package/dist/app/assets/{index.es346-DxSadP1t.js → index.es327-DxSadP1t.js} +0 -0
  122. /package/dist/app/assets/{index.es347-DbXoA79R.js → index.es328-DbXoA79R.js} +0 -0
  123. /package/dist/app/assets/{index.es349-Bp6g37R7.js → index.es330-Bp6g37R7.js} +0 -0
  124. /package/dist/app/assets/{index.es350-sacFqUAJ.js → index.es331-sacFqUAJ.js} +0 -0
  125. /package/dist/app/assets/{index.es352-C7gG9l05.js → index.es333-C7gG9l05.js} +0 -0
  126. /package/dist/app/assets/{index.es353-Dsg_Bt_b.js → index.es334-Dsg_Bt_b.js} +0 -0
  127. /package/dist/app/assets/{index.es356-D9R-vmeu.js → index.es337-D9R-vmeu.js} +0 -0
  128. /package/dist/app/assets/{index.es357-BPhBrDlE.js → index.es338-BPhBrDlE.js} +0 -0
  129. /package/dist/app/assets/{index.es358-C-TU5hQ_.js → index.es339-C-TU5hQ_.js} +0 -0
  130. /package/dist/app/assets/{index.es359-DtFQj3wx.js → index.es340-DtFQj3wx.js} +0 -0
  131. /package/dist/app/assets/{index.es360-m2LEI-9-.js → index.es341-m2LEI-9-.js} +0 -0
  132. /package/dist/app/assets/{index.es361-BoXegm-a.js → index.es342-BoXegm-a.js} +0 -0
  133. /package/dist/app/assets/{index.es362-B9wLZaAG.js → index.es343-B9wLZaAG.js} +0 -0
  134. /package/dist/app/assets/{index.es363-ClGRhx96.js → index.es344-ClGRhx96.js} +0 -0
  135. /package/dist/app/assets/{index.es364-DEIpsLCJ.js → index.es345-DEIpsLCJ.js} +0 -0
  136. /package/dist/app/assets/{index.es365-BgYniUM_.js → index.es346-BgYniUM_.js} +0 -0
  137. /package/dist/app/assets/{index.es366-COcR7UxN.js → index.es347-COcR7UxN.js} +0 -0
  138. /package/dist/app/assets/{index.es367-BjQB5zDj.js → index.es348-BjQB5zDj.js} +0 -0
  139. /package/dist/app/assets/{index.es368-C-nORZOA.js → index.es349-C-nORZOA.js} +0 -0
  140. /package/dist/app/assets/{index.es372-BX77sIaO.js → index.es353-BX77sIaO.js} +0 -0
  141. /package/dist/app/assets/{index.es374-B-DoSBHF.js → index.es355-B-DoSBHF.js} +0 -0
  142. /package/dist/app/assets/{index.es375-bCA53EVm.js → index.es356-bCA53EVm.js} +0 -0
  143. /package/dist/app/assets/{index.es376-w-ucz2PV.js → index.es357-w-ucz2PV.js} +0 -0
  144. /package/dist/app/assets/{index.es377-Dayu4EKP.js → index.es358-Dayu4EKP.js} +0 -0
  145. /package/dist/app/assets/{index.es379-DKXYxT9g.js → index.es360-DKXYxT9g.js} +0 -0
  146. /package/dist/app/assets/{index.es382-DfxzS6Rs.js → index.es363-DfxzS6Rs.js} +0 -0
  147. /package/dist/app/assets/{index.es383-SKMF96pI.js → index.es364-SKMF96pI.js} +0 -0
  148. /package/dist/app/assets/{index.es384-ajMbGru0.js → index.es365-ajMbGru0.js} +0 -0
  149. /package/dist/app/assets/{index.es385--30QC5Em.js → index.es366--30QC5Em.js} +0 -0
  150. /package/dist/app/assets/{index.es388-B430Bg39.js → index.es369-B430Bg39.js} +0 -0
  151. /package/dist/app/assets/{index.es392-CM8KxXT1.js → index.es373-CM8KxXT1.js} +0 -0
  152. /package/dist/app/assets/{index.es393-B1SYOhNW.js → index.es374-B1SYOhNW.js} +0 -0
  153. /package/dist/app/assets/{index.es395-DkBy-JyN.js → index.es376-DkBy-JyN.js} +0 -0
  154. /package/dist/app/assets/{index.es399-BILxekzW.js → index.es380-BILxekzW.js} +0 -0
  155. /package/dist/app/assets/{index.es400-C5wWYbrZ.js → index.es381-C5wWYbrZ.js} +0 -0
  156. /package/dist/app/assets/{index.es401-HzYwdGDm.js → index.es382-HzYwdGDm.js} +0 -0
  157. /package/dist/app/assets/{index.es402-T-Tgc4AT.js → index.es383-T-Tgc4AT.js} +0 -0
  158. /package/dist/app/assets/{index.es403-ifBTmRxC.js → index.es384-ifBTmRxC.js} +0 -0
  159. /package/dist/app/assets/{index.es408-BMj5Y0dO.js → index.es389-BMj5Y0dO.js} +0 -0
  160. /package/dist/app/assets/{index.es410-BjABl1g7.js → index.es391-BjABl1g7.js} +0 -0
  161. /package/dist/app/assets/{index.es411-xI-RfyKK.js → index.es392-xI-RfyKK.js} +0 -0
  162. /package/dist/app/assets/{index.es412-ySlJ1b_l.js → index.es393-ySlJ1b_l.js} +0 -0
  163. /package/dist/app/assets/{index.es415-BQoSv7ci.js → index.es396-BQoSv7ci.js} +0 -0
  164. /package/dist/app/assets/{index.es416-w8dY5SsB.js → index.es397-w8dY5SsB.js} +0 -0
  165. /package/dist/app/assets/{index.es417-TU54ms6u.js → index.es398-TU54ms6u.js} +0 -0
  166. /package/dist/app/assets/{index.es418-DREVFZK8.js → index.es399-DREVFZK8.js} +0 -0
  167. /package/dist/app/assets/{index.es419-BfivnA6A.js → index.es400-BfivnA6A.js} +0 -0
  168. /package/dist/app/assets/{index.es420-P4WzXJd0.js → index.es401-P4WzXJd0.js} +0 -0
  169. /package/dist/app/assets/{index.es421-BAng5TT0.js → index.es402-BAng5TT0.js} +0 -0
  170. /package/dist/app/assets/{index.es423-B5lbUyaz.js → index.es404-B5lbUyaz.js} +0 -0
  171. /package/dist/app/assets/{index.es424-mebxcVVE.js → index.es405-mebxcVVE.js} +0 -0
  172. /package/dist/app/assets/{index.es426-XBlWyCtg.js → index.es407-XBlWyCtg.js} +0 -0
  173. /package/dist/app/assets/{index.es427-BfCpw3nA.js → index.es408-BfCpw3nA.js} +0 -0
  174. /package/dist/app/assets/{index.es429-Cc5clBb7.js → index.es410-Cc5clBb7.js} +0 -0
  175. /package/dist/app/assets/{index.es430-IuBKFhSY.js → index.es411-IuBKFhSY.js} +0 -0
  176. /package/dist/app/assets/{index.es432-Du5NY7AG.js → index.es413-Du5NY7AG.js} +0 -0
  177. /package/dist/app/assets/{index.es433-Bvotw-X0.js → index.es414-Bvotw-X0.js} +0 -0
  178. /package/dist/app/assets/{index.es434-UIAJJxZW.js → index.es415-UIAJJxZW.js} +0 -0
  179. /package/dist/app/assets/{index.es436-D9-PGadD.js → index.es417-D9-PGadD.js} +0 -0
  180. /package/dist/app/assets/{index.es438-sdHcTMYB.js → index.es419-sdHcTMYB.js} +0 -0
  181. /package/dist/app/assets/{index.es439-Ci6OQyBP.js → index.es420-Ci6OQyBP.js} +0 -0
  182. /package/dist/app/assets/{index.es440-BC5c_5Pe.js → index.es421-BC5c_5Pe.js} +0 -0
  183. /package/dist/app/assets/{index.es441-Tz6hzZYG.js → index.es422-Tz6hzZYG.js} +0 -0
  184. /package/dist/app/assets/{index.es442-DB_GagMm.js → index.es423-DB_GagMm.js} +0 -0
  185. /package/dist/app/assets/{index.es443-DLbgOhZU.js → index.es424-DLbgOhZU.js} +0 -0
  186. /package/dist/app/assets/{index.es444-B0XVJmRM.js → index.es425-B0XVJmRM.js} +0 -0
  187. /package/dist/app/assets/{index.es447-shcSOmrb.js → index.es428-shcSOmrb.js} +0 -0
  188. /package/dist/app/assets/{index.es448-D4Tzg5kh.js → index.es429-D4Tzg5kh.js} +0 -0
  189. /package/dist/app/assets/{index.es449-Deuh7S70.js → index.es430-Deuh7S70.js} +0 -0
  190. /package/dist/app/assets/{index.es450-BUEGK8hf.js → index.es431-BUEGK8hf.js} +0 -0
  191. /package/dist/app/assets/{index.es451-BNioltXt.js → index.es432-BNioltXt.js} +0 -0
  192. /package/dist/app/assets/{index.es452-JqZropPD.js → index.es433-JqZropPD.js} +0 -0
  193. /package/dist/app/assets/{index.es455-LKU2TuZ1.js → index.es436-LKU2TuZ1.js} +0 -0
  194. /package/dist/app/assets/{index.es456-BFLt1xDp.js → index.es437-BFLt1xDp.js} +0 -0
  195. /package/dist/app/assets/{index.es457-DKykz6zU.js → index.es438-DKykz6zU.js} +0 -0
  196. /package/dist/app/assets/{index.es458-B3ZDOciz.js → index.es439-B3ZDOciz.js} +0 -0
  197. /package/dist/app/assets/{index.es459-CSHBycmS.js → index.es440-CSHBycmS.js} +0 -0
  198. /package/dist/app/assets/{index.es460-BIEUsx6d.js → index.es441-BIEUsx6d.js} +0 -0
  199. /package/dist/app/assets/{index.es461-B48N-Iqd.js → index.es442-B48N-Iqd.js} +0 -0
  200. /package/dist/app/assets/{index.es462-BY-TUvya.js → index.es443-BY-TUvya.js} +0 -0
  201. /package/dist/app/assets/{index.es463-zocC4JxJ.js → index.es444-zocC4JxJ.js} +0 -0
  202. /package/dist/app/assets/{index.es465-Cza_XSSt.js → index.es446-Cza_XSSt.js} +0 -0
  203. /package/dist/app/assets/{index.es466-Bg-kzb6g.js → index.es447-Bg-kzb6g.js} +0 -0
  204. /package/dist/app/assets/{index.es467-DhUJRlN_.js → index.es448-DhUJRlN_.js} +0 -0
  205. /package/dist/app/assets/{index.es469-C8lEn-DE.js → index.es450-C8lEn-DE.js} +0 -0
  206. /package/dist/app/assets/{index.es470-DhMKtDLN.js → index.es451-DhMKtDLN.js} +0 -0
  207. /package/dist/app/assets/{index.es471-CwjWoCRV.js → index.es452-CwjWoCRV.js} +0 -0
  208. /package/dist/app/assets/{index.es472-CzouJOBO.js → index.es453-CzouJOBO.js} +0 -0
  209. /package/dist/app/assets/{index.es473-B1bQXN8T.js → index.es454-B1bQXN8T.js} +0 -0
  210. /package/dist/app/assets/{index.es475-5LuOXUq_.js → index.es456-5LuOXUq_.js} +0 -0
  211. /package/dist/app/assets/{index.es476-DWJ3fJO_.js → index.es457-DWJ3fJO_.js} +0 -0
  212. /package/dist/app/assets/{index.es477-DJlmqQ1C.js → index.es458-DJlmqQ1C.js} +0 -0
  213. /package/dist/app/assets/{index.es478-QhoSD0DR.js → index.es459-QhoSD0DR.js} +0 -0
  214. /package/dist/app/assets/{index.es481-Be6lgOlo.js → index.es462-Be6lgOlo.js} +0 -0
  215. /package/dist/app/assets/{index.es483-BJ4Li9vH.js → index.es464-BJ4Li9vH.js} +0 -0
  216. /package/dist/app/assets/{index.es484-DQVVAn-B.js → index.es465-DQVVAn-B.js} +0 -0
  217. /package/dist/app/assets/{index.es485-BJGe-b2p.js → index.es466-BJGe-b2p.js} +0 -0
  218. /package/dist/app/assets/{index.es487-BLhTXw86.js → index.es468-BLhTXw86.js} +0 -0
  219. /package/dist/app/assets/{index.es489-atvbtKCR.js → index.es470-atvbtKCR.js} +0 -0
  220. /package/dist/app/assets/{index.es491-DkLiglaE.js → index.es472-DkLiglaE.js} +0 -0
  221. /package/dist/app/assets/{index.es492-C1w2a3ep.js → index.es473-C1w2a3ep.js} +0 -0
  222. /package/dist/app/assets/{index.es495-Cf8iN4DR.js → index.es476-Cf8iN4DR.js} +0 -0
  223. /package/dist/app/assets/{index.es496-COK4E0Yg.js → index.es477-COK4E0Yg.js} +0 -0
  224. /package/dist/app/assets/{index.es497-BknIz3MU.js → index.es478-BknIz3MU.js} +0 -0
  225. /package/dist/app/assets/{index.es499-BeQkCIfX.js → index.es480-BeQkCIfX.js} +0 -0
  226. /package/dist/app/assets/{index.es501-BSxZ-RaX.js → index.es482-BSxZ-RaX.js} +0 -0
  227. /package/dist/app/assets/{index.es502-C7L56vO4.js → index.es483-C7L56vO4.js} +0 -0
  228. /package/dist/app/assets/{index.es503-CUnW07Te.js → index.es484-CUnW07Te.js} +0 -0
  229. /package/dist/app/assets/{index.es504-C1XDQQGZ.js → index.es485-C1XDQQGZ.js} +0 -0
  230. /package/dist/app/assets/{index.es505-CQjiPCtT.js → index.es486-CQjiPCtT.js} +0 -0
  231. /package/dist/app/assets/{index.es506-DQ1-QYvQ.js → index.es487-DQ1-QYvQ.js} +0 -0
  232. /package/dist/app/assets/{index.es508-BbSNqyBO.js → index.es489-BbSNqyBO.js} +0 -0
  233. /package/dist/app/assets/{index.es510-CB2ApiWb.js → index.es491-CB2ApiWb.js} +0 -0
  234. /package/dist/app/assets/{index.es512-B_m7g4N7.js → index.es493-B_m7g4N7.js} +0 -0
  235. /package/dist/app/assets/{index.es513-B6W0miNI.js → index.es494-B6W0miNI.js} +0 -0
  236. /package/dist/app/assets/{index.es514-BMR_PYu6.js → index.es495-BMR_PYu6.js} +0 -0
  237. /package/dist/app/assets/{index.es516-Dj6nwHGl.js → index.es497-Dj6nwHGl.js} +0 -0
  238. /package/dist/app/assets/{index.es517-BpWG_bgh.js → index.es498-BpWG_bgh.js} +0 -0
  239. /package/dist/app/assets/{index.es518-BVUVsWT6.js → index.es499-BVUVsWT6.js} +0 -0
  240. /package/dist/app/assets/{index.es519-CAQ2eGtk.js → index.es500-CAQ2eGtk.js} +0 -0
  241. /package/dist/app/assets/{index.es520-BFOHcciG.js → index.es501-BFOHcciG.js} +0 -0
  242. /package/dist/app/assets/{index.es521-CdO5JTpU.js → index.es502-CdO5JTpU.js} +0 -0
  243. /package/dist/app/assets/{index.es522-CJaU5se_.js → index.es503-CJaU5se_.js} +0 -0
  244. /package/dist/app/assets/{index.es523-DYoNaHQp.js → index.es504-DYoNaHQp.js} +0 -0
  245. /package/dist/app/assets/{index.es524-m4uW47V2.js → index.es505-m4uW47V2.js} +0 -0
  246. /package/dist/app/assets/{index.es527-nyqBNV6O.js → index.es508-nyqBNV6O.js} +0 -0
  247. /package/dist/app/assets/{index.es528-C6j12Q_x.js → index.es509-C6j12Q_x.js} +0 -0
  248. /package/dist/app/assets/{index.es529-7A4Fjokl.js → index.es510-7A4Fjokl.js} +0 -0
  249. /package/dist/app/assets/{index.es530-CB0Krxn9.js → index.es511-CB0Krxn9.js} +0 -0
  250. /package/dist/app/assets/{index.es531-DCE3LsBG.js → index.es512-DCE3LsBG.js} +0 -0
  251. /package/dist/app/assets/{index.es532-C3FkfJm5.js → index.es513-C3FkfJm5.js} +0 -0
  252. /package/dist/app/assets/{index.es535-CVw76BM1.js → index.es516-CVw76BM1.js} +0 -0
  253. /package/dist/app/assets/{index.es536-HnGAYVZD.js → index.es517-HnGAYVZD.js} +0 -0
  254. /package/dist/app/assets/{index.es537-BVz_zdnA.js → index.es518-BVz_zdnA.js} +0 -0
  255. /package/dist/app/assets/{index.es538-C3khCPGq.js → index.es519-C3khCPGq.js} +0 -0
  256. /package/dist/app/assets/{index.es539-D-2ljcwZ.js → index.es520-D-2ljcwZ.js} +0 -0
  257. /package/dist/app/assets/{index.es540-Cv9koXgw.js → index.es521-Cv9koXgw.js} +0 -0
  258. /package/dist/app/assets/{index.es541-CD_QflpE.js → index.es522-CD_QflpE.js} +0 -0
  259. /package/dist/app/assets/{index.es542-DRW-0cLl.js → index.es523-DRW-0cLl.js} +0 -0
  260. /package/dist/app/assets/{index.es543-C-_shW-Y.js → index.es524-C-_shW-Y.js} +0 -0
  261. /package/dist/app/assets/{index.es544-LGGdnPYs.js → index.es525-LGGdnPYs.js} +0 -0
  262. /package/dist/app/assets/{index.es545-C3mMm8J8.js → index.es526-C3mMm8J8.js} +0 -0
  263. /package/dist/app/assets/{index.es546-BzJJZx-M.js → index.es527-BzJJZx-M.js} +0 -0
  264. /package/dist/app/assets/{index.es547-BXkSAIEj.js → index.es528-BXkSAIEj.js} +0 -0
  265. /package/dist/app/assets/{index.es548-BgDCqdQA.js → index.es529-BgDCqdQA.js} +0 -0
  266. /package/dist/app/assets/{index.es549-C8M2exoo.js → index.es530-C8M2exoo.js} +0 -0
  267. /package/dist/app/assets/{index.es550-DHJKELXO.js → index.es531-DHJKELXO.js} +0 -0
  268. /package/dist/app/assets/{index.es551-Cuk6v7N8.js → index.es532-Cuk6v7N8.js} +0 -0
  269. /package/dist/app/assets/{index.es552-DH5Ifo-i.js → index.es533-DH5Ifo-i.js} +0 -0
  270. /package/dist/app/assets/{index.es553-E3gJ1_iC.js → index.es534-E3gJ1_iC.js} +0 -0
  271. /package/dist/app/assets/{index.es554-DAi9KRSo.js → index.es535-DAi9KRSo.js} +0 -0
  272. /package/dist/app/assets/{index.es555-D7oLnXFd.js → index.es536-D7oLnXFd.js} +0 -0
  273. /package/dist/app/assets/{index.es556-BfjtVDDH.js → index.es537-BfjtVDDH.js} +0 -0
  274. /package/dist/app/assets/{index.es557-DnULxvSX.js → index.es538-DnULxvSX.js} +0 -0
  275. /package/dist/app/assets/{index.es558-CkXjmgJE.js → index.es539-CkXjmgJE.js} +0 -0
  276. /package/dist/app/assets/{index.es559-CfQXZHmo.js → index.es540-CfQXZHmo.js} +0 -0
  277. /package/dist/app/assets/{index.es560-DWedfzmr.js → index.es541-DWedfzmr.js} +0 -0
  278. /package/dist/app/assets/{index.es561-DUszq2jm.js → index.es542-DUszq2jm.js} +0 -0
  279. /package/dist/app/assets/{index.es562-B7mTdjB0.js → index.es543-B7mTdjB0.js} +0 -0
  280. /package/dist/app/assets/{index.es563-D5KoaKCx.js → index.es544-D5KoaKCx.js} +0 -0
  281. /package/dist/app/assets/{index.es564-BfHTSMKl.js → index.es545-BfHTSMKl.js} +0 -0
  282. /package/dist/app/assets/{index.es565-B0m2ddpp.js → index.es546-B0m2ddpp.js} +0 -0
  283. /package/dist/app/assets/{index.es566-CyktbL80.js → index.es547-CyktbL80.js} +0 -0
  284. /package/dist/app/assets/{index.es567-Csfq5Kiy.js → index.es548-Csfq5Kiy.js} +0 -0
  285. /package/dist/app/assets/{index.es568-CafNBF8u.js → index.es549-CafNBF8u.js} +0 -0
  286. /package/dist/app/assets/{index.es569-CTRr51gU.js → index.es550-CTRr51gU.js} +0 -0
  287. /package/dist/app/assets/{index.es570-D4h5O-jR.js → index.es551-D4h5O-jR.js} +0 -0
  288. /package/dist/app/assets/{index.es571-C39BiMTA.js → index.es552-C39BiMTA.js} +0 -0
  289. /package/dist/app/assets/{index.es572-Ddv68eIx.js → index.es553-Ddv68eIx.js} +0 -0
  290. /package/dist/app/assets/{index.es573-GBQ2dnAY.js → index.es554-GBQ2dnAY.js} +0 -0
  291. /package/dist/app/assets/{index.es574-PoHY5YXO.js → index.es555-PoHY5YXO.js} +0 -0
  292. /package/dist/app/assets/{index.es575-3e1v2bzS.js → index.es556-3e1v2bzS.js} +0 -0
  293. /package/dist/app/assets/{index.es576-CS3Unz2-.js → index.es557-CS3Unz2-.js} +0 -0
  294. /package/dist/app/assets/{index.es577-bN70gL4F.js → index.es558-bN70gL4F.js} +0 -0
  295. /package/dist/app/assets/{index.es578-CmCqftbK.js → index.es559-CmCqftbK.js} +0 -0
  296. /package/dist/app/assets/{index.es579-Ds-gbosJ.js → index.es560-Ds-gbosJ.js} +0 -0
  297. /package/dist/app/assets/{index.es580-CjDtw9vr.js → index.es561-CjDtw9vr.js} +0 -0
  298. /package/dist/app/assets/{index.es581-BthQWCQV.js → index.es562-BthQWCQV.js} +0 -0
  299. /package/dist/app/assets/{index.es582-DqwNpetd.js → index.es563-DqwNpetd.js} +0 -0
  300. /package/dist/app/assets/{index.es583-Bw305WKR.js → index.es564-Bw305WKR.js} +0 -0
  301. /package/dist/app/assets/{index.es584-DXbdFlpD.js → index.es565-DXbdFlpD.js} +0 -0
  302. /package/dist/app/assets/{index.es585-L9t79GZl.js → index.es566-L9t79GZl.js} +0 -0
  303. /package/dist/app/assets/{index.es586-CbfX1IO0.js → index.es567-CbfX1IO0.js} +0 -0
  304. /package/dist/app/assets/{index.es587-DBQeEorK.js → index.es568-DBQeEorK.js} +0 -0
  305. /package/dist/app/assets/{index.es588-BEBZ7ncR.js → index.es569-BEBZ7ncR.js} +0 -0
  306. /package/dist/app/assets/{index.es589-Bkuqu6BP.js → index.es570-Bkuqu6BP.js} +0 -0
  307. /package/dist/app/assets/{index.es590-D0r3Knsf.js → index.es571-D0r3Knsf.js} +0 -0
  308. /package/dist/app/assets/{index.es591-CVO1_9PV.js → index.es572-CVO1_9PV.js} +0 -0
package/dist/server.js CHANGED
@@ -111348,7 +111348,7 @@ var require_tslib = __commonJS((exports2, module2) => {
111348
111348
  var __awaiter;
111349
111349
  var __generator;
111350
111350
  var __exportStar;
111351
- var __values;
111351
+ var __values2;
111352
111352
  var __read;
111353
111353
  var __spread;
111354
111354
  var __spreadArrays;
@@ -111629,7 +111629,7 @@ var require_tslib = __commonJS((exports2, module2) => {
111629
111629
  k2 = k;
111630
111630
  o[k2] = m[k];
111631
111631
  };
111632
- __values = function(o) {
111632
+ __values2 = function(o) {
111633
111633
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
111634
111634
  if (m)
111635
111635
  return m.call(o);
@@ -111752,7 +111752,7 @@ var require_tslib = __commonJS((exports2, module2) => {
111752
111752
  if (!Symbol.asyncIterator)
111753
111753
  throw new TypeError("Symbol.asyncIterator is not defined.");
111754
111754
  var m = o[Symbol.asyncIterator], i;
111755
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
111755
+ return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
111756
111756
  return this;
111757
111757
  }, i);
111758
111758
  function verb(n) {
@@ -111917,7 +111917,7 @@ var require_tslib = __commonJS((exports2, module2) => {
111917
111917
  exporter("__generator", __generator);
111918
111918
  exporter("__exportStar", __exportStar);
111919
111919
  exporter("__createBinding", __createBinding);
111920
- exporter("__values", __values);
111920
+ exporter("__values", __values2);
111921
111921
  exporter("__read", __read);
111922
111922
  exporter("__spread", __spread);
111923
111923
  exporter("__spreadArrays", __spreadArrays);
@@ -190024,6 +190024,3357 @@ var require_snowflake_sdk = __commonJS((exports2, module2) => {
190024
190024
  module2.exports = require_snowflake();
190025
190025
  });
190026
190026
 
190027
+ // ../../node_modules/trino-client/node_modules/axios/dist/node/axios.cjs
190028
+ var require_axios2 = __commonJS((exports2, module2) => {
190029
+ /*! Axios v1.11.0 Copyright (c) 2025 Matt Zabriskie and contributors */
190030
+ var FormData$1 = require_form_data();
190031
+ var crypto2 = require("crypto");
190032
+ var url = require("url");
190033
+ var proxyFromEnv = require_proxy_from_env();
190034
+ var http = require("http");
190035
+ var https = require("https");
190036
+ var util3 = require("util");
190037
+ var followRedirects = require_follow_redirects();
190038
+ var zlib = require("zlib");
190039
+ var stream = require("stream");
190040
+ var events = require("events");
190041
+ function _interopDefaultLegacy(e) {
190042
+ return e && typeof e === "object" && "default" in e ? e : { default: e };
190043
+ }
190044
+ var FormData__default = /* @__PURE__ */ _interopDefaultLegacy(FormData$1);
190045
+ var crypto__default = /* @__PURE__ */ _interopDefaultLegacy(crypto2);
190046
+ var url__default = /* @__PURE__ */ _interopDefaultLegacy(url);
190047
+ var proxyFromEnv__default = /* @__PURE__ */ _interopDefaultLegacy(proxyFromEnv);
190048
+ var http__default = /* @__PURE__ */ _interopDefaultLegacy(http);
190049
+ var https__default = /* @__PURE__ */ _interopDefaultLegacy(https);
190050
+ var util__default = /* @__PURE__ */ _interopDefaultLegacy(util3);
190051
+ var followRedirects__default = /* @__PURE__ */ _interopDefaultLegacy(followRedirects);
190052
+ var zlib__default = /* @__PURE__ */ _interopDefaultLegacy(zlib);
190053
+ var stream__default = /* @__PURE__ */ _interopDefaultLegacy(stream);
190054
+ function bind(fn, thisArg) {
190055
+ return function wrap() {
190056
+ return fn.apply(thisArg, arguments);
190057
+ };
190058
+ }
190059
+ var { toString: toString2 } = Object.prototype;
190060
+ var { getPrototypeOf } = Object;
190061
+ var { iterator, toStringTag } = Symbol;
190062
+ var kindOf = ((cache) => (thing) => {
190063
+ const str = toString2.call(thing);
190064
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
190065
+ })(Object.create(null));
190066
+ var kindOfTest = (type) => {
190067
+ type = type.toLowerCase();
190068
+ return (thing) => kindOf(thing) === type;
190069
+ };
190070
+ var typeOfTest = (type) => (thing) => typeof thing === type;
190071
+ var { isArray } = Array;
190072
+ var isUndefined = typeOfTest("undefined");
190073
+ function isBuffer(val) {
190074
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
190075
+ }
190076
+ var isArrayBuffer = kindOfTest("ArrayBuffer");
190077
+ function isArrayBufferView(val) {
190078
+ let result;
190079
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
190080
+ result = ArrayBuffer.isView(val);
190081
+ } else {
190082
+ result = val && val.buffer && isArrayBuffer(val.buffer);
190083
+ }
190084
+ return result;
190085
+ }
190086
+ var isString = typeOfTest("string");
190087
+ var isFunction = typeOfTest("function");
190088
+ var isNumber = typeOfTest("number");
190089
+ var isObject = (thing) => thing !== null && typeof thing === "object";
190090
+ var isBoolean = (thing) => thing === true || thing === false;
190091
+ var isPlainObject = (val) => {
190092
+ if (kindOf(val) !== "object") {
190093
+ return false;
190094
+ }
190095
+ const prototype2 = getPrototypeOf(val);
190096
+ return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
190097
+ };
190098
+ var isEmptyObject = (val) => {
190099
+ if (!isObject(val) || isBuffer(val)) {
190100
+ return false;
190101
+ }
190102
+ try {
190103
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
190104
+ } catch (e) {
190105
+ return false;
190106
+ }
190107
+ };
190108
+ var isDate = kindOfTest("Date");
190109
+ var isFile = kindOfTest("File");
190110
+ var isBlob2 = kindOfTest("Blob");
190111
+ var isFileList = kindOfTest("FileList");
190112
+ var isStream = (val) => isObject(val) && isFunction(val.pipe);
190113
+ var isFormData = (thing) => {
190114
+ let kind;
190115
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
190116
+ };
190117
+ var isURLSearchParams = kindOfTest("URLSearchParams");
190118
+ var [isReadableStream2, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
190119
+ var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
190120
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
190121
+ if (obj === null || typeof obj === "undefined") {
190122
+ return;
190123
+ }
190124
+ let i;
190125
+ let l;
190126
+ if (typeof obj !== "object") {
190127
+ obj = [obj];
190128
+ }
190129
+ if (isArray(obj)) {
190130
+ for (i = 0, l = obj.length;i < l; i++) {
190131
+ fn.call(null, obj[i], i, obj);
190132
+ }
190133
+ } else {
190134
+ if (isBuffer(obj)) {
190135
+ return;
190136
+ }
190137
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
190138
+ const len = keys.length;
190139
+ let key;
190140
+ for (i = 0;i < len; i++) {
190141
+ key = keys[i];
190142
+ fn.call(null, obj[key], key, obj);
190143
+ }
190144
+ }
190145
+ }
190146
+ function findKey(obj, key) {
190147
+ if (isBuffer(obj)) {
190148
+ return null;
190149
+ }
190150
+ key = key.toLowerCase();
190151
+ const keys = Object.keys(obj);
190152
+ let i = keys.length;
190153
+ let _key;
190154
+ while (i-- > 0) {
190155
+ _key = keys[i];
190156
+ if (key === _key.toLowerCase()) {
190157
+ return _key;
190158
+ }
190159
+ }
190160
+ return null;
190161
+ }
190162
+ var _global = (() => {
190163
+ if (typeof globalThis !== "undefined")
190164
+ return globalThis;
190165
+ return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
190166
+ })();
190167
+ var isContextDefined = (context2) => !isUndefined(context2) && context2 !== _global;
190168
+ function merge() {
190169
+ const { caseless } = isContextDefined(this) && this || {};
190170
+ const result = {};
190171
+ const assignValue = (val, key) => {
190172
+ const targetKey = caseless && findKey(result, key) || key;
190173
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
190174
+ result[targetKey] = merge(result[targetKey], val);
190175
+ } else if (isPlainObject(val)) {
190176
+ result[targetKey] = merge({}, val);
190177
+ } else if (isArray(val)) {
190178
+ result[targetKey] = val.slice();
190179
+ } else {
190180
+ result[targetKey] = val;
190181
+ }
190182
+ };
190183
+ for (let i = 0, l = arguments.length;i < l; i++) {
190184
+ arguments[i] && forEach(arguments[i], assignValue);
190185
+ }
190186
+ return result;
190187
+ }
190188
+ var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
190189
+ forEach(b, (val, key) => {
190190
+ if (thisArg && isFunction(val)) {
190191
+ a[key] = bind(val, thisArg);
190192
+ } else {
190193
+ a[key] = val;
190194
+ }
190195
+ }, { allOwnKeys });
190196
+ return a;
190197
+ };
190198
+ var stripBOM = (content) => {
190199
+ if (content.charCodeAt(0) === 65279) {
190200
+ content = content.slice(1);
190201
+ }
190202
+ return content;
190203
+ };
190204
+ var inherits = (constructor, superConstructor, props, descriptors2) => {
190205
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
190206
+ constructor.prototype.constructor = constructor;
190207
+ Object.defineProperty(constructor, "super", {
190208
+ value: superConstructor.prototype
190209
+ });
190210
+ props && Object.assign(constructor.prototype, props);
190211
+ };
190212
+ var toFlatObject = (sourceObj, destObj, filter, propFilter) => {
190213
+ let props;
190214
+ let i;
190215
+ let prop;
190216
+ const merged = {};
190217
+ destObj = destObj || {};
190218
+ if (sourceObj == null)
190219
+ return destObj;
190220
+ do {
190221
+ props = Object.getOwnPropertyNames(sourceObj);
190222
+ i = props.length;
190223
+ while (i-- > 0) {
190224
+ prop = props[i];
190225
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
190226
+ destObj[prop] = sourceObj[prop];
190227
+ merged[prop] = true;
190228
+ }
190229
+ }
190230
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
190231
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
190232
+ return destObj;
190233
+ };
190234
+ var endsWith = (str, searchString, position) => {
190235
+ str = String(str);
190236
+ if (position === undefined || position > str.length) {
190237
+ position = str.length;
190238
+ }
190239
+ position -= searchString.length;
190240
+ const lastIndex = str.indexOf(searchString, position);
190241
+ return lastIndex !== -1 && lastIndex === position;
190242
+ };
190243
+ var toArray = (thing) => {
190244
+ if (!thing)
190245
+ return null;
190246
+ if (isArray(thing))
190247
+ return thing;
190248
+ let i = thing.length;
190249
+ if (!isNumber(i))
190250
+ return null;
190251
+ const arr = new Array(i);
190252
+ while (i-- > 0) {
190253
+ arr[i] = thing[i];
190254
+ }
190255
+ return arr;
190256
+ };
190257
+ var isTypedArray = ((TypedArray) => {
190258
+ return (thing) => {
190259
+ return TypedArray && thing instanceof TypedArray;
190260
+ };
190261
+ })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
190262
+ var forEachEntry = (obj, fn) => {
190263
+ const generator = obj && obj[iterator];
190264
+ const _iterator = generator.call(obj);
190265
+ let result;
190266
+ while ((result = _iterator.next()) && !result.done) {
190267
+ const pair = result.value;
190268
+ fn.call(obj, pair[0], pair[1]);
190269
+ }
190270
+ };
190271
+ var matchAll = (regExp, str) => {
190272
+ let matches;
190273
+ const arr = [];
190274
+ while ((matches = regExp.exec(str)) !== null) {
190275
+ arr.push(matches);
190276
+ }
190277
+ return arr;
190278
+ };
190279
+ var isHTMLForm = kindOfTest("HTMLFormElement");
190280
+ var toCamelCase = (str) => {
190281
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
190282
+ return p1.toUpperCase() + p2;
190283
+ });
190284
+ };
190285
+ var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
190286
+ var isRegExp = kindOfTest("RegExp");
190287
+ var reduceDescriptors = (obj, reducer) => {
190288
+ const descriptors2 = Object.getOwnPropertyDescriptors(obj);
190289
+ const reducedDescriptors = {};
190290
+ forEach(descriptors2, (descriptor, name) => {
190291
+ let ret;
190292
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
190293
+ reducedDescriptors[name] = ret || descriptor;
190294
+ }
190295
+ });
190296
+ Object.defineProperties(obj, reducedDescriptors);
190297
+ };
190298
+ var freezeMethods = (obj) => {
190299
+ reduceDescriptors(obj, (descriptor, name) => {
190300
+ if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
190301
+ return false;
190302
+ }
190303
+ const value = obj[name];
190304
+ if (!isFunction(value))
190305
+ return;
190306
+ descriptor.enumerable = false;
190307
+ if ("writable" in descriptor) {
190308
+ descriptor.writable = false;
190309
+ return;
190310
+ }
190311
+ if (!descriptor.set) {
190312
+ descriptor.set = () => {
190313
+ throw Error("Can not rewrite read-only method '" + name + "'");
190314
+ };
190315
+ }
190316
+ });
190317
+ };
190318
+ var toObjectSet = (arrayOrString, delimiter) => {
190319
+ const obj = {};
190320
+ const define2 = (arr) => {
190321
+ arr.forEach((value) => {
190322
+ obj[value] = true;
190323
+ });
190324
+ };
190325
+ isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));
190326
+ return obj;
190327
+ };
190328
+ var noop = () => {};
190329
+ var toFiniteNumber = (value, defaultValue) => {
190330
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
190331
+ };
190332
+ function isSpecCompliantForm(thing) {
190333
+ return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
190334
+ }
190335
+ var toJSONObject = (obj) => {
190336
+ const stack = new Array(10);
190337
+ const visit = (source, i) => {
190338
+ if (isObject(source)) {
190339
+ if (stack.indexOf(source) >= 0) {
190340
+ return;
190341
+ }
190342
+ if (isBuffer(source)) {
190343
+ return source;
190344
+ }
190345
+ if (!("toJSON" in source)) {
190346
+ stack[i] = source;
190347
+ const target = isArray(source) ? [] : {};
190348
+ forEach(source, (value, key) => {
190349
+ const reducedValue = visit(value, i + 1);
190350
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
190351
+ });
190352
+ stack[i] = undefined;
190353
+ return target;
190354
+ }
190355
+ }
190356
+ return source;
190357
+ };
190358
+ return visit(obj, 0);
190359
+ };
190360
+ var isAsyncFn = kindOfTest("AsyncFunction");
190361
+ var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
190362
+ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
190363
+ if (setImmediateSupported) {
190364
+ return setImmediate;
190365
+ }
190366
+ return postMessageSupported ? ((token, callbacks) => {
190367
+ _global.addEventListener("message", ({ source, data }) => {
190368
+ if (source === _global && data === token) {
190369
+ callbacks.length && callbacks.shift()();
190370
+ }
190371
+ }, false);
190372
+ return (cb) => {
190373
+ callbacks.push(cb);
190374
+ _global.postMessage(token, "*");
190375
+ };
190376
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
190377
+ })(typeof setImmediate === "function", isFunction(_global.postMessage));
190378
+ var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
190379
+ var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
190380
+ var utils$1 = {
190381
+ isArray,
190382
+ isArrayBuffer,
190383
+ isBuffer,
190384
+ isFormData,
190385
+ isArrayBufferView,
190386
+ isString,
190387
+ isNumber,
190388
+ isBoolean,
190389
+ isObject,
190390
+ isPlainObject,
190391
+ isEmptyObject,
190392
+ isReadableStream: isReadableStream2,
190393
+ isRequest,
190394
+ isResponse,
190395
+ isHeaders,
190396
+ isUndefined,
190397
+ isDate,
190398
+ isFile,
190399
+ isBlob: isBlob2,
190400
+ isRegExp,
190401
+ isFunction,
190402
+ isStream,
190403
+ isURLSearchParams,
190404
+ isTypedArray,
190405
+ isFileList,
190406
+ forEach,
190407
+ merge,
190408
+ extend,
190409
+ trim,
190410
+ stripBOM,
190411
+ inherits,
190412
+ toFlatObject,
190413
+ kindOf,
190414
+ kindOfTest,
190415
+ endsWith,
190416
+ toArray,
190417
+ forEachEntry,
190418
+ matchAll,
190419
+ isHTMLForm,
190420
+ hasOwnProperty,
190421
+ hasOwnProp: hasOwnProperty,
190422
+ reduceDescriptors,
190423
+ freezeMethods,
190424
+ toObjectSet,
190425
+ toCamelCase,
190426
+ noop,
190427
+ toFiniteNumber,
190428
+ findKey,
190429
+ global: _global,
190430
+ isContextDefined,
190431
+ isSpecCompliantForm,
190432
+ toJSONObject,
190433
+ isAsyncFn,
190434
+ isThenable,
190435
+ setImmediate: _setImmediate,
190436
+ asap,
190437
+ isIterable
190438
+ };
190439
+ function AxiosError(message, code, config, request, response) {
190440
+ Error.call(this);
190441
+ if (Error.captureStackTrace) {
190442
+ Error.captureStackTrace(this, this.constructor);
190443
+ } else {
190444
+ this.stack = new Error().stack;
190445
+ }
190446
+ this.message = message;
190447
+ this.name = "AxiosError";
190448
+ code && (this.code = code);
190449
+ config && (this.config = config);
190450
+ request && (this.request = request);
190451
+ if (response) {
190452
+ this.response = response;
190453
+ this.status = response.status ? response.status : null;
190454
+ }
190455
+ }
190456
+ utils$1.inherits(AxiosError, Error, {
190457
+ toJSON: function toJSON() {
190458
+ return {
190459
+ message: this.message,
190460
+ name: this.name,
190461
+ description: this.description,
190462
+ number: this.number,
190463
+ fileName: this.fileName,
190464
+ lineNumber: this.lineNumber,
190465
+ columnNumber: this.columnNumber,
190466
+ stack: this.stack,
190467
+ config: utils$1.toJSONObject(this.config),
190468
+ code: this.code,
190469
+ status: this.status
190470
+ };
190471
+ }
190472
+ });
190473
+ var prototype$1 = AxiosError.prototype;
190474
+ var descriptors = {};
190475
+ [
190476
+ "ERR_BAD_OPTION_VALUE",
190477
+ "ERR_BAD_OPTION",
190478
+ "ECONNABORTED",
190479
+ "ETIMEDOUT",
190480
+ "ERR_NETWORK",
190481
+ "ERR_FR_TOO_MANY_REDIRECTS",
190482
+ "ERR_DEPRECATED",
190483
+ "ERR_BAD_RESPONSE",
190484
+ "ERR_BAD_REQUEST",
190485
+ "ERR_CANCELED",
190486
+ "ERR_NOT_SUPPORT",
190487
+ "ERR_INVALID_URL"
190488
+ ].forEach((code) => {
190489
+ descriptors[code] = { value: code };
190490
+ });
190491
+ Object.defineProperties(AxiosError, descriptors);
190492
+ Object.defineProperty(prototype$1, "isAxiosError", { value: true });
190493
+ AxiosError.from = (error, code, config, request, response, customProps) => {
190494
+ const axiosError = Object.create(prototype$1);
190495
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
190496
+ return obj !== Error.prototype;
190497
+ }, (prop) => {
190498
+ return prop !== "isAxiosError";
190499
+ });
190500
+ AxiosError.call(axiosError, error.message, code, config, request, response);
190501
+ axiosError.cause = error;
190502
+ axiosError.name = error.name;
190503
+ customProps && Object.assign(axiosError, customProps);
190504
+ return axiosError;
190505
+ };
190506
+ function isVisitable(thing) {
190507
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
190508
+ }
190509
+ function removeBrackets(key) {
190510
+ return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
190511
+ }
190512
+ function renderKey(path2, key, dots) {
190513
+ if (!path2)
190514
+ return key;
190515
+ return path2.concat(key).map(function each(token, i) {
190516
+ token = removeBrackets(token);
190517
+ return !dots && i ? "[" + token + "]" : token;
190518
+ }).join(dots ? "." : "");
190519
+ }
190520
+ function isFlatArray(arr) {
190521
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
190522
+ }
190523
+ var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
190524
+ return /^is[A-Z]/.test(prop);
190525
+ });
190526
+ function toFormData(obj, formData, options) {
190527
+ if (!utils$1.isObject(obj)) {
190528
+ throw new TypeError("target must be an object");
190529
+ }
190530
+ formData = formData || new (FormData__default["default"] || FormData);
190531
+ options = utils$1.toFlatObject(options, {
190532
+ metaTokens: true,
190533
+ dots: false,
190534
+ indexes: false
190535
+ }, false, function defined(option, source) {
190536
+ return !utils$1.isUndefined(source[option]);
190537
+ });
190538
+ const metaTokens = options.metaTokens;
190539
+ const visitor = options.visitor || defaultVisitor;
190540
+ const dots = options.dots;
190541
+ const indexes = options.indexes;
190542
+ const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
190543
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
190544
+ if (!utils$1.isFunction(visitor)) {
190545
+ throw new TypeError("visitor must be a function");
190546
+ }
190547
+ function convertValue(value) {
190548
+ if (value === null)
190549
+ return "";
190550
+ if (utils$1.isDate(value)) {
190551
+ return value.toISOString();
190552
+ }
190553
+ if (utils$1.isBoolean(value)) {
190554
+ return value.toString();
190555
+ }
190556
+ if (!useBlob && utils$1.isBlob(value)) {
190557
+ throw new AxiosError("Blob is not supported. Use a Buffer instead.");
190558
+ }
190559
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
190560
+ return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
190561
+ }
190562
+ return value;
190563
+ }
190564
+ function defaultVisitor(value, key, path2) {
190565
+ let arr = value;
190566
+ if (value && !path2 && typeof value === "object") {
190567
+ if (utils$1.endsWith(key, "{}")) {
190568
+ key = metaTokens ? key : key.slice(0, -2);
190569
+ value = JSON.stringify(value);
190570
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
190571
+ key = removeBrackets(key);
190572
+ arr.forEach(function each(el, index) {
190573
+ !(utils$1.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el));
190574
+ });
190575
+ return false;
190576
+ }
190577
+ }
190578
+ if (isVisitable(value)) {
190579
+ return true;
190580
+ }
190581
+ formData.append(renderKey(path2, key, dots), convertValue(value));
190582
+ return false;
190583
+ }
190584
+ const stack = [];
190585
+ const exposedHelpers = Object.assign(predicates, {
190586
+ defaultVisitor,
190587
+ convertValue,
190588
+ isVisitable
190589
+ });
190590
+ function build(value, path2) {
190591
+ if (utils$1.isUndefined(value))
190592
+ return;
190593
+ if (stack.indexOf(value) !== -1) {
190594
+ throw Error("Circular reference detected in " + path2.join("."));
190595
+ }
190596
+ stack.push(value);
190597
+ utils$1.forEach(value, function each(el, key) {
190598
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path2, exposedHelpers);
190599
+ if (result === true) {
190600
+ build(el, path2 ? path2.concat(key) : [key]);
190601
+ }
190602
+ });
190603
+ stack.pop();
190604
+ }
190605
+ if (!utils$1.isObject(obj)) {
190606
+ throw new TypeError("data must be an object");
190607
+ }
190608
+ build(obj);
190609
+ return formData;
190610
+ }
190611
+ function encode$1(str) {
190612
+ const charMap = {
190613
+ "!": "%21",
190614
+ "'": "%27",
190615
+ "(": "%28",
190616
+ ")": "%29",
190617
+ "~": "%7E",
190618
+ "%20": "+",
190619
+ "%00": "\x00"
190620
+ };
190621
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
190622
+ return charMap[match];
190623
+ });
190624
+ }
190625
+ function AxiosURLSearchParams(params, options) {
190626
+ this._pairs = [];
190627
+ params && toFormData(params, this, options);
190628
+ }
190629
+ var prototype = AxiosURLSearchParams.prototype;
190630
+ prototype.append = function append(name, value) {
190631
+ this._pairs.push([name, value]);
190632
+ };
190633
+ prototype.toString = function toString(encoder) {
190634
+ const _encode = encoder ? function(value) {
190635
+ return encoder.call(this, value, encode$1);
190636
+ } : encode$1;
190637
+ return this._pairs.map(function each(pair) {
190638
+ return _encode(pair[0]) + "=" + _encode(pair[1]);
190639
+ }, "").join("&");
190640
+ };
190641
+ function encode(val) {
190642
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
190643
+ }
190644
+ function buildURL(url2, params, options) {
190645
+ if (!params) {
190646
+ return url2;
190647
+ }
190648
+ const _encode = options && options.encode || encode;
190649
+ if (utils$1.isFunction(options)) {
190650
+ options = {
190651
+ serialize: options
190652
+ };
190653
+ }
190654
+ const serializeFn = options && options.serialize;
190655
+ let serializedParams;
190656
+ if (serializeFn) {
190657
+ serializedParams = serializeFn(params, options);
190658
+ } else {
190659
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
190660
+ }
190661
+ if (serializedParams) {
190662
+ const hashmarkIndex = url2.indexOf("#");
190663
+ if (hashmarkIndex !== -1) {
190664
+ url2 = url2.slice(0, hashmarkIndex);
190665
+ }
190666
+ url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
190667
+ }
190668
+ return url2;
190669
+ }
190670
+
190671
+ class InterceptorManager {
190672
+ constructor() {
190673
+ this.handlers = [];
190674
+ }
190675
+ use(fulfilled, rejected, options) {
190676
+ this.handlers.push({
190677
+ fulfilled,
190678
+ rejected,
190679
+ synchronous: options ? options.synchronous : false,
190680
+ runWhen: options ? options.runWhen : null
190681
+ });
190682
+ return this.handlers.length - 1;
190683
+ }
190684
+ eject(id) {
190685
+ if (this.handlers[id]) {
190686
+ this.handlers[id] = null;
190687
+ }
190688
+ }
190689
+ clear() {
190690
+ if (this.handlers) {
190691
+ this.handlers = [];
190692
+ }
190693
+ }
190694
+ forEach(fn) {
190695
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
190696
+ if (h !== null) {
190697
+ fn(h);
190698
+ }
190699
+ });
190700
+ }
190701
+ }
190702
+ var InterceptorManager$1 = InterceptorManager;
190703
+ var transitionalDefaults = {
190704
+ silentJSONParsing: true,
190705
+ forcedJSONParsing: true,
190706
+ clarifyTimeoutError: false
190707
+ };
190708
+ var URLSearchParams2 = url__default["default"].URLSearchParams;
190709
+ var ALPHA = "abcdefghijklmnopqrstuvwxyz";
190710
+ var DIGIT = "0123456789";
190711
+ var ALPHABET = {
190712
+ DIGIT,
190713
+ ALPHA,
190714
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
190715
+ };
190716
+ var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
190717
+ let str = "";
190718
+ const { length } = alphabet;
190719
+ const randomValues = new Uint32Array(size);
190720
+ crypto__default["default"].randomFillSync(randomValues);
190721
+ for (let i = 0;i < size; i++) {
190722
+ str += alphabet[randomValues[i] % length];
190723
+ }
190724
+ return str;
190725
+ };
190726
+ var platform$1 = {
190727
+ isNode: true,
190728
+ classes: {
190729
+ URLSearchParams: URLSearchParams2,
190730
+ FormData: FormData__default["default"],
190731
+ Blob: typeof Blob !== "undefined" && Blob || null
190732
+ },
190733
+ ALPHABET,
190734
+ generateString,
190735
+ protocols: ["http", "https", "file", "data"]
190736
+ };
190737
+ var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
190738
+ var _navigator = typeof navigator === "object" && navigator || undefined;
190739
+ var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
190740
+ var hasStandardBrowserWebWorkerEnv = (() => {
190741
+ return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
190742
+ })();
190743
+ var origin = hasBrowserEnv && window.location.href || "http://localhost";
190744
+ var utils = /* @__PURE__ */ Object.freeze({
190745
+ __proto__: null,
190746
+ hasBrowserEnv,
190747
+ hasStandardBrowserWebWorkerEnv,
190748
+ hasStandardBrowserEnv,
190749
+ navigator: _navigator,
190750
+ origin
190751
+ });
190752
+ var platform = {
190753
+ ...utils,
190754
+ ...platform$1
190755
+ };
190756
+ function toURLEncodedForm(data, options) {
190757
+ return toFormData(data, new platform.classes.URLSearchParams, {
190758
+ visitor: function(value, key, path2, helpers) {
190759
+ if (platform.isNode && utils$1.isBuffer(value)) {
190760
+ this.append(key, value.toString("base64"));
190761
+ return false;
190762
+ }
190763
+ return helpers.defaultVisitor.apply(this, arguments);
190764
+ },
190765
+ ...options
190766
+ });
190767
+ }
190768
+ function parsePropPath(name) {
190769
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
190770
+ return match[0] === "[]" ? "" : match[1] || match[0];
190771
+ });
190772
+ }
190773
+ function arrayToObject(arr) {
190774
+ const obj = {};
190775
+ const keys = Object.keys(arr);
190776
+ let i;
190777
+ const len = keys.length;
190778
+ let key;
190779
+ for (i = 0;i < len; i++) {
190780
+ key = keys[i];
190781
+ obj[key] = arr[key];
190782
+ }
190783
+ return obj;
190784
+ }
190785
+ function formDataToJSON(formData) {
190786
+ function buildPath(path2, value, target, index) {
190787
+ let name = path2[index++];
190788
+ if (name === "__proto__")
190789
+ return true;
190790
+ const isNumericKey = Number.isFinite(+name);
190791
+ const isLast = index >= path2.length;
190792
+ name = !name && utils$1.isArray(target) ? target.length : name;
190793
+ if (isLast) {
190794
+ if (utils$1.hasOwnProp(target, name)) {
190795
+ target[name] = [target[name], value];
190796
+ } else {
190797
+ target[name] = value;
190798
+ }
190799
+ return !isNumericKey;
190800
+ }
190801
+ if (!target[name] || !utils$1.isObject(target[name])) {
190802
+ target[name] = [];
190803
+ }
190804
+ const result = buildPath(path2, value, target[name], index);
190805
+ if (result && utils$1.isArray(target[name])) {
190806
+ target[name] = arrayToObject(target[name]);
190807
+ }
190808
+ return !isNumericKey;
190809
+ }
190810
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
190811
+ const obj = {};
190812
+ utils$1.forEachEntry(formData, (name, value) => {
190813
+ buildPath(parsePropPath(name), value, obj, 0);
190814
+ });
190815
+ return obj;
190816
+ }
190817
+ return null;
190818
+ }
190819
+ function stringifySafely(rawValue, parser, encoder) {
190820
+ if (utils$1.isString(rawValue)) {
190821
+ try {
190822
+ (parser || JSON.parse)(rawValue);
190823
+ return utils$1.trim(rawValue);
190824
+ } catch (e) {
190825
+ if (e.name !== "SyntaxError") {
190826
+ throw e;
190827
+ }
190828
+ }
190829
+ }
190830
+ return (encoder || JSON.stringify)(rawValue);
190831
+ }
190832
+ var defaults2 = {
190833
+ transitional: transitionalDefaults,
190834
+ adapter: ["xhr", "http", "fetch"],
190835
+ transformRequest: [function transformRequest(data, headers) {
190836
+ const contentType2 = headers.getContentType() || "";
190837
+ const hasJSONContentType = contentType2.indexOf("application/json") > -1;
190838
+ const isObjectPayload = utils$1.isObject(data);
190839
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
190840
+ data = new FormData(data);
190841
+ }
190842
+ const isFormData2 = utils$1.isFormData(data);
190843
+ if (isFormData2) {
190844
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
190845
+ }
190846
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
190847
+ return data;
190848
+ }
190849
+ if (utils$1.isArrayBufferView(data)) {
190850
+ return data.buffer;
190851
+ }
190852
+ if (utils$1.isURLSearchParams(data)) {
190853
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
190854
+ return data.toString();
190855
+ }
190856
+ let isFileList2;
190857
+ if (isObjectPayload) {
190858
+ if (contentType2.indexOf("application/x-www-form-urlencoded") > -1) {
190859
+ return toURLEncodedForm(data, this.formSerializer).toString();
190860
+ }
190861
+ if ((isFileList2 = utils$1.isFileList(data)) || contentType2.indexOf("multipart/form-data") > -1) {
190862
+ const _FormData = this.env && this.env.FormData;
190863
+ return toFormData(isFileList2 ? { "files[]": data } : data, _FormData && new _FormData, this.formSerializer);
190864
+ }
190865
+ }
190866
+ if (isObjectPayload || hasJSONContentType) {
190867
+ headers.setContentType("application/json", false);
190868
+ return stringifySafely(data);
190869
+ }
190870
+ return data;
190871
+ }],
190872
+ transformResponse: [function transformResponse(data) {
190873
+ const transitional = this.transitional || defaults2.transitional;
190874
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
190875
+ const JSONRequested = this.responseType === "json";
190876
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
190877
+ return data;
190878
+ }
190879
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
190880
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
190881
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
190882
+ try {
190883
+ return JSON.parse(data);
190884
+ } catch (e) {
190885
+ if (strictJSONParsing) {
190886
+ if (e.name === "SyntaxError") {
190887
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
190888
+ }
190889
+ throw e;
190890
+ }
190891
+ }
190892
+ }
190893
+ return data;
190894
+ }],
190895
+ timeout: 0,
190896
+ xsrfCookieName: "XSRF-TOKEN",
190897
+ xsrfHeaderName: "X-XSRF-TOKEN",
190898
+ maxContentLength: -1,
190899
+ maxBodyLength: -1,
190900
+ env: {
190901
+ FormData: platform.classes.FormData,
190902
+ Blob: platform.classes.Blob
190903
+ },
190904
+ validateStatus: function validateStatus(status) {
190905
+ return status >= 200 && status < 300;
190906
+ },
190907
+ headers: {
190908
+ common: {
190909
+ Accept: "application/json, text/plain, */*",
190910
+ "Content-Type": undefined
190911
+ }
190912
+ }
190913
+ };
190914
+ utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
190915
+ defaults2.headers[method] = {};
190916
+ });
190917
+ var defaults$1 = defaults2;
190918
+ var ignoreDuplicateOf = utils$1.toObjectSet([
190919
+ "age",
190920
+ "authorization",
190921
+ "content-length",
190922
+ "content-type",
190923
+ "etag",
190924
+ "expires",
190925
+ "from",
190926
+ "host",
190927
+ "if-modified-since",
190928
+ "if-unmodified-since",
190929
+ "last-modified",
190930
+ "location",
190931
+ "max-forwards",
190932
+ "proxy-authorization",
190933
+ "referer",
190934
+ "retry-after",
190935
+ "user-agent"
190936
+ ]);
190937
+ var parseHeaders = (rawHeaders) => {
190938
+ const parsed = {};
190939
+ let key;
190940
+ let val;
190941
+ let i;
190942
+ rawHeaders && rawHeaders.split(`
190943
+ `).forEach(function parser(line) {
190944
+ i = line.indexOf(":");
190945
+ key = line.substring(0, i).trim().toLowerCase();
190946
+ val = line.substring(i + 1).trim();
190947
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
190948
+ return;
190949
+ }
190950
+ if (key === "set-cookie") {
190951
+ if (parsed[key]) {
190952
+ parsed[key].push(val);
190953
+ } else {
190954
+ parsed[key] = [val];
190955
+ }
190956
+ } else {
190957
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
190958
+ }
190959
+ });
190960
+ return parsed;
190961
+ };
190962
+ var $internals = Symbol("internals");
190963
+ function normalizeHeader(header) {
190964
+ return header && String(header).trim().toLowerCase();
190965
+ }
190966
+ function normalizeValue(value) {
190967
+ if (value === false || value == null) {
190968
+ return value;
190969
+ }
190970
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
190971
+ }
190972
+ function parseTokens(str) {
190973
+ const tokens = Object.create(null);
190974
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
190975
+ let match;
190976
+ while (match = tokensRE.exec(str)) {
190977
+ tokens[match[1]] = match[2];
190978
+ }
190979
+ return tokens;
190980
+ }
190981
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
190982
+ function matchHeaderValue(context2, value, header, filter, isHeaderNameFilter) {
190983
+ if (utils$1.isFunction(filter)) {
190984
+ return filter.call(this, value, header);
190985
+ }
190986
+ if (isHeaderNameFilter) {
190987
+ value = header;
190988
+ }
190989
+ if (!utils$1.isString(value))
190990
+ return;
190991
+ if (utils$1.isString(filter)) {
190992
+ return value.indexOf(filter) !== -1;
190993
+ }
190994
+ if (utils$1.isRegExp(filter)) {
190995
+ return filter.test(value);
190996
+ }
190997
+ }
190998
+ function formatHeader(header) {
190999
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
191000
+ return char.toUpperCase() + str;
191001
+ });
191002
+ }
191003
+ function buildAccessors(obj, header) {
191004
+ const accessorName = utils$1.toCamelCase(" " + header);
191005
+ ["get", "set", "has"].forEach((methodName) => {
191006
+ Object.defineProperty(obj, methodName + accessorName, {
191007
+ value: function(arg1, arg2, arg3) {
191008
+ return this[methodName].call(this, header, arg1, arg2, arg3);
191009
+ },
191010
+ configurable: true
191011
+ });
191012
+ });
191013
+ }
191014
+
191015
+ class AxiosHeaders {
191016
+ constructor(headers) {
191017
+ headers && this.set(headers);
191018
+ }
191019
+ set(header, valueOrRewrite, rewrite) {
191020
+ const self2 = this;
191021
+ function setHeader(_value, _header, _rewrite) {
191022
+ const lHeader = normalizeHeader(_header);
191023
+ if (!lHeader) {
191024
+ throw new Error("header name must be a non-empty string");
191025
+ }
191026
+ const key = utils$1.findKey(self2, lHeader);
191027
+ if (!key || self2[key] === undefined || _rewrite === true || _rewrite === undefined && self2[key] !== false) {
191028
+ self2[key || _header] = normalizeValue(_value);
191029
+ }
191030
+ }
191031
+ const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
191032
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
191033
+ setHeaders(header, valueOrRewrite);
191034
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
191035
+ setHeaders(parseHeaders(header), valueOrRewrite);
191036
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
191037
+ let obj = {}, dest, key;
191038
+ for (const entry of header) {
191039
+ if (!utils$1.isArray(entry)) {
191040
+ throw TypeError("Object iterator must return a key-value pair");
191041
+ }
191042
+ obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
191043
+ }
191044
+ setHeaders(obj, valueOrRewrite);
191045
+ } else {
191046
+ header != null && setHeader(valueOrRewrite, header, rewrite);
191047
+ }
191048
+ return this;
191049
+ }
191050
+ get(header, parser) {
191051
+ header = normalizeHeader(header);
191052
+ if (header) {
191053
+ const key = utils$1.findKey(this, header);
191054
+ if (key) {
191055
+ const value = this[key];
191056
+ if (!parser) {
191057
+ return value;
191058
+ }
191059
+ if (parser === true) {
191060
+ return parseTokens(value);
191061
+ }
191062
+ if (utils$1.isFunction(parser)) {
191063
+ return parser.call(this, value, key);
191064
+ }
191065
+ if (utils$1.isRegExp(parser)) {
191066
+ return parser.exec(value);
191067
+ }
191068
+ throw new TypeError("parser must be boolean|regexp|function");
191069
+ }
191070
+ }
191071
+ }
191072
+ has(header, matcher) {
191073
+ header = normalizeHeader(header);
191074
+ if (header) {
191075
+ const key = utils$1.findKey(this, header);
191076
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
191077
+ }
191078
+ return false;
191079
+ }
191080
+ delete(header, matcher) {
191081
+ const self2 = this;
191082
+ let deleted = false;
191083
+ function deleteHeader(_header) {
191084
+ _header = normalizeHeader(_header);
191085
+ if (_header) {
191086
+ const key = utils$1.findKey(self2, _header);
191087
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
191088
+ delete self2[key];
191089
+ deleted = true;
191090
+ }
191091
+ }
191092
+ }
191093
+ if (utils$1.isArray(header)) {
191094
+ header.forEach(deleteHeader);
191095
+ } else {
191096
+ deleteHeader(header);
191097
+ }
191098
+ return deleted;
191099
+ }
191100
+ clear(matcher) {
191101
+ const keys = Object.keys(this);
191102
+ let i = keys.length;
191103
+ let deleted = false;
191104
+ while (i--) {
191105
+ const key = keys[i];
191106
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
191107
+ delete this[key];
191108
+ deleted = true;
191109
+ }
191110
+ }
191111
+ return deleted;
191112
+ }
191113
+ normalize(format) {
191114
+ const self2 = this;
191115
+ const headers = {};
191116
+ utils$1.forEach(this, (value, header) => {
191117
+ const key = utils$1.findKey(headers, header);
191118
+ if (key) {
191119
+ self2[key] = normalizeValue(value);
191120
+ delete self2[header];
191121
+ return;
191122
+ }
191123
+ const normalized = format ? formatHeader(header) : String(header).trim();
191124
+ if (normalized !== header) {
191125
+ delete self2[header];
191126
+ }
191127
+ self2[normalized] = normalizeValue(value);
191128
+ headers[normalized] = true;
191129
+ });
191130
+ return this;
191131
+ }
191132
+ concat(...targets) {
191133
+ return this.constructor.concat(this, ...targets);
191134
+ }
191135
+ toJSON(asStrings) {
191136
+ const obj = Object.create(null);
191137
+ utils$1.forEach(this, (value, header) => {
191138
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
191139
+ });
191140
+ return obj;
191141
+ }
191142
+ [Symbol.iterator]() {
191143
+ return Object.entries(this.toJSON())[Symbol.iterator]();
191144
+ }
191145
+ toString() {
191146
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join(`
191147
+ `);
191148
+ }
191149
+ getSetCookie() {
191150
+ return this.get("set-cookie") || [];
191151
+ }
191152
+ get [Symbol.toStringTag]() {
191153
+ return "AxiosHeaders";
191154
+ }
191155
+ static from(thing) {
191156
+ return thing instanceof this ? thing : new this(thing);
191157
+ }
191158
+ static concat(first, ...targets) {
191159
+ const computed = new this(first);
191160
+ targets.forEach((target) => computed.set(target));
191161
+ return computed;
191162
+ }
191163
+ static accessor(header) {
191164
+ const internals = this[$internals] = this[$internals] = {
191165
+ accessors: {}
191166
+ };
191167
+ const accessors = internals.accessors;
191168
+ const prototype2 = this.prototype;
191169
+ function defineAccessor(_header) {
191170
+ const lHeader = normalizeHeader(_header);
191171
+ if (!accessors[lHeader]) {
191172
+ buildAccessors(prototype2, _header);
191173
+ accessors[lHeader] = true;
191174
+ }
191175
+ }
191176
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
191177
+ return this;
191178
+ }
191179
+ }
191180
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
191181
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
191182
+ let mapped = key[0].toUpperCase() + key.slice(1);
191183
+ return {
191184
+ get: () => value,
191185
+ set(headerValue) {
191186
+ this[mapped] = headerValue;
191187
+ }
191188
+ };
191189
+ });
191190
+ utils$1.freezeMethods(AxiosHeaders);
191191
+ var AxiosHeaders$1 = AxiosHeaders;
191192
+ function transformData(fns, response) {
191193
+ const config = this || defaults$1;
191194
+ const context2 = response || config;
191195
+ const headers = AxiosHeaders$1.from(context2.headers);
191196
+ let data = context2.data;
191197
+ utils$1.forEach(fns, function transform(fn) {
191198
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
191199
+ });
191200
+ headers.normalize();
191201
+ return data;
191202
+ }
191203
+ function isCancel(value) {
191204
+ return !!(value && value.__CANCEL__);
191205
+ }
191206
+ function CanceledError(message, config, request) {
191207
+ AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
191208
+ this.name = "CanceledError";
191209
+ }
191210
+ utils$1.inherits(CanceledError, AxiosError, {
191211
+ __CANCEL__: true
191212
+ });
191213
+ function settle(resolve, reject, response) {
191214
+ const validateStatus = response.config.validateStatus;
191215
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
191216
+ resolve(response);
191217
+ } else {
191218
+ reject(new AxiosError("Request failed with status code " + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
191219
+ }
191220
+ }
191221
+ function isAbsoluteURL(url2) {
191222
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
191223
+ }
191224
+ function combineURLs(baseURL, relativeURL) {
191225
+ return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
191226
+ }
191227
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
191228
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
191229
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
191230
+ return combineURLs(baseURL, requestedURL);
191231
+ }
191232
+ return requestedURL;
191233
+ }
191234
+ var VERSION = "1.11.0";
191235
+ function parseProtocol(url2) {
191236
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
191237
+ return match && match[1] || "";
191238
+ }
191239
+ var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
191240
+ function fromDataURI(uri, asBlob, options) {
191241
+ const _Blob = options && options.Blob || platform.classes.Blob;
191242
+ const protocol = parseProtocol(uri);
191243
+ if (asBlob === undefined && _Blob) {
191244
+ asBlob = true;
191245
+ }
191246
+ if (protocol === "data") {
191247
+ uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
191248
+ const match = DATA_URL_PATTERN.exec(uri);
191249
+ if (!match) {
191250
+ throw new AxiosError("Invalid URL", AxiosError.ERR_INVALID_URL);
191251
+ }
191252
+ const mime = match[1];
191253
+ const isBase64 = match[2];
191254
+ const body = match[3];
191255
+ const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? "base64" : "utf8");
191256
+ if (asBlob) {
191257
+ if (!_Blob) {
191258
+ throw new AxiosError("Blob is not supported", AxiosError.ERR_NOT_SUPPORT);
191259
+ }
191260
+ return new _Blob([buffer], { type: mime });
191261
+ }
191262
+ return buffer;
191263
+ }
191264
+ throw new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_NOT_SUPPORT);
191265
+ }
191266
+ var kInternals = Symbol("internals");
191267
+
191268
+ class AxiosTransformStream extends stream__default["default"].Transform {
191269
+ constructor(options) {
191270
+ options = utils$1.toFlatObject(options, {
191271
+ maxRate: 0,
191272
+ chunkSize: 64 * 1024,
191273
+ minChunkSize: 100,
191274
+ timeWindow: 500,
191275
+ ticksRate: 2,
191276
+ samplesCount: 15
191277
+ }, null, (prop, source) => {
191278
+ return !utils$1.isUndefined(source[prop]);
191279
+ });
191280
+ super({
191281
+ readableHighWaterMark: options.chunkSize
191282
+ });
191283
+ const internals = this[kInternals] = {
191284
+ timeWindow: options.timeWindow,
191285
+ chunkSize: options.chunkSize,
191286
+ maxRate: options.maxRate,
191287
+ minChunkSize: options.minChunkSize,
191288
+ bytesSeen: 0,
191289
+ isCaptured: false,
191290
+ notifiedBytesLoaded: 0,
191291
+ ts: Date.now(),
191292
+ bytes: 0,
191293
+ onReadCallback: null
191294
+ };
191295
+ this.on("newListener", (event) => {
191296
+ if (event === "progress") {
191297
+ if (!internals.isCaptured) {
191298
+ internals.isCaptured = true;
191299
+ }
191300
+ }
191301
+ });
191302
+ }
191303
+ _read(size) {
191304
+ const internals = this[kInternals];
191305
+ if (internals.onReadCallback) {
191306
+ internals.onReadCallback();
191307
+ }
191308
+ return super._read(size);
191309
+ }
191310
+ _transform(chunk, encoding, callback) {
191311
+ const internals = this[kInternals];
191312
+ const maxRate = internals.maxRate;
191313
+ const readableHighWaterMark = this.readableHighWaterMark;
191314
+ const timeWindow = internals.timeWindow;
191315
+ const divider = 1000 / timeWindow;
191316
+ const bytesThreshold = maxRate / divider;
191317
+ const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
191318
+ const pushChunk = (_chunk, _callback) => {
191319
+ const bytes = Buffer.byteLength(_chunk);
191320
+ internals.bytesSeen += bytes;
191321
+ internals.bytes += bytes;
191322
+ internals.isCaptured && this.emit("progress", internals.bytesSeen);
191323
+ if (this.push(_chunk)) {
191324
+ process.nextTick(_callback);
191325
+ } else {
191326
+ internals.onReadCallback = () => {
191327
+ internals.onReadCallback = null;
191328
+ process.nextTick(_callback);
191329
+ };
191330
+ }
191331
+ };
191332
+ const transformChunk = (_chunk, _callback) => {
191333
+ const chunkSize = Buffer.byteLength(_chunk);
191334
+ let chunkRemainder = null;
191335
+ let maxChunkSize = readableHighWaterMark;
191336
+ let bytesLeft;
191337
+ let passed = 0;
191338
+ if (maxRate) {
191339
+ const now = Date.now();
191340
+ if (!internals.ts || (passed = now - internals.ts) >= timeWindow) {
191341
+ internals.ts = now;
191342
+ bytesLeft = bytesThreshold - internals.bytes;
191343
+ internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;
191344
+ passed = 0;
191345
+ }
191346
+ bytesLeft = bytesThreshold - internals.bytes;
191347
+ }
191348
+ if (maxRate) {
191349
+ if (bytesLeft <= 0) {
191350
+ return setTimeout(() => {
191351
+ _callback(null, _chunk);
191352
+ }, timeWindow - passed);
191353
+ }
191354
+ if (bytesLeft < maxChunkSize) {
191355
+ maxChunkSize = bytesLeft;
191356
+ }
191357
+ }
191358
+ if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) {
191359
+ chunkRemainder = _chunk.subarray(maxChunkSize);
191360
+ _chunk = _chunk.subarray(0, maxChunkSize);
191361
+ }
191362
+ pushChunk(_chunk, chunkRemainder ? () => {
191363
+ process.nextTick(_callback, null, chunkRemainder);
191364
+ } : _callback);
191365
+ };
191366
+ transformChunk(chunk, function transformNextChunk(err, _chunk) {
191367
+ if (err) {
191368
+ return callback(err);
191369
+ }
191370
+ if (_chunk) {
191371
+ transformChunk(_chunk, transformNextChunk);
191372
+ } else {
191373
+ callback(null);
191374
+ }
191375
+ });
191376
+ }
191377
+ }
191378
+ var AxiosTransformStream$1 = AxiosTransformStream;
191379
+ var { asyncIterator } = Symbol;
191380
+ var readBlob = async function* (blob) {
191381
+ if (blob.stream) {
191382
+ yield* blob.stream();
191383
+ } else if (blob.arrayBuffer) {
191384
+ yield await blob.arrayBuffer();
191385
+ } else if (blob[asyncIterator]) {
191386
+ yield* blob[asyncIterator]();
191387
+ } else {
191388
+ yield blob;
191389
+ }
191390
+ };
191391
+ var readBlob$1 = readBlob;
191392
+ var BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + "-_";
191393
+ var textEncoder = typeof TextEncoder === "function" ? new TextEncoder : new util__default["default"].TextEncoder;
191394
+ var CRLF = `\r
191395
+ `;
191396
+ var CRLF_BYTES = textEncoder.encode(CRLF);
191397
+ var CRLF_BYTES_COUNT = 2;
191398
+
191399
+ class FormDataPart {
191400
+ constructor(name, value) {
191401
+ const { escapeName } = this.constructor;
191402
+ const isStringValue = utils$1.isString(value);
191403
+ let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
191404
+ if (isStringValue) {
191405
+ value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
191406
+ } else {
191407
+ headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
191408
+ }
191409
+ this.headers = textEncoder.encode(headers + CRLF);
191410
+ this.contentLength = isStringValue ? value.byteLength : value.size;
191411
+ this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
191412
+ this.name = name;
191413
+ this.value = value;
191414
+ }
191415
+ async* encode() {
191416
+ yield this.headers;
191417
+ const { value } = this;
191418
+ if (utils$1.isTypedArray(value)) {
191419
+ yield value;
191420
+ } else {
191421
+ yield* readBlob$1(value);
191422
+ }
191423
+ yield CRLF_BYTES;
191424
+ }
191425
+ static escapeName(name) {
191426
+ return String(name).replace(/[\r\n"]/g, (match) => ({
191427
+ "\r": "%0D",
191428
+ "\n": "%0A",
191429
+ '"': "%22"
191430
+ })[match]);
191431
+ }
191432
+ }
191433
+ var formDataToStream = (form, headersHandler, options) => {
191434
+ const {
191435
+ tag = "form-data-boundary",
191436
+ size = 25,
191437
+ boundary = tag + "-" + platform.generateString(size, BOUNDARY_ALPHABET)
191438
+ } = options || {};
191439
+ if (!utils$1.isFormData(form)) {
191440
+ throw TypeError("FormData instance required");
191441
+ }
191442
+ if (boundary.length < 1 || boundary.length > 70) {
191443
+ throw Error("boundary must be 10-70 characters long");
191444
+ }
191445
+ const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
191446
+ const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
191447
+ let contentLength = footerBytes.byteLength;
191448
+ const parts = Array.from(form.entries()).map(([name, value]) => {
191449
+ const part = new FormDataPart(name, value);
191450
+ contentLength += part.size;
191451
+ return part;
191452
+ });
191453
+ contentLength += boundaryBytes.byteLength * parts.length;
191454
+ contentLength = utils$1.toFiniteNumber(contentLength);
191455
+ const computedHeaders = {
191456
+ "Content-Type": `multipart/form-data; boundary=${boundary}`
191457
+ };
191458
+ if (Number.isFinite(contentLength)) {
191459
+ computedHeaders["Content-Length"] = contentLength;
191460
+ }
191461
+ headersHandler && headersHandler(computedHeaders);
191462
+ return stream.Readable.from(async function* () {
191463
+ for (const part of parts) {
191464
+ yield boundaryBytes;
191465
+ yield* part.encode();
191466
+ }
191467
+ yield footerBytes;
191468
+ }());
191469
+ };
191470
+ var formDataToStream$1 = formDataToStream;
191471
+
191472
+ class ZlibHeaderTransformStream extends stream__default["default"].Transform {
191473
+ __transform(chunk, encoding, callback) {
191474
+ this.push(chunk);
191475
+ callback();
191476
+ }
191477
+ _transform(chunk, encoding, callback) {
191478
+ if (chunk.length !== 0) {
191479
+ this._transform = this.__transform;
191480
+ if (chunk[0] !== 120) {
191481
+ const header = Buffer.alloc(2);
191482
+ header[0] = 120;
191483
+ header[1] = 156;
191484
+ this.push(header, encoding);
191485
+ }
191486
+ }
191487
+ this.__transform(chunk, encoding, callback);
191488
+ }
191489
+ }
191490
+ var ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;
191491
+ var callbackify = (fn, reducer) => {
191492
+ return utils$1.isAsyncFn(fn) ? function(...args) {
191493
+ const cb = args.pop();
191494
+ fn.apply(this, args).then((value) => {
191495
+ try {
191496
+ reducer ? cb(null, ...reducer(value)) : cb(null, value);
191497
+ } catch (err) {
191498
+ cb(err);
191499
+ }
191500
+ }, cb);
191501
+ } : fn;
191502
+ };
191503
+ var callbackify$1 = callbackify;
191504
+ function speedometer(samplesCount, min) {
191505
+ samplesCount = samplesCount || 10;
191506
+ const bytes = new Array(samplesCount);
191507
+ const timestamps = new Array(samplesCount);
191508
+ let head = 0;
191509
+ let tail = 0;
191510
+ let firstSampleTS;
191511
+ min = min !== undefined ? min : 1000;
191512
+ return function push(chunkLength) {
191513
+ const now = Date.now();
191514
+ const startedAt = timestamps[tail];
191515
+ if (!firstSampleTS) {
191516
+ firstSampleTS = now;
191517
+ }
191518
+ bytes[head] = chunkLength;
191519
+ timestamps[head] = now;
191520
+ let i = tail;
191521
+ let bytesCount = 0;
191522
+ while (i !== head) {
191523
+ bytesCount += bytes[i++];
191524
+ i = i % samplesCount;
191525
+ }
191526
+ head = (head + 1) % samplesCount;
191527
+ if (head === tail) {
191528
+ tail = (tail + 1) % samplesCount;
191529
+ }
191530
+ if (now - firstSampleTS < min) {
191531
+ return;
191532
+ }
191533
+ const passed = startedAt && now - startedAt;
191534
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
191535
+ };
191536
+ }
191537
+ function throttle(fn, freq) {
191538
+ let timestamp = 0;
191539
+ let threshold = 1000 / freq;
191540
+ let lastArgs;
191541
+ let timer;
191542
+ const invoke = (args, now = Date.now()) => {
191543
+ timestamp = now;
191544
+ lastArgs = null;
191545
+ if (timer) {
191546
+ clearTimeout(timer);
191547
+ timer = null;
191548
+ }
191549
+ fn(...args);
191550
+ };
191551
+ const throttled = (...args) => {
191552
+ const now = Date.now();
191553
+ const passed = now - timestamp;
191554
+ if (passed >= threshold) {
191555
+ invoke(args, now);
191556
+ } else {
191557
+ lastArgs = args;
191558
+ if (!timer) {
191559
+ timer = setTimeout(() => {
191560
+ timer = null;
191561
+ invoke(lastArgs);
191562
+ }, threshold - passed);
191563
+ }
191564
+ }
191565
+ };
191566
+ const flush = () => lastArgs && invoke(lastArgs);
191567
+ return [throttled, flush];
191568
+ }
191569
+ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
191570
+ let bytesNotified = 0;
191571
+ const _speedometer = speedometer(50, 250);
191572
+ return throttle((e) => {
191573
+ const loaded = e.loaded;
191574
+ const total = e.lengthComputable ? e.total : undefined;
191575
+ const progressBytes = loaded - bytesNotified;
191576
+ const rate = _speedometer(progressBytes);
191577
+ const inRange = loaded <= total;
191578
+ bytesNotified = loaded;
191579
+ const data = {
191580
+ loaded,
191581
+ total,
191582
+ progress: total ? loaded / total : undefined,
191583
+ bytes: progressBytes,
191584
+ rate: rate ? rate : undefined,
191585
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
191586
+ event: e,
191587
+ lengthComputable: total != null,
191588
+ [isDownloadStream ? "download" : "upload"]: true
191589
+ };
191590
+ listener(data);
191591
+ }, freq);
191592
+ };
191593
+ var progressEventDecorator = (total, throttled) => {
191594
+ const lengthComputable = total != null;
191595
+ return [(loaded) => throttled[0]({
191596
+ lengthComputable,
191597
+ total,
191598
+ loaded
191599
+ }), throttled[1]];
191600
+ };
191601
+ var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
191602
+ var zlibOptions = {
191603
+ flush: zlib__default["default"].constants.Z_SYNC_FLUSH,
191604
+ finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH
191605
+ };
191606
+ var brotliOptions = {
191607
+ flush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH,
191608
+ finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH
191609
+ };
191610
+ var isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress);
191611
+ var { http: httpFollow, https: httpsFollow } = followRedirects__default["default"];
191612
+ var isHttps = /https:?/;
191613
+ var supportedProtocols = platform.protocols.map((protocol) => {
191614
+ return protocol + ":";
191615
+ });
191616
+ var flushOnFinish = (stream2, [throttled, flush]) => {
191617
+ stream2.on("end", flush).on("error", flush);
191618
+ return throttled;
191619
+ };
191620
+ function dispatchBeforeRedirect(options, responseDetails) {
191621
+ if (options.beforeRedirects.proxy) {
191622
+ options.beforeRedirects.proxy(options);
191623
+ }
191624
+ if (options.beforeRedirects.config) {
191625
+ options.beforeRedirects.config(options, responseDetails);
191626
+ }
191627
+ }
191628
+ function setProxy(options, configProxy, location) {
191629
+ let proxy = configProxy;
191630
+ if (!proxy && proxy !== false) {
191631
+ const proxyUrl = proxyFromEnv__default["default"].getProxyForUrl(location);
191632
+ if (proxyUrl) {
191633
+ proxy = new URL(proxyUrl);
191634
+ }
191635
+ }
191636
+ if (proxy) {
191637
+ if (proxy.username) {
191638
+ proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
191639
+ }
191640
+ if (proxy.auth) {
191641
+ if (proxy.auth.username || proxy.auth.password) {
191642
+ proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
191643
+ }
191644
+ const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
191645
+ options.headers["Proxy-Authorization"] = "Basic " + base64;
191646
+ }
191647
+ options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
191648
+ const proxyHost = proxy.hostname || proxy.host;
191649
+ options.hostname = proxyHost;
191650
+ options.host = proxyHost;
191651
+ options.port = proxy.port;
191652
+ options.path = location;
191653
+ if (proxy.protocol) {
191654
+ options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
191655
+ }
191656
+ }
191657
+ options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
191658
+ setProxy(redirectOptions, configProxy, redirectOptions.href);
191659
+ };
191660
+ }
191661
+ var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
191662
+ var wrapAsync = (asyncExecutor) => {
191663
+ return new Promise((resolve, reject) => {
191664
+ let onDone;
191665
+ let isDone;
191666
+ const done = (value, isRejected) => {
191667
+ if (isDone)
191668
+ return;
191669
+ isDone = true;
191670
+ onDone && onDone(value, isRejected);
191671
+ };
191672
+ const _resolve = (value) => {
191673
+ done(value);
191674
+ resolve(value);
191675
+ };
191676
+ const _reject = (reason) => {
191677
+ done(reason, true);
191678
+ reject(reason);
191679
+ };
191680
+ asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
191681
+ });
191682
+ };
191683
+ var resolveFamily = ({ address, family }) => {
191684
+ if (!utils$1.isString(address)) {
191685
+ throw TypeError("address must be a string");
191686
+ }
191687
+ return {
191688
+ address,
191689
+ family: family || (address.indexOf(".") < 0 ? 6 : 4)
191690
+ };
191691
+ };
191692
+ var buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : { address, family });
191693
+ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
191694
+ return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
191695
+ let { data, lookup, family } = config;
191696
+ const { responseType, responseEncoding } = config;
191697
+ const method = config.method.toUpperCase();
191698
+ let isDone;
191699
+ let rejected = false;
191700
+ let req;
191701
+ if (lookup) {
191702
+ const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);
191703
+ lookup = (hostname, opt, cb) => {
191704
+ _lookup(hostname, opt, (err, arg0, arg1) => {
191705
+ if (err) {
191706
+ return cb(err);
191707
+ }
191708
+ const addresses = utils$1.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
191709
+ opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
191710
+ });
191711
+ };
191712
+ }
191713
+ const emitter = new events.EventEmitter;
191714
+ const onFinished = () => {
191715
+ if (config.cancelToken) {
191716
+ config.cancelToken.unsubscribe(abort);
191717
+ }
191718
+ if (config.signal) {
191719
+ config.signal.removeEventListener("abort", abort);
191720
+ }
191721
+ emitter.removeAllListeners();
191722
+ };
191723
+ onDone((value, isRejected) => {
191724
+ isDone = true;
191725
+ if (isRejected) {
191726
+ rejected = true;
191727
+ onFinished();
191728
+ }
191729
+ });
191730
+ function abort(reason) {
191731
+ emitter.emit("abort", !reason || reason.type ? new CanceledError(null, config, req) : reason);
191732
+ }
191733
+ emitter.once("abort", reject);
191734
+ if (config.cancelToken || config.signal) {
191735
+ config.cancelToken && config.cancelToken.subscribe(abort);
191736
+ if (config.signal) {
191737
+ config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
191738
+ }
191739
+ }
191740
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
191741
+ const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
191742
+ const protocol = parsed.protocol || supportedProtocols[0];
191743
+ if (protocol === "data:") {
191744
+ let convertedData;
191745
+ if (method !== "GET") {
191746
+ return settle(resolve, reject, {
191747
+ status: 405,
191748
+ statusText: "method not allowed",
191749
+ headers: {},
191750
+ config
191751
+ });
191752
+ }
191753
+ try {
191754
+ convertedData = fromDataURI(config.url, responseType === "blob", {
191755
+ Blob: config.env && config.env.Blob
191756
+ });
191757
+ } catch (err) {
191758
+ throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);
191759
+ }
191760
+ if (responseType === "text") {
191761
+ convertedData = convertedData.toString(responseEncoding);
191762
+ if (!responseEncoding || responseEncoding === "utf8") {
191763
+ convertedData = utils$1.stripBOM(convertedData);
191764
+ }
191765
+ } else if (responseType === "stream") {
191766
+ convertedData = stream__default["default"].Readable.from(convertedData);
191767
+ }
191768
+ return settle(resolve, reject, {
191769
+ data: convertedData,
191770
+ status: 200,
191771
+ statusText: "OK",
191772
+ headers: new AxiosHeaders$1,
191773
+ config
191774
+ });
191775
+ }
191776
+ if (supportedProtocols.indexOf(protocol) === -1) {
191777
+ return reject(new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_BAD_REQUEST, config));
191778
+ }
191779
+ const headers = AxiosHeaders$1.from(config.headers).normalize();
191780
+ headers.set("User-Agent", "axios/" + VERSION, false);
191781
+ const { onUploadProgress, onDownloadProgress } = config;
191782
+ const maxRate = config.maxRate;
191783
+ let maxUploadRate = undefined;
191784
+ let maxDownloadRate = undefined;
191785
+ if (utils$1.isSpecCompliantForm(data)) {
191786
+ const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
191787
+ data = formDataToStream$1(data, (formHeaders) => {
191788
+ headers.set(formHeaders);
191789
+ }, {
191790
+ tag: `axios-${VERSION}-boundary`,
191791
+ boundary: userBoundary && userBoundary[1] || undefined
191792
+ });
191793
+ } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
191794
+ headers.set(data.getHeaders());
191795
+ if (!headers.hasContentLength()) {
191796
+ try {
191797
+ const knownLength = await util__default["default"].promisify(data.getLength).call(data);
191798
+ Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
191799
+ } catch (e) {}
191800
+ }
191801
+ } else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
191802
+ data.size && headers.setContentType(data.type || "application/octet-stream");
191803
+ headers.setContentLength(data.size || 0);
191804
+ data = stream__default["default"].Readable.from(readBlob$1(data));
191805
+ } else if (data && !utils$1.isStream(data)) {
191806
+ if (Buffer.isBuffer(data))
191807
+ ;
191808
+ else if (utils$1.isArrayBuffer(data)) {
191809
+ data = Buffer.from(new Uint8Array(data));
191810
+ } else if (utils$1.isString(data)) {
191811
+ data = Buffer.from(data, "utf-8");
191812
+ } else {
191813
+ return reject(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError.ERR_BAD_REQUEST, config));
191814
+ }
191815
+ headers.setContentLength(data.length, false);
191816
+ if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
191817
+ return reject(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config));
191818
+ }
191819
+ }
191820
+ const contentLength = utils$1.toFiniteNumber(headers.getContentLength());
191821
+ if (utils$1.isArray(maxRate)) {
191822
+ maxUploadRate = maxRate[0];
191823
+ maxDownloadRate = maxRate[1];
191824
+ } else {
191825
+ maxUploadRate = maxDownloadRate = maxRate;
191826
+ }
191827
+ if (data && (onUploadProgress || maxUploadRate)) {
191828
+ if (!utils$1.isStream(data)) {
191829
+ data = stream__default["default"].Readable.from(data, { objectMode: false });
191830
+ }
191831
+ data = stream__default["default"].pipeline([data, new AxiosTransformStream$1({
191832
+ maxRate: utils$1.toFiniteNumber(maxUploadRate)
191833
+ })], utils$1.noop);
191834
+ onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
191835
+ }
191836
+ let auth = undefined;
191837
+ if (config.auth) {
191838
+ const username = config.auth.username || "";
191839
+ const password = config.auth.password || "";
191840
+ auth = username + ":" + password;
191841
+ }
191842
+ if (!auth && parsed.username) {
191843
+ const urlUsername = parsed.username;
191844
+ const urlPassword = parsed.password;
191845
+ auth = urlUsername + ":" + urlPassword;
191846
+ }
191847
+ auth && headers.delete("authorization");
191848
+ let path2;
191849
+ try {
191850
+ path2 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
191851
+ } catch (err) {
191852
+ const customErr = new Error(err.message);
191853
+ customErr.config = config;
191854
+ customErr.url = config.url;
191855
+ customErr.exists = true;
191856
+ return reject(customErr);
191857
+ }
191858
+ headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
191859
+ const options = {
191860
+ path: path2,
191861
+ method,
191862
+ headers: headers.toJSON(),
191863
+ agents: { http: config.httpAgent, https: config.httpsAgent },
191864
+ auth,
191865
+ protocol,
191866
+ family,
191867
+ beforeRedirect: dispatchBeforeRedirect,
191868
+ beforeRedirects: {}
191869
+ };
191870
+ !utils$1.isUndefined(lookup) && (options.lookup = lookup);
191871
+ if (config.socketPath) {
191872
+ options.socketPath = config.socketPath;
191873
+ } else {
191874
+ options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
191875
+ options.port = parsed.port;
191876
+ setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
191877
+ }
191878
+ let transport;
191879
+ const isHttpsRequest = isHttps.test(options.protocol);
191880
+ options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
191881
+ if (config.transport) {
191882
+ transport = config.transport;
191883
+ } else if (config.maxRedirects === 0) {
191884
+ transport = isHttpsRequest ? https__default["default"] : http__default["default"];
191885
+ } else {
191886
+ if (config.maxRedirects) {
191887
+ options.maxRedirects = config.maxRedirects;
191888
+ }
191889
+ if (config.beforeRedirect) {
191890
+ options.beforeRedirects.config = config.beforeRedirect;
191891
+ }
191892
+ transport = isHttpsRequest ? httpsFollow : httpFollow;
191893
+ }
191894
+ if (config.maxBodyLength > -1) {
191895
+ options.maxBodyLength = config.maxBodyLength;
191896
+ } else {
191897
+ options.maxBodyLength = Infinity;
191898
+ }
191899
+ if (config.insecureHTTPParser) {
191900
+ options.insecureHTTPParser = config.insecureHTTPParser;
191901
+ }
191902
+ req = transport.request(options, function handleResponse(res) {
191903
+ if (req.destroyed)
191904
+ return;
191905
+ const streams = [res];
191906
+ const responseLength = +res.headers["content-length"];
191907
+ if (onDownloadProgress || maxDownloadRate) {
191908
+ const transformStream = new AxiosTransformStream$1({
191909
+ maxRate: utils$1.toFiniteNumber(maxDownloadRate)
191910
+ });
191911
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
191912
+ streams.push(transformStream);
191913
+ }
191914
+ let responseStream = res;
191915
+ const lastRequest = res.req || req;
191916
+ if (config.decompress !== false && res.headers["content-encoding"]) {
191917
+ if (method === "HEAD" || res.statusCode === 204) {
191918
+ delete res.headers["content-encoding"];
191919
+ }
191920
+ switch ((res.headers["content-encoding"] || "").toLowerCase()) {
191921
+ case "gzip":
191922
+ case "x-gzip":
191923
+ case "compress":
191924
+ case "x-compress":
191925
+ streams.push(zlib__default["default"].createUnzip(zlibOptions));
191926
+ delete res.headers["content-encoding"];
191927
+ break;
191928
+ case "deflate":
191929
+ streams.push(new ZlibHeaderTransformStream$1);
191930
+ streams.push(zlib__default["default"].createUnzip(zlibOptions));
191931
+ delete res.headers["content-encoding"];
191932
+ break;
191933
+ case "br":
191934
+ if (isBrotliSupported) {
191935
+ streams.push(zlib__default["default"].createBrotliDecompress(brotliOptions));
191936
+ delete res.headers["content-encoding"];
191937
+ }
191938
+ }
191939
+ }
191940
+ responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0];
191941
+ const offListeners = stream__default["default"].finished(responseStream, () => {
191942
+ offListeners();
191943
+ onFinished();
191944
+ });
191945
+ const response = {
191946
+ status: res.statusCode,
191947
+ statusText: res.statusMessage,
191948
+ headers: new AxiosHeaders$1(res.headers),
191949
+ config,
191950
+ request: lastRequest
191951
+ };
191952
+ if (responseType === "stream") {
191953
+ response.data = responseStream;
191954
+ settle(resolve, reject, response);
191955
+ } else {
191956
+ const responseBuffer = [];
191957
+ let totalResponseBytes = 0;
191958
+ responseStream.on("data", function handleStreamData(chunk) {
191959
+ responseBuffer.push(chunk);
191960
+ totalResponseBytes += chunk.length;
191961
+ if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
191962
+ rejected = true;
191963
+ responseStream.destroy();
191964
+ reject(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
191965
+ }
191966
+ });
191967
+ responseStream.on("aborted", function handlerStreamAborted() {
191968
+ if (rejected) {
191969
+ return;
191970
+ }
191971
+ const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
191972
+ responseStream.destroy(err);
191973
+ reject(err);
191974
+ });
191975
+ responseStream.on("error", function handleStreamError(err) {
191976
+ if (req.destroyed)
191977
+ return;
191978
+ reject(AxiosError.from(err, null, config, lastRequest));
191979
+ });
191980
+ responseStream.on("end", function handleStreamEnd() {
191981
+ try {
191982
+ let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
191983
+ if (responseType !== "arraybuffer") {
191984
+ responseData = responseData.toString(responseEncoding);
191985
+ if (!responseEncoding || responseEncoding === "utf8") {
191986
+ responseData = utils$1.stripBOM(responseData);
191987
+ }
191988
+ }
191989
+ response.data = responseData;
191990
+ } catch (err) {
191991
+ return reject(AxiosError.from(err, null, config, response.request, response));
191992
+ }
191993
+ settle(resolve, reject, response);
191994
+ });
191995
+ }
191996
+ emitter.once("abort", (err) => {
191997
+ if (!responseStream.destroyed) {
191998
+ responseStream.emit("error", err);
191999
+ responseStream.destroy();
192000
+ }
192001
+ });
192002
+ });
192003
+ emitter.once("abort", (err) => {
192004
+ reject(err);
192005
+ req.destroy(err);
192006
+ });
192007
+ req.on("error", function handleRequestError(err) {
192008
+ reject(AxiosError.from(err, null, config, req));
192009
+ });
192010
+ req.on("socket", function handleRequestSocket(socket) {
192011
+ socket.setKeepAlive(true, 1000 * 60);
192012
+ });
192013
+ if (config.timeout) {
192014
+ const timeout = parseInt(config.timeout, 10);
192015
+ if (Number.isNaN(timeout)) {
192016
+ reject(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
192017
+ return;
192018
+ }
192019
+ req.setTimeout(timeout, function handleRequestTimeout() {
192020
+ if (isDone)
192021
+ return;
192022
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
192023
+ const transitional = config.transitional || transitionalDefaults;
192024
+ if (config.timeoutErrorMessage) {
192025
+ timeoutErrorMessage = config.timeoutErrorMessage;
192026
+ }
192027
+ reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req));
192028
+ abort();
192029
+ });
192030
+ }
192031
+ if (utils$1.isStream(data)) {
192032
+ let ended = false;
192033
+ let errored = false;
192034
+ data.on("end", () => {
192035
+ ended = true;
192036
+ });
192037
+ data.once("error", (err) => {
192038
+ errored = true;
192039
+ req.destroy(err);
192040
+ });
192041
+ data.on("close", () => {
192042
+ if (!ended && !errored) {
192043
+ abort(new CanceledError("Request stream has been aborted", config, req));
192044
+ }
192045
+ });
192046
+ data.pipe(req);
192047
+ } else {
192048
+ req.end(data);
192049
+ }
192050
+ });
192051
+ };
192052
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin2, isMSIE) => (url2) => {
192053
+ url2 = new URL(url2, platform.origin);
192054
+ return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
192055
+ })(new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)) : () => true;
192056
+ var cookies = platform.hasStandardBrowserEnv ? {
192057
+ write(name, value, expires, path2, domain, secure) {
192058
+ const cookie = [name + "=" + encodeURIComponent(value)];
192059
+ utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
192060
+ utils$1.isString(path2) && cookie.push("path=" + path2);
192061
+ utils$1.isString(domain) && cookie.push("domain=" + domain);
192062
+ secure === true && cookie.push("secure");
192063
+ document.cookie = cookie.join("; ");
192064
+ },
192065
+ read(name) {
192066
+ const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
192067
+ return match ? decodeURIComponent(match[3]) : null;
192068
+ },
192069
+ remove(name) {
192070
+ this.write(name, "", Date.now() - 86400000);
192071
+ }
192072
+ } : {
192073
+ write() {},
192074
+ read() {
192075
+ return null;
192076
+ },
192077
+ remove() {}
192078
+ };
192079
+ var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
192080
+ function mergeConfig(config1, config2) {
192081
+ config2 = config2 || {};
192082
+ const config = {};
192083
+ function getMergedValue(target, source, prop, caseless) {
192084
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
192085
+ return utils$1.merge.call({ caseless }, target, source);
192086
+ } else if (utils$1.isPlainObject(source)) {
192087
+ return utils$1.merge({}, source);
192088
+ } else if (utils$1.isArray(source)) {
192089
+ return source.slice();
192090
+ }
192091
+ return source;
192092
+ }
192093
+ function mergeDeepProperties(a, b, prop, caseless) {
192094
+ if (!utils$1.isUndefined(b)) {
192095
+ return getMergedValue(a, b, prop, caseless);
192096
+ } else if (!utils$1.isUndefined(a)) {
192097
+ return getMergedValue(undefined, a, prop, caseless);
192098
+ }
192099
+ }
192100
+ function valueFromConfig2(a, b) {
192101
+ if (!utils$1.isUndefined(b)) {
192102
+ return getMergedValue(undefined, b);
192103
+ }
192104
+ }
192105
+ function defaultToConfig2(a, b) {
192106
+ if (!utils$1.isUndefined(b)) {
192107
+ return getMergedValue(undefined, b);
192108
+ } else if (!utils$1.isUndefined(a)) {
192109
+ return getMergedValue(undefined, a);
192110
+ }
192111
+ }
192112
+ function mergeDirectKeys(a, b, prop) {
192113
+ if (prop in config2) {
192114
+ return getMergedValue(a, b);
192115
+ } else if (prop in config1) {
192116
+ return getMergedValue(undefined, a);
192117
+ }
192118
+ }
192119
+ const mergeMap = {
192120
+ url: valueFromConfig2,
192121
+ method: valueFromConfig2,
192122
+ data: valueFromConfig2,
192123
+ baseURL: defaultToConfig2,
192124
+ transformRequest: defaultToConfig2,
192125
+ transformResponse: defaultToConfig2,
192126
+ paramsSerializer: defaultToConfig2,
192127
+ timeout: defaultToConfig2,
192128
+ timeoutMessage: defaultToConfig2,
192129
+ withCredentials: defaultToConfig2,
192130
+ withXSRFToken: defaultToConfig2,
192131
+ adapter: defaultToConfig2,
192132
+ responseType: defaultToConfig2,
192133
+ xsrfCookieName: defaultToConfig2,
192134
+ xsrfHeaderName: defaultToConfig2,
192135
+ onUploadProgress: defaultToConfig2,
192136
+ onDownloadProgress: defaultToConfig2,
192137
+ decompress: defaultToConfig2,
192138
+ maxContentLength: defaultToConfig2,
192139
+ maxBodyLength: defaultToConfig2,
192140
+ beforeRedirect: defaultToConfig2,
192141
+ transport: defaultToConfig2,
192142
+ httpAgent: defaultToConfig2,
192143
+ httpsAgent: defaultToConfig2,
192144
+ cancelToken: defaultToConfig2,
192145
+ socketPath: defaultToConfig2,
192146
+ responseEncoding: defaultToConfig2,
192147
+ validateStatus: mergeDirectKeys,
192148
+ headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
192149
+ };
192150
+ utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
192151
+ const merge2 = mergeMap[prop] || mergeDeepProperties;
192152
+ const configValue = merge2(config1[prop], config2[prop], prop);
192153
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
192154
+ });
192155
+ return config;
192156
+ }
192157
+ var resolveConfig = (config) => {
192158
+ const newConfig = mergeConfig({}, config);
192159
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
192160
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
192161
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
192162
+ if (auth) {
192163
+ headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
192164
+ }
192165
+ let contentType2;
192166
+ if (utils$1.isFormData(data)) {
192167
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
192168
+ headers.setContentType(undefined);
192169
+ } else if ((contentType2 = headers.getContentType()) !== false) {
192170
+ const [type, ...tokens] = contentType2 ? contentType2.split(";").map((token) => token.trim()).filter(Boolean) : [];
192171
+ headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
192172
+ }
192173
+ }
192174
+ if (platform.hasStandardBrowserEnv) {
192175
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
192176
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
192177
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
192178
+ if (xsrfValue) {
192179
+ headers.set(xsrfHeaderName, xsrfValue);
192180
+ }
192181
+ }
192182
+ }
192183
+ return newConfig;
192184
+ };
192185
+ var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
192186
+ var xhrAdapter = isXHRAdapterSupported && function(config) {
192187
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
192188
+ const _config = resolveConfig(config);
192189
+ let requestData = _config.data;
192190
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
192191
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
192192
+ let onCanceled;
192193
+ let uploadThrottled, downloadThrottled;
192194
+ let flushUpload, flushDownload;
192195
+ function done() {
192196
+ flushUpload && flushUpload();
192197
+ flushDownload && flushDownload();
192198
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
192199
+ _config.signal && _config.signal.removeEventListener("abort", onCanceled);
192200
+ }
192201
+ let request = new XMLHttpRequest;
192202
+ request.open(_config.method.toUpperCase(), _config.url, true);
192203
+ request.timeout = _config.timeout;
192204
+ function onloadend() {
192205
+ if (!request) {
192206
+ return;
192207
+ }
192208
+ const responseHeaders = AxiosHeaders$1.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
192209
+ const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
192210
+ const response = {
192211
+ data: responseData,
192212
+ status: request.status,
192213
+ statusText: request.statusText,
192214
+ headers: responseHeaders,
192215
+ config,
192216
+ request
192217
+ };
192218
+ settle(function _resolve(value) {
192219
+ resolve(value);
192220
+ done();
192221
+ }, function _reject(err) {
192222
+ reject(err);
192223
+ done();
192224
+ }, response);
192225
+ request = null;
192226
+ }
192227
+ if ("onloadend" in request) {
192228
+ request.onloadend = onloadend;
192229
+ } else {
192230
+ request.onreadystatechange = function handleLoad() {
192231
+ if (!request || request.readyState !== 4) {
192232
+ return;
192233
+ }
192234
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
192235
+ return;
192236
+ }
192237
+ setTimeout(onloadend);
192238
+ };
192239
+ }
192240
+ request.onabort = function handleAbort() {
192241
+ if (!request) {
192242
+ return;
192243
+ }
192244
+ reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
192245
+ request = null;
192246
+ };
192247
+ request.onerror = function handleError() {
192248
+ reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request));
192249
+ request = null;
192250
+ };
192251
+ request.ontimeout = function handleTimeout() {
192252
+ let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
192253
+ const transitional = _config.transitional || transitionalDefaults;
192254
+ if (_config.timeoutErrorMessage) {
192255
+ timeoutErrorMessage = _config.timeoutErrorMessage;
192256
+ }
192257
+ reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
192258
+ request = null;
192259
+ };
192260
+ requestData === undefined && requestHeaders.setContentType(null);
192261
+ if ("setRequestHeader" in request) {
192262
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
192263
+ request.setRequestHeader(key, val);
192264
+ });
192265
+ }
192266
+ if (!utils$1.isUndefined(_config.withCredentials)) {
192267
+ request.withCredentials = !!_config.withCredentials;
192268
+ }
192269
+ if (responseType && responseType !== "json") {
192270
+ request.responseType = _config.responseType;
192271
+ }
192272
+ if (onDownloadProgress) {
192273
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
192274
+ request.addEventListener("progress", downloadThrottled);
192275
+ }
192276
+ if (onUploadProgress && request.upload) {
192277
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
192278
+ request.upload.addEventListener("progress", uploadThrottled);
192279
+ request.upload.addEventListener("loadend", flushUpload);
192280
+ }
192281
+ if (_config.cancelToken || _config.signal) {
192282
+ onCanceled = (cancel) => {
192283
+ if (!request) {
192284
+ return;
192285
+ }
192286
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
192287
+ request.abort();
192288
+ request = null;
192289
+ };
192290
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
192291
+ if (_config.signal) {
192292
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
192293
+ }
192294
+ }
192295
+ const protocol = parseProtocol(_config.url);
192296
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
192297
+ reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
192298
+ return;
192299
+ }
192300
+ request.send(requestData || null);
192301
+ });
192302
+ };
192303
+ var composeSignals = (signals, timeout) => {
192304
+ const { length } = signals = signals ? signals.filter(Boolean) : [];
192305
+ if (timeout || length) {
192306
+ let controller = new AbortController;
192307
+ let aborted;
192308
+ const onabort = function(reason) {
192309
+ if (!aborted) {
192310
+ aborted = true;
192311
+ unsubscribe();
192312
+ const err = reason instanceof Error ? reason : this.reason;
192313
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
192314
+ }
192315
+ };
192316
+ let timer = timeout && setTimeout(() => {
192317
+ timer = null;
192318
+ onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
192319
+ }, timeout);
192320
+ const unsubscribe = () => {
192321
+ if (signals) {
192322
+ timer && clearTimeout(timer);
192323
+ timer = null;
192324
+ signals.forEach((signal2) => {
192325
+ signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
192326
+ });
192327
+ signals = null;
192328
+ }
192329
+ };
192330
+ signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
192331
+ const { signal } = controller;
192332
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
192333
+ return signal;
192334
+ }
192335
+ };
192336
+ var composeSignals$1 = composeSignals;
192337
+ var streamChunk = function* (chunk, chunkSize) {
192338
+ let len = chunk.byteLength;
192339
+ if (!chunkSize || len < chunkSize) {
192340
+ yield chunk;
192341
+ return;
192342
+ }
192343
+ let pos = 0;
192344
+ let end;
192345
+ while (pos < len) {
192346
+ end = pos + chunkSize;
192347
+ yield chunk.slice(pos, end);
192348
+ pos = end;
192349
+ }
192350
+ };
192351
+ var readBytes = async function* (iterable, chunkSize) {
192352
+ for await (const chunk of readStream(iterable)) {
192353
+ yield* streamChunk(chunk, chunkSize);
192354
+ }
192355
+ };
192356
+ var readStream = async function* (stream2) {
192357
+ if (stream2[Symbol.asyncIterator]) {
192358
+ yield* stream2;
192359
+ return;
192360
+ }
192361
+ const reader = stream2.getReader();
192362
+ try {
192363
+ for (;; ) {
192364
+ const { done, value } = await reader.read();
192365
+ if (done) {
192366
+ break;
192367
+ }
192368
+ yield value;
192369
+ }
192370
+ } finally {
192371
+ await reader.cancel();
192372
+ }
192373
+ };
192374
+ var trackStream = (stream2, chunkSize, onProgress, onFinish) => {
192375
+ const iterator2 = readBytes(stream2, chunkSize);
192376
+ let bytes = 0;
192377
+ let done;
192378
+ let _onFinish = (e) => {
192379
+ if (!done) {
192380
+ done = true;
192381
+ onFinish && onFinish(e);
192382
+ }
192383
+ };
192384
+ return new ReadableStream({
192385
+ async pull(controller) {
192386
+ try {
192387
+ const { done: done2, value } = await iterator2.next();
192388
+ if (done2) {
192389
+ _onFinish();
192390
+ controller.close();
192391
+ return;
192392
+ }
192393
+ let len = value.byteLength;
192394
+ if (onProgress) {
192395
+ let loadedBytes = bytes += len;
192396
+ onProgress(loadedBytes);
192397
+ }
192398
+ controller.enqueue(new Uint8Array(value));
192399
+ } catch (err) {
192400
+ _onFinish(err);
192401
+ throw err;
192402
+ }
192403
+ },
192404
+ cancel(reason) {
192405
+ _onFinish(reason);
192406
+ return iterator2.return();
192407
+ }
192408
+ }, {
192409
+ highWaterMark: 2
192410
+ });
192411
+ };
192412
+ var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
192413
+ var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
192414
+ var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
192415
+ var test = (fn, ...args) => {
192416
+ try {
192417
+ return !!fn(...args);
192418
+ } catch (e) {
192419
+ return false;
192420
+ }
192421
+ };
192422
+ var supportsRequestStream = isReadableStreamSupported && test(() => {
192423
+ let duplexAccessed = false;
192424
+ const hasContentType = new Request(platform.origin, {
192425
+ body: new ReadableStream,
192426
+ method: "POST",
192427
+ get duplex() {
192428
+ duplexAccessed = true;
192429
+ return "half";
192430
+ }
192431
+ }).headers.has("Content-Type");
192432
+ return duplexAccessed && !hasContentType;
192433
+ });
192434
+ var DEFAULT_CHUNK_SIZE = 64 * 1024;
192435
+ var supportsResponseStream = isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
192436
+ var resolvers = {
192437
+ stream: supportsResponseStream && ((res) => res.body)
192438
+ };
192439
+ isFetchSupported && ((res) => {
192440
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
192441
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
192442
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
192443
+ });
192444
+ });
192445
+ })(new Response);
192446
+ var getBodyLength = async (body) => {
192447
+ if (body == null) {
192448
+ return 0;
192449
+ }
192450
+ if (utils$1.isBlob(body)) {
192451
+ return body.size;
192452
+ }
192453
+ if (utils$1.isSpecCompliantForm(body)) {
192454
+ const _request = new Request(platform.origin, {
192455
+ method: "POST",
192456
+ body
192457
+ });
192458
+ return (await _request.arrayBuffer()).byteLength;
192459
+ }
192460
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
192461
+ return body.byteLength;
192462
+ }
192463
+ if (utils$1.isURLSearchParams(body)) {
192464
+ body = body + "";
192465
+ }
192466
+ if (utils$1.isString(body)) {
192467
+ return (await encodeText(body)).byteLength;
192468
+ }
192469
+ };
192470
+ var resolveBodyLength = async (headers, body) => {
192471
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
192472
+ return length == null ? getBodyLength(body) : length;
192473
+ };
192474
+ var fetchAdapter = isFetchSupported && (async (config) => {
192475
+ let {
192476
+ url: url2,
192477
+ method,
192478
+ data,
192479
+ signal,
192480
+ cancelToken,
192481
+ timeout,
192482
+ onDownloadProgress,
192483
+ onUploadProgress,
192484
+ responseType,
192485
+ headers,
192486
+ withCredentials = "same-origin",
192487
+ fetchOptions
192488
+ } = resolveConfig(config);
192489
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
192490
+ let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
192491
+ let request;
192492
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
192493
+ composedSignal.unsubscribe();
192494
+ });
192495
+ let requestContentLength;
192496
+ try {
192497
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
192498
+ let _request = new Request(url2, {
192499
+ method: "POST",
192500
+ body: data,
192501
+ duplex: "half"
192502
+ });
192503
+ let contentTypeHeader;
192504
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
192505
+ headers.setContentType(contentTypeHeader);
192506
+ }
192507
+ if (_request.body) {
192508
+ const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
192509
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
192510
+ }
192511
+ }
192512
+ if (!utils$1.isString(withCredentials)) {
192513
+ withCredentials = withCredentials ? "include" : "omit";
192514
+ }
192515
+ const isCredentialsSupported = "credentials" in Request.prototype;
192516
+ request = new Request(url2, {
192517
+ ...fetchOptions,
192518
+ signal: composedSignal,
192519
+ method: method.toUpperCase(),
192520
+ headers: headers.normalize().toJSON(),
192521
+ body: data,
192522
+ duplex: "half",
192523
+ credentials: isCredentialsSupported ? withCredentials : undefined
192524
+ });
192525
+ let response = await fetch(request, fetchOptions);
192526
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
192527
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
192528
+ const options = {};
192529
+ ["status", "statusText", "headers"].forEach((prop) => {
192530
+ options[prop] = response[prop];
192531
+ });
192532
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
192533
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
192534
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
192535
+ flush && flush();
192536
+ unsubscribe && unsubscribe();
192537
+ }), options);
192538
+ }
192539
+ responseType = responseType || "text";
192540
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
192541
+ !isStreamResponse && unsubscribe && unsubscribe();
192542
+ return await new Promise((resolve, reject) => {
192543
+ settle(resolve, reject, {
192544
+ data: responseData,
192545
+ headers: AxiosHeaders$1.from(response.headers),
192546
+ status: response.status,
192547
+ statusText: response.statusText,
192548
+ config,
192549
+ request
192550
+ });
192551
+ });
192552
+ } catch (err) {
192553
+ unsubscribe && unsubscribe();
192554
+ if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
192555
+ throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request), {
192556
+ cause: err.cause || err
192557
+ });
192558
+ }
192559
+ throw AxiosError.from(err, err && err.code, config, request);
192560
+ }
192561
+ });
192562
+ var knownAdapters = {
192563
+ http: httpAdapter,
192564
+ xhr: xhrAdapter,
192565
+ fetch: fetchAdapter
192566
+ };
192567
+ utils$1.forEach(knownAdapters, (fn, value) => {
192568
+ if (fn) {
192569
+ try {
192570
+ Object.defineProperty(fn, "name", { value });
192571
+ } catch (e) {}
192572
+ Object.defineProperty(fn, "adapterName", { value });
192573
+ }
192574
+ });
192575
+ var renderReason = (reason) => `- ${reason}`;
192576
+ var isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
192577
+ var adapters = {
192578
+ getAdapter: (adapters2) => {
192579
+ adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
192580
+ const { length } = adapters2;
192581
+ let nameOrAdapter;
192582
+ let adapter;
192583
+ const rejectedReasons = {};
192584
+ for (let i = 0;i < length; i++) {
192585
+ nameOrAdapter = adapters2[i];
192586
+ let id;
192587
+ adapter = nameOrAdapter;
192588
+ if (!isResolvedHandle(nameOrAdapter)) {
192589
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
192590
+ if (adapter === undefined) {
192591
+ throw new AxiosError(`Unknown adapter '${id}'`);
192592
+ }
192593
+ }
192594
+ if (adapter) {
192595
+ break;
192596
+ }
192597
+ rejectedReasons[id || "#" + i] = adapter;
192598
+ }
192599
+ if (!adapter) {
192600
+ const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
192601
+ let s = length ? reasons.length > 1 ? `since :
192602
+ ` + reasons.map(renderReason).join(`
192603
+ `) : " " + renderReason(reasons[0]) : "as no adapter specified";
192604
+ throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
192605
+ }
192606
+ return adapter;
192607
+ },
192608
+ adapters: knownAdapters
192609
+ };
192610
+ function throwIfCancellationRequested(config) {
192611
+ if (config.cancelToken) {
192612
+ config.cancelToken.throwIfRequested();
192613
+ }
192614
+ if (config.signal && config.signal.aborted) {
192615
+ throw new CanceledError(null, config);
192616
+ }
192617
+ }
192618
+ function dispatchRequest(config) {
192619
+ throwIfCancellationRequested(config);
192620
+ config.headers = AxiosHeaders$1.from(config.headers);
192621
+ config.data = transformData.call(config, config.transformRequest);
192622
+ if (["post", "put", "patch"].indexOf(config.method) !== -1) {
192623
+ config.headers.setContentType("application/x-www-form-urlencoded", false);
192624
+ }
192625
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
192626
+ return adapter(config).then(function onAdapterResolution(response) {
192627
+ throwIfCancellationRequested(config);
192628
+ response.data = transformData.call(config, config.transformResponse, response);
192629
+ response.headers = AxiosHeaders$1.from(response.headers);
192630
+ return response;
192631
+ }, function onAdapterRejection(reason) {
192632
+ if (!isCancel(reason)) {
192633
+ throwIfCancellationRequested(config);
192634
+ if (reason && reason.response) {
192635
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
192636
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
192637
+ }
192638
+ }
192639
+ return Promise.reject(reason);
192640
+ });
192641
+ }
192642
+ var validators$1 = {};
192643
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
192644
+ validators$1[type] = function validator(thing) {
192645
+ return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
192646
+ };
192647
+ });
192648
+ var deprecatedWarnings = {};
192649
+ validators$1.transitional = function transitional(validator2, version, message) {
192650
+ function formatMessage(opt, desc) {
192651
+ return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
192652
+ }
192653
+ return (value, opt, opts) => {
192654
+ if (validator2 === false) {
192655
+ throw new AxiosError(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError.ERR_DEPRECATED);
192656
+ }
192657
+ if (version && !deprecatedWarnings[opt]) {
192658
+ deprecatedWarnings[opt] = true;
192659
+ console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
192660
+ }
192661
+ return validator2 ? validator2(value, opt, opts) : true;
192662
+ };
192663
+ };
192664
+ validators$1.spelling = function spelling(correctSpelling) {
192665
+ return (value, opt) => {
192666
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
192667
+ return true;
192668
+ };
192669
+ };
192670
+ function assertOptions(options, schema, allowUnknown) {
192671
+ if (typeof options !== "object") {
192672
+ throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
192673
+ }
192674
+ const keys = Object.keys(options);
192675
+ let i = keys.length;
192676
+ while (i-- > 0) {
192677
+ const opt = keys[i];
192678
+ const validator2 = schema[opt];
192679
+ if (validator2) {
192680
+ const value = options[opt];
192681
+ const result = value === undefined || validator2(value, opt, options);
192682
+ if (result !== true) {
192683
+ throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
192684
+ }
192685
+ continue;
192686
+ }
192687
+ if (allowUnknown !== true) {
192688
+ throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
192689
+ }
192690
+ }
192691
+ }
192692
+ var validator = {
192693
+ assertOptions,
192694
+ validators: validators$1
192695
+ };
192696
+ var validators = validator.validators;
192697
+
192698
+ class Axios {
192699
+ constructor(instanceConfig) {
192700
+ this.defaults = instanceConfig || {};
192701
+ this.interceptors = {
192702
+ request: new InterceptorManager$1,
192703
+ response: new InterceptorManager$1
192704
+ };
192705
+ }
192706
+ async request(configOrUrl, config) {
192707
+ try {
192708
+ return await this._request(configOrUrl, config);
192709
+ } catch (err) {
192710
+ if (err instanceof Error) {
192711
+ let dummy = {};
192712
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error;
192713
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
192714
+ try {
192715
+ if (!err.stack) {
192716
+ err.stack = stack;
192717
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
192718
+ err.stack += `
192719
+ ` + stack;
192720
+ }
192721
+ } catch (e) {}
192722
+ }
192723
+ throw err;
192724
+ }
192725
+ }
192726
+ _request(configOrUrl, config) {
192727
+ if (typeof configOrUrl === "string") {
192728
+ config = config || {};
192729
+ config.url = configOrUrl;
192730
+ } else {
192731
+ config = configOrUrl || {};
192732
+ }
192733
+ config = mergeConfig(this.defaults, config);
192734
+ const { transitional, paramsSerializer, headers } = config;
192735
+ if (transitional !== undefined) {
192736
+ validator.assertOptions(transitional, {
192737
+ silentJSONParsing: validators.transitional(validators.boolean),
192738
+ forcedJSONParsing: validators.transitional(validators.boolean),
192739
+ clarifyTimeoutError: validators.transitional(validators.boolean)
192740
+ }, false);
192741
+ }
192742
+ if (paramsSerializer != null) {
192743
+ if (utils$1.isFunction(paramsSerializer)) {
192744
+ config.paramsSerializer = {
192745
+ serialize: paramsSerializer
192746
+ };
192747
+ } else {
192748
+ validator.assertOptions(paramsSerializer, {
192749
+ encode: validators.function,
192750
+ serialize: validators.function
192751
+ }, true);
192752
+ }
192753
+ }
192754
+ if (config.allowAbsoluteUrls !== undefined)
192755
+ ;
192756
+ else if (this.defaults.allowAbsoluteUrls !== undefined) {
192757
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
192758
+ } else {
192759
+ config.allowAbsoluteUrls = true;
192760
+ }
192761
+ validator.assertOptions(config, {
192762
+ baseUrl: validators.spelling("baseURL"),
192763
+ withXsrfToken: validators.spelling("withXSRFToken")
192764
+ }, true);
192765
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
192766
+ let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
192767
+ headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
192768
+ delete headers[method];
192769
+ });
192770
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
192771
+ const requestInterceptorChain = [];
192772
+ let synchronousRequestInterceptors = true;
192773
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
192774
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
192775
+ return;
192776
+ }
192777
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
192778
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
192779
+ });
192780
+ const responseInterceptorChain = [];
192781
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
192782
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
192783
+ });
192784
+ let promise;
192785
+ let i = 0;
192786
+ let len;
192787
+ if (!synchronousRequestInterceptors) {
192788
+ const chain = [dispatchRequest.bind(this), undefined];
192789
+ chain.unshift(...requestInterceptorChain);
192790
+ chain.push(...responseInterceptorChain);
192791
+ len = chain.length;
192792
+ promise = Promise.resolve(config);
192793
+ while (i < len) {
192794
+ promise = promise.then(chain[i++], chain[i++]);
192795
+ }
192796
+ return promise;
192797
+ }
192798
+ len = requestInterceptorChain.length;
192799
+ let newConfig = config;
192800
+ i = 0;
192801
+ while (i < len) {
192802
+ const onFulfilled = requestInterceptorChain[i++];
192803
+ const onRejected = requestInterceptorChain[i++];
192804
+ try {
192805
+ newConfig = onFulfilled(newConfig);
192806
+ } catch (error) {
192807
+ onRejected.call(this, error);
192808
+ break;
192809
+ }
192810
+ }
192811
+ try {
192812
+ promise = dispatchRequest.call(this, newConfig);
192813
+ } catch (error) {
192814
+ return Promise.reject(error);
192815
+ }
192816
+ i = 0;
192817
+ len = responseInterceptorChain.length;
192818
+ while (i < len) {
192819
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
192820
+ }
192821
+ return promise;
192822
+ }
192823
+ getUri(config) {
192824
+ config = mergeConfig(this.defaults, config);
192825
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
192826
+ return buildURL(fullPath, config.params, config.paramsSerializer);
192827
+ }
192828
+ }
192829
+ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
192830
+ Axios.prototype[method] = function(url2, config) {
192831
+ return this.request(mergeConfig(config || {}, {
192832
+ method,
192833
+ url: url2,
192834
+ data: (config || {}).data
192835
+ }));
192836
+ };
192837
+ });
192838
+ utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
192839
+ function generateHTTPMethod(isForm) {
192840
+ return function httpMethod(url2, data, config) {
192841
+ return this.request(mergeConfig(config || {}, {
192842
+ method,
192843
+ headers: isForm ? {
192844
+ "Content-Type": "multipart/form-data"
192845
+ } : {},
192846
+ url: url2,
192847
+ data
192848
+ }));
192849
+ };
192850
+ }
192851
+ Axios.prototype[method] = generateHTTPMethod();
192852
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
192853
+ });
192854
+ var Axios$1 = Axios;
192855
+
192856
+ class CancelToken {
192857
+ constructor(executor) {
192858
+ if (typeof executor !== "function") {
192859
+ throw new TypeError("executor must be a function.");
192860
+ }
192861
+ let resolvePromise;
192862
+ this.promise = new Promise(function promiseExecutor(resolve) {
192863
+ resolvePromise = resolve;
192864
+ });
192865
+ const token = this;
192866
+ this.promise.then((cancel) => {
192867
+ if (!token._listeners)
192868
+ return;
192869
+ let i = token._listeners.length;
192870
+ while (i-- > 0) {
192871
+ token._listeners[i](cancel);
192872
+ }
192873
+ token._listeners = null;
192874
+ });
192875
+ this.promise.then = (onfulfilled) => {
192876
+ let _resolve;
192877
+ const promise = new Promise((resolve) => {
192878
+ token.subscribe(resolve);
192879
+ _resolve = resolve;
192880
+ }).then(onfulfilled);
192881
+ promise.cancel = function reject() {
192882
+ token.unsubscribe(_resolve);
192883
+ };
192884
+ return promise;
192885
+ };
192886
+ executor(function cancel(message, config, request) {
192887
+ if (token.reason) {
192888
+ return;
192889
+ }
192890
+ token.reason = new CanceledError(message, config, request);
192891
+ resolvePromise(token.reason);
192892
+ });
192893
+ }
192894
+ throwIfRequested() {
192895
+ if (this.reason) {
192896
+ throw this.reason;
192897
+ }
192898
+ }
192899
+ subscribe(listener) {
192900
+ if (this.reason) {
192901
+ listener(this.reason);
192902
+ return;
192903
+ }
192904
+ if (this._listeners) {
192905
+ this._listeners.push(listener);
192906
+ } else {
192907
+ this._listeners = [listener];
192908
+ }
192909
+ }
192910
+ unsubscribe(listener) {
192911
+ if (!this._listeners) {
192912
+ return;
192913
+ }
192914
+ const index = this._listeners.indexOf(listener);
192915
+ if (index !== -1) {
192916
+ this._listeners.splice(index, 1);
192917
+ }
192918
+ }
192919
+ toAbortSignal() {
192920
+ const controller = new AbortController;
192921
+ const abort = (err) => {
192922
+ controller.abort(err);
192923
+ };
192924
+ this.subscribe(abort);
192925
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
192926
+ return controller.signal;
192927
+ }
192928
+ static source() {
192929
+ let cancel;
192930
+ const token = new CancelToken(function executor(c) {
192931
+ cancel = c;
192932
+ });
192933
+ return {
192934
+ token,
192935
+ cancel
192936
+ };
192937
+ }
192938
+ }
192939
+ var CancelToken$1 = CancelToken;
192940
+ function spread(callback) {
192941
+ return function wrap(arr) {
192942
+ return callback.apply(null, arr);
192943
+ };
192944
+ }
192945
+ function isAxiosError(payload) {
192946
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
192947
+ }
192948
+ var HttpStatusCode = {
192949
+ Continue: 100,
192950
+ SwitchingProtocols: 101,
192951
+ Processing: 102,
192952
+ EarlyHints: 103,
192953
+ Ok: 200,
192954
+ Created: 201,
192955
+ Accepted: 202,
192956
+ NonAuthoritativeInformation: 203,
192957
+ NoContent: 204,
192958
+ ResetContent: 205,
192959
+ PartialContent: 206,
192960
+ MultiStatus: 207,
192961
+ AlreadyReported: 208,
192962
+ ImUsed: 226,
192963
+ MultipleChoices: 300,
192964
+ MovedPermanently: 301,
192965
+ Found: 302,
192966
+ SeeOther: 303,
192967
+ NotModified: 304,
192968
+ UseProxy: 305,
192969
+ Unused: 306,
192970
+ TemporaryRedirect: 307,
192971
+ PermanentRedirect: 308,
192972
+ BadRequest: 400,
192973
+ Unauthorized: 401,
192974
+ PaymentRequired: 402,
192975
+ Forbidden: 403,
192976
+ NotFound: 404,
192977
+ MethodNotAllowed: 405,
192978
+ NotAcceptable: 406,
192979
+ ProxyAuthenticationRequired: 407,
192980
+ RequestTimeout: 408,
192981
+ Conflict: 409,
192982
+ Gone: 410,
192983
+ LengthRequired: 411,
192984
+ PreconditionFailed: 412,
192985
+ PayloadTooLarge: 413,
192986
+ UriTooLong: 414,
192987
+ UnsupportedMediaType: 415,
192988
+ RangeNotSatisfiable: 416,
192989
+ ExpectationFailed: 417,
192990
+ ImATeapot: 418,
192991
+ MisdirectedRequest: 421,
192992
+ UnprocessableEntity: 422,
192993
+ Locked: 423,
192994
+ FailedDependency: 424,
192995
+ TooEarly: 425,
192996
+ UpgradeRequired: 426,
192997
+ PreconditionRequired: 428,
192998
+ TooManyRequests: 429,
192999
+ RequestHeaderFieldsTooLarge: 431,
193000
+ UnavailableForLegalReasons: 451,
193001
+ InternalServerError: 500,
193002
+ NotImplemented: 501,
193003
+ BadGateway: 502,
193004
+ ServiceUnavailable: 503,
193005
+ GatewayTimeout: 504,
193006
+ HttpVersionNotSupported: 505,
193007
+ VariantAlsoNegotiates: 506,
193008
+ InsufficientStorage: 507,
193009
+ LoopDetected: 508,
193010
+ NotExtended: 510,
193011
+ NetworkAuthenticationRequired: 511
193012
+ };
193013
+ Object.entries(HttpStatusCode).forEach(([key, value]) => {
193014
+ HttpStatusCode[value] = key;
193015
+ });
193016
+ var HttpStatusCode$1 = HttpStatusCode;
193017
+ function createInstance(defaultConfig) {
193018
+ const context2 = new Axios$1(defaultConfig);
193019
+ const instance = bind(Axios$1.prototype.request, context2);
193020
+ utils$1.extend(instance, Axios$1.prototype, context2, { allOwnKeys: true });
193021
+ utils$1.extend(instance, context2, null, { allOwnKeys: true });
193022
+ instance.create = function create(instanceConfig) {
193023
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
193024
+ };
193025
+ return instance;
193026
+ }
193027
+ var axios = createInstance(defaults$1);
193028
+ axios.Axios = Axios$1;
193029
+ axios.CanceledError = CanceledError;
193030
+ axios.CancelToken = CancelToken$1;
193031
+ axios.isCancel = isCancel;
193032
+ axios.VERSION = VERSION;
193033
+ axios.toFormData = toFormData;
193034
+ axios.AxiosError = AxiosError;
193035
+ axios.Cancel = axios.CanceledError;
193036
+ axios.all = function all(promises) {
193037
+ return Promise.all(promises);
193038
+ };
193039
+ axios.spread = spread;
193040
+ axios.isAxiosError = isAxiosError;
193041
+ axios.mergeConfig = mergeConfig;
193042
+ axios.AxiosHeaders = AxiosHeaders$1;
193043
+ axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
193044
+ axios.getAdapter = adapters.getAdapter;
193045
+ axios.HttpStatusCode = HttpStatusCode$1;
193046
+ axios.default = axios;
193047
+ module2.exports = axios;
193048
+ });
193049
+
193050
+ // ../../node_modules/trino-client/dist/index.js
193051
+ var require_dist17 = __commonJS((exports2) => {
193052
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
193053
+ if (k2 === undefined)
193054
+ k2 = k;
193055
+ var desc = Object.getOwnPropertyDescriptor(m, k);
193056
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
193057
+ desc = { enumerable: true, get: function() {
193058
+ return m[k];
193059
+ } };
193060
+ }
193061
+ Object.defineProperty(o, k2, desc);
193062
+ } : function(o, m, k, k2) {
193063
+ if (k2 === undefined)
193064
+ k2 = k;
193065
+ o[k2] = m[k];
193066
+ });
193067
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
193068
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
193069
+ } : function(o, v) {
193070
+ o["default"] = v;
193071
+ });
193072
+ var __importStar = exports2 && exports2.__importStar || function() {
193073
+ var ownKeys = function(o) {
193074
+ ownKeys = Object.getOwnPropertyNames || function(o2) {
193075
+ var ar = [];
193076
+ for (var k in o2)
193077
+ if (Object.prototype.hasOwnProperty.call(o2, k))
193078
+ ar[ar.length] = k;
193079
+ return ar;
193080
+ };
193081
+ return ownKeys(o);
193082
+ };
193083
+ return function(mod) {
193084
+ if (mod && mod.__esModule)
193085
+ return mod;
193086
+ var result = {};
193087
+ if (mod != null) {
193088
+ for (var k = ownKeys(mod), i = 0;i < k.length; i++)
193089
+ if (k[i] !== "default")
193090
+ __createBinding(result, mod, k[i]);
193091
+ }
193092
+ __setModuleDefault(result, mod);
193093
+ return result;
193094
+ };
193095
+ }();
193096
+ var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
193097
+ function adopt(value) {
193098
+ return value instanceof P ? value : new P(function(resolve) {
193099
+ resolve(value);
193100
+ });
193101
+ }
193102
+ return new (P || (P = Promise))(function(resolve, reject) {
193103
+ function fulfilled(value) {
193104
+ try {
193105
+ step(generator.next(value));
193106
+ } catch (e) {
193107
+ reject(e);
193108
+ }
193109
+ }
193110
+ function rejected(value) {
193111
+ try {
193112
+ step(generator["throw"](value));
193113
+ } catch (e) {
193114
+ reject(e);
193115
+ }
193116
+ }
193117
+ function step(result) {
193118
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
193119
+ }
193120
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
193121
+ });
193122
+ };
193123
+ var __asyncValues = exports2 && exports2.__asyncValues || function(o) {
193124
+ if (!Symbol.asyncIterator)
193125
+ throw new TypeError("Symbol.asyncIterator is not defined.");
193126
+ var m = o[Symbol.asyncIterator], i;
193127
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
193128
+ return this;
193129
+ }, i);
193130
+ function verb(n) {
193131
+ i[n] = o[n] && function(v) {
193132
+ return new Promise(function(resolve, reject) {
193133
+ v = o[n](v), settle(resolve, reject, v.done, v.value);
193134
+ });
193135
+ };
193136
+ }
193137
+ function settle(resolve, reject, d, v) {
193138
+ Promise.resolve(v).then(function(v2) {
193139
+ resolve({ value: v2, done: d });
193140
+ }, reject);
193141
+ }
193142
+ };
193143
+ var __importDefault = exports2 && exports2.__importDefault || function(mod) {
193144
+ return mod && mod.__esModule ? mod : { default: mod };
193145
+ };
193146
+ Object.defineProperty(exports2, "__esModule", { value: true });
193147
+ exports2.Trino = exports2.QueryIterator = exports2.Iterator = exports2.BasicAuth = undefined;
193148
+ var axios_1 = __importDefault(require_axios2());
193149
+ var https = __importStar(require("https"));
193150
+ var DEFAULT_SERVER = "http://localhost:8080";
193151
+ var DEFAULT_SOURCE = "trino-js-client";
193152
+ var DEFAULT_USER = process.env.USER;
193153
+ var TRINO_HEADER_PREFIX = "X-Trino-";
193154
+ var TRINO_PREPARED_STATEMENT_HEADER = TRINO_HEADER_PREFIX + "Prepared-Statement";
193155
+ var TRINO_ADDED_PREPARE_HEADER = TRINO_HEADER_PREFIX + "Added-Prepare";
193156
+ var TRINO_USER_HEADER = TRINO_HEADER_PREFIX + "User";
193157
+ var TRINO_SOURCE_HEADER = TRINO_HEADER_PREFIX + "Source";
193158
+ var TRINO_CATALOG_HEADER = TRINO_HEADER_PREFIX + "Catalog";
193159
+ var TRINO_SCHEMA_HEADER = TRINO_HEADER_PREFIX + "Schema";
193160
+ var TRINO_SESSION_HEADER = TRINO_HEADER_PREFIX + "Session";
193161
+ var TRINO_SET_CATALOG_HEADER = TRINO_HEADER_PREFIX + "Set-Catalog";
193162
+ var TRINO_SET_SCHEMA_HEADER = TRINO_HEADER_PREFIX + "Set-Schema";
193163
+ var TRINO_SET_PATH_HEADER = TRINO_HEADER_PREFIX + "Set-Path";
193164
+ var TRINO_SET_SESSION_HEADER = TRINO_HEADER_PREFIX + "Set-Session";
193165
+ var TRINO_CLEAR_SESSION_HEADER = TRINO_HEADER_PREFIX + "Clear-Session";
193166
+ var TRINO_SET_ROLE_HEADER = TRINO_HEADER_PREFIX + "Set-Role";
193167
+ var TRINO_EXTRA_CREDENTIAL_HEADER = TRINO_HEADER_PREFIX + "Extra-Credential";
193168
+
193169
+ class BasicAuth {
193170
+ constructor(username, password) {
193171
+ this.username = username;
193172
+ this.password = password;
193173
+ this.type = "basic";
193174
+ }
193175
+ }
193176
+ exports2.BasicAuth = BasicAuth;
193177
+ var encodeAsString = (obj) => {
193178
+ return Object.entries(obj).map(([key, value]) => `${key}=${value}`).join(",");
193179
+ };
193180
+ var cleanHeaders = (headers) => {
193181
+ const sanitizedHeaders = {};
193182
+ for (const [key, value] of Object.entries(headers)) {
193183
+ if (value) {
193184
+ sanitizedHeaders[key] = value;
193185
+ }
193186
+ }
193187
+ return sanitizedHeaders;
193188
+ };
193189
+
193190
+ class Client2 {
193191
+ constructor(clientConfig, options) {
193192
+ this.clientConfig = clientConfig;
193193
+ this.options = options;
193194
+ }
193195
+ static create(options) {
193196
+ var _a, _b, _c, _d, _e, _f, _g;
193197
+ const agent = new https.Agent((_a = options.ssl) !== null && _a !== undefined ? _a : {});
193198
+ const clientConfig = {
193199
+ baseURL: (_b = options.server) !== null && _b !== undefined ? _b : DEFAULT_SERVER,
193200
+ httpsAgent: agent
193201
+ };
193202
+ const headers = Object.assign({ [TRINO_USER_HEADER]: DEFAULT_USER, [TRINO_SOURCE_HEADER]: (_c = options.source) !== null && _c !== undefined ? _c : DEFAULT_SOURCE, [TRINO_CATALOG_HEADER]: options.catalog, [TRINO_SCHEMA_HEADER]: options.schema, [TRINO_SESSION_HEADER]: encodeAsString((_d = options.session) !== null && _d !== undefined ? _d : {}), [TRINO_EXTRA_CREDENTIAL_HEADER]: encodeAsString((_e = options.extraCredential) !== null && _e !== undefined ? _e : {}) }, (_f = options.extraHeaders) !== null && _f !== undefined ? _f : {});
193203
+ if (options.auth && options.auth.type === "basic") {
193204
+ const basic = options.auth;
193205
+ clientConfig.auth = {
193206
+ username: basic.username,
193207
+ password: (_g = basic.password) !== null && _g !== undefined ? _g : ""
193208
+ };
193209
+ headers[TRINO_USER_HEADER] = basic.username;
193210
+ }
193211
+ clientConfig.headers = cleanHeaders(headers);
193212
+ return new Client2(clientConfig, options);
193213
+ }
193214
+ request(cfg) {
193215
+ return __awaiter(this, undefined, undefined, function* () {
193216
+ return axios_1.default.create(this.clientConfig).request(cfg).then((response) => {
193217
+ var _a, _b, _c, _d, _e, _f, _g, _h;
193218
+ const reqHeaders = (_a = this.clientConfig.headers) !== null && _a !== undefined ? _a : {};
193219
+ const respHeaders = response.headers;
193220
+ reqHeaders[TRINO_CATALOG_HEADER] = (_c = (_b = respHeaders[TRINO_SET_CATALOG_HEADER.toLowerCase()]) !== null && _b !== undefined ? _b : reqHeaders[TRINO_CATALOG_HEADER]) !== null && _c !== undefined ? _c : this.options.catalog;
193221
+ reqHeaders[TRINO_SCHEMA_HEADER] = (_e = (_d = respHeaders[TRINO_SET_SCHEMA_HEADER.toLowerCase()]) !== null && _d !== undefined ? _d : reqHeaders[TRINO_SCHEMA_HEADER]) !== null && _e !== undefined ? _e : this.options.schema;
193222
+ reqHeaders[TRINO_SESSION_HEADER] = (_g = (_f = respHeaders[TRINO_SET_SESSION_HEADER.toLowerCase()]) !== null && _f !== undefined ? _f : reqHeaders[TRINO_SESSION_HEADER]) !== null && _g !== undefined ? _g : encodeAsString((_h = this.options.session) !== null && _h !== undefined ? _h : {});
193223
+ if (TRINO_CLEAR_SESSION_HEADER.toLowerCase() in respHeaders) {
193224
+ reqHeaders[TRINO_SESSION_HEADER] = undefined;
193225
+ }
193226
+ if (TRINO_ADDED_PREPARE_HEADER.toLowerCase() in respHeaders) {
193227
+ const prep = reqHeaders[TRINO_PREPARED_STATEMENT_HEADER];
193228
+ reqHeaders[TRINO_PREPARED_STATEMENT_HEADER] = (prep ? prep + "," : "") + respHeaders[TRINO_ADDED_PREPARE_HEADER.toLowerCase()];
193229
+ }
193230
+ this.clientConfig.headers = cleanHeaders(reqHeaders);
193231
+ return response.data;
193232
+ });
193233
+ });
193234
+ }
193235
+ query(query) {
193236
+ return __awaiter(this, undefined, undefined, function* () {
193237
+ var _a, _b, _c;
193238
+ const req = typeof query === "string" ? { query } : query;
193239
+ const headers = Object.assign({ [TRINO_USER_HEADER]: req.user, [TRINO_CATALOG_HEADER]: req.catalog, [TRINO_SCHEMA_HEADER]: req.schema, [TRINO_SESSION_HEADER]: encodeAsString((_a = req.session) !== null && _a !== undefined ? _a : {}), [TRINO_EXTRA_CREDENTIAL_HEADER]: encodeAsString((_b = req.extraCredential) !== null && _b !== undefined ? _b : {}) }, (_c = req.extraHeaders) !== null && _c !== undefined ? _c : {});
193240
+ const requestConfig = {
193241
+ method: "POST",
193242
+ url: "/v1/statement",
193243
+ data: req.query,
193244
+ headers: cleanHeaders(headers)
193245
+ };
193246
+ return this.request(requestConfig).then((result) => new Iterator2(new QueryIterator(this, result)));
193247
+ });
193248
+ }
193249
+ queryInfo(queryId) {
193250
+ return __awaiter(this, undefined, undefined, function* () {
193251
+ return this.request({ url: `/v1/query/${queryId}`, method: "GET" });
193252
+ });
193253
+ }
193254
+ cancel(queryId) {
193255
+ return __awaiter(this, undefined, undefined, function* () {
193256
+ return this.request({ url: `/v1/query/${queryId}`, method: "DELETE" }).then((_) => ({ id: queryId }));
193257
+ });
193258
+ }
193259
+ }
193260
+
193261
+ class Iterator2 {
193262
+ constructor(iter) {
193263
+ this.iter = iter;
193264
+ }
193265
+ [Symbol.asyncIterator]() {
193266
+ return this;
193267
+ }
193268
+ next() {
193269
+ return this.iter.next();
193270
+ }
193271
+ map(fn) {
193272
+ const that = this.iter;
193273
+ const asyncIterableIterator = {
193274
+ [Symbol.asyncIterator]: () => asyncIterableIterator,
193275
+ next() {
193276
+ return __awaiter(this, undefined, undefined, function* () {
193277
+ return that.next().then((result) => {
193278
+ return {
193279
+ value: fn(result.value),
193280
+ done: result.done
193281
+ };
193282
+ });
193283
+ });
193284
+ }
193285
+ };
193286
+ return new Iterator2(asyncIterableIterator);
193287
+ }
193288
+ forEach(fn) {
193289
+ return __awaiter(this, undefined, undefined, function* () {
193290
+ var _a, e_1, _b, _c;
193291
+ try {
193292
+ for (var _d = true, _e = __asyncValues(this), _f;_f = yield _e.next(), _a = _f.done, !_a; _d = true) {
193293
+ _c = _f.value;
193294
+ _d = false;
193295
+ const value = _c;
193296
+ fn(value);
193297
+ }
193298
+ } catch (e_1_1) {
193299
+ e_1 = { error: e_1_1 };
193300
+ } finally {
193301
+ try {
193302
+ if (!_d && !_a && (_b = _e.return))
193303
+ yield _b.call(_e);
193304
+ } finally {
193305
+ if (e_1)
193306
+ throw e_1.error;
193307
+ }
193308
+ }
193309
+ });
193310
+ }
193311
+ fold(acc, fn) {
193312
+ return __awaiter(this, undefined, undefined, function* () {
193313
+ yield this.forEach((value) => acc = fn(value, acc));
193314
+ return acc;
193315
+ });
193316
+ }
193317
+ }
193318
+ exports2.Iterator = Iterator2;
193319
+
193320
+ class QueryIterator {
193321
+ constructor(client, queryResult) {
193322
+ this.client = client;
193323
+ this.queryResult = queryResult;
193324
+ }
193325
+ [Symbol.asyncIterator]() {
193326
+ return this;
193327
+ }
193328
+ hasNext() {
193329
+ return !!this.queryResult.nextUri;
193330
+ }
193331
+ next() {
193332
+ return __awaiter(this, undefined, undefined, function* () {
193333
+ var _a;
193334
+ if (!this.hasNext()) {
193335
+ return Promise.resolve({ value: this.queryResult, done: true });
193336
+ }
193337
+ this.queryResult = yield this.client.request({
193338
+ url: this.queryResult.nextUri
193339
+ });
193340
+ const data = (_a = this.queryResult.data) !== null && _a !== undefined ? _a : [];
193341
+ if (data.length === 0) {
193342
+ if (this.hasNext()) {
193343
+ return this.next();
193344
+ }
193345
+ }
193346
+ return Promise.resolve({ value: this.queryResult, done: false });
193347
+ });
193348
+ }
193349
+ }
193350
+ exports2.QueryIterator = QueryIterator;
193351
+
193352
+ class Trino {
193353
+ constructor(client) {
193354
+ this.client = client;
193355
+ }
193356
+ static create(options) {
193357
+ return new Trino(Client2.create(options));
193358
+ }
193359
+ query(query) {
193360
+ return __awaiter(this, undefined, undefined, function* () {
193361
+ return this.client.query(query);
193362
+ });
193363
+ }
193364
+ queryInfo(queryId) {
193365
+ return __awaiter(this, undefined, undefined, function* () {
193366
+ return this.client.queryInfo(queryId);
193367
+ });
193368
+ }
193369
+ cancel(queryId) {
193370
+ return __awaiter(this, undefined, undefined, function* () {
193371
+ return this.client.cancel(queryId);
193372
+ });
193373
+ }
193374
+ }
193375
+ exports2.Trino = Trino;
193376
+ });
193377
+
190027
193378
  // ../../node_modules/sqlstring/lib/SqlString.js
190028
193379
  var require_SqlString = __commonJS((exports2) => {
190029
193380
  var SqlString = exports2;
@@ -213845,7 +217196,7 @@ var require_src20 = __commonJS((exports2) => {
213845
217196
  });
213846
217197
 
213847
217198
  // ../../node_modules/@kwsites/file-exists/dist/index.js
213848
- var require_dist17 = __commonJS((exports2) => {
217199
+ var require_dist18 = __commonJS((exports2) => {
213849
217200
  function __export2(m) {
213850
217201
  for (var p in m)
213851
217202
  if (!exports2.hasOwnProperty(p))
@@ -213856,7 +217207,7 @@ var require_dist17 = __commonJS((exports2) => {
213856
217207
  });
213857
217208
 
213858
217209
  // ../../node_modules/@kwsites/promise-deferred/dist/index.js
213859
- var require_dist18 = __commonJS((exports2) => {
217210
+ var require_dist19 = __commonJS((exports2) => {
213860
217211
  Object.defineProperty(exports2, "__esModule", { value: true });
213861
217212
  exports2.createDeferred = exports2.deferred = undefined;
213862
217213
  function deferred() {
@@ -216884,7 +220235,7 @@ var require_version9 = __commonJS((exports2) => {
216884
220235
  });
216885
220236
 
216886
220237
  // ../../node_modules/node-cron/node_modules/uuid/dist/index.js
216887
- var require_dist19 = __commonJS((exports2) => {
220238
+ var require_dist20 = __commonJS((exports2) => {
216888
220239
  Object.defineProperty(exports2, "__esModule", {
216889
220240
  value: true
216890
220241
  });
@@ -216961,7 +220312,7 @@ var require_scheduled_task = __commonJS((exports2, module2) => {
216961
220312
  var EventEmitter4 = require("events");
216962
220313
  var Task = require_task();
216963
220314
  var Scheduler2 = require_scheduler();
216964
- var uuid = require_dist19();
220315
+ var uuid = require_dist20();
216965
220316
 
216966
220317
  class ScheduledTask extends EventEmitter4 {
216967
220318
  constructor(cronExpression, func, options) {
@@ -217006,7 +220357,7 @@ var require_background_scheduled_task = __commonJS((exports2, module2) => {
217006
220357
  var EventEmitter4 = require("events");
217007
220358
  var path6 = require("path");
217008
220359
  var { fork } = require("child_process");
217009
- var uuid = require_dist19();
220360
+ var uuid = require_dist20();
217010
220361
  var daemonPath = `${__dirname}/daemon.js`;
217011
220362
 
217012
220363
  class BackgroundScheduledTask extends EventEmitter4 {
@@ -217071,7 +220422,7 @@ var require_storage = __commonJS((exports2, module2) => {
217071
220422
  return {
217072
220423
  save: (task) => {
217073
220424
  if (!task.options) {
217074
- const uuid = require_dist19();
220425
+ const uuid = require_dist20();
217075
220426
  task.options = {};
217076
220427
  task.options.name = uuid.v4();
217077
220428
  }
@@ -234051,6 +237402,7 @@ function v4(options, buf, offset) {
234051
237402
  }
234052
237403
  var v4_default = v4;
234053
237404
  // src/service/db_utils.ts
237405
+ var import_trino_client = __toESM(require_dist17());
234054
237406
  async function getPostgresConnection(apiPostgresConnection) {
234055
237407
  return new Pool({
234056
237408
  user: apiPostgresConnection.userName,
@@ -234108,6 +237460,20 @@ async function getSnowflakeConnection(apiSnowflakeConnection) {
234108
237460
  });
234109
237461
  });
234110
237462
  }
237463
+ function getTrinoClient(trinoConn) {
237464
+ let auth;
237465
+ if (trinoConn.server?.startsWith("https://")) {
237466
+ auth = new import_trino_client.BasicAuth(trinoConn?.user || "", trinoConn?.password || "");
237467
+ } else {
237468
+ auth = new import_trino_client.BasicAuth(trinoConn?.user || "");
237469
+ }
237470
+ return import_trino_client.Trino.create({
237471
+ server: trinoConn.server,
237472
+ catalog: trinoConn.catalog,
237473
+ schema: trinoConn.schema,
237474
+ auth
237475
+ });
237476
+ }
234111
237477
  async function getSchemasForConnection(connection) {
234112
237478
  if (connection.type === "bigquery") {
234113
237479
  if (!connection.bigqueryConnection) {
@@ -234170,6 +237536,25 @@ async function getSchemasForConnection(connection) {
234170
237536
  }
234171
237537
  });
234172
237538
  }
237539
+ } else if (connection.type === "trino") {
237540
+ if (!connection.trinoConnection) {
237541
+ throw new Error("Trino connection is required");
237542
+ }
237543
+ const client = getTrinoClient(connection.trinoConnection);
237544
+ const result = await client.query(`SHOW SCHEMAS FROM ${connection.trinoConnection.catalog}`);
237545
+ const rows = [];
237546
+ let next = await result.next();
237547
+ while (!next.done) {
237548
+ if (next.value.data) {
237549
+ rows.push(...next.value.data.map((r) => r[0]));
237550
+ }
237551
+ next = await result.next();
237552
+ }
237553
+ return rows.map((r) => ({
237554
+ name: r,
237555
+ isHidden: false,
237556
+ isDefault: r === connection.trinoConnection?.schema
237557
+ }));
234173
237558
  } else {
234174
237559
  throw new Error(`Unsupported connection type: ${connection.type}`);
234175
237560
  }
@@ -234220,6 +237605,21 @@ async function getTablesForSchema(connection, schemaName) {
234220
237605
  }
234221
237606
  });
234222
237607
  }
237608
+ } else if (connection.type === "trino") {
237609
+ if (!connection.trinoConnection) {
237610
+ throw new Error("Trino connection is required");
237611
+ }
237612
+ const client = getTrinoClient(connection.trinoConnection);
237613
+ const result = await client.query(`SHOW TABLES FROM ${connection.trinoConnection.catalog}.${schemaName}`);
237614
+ const rows = [];
237615
+ let next = await result.next();
237616
+ while (!next.done) {
237617
+ if (next.value.data) {
237618
+ rows.push(...next.value.data.map((r) => r[0]));
237619
+ }
237620
+ next = await result.next();
237621
+ }
237622
+ return rows;
234223
237623
  } else {
234224
237624
  return [];
234225
237625
  }
@@ -237621,6 +241021,31 @@ async function readConnectionConfig(_basePath, projectName, serverRootPath) {
237621
241021
  const connections = getConnectionsFromPublisherConfig(serverRootPath, projectName);
237622
241022
  return convertConnectionsToApiConnections(connections);
237623
241023
  }
241024
+ function validateAndBuildTrinoConfig(trinoConfig) {
241025
+ if (!trinoConfig.server?.includes(trinoConfig.port?.toString() || "")) {
241026
+ trinoConfig.server = `${trinoConfig.server}:${trinoConfig.port}`;
241027
+ }
241028
+ if (trinoConfig.server?.startsWith("http://")) {
241029
+ return {
241030
+ server: trinoConfig.server,
241031
+ port: trinoConfig.port,
241032
+ catalog: trinoConfig.catalog,
241033
+ schema: trinoConfig.schema,
241034
+ user: trinoConfig.user
241035
+ };
241036
+ } else if (trinoConfig.server?.startsWith("https://") && trinoConfig.password) {
241037
+ return {
241038
+ server: trinoConfig.server,
241039
+ port: trinoConfig.port,
241040
+ catalog: trinoConfig.catalog,
241041
+ schema: trinoConfig.schema,
241042
+ user: trinoConfig.user,
241043
+ password: trinoConfig.password
241044
+ };
241045
+ } else {
241046
+ throw new Error(`Invalid Trino connection: expected "http://server:port" (no password) or "https://server:port" (with username and password).`);
241047
+ }
241048
+ }
237624
241049
  async function createConnections(basePath, defaultConnections = [], projectName, serverRootPath) {
237625
241050
  const connectionMap = new Map;
237626
241051
  const connectionConfig = await readConnectionConfig(basePath, projectName, serverRootPath);
@@ -237732,14 +241157,7 @@ async function createConnections(basePath, defaultConnections = [], projectName,
237732
241157
  if (!connection.trinoConnection) {
237733
241158
  throw new Error("Trino connection configuration is missing.");
237734
241159
  }
237735
- const trinoConnectionOptions = {
237736
- server: connection.trinoConnection.server,
237737
- port: connection.trinoConnection.port,
237738
- catalog: connection.trinoConnection.catalog,
237739
- schema: connection.trinoConnection.schema,
237740
- user: connection.trinoConnection.user,
237741
- password: connection.trinoConnection.password
237742
- };
241160
+ const trinoConnectionOptions = validateAndBuildTrinoConfig(connection.trinoConnection);
237743
241161
  const trinoConnection = new import_db_trino.TrinoConnection(connection.name, {}, trinoConnectionOptions);
237744
241162
  connectionMap.set(connection.name, trinoConnection);
237745
241163
  connection.attributes = getConnectionAttributes(trinoConnection);
@@ -237891,16 +241309,9 @@ async function testConnectionConfig(connectionConfig) {
237891
241309
  }
237892
241310
  const trinoConfig = connectionConfig.trinoConnection;
237893
241311
  if (!trinoConfig.server || !trinoConfig.port || !trinoConfig.catalog || !trinoConfig.schema || !trinoConfig.user) {
237894
- throw new Error("Trino connection requires: server, port, catalog, schema, and user");
241312
+ throw new Error("Trino connection requires server, port, catalog, schema, and user");
237895
241313
  }
237896
- const trinoConnectionOptions = {
237897
- server: trinoConfig.server,
237898
- port: trinoConfig.port,
237899
- catalog: trinoConfig.catalog,
237900
- schema: trinoConfig.schema,
237901
- user: trinoConfig.user,
237902
- password: trinoConfig.password
237903
- };
241314
+ const trinoConnectionOptions = validateAndBuildTrinoConfig(trinoConfig);
237904
241315
  const trinoConnection = new import_db_trino.TrinoConnection("testConnection", {}, trinoConnectionOptions);
237905
241316
  try {
237906
241317
  await trinoConnection.test();
@@ -237918,6 +241329,38 @@ async function testConnectionConfig(connectionConfig) {
237918
241329
  }
237919
241330
  break;
237920
241331
  }
241332
+ case "mysql": {
241333
+ if (!connectionConfig.mysqlConnection) {
241334
+ throw new Error("MySQL connection configuration is missing.");
241335
+ }
241336
+ if (!connectionConfig.mysqlConnection.host || !connectionConfig.mysqlConnection.port || !connectionConfig.mysqlConnection.user || !connectionConfig.mysqlConnection.password || !connectionConfig.mysqlConnection.database) {
241337
+ throw new Error("MySQL connection requires: host, port, user, password, and database");
241338
+ }
241339
+ const mysqlConfig = connectionConfig.mysqlConnection;
241340
+ const mysqlConnectionOptions = {
241341
+ host: mysqlConfig.host,
241342
+ port: mysqlConfig.port,
241343
+ user: mysqlConfig.user,
241344
+ password: mysqlConfig.password,
241345
+ database: mysqlConfig.database
241346
+ };
241347
+ const mysqlConnection = new import_db_mysql.MySQLConnection("testConnection", mysqlConnectionOptions);
241348
+ try {
241349
+ await mysqlConnection.test();
241350
+ testResult = { status: "ok" };
241351
+ } catch (error) {
241352
+ if (error instanceof AxiosError2) {
241353
+ logAxiosError(error);
241354
+ } else {
241355
+ logger2.error(error);
241356
+ }
241357
+ testResult = {
241358
+ status: "failed",
241359
+ errorMessage: error.message
241360
+ };
241361
+ }
241362
+ break;
241363
+ }
237921
241364
  default:
237922
241365
  throw new BadRequestError(`Unsupported connection type: ${connectionConfig.type}`);
237923
241366
  }
@@ -239801,11 +243244,11 @@ var path8 = __toESM(require("path"));
239801
243244
 
239802
243245
  // ../../node_modules/simple-git/dist/esm/index.js
239803
243246
  var import_node_buffer = require("node:buffer");
239804
- var import_file_exists = __toESM(require_dist17());
243247
+ var import_file_exists = __toESM(require_dist18());
239805
243248
  var import_debug = __toESM(require_src5());
239806
243249
  var import_child_process = require("child_process");
239807
- var import_promise_deferred = __toESM(require_dist18());
239808
- var import_promise_deferred2 = __toESM(require_dist18());
243250
+ var import_promise_deferred = __toESM(require_dist19());
243251
+ var import_promise_deferred2 = __toESM(require_dist19());
239809
243252
  var import_node_events = require("node:events");
239810
243253
  var __defProp2 = Object.defineProperty;
239811
243254
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;