mohdel 0.90.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +377 -0
  3. package/config/benchmarks.json +39 -0
  4. package/js/client/call.js +75 -0
  5. package/js/client/call_image.js +82 -0
  6. package/js/client/gate-binary.js +72 -0
  7. package/js/client/index.js +16 -0
  8. package/js/client/ndjson.js +29 -0
  9. package/js/client/transport.js +48 -0
  10. package/js/core/envelope.js +141 -0
  11. package/js/core/errors.js +75 -0
  12. package/js/core/events.js +96 -0
  13. package/js/core/image.js +58 -0
  14. package/js/core/index.js +10 -0
  15. package/js/core/status.js +48 -0
  16. package/js/factory/bridge.js +372 -0
  17. package/js/session/_cooldown.js +114 -0
  18. package/js/session/_logger.js +138 -0
  19. package/js/session/_rate_limiter.js +77 -0
  20. package/js/session/_tracing.js +58 -0
  21. package/js/session/adapters/_cancelled.js +44 -0
  22. package/js/session/adapters/_catalog.js +58 -0
  23. package/js/session/adapters/_chat_completions.js +439 -0
  24. package/js/session/adapters/_errors.js +85 -0
  25. package/js/session/adapters/_images.js +60 -0
  26. package/js/session/adapters/_lazy_json_cache.js +76 -0
  27. package/js/session/adapters/_pricing.js +67 -0
  28. package/js/session/adapters/_providers.js +60 -0
  29. package/js/session/adapters/_tools.js +185 -0
  30. package/js/session/adapters/_videos.js +283 -0
  31. package/js/session/adapters/anthropic.js +397 -0
  32. package/js/session/adapters/cerebras.js +28 -0
  33. package/js/session/adapters/deepseek.js +32 -0
  34. package/js/session/adapters/echo.js +51 -0
  35. package/js/session/adapters/fake.js +262 -0
  36. package/js/session/adapters/fireworks.js +46 -0
  37. package/js/session/adapters/gemini.js +381 -0
  38. package/js/session/adapters/groq.js +23 -0
  39. package/js/session/adapters/image/fake.js +55 -0
  40. package/js/session/adapters/image/index.js +40 -0
  41. package/js/session/adapters/image/novita.js +135 -0
  42. package/js/session/adapters/image/openai.js +50 -0
  43. package/js/session/adapters/index.js +53 -0
  44. package/js/session/adapters/mistral.js +31 -0
  45. package/js/session/adapters/novita.js +29 -0
  46. package/js/session/adapters/openai.js +381 -0
  47. package/js/session/adapters/openrouter.js +66 -0
  48. package/js/session/adapters/xai.js +27 -0
  49. package/js/session/bin.js +54 -0
  50. package/js/session/driver.js +160 -0
  51. package/js/session/index.js +18 -0
  52. package/js/session/run.js +393 -0
  53. package/js/session/run_image.js +61 -0
  54. package/package.json +107 -0
  55. package/src/cli/ask.js +160 -0
  56. package/src/cli/backup.js +107 -0
  57. package/src/cli/bench.js +262 -0
  58. package/src/cli/check.js +123 -0
  59. package/src/cli/colored-logger.js +67 -0
  60. package/src/cli/colors.js +13 -0
  61. package/src/cli/default.js +39 -0
  62. package/src/cli/index.js +150 -0
  63. package/src/cli/json-output.js +60 -0
  64. package/src/cli/model.js +571 -0
  65. package/src/cli/onboard.js +232 -0
  66. package/src/cli/rank.js +176 -0
  67. package/src/cli/ratelimit.js +160 -0
  68. package/src/cli/tag.js +105 -0
  69. package/src/lib/assets/alibaba.svg +1 -0
  70. package/src/lib/assets/anthropic.svg +5 -0
  71. package/src/lib/assets/deepseek.svg +1 -0
  72. package/src/lib/assets/gemini.svg +1 -0
  73. package/src/lib/assets/google.svg +2 -0
  74. package/src/lib/assets/kwaipilot.svg +1 -0
  75. package/src/lib/assets/meta.svg +1 -0
  76. package/src/lib/assets/minimax.svg +9 -0
  77. package/src/lib/assets/moonshotai.svg +4 -0
  78. package/src/lib/assets/openai.svg +5 -0
  79. package/src/lib/assets/xai.svg +1 -0
  80. package/src/lib/assets/xiaomi.svg +2 -0
  81. package/src/lib/assets/zai.svg +219 -0
  82. package/src/lib/benchmark-score.js +215 -0
  83. package/src/lib/benchmark-truth.js +68 -0
  84. package/src/lib/cache.js +76 -0
  85. package/src/lib/common.js +208 -0
  86. package/src/lib/cooldown.js +63 -0
  87. package/src/lib/creators.js +71 -0
  88. package/src/lib/curated-cache.js +146 -0
  89. package/src/lib/errors.js +126 -0
  90. package/src/lib/index.js +726 -0
  91. package/src/lib/logger.js +29 -0
  92. package/src/lib/providers.js +87 -0
  93. package/src/lib/rank.js +390 -0
  94. package/src/lib/rate-limiter.js +50 -0
  95. package/src/lib/schema.js +150 -0
  96. package/src/lib/select.js +474 -0
  97. package/src/lib/tracing.js +62 -0
  98. package/src/lib/utils.js +85 -0
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" width="32" height="32" style="width: 100%; height: 100%; transform: translate3d(0px, 0px, 0px); content-visibility: visible;" preserveAspectRatio="xMidYMid meet"><defs><clipPath id="__lottie_element_2366"><rect width="32" height="32" x="0" y="0"></rect></clipPath><g id="__lottie_element_2373"><g style="display: block;" transform="matrix(-1,0,0,-1,16,16)" opacity="1"><g opacity="1" transform="matrix(1,0,0,1,0,0)"><path fill="url(#__lottie_element_2376)" fill-opacity="1" d=" M0.027000000700354576,14 C0.47999998927116394,6.489999771118164 6.489999771118164,0.47999998927116394 14,0.027000000700354576 C14,0.027000000700354576 14,-0.027000000700354576 14,-0.027000000700354576 C6.489999771118164,-0.47999998927116394 0.47999998927116394,-6.489999771118164 0.027000000700354576,-14 C0.027000000700354576,-14 -0.027000000700354576,-14 -0.027000000700354576,-14 C-0.47999998927116394,-6.489999771118164 -6.489999771118164,-0.47999998927116394 -14,-0.027000000700354576 C-14,-0.027000000700354576 -14,0.027000000700354576 -14,0.027000000700354576 C-6.489999771118164,0.47999998927116394 -0.47999998927116394,6.489999771118164 -0.027000000700354576,14 C-0.027000000700354576,14 0.027000000700354576,14 0.027000000700354576,14z"></path></g></g></g><linearGradient id="__lottie_element_2376" spreadMethod="pad" gradientUnits="userSpaceOnUse" x1="-9.222999572753906" y1="8.489999771118164" x2="10.461999893188477" y2="-8.211999893188477"><stop offset="0%" stop-color="rgb(248,94,87)"></stop><stop offset="24%" stop-color="rgb(251,100,103)"></stop><stop offset="47%" stop-color="rgb(255,107,119)"></stop><stop offset="74%" stop-color="rgb(232,130,181)"></stop><stop offset="100%" stop-color="rgb(208,152,242)"></stop></linearGradient><mask id="__lottie_element_2373_1" mask-type="alpha"><use xlink:href="#__lottie_element_2373"></use></mask></defs><g clip-path="url(#__lottie_element_2366)"><g style="display: block;" mask="url(#__lottie_element_2373_1)"><g transform="matrix(0.01600000075995922,0,0,0.01600000075995922,16,16)" opacity="1"><g opacity="1" transform="matrix(1,0,0,1,0,0)"><path fill="rgb(0,0,0)" fill-opacity="1" d=" M0,-1000 C551.9000244140625,-1000 1000,-551.9000244140625 1000,0 C1000,551.9000244140625 551.9000244140625,1000 0,1000 C-551.9000244140625,1000 -1000,551.9000244140625 -1000,0 C-1000,-551.9000244140625 -551.9000244140625,-1000 0,-1000z"></path></g></g></g></g></svg>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="none"><path fill="#4285F4" d="M14.9 8.161c0-.476-.039-.954-.121-1.422h-6.64v2.695h3.802a3.24 3.24 0 01-1.407 2.127v1.75h2.269c1.332-1.22 2.097-3.02 2.097-5.15z"/><path fill="#34A853" d="M8.14 15c1.898 0 3.499-.62 4.665-1.69l-2.268-1.749c-.631.427-1.446.669-2.395.669-1.836 0-3.393-1.232-3.952-2.888H1.85v1.803A7.044 7.044 0 008.14 15z"/><path fill="#FBBC04" d="M4.187 9.342a4.17 4.17 0 010-2.68V4.859H1.849a6.97 6.97 0 000 6.286l2.338-1.803z"/><path fill="#EA4335" d="M8.14 3.77a3.837 3.837 0 012.7 1.05l2.01-1.999a6.786 6.786 0 00-4.71-1.82 7.042 7.042 0 00-6.29 3.858L4.186 6.66c.556-1.658 2.116-2.89 3.952-2.89z"/></svg>
@@ -0,0 +1 @@
1
+ <svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Kwaipilot</title><path clip-rule="evenodd" d="M11.765.03C5.327.03.108 5.25.108 11.686c0 3.514 1.556 6.665 4.015 8.804L9.89 8.665h6.451L9.31 23.083c.807.173 1.63.26 2.455.26 6.438 0 11.657-5.22 11.657-11.658S18.202.028 11.765.028V.03z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 287.56 191"><defs><style>.cls-1{fill:#0081fb;}.cls-2{fill:url(#linear-gradient);}.cls-3{fill:url(#linear-gradient-2);}</style><linearGradient id="linear-gradient" x1="62.34" y1="101.45" x2="260.34" y2="91.45" gradientTransform="matrix(1, 0, 0, -1, 0, 192)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0064e1"/><stop offset="0.4" stop-color="#0064e1"/><stop offset="0.83" stop-color="#0073ee"/><stop offset="1" stop-color="#0082fb"/></linearGradient><linearGradient id="linear-gradient-2" x1="41.42" y1="53" x2="41.42" y2="126" gradientTransform="matrix(1, 0, 0, -1, 0, 192)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#0082fb"/><stop offset="1" stop-color="#0064e0"/></linearGradient></defs><title>facebook-meta</title><path class="cls-1" d="M31.06,126c0,11,2.41,19.41,5.56,24.51A19,19,0,0,0,53.19,160c8.1,0,15.51-2,29.79-21.76,11.44-15.83,24.92-38,34-52l15.36-23.6c10.67-16.39,23-34.61,37.18-47C181.07,5.6,193.54,0,206.09,0c21.07,0,41.14,12.21,56.5,35.11,16.81,25.08,25,56.67,25,89.27,0,19.38-3.82,33.62-10.32,44.87C271,180.13,258.72,191,238.13,191V160c17.63,0,22-16.2,22-34.74,0-26.42-6.16-55.74-19.73-76.69-9.63-14.86-22.11-23.94-35.84-23.94-14.85,0-26.8,11.2-40.23,31.17-7.14,10.61-14.47,23.54-22.7,38.13l-9.06,16c-18.2,32.27-22.81,39.62-31.91,51.75C84.74,183,71.12,191,53.19,191c-21.27,0-34.72-9.21-43-23.09C3.34,156.6,0,141.76,0,124.85Z"/><path class="cls-2" d="M24.49,37.3C38.73,15.35,59.28,0,82.85,0c13.65,0,27.22,4,41.39,15.61,15.5,12.65,32,33.48,52.63,67.81l7.39,12.32c17.84,29.72,28,45,33.93,52.22,7.64,9.26,13,12,19.94,12,17.63,0,22-16.2,22-34.74l27.4-.86c0,19.38-3.82,33.62-10.32,44.87C271,180.13,258.72,191,238.13,191c-12.8,0-24.14-2.78-36.68-14.61-9.64-9.08-20.91-25.21-29.58-39.71L146.08,93.6c-12.94-21.62-24.81-37.74-31.68-45C107,40.71,97.51,31.23,82.35,31.23c-12.27,0-22.69,8.61-31.41,21.78Z"/><path class="cls-3" d="M82.35,31.23c-12.27,0-22.69,8.61-31.41,21.78C38.61,71.62,31.06,99.34,31.06,126c0,11,2.41,19.41,5.56,24.51L10.14,167.91C3.34,156.6,0,141.76,0,124.85,0,94.1,8.44,62.05,24.49,37.3,38.73,15.35,59.28,0,82.85,0Z"/></svg>
@@ -0,0 +1,9 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M32.556 4C34.868 4 36.742 5.854 36.742 8.14V33.142C36.7581 33.5251 36.9221 33.8869 37.1997 34.1514C37.4772 34.4159 37.8466 34.5624 38.23 34.56C38.613 34.5619 38.9819 34.4152 39.259 34.1507C39.5362 33.8863 39.7 33.5247 39.716 33.142V18.198C39.7189 17.657 39.8283 17.1218 40.038 16.623C40.2477 16.1243 40.5536 15.6717 40.9383 15.2911C41.3229 14.9106 41.7787 14.6096 42.2797 14.4052C42.7806 14.2008 43.317 14.0971 43.858 14.1C44.3992 14.0971 44.9357 14.2009 45.4368 14.4054C45.9379 14.6099 46.3938 14.9111 46.7784 15.2919C47.1631 15.6726 47.469 16.1254 47.6786 16.6244C47.8881 17.1234 47.9974 17.6588 48 18.2V31.322C47.9979 31.6659 47.8594 31.9949 47.6149 32.2368C47.3704 32.4786 47.0399 32.6136 46.696 32.612C46.5255 32.6131 46.3565 32.5805 46.1987 32.5163C46.0408 32.452 45.8971 32.3573 45.7758 32.2375C45.6546 32.1177 45.5581 31.9752 45.4919 31.8181C45.4257 31.661 45.391 31.4925 45.39 31.322V18.2C45.389 17.9999 45.3485 17.8019 45.2709 17.6174C45.1934 17.4329 45.0802 17.2655 44.938 17.1247C44.7957 16.9839 44.6271 16.8726 44.4418 16.7969C44.2565 16.7213 44.0581 16.6829 43.858 16.684C43.6579 16.6829 43.4595 16.7213 43.2742 16.7969C43.0889 16.8726 42.9203 16.9839 42.778 17.1247C42.6358 17.2655 42.5226 17.4329 42.4451 17.6174C42.3675 17.8019 42.327 17.9999 42.326 18.2V33.144C42.3231 33.679 42.2149 34.2082 42.0075 34.7014C41.8001 35.1946 41.4976 35.6421 41.1172 36.0183C40.7369 36.3946 40.2861 36.6923 39.7907 36.8943C39.2953 37.0964 38.765 37.1989 38.23 37.196C37.695 37.1989 37.1647 37.0964 36.6693 36.8943C36.1739 36.6923 35.7231 36.3946 35.3428 36.0183C34.9624 35.6421 34.6599 35.1946 34.4525 34.7014C34.2451 34.2082 34.1369 33.679 34.134 33.144V8.144C34.1174 7.73776 33.9439 7.35379 33.65 7.0729C33.356 6.79201 32.9646 6.63611 32.558 6.638C32.1514 6.63557 31.7597 6.79097 31.4654 7.07149C31.1711 7.35201 30.9971 7.73577 30.98 8.142L30.978 39.95C30.9717 41.0302 30.5366 42.0636 29.7685 42.823C29.0004 43.5825 27.9622 44.0059 26.882 44C26.347 44.0029 25.8167 43.9004 25.3213 43.6983C24.8259 43.4963 24.3751 43.1986 23.9948 42.8223C23.6144 42.4461 23.3119 41.9986 23.1045 41.5054C22.8971 41.0122 22.7889 40.483 22.786 39.948V36.08C22.786 35.368 23.37 34.79 24.09 34.79C24.81 34.79 25.394 35.368 25.394 36.08V39.948C25.394 40.474 25.678 40.96 26.138 41.224C26.598 41.486 27.166 41.486 27.626 41.224C27.8517 41.096 28.0395 40.9105 28.1702 40.6864C28.3009 40.4622 28.3698 40.2075 28.37 39.948V8.14C28.37 5.854 30.244 4 32.556 4ZM21.208 4C23.52 4 25.394 5.854 25.394 8.14V31.186C25.3932 31.3564 25.3588 31.5249 25.2929 31.682C25.2269 31.839 25.1306 31.9816 25.0095 32.1014C24.8883 32.2212 24.7448 32.3159 24.587 32.3802C24.4293 32.4445 24.2604 32.4771 24.09 32.476C23.9196 32.4771 23.7507 32.4445 23.593 32.3802C23.4352 32.3159 23.2916 32.2212 23.1705 32.1014C23.0494 31.9816 22.9531 31.839 22.8871 31.682C22.8212 31.5249 22.7868 31.3564 22.786 31.186V8.14C22.7834 7.72396 22.6157 7.32597 22.3198 7.03347C22.0239 6.74097 21.624 6.57787 21.208 6.58C20.792 6.57787 20.3921 6.74097 20.0962 7.03347C19.8003 7.32597 19.6326 7.72396 19.63 8.14V36.166C19.6237 37.258 19.184 38.3028 18.4077 39.0709C17.6315 39.8389 16.582 40.2673 15.49 40.262C14.3976 40.2679 13.3477 39.8397 12.571 39.0716C11.7942 38.3035 11.3543 37.2583 11.348 36.166V18.2C11.347 17.9999 11.3065 17.8019 11.2289 17.6174C11.1514 17.4329 11.0382 17.2655 10.896 17.1247C10.7537 16.9839 10.5851 16.8726 10.3998 16.7969C10.2145 16.7213 10.0161 16.6829 9.816 16.684C9.61586 16.6829 9.41748 16.7213 9.23218 16.7969C9.04688 16.8726 8.87828 16.9839 8.73602 17.1247C8.59376 17.2655 8.48062 17.4329 8.40306 17.6174C8.32551 17.8019 8.28505 17.9999 8.284 18.2V25.8C8.28112 26.341 8.1717 26.8762 7.96198 27.375C7.75226 27.8737 7.44636 28.3263 7.06174 28.7069C6.67712 29.0874 6.22131 29.3884 5.72034 29.5928C5.21937 29.7972 4.68305 29.9009 4.142 29.898C3.60095 29.9009 3.06463 29.7972 2.56366 29.5928C2.06269 29.3884 1.60688 29.0874 1.22226 28.7069C0.837637 28.3263 0.531736 27.8737 0.32202 27.375C0.112304 26.8762 0.00288138 26.341 0 25.8L0 23.044C0 22.33 0.584 21.752 1.304 21.752C2.024 21.752 2.61 22.332 2.61 23.044V25.8C2.61 26.636 3.296 27.314 4.142 27.314C4.988 27.314 5.674 26.636 5.674 25.8V18.198C5.68035 17.106 6.11997 16.0612 6.89626 15.2931C7.67254 14.5251 8.72199 14.0967 9.814 14.102C10.9064 14.0961 11.9563 14.5243 12.733 15.2924C13.5098 16.0605 13.9497 17.1057 13.956 18.198V36.166C13.956 37.004 14.642 37.682 15.49 37.682C16.336 37.682 17.022 37.004 17.022 36.166V8.14C17.022 5.854 18.896 4 21.208 4Z" fill="url(#paint0_linear_3107_1237)"/>
3
+ <defs>
4
+ <linearGradient id="paint0_linear_3107_1237" x1="0" y1="24.028" x2="48.088" y2="24.028" gradientUnits="userSpaceOnUse">
5
+ <stop stop-color="#E2167E"/>
6
+ <stop offset="1" stop-color="#FE603C"/>
7
+ </linearGradient>
8
+ </defs>
9
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none">
2
+ <rect width="48" height="48" rx="24" fill="#16191E"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7.57811 31.3729L21.8866 35.2005C21.8673 36.2177 21.8973 37.2353 21.9766 38.2497L30.9105 40.6389C28.2608 41.7325 25.388 42.1773 22.5316 41.9363L22.2616 41.9123L22.1956 41.9063L22.0696 41.8928L21.9286 41.8778C21.85 41.8683 21.7715 41.8583 21.6931 41.8478L21.5326 41.8268L21.3676 41.8028C21.2072 41.7795 21.0472 41.754 20.8876 41.7263L20.8246 41.7143L20.7121 41.6948L20.5516 41.6648L20.4466 41.6423L20.3071 41.6138L20.1946 41.5898L20.0521 41.5598L19.9066 41.5253L19.7656 41.4923L19.6636 41.4668L19.5316 41.4338L19.3966 41.3978L19.2541 41.3603L19.1311 41.3258L18.9676 41.2808L18.8746 41.2508L18.7486 41.2133L18.6091 41.1713L18.4516 41.1204L18.3646 41.0919L18.2446 41.0529L18.1096 41.0064L18.0106 40.9704C17.9885 40.963 17.9665 40.9555 17.9446 40.9479L17.8426 40.9104L17.6911 40.8549L17.6056 40.8219L17.4856 40.7769L17.3551 40.7244L17.2231 40.6719L17.1046 40.6239L16.9621 40.5639L16.8676 40.5219L16.7731 40.4814C16.7525 40.4725 16.732 40.4635 16.7116 40.4544L16.6126 40.4094L16.4581 40.3389L16.3801 40.3029L16.2361 40.2339L16.1431 40.189L16.0171 40.129L15.8881 40.063L15.7486 39.9925L15.6706 39.952L15.5161 39.8695L15.4306 39.8245L15.3436 39.7765C15.3205 39.7636 15.2975 39.7506 15.2746 39.7375L15.1336 39.658L15.0436 39.607L14.9671 39.562L14.8591 39.5005L14.7361 39.4255L14.5966 39.3415L14.5186 39.2935L14.3926 39.2141L14.3011 39.1556L14.1826 39.0806L14.0776 39.0101L13.9981 38.9576C13.971 38.9397 13.944 38.9217 13.9171 38.9036L13.8511 38.8586L13.7851 38.8136C13.765 38.7997 13.745 38.7857 13.7251 38.7716L13.6396 38.7116L13.5256 38.6306L13.4221 38.5556L13.3111 38.4746L13.2271 38.4116L13.1131 38.3261L12.9991 38.2377L12.8701 38.1372L12.8026 38.0847L12.7066 38.0067L12.5956 37.9167L12.4621 37.8072L12.3931 37.7487L12.3241 37.6902C12.3025 37.6718 12.281 37.6533 12.2596 37.6347L12.1921 37.5747L12.1006 37.4952L11.9956 37.4022L11.8936 37.3122L11.8006 37.2253L11.7001 37.1323L11.6206 37.0573L11.4886 36.9313C11.4388 36.8831 11.3893 36.8346 11.3401 36.7858L11.2966 36.7438L11.2351 36.6808L11.1316 36.5758L11.0566 36.4993L10.9816 36.4198C10.8959 36.332 10.8119 36.2424 10.7296 36.1514L10.6096 36.0194L10.5166 35.9144L10.4101 35.7944L10.3471 35.7209L10.2676 35.6279L10.1806 35.5259L10.1116 35.4419C10.098 35.4255 10.0845 35.409 10.0711 35.3924L10.0036 35.31L9.9046 35.187L9.8431 35.109L9.7681 35.013L9.7381 34.9755C8.87983 33.8631 8.15489 32.654 7.57811 31.3729ZM6.04811 22.6828L23.0776 27.2378C22.7925 28.2307 22.5577 29.2374 22.3741 30.254L38.5995 34.5945C37.7934 35.6981 36.865 36.7069 35.832 37.6017L6.98561 29.8835L6.96161 29.8145L6.90911 29.6585C6.88359 29.5822 6.85859 29.5057 6.83411 29.4291L6.82361 29.3946C6.70815 29.0276 6.6046 28.6569 6.51311 28.2832L6.46811 28.0942L6.44111 27.9742L6.40961 27.8287L6.38261 27.7072L6.35561 27.5723L6.33011 27.4463L6.30311 27.3053C6.26411 27.0938 6.22811 26.8808 6.19661 26.6664L6.17111 26.4894L6.15461 26.3649L6.13511 26.2119C6.12507 26.1315 6.11557 26.051 6.10661 25.9704L6.09911 25.8999C5.98704 24.8312 5.96997 23.7546 6.04811 22.6828ZM8.4376 14.9586L26.3595 19.7521C25.8076 20.6595 25.3021 21.5984 24.8446 22.5643L41.787 27.0968C41.574 28.3267 41.235 29.5146 40.785 30.6439L23.4601 26.0094L6.18611 21.3899L6.20861 21.2399L6.22061 21.1664L6.23561 21.0659L6.25811 20.9354L6.28511 20.7885C6.32411 20.5665 6.36911 20.346 6.41711 20.1255L6.45911 19.9396L6.48911 19.8121L6.52511 19.6666C6.55811 19.5316 6.59261 19.3966 6.63011 19.2646L6.67211 19.1116L6.70661 18.9872L6.75161 18.8372L6.78911 18.7142L6.83411 18.5702L6.87311 18.4472L6.91961 18.3047C7.30804 17.1397 7.81573 16.0178 8.4346 14.9571L8.4376 14.9586ZM15.1006 8.35926L32.028 12.8858C31.1348 13.6965 30.2893 14.5583 29.496 15.467L41.2305 18.6062C41.631 19.8841 41.8935 21.2219 42 22.6033L9.1591 13.8202L9.2266 13.7227L9.2671 13.6627L9.3271 13.5802L9.3961 13.4827L9.4786 13.3687L9.5596 13.2607L9.6556 13.1318L9.7306 13.0343L9.8161 12.9248L9.8986 12.8198L9.9886 12.7088L10.0711 12.6053L10.1686 12.4898L10.2496 12.3908L10.3486 12.2753L10.4281 12.1854L10.5361 12.0624L10.6156 11.9724L10.7161 11.8614L10.7971 11.7744L10.9066 11.6574L10.9936 11.5674L11.0881 11.4669L11.3401 11.212L11.4901 11.065L11.5786 10.981L11.6926 10.8745C12.7264 9.90579 13.8702 9.06161 15.1006 8.35926ZM24.0256 6.0015H24.1711L24.2941 6.003L24.3976 6.0045L24.4786 6.0075L24.5806 6.0105L24.6496 6.012L24.7636 6.0165L24.8341 6.0195L24.9241 6.024L25.0051 6.027L25.1356 6.0345L25.2931 6.045L25.5091 6.06149L25.6411 6.07199L25.707 6.07799L25.8226 6.08999L25.9455 6.10199L26.016 6.10949L26.169 6.12749L26.244 6.13649L26.406 6.15748L26.5275 6.17248L26.5905 6.18148L26.688 6.19648L26.9985 6.24447L27.1035 6.26247L27.201 6.27897L27.411 6.31797L27.549 6.34496L27.714 6.37796L27.783 6.39296L27.8955 6.41696L27.957 6.43196L28.05 6.45145L28.113 6.46645L28.2105 6.48895L28.284 6.50695L28.3905 6.53244L28.5345 6.56844L28.7025 6.61344L28.872 6.65843L29.0415 6.70643L29.1165 6.72892L29.2215 6.75892L29.3385 6.79492L29.448 6.82941L29.523 6.85341L29.598 6.87741L29.712 6.91491L29.8605 6.9644L30.0135 7.01839L30.0855 7.04389L30.1815 7.07839L30.321 7.12938L30.486 7.19088L30.66 7.25837L30.81 7.31836L30.8805 7.34836L30.9705 7.38436L31.032 7.41135L31.1265 7.45035L31.1865 7.47735L31.272 7.51484L31.437 7.58684L31.587 7.65583L31.698 7.70832L31.8105 7.76232L31.9005 7.80431L32.0385 7.87331L32.175 7.9408L32.328 8.01879L32.4075 8.06079L32.481 8.09978L32.55 8.13578L32.64 8.18527L32.7015 8.21827L32.7795 8.26177L32.9115 8.33676L33.0705 8.42675L33.201 8.50324L33.2865 8.55423L33.366 8.60223L33.51 8.69072L33.642 8.77321L33.789 8.8662L33.843 8.9022L33.939 8.96369L34.065 9.04768L34.125 9.08818L34.218 9.15117L34.311 9.21567L34.3455 9.24116C34.4265 9.29666 34.5075 9.35365 34.587 9.41215L34.7115 9.50214L34.809 9.57413L34.893 9.63862L35.022 9.73611L35.145 9.8321L35.205 9.8771L35.28 9.93859L35.409 10.0421L35.5275 10.1396L35.655 10.2461C36.723 11.146 37.6845 12.1704 38.5185 13.2922L16.8331 7.49235L16.9261 7.45185L17.0236 7.40985L17.1451 7.35886L17.2741 7.30636C17.4436 7.23887 17.6146 7.17138 17.7856 7.10988L17.9296 7.05739L18.0691 7.0079L18.1951 6.9629L18.3391 6.9164C18.4696 6.87141 18.6031 6.82941 18.7351 6.78892L18.8716 6.74842L19.0006 6.71093L19.1536 6.66593L19.2811 6.63143L19.4311 6.59244L19.5601 6.55644L19.6951 6.52195L19.8316 6.48895L19.9741 6.45595L20.1091 6.42596L20.2561 6.39446L20.3926 6.36446L20.5351 6.33746L20.6731 6.31047L20.8231 6.28347L20.9596 6.25947L21.1066 6.23398L21.2446 6.21298L21.3901 6.19048L21.5281 6.17098L21.6811 6.15148L21.8176 6.13349L21.9751 6.11549L22.1101 6.10049L22.2676 6.08549C22.4071 6.07049 22.5466 6.05849 22.6876 6.04949L22.8466 6.0375L22.9816 6.03L23.1466 6.021L23.2861 6.015L23.4361 6.009L23.5816 6.006L23.7301 6.003L24.0256 6V6.0015Z" fill="white"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg fill="#000000" viewBox="-2 -2 28 28" role="img" xmlns="http://www.w3.org/2000/svg">
3
+ <circle cx="12" cy="12" r="14" fill="white" />
4
+ <path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/>
5
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true" class="" focusable="false" style="fill: currentcolor; height: 28px; width: 28px;"><path d="m3.005 8.858 8.783 12.544h3.904L6.908 8.858zM6.905 15.825 3 21.402h3.907l1.951-2.788zM16.585 2l-6.75 9.64 1.953 2.79L20.492 2zM17.292 7.965v13.437h3.2V3.395z"></path></svg>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
2
+ <svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg"><title>Xiaomi icon</title><path d="M19.96 20a.32.32 0 0 1-.32-.32V4.32a.32.32 0 0 1 .32-.32h3.71a.32.32 0 0 1 .33.32v15.36a.32.32 0 0 1-.33.32zm-6.22 0s-.3-.09-.3-.32v-9.43A2.18 2.18 0 0 0 11.24 8H4.3c-.4 0-.3.3-.3.3v11.38c0 .27-.3.32-.3.32H.33a.32.32 0 0 1-.33-.32V4.32A.32.32 0 0 1 .33 4h12.86a4.28 4.28 0 0 1 4.25 4.27l.01 11.41a.32.32 0 0 1-.32.32zm-6.9 0a.3.3 0 0 1-.3-.3v-9a.3.3 0 0 1 .3-.3h3.77a.3.3 0 0 1 .29.3v9a.3.3 0 0 1-.3.3z"/></svg>
@@ -0,0 +1,219 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 25.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{opacity:0.3;fill:#E2E4E7;}
7
+ .st1{opacity:0.8;fill:#E2E4E7;stroke:#FFFFFF;stroke-width:5;stroke-miterlimit:10;}
8
+ .st2{fill:url(#SVGID_1_);}
9
+ .st3{fill:none;stroke:#E0E4E9;stroke-width:0.25;stroke-miterlimit:10;}
10
+ .st4{fill:none;}
11
+ .st5{fill:#9DA1A5;}
12
+ .st6{fill-rule:evenodd;clip-rule:evenodd;fill:none;}
13
+ .st7{fill-rule:evenodd;clip-rule:evenodd;fill:#DFE2E7;}
14
+ .st8{fill-rule:evenodd;clip-rule:evenodd;fill:#CDD4DA;}
15
+ .st9{fill-rule:evenodd;clip-rule:evenodd;fill:#B3BCC7;}
16
+ .st10{fill-rule:evenodd;clip-rule:evenodd;fill:#9DAAB7;}
17
+ .st11{fill-rule:evenodd;clip-rule:evenodd;fill:#8698A8;}
18
+ .st12{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_2_);}
19
+ .st13{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_3_);}
20
+ .st14{fill:#1F63EC;}
21
+ .st15{fill:#2D2D2D;}
22
+ .st16{fill:none;stroke:#E0E4E9;stroke-width:0.5;stroke-miterlimit:10;}
23
+ .st17{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_4_);}
24
+ .st18{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_5_);}
25
+ .st19{fill:none;stroke:#677380;stroke-width:0.5;stroke-miterlimit:10;}
26
+ .st20{fill:none;stroke:url(#SVGID_6_);stroke-width:2;stroke-miterlimit:10;}
27
+ .st21{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_7_);}
28
+ .st22{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_8_);}
29
+ .st23{fill:#FFFFFF;}
30
+ .st24{fill-rule:evenodd;clip-rule:evenodd;fill:#2D2D2D;}
31
+ .st25{clip-path:url(#SVGID_10_);}
32
+ .st26{clip-path:url(#SVGID_12_);}
33
+ .st27{fill:url(#SVGID_13_);}
34
+ .st28{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_14_);}
35
+ .st29{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_15_);}
36
+ .st30{clip-path:url(#SVGID_17_);}
37
+ .st31{clip-path:url(#SVGID_19_);}
38
+ .st32{fill:url(#SVGID_20_);}
39
+ .st33{fill:none;stroke:url(#SVGID_21_);stroke-width:2;stroke-miterlimit:10;}
40
+ .st34{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_22_);}
41
+ .st35{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_23_);}
42
+ .st36{clip-path:url(#SVGID_25_);}
43
+ .st37{clip-path:url(#SVGID_27_);}
44
+ .st38{fill:url(#SVGID_28_);}
45
+ .st39{clip-path:url(#SVGID_30_);}
46
+ .st40{clip-path:url(#SVGID_32_);}
47
+ .st41{fill:url(#SVGID_33_);}
48
+ .st42{fill-rule:evenodd;clip-rule:evenodd;fill:#126EF6;}
49
+ .st43{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
50
+ .st44{clip-path:url(#SVGID_35_);}
51
+ .st45{clip-path:url(#SVGID_37_);}
52
+ .st46{fill:url(#SVGID_38_);}
53
+ .st47{fill-rule:evenodd;clip-rule:evenodd;fill:#9DA1A5;}
54
+ .st48{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_39_);}
55
+ .st49{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_40_);}
56
+ .st50{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_41_);}
57
+ .st51{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_42_);}
58
+ .st52{fill:none;stroke:url(#SVGID_43_);stroke-width:2;stroke-miterlimit:10;}
59
+ .st53{fill-rule:evenodd;clip-rule:evenodd;fill:none;stroke:#E0E4E9;stroke-width:0.5;stroke-miterlimit:10;}
60
+ .st54{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_44_);}
61
+ .st55{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_45_);}
62
+ .st56{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_46_);}
63
+ .st57{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_47_);}
64
+ .st58{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_48_);}
65
+ .st59{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_49_);}
66
+ .st60{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_50_);}
67
+ .st61{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_51_);}
68
+ .st62{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_52_);}
69
+ .st63{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_53_);}
70
+ .st64{clip-path:url(#SVGID_55_);}
71
+ .st65{clip-path:url(#SVGID_57_);}
72
+ .st66{fill:url(#SVGID_58_);}
73
+ .st67{clip-path:url(#SVGID_60_);}
74
+ .st68{clip-path:url(#SVGID_62_);}
75
+ .st69{fill:url(#SVGID_63_);}
76
+ .st70{fill:none;stroke:url(#SVGID_64_);stroke-width:2;stroke-miterlimit:10;}
77
+ .st71{clip-path:url(#SVGID_66_);}
78
+ .st72{clip-path:url(#SVGID_68_);}
79
+ .st73{fill:url(#SVGID_69_);}
80
+ .st74{clip-path:url(#SVGID_71_);}
81
+ .st75{clip-path:url(#SVGID_73_);}
82
+ .st76{fill:url(#SVGID_74_);}
83
+ .st77{clip-path:url(#SVGID_76_);}
84
+ .st78{clip-path:url(#SVGID_78_);}
85
+ .st79{fill:url(#SVGID_79_);}
86
+ .st80{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_80_);}
87
+ .st81{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_81_);}
88
+ .st82{clip-path:url(#SVGID_83_);}
89
+ .st83{clip-path:url(#SVGID_85_);}
90
+ .st84{fill:url(#SVGID_86_);}
91
+ .st85{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_87_);}
92
+ .st86{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_88_);}
93
+ .st87{clip-path:url(#SVGID_90_);}
94
+ .st88{clip-path:url(#SVGID_92_);}
95
+ .st89{fill:url(#SVGID_93_);}
96
+ .st90{fill:none;stroke:url(#SVGID_94_);stroke-width:2;stroke-miterlimit:10;}
97
+ .st91{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_95_);}
98
+ .st92{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_96_);}
99
+ .st93{clip-path:url(#SVGID_98_);}
100
+ .st94{clip-path:url(#SVGID_100_);}
101
+ .st95{fill:url(#SVGID_101_);}
102
+ .st96{clip-path:url(#SVGID_103_);}
103
+ .st97{clip-path:url(#SVGID_105_);}
104
+ .st98{fill:url(#SVGID_106_);}
105
+ .st99{clip-path:url(#SVGID_108_);}
106
+ .st100{clip-path:url(#SVGID_110_);}
107
+ .st101{fill:url(#SVGID_111_);}
108
+ .st102{fill:#FFFFFF;stroke:#B3BCC7;stroke-width:0.275;stroke-miterlimit:10;}
109
+ .st103{clip-path:url(#SVGID_113_);}
110
+ .st104{fill:#FDD138;}
111
+ .st105{fill:#FCA62F;}
112
+ .st106{fill:#FB7927;}
113
+ .st107{fill:#F44B22;}
114
+ .st108{fill:#D81915;}
115
+ .st109{fill:#2D2D2D;stroke:#FFFFFF;stroke-width:0.3354;stroke-miterlimit:10;}
116
+ .st110{fill:none;stroke:#65727F;stroke-width:2;stroke-miterlimit:10;}
117
+ .st111{fill:none;stroke:#65727F;stroke-width:0.75;stroke-miterlimit:10;}
118
+ .st112{fill:url(#SVGID_114_);}
119
+ .st113{fill:#D06C50;}
120
+ .st114{fill:#2D2D2D;stroke:#B3BCC7;stroke-width:0.275;stroke-miterlimit:10;}
121
+ .st115{opacity:0.2;}
122
+ .st116{fill:none;stroke:#677380;stroke-width:0.3564;stroke-miterlimit:10;}
123
+ .st117{fill:none;stroke:#677380;stroke-width:0.3564;stroke-miterlimit:10;stroke-dasharray:1.0212,1.0212;}
124
+ .st118{fill:none;stroke:#677380;stroke-width:0.3564;stroke-miterlimit:10;stroke-dasharray:1.0205,1.0205;}
125
+ .st119{opacity:0.2;fill:none;}
126
+ .st120{fill:none;stroke:#677380;stroke-width:0.3689;stroke-miterlimit:10;}
127
+ .st121{fill:none;stroke:#677380;stroke-width:0.3689;stroke-miterlimit:10;stroke-dasharray:1.0509,1.0509;}
128
+ .st122{opacity:0.3;fill:#1F63EC;}
129
+ .st123{fill:#2D2D2D;stroke:#FFFFFF;stroke-width:0.3162;stroke-miterlimit:10;}
130
+ .st124{fill:#FFFFFF;stroke:#B3BCC7;stroke-width:0.3162;stroke-miterlimit:10;}
131
+ .st125{clip-path:url(#SVGID_118_);}
132
+ .st126{fill:url(#SVGID_119_);}
133
+ .st127{fill:none;stroke:#DFE2E7;stroke-width:0.75;stroke-miterlimit:10;}
134
+ .st128{fill:#9DA1A5;stroke:#FFFFFF;stroke-miterlimit:10;}
135
+ .st129{fill:url(#SVGID_120_);}
136
+ .st130{fill:none;stroke:#677380;stroke-width:0.75;stroke-miterlimit:10;}
137
+ .st131{opacity:0.4;}
138
+ .st132{clip-path:url(#SVGID_122_);}
139
+ .st133{clip-path:url(#SVGID_124_);}
140
+ .st134{fill:url(#SVGID_125_);}
141
+ .st135{fill:none;stroke:#8392A3;stroke-width:0.35;stroke-miterlimit:10;}
142
+ .st136{fill:none;stroke:#8392A3;stroke-width:0.35;stroke-miterlimit:10;stroke-dasharray:0.9951,0.9951;}
143
+ .st137{fill:none;stroke:#8392A3;stroke-width:0.35;stroke-miterlimit:10;stroke-dasharray:1.004,1.004;}
144
+ .st138{fill:none;stroke:url(#SVGID_126_);stroke-width:1.5;stroke-miterlimit:10;}
145
+ .st139{fill:url(#SVGID_127_);}
146
+ .st140{fill:none;stroke:#DDE0E4;stroke-width:0.35;stroke-miterlimit:10;}
147
+ .st141{fill:#2D2D2D;stroke:#A9B3BE;stroke-width:0.275;stroke-miterlimit:10;}
148
+ .st142{fill-rule:evenodd;clip-rule:evenodd;fill:#126EF4;}
149
+ .st143{fill:#FFFFFF;stroke:#B1BAC4;stroke-width:0.275;stroke-miterlimit:10;}
150
+ .st144{fill:#CE6C50;}
151
+ .st145{fill:#5B5B5B;}
152
+ .st146{fill:#8392A3;}
153
+ .st147{fill:none;stroke:url(#SVGID_128_);stroke-width:1.5;stroke-miterlimit:10;}
154
+ .st148{fill:url(#SVGID_129_);}
155
+ .st149{fill:none;stroke:#B5BDC4;stroke-width:0.7;stroke-miterlimit:10;}
156
+ .st150{opacity:0.6;fill:none;stroke:#78838E;stroke-width:0.35;stroke-miterlimit:10;}
157
+ .st151{opacity:0.2;fill:none;stroke:#8392A3;stroke-width:0.35;stroke-miterlimit:10;stroke-dasharray:1,1;}
158
+ .st152{fill:none;stroke:#DDE0E4;stroke-width:0.75;stroke-miterlimit:10;}
159
+ .st153{fill:none;stroke:#8392A3;stroke-width:0.5;stroke-miterlimit:10;}
160
+ .st154{opacity:0.2;fill:none;stroke:#677380;stroke-width:0.3564;stroke-miterlimit:10;stroke-dasharray:1.0182,1.0182;}
161
+ .st155{fill:none;stroke:#DDE0E4;stroke-width:0.765;stroke-miterlimit:10;}
162
+ .st156{fill:url(#SVGID_130_);}
163
+ .st157{fill:url(#SVGID_131_);}
164
+ .st158{fill:#B1BAC4;}
165
+ .st159{fill:#CBD1D8;}
166
+ .st160{fill:#0B1B2B;}
167
+ .st161{fill:#91D119;}
168
+ .st162{opacity:0.7;}
169
+ .st163{fill:#FFFFFF;stroke:#000000;stroke-width:0.4418;stroke-miterlimit:10;}
170
+ .st164{fill:none;stroke:#939CAA;stroke-width:0.2209;stroke-miterlimit:10;}
171
+ .st165{fill:none;stroke:#FFFFFF;stroke-width:3.0924;stroke-miterlimit:10;}
172
+ .st166{fill:url(#SVGID_132_);}
173
+ .st167{fill:none;stroke:url(#SVGID_133_);stroke-width:1.714;stroke-miterlimit:10;}
174
+ .st168{fill:url(#SVGID_134_);}
175
+ .st169{fill:url(#SVGID_135_);}
176
+ .st170{fill:url(#SVGID_136_);}
177
+ .st171{fill:url(#SVGID_137_);}
178
+ .st172{fill:url(#SVGID_138_);}
179
+ .st173{fill:url(#SVGID_139_);}
180
+ .st174{fill:url(#SVGID_140_);}
181
+ .st175{fill:url(#SVGID_141_);}
182
+ .st176{fill:url(#SVGID_142_);}
183
+ .st177{fill:url(#SVGID_143_);}
184
+ .st178{fill:url(#SVGID_144_);}
185
+ .st179{fill:none;stroke:#1F63EC;stroke-width:4;stroke-miterlimit:10;}
186
+ .st180{fill:none;stroke:#0B1B2B;stroke-width:4;stroke-miterlimit:10;}
187
+ .st181{fill:none;stroke:#677380;stroke-width:0.3989;stroke-miterlimit:10;}
188
+ .st182{fill:none;stroke:#677380;stroke-width:0.3989;stroke-miterlimit:10;stroke-dasharray:1.14,1.14;}
189
+ .st183{fill:#257AF1;}
190
+ .st184{opacity:0.3;fill:#FFFFFF;}
191
+ .st185{fill:none;stroke:#98A5B2;stroke-width:4;stroke-miterlimit:10;}
192
+ .st186{fill:none;stroke:#65727F;stroke-width:0.3989;stroke-miterlimit:10;}
193
+ .st187{fill:none;stroke:#65727F;stroke-width:0.3989;stroke-miterlimit:10;stroke-dasharray:1.14,1.14;}
194
+ .st188{fill:none;stroke:#DDDFE4;stroke-width:0.75;stroke-miterlimit:10;}
195
+ .st189{fill:#9A9EA2;}
196
+ .st190{fill-rule:evenodd;clip-rule:evenodd;fill:#3267AC;}
197
+ .st191{fill:#FFFFFF;stroke:#AFB8C3;stroke-width:0.275;stroke-miterlimit:10;}
198
+ .st192{fill:#C5694E;}
199
+ .st193{fill:#8192A2;}
200
+ .st194{fill:#2D2D2D;stroke:#FFFFFF;stroke-width:0.6317;stroke-miterlimit:10;}
201
+ </style>
202
+ <g id="图层_2">
203
+ </g>
204
+ <g id="图层_1">
205
+ <path class="st194" d="M24.51,28.51H5.49c-2.21,0-4-1.79-4-4V5.49c0-2.21,1.79-4,4-4h19.03c2.21,0,4,1.79,4,4v19.03
206
+ C28.51,26.72,26.72,28.51,24.51,28.51z"/>
207
+ <g>
208
+ <g>
209
+ <g>
210
+ <g>
211
+ <path class="st23" d="M15.47,7.1l-1.3,1.85c-0.2,0.29-0.54,0.47-0.9,0.47h-7.1V7.09C6.16,7.1,15.47,7.1,15.47,7.1z"/>
212
+ <polygon class="st23" points="24.3,7.1 13.14,22.91 5.7,22.91 16.86,7.1 "/>
213
+ <path class="st23" d="M14.53,22.91l1.31-1.86c0.2-0.29,0.54-0.47,0.9-0.47h7.09v2.33H14.53z"/>
214
+ </g>
215
+ </g>
216
+ </g>
217
+ </g>
218
+ </g>
219
+ </svg>
@@ -0,0 +1,215 @@
1
+ import fs from 'node:fs/promises'
2
+ import path from 'node:path'
3
+ import * as truth from './benchmark-truth.js'
4
+
5
+ export { truth }
6
+
7
+ export const loadPrompt = async (promptPath) => {
8
+ const absolutePath = path.resolve(promptPath)
9
+ return fs.readFile(absolutePath, 'utf8')
10
+ }
11
+
12
+ export const findCandidateJson = (raw) => {
13
+ if (typeof raw !== 'string') return { candidate: null, extraneous: false }
14
+ const trimmed = raw.trim()
15
+ const fence = /```json\s*([\s\S]*?)```/i.exec(trimmed)
16
+ if (fence && fence[1]) {
17
+ const candidate = fence[1].trim()
18
+ return { candidate, extraneous: trimmed !== fence[0].trim() }
19
+ }
20
+ const start = trimmed.indexOf('{')
21
+ const end = trimmed.lastIndexOf('}')
22
+ if (start !== -1 && end !== -1 && end > start) {
23
+ const candidate = trimmed.slice(start, end + 1).trim()
24
+ return { candidate, extraneous: trimmed !== candidate }
25
+ }
26
+ return { candidate: trimmed, extraneous: false }
27
+ }
28
+
29
+ export const parseJson = (raw) => {
30
+ const { candidate, extraneous } = findCandidateJson(raw)
31
+ if (!candidate) {
32
+ return { ok: false, error: 'no-json-found', extraneous }
33
+ }
34
+ try {
35
+ return { ok: true, value: JSON.parse(candidate), extraneous }
36
+ } catch (err) {
37
+ return { ok: false, error: err.message, extraneous }
38
+ }
39
+ }
40
+
41
+ export const getPath = (object, pathValue) => {
42
+ return pathValue.split('.').reduce((acc, key) => (acc && key in acc ? acc[key] : undefined), object)
43
+ }
44
+
45
+ // --- Correctness scoring ---
46
+
47
+ export const arrayContains = (arr, keyword) => {
48
+ if (!Array.isArray(arr) || arr.length === 0) return false
49
+ const text = arr.map(e => typeof e === 'string' ? e : JSON.stringify(e)).join('\n').toLowerCase()
50
+ return keyword.toLowerCase().split('|').some(k => text.includes(k))
51
+ }
52
+
53
+ export const scoreEntities = (data) => {
54
+ const hits = { people: [], organizations: [], locations: [] }
55
+ const misses = { people: [], organizations: [], locations: [] }
56
+
57
+ for (const name of truth.people) {
58
+ ;(arrayContains(data?.entities?.people, name) ? hits : misses).people.push(name)
59
+ }
60
+ for (const org of truth.organizations) {
61
+ ;(arrayContains(data?.entities?.organizations, org) ? hits : misses).organizations.push(org)
62
+ }
63
+ for (const loc of truth.locations) {
64
+ ;(arrayContains(data?.entities?.locations, loc) ? hits : misses).locations.push(loc)
65
+ }
66
+
67
+ const total = truth.people.length + truth.organizations.length + truth.locations.length
68
+ const hitCount = hits.people.length + hits.organizations.length + hits.locations.length
69
+ return { score: hitCount / total, hits, misses }
70
+ }
71
+
72
+ export const scoreMetrics = (data) => {
73
+ const section = JSON.stringify(data?.metrics_and_numbers || []).toLowerCase()
74
+ const hits = []
75
+ const misses = []
76
+
77
+ for (const metric of truth.metrics) {
78
+ ;(section.includes(metric.match.toLowerCase()) ? hits : misses).push(metric.label)
79
+ }
80
+
81
+ return { score: hits.length / truth.metrics.length, hits, misses }
82
+ }
83
+
84
+ export const scoreContradictions = (data) => {
85
+ const section = JSON.stringify(data?.contradictions || []).toLowerCase()
86
+ const hits = []
87
+ const misses = []
88
+
89
+ for (const c of truth.contradictions) {
90
+ const found = c.match.some(m => section.includes(m.toLowerCase()))
91
+ ;(found ? hits : misses).push(c.label)
92
+ }
93
+
94
+ return { score: hits.length / truth.contradictions.length, hits, misses }
95
+ }
96
+
97
+ export const scoreEnums = (data) => {
98
+ let valid = 0
99
+ let total = 0
100
+ const issues = []
101
+
102
+ for (const [pathValue, allowed] of Object.entries(truth.enums)) {
103
+ total++
104
+ const value = getPath(data, pathValue)
105
+ if (typeof value === 'string' && allowed.includes(value.toLowerCase())) {
106
+ valid++
107
+ } else {
108
+ issues.push({ path: pathValue, value: value ?? null, allowed })
109
+ }
110
+ }
111
+
112
+ return { score: total > 0 ? valid / total : 0, issues }
113
+ }
114
+
115
+ export const scoreAdherence = (parsed) => {
116
+ let score = 0
117
+ const checks = []
118
+
119
+ if (parsed.ok) {
120
+ score += 0.5
121
+ checks.push({ check: 'json-valid', pass: true })
122
+ } else {
123
+ checks.push({ check: 'json-valid', pass: false })
124
+ }
125
+
126
+ if (!parsed.extraneous) {
127
+ score += 0.2
128
+ checks.push({ check: 'no-extraneous', pass: true })
129
+ } else {
130
+ checks.push({ check: 'no-extraneous', pass: false })
131
+ }
132
+
133
+ if (parsed.ok) {
134
+ const present = truth.requiredKeys.filter(k => k in parsed.value)
135
+ const keyScore = present.length / truth.requiredKeys.length
136
+ score += 0.3 * keyScore
137
+ checks.push({ check: 'schema-keys', pass: present.length === truth.requiredKeys.length, present: present.length, total: truth.requiredKeys.length })
138
+ }
139
+
140
+ return { score: Math.min(1, score), checks }
141
+ }
142
+
143
+ export const scoreCorrectness = (parsed) => {
144
+ const adherence = scoreAdherence(parsed)
145
+
146
+ if (!parsed.ok) {
147
+ const zero = { entities: 0, metrics: 0, contradictions: 0, enums: 0, adherence: adherence.score }
148
+ const correctness = Object.entries(truth.weights).reduce((sum, [k, w]) => sum + (zero[k] || 0) * w, 0)
149
+ return { correctness, breakdown: zero, details: { adherence } }
150
+ }
151
+
152
+ const data = parsed.value
153
+ const entities = scoreEntities(data)
154
+ const metrics = scoreMetrics(data)
155
+ const contradictions = scoreContradictions(data)
156
+ const enums = scoreEnums(data)
157
+
158
+ const breakdown = {
159
+ entities: entities.score,
160
+ metrics: metrics.score,
161
+ contradictions: contradictions.score,
162
+ enums: enums.score,
163
+ adherence: adherence.score
164
+ }
165
+
166
+ const correctness = Object.entries(truth.weights).reduce((sum, [k, w]) => sum + (breakdown[k] || 0) * w, 0)
167
+
168
+ return { correctness, breakdown, details: { entities, metrics, contradictions, enums, adherence } }
169
+ }
170
+
171
+ // --- Pricing ---
172
+
173
+ export const computeCost = (tokens, pricing) => {
174
+ if (!pricing) return null
175
+ const input = (tokens.input || 0) / 1_000_000 * pricing.input
176
+ const output = (tokens.output || 0) / 1_000_000 * pricing.output
177
+ const thinking = (tokens.thinking || 0) / 1_000_000 * (pricing.thinking || 0)
178
+ return input + output + thinking
179
+ }
180
+
181
+ // --- Timing helpers ---
182
+
183
+ export const formatNumber = (value) => Number.isFinite(value) ? Number(value.toFixed(3)) : null
184
+
185
+ export const computeTiming = (timestamps = {}) => {
186
+ const toNs = (value) => {
187
+ if (value == null) return null
188
+ if (typeof value === 'bigint') return value
189
+ if (typeof value === 'string' && /^\d+$/.test(value)) return BigInt(value)
190
+ if (Number.isFinite(value)) return BigInt(Math.round(value * 1_000_000))
191
+ return null
192
+ }
193
+
194
+ const startNs = toNs(timestamps.start)
195
+ const firstNs = toNs(timestamps.first)
196
+ const endNs = toNs(timestamps.end)
197
+
198
+ const toMs = (ns) => ns === null ? null : Number(ns) / 1_000_000
199
+
200
+ const start = toMs(startNs)
201
+ const first = toMs(firstNs)
202
+ const end = toMs(endNs)
203
+
204
+ const latencyMs = (start !== null && first !== null && first >= start)
205
+ ? first - start
206
+ : null
207
+ const totalTimeMs = (start !== null && end !== null && end >= start)
208
+ ? end - start
209
+ : null
210
+ const generationMs = (first !== null && end !== null && end >= first)
211
+ ? end - first
212
+ : null
213
+
214
+ return { start, first, end, latencyMs, generationMs, totalTimeMs }
215
+ }
@@ -0,0 +1,68 @@
1
+ // Ground truth for test/benchmark.md — Riverbend Mobility Dossier
2
+ // Each section defines expected items for recall scoring against model output.
3
+
4
+ export const people = [
5
+ 'Serena', 'Omar', 'Elise', 'Raj', 'Della',
6
+ 'Carlene', 'Myles', 'Lena', 'Calvin', 'Farah',
7
+ 'Gio', 'Ron', 'Jayden', 'Lucia', 'Tasha'
8
+ ]
9
+
10
+ export const organizations = [
11
+ 'NST|North Sky Transit',
12
+ 'UrbanLift',
13
+ 'USDOT'
14
+ ]
15
+
16
+ export const locations = [
17
+ 'Riverbend',
18
+ 'Eastmoor',
19
+ 'Pine Hollow',
20
+ 'Hawthorne',
21
+ 'Pier 7',
22
+ 'HarborView|Harbor View'
23
+ ]
24
+
25
+ export const metrics = [
26
+ { match: '480', label: '$480M public budget' },
27
+ { match: '515', label: '$515M bond ceiling' },
28
+ { match: '502', label: '$502M NST bid' },
29
+ { match: '468', label: '$468M UrbanLift bid' },
30
+ { match: '120', label: '$120M contingency fund' },
31
+ { match: '96.5', label: '96.5% rail on-time target' },
32
+ { match: '1.9', label: '1.9 incidents/100k current' },
33
+ { match: '2.6', label: '2.6 rider trust current' },
34
+ { match: '3.4', label: '3.4 rider trust target' },
35
+ { match: '35', label: '$35M stadium pledge' }
36
+ ]
37
+
38
+ export const contradictions = [
39
+ { id: 'budget', match: ['480', '502', '468', '515'], label: 'budget figures conflict' },
40
+ { id: 'hawthorne', match: ['hawthorne', 'Hawthorne'], label: 'Hawthorne stop status' },
41
+ { id: 'fare', match: ['cpi', 'CPI', 'fare'], label: 'fare policy CPI vs CPI+1.2%' },
42
+ { id: 'mttr', match: ['mttr', 'MTTR', 'repair', '40', '62'], label: 'MTTR values spread' },
43
+ { id: 'safety', match: ['0.8', 'misquot'], label: 'safety target 1.2 vs 0.8 misquote' },
44
+ { id: 'harborline-cost', match: ['210', '260'], label: 'HarborLine cost $210M vs $260M' },
45
+ { id: 'inflation', match: ['inflation', '3.1', '2.6%', '4.4', '3.7'], label: 'inflation assumptions' }
46
+ ]
47
+
48
+ export const enums = {
49
+ 'summary.tone': ['neutral', 'optimistic', 'pessimistic', 'conflicted'],
50
+ 'classifications.sentiment_toward_project': ['positive', 'mixed', 'negative'],
51
+ 'classifications.risk_level': ['low', 'medium', 'high'],
52
+ 'classifications.financial_risk': ['low', 'medium', 'high'],
53
+ 'classifications.data_sensitivity': ['low', 'medium', 'high']
54
+ }
55
+
56
+ export const requiredKeys = [
57
+ 'version', 'summary', 'timeline', 'entities', 'classifications',
58
+ 'metrics_and_numbers', 'issues', 'action_items', 'contradictions',
59
+ 'verification_notes'
60
+ ]
61
+
62
+ export const weights = {
63
+ entities: 0.20,
64
+ metrics: 0.25,
65
+ contradictions: 0.25,
66
+ enums: 0.10,
67
+ adherence: 0.20
68
+ }
@@ -0,0 +1,76 @@
1
+ import { createHash } from 'crypto'
2
+ import { join } from 'path'
3
+ import { readFile, writeFile, mkdir, stat } from 'fs/promises'
4
+ import { existsSync } from 'fs'
5
+ import envPaths from 'env-paths'
6
+ import { silent } from './logger.js'
7
+
8
+ export const CACHE_DIR = envPaths('mohdel', { suffix: null }).cache
9
+ export const FILE_CACHE_PATH = join(CACHE_DIR, 'uploaded-files.json')
10
+
11
+ const ensureCacheDir = async () => {
12
+ if (!existsSync(CACHE_DIR)) {
13
+ await mkdir(CACHE_DIR, { recursive: true })
14
+ }
15
+ }
16
+
17
+ const createFileHash = async (filePath) => {
18
+ const data = await readFile(filePath)
19
+ const stats = await stat(filePath)
20
+ const hash = createHash('sha256')
21
+ hash.update(data)
22
+ hash.update(filePath)
23
+ hash.update(stats.mtime.toISOString())
24
+ return hash.digest('hex')
25
+ }
26
+
27
+ export const loadFileCache = async (logger = silent) => {
28
+ try {
29
+ await ensureCacheDir()
30
+ if (!existsSync(FILE_CACHE_PATH)) {
31
+ return {}
32
+ }
33
+ const content = await readFile(FILE_CACHE_PATH, 'utf8')
34
+ return JSON.parse(content)
35
+ } catch (err) {
36
+ logger.warn({ err }, '[mohdel:cache] failed to load file cache')
37
+ return {}
38
+ }
39
+ }
40
+
41
+ export const saveFileCache = async (cache, logger = silent) => {
42
+ try {
43
+ await ensureCacheDir()
44
+ await writeFile(FILE_CACHE_PATH, JSON.stringify(cache, null, 2))
45
+ } catch (err) {
46
+ logger.error({ err }, '[mohdel:cache] failed to save file cache')
47
+ }
48
+ }
49
+
50
+ export const getCachedFileData = async (filePath, provider = 'gemini', logger = silent) => {
51
+ try {
52
+ const hash = await createFileHash(filePath)
53
+ const cache = await loadFileCache(logger)
54
+ return cache[`${provider}:${hash}`]
55
+ } catch (err) {
56
+ logger.warn({ err }, '[mohdel:cache] failed to get cached file ID')
57
+ return null
58
+ }
59
+ }
60
+
61
+ export const setCachedFileData = async (filePath, data, provider = 'gemini', logger = silent) => {
62
+ try {
63
+ const hash = await createFileHash(filePath)
64
+ const cache = await loadFileCache(logger)
65
+ cache[`${provider}:${hash}`] = {
66
+ hash,
67
+ data,
68
+ filePath,
69
+ provider,
70
+ cachedAt: new Date().toISOString()
71
+ }
72
+ await saveFileCache(cache, logger)
73
+ } catch (err) {
74
+ logger.error({ err }, '[mohdel:cache] failed to set cached file data')
75
+ }
76
+ }