@testmuai/kane-cli 0.7.2 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/dist/ChatSurface-B3ULYDYC.js +8 -0
  2. package/dist/{ChromeProfilePicker-DGDWGCZD.js → ChromeProfilePicker-T77E7ZSC.js} +1 -1
  3. package/dist/{CliFeedbackPrompt-SYCZXSME.js → CliFeedbackPrompt-FQ2XV5DZ.js} +1 -1
  4. package/dist/{CliUploadProgress-VDEAKXJY.js → CliUploadProgress-TZ55LONO.js} +1 -1
  5. package/dist/ConfigView-WWQMH36G.js +2 -0
  6. package/dist/EvidenceViewOffer-L5FVBQNK.js +2 -0
  7. package/dist/FolderPicker-6Z3CYSHF.js +2 -0
  8. package/dist/{HelpView-ON6BFGJM.js → HelpView-XXPCPJNF.js} +1 -1
  9. package/dist/{InfoBox-B23NZ6IG.js → InfoBox-SHBRHQX5.js} +1 -1
  10. package/dist/{LinksBox-TI26VFFH.js → LinksBox-ENNF7TDJ.js} +1 -1
  11. package/dist/{ProfilesView-CRO5AH3H.js → ProfilesView-CNF2FXF3.js} +1 -1
  12. package/dist/{ProjectPicker-3N7LJOXU.js → ProjectPicker-PVPLS642.js} +1 -1
  13. package/dist/{SaveSessionPrompt-UTOEC5AW.js → SaveSessionPrompt-4QP4GNGO.js} +1 -1
  14. package/dist/SingleShotApp-M3HNSUMZ.js +2 -0
  15. package/dist/{SummaryBox-JK64EKC2.js → SummaryBox-HYNINDNN.js} +1 -1
  16. package/dist/TestMdRunView-ISOVQ7YP.js +2 -0
  17. package/dist/{WhoamiView-6QSLPNF6.js → WhoamiView-NN2HOK6H.js} +1 -1
  18. package/dist/adbkit-apkreader-ORZBGCJQ.js +184 -0
  19. package/dist/app-client-ZCCNE3RV.js +2 -0
  20. package/dist/app-download-5UJMXPF3.js +2 -0
  21. package/dist/{auth-IKFVW3NX.js → auth-QKBTOWQX.js} +1 -1
  22. package/dist/{bind-KCUSVJXG.js → bind-LVGP5KHO.js} +3 -3
  23. package/dist/{bootstrap-NFYYRGGR.js → bootstrap-RUJBMB2P.js} +1 -1
  24. package/dist/bridge-QDPBIIOW.js +2 -0
  25. package/dist/{changelog-AAH2ZBYO.js → changelog-HBPBPR2O.js} +1 -1
  26. package/dist/{chat-committer-UUC6JTRJ.js → chat-committer-ZWWCLJFD.js} +1 -1
  27. package/dist/{chat-controller-T2FAI55V.js → chat-controller-R4THYYPU.js} +1 -1
  28. package/dist/chunk-2E3ZWGIK.js +12 -0
  29. package/dist/chunk-2KH2JUGL.js +13 -0
  30. package/dist/{chunk-VWKVUOXU.js → chunk-2TYCUPCN.js} +1 -1
  31. package/dist/{chunk-GYNTNKNB.js → chunk-2ZZDNPFN.js} +1 -1
  32. package/dist/chunk-3654GK6O.js +66 -0
  33. package/dist/{chunk-M6FKJKC6.js → chunk-3NHO5R4P.js} +3 -3
  34. package/dist/{chunk-SFII7HPP.js → chunk-4II6VDXG.js} +1 -1
  35. package/dist/chunk-4J6DQFPC.js +4 -0
  36. package/dist/chunk-4JOD47QI.js +2 -0
  37. package/dist/{chunk-5FJJJNJK.js → chunk-4U4OSOA4.js} +1 -1
  38. package/dist/{chunk-QIGPXYMF.js → chunk-56PAQAX5.js} +6 -6
  39. package/dist/chunk-5NIYYD7O.js +2 -0
  40. package/dist/chunk-5SNT2MK5.js +2 -0
  41. package/dist/chunk-6IA6QMPH.js +2 -0
  42. package/dist/chunk-6J5T5FEY.js +2 -0
  43. package/dist/chunk-6N726QLP.js +349 -0
  44. package/dist/chunk-7F2ZV46B.js +2 -0
  45. package/dist/{chunk-7OYZR6JA.js → chunk-7S3JZ6FQ.js} +1 -1
  46. package/dist/chunk-A2SQD2AY.js +4 -0
  47. package/dist/chunk-AJQT4IWZ.js +2 -0
  48. package/dist/chunk-AN2ZPHCE.js +2 -0
  49. package/dist/{chunk-7QJ75SYR.js → chunk-ATGRRKEV.js} +2 -2
  50. package/dist/chunk-AXTPNZPX.js +2 -0
  51. package/dist/{chunk-ZRASQ63J.js → chunk-BKVDAZEJ.js} +1 -1
  52. package/dist/{chunk-2WVKOZ6W.js → chunk-BPMSNGXQ.js} +1 -1
  53. package/dist/chunk-BRIEBB2U.js +2 -0
  54. package/dist/chunk-BSYX225I.js +2 -0
  55. package/dist/{chunk-B5RS2XZU.js → chunk-CAMO26QU.js} +3 -3
  56. package/dist/chunk-DPUV6OSP.js +2 -0
  57. package/dist/chunk-ECZMYPLJ.js +19 -0
  58. package/dist/chunk-EYOCNMUM.js +2 -0
  59. package/dist/{chunk-DZPGG4S6.js → chunk-FNS2EAA5.js} +2 -2
  60. package/dist/{chunk-VMM4LC4V.js → chunk-GNIFMQNK.js} +3 -3
  61. package/dist/chunk-GUVM6SZF.js +2 -0
  62. package/dist/{chunk-ZBOWFJB2.js → chunk-HFFPPCZO.js} +2 -2
  63. package/dist/chunk-HRZOFTV7.js +4 -0
  64. package/dist/chunk-HWH3UYD6.js +4 -0
  65. package/dist/{chunk-JKM2PUHI.js → chunk-I7RQS65W.js} +1 -1
  66. package/dist/chunk-IUEEFGEW.js +11 -0
  67. package/dist/{chunk-KWIK22R6.js → chunk-IV76ZXCY.js} +1 -1
  68. package/dist/{chunk-HYSFJSIG.js → chunk-IZ2FJYHG.js} +1 -1
  69. package/dist/{chunk-4NFCAGRK.js → chunk-J7KT44IC.js} +1 -1
  70. package/dist/{chunk-VOOPWFHW.js → chunk-JEDLXUO5.js} +1 -1
  71. package/dist/chunk-JGOZUAMC.js +2 -0
  72. package/dist/{chunk-4LTXE3IX.js → chunk-JHKM7W5X.js} +1 -1
  73. package/dist/chunk-JJN76EXE.js +2 -0
  74. package/dist/{chunk-EOLFTMWF.js → chunk-JUVQQP42.js} +1 -1
  75. package/dist/chunk-KKRNTSLL.js +6 -0
  76. package/dist/chunk-KRKGZ2ZW.js +47 -0
  77. package/dist/{chunk-YTHQNN2L.js → chunk-LDCLZR2U.js} +1 -1
  78. package/dist/chunk-LQQXPY5B.js +4 -0
  79. package/dist/{chunk-UC7MNPIN.js → chunk-LVCY5IYI.js} +1 -1
  80. package/dist/{chunk-O75ZHGJG.js → chunk-LVN6VHFN.js} +1 -1
  81. package/dist/chunk-MMBBQ4OZ.js +2 -0
  82. package/dist/chunk-MSGW4JDG.js +2 -0
  83. package/dist/{chunk-VLWMMOMF.js → chunk-MTIC65NK.js} +1 -1
  84. package/dist/chunk-NHBYZCSX.js +4 -0
  85. package/dist/chunk-NRUD56FY.js +7 -0
  86. package/dist/chunk-NXFAEDHV.js +26 -0
  87. package/dist/{chunk-OIYGGEUL.js → chunk-NXXJ56QA.js} +1 -1
  88. package/dist/{chunk-AXTGYOMK.js → chunk-O3AHFP3K.js} +1 -1
  89. package/dist/chunk-OAVPM6YJ.js +2 -0
  90. package/dist/{chunk-FBHRBFHP.js → chunk-OJTCIZDK.js} +1 -1
  91. package/dist/{chunk-JPWLGHPM.js → chunk-OOEPLMKA.js} +1 -1
  92. package/dist/{chunk-VT54ARGE.js → chunk-PXCMEI73.js} +1 -1
  93. package/dist/{chunk-APPYQZFK.js → chunk-R4UCBA5R.js} +1 -1
  94. package/dist/chunk-RKXHVP2Z.js +2 -0
  95. package/dist/{chunk-AJ56AMT6.js → chunk-RN4PKQFR.js} +1 -1
  96. package/dist/chunk-RUCSRS4C.js +5 -0
  97. package/dist/chunk-TAOHYWEO.js +2 -0
  98. package/dist/chunk-TZXXJWHA.js +2 -0
  99. package/dist/{chunk-VRLUNZAK.js → chunk-U5GHOGLM.js} +1 -1
  100. package/dist/chunk-UJZZDPDY.js +2 -0
  101. package/dist/{chunk-VHZ4S57N.js → chunk-UODLRQQ4.js} +1 -1
  102. package/dist/chunk-VK3NU742.js +21 -0
  103. package/dist/{chunk-FDIPQRX4.js → chunk-VPRNGWIY.js} +1 -1
  104. package/dist/{chunk-RDNFVZEB.js → chunk-WOEQDUJ6.js} +1 -1
  105. package/dist/chunk-WQPQNL4S.js +2 -0
  106. package/dist/{chunk-SL6PCVM2.js → chunk-WV27D55O.js} +1 -1
  107. package/dist/{chunk-2WFZIQ62.js → chunk-WVCH66YH.js} +1 -1
  108. package/dist/{chunk-PLOWZLG5.js → chunk-YCLG3T5E.js} +2 -2
  109. package/dist/chunk-YGMC3FGJ.js +26 -0
  110. package/dist/{chunk-5SXMV66P.js → chunk-YHYTCENI.js} +1 -1
  111. package/dist/{chunk-KQZA2QSC.js → chunk-YSSYT5F5.js} +1 -1
  112. package/dist/{chunk-OR6MCL6Z.js → chunk-YTDSQAYN.js} +1 -1
  113. package/dist/{chunk-XUS4WKDS.js → chunk-ZEDAPY7M.js} +1 -1
  114. package/dist/{chunk-F7ISS545.js → chunk-ZGBSGZZM.js} +1 -1
  115. package/dist/chunk-ZI6UIJUN.js +11 -0
  116. package/dist/{config-CWZV6XPT.js → config-RLDXM5ZH.js} +1 -1
  117. package/dist/{controller-client-RD2YEMAH.js → controller-client-OB4WD2C4.js} +1 -1
  118. package/dist/{cover-cmd-NWIRJY5Z.js → cover-cmd-HDZZWJXG.js} +1 -1
  119. package/dist/{credentials-YHTJGKEO.js → credentials-CALNKQMN.js} +1 -1
  120. package/dist/deps-bundle-GVHIMZ5E.js +2 -0
  121. package/dist/deps-resolve-T6P4EACP.js +2 -0
  122. package/dist/{dispatch-WVNXB7AD.js → dispatch-ECUEAMXS.js} +1 -1
  123. package/dist/doctor-SIBHJVGC.js +2 -0
  124. package/dist/docx-convert-JMUMT5C4.js +2 -0
  125. package/dist/evidence-ZVQHPELX.js +2 -0
  126. package/dist/evolve-cmd-JGCFTXWA.js +2 -0
  127. package/dist/exec-P2IKJRRR.js +2 -0
  128. package/dist/exit-manager-3FVBTNYR.js +2 -0
  129. package/dist/{explain-cmd-IZEHWZV5.js → explain-cmd-3GEKR7O5.js} +1 -1
  130. package/dist/{explain-cmd-75MCF2ZV.js → explain-cmd-EX24XKD6.js} +1 -1
  131. package/dist/extract-bind-EXW32RUY.js +10 -0
  132. package/dist/{extract-cmd-ZRYMJ6IC.js → extract-cmd-7IOLJJCL.js} +2 -2
  133. package/dist/gaps-cmd-WPCJPLGB.js +3 -0
  134. package/dist/{generate-headless-D6BISWDC.js → generate-headless-U4GTG234.js} +3 -3
  135. package/dist/host-7GZPBA74.js +2 -0
  136. package/dist/index.js +84 -67
  137. package/dist/ingest-cmd-YYNAKI2U.js +2 -0
  138. package/dist/interactive-bind-Y65XV4Y5.js +25 -0
  139. package/dist/{lifecycle-cmd-EQSFAZG6.js → lifecycle-cmd-HO5VL7AM.js} +1 -1
  140. package/dist/{list-cmd-IRJSUCM5.js → list-cmd-N4KMA34H.js} +1 -1
  141. package/dist/list-commands-3EROWJWV.js +2 -0
  142. package/dist/login-flow-TRINUSBB.js +2 -0
  143. package/dist/{maintenance-cmd-MVFA6H74.js → maintenance-cmd-6XSVO6FO.js} +1 -1
  144. package/dist/mobile-prompts-TP3ODM5M.js +2 -0
  145. package/dist/persist-recorded-session-EHYT3PVN.js +3 -0
  146. package/dist/pipeline-5GOS2KV2.js +2 -0
  147. package/dist/prepare-target-BUEOZVJV.js +2 -0
  148. package/dist/reconcile-cmd-TY3MWZL3.js +2 -0
  149. package/dist/reconcile-deps-6KTJHBMJ.js +4 -0
  150. package/dist/reconcile-engine-O7QEZVX6.js +2 -0
  151. package/dist/{recording-banner-76GCIPUN.js → recording-banner-BWWFOJCR.js} +1 -1
  152. package/dist/registry-KXEDLM6X.js +2 -0
  153. package/dist/{require-project-folder-ACRDP5ZB.js → require-project-folder-CXDRRWEQ.js} +1 -1
  154. package/dist/resolve-run-intent-PZXEQTHC.js +7 -0
  155. package/dist/{resolver-SRPCFW7P.js → resolver-FTU5KO7H.js} +1 -1
  156. package/dist/{review-cmd-L3V5UP5T.js → review-cmd-DQRKQUMG.js} +1 -1
  157. package/dist/run-CMFBSYWF.js +2 -0
  158. package/dist/run-WKHPVWUN.js +2 -0
  159. package/dist/{run-test-md-KEHSRMCM.js → run-test-md-7HGOZJSU.js} +3 -3
  160. package/dist/session-items-2ATN7VXG.js +2 -0
  161. package/dist/session-target-UWROGOCY.js +2 -0
  162. package/dist/{sessions-cmd-ZVYGSRJ3.js → sessions-cmd-ZZIZN2VB.js} +1 -1
  163. package/dist/{skill-installer-HBN3A35K.js → skill-installer-QNUDLGPD.js} +1 -1
  164. package/dist/spawner-DQZRJIE6.js +2 -0
  165. package/dist/{structured-answers-A43Q25CZ.js → structured-answers-5EY2AZN7.js} +1 -1
  166. package/dist/tcg-generate-XKSTMCOG.js +2 -0
  167. package/dist/testmd-actions-IFRW7NGG.js +2 -0
  168. package/dist/{tms-client-VD3B3SMU.js → tms-client-V3TR4QW3.js} +1 -1
  169. package/dist/token-refresh-FP6JFLXB.js +2 -0
  170. package/dist/types-6E2HTDKJ.js +2 -0
  171. package/dist/{validate-basic-ZGWPBYB6.js → validate-basic-3CNUDDH7.js} +1 -1
  172. package/dist/{verdicts-SCETLY5J.js → verdicts-NYCSBWUC.js} +1 -1
  173. package/dist/{version-check-CJWKDAXV.js → version-check-7TSAVA6V.js} +1 -1
  174. package/dist/{view-cmd-SOVM64L2.js → view-cmd-KPJTP4DI.js} +1 -1
  175. package/dist/walk-session-AINBHZKB.js +2 -0
  176. package/dist/{with-telemetry-E7QWPGL6.js → with-telemetry-3DL7ZEZL.js} +1 -1
  177. package/package.json +12 -6
  178. package/dist/ChatSurface-E7QKI4LA.js +0 -8
  179. package/dist/ConfigView-HPKRQXMC.js +0 -2
  180. package/dist/EvidenceViewOffer-F5YG54OC.js +0 -2
  181. package/dist/FolderPicker-4NSDXQY5.js +0 -2
  182. package/dist/SingleShotApp-Y3YDFQSD.js +0 -2
  183. package/dist/TestMdRunView-O6JTHV5W.js +0 -2
  184. package/dist/bridge-JSKEO4N3.js +0 -2
  185. package/dist/chunk-23VPUWBD.js +0 -23
  186. package/dist/chunk-2WRBTLFN.js +0 -13
  187. package/dist/chunk-53IBTIL3.js +0 -12
  188. package/dist/chunk-5WXGMXGA.js +0 -26
  189. package/dist/chunk-5ZQZOVWY.js +0 -4
  190. package/dist/chunk-74HTO7K3.js +0 -11
  191. package/dist/chunk-AECMF3T2.js +0 -8
  192. package/dist/chunk-AFBKGZFG.js +0 -2
  193. package/dist/chunk-BXYWX4J3.js +0 -2
  194. package/dist/chunk-C3T7TKAC.js +0 -349
  195. package/dist/chunk-DBKNJRJG.js +0 -2
  196. package/dist/chunk-H32GM5G4.js +0 -2
  197. package/dist/chunk-J5FBU425.js +0 -62
  198. package/dist/chunk-KCCSWEGA.js +0 -4
  199. package/dist/chunk-MK7JUOYV.js +0 -6
  200. package/dist/chunk-ORQNKZ2Z.js +0 -5
  201. package/dist/chunk-OUJQVBUT.js +0 -7
  202. package/dist/chunk-QOFZSHSC.js +0 -47
  203. package/dist/chunk-RKWJG3WW.js +0 -19
  204. package/dist/chunk-STVP2XHO.js +0 -2
  205. package/dist/chunk-VFII6C46.js +0 -2
  206. package/dist/chunk-VGFTNLQQ.js +0 -2
  207. package/dist/chunk-WAOCHXJ5.js +0 -2
  208. package/dist/chunk-ZUGCHQFC.js +0 -2
  209. package/dist/docx-convert-CHLJUTFH.js +0 -2
  210. package/dist/evidence-IVDNXWPL.js +0 -2
  211. package/dist/evolve-cmd-XBX4SX5H.js +0 -2
  212. package/dist/exit-manager-XZL4KIJU.js +0 -2
  213. package/dist/extract-bind-5OWELRME.js +0 -10
  214. package/dist/gaps-cmd-XBRXKXDL.js +0 -3
  215. package/dist/ingest-cmd-YTGOICTC.js +0 -2
  216. package/dist/interactive-bind-XSRD36MO.js +0 -25
  217. package/dist/list-commands-RCYHJ5Y3.js +0 -2
  218. package/dist/login-flow-PYAPYCPY.js +0 -2
  219. package/dist/persist-recorded-session-DTYCLXTQ.js +0 -3
  220. package/dist/pipeline-MXFOD6ES.js +0 -2
  221. package/dist/reconcile-cmd-EG6BOU3A.js +0 -2
  222. package/dist/reconcile-deps-HTT6IPHT.js +0 -4
  223. package/dist/reconcile-engine-JQNXALNY.js +0 -2
  224. package/dist/run-GMZCDRDD.js +0 -2
  225. package/dist/run-TFRWPGXP.js +0 -2
  226. package/dist/spawner-GC5CFAJ7.js +0 -2
  227. package/dist/tcg-generate-V7YFNC5O.js +0 -2
  228. package/dist/testmd-actions-MNDOO76O.js +0 -2
  229. package/dist/token-refresh-3UYMCYG3.js +0 -2
  230. package/dist/walk-session-YUYRULPY.js +0 -2
@@ -0,0 +1,184 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as ie,c as j}from"./chunk-UR6MHSHU.js";var er=j((ya,Zt)=>{"use strict";Zt.exports=Ye;function Ye(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}Ye.prototype.go=function(e){this.pending<this.max?Jt(this,e):this.waiting.push(e)};Ye.prototype.wait=function(e){this.pending===0?e(this.error):this.listeners.push(e)};Ye.prototype.hold=function(){return Kt(this)};function Kt(e){e.pending+=1;var t=!1;return r;function r(i){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||i,e.pending-=1,e.waiting.length>0&&e.pending<e.max)Jt(e,e.waiting.shift());else if(e.pending===0){var a=e.listeners;e.listeners=[],a.forEach(n)}}function n(i){i(e.error)}}function Jt(e,t){t(Kt(e))}});var rr=j(He=>{"use strict";var Be=ie("fs"),$e=ie("util"),vt=ie("stream"),tr=vt.Readable,gt=vt.Writable,yi=vt.PassThrough,bi=er(),We=ie("events").EventEmitter;He.createFromBuffer=mi;He.createFromFd=Ci;He.BufferSlicer=ye;He.FdSlicer=ge;$e.inherits(ge,We);function ge(e,t){t=t||{},We.call(this),this.fd=e,this.pend=new bi,this.pend.max=1,this.refCount=0,this.autoClose=!!t.autoClose}ge.prototype.read=function(e,t,r,n,i){var a=this;a.pend.go(function(p){Be.read(a.fd,e,t,r,n,function(_,c,v){p(),i(_,c,v)})})};ge.prototype.write=function(e,t,r,n,i){var a=this;a.pend.go(function(p){Be.write(a.fd,e,t,r,n,function(_,c,v){p(),i(_,c,v)})})};ge.prototype.createReadStream=function(e){return new Qe(this,e)};ge.prototype.createWriteStream=function(e){return new Ke(this,e)};ge.prototype.ref=function(){this.refCount+=1};ge.prototype.unref=function(){var e=this;if(e.refCount-=1,e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.autoClose&&Be.close(e.fd,t);function t(r){r?e.emit("error",r):e.emit("close")}};$e.inherits(Qe,tr);function Qe(e,t){t=t||{},tr.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end,this.pos=this.start,this.destroyed=!1}Qe.prototype._read=function(e){var t=this;if(!t.destroyed){var r=Math.min(t._readableState.highWaterMark,e);if(t.endOffset!=null&&(r=Math.min(r,t.endOffset-t.pos)),r<=0){t.destroyed=!0,t.push(null),t.context.unref();return}t.context.pend.go(function(n){if(t.destroyed)return n();var i=new Buffer(r);Be.read(t.context.fd,i,0,r,t.pos,function(a,p){a?t.destroy(a):p===0?(t.destroyed=!0,t.push(null),t.context.unref()):(t.pos+=p,t.push(i.slice(0,p))),n()})})}};Qe.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())};$e.inherits(Ke,gt);function Ke(e,t){t=t||{},gt.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end==null?1/0:+t.end,this.bytesWritten=0,this.pos=this.start,this.destroyed=!1,this.on("finish",this.destroy.bind(this))}Ke.prototype._write=function(e,t,r){var n=this;if(!n.destroyed){if(n.pos+e.length>n.endOffset){var i=new Error("maximum file length exceeded");i.code="ETOOBIG",n.destroy(),r(i);return}n.context.pend.go(function(a){if(n.destroyed)return a();Be.write(n.context.fd,e,0,e.length,n.pos,function(p,_){p?(n.destroy(),a(),r(p)):(n.bytesWritten+=_,n.pos+=_,n.emit("progress"),a(),r())})})}};Ke.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())};$e.inherits(ye,We);function ye(e,t){We.call(this),t=t||{},this.refCount=0,this.buffer=e,this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}ye.prototype.read=function(e,t,r,n,i){var a=n+r,p=a-this.buffer.length,_=p>0?p:r;this.buffer.copy(e,t,n,a),setImmediate(function(){i(null,_)})};ye.prototype.write=function(e,t,r,n,i){e.copy(this.buffer,n,t,t+r),setImmediate(function(){i(null,r,e)})};ye.prototype.createReadStream=function(e){e=e||{};var t=new yi(e);t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var r=this.buffer.slice(t.start,t.pos),n=0;;){var i=n+this.maxChunkSize;if(i>=r.length){n<r.length&&t.write(r.slice(n,r.length));break}t.write(r.slice(n,i)),n=i}return t.end(),t.destroy=function(){t.destroyed=!0},t};ye.prototype.createWriteStream=function(e){var t=this;e=e||{};var r=new gt(e);return r.start=e.start||0,r.endOffset=e.end==null?this.buffer.length:+e.end,r.bytesWritten=0,r.pos=r.start,r.destroyed=!1,r._write=function(n,i,a){if(!r.destroyed){var p=r.pos+n.length;if(p>r.endOffset){var _=new Error("maximum file length exceeded");_.code="ETOOBIG",r.destroyed=!0,a(_);return}n.copy(t.buffer,r.pos,0,n.length),r.bytesWritten+=n.length,r.pos=p,r.emit("progress"),a()}},r.destroy=function(){r.destroyed=!0},r};ye.prototype.ref=function(){this.refCount+=1};ye.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")};function mi(e,t){return new ye(e,t)}function Ci(e,t){return new ge(e,t)}});var ar=j((ma,ir)=>{"use strict";var Ce=ie("buffer").Buffer,yt=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(yt=new Int32Array(yt));function nr(e){if(Ce.isBuffer(e))return e;var t=typeof Ce.alloc=="function"&&typeof Ce.from=="function";if(typeof e=="number")return t?Ce.alloc(e):new Ce(e);if(typeof e=="string")return t?Ce.from(e):new Ce(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function Ei(e){var t=nr(4);return t.writeInt32BE(e,0),t}function bt(e,t){e=nr(e),Ce.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=~~t^-1,n=0;n<e.length;n++)r=yt[(r^e[n])&255]^r>>>8;return r^-1}function mt(){return Ei(bt.apply(null,arguments))}mt.signed=function(){return bt.apply(null,arguments)};mt.unsigned=function(){return bt.apply(null,arguments)>>>0};ir.exports=mt});var dr=j(he=>{"use strict";var Ct=ie("fs"),xi=ie("zlib"),sr=rr(),wi=ar(),et=ie("util"),tt=ie("events").EventEmitter,or=ie("stream").Transform,Et=ie("stream").PassThrough,Fi=ie("stream").Writable;he.open=Ti;he.fromFd=ur;he.fromBuffer=Si;he.fromRandomAccessReader=xt;he.dosDateTimeToDate=lr;he.validateFileName=fr;he.ZipFile=Ee;he.Entry=Pe;he.RandomAccessReader=xe;function Ti(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose==null&&(t.autoClose=!0),t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1),r==null&&(r=Ze),Ct.open(e,"r",function(n,i){if(n)return r(n);ur(i,t,function(a,p){a&&Ct.close(i,Ze),r(a,p)})})}function ur(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose==null&&(t.autoClose=!1),t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1),r==null&&(r=Ze),Ct.fstat(e,function(n,i){if(n)return r(n);var a=sr.createFromFd(e,{autoClose:!0});xt(a,i.size,t,r)})}function Si(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose=!1,t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1);var n=sr.createFromBuffer(e,{maxChunkSize:65536});xt(n,e.length,t,r)}function xt(e,t,r,n){typeof r=="function"&&(n=r,r=null),r==null&&(r={}),r.autoClose==null&&(r.autoClose=!0),r.lazyEntries==null&&(r.lazyEntries=!1),r.decodeStrings==null&&(r.decodeStrings=!0);var i=!!r.decodeStrings;if(r.validateEntrySizes==null&&(r.validateEntrySizes=!0),r.strictFileNames==null&&(r.strictFileNames=!1),n==null&&(n=Ze),typeof t!="number")throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var a=22,p=65535,_=Math.min(a+p,t),c=de(_),v=t-c.length;Re(e,c,0,_,v,function(s){if(s)return n(s);for(var f=_-a;f>=0;f-=1)if(c.readUInt32LE(f)===101010256){var g=c.slice(f),h=g.readUInt16LE(4);if(h!==0)return n(new Error("multi-disk zip files are not supported: found disk number: "+h));var d=g.readUInt16LE(10),o=g.readUInt32LE(16),y=g.readUInt16LE(20),x=g.length-a;if(y!==x)return n(new Error("invalid comment length. expected: "+x+". found: "+y));var T=i?Je(g,22,g.length,!1):g.slice(22);if(!(d===65535||o===4294967295))return n(null,new Ee(e,o,t,d,T,r.autoClose,r.lazyEntries,i,r.validateEntrySizes,r.strictFileNames));var F=de(20),k=v+f-F.length;Re(e,F,0,F.length,k,function(U){if(U)return n(U);if(F.readUInt32LE(0)!==117853008)return n(new Error("invalid zip64 end of central directory locator signature"));var X=Ie(F,8),H=de(56);Re(e,H,0,H.length,X,function(D){return D?n(D):H.readUInt32LE(0)!==101075792?n(new Error("invalid zip64 end of central directory record signature")):(d=Ie(H,32),o=Ie(H,48),n(null,new Ee(e,o,t,d,T,r.autoClose,r.lazyEntries,i,r.validateEntrySizes,r.strictFileNames)))})});return}n(new Error("end of central directory record signature not found"))})}et.inherits(Ee,tt);function Ee(e,t,r,n,i,a,p,_,c,v){var s=this;tt.call(s),s.reader=e,s.reader.on("error",function(f){cr(s,f)}),s.reader.once("close",function(){s.emit("close")}),s.readEntryCursor=t,s.fileSize=r,s.entryCount=n,s.comment=i,s.entriesRead=0,s.autoClose=!!a,s.lazyEntries=!!p,s.decodeStrings=!!_,s.validateEntrySizes=!!c,s.strictFileNames=!!v,s.isOpen=!0,s.emittedError=!1,s.lazyEntries||s._readEntry()}Ee.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.reader.unref())};function fe(e,t){e.autoClose&&e.close(),cr(e,t)}function cr(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}Ee.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()};Ee.prototype._readEntry=function(){var e=this;if(e.entryCount===e.entriesRead){setImmediate(function(){e.autoClose&&e.close(),!e.emittedError&&e.emit("end")});return}if(!e.emittedError){var t=de(46);Re(e.reader,t,0,t.length,e.readEntryCursor,function(r){if(r)return fe(e,r);if(!e.emittedError){var n=new Pe,i=t.readUInt32LE(0);if(i!==33639248)return fe(e,new Error("invalid central directory file header signature: 0x"+i.toString(16)));if(n.versionMadeBy=t.readUInt16LE(4),n.versionNeededToExtract=t.readUInt16LE(6),n.generalPurposeBitFlag=t.readUInt16LE(8),n.compressionMethod=t.readUInt16LE(10),n.lastModFileTime=t.readUInt16LE(12),n.lastModFileDate=t.readUInt16LE(14),n.crc32=t.readUInt32LE(16),n.compressedSize=t.readUInt32LE(20),n.uncompressedSize=t.readUInt32LE(24),n.fileNameLength=t.readUInt16LE(28),n.extraFieldLength=t.readUInt16LE(30),n.fileCommentLength=t.readUInt16LE(32),n.internalFileAttributes=t.readUInt16LE(36),n.externalFileAttributes=t.readUInt32LE(38),n.relativeOffsetOfLocalHeader=t.readUInt32LE(42),n.generalPurposeBitFlag&64)return fe(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46,t=de(n.fileNameLength+n.extraFieldLength+n.fileCommentLength),Re(e.reader,t,0,t.length,e.readEntryCursor,function(a){if(a)return fe(e,a);if(!e.emittedError){var p=(n.generalPurposeBitFlag&2048)!==0;n.fileName=e.decodeStrings?Je(t,0,n.fileNameLength,p):t.slice(0,n.fileNameLength);var _=n.fileNameLength+n.extraFieldLength,c=t.slice(n.fileNameLength,_);n.extraFields=[];for(var v=0;v<c.length-3;){var s=c.readUInt16LE(v+0),f=c.readUInt16LE(v+2),g=v+4,h=g+f;if(h>c.length)return fe(e,new Error("extra field length exceeds extra field buffer size"));var d=de(f);c.copy(d,0,g,h),n.extraFields.push({id:s,data:d}),v=h}if(n.fileComment=e.decodeStrings?Je(t,_,_+n.fileCommentLength,p):t.slice(_,_+n.fileCommentLength),n.comment=n.fileComment,e.readEntryCursor+=t.length,e.entriesRead+=1,n.uncompressedSize===4294967295||n.compressedSize===4294967295||n.relativeOffsetOfLocalHeader===4294967295){for(var o=null,v=0;v<n.extraFields.length;v++){var y=n.extraFields[v];if(y.id===1){o=y.data;break}}if(o==null)return fe(e,new Error("expected zip64 extended information extra field"));var x=0;if(n.uncompressedSize===4294967295){if(x+8>o.length)return fe(e,new Error("zip64 extended information extra field does not include uncompressed size"));n.uncompressedSize=Ie(o,x),x+=8}if(n.compressedSize===4294967295){if(x+8>o.length)return fe(e,new Error("zip64 extended information extra field does not include compressed size"));n.compressedSize=Ie(o,x),x+=8}if(n.relativeOffsetOfLocalHeader===4294967295){if(x+8>o.length)return fe(e,new Error("zip64 extended information extra field does not include relative header offset"));n.relativeOffsetOfLocalHeader=Ie(o,x),x+=8}}if(e.decodeStrings)for(var v=0;v<n.extraFields.length;v++){var y=n.extraFields[v];if(y.id===28789){if(y.data.length<6||y.data.readUInt8(0)!==1)continue;var T=y.data.readUInt32LE(1);if(wi.unsigned(t.slice(0,n.fileNameLength))!==T)continue;n.fileName=Je(y.data,5,y.data.length,!0);break}}if(e.validateEntrySizes&&n.compressionMethod===0){var F=n.uncompressedSize;if(n.isEncrypted()&&(F+=12),n.compressedSize!==F){var k="compressed/uncompressed size mismatch for stored file: "+n.compressedSize+" != "+n.uncompressedSize;return fe(e,new Error(k))}}if(e.decodeStrings){e.strictFileNames||(n.fileName=n.fileName.replace(/\\/g,"/"));var U=fr(n.fileName,e.validateFileNameOptions);if(U!=null)return fe(e,new Error(U))}e.emit("entry",n),e.lazyEntries||e._readEntry()}})}})}};Ee.prototype.openReadStream=function(e,t,r){var n=this,i=0,a=e.compressedSize;if(r==null)r=t,t={};else{if(t.decrypt!=null){if(!e.isEncrypted())throw new Error("options.decrypt can only be specified for encrypted entries");if(t.decrypt!==!1)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()&&t.decompress!==!1)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}if(t.decompress!=null){if(!e.isCompressed())throw new Error("options.decompress can only be specified for compressed entries");if(!(t.decompress===!1||t.decompress===!0))throw new Error("invalid options.decompress value: "+t.decompress)}if(t.start!=null||t.end!=null){if(e.isCompressed()&&t.decompress!==!1)throw new Error("start/end range not allowed for compressed entry without options.decompress === false");if(e.isEncrypted()&&t.decrypt!==!1)throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}if(t.start!=null){if(i=t.start,i<0)throw new Error("options.start < 0");if(i>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(t.end!=null){if(a=t.end,a<0)throw new Error("options.end < 0");if(a>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(a<i)throw new Error("options.end < options.start")}}if(!n.isOpen)return r(new Error("closed"));if(e.isEncrypted()&&t.decrypt!==!1)return r(new Error("entry is encrypted, and options.decrypt !== false"));n.reader.ref();var p=de(30);Re(n.reader,p,0,p.length,e.relativeOffsetOfLocalHeader,function(_){try{if(_)return r(_);var c=p.readUInt32LE(0);if(c!==67324752)return r(new Error("invalid local file header signature: 0x"+c.toString(16)));var v=p.readUInt16LE(26),s=p.readUInt16LE(28),f=e.relativeOffsetOfLocalHeader+p.length+v+s,g;if(e.compressionMethod===0)g=!1;else if(e.compressionMethod===8)g=t.decompress!=null?t.decompress:!0;else return r(new Error("unsupported compression method: "+e.compressionMethod));var h=f,d=h+e.compressedSize;if(e.compressedSize!==0&&d>n.fileSize)return r(new Error("file data overflows file bounds: "+h+" + "+e.compressedSize+" > "+n.fileSize));var o=n.reader.createReadStream({start:h+i,end:h+a}),y=o;if(g){var x=!1,T=xi.createInflateRaw();o.on("error",function(F){setImmediate(function(){x||T.emit("error",F)})}),o.pipe(T),n.validateEntrySizes?(y=new ze(e.uncompressedSize),T.on("error",function(F){setImmediate(function(){x||y.emit("error",F)})}),T.pipe(y)):y=T,y.destroy=function(){x=!0,T!==y&&T.unpipe(y),o.unpipe(T),o.destroy()}}r(null,y)}finally{n.reader.unref()}})};function Pe(){}Pe.prototype.getLastModDate=function(){return lr(this.lastModFileDate,this.lastModFileTime)};Pe.prototype.isEncrypted=function(){return(this.generalPurposeBitFlag&1)!==0};Pe.prototype.isCompressed=function(){return this.compressionMethod===8};function lr(e,t){var r=e&31,n=(e>>5&15)-1,i=(e>>9&127)+1980,a=0,p=(t&31)*2,_=t>>5&63,c=t>>11&31;return new Date(i,n,r,c,_,p,a)}function fr(e){return e.indexOf("\\")!==-1?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:e.split("/").indexOf("..")!==-1?"invalid relative path: "+e:null}function Re(e,t,r,n,i,a){if(n===0)return setImmediate(function(){a(null,de(0))});e.read(t,r,n,i,function(p,_){if(p)return a(p);if(_<n)return a(new Error("unexpected EOF"));a()})}et.inherits(ze,or);function ze(e){or.call(this),this.actualByteCount=0,this.expectedByteCount=e}ze.prototype._transform=function(e,t,r){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var n="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return r(new Error(n))}r(null,e)};ze.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()};et.inherits(xe,tt);function xe(){tt.call(this),this.refCount=0}xe.prototype.ref=function(){this.refCount+=1};xe.prototype.unref=function(){var e=this;if(e.refCount-=1,e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.close(t);function t(r){if(r)return e.emit("error",r);e.emit("close")}};xe.prototype.createReadStream=function(e){var t=e.start,r=e.end;if(t===r){var n=new Et;return setImmediate(function(){n.end()}),n}var i=this._readStreamForRange(t,r),a=!1,p=new rt(this);i.on("error",function(c){setImmediate(function(){a||p.emit("error",c)})}),p.destroy=function(){i.unpipe(p),p.unref(),i.destroy()};var _=new ze(r-t);return p.on("error",function(c){setImmediate(function(){a||_.emit("error",c)})}),_.destroy=function(){a=!0,p.unpipe(_),p.destroy()},i.pipe(p).pipe(_)};xe.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")};xe.prototype.read=function(e,t,r,n,i){var a=this.createReadStream({start:n,end:n+r}),p=new Fi,_=0;p._write=function(c,v,s){c.copy(e,t+_,0,c.length),_+=c.length,s()},p.on("finish",i),a.on("error",function(c){i(c)}),a.pipe(p)};xe.prototype.close=function(e){setImmediate(e)};et.inherits(rt,Et);function rt(e){Et.call(this),this.context=e,this.context.ref(),this.unreffedYet=!1}rt.prototype._flush=function(e){this.unref(),e()};rt.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var Ai="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";function Je(e,t,r,n){if(n)return e.toString("utf8",t,r);for(var i="",a=t;a<r;a++)i+=Ai[e[a]];return i}function Ie(e,t){var r=e.readUInt32LE(t),n=e.readUInt32LE(t+4);return n*4294967296+r}var de;typeof Buffer.allocUnsafe=="function"?de=function(e){return Buffer.allocUnsafe(e)}:de=function(e){return new Buffer(e)};function Ze(e){if(e)throw e}});var Se=j((Ea,Tt)=>{"use strict";var wt=(function(){"use strict";return this===void 0})();wt?Tt.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:wt,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!!(!r||r.writable||r.set)}}:(hr={}.hasOwnProperty,pr={}.toString,_r={}.constructor.prototype,Ft=function(e){var t=[];for(var r in e)hr.call(e,r)&&t.push(r);return t},vr=function(e,t){return{value:e[t]}},gr=function(e,t,r){return e[t]=r.value,e},yr=function(e){return e},br=function(e){try{return Object(e).constructor.prototype}catch{return _r}},mr=function(e){try{return pr.call(e)==="[object Array]"}catch{return!1}},Tt.exports={isArray:mr,keys:Ft,names:Ft,defineProperty:gr,getDescriptor:vr,freeze:yr,getPrototypeOf:br,isES5:wt,propertyIsWritable:function(){return!0}});var hr,pr,_r,Ft,vr,gr,yr,br,mr});var G=j((exports,module)=>{"use strict";var es5=Se(),canEvaluate=typeof navigator>"u",errorObj={e:{}},tryCatchTarget,globalObject=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:exports!==void 0?exports:null;function tryCatcher(){try{var e=tryCatchTarget;return tryCatchTarget=null,e.apply(this,arguments)}catch(t){return errorObj.e=t,errorObj}}function tryCatch(e){return tryCatchTarget=e,tryCatcher}var inherits=function(e,t){var r={}.hasOwnProperty;function n(){this.constructor=e,this.constructor$=t;for(var i in t.prototype)r.call(t.prototype,i)&&i.charAt(i.length-1)!=="$"&&(this[i+"$"]=t.prototype[i])}return n.prototype=t.prototype,e.prototype=new n,e.prototype};function isPrimitive(e){return e==null||e===!0||e===!1||typeof e=="string"||typeof e=="number"}function isObject(e){return typeof e=="function"||typeof e=="object"&&e!==null}function maybeWrapAsError(e){return isPrimitive(e)?new Error(safeToString(e)):e}function withAppended(e,t){var r=e.length,n=new Array(r+1),i;for(i=0;i<r;++i)n[i]=e[i];return n[i]=t,n}function getDataPropertyOrDefault(e,t,r){if(es5.isES5){var n=Object.getOwnPropertyDescriptor(e,t);if(n!=null)return n.get==null&&n.set==null?n.value:r}else return{}.hasOwnProperty.call(e,t)?e[t]:void 0}function notEnumerableProp(e,t,r){if(isPrimitive(e))return e;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return es5.defineProperty(e,t,n),e}function thrower(e){throw e}var inheritedDataKeys=(function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(i){for(var a=0;a<e.length;++a)if(e[a]===i)return!0;return!1};if(es5.isES5){var r=Object.getOwnPropertyNames;return function(i){for(var a=[],p=Object.create(null);i!=null&&!t(i);){var _;try{_=r(i)}catch{return a}for(var c=0;c<_.length;++c){var v=_[c];if(!p[v]){p[v]=!0;var s=Object.getOwnPropertyDescriptor(i,v);s!=null&&s.get==null&&s.set==null&&a.push(v)}}i=es5.getPrototypeOf(i)}return a}}else{var n={}.hasOwnProperty;return function(i){if(t(i))return[];var a=[];e:for(var p in i)if(n.call(i,p))a.push(p);else{for(var _=0;_<e.length;++_)if(n.call(e[_],p))continue e;a.push(p)}return a}}})(),thisAssignmentPattern=/this\s*\.\s*\S+\s*=/;function isClass(e){try{if(typeof e=="function"){var t=es5.names(e.prototype),r=es5.isES5&&t.length>1,n=t.length>0&&!(t.length===1&&t[0]==="constructor"),i=thisAssignmentPattern.test(e+"")&&es5.names(e).length>0;if(r||n||i)return!0}return!1}catch{return!1}}function toFastProperties(obj){function FakeConstructor(){}FakeConstructor.prototype=obj;for(var l=8;l--;)new FakeConstructor;return obj}var rident=/^[a-z$_][a-z$_0-9]*$/i;function isIdentifier(e){return rident.test(e)}function filledRange(e,t,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=t+i+r;return n}function safeToString(e){try{return e+""}catch{return"[no string representation]"}}function isError(e){return e!==null&&typeof e=="object"&&typeof e.message=="string"&&typeof e.name=="string"}function markAsOriginatingFromRejection(e){try{notEnumerableProp(e,"isOperational",!0)}catch{}}function originatesFromRejection(e){return e==null?!1:e instanceof Error.__BluebirdErrorTypes__.OperationalError||e.isOperational===!0}function canAttachTrace(e){return isError(e)&&es5.propertyIsWritable(e,"stack")}var ensureErrorObject=(function(){return"stack"in new Error?function(e){return canAttachTrace(e)?e:new Error(safeToString(e))}:function(e){if(canAttachTrace(e))return e;try{throw new Error(safeToString(e))}catch(t){return t}}})();function classString(e){return{}.toString.call(e)}function copyDescriptors(e,t,r){for(var n=es5.names(e),i=0;i<n.length;++i){var a=n[i];if(r(a))try{es5.defineProperty(t,a,es5.getDescriptor(e,a))}catch{}}}var asArray=function(e){return es5.isArray(e)?e:null};typeof Symbol<"u"&&Symbol.iterator&&(ArrayFrom=typeof Array.from=="function"?function(e){return Array.from(e)}:function(e){for(var t=[],r=e[Symbol.iterator](),n;!(n=r.next()).done;)t.push(n.value);return t},asArray=function(e){return es5.isArray(e)?e:e!=null&&typeof e[Symbol.iterator]=="function"?ArrayFrom(e):null});var ArrayFrom,isNode=typeof process<"u"&&classString(process).toLowerCase()==="[object process]",hasEnvVariables=typeof process<"u"&&typeof process.env<"u";function env(e){return hasEnvVariables?process.env[e]:void 0}function getNativePromise(){if(typeof Promise=="function")try{var e=new Promise(function(){});if({}.toString.call(e)==="[object Promise]")return Promise}catch{}}function domainBind(e,t){return e.bind(t)}var ret={isClass,isIdentifier,inheritedDataKeys,getDataPropertyOrDefault,thrower,isArray:es5.isArray,asArray,notEnumerableProp,isPrimitive,isObject,isError,canEvaluate,errorObj,tryCatch,inherits,withAppended,maybeWrapAsError,toFastProperties,filledRange,toString:safeToString,canAttachTrace,ensureErrorObject,originatesFromRejection,markAsOriginatingFromRejection,classString,copyDescriptors,hasDevTools:typeof chrome<"u"&&chrome&&typeof chrome.loadTimes=="function",isNode,hasEnvVariables,env,global:globalObject,getNativePromise,domainBind};ret.isRecentNode=ret.isNode&&(function(){var e=process.versions.node.split(".").map(Number);return e[0]===0&&e[1]>10||e[0]>0})();ret.isNode&&ret.toFastProperties(process);try{throw new Error}catch(e){ret.lastLineError=e}module.exports=ret});var Fr=j((xa,wr)=>{"use strict";var At=G(),Ae,Oi=function(){throw new Error(`No async scheduler available
3
+
4
+ See http://goo.gl/MqrFmX
5
+ `)},St=At.getNativePromise();At.isNode&&typeof MutationObserver>"u"?(Cr=global.setImmediate,Er=process.nextTick,Ae=At.isRecentNode?function(e){Cr.call(global,e)}:function(e){Er.call(process,e)}):typeof St=="function"&&typeof St.resolve=="function"?(xr=St.resolve(),Ae=function(e){xr.then(e)}):typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova))?Ae=(function(){var e=document.createElement("div"),t={attributes:!0},r=!1,n=document.createElement("div"),i=new MutationObserver(function(){e.classList.toggle("foo"),r=!1});i.observe(n,t);var a=function(){r||(r=!0,n.classList.toggle("foo"))};return function(_){var c=new MutationObserver(function(){c.disconnect(),_()});c.observe(e,t),a()}})():typeof setImmediate<"u"?Ae=function(e){setImmediate(e)}:typeof setTimeout<"u"?Ae=function(e){setTimeout(e,0)}:Ae=Oi;var Cr,Er,xr;wr.exports=Ae});var Sr=j((wa,Tr)=>{"use strict";function ki(e,t,r,n,i){for(var a=0;a<i;++a)r[a+n]=e[a+t],e[a+t]=void 0}function we(e){this._capacity=e,this._length=0,this._front=0}we.prototype._willBeOverCapacity=function(e){return this._capacity<e};we.prototype._pushOne=function(e){var t=this.length();this._checkCapacity(t+1);var r=this._front+t&this._capacity-1;this[r]=e,this._length=t+1};we.prototype.push=function(e,t,r){var n=this.length()+3;if(this._willBeOverCapacity(n)){this._pushOne(e),this._pushOne(t),this._pushOne(r);return}var i=this._front+n-3;this._checkCapacity(n);var a=this._capacity-1;this[i+0&a]=e,this[i+1&a]=t,this[i+2&a]=r,this._length=n};we.prototype.shift=function(){var e=this._front,t=this[e];return this[e]=void 0,this._front=e+1&this._capacity-1,this._length--,t};we.prototype.length=function(){return this._length};we.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(this._capacity<<1)};we.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e;var r=this._front,n=this._length,i=r+n&t-1;ki(this,0,this,t,i)};Tr.exports=we});var Nr=j((Fa,Ot)=>{"use strict";var Ir;try{throw new Error}catch(e){Ir=e}var Ri=Fr(),Ar=Sr(),Lr=G();function ee(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new Ar(16),this._normalQueue=new Ar(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=Ri}ee.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t};ee.prototype.hasCustomScheduler=function(){return this._customScheduler};ee.prototype.enableTrampoline=function(){this._trampolineEnabled=!0};ee.prototype.disableTrampolineIfNecessary=function(){Lr.hasDevTools&&(this._trampolineEnabled=!1)};ee.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};ee.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+`
6
+ `),process.exit(2)):this.throwLater(e)};ee.prototype.throwLater=function(e,t){if(arguments.length===1&&(t=e,e=function(){throw t}),typeof setTimeout<"u")setTimeout(function(){e(t)},0);else try{this._schedule(function(){e(t)})}catch{throw new Error(`No async scheduler available
7
+
8
+ See http://goo.gl/MqrFmX
9
+ `)}};function Or(e,t,r){this._lateQueue.push(e,t,r),this._queueTick()}function kr(e,t,r){this._normalQueue.push(e,t,r),this._queueTick()}function Rr(e){this._normalQueue._pushOne(e),this._queueTick()}Lr.hasDevTools?(ee.prototype.invokeLater=function(e,t,r){this._trampolineEnabled?Or.call(this,e,t,r):this._schedule(function(){setTimeout(function(){e.call(t,r)},100)})},ee.prototype.invoke=function(e,t,r){this._trampolineEnabled?kr.call(this,e,t,r):this._schedule(function(){e.call(t,r)})},ee.prototype.settlePromises=function(e){this._trampolineEnabled?Rr.call(this,e):this._schedule(function(){e._settlePromises()})}):(ee.prototype.invokeLater=Or,ee.prototype.invoke=kr,ee.prototype.settlePromises=Rr);ee.prototype._drainQueue=function(e){for(;e.length()>0;){var t=e.shift();if(typeof t!="function"){t._settlePromises();continue}var r=e.shift(),n=e.shift();t.call(r,n)}};ee.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)};ee.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))};ee.prototype._reset=function(){this._isTickUsed=!1};Ot.exports=ee;Ot.exports.firstLineError=Ir});var be=j((Ta,Mr)=>{"use strict";var It=Se(),Ii=It.freeze,jr=G(),Ur=jr.inherits,Ne=jr.notEnumerableProp;function je(e,t){function r(n){if(!(this instanceof r))return new r(n);Ne(this,"message",typeof n=="string"?n:t),Ne(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return Ur(r,Error),r}var kt,Rt,Li=je("Warning","warning"),Ni=je("CancellationError","cancellation error"),ji=je("TimeoutError","timeout error"),Ve=je("AggregateError","aggregate error");try{kt=TypeError,Rt=RangeError}catch{kt=je("TypeError","type error"),Rt=je("RangeError","range error")}var nt="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" ");for(Le=0;Le<nt.length;++Le)typeof Array.prototype[nt[Le]]=="function"&&(Ve.prototype[nt[Le]]=Array.prototype[nt[Le]]);var Le;It.defineProperty(Ve.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0});Ve.prototype.isOperational=!0;var it=0;Ve.prototype.toString=function(){var e=Array(it*4+1).join(" "),t=`
10
+ `+e+`AggregateError of:
11
+ `;it++,e=Array(it*4+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split(`
12
+ `),a=0;a<i.length;++a)i[a]=e+i[a];n=i.join(`
13
+ `),t+=n+`
14
+ `}return it--,t};function Xe(e){if(!(this instanceof Xe))return new Xe(e);Ne(this,"name","OperationalError"),Ne(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(Ne(this,"message",e.message),Ne(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}Ur(Xe,Error);var Oe=Error.__BluebirdErrorTypes__;Oe||(Oe=Ii({CancellationError:Ni,TimeoutError:ji,OperationalError:Xe,RejectionError:Xe,AggregateError:Ve}),It.defineProperty(Error,"__BluebirdErrorTypes__",{value:Oe,writable:!1,enumerable:!1,configurable:!1}));Mr.exports={Error,TypeError:kt,RangeError:Rt,CancellationError:Oe.CancellationError,OperationalError:Oe.OperationalError,TimeoutError:Oe.TimeoutError,AggregateError:Oe.AggregateError,Warning:Li}});var qr=j((Sa,Dr)=>{"use strict";Dr.exports=function(e,t){var r=G(),n=r.errorObj,i=r.isObject;function a(f,g){if(i(f)){if(f instanceof e)return f;var h=_(f);if(h===n){g&&g._pushContext();var d=e.reject(h.e);return g&&g._popContext(),d}else if(typeof h=="function"){if(v(f)){var d=new e(t);return f._then(d._fulfill,d._reject,void 0,d,null),d}return s(f,h,g)}}return f}function p(f){return f.then}function _(f){try{return p(f)}catch(g){return n.e=g,n}}var c={}.hasOwnProperty;function v(f){try{return c.call(f,"_promise0")}catch{return!1}}function s(f,g,h){var d=new e(t),o=d;h&&h._pushContext(),d._captureStackTrace(),h&&h._popContext();var y=!0,x=r.tryCatch(g).call(f,T,F);y=!1,d&&x===n&&(d._rejectCallback(x.e,!0,!0),d=null);function T(k){d&&(d._resolveCallback(k),d=null)}function F(k){d&&(d._rejectCallback(k,y,!0),d=null)}return o}return a}});var Hr=j((Aa,Br)=>{"use strict";Br.exports=function(e,t,r,n,i){var a=G(),p=a.isArray;function _(v){switch(v){case-2:return[];case-3:return{}}}function c(v){var s=this._promise=new e(t);v instanceof e&&s._propagateFrom(v,3),s._setOnCancel(this),this._values=v,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.inherits(c,i),c.prototype.length=function(){return this._length},c.prototype.promise=function(){return this._promise},c.prototype._init=function v(s,f){var g=r(this._values,this._promise);if(g instanceof e){g=g._target();var h=g._bitField;if(this._values=g,(h&50397184)===0)return this._promise._setAsyncGuaranteed(),g._then(v,this._reject,void 0,this,f);if((h&33554432)!==0)g=g._value();else return(h&16777216)!==0?this._reject(g._reason()):this._cancel()}if(g=a.asArray(g),g===null){var d=n("expecting an array or an iterable object but got "+a.classString(g)).reason();this._promise._rejectCallback(d,!1);return}if(g.length===0){f===-5?this._resolveEmptyArray():this._resolve(_(f));return}this._iterate(g)},c.prototype._iterate=function(v){var s=this.getActualLength(v.length);this._length=s,this._values=this.shouldCopyValues()?new Array(s):this._values;for(var f=this._promise,g=!1,h=null,d=0;d<s;++d){var o=r(v[d],f);o instanceof e?(o=o._target(),h=o._bitField):h=null,g?h!==null&&o.suppressUnhandledRejections():h!==null?(h&50397184)===0?(o._proxy(this,d),this._values[d]=o):(h&33554432)!==0?g=this._promiseFulfilled(o._value(),d):(h&16777216)!==0?g=this._promiseRejected(o._reason(),d):g=this._promiseCancelled(d):g=this._promiseFulfilled(o,d)}g||f._setAsyncGuaranteed()},c.prototype._isResolved=function(){return this._values===null},c.prototype._resolve=function(v){this._values=null,this._promise._fulfill(v)},c.prototype._cancel=function(){this._isResolved()||!this._promise._isCancellable()||(this._values=null,this._promise._cancel())},c.prototype._reject=function(v){this._values=null,this._promise._rejectCallback(v,!1)},c.prototype._promiseFulfilled=function(v,s){this._values[s]=v;var f=++this._totalResolved;return f>=this._length?(this._resolve(this._values),!0):!1},c.prototype._promiseCancelled=function(){return this._cancel(),!0},c.prototype._promiseRejected=function(v){return this._totalResolved++,this._reject(v),!0},c.prototype._resultCancelled=function(){if(!this._isResolved()){var v=this._values;if(this._cancel(),v instanceof e)v.cancel();else for(var s=0;s<v.length;++s)v[s]instanceof e&&v[s].cancel()}},c.prototype.shouldCopyValues=function(){return!0},c.prototype.getActualLength=function(v){return v},c}});var zr=j((Oa,Pr)=>{"use strict";Pr.exports=function(e){var t=!1,r=[];e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){};function n(){this._trace=new n.CapturedTrace(a())}n.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(this._trace!==void 0){var p=r.pop(),_=p._promiseCreated;return p._promiseCreated=null,_}return null};function i(){if(t)return new n}function a(){var p=r.length-1;if(p>=0)return r[p]}return n.CapturedTrace=null,n.create=i,n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var p=e.prototype._pushContext,_=e.prototype._popContext,c=e._peekContext,v=e.prototype._peekContext,s=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=p,e.prototype._popContext=_,e._peekContext=c,e.prototype._peekContext=v,e.prototype._promiseCreated=s,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=a,e.prototype._promiseCreated=function(){var f=this._peekContext();f&&f._promiseCreated==null&&(f._promiseCreated=this)}},n}});var Vr=j((ka,Xr)=>{"use strict";Xr.exports=function(e,t){var r=e._getDomain,n=e._async,i=be().Warning,a=G(),p=a.canAttachTrace,_,c,v=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,s=/\((?:timers\.js):\d+:\d+\)/,f=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,g=null,h=null,d=!1,o,y=!!(a.env("BLUEBIRD_DEBUG")!=0&&(a.env("BLUEBIRD_DEBUG")||a.env("NODE_ENV")==="development")),x=!!(a.env("BLUEBIRD_WARNINGS")!=0&&(y||a.env("BLUEBIRD_WARNINGS"))),T=!!(a.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(y||a.env("BLUEBIRD_LONG_STACK_TRACES"))),F=a.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(x||!!a.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var b=this._target();b._bitField=b._bitField&-1048577|524288},e.prototype._ensurePossibleRejectionHandled=function(){(this._bitField&524288)===0&&(this._setRejectionIsUnhandled(),n.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){$t("rejectionHandled",_,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=this._bitField|268435456},e.prototype._returnedNonUndefined=function(){return(this._bitField&268435456)!==0},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var b=this._settledValue();this._setUnhandledRejectionIsNotified(),$t("unhandledRejection",c,b,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=this._bitField|262144},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},e.prototype._isUnhandledRejectionNotified=function(){return(this._bitField&262144)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0},e.prototype._warn=function(b,m,S){return ae(b,m,S||this)},e.onPossiblyUnhandledRejection=function(b){var m=r();c=typeof b=="function"?m===null?b:a.domainBind(m,b):void 0},e.onUnhandledRejectionHandled=function(b){var m=r();_=typeof b=="function"?m===null?b:a.domainBind(m,b):void 0};var k=function(){};e.longStackTraces=function(){if(n.haveItemsQueued()&&!K.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created
15
+
16
+ See http://goo.gl/MqrFmX
17
+ `);if(!K.longStackTraces&&ht()){var b=e.prototype._captureStackTrace,m=e.prototype._attachExtraTrace;K.longStackTraces=!0,k=function(){if(n.haveItemsQueued()&&!K.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created
18
+
19
+ See http://goo.gl/MqrFmX
20
+ `);e.prototype._captureStackTrace=b,e.prototype._attachExtraTrace=m,t.deactivateLongStackTraces(),n.enableTrampoline(),K.longStackTraces=!1},e.prototype._captureStackTrace=I,e.prototype._attachExtraTrace=N,t.activateLongStackTraces(),n.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return K.longStackTraces&&ht()};var U=(function(){try{if(typeof CustomEvent=="function"){var b=new CustomEvent("CustomEvent");return a.global.dispatchEvent(b),function(m,S){var O=new CustomEvent(m.toLowerCase(),{detail:S,cancelable:!0});return!a.global.dispatchEvent(O)}}else if(typeof Event=="function"){var b=new Event("CustomEvent");return a.global.dispatchEvent(b),function(S,O){var M=new Event(S.toLowerCase(),{cancelable:!0});return M.detail=O,!a.global.dispatchEvent(M)}}else{var b=document.createEvent("CustomEvent");return b.initCustomEvent("testingtheevent",!1,!0,{}),a.global.dispatchEvent(b),function(S,O){var M=document.createEvent("CustomEvent");return M.initCustomEvent(S.toLowerCase(),!1,!0,O),!a.global.dispatchEvent(M)}}}catch{}return function(){return!1}})(),X=(function(){return a.isNode?function(){return process.emit.apply(process,arguments)}:a.global?function(b){var m="on"+b.toLowerCase(),S=a.global[m];return S?(S.apply(a.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}})();function H(b,m){return{promise:m}}var D={promiseCreated:H,promiseFulfilled:H,promiseRejected:H,promiseResolved:H,promiseCancelled:H,promiseChained:function(b,m,S){return{promise:m,child:S}},warning:function(b,m){return{warning:m}},unhandledRejection:function(b,m,S){return{reason:m,promise:S}},rejectionHandled:H},B=function(b){var m=!1;try{m=X.apply(null,arguments)}catch(O){n.throwLater(O),m=!0}var S=!1;try{S=U(b,D[b].apply(null,arguments))}catch(O){n.throwLater(O),S=!0}return S||m};e.config=function(b){if(b=Object(b),"longStackTraces"in b&&(b.longStackTraces?e.longStackTraces():!b.longStackTraces&&e.hasLongStackTraces()&&k()),"warnings"in b){var m=b.warnings;K.warnings=!!m,F=K.warnings,a.isObject(m)&&"wForgottenReturn"in m&&(F=!!m.wForgottenReturn)}if("cancellation"in b&&b.cancellation&&!K.cancellation){if(n.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=P,e.prototype._propagateFrom=u,e.prototype._onCancel=R,e.prototype._setOnCancel=L,e.prototype._attachCancellationCallback=C,e.prototype._execute=ue,w=u,K.cancellation=!0}return"monitoring"in b&&(b.monitoring&&!K.monitoring?(K.monitoring=!0,e.prototype._fireEvent=B):!b.monitoring&&K.monitoring&&(K.monitoring=!1,e.prototype._fireEvent=$)),e};function $(){return!1}e.prototype._fireEvent=$,e.prototype._execute=function(b,m,S){try{b(m,S)}catch(O){return O}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(b){},e.prototype._attachCancellationCallback=function(b){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(b,m){};function ue(b,m,S){var O=this;try{b(m,S,function(M){if(typeof M!="function")throw new TypeError("onCancel must be a function, got: "+a.toString(M));O._attachCancellationCallback(M)})}catch(M){return M}}function C(b){if(!this._isCancellable())return this;var m=this._onCancel();m!==void 0?a.isArray(m)?m.push(b):this._setOnCancel([m,b]):this._setOnCancel(b)}function R(){return this._onCancelField}function L(b){this._onCancelField=b}function P(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(b,m){if((m&1)!==0){this._cancellationParent=b;var S=b._branchesRemainingToCancel;S===void 0&&(S=0),b._branchesRemainingToCancel=S+1}(m&2)!==0&&b._isBound()&&this._setBoundTo(b._boundTo)}function E(b,m){(m&2)!==0&&b._isBound()&&this._setBoundTo(b._boundTo)}var w=E;function A(){var b=this._boundTo;return b!==void 0&&b instanceof e?b.isFulfilled()?b.value():void 0:b}function I(){this._trace=new Te(this._peekContext())}function N(b,m){if(p(b)){var S=this._trace;if(S!==void 0&&m&&(S=S._parent),S!==void 0)S.attachExtraTrace(b);else if(!b.__stackCleaned__){var O=dt(b);a.notEnumerableProp(b,"stack",O.message+`
21
+ `+O.stack.join(`
22
+ `)),a.notEnumerableProp(b,"__stackCleaned__",!0)}}}function z(b,m,S,O,M){if(b===void 0&&m!==null&&F){if(M!==void 0&&M._returnedNonUndefined()||(O._bitField&65535)===0)return;S&&(S=S+" ");var Q="",Y="";if(m._trace){for(var q=m._trace.stack.split(`
23
+ `),W=me(q),J=W.length-1;J>=0;--J){var _e=W[J];if(!s.test(_e)){var ve=_e.match(f);ve&&(Q="at "+ve[1]+":"+ve[2]+":"+ve[3]+" ");break}}if(W.length>0){for(var vi=W[0],J=0;J<q.length;++J)if(q[J]===vi){J>0&&(Y=`
24
+ `+q[J-1]);break}}}var gi="a promise was created in a "+S+"handler "+Q+"but was not returned from it, see http://goo.gl/rRqMUw"+Y;O._warn(gi,!0,m)}}function V(b,m){var S=b+" is deprecated and will be removed in a future version.";return m&&(S+=" Use "+m+" instead."),ae(S)}function ae(b,m,S){if(K.warnings){var O=new i(b),M;if(m)S._attachExtraTrace(O);else if(K.longStackTraces&&(M=e._peekContext()))M.attachExtraTrace(O);else{var Q=dt(O);O.stack=Q.message+`
25
+ `+Q.stack.join(`
26
+ `)}B("warning",O)||Yt(O,"",!0)}}function se(b,m){for(var S=0;S<m.length-1;++S)m[S].push("From previous event:"),m[S]=m[S].join(`
27
+ `);return S<m.length&&(m[S]=m[S].join(`
28
+ `)),b+`
29
+ `+m.join(`
30
+ `)}function ne(b){for(var m=0;m<b.length;++m)(b[m].length===0||m+1<b.length&&b[m][0]===b[m+1][0])&&(b.splice(m,1),m--)}function oe(b){for(var m=b[0],S=1;S<b.length;++S){for(var O=b[S],M=m.length-1,Q=m[M],Y=-1,q=O.length-1;q>=0;--q)if(O[q]===Q){Y=q;break}for(var q=Y;q>=0;--q){var W=O[q];if(m[M]===W)m.pop(),M--;else break}m=O}}function me(b){for(var m=[],S=0;S<b.length;++S){var O=b[S],M=O===" (No stack trace)"||g.test(O),Q=M&&pt(O);M&&!Q&&(d&&O.charAt(0)!==" "&&(O=" "+O),m.push(O))}return m}function qe(b){for(var m=b.stack.replace(/\s+$/g,"").split(`
31
+ `),S=0;S<m.length;++S){var O=m[S];if(O===" (No stack trace)"||g.test(O))break}return S>0&&b.name!="SyntaxError"&&(m=m.slice(S)),m}function dt(b){var m=b.stack,S=b.toString();return m=typeof m=="string"&&m.length>0?qe(b):[" (No stack trace)"],{message:S,stack:b.name=="SyntaxError"?m:me(m)}}function Yt(b,m,S){if(typeof console<"u"){var O;if(a.isObject(b)){var M=b.stack;O=m+h(M,b)}else O=m+String(b);typeof o=="function"?o(O,S):(typeof console.log=="function"||typeof console.log=="object")&&console.log(O)}}function $t(b,m,S,O){var M=!1;try{typeof m=="function"&&(M=!0,b==="rejectionHandled"?m(O):m(S,O))}catch(Q){n.throwLater(Q)}b==="unhandledRejection"?!B(b,S,O)&&!M&&Yt(S,"Unhandled rejection "):B(b,O)}function Wt(b){var m;if(typeof b=="function")m="[function "+(b.name||"anonymous")+"]";else{m=b&&typeof b.toString=="function"?b.toString():a.toString(b);var S=/\[object [a-zA-Z0-9$_]+\]/;if(S.test(m))try{var O=JSON.stringify(b);m=O}catch{}m.length===0&&(m="(empty array)")}return"(<"+hi(m)+">, no stack trace)"}function hi(b){var m=41;return b.length<m?b:b.substr(0,m-3)+"..."}function ht(){return typeof Qt=="function"}var pt=function(){return!1},pi=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function _t(b){var m=b.match(pi);if(m)return{fileName:m[1],line:parseInt(m[2],10)}}function _i(b,m){if(ht()){for(var S=b.stack.split(`
32
+ `),O=m.stack.split(`
33
+ `),M=-1,Q=-1,Y,q,W=0;W<S.length;++W){var J=_t(S[W]);if(J){Y=J.fileName,M=J.line;break}}for(var W=0;W<O.length;++W){var J=_t(O[W]);if(J){q=J.fileName,Q=J.line;break}}M<0||Q<0||!Y||!q||Y!==q||M>=Q||(pt=function(_e){if(v.test(_e))return!0;var ve=_t(_e);return!!(ve&&ve.fileName===Y&&M<=ve.line&&ve.line<=Q)})}}function Te(b){this._parent=b,this._promisesCreated=0;var m=this._length=1+(b===void 0?0:b._length);Qt(this,Te),m>32&&this.uncycle()}a.inherits(Te,Error),t.CapturedTrace=Te,Te.prototype.uncycle=function(){var b=this._length;if(!(b<2)){for(var m=[],S={},O=0,M=this;M!==void 0;++O)m.push(M),M=M._parent;b=this._length=O;for(var O=b-1;O>=0;--O){var Q=m[O].stack;S[Q]===void 0&&(S[Q]=O)}for(var O=0;O<b;++O){var Y=m[O].stack,q=S[Y];if(q!==void 0&&q!==O){q>0&&(m[q-1]._parent=void 0,m[q-1]._length=1),m[O]._parent=void 0,m[O]._length=1;var W=O>0?m[O-1]:this;q<b-1?(W._parent=m[q+1],W._parent.uncycle(),W._length=W._parent._length+1):(W._parent=void 0,W._length=1);for(var J=W._length+1,_e=O-2;_e>=0;--_e)m[_e]._length=J,J++;return}}}},Te.prototype.attachExtraTrace=function(b){if(!b.__stackCleaned__){this.uncycle();for(var m=dt(b),S=m.message,O=[m.stack],M=this;M!==void 0;)O.push(me(M.stack.split(`
34
+ `))),M=M._parent;oe(O),ne(O),a.notEnumerableProp(b,"stack",se(S,O)),a.notEnumerableProp(b,"__stackCleaned__",!0)}};var Qt=(function(){var m=/^\s*at\s*/,S=function(Y,q){return typeof Y=="string"?Y:q.name!==void 0&&q.message!==void 0?q.toString():Wt(q)};if(typeof Error.stackTraceLimit=="number"&&typeof Error.captureStackTrace=="function"){Error.stackTraceLimit+=6,g=m,h=S;var O=Error.captureStackTrace;return pt=function(Y){return v.test(Y)},function(Y,q){Error.stackTraceLimit+=6,O(Y,q),Error.stackTraceLimit-=6}}var M=new Error;if(typeof M.stack=="string"&&M.stack.split(`
35
+ `)[0].indexOf("stackDetection@")>=0)return g=/@/,h=S,d=!0,function(q){q.stack=new Error().stack};var Q;try{throw new Error}catch(Y){Q="stack"in Y}return!("stack"in M)&&Q&&typeof Error.stackTraceLimit=="number"?(g=m,h=S,function(q){Error.stackTraceLimit+=6;try{throw new Error}catch(W){q.stack=W.stack}Error.stackTraceLimit-=6}):(h=function(Y,q){return typeof Y=="string"?Y:(typeof q=="object"||typeof q=="function")&&q.name!==void 0&&q.message!==void 0?q.toString():Wt(q)},null)})([]);typeof console<"u"&&typeof console.warn<"u"&&(o=function(b){console.warn(b)},a.isNode&&process.stderr.isTTY?o=function(b,m){var S=m?"\x1B[33m":"\x1B[31m";console.warn(S+b+`\x1B[0m
36
+ `)}:!a.isNode&&typeof new Error().stack=="string"&&(o=function(b,m){console.warn("%c"+b,m?"color: darkorange":"color: red")}));var K={warnings:x,longStackTraces:!1,cancellation:!1,monitoring:!1};return T&&e.longStackTraces(),{longStackTraces:function(){return K.longStackTraces},warnings:function(){return K.warnings},cancellation:function(){return K.cancellation},monitoring:function(){return K.monitoring},propagateFromFunction:function(){return w},boundValueFunction:function(){return A},checkForgottenReturns:z,setBounds:_i,warn:ae,deprecated:V,CapturedTrace:Te,fireDomEvent:U,fireGlobalEvent:X}}});var Yr=j((Ra,Gr)=>{"use strict";Gr.exports=function(e,t){var r=G(),n=e.CancellationError,i=r.errorObj;function a(f,g,h){this.promise=f,this.type=g,this.handler=h,this.called=!1,this.cancelPromise=null}a.prototype.isFinallyHandler=function(){return this.type===0};function p(f){this.finallyHandler=f}p.prototype._resultCancelled=function(){_(this.finallyHandler)};function _(f,g){return f.cancelPromise!=null?(arguments.length>1?f.cancelPromise._reject(g):f.cancelPromise._cancel(),f.cancelPromise=null,!0):!1}function c(){return s.call(this,this.promise._target()._settledValue())}function v(f){if(!_(this,f))return i.e=f,i}function s(f){var g=this.promise,h=this.handler;if(!this.called){this.called=!0;var d=this.isFinallyHandler()?h.call(g._boundValue()):h.call(g._boundValue(),f);if(d!==void 0){g._setReturnedNonUndefined();var o=t(d,g);if(o instanceof e){if(this.cancelPromise!=null)if(o._isCancelled()){var y=new n("late cancellation observer");return g._attachExtraTrace(y),i.e=y,i}else o.isPending()&&o._attachCancellationCallback(new p(this));return o._then(c,v,void 0,this,void 0)}}}return g.isRejected()?(_(this),i.e=f,i):(_(this),f)}return e.prototype._passThrough=function(f,g,h,d){return typeof f!="function"?this.then():this._then(h,d,void 0,new a(this,g,f),void 0)},e.prototype.lastly=e.prototype.finally=function(f){return this._passThrough(f,0,s,s)},e.prototype.tap=function(f){return this._passThrough(f,1,s)},a}});var Wr=j((Ia,$r)=>{"use strict";$r.exports=function(e){var t=G(),r=Se().keys,n=t.tryCatch,i=t.errorObj;function a(p,_,c){return function(v){var s=c._boundValue();e:for(var f=0;f<p.length;++f){var g=p[f];if(g===Error||g!=null&&g.prototype instanceof Error){if(v instanceof g)return n(_).call(s,v)}else if(typeof g=="function"){var h=n(g).call(s,v);if(h===i)return h;if(h)return n(_).call(s,v)}else if(t.isObject(v)){for(var d=r(g),o=0;o<d.length;++o){var y=d[o];if(g[y]!=v[y])continue e}return n(_).call(s,v)}}return e}}return a}});var Lt=j((La,Jr)=>{"use strict";var Qr=G(),Ui=Qr.maybeWrapAsError,Mi=be(),Di=Mi.OperationalError,Kr=Se();function qi(e){return e instanceof Error&&Kr.getPrototypeOf(e)===Error.prototype}var Bi=/^(?:name|message|stack|cause)$/;function Hi(e){var t;if(qi(e)){t=new Di(e),t.name=e.name,t.message=e.message,t.stack=e.stack;for(var r=Kr.keys(e),n=0;n<r.length;++n){var i=r[n];Bi.test(i)||(t[i]=e[i])}return t}return Qr.markAsOriginatingFromRejection(e),e}function Pi(e,t){return function(r,n){if(e!==null){if(r){var i=Hi(Ui(r));e._attachExtraTrace(i),e._reject(i)}else if(!t)e._fulfill(n);else{for(var a=arguments.length,p=new Array(Math.max(a-1,0)),_=1;_<a;++_)p[_-1]=arguments[_];e._fulfill(p)}e=null}}}Jr.exports=Pi});var en=j((Na,Zr)=>{"use strict";Zr.exports=function(e,t,r,n,i){var a=G(),p=a.tryCatch;e.method=function(_){if(typeof _!="function")throw new e.TypeError("expecting a function but got "+a.classString(_));return function(){var c=new e(t);c._captureStackTrace(),c._pushContext();var v=p(_).apply(this,arguments),s=c._popContext();return i.checkForgottenReturns(v,s,"Promise.method",c),c._resolveFromSyncValue(v),c}},e.attempt=e.try=function(_){if(typeof _!="function")return n("expecting a function but got "+a.classString(_));var c=new e(t);c._captureStackTrace(),c._pushContext();var v;if(arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var s=arguments[1],f=arguments[2];v=a.isArray(s)?p(_).apply(f,s):p(_).call(f,s)}else v=p(_)();var g=c._popContext();return i.checkForgottenReturns(v,g,"Promise.try",c),c._resolveFromSyncValue(v),c},e.prototype._resolveFromSyncValue=function(_){_===a.errorObj?this._rejectCallback(_.e,!1):this._resolveCallback(_,!0)}}});var rn=j((ja,tn)=>{"use strict";tn.exports=function(e,t,r,n){var i=!1,a=function(v,s){this._reject(s)},p=function(v,s){s.promiseRejectionQueued=!0,s.bindingPromise._then(a,a,null,this,v)},_=function(v,s){(this._bitField&50397184)===0&&this._resolveCallback(s.target)},c=function(v,s){s.promiseRejectionQueued||this._reject(v)};e.prototype.bind=function(v){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var s=r(v),f=new e(t);f._propagateFrom(this,1);var g=this._target();if(f._setBoundTo(s),s instanceof e){var h={promiseRejectionQueued:!1,promise:f,target:g,bindingPromise:s};g._then(t,p,void 0,f,h),s._then(_,c,void 0,f,h),f._setOnCancel(s)}else f._resolveCallback(g);return f},e.prototype._setBoundTo=function(v){v!==void 0?(this._bitField=this._bitField|2097152,this._boundTo=v):this._bitField=this._bitField&-2097153},e.prototype._isBound=function(){return(this._bitField&2097152)===2097152},e.bind=function(v,s){return e.resolve(s).bind(v)}}});var an=j((Ua,nn)=>{"use strict";nn.exports=function(e,t,r,n){var i=G(),a=i.tryCatch,p=i.errorObj,_=e._async;e.prototype.break=e.prototype.cancel=function(){if(!n.cancellation())return this._warn("cancellation is disabled");for(var c=this,v=c;c._isCancellable();){if(!c._cancelBy(v)){v._isFollowing()?v._followee().cancel():v._cancelBranched();break}var s=c._cancellationParent;if(s==null||!s._isCancellable()){c._isFollowing()?c._followee().cancel():c._cancelBranched();break}else c._isFollowing()&&c._followee().cancel(),c._setWillBeCancelled(),v=c,c=s}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(c){return c===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),_.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(c,v){if(i.isArray(c))for(var s=0;s<c.length;++s)this._doInvokeOnCancel(c[s],v);else if(c!==void 0)if(typeof c=="function"){if(!v){var f=a(c).call(this._boundValue());f===p&&(this._attachExtraTrace(f.e),_.throwLater(f.e))}}else c._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var c=this._onCancel();this._unsetOnCancel(),_.invoke(this._doInvokeOnCancel,this,c)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}});var on=j((Ma,sn)=>{"use strict";sn.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(n){return this._then(r,void 0,void 0,{reason:n},void 0)},e.prototype.catchThrow=function(n){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:n},void 0);var i=arguments[1],a=function(){throw i};return this.caught(n,a)},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var i=arguments[1];i instanceof e&&i.suppressUnhandledRejections();var a=function(){return i};return this.caught(n,a)}}});var cn=j((Da,un)=>{"use strict";un.exports=function(e){function t(c){c!==void 0?(c=c._target(),this._bitField=c._bitField,this._settledValueField=c._isFateSealed()?c._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var r=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(`cannot get fulfillment value of a non-fulfilled promise
37
+
38
+ See http://goo.gl/MqrFmX
39
+ `);return this._settledValue()},n=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError(`cannot get rejection reason of a non-rejected promise
40
+
41
+ See http://goo.gl/MqrFmX
42
+ `);return this._settledValue()},i=t.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},a=t.prototype.isRejected=function(){return(this._bitField&16777216)!==0},p=t.prototype.isPending=function(){return(this._bitField&50397184)===0},_=t.prototype.isResolved=function(){return(this._bitField&50331648)!==0};t.prototype.isCancelled=function(){return(this._bitField&8454144)!==0},e.prototype.__isCancelled=function(){return(this._bitField&65536)===65536},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0},e.prototype.isPending=function(){return p.call(this._target())},e.prototype.isRejected=function(){return a.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return _.call(this._target())},e.prototype.value=function(){return r.call(this._target())},e.prototype.reason=function(){var c=this._target();return c._unsetRejectionIsUnhandled(),n.call(c)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}});var fn=j((qa,ln)=>{"use strict";ln.exports=function(e,t,r,n,i,a){var p=G(),_=p.canEvaluate,c=p.tryCatch,v=p.errorObj,s;if(_){for(var f=function(T){return new Function("value","holder",`
43
+ 'use strict';
44
+ holder.pIndex = value;
45
+ holder.checkFulfillment(this);
46
+ `.replace(/Index/g,T))},g=function(T){return new Function("promise","holder",`
47
+ 'use strict';
48
+ holder.pIndex = promise;
49
+ `.replace(/Index/g,T))},h=function(T){for(var F=new Array(T),k=0;k<F.length;++k)F[k]="this.p"+(k+1);var U=F.join(" = ")+" = null;",X=`var promise;
50
+ `+F.map(function($){return`
51
+ promise = `+$+`;
52
+ if (promise instanceof Promise) {
53
+ promise.cancel();
54
+ }
55
+ `}).join(`
56
+ `),H=F.join(", "),D="Holder$"+T,B=`return function(tryCatch, errorObj, Promise, async) {
57
+ 'use strict';
58
+ function [TheName](fn) {
59
+ [TheProperties]
60
+ this.fn = fn;
61
+ this.asyncNeeded = true;
62
+ this.now = 0;
63
+ }
64
+
65
+ [TheName].prototype._callFunction = function(promise) {
66
+ promise._pushContext();
67
+ var ret = tryCatch(this.fn)([ThePassedArguments]);
68
+ promise._popContext();
69
+ if (ret === errorObj) {
70
+ promise._rejectCallback(ret.e, false);
71
+ } else {
72
+ promise._resolveCallback(ret);
73
+ }
74
+ };
75
+
76
+ [TheName].prototype.checkFulfillment = function(promise) {
77
+ var now = ++this.now;
78
+ if (now === [TheTotal]) {
79
+ if (this.asyncNeeded) {
80
+ async.invoke(this._callFunction, this, promise);
81
+ } else {
82
+ this._callFunction(promise);
83
+ }
84
+
85
+ }
86
+ };
87
+
88
+ [TheName].prototype._resultCancelled = function() {
89
+ [CancellationCode]
90
+ };
91
+
92
+ return [TheName];
93
+ }(tryCatch, errorObj, Promise, async);
94
+ `;return B=B.replace(/\[TheName\]/g,D).replace(/\[TheTotal\]/g,T).replace(/\[ThePassedArguments\]/g,H).replace(/\[TheProperties\]/g,U).replace(/\[CancellationCode\]/g,X),new Function("tryCatch","errorObj","Promise","async",B)(c,v,e,i)},d=[],o=[],y=[],x=0;x<8;++x)d.push(h(x+1)),o.push(f(x+1)),y.push(g(x+1));s=function(T){this._reject(T)}}e.join=function(){var T=arguments.length-1,F;if(T>0&&typeof arguments[T]=="function"&&(F=arguments[T],T<=8&&_)){var L=new e(n);L._captureStackTrace();for(var k=d[T-1],U=new k(F),X=o,H=0;H<T;++H){var D=r(arguments[H],L);if(D instanceof e){D=D._target();var B=D._bitField;(B&50397184)===0?(D._then(X[H],s,void 0,L,U),y[H](D,U),U.asyncNeeded=!1):(B&33554432)!==0?X[H].call(L,D._value(),U):(B&16777216)!==0?L._reject(D._reason()):L._cancel()}else X[H].call(L,D,U)}if(!L._isFateSealed()){if(U.asyncNeeded){var $=a();$!==null&&(U.fn=p.domainBind($,U.fn))}L._setAsyncGuaranteed(),L._setOnCancel(U)}return L}for(var ue=arguments.length,C=new Array(ue),R=0;R<ue;++R)C[R]=arguments[R];F&&C.pop();var L=new t(C).promise();return F!==void 0?L.spread(F):L}}});var hn=j((Ba,dn)=>{"use strict";dn.exports=function(e,t,r,n,i,a){var p=e._getDomain,_=G(),c=_.tryCatch,v=_.errorObj,s=e._async;function f(h,d,o,y){this.constructor$(h),this._promise._captureStackTrace();var x=p();this._callback=x===null?d:_.domainBind(x,d),this._preservedValues=y===i?new Array(this.length()):null,this._limit=o,this._inFlight=0,this._queue=[],s.invoke(this._asyncInit,this,void 0)}_.inherits(f,t),f.prototype._asyncInit=function(){this._init$(void 0,-2)},f.prototype._init=function(){},f.prototype._promiseFulfilled=function(h,d){var o=this._values,y=this.length(),x=this._preservedValues,T=this._limit;if(d<0){if(d=d*-1-1,o[d]=h,T>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(T>=1&&this._inFlight>=T)return o[d]=h,this._queue.push(d),!1;x!==null&&(x[d]=h);var F=this._promise,k=this._callback,U=F._boundValue();F._pushContext();var X=c(k).call(U,h,d,y),H=F._popContext();if(a.checkForgottenReturns(X,H,x!==null?"Promise.filter":"Promise.map",F),X===v)return this._reject(X.e),!0;var D=n(X,this._promise);if(D instanceof e){D=D._target();var B=D._bitField;if((B&50397184)===0)return T>=1&&this._inFlight++,o[d]=D,D._proxy(this,(d+1)*-1),!1;if((B&33554432)!==0)X=D._value();else return(B&16777216)!==0?(this._reject(D._reason()),!0):(this._cancel(),!0)}o[d]=X}var $=++this._totalResolved;return $>=y?(x!==null?this._filter(o,x):this._resolve(o),!0):!1},f.prototype._drainQueue=function(){for(var h=this._queue,d=this._limit,o=this._values;h.length>0&&this._inFlight<d;){if(this._isResolved())return;var y=h.pop();this._promiseFulfilled(o[y],y)}},f.prototype._filter=function(h,d){for(var o=d.length,y=new Array(o),x=0,T=0;T<o;++T)h[T]&&(y[x++]=d[T]);y.length=x,this._resolve(y)},f.prototype.preservedValues=function(){return this._preservedValues};function g(h,d,o,y){if(typeof d!="function")return r("expecting a function but got "+_.classString(d));var x=0;if(o!==void 0)if(typeof o=="object"&&o!==null){if(typeof o.concurrency!="number")return e.reject(new TypeError("'concurrency' must be a number but it is "+_.classString(o.concurrency)));x=o.concurrency}else return e.reject(new TypeError("options argument must be an object but it is "+_.classString(o)));return x=typeof x=="number"&&isFinite(x)&&x>=1?x:0,new f(h,d,x,y).promise()}e.prototype.map=function(h,d){return g(this,h,d,null)},e.map=function(h,d,o,y){return g(h,d,o,y)}}});var _n=j((Ha,pn)=>{"use strict";var Nt=Object.create;Nt&&(jt=Nt(null),Ut=Nt(null),jt[" size"]=Ut[" size"]=0);var jt,Ut;pn.exports=function(e){var t=G(),r=t.canEvaluate,n=t.isIdentifier,i,a,p=function(h){return new Function("ensureMethod",`
95
+ return function(obj) {
96
+ 'use strict'
97
+ var len = this.length;
98
+ ensureMethod(obj, 'methodName');
99
+ switch(len) {
100
+ case 1: return obj.methodName(this[0]);
101
+ case 2: return obj.methodName(this[0], this[1]);
102
+ case 3: return obj.methodName(this[0], this[1], this[2]);
103
+ case 0: return obj.methodName();
104
+ default:
105
+ return obj.methodName.apply(obj, this);
106
+ }
107
+ };
108
+ `.replace(/methodName/g,h))(v)},_=function(h){return new Function("obj",`
109
+ 'use strict';
110
+ return obj.propertyName;
111
+ `.replace("propertyName",h))},c=function(h,d,o){var y=o[h];if(typeof y!="function"){if(!n(h))return null;if(y=d(h),o[h]=y,o[" size"]++,o[" size"]>512){for(var x=Object.keys(o),T=0;T<256;++T)delete o[x[T]];o[" size"]=x.length-256}}return y};i=function(h){return c(h,p,jt)},a=function(h){return c(h,_,Ut)};function v(h,d){var o;if(h!=null&&(o=h[d]),typeof o!="function"){var y="Object "+t.classString(h)+" has no method '"+t.toString(d)+"'";throw new e.TypeError(y)}return o}function s(h){var d=this.pop(),o=v(h,d);return o.apply(h,this)}e.prototype.call=function(h){for(var d=arguments.length,o=new Array(Math.max(d-1,0)),y=1;y<d;++y)o[y-1]=arguments[y];if(r){var x=i(h);if(x!==null)return this._then(x,void 0,void 0,o,void 0)}return o.push(h),this._then(s,void 0,void 0,o,void 0)};function f(h){return h[this]}function g(h){var d=+this;return d<0&&(d=Math.max(0,d+h.length)),h[d]}e.prototype.get=function(h){var d=typeof h=="number",o;if(d)o=g;else if(r){var y=a(h);o=y!==null?y:f}else o=f;return this._then(o,void 0,void 0,h,void 0)}}});var gn=j((Pa,vn)=>{"use strict";vn.exports=function(e,t,r,n,i,a){var p=G(),_=be().TypeError,c=G().inherits,v=p.errorObj,s=p.tryCatch,f={};function g(F){setTimeout(function(){throw F},0)}function h(F){var k=r(F);return k!==F&&typeof F._isDisposable=="function"&&typeof F._getDisposer=="function"&&F._isDisposable()&&k._setDisposable(F._getDisposer()),k}function d(F,k){var U=0,X=F.length,H=new e(i);function D(){if(U>=X)return H._fulfill();var B=h(F[U++]);if(B instanceof e&&B._isDisposable()){try{B=r(B._getDisposer().tryDispose(k),F.promise)}catch($){return g($)}if(B instanceof e)return B._then(D,g,null,null,null)}D()}return D(),H}function o(F,k,U){this._data=F,this._promise=k,this._context=U}o.prototype.data=function(){return this._data},o.prototype.promise=function(){return this._promise},o.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():f},o.prototype.tryDispose=function(F){var k=this.resource(),U=this._context;U!==void 0&&U._pushContext();var X=k!==f?this.doDispose(k,F):null;return U!==void 0&&U._popContext(),this._promise._unsetDisposable(),this._data=null,X},o.isDisposer=function(F){return F!=null&&typeof F.resource=="function"&&typeof F.tryDispose=="function"};function y(F,k,U){this.constructor$(F,k,U)}c(y,o),y.prototype.doDispose=function(F,k){var U=this.data();return U.call(F,F,k)};function x(F){return o.isDisposer(F)?(this.resources[this.index]._setDisposable(F),F.promise()):F}function T(F){this.length=F,this.promise=null,this[F-1]=null}T.prototype._resultCancelled=function(){for(var F=this.length,k=0;k<F;++k){var U=this[k];U instanceof e&&U.cancel()}},e.using=function(){var F=arguments.length;if(F<2)return t("you must pass at least 2 arguments to Promise.using");var k=arguments[F-1];if(typeof k!="function")return t("expecting a function but got "+p.classString(k));var U,X=!0;F===2&&Array.isArray(arguments[0])?(U=arguments[0],F=U.length,X=!1):(U=arguments,F--);for(var H=new T(F),D=0;D<F;++D){var B=U[D];if(o.isDisposer(B)){var $=B;B=B.promise(),B._setDisposable($)}else{var ue=r(B);ue instanceof e&&(B=ue._then(x,null,null,{resources:H,index:D},void 0))}H[D]=B}for(var C=new Array(H.length),D=0;D<C.length;++D)C[D]=e.resolve(H[D]).reflect();var R=e.all(C).then(function(P){for(var u=0;u<P.length;++u){var E=P[u];if(E.isRejected())return v.e=E.error(),v;if(!E.isFulfilled()){R.cancel();return}P[u]=E.value()}L._pushContext(),k=s(k);var w=X?k.apply(void 0,P):k(P),A=L._popContext();return a.checkForgottenReturns(w,A,"Promise.using",L),w}),L=R.lastly(function(){var P=new e.PromiseInspection(R);return d(H,P)});return H.promise=L,L._setOnCancel(H),L},e.prototype._setDisposable=function(F){this._bitField=this._bitField|131072,this._disposer=F},e.prototype._isDisposable=function(){return(this._bitField&131072)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},e.prototype.disposer=function(F){if(typeof F=="function")return new y(F,this,n());throw new _}}});var bn=j((za,yn)=>{"use strict";yn.exports=function(e,t,r){var n=G(),i=e.TimeoutError;function a(f){this.handle=f}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var p=function(f){return _(+this).thenReturn(f)},_=e.delay=function(f,g){var h,d;return g!==void 0?(h=e.resolve(g)._then(p,null,null,f,void 0),r.cancellation()&&g instanceof e&&h._setOnCancel(g)):(h=new e(t),d=setTimeout(function(){h._fulfill()},+f),r.cancellation()&&h._setOnCancel(new a(d)),h._captureStackTrace()),h._setAsyncGuaranteed(),h};e.prototype.delay=function(f){return _(f,this)};var c=function(f,g,h){var d;typeof g!="string"?g instanceof Error?d=g:d=new i("operation timed out"):d=new i(g),n.markAsOriginatingFromRejection(d),f._attachExtraTrace(d),f._reject(d),h?.cancel()};function v(f){return clearTimeout(this.handle),f}function s(f){throw clearTimeout(this.handle),f}e.prototype.timeout=function(f,g){f=+f;var h,d,o=new a(setTimeout(function(){h.isPending()&&c(h,g,d)},f));return r.cancellation()?(d=this.then(),h=d._then(v,s,void 0,o,void 0),h._setOnCancel(o)):h=this._then(v,s,void 0,o,void 0),h}}});var Cn=j((Xa,mn)=>{"use strict";mn.exports=function(e,t,r,n,i,a){var p=be(),_=p.TypeError,c=G(),v=c.errorObj,s=c.tryCatch,f=[];function g(d,o,y){for(var x=0;x<o.length;++x){y._pushContext();var T=s(o[x])(d);if(y._popContext(),T===v){y._pushContext();var F=e.reject(v.e);return y._popContext(),F}var k=n(T,y);if(k instanceof e)return k}return null}function h(d,o,y,x){if(a.cancellation()){var T=new e(r),F=this._finallyPromise=new e(r);this._promise=T.lastly(function(){return F}),T._captureStackTrace(),T._setOnCancel(this)}else{var k=this._promise=new e(r);k._captureStackTrace()}this._stack=x,this._generatorFunction=d,this._receiver=o,this._generator=void 0,this._yieldHandlers=typeof y=="function"?[y].concat(f):f,this._yieldedPromise=null,this._cancellationPhase=!1}c.inherits(h,i),h.prototype._isResolved=function(){return this._promise===null},h.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&this._finallyPromise!==null&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},h.prototype._promiseCancelled=function(){if(!this._isResolved()){var d=typeof this._generator.return<"u",o;if(d)this._promise._pushContext(),o=s(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var y=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=y,this._promise._attachExtraTrace(y),this._promise._pushContext(),o=s(this._generator.throw).call(this._generator,y),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(o)}},h.prototype._promiseFulfilled=function(d){this._yieldedPromise=null,this._promise._pushContext();var o=s(this._generator.next).call(this._generator,d);this._promise._popContext(),this._continue(o)},h.prototype._promiseRejected=function(d){this._yieldedPromise=null,this._promise._attachExtraTrace(d),this._promise._pushContext();var o=s(this._generator.throw).call(this._generator,d);this._promise._popContext(),this._continue(o)},h.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var d=this._yieldedPromise;this._yieldedPromise=null,d.cancel()}},h.prototype.promise=function(){return this._promise},h.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},h.prototype._continue=function(d){var o=this._promise;if(d===v)return this._cleanup(),this._cancellationPhase?o.cancel():o._rejectCallback(d.e,!1);var y=d.value;if(d.done===!0)return this._cleanup(),this._cancellationPhase?o.cancel():o._resolveCallback(y);var x=n(y,this._promise);if(!(x instanceof e)&&(x=g(x,this._yieldHandlers,this._promise),x===null)){this._promiseRejected(new _(`A value %s was yielded that could not be treated as a promise
112
+
113
+ See http://goo.gl/MqrFmX
114
+
115
+ `.replace("%s",y)+`From coroutine:
116
+ `+this._stack.split(`
117
+ `).slice(1,-7).join(`
118
+ `)));return}x=x._target();var T=x._bitField;(T&50397184)===0?(this._yieldedPromise=x,x._proxy(this,null)):(T&33554432)!==0?e._async.invoke(this._promiseFulfilled,this,x._value()):(T&16777216)!==0?e._async.invoke(this._promiseRejected,this,x._reason()):this._promiseCancelled()},e.coroutine=function(d,o){if(typeof d!="function")throw new _(`generatorFunction must be a function
119
+
120
+ See http://goo.gl/MqrFmX
121
+ `);var y=Object(o).yieldHandler,x=h,T=new Error().stack;return function(){var F=d.apply(this,arguments),k=new x(void 0,void 0,y,T),U=k.promise();return k._generator=F,k._promiseFulfilled(void 0),U}},e.coroutine.addYieldHandler=function(d){if(typeof d!="function")throw new _("expecting a function but got "+c.classString(d));f.push(d)},e.spawn=function(d){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),typeof d!="function")return t(`generatorFunction must be a function
122
+
123
+ See http://goo.gl/MqrFmX
124
+ `);var o=new h(d,this),y=o.promise();return o._run(e.spawn),y}}});var xn=j((Va,En)=>{"use strict";En.exports=function(e){var t=G(),r=e._async,n=t.tryCatch,i=t.errorObj;function a(c,v){var s=this;if(!t.isArray(c))return p.call(s,c,v);var f=n(v).apply(s._boundValue(),[null].concat(c));f===i&&r.throwLater(f.e)}function p(c,v){var s=this,f=s._boundValue(),g=c===void 0?n(v).call(f,null):n(v).call(f,null,c);g===i&&r.throwLater(g.e)}function _(c,v){var s=this;if(!c){var f=new Error(c+"");f.cause=c,c=f}var g=n(v).call(s._boundValue(),c);g===i&&r.throwLater(g.e)}e.prototype.asCallback=e.prototype.nodeify=function(c,v){if(typeof c=="function"){var s=p;v!==void 0&&Object(v).spread&&(s=a),this._then(s,_,void 0,this,c)}return this}}});var Fn=j((Ga,wn)=>{"use strict";wn.exports=function(e,t){var r={},n=G(),i=Lt(),a=n.withAppended,p=n.maybeWrapAsError,_=n.canEvaluate,c=be().TypeError,v="Async",s={__isPromisified__:!0},f=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],g=new RegExp("^(?:"+f.join("|")+")$"),h=function(R){return n.isIdentifier(R)&&R.charAt(0)!=="_"&&R!=="constructor"};function d(R){return!g.test(R)}function o(R){try{return R.__isPromisified__===!0}catch{return!1}}function y(R,L,P){var u=n.getDataPropertyOrDefault(R,L+P,s);return u?o(u):!1}function x(R,L,P){for(var u=0;u<R.length;u+=2){var E=R[u];if(P.test(E)){for(var w=E.replace(P,""),A=0;A<R.length;A+=2)if(R[A]===w)throw new c(`Cannot promisify an API that has normal methods with '%s'-suffix
125
+
126
+ See http://goo.gl/MqrFmX
127
+ `.replace("%s",L))}}}function T(R,L,P,u){for(var E=n.inheritedDataKeys(R),w=[],A=0;A<E.length;++A){var I=E[A],N=R[I],z=u===h?!0:h(I,N,R);typeof N=="function"&&!o(N)&&!y(R,I,L)&&u(I,N,R,z)&&w.push(I,N)}return x(w,L,P),w}var F=function(R){return R.replace(/([$])/,"\\$")},k,U=function(R){for(var L=[R],P=Math.max(0,R-1-3),u=R-1;u>=P;--u)L.push(u);for(var u=R+1;u<=3;++u)L.push(u);return L},X=function(R){return n.filledRange(R,"_arg","")},H=function(R){return n.filledRange(Math.max(R,3),"_arg","")},D=function(R){return typeof R.length=="number"?Math.max(Math.min(R.length,1024),0):0};k=function(R,L,P,u,E,w){var A=Math.max(0,D(u)-1),I=U(A),N=typeof R=="string"||L===r;function z(ne){var oe=X(ne).join(", "),me=ne>0?", ":"",qe;return N?qe=`ret = callback.call(this, {{args}}, nodeback); break;
128
+ `:qe=L===void 0?`ret = callback({{args}}, nodeback); break;
129
+ `:`ret = callback.call(receiver, {{args}}, nodeback); break;
130
+ `,qe.replace("{{args}}",oe).replace(", ",me)}function V(){for(var ne="",oe=0;oe<I.length;++oe)ne+="case "+I[oe]+":"+z(I[oe]);return ne+=`
131
+ default:
132
+ var args = new Array(len + 1);
133
+ var i = 0;
134
+ for (var i = 0; i < len; ++i) {
135
+ args[i] = arguments[i];
136
+ }
137
+ args[i] = nodeback;
138
+ [CodeForCall]
139
+ break;
140
+ `.replace("[CodeForCall]",N?`ret = callback.apply(this, args);
141
+ `:`ret = callback.apply(receiver, args);
142
+ `),ne}var ae=typeof R=="string"?"this != null ? this['"+R+"'] : fn":"fn",se=`'use strict';
143
+ var ret = function (Parameters) {
144
+ 'use strict';
145
+ var len = arguments.length;
146
+ var promise = new Promise(INTERNAL);
147
+ promise._captureStackTrace();
148
+ var nodeback = nodebackForPromise(promise, `+w+`);
149
+ var ret;
150
+ var callback = tryCatch([GetFunctionCode]);
151
+ switch(len) {
152
+ [CodeForSwitchCase]
153
+ }
154
+ if (ret === errorObj) {
155
+ promise._rejectCallback(maybeWrapAsError(ret.e), true, true);
156
+ }
157
+ if (!promise._isFateSealed()) promise._setAsyncGuaranteed();
158
+ return promise;
159
+ };
160
+ notEnumerableProp(ret, '__isPromisified__', true);
161
+ return ret;
162
+ `.replace("[CodeForSwitchCase]",V()).replace("[GetFunctionCode]",ae);return se=se.replace("Parameters",H(A)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",se)(e,u,L,a,p,i,n.tryCatch,n.errorObj,n.notEnumerableProp,t)};function B(R,L,P,u,E,w){var A=(function(){return this})(),I=R;typeof I=="string"&&(R=u);function N(){var z=L;L===r&&(z=this);var V=new e(t);V._captureStackTrace();var ae=typeof I=="string"&&this!==A?this[I]:R,se=i(V,w);try{ae.apply(z,a(arguments,se))}catch(ne){V._rejectCallback(p(ne),!0,!0)}return V._isFateSealed()||V._setAsyncGuaranteed(),V}return n.notEnumerableProp(N,"__isPromisified__",!0),N}var $=_?k:B;function ue(R,L,P,u,E){for(var w=new RegExp(F(L)+"$"),A=T(R,L,w,P),I=0,N=A.length;I<N;I+=2){var z=A[I],V=A[I+1],ae=z+L;if(u===$)R[ae]=$(z,r,z,V,L,E);else{var se=u(V,function(){return $(z,r,z,V,L,E)});n.notEnumerableProp(se,"__isPromisified__",!0),R[ae]=se}}return n.toFastProperties(R),R}function C(R,L,P){return $(R,L,void 0,R,null,P)}e.promisify=function(R,L){if(typeof R!="function")throw new c("expecting a function but got "+n.classString(R));if(o(R))return R;L=Object(L);var P=L.context===void 0?r:L.context,u=!!L.multiArgs,E=C(R,P,u);return n.copyDescriptors(R,E,d),E},e.promisifyAll=function(R,L){if(typeof R!="function"&&typeof R!="object")throw new c(`the target of promisifyAll must be an object or a function
163
+
164
+ See http://goo.gl/MqrFmX
165
+ `);L=Object(L);var P=!!L.multiArgs,u=L.suffix;typeof u!="string"&&(u=v);var E=L.filter;typeof E!="function"&&(E=h);var w=L.promisifier;if(typeof w!="function"&&(w=$),!n.isIdentifier(u))throw new RangeError(`suffix must be a valid identifier
166
+
167
+ See http://goo.gl/MqrFmX
168
+ `);for(var A=n.inheritedDataKeys(R),I=0;I<A.length;++I){var N=R[A[I]];A[I]!=="constructor"&&n.isClass(N)&&(ue(N.prototype,u,E,w,P),ue(N,u,E,w,P))}return ue(R,u,E,w,P)}}});var Sn=j((Ya,Tn)=>{"use strict";Tn.exports=function(e,t,r,n){var i=G(),a=i.isObject,p=Se(),_;typeof Map=="function"&&(_=Map);var c=(function(){var g=0,h=0;function d(o,y){this[g]=o,this[g+h]=y,g++}return function(y){h=y.size,g=0;var x=new Array(y.size*2);return y.forEach(d,x),x}})(),v=function(g){for(var h=new _,d=g.length/2|0,o=0;o<d;++o){var y=g[d+o],x=g[o];h.set(y,x)}return h};function s(g){var h=!1,d;if(_!==void 0&&g instanceof _)d=c(g),h=!0;else{var o=p.keys(g),y=o.length;d=new Array(y*2);for(var x=0;x<y;++x){var T=o[x];d[x]=g[T],d[x+y]=T}}this.constructor$(d),this._isMap=h,this._init$(void 0,-3)}i.inherits(s,t),s.prototype._init=function(){},s.prototype._promiseFulfilled=function(g,h){this._values[h]=g;var d=++this._totalResolved;if(d>=this._length){var o;if(this._isMap)o=v(this._values);else{o={};for(var y=this.length(),x=0,T=this.length();x<T;++x)o[this._values[x+y]]=this._values[x]}return this._resolve(o),!0}return!1},s.prototype.shouldCopyValues=function(){return!1},s.prototype.getActualLength=function(g){return g>>1};function f(g){var h,d=r(g);if(a(d))d instanceof e?h=d._then(e.props,void 0,void 0,void 0,void 0):h=new s(d).promise();else return n(`cannot await properties of a non-object
169
+
170
+ See http://goo.gl/MqrFmX
171
+ `);return d instanceof e&&h._propagateFrom(d,2),h}e.prototype.props=function(){return f(this)},e.props=function(g){return f(g)}}});var On=j(($a,An)=>{"use strict";An.exports=function(e,t,r,n){var i=G(),a=function(_){return _.then(function(c){return p(c,_)})};function p(_,c){var v=r(_);if(v instanceof e)return a(v);if(_=i.asArray(_),_===null)return n("expecting an array or an iterable object but got "+i.classString(_));var s=new e(t);c!==void 0&&s._propagateFrom(c,3);for(var f=s._fulfill,g=s._reject,h=0,d=_.length;h<d;++h){var o=_[h];o===void 0&&!(h in _)||e.cast(o)._then(f,g,void 0,s,null)}return s}e.race=function(_){return p(_,void 0)},e.prototype.race=function(){return p(this,void 0)}}});var Rn=j((Wa,kn)=>{"use strict";kn.exports=function(e,t,r,n,i,a){var p=e._getDomain,_=G(),c=_.tryCatch;function v(d,o,y,x){this.constructor$(d);var T=p();this._fn=T===null?o:_.domainBind(T,o),y!==void 0&&(y=e.resolve(y),y._attachCancellationCallback(this)),this._initialValue=y,this._currentCancellable=null,x===i?this._eachValues=Array(this._length):x===0?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}_.inherits(v,t),v.prototype._gotAccum=function(d){this._eachValues!==void 0&&this._eachValues!==null&&d!==i&&this._eachValues.push(d)},v.prototype._eachComplete=function(d){return this._eachValues!==null&&this._eachValues.push(d),this._eachValues},v.prototype._init=function(){},v.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},v.prototype.shouldCopyValues=function(){return!1},v.prototype._resolve=function(d){this._promise._resolveCallback(d),this._values=null},v.prototype._resultCancelled=function(d){if(d===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel())},v.prototype._iterate=function(d){this._values=d;var o,y,x=d.length;if(this._initialValue!==void 0?(o=this._initialValue,y=0):(o=e.resolve(d[0]),y=1),this._currentCancellable=o,!o.isRejected())for(;y<x;++y){var T={accum:null,value:d[y],index:y,length:x,array:this};o=o._then(g,void 0,void 0,T,void 0)}this._eachValues!==void 0&&(o=o._then(this._eachComplete,void 0,void 0,this,void 0)),o._then(s,s,void 0,o,this)},e.prototype.reduce=function(d,o){return f(this,d,o,null)},e.reduce=function(d,o,y,x){return f(d,o,y,x)};function s(d,o){this.isFulfilled()?o._resolve(d):o._reject(d)}function f(d,o,y,x){if(typeof o!="function")return r("expecting a function but got "+_.classString(o));var T=new v(d,o,y,x);return T.promise()}function g(d){this.accum=d,this.array._gotAccum(d);var o=n(this.value,this.array._promise);return o instanceof e?(this.array._currentCancellable=o,o._then(h,void 0,void 0,this,void 0)):h.call(this,o)}function h(d){var o=this.array,y=o._promise,x=c(o._fn);y._pushContext();var T;o._eachValues!==void 0?T=x.call(y._boundValue(),d,this.index,this.length):T=x.call(y._boundValue(),this.accum,d,this.index,this.length),T instanceof e&&(o._currentCancellable=T);var F=y._popContext();return a.checkForgottenReturns(T,F,o._eachValues!==void 0?"Promise.each":"Promise.reduce",y),T}}});var Ln=j((Qa,In)=>{"use strict";In.exports=function(e,t,r){var n=e.PromiseInspection,i=G();function a(p){this.constructor$(p)}i.inherits(a,t),a.prototype._promiseResolved=function(p,_){this._values[p]=_;var c=++this._totalResolved;return c>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseFulfilled=function(p,_){var c=new n;return c._bitField=33554432,c._settledValueField=p,this._promiseResolved(_,c)},a.prototype._promiseRejected=function(p,_){var c=new n;return c._bitField=16777216,c._settledValueField=p,this._promiseResolved(_,c)},e.settle=function(p){return r.deprecated(".settle()",".reflect()"),new a(p).promise()},e.prototype.settle=function(){return e.settle(this)}}});var jn=j((Ka,Nn)=>{"use strict";Nn.exports=function(e,t,r){var n=G(),i=be().RangeError,a=be().AggregateError,p=n.isArray,_={};function c(s){this.constructor$(s),this._howMany=0,this._unwrap=!1,this._initialized=!1}n.inherits(c,t),c.prototype._init=function(){if(this._initialized){if(this._howMany===0){this._resolve([]);return}this._init$(void 0,-5);var s=p(this._values);!this._isResolved()&&s&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(s){this._howMany=s},c.prototype._promiseFulfilled=function(s){return this._addFulfilled(s),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},c.prototype._promiseRejected=function(s){return this._addRejected(s),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof e||this._values==null?this._cancel():(this._addRejected(_),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var s=new a,f=this.length();f<this._values.length;++f)this._values[f]!==_&&s.push(this._values[f]);return s.length>0?this._reject(s):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(s){this._values.push(s)},c.prototype._addFulfilled=function(s){this._values[this._totalResolved++]=s},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(s){var f="Input array must contain at least "+this._howMany+" items but contains only "+s+" items";return new i(f)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))};function v(s,f){if((f|0)!==f||f<0)return r(`expecting a positive integer
172
+
173
+ See http://goo.gl/MqrFmX
174
+ `);var g=new c(s),h=g.promise();return g.setHowMany(f),g.init(),h}e.some=function(s,f){return v(s,f)},e.prototype.some=function(s){return v(this,s)},e._SomePromiseArray=c}});var Mn=j((Ja,Un)=>{"use strict";Un.exports=function(e,t){var r=e.map;e.prototype.filter=function(n,i){return r(this,n,i,t)},e.filter=function(n,i,a){return r(n,i,a,t)}}});var qn=j((Za,Dn)=>{"use strict";Dn.exports=function(e,t){var r=e.reduce,n=e.all;function i(){return n(this)}function a(p,_){return r(p,_,t,t)}e.prototype.each=function(p){return r(this,p,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(p){return r(this,p,t,t)},e.each=function(p,_){return r(p,_,t,0)._then(i,void 0,void 0,p,void 0)},e.mapSeries=a}});var Hn=j((es,Bn)=>{"use strict";Bn.exports=function(e){var t=e._SomePromiseArray;function r(n){var i=new t(n),a=i.promise();return i.setHowMany(1),i.setUnwrap(),i.init(),a}e.any=function(n){return r(n)},e.prototype.any=function(){return r(this)}}});var Pn=j((ts,Mt)=>{"use strict";Mt.exports=function(){var e=function(){return new f(`circular promise resolution chain
175
+
176
+ See http://goo.gl/MqrFmX
177
+ `)},t=function(){return new C.PromiseInspection(this._target())},r=function(u){return C.reject(new f(u))};function n(){}var i={},a=G(),p;a.isNode?p=function(){var u=process.domain;return u===void 0&&(u=null),u}:p=function(){return null},a.notEnumerableProp(C,"_getDomain",p);var _=Se(),c=Nr(),v=new c;_.defineProperty(C,"_async",{value:v});var s=be(),f=C.TypeError=s.TypeError;C.RangeError=s.RangeError;var g=C.CancellationError=s.CancellationError;C.TimeoutError=s.TimeoutError,C.OperationalError=s.OperationalError,C.RejectionError=s.OperationalError,C.AggregateError=s.AggregateError;var h=function(){},d={},o={},y=qr()(C,h),x=Hr()(C,h,y,r,n),T=zr()(C),F=T.create,k=Vr()(C,T),U=k.CapturedTrace,X=Yr()(C,y),H=Wr()(o),D=Lt(),B=a.errorObj,$=a.tryCatch;function ue(u,E){if(typeof E!="function")throw new f("expecting a function but got "+a.classString(E));if(u.constructor!==C)throw new f(`the promise constructor cannot be invoked directly
178
+
179
+ See http://goo.gl/MqrFmX
180
+ `)}function C(u){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,u!==h&&(ue(this,u),this._resolveFromExecutor(u)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}C.prototype.toString=function(){return"[object Promise]"},C.prototype.caught=C.prototype.catch=function(u){var E=arguments.length;if(E>1){var w=new Array(E-1),A=0,I;for(I=0;I<E-1;++I){var N=arguments[I];if(a.isObject(N))w[A++]=N;else return r("expecting an object but got A catch statement predicate "+a.classString(N))}return w.length=A,u=arguments[I],this.then(void 0,H(w,u,this))}return this.then(void 0,u)},C.prototype.reflect=function(){return this._then(t,t,void 0,this,void 0)},C.prototype.then=function(u,E){if(k.warnings()&&arguments.length>0&&typeof u!="function"&&typeof E!="function"){var w=".then() only accepts functions but was passed: "+a.classString(u);arguments.length>1&&(w+=", "+a.classString(E)),this._warn(w)}return this._then(u,E,void 0,void 0,void 0)},C.prototype.done=function(u,E){var w=this._then(u,E,void 0,void 0,void 0);w._setIsFinal()},C.prototype.spread=function(u){return typeof u!="function"?r("expecting a function but got "+a.classString(u)):this.all()._then(u,void 0,void 0,d,void 0)},C.prototype.toJSON=function(){var u={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(u.fulfillmentValue=this.value(),u.isFulfilled=!0):this.isRejected()&&(u.rejectionReason=this.reason(),u.isRejected=!0),u},C.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new x(this).promise()},C.prototype.error=function(u){return this.caught(a.originatesFromRejection,u)},C.getNewLibraryCopy=Mt.exports,C.is=function(u){return u instanceof C},C.fromNode=C.fromCallback=function(u){var E=new C(h);E._captureStackTrace();var w=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,A=$(u)(D(E,w));return A===B&&E._rejectCallback(A.e,!0),E._isFateSealed()||E._setAsyncGuaranteed(),E},C.all=function(u){return new x(u).promise()},C.cast=function(u){var E=y(u);return E instanceof C||(E=new C(h),E._captureStackTrace(),E._setFulfilled(),E._rejectionHandler0=u),E},C.resolve=C.fulfilled=C.cast,C.reject=C.rejected=function(u){var E=new C(h);return E._captureStackTrace(),E._rejectCallback(u,!0),E},C.setScheduler=function(u){if(typeof u!="function")throw new f("expecting a function but got "+a.classString(u));return v.setScheduler(u)},C.prototype._then=function(u,E,w,A,I){var N=I!==void 0,z=N?I:new C(h),V=this._target(),ae=V._bitField;N||(z._propagateFrom(this,3),z._captureStackTrace(),A===void 0&&(this._bitField&2097152)!==0&&((ae&50397184)!==0?A=this._boundValue():A=V===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,z));var se=p();if((ae&50397184)!==0){var ne,oe,me=V._settlePromiseCtx;(ae&33554432)!==0?(oe=V._rejectionHandler0,ne=u):(ae&16777216)!==0?(oe=V._fulfillmentHandler0,ne=E,V._unsetRejectionIsUnhandled()):(me=V._settlePromiseLateCancellationObserver,oe=new g("late cancellation observer"),V._attachExtraTrace(oe),ne=E),v.invoke(me,V,{handler:se===null?ne:typeof ne=="function"&&a.domainBind(se,ne),promise:z,receiver:A,value:oe})}else V._addCallbacks(u,E,z,A,se);return z},C.prototype._length=function(){return this._bitField&65535},C.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},C.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},C.prototype._setLength=function(u){this._bitField=this._bitField&-65536|u&65535},C.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},C.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},C.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},C.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},C.prototype._isFinal=function(){return(this._bitField&4194304)>0},C.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},C.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},C.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},C.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=this._bitField|134217728)},C.prototype._receiverAt=function(u){var E=u===0?this._receiver0:this[u*4-4+3];if(E!==i)return E===void 0&&this._isBound()?this._boundValue():E},C.prototype._promiseAt=function(u){return this[u*4-4+2]},C.prototype._fulfillmentHandlerAt=function(u){return this[u*4-4+0]},C.prototype._rejectionHandlerAt=function(u){return this[u*4-4+1]},C.prototype._boundValue=function(){},C.prototype._migrateCallback0=function(u){var E=u._bitField,w=u._fulfillmentHandler0,A=u._rejectionHandler0,I=u._promise0,N=u._receiverAt(0);N===void 0&&(N=i),this._addCallbacks(w,A,I,N,null)},C.prototype._migrateCallbackAt=function(u,E){var w=u._fulfillmentHandlerAt(E),A=u._rejectionHandlerAt(E),I=u._promiseAt(E),N=u._receiverAt(E);N===void 0&&(N=i),this._addCallbacks(w,A,I,N,null)},C.prototype._addCallbacks=function(u,E,w,A,I){var N=this._length();if(N>=65531&&(N=0,this._setLength(0)),N===0)this._promise0=w,this._receiver0=A,typeof u=="function"&&(this._fulfillmentHandler0=I===null?u:a.domainBind(I,u)),typeof E=="function"&&(this._rejectionHandler0=I===null?E:a.domainBind(I,E));else{var z=N*4-4;this[z+2]=w,this[z+3]=A,typeof u=="function"&&(this[z+0]=I===null?u:a.domainBind(I,u)),typeof E=="function"&&(this[z+1]=I===null?E:a.domainBind(I,E))}return this._setLength(N+1),N},C.prototype._proxy=function(u,E){this._addCallbacks(void 0,void 0,E,u,null)},C.prototype._resolveCallback=function(u,E){if((this._bitField&117506048)===0){if(u===this)return this._rejectCallback(e(),!1);var w=y(u,this);if(!(w instanceof C))return this._fulfill(u);E&&this._propagateFrom(w,2);var A=w._target();if(A===this){this._reject(e());return}var I=A._bitField;if((I&50397184)===0){var N=this._length();N>0&&A._migrateCallback0(this);for(var z=1;z<N;++z)A._migrateCallbackAt(this,z);this._setFollowing(),this._setLength(0),this._setFollowee(A)}else if((I&33554432)!==0)this._fulfill(A._value());else if((I&16777216)!==0)this._reject(A._reason());else{var V=new g("late cancellation observer");A._attachExtraTrace(V),this._reject(V)}}},C.prototype._rejectCallback=function(u,E,w){var A=a.ensureErrorObject(u),I=A===u;if(!I&&!w&&k.warnings()){var N="a promise was rejected with a non-error: "+a.classString(u);this._warn(N,!0)}this._attachExtraTrace(A,E?I:!1),this._reject(u)},C.prototype._resolveFromExecutor=function(u){var E=this;this._captureStackTrace(),this._pushContext();var w=!0,A=this._execute(u,function(I){E._resolveCallback(I)},function(I){E._rejectCallback(I,w)});w=!1,this._popContext(),A!==void 0&&E._rejectCallback(A,!0)},C.prototype._settlePromiseFromHandler=function(u,E,w,A){var I=A._bitField;if((I&65536)===0){A._pushContext();var N;E===d?!w||typeof w.length!="number"?(N=B,N.e=new f("cannot .spread() a non-array: "+a.classString(w))):N=$(u).apply(this._boundValue(),w):N=$(u).call(E,w);var z=A._popContext();I=A._bitField,(I&65536)===0&&(N===o?A._reject(w):N===B?A._rejectCallback(N.e,!1):(k.checkForgottenReturns(N,z,"",A,this),A._resolveCallback(N)))}},C.prototype._target=function(){for(var u=this;u._isFollowing();)u=u._followee();return u},C.prototype._followee=function(){return this._rejectionHandler0},C.prototype._setFollowee=function(u){this._rejectionHandler0=u},C.prototype._settlePromise=function(u,E,w,A){var I=u instanceof C,N=this._bitField,z=(N&134217728)!==0;(N&65536)!==0?(I&&u._invokeInternalOnCancel(),w instanceof X&&w.isFinallyHandler()?(w.cancelPromise=u,$(E).call(w,A)===B&&u._reject(B.e)):E===t?u._fulfill(t.call(w)):w instanceof n?w._promiseCancelled(u):I||u instanceof x?u._cancel():w.cancel()):typeof E=="function"?I?(z&&u._setAsyncGuaranteed(),this._settlePromiseFromHandler(E,w,A,u)):E.call(w,A,u):w instanceof n?w._isResolved()||((N&33554432)!==0?w._promiseFulfilled(A,u):w._promiseRejected(A,u)):I&&(z&&u._setAsyncGuaranteed(),(N&33554432)!==0?u._fulfill(A):u._reject(A))},C.prototype._settlePromiseLateCancellationObserver=function(u){var E=u.handler,w=u.promise,A=u.receiver,I=u.value;typeof E=="function"?w instanceof C?this._settlePromiseFromHandler(E,A,I,w):E.call(A,I,w):w instanceof C&&w._reject(I)},C.prototype._settlePromiseCtx=function(u){this._settlePromise(u.promise,u.handler,u.receiver,u.value)},C.prototype._settlePromise0=function(u,E,w){var A=this._promise0,I=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(A,u,I,E)},C.prototype._clearCallbackDataAtIndex=function(u){var E=u*4-4;this[E+2]=this[E+3]=this[E+0]=this[E+1]=void 0},C.prototype._fulfill=function(u){var E=this._bitField;if(!((E&117506048)>>>16)){if(u===this){var w=e();return this._attachExtraTrace(w),this._reject(w)}this._setFulfilled(),this._rejectionHandler0=u,(E&65535)>0&&((E&134217728)!==0?this._settlePromises():v.settlePromises(this))}},C.prototype._reject=function(u){var E=this._bitField;if(!((E&117506048)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=u,this._isFinal())return v.fatalError(u,a.isNode);(E&65535)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled()}},C.prototype._fulfillPromises=function(u,E){for(var w=1;w<u;w++){var A=this._fulfillmentHandlerAt(w),I=this._promiseAt(w),N=this._receiverAt(w);this._clearCallbackDataAtIndex(w),this._settlePromise(I,A,N,E)}},C.prototype._rejectPromises=function(u,E){for(var w=1;w<u;w++){var A=this._rejectionHandlerAt(w),I=this._promiseAt(w),N=this._receiverAt(w);this._clearCallbackDataAtIndex(w),this._settlePromise(I,A,N,E)}},C.prototype._settlePromises=function(){var u=this._bitField,E=u&65535;if(E>0){if((u&16842752)!==0){var w=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,w,u),this._rejectPromises(E,w)}else{var A=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,A,u),this._fulfillPromises(E,A)}this._setLength(0)}this._clearCancellationData()},C.prototype._settledValue=function(){var u=this._bitField;if((u&33554432)!==0)return this._rejectionHandler0;if((u&16777216)!==0)return this._fulfillmentHandler0};function R(u){this.promise._resolveCallback(u)}function L(u){this.promise._rejectCallback(u,!1)}C.defer=C.pending=function(){k.deprecated("Promise.defer","new Promise");var u=new C(h);return{promise:u,resolve:R,reject:L}},a.notEnumerableProp(C,"_makeSelfResolutionError",e),en()(C,h,y,r,k),rn()(C,h,y,k),an()(C,x,r,k),on()(C),cn()(C),fn()(C,x,y,h,v,p),C.Promise=C,C.version="3.4.7",hn()(C,x,r,y,h,k),_n()(C),gn()(C,r,y,F,h,k),bn()(C,h,k),Cn()(C,r,h,y,n,k),xn()(C),Fn()(C,h),Sn()(C,x,y,r),On()(C,h,y,r),Rn()(C,x,r,y,h,k),Ln()(C,x,k),jn()(C,x,r),Mn()(C,h),qn()(C,h),Hn()(C),a.toFastProperties(C),a.toFastProperties(C.prototype);function P(u){var E=new C(h);E._fulfillmentHandler0=u,E._rejectionHandler0=u,E._promise0=u,E._receiver0=u}return P({a:1}),P({b:2}),P({c:3}),P(1),P(function(){}),P(void 0),P(!1),P(new C(h)),k.setBounds(c.firstLineError,a.lastLineError),C}});var Vn=j((rs,Xn)=>{"use strict";var zn;typeof Promise<"u"&&(zn=Promise);function zi(){try{Promise===at&&(Promise=zn)}catch{}return at}var at=Pn()();at.noConflict=zi;Xn.exports=at});var Yn=j((ns,Gn)=>{"use strict";var Ue=1e3,Me=Ue*60,De=Me*60,ke=De*24,Xi=ke*7,Vi=ke*365.25;Gn.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Gi(e);if(r==="number"&&isFinite(e))return t.long?$i(e):Yi(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Gi(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Vi;case"weeks":case"week":case"w":return r*Xi;case"days":case"day":case"d":return r*ke;case"hours":case"hour":case"hrs":case"hr":case"h":return r*De;case"minutes":case"minute":case"mins":case"min":case"m":return r*Me;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ue;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Yi(e){var t=Math.abs(e);return t>=ke?Math.round(e/ke)+"d":t>=De?Math.round(e/De)+"h":t>=Me?Math.round(e/Me)+"m":t>=Ue?Math.round(e/Ue)+"s":e+"ms"}function $i(e){var t=Math.abs(e);return t>=ke?st(e,t,ke,"day"):t>=De?st(e,t,De,"hour"):t>=Me?st(e,t,Me,"minute"):t>=Ue?st(e,t,Ue,"second"):e+" ms"}function st(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var Dt=j((is,$n)=>{"use strict";function Wi(e){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=i,r.enabled=p,r.humanize=Yn(),r.destroy=v,Object.keys(e).forEach(s=>{r[s]=e[s]}),r.names=[],r.skips=[],r.formatters={};function t(s){let f=0;for(let g=0;g<s.length;g++)f=(f<<5)-f+s.charCodeAt(g),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=t;function r(s){let f,g=null,h,d;function o(...y){if(!o.enabled)return;let x=o,T=Number(new Date),F=T-(f||T);x.diff=F,x.prev=f,x.curr=T,f=T,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let k=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(X,H)=>{if(X==="%%")return"%";k++;let D=r.formatters[H];if(typeof D=="function"){let B=y[k];X=D.call(x,B),y.splice(k,1),k--}return X}),r.formatArgs.call(x,y),(x.log||r.log).apply(x,y)}return o.namespace=s,o.useColors=r.useColors(),o.color=r.selectColor(s),o.extend=n,o.destroy=r.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(h!==r.namespaces&&(h=r.namespaces,d=r.enabled(s)),d),set:y=>{g=y}}),typeof r.init=="function"&&r.init(o),o}function n(s,f){let g=r(this.namespace+(typeof f>"u"?":":f)+s);return g.log=this.log,g}function i(s){r.save(s),r.namespaces=s,r.names=[],r.skips=[];let f,g=(typeof s=="string"?s:"").split(/[\s,]+/),h=g.length;for(f=0;f<h;f++)g[f]&&(s=g[f].replace(/\*/g,".*?"),s[0]==="-"?r.skips.push(new RegExp("^"+s.slice(1)+"$")):r.names.push(new RegExp("^"+s+"$")))}function a(){let s=[...r.names.map(_),...r.skips.map(_).map(f=>"-"+f)].join(",");return r.enable(""),s}function p(s){if(s[s.length-1]==="*")return!0;let f,g;for(f=0,g=r.skips.length;f<g;f++)if(r.skips[f].test(s))return!1;for(f=0,g=r.names.length;f<g;f++)if(r.names[f].test(s))return!0;return!1}function _(s){return s.toString().substring(2,s.toString().length-2).replace(/\.\*\?$/,"*")}function c(s){return s instanceof Error?s.stack||s.message:s}function v(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}$n.exports=Wi});var Wn=j((ce,ot)=>{"use strict";ce.formatArgs=Ki;ce.save=Ji;ce.load=Zi;ce.useColors=Qi;ce.storage=ea();ce.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ce.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Qi(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Ki(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+ot.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}ce.log=console.debug||console.log||(()=>{});function Ji(e){try{e?ce.storage.setItem("debug",e):ce.storage.removeItem("debug")}catch{}}function Zi(){let e;try{e=ce.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ea(){try{return localStorage}catch{}}ot.exports=Dt()(ce);var{formatters:ta}=ot.exports;ta.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Kn=j((as,Qn)=>{"use strict";Qn.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var ei=j((ss,Zn)=>{"use strict";var ra=ie("os"),Jn=ie("tty"),le=Kn(),{env:te}=process,Fe;le("no-color")||le("no-colors")||le("color=false")||le("color=never")?Fe=0:(le("color")||le("colors")||le("color=true")||le("color=always"))&&(Fe=1);"FORCE_COLOR"in te&&(te.FORCE_COLOR==="true"?Fe=1:te.FORCE_COLOR==="false"?Fe=0:Fe=te.FORCE_COLOR.length===0?1:Math.min(parseInt(te.FORCE_COLOR,10),3));function qt(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Bt(e,t){if(Fe===0)return 0;if(le("color=16m")||le("color=full")||le("color=truecolor"))return 3;if(le("color=256"))return 2;if(e&&!t&&Fe===void 0)return 0;let r=Fe||0;if(te.TERM==="dumb")return r;if(process.platform==="win32"){let n=ra.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in te)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in te)||te.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in te)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(te.TEAMCITY_VERSION)?1:0;if(te.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in te){let n=parseInt((te.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(te.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(te.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(te.TERM)||"COLORTERM"in te?1:r}function na(e){let t=Bt(e,e&&e.isTTY);return qt(t)}Zn.exports={supportsColor:na,stdout:qt(Bt(!0,Jn.isatty(1))),stderr:qt(Bt(!0,Jn.isatty(2)))}});var ri=j((re,ct)=>{"use strict";var ia=ie("tty"),ut=ie("util");re.init=fa;re.log=ua;re.formatArgs=sa;re.save=ca;re.load=la;re.useColors=aa;re.destroy=ut.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");re.colors=[6,2,3,4,5,1];try{let e=ei();e&&(e.stderr||e).level>=2&&(re.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}re.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,a)=>a.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function aa(){return"colors"in re.inspectOpts?!!re.inspectOpts.colors:ia.isatty(process.stderr.fd)}function sa(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),a=` ${i};1m${t} \x1B[0m`;e[0]=a+e[0].split(`
181
+ `).join(`
182
+ `+a),e.push(i+"m+"+ct.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=oa()+t+" "+e[0]}function oa(){return re.inspectOpts.hideDate?"":new Date().toISOString()+" "}function ua(...e){return process.stderr.write(ut.formatWithOptions(re.inspectOpts,...e)+`
183
+ `)}function ca(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function la(){return process.env.DEBUG}function fa(e){e.inspectOpts={};let t=Object.keys(re.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=re.inspectOpts[t[r]]}ct.exports=Dt()(re);var{formatters:ti}=ct.exports;ti.o=function(e){return this.inspectOpts.colors=this.useColors,ut.inspect(e,this.inspectOpts).split(`
184
+ `).map(t=>t.trim()).join(" ")};ti.O=function(e){return this.inspectOpts.colors=this.useColors,ut.inspect(e,this.inspectOpts)}});var ni=j((os,Ht)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ht.exports=Wn():Ht.exports=ri()});var Vt=j((us,ai)=>{"use strict";var ii=ie("assert"),Pt=ni()("adb:apkreader:parser:binaryxml"),zt={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,CDATA_SECTION_NODE:4},pe={NULL:0,STRING_POOL:1,TABLE:2,XML:3,XML_FIRST_CHUNK:256,XML_START_NAMESPACE:256,XML_END_NAMESPACE:257,XML_START_ELEMENT:258,XML_END_ELEMENT:259,XML_CDATA:260,XML_LAST_CHUNK:383,XML_RESOURCE_MAP:384,TABLE_PACKAGE:512,TABLE_TYPE:513,TABLE_TYPE_SPEC:514},lt={SORTED:1,UTF8:256},Z={COMPLEX_MANTISSA_MASK:16777215,COMPLEX_MANTISSA_SHIFT:8,COMPLEX_RADIX_0p23:3,COMPLEX_RADIX_16p7:1,COMPLEX_RADIX_23p0:0,COMPLEX_RADIX_8p15:2,COMPLEX_RADIX_MASK:3,COMPLEX_RADIX_SHIFT:4,COMPLEX_UNIT_DIP:1,COMPLEX_UNIT_FRACTION:0,COMPLEX_UNIT_FRACTION_PARENT:1,COMPLEX_UNIT_IN:4,COMPLEX_UNIT_MASK:15,COMPLEX_UNIT_MM:5,COMPLEX_UNIT_PT:3,COMPLEX_UNIT_PX:0,COMPLEX_UNIT_SHIFT:0,COMPLEX_UNIT_SP:2,DENSITY_DEFAULT:0,DENSITY_NONE:65535,TYPE_ATTRIBUTE:2,TYPE_DIMENSION:5,TYPE_FIRST_COLOR_INT:28,TYPE_FIRST_INT:16,TYPE_FLOAT:4,TYPE_FRACTION:6,TYPE_INT_BOOLEAN:18,TYPE_INT_COLOR_ARGB4:30,TYPE_INT_COLOR_ARGB8:28,TYPE_INT_COLOR_RGB4:31,TYPE_INT_COLOR_RGB8:29,TYPE_INT_DEC:16,TYPE_INT_HEX:17,TYPE_LAST_COLOR_INT:31,TYPE_LAST_INT:31,TYPE_NULL:0,TYPE_REFERENCE:1,TYPE_STRING:3},Xt=class{constructor(t,r={}){this.buffer=t,this.cursor=0,this.strings=[],this.resources=[],this.document=null,this.parent=null,this.stack=[],this.debug=r.debug||!1}readU8(){this.debug&&console.group("readU8"),this.debug&&console.debug("cursor:",this.cursor);let t=this.buffer[this.cursor];return this.debug&&console.debug("value:",t),this.cursor+=1,this.debug&&console.groupEnd(),t}readU16(){this.debug&&console.group("readU16"),this.debug&&console.debug("cursor:",this.cursor);let t=this.buffer.readUInt16LE(this.cursor);return this.debug&&console.debug("value:",t),this.cursor+=2,this.debug&&console.groupEnd(),t}readS32(){this.debug&&console.group("readS32"),this.debug&&console.debug("cursor:",this.cursor);let t=this.buffer.readInt32LE(this.cursor);return this.debug&&console.debug("value:",t),this.cursor+=4,this.debug&&console.groupEnd(),t}readU32(){this.debug&&console.group("readU32"),this.debug&&console.debug("cursor:",this.cursor);let t=this.buffer.readUInt32LE(this.cursor);return this.debug&&console.debug("value:",t),this.cursor+=4,this.debug&&console.groupEnd(),t}readLength8(){this.debug&&console.group("readLength8");let t=this.readU8();return t&128&&(t=(t&127)<<8,t+=this.readU8()),this.debug&&console.debug("length:",t),this.debug&&console.groupEnd(),t}readLength16(){this.debug&&console.group("readLength16");let t=this.readU16();return t&32768&&(t=(t&32767)<<16,t+=this.readU16()),this.debug&&console.debug("length:",t),this.debug&&console.groupEnd(),t}readDimension(){this.debug&&console.group("readDimension");let t={value:null,unit:null,rawUnit:null},r=this.readU32(),n=t.value&255;switch(t.value=r>>8,t.rawUnit=n,n){case Z.COMPLEX_UNIT_MM:t.unit="mm";break;case Z.COMPLEX_UNIT_PX:t.unit="px";break;case Z.COMPLEX_UNIT_DIP:t.unit="dp";break;case Z.COMPLEX_UNIT_SP:t.unit="sp";break;case Z.COMPLEX_UNIT_PT:t.unit="pt";break;case Z.COMPLEX_UNIT_IN:t.unit="in";break}return this.debug&&console.groupEnd(),t}readFraction(){this.debug&&console.group("readFraction");let t={value:null,type:null,rawType:null},r=this.readU32(),n=r&15;switch(t.value=this.convertIntToFloat(r>>4),t.rawType=n,n){case Z.COMPLEX_UNIT_FRACTION:t.type="%";break;case Z.COMPLEX_UNIT_FRACTION_PARENT:t.type="%p";break}return this.debug&&console.groupEnd(),t}readHex24(){this.debug&&console.group("readHex24");var t=(this.readU32()&16777215).toString(16);return this.debug&&console.groupEnd(),t}readHex32(){this.debug&&console.group("readHex32");var t=this.readU32().toString(16);return this.debug&&console.groupEnd(),t}readTypedValue(){this.debug&&console.group("readTypedValue");let t={value:null,type:null,rawType:null},r=this.cursor,n=this.readU16();this.readU8();let i=this.readU8();switch(n===0&&(n=8),t.rawType=i,i){case Z.TYPE_INT_DEC:t.value=this.readS32(),t.type="int_dec";break;case Z.TYPE_INT_HEX:t.value=this.readS32(),t.type="int_hex";break;case Z.TYPE_STRING:var a=this.readS32();t.value=a>0?this.strings[a]:"",t.type="string";break;case Z.TYPE_REFERENCE:var p=this.readU32();t.value=`resourceId:0x${p.toString(16)}`,t.type="reference";break;case Z.TYPE_INT_BOOLEAN:t.value=this.readS32()!==0,t.type="boolean";break;case Z.TYPE_NULL:this.readU32(),t.value=null,t.type="null";break;case Z.TYPE_INT_COLOR_RGB8:t.value=this.readHex24(),t.type="rgb8";break;case Z.TYPE_INT_COLOR_RGB4:t.value=this.readHex24(),t.type="rgb4";break;case Z.TYPE_INT_COLOR_ARGB8:t.value=this.readHex32(),t.type="argb8";break;case Z.TYPE_INT_COLOR_ARGB4:t.value=this.readHex32(),t.type="argb4";break;case Z.TYPE_DIMENSION:t.value=this.readDimension(),t.type="dimension";break;case Z.TYPE_FRACTION:t.value=this.readFraction(),t.type="fraction";break;default:{let c=i.toString(16);Pt(`Not sure what to do with typed value of type 0x${c}, falling back to reading an uint32.`),t.value=this.readU32(),t.type="unknown"}}let _=r+n;if(this.cursor!==_){let c=i.toString(16),v=_-this.cursor;Pt(`Cursor is off by ${v} bytes at ${this.cursor} at supposed end of typed value of type 0x${c}. The typed value started at offset ${r} and is supposed to end at offset ${_}. Ignoring the rest of the value.`),this.cursor=_}return this.debug&&console.groupEnd(),t}convertIntToFloat(t){let r=new ArrayBuffer(4);return new Int32Array(r)[0]=t,new Float32Array(r)[0]}readString(t){switch(this.debug&&console.group("readString",t),t){case"utf-8":var r=this.readLength8(t);this.debug&&console.debug("stringLength:",r);var n=this.readLength8(t);this.debug&&console.debug("byteLength:",n);var i=this.buffer.toString(t,this.cursor,this.cursor+=n);return this.debug&&console.debug("value:",i),ii.equal(this.readU8(),0,"String must end with trailing zero"),this.debug&&console.groupEnd(),i;case"ucs2":return r=this.readLength16(t),this.debug&&console.debug("stringLength:",r),n=r*2,this.debug&&console.debug("byteLength:",n),i=this.buffer.toString(t,this.cursor,this.cursor+=n),this.debug&&console.debug("value:",i),ii.equal(this.readU16(),0,"String must end with trailing zero"),this.debug&&console.groupEnd(),i;default:throw new Error(`Unsupported encoding '${t}'`)}}readChunkHeader(){this.debug&&console.group("readChunkHeader");var t={startOffset:this.cursor,chunkType:this.readU16(),headerSize:this.readU16(),chunkSize:this.readU32()};return this.debug&&console.debug("startOffset:",t.startOffset),this.debug&&console.debug("chunkType:",t.chunkType),this.debug&&console.debug("headerSize:",t.headerSize),this.debug&&console.debug("chunkSize:",t.chunkSize),this.debug&&console.groupEnd(),t}readStringPool(t){if(this.debug&&console.group("readStringPool"),t.stringCount=this.readU32(),this.debug&&console.debug("stringCount:",t.stringCount),t.styleCount=this.readU32(),this.debug&&console.debug("styleCount:",t.styleCount),t.flags=this.readU32(),this.debug&&console.debug("flags:",t.flags),t.stringsStart=this.readU32(),this.debug&&console.debug("stringsStart:",t.stringsStart),t.stylesStart=this.readU32(),this.debug&&console.debug("stylesStart:",t.stylesStart),t.chunkType!==pe.STRING_POOL)throw new Error("Invalid string pool header");let r=[];for(let p=0,_=t.stringCount;p<_;++p)this.debug&&console.debug("offset:",p),r.push(this.readU32());let n=(t.flags&lt.SORTED)===lt.SORTED;this.debug&&console.debug("sorted:",n);let i=(t.flags&lt.UTF8)===lt.UTF8?"utf-8":"ucs2";this.debug&&console.debug("encoding:",i);let a=t.startOffset+t.stringsStart;this.cursor=a;for(let p=0,_=t.stringCount;p<_;++p)this.debug&&console.debug("string:",p),this.debug&&console.debug("offset:",r[p]),this.cursor=a+r[p],this.strings.push(this.readString(i));return this.cursor=t.startOffset+t.chunkSize,this.debug&&console.groupEnd(),null}readResourceMap(t){this.debug&&console.group("readResourceMap");let r=Math.floor((t.chunkSize-t.headerSize)/4);for(let n=0;n<r;++n)this.resources.push(this.readU32());return this.debug&&console.groupEnd(),null}readXmlNamespaceStart(){return this.debug&&console.group("readXmlNamespaceStart"),this.readU32(),this.readU32(),this.readS32(),this.readS32(),this.debug&&console.groupEnd(),null}readXmlNamespaceEnd(){return this.debug&&console.group("readXmlNamespaceEnd"),this.readU32(),this.readU32(),this.readS32(),this.readS32(),this.debug&&console.groupEnd(),null}readXmlElementStart(){this.debug&&console.group("readXmlElementStart");let t={namespaceURI:null,nodeType:zt.ELEMENT_NODE,nodeName:null,attributes:[],childNodes:[]};this.readU32(),this.readU32();let r=this.readS32(),n=this.readS32();r>0&&(t.namespaceURI=this.strings[r]),t.nodeName=this.strings[n],this.readU16(),this.readU16();let i=this.readU16();this.readU16(),this.readU16(),this.readU16();for(let a=0;a<i;++a)t.attributes.push(this.readXmlAttribute());return this.document?(this.parent.childNodes.push(t),this.parent=t):this.document=this.parent=t,this.stack.push(t),this.debug&&console.groupEnd(),t}readXmlAttribute(){this.debug&&console.group("readXmlAttribute");let t={namespaceURI:null,nodeType:zt.ATTRIBUTE_NODE,nodeName:null,name:null,value:null,typedValue:null},r=this.readS32(),n=this.readS32(),i=this.readS32();return r>0&&(t.namespaceURI=this.strings[r]),t.nodeName=t.name=this.strings[n],i>0&&(t.value=this.strings[i]),t.typedValue=this.readTypedValue(),this.debug&&console.groupEnd(),t}readXmlElementEnd(){return this.debug&&console.group("readXmlCData"),this.readU32(),this.readU32(),this.readS32(),this.readS32(),this.stack.pop(),this.parent=this.stack[this.stack.length-1],this.debug&&console.groupEnd(),null}readXmlCData(){this.debug&&console.group("readXmlCData");let t={namespaceURI:null,nodeType:zt.CDATA_SECTION_NODE,nodeName:"#cdata",data:null,typedValue:null};this.readU32(),this.readU32();let r=this.readS32();return r>0&&(t.data=this.strings[r]),t.typedValue=this.readTypedValue(),this.parent.childNodes.push(t),this.debug&&console.groupEnd(),t}readNull(t){return this.debug&&console.group("readNull"),this.cursor+=t.chunkSize-t.headerSize,this.debug&&console.groupEnd(),null}parse(){if(this.debug&&console.group("BinaryXmlParser.parse"),this.readChunkHeader().chunkType!==pe.XML)throw new Error("Invalid XML header");for(;this.cursor<this.buffer.length;){this.debug&&console.group("chunk");let r=this.cursor,n=this.readChunkHeader();switch(n.chunkType){case pe.STRING_POOL:this.readStringPool(n);break;case pe.XML_RESOURCE_MAP:this.readResourceMap(n);break;case pe.XML_START_NAMESPACE:this.readXmlNamespaceStart(n);break;case pe.XML_END_NAMESPACE:this.readXmlNamespaceEnd(n);break;case pe.XML_START_ELEMENT:this.readXmlElementStart(n);break;case pe.XML_END_ELEMENT:this.readXmlElementEnd(n);break;case pe.XML_CDATA:this.readXmlCData(n);break;case pe.NULL:this.readNull(n);break;default:throw new Error(`Unsupported chunk type '${n.chunkType}'`)}let i=r+n.chunkSize;if(this.cursor!==i){let a=i-this.cursor,p=n.chunkType.toString(16);Pt(`Cursor is off by ${a} bytes at ${this.cursor} at supposed end of chunk of type 0x${p}. The chunk started at offset ${r} and is supposed to end at offset ${i}. Ignoring the rest of the chunk.`),this.cursor=i}this.debug&&console.groupEnd()}return this.debug&&console.groupEnd(),this.document}};ai.exports=Xt});var ui=j((cs,oi)=>{"use strict";var da=Vt(),si="android.intent.action.MAIN",ha="android.intent.category.LAUNCHER",pa="android.intent.category.LEANBACK_LAUNCHER",Gt=class{constructor(t,r={}){this.buffer=t,this.xmlParser=new da(this.buffer,r)}collapseAttributes(t){let r=Object.create(null);for(let n of Array.from(t.attributes))r[n.name]=n.typedValue.value;return r}parseIntents(t,r){return r.intentFilters=[],r.metaData=[],t.childNodes.forEach(n=>{switch(n.nodeName){case"intent-filter":{let i=this.collapseAttributes(n);i.actions=[],i.categories=[],i.data=[],n.childNodes.forEach(a=>{switch(a.nodeName){case"action":i.actions.push(this.collapseAttributes(a));break;case"category":i.categories.push(this.collapseAttributes(a));break;case"data":i.data.push(this.collapseAttributes(a));break}}),r.intentFilters.push(i);break}case"meta-data":r.metaData.push(this.collapseAttributes(n));break}})}parseApplication(t){let r=this.collapseAttributes(t);return r.activities=[],r.activityAliases=[],r.launcherActivities=[],r.leanbackLauncherActivities=[],r.services=[],r.receivers=[],r.providers=[],r.usesLibraries=[],t.childNodes.forEach(n=>{switch(n.nodeName){case"activity":{let i=this.collapseAttributes(n);this.parseIntents(n,i),r.activities.push(i),this.isLauncherActivity(i)&&r.launcherActivities.push(i),this.isLeanbackLauncherActivity(i)&&r.leanbackLauncherActivities.push(i);break}case"activity-alias":{let i=this.collapseAttributes(n);this.parseIntents(n,i),r.activityAliases.push(i),this.isLauncherActivity(i)&&r.launcherActivities.push(i),this.isLeanbackLauncherActivity(i)&&r.leanbackLauncherActivities.push(i);break}case"service":{let i=this.collapseAttributes(n);this.parseIntents(n,i),r.services.push(i);break}case"receiver":{let i=this.collapseAttributes(n);this.parseIntents(n,i),r.receivers.push(i);break}case"provider":{let i=this.collapseAttributes(n);i.grantUriPermissions=[],i.metaData=[],i.pathPermissions=[],n.childNodes.forEach(a=>{switch(a.nodeName){case"grant-uri-permission":i.grantUriPermissions.push(this.collapseAttributes(a));break;case"meta-data":i.metaData.push(this.collapseAttributes(a));break;case"path-permission":i.pathPermissions.push(this.collapseAttributes(a));break}}),r.providers.push(i);break}case"uses-library":r.usesLibraries.push(this.collapseAttributes(n));break}}),r}isLauncherActivity(t){return t.intentFilters.some(function(r){return r.actions.some(i=>i.name===si)?r.categories.some(i=>i.name===ha):!1})}isLeanbackLauncherActivity(t){return t.intentFilters.some(function(r){return r.actions.some(i=>i.name===si)?r.categories.some(i=>i.name===pa):!1})}parse(){let t=this.xmlParser.parse(),r=this.collapseAttributes(t);return r.usesPermissions=[],r.permissions=[],r.permissionTrees=[],r.permissionGroups=[],r.instrumentation=null,r.usesSdk=null,r.usesConfiguration=null,r.usesFeatures=[],r.supportsScreens=null,r.compatibleScreens=[],r.supportsGlTextures=[],r.application=Object.create(null),t.childNodes.forEach(n=>{switch(n.nodeName){case"uses-permission":r.usesPermissions.push(this.collapseAttributes(n));break;case"permission":r.permissions.push(this.collapseAttributes(n));break;case"permission-tree":r.permissionTrees.push(this.collapseAttributes(n));break;case"permission-group":r.permissionGroups.push(this.collapseAttributes(n));break;case"instrumentation":r.instrumentation=this.collapseAttributes(n);break;case"uses-sdk":r.usesSdk=this.collapseAttributes(n);break;case"uses-configuration":r.usesConfiguration=this.collapseAttributes(n);break;case"uses-feature":r.usesFeatures.push(this.collapseAttributes(n));break;case"supports-screens":r.supportsScreens=this.collapseAttributes(n);break;case"compatible-screens":n.childNodes.forEach(i=>r.compatibleScreens.push(this.collapseAttributes(i)));break;case"supports-gl-texture":r.supportsGlTextures.push(this.collapseAttributes(n));break;case"application":case"com.stub.StubApp":r.application=this.parseApplication(n);break}}),r}};oi.exports=Gt});var fi=j((ls,li)=>{"use strict";var ci=dr(),Ge=Vn(),_a=ui(),va=Vt(),ft=class e{static open(t){return Ge.resolve(new e(t))}constructor(t){this.apk=t}_open(){return Ge.fromCallback(t=>this.apk instanceof Buffer?ci.fromBuffer(this.apk,{lazyEntries:!0},t):ci.open(this.apk,{lazyEntries:!0},t))}usingFile(t,r){return this.usingFileStream(t,function(n){let i,a,p;return new Ge(function(c,v){let s=[],f=0,g=function(){let h;for(;h=n.read();)s.push(h),f+=h.length};a=()=>g(),i=h=>{n.destroy(),v(h)},p=()=>c(Buffer.concat(s,f)),n.on("readable",a),n.on("error",i),n.on("end",p),g()}).then(r).finally(function(){n.removeListener("readable",a),n.removeListener("error",i),n.removeListener("end",p)})})}usingFileStream(t,r){return this._open().then(function(n){let i,a,p;return new Ge(function(c,v){i=s=>{if(s.fileName===t)return c(Ge.fromCallback(f=>{n.openReadStream(s,f)}));n.readEntry()},p=()=>{v(new Error(`APK does not contain '${t}'`))},a=s=>v(s),n.on("entry",i),n.on("end",p),n.on("error",a),n.readEntry()}).then(r).finally(function(){n.removeListener("entry",i),n.removeListener("error",a),n.removeListener("end",p),n.close()})})}readContent(t){return this.usingFile(t,r=>r)}readManifest(t={}){return this.usingFile(e.MANIFEST,r=>new _a(r,t).parse())}readXml(t,r={}){return this.usingFile(t,n=>new va(n,r).parse())}};ft.MANIFEST="AndroidManifest.xml";li.exports=ft});var ga=j((fs,di)=>{di.exports=fi()});export default ga();
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d,e,f,g,h}from"./chunk-TAOHYWEO.js";import"./chunk-RZ4F3BHX.js";import"./chunk-UR6MHSHU.js";export{h as AppClient,g as AppUploadError,a as UPLOAD_CONTENT_TYPE,e as parseAppDetails,b as parseAppListPage,d as parseSignedDownload,c as parseUploadResponse,f as transportReason};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{b as a,c as b}from"./chunk-AJQT4IWZ.js";import"./chunk-TAOHYWEO.js";import"./chunk-RZ4F3BHX.js";import"./chunk-7F2ZV46B.js";import"./chunk-UR6MHSHU.js";export{a as isAppId,b as resolveCloudApp};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import"./chunk-UR6MHSHU.js";async function i(e){try{let[{CredentialsManager:n},{AuthResolver:a},{getEnvironment:s}]=await Promise.all([import("./credentials-YHTJGKEO.js"),import("./resolver-SRPCFW7P.js"),import("./config-CWZV6XPT.js")]),t=new n,o=t.getActiveProfile()??"default",c=t.loadCredentials(o,e);if(typeof c?.access_token!="string")return null;let r=await new a(s(e).controllerBaseUrl,async()=>c.access_token,null).resolve();return typeof r?.username!="string"||!r.username||typeof r.access_key!="string"||!r.access_key?null:Buffer.from(`${r.username}:${r.access_key}`,"utf8").toString("base64")}catch{return null}}async function u(e={}){let n=e.env??process.env,s=await(e.resolveBase??(async()=>(await import("./spawner-GC5CFAJ7.js")).resolveAgentAuthEnv()))();if(s.TESTMUAI_BASIC_AUTH||n.TESTMUAI_BASIC_AUTH)return s;let t=n.TESTMUAI_ENV==="stage"?"stage":"prod",o=await(e.exchange??i)(t);return o?{...s,TESTMUAI_BASIC_AUTH:o}:s}export{u as resolveLisAuthEnv};
2
+ import"./chunk-UR6MHSHU.js";async function i(e){try{let[{CredentialsManager:n},{AuthResolver:a},{getEnvironment:s}]=await Promise.all([import("./credentials-CALNKQMN.js"),import("./resolver-FTU5KO7H.js"),import("./config-RLDXM5ZH.js")]),t=new n,o=t.getActiveProfile()??"default",c=t.loadCredentials(o,e);if(typeof c?.access_token!="string")return null;let r=await new a(s(e).controllerBaseUrl,async()=>c.access_token,null).resolve();return typeof r?.username!="string"||!r.username||typeof r.access_key!="string"||!r.access_key?null:Buffer.from(`${r.username}:${r.access_key}`,"utf8").toString("base64")}catch{return null}}async function u(e={}){let n=e.env??process.env,s=await(e.resolveBase??(async()=>(await import("./spawner-DQZRJIE6.js")).resolveAgentAuthEnv()))();if(s.TESTMUAI_BASIC_AUTH||n.TESTMUAI_BASIC_AUTH)return s;let t=n.TESTMUAI_ENV==="stage"?"stage":"prod",o=await(e.exchange??i)(t);return o?{...s,TESTMUAI_BASIC_AUTH:o}:s}export{u as resolveLisAuthEnv};
@@ -1,12 +1,12 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as _}from"./chunk-C3T7TKAC.js";import"./chunk-IOD3HQVW.js";import"./chunk-KHU7C6EE.js";import"./chunk-3Q6WAK6P.js";import"./chunk-AFPHLUQ5.js";import"./chunk-AJ56AMT6.js";import"./chunk-DZPGG4S6.js";import"./chunk-F7ISS545.js";import"./chunk-7OYZR6JA.js";import"./chunk-JFAFKHDX.js";import"./chunk-BB2W35TW.js";import"./chunk-YKTYVJBN.js";import"./chunk-IMR64OCZ.js";import"./chunk-427OQS2N.js";import"./chunk-JZ26R6UL.js";import"./chunk-VGFTNLQQ.js";import"./chunk-L2TV4G56.js";import"./chunk-6KPPGMO2.js";import"./chunk-5DT7PIGB.js";import"./chunk-R7QAS6LZ.js";import"./chunk-QOFZSHSC.js";import"./chunk-BKHXPBWN.js";import"./chunk-5FJJJNJK.js";import"./chunk-VMM4LC4V.js";import"./chunk-W4B5LOEX.js";import"./chunk-DNNZ353O.js";import"./chunk-2UIHS2FH.js";import"./chunk-Q2F5QB2W.js";import"./chunk-N2P4MI32.js";import"./chunk-GFKCTYCA.js";import"./chunk-ZPDM6FO7.js";import"./chunk-NVGBE2DR.js";import"./chunk-L5LI2JF4.js";import"./chunk-TH47OOBV.js";import"./chunk-VAYBKR76.js";import"./chunk-CUM23TLF.js";import"./chunk-DUAXZYAD.js";import"./chunk-DBIBROYW.js";import"./chunk-WXHQYYD5.js";import"./chunk-IAHKTEET.js";import"./chunk-UD7KKHPW.js";import{a as m}from"./chunk-CH273NAE.js";import"./chunk-IDX3TOPY.js";import"./chunk-5EOX4MEY.js";import"./chunk-ZUGCHQFC.js";import"./chunk-UR6MHSHU.js";import{existsSync as O}from"fs";var P=new Set(["interactive","agent","ci","override"]);function H(e){return e.mode!=null&&!P.has(e.mode)?{error:`design: --mode must be interactive | agent | ci | override, got '${e.mode}'`}:e.strength!=null&&e.strength!=="pairwise"&&e.strength!=="3-wise"?{error:`design: --strength must be pairwise | 3-wise, got '${e.strength}'`}:e.max!=null&&(!Number.isInteger(e.max)||e.max<1)?{error:"design: --max must be a positive integer"}:!e.useCase&&!e.resume?{error:"design: --use-case is required (or --resume <sid> \u2014 the session remembers its use-case)"}:{useCase:e.useCase,max:e.max,strength:e.strength,mode:e.mode,force:e.force,resume:e.resume,plan:e.plan,message:e.message,phase:e.phase,allowUnreviewed:e.allowUnreviewed,because:e.because,changeDelta:e.changeDelta,priorDesign:e.priorDesign}}async function B(e){let p=async(t,r)=>{if(e.mode!=="agent")return process.stderr.write(t+`
3
- `),2;let{makeHeadlessIO:s,agentRefusal:d}=await import("./headless-io-66RG5NN5.js");return d(s("ndjson","design"),t,r)};if(e.mode!=null&&!["interactive","agent","ci","override"].includes(e.mode)){let{makeHeadlessIO:t,agentRefusal:r}=await import("./headless-io-66RG5NN5.js");return r(t("ndjson","design"),`design: --mode must be interactive | agent | ci | override, got '${e.mode}'`,"MODE_USAGE")}let T=H(e);if("error"in T)return p(T.error);let o=T;{let{validateResumeMessage:t}=await import("./headless-io-66RG5NN5.js"),r=t(o,"design");if(r)return p(r)}{let{gateStructuredFlags:t}=await import("./structured-answers-A43Q25CZ.js"),r=t(e,"design");if(r)return p(r,"STRUCTURED_FLAGS_USAGE")}if(!O(m(process.cwd())))return p("error: no context store here (run `kane-cli context ingest` + `kane-cli context extract` first)","NO_STORE");let y=!!o.resume;if(o.useCase&&o.resume&&!e.allowUnreviewed)try{let{peekSession:t}=await import("./sessions-GIEXOCE4.js"),r=t(m(process.cwd()),o.resume);y=!!(r&&r.use_case===o.useCase)}catch{y=!1}if(o.useCase&&!y&&!e.allowUnreviewed)try{let[{openGraph:t},{designEntryCheck:r}]=await Promise.all([import("./readmodel-XOYGGQ3S.js"),import("./trust-gate-EX7R2P4Y.js")]),s=r(t(m(process.cwd())),o.useCase);if(!s.ok&&(s.code==="UC_UNREVIEWED"||s.code==="UC_ARCHIVED"))if((o.mode??"interactive")==="interactive"&&process.stdin.isTTY&&process.stdout.isTTY){let{createInterface:l}=await import("readline/promises"),c=l({input:process.stdin,output:process.stderr}),f=(await c.question(`design: ${s.detail}
2
+ import{a as _}from"./chunk-6N726QLP.js";import"./chunk-KHU7C6EE.js";import"./chunk-IOD3HQVW.js";import"./chunk-3Q6WAK6P.js";import"./chunk-AFPHLUQ5.js";import"./chunk-JZ26R6UL.js";import"./chunk-RN4PKQFR.js";import"./chunk-FNS2EAA5.js";import"./chunk-ZGBSGZZM.js";import"./chunk-7S3JZ6FQ.js";import"./chunk-BB2W35TW.js";import"./chunk-AXTPNZPX.js";import"./chunk-L2TV4G56.js";import"./chunk-JFAFKHDX.js";import"./chunk-6KPPGMO2.js";import"./chunk-GNIFMQNK.js";import"./chunk-GFKCTYCA.js";import"./chunk-YKTYVJBN.js";import"./chunk-IMR64OCZ.js";import"./chunk-427OQS2N.js";import"./chunk-4U4OSOA4.js";import"./chunk-W4B5LOEX.js";import"./chunk-DNNZ353O.js";import"./chunk-R7QAS6LZ.js";import"./chunk-KRKGZ2ZW.js";import"./chunk-2UIHS2FH.js";import"./chunk-Q2F5QB2W.js";import"./chunk-BKHXPBWN.js";import"./chunk-N2P4MI32.js";import"./chunk-5DT7PIGB.js";import"./chunk-ZPDM6FO7.js";import"./chunk-NVGBE2DR.js";import{a as m}from"./chunk-CH273NAE.js";import"./chunk-L5LI2JF4.js";import"./chunk-IDX3TOPY.js";import"./chunk-TH47OOBV.js";import"./chunk-VAYBKR76.js";import"./chunk-CUM23TLF.js";import"./chunk-DUAXZYAD.js";import"./chunk-DBIBROYW.js";import"./chunk-WXHQYYD5.js";import"./chunk-IAHKTEET.js";import"./chunk-UD7KKHPW.js";import"./chunk-MSGW4JDG.js";import"./chunk-5EOX4MEY.js";import"./chunk-7F2ZV46B.js";import"./chunk-UR6MHSHU.js";import{existsSync as O}from"fs";var P=new Set(["interactive","agent","ci","override"]);function H(e){return e.mode!=null&&!P.has(e.mode)?{error:`design: --mode must be interactive | agent | ci | override, got '${e.mode}'`}:e.strength!=null&&e.strength!=="pairwise"&&e.strength!=="3-wise"?{error:`design: --strength must be pairwise | 3-wise, got '${e.strength}'`}:e.max!=null&&(!Number.isInteger(e.max)||e.max<1)?{error:"design: --max must be a positive integer"}:!e.useCase&&!e.resume?{error:"design: --use-case is required (or --resume <sid> \u2014 the session remembers its use-case)"}:{useCase:e.useCase,max:e.max,strength:e.strength,mode:e.mode,force:e.force,resume:e.resume,plan:e.plan,message:e.message,phase:e.phase,allowUnreviewed:e.allowUnreviewed,because:e.because,changeDelta:e.changeDelta,priorDesign:e.priorDesign}}async function B(e){let p=async(t,r)=>{if(e.mode!=="agent")return process.stderr.write(t+`
3
+ `),2;let{makeHeadlessIO:s,agentRefusal:d}=await import("./headless-io-66RG5NN5.js");return d(s("ndjson","design"),t,r)};if(e.mode!=null&&!["interactive","agent","ci","override"].includes(e.mode)){let{makeHeadlessIO:t,agentRefusal:r}=await import("./headless-io-66RG5NN5.js");return r(t("ndjson","design"),`design: --mode must be interactive | agent | ci | override, got '${e.mode}'`,"MODE_USAGE")}let T=H(e);if("error"in T)return p(T.error);let o=T;{let{validateResumeMessage:t}=await import("./headless-io-66RG5NN5.js"),r=t(o,"design");if(r)return p(r)}{let{gateStructuredFlags:t}=await import("./structured-answers-5EY2AZN7.js"),r=t(e,"design");if(r)return p(r,"STRUCTURED_FLAGS_USAGE")}if(!O(m(process.cwd())))return p("error: no context store here (run `kane-cli context ingest` + `kane-cli context extract` first)","NO_STORE");let y=!!o.resume;if(o.useCase&&o.resume&&!e.allowUnreviewed)try{let{peekSession:t}=await import("./sessions-GIEXOCE4.js"),r=t(m(process.cwd()),o.resume);y=!!(r&&r.use_case===o.useCase)}catch{y=!1}if(o.useCase&&!y&&!e.allowUnreviewed)try{let[{openGraph:t},{designEntryCheck:r}]=await Promise.all([import("./readmodel-XOYGGQ3S.js"),import("./trust-gate-EX7R2P4Y.js")]),s=r(t(m(process.cwd())),o.useCase);if(!s.ok&&(s.code==="UC_UNREVIEWED"||s.code==="UC_ARCHIVED"))if((o.mode??"interactive")==="interactive"&&process.stdin.isTTY&&process.stdout.isTTY){let{createInterface:l}=await import("readline/promises"),c=l({input:process.stdin,output:process.stderr}),f=(await c.question(`design: ${s.detail}
4
4
  Design against it anyway? (y/N) `)).trim().toLowerCase();if(c.close(),f!=="y"&&f!=="yes")return process.stderr.write(`aborted \u2014 approve it first: ${s.reviewCmd}
5
5
  `),2}else if(e.mode==="agent"){let{makeHeadlessIO:l}=await import("./headless-io-66RG5NN5.js"),c=l("ndjson","design");return c.event({type:"error",code:s.code,message:`design: ${s.detail}`,next:[s.reviewCmd]}),c.event({type:"done",status:"refused",exit_code:2,next:[s.reviewCmd,`kane-cli design tests --use-case ${o.useCase} --mode agent --allow-unreviewed`]}),2}else return process.stderr.write(`design: ${s.detail} (${s.reviewCmd})
6
6
  `),2}catch(t){process.env.KANE_DEBUG&&process.stderr.write(`trust gate skipped: ${String(t)}
7
7
  `)}let i=null,x=null;try{if(!o.mode&&!process.stdin.isTTY)return process.stderr.write(`design: no TTY \u2014 pass an explicit --mode agent|ci|override to run headless
8
8
  `),2;let t=o.mode??"interactive";if(t==="interactive"){if(!process.stdin.isTTY||!process.stdout.isTTY)return process.stderr.write(`design: --mode interactive needs a TTY on stdin and stdout (use --mode agent|ci|override headless)
9
- `),2;let{bindDesignInteractive:n}=await import("./interactive-bind-XSRD36MO.js");return await n(o)}let{resolveAgentAuthEnv:r}=await import("./spawner-GC5CFAJ7.js"),{runAgent:s}=await import("./bridge-JSKEO4N3.js"),{preflightTurn:d}=await import("./turn-preflight-JGYT7LXP.js"),{makeInterruptGuard:l}=await import("./interrupt-guard-UREUWNRL.js"),{baseUrlAdvisory:c}=await import("./turn-preflight-JGYT7LXP.js"),{makeHeadlessIO:f,resolveEncoding:D,guardedChannels:R}=await import("./headless-io-66RG5NN5.js"),{withStructuredNext:A,prepareStructuredResume:U}=await import("./structured-answers-A43Q25CZ.js");i=A(f(D(t),"design"));let{runWithChannel:$}=await import("./run-channel-RGH4WIQX.js"),w=i,I=D(t)==="ndjson"?n=>$({event:g=>w.event(g)},n):n=>n(),E=n=>{w.out(n),w.event({type:"note",text:n})},{telemetryBootstrap:N,telemetryEnvName:G}=await import("./bootstrap-NFYYRGGR.js"),u=N({verb:"design",mode:t,contextRoot:m(process.cwd()),env:G(),resumeSid:o.resume,write:!0,longSession:!0});x=n=>u.end(n);let a=U({opts:e,contextDir:m(process.cwd()),verb:"design"});if(a.kind==="refuse")return i.out(a.error),t==="agent"&&i.event({type:"error",message:a.error,code:a.code}),await u.end({exit_code:2}),t==="agent"?i.done(2,"refused"):2;let C;if(a.kind==="apply"){for(let n of a.notes)E(n);if(a.matchedQids.length>0){E(`applying ${a.matchedQids.length} structured answer(s) from --answer to the paused session's pending questions`);for(let n of a.matchedQids)i.event({type:"panel_resolved",id:n,by:"user",via:"flag"})}a.statement&&(C=[o.message,a.statement].filter(Boolean).join(`
9
+ `),2;let{bindDesignInteractive:n}=await import("./interactive-bind-Y65XV4Y5.js");return await n(o)}let{resolveAgentAuthEnv:r}=await import("./spawner-DQZRJIE6.js"),{runAgent:s}=await import("./bridge-QDPBIIOW.js"),{preflightTurn:d}=await import("./turn-preflight-JGYT7LXP.js"),{makeInterruptGuard:l}=await import("./interrupt-guard-UREUWNRL.js"),{baseUrlAdvisory:c}=await import("./turn-preflight-JGYT7LXP.js"),{makeHeadlessIO:f,resolveEncoding:D,guardedChannels:R}=await import("./headless-io-66RG5NN5.js"),{withStructuredNext:A,prepareStructuredResume:U}=await import("./structured-answers-5EY2AZN7.js");i=A(f(D(t),"design"));let{runWithChannel:$}=await import("./run-channel-RGH4WIQX.js"),w=i,I=D(t)==="ndjson"?n=>$({event:g=>w.event(g)},n):n=>n(),E=n=>{w.out(n),w.event({type:"note",text:n})},{telemetryBootstrap:N,telemetryEnvName:G}=await import("./bootstrap-RUJBMB2P.js"),u=N({verb:"design",mode:t,contextRoot:m(process.cwd()),env:G(),resumeSid:o.resume,write:!0,longSession:!0});x=n=>u.end(n);let a=U({opts:e,contextDir:m(process.cwd()),verb:"design"});if(a.kind==="refuse")return i.out(a.error),t==="agent"&&i.event({type:"error",message:a.error,code:a.code}),await u.end({exit_code:2}),t==="agent"?i.done(2,"refused"):2;let C;if(a.kind==="apply"){for(let n of a.notes)E(n);if(a.matchedQids.length>0){E(`applying ${a.matchedQids.length} structured answer(s) from --answer to the paused session's pending questions`);for(let n of a.matchedQids)i.event({type:"panel_resolved",id:n,by:"user",via:"flag"})}a.statement&&(C=[o.message,a.statement].filter(Boolean).join(`
10
10
 
11
11
  `))}let b=c();b&&E(b);let v=l(s,n=>i.out(n)),k=R(i,()=>v.interrupted(),/^error: (design agent failed|the design agent ended)/);try{let n=t==="interactive"&&process.stdin.isTTY&&process.stdout.isTTY?async h=>{let{createInterface:Y}=await import("readline/promises"),S=Y({input:process.stdin,output:process.stdout});try{return/^y(es)?$/i.test((await S.question(`${h} [y/N] `)).trim())}finally{S.close()}}:void 0,g=await I(async()=>{let h={...await r(),...u.spawnEnv()};return _({...o,mode:t,...C!==void 0?{message:C}:{},...n?{confirmRetarget:n}:{}},{contextDir:m(process.cwd()),agent:v.agent,preflightTurn:()=>d(h),ask:async()=>[],out:k.out,emit:k.emit,progress:w.progress,isTTY:!1,auth:h,telemetry:u})});return v.interrupted()&&g!==3?(i.out("interrupted \u2014 no session saved"),await u.end({exit_code:130}),i.done(130)):(g===1&&i.out(u.supportFooter()),await u.end({exit_code:g}),i.done(g))}finally{v.dispose()}}catch(t){x&&await x({exit_code:1}).catch(()=>{});let r=t instanceof Error?t.message:String(t);i?.event({type:"error",message:`error: design failed: ${r}`});let s=i?d=>i.out(d):d=>process.stderr.write(d+`
12
12
  `);return s(`error: design failed: ${r}`),(process.env.ASSURANCE_LOG_LEVEL??"").toLowerCase()==="debug"&&t instanceof Error&&t.stack&&s(t.stack),s('hint: the full trace is in the file named on the "trace:" line at the start of this run'),i?i.done(1):1}}export{B as designTestsCommand};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-YTHQNN2L.js";import"./chunk-R5T4RLF5.js";import"./chunk-KBM3XHAM.js";import"./chunk-2YEHV2CX.js";import"./chunk-IDX3TOPY.js";import"./chunk-BKM2LWU2.js";import"./chunk-QIGPXYMF.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-ZUGCHQFC.js";import"./chunk-UR6MHSHU.js";export{b as telemetryBootstrap,a as telemetryEnvName};
2
+ import{a,b}from"./chunk-LDCLZR2U.js";import"./chunk-R5T4RLF5.js";import"./chunk-KBM3XHAM.js";import"./chunk-2YEHV2CX.js";import"./chunk-IDX3TOPY.js";import"./chunk-BKM2LWU2.js";import"./chunk-56PAQAX5.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-7F2ZV46B.js";import"./chunk-UR6MHSHU.js";export{b as telemetryBootstrap,a as telemetryEnvName};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a}from"./chunk-MTIC65NK.js";import"./chunk-WQPQNL4S.js";import"./chunk-4U4OSOA4.js";import"./chunk-UD7KKHPW.js";import"./chunk-7F2ZV46B.js";import"./chunk-UR6MHSHU.js";export{a as runAgent};
@@ -1,4 +1,4 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as l}from"./chunk-RZ4F3BHX.js";import{c as i,g as c}from"./chunk-ZUGCHQFC.js";import"./chunk-UR6MHSHU.js";import{readFileSync as u,writeFileSync as g,mkdirSync as d}from"fs";import{join as f}from"path";var h=f(i,"changelog-cache.json"),p=3600*1e3;function y(){try{let e=JSON.parse(u(h,"utf-8"));if(Date.now()-e.cachedAt<p)return e}catch{}return null}function m(e){try{d(i,{recursive:!0}),g(h,JSON.stringify({entries:e,cachedAt:Date.now()}))}catch{}}async function A(e){try{let t=y();if(t){let r=t.entries;return e?.all?r:r.slice(0,5)}let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),a=await l(`${c}?per_page=30`,{headers:{Accept:"application/vnd.github+json"},signal:n.signal});if(clearTimeout(o),!a.ok)return[];let s=(await a.json()).map(r=>({version:r.tag_name.replace(/^v/,""),date:r.published_at?r.published_at.slice(0,10):"",body:r.body??""}));return m(s),e?.all?s:s.slice(0,5)}catch{return[]}}function v(e){if(e.length===0)return"Could not fetch changelog. Visit https://github.com/LambdaTest/kane-cli/releases";let t=["kane-cli Changelog","\u2500".repeat(40),""];for(let n of e){if(t.push(`v${n.version} (${n.date})`),n.body){let o=n.body.split(`
2
+ import{a as l}from"./chunk-RZ4F3BHX.js";import{c as i,g as c}from"./chunk-7F2ZV46B.js";import"./chunk-UR6MHSHU.js";import{readFileSync as u,writeFileSync as g,mkdirSync as d}from"fs";import{join as f}from"path";var h=f(i,"changelog-cache.json"),p=3600*1e3;function y(){try{let e=JSON.parse(u(h,"utf-8"));if(Date.now()-e.cachedAt<p)return e}catch{}return null}function m(e){try{d(i,{recursive:!0}),g(h,JSON.stringify({entries:e,cachedAt:Date.now()}))}catch{}}async function A(e){try{let t=y();if(t){let r=t.entries;return e?.all?r:r.slice(0,5)}let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),a=await l(`${c}?per_page=30`,{headers:{Accept:"application/vnd.github+json"},signal:n.signal});if(clearTimeout(o),!a.ok)return[];let s=(await a.json()).map(r=>({version:r.tag_name.replace(/^v/,""),date:r.published_at?r.published_at.slice(0,10):"",body:r.body??""}));return m(s),e?.all?s:s.slice(0,5)}catch{return[]}}function v(e){if(e.length===0)return"Could not fetch changelog. Visit https://github.com/LambdaTest/kane-cli/releases";let t=["kane-cli Changelog","\u2500".repeat(40),""];for(let n of e){if(t.push(`v${n.version} (${n.date})`),n.body){let o=n.body.split(`
3
3
  `).filter(a=>a.trim());for(let a of o)t.push(` ${a}`)}t.push("")}return t.join(`
4
4
  `)}export{A as fetchChangelog,v as formatChangelog};