h2o-wave 1.6.5__py3-none-win_amd64.whl → 1.7.1__py3-none-win_amd64.whl

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.

Potentially problematic release.


This version of h2o-wave might be problematic. Click here for more details.

Files changed (443) hide show
  1. h2o_wave/version.py +1 -1
  2. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/waved.exe +0 -0
  3. h2o_wave-1.7.1.data/data/www/index.html +43 -0
  4. h2o_wave-1.6.5.data/data/www/wave-static/LocalizationProvider-6658772a.js → h2o_wave-1.7.1.data/data/www/wave-static/LocalizationProvider-1cb77f52.js +1 -1
  5. h2o_wave-1.6.5.data/data/www/wave-static/Paper-79a98a93.js → h2o_wave-1.7.1.data/data/www/wave-static/Paper-10516b76.js +1 -1
  6. h2o_wave-1.6.5.data/data/www/wave-static/index-6040664d.js → h2o_wave-1.7.1.data/data/www/wave-static/index-05807ac3.js +1 -1
  7. h2o_wave-1.6.5.data/data/www/wave-static/index-d71a4c1f.js → h2o_wave-1.7.1.data/data/www/wave-static/index-44559820.js +1 -1
  8. h2o_wave-1.6.5.data/data/www/wave-static/index-884970b8.js → h2o_wave-1.7.1.data/data/www/wave-static/index-573b3961.js +1 -1
  9. h2o_wave-1.7.1.data/data/www/wave-static/index-658bc908.js +127 -0
  10. h2o_wave-1.6.5.data/data/www/wave-static/index-a49166c2.js → h2o_wave-1.7.1.data/data/www/wave-static/index-6859a01e.js +1 -1
  11. h2o_wave-1.7.1.data/data/www/wave-static/index-f186e01e.js +1 -0
  12. h2o_wave-1.6.5.data/data/www/wave-static/useThemeProps-5e299c5b.js → h2o_wave-1.7.1.data/data/www/wave-static/useThemeProps-6c68864c.js +1 -1
  13. h2o_wave-1.7.1.data/data/www/wave-static/vega-embed.module-6bc21848.js +191 -0
  14. h2o_wave-1.7.1.data/data/www/wave-static/vega.module-1aca8e51.js +15 -0
  15. {h2o_wave-1.6.5.dist-info → h2o_wave-1.7.1.dist-info}/METADATA +1 -1
  16. h2o_wave-1.7.1.dist-info/RECORD +453 -0
  17. h2o_wave-1.6.5.data/data/www/index.html +0 -34
  18. h2o_wave-1.6.5.data/data/www/wave-static/index-2ddce427.js +0 -121
  19. h2o_wave-1.6.5.data/data/www/wave-static/index-3ad376fa.js +0 -1
  20. h2o_wave-1.6.5.data/data/www/wave-static/vega-embed.module-1c715cb7.js +0 -189
  21. h2o_wave-1.6.5.data/data/www/wave-static/vega.module-bd253997.js +0 -13
  22. h2o_wave-1.6.5.dist-info/RECORD +0 -453
  23. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/project_templates/README.md +0 -0
  24. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/project_templates/chat.py +0 -0
  25. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/project_templates/header.py +0 -0
  26. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/project_templates/header_nav.py +0 -0
  27. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/project_templates/header_sidebar_nav.py +0 -0
  28. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/project_templates/hello_world.py +0 -0
  29. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/project_templates/sidebar_nav.py +0 -0
  30. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/favicon.ico +0 -0
  31. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/logo192.png +0 -0
  32. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/logo512.png +0 -0
  33. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/manifest.json +0 -0
  34. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/robots.txt +0 -0
  35. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/1c-3f7bb63f.js +0 -0
  36. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/1c.js-880a5fb5.js +0 -0
  37. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Black-8b21d5be.woff +0 -0
  38. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Black-fc10113c.woff2 +0 -0
  39. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Bold-3e242080.woff +0 -0
  40. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Bold-c63158ba.woff2 +0 -0
  41. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-ExtraBold-307d9809.woff2 +0 -0
  42. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-ExtraBold-f053602c.woff +0 -0
  43. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-ExtraLight-015dad27.woff +0 -0
  44. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-ExtraLight-b6cd094a.woff2 +0 -0
  45. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Light-36b86832.woff2 +0 -0
  46. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Light-4871aed0.woff +0 -0
  47. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Medium-1b498b95.woff2 +0 -0
  48. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Medium-53deda46.woff +0 -0
  49. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Regular-d612f121.woff2 +0 -0
  50. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Regular-ef1f23c0.woff +0 -0
  51. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-SemiBold-15226129.woff2 +0 -0
  52. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-SemiBold-653fed7a.woff +0 -0
  53. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Thin-77d96c1c.woff2 +0 -0
  54. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/Inter-Thin-e6bced8e.woff +0 -0
  55. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/abnf-13e3d3e9.js +0 -0
  56. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/abnf.js-4710a9b6.js +0 -0
  57. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/accesslog-0333fe45.js +0 -0
  58. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/accesslog.js-c69c4014.js +0 -0
  59. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/actionscript-970abe00.js +0 -0
  60. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/actionscript.js-a23662e0.js +0 -0
  61. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ada-29abd822.js +0 -0
  62. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ada.js-596147e5.js +0 -0
  63. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/angelscript-c4bcdcf1.js +0 -0
  64. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/angelscript.js-b9004b30.js +0 -0
  65. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/apache-69229b81.js +0 -0
  66. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/apache.js-53f92aaa.js +0 -0
  67. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/applescript-18053a85.js +0 -0
  68. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/applescript.js-167660b4.js +0 -0
  69. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/arcade-6075ac5c.js +0 -0
  70. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/arcade.js-d02d2998.js +0 -0
  71. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/arduino-d57cf405.js +0 -0
  72. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/arduino.js-37a85c8f.js +0 -0
  73. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/armasm-1f1daec6.js +0 -0
  74. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/armasm.js-7de2e829.js +0 -0
  75. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/asciidoc-c2ce0198.js +0 -0
  76. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/asciidoc.js-955e0d47.js +0 -0
  77. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/aspectj-65addc65.js +0 -0
  78. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/aspectj.js-de303d21.js +0 -0
  79. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/autohotkey-083cf3c0.js +0 -0
  80. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/autohotkey.js-902453c5.js +0 -0
  81. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/autoit-01458b60.js +0 -0
  82. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/autoit.js-e3487153.js +0 -0
  83. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/avrasm-9c20c591.js +0 -0
  84. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/avrasm.js-9296929c.js +0 -0
  85. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/awk-3a9cdcff.js +0 -0
  86. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/awk.js-d895eb86.js +0 -0
  87. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/axapta-1e6dd9a4.js +0 -0
  88. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/axapta.js-7a94aded.js +0 -0
  89. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/bash-cc88d916.js +0 -0
  90. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/bash.js-aeac230f.js +0 -0
  91. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/basic-ae19ba84.js +0 -0
  92. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/basic.js-5285fc1c.js +0 -0
  93. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/bnf-6d48c389.js +0 -0
  94. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/bnf.js-49945ebf.js +0 -0
  95. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/brainfuck-450234e6.js +0 -0
  96. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/brainfuck.js-3ce3a6cd.js +0 -0
  97. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/c-f46565f0.js +0 -0
  98. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/c.js-e57dbb84.js +0 -0
  99. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/cal-68febb00.js +0 -0
  100. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/cal.js-0c9d24c1.js +0 -0
  101. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/capnproto-42c0b6ff.js +0 -0
  102. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/capnproto.js-f123775c.js +0 -0
  103. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ceylon-7044c346.js +0 -0
  104. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ceylon.js-feb867e3.js +0 -0
  105. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/clean-21378384.js +0 -0
  106. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/clean.js-56633a25.js +0 -0
  107. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/clojure-202ef751.js +0 -0
  108. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/clojure-repl-d5a2be34.js +0 -0
  109. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/clojure-repl.js-0679d9f5.js +0 -0
  110. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/clojure.js-242a2f04.js +0 -0
  111. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/cmake-b4ce297d.js +0 -0
  112. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/cmake.js-7cccedf6.js +0 -0
  113. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/coffeescript-9a445365.js +0 -0
  114. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/coffeescript.js-db28b498.js +0 -0
  115. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/coq-67e06e00.js +0 -0
  116. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/coq.js-bc1dedb0.js +0 -0
  117. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/cos-52897118.js +0 -0
  118. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/cos.js-9f2c4957.js +0 -0
  119. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/cpp-aa04b0db.js +0 -0
  120. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/cpp.js-e637b2f4.js +0 -0
  121. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/crmsh-f2834950.js +0 -0
  122. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/crmsh.js-f8602207.js +0 -0
  123. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/crystal-164453c2.js +0 -0
  124. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/crystal.js-74828bd0.js +0 -0
  125. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/csharp-dda82316.js +0 -0
  126. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/csharp.js-56c58434.js +0 -0
  127. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/csp-b9668226.js +0 -0
  128. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/csp.js-eb7d3a88.js +0 -0
  129. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/css-5d2c9b40.js +0 -0
  130. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/css.js-62b267ee.js +0 -0
  131. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/d-5d21e788.js +0 -0
  132. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/d.js-04aa8683.js +0 -0
  133. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dart-12586384.js +0 -0
  134. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dart.js-c61fbb04.js +0 -0
  135. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/delphi-20c87528.js +0 -0
  136. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/delphi.js-e5cd150c.js +0 -0
  137. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/diff-e6456a67.js +0 -0
  138. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/diff.js-5568e9f4.js +0 -0
  139. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/django-49d52be8.js +0 -0
  140. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/django.js-e38658c2.js +0 -0
  141. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dns-5a205646.js +0 -0
  142. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dns.js-63bf7d1f.js +0 -0
  143. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dockerfile-33bf66d7.js +0 -0
  144. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dockerfile.js-cccb49a0.js +0 -0
  145. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dos-6d5191f9.js +0 -0
  146. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dos.js-15b97873.js +0 -0
  147. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dsconfig-e810963a.js +0 -0
  148. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dsconfig.js-7c0a57b6.js +0 -0
  149. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dts-8c60a07f.js +0 -0
  150. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dts.js-80c29b59.js +0 -0
  151. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dust-82a2434b.js +0 -0
  152. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/dust.js-c265de6d.js +0 -0
  153. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ebnf-c82500bd.js +0 -0
  154. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ebnf.js-7696d4d1.js +0 -0
  155. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/elixir-a3c89d2d.js +0 -0
  156. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/elixir.js-679b8865.js +0 -0
  157. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/elm-b0baa83b.js +0 -0
  158. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/elm.js-065d04eb.js +0 -0
  159. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/erb-5b2c18cb.js +0 -0
  160. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/erb.js-5bf017f1.js +0 -0
  161. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/erlang-92e0ed4f.js +0 -0
  162. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/erlang-repl-4327c962.js +0 -0
  163. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/erlang-repl.js-1e32a7a4.js +0 -0
  164. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/erlang.js-22ea5237.js +0 -0
  165. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/excel-b748334a.js +0 -0
  166. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/excel.js-eacd8da9.js +0 -0
  167. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/fix-2076861f.js +0 -0
  168. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/fix.js-ea8e2c05.js +0 -0
  169. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/flix-d6821016.js +0 -0
  170. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/flix.js-039dc4da.js +0 -0
  171. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/fortran-93288908.js +0 -0
  172. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/fortran.js-e77c10a9.js +0 -0
  173. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/fsharp-004140a7.js +0 -0
  174. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/fsharp.js-5eebd197.js +0 -0
  175. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gams-2364286e.js +0 -0
  176. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gams.js-74a57ad8.js +0 -0
  177. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gauss-526e2980.js +0 -0
  178. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gauss.js-8fef6743.js +0 -0
  179. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gcode-fcf823ff.js +0 -0
  180. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gcode.js-cbfb4164.js +0 -0
  181. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gherkin-7933969a.js +0 -0
  182. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gherkin.js-794fab5c.js +0 -0
  183. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/glsl-1880d3bf.js +0 -0
  184. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/glsl.js-a2ed8800.js +0 -0
  185. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gml-375bdc8f.js +0 -0
  186. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gml.js-cda64410.js +0 -0
  187. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/go-6477af85.js +0 -0
  188. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/go.js-bc860eea.js +0 -0
  189. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/golo-a8b30a3b.js +0 -0
  190. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/golo.js-2e22bcec.js +0 -0
  191. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gradle-d007f0f8.js +0 -0
  192. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/gradle.js-c114b7cd.js +0 -0
  193. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/graphql-0429227f.js +0 -0
  194. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/graphql.js-efb48106.js +0 -0
  195. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/groovy-83606e93.js +0 -0
  196. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/groovy.js-f30f8566.js +0 -0
  197. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/haml-81c61df4.js +0 -0
  198. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/haml.js-3c12d6c6.js +0 -0
  199. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/handlebars-dffd1fe9.js +0 -0
  200. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/handlebars.js-b804f107.js +0 -0
  201. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/haskell-63691c0e.js +0 -0
  202. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/haskell.js-f0611637.js +0 -0
  203. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/haxe-f014280d.js +0 -0
  204. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/haxe.js-efbaab17.js +0 -0
  205. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/hsp-052b1a9a.js +0 -0
  206. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/hsp.js-1904ee6c.js +0 -0
  207. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/http-7fc81321.js +0 -0
  208. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/http.js-3552549b.js +0 -0
  209. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/hy-3c07056d.js +0 -0
  210. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/hy.js-2a8401d6.js +0 -0
  211. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/index-17424b44.js +0 -0
  212. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/index-be05b8a6.css +0 -0
  213. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/inform7-45a494ad.js +0 -0
  214. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/inform7.js-1bb293dc.js +0 -0
  215. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ini-565c1ab6.js +0 -0
  216. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ini.js-4c40a00d.js +0 -0
  217. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/irpf90-eea6e6cc.js +0 -0
  218. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/irpf90.js-dcf62e5f.js +0 -0
  219. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/isbl-7e0cec9a.js +0 -0
  220. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/isbl.js-b30a56d1.js +0 -0
  221. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/java-95ec2edb.js +0 -0
  222. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/java.js-83f5f276.js +0 -0
  223. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/javascript-e0819b20.js +0 -0
  224. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/javascript.js-71712620.js +0 -0
  225. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/jboss-cli-a89c5614.js +0 -0
  226. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/jboss-cli.js-fc4be0ce.js +0 -0
  227. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/json-c6c94b43.js +0 -0
  228. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/json.js-32d1540a.js +0 -0
  229. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/julia-8a3768e7.js +0 -0
  230. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/julia-repl-1542a535.js +0 -0
  231. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/julia-repl.js-07ea0c88.js +0 -0
  232. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/julia.js-7321b26f.js +0 -0
  233. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/kotlin-2060981f.js +0 -0
  234. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/kotlin.js-a422cee0.js +0 -0
  235. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/lasso-f278ccbb.js +0 -0
  236. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/lasso.js-a81c4a10.js +0 -0
  237. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/latex-480bc614.js +0 -0
  238. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/latex.js-7781fa8e.js +0 -0
  239. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ldif-39e7018a.js +0 -0
  240. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ldif.js-ff0be511.js +0 -0
  241. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/leaf-1983c9fd.js +0 -0
  242. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/leaf.js-6051fa44.js +0 -0
  243. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/less-15af99b5.js +0 -0
  244. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/less.js-c864d14d.js +0 -0
  245. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/lisp-47e106f3.js +0 -0
  246. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/lisp.js-5729457c.js +0 -0
  247. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/livecodeserver-a9710535.js +0 -0
  248. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/livecodeserver.js-621c3b9a.js +0 -0
  249. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/livescript-5888934c.js +0 -0
  250. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/livescript.js-911f9c89.js +0 -0
  251. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/llvm-a51ea25c.js +0 -0
  252. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/llvm.js-aec4e151.js +0 -0
  253. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/lsl-babb313c.js +0 -0
  254. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/lsl.js-372a9d2e.js +0 -0
  255. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/lua-33e3bed2.js +0 -0
  256. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/lua.js-a549c4fb.js +0 -0
  257. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/makefile-036c85bd.js +0 -0
  258. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/makefile.js-d981f866.js +0 -0
  259. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/markdown-83c491be.js +0 -0
  260. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/markdown.js-7e400889.js +0 -0
  261. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/markdownCodeSyntaxHighlighting-3b867111.js +0 -0
  262. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mathematica-212cedeb.js +0 -0
  263. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mathematica.js-a9cc13e1.js +0 -0
  264. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/matlab-91514d42.js +0 -0
  265. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/matlab.js-272d0a4b.js +0 -0
  266. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/maxima-ec780f01.js +0 -0
  267. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/maxima.js-8f83fc9b.js +0 -0
  268. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mel-443f3074.js +0 -0
  269. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mel.js-35aaad36.js +0 -0
  270. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mercury-6fa710c7.js +0 -0
  271. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mercury.js-e4a4d463.js +0 -0
  272. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mipsasm-1d35360e.js +0 -0
  273. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mipsasm.js-2b25ec79.js +0 -0
  274. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mizar-bf5d69f1.js +0 -0
  275. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mizar.js-a056f354.js +0 -0
  276. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mojolicious-c56b1162.js +0 -0
  277. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/mojolicious.js-265d3ad9.js +0 -0
  278. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/monkey-bf0d5fb4.js +0 -0
  279. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/monkey.js-0189f1d4.js +0 -0
  280. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/moonscript-b6fa3ab7.js +0 -0
  281. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/moonscript.js-6d6e7d92.js +0 -0
  282. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/n1ql-c980c0d8.js +0 -0
  283. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/n1ql.js-a6e1cdbd.js +0 -0
  284. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/nestedtext-a75f487f.js +0 -0
  285. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/nestedtext.js-58eeb2fd.js +0 -0
  286. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/nginx-500d7783.js +0 -0
  287. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/nginx.js-6e1ff365.js +0 -0
  288. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/nim-8c52ae95.js +0 -0
  289. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/nim.js-8c2ba4ce.js +0 -0
  290. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/nix-8e17d7df.js +0 -0
  291. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/nix.js-1c9e5f0f.js +0 -0
  292. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/node-repl-c351033a.js +0 -0
  293. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/node-repl.js-0c21023a.js +0 -0
  294. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/nsis-9566a130.js +0 -0
  295. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/nsis.js-5bef79d6.js +0 -0
  296. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/objectivec-70d1e37c.js +0 -0
  297. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/objectivec.js-ea458201.js +0 -0
  298. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ocaml-05a8032e.js +0 -0
  299. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ocaml.js-34933407.js +0 -0
  300. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/openscad-724bb5e2.js +0 -0
  301. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/openscad.js-bc588586.js +0 -0
  302. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/oxygene-d0768591.js +0 -0
  303. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/oxygene.js-bddfaf72.js +0 -0
  304. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/parser3-3b7df84a.js +0 -0
  305. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/parser3.js-03917f62.js +0 -0
  306. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/perl-274a0c8e.js +0 -0
  307. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/perl.js-798899d1.js +0 -0
  308. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/pf-647ee253.js +0 -0
  309. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/pf.js-c7f35663.js +0 -0
  310. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/pgsql-67be9c80.js +0 -0
  311. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/pgsql.js-1e15a30d.js +0 -0
  312. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/php-baf23133.js +0 -0
  313. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/php-template-059af3df.js +0 -0
  314. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/php-template.js-25c82e05.js +0 -0
  315. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/php.js-f9c986ec.js +0 -0
  316. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/plaintext-7945c0c0.js +0 -0
  317. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/plaintext.js-89fd8faa.js +0 -0
  318. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/pony-37a85088.js +0 -0
  319. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/pony.js-af4b8cc4.js +0 -0
  320. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/powershell-99ec96b1.js +0 -0
  321. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/powershell.js-3aa375d4.js +0 -0
  322. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/processing-6b513c0b.js +0 -0
  323. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/processing.js-8f9c7b7e.js +0 -0
  324. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/profile-a11e18ed.js +0 -0
  325. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/profile.js-c43affa1.js +0 -0
  326. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/prolog-35f6eaf0.js +0 -0
  327. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/prolog.js-ea1f9010.js +0 -0
  328. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/properties-c15cbd34.js +0 -0
  329. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/properties.js-aab8f4b2.js +0 -0
  330. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/protobuf-96c705d8.js +0 -0
  331. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/protobuf.js-256fb21d.js +0 -0
  332. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/puppet-eaa21a84.js +0 -0
  333. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/puppet.js-526f0f6c.js +0 -0
  334. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/purebasic-b2255610.js +0 -0
  335. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/purebasic.js-88a0aeb0.js +0 -0
  336. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/python-d59bf68c.js +0 -0
  337. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/python-repl-a098ea60.js +0 -0
  338. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/python-repl.js-da97070f.js +0 -0
  339. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/python.js-17816629.js +0 -0
  340. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/q-edbaf565.js +0 -0
  341. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/q.js-64716461.js +0 -0
  342. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/qml-e4a66052.js +0 -0
  343. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/qml.js-256c40c8.js +0 -0
  344. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/r-a77be0e5.js +0 -0
  345. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/r.js-df8e6a0d.js +0 -0
  346. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/reasonml-98659b0a.js +0 -0
  347. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/reasonml.js-d61d5332.js +0 -0
  348. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/rib-e50e8c11.js +0 -0
  349. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/rib.js-771507ef.js +0 -0
  350. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/roboconf-b646a8cd.js +0 -0
  351. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/roboconf.js-e47e2f37.js +0 -0
  352. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/routeros-daea5f39.js +0 -0
  353. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/routeros.js-7028f69c.js +0 -0
  354. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/rsl-02a6a6f6.js +0 -0
  355. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/rsl.js-3b3c4666.js +0 -0
  356. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ruby-e373545c.js +0 -0
  357. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ruby.js-117b6d69.js +0 -0
  358. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ruleslanguage-932a539f.js +0 -0
  359. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/ruleslanguage.js-52f1d5da.js +0 -0
  360. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/rust-e4f5d8be.js +0 -0
  361. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/rust.js-6937e5f3.js +0 -0
  362. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/sas-d4be0f22.js +0 -0
  363. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/sas.js-e9f7f74a.js +0 -0
  364. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/scala-ed6253c7.js +0 -0
  365. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/scala.js-0622a5e6.js +0 -0
  366. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/scheme-090728b4.js +0 -0
  367. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/scheme.js-df719b01.js +0 -0
  368. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/scilab-6742e34e.js +0 -0
  369. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/scilab.js-8c19ac41.js +0 -0
  370. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/scss-17621482.js +0 -0
  371. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/scss.js-effc59ae.js +0 -0
  372. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/shell-c79fdff2.js +0 -0
  373. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/shell.js-31f5a65f.js +0 -0
  374. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/smali-b3932e39.js +0 -0
  375. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/smali.js-6e70e629.js +0 -0
  376. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/smalltalk-a5aaf1af.js +0 -0
  377. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/smalltalk.js-16b69abf.js +0 -0
  378. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/sml-3d2ff45b.js +0 -0
  379. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/sml.js-dca0f19d.js +0 -0
  380. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/sqf-895a1a12.js +0 -0
  381. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/sqf.js-7d395293.js +0 -0
  382. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/sql-6b946051.js +0 -0
  383. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/sql.js-a38b17e7.js +0 -0
  384. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/stan-44ba0bd8.js +0 -0
  385. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/stan.js-5923d3a1.js +0 -0
  386. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/stata-6862641d.js +0 -0
  387. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/stata.js-a8c64684.js +0 -0
  388. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/step21-d469eb04.js +0 -0
  389. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/step21.js-91507b84.js +0 -0
  390. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/stylus-7fe3d2aa.js +0 -0
  391. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/stylus.js-5c46b7d2.js +0 -0
  392. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/subunit-f5d1c72e.js +0 -0
  393. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/subunit.js-6b90d5d9.js +0 -0
  394. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/swift-37aa337f.js +0 -0
  395. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/swift.js-35cc9631.js +0 -0
  396. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/taggerscript-9644bd70.js +0 -0
  397. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/taggerscript.js-3b33b52a.js +0 -0
  398. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/tap-9aff5b1c.js +0 -0
  399. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/tap.js-6c086fe2.js +0 -0
  400. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/tcl-e06ad942.js +0 -0
  401. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/tcl.js-8b627a42.js +0 -0
  402. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/thrift-172e9c7e.js +0 -0
  403. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/thrift.js-d6341b21.js +0 -0
  404. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/timer-4c6100d9.js +0 -0
  405. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/tp-57841279.js +0 -0
  406. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/tp.js-cedf36a8.js +0 -0
  407. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/twig-f96e75c9.js +0 -0
  408. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/twig.js-cf8e8520.js +0 -0
  409. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/typescript-def66f35.js +0 -0
  410. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/typescript.js-32ae264b.js +0 -0
  411. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vala-1a982c40.js +0 -0
  412. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vala.js-db590567.js +0 -0
  413. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vbnet-58370a58.js +0 -0
  414. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vbnet.js-cdd968f7.js +0 -0
  415. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vbscript-cf59c0ae.js +0 -0
  416. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vbscript-html-6fb1969c.js +0 -0
  417. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vbscript-html.js-ee15979a.js +0 -0
  418. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vbscript.js-14980cef.js +0 -0
  419. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/verilog-708e7faf.js +0 -0
  420. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/verilog.js-c895778f.js +0 -0
  421. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vhdl-6fc4a449.js +0 -0
  422. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vhdl.js-04291f57.js +0 -0
  423. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vim-3059209f.js +0 -0
  424. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/vim.js-a486e2f4.js +0 -0
  425. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/wasm-d475c0e5.js +0 -0
  426. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/wasm.js-e4c1cfdb.js +0 -0
  427. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/wren-f93687dd.js +0 -0
  428. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/wren.js-2485cae5.js +0 -0
  429. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/x86asm-774652e0.js +0 -0
  430. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/x86asm.js-b939195a.js +0 -0
  431. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/xl-c097ac75.js +0 -0
  432. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/xl.js-7efd80af.js +0 -0
  433. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/xml-7b0fd495.js +0 -0
  434. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/xml.js-200b702e.js +0 -0
  435. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/xquery-322b0611.js +0 -0
  436. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/xquery.js-83bd2c62.js +0 -0
  437. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/yaml-6a874c12.js +0 -0
  438. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/yaml.js-3a05ad15.js +0 -0
  439. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/zephir-cf2a8bcb.js +0 -0
  440. {h2o_wave-1.6.5.data → h2o_wave-1.7.1.data}/data/www/wave-static/zephir.js-fa8df6f1.js +0 -0
  441. {h2o_wave-1.6.5.dist-info → h2o_wave-1.7.1.dist-info}/WHEEL +0 -0
  442. {h2o_wave-1.6.5.dist-info → h2o_wave-1.7.1.dist-info}/entry_points.txt +0 -0
  443. {h2o_wave-1.6.5.dist-info → h2o_wave-1.7.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,191 @@
1
+ import{g as bs}from"./index-658bc908.js";import{h as pi,i as he,a as B,w as xa,s as Ri,$ as G,b as V,c as Li,d as T,e as ge,l as Xg,W as Vg,f as Yg,m as xs,g as Pi,j as Kg,v as Jg}from"./vega.module-1aca8e51.js";import"./timer-4c6100d9.js";/*!
2
+ * https://github.com/Starcounter-Jack/JSON-Patch
3
+ * (c) 2017-2022 Joachim Wester
4
+ * MIT licensed
5
+ */var Qg=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var s in r)r.hasOwnProperty(s)&&(i[s]=r[s])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),Zg=Object.prototype.hasOwnProperty;function Mo(e,t){return Zg.call(e,t)}function jo(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var i=[];for(var r in e)Mo(e,r)&&i.push(r);return i}function Ve(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function Uo(e){for(var t=0,n=e.length,i;t<n;){if(i=e.charCodeAt(t),i>=48&&i<=57){t++;continue}return!1}return!0}function _n(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function of(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Wo(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(Wo(e[t]))return!0}else if(typeof e=="object"){for(var i=jo(e),r=i.length,s=0;s<r;s++)if(Wo(e[i[s]]))return!0}}return!1}function uc(e,t){var n=[e];for(var i in t){var r=typeof t[i]=="object"?JSON.stringify(t[i],null,2):t[i];typeof r<"u"&&n.push(i+": "+r)}return n.join(`
6
+ `)}var af=function(e){Qg(t,e);function t(n,i,r,s,o){var a=this.constructor,u=e.call(this,uc(n,{name:i,index:r,operation:s,tree:o}))||this;return u.name=i,u.index=r,u.operation=s,u.tree=o,Object.setPrototypeOf(u,a.prototype),u.message=uc(n,{name:i,index:r,operation:s,tree:o}),u}return t}(Error),de=af,eh=Ve,gi={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var i=e[t];return delete e[t],{newDocument:n,removed:i}},replace:function(e,t,n){var i=e[t];return e[t]=this.value,{newDocument:n,removed:i}},move:function(e,t,n){var i=Jr(n,this.path);i&&(i=Ve(i));var r=Rn(n,{op:"remove",path:this.from}).removed;return Rn(n,{op:"add",path:this.path,value:r}),{newDocument:n,removed:i}},copy:function(e,t,n){var i=Jr(n,this.from);return Rn(n,{op:"add",path:this.path,value:Ve(i)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:cr(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},th={add:function(e,t,n){return Uo(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var i=e.splice(t,1);return{newDocument:n,removed:i[0]}},replace:function(e,t,n){var i=e[t];return e[t]=this.value,{newDocument:n,removed:i}},move:gi.move,copy:gi.copy,test:gi.test,_get:gi._get};function Jr(e,t){if(t=="")return e;var n={op:"_get",path:t};return Rn(e,n),n.value}function Rn(e,t,n,i,r,s){if(n===void 0&&(n=!1),i===void 0&&(i=!0),r===void 0&&(r=!0),s===void 0&&(s=0),n&&(typeof n=="function"?n(t,0,e,t.path):Qr(t,0)),t.path===""){var o={newDocument:e};if(t.op==="add")return o.newDocument=t.value,o;if(t.op==="replace")return o.newDocument=t.value,o.removed=e,o;if(t.op==="move"||t.op==="copy")return o.newDocument=Jr(e,t.from),t.op==="move"&&(o.removed=e),o;if(t.op==="test"){if(o.test=cr(e,t.value),o.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return o.newDocument=e,o}else{if(t.op==="remove")return o.removed=e,o.newDocument=null,o;if(t.op==="_get")return t.value=e,o;if(n)throw new de("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,t,e);return o}}else{i||(e=Ve(e));var a=t.path||"",u=a.split("/"),c=e,l=1,f=u.length,d=void 0,p=void 0,g=void 0;for(typeof n=="function"?g=n:g=Qr;;){if(p=u[l],p&&p.indexOf("~")!=-1&&(p=of(p)),r&&(p=="__proto__"||p=="prototype"&&l>0&&u[l-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(c[p]===void 0?d=u.slice(0,l).join("/"):l==f-1&&(d=t.path),d!==void 0&&g(t,0,e,d)),l++,Array.isArray(c)){if(p==="-")p=c.length;else{if(n&&!Uo(p))throw new de("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,t,e);Uo(p)&&(p=~~p)}if(l>=f){if(n&&t.op==="add"&&p>c.length)throw new de("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,t,e);var o=th[t.op].call(t,c,p,e);if(o.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return o}}else if(l>=f){var o=gi[t.op].call(t,c,p,e);if(o.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return o}if(c=c[p],n&&l<f&&(!c||typeof c!="object"))throw new de("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,t,e)}}}function vs(e,t,n,i,r){if(i===void 0&&(i=!0),r===void 0&&(r=!0),n&&!Array.isArray(t))throw new de("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");i||(e=Ve(e));for(var s=new Array(t.length),o=0,a=t.length;o<a;o++)s[o]=Rn(e,t[o],n,!0,r,o),e=s[o].newDocument;return s.newDocument=e,s}function nh(e,t,n){var i=Rn(e,t);if(i.test===!1)throw new de("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return i.newDocument}function Qr(e,t,n,i){if(typeof e!="object"||e===null||Array.isArray(e))throw new de("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(gi[e.op]){if(typeof e.path!="string")throw new de("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new de('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new de("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new de("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&Wo(e.value))throw new de("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var r=e.path.split("/").length,s=i.split("/").length;if(r!==s+1&&r!==s)throw new de("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==i)throw new de("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var o={op:"_get",path:e.from,value:void 0},a=uf([o],n);if(a&&a.name==="OPERATION_PATH_UNRESOLVABLE")throw new de("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new de("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function uf(e,t,n){try{if(!Array.isArray(e))throw new de("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)vs(Ve(t),Ve(e),n||!0);else{n=n||Qr;for(var i=0;i<e.length;i++)n(e[i],i,t,void 0)}}catch(r){if(r instanceof de)return r;throw r}}function cr(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),i=Array.isArray(t),r,s,o;if(n&&i){if(s=e.length,s!=t.length)return!1;for(r=s;r--!==0;)if(!cr(e[r],t[r]))return!1;return!0}if(n!=i)return!1;var a=Object.keys(e);if(s=a.length,s!==Object.keys(t).length)return!1;for(r=s;r--!==0;)if(!t.hasOwnProperty(a[r]))return!1;for(r=s;r--!==0;)if(o=a[r],!cr(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}const ih=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:de,_areEquals:cr,applyOperation:Rn,applyPatch:vs,applyReducer:nh,deepClone:eh,getValueByPointer:Jr,validate:uf,validator:Qr},Symbol.toStringTag,{value:"Module"}));/*!
7
+ * https://github.com/Starcounter-Jack/JSON-Patch
8
+ * (c) 2017-2021 Joachim Wester
9
+ * MIT license
10
+ */var va=new WeakMap,rh=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),sh=function(){function e(t,n){this.callback=t,this.observer=n}return e}();function oh(e){return va.get(e)}function ah(e,t){return e.observers.get(t)}function uh(e,t){e.observers.delete(t.callback)}function ch(e,t){t.unobserve()}function lh(e,t){var n=[],i,r=oh(e);if(!r)r=new rh(e),va.set(e,r);else{var s=ah(r,t);i=s&&s.observer}if(i)return i;if(i={},r.value=Ve(e),t){i.callback=t,i.next=null;var o=function(){Go(i)},a=function(){clearTimeout(i.next),i.next=setTimeout(o)};typeof window<"u"&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}return i.patches=n,i.object=e,i.unobserve=function(){Go(i),clearTimeout(i.next),uh(r,i),typeof window<"u"&&(window.removeEventListener("mouseup",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},r.observers.set(t,new sh(t,i)),i}function Go(e,t){t===void 0&&(t=!1);var n=va.get(e.object);Ea(n.value,e.object,e.patches,"",t),e.patches.length&&vs(n.value,e.patches);var i=e.patches;return i.length>0&&(e.patches=[],e.callback&&e.callback(i)),i}function Ea(e,t,n,i,r){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var s=jo(t),o=jo(e),a=!1,u=o.length-1;u>=0;u--){var c=o[u],l=e[c];if(Mo(t,c)&&!(t[c]===void 0&&l!==void 0&&Array.isArray(t)===!1)){var f=t[c];typeof l=="object"&&l!=null&&typeof f=="object"&&f!=null&&Array.isArray(l)===Array.isArray(f)?Ea(l,f,n,i+"/"+_n(c),r):l!==f&&(r&&n.push({op:"test",path:i+"/"+_n(c),value:Ve(l)}),n.push({op:"replace",path:i+"/"+_n(c),value:Ve(f)}))}else Array.isArray(e)===Array.isArray(t)?(r&&n.push({op:"test",path:i+"/"+_n(c),value:Ve(l)}),n.push({op:"remove",path:i+"/"+_n(c)}),a=!0):(r&&n.push({op:"test",path:i,value:e}),n.push({op:"replace",path:i,value:t}))}if(!(!a&&s.length==o.length))for(var u=0;u<s.length;u++){var c=s[u];!Mo(e,c)&&t[c]!==void 0&&n.push({op:"add",path:i+"/"+_n(c),value:Ve(t[c])})}}}function fh(e,t,n){n===void 0&&(n=!1);var i=[];return Ea(e,t,i,"",n),i}const dh=Object.freeze(Object.defineProperty({__proto__:null,compare:fh,generate:Go,observe:lh,unobserve:ch},Symbol.toStringTag,{value:"Module"}));Object.assign({},ih,dh,{JsonPatchError:af,deepClone:Ve,escapePathComponent:_n,unescapePathComponent:of});var ph=/("(?:[^\\"]|\\.)*")|[:,]/g,gh=function(t,n){var i,r,s;return n=n||{},i=JSON.stringify([1],void 0,n.indent===void 0?2:n.indent).slice(2,-3),r=i===""?1/0:n.maxLength===void 0?80:n.maxLength,s=n.replacer,function o(a,u,c){var l,f,d,p,g,h,m,y,x,$,R,v;if(a&&typeof a.toJSON=="function"&&(a=a.toJSON()),R=JSON.stringify(a,s),R===void 0)return R;if(m=r-u.length-c,R.length<=m&&(x=R.replace(ph,function(N,F){return F||N+" "}),x.length<=m))return x;if(s!=null&&(a=JSON.parse(R),s=void 0),typeof a=="object"&&a!==null){if(y=u+i,d=[],f=0,Array.isArray(a))for($="[",l="]",m=a.length;f<m;f++)d.push(o(a[f],y,f===m-1?0:1)||"null");else for($="{",l="}",h=Object.keys(a),m=h.length;f<m;f++)p=h[f],g=JSON.stringify(p)+": ",v=o(a[p],y,g.length+(f===m-1?0:1)),v!==void 0&&d.push(g+v);if(d.length>0)return[$,i+d.join(`,
11
+ `+y),l].join(`
12
+ `+u)}return R}(t,"",0)};const mo=bs(gh);function hh(e,t,n){let i;t.x2&&(t.x?(n&&e.x>e.x2&&(i=e.x,e.x=e.x2,e.x2=i),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(i=e.y,e.y=e.y2,e.y2=i),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.height||0)/2)}var mh={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},yh={"*":(e,t)=>e*t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,">":(e,t)=>e>t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<<t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},bh={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const xh=Array.prototype.slice,wn=(e,t,n)=>{const i=n?n(t[0]):t[0];return i[e].apply(i,xh.call(t,1))},vh=(e,t,n,i,r,s,o)=>new Date(e,t||0,n??1,i||0,r||0,s||0,o||0);var Eh={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:vh,date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return wn("join",arguments)},indexof:function(){return wn("indexOf",arguments)},lastindexof:function(){return wn("lastIndexOf",arguments)},slice:function(){return wn("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return wn("substring",arguments,String)},split:function(){return wn("split",arguments,String)},replace:function(){return wn("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const Ah=["view","item","group","xy","x","y"],Ho=new Set([Function,eval,setTimeout,setInterval]);typeof setImmediate=="function"&&Ho.add(setImmediate);const Sh={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:n==="datum"?e.datum:n==="event"?e.event:n==="item"?e.item:mh[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,i=e(t.object);n&&(e.memberDepth+=1);const r=e(t.property);if(n&&(e.memberDepth-=1),Ho.has(i[r])){console.error(`Prevented interpretation of member "${r}" which could lead to insecure code execution`);return}return i[r]},CallExpression:(e,t)=>{const n=t.arguments;let i=t.callee.name;return i.startsWith("_")&&(i=i.slice(1)),i==="if"?e(n[0])?e(n[1]):e(n[2]):(e.fn[i]||Eh[i]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>yh[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>bh[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>t.operator==="&&"?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce((n,i)=>{e.memberDepth+=1;const r=e(i.key);return e.memberDepth-=1,Ho.has(e(i.value))?console.error(`Prevented interpretation of property "${r}" which could lead to insecure code execution`):n[r]=e(i.value),n},{})};function Xi(e,t,n,i,r,s){const o=a=>Sh[a.type](o,a);return o.memberDepth=0,o.fn=Object.create(t),o.params=n,o.datum=i,o.event=r,o.item=s,Ah.forEach(a=>o.fn[a]=function(){return r.vega[a](...arguments)}),o(e)}var wh={operator(e,t){const n=t.ast,i=e.functions;return r=>Xi(n,i,r)},parameter(e,t){const n=t.ast,i=e.functions;return(r,s)=>Xi(n,i,s,r)},event(e,t){const n=t.ast,i=e.functions;return r=>Xi(n,i,void 0,void 0,r)},handler(e,t){const n=t.ast,i=e.functions;return(r,s)=>{const o=s.item&&s.item.datum;return Xi(n,i,r,o,s)}},encode(e,t){const{marktype:n,channels:i}=t,r=e.functions,s=n==="group"||n==="image"||n==="rect";return(o,a)=>{const u=o.datum;let c=0,l;for(const f in i)l=Xi(i[f].ast,r,a,u,void 0,o),o[f]!==l&&(o[f]=l,c=1);return n!=="rule"&&hh(o,i,s),c}}};const Ch="vega-lite",Fh='Dominik Moritz, Kanit "Ham" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer',$h="5.14.1",Oh=["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Arvind Satyanarayan (https://arvindsatya.com)","Jeffrey Heer (https://jheer.org)"],Nh="https://vega.github.io/vega-lite/",Th="Vega-Lite is a concise high-level language for interactive visualization.",Dh=["vega","chart","visualization"],_h="build/vega-lite.js",kh="build/vega-lite.min.js",Ih="build/vega-lite.min.js",Rh="build/src/index",Lh="build/src/index.d.ts",Ph={vl2pdf:"./bin/vl2pdf",vl2png:"./bin/vl2png",vl2svg:"./bin/vl2svg",vl2vg:"./bin/vl2vg"},Bh=["bin","build","src","vega-lite*","tsconfig.json"],zh={changelog:"conventional-changelog -p angular -r 2",prebuild:"yarn clean:build",build:"yarn build:only","build:only":"tsc -p tsconfig.build.json && rollup -c","prebuild:examples":"yarn build:only","build:examples":"yarn data && TZ=America/Los_Angeles scripts/build-examples.sh","prebuild:examples-full":"yarn build:only","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"yarn build:jekyll && scripts/generate-toc","build:site":"rollup -c site/rollup.config.mjs","build:jekyll":"pushd site && bundle exec jekyll build -q && popd","build:versions":"scripts/update-version.sh",clean:"yarn clean:build && del-cli 'site/data/*' 'examples/compiled/*.png' && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete","clean:build":"del-cli 'build/*' !build/vega-lite-schema.json",data:"rsync -r node_modules/vega-datasets/data/* site/data",schema:"mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/",renameschema:"scripts/rename-schema.sh",presite:"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh",site:"yarn site:only","site:only":"pushd site && bundle exec jekyll serve -I -l && popd",prettierbase:"prettier '**/*.{md,css,yml}'",format:"eslint . --fix && yarn prettierbase --write",lint:"eslint . && yarn prettierbase --check",jest:"NODE_OPTIONS=--experimental-vm-modules npx jest",test:"yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime","test:cover":"yarn jest --collectCoverage test/","test:inspect":"node --inspect-brk --experimental-vm-modules ./node_modules/.bin/jest --runInBand test","test:runtime":"NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json","test:runtime:generate":"yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime",watch:"tsc -p tsconfig.build.json -w","watch:site":"yarn build:site -w","watch:test":"yarn jest --watch test/","watch:test:runtime":"NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",release:"release-it"},Mh={type:"git",url:"https://github.com/vega/vega-lite.git"},jh="BSD-3-Clause",Uh={url:"https://github.com/vega/vega-lite/issues"},Wh={"@babel/core":"^7.21.8","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/preset-env":"^7.21.5","@babel/preset-typescript":"^7.21.5","@release-it/conventional-changelog":"^7.0.0","@rollup/plugin-alias":"^5.0.0","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.2","@rollup/plugin-terser":"^0.4.1","@types/chai":"^4.3.5","@types/d3":"^7.4.0","@types/jest":"^27.4.1","@types/pako":"^2.0.0","@typescript-eslint/eslint-plugin":"^5.59.5","@typescript-eslint/parser":"^5.59.5",ajv:"^8.12.0","ajv-formats":"^2.1.1",chai:"^4.3.7",cheerio:"^1.0.0-rc.12","conventional-changelog-cli":"^3.0.0",d3:"^7.8.4","del-cli":"^5.0.0",eslint:"^8.40.0","eslint-config-prettier":"^8.8.0","eslint-plugin-jest":"^27.2.1","eslint-plugin-prettier":"^4.2.1","highlight.js":"^11.8.0",jest:"^27.5.1","jest-dev-server":"^6.1.1",mkdirp:"^3.0.1",pako:"^2.1.0",prettier:"^2.8.8",puppeteer:"^15.0.0","release-it":"^16.1.2",rollup:"^3.21.6","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-sourcemaps":"^0.6.3",serve:"^14.2.0",terser:"^5.17.3","ts-jest":"^29.1.0","ts-json-schema-generator":"^1.2.0",typescript:"~4.9.5","vega-cli":"^5.25.0","vega-datasets":"^2.7.0","vega-embed":"^6.22.1","vega-tooltip":"^0.32.0","yaml-front-matter":"^4.1.1"},Gh={"@types/clone":"~2.1.1",clone:"~2.1.2","fast-deep-equal":"~3.1.3","fast-json-stable-stringify":"~2.1.0","json-stringify-pretty-compact":"~3.0.0",tslib:"~2.5.0","vega-event-selector":"~3.0.1","vega-expression":"~5.1.0","vega-util":"~1.17.2",yargs:"~17.7.2"},Hh={vega:"^5.24.0"},qh={node:">=16"},Xh={name:Ch,author:Fh,version:$h,collaborators:Oh,homepage:Nh,description:Th,keywords:Dh,main:_h,unpkg:kh,jsdelivr:Ih,module:Rh,types:Lh,bin:Ph,files:Bh,scripts:zh,repository:Mh,license:jh,bugs:Uh,devDependencies:Wh,dependencies:Gh,peerDependencies:Hh,engines:qh};var cf={exports:{}};(function(e){var t=function(){function n(d,p){return p!=null&&d instanceof p}var i;try{i=Map}catch{i=function(){}}var r;try{r=Set}catch{r=function(){}}var s;try{s=Promise}catch{s=function(){}}function o(d,p,g,h,m){typeof p=="object"&&(g=p.depth,h=p.prototype,m=p.includeNonEnumerable,p=p.circular);var y=[],x=[],$=typeof Buffer<"u";typeof p>"u"&&(p=!0),typeof g>"u"&&(g=1/0);function R(v,N){if(v===null)return null;if(N===0)return v;var F,j;if(typeof v!="object")return v;if(n(v,i))F=new i;else if(n(v,r))F=new r;else if(n(v,s))F=new s(function(L,D){v.then(function(z){L(R(z,N-1))},function(z){D(R(z,N-1))})});else if(o.__isArray(v))F=[];else if(o.__isRegExp(v))F=new RegExp(v.source,f(v)),v.lastIndex&&(F.lastIndex=v.lastIndex);else if(o.__isDate(v))F=new Date(v.getTime());else{if($&&Buffer.isBuffer(v))return Buffer.allocUnsafe?F=Buffer.allocUnsafe(v.length):F=new Buffer(v.length),v.copy(F),F;n(v,Error)?F=Object.create(v):typeof h>"u"?(j=Object.getPrototypeOf(v),F=Object.create(j)):(F=Object.create(h),j=h)}if(p){var J=y.indexOf(v);if(J!=-1)return x[J];y.push(v),x.push(F)}n(v,i)&&v.forEach(function(L,D){var z=R(D,N-1),X=R(L,N-1);F.set(z,X)}),n(v,r)&&v.forEach(function(L){var D=R(L,N-1);F.add(D)});for(var ne in v){var Ce;j&&(Ce=Object.getOwnPropertyDescriptor(j,ne)),!(Ce&&Ce.set==null)&&(F[ne]=R(v[ne],N-1))}if(Object.getOwnPropertySymbols)for(var bt=Object.getOwnPropertySymbols(v),ne=0;ne<bt.length;ne++){var O=bt[ne],w=Object.getOwnPropertyDescriptor(v,O);w&&!w.enumerable&&!m||(F[O]=R(v[O],N-1),w.enumerable||Object.defineProperty(F,O,{enumerable:!1}))}if(m)for(var P=Object.getOwnPropertyNames(v),ne=0;ne<P.length;ne++){var k=P[ne],w=Object.getOwnPropertyDescriptor(v,k);w&&w.enumerable||(F[k]=R(v[k],N-1),Object.defineProperty(F,k,{enumerable:!1}))}return F}return R(d,g)}o.clonePrototype=function(p){if(p===null)return null;var g=function(){};return g.prototype=p,new g};function a(d){return Object.prototype.toString.call(d)}o.__objToStr=a;function u(d){return typeof d=="object"&&a(d)==="[object Date]"}o.__isDate=u;function c(d){return typeof d=="object"&&a(d)==="[object Array]"}o.__isArray=c;function l(d){return typeof d=="object"&&a(d)==="[object RegExp]"}o.__isRegExp=l;function f(d){var p="";return d.global&&(p+="g"),d.ignoreCase&&(p+="i"),d.multiline&&(p+="m"),p}return o.__getRegExpFlags=f,o}();e.exports&&(e.exports=t)})(cf);var Vh=cf.exports;const Yh=bs(Vh);var Kh=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(t)){if(i=t.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),i=s.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;r--!==0;){var o=s[r];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n};const Jh=bs(Kh);var Qh=function(e,t){t||(t={}),typeof t=="function"&&(t={cmp:t});var n=typeof t.cycles=="boolean"?t.cycles:!1,i=t.cmp&&function(s){return function(o){return function(a,u){var c={key:a,value:o[a]},l={key:u,value:o[u]};return s(c,l)}}}(t.cmp),r=[];return function s(o){if(o&&o.toJSON&&typeof o.toJSON=="function"&&(o=o.toJSON()),o!==void 0){if(typeof o=="number")return isFinite(o)?""+o:"null";if(typeof o!="object")return JSON.stringify(o);var a,u;if(Array.isArray(o)){for(u="[",a=0;a<o.length;a++)a&&(u+=","),u+=s(o[a])||"null";return u+"]"}if(o===null)return"null";if(r.indexOf(o)!==-1){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var c=r.push(o)-1,l=Object.keys(o).sort(i&&i(o));for(u="",a=0;a<l.length;a++){var f=l[a],d=s(o[f]);d&&(u&&(u+=","),u+=JSON.stringify(f)+":"+d)}return r.splice(c,1),"{"+u+"}"}}(e)};const Aa=bs(Qh);function Sa(e){return!!e.or}function wa(e){return!!e.and}function Ca(e){return!!e.not}function Yr(e,t){if(Ca(e))Yr(e.not,t);else if(wa(e))for(const n of e.and)Yr(n,t);else if(Sa(e))for(const n of e.or)Yr(n,t);else t(e)}function hi(e,t){return Ca(e)?{not:hi(e.not,t)}:wa(e)?{and:e.and.map(n=>hi(n,t))}:Sa(e)?{or:e.or.map(n=>hi(n,t))}:t(e)}const St=Jh,M=Yh;function lf(e){throw new Error(e)}function Ei(e,t){const n={};for(const i of t)pi(e,i)&&(n[i]=e[i]);return n}function Me(e,t){const n={...e};for(const i of t)delete n[i];return n}Set.prototype.toJSON=function(){return`Set(${[...this].map(e=>Aa(e)).join(",")})`};const se=Aa;function H(e){if(he(e))return e;const t=B(e)?e:Aa(e);if(t.length<250)return t;let n=0;for(let i=0;i<t.length;i++){const r=t.charCodeAt(i);n=(n<<5)-n+r,n=n&n}return n}function qo(e){return e===!1||e===null}function q(e,t){return e.includes(t)}function Mn(e,t){let n=0;for(const[i,r]of e.entries())if(t(r,i,n++))return!0;return!1}function Fa(e,t){let n=0;for(const[i,r]of e.entries())if(!t(r,i,n++))return!1;return!0}function ff(e,...t){for(const n of t)Zh(e,n??{});return e}function Zh(e,t){for(const n of E(t))xa(e,n,t[n],!0)}function wt(e,t){const n=[],i={};let r;for(const s of e)r=t(s),!(r in i)&&(i[r]=1,n.push(s));return n}function em(e,t){const n=E(e),i=E(t);if(n.length!==i.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}function df(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function $a(e,t){for(const n of e)if(t.has(n))return!0;return!1}function Xo(e){const t=new Set;for(const n of e){const r=Ri(n).map((o,a)=>a===0?o:`[${o}]`),s=r.map((o,a)=>r.slice(0,a+1).join(""));for(const o of s)t.add(o)}return t}function Oa(e,t){return e===void 0||t===void 0?!0:$a(Xo(e),Xo(t))}function te(e){return E(e).length===0}const E=Object.keys,Oe=Object.values,un=Object.entries;function lr(e){return e===!0||e===!1}function le(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function rr(e,t){return Ca(e)?`!(${rr(e.not,t)})`:wa(e)?`(${e.and.map(n=>rr(n,t)).join(") && (")})`:Sa(e)?`(${e.or.map(n=>rr(n,t)).join(") || (")})`:t(e)}function Zr(e,t){if(t.length===0)return!0;const n=t.shift();return n in e&&Zr(e[n],t)&&delete e[n],te(e)}function Er(e){return e.charAt(0).toUpperCase()+e.substr(1)}function Na(e,t="datum"){const n=Ri(e),i=[];for(let r=1;r<=n.length;r++){const s=`[${n.slice(0,r).map(G).join("][")}]`;i.push(`${t}${s}`)}return i.join(" && ")}function pf(e,t="datum"){return`${t}[${G(Ri(e).join("."))}]`}function tm(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function Qe(e){return`${Ri(e).map(tm).join("\\.")}`}function jn(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function Ta(e){return`${Ri(e).join(".")}`}function Ai(e){return e?Ri(e).length:0}function me(...e){for(const t of e)if(t!==void 0)return t}let gf=42;function hf(e){const t=++gf;return e?String(e)+t:t}function nm(){gf=42}function mf(e){return yf(e)?e:`__${e}`}function yf(e){return e.startsWith("__")}function fr(e){if(e!==void 0)return(e%360+360)%360}function Es(e){return he(e)?!0:!isNaN(e)&&!isNaN(parseFloat(e))}const Wt="row",Gt="column",As="facet",fe="x",Ae="y",dt="x2",Dt="y2",gn="xOffset",Bi="yOffset",pt="radius",Yt="radius2",et="theta",Kt="theta2",gt="latitude",ht="longitude",mt="latitude2",Ze="longitude2",We="color",_t="fill",kt="stroke",Ge="shape",Jt="size",Zn="angle",Qt="opacity",hn="fillOpacity",mn="strokeOpacity",yn="strokeWidth",bn="strokeDash",Ar="text",Si="order",Sr="detail",Ss="key",Un="tooltip",ws="href",Cs="url",Fs="description",im={x:1,y:1,x2:1,y2:1},bf={theta:1,theta2:1,radius:1,radius2:1};function xf(e){return e in bf}const Da={longitude:1,longitude2:1,latitude:1,latitude2:1};function vf(e){switch(e){case gt:return"y";case mt:return"y2";case ht:return"x";case Ze:return"x2"}}function Ef(e){return e in Da}const rm=E(Da),_a={...im,...bf,...Da,xOffset:1,yOffset:1,color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1};function mi(e){return e===We||e===_t||e===kt}const Af={row:1,column:1,facet:1},Je=E(Af),ka={..._a,...Af},sm=E(ka),{order:PF,detail:BF,tooltip:zF,...om}=ka,{row:MF,column:jF,facet:UF,...am}=om;function um(e){return!!am[e]}function Sf(e){return!!ka[e]}const cm=[dt,Dt,mt,Ze,Kt,Yt];function wf(e){return ei(e)!==e}function ei(e){switch(e){case dt:return fe;case Dt:return Ae;case mt:return gt;case Ze:return ht;case Kt:return et;case Yt:return pt}return e}function cn(e){if(xf(e))switch(e){case et:return"startAngle";case Kt:return"endAngle";case pt:return"outerRadius";case Yt:return"innerRadius"}return e}function It(e){switch(e){case fe:return dt;case Ae:return Dt;case gt:return mt;case ht:return Ze;case et:return Kt;case pt:return Yt}}function He(e){switch(e){case fe:case dt:return"width";case Ae:case Dt:return"height"}}function Cf(e){switch(e){case fe:return"xOffset";case Ae:return"yOffset";case dt:return"x2Offset";case Dt:return"y2Offset";case et:return"thetaOffset";case pt:return"radiusOffset";case Kt:return"theta2Offset";case Yt:return"radius2Offset"}}function Ia(e){switch(e){case fe:return"xOffset";case Ae:return"yOffset"}}function Ff(e){switch(e){case"xOffset":return"x";case"yOffset":return"y"}}const lm=E(_a),{x:WF,y:GF,x2:HF,y2:qF,xOffset:XF,yOffset:VF,latitude:YF,longitude:KF,latitude2:JF,longitude2:QF,theta:ZF,theta2:e$,radius:t$,radius2:n$,...Ra}=_a,fm=E(Ra),La={x:1,y:1},Rt=E(La);function Se(e){return e in La}const Pa={theta:1,radius:1},dm=E(Pa);function $s(e){return e==="width"?fe:Ae}const $f={xOffset:1,yOffset:1};function zi(e){return e in $f}const{text:i$,tooltip:r$,href:s$,url:o$,description:a$,detail:u$,key:c$,order:l$,...Of}=Ra,pm=E(Of);function gm(e){return!!Ra[e]}function hm(e){switch(e){case We:case _t:case kt:case Jt:case Ge:case Qt:case yn:case bn:return!0;case hn:case mn:case Zn:return!1}}const Nf={...La,...Pa,...$f,...Of},Os=E(Nf);function Zt(e){return!!Nf[e]}function mm(e,t){return bm(e)[t]}const Tf={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},{geoshape:f$,...ym}=Tf;function bm(e){switch(e){case We:case _t:case kt:case Fs:case Sr:case Ss:case Un:case ws:case Si:case Qt:case hn:case mn:case yn:case As:case Wt:case Gt:return Tf;case fe:case Ae:case gn:case Bi:case gt:case ht:return ym;case dt:case Dt:case mt:case Ze:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case Jt:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case bn:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case Ge:return{point:"always",geoshape:"always"};case Ar:return{text:"always"};case Zn:return{point:"always",square:"always",text:"always"};case Cs:return{image:"always"};case et:return{text:"always",arc:"always"};case pt:return{text:"always",arc:"always"};case Kt:case Yt:return{arc:"always"}}}function yo(e){switch(e){case fe:case Ae:case et:case pt:case gn:case Bi:case Jt:case Zn:case yn:case Qt:case hn:case mn:case dt:case Dt:case Kt:case Yt:return;case As:case Wt:case Gt:case Ge:case bn:case Ar:case Un:case ws:case Cs:case Fs:return"discrete";case We:case _t:case kt:return"flexible";case gt:case ht:case mt:case Ze:case Sr:case Ss:case Si:return}}const xm={argmax:1,argmin:1,average:1,count:1,distinct:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},vm={count:1,min:1,max:1};function Xt(e){return!!e&&!!e.argmin}function xn(e){return!!e&&!!e.argmax}function Ba(e){return B(e)&&!!xm[e]}const Em=new Set(["count","valid","missing","distinct"]);function Df(e){return B(e)&&Em.has(e)}function Am(e){return B(e)&&q(["min","max"],e)}const Sm=new Set(["count","sum","distinct","valid","missing"]),wm=new Set(["mean","average","median","q1","q3","min","max"]);function _f(e){return Li(e)&&(e=Ms(e,void 0)),"bin"+E(e).map(t=>Ns(e[t])?le(`_${t}_${un(e[t])}`):le(`_${t}_${e[t]}`)).join("")}function oe(e){return e===!0||ti(e)&&!e.binned}function Fe(e){return e==="binned"||ti(e)&&e.binned===!0}function ti(e){return V(e)}function Ns(e){return e==null?void 0:e.param}function cc(e){switch(e){case Wt:case Gt:case Jt:case We:case _t:case kt:case yn:case Qt:case hn:case mn:case Ge:return 6;case bn:return 4;default:return 10}}function wr(e){return!!(e!=null&&e.expr)}function Be(e){const t=E(e||{}),n={};for(const i of t)n[i]=Xe(e[i]);return n}function kf(e){const{anchor:t,frame:n,offset:i,orient:r,angle:s,limit:o,color:a,subtitleColor:u,subtitleFont:c,subtitleFontSize:l,subtitleFontStyle:f,subtitleFontWeight:d,subtitleLineHeight:p,subtitlePadding:g,...h}=e,m={...h,...a?{fill:a}:{}},y={...t?{anchor:t}:{},...n?{frame:n}:{},...i?{offset:i}:{},...r?{orient:r}:{},...s!==void 0?{angle:s}:{},...o!==void 0?{limit:o}:{}},x={...u?{subtitleColor:u}:{},...c?{subtitleFont:c}:{},...l?{subtitleFontSize:l}:{},...f?{subtitleFontStyle:f}:{},...d?{subtitleFontWeight:d}:{},...p?{subtitleLineHeight:p}:{},...g?{subtitlePadding:g}:{}},$=Ei(e,["align","baseline","dx","dy","limit"]);return{titleMarkConfig:m,subtitleMarkConfig:$,nonMarkTitleProperties:y,subtitle:x}}function rn(e){return B(e)||T(e)&&B(e[0])}function I(e){return!!(e!=null&&e.signal)}function vn(e){return!!e.step}function Cm(e){return T(e)?!1:"fields"in e&&!("data"in e)}function Fm(e){return T(e)?!1:"fields"in e&&"data"in e}function Ut(e){return T(e)?!1:"field"in e&&"data"in e}const $m={aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1},Om=E($m),Nm={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},Vo=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function If(e){const t=T(e.condition)?e.condition.map(lc):lc(e.condition);return{...Xe(e),condition:t}}function Xe(e){if(wr(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function lc(e){if(wr(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function ue(e){if(wr(e)){const{expr:t,...n}=e;return{signal:t,...n}}return I(e)?e:e!==void 0?{value:e}:void 0}function Tm(e){return I(e)?e.signal:G(e)}function fc(e){return I(e)?e.signal:G(e.value)}function st(e){return I(e)?e.signal:e==null?null:G(e)}function Dm(e,t,n){for(const i of n){const r=Vt(i,t.markDef,t.config);r!==void 0&&(e[i]=ue(r))}return e}function Rf(e){return[].concat(e.type,e.style??[])}function Q(e,t,n,i={}){const{vgChannel:r,ignoreVgConfig:s}=i;return r&&t[r]!==void 0?t[r]:t[e]!==void 0?t[e]:s&&(!r||r===e)?void 0:Vt(e,t,n,i)}function Vt(e,t,n,{vgChannel:i}={}){return me(i?es(e,t,n.style):void 0,es(e,t,n.style),i?n[t.type][i]:void 0,n[t.type][e],i?n.mark[i]:n.mark[e])}function es(e,t,n){return Lf(e,Rf(t),n)}function Lf(e,t,n){t=ge(t);let i;for(const r of t){const s=n[r];s&&s[e]!==void 0&&(i=s[e])}return i}function Pf(e,t){return ge(e).reduce((n,i)=>(n.field.push(C(i,t)),n.order.push(i.sort??"ascending"),n),{field:[],order:[]})}function Bf(e,t){const n=[...e];return t.forEach(i=>{for(const r of n)if(St(r,i))return;n.push(i)}),n}function zf(e,t){return St(e,t)||!t?e:e?[...ge(e),...ge(t)].join(", "):t}function Mf(e,t){const n=e.value,i=t.value;if(n==null||i===null)return{explicit:e.explicit,value:null};if((rn(n)||I(n))&&(rn(i)||I(i)))return{explicit:e.explicit,value:zf(n,i)};if(rn(n)||I(n))return{explicit:e.explicit,value:n};if(rn(i)||I(i))return{explicit:e.explicit,value:i};if(!rn(n)&&!I(n)&&!rn(i)&&!I(i))return{explicit:e.explicit,value:Bf(n,i)};throw new Error("It should never reach here")}function za(e){return`Invalid specification ${se(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const _m='Autosize "fit" only works for single views and layered views.';function dc(e){return`${e=="width"?"Width":"Height"} "container" only works for single views and layered views.`}function pc(e){const t=e=="width"?"Width":"Height",n=e=="width"?"x":"y";return`${t} "container" only works well with autosize "fit" or "fit-${n}".`}function gc(e){return e?`Dropping "fit-${e}" because spec has discrete ${He(e)}.`:'Dropping "fit" because spec has discrete size.'}function Ma(e){return`Unknown field for ${e}. Cannot calculate view size.`}function hc(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function km(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function Im(e){return`The "nearest" transform is not supported for ${e} marks.`}function jf(e){return`Selection not supported for ${e} yet.`}function Rm(e){return`Cannot find a selection named "${e}".`}const Lm="Scale bindings are currently only supported for scales with unbinned, continuous domains.",Pm="Legend bindings are only supported for selections over an individual field or encoding channel.";function Bm(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}function zm(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}const Mm="The same selection must be used to override scale domains in a layered view.",jm='Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.';function Um(e){return`Unknown repeated value "${e}".`}function mc(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}const Wm="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function Gm(e){return`Unrecognized parse "${e}".`}function yc(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}const Hm="Attempt to add the same child twice.";function qm(e){return`Ignoring an invalid transform: ${se(e)}.`}const Xm='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function bc(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function Vm(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${se(t)} is overridden by a child projection ${se(n)}.`}const Ym="Arc marks uses theta channel rather than angle, replacing angle with theta.";function Km(e){return`${e}Offset dropped because ${e} is continuous`}function Jm(e){return`There is no ${e} encoding. Replacing ${e}Offset encoding as ${e}.`}function Qm(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${se(n)}}.`}function Uf(e){return`Invalid field type "${e}".`}function Zm(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}function e0(e){return`Invalid aggregation operator "${e}".`}function Wf(e,t){const{fill:n,stroke:i}=t;return`Dropping color ${e} as the plot also has ${n&&i?"fill and stroke":n?"fill":"stroke"}.`}function t0(e){return`Position range does not support relative band size for ${e}.`}function Yo(e,t){return`Dropping ${se(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}const n0="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function Ts(e,t,n){return`${e} dropped as it is incompatible with "${t}"${n?` when ${n}`:""}.`}function i0(e){return`${e} encoding has no scale, so specified scale is ignored.`}function r0(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}function s0(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function o0(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function a0(e){return`Facet encoding dropped as ${e.join(" and ")} ${e.length>1?"are":"is"} also specified.`}function bo(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${t==="ordinal"?"order":"magnitude"}.`}function u0(e){return`The ${e} for range marks cannot be an expression`}function c0(e,t){return`Line mark is for continuous lines and thus cannot be used with ${e&&t?"x2 and y2":e?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function l0(e,t){return`Specified orient "${e}" overridden with "${t}".`}function f0(e){return`Cannot use the scale property "${e}" with non-color channel.`}function d0(e){return`Cannot use the relative band size with ${e} scale.`}function p0(e){return`Using unaggregated domain with raw field has no effect (${se(e)}).`}function g0(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function h0(e){return`Unaggregated domain is currently unsupported for log scale (${se(e)}).`}function m0(e){return`Cannot apply size to non-oriented mark "${e}".`}function y0(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}function b0(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}function Gf(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function Hf(e){return`The step for "${e}" is dropped because the ${e==="width"?"x":"y"} is continuous.`}function x0(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${se(n)} and ${se(i)}). Using ${se(n)}.`}function v0(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${se(n)} and ${se(i)}). Using the union of the two domains.`}function E0(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}function A0(e){return`Dropping sort property ${se(e)} as unioned domains only support boolean or op "count", "min", and "max".`}const xc="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",S0="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",w0="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",C0="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";function F0(e){return`Cannot stack "${e}" if there is already "${e}2".`}function $0(e){return`Cannot stack non-linear scale (${e}).`}function O0(e){return`Stacking is applied even though the aggregate function is non-summative ("${e}").`}function ts(e,t){return`Invalid ${e}: ${se(t)}.`}function N0(e){return`Dropping day from datetime ${se(e)} as day cannot be combined with other units.`}function T0(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}function D0(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}function _0(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}function vc(e){return`1D error band does not support ${e}.`}function qf(e){return`Channel ${e} is required for "binned" bin.`}function k0(e){return`Channel ${e} should not be used with "binned" bin.`}function I0(e){return`Domain for ${e} is required for threshold scale.`}globalThis&&globalThis.__classPrivateFieldSet;globalThis&&globalThis.__classPrivateFieldGet;const Xf=Xg(Vg);let wi=Xf;function R0(e){return wi=e,wi}function L0(){return wi=Xf,wi}function A(...e){wi.warn(...e)}function P0(...e){wi.debug(...e)}function ni(e){if(e&&V(e)){for(const t of Ua)if(t in e)return!0}return!1}const Vf=["january","february","march","april","may","june","july","august","september","october","november","december"],B0=Vf.map(e=>e.substr(0,3)),Yf=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],z0=Yf.map(e=>e.substr(0,3));function M0(e){if(Es(e)&&(e=+e),he(e))return e>4&&A(ts("quarter",e)),e-1;throw new Error(ts("quarter",e))}function j0(e){if(Es(e)&&(e=+e),he(e))return e-1;{const t=e.toLowerCase(),n=Vf.indexOf(t);if(n!==-1)return n;const i=t.substr(0,3),r=B0.indexOf(i);if(r!==-1)return r;throw new Error(ts("month",e))}}function U0(e){if(Es(e)&&(e=+e),he(e))return e%7;{const t=e.toLowerCase(),n=Yf.indexOf(t);if(n!==-1)return n;const i=t.substr(0,3),r=z0.indexOf(i);if(r!==-1)return r;throw new Error(ts("day",e))}}function ja(e,t){const n=[];if(t&&e.day!==void 0&&E(e).length>1&&(A(N0(e)),e=M(e),delete e.day),e.year!==void 0?n.push(e.year):n.push(2012),e.month!==void 0){const i=t?j0(e.month):e.month;n.push(i)}else if(e.quarter!==void 0){const i=t?M0(e.quarter):e.quarter;n.push(he(i)?i*3:`${i}*3`)}else n.push(0);if(e.date!==void 0)n.push(e.date);else if(e.day!==void 0){const i=t?U0(e.day):e.day;n.push(he(i)?i+1:`${i}+1`)}else n.push(1);for(const i of["hours","minutes","seconds","milliseconds"]){const r=e[i];n.push(typeof r>"u"?0:r)}return n}function Wn(e){const n=ja(e,!0).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}function W0(e){const n=ja(e,!1).join(", ");return e.utc?`utc(${n})`:`datetime(${n})`}function G0(e){const t=ja(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}const Kf={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},Ua=E(Kf);function H0(e){return!!Kf[e]}function ii(e){return V(e)?e.binned:Jf(e)}function Jf(e){return e&&e.startsWith("binned")}function Wa(e){return e.startsWith("utc")}function q0(e){return e.substring(3)}const X0={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function Ds(e){return Ua.filter(t=>Zf(e,t))}function Qf(e){const t=Ds(e);return t[t.length-1]}function Zf(e,t){const n=e.indexOf(t);return!(n<0||n>0&&t==="seconds"&&e.charAt(n-1)==="i"||e.length>n+3&&t==="day"&&e.charAt(n+3)==="o"||n>0&&t==="year"&&e.charAt(n-1)==="f")}function V0(e,t,{end:n}={end:!1}){const i=Na(t),r=Wa(e)?"utc":"";function s(u){return u==="quarter"?`(${r}quarter(${i})-1)`:`${r}${u}(${i})`}let o;const a={};for(const u of Ua)Zf(e,u)&&(a[u]=s(u),o=u);return n&&(a[o]+="+1"),W0(a)}function ed(e){if(!e)return;const t=Ds(e);return`timeUnitSpecifier(${se(t)}, ${se(X0)})`}function Y0(e,t,n){if(!e)return;const i=ed(e);return`${n||Wa(e)?"utc":"time"}Format(${t}, ${i})`}function Ee(e){if(!e)return;let t;return B(e)?Jf(e)?t={unit:e.substring(6),binned:!0}:t={unit:e}:V(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),Wa(t.unit)&&(t.utc=!0,t.unit=q0(t.unit)),t}function K0(e){const{utc:t,...n}=Ee(e);return n.unit?(t?"utc":"")+E(n).map(i=>le(`${i==="unit"?"":`_${i}_`}${n[i]}`)).join(""):(t?"utc":"")+"timeunit"+E(n).map(i=>le(`_${i}_${n[i]}`)).join("")}function td(e,t=n=>n){const n=Ee(e),i=Qf(n.unit);if(i&&i!=="day"){const r={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:s,part:o}=nd(i,n.step),a={...r,[o]:+r[o]+s};return`${t(Wn(a))} - ${t(Wn(r))}`}}const J0={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function Q0(e){return!!J0[e]}function nd(e,t=1){if(Q0(e))return{part:e,step:t};switch(e){case"day":case"dayofyear":return{part:"date",step:t};case"quarter":return{part:"month",step:t*3};case"week":return{part:"date",step:t*7}}}function Z0(e){return e==null?void 0:e.param}function Ga(e){return!!(e!=null&&e.field)&&e.equal!==void 0}function Ha(e){return!!(e!=null&&e.field)&&e.lt!==void 0}function qa(e){return!!(e!=null&&e.field)&&e.lte!==void 0}function Xa(e){return!!(e!=null&&e.field)&&e.gt!==void 0}function Va(e){return!!(e!=null&&e.field)&&e.gte!==void 0}function Ya(e){if(e!=null&&e.field){if(T(e.range)&&e.range.length===2)return!0;if(I(e.range))return!0}return!1}function Ka(e){return!!(e!=null&&e.field)&&(T(e.oneOf)||T(e.in))}function ey(e){return!!(e!=null&&e.field)&&e.valid!==void 0}function id(e){return Ka(e)||Ga(e)||Ya(e)||Ha(e)||Xa(e)||qa(e)||Va(e)}function xt(e,t){return js(e,{timeUnit:t,wrapTime:!0})}function ty(e,t){return e.map(n=>xt(n,t))}function rd(e,t=!0){const{field:n}=e,i=Ee(e.timeUnit),{unit:r,binned:s}=i||{},o=C(e,{expr:"datum"}),a=r?`time(${s?o:V0(r,n)})`:o;if(Ga(e))return`${a}===${xt(e.equal,r)}`;if(Ha(e)){const u=e.lt;return`${a}<${xt(u,r)}`}else if(Xa(e)){const u=e.gt;return`${a}>${xt(u,r)}`}else if(qa(e)){const u=e.lte;return`${a}<=${xt(u,r)}`}else if(Va(e)){const u=e.gte;return`${a}>=${xt(u,r)}`}else{if(Ka(e))return`indexof([${ty(e.oneOf,r).join(",")}], ${a}) !== -1`;if(ey(e))return Ja(a,e.valid);if(Ya(e)){const{range:u}=e,c=I(u)?{signal:`${u.signal}[0]`}:u[0],l=I(u)?{signal:`${u.signal}[1]`}:u[1];if(c!==null&&l!==null&&t)return"inrange("+a+", ["+xt(c,r)+", "+xt(l,r)+"])";const f=[];return c!==null&&f.push(`${a} >= ${xt(c,r)}`),l!==null&&f.push(`${a} <= ${xt(l,r)}`),f.length>0?f.join(" && "):"true"}}throw new Error(`Invalid field predicate: ${se(e)}`)}function Ja(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function ny(e){return id(e)&&e.timeUnit?{...e,timeUnit:Ee(e.timeUnit)}:e}const Cr={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function iy(e){return e==="quantitative"||e==="temporal"}function sd(e){return e==="ordinal"||e==="nominal"}const Gn=Cr.quantitative,Qa=Cr.ordinal,Ci=Cr.temporal,Za=Cr.nominal,Mi=Cr.geojson;function ry(e){if(e)switch(e=e.toLowerCase(),e){case"q":case Gn:return"quantitative";case"t":case Ci:return"temporal";case"o":case Qa:return"ordinal";case"n":case Za:return"nominal";case Mi:return"geojson"}}const je={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",SYMLOG:"symlog",IDENTITY:"identity",SEQUENTIAL:"sequential",TIME:"time",UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold",BIN_ORDINAL:"bin-ordinal",ORDINAL:"ordinal",POINT:"point",BAND:"band"},Ko={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function sy(e,t){const n=Ko[e],i=Ko[t];return n===i||n==="ordinal-position"&&i==="time"||i==="ordinal-position"&&n==="time"}const oy={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function Ec(e){return oy[e]}const od=new Set(["linear","log","pow","sqrt","symlog"]),ad=new Set([...od,"time","utc"]);function ud(e){return od.has(e)}const cd=new Set(["quantile","quantize","threshold"]),ay=new Set([...ad,...cd,"sequential","identity"]),uy=new Set(["ordinal","bin-ordinal","point","band"]);function we(e){return uy.has(e)}function Ye(e){return ay.has(e)}function ot(e){return ad.has(e)}function Fi(e){return cd.has(e)}const cy={pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0};function ly(e){return!B(e)&&!!e.name}function ld(e){return e==null?void 0:e.param}function fy(e){return e==null?void 0:e.unionWith}function dy(e){return V(e)&&"field"in e}const py={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,domainRaw:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},{type:d$,domain:p$,range:g$,rangeMax:h$,rangeMin:m$,scheme:y$,...gy}=py,hy=E(gy);function Jo(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return ot(e)||e==="band"||e==="point";case"padding":case"rangeMin":case"rangeMax":return ot(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return e==="band";case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return ot(e);case"nice":return ot(e)||e==="quantize"||e==="threshold";case"exponent":return e==="pow";case"base":return e==="log";case"constant":return e==="symlog";case"zero":return Ye(e)&&!q(["log","time","utc","threshold","quantile"],e)}}function fd(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return mi(e)?void 0:f0(t);case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"domainRaw":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}function my(e,t){return q([Qa,Za],t)?e===void 0||we(e):t===Ci?q([je.TIME,je.UTC,void 0],e):t===Gn?ud(e)||Fi(e)||e===void 0:!0}function yy(e,t,n=!1){if(!Zt(e))return!1;switch(e){case fe:case Ae:case gn:case Bi:case et:case pt:return ot(t)||t==="band"?!0:t==="point"?!n:!1;case Jt:case yn:case Qt:case hn:case mn:case Zn:return ot(t)||Fi(t)||q(["band","point","ordinal"],t);case We:case _t:case kt:return t!=="band";case bn:case Ge:return t==="ordinal"||Fi(t)}}const Le={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},dd=Le.arc,_s=Le.area,ks=Le.bar,by=Le.image,Is=Le.line,Rs=Le.point,xy=Le.rect,ns=Le.rule,pd=Le.text,eu=Le.tick,vy=Le.trail,tu=Le.circle,nu=Le.square,gd=Le.geoshape;function En(e){return["line","area","trail"].includes(e)}function iu(e){return["rect","bar","image","arc"].includes(e)}const Ey=new Set(E(Le));function Ot(e){return e.type}const Ay=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],Sy=["fill","fillOpacity"],wy=[...Ay,...Sy],Cy={color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1},Ac=E(Cy),Fy={area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],line:["point"],tick:["bandSize","thickness"]},$y={color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},Oy={mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1},hd=E(Oy);function Hn(e){return e&&e.band!=null}const Ny={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},md=5,Ty={binSpacing:1,continuousBandSize:md,minBandSize:.25,timeUnitBandPosition:.5},Dy={binSpacing:0,continuousBandSize:md,minBandSize:.25,timeUnitBandPosition:.5},_y={thickness:1};function ky(e){return Ot(e)?e.type:e}function ru(e){const{channel:t,channelDef:n,markDef:i,scale:r,config:s}=e,o=ou(e);return S(n)&&!Df(n.aggregate)&&r&&ot(r.get("type"))?Iy({fieldDef:n,channel:t,markDef:i,ref:o,config:s}):o}function Iy({fieldDef:e,channel:t,markDef:n,ref:i,config:r}){return En(n.type)?i:Q("invalid",n,r)===null?[Ry(e,t),i]:i}function Ry(e,t){const n=su(e,!0),r=ei(t)==="y"?{field:{group:"height"}}:{value:0};return{test:n,...r}}function su(e,t=!0){return Ja(B(e)?e:C(e,{expr:"datum"}),!t)}function Ly(e){const{datum:t}=e;return ni(t)?Wn(t):`${se(t)}`}function Ln(e,t,n,i){const r={};if(t&&(r.scale=t),Lt(e)){const{datum:s}=e;ni(s)?r.signal=Wn(s):I(s)?r.signal=s.signal:wr(s)?r.signal=s.expr:r.value=s}else r.field=C(e,n);if(i){const{offset:s,band:o}=i;s&&(r.offset=s),o&&(r.band=o)}return r}function is({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:n,offset:i,startSuffix:r,bandPosition:s=.5}){const o=0<s&&s<1?"datum":void 0,a=C(t,{expr:o,suffix:r}),u=n!==void 0?C(n,{expr:o}):C(t,{suffix:"end",expr:o}),c={};if(s===0||s===1){c.scale=e;const l=s===0?a:u;c.field=l}else{const l=I(s)?`${s.signal} * ${a} + (1-${s.signal}) * ${u}`:`${s} * ${a} + ${1-s} * ${u}`;c.signal=`scale("${e}", ${l})`}return i&&(c.offset=i),c}function Py({scaleName:e,fieldDef:t}){const n=C(t,{expr:"datum"}),i=C(t,{expr:"datum",suffix:"end"});return`abs(scale("${e}", ${i}) - scale("${e}", ${n}))`}function ou({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:s,scale:o,stack:a,offset:u,defaultRef:c,bandPosition:l}){if(t){if(U(t)){const f=o==null?void 0:o.get("type");if(Re(t)){l??(l=wd({fieldDef:t,fieldDef2:n,markDef:i,config:r}));const{bin:d,timeUnit:p,type:g}=t;if(oe(d)||l&&p&&g===Ci)return a!=null&&a.impute?Ln(t,s,{binSuffix:"mid"},{offset:u}):l&&!we(f)?is({scaleName:s,fieldOrDatumDef:t,bandPosition:l,offset:u}):Ln(t,s,Nr(t,e)?{binSuffix:"range"}:{},{offset:u});if(Fe(d)){if(S(n))return is({scaleName:s,fieldOrDatumDef:t,fieldOrDatumDef2:n,bandPosition:l,offset:u});A(qf(e===fe?dt:Dt))}}return Ln(t,s,we(f)?{binSuffix:"range"}:{},{offset:u,band:f==="band"?l??t.bandPosition??.5:void 0})}else if(lt(t)){const f=t.value,d=u?{offset:u}:{};return{...sr(e,f),...d}}}return Yg(c)&&(c=c()),c&&{...c,...u?{offset:u}:{}}}function sr(e,t){return q(["x","x2"],e)&&t==="width"?{field:{group:"width"}}:q(["y","y2"],e)&&t==="height"?{field:{group:"height"}}:ue(t)}function qn(e){return e&&e!=="number"&&e!=="time"}function yd(e,t,n){return`${e}(${t}${n?`, ${se(n)}`:""})`}const By=" – ";function au({fieldOrDatumDef:e,format:t,formatType:n,expr:i,normalizeStack:r,config:s}){var u,c;if(qn(n))return at({fieldOrDatumDef:e,format:t,formatType:n,expr:i,config:s});const o=bd(e,i,r),a=$i(e);if(t===void 0&&n===void 0&&s.customFormatTypes){if(a==="quantitative"){if(r&&s.normalizedNumberFormatType)return at({fieldOrDatumDef:e,format:s.normalizedNumberFormat,formatType:s.normalizedNumberFormatType,expr:i,config:s});if(s.numberFormatType)return at({fieldOrDatumDef:e,format:s.numberFormat,formatType:s.numberFormatType,expr:i,config:s})}if(a==="temporal"&&s.timeFormatType&&S(e)&&e.timeUnit===void 0)return at({fieldOrDatumDef:e,format:s.timeFormat,formatType:s.timeFormatType,expr:i,config:s})}if(Ni(e)){const l=My({field:o,timeUnit:S(e)?(u=Ee(e.timeUnit))==null?void 0:u.unit:void 0,format:t,formatType:s.timeFormatType,rawTimeFormat:s.timeFormat,isUTCScale:ri(e)&&((c=e.scale)==null?void 0:c.type)===je.UTC});return l?{signal:l}:void 0}if(t=Qo({type:a,specifiedFormat:t,config:s,normalizeStack:r}),S(e)&&oe(e.bin)){const l=C(e,{expr:i,binSuffix:"end"});return{signal:Fr(o,l,t,n,s)}}else return t||$i(e)==="quantitative"?{signal:`${Ed(o,t)}`}:{signal:`isValid(${o}) ? ${o} : ""+${o}`}}function bd(e,t,n){return S(e)?n?`${C(e,{expr:t,suffix:"end"})}-${C(e,{expr:t,suffix:"start"})}`:C(e,{expr:t}):Ly(e)}function at({fieldOrDatumDef:e,format:t,formatType:n,expr:i,normalizeStack:r,config:s,field:o}){if(o??(o=bd(e,i,r)),o!=="datum.value"&&S(e)&&oe(e.bin)){const a=C(e,{expr:i,binSuffix:"end"});return{signal:Fr(o,a,t,n,s)}}return{signal:yd(n,o,t)}}function xd(e,t,n,i,r,s){var o;if(!(B(i)&&qn(i))&&!(n===void 0&&i===void 0&&r.customFormatTypes&&$i(e)==="quantitative"&&(r.normalizedNumberFormatType&&Oi(e)&&e.stack==="normalize"||r.numberFormatType))){if(Oi(e)&&e.stack==="normalize"&&r.normalizedNumberFormat)return Qo({type:"quantitative",config:r,normalizeStack:!0});if(Ni(e)){const a=S(e)?(o=Ee(e.timeUnit))==null?void 0:o.unit:void 0;return a===void 0&&r.customFormatTypes&&r.timeFormatType?void 0:zy({specifiedFormat:n,timeUnit:a,config:r,omitTimeFormatConfig:s})}return Qo({type:t,specifiedFormat:n,config:r})}}function vd(e,t,n){var i;if(e&&(I(e)||e==="number"||e==="time"))return e;if(Ni(t)&&n!=="time"&&n!=="utc")return S(t)&&((i=Ee(t==null?void 0:t.timeUnit))!=null&&i.utc)?"utc":"time"}function Qo({type:e,specifiedFormat:t,config:n,normalizeStack:i}){if(B(t))return t;if(e===Gn)return i?n.normalizedNumberFormat:n.numberFormat}function zy({specifiedFormat:e,timeUnit:t,config:n,omitTimeFormatConfig:i}){return e||(t?{signal:ed(t)}:i?void 0:n.timeFormat)}function Ed(e,t){return`format(${e}, "${t||""}")`}function Sc(e,t,n,i){return qn(n)?yd(n,e,t):Ed(e,(B(t)?t:void 0)??i.numberFormat)}function Fr(e,t,n,i,r){if(n===void 0&&i===void 0&&r.customFormatTypes&&r.numberFormatType)return Fr(e,t,r.numberFormat,r.numberFormatType,r);const s=Sc(e,n,i,r),o=Sc(t,n,i,r);return`${Ja(e,!1)} ? "null" : ${s} + "${By}" + ${o}`}function My({field:e,timeUnit:t,format:n,formatType:i,rawTimeFormat:r,isUTCScale:s}){return!t||n?!t&&i?`${i}(${e}, '${n}')`:(n=B(n)?n:r,`${s?"utc":"time"}Format(${e}, '${n}')`):Y0(t,e,s)}const Ls="min",jy={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function wc(e){return e in jy}function Ad(e){return!!(e!=null&&e.encoding)}function Ct(e){return e&&(e.op==="count"||!!e.field)}function Sd(e){return e&&T(e)}function $r(e){return"row"in e||"column"in e}function uu(e){return!!e&&"header"in e}function Ps(e){return"facet"in e}function Uy(e){return e.param}function Wy(e){return e&&!B(e)&&"repeat"in e}function Cc(e){const{field:t,timeUnit:n,bin:i,aggregate:r}=e;return{...n?{timeUnit:n}:{},...i?{bin:i}:{},...r?{aggregate:r}:{},field:t}}function cu(e){return"sort"in e}function wd({fieldDef:e,fieldDef2:t,markDef:n,config:i}){if(U(e)&&e.bandPosition!==void 0)return e.bandPosition;if(S(e)){const{timeUnit:r,bin:s}=e;if(r&&!t)return iu(n.type)?0:Vt("timeUnitBandPosition",n,i);if(oe(s))return .5}}function Cd({channel:e,fieldDef:t,fieldDef2:n,markDef:i,config:r,scaleType:s,useVlSizeChannel:o}){var c,l,f;const a=He(e),u=Q(o?"size":a,i,r,{vgChannel:a});if(u!==void 0)return u;if(S(t)){const{timeUnit:d,bin:p}=t;if(d&&!n)return{band:Vt("timeUnitBandSize",i,r)};if(oe(p)&&!we(s))return{band:1}}if(iu(i.type))return s?we(s)?((c=r[i.type])==null?void 0:c.discreteBandSize)||{band:1}:(l=r[i.type])==null?void 0:l.continuousBandSize:(f=r[i.type])==null?void 0:f.discreteBandSize}function Fd(e,t,n,i){return oe(e.bin)||e.timeUnit&&Re(e)&&e.type==="temporal"?wd({fieldDef:e,fieldDef2:t,markDef:n,config:i})!==void 0:!1}function $d(e){return e&&!!e.sort&&!e.field}function Bs(e){return e&&"condition"in e}function zs(e){const t=e==null?void 0:e.condition;return!!t&&!T(t)&&S(t)}function Or(e){const t=e==null?void 0:e.condition;return!!t&&!T(t)&&U(t)}function Gy(e){const t=e==null?void 0:e.condition;return!!t&&(T(t)||lt(t))}function S(e){return e&&(!!e.field||e.aggregate==="count")}function $i(e){return e==null?void 0:e.type}function Lt(e){return e&&"datum"in e}function sn(e){return Re(e)&&!ss(e)||rs(e)}function Fc(e){return Re(e)&&e.type==="quantitative"&&!e.bin||rs(e)}function rs(e){return Lt(e)&&he(e.datum)}function U(e){return S(e)||Lt(e)}function Re(e){return e&&("field"in e||e.aggregate==="count")&&"type"in e}function lt(e){return e&&"value"in e&&"value"in e}function ri(e){return e&&("scale"in e||"sort"in e)}function Oi(e){return e&&("axis"in e||"stack"in e||"impute"in e)}function Od(e){return e&&"legend"in e}function Nd(e){return e&&("format"in e||"formatType"in e)}function Hy(e){return Me(e,["legend","axis","header","scale"])}function qy(e){return"op"in e}function C(e,t={}){let n=e.field;const i=t.prefix;let r=t.suffix,s="";if(Vy(e))n=mf("count");else{let o;if(!t.nofn)if(qy(e))o=e.op;else{const{bin:a,aggregate:u,timeUnit:c}=e;oe(a)?(o=_f(a),r=(t.binSuffix??"")+(t.suffix??"")):u?xn(u)?(s=`["${n}"]`,n=`argmax_${u.argmax}`):Xt(u)?(s=`["${n}"]`,n=`argmin_${u.argmin}`):o=String(u):c&&!ii(c)&&(o=K0(c),r=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}o&&(n=n?`${o}_${n}`:o)}return r&&(n=`${n}_${r}`),i&&(n=`${i}_${n}`),t.forAs?Ta(n):t.expr?pf(n,t.expr)+s:Qe(n)+s}function ss(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return S(e)&&!!e.bin;case"temporal":return!1}throw new Error(Uf(e.type))}function Xy(e){var t;return ri(e)&&Fi((t=e.scale)==null?void 0:t.type)}function Vy(e){return e.aggregate==="count"}function Yy(e,t){var o;const{field:n,bin:i,timeUnit:r,aggregate:s}=e;if(s==="count")return t.countTitle;if(oe(i))return`${n} (binned)`;if(r&&!ii(r)){const a=(o=Ee(r))==null?void 0:o.unit;if(a)return`${n} (${Ds(a).join("-")})`}else if(s)return xn(s)?`${n} for max ${s.argmax}`:Xt(s)?`${n} for min ${s.argmin}`:`${Er(s)} of ${n}`;return n}function Ky(e){const{aggregate:t,bin:n,timeUnit:i,field:r}=e;if(xn(t))return`${r} for argmax(${t.argmax})`;if(Xt(t))return`${r} for argmin(${t.argmin})`;const s=i&&!ii(i)?Ee(i):void 0,o=t||(s==null?void 0:s.unit)||(s==null?void 0:s.maxbins)&&"timeunit"||oe(n)&&"bin";return o?`${o.toUpperCase()}(${r})`:r}const Td=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return Ky(e);default:return Yy(e,t)}};let Dd=Td;function _d(e){Dd=e}function Jy(){_d(Td)}function yi(e,t,{allowDisabling:n,includeDefault:i=!0}){var a;const r=(a=lu(e))==null?void 0:a.title;if(!S(e))return r??e.title;const s=e,o=i?fu(s,t):void 0;return n?me(r,s.title,o):r??s.title??o}function lu(e){if(Oi(e)&&e.axis)return e.axis;if(Od(e)&&e.legend)return e.legend;if(uu(e)&&e.header)return e.header}function fu(e,t){return Dd(e,t)}function os(e){if(Nd(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}else{const t=lu(e)??{},{format:n,formatType:i}=t;return{format:n,formatType:i}}}function Qy(e,t){var s;switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(cu(e)&&T(e.sort))return"ordinal";const{aggregate:n,bin:i,timeUnit:r}=e;if(r)return"temporal";if(i||n&&!xn(n)&&!Xt(n))return"quantitative";if(ri(e)&&((s=e.scale)!=null&&s.type))switch(Ko[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function Nt(e){if(S(e))return e;if(zs(e))return e.condition}function ye(e){if(U(e))return e;if(Or(e))return e.condition}function kd(e,t,n,i={}){if(B(e)||he(e)||Li(e)){const r=B(e)?"string":he(e)?"number":"boolean";return A(Qm(t,r,e)),{value:e}}return U(e)?as(e,t,n,i):Or(e)?{...e,condition:as(e.condition,t,n,i)}:e}function as(e,t,n,i){if(Nd(e)){const{format:r,formatType:s,...o}=e;if(qn(s)&&!n.customFormatTypes)return A(bc(t)),as(o,t,n,i)}else{const r=Oi(e)?"axis":Od(e)?"legend":uu(e)?"header":null;if(r&&e[r]){const{format:s,formatType:o,...a}=e[r];if(qn(o)&&!n.customFormatTypes)return A(bc(t)),as({...e,[r]:a},t,n,i)}}return S(e)?du(e,t,i):Zy(e)}function Zy(e){let t=e.type;if(t)return e;const{datum:n}=e;return t=he(n)?"quantitative":B(n)?"nominal":ni(n)?"temporal":void 0,{...e,type:t}}function du(e,t,{compositeMark:n=!1}={}){const{aggregate:i,timeUnit:r,bin:s,field:o}=e,a={...e};if(!n&&i&&!Ba(i)&&!xn(i)&&!Xt(i)&&(A(e0(i)),delete a.aggregate),r&&(a.timeUnit=Ee(r)),o&&(a.field=`${o}`),oe(s)&&(a.bin=Ms(s,t)),Fe(s)&&!Se(t)&&A(k0(t)),Re(a)){const{type:u}=a,c=ry(u);u!==c&&(a.type=c),u!=="quantitative"&&Df(i)&&(A(Zm(u,i)),a.type="quantitative")}else if(!wf(t)){const u=Qy(a,t);a.type=u}if(Re(a)){const{compatible:u,warning:c}=eb(a,t)||{};u===!1&&A(c)}if(cu(a)&&B(a.sort)){const{sort:u}=a;if(wc(u))return{...a,sort:{encoding:u}};const c=u.substr(1);if(u.charAt(0)==="-"&&wc(c))return{...a,sort:{encoding:c,order:"descending"}}}if(uu(a)){const{header:u}=a;if(u){const{orient:c,...l}=u;if(c)return{...a,header:{...l,labelOrient:u.labelOrient||c,titleOrient:u.titleOrient||c}}}}return a}function Ms(e,t){return Li(e)?{maxbins:cc(t)}:e==="binned"?{binned:!0}:!e.maxbins&&!e.step?{...e,maxbins:cc(t)}:e}const ui={compatible:!0};function eb(e,t){const n=e.type;if(n==="geojson"&&t!=="shape")return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case Wt:case Gt:case As:return ss(e)?ui:{compatible:!1,warning:s0(t)};case fe:case Ae:case gn:case Bi:case We:case _t:case kt:case Ar:case Sr:case Ss:case Un:case ws:case Cs:case Zn:case et:case pt:case Fs:return ui;case ht:case Ze:case gt:case mt:return n!==Gn?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:ui;case Qt:case hn:case mn:case yn:case Jt:case Kt:case Yt:case dt:case Dt:return n==="nominal"&&!e.sort?{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`}:ui;case Ge:case bn:return!ss(e)&&!Xy(e)?{compatible:!1,warning:o0(t)}:ui;case Si:return e.type==="nominal"&&!("sort"in e)?{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}:ui}}function Ni(e){const{formatType:t}=os(e);return t==="time"||!t&&tb(e)}function tb(e){return e&&(e.type==="temporal"||S(e)&&!!e.timeUnit)}function js(e,{timeUnit:t,type:n,wrapTime:i,undefinedIfExprNotRequired:r}){var u;const s=t&&((u=Ee(t))==null?void 0:u.unit);let o=s||n==="temporal",a;return wr(e)?a=e.expr:I(e)?a=e.signal:ni(e)?(o=!0,a=Wn(e)):(B(e)||he(e))&&o&&(a=`datetime(${se(e)})`,H0(s)&&(he(e)&&e<1e4||B(e)&&isNaN(Date.parse(e)))&&(a=Wn({[s]:e}))),a?i&&o?`time(${a})`:a:r?void 0:se(e)}function Id(e,t){const{type:n}=e;return t.map(i=>{const r=S(e)&&!ii(e.timeUnit)?e.timeUnit:void 0,s=js(i,{timeUnit:r,type:n,undefinedIfExprNotRequired:!0});return s!==void 0?{signal:s}:i})}function Nr(e,t){return oe(e.bin)?Zt(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const $c={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function Tr(e){return e==null?void 0:e.condition}const Rd=["domain","grid","labels","ticks","title"],nb={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},Ld={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},ib={...Ld,style:1,labelExpr:1,encoding:1};function Oc(e){return!!ib[e]}const rb={axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1},Pd=E(rb);function en(e){return"mark"in e}class Us{constructor(t,n){this.name=t,this.run=n}hasMatchingType(t){return en(t)?ky(t.mark)===this.name:!1}}function Pn(e,t){const n=e&&e[t];return n?T(n)?Mn(n,i=>!!i.field):S(n)||zs(n):!1}function Bd(e,t){const n=e&&e[t];return n?T(n)?Mn(n,i=>!!i.field):S(n)||Lt(n)||Or(n):!1}function Zo(e,t){if(Se(t)){const n=e[t];if((S(n)||Lt(n))&&(sd(n.type)||S(n)&&n.timeUnit)){const i=Ia(t);return Bd(e,i)}}return!1}function pu(e){return Mn(sm,t=>{if(Pn(e,t)){const n=e[t];if(T(n))return Mn(n,i=>!!i.aggregate);{const i=Nt(n);return i&&!!i.aggregate}}return!1})}function zd(e,t){const n=[],i=[],r=[],s=[],o={};return gu(e,(a,u)=>{if(S(a)){const{field:c,aggregate:l,bin:f,timeUnit:d,...p}=a;if(l||d||f){const g=lu(a),h=g==null?void 0:g.title;let m=C(a,{forAs:!0});const y={...h?[]:{title:yi(a,t,{allowDisabling:!0})},...p,field:m};if(l){let x;if(xn(l)?(x="argmax",m=C({op:"argmax",field:l.argmax},{forAs:!0}),y.field=`${m}.${c}`):Xt(l)?(x="argmin",m=C({op:"argmin",field:l.argmin},{forAs:!0}),y.field=`${m}.${c}`):l!=="boxplot"&&l!=="errorbar"&&l!=="errorband"&&(x=l),x){const $={op:x,as:m};c&&($.field=c),s.push($)}}else if(n.push(m),Re(a)&&oe(f)){if(i.push({bin:f,field:c,as:m}),n.push(C(a,{binSuffix:"end"})),Nr(a,u)&&n.push(C(a,{binSuffix:"range"})),Se(u)){const x={field:`${m}_end`};o[`${u}2`]=x}y.bin="binned",wf(u)||(y.type=Gn)}else if(d&&!ii(d)){r.push({timeUnit:d,field:c,as:m});const x=Re(a)&&a.type!==Ci&&"time";x&&(u===Ar||u===Un?y.formatType=x:gm(u)?y.legend={formatType:x,...y.legend}:Se(u)&&(y.axis={formatType:x,...y.axis}))}o[u]=y}else n.push(c),o[u]=e[u]}else o[u]=e[u]}),{bins:i,timeUnits:r,aggregate:s,groupby:n,encoding:o}}function sb(e,t,n){const i=mm(t,n);if(i){if(i==="binned"){const r=e[t===dt?fe:Ae];return!!(S(r)&&S(e[t])&&Fe(r.bin))}}else return!1;return!0}function ob(e,t,n,i){const r={};for(const s of E(e))Sf(s)||A(r0(s));for(let s of lm){if(!e[s])continue;const o=e[s];if(zi(s)){const a=Ff(s),u=r[a];if(S(u)){if(iy(u.type)&&S(o)&&!u.timeUnit){A(Km(a));continue}}else s=a,A(Jm(a))}if(s==="angle"&&t==="arc"&&!e.theta&&(A(Ym),s=et),!sb(e,s,t)){A(Ts(s,t));continue}if(s===Jt&&t==="line"){const a=Nt(e[s]);if(a!=null&&a.aggregate){A(n0);continue}}if(s===We&&(n?"fill"in e:"stroke"in e)){A(Wf("encoding",{fill:"fill"in e,stroke:"stroke"in e}));continue}if(s===Sr||s===Si&&!T(o)&&!lt(o)||s===Un&&T(o)){if(o){if(s===Si){const a=e[s];if($d(a)){r[s]=a;continue}}r[s]=ge(o).reduce((a,u)=>(S(u)?a.push(du(u,s)):A(Yo(u,s)),a),[])}}else{if(s===Un&&o===null)r[s]=null;else if(!S(o)&&!Lt(o)&&!lt(o)&&!Bs(o)&&!I(o)){A(Yo(o,s));continue}r[s]=kd(o,s,i)}}return r}function Ws(e,t){const n={};for(const i of E(e)){const r=kd(e[i],i,t,{compositeMark:!0});n[i]=r}return n}function ab(e){const t=[];for(const n of E(e))if(Pn(e,n)){const i=e[n],r=ge(i);for(const s of r)S(s)?t.push(s):zs(s)&&t.push(s.condition)}return t}function gu(e,t,n){if(e)for(const i of E(e)){const r=e[i];if(T(r))for(const s of r)t.call(n,s,i);else t.call(n,r,i)}}function ub(e,t,n,i){return e?E(e).reduce((r,s)=>{const o=e[s];return T(o)?o.reduce((a,u)=>t.call(i,a,u,s),r):t.call(i,r,o,s)},n):n}function Md(e,t){return E(t).reduce((n,i)=>{switch(i){case fe:case Ae:case ws:case Fs:case Cs:case dt:case Dt:case gn:case Bi:case et:case Kt:case pt:case Yt:case gt:case ht:case mt:case Ze:case Ar:case Ge:case Zn:case Un:return n;case Si:if(e==="line"||e==="trail")return n;case Sr:case Ss:{const r=t[i];if(T(r)||S(r))for(const s of ge(r))s.aggregate||n.push(C(s,{}));return n}case Jt:if(e==="trail")return n;case We:case _t:case kt:case Qt:case hn:case mn:case bn:case yn:{const r=Nt(t[i]);return r&&!r.aggregate&&n.push(C(r,{})),n}}},[])}function cb(e){const{tooltip:t,...n}=e;if(!t)return{filteredEncoding:n};let i,r;if(T(t)){for(const s of t)s.aggregate?(i||(i=[]),i.push(s)):(r||(r=[]),r.push(s));i&&(n.tooltip=i)}else t.aggregate?n.tooltip=t:r=t;return T(r)&&r.length===1&&(r=r[0]),{customTooltipWithoutAggregatedField:r,filteredEncoding:n}}function ea(e,t,n,i=!0){if("tooltip"in n)return{tooltip:n.tooltip};const r=e.map(({fieldPrefix:o,titlePrefix:a})=>{const u=i?` of ${hu(t)}`:"";return{field:o+t.field,type:t.type,title:I(a)?{signal:`${a}"${escape(u)}"`}:a+u}}),s=ab(n).map(Hy);return{tooltip:[...r,...wt(s,H)]}}function hu(e){const{title:t,field:n}=e;return me(t,n)}function mu(e,t,n,i,r){const{scale:s,axis:o}=n;return({partName:a,mark:u,positionPrefix:c,endPositionPrefix:l=void 0,extraEncoding:f={}})=>{const d=hu(n);return jd(e,a,r,{mark:u,encoding:{[t]:{field:`${c}_${n.field}`,type:n.type,...d!==void 0?{title:d}:{},...s!==void 0?{scale:s}:{},...o!==void 0?{axis:o}:{}},...B(l)?{[`${t}2`]:{field:`${l}_${n.field}`}}:{},...i,...f}})}}function jd(e,t,n,i){const{clip:r,color:s,opacity:o}=e,a=e.type;return e[t]||e[t]===void 0&&n[t]?[{...i,mark:{...n[t],...r?{clip:r}:{},...s?{color:s}:{},...o?{opacity:o}:{},...Ot(i.mark)?i.mark:{type:i.mark},style:`${a}-${String(t)}`,...Li(e[t])?{}:e[t]}}]:[]}function Ud(e,t,n){const{encoding:i}=e,r=t==="vertical"?"y":"x",s=i[r],o=i[`${r}2`],a=i[`${r}Error`],u=i[`${r}Error2`];return{continuousAxisChannelDef:Br(s,n),continuousAxisChannelDef2:Br(o,n),continuousAxisChannelDefError:Br(a,n),continuousAxisChannelDefError2:Br(u,n),continuousAxis:r}}function Br(e,t){if(e!=null&&e.aggregate){const{aggregate:n,...i}=e;return n!==t&&A(_0(n,t)),i}else return e}function Wd(e,t){const{mark:n,encoding:i}=e,{x:r,y:s}=i;if(Ot(n)&&n.orient)return n.orient;if(sn(r)){if(sn(s)){const o=S(r)&&r.aggregate,a=S(s)&&s.aggregate;if(!o&&a===t)return"vertical";if(!a&&o===t)return"horizontal";if(o===t&&a===t)throw new Error("Both x and y cannot have aggregate");return Ni(s)&&!Ni(r)?"horizontal":"vertical"}return"horizontal"}else{if(sn(s))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}}const us="boxplot",lb=["box","median","outliers","rule","ticks"],fb=new Us(us,Hd);function Gd(e){return he(e)?"tukey":e}function Hd(e,{config:t}){e={...e,encoding:Ws(e.encoding,t)};const{mark:n,encoding:i,params:r,projection:s,...o}=e,a=Ot(n)?n:{type:n};r&&A(jf("boxplot"));const u=a.extent??t.boxplot.extent,c=Q("size",a,t),l=a.invalid,f=Gd(u),{bins:d,timeUnits:p,transform:g,continuousAxisChannelDef:h,continuousAxis:m,groupby:y,aggregate:x,encodingWithoutContinuousAxis:$,ticksOrient:R,boxOrient:v,customTooltipWithoutAggregatedField:N}=db(e,u,t),{color:F,size:j,...J}=$,ne=qg=>mu(a,m,h,qg,t.boxplot),Ce=ne(J),bt=ne($),O=ne({...J,...j?{size:j}:{}}),w=ea([{fieldPrefix:f==="min-max"?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:f==="min-max"?"lower_whisker_":"min_",titlePrefix:"Min"}],h,$),P={type:"tick",color:"black",opacity:1,orient:R,invalid:l,aria:!1},k=f==="min-max"?w:ea([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],h,$),L=[...Ce({partName:"rule",mark:{type:"rule",invalid:l,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:k}),...Ce({partName:"rule",mark:{type:"rule",invalid:l,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:k}),...Ce({partName:"ticks",mark:P,positionPrefix:"lower_whisker",extraEncoding:k}),...Ce({partName:"ticks",mark:P,positionPrefix:"upper_whisker",extraEncoding:k})],D=[...f!=="tukey"?L:[],...bt({partName:"box",mark:{type:"bar",...c?{size:c}:{},orient:v,invalid:l,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:w}),...O({partName:"median",mark:{type:"tick",invalid:l,...V(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...c?{size:c}:{},orient:R,aria:!1},positionPrefix:"mid_box",extraEncoding:w})];if(f==="min-max")return{...o,transform:(o.transform??[]).concat(g),layer:D};const z=`datum["lower_box_${h.field}"]`,X=`datum["upper_box_${h.field}"]`,W=`(${X} - ${z})`,ie=`${z} - ${u} * ${W}`,Ne=`${X} + ${u} * ${W}`,ae=`datum["${h.field}"]`,Sn={joinaggregate:qd(h.field),groupby:y},ho={transform:[{filter:`(${ie} <= ${ae}) && (${ae} <= ${Ne})`},{aggregate:[{op:"min",field:h.field,as:`lower_whisker_${h.field}`},{op:"max",field:h.field,as:`upper_whisker_${h.field}`},{op:"min",field:`lower_box_${h.field}`,as:`lower_box_${h.field}`},{op:"max",field:`upper_box_${h.field}`,as:`upper_box_${h.field}`},...x],groupby:y}],layer:L},{tooltip:kF,...Gg}=J,{scale:ic,axis:Hg}=h,rc=hu(h),sc=Me(Hg,["title"]),oc=jd(a,"outliers",t.boxplot,{transform:[{filter:`(${ae} < ${ie}) || (${ae} > ${Ne})`}],mark:"point",encoding:{[m]:{field:h.field,type:h.type,...rc!==void 0?{title:rc}:{},...ic!==void 0?{scale:ic}:{},...te(sc)?{}:{axis:sc}},...Gg,...F?{color:F}:{},...N?{tooltip:N}:{}}})[0];let Pr;const ac=[...d,...p,Sn];return oc?Pr={transform:ac,layer:[oc,ho]}:(Pr=ho,Pr.transform.unshift(...ac)),{...o,layer:[Pr,{transform:g,layer:D}]}}function qd(e){return[{op:"q1",field:e,as:`lower_box_${e}`},{op:"q3",field:e,as:`upper_box_${e}`}]}function db(e,t,n){const i=Wd(e,us),{continuousAxisChannelDef:r,continuousAxis:s}=Ud(e,i,us),o=r.field,a=Gd(t),u=[...qd(o),{op:"median",field:o,as:`mid_box_${o}`},{op:"min",field:o,as:(a==="min-max"?"lower_whisker_":"min_")+o},{op:"max",field:o,as:(a==="min-max"?"upper_whisker_":"max_")+o}],c=a==="min-max"||a==="tukey"?[]:[{calculate:`datum["upper_box_${o}"] - datum["lower_box_${o}"]`,as:`iqr_${o}`},{calculate:`min(datum["upper_box_${o}"] + datum["iqr_${o}"] * ${t}, datum["max_${o}"])`,as:`upper_whisker_${o}`},{calculate:`max(datum["lower_box_${o}"] - datum["iqr_${o}"] * ${t}, datum["min_${o}"])`,as:`lower_whisker_${o}`}],{[s]:l,...f}=e.encoding,{customTooltipWithoutAggregatedField:d,filteredEncoding:p}=cb(f),{bins:g,timeUnits:h,aggregate:m,groupby:y,encoding:x}=zd(p,n),$=i==="vertical"?"horizontal":"vertical",R=i,v=[...g,...h,{aggregate:[...m,...u],groupby:y},...c];return{bins:g,timeUnits:h,transform:v,groupby:y,aggregate:m,continuousAxisChannelDef:r,continuousAxis:s,encodingWithoutContinuousAxis:x,ticksOrient:$,boxOrient:R,customTooltipWithoutAggregatedField:d}}const yu="errorbar",pb=["ticks","rule"],gb=new Us(yu,Xd);function Xd(e,{config:t}){e={...e,encoding:Ws(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:s,ticksOrient:o,markDef:a,outerSpec:u,tooltipEncoding:c}=Vd(e,yu,t);delete s.size;const l=mu(a,r,i,s,t.errorbar),f=a.thickness,d=a.size,p={type:"tick",orient:o,aria:!1,...f!==void 0?{thickness:f}:{},...d!==void 0?{size:d}:{}},g=[...l({partName:"ticks",mark:p,positionPrefix:"lower",extraEncoding:c}),...l({partName:"ticks",mark:p,positionPrefix:"upper",extraEncoding:c}),...l({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...f!==void 0?{size:f}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c})];return{...u,transform:n,...g.length>1?{layer:g}:{...g[0]}}}function hb(e,t){const{encoding:n}=e;if(mb(n))return{orient:Wd(e,t),inputType:"raw"};const i=yb(n),r=bb(n),s=n.x,o=n.y;if(i){if(r)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const a=n.x2,u=n.y2;if(U(a)&&U(u))throw new Error(`${t} cannot have both x2 and y2`);if(U(a)){if(sn(s))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}else if(U(u)){if(sn(o))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}else{const a=n.xError,u=n.xError2,c=n.yError,l=n.yError2;if(U(u)&&!U(a))throw new Error(`${t} cannot have xError2 without xError`);if(U(l)&&!U(c))throw new Error(`${t} cannot have yError2 without yError`);if(U(a)&&U(c))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(U(a)){if(sn(s))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}else if(U(c)){if(sn(o))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function mb(e){return(U(e.x)||U(e.y))&&!U(e.x2)&&!U(e.y2)&&!U(e.xError)&&!U(e.xError2)&&!U(e.yError)&&!U(e.yError2)}function yb(e){return U(e.x2)||U(e.y2)}function bb(e){return U(e.xError)||U(e.xError2)||U(e.yError)||U(e.yError2)}function Vd(e,t,n){const{mark:i,encoding:r,params:s,projection:o,...a}=e,u=Ot(i)?i:{type:i};s&&A(jf(t));const{orient:c,inputType:l}=hb(e,t),{continuousAxisChannelDef:f,continuousAxisChannelDef2:d,continuousAxisChannelDefError:p,continuousAxisChannelDefError2:g,continuousAxis:h}=Ud(e,c,t),{errorBarSpecificAggregate:m,postAggregateCalculates:y,tooltipSummary:x,tooltipTitleWithFieldName:$}=xb(u,f,d,p,g,l,t,n),{[h]:R,[h==="x"?"x2":"y2"]:v,[h==="x"?"xError":"yError"]:N,[h==="x"?"xError2":"yError2"]:F,...j}=r,{bins:J,timeUnits:ne,aggregate:Ce,groupby:bt,encoding:O}=zd(j,n),w=[...Ce,...m],P=l!=="raw"?[]:bt,k=ea(x,f,O,$);return{transform:[...a.transform??[],...J,...ne,...w.length===0?[]:[{aggregate:w,groupby:P}],...y],groupby:P,continuousAxisChannelDef:f,continuousAxis:h,encodingWithoutContinuousAxis:O,ticksOrient:c==="vertical"?"horizontal":"vertical",markDef:u,outerSpec:a,tooltipEncoding:k}}function xb(e,t,n,i,r,s,o,a){let u=[],c=[];const l=t.field;let f,d=!1;if(s==="raw"){const p=e.center?e.center:e.extent?e.extent==="iqr"?"median":"mean":a.errorbar.center,g=e.extent?e.extent:p==="mean"?"stderr":"iqr";if(p==="median"!=(g==="iqr")&&A(D0(p,g,o)),g==="stderr"||g==="stdev")u=[{op:g,field:l,as:`extent_${l}`},{op:p,field:l,as:`center_${l}`}],c=[{calculate:`datum["center_${l}"] + datum["extent_${l}"]`,as:`upper_${l}`},{calculate:`datum["center_${l}"] - datum["extent_${l}"]`,as:`lower_${l}`}],f=[{fieldPrefix:"center_",titlePrefix:Er(p)},{fieldPrefix:"upper_",titlePrefix:Nc(p,g,"+")},{fieldPrefix:"lower_",titlePrefix:Nc(p,g,"-")}],d=!0;else{let h,m,y;g==="ci"?(h="mean",m="ci0",y="ci1"):(h="median",m="q1",y="q3"),u=[{op:m,field:l,as:`lower_${l}`},{op:y,field:l,as:`upper_${l}`},{op:h,field:l,as:`center_${l}`}],f=[{fieldPrefix:"upper_",titlePrefix:yi({field:l,aggregate:y,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:yi({field:l,aggregate:m,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:yi({field:l,aggregate:h,type:"quantitative"},a,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&A(T0(e.center,e.extent)),s==="aggregated-upper-lower"?(f=[],c=[{calculate:`datum["${n.field}"]`,as:`upper_${l}`},{calculate:`datum["${l}"]`,as:`lower_${l}`}]):s==="aggregated-error"&&(f=[{fieldPrefix:"",titlePrefix:l}],c=[{calculate:`datum["${l}"] + datum["${i.field}"]`,as:`upper_${l}`}],r?c.push({calculate:`datum["${l}"] + datum["${r.field}"]`,as:`lower_${l}`}):c.push({calculate:`datum["${l}"] - datum["${i.field}"]`,as:`lower_${l}`}));for(const p of c)f.push({fieldPrefix:p.as.substring(0,6),titlePrefix:jn(jn(p.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:c,errorBarSpecificAggregate:u,tooltipSummary:f,tooltipTitleWithFieldName:d}}function Nc(e,t,n){return`${Er(e)} ${n} ${t}`}const bu="errorband",vb=["band","borders"],Eb=new Us(bu,Yd);function Yd(e,{config:t}){e={...e,encoding:Ws(e.encoding,t)};const{transform:n,continuousAxisChannelDef:i,continuousAxis:r,encodingWithoutContinuousAxis:s,markDef:o,outerSpec:a,tooltipEncoding:u}=Vd(e,bu,t),c=o,l=mu(c,r,i,s,t.errorband),f=e.encoding.x!==void 0&&e.encoding.y!==void 0;let d={type:f?"area":"rect"},p={type:f?"line":"rule"};const g={...c.interpolate?{interpolate:c.interpolate}:{},...c.tension&&c.interpolate?{tension:c.tension}:{}};return f?(d={...d,...g,ariaRoleDescription:"errorband"},p={...p,...g,aria:!1}):c.interpolate?A(vc("interpolate")):c.tension&&A(vc("tension")),{...a,transform:n,layer:[...l({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:u}),...l({partName:"borders",mark:p,positionPrefix:"lower",extraEncoding:u}),...l({partName:"borders",mark:p,positionPrefix:"upper",extraEncoding:u})]}}const Kd={};function xu(e,t,n){const i=new Us(e,t);Kd[e]={normalizer:i,parts:n}}function Ab(){return E(Kd)}xu(us,Hd,lb);xu(yu,Xd,pb);xu(bu,Yd,vb);const Sb=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],Jd={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},Qd={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},wb=E(Jd),Cb=E(Qd),Fb={header:1,headerRow:1,headerColumn:1,headerFacet:1},Zd=E(Fb),ep=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],$b={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},Ob={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},ft="_vgsid_",Nb={point:{on:"click",fields:[ft],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function vu(e){return e==="legend"||!!(e!=null&&e.legend)}function xo(e){return vu(e)&&V(e)}function Eu(e){return!!(e!=null&&e.select)}function tp(e){const t=[];for(const n of e||[]){if(Eu(n))continue;const{expr:i,bind:r,...s}=n;if(r&&i){const o={...s,bind:r,init:i};t.push(o)}else{const o={...s,...i?{update:i}:{},...r?{bind:r}:{}};t.push(o)}}return t}function Tb(e){return Gs(e)||Su(e)||Au(e)}function Au(e){return"concat"in e}function Gs(e){return"vconcat"in e}function Su(e){return"hconcat"in e}function np({step:e,offsetIsDiscrete:t}){return t?e.for??"offset":"position"}function Tt(e){return V(e)&&e.step!==void 0}function Tc(e){return e.view||e.width||e.height}const Dc=20,Db={align:1,bounds:1,center:1,columns:1,spacing:1},_b=E(Db);function kb(e,t,n){const i=n[t],r={},{spacing:s,columns:o}=i;s!==void 0&&(r.spacing=s),o!==void 0&&(Ps(e)&&!$r(e.facet)||Au(e))&&(r.columns=o),Gs(e)&&(r.columns=1);for(const a of _b)if(e[a]!==void 0)if(a==="spacing"){const u=e[a];r[a]=he(u)?u:{row:u.row??s,column:u.column??s}}else r[a]=e[a];return r}function ta(e,t){return e[t]??e[t==="width"?"continuousWidth":"continuousHeight"]}function cs(e,t){const n=ls(e,t);return Tt(n)?n.step:ip}function ls(e,t){const n=e[t]??e[t==="width"?"discreteWidth":"discreteHeight"];return me(n,{step:e.step})}const ip=20,Ib={continuousWidth:200,continuousHeight:200,step:ip},Rb={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:Ib,mark:$y,arc:{},area:{},bar:Ty,circle:{},geoshape:{},image:{},line:{},point:{},rect:Dy,rule:{color:"black"},square:{},text:{color:"black"},tick:_y,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:cy,projection:{},legend:$b,header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Nb,style:{},title:{},facet:{spacing:Dc},concat:{spacing:Dc},normalizedNumberFormat:".0%"},Bt=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],_c={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},kc={blue:Bt[0],orange:Bt[1],red:Bt[2],teal:Bt[3],green:Bt[4],yellow:Bt[5],purple:Bt[6],pink:Bt[7],brown:Bt[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function Lb(e={}){return{signals:[{name:"color",value:V(e)?{...kc,...e}:kc}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function Pb(e){return{signals:[{name:"fontSize",value:V(e)?{..._c,...e}:_c}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function Bb(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}function rp(e){const t=E(e||{}),n={};for(const i of t){const r=e[i];n[i]=Tr(r)?If(r):Xe(r)}return n}function zb(e){const t=E(e),n={};for(const i of t)n[i]=rp(e[i]);return n}const Mb=[...hd,...Pd,...Zd,"background","padding","legend","lineBreak","scale","style","title","view"];function sp(e={}){const{color:t,font:n,fontSize:i,selection:r,...s}=e,o=xs({},M(Rb),n?Bb(n):{},t?Lb(t):{},i?Pb(i):{},s||{});r&&xa(o,"selection",r,!0);const a=Me(o,Mb);for(const u of["background","lineBreak","padding"])o[u]&&(a[u]=Xe(o[u]));for(const u of hd)o[u]&&(a[u]=Be(o[u]));for(const u of Pd)o[u]&&(a[u]=rp(o[u]));for(const u of Zd)o[u]&&(a[u]=Be(o[u]));return o.legend&&(a.legend=Be(o.legend)),o.scale&&(a.scale=Be(o.scale)),o.style&&(a.style=zb(o.style)),o.title&&(a.title=Be(o.title)),o.view&&(a.view=Be(o.view)),a}const jb=new Set(["view",...Ey]),Ub=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],Wb={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],...Fy};function Gb(e){e=M(e);for(const t of Ub)delete e[t];if(e.axis)for(const t in e.axis)Tr(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of Sb)delete e.legend[t];if(e.mark){for(const t of Ac)delete e.mark[t];e.mark.tooltip&&V(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat(tp(e.params)),delete e.params);for(const t of jb){for(const i of Ac)delete e[t][i];const n=Wb[t];if(n)for(const i of n)delete e[t][i];qb(e,t)}for(const t of Ab())delete e[t];Hb(e);for(const t in e)V(e[t])&&te(e[t])&&delete e[t];return te(e)?void 0:e}function Hb(e){const{titleMarkConfig:t,subtitleMarkConfig:n,subtitle:i}=kf(e.title);te(t)||(e.style["group-title"]={...e.style["group-title"],...t}),te(n)||(e.style["group-subtitle"]={...e.style["group-subtitle"],...n}),te(i)?delete e.title:e.title=i}function qb(e,t,n,i){const r=i?e[t][i]:e[t];t==="view"&&(n="cell");const s={...r,...e.style[n??t]};te(s)||(e.style[n??t]=s),i||delete e[t]}function Hs(e){return"layer"in e}function Xb(e){return"repeat"in e}function Vb(e){return!T(e.repeat)&&e.repeat.layer}class wu{map(t,n){return Ps(t)?this.mapFacet(t,n):Xb(t)?this.mapRepeat(t,n):Su(t)?this.mapHConcat(t,n):Gs(t)?this.mapVConcat(t,n):Au(t)?this.mapConcat(t,n):this.mapLayerOrUnit(t,n)}mapLayerOrUnit(t,n){if(Hs(t))return this.mapLayer(t,n);if(en(t))return this.mapUnit(t,n);throw new Error(za(t))}mapLayer(t,n){return{...t,layer:t.layer.map(i=>this.mapLayerOrUnit(i,n))}}mapHConcat(t,n){return{...t,hconcat:t.hconcat.map(i=>this.map(i,n))}}mapVConcat(t,n){return{...t,vconcat:t.vconcat.map(i=>this.map(i,n))}}mapConcat(t,n){const{concat:i,...r}=t;return{...r,concat:i.map(s=>this.map(s,n))}}mapFacet(t,n){return{...t,spec:this.map(t.spec,n)}}mapRepeat(t,n){return{...t,spec:this.map(t.spec,n)}}}const Yb={zero:1,center:1,normalize:1};function Kb(e){return e in Yb}const Jb=new Set([dd,ks,_s,ns,Rs,tu,nu,Is,pd,eu]),Qb=new Set([ks,_s,dd]);function ci(e){return S(e)&&$i(e)==="quantitative"&&!e.bin}function Ic(e,t,{orient:n,type:i}){const r=t==="x"?"y":"radius",s=t==="x",o=e[t],a=e[r];if(S(o)&&S(a))if(ci(o)&&ci(a)){if(o.stack)return t;if(a.stack)return r;const u=S(o)&&!!o.aggregate,c=S(a)&&!!a.aggregate;if(u!==c)return u?t:r;if(s&&["bar","area"].includes(i)){if(n==="vertical")return r;if(n==="horizontal")return t}}else{if(ci(o))return t;if(ci(a))return r}else{if(ci(o))return t;if(ci(a))return r}}function Zb(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function op(e,t){var d,p;const n=Ot(e)?e:{type:e},i=n.type;if(!Jb.has(i))return null;const r=Ic(t,"x",n)||Ic(t,"theta",n);if(!r)return null;const s=t[r],o=S(s)?C(s,{}):void 0,a=Zb(r),u=[],c=new Set;if(t[a]){const g=t[a],h=S(g)?C(g,{}):void 0;h&&h!==o&&(u.push(a),c.add(h));const m=a==="x"?"xOffset":"yOffset",y=t[m],x=S(y)?C(y,{}):void 0;x&&x!==o&&(u.push(m),c.add(x))}const l=fm.reduce((g,h)=>{if(h!=="tooltip"&&Pn(t,h)){const m=t[h];for(const y of ge(m)){const x=Nt(y);if(x.aggregate)continue;const $=C(x,{});(!$||!c.has($))&&g.push({channel:h,fieldDef:x})}}return g},[]);let f;return s.stack!==void 0?Li(s.stack)?f=s.stack?"zero":null:f=s.stack:Qb.has(i)&&(f="zero"),!f||!Kb(f)||pu(t)&&l.length===0?null:(d=s==null?void 0:s.scale)!=null&&d.type&&((p=s==null?void 0:s.scale)==null?void 0:p.type)!==je.LINEAR?(s!=null&&s.stack&&A($0(s.scale.type)),null):U(t[It(r)])?(s.stack!==void 0&&A(F0(r)),null):(S(s)&&s.aggregate&&!Sm.has(s.aggregate)&&A(O0(s.aggregate)),{groupbyChannels:u,groupbyFields:c,fieldChannel:r,impute:s.impute===null?!1:En(i),stackBy:l,offset:f})}function ap(e,t,n){const i=Be(e),r=Q("orient",i,n);if(i.orient=i1(i.type,t,r),r!==void 0&&r!==i.orient&&A(l0(i.orient,r)),i.type==="bar"&&i.orient){const a=Q("cornerRadiusEnd",i,n);if(a!==void 0){const u=i.orient==="horizontal"&&t.x2||i.orient==="vertical"&&t.y2?["cornerRadius"]:Ny[i.orient];for(const c of u)i[c]=a;i.cornerRadiusEnd!==void 0&&delete i.cornerRadiusEnd}}return Q("opacity",i,n)===void 0&&(i.opacity=t1(i.type,t)),Q("cursor",i,n)===void 0&&(i.cursor=e1(i,t,n)),i}function e1(e,t,n){return t.href||e.href||Q("href",e,n)?"pointer":e.cursor}function t1(e,t){if(q([Rs,eu,tu,nu],e)&&!pu(t))return .7}function n1(e,t,{graticule:n}){if(n)return!1;const i=Vt("filled",e,t),r=e.type;return me(i,r!==Rs&&r!==Is&&r!==ns)}function i1(e,t,n){switch(e){case Rs:case tu:case nu:case pd:case xy:case by:return}const{x:i,y:r,x2:s,y2:o}=t;switch(e){case ks:if(S(i)&&(Fe(i.bin)||S(r)&&r.aggregate&&!i.aggregate))return"vertical";if(S(r)&&(Fe(r.bin)||S(i)&&i.aggregate&&!r.aggregate))return"horizontal";if(o||s){if(n)return n;if(!s)return(S(i)&&i.type===Gn&&!oe(i.bin)||rs(i))&&S(r)&&Fe(r.bin)?"horizontal":"vertical";if(!o)return(S(r)&&r.type===Gn&&!oe(r.bin)||rs(r))&&S(i)&&Fe(i.bin)?"vertical":"horizontal"}case ns:if(s&&!(S(i)&&Fe(i.bin))&&o&&!(S(r)&&Fe(r.bin)))return;case _s:if(o)return S(r)&&Fe(r.bin)?"horizontal":"vertical";if(s)return S(i)&&Fe(i.bin)?"vertical":"horizontal";if(e===ns){if(i&&!r)return"vertical";if(r&&!i)return"horizontal"}case Is:case eu:{const a=Fc(i),u=Fc(r);if(n)return n;if(a&&!u)return e!=="tick"?"horizontal":"vertical";if(!a&&u)return e!=="tick"?"vertical":"horizontal";if(a&&u)return"vertical";{const c=Re(i)&&i.type===Ci,l=Re(r)&&r.type===Ci;if(c&&!l)return"vertical";if(!c&&l)return"horizontal"}return}}return"vertical"}function r1(e){const{point:t,line:n,...i}=e;return E(i).length>1?i:i.type}function s1(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:Me(e[t],["point","line"])});return e}function vo(e,t={},n){return e.point==="transparent"?{opacity:0}:e.point?V(e.point)?e.point:{}:e.point!==void 0?null:t.point||n.shape?V(t.point)?t.point:{}:void 0}function Rc(e,t={}){return e.line?e.line===!0?{}:e.line:e.line!==void 0?null:t.line?t.line===!0?{}:t.line:void 0}class o1{constructor(){this.name="path-overlay"}hasMatchingType(t,n){if(en(t)){const{mark:i,encoding:r}=t,s=Ot(i)?i:{type:i};switch(s.type){case"line":case"rule":case"trail":return!!vo(s,n[s.type],r);case"area":return!!vo(s,n[s.type],r)||!!Rc(s,n[s.type])}}return!1}run(t,n,i){const{config:r}=n,{params:s,projection:o,mark:a,name:u,encoding:c,...l}=t,f=Ws(c,r),d=Ot(a)?a:{type:a},p=vo(d,r[d.type],f),g=d.type==="area"&&Rc(d,r[d.type]),h=[{name:u,...s?{params:s}:{},mark:r1({...d.type==="area"&&d.opacity===void 0&&d.fillOpacity===void 0?{opacity:.7}:{},...d}),encoding:Me(f,["shape"])}],m=op(ap(d,f,r),f);let y=f;if(m){const{fieldChannel:x,offset:$}=m;y={...f,[x]:{...f[x],...$?{stack:$}:{}}}}return y=Me(y,["y2","x2"]),g&&h.push({...o?{projection:o}:{},mark:{type:"line",...Ei(d,["clip","interpolate","tension","tooltip"]),...g},encoding:y}),p&&h.push({...o?{projection:o}:{},mark:{type:"point",opacity:1,filled:!0,...Ei(d,["clip","tooltip"]),...p},encoding:y}),i({...l,layer:h},{...n,config:s1(r)})}}function a1(e,t){return t?$r(e)?cp(e,t):up(e,t):e}function Eo(e,t){return t?cp(e,t):e}function na(e,t,n){const i=t[e];if(Wy(i)){if(i.repeat in n)return{...t,[e]:n[i.repeat]};A(Um(i.repeat));return}return t}function up(e,t){if(e=na("field",e,t),e!==void 0){if(e===null)return null;if(cu(e)&&Ct(e.sort)){const n=na("field",e.sort,t);e={...e,...n?{sort:n}:{}}}return e}}function Lc(e,t){if(S(e))return up(e,t);{const n=na("datum",e,t);return n!==e&&!n.type&&(n.type="nominal"),n}}function Pc(e,t){if(U(e)){const n=Lc(e,t);if(n)return n;if(Bs(e))return{condition:e.condition}}else{if(Or(e)){const n=Lc(e.condition,t);if(n)return{...e,condition:n};{const{condition:i,...r}=e;return r}}return e}}function cp(e,t){const n={};for(const i in e)if(pi(e,i)){const r=e[i];if(T(r))n[i]=r.map(s=>Pc(s,t)).filter(s=>s);else{const s=Pc(r,t);s!==void 0&&(n[i]=s)}}return n}class u1{constructor(){this.name="RuleForRangedLine"}hasMatchingType(t){if(en(t)){const{encoding:n,mark:i}=t;if(i==="line"||Ot(i)&&i.type==="line")for(const r of cm){const s=ei(r),o=n[s];if(n[r]&&(S(o)&&!Fe(o.bin)||Lt(o)))return!0}}return!1}run(t,n,i){const{encoding:r,mark:s}=t;return A(c0(!!r.x2,!!r.y2)),i({...t,mark:V(s)?{...s,type:"rule"}:"rule"},n)}}class c1 extends wu{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[fb,gb,Eb,new o1,new u1]}map(t,n){if(en(t)){const i=Pn(t.encoding,Wt),r=Pn(t.encoding,Gt),s=Pn(t.encoding,As);if(i||r||s)return this.mapFacetedUnit(t,n)}return super.map(t,n)}mapUnit(t,n){const{parentEncoding:i,parentProjection:r}=n,s=Eo(t.encoding,n.repeater),o={...t,...t.name?{name:[n.repeaterPrefix,t.name].filter(u=>u).join("_")}:{},...s?{encoding:s}:{}};if(i||r)return this.mapUnitWithParentEncodingOrProjection(o,n);const a=this.mapLayerOrUnit.bind(this);for(const u of this.nonFacetUnitNormalizers)if(u.hasMatchingType(o,n.config))return u.run(o,n,a);return o}mapRepeat(t,n){return Vb(t)?this.mapLayerRepeat(t,n):this.mapNonLayerRepeat(t,n)}mapLayerRepeat(t,n){const{repeat:i,spec:r,...s}=t,{row:o,column:a,layer:u}=i,{repeater:c={},repeaterPrefix:l=""}=n;return o||a?this.mapRepeat({...t,repeat:{...o?{row:o}:{},...a?{column:a}:{}},spec:{repeat:{layer:u},spec:r}},n):{...s,layer:u.map(f=>{const d={...c,layer:f},p=`${(r.name?`${r.name}_`:"")+l}child__layer_${le(f)}`,g=this.mapLayerOrUnit(r,{...n,repeater:d,repeaterPrefix:p});return g.name=p,g})}}mapNonLayerRepeat(t,n){const{repeat:i,spec:r,data:s,...o}=t;!T(i)&&t.columns&&(t=Me(t,["columns"]),A(mc("repeat")));const a=[],{repeater:u={},repeaterPrefix:c=""}=n,l=!T(i)&&i.row||[u?u.row:null],f=!T(i)&&i.column||[u?u.column:null],d=T(i)&&i||[u?u.repeat:null];for(const g of d)for(const h of l)for(const m of f){const y={repeat:g,row:h,column:m,layer:u.layer},x=(r.name?`${r.name}_`:"")+c+"child__"+(T(i)?`${le(g)}`:(i.row?`row_${le(h)}`:"")+(i.column?`column_${le(m)}`:"")),$=this.map(r,{...n,repeater:y,repeaterPrefix:x});$.name=x,a.push(Me($,["data"]))}const p=T(i)?t.columns:i.column?i.column.length:1;return{data:r.data??s,align:"all",...o,columns:p,concat:a}}mapFacet(t,n){const{facet:i}=t;return $r(i)&&t.columns&&(t=Me(t,["columns"]),A(mc("facet"))),super.mapFacet(t,n)}mapUnitWithParentEncodingOrProjection(t,n){const{encoding:i,projection:r}=t,{parentEncoding:s,parentProjection:o,config:a}=n,u=zc({parentProjection:o,projection:r}),c=Bc({parentEncoding:s,encoding:Eo(i,n.repeater)});return this.mapUnit({...t,...u?{projection:u}:{},...c?{encoding:c}:{}},{config:a})}mapFacetedUnit(t,n){const{row:i,column:r,facet:s,...o}=t.encoding,{mark:a,width:u,projection:c,height:l,view:f,params:d,encoding:p,...g}=t,{facetMapping:h,layout:m}=this.getFacetMappingAndLayout({row:i,column:r,facet:s},n),y=Eo(o,n.repeater);return this.mapFacet({...g,...m,facet:h,spec:{...u?{width:u}:{},...l?{height:l}:{},...f?{view:f}:{},...c?{projection:c}:{},mark:a,encoding:y,...d?{params:d}:{}}},n)}getFacetMappingAndLayout(t,n){const{row:i,column:r,facet:s}=t;if(i||r){s&&A(a0([...i?[Wt]:[],...r?[Gt]:[]]));const o={},a={};for(const u of[Wt,Gt]){const c=t[u];if(c){const{align:l,center:f,spacing:d,columns:p,...g}=c;o[u]=g;for(const h of["align","center","spacing"])c[h]!==void 0&&(a[h]??(a[h]={}),a[h][u]=c[h])}}return{facetMapping:o,layout:a}}else{const{align:o,center:a,spacing:u,columns:c,...l}=s;return{facetMapping:a1(l,n.repeater),layout:{...o?{align:o}:{},...a?{center:a}:{},...u?{spacing:u}:{},...c?{columns:c}:{}}}}}mapLayer(t,{parentEncoding:n,parentProjection:i,...r}){const{encoding:s,projection:o,...a}=t,u={...r,parentEncoding:Bc({parentEncoding:n,encoding:s,layer:!0}),parentProjection:zc({parentProjection:i,projection:o})};return super.mapLayer({...a,...t.name?{name:[u.repeaterPrefix,t.name].filter(c=>c).join("_")}:{}},u)}}function Bc({parentEncoding:e,encoding:t={},layer:n}){let i={};if(e){const r=new Set([...E(e),...E(t)]);for(const s of r){const o=t[s],a=e[s];if(U(o)){const u={...a,...o};i[s]=u}else Or(o)?i[s]={...o,condition:{...a,...o.condition}}:o||o===null?i[s]=o:(n||lt(a)||I(a)||U(a)||T(a))&&(i[s]=a)}}else i=t;return!i||te(i)?void 0:i}function zc(e){const{parentProjection:t,projection:n}=e;return t&&n&&A(Vm({parentProjection:t,projection:n})),n??t}function Cu(e){return"filter"in e}function l1(e){return(e==null?void 0:e.stop)!==void 0}function lp(e){return"lookup"in e}function f1(e){return"data"in e}function d1(e){return"param"in e}function p1(e){return"pivot"in e}function g1(e){return"density"in e}function h1(e){return"quantile"in e}function m1(e){return"regression"in e}function y1(e){return"loess"in e}function b1(e){return"sample"in e}function x1(e){return"window"in e}function v1(e){return"joinaggregate"in e}function E1(e){return"flatten"in e}function A1(e){return"calculate"in e}function fp(e){return"bin"in e}function S1(e){return"impute"in e}function w1(e){return"timeUnit"in e}function C1(e){return"aggregate"in e}function F1(e){return"stack"in e}function $1(e){return"fold"in e}function O1(e){return"extent"in e&&!("density"in e)}function N1(e){return e.map(t=>Cu(t)?{filter:hi(t.filter,ny)}:t)}class T1 extends wu{map(t,n){return n.emptySelections??(n.emptySelections={}),n.selectionPredicates??(n.selectionPredicates={}),t=Mc(t,n),super.map(t,n)}mapLayerOrUnit(t,n){if(t=Mc(t,n),t.encoding){const i={};for(const[r,s]of un(t.encoding))i[r]=dp(s,n);t={...t,encoding:i}}return super.mapLayerOrUnit(t,n)}mapUnit(t,n){const{selection:i,...r}=t;return i?{...r,params:un(i).map(([s,o])=>{const{init:a,bind:u,empty:c,...l}=o;l.type==="single"?(l.type="point",l.toggle=!1):l.type==="multi"&&(l.type="point"),n.emptySelections[s]=c!=="none";for(const f of Oe(n.selectionPredicates[s]??{}))f.empty=c!=="none";return{name:s,value:a,select:l,bind:u}})}:t}}function Mc(e,t){const{transform:n,...i}=e;if(n){const r=n.map(s=>{if(Cu(s))return{filter:ia(s,t)};if(fp(s)&&ti(s.bin))return{...s,bin:pp(s.bin)};if(lp(s)){const{selection:o,...a}=s.from;return o?{...s,from:{param:o,...a}}:s}return s});return{...i,transform:r}}return e}function dp(e,t){var i,r;const n=M(e);if(S(n)&&ti(n.bin)&&(n.bin=pp(n.bin)),ri(n)&&((r=(i=n.scale)==null?void 0:i.domain)!=null&&r.selection)){const{selection:s,...o}=n.scale.domain;n.scale.domain={...o,...s?{param:s}:{}}}if(Bs(n))if(T(n.condition))n.condition=n.condition.map(s=>{const{selection:o,param:a,test:u,...c}=s;return a?s:{...c,test:ia(s,t)}});else{const{selection:s,param:o,test:a,...u}=dp(n.condition,t);n.condition=o?n.condition:{...u,test:ia(n.condition,t)}}return n}function pp(e){const t=e.extent;if(t!=null&&t.selection){const{selection:n,...i}=t;return{...e,extent:{...i,param:n}}}return e}function ia(e,t){const n=i=>hi(i,r=>{var s;const o=t.emptySelections[r]??!0,a={param:r,empty:o};return(s=t.selectionPredicates)[r]??(s[r]=[]),t.selectionPredicates[r].push(a),a});return e.selection?n(e.selection):hi(e.test||e.filter,i=>i.selection?n(i.selection):i)}class ra extends wu{map(t,n){const i=n.selections??[];if(t.params&&!en(t)){const r=[];for(const s of t.params)Eu(s)?i.push(s):r.push(s);t.params=r}return n.selections=i,super.map(t,n)}mapUnit(t,n){const i=n.selections;if(!i||!i.length)return t;const r=(n.path??[]).concat(t.name),s=[];for(const o of i)if(!o.views||!o.views.length)s.push(o);else for(const a of o.views)(B(a)&&(a===t.name||r.includes(a))||T(a)&&a.map(u=>r.indexOf(u)).every((u,c,l)=>u!==-1&&(c===0||u>l[c-1])))&&s.push(o);return s.length&&(t.params=s),t}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=ra.prototype[e];ra.prototype[e]=function(n,i){return t.call(this,n,D1(n,i))}}function D1(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}function gp(e,t){t===void 0&&(t=sp(e.config));const n=R1(e,t),{width:i,height:r}=e,s=L1(n,{width:i,height:r,autosize:e.autosize},t);return{...n,...s?{autosize:s}:{}}}const _1=new c1,k1=new T1,I1=new ra;function R1(e,t={}){const n={config:t};return I1.map(_1.map(k1.map(e,n),n),n)}function jc(e){return B(e)?{type:e}:e??{}}function L1(e,t,n){let{width:i,height:r}=t;const s=en(e)||Hs(e),o={};s?i=="container"&&r=="container"?(o.type="fit",o.contains="padding"):i=="container"?(o.type="fit-x",o.contains="padding"):r=="container"&&(o.type="fit-y",o.contains="padding"):(i=="container"&&(A(dc("width")),i=void 0),r=="container"&&(A(dc("height")),r=void 0));const a={type:"pad",...o,...n?jc(n.autosize):{},...jc(e.autosize)};if(a.type==="fit"&&!s&&(A(_m),a.type="pad"),i=="container"&&!(a.type=="fit"||a.type=="fit-x")&&A(pc("width")),r=="container"&&!(a.type=="fit"||a.type=="fit-y")&&A(pc("height")),!St(a,{type:"pad"}))return a}function P1(e){return e==="fit"||e==="fit-x"||e==="fit-y"}function B1(e){return e?`fit-${$s(e)}`:"fit"}const z1=["background","padding"];function Uc(e,t){const n={};for(const i of z1)e&&e[i]!==void 0&&(n[i]=Xe(e[i]));return t&&(n.params=e.params),n}class tn{constructor(t={},n={}){this.explicit=t,this.implicit=n}clone(){return new tn(M(this.explicit),M(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(t){return me(this.explicit[t],this.implicit[t])}getWithExplicit(t){return this.explicit[t]!==void 0?{explicit:!0,value:this.explicit[t]}:this.implicit[t]!==void 0?{explicit:!1,value:this.implicit[t]}:{explicit:!1,value:void 0}}setWithExplicit(t,{value:n,explicit:i}){n!==void 0&&this.set(t,n,i)}set(t,n,i){return delete this[i?"implicit":"explicit"][t],this[i?"explicit":"implicit"][t]=n,this}copyKeyFromSplit(t,{explicit:n,implicit:i}){n[t]!==void 0?this.set(t,n[t],!0):i[t]!==void 0&&this.set(t,i[t],!1)}copyKeyFromObject(t,n){n[t]!==void 0&&this.set(t,n[t],!0)}copyAll(t){for(const n of E(t.combine())){const i=t.getWithExplicit(n);this.setWithExplicit(n,i)}}}function At(e){return{explicit:!0,value:e}}function qe(e){return{explicit:!1,value:e}}function hp(e){return(t,n,i,r)=>{const s=e(t.value,n.value);return s>0?t:s<0?n:qs(t,n,i,r)}}function qs(e,t,n,i){return e.explicit&&t.explicit&&A(x0(n,i,e.value,t.value)),e}function ln(e,t,n,i,r=qs){return e===void 0||e.value===void 0?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:St(e.value,t.value)?e:r(e,t,n,i)}class M1 extends tn{constructor(t={},n={},i=!1){super(t,n),this.explicit=t,this.implicit=n,this.parseNothing=i}clone(){const t=super.clone();return t.parseNothing=this.parseNothing,t}}function Ti(e){return"url"in e}function dr(e){return"values"in e}function mp(e){return"name"in e&&!Ti(e)&&!dr(e)&&!on(e)}function on(e){return e&&(yp(e)||bp(e)||Fu(e))}function yp(e){return"sequence"in e}function bp(e){return"sphere"in e}function Fu(e){return"graticule"in e}var re;(function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup"})(re||(re={}));function xp(e){const{signals:t,hasLegend:n,index:i,...r}=e;return r.field=Qe(r.field),r}function Xn(e,t=!0,n=Kg){if(T(e)){const i=e.map(r=>Xn(r,t,n));return t?`[${i.join(", ")}]`:i}else if(ni(e))return n(t?Wn(e):G0(e));return t?n(se(e)):e}function j1(e,t){for(const n of Oe(e.component.selection??{})){const i=n.name;let r=`${i}${dn}, ${n.resolve==="global"?"true":`{unit: ${Bn(e)}}`}`;for(const s of Vs)s.defined(n)&&(s.signals&&(t=s.signals(e,n,t)),s.modifyExpr&&(r=s.modifyExpr(e,n,r)));t.push({name:i+xx,on:[{events:{signal:n.name+dn},update:`modify(${G(n.name+Vn)}, ${r})`}]})}return $u(t)}function U1(e,t){if(e.component.selection&&E(e.component.selection).length){const n=G(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:Pi("mousemove","scope"),update:`isTuple(facet) ? facet : group(${n}).datum`}]})}return $u(t)}function W1(e,t){let n=!1;for(const i of Oe(e.component.selection??{})){const r=i.name,s=G(r+Vn);if(t.filter(a=>a.name===r).length===0){const a=i.resolve==="global"?"union":i.resolve,u=i.type==="point"?", true, true)":")";t.push({name:i.name,update:`${Lp}(${s}, ${G(a)}${u}`})}n=!0;for(const a of Vs)a.defined(i)&&a.topLevelSignals&&(t=a.topLevelSignals(e,i,t))}return n&&t.filter(r=>r.name==="unit").length===0&&t.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),$u(t)}function G1(e,t){const n=[...t],i=Bn(e,{escape:!1});for(const r of Oe(e.component.selection??{})){const s={name:r.name+Vn};if(r.project.hasSelectionId&&(s.transform=[{type:"collect",sort:{field:ft}}]),r.init){const a=r.project.items.map(xp);s.values=r.project.hasSelectionId?r.init.map(u=>({unit:i,[ft]:Xn(u,!1)[0]})):r.init.map(u=>({unit:i,fields:a,values:Xn(u,!1)}))}n.filter(a=>a.name===r.name+Vn).length||n.push(s)}return n}function vp(e,t){for(const n of Oe(e.component.selection??{}))for(const i of Vs)i.defined(n)&&i.marks&&(t=i.marks(e,n,t));return t}function H1(e,t){for(const n of e.children)pe(n)&&(t=vp(n,t));return t}function q1(e,t,n,i){const r=Xp(e,t.param,t);return{signal:Ye(n.get("type"))&&T(i)&&i[0]>i[1]?`isValid(${r}) && reverse(${r})`:r}}function $u(e){return e.map(t=>(t.on&&!t.on.length&&delete t.on,t))}class ee{constructor(t,n){this.debugName=n,this._children=[],this._parent=null,t&&(this.parent=t)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(t){this._parent=t,t&&t.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(t,n){if(this._children.includes(t)){A(Hm);return}n!==void 0?this._children.splice(n,0,t):this._children.push(t)}removeChild(t){const n=this._children.indexOf(t);return this._children.splice(n,1),n}remove(){let t=this._parent.removeChild(this);for(const n of this._children)n._parent=this._parent,this._parent.addChild(n,t++)}insertAsParentOf(t){const n=t.parent;n.removeChild(this),this.parent=n,t.parent=this}swapWithParent(){const t=this._parent,n=t.parent;for(const r of this._children)r.parent=t;this._children=[],t.removeChild(this);const i=t.parent.removeChild(t);this._parent=n,n.addChild(this,i),t.parent=this}}class Ie extends ee{clone(){const t=new this.constructor;return t.debugName=`clone_${this.debugName}`,t._source=this._source,t._name=`clone_${this._name}`,t.type=this.type,t.refCounts=this.refCounts,t.refCounts[t._name]=0,t}constructor(t,n,i,r){super(t,n),this.type=i,this.refCounts=r,this._source=this._name=n,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}dependentFields(){return new Set}producedFields(){return new Set}hash(){return this._hash===void 0&&(this._hash=`Output ${hf()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(t){this._source=t}}function Ao(e){return e.as!==void 0}function Wc(e){return`${e}_end`}class Ft extends ee{clone(){return new Ft(null,M(this.formula))}constructor(t,n){super(t),this.formula=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,s)=>{const{field:o,timeUnit:a}=s;if(a){let u;if(ii(a)){if(pe(n)){const{mark:c}=n;(iu(c)||s.bandPosition)&&(u={timeUnit:Ee(a),field:o})}}else u={as:C(s,{forAs:!0}),field:o,timeUnit:a};u&&(r[H(u)]=u)}return r},{});return te(i)?null:new Ft(t,i)}static makeFromTransform(t,n){const{timeUnit:i,...r}={...n},s=Ee(i),o={...r,timeUnit:s};return new Ft(t,{[H(o)]:o})}merge(t){this.formula={...this.formula};for(const n in t.formula)this.formula[n]||(this.formula[n]=t.formula[n]);for(const n of t.children)t.removeChild(n),n.parent=this;t.remove()}removeFormulas(t){const n={};for(const[i,r]of un(this.formula)){const s=Ao(r)?r.as:`${r.field}_end`;t.has(s)||(n[i]=r)}this.formula=n}producedFields(){return new Set(Oe(this.formula).map(t=>Ao(t)?t.as:Wc(t.field)))}dependentFields(){return new Set(Oe(this.formula).map(t=>t.field))}hash(){return`TimeUnit ${H(this.formula)}`}assemble(){const t=[];for(const n of Oe(this.formula))if(Ao(n)){const{field:i,as:r,timeUnit:s}=n,{unit:o,utc:a,...u}=Ee(s);t.push({field:Qe(i),type:"timeunit",...o?{units:Ds(o)}:{},...a?{timezone:"utc"}:{},...u,as:[r,`${r}_end`]})}else if(n){const{field:i,timeUnit:r}=n,s=Qf(r==null?void 0:r.unit),{part:o,step:a}=nd(s,r.step);t.push({type:"formula",expr:`timeOffset('${o}', datum['${i}'], ${a})`,as:Wc(i)})}return t}}const Dr="_tuple_fields";class X1{constructor(...t){this.items=t,this.hasChannel={},this.hasField={},this.hasSelectionId=!1}}const V1={defined:()=>!0,parse:(e,t,n)=>{const i=t.name,r=t.project??(t.project=new X1),s={},o={},a=new Set,u=(g,h)=>{const m=h==="visual"?g.channel:g.field;let y=le(`${i}_${m}`);for(let x=1;a.has(y);x++)y=le(`${i}_${m}_${x}`);return a.add(y),{[h]:y}},c=t.type,l=e.config.selection[c],f=n.value!==void 0?ge(n.value):null;let{fields:d,encodings:p}=V(n.select)?n.select:{};if(!d&&!p&&f){for(const g of f)if(V(g))for(const h of E(g))um(h)?(p||(p=[])).push(h):c==="interval"?(A(jm),p=l.encodings):(d??(d=[])).push(h)}!d&&!p&&(p=l.encodings,"fields"in l&&(d=l.fields));for(const g of p??[]){const h=e.fieldDef(g);if(h){let m=h.field;if(h.aggregate){A(km(g,h.aggregate));continue}else if(!m){A(hc(g));continue}if(h.timeUnit&&!ii(h.timeUnit)){m=e.vgField(g);const y={timeUnit:h.timeUnit,as:m,field:h.field};o[H(y)]=y}if(!s[m]){const y=c==="interval"&&Zt(g)&&Ye(e.getScaleComponent(g).get("type"))?"R":h.bin?"R-RE":"E",x={field:m,channel:g,type:y,index:r.items.length};x.signals={...u(x,"data"),...u(x,"visual")},r.items.push(s[m]=x),r.hasField[m]=s[m],r.hasSelectionId=r.hasSelectionId||m===ft,Ef(g)?(x.geoChannel=g,x.channel=vf(g),r.hasChannel[x.channel]=s[m]):r.hasChannel[g]=s[m]}}else A(hc(g))}for(const g of d??[]){if(r.hasField[g])continue;const h={type:"E",field:g,index:r.items.length};h.signals={...u(h,"data")},r.items.push(h),r.hasField[g]=h,r.hasSelectionId=r.hasSelectionId||g===ft}f&&(t.init=f.map(g=>r.items.map(h=>V(g)?g[h.geoChannel||h.channel]!==void 0?g[h.geoChannel||h.channel]:g[h.field]:g))),te(o)||(r.timeUnit=new Ft(null,o))},signals:(e,t,n)=>{const i=t.name+Dr;return n.filter(s=>s.name===i).length>0||t.project.hasSelectionId?n:n.concat({name:i,value:t.project.items.map(xp)})}},Ht={defined:e=>e.type==="interval"&&e.resolve==="global"&&e.bind&&e.bind==="scales",parse:(e,t)=>{const n=t.scales=[];for(const i of t.project.items){const r=i.channel;if(!Zt(r))continue;const s=e.getScaleComponent(r),o=s?s.get("type"):void 0;if(!s||!Ye(o)){A(Lm);continue}s.set("selectionExtent",{param:t.name,field:i.field},!0),n.push(i)}},topLevelSignals:(e,t,n)=>{const i=t.scales.filter(o=>n.filter(a=>a.name===o.signals.data).length===0);if(!e.parent||Gc(e)||i.length===0)return n;const r=n.filter(o=>o.name===t.name)[0];let s=r.update;if(s.indexOf(Lp)>=0)r.update=`{${i.map(o=>`${G(Qe(o.field))}: ${o.signals.data}`).join(", ")}}`;else{for(const o of i){const a=`${G(Qe(o.field))}: ${o.signals.data}`;s.includes(a)||(s=`${s.substring(0,s.length-1)}, ${a}}`)}r.update=s}return n.concat(i.map(o=>({name:o.signals.data})))},signals:(e,t,n)=>{if(e.parent&&!Gc(e))for(const i of t.scales){const r=n.filter(s=>s.name===i.signals.data)[0];r.push="outer",delete r.value,delete r.update}return n}};function sa(e,t){return`domain(${G(e.scaleName(t))})`}function Gc(e){return e.parent&&Hi(e.parent)&&!e.parent.parent}const bi="_brush",Ep="_scale_trigger",Vi="geo_interval_init_tick",Ap="_init",Y1="_center",K1={defined:e=>e.type==="interval",parse:(e,t,n)=>{var i;if(e.hasProjection){const r={...V(n.select)?n.select:{}};r.fields=[ft],r.encodings||(r.encodings=n.value?E(n.value):[ht,gt]),n.select={type:"interval",...r}}if(t.translate&&!Ht.defined(t)){const r=`!event.item || event.item.mark.name !== ${G(t.name+bi)}`;for(const s of t.events){if(!s.between){A(`${s} is not an ordered event stream for interval selections.`);continue}const o=ge((i=s.between[0]).filter??(i.filter=[]));o.indexOf(r)<0&&o.push(r)}}},signals:(e,t,n)=>{const i=t.name,r=i+dn,s=Oe(t.project.hasChannel).filter(a=>a.channel===fe||a.channel===Ae),o=t.init?t.init[0]:null;if(n.push(...s.reduce((a,u)=>a.concat(J1(e,t,u,o&&o[u.index])),[])),e.hasProjection){const a=G(e.projectionName()),u=e.projectionName()+Y1,{x:c,y:l}=t.project.hasChannel,f=c&&c.signals.visual,d=l&&l.signals.visual,p=c?o&&o[c.index]:`${u}[0]`,g=l?o&&o[l.index]:`${u}[1]`,h=v=>e.getSizeSignalRef(v).signal,m=`[[${f?f+"[0]":"0"}, ${d?d+"[0]":"0"}],[${f?f+"[1]":h("width")}, ${d?d+"[1]":h("height")}]]`;o&&(n.unshift({name:i+Ap,init:`[scale(${a}, [${c?p[0]:p}, ${l?g[0]:g}]), scale(${a}, [${c?p[1]:p}, ${l?g[1]:g}])]`}),(!c||!l)&&(n.find(N=>N.name===u)||n.unshift({name:u,update:`invert(${a}, [${h("width")}/2, ${h("height")}/2])`})));const y=`intersect(${m}, {markname: ${G(e.getName("marks"))}}, unit.mark)`,x=`{unit: ${Bn(e)}}`,$=`vlSelectionTuples(${y}, ${x})`,R=s.map(v=>v.signals.visual);return n.concat({name:r,on:[{events:[...R.length?[{signal:R.join(" || ")}]:[],...o?[{signal:Vi}]:[]],update:$}]})}else{if(!Ht.defined(t)){const c=i+Ep,l=s.map(f=>{const d=f.channel,{data:p,visual:g}=f.signals,h=G(e.scaleName(d)),m=e.getScaleComponent(d).get("type"),y=Ye(m)?"+":"";return`(!isArray(${p}) || (${y}invert(${h}, ${g})[0] === ${y}${p}[0] && ${y}invert(${h}, ${g})[1] === ${y}${p}[1]))`});l.length&&n.push({name:c,value:{},on:[{events:s.map(f=>({scale:e.scaleName(f.channel)})),update:l.join(" && ")+` ? ${c} : {}`}]})}const a=s.map(c=>c.signals.data),u=`unit: ${Bn(e)}, fields: ${i+Dr}, values`;return n.concat({name:r,...o?{init:`{${u}: ${Xn(o)}}`}:{},...a.length?{on:[{events:[{signal:a.join(" || ")}],update:`${a.join(" && ")} ? {${u}: [${a}]} : null`}]}:{}})}},topLevelSignals:(e,t,n)=>(pe(e)&&e.hasProjection&&t.init&&(n.filter(r=>r.name===Vi).length||n.unshift({name:Vi,value:null,on:[{events:"timer{1}",update:`${Vi} === null ? {} : ${Vi}`}]})),n),marks:(e,t,n)=>{const i=t.name,{x:r,y:s}=t.project.hasChannel,o=r==null?void 0:r.signals.visual,a=s==null?void 0:s.signals.visual,u=`data(${G(t.name+Vn)})`;if(Ht.defined(t)||!r&&!s)return n;const c={x:r!==void 0?{signal:`${o}[0]`}:{value:0},y:s!==void 0?{signal:`${a}[0]`}:{value:0},x2:r!==void 0?{signal:`${o}[1]`}:{field:{group:"width"}},y2:s!==void 0?{signal:`${a}[1]`}:{field:{group:"height"}}};if(t.resolve==="global")for(const h of E(c))c[h]=[{test:`${u}.length && ${u}[0].unit === ${Bn(e)}`,...c[h]},{value:0}];const{fill:l,fillOpacity:f,cursor:d,...p}=t.mark,g=E(p).reduce((h,m)=>(h[m]=[{test:[r!==void 0&&`${o}[0] !== ${o}[1]`,s!==void 0&&`${a}[0] !== ${a}[1]`].filter(y=>y).join(" && "),value:p[m]},{value:null}],h),{});return[{name:`${i+bi}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:l},fillOpacity:{value:f}},update:c}},...n,{name:i+bi,type:"rect",clip:!0,encode:{enter:{...d?{cursor:{value:d}}:{},fill:{value:"transparent"}},update:{...c,...g}}}]}};function J1(e,t,n,i){const r=!e.hasProjection,s=n.channel,o=n.signals.visual,a=G(r?e.scaleName(s):e.projectionName()),u=d=>`scale(${a}, ${d})`,c=e.getSizeSignalRef(s===fe?"width":"height").signal,l=`${s}(unit)`,f=t.events.reduce((d,p)=>[...d,{events:p.between[0],update:`[${l}, ${l}]`},{events:p,update:`[${o}[0], clamp(${l}, 0, ${c})]`}],[]);if(r){const d=n.signals.data,p=Ht.defined(t),g=e.getScaleComponent(s),h=g?g.get("type"):void 0,m=i?{init:Xn(i,!0,u)}:{value:[]};return f.push({events:{signal:t.name+Ep},update:Ye(h)?`[${u(`${d}[0]`)}, ${u(`${d}[1]`)}]`:"[0, 0]"}),p?[{name:d,on:[]}]:[{name:o,...m,on:f},{name:d,...i?{init:Xn(i)}:{},on:[{events:{signal:o},update:`${o}[0] === ${o}[1] ? null : invert(${a}, ${o})`}]}]}else{const d=s===fe?0:1,p=t.name+Ap,g=i?{init:`[${p}[0][${d}], ${p}[1][${d}]]`}:{value:[]};return[{name:o,...g,on:f}]}}const Q1={defined:e=>e.type==="point",signals:(e,t,n)=>{const i=t.name,r=i+Dr,s=t.project,o="(item().isVoronoi ? datum.datum : datum)",a=Oe(e.component.selection??{}).reduce((f,d)=>d.type==="interval"?f.concat(d.name+bi):f,[]).map(f=>`indexof(item().mark.name, '${f}') < 0`).join(" && "),u=`datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0${a?` && ${a}`:""}`;let c=`unit: ${Bn(e)}, `;if(t.project.hasSelectionId)c+=`${ft}: ${o}[${G(ft)}]`;else{const f=s.items.map(d=>{const p=e.fieldDef(d.channel);return p!=null&&p.bin?`[${o}[${G(e.vgField(d.channel,{}))}], ${o}[${G(e.vgField(d.channel,{binSuffix:"end"}))}]]`:`${o}[${G(d.field)}]`}).join(", ");c+=`fields: ${r}, values: [${f}]`}const l=t.events;return n.concat([{name:i+dn,on:l?[{events:l,update:`${u} ? {${c}} : null`,force:!0}]:[]}])}};function ji(e,t,n,i){const r=Bs(t)&&t.condition,s=i(t);if(r){const a=ge(r).map(u=>{const c=i(u);if(Uy(u)){const{param:l,empty:f}=u;return{test:qp(e,{param:l,empty:f}),...c}}else return{test:gs(e,u.test),...c}});return{[n]:[...a,...s!==void 0?[s]:[]]}}else return s!==void 0?{[n]:s}:{}}function Ou(e,t="text"){const n=e.encoding[t];return ji(e,n,t,i=>Xs(i,e.config))}function Xs(e,t,n="datum"){if(e){if(lt(e))return ue(e.value);if(U(e)){const{format:i,formatType:r}=os(e);return au({fieldOrDatumDef:e,format:i,formatType:r,expr:n,config:t})}}}function Sp(e,t={}){const{encoding:n,markDef:i,config:r,stack:s}=e,o=n.tooltip;if(T(o))return{tooltip:Hc({tooltip:o},s,r,t)};{const a=t.reactiveGeom?"datum.datum":"datum";return ji(e,o,"tooltip",u=>{const c=Xs(u,r,a);if(c)return c;if(u===null)return;let l=Q("tooltip",i,r);if(l===!0&&(l={content:"encoding"}),B(l))return{value:l};if(V(l))return I(l)?l:l.content==="encoding"?Hc(n,s,r,t):{signal:a}})}}function wp(e,t,n,{reactiveGeom:i}={}){const r={...n,...n.tooltipFormat},s={},o=i?"datum.datum":"datum",a=[];function u(l,f){const d=ei(f),p=Re(l)?l:{...l,type:e[d].type},g=p.title||fu(p,r),h=ge(g).join(", ").replaceAll(/"/g,'\\"');let m;if(Se(f)){const y=f==="x"?"x2":"y2",x=Nt(e[y]);if(Fe(p.bin)&&x){const $=C(p,{expr:o}),R=C(x,{expr:o}),{format:v,formatType:N}=os(p);m=Fr($,R,v,N,r),s[y]=!0}}if((Se(f)||f===et||f===pt)&&t&&t.fieldChannel===f&&t.offset==="normalize"){const{format:y,formatType:x}=os(p);m=au({fieldOrDatumDef:p,format:y,formatType:x,expr:o,config:r,normalizeStack:!0}).signal}m??(m=Xs(p,r,o).signal),a.push({channel:f,key:h,value:m})}gu(e,(l,f)=>{S(l)?u(l,f):zs(l)&&u(l.condition,f)});const c={};for(const{channel:l,key:f,value:d}of a)!s[l]&&!c[f]&&(c[f]=d);return c}function Hc(e,t,n,{reactiveGeom:i}={}){const r=wp(e,t,n,{reactiveGeom:i}),s=un(r).map(([o,a])=>`"${o}": ${a}`);return s.length>0?{signal:`{${s.join(", ")}}`}:void 0}function Z1(e){const{markDef:t,config:n}=e,i=Q("aria",t,n);return i===!1?{}:{...i?{aria:i}:{},...ex(e),...tx(e)}}function ex(e){const{mark:t,markDef:n,config:i}=e;if(i.aria===!1)return{};const r=Q("ariaRoleDescription",n,i);return r!=null?{ariaRoleDescription:{value:r}}:t in Nm?{}:{ariaRoleDescription:{value:t}}}function tx(e){const{encoding:t,markDef:n,config:i,stack:r}=e,s=t.description;if(s)return ji(e,s,"description",u=>Xs(u,e.config));const o=Q("description",n,i);if(o!=null)return{description:ue(o)};if(i.aria===!1)return{};const a=wp(t,r,i);if(!te(a))return{description:{signal:un(a).map(([u,c],l)=>`"${l>0?"; ":""}${u}: " + (${c})`).join(" + ")}}}function xe(e,t,n={}){const{markDef:i,encoding:r,config:s}=t,{vgChannel:o}=n;let{defaultRef:a,defaultValue:u}=n;a===void 0&&(u??(u=Q(e,i,s,{vgChannel:o,ignoreVgConfig:!0})),u!==void 0&&(a=ue(u)));const c=r[e];return ji(t,c,o??e,l=>ou({channel:e,channelDef:l,markDef:i,config:s,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:null,defaultRef:a}))}function Cp(e,t={filled:void 0}){const{markDef:n,encoding:i,config:r}=e,{type:s}=n,o=t.filled??Q("filled",n,r),a=q(["bar","point","circle","square","geoshape"],s)?"transparent":void 0,u=Q(o===!0?"color":void 0,n,r,{vgChannel:"fill"})??r.mark[o===!0&&"color"]??a,c=Q(o===!1?"color":void 0,n,r,{vgChannel:"stroke"})??r.mark[o===!1&&"color"],l=o?"fill":"stroke",f={...u?{fill:ue(u)}:{},...c?{stroke:ue(c)}:{}};return n.color&&(o?n.fill:n.stroke)&&A(Wf("property",{fill:"fill"in n,stroke:"stroke"in n})),{...f,...xe("color",e,{vgChannel:l,defaultValue:o?u:c}),...xe("fill",e,{defaultValue:i.fill?u:void 0}),...xe("stroke",e,{defaultValue:i.stroke?c:void 0})}}function nx(e){const{encoding:t,mark:n}=e,i=t.order;return!En(n)&&lt(i)?ji(e,i,"zindex",r=>ue(r.value)):{}}function Di({channel:e,markDef:t,encoding:n={},model:i,bandPosition:r}){const s=`${e}Offset`,o=t[s],a=n[s];if((s==="xOffset"||s==="yOffset")&&a)return{offsetType:"encoding",offset:ou({channel:s,channelDef:a,markDef:t,config:i==null?void 0:i.config,scaleName:i.scaleName(s),scale:i.getScaleComponent(s),stack:null,defaultRef:ue(o),bandPosition:r})};const u=t[s];return u?{offsetType:"visual",offset:u}:{}}function Te(e,t,{defaultPos:n,vgChannel:i}){const{encoding:r,markDef:s,config:o,stack:a}=t,u=r[e],c=r[It(e)],l=t.scaleName(e),f=t.getScaleComponent(e),{offset:d,offsetType:p}=Di({channel:e,markDef:s,encoding:r,model:t,bandPosition:.5}),g=Nu({model:t,defaultPos:n,channel:e,scaleName:l,scale:f}),h=!u&&Se(e)&&(r.latitude||r.longitude)?{field:t.getName(e)}:ix({channel:e,channelDef:u,channel2Def:c,markDef:s,config:o,scaleName:l,scale:f,stack:a,offset:d,defaultRef:g,bandPosition:p==="encoding"?0:void 0});return h?{[i||e]:h}:void 0}function ix(e){const{channel:t,channelDef:n,scaleName:i,stack:r,offset:s,markDef:o}=e;if(U(n)&&r&&t===r.fieldChannel){if(S(n)){let a=n.bandPosition;if(a===void 0&&o.type==="text"&&(t==="radius"||t==="theta")&&(a=.5),a!==void 0)return is({scaleName:i,fieldOrDatumDef:n,startSuffix:"start",bandPosition:a,offset:s})}return Ln(n,i,{suffix:"end"},{offset:s})}return ru(e)}function Nu({model:e,defaultPos:t,channel:n,scaleName:i,scale:r}){const{markDef:s,config:o}=e;return()=>{const a=ei(n),u=cn(n),c=Q(n,s,o,{vgChannel:u});if(c!==void 0)return sr(n,c);switch(t){case"zeroOrMin":case"zeroOrMax":if(i){const l=r.get("type");if(!q([je.LOG,je.TIME,je.UTC],l)){if(r.domainDefinitelyIncludesZero())return{scale:i,value:0}}}if(t==="zeroOrMin")return a==="y"?{field:{group:"height"}}:{value:0};switch(a){case"radius":return{signal:`min(${e.width.signal},${e.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":return{...e[He(n)],mult:.5}}}}const rx={left:"x",center:"xc",right:"x2"},sx={top:"y",middle:"yc",bottom:"y2"};function Fp(e,t,n,i="middle"){if(e==="radius"||e==="theta")return cn(e);const r=e==="x"?"align":"baseline",s=Q(r,t,n);let o;return I(s)?(A(u0(r)),o=void 0):o=s,e==="x"?rx[o||(i==="top"?"left":"center")]:sx[o||i]}function fs(e,t,{defaultPos:n,defaultPos2:i,range:r}){return r?$p(e,t,{defaultPos:n,defaultPos2:i}):Te(e,t,{defaultPos:n})}function $p(e,t,{defaultPos:n,defaultPos2:i}){const{markDef:r,config:s}=t,o=It(e),a=He(e),u=ox(t,i,o),c=u[a]?Fp(e,r,s):cn(e);return{...Te(e,t,{defaultPos:n,vgChannel:c}),...u}}function ox(e,t,n){const{encoding:i,mark:r,markDef:s,stack:o,config:a}=e,u=ei(n),c=He(n),l=cn(n),f=i[u],d=e.scaleName(u),p=e.getScaleComponent(u),{offset:g}=n in i||n in s?Di({channel:n,markDef:s,encoding:i,model:e}):Di({channel:u,markDef:s,encoding:i,model:e});if(!f&&(n==="x2"||n==="y2")&&(i.latitude||i.longitude)){const m=He(n),y=e.markDef[m];return y!=null?{[m]:{value:y}}:{[l]:{field:e.getName(n)}}}const h=ax({channel:n,channelDef:f,channel2Def:i[n],markDef:s,config:a,scaleName:d,scale:p,stack:o,offset:g,defaultRef:void 0});return h!==void 0?{[l]:h}:zr(n,s)||zr(n,{[n]:es(n,s,a.style),[c]:es(c,s,a.style)})||zr(n,a[r])||zr(n,a.mark)||{[l]:Nu({model:e,defaultPos:t,channel:n,scaleName:d,scale:p})()}}function ax({channel:e,channelDef:t,channel2Def:n,markDef:i,config:r,scaleName:s,scale:o,stack:a,offset:u,defaultRef:c}){return U(t)&&a&&e.charAt(0)===a.fieldChannel.charAt(0)?Ln(t,s,{suffix:"start"},{offset:u}):ru({channel:e,channelDef:n,scaleName:s,scale:o,stack:a,markDef:i,config:r,offset:u,defaultRef:c})}function zr(e,t){const n=He(e),i=cn(e);if(t[i]!==void 0)return{[i]:sr(e,t[i])};if(t[e]!==void 0)return{[i]:sr(e,t[e])};if(t[n]){const r=t[n];if(Hn(r))A(t0(n));else return{[n]:sr(e,r)}}}function fn(e,t){const{config:n,encoding:i,markDef:r}=e,s=r.type,o=It(t),a=He(t),u=i[t],c=i[o],l=e.getScaleComponent(t),f=l?l.get("type"):void 0,d=r.orient,p=i[a]??i.size??Q("size",r,n,{vgChannel:a}),g=Cf(t),h=s==="bar"&&(t==="x"?d==="vertical":d==="horizontal");return S(u)&&(oe(u.bin)||Fe(u.bin)||u.timeUnit&&!c)&&!(p&&!Hn(p))&&!i[g]&&!we(f)?lx({fieldDef:u,fieldDef2:c,channel:t,model:e}):(U(u)&&we(f)||h)&&!c?cx(u,t,e):$p(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function ux(e,t,n,i,r,s,o){if(Hn(r))if(n){const u=n.get("type");if(u==="band"){let c=`bandwidth('${t}')`;r.band!==1&&(c=`${r.band} * ${c}`);const l=Vt("minBandSize",{type:o},i);return{signal:l?`max(${st(l)}, ${c})`:c}}else r.band!==1&&(A(d0(u)),r=void 0)}else return{mult:r.band,field:{group:e}};else{if(I(r))return r;if(r)return{value:r}}if(n){const u=n.get("range");if(vn(u)&&he(u.step))return{value:u.step-2}}if(!s){const{bandPaddingInner:u,barBandPaddingInner:c,rectBandPaddingInner:l}=i.scale,f=me(u,o==="bar"?c:l);if(I(f))return{signal:`(1 - (${f.signal})) * ${e}`};if(he(f))return{signal:`${1-f} * ${e}`}}return{value:cs(i.view,e)-2}}function cx(e,t,n){const{markDef:i,encoding:r,config:s,stack:o}=n,a=i.orient,u=n.scaleName(t),c=n.getScaleComponent(t),l=He(t),f=It(t),d=Cf(t),p=n.scaleName(d),g=n.getScaleComponent(Ia(t)),h=a==="horizontal"&&t==="y"||a==="vertical"&&t==="x";let m;(r.size||i.size)&&(h?m=xe("size",n,{vgChannel:l,defaultRef:ue(i.size)}):A(m0(i.type)));const y=!!m,x=Cd({channel:t,fieldDef:e,markDef:i,config:s,scaleType:c==null?void 0:c.get("type"),useVlSizeChannel:h});m=m||{[l]:ux(l,p||u,g||c,s,x,!!e,i.type)};const $=(c==null?void 0:c.get("type"))==="band"&&Hn(x)&&!y?"top":"middle",R=Fp(t,i,s,$),v=R==="xc"||R==="yc",{offset:N,offsetType:F}=Di({channel:t,markDef:i,encoding:r,model:n,bandPosition:v?.5:0}),j=ru({channel:t,channelDef:e,markDef:i,config:s,scaleName:u,scale:c,stack:o,offset:N,defaultRef:Nu({model:n,defaultPos:"mid",channel:t,scaleName:u,scale:c}),bandPosition:v?F==="encoding"?0:.5:I(x)?{signal:`(1-${x})/2`}:Hn(x)?(1-x.band)/2:0});if(l)return{[R]:j,...m};{const J=cn(f),ne=m[l],Ce=N?{...ne,offset:N}:ne;return{[R]:j,[J]:T(j)?[j[0],{...j[1],offset:Ce}]:{...j,offset:Ce}}}}function qc(e,t,n,i,r,s,o){if(xf(e))return 0;const a=e==="x"||e==="y2",u=a?-t/2:t/2;if(I(n)||I(r)||I(i)||s){const c=st(n),l=st(r),f=st(i),d=st(s),g=s?`(${o} < ${d} ? ${a?"":"-"}0.5 * (${d} - (${o})) : ${u})`:u,h=f?`${f} + `:"",m=c?`(${c} ? -1 : 1) * `:"",y=l?`(${l} + ${g})`:g;return{signal:h+m+y}}else return r=r||0,i+(n?-r-u:+r+u)}function lx({fieldDef:e,fieldDef2:t,channel:n,model:i}){var J;const{config:r,markDef:s,encoding:o}=i,a=i.getScaleComponent(n),u=i.scaleName(n),c=a?a.get("type"):void 0,l=a.get("reverse"),f=Cd({channel:n,fieldDef:e,markDef:s,config:r,scaleType:c}),d=(J=i.component.axes[n])==null?void 0:J[0],p=(d==null?void 0:d.get("translate"))??.5,g=Se(n)?Q("binSpacing",s,r)??0:0,h=It(n),m=cn(n),y=cn(h),x=Vt("minBandSize",s,r),{offset:$}=Di({channel:n,markDef:s,encoding:o,model:i,bandPosition:0}),{offset:R}=Di({channel:h,markDef:s,encoding:o,model:i,bandPosition:0}),v=Py({fieldDef:e,scaleName:u}),N=qc(n,g,l,p,$,x,v),F=qc(h,g,l,p,R??$,x,v),j=I(f)?{signal:`(1-${f.signal})/2`}:Hn(f)?(1-f.band)/2:.5;if(oe(e.bin)||e.timeUnit)return{[y]:Xc({fieldDef:e,scaleName:u,bandPosition:j,offset:F}),[m]:Xc({fieldDef:e,scaleName:u,bandPosition:I(j)?{signal:`1-${j.signal}`}:1-j,offset:N})};if(Fe(e.bin)){const ne=Ln(e,u,{},{offset:F});if(S(t))return{[y]:ne,[m]:Ln(t,u,{},{offset:N})};if(ti(e.bin)&&e.bin.step)return{[y]:ne,[m]:{signal:`scale("${u}", ${C(e,{expr:"datum"})} + ${e.bin.step})`,offset:N}}}A(qf(h))}function Xc({fieldDef:e,scaleName:t,bandPosition:n,offset:i}){return is({scaleName:t,fieldOrDatumDef:e,bandPosition:n,offset:i})}const fx=new Set(["aria","width","height"]);function tt(e,t){const{fill:n=void 0,stroke:i=void 0}=t.color==="include"?Cp(e):{};return{...dx(e.markDef,t),...Vc(e,"fill",n),...Vc(e,"stroke",i),...xe("opacity",e),...xe("fillOpacity",e),...xe("strokeOpacity",e),...xe("strokeWidth",e),...xe("strokeDash",e),...nx(e),...Sp(e),...Ou(e,"href"),...Z1(e)}}function Vc(e,t,n){const{config:i,mark:r,markDef:s}=e;if(Q("invalid",s,i)==="hide"&&n&&!En(r)){const a=px(e,{invalid:!0,channels:Os});if(a)return{[t]:[{test:a,value:null},...ge(n)]}}return n?{[t]:n}:{}}function dx(e,t){return Om.reduce((n,i)=>(!fx.has(i)&&e[i]!==void 0&&t[i]!=="ignore"&&(n[i]=ue(e[i])),n),{})}function px(e,{invalid:t=!1,channels:n}){const i=n.reduce((s,o)=>{const a=e.getScaleComponent(o);if(a){const u=a.get("type"),c=e.vgField(o,{expr:"datum"});c&&Ye(u)&&(s[c]=!0)}return s},{}),r=E(i);if(r.length>0){const s=t?"||":"&&";return r.map(o=>su(o,t)).join(` ${s} `)}}function Tu(e){const{config:t,markDef:n}=e;if(Q("invalid",n,t)){const r=gx(e,{channels:Rt});if(r)return{defined:{signal:r}}}return{}}function gx(e,{invalid:t=!1,channels:n}){const i=n.reduce((s,o)=>{var u;const a=e.getScaleComponent(o);if(a){const c=a.get("type"),l=e.vgField(o,{expr:"datum",binSuffix:(u=e.stack)!=null&&u.impute?"mid":void 0});l&&Ye(c)&&(s[l]=!0)}return s},{}),r=E(i);if(r.length>0){const s=t?"||":"&&";return r.map(o=>su(o,t)).join(` ${s} `)}}function Yc(e,t){if(t!==void 0)return{[e]:ue(t)}}const So="voronoi",Op={defined:e=>e.type==="point"&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(So)},marks:(e,t,n)=>{const{x:i,y:r}=t.project.hasChannel,s=e.mark;if(En(s))return A(Im(s)),n;const o={name:e.getName(So),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...Sp(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:i||!r?"datum.datum.x || 0":"0"},y:{expr:r||!i?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let a=0,u=!1;return n.forEach((c,l)=>{const f=c.name??"";f===e.component.mark[0].name?a=l:f.indexOf(So)>=0&&(u=!0)}),u||n.splice(a+1,0,o),n}},Np={defined:e=>e.type==="point"&&e.resolve==="global"&&e.bind&&e.bind!=="scales"&&!vu(e.bind),parse:(e,t,n)=>Pp(t,n),topLevelSignals:(e,t,n)=>{const i=t.name,r=t.project,s=t.bind,o=t.init&&t.init[0],a=Op.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return r.items.forEach((u,c)=>{const l=le(`${i}_${u.field}`);n.filter(d=>d.name===l).length||n.unshift({name:l,...o?{init:Xn(o[c])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${a}[${G(u.field)}] : null`}]:[],bind:s[u.field]??s[u.channel]??s})}),n},signals:(e,t,n)=>{const i=t.name,r=t.project,s=n.filter(c=>c.name===i+dn)[0],o=i+Dr,a=r.items.map(c=>le(`${i}_${c.field}`)),u=a.map(c=>`${c} !== null`).join(" && ");return a.length&&(s.update=`${u} ? {fields: ${o}, values: [${a.join(", ")}]} : null`),delete s.value,delete s.on,n}},ds="_toggle",Tp={defined:e=>e.type==="point"&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+ds,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+dn,i=t.name+ds;return`${i} ? null : ${n}, `+(t.resolve==="global"?`${i} ? null : true, `:`${i} ? null : {unit: ${Bn(e)}}, `)+`${i} ? ${n} : null`}},hx={defined:e=>e.clear!==void 0&&e.clear!==!1,parse:(e,t)=>{t.clear&&(t.clear=B(t.clear)?Pi(t.clear,"view"):t.clear)},topLevelSignals:(e,t,n)=>{if(Np.defined(t))for(const i of t.project.items){const r=n.findIndex(s=>s.name===le(`${t.name}_${i.field}`));r!==-1&&n[r].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function i(r,s){r!==-1&&n[r].on&&n[r].on.push({events:t.clear,update:s})}if(t.type==="interval")for(const r of t.project.items){const s=n.findIndex(o=>o.name===r.signals.visual);if(i(s,"[0, 0]"),s===-1){const o=n.findIndex(a=>a.name===r.signals.data);i(o,"null")}}else{let r=n.findIndex(s=>s.name===t.name+dn);i(r,"null"),Tp.defined(t)&&(r=n.findIndex(s=>s.name===t.name+ds),i(r,"false"))}return n}},Dp={defined:e=>{const t=e.resolve==="global"&&e.bind&&vu(e.bind),n=e.project.items.length===1&&e.project.items[0].field!==ft;return t&&!n&&A(Pm),t&&n},parse:(e,t,n)=>{const i=M(n);if(i.select=B(i.select)?{type:i.select,toggle:t.toggle}:{...i.select,toggle:t.toggle},Pp(t,i),V(n.select)&&(n.select.on||n.select.clear)){const o='event.item && indexof(event.item.mark.role, "legend") < 0';for(const a of t.events)a.filter=ge(a.filter??[]),a.filter.includes(o)||a.filter.push(o)}const r=xo(t.bind)?t.bind.legend:"click",s=B(r)?Pi(r,"view"):ge(r);t.bind={legend:{merge:s}}},topLevelSignals:(e,t,n)=>{const i=t.name,r=xo(t.bind)&&t.bind.legend,s=o=>a=>{const u=M(a);return u.markname=o,u};for(const o of t.project.items){if(!o.hasLegend)continue;const a=`${le(o.field)}_legend`,u=`${i}_${a}`;if(n.filter(l=>l.name===u).length===0){const l=r.merge.map(s(`${a}_symbols`)).concat(r.merge.map(s(`${a}_labels`))).concat(r.merge.map(s(`${a}_entries`)));n.unshift({name:u,...t.init?{}:{value:null},on:[{events:l,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:r.merge,update:`!event.item || !datum ? null : ${u}`,force:!0}]})}}return n},signals:(e,t,n)=>{const i=t.name,r=t.project,s=n.find(d=>d.name===i+dn),o=i+Dr,a=r.items.filter(d=>d.hasLegend).map(d=>le(`${i}_${le(d.field)}_legend`)),c=`${a.map(d=>`${d} !== null`).join(" && ")} ? {fields: ${o}, values: [${a.join(", ")}]} : null`;t.events&&a.length>0?s.on.push({events:a.map(d=>({signal:d})),update:c}):a.length>0&&(s.update=c,delete s.value,delete s.on);const l=n.find(d=>d.name===i+ds),f=xo(t.bind)&&t.bind.legend;return l&&(t.events?l.on.push({...l.on[0],events:f}):l.on[0].events=f),n}};function mx(e,t,n){var r;const i=(r=e.fieldDef(t))==null?void 0:r.field;for(const s of Oe(e.component.selection??{})){const o=s.project.hasField[i]??s.project.hasChannel[t];if(o&&Dp.defined(s)){const a=n.get("selections")??[];a.push(s.name),n.set("selections",a,!1),o.hasLegend=!0}}}const _p="_translate_anchor",kp="_translate_delta",yx={defined:e=>e.type==="interval"&&e.translate,signals:(e,t,n)=>{const i=t.name,r=Ht.defined(t),s=i+_p,{x:o,y:a}=t.project.hasChannel;let u=Pi(t.translate,"scope");return r||(u=u.map(c=>(c.between[0].markname=i+bi,c))),n.push({name:s,value:{},on:[{events:u.map(c=>c.between[0]),update:"{x: x(unit), y: y(unit)"+(o!==void 0?`, extent_x: ${r?sa(e,fe):`slice(${o.signals.visual})`}`:"")+(a!==void 0?`, extent_y: ${r?sa(e,Ae):`slice(${a.signals.visual})`}`:"")+"}"}]},{name:i+kp,value:{},on:[{events:u,update:`{x: ${s}.x - x(unit), y: ${s}.y - y(unit)}`}]}),o!==void 0&&Kc(e,t,o,"width",n),a!==void 0&&Kc(e,t,a,"height",n),n}};function Kc(e,t,n,i,r){const s=t.name,o=s+_p,a=s+kp,u=n.channel,c=Ht.defined(t),l=r.filter(v=>v.name===n.signals[c?"data":"visual"])[0],f=e.getSizeSignalRef(i).signal,d=e.getScaleComponent(u),p=d&&d.get("type"),g=d&&d.get("reverse"),h=c?u===fe?g?"":"-":g?"-":"":"",m=`${o}.extent_${u}`,y=`${h}${a}.${u} / ${c?`${f}`:`span(${m})`}`,x=!c||!d?"panLinear":p==="log"?"panLog":p==="symlog"?"panSymlog":p==="pow"?"panPow":"panLinear",$=c?p==="pow"?`, ${d.get("exponent")??1}`:p==="symlog"?`, ${d.get("constant")??1}`:"":"",R=`${x}(${m}, ${y}${$})`;l.on.push({events:{signal:a},update:c?R:`clampRange(${R}, 0, ${f})`})}const Ip="_zoom_anchor",Rp="_zoom_delta",bx={defined:e=>e.type==="interval"&&e.zoom,signals:(e,t,n)=>{const i=t.name,r=Ht.defined(t),s=i+Rp,{x:o,y:a}=t.project.hasChannel,u=G(e.scaleName(fe)),c=G(e.scaleName(Ae));let l=Pi(t.zoom,"scope");return r||(l=l.map(f=>(f.markname=i+bi,f))),n.push({name:i+Ip,on:[{events:l,update:r?"{"+[u?`x: invert(${u}, x(unit))`:"",c?`y: invert(${c}, y(unit))`:""].filter(f=>f).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:s,on:[{events:l,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),o!==void 0&&Jc(e,t,o,"width",n),a!==void 0&&Jc(e,t,a,"height",n),n}};function Jc(e,t,n,i,r){const s=t.name,o=n.channel,a=Ht.defined(t),u=r.filter(x=>x.name===n.signals[a?"data":"visual"])[0],c=e.getSizeSignalRef(i).signal,l=e.getScaleComponent(o),f=l&&l.get("type"),d=a?sa(e,o):u.name,p=s+Rp,g=`${s}${Ip}.${o}`,h=!a||!l?"zoomLinear":f==="log"?"zoomLog":f==="symlog"?"zoomSymlog":f==="pow"?"zoomPow":"zoomLinear",m=a?f==="pow"?`, ${l.get("exponent")??1}`:f==="symlog"?`, ${l.get("constant")??1}`:"":"",y=`${h}(${d}, ${g}, ${p}${m})`;u.on.push({events:{signal:p},update:a?y:`clampRange(${y}, 0, ${c})`})}const Vn="_store",dn="_tuple",xx="_modify",Lp="vlSelectionResolve",Vs=[Q1,K1,V1,Tp,Np,Ht,Dp,hx,yx,bx,Op];function vx(e){let t=e.parent;for(;t&&!ct(t);)t=t.parent;return t}function Bn(e,{escape:t}={escape:!0}){let n=t?G(e.name):e.name;const i=vx(e);if(i){const{facet:r}=i;for(const s of Je)r[s]&&(n+=` + '__facet_${s}_' + (facet[${G(i.vgField(s))}])`)}return n}function Du(e){return Oe(e.component.selection??{}).reduce((t,n)=>t||n.project.hasSelectionId,!1)}function Pp(e,t){(B(t.select)||!t.select.on)&&delete e.events,(B(t.select)||!t.select.clear)&&delete e.clear,(B(t.select)||!t.select.toggle)&&delete e.toggle}const Ex="RawCode",Ax="Literal",Sx="Property",wx="Identifier",Cx="ArrayExpression",Fx="BinaryExpression",$x="CallExpression",Ox="ConditionalExpression",Nx="LogicalExpression",Tx="MemberExpression",Dx="ObjectExpression",_x="UnaryExpression";function yt(e){this.type=e}yt.prototype.visit=function(e){let t,n,i;if(e(this))return 1;for(t=kx(this),n=0,i=t.length;n<i;++n)if(t[n].visit(e))return 1};function kx(e){switch(e.type){case Cx:return e.elements;case Fx:case Nx:return[e.left,e.right];case $x:return[e.callee].concat(e.arguments);case Ox:return[e.test,e.consequent,e.alternate];case Tx:return[e.object,e.property];case Dx:return e.properties;case Sx:return[e.key,e.value];case _x:return[e.argument];case wx:case Ax:case Ex:default:return[]}}var Pt,_,b,_e,Z,Ys=1,_r=2,Yn=3,An=4,Ks=5,si=6,Pe=7,kr=8,Ix=9;Pt={};Pt[Ys]="Boolean";Pt[_r]="<end>";Pt[Yn]="Identifier";Pt[An]="Keyword";Pt[Ks]="Null";Pt[si]="Numeric";Pt[Pe]="Punctuator";Pt[kr]="String";Pt[Ix]="RegularExpression";var Rx="ArrayExpression",Lx="BinaryExpression",Px="CallExpression",Bx="ConditionalExpression",Bp="Identifier",zx="Literal",Mx="LogicalExpression",jx="MemberExpression",Ux="ObjectExpression",Wx="Property",Gx="UnaryExpression",ve="Unexpected token %0",Hx="Unexpected number",qx="Unexpected string",Xx="Unexpected identifier",Vx="Unexpected reserved word",Yx="Unexpected end of input",oa="Invalid regular expression",wo="Invalid regular expression: missing /",zp="Octal literals are not allowed in strict mode.",Kx="Duplicate data property in object literal not allowed in strict mode",$e="ILLEGAL",pr="Disabled.",Jx=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),Qx=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function Js(e,t){if(!e)throw new Error("ASSERT: "+t)}function Mt(e){return e>=48&&e<=57}function _u(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function or(e){return"01234567".indexOf(e)>=0}function Zx(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function gr(e){return e===10||e===13||e===8232||e===8233}function Ir(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&Jx.test(String.fromCharCode(e))}function ps(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&Qx.test(String.fromCharCode(e))}const ev={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function Mp(){for(;b<_e;){const e=_.charCodeAt(b);if(Zx(e)||gr(e))++b;else break}}function aa(e){var t,n,i,r=0;for(n=e==="u"?4:2,t=0;t<n;++t)b<_e&&_u(_[b])?(i=_[b++],r=r*16+"0123456789abcdef".indexOf(i.toLowerCase())):Y({},ve,$e);return String.fromCharCode(r)}function tv(){var e,t,n,i;for(e=_[b],t=0,e==="}"&&Y({},ve,$e);b<_e&&(e=_[b++],!!_u(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&Y({},ve,$e),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,i=(t-65536&1023)+56320,String.fromCharCode(n,i))}function jp(){var e,t;for(e=_.charCodeAt(b++),t=String.fromCharCode(e),e===92&&(_.charCodeAt(b)!==117&&Y({},ve,$e),++b,e=aa("u"),(!e||e==="\\"||!Ir(e.charCodeAt(0)))&&Y({},ve,$e),t=e);b<_e&&(e=_.charCodeAt(b),!!ps(e));)++b,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),_.charCodeAt(b)!==117&&Y({},ve,$e),++b,e=aa("u"),(!e||e==="\\"||!ps(e.charCodeAt(0)))&&Y({},ve,$e),t+=e);return t}function nv(){var e,t;for(e=b++;b<_e;){if(t=_.charCodeAt(b),t===92)return b=e,jp();if(ps(t))++b;else break}return _.slice(e,b)}function iv(){var e,t,n;return e=b,t=_.charCodeAt(b)===92?jp():nv(),t.length===1?n=Yn:ev.hasOwnProperty(t)?n=An:t==="null"?n=Ks:t==="true"||t==="false"?n=Ys:n=Yn,{type:n,value:t,start:e,end:b}}function Co(){var e=b,t=_.charCodeAt(b),n,i=_[b],r,s,o;switch(t){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++b,{type:Pe,value:String.fromCharCode(t),start:e,end:b};default:if(n=_.charCodeAt(b+1),n===61)switch(t){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return b+=2,{type:Pe,value:String.fromCharCode(t)+String.fromCharCode(n),start:e,end:b};case 33:case 61:return b+=2,_.charCodeAt(b)===61&&++b,{type:Pe,value:_.slice(e,b),start:e,end:b}}}if(o=_.substr(b,4),o===">>>=")return b+=4,{type:Pe,value:o,start:e,end:b};if(s=o.substr(0,3),s===">>>"||s==="<<="||s===">>=")return b+=3,{type:Pe,value:s,start:e,end:b};if(r=s.substr(0,2),i===r[1]&&"+-<>&|".indexOf(i)>=0||r==="=>")return b+=2,{type:Pe,value:r,start:e,end:b};if(r==="//"&&Y({},ve,$e),"<>=!+-*%&|^/".indexOf(i)>=0)return++b,{type:Pe,value:i,start:e,end:b};Y({},ve,$e)}function rv(e){let t="";for(;b<_e&&_u(_[b]);)t+=_[b++];return t.length===0&&Y({},ve,$e),Ir(_.charCodeAt(b))&&Y({},ve,$e),{type:si,value:parseInt("0x"+t,16),start:e,end:b}}function sv(e){let t="0"+_[b++];for(;b<_e&&or(_[b]);)t+=_[b++];return(Ir(_.charCodeAt(b))||Mt(_.charCodeAt(b)))&&Y({},ve,$e),{type:si,value:parseInt(t,8),octal:!0,start:e,end:b}}function Qc(){var e,t,n;if(n=_[b],Js(Mt(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=b,e="",n!=="."){if(e=_[b++],n=_[b],e==="0"){if(n==="x"||n==="X")return++b,rv(t);if(or(n))return sv(t);n&&Mt(n.charCodeAt(0))&&Y({},ve,$e)}for(;Mt(_.charCodeAt(b));)e+=_[b++];n=_[b]}if(n==="."){for(e+=_[b++];Mt(_.charCodeAt(b));)e+=_[b++];n=_[b]}if(n==="e"||n==="E")if(e+=_[b++],n=_[b],(n==="+"||n==="-")&&(e+=_[b++]),Mt(_.charCodeAt(b)))for(;Mt(_.charCodeAt(b));)e+=_[b++];else Y({},ve,$e);return Ir(_.charCodeAt(b))&&Y({},ve,$e),{type:si,value:parseFloat(e),start:t,end:b}}function ov(){var e="",t,n,i,r,s=!1;for(t=_[b],Js(t==="'"||t==='"',"String literal must starts with a quote"),n=b,++b;b<_e;)if(i=_[b++],i===t){t="";break}else if(i==="\\")if(i=_[b++],!i||!gr(i.charCodeAt(0)))switch(i){case"u":case"x":_[b]==="{"?(++b,e+=tv()):e+=aa(i);break;case"n":e+=`
13
+ `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:or(i)?(r="01234567".indexOf(i),r!==0&&(s=!0),b<_e&&or(_[b])&&(s=!0,r=r*8+"01234567".indexOf(_[b++]),"0123".indexOf(i)>=0&&b<_e&&or(_[b])&&(r=r*8+"01234567".indexOf(_[b++]))),e+=String.fromCharCode(r)):e+=i;break}else i==="\r"&&_[b]===`
14
+ `&&++b;else{if(gr(i.charCodeAt(0)))break;e+=i}return t!==""&&Y({},ve,$e),{type:kr,value:e,octal:s,start:n,end:b}}function av(e,t){let n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(i,r)=>{if(parseInt(r,16)<=1114111)return"x";Y({},oa)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{Y({},oa)}try{return new RegExp(e,t)}catch{return null}}function uv(){var e,t,n,i,r;for(e=_[b],Js(e==="/","Regular expression literal must start with a slash"),t=_[b++],n=!1,i=!1;b<_e;)if(e=_[b++],t+=e,e==="\\")e=_[b++],gr(e.charCodeAt(0))&&Y({},wo),t+=e;else if(gr(e.charCodeAt(0)))Y({},wo);else if(n)e==="]"&&(n=!1);else if(e==="/"){i=!0;break}else e==="["&&(n=!0);return i||Y({},wo),r=t.substr(1,t.length-2),{value:r,literal:t}}function cv(){var e,t,n;for(t="",n="";b<_e&&(e=_[b],!!ps(e.charCodeAt(0)));)++b,e==="\\"&&b<_e?Y({},ve,$e):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&Y({},oa,n),{value:n,literal:t}}function lv(){var e,t,n,i;return Z=null,Mp(),e=b,t=uv(),n=cv(),i=av(t.value,n.value),{literal:t.literal+n.literal,value:i,regex:{pattern:t.value,flags:n.value},start:e,end:b}}function fv(e){return e.type===Yn||e.type===An||e.type===Ys||e.type===Ks}function Up(){if(Mp(),b>=_e)return{type:_r,start:b,end:b};const e=_.charCodeAt(b);return Ir(e)?iv():e===40||e===41||e===59?Co():e===39||e===34?ov():e===46?Mt(_.charCodeAt(b+1))?Qc():Co():Mt(e)?Qc():Co()}function ze(){const e=Z;return b=e.end,Z=Up(),b=e.end,e}function Wp(){const e=b;Z=Up(),b=e}function dv(e){const t=new yt(Rx);return t.elements=e,t}function Zc(e,t,n){const i=new yt(e==="||"||e==="&&"?Mx:Lx);return i.operator=e,i.left=t,i.right=n,i}function pv(e,t){const n=new yt(Px);return n.callee=e,n.arguments=t,n}function gv(e,t,n){const i=new yt(Bx);return i.test=e,i.consequent=t,i.alternate=n,i}function ku(e){const t=new yt(Bp);return t.name=e,t}function er(e){const t=new yt(zx);return t.value=e.value,t.raw=_.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function el(e,t,n){const i=new yt(jx);return i.computed=e==="[",i.object=t,i.property=n,i.computed||(n.member=!0),i}function hv(e){const t=new yt(Ux);return t.properties=e,t}function tl(e,t,n){const i=new yt(Wx);return i.key=t,i.value=n,i.kind=e,i}function mv(e,t){const n=new yt(Gx);return n.operator=e,n.argument=t,n.prefix=!0,n}function Y(e,t){var n,i=Array.prototype.slice.call(arguments,2),r=t.replace(/%(\d)/g,(s,o)=>(Js(o<i.length,"Message reference must be in range"),i[o]));throw n=new Error(r),n.index=b,n.description=r,n}function Qs(e){e.type===_r&&Y(e,Yx),e.type===si&&Y(e,Hx),e.type===kr&&Y(e,qx),e.type===Yn&&Y(e,Xx),e.type===An&&Y(e,Vx),Y(e,ve,e.value)}function ke(e){const t=ze();(t.type!==Pe||t.value!==e)&&Qs(t)}function ce(e){return Z.type===Pe&&Z.value===e}function Fo(e){return Z.type===An&&Z.value===e}function yv(){const e=[];for(b=Z.start,ke("[");!ce("]");)ce(",")?(ze(),e.push(null)):(e.push(Kn()),ce("]")||ke(","));return ze(),dv(e)}function nl(){b=Z.start;const e=ze();return e.type===kr||e.type===si?(e.octal&&Y(e,zp),er(e)):ku(e.value)}function bv(){var e,t,n,i;if(b=Z.start,e=Z,e.type===Yn)return n=nl(),ke(":"),i=Kn(),tl("init",n,i);if(e.type===_r||e.type===Pe)Qs(e);else return t=nl(),ke(":"),i=Kn(),tl("init",t,i)}function xv(){var e=[],t,n,i,r={},s=String;for(b=Z.start,ke("{");!ce("}");)t=bv(),t.key.type===Bp?n=t.key.name:n=s(t.key.value),i="$"+n,Object.prototype.hasOwnProperty.call(r,i)?Y({},Kx):r[i]=!0,e.push(t),ce("}")||ke(",");return ke("}"),hv(e)}function vv(){ke("(");const e=Iu();return ke(")"),e}const Ev={if:1};function Av(){var e,t,n;if(ce("("))return vv();if(ce("["))return yv();if(ce("{"))return xv();if(e=Z.type,b=Z.start,e===Yn||Ev[Z.value])n=ku(ze().value);else if(e===kr||e===si)Z.octal&&Y(Z,zp),n=er(ze());else{if(e===An)throw new Error(pr);e===Ys?(t=ze(),t.value=t.value==="true",n=er(t)):e===Ks?(t=ze(),t.value=null,n=er(t)):ce("/")||ce("/=")?(n=er(lv()),Wp()):Qs(ze())}return n}function Sv(){const e=[];if(ke("("),!ce(")"))for(;b<_e&&(e.push(Kn()),!ce(")"));)ke(",");return ke(")"),e}function wv(){b=Z.start;const e=ze();return fv(e)||Qs(e),ku(e.value)}function Cv(){return ke("."),wv()}function Fv(){ke("[");const e=Iu();return ke("]"),e}function $v(){var e,t,n;for(e=Av();;)if(ce("."))n=Cv(),e=el(".",e,n);else if(ce("("))t=Sv(),e=pv(e,t);else if(ce("["))n=Fv(),e=el("[",e,n);else break;return e}function il(){const e=$v();if(Z.type===Pe&&(ce("++")||ce("--")))throw new Error(pr);return e}function Kr(){var e,t;if(Z.type!==Pe&&Z.type!==An)t=il();else{if(ce("++")||ce("--"))throw new Error(pr);if(ce("+")||ce("-")||ce("~")||ce("!"))e=ze(),t=Kr(),t=mv(e.value,t);else{if(Fo("delete")||Fo("void")||Fo("typeof"))throw new Error(pr);t=il()}}return t}function rl(e){let t=0;if(e.type!==Pe&&e.type!==An)return 0;switch(e.value){case"||":t=1;break;case"&&":t=2;break;case"|":t=3;break;case"^":t=4;break;case"&":t=5;break;case"==":case"!=":case"===":case"!==":t=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function Ov(){var e,t,n,i,r,s,o,a,u,c;if(e=Z,u=Kr(),i=Z,r=rl(i),r===0)return u;for(i.prec=r,ze(),t=[e,Z],o=Kr(),s=[u,i,o];(r=rl(Z))>0;){for(;s.length>2&&r<=s[s.length-2].prec;)o=s.pop(),a=s.pop().value,u=s.pop(),t.pop(),n=Zc(a,u,o),s.push(n);i=ze(),i.prec=r,s.push(i),t.push(Z),n=Kr(),s.push(n)}for(c=s.length-1,n=s[c],t.pop();c>1;)t.pop(),n=Zc(s[c-1].value,s[c-2],n),c-=2;return n}function Kn(){var e,t,n;return e=Ov(),ce("?")&&(ze(),t=Kn(),ke(":"),n=Kn(),e=gv(e,t,n)),e}function Iu(){const e=Kn();if(ce(","))throw new Error(pr);return e}function Nv(e){_=e,b=0,_e=_.length,Z=null,Wp();const t=Iu();if(Z.type!==_r)throw new Error("Unexpect token after expression.");return t}function ua(e){const t=[];return e.type==="Identifier"?[e.name]:e.type==="Literal"?[e.value]:(e.type==="MemberExpression"&&(t.push(...ua(e.object)),t.push(...ua(e.property))),t)}function Gp(e){return e.object.type==="MemberExpression"?Gp(e.object):e.object.name==="datum"}function Hp(e){const t=Nv(e),n=new Set;return t.visit(i=>{i.type==="MemberExpression"&&Gp(i)&&n.add(ua(i).slice(1).join("."))}),n}class Ui extends ee{clone(){return new Ui(null,this.model,M(this.filter))}constructor(t,n,i){super(t),this.model=n,this.filter=i,this.expr=gs(this.model,this.filter,this),this._dependentFields=Hp(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function Tv(e,t){const n={},i=e.config.selection;if(!t||!t.length)return n;for(const r of t){const s=le(r.name),o=r.select,a=B(o)?o:o.type,u=V(o)?M(o):{type:a},c=i[a];for(const d in c)d==="fields"||d==="encodings"||(d==="mark"&&(u[d]={...c[d],...u[d]}),(u[d]===void 0||u[d]===!0)&&(u[d]=M(c[d]??u[d])));const l=n[s]={...u,name:s,type:a,init:r.value,bind:r.bind,events:B(u.on)?Pi(u.on,"scope"):ge(M(u.on))},f=M(r);for(const d of Vs)d.defined(l)&&d.parse&&d.parse(e,l,f)}return n}function qp(e,t,n,i="datum"){const r=B(t)?t:t.param,s=le(r),o=G(s+Vn);let a;try{a=e.getSelectionComponent(s,r)}catch{return`!!${s}`}if(a.project.timeUnit){const d=n??e.component.data.raw,p=a.project.timeUnit.clone();d.parent?p.insertAsParentOf(d):d.parent=p}const u=a.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest(",c=a.resolve==="global"?")":`, ${G(a.resolve)})`,l=`${u}${o}, ${i}${c}`,f=`length(data(${o}))`;return t.empty===!1?`${f} && ${l}`:`!${f} || ${l}`}function Xp(e,t,n){const i=le(t),r=n.encoding;let s=n.field,o;try{o=e.getSelectionComponent(i,t)}catch{return i}if(!r&&!s)s=o.project.items[0].field,o.project.items.length>1&&A(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${G(s)}.`);else if(r&&!s){const a=o.project.items.filter(u=>u.channel===r);!a.length||a.length>1?(s=o.project.items[0].field,A((a.length?"Multiple ":"No ")+`matching ${G(r)} encoding found for selection ${G(n.param)}. Using "field": ${G(s)}.`)):s=a[0].field}return`${o.name}[${G(Qe(s))}]`}function Dv(e,t){for(const[n,i]of un(e.component.selection??{})){const r=e.getName(`lookup_${n}`);e.component.data.outputNodes[r]=i.materialized=new Ie(new Ui(t,e,{param:n}),r,re.Lookup,e.component.data.outputNodeRefCounts)}}function gs(e,t,n){return rr(t,i=>B(i)?i:Z0(i)?qp(e,i,n):rd(i))}function _v(e,t){if(e)return T(e)&&!rn(e)?e.map(n=>fu(n,t)).join(", "):e}function $o(e,t,n,i){var r,s;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(s=e.encode[t]).update??(s.update={}),e.encode[t].update[n]=i}function tr(e,t,n,i={header:!1}){var f,d;const{disable:r,orient:s,scale:o,labelExpr:a,title:u,zindex:c,...l}=e.combine();if(!r){for(const p in l){const g=nb[p],h=l[p];if(g&&g!==t&&g!=="both")delete l[p];else if(Tr(h)){const{condition:m,...y}=h,x=ge(m),$=$c[p];if($){const{vgProp:R,part:v}=$,N=[...x.map(F=>{const{test:j,...J}=F;return{test:gs(null,j),...J}}),y];$o(l,v,R,N),delete l[p]}else if($===null){const R={signal:x.map(v=>{const{test:N,...F}=v;return`${gs(null,N)} ? ${fc(F)} : `}).join("")+fc(y)};l[p]=R}}else if(I(h)){const m=$c[p];if(m){const{vgProp:y,part:x}=m;$o(l,x,y,h),delete l[p]}}q(["labelAlign","labelBaseline"],p)&&l[p]===null&&delete l[p]}if(t==="grid"){if(!l.grid)return;if(l.encode){const{grid:p}=l.encode;l.encode={...p?{grid:p}:{}},te(l.encode)&&delete l.encode}return{scale:o,orient:s,...l,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:me(c,0)}}else{if(!i.header&&e.mainExtracted)return;if(a!==void 0){let g=a;(d=(f=l.encode)==null?void 0:f.labels)!=null&&d.update&&I(l.encode.labels.update.text)&&(g=jn(a,"datum.label",l.encode.labels.update.text.signal)),$o(l,"labels","text",{signal:g})}if(l.labelAlign===null&&delete l.labelAlign,l.encode){for(const g of Rd)e.hasAxisPart(g)||delete l.encode[g];te(l.encode)&&delete l.encode}const p=_v(u,n);return{scale:o,orient:s,grid:!1,...p?{title:p}:{},...l,...n.aria===!1?{aria:!1}:{},zindex:me(c,0)}}}}function Vp(e){const{axes:t}=e.component,n=[];for(const i of Rt)if(t[i]){for(const r of t[i])if(!r.get("disable")&&!r.get("gridScale")){const s=i==="x"?"height":"width",o=e.getSizeSignalRef(s).signal;s!==o&&n.push({name:s,update:o})}}return n}function kv(e,t){const{x:n=[],y:i=[]}=e;return[...n.map(r=>tr(r,"grid",t)),...i.map(r=>tr(r,"grid",t)),...n.map(r=>tr(r,"main",t)),...i.map(r=>tr(r,"main",t))].filter(r=>r)}function sl(e,t,n,i){return Object.assign.apply(null,[{},...e.map(r=>{if(r==="axisOrient"){const s=n==="x"?"bottom":"left",o=t[n==="x"?"axisBottom":"axisLeft"]||{},a=t[n==="x"?"axisTop":"axisRight"]||{},u=new Set([...E(o),...E(a)]),c={};for(const l of u.values())c[l]={signal:`${i.signal} === "${s}" ? ${st(o[l])} : ${st(a[l])}`};return c}return t[r]})])}function Iv(e,t,n,i){const r=t==="band"?["axisDiscrete","axisBand"]:t==="point"?["axisDiscrete","axisPoint"]:ud(t)?["axisQuantitative"]:t==="time"||t==="utc"?["axisTemporal"]:[],s=e==="x"?"axisX":"axisY",o=I(n)?"axisOrient":`axis${Er(n)}`,a=[...r,...r.map(c=>s+c.substr(4))],u=["axis",o,s];return{vlOnlyAxisConfig:sl(a,i,e,n),vgAxisConfig:sl(u,i,e,n),axisConfigStyle:Rv([...u,...a],i)}}function Rv(e,t){var i;const n=[{}];for(const r of e){let s=(i=t[r])==null?void 0:i.style;if(s){s=ge(s);for(const o of s)n.push(t.style[o])}}return Object.assign.apply(null,n)}function ca(e,t,n,i={}){var s;const r=Lf(e,n,t);if(r!==void 0)return{configFrom:"style",configValue:r};for(const o of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(((s=i[o])==null?void 0:s[e])!==void 0)return{configFrom:o,configValue:i[o][e]};return{}}const ol={scale:({model:e,channel:t})=>e.scaleName(t),format:({format:e})=>e,formatType:({formatType:e})=>e,grid:({fieldOrDatumDef:e,axis:t,scaleType:n})=>t.grid??Lv(n,e),gridScale:({model:e,channel:t})=>Pv(e,t),labelAlign:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelAlign||Kp(t,n,i),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:n,channel:i})=>e.labelBaseline||Yp(t,n,i),labelFlush:({axis:e,fieldOrDatumDef:t,channel:n})=>e.labelFlush??zv(t.type,n),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:n})=>e.labelOverlap??Mv(t.type,n,S(t)&&!!t.timeUnit,S(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:n,fieldOrDatumDef:i,scaleType:r})=>{const s=e==="x"?"width":e==="y"?"height":void 0,o=s?t.getSizeSignalRef(s):void 0;return n.tickCount??Uv({fieldOrDatumDef:i,scaleType:r,size:o,values:n.values})},tickMinStep:Wv,title:({axis:e,model:t,channel:n})=>{if(e.title!==void 0)return e.title;const i=Jp(t,n);if(i!==void 0)return i;const r=t.typedFieldDef(n),s=n==="x"?"x2":"y2",o=t.fieldDef(s);return Bf(r?[Cc(r)]:[],S(o)?[Cc(o)]:[])},values:({axis:e,fieldOrDatumDef:t})=>Gv(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:n})=>e.zindex??Hv(n,t)};function Lv(e,t){return!we(e)&&S(t)&&!oe(t==null?void 0:t.bin)&&!Fe(t==null?void 0:t.bin)}function Pv(e,t){const n=t==="x"?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n)}function Bv(e,t,n,i,r){const s=t==null?void 0:t.labelAngle;if(s!==void 0)return I(s)?s:fr(s);{const{configValue:o}=ca("labelAngle",i,t==null?void 0:t.style,r);return o!==void 0?fr(o):n===fe&&q([Za,Qa],e.type)&&!(S(e)&&e.timeUnit)?270:void 0}}function la(e){return`(((${e.signal} % 360) + 360) % 360)`}function Yp(e,t,n,i){if(e!==void 0)if(n==="x"){if(I(e)){const r=la(e),s=I(t)?`(${t.signal} === "top")`:t==="top";return{signal:`(45 < ${r} && ${r} < 135) || (225 < ${r} && ${r} < 315) ? "middle" :(${r} <= 45 || 315 <= ${r}) === ${s} ? "bottom" : "top"`}}if(45<e&&e<135||225<e&&e<315)return"middle";if(I(t)){const r=e<=45||315<=e?"===":"!==";return{signal:`${t.signal} ${r} "top" ? "bottom" : "top"`}}return(e<=45||315<=e)==(t==="top")?"bottom":"top"}else{if(I(e)){const r=la(e),s=I(t)?`(${t.signal} === "left")`:t==="left";return{signal:`${r} <= 45 || 315 <= ${r} || (135 <= ${r} && ${r} <= 225) ? ${i?'"middle"':"null"} : (45 <= ${r} && ${r} <= 135) === ${s} ? "top" : "bottom"`}}if(e<=45||315<=e||135<=e&&e<=225)return i?"middle":null;if(I(t)){const r=45<=e&&e<=135?"===":"!==";return{signal:`${t.signal} ${r} "left" ? "top" : "bottom"`}}return(45<=e&&e<=135)==(t==="left")?"top":"bottom"}}function Kp(e,t,n){if(e===void 0)return;const i=n==="x",r=i?0:90,s=i?"bottom":"left";if(I(e)){const o=la(e),a=I(t)?`(${t.signal} === "${s}")`:t===s;return{signal:`(${r?`(${o} + 90)`:o} % 180 === 0) ? ${i?null:'"center"'} :(${r} < ${o} && ${o} < ${180+r}) === ${a} ? "left" : "right"`}}if((e+r)%180===0)return i?null:"center";if(I(t)){const o=r<e&&e<180+r?"===":"!==";return{signal:`${`${t.signal} ${o} "${s}"`} ? "left" : "right"`}}return(r<e&&e<180+r)==(t===s)?"left":"right"}function zv(e,t){if(t==="x"&&q(["quantitative","temporal"],e))return!0}function Mv(e,t,n,i){if(n&&!V(i)||e!=="nominal"&&e!=="ordinal")return t==="log"||t==="symlog"?"greedy":!0}function jv(e){return e==="x"?"bottom":"left"}function Uv({fieldOrDatumDef:e,scaleType:t,size:n,values:i}){var r;if(!i&&!we(t)&&t!=="log"){if(S(e)){if(oe(e.bin))return{signal:`ceil(${n.signal}/10)`};if(e.timeUnit&&q(["month","hours","day","quarter"],(r=Ee(e.timeUnit))==null?void 0:r.unit))return}return{signal:`ceil(${n.signal}/40)`}}}function Wv({format:e,fieldOrDatumDef:t}){if(e==="d")return 1;if(S(t)){const{timeUnit:n}=t;if(n){const i=td(n);if(i)return{signal:i}}}}function Jp(e,t){const n=t==="x"?"x2":"y2",i=e.fieldDef(t),r=e.fieldDef(n),s=i?i.title:void 0,o=r?r.title:void 0;if(s&&o)return zf(s,o);if(s)return s;if(o)return o;if(s!==void 0)return s;if(o!==void 0)return o}function Gv(e,t){const n=e.values;if(T(n))return Id(t,n);if(I(n))return n}function Hv(e,t){return e==="rect"&&ss(t)?1:0}class _i extends ee{clone(){return new _i(null,M(this.transform))}constructor(t,n){super(t),this.transform=n,this._dependentFields=Hp(this.transform.calculate)}static parseAllForSortIndex(t,n){return n.forEachFieldDef((i,r)=>{if(ri(i)&&Sd(i.sort)){const{field:s,timeUnit:o}=i,a=i.sort,u=a.map((c,l)=>`${rd({field:s,timeUnit:o,equal:c})} ? ${l} : `).join("")+a.length;t=new _i(t,{calculate:u,as:ki(i,r,{forAs:!0})})}}),t}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${H(this.transform)}`}}function ki(e,t,n){return C(e,{prefix:t,suffix:"sort_index",...n??{}})}function Zs(e,t){return q(["top","bottom"],t)?"column":q(["left","right"],t)||e==="row"?"row":"column"}function Ii(e,t,n,i){const r=i==="row"?n.headerRow:i==="column"?n.headerColumn:n.headerFacet;return me((t||{})[e],r[e],n.header[e])}function eo(e,t,n,i){const r={};for(const s of e){const o=Ii(s,t||{},n,i);o!==void 0&&(r[s]=o)}return r}const Ru=["row","column"],Lu=["header","footer"];function qv(e,t){const n=e.component.layoutHeaders[t].title,i=e.config?e.config:void 0,r=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:s,titleAngle:o,titleOrient:a}=eo(["titleAnchor","titleAngle","titleOrient"],r.header,i,t),u=Zs(t,a),c=fr(o);return{name:`${t}-title`,type:"group",role:`${u}-title`,title:{text:n,...t==="row"?{orient:"left"}:{},style:"guide-title",...Zp(c,u),...Qp(u,c,s),...eg(i,r,t,wb,Jd)}}}function Qp(e,t,n="middle"){switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}const i=Kp(t,e==="row"?"left":"top",e==="row"?"y":"x");return i?{align:i}:{}}function Zp(e,t){const n=Yp(e,t==="row"?"left":"top",t==="row"?"y":"x",!0);return n?{baseline:n}:{}}function Xv(e,t){const n=e.component.layoutHeaders[t],i=[];for(const r of Lu)if(n[r])for(const s of n[r]){const o=Yv(e,t,r,n,s);o!=null&&i.push(o)}return i}function Vv(e,t){const{sort:n}=e;return Ct(n)?{field:C(n,{expr:"datum"}),order:n.order??"ascending"}:T(n)?{field:ki(e,t,{expr:"datum"}),order:"ascending"}:{field:C(e,{expr:"datum"}),order:n??"ascending"}}function fa(e,t,n){const{format:i,formatType:r,labelAngle:s,labelAnchor:o,labelOrient:a,labelExpr:u}=eo(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),c=au({fieldOrDatumDef:e,format:i,formatType:r,expr:"parent",config:n}).signal,l=Zs(t,a);return{text:{signal:u?jn(jn(u,"datum.label",c),"datum.value",C(e,{expr:"parent"})):c},...t==="row"?{orient:"left"}:{},style:"guide-label",frame:"group",...Zp(s,l),...Qp(l,s,o),...eg(n,e,t,Cb,Qd)}}function Yv(e,t,n,i,r){if(r){let s=null;const{facetFieldDef:o}=i,a=e.config?e.config:void 0;if(o&&r.labels){const{labelOrient:f}=eo(["labelOrient"],o.header,a,t);(t==="row"&&!q(["top","bottom"],f)||t==="column"&&!q(["left","right"],f))&&(s=fa(o,t,a))}const u=ct(e)&&!$r(e.facet),c=r.axes,l=(c==null?void 0:c.length)>0;if(s||l){const f=t==="row"?"height":"width";return{name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`,...i.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:Vv(o,t)}:{},...l&&u?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...s?{title:s}:{},...r.sizeSignal?{encode:{update:{[f]:r.sizeSignal}}}:{},...l?{axes:c}:{}}}}return null}const Kv={column:{start:0,end:1},row:{start:1,end:0}};function Jv(e,t){return Kv[t][e]}function Qv(e,t){const n={};for(const i of Je){const r=e[i];if(r!=null&&r.facetFieldDef){const{titleAnchor:s,titleOrient:o}=eo(["titleAnchor","titleOrient"],r.facetFieldDef.header,t,i),a=Zs(i,o),u=Jv(s,a);u!==void 0&&(n[a]=u)}}return te(n)?void 0:n}function eg(e,t,n,i,r){const s={};for(const o of i){if(!r[o])continue;const a=Ii(o,t==null?void 0:t.header,e,n);a!==void 0&&(s[r[o]]=a)}return s}function Pu(e){return[...Mr(e,"width"),...Mr(e,"height"),...Mr(e,"childWidth"),...Mr(e,"childHeight")]}function Mr(e,t){const n=t==="width"?"x":"y",i=e.component.layoutSize.get(t);if(!i||i==="merged")return[];const r=e.getSizeSignalRef(t).signal;if(i==="step"){const s=e.getScaleComponent(n);if(s){const o=s.get("type"),a=s.get("range");if(we(o)&&vn(a)){const u=e.scaleName(n);return ct(e.parent)&&e.parent.component.resolve.scale[n]==="independent"?[al(u,a)]:[al(u,a),{name:r,update:tg(u,s,`domain('${u}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}else if(i=="container"){const s=r.endsWith("width"),o=s?"containerSize()[0]":"containerSize()[1]",a=ta(e.config.view,s?"width":"height"),u=`isFinite(${o}) ? ${o} : ${a}`;return[{name:r,init:u,on:[{update:u,events:"window:resize"}]}]}else return[{name:r,value:i}]}function al(e,t){const n=`${e}_step`;return I(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function tg(e,t,n){const i=t.get("type"),r=t.get("padding"),s=me(t.get("paddingOuter"),r);let o=t.get("paddingInner");return o=i==="band"?o!==void 0?o:r:1,`bandspace(${n}, ${st(o)}, ${st(s)}) * ${e}_step`}function ng(e){return e==="childWidth"?"width":e==="childHeight"?"height":e}function ig(e,t){return E(e).reduce((n,i)=>{const r=e[i];return{...n,...ji(t,r,i,s=>ue(s.value))}},{})}function rg(e,t){if(ct(t))return e==="theta"?"independent":"shared";if(Hi(t))return"shared";if(Gu(t))return Se(e)||e==="theta"||e==="radius"?"independent":"shared";throw new Error("invalid model type for resolve")}function Bu(e,t){const n=e.scale[t],i=Se(t)?"axis":"legend";return n==="independent"?(e[i][t]==="shared"&&A(E0(t)),"independent"):e[i][t]||"shared"}const Zv={...Ob,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},sg=E(Zv);class eE extends tn{}const ul={symbols:tE,gradient:nE,labels:iE,entries:rE};function tE(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r,legendType:s}){if(s!=="symbol")return;const{markDef:o,encoding:a,config:u,mark:c}=n,l=o.filled&&c!=="trail";let f={...Dm({},n,wy),...Cp(n,{filled:l})};const d=r.get("symbolOpacity")??u.legend.symbolOpacity,p=r.get("symbolFillColor")??u.legend.symbolFillColor,g=r.get("symbolStrokeColor")??u.legend.symbolStrokeColor,h=d===void 0?og(a.opacity)??o.opacity:void 0;if(f.fill){if(i==="fill"||l&&i===We)delete f.fill;else if(f.fill.field)p?delete f.fill:(f.fill=ue(u.legend.symbolBaseFillColor??"black"),f.fillOpacity=ue(h??1));else if(T(f.fill)){const m=da(a.fill??a.color)??o.fill??(l&&o.color);m&&(f.fill=ue(m))}}if(f.stroke){if(i==="stroke"||!l&&i===We)delete f.stroke;else if(f.stroke.field||g)delete f.stroke;else if(T(f.stroke)){const m=me(da(a.stroke||a.color),o.stroke,l?o.color:void 0);m&&(f.stroke={value:m})}}if(i!==Qt){const m=S(t)&&ug(n,r,t);m?f.opacity=[{test:m,...ue(h??1)},ue(u.legend.unselectedOpacity)]:h&&(f.opacity=ue(h))}return f={...f,...e},te(f)?void 0:f}function nE(e,{model:t,legendType:n,legendCmpt:i}){if(n!=="gradient")return;const{config:r,markDef:s,encoding:o}=t;let a={};const c=(i.get("gradientOpacity")??r.legend.gradientOpacity)===void 0?og(o.opacity)||s.opacity:void 0;return c&&(a.opacity=ue(c)),a={...a,...e},te(a)?void 0:a}function iE(e,{fieldOrDatumDef:t,model:n,channel:i,legendCmpt:r}){const s=n.legend(i)||{},o=n.config,a=S(t)?ug(n,r,t):void 0,u=a?[{test:a,value:1},{value:o.legend.unselectedOpacity}]:void 0,{format:c,formatType:l}=s;let f;qn(l)?f=at({fieldOrDatumDef:t,field:"datum.value",format:c,formatType:l,config:o}):c===void 0&&l===void 0&&o.customFormatTypes&&(t.type==="quantitative"&&o.numberFormatType?f=at({fieldOrDatumDef:t,field:"datum.value",format:o.numberFormat,formatType:o.numberFormatType,config:o}):t.type==="temporal"&&o.timeFormatType&&S(t)&&t.timeUnit===void 0&&(f=at({fieldOrDatumDef:t,field:"datum.value",format:o.timeFormat,formatType:o.timeFormatType,config:o})));const d={...u?{opacity:u}:{},...f?{text:f}:{},...e};return te(d)?void 0:d}function rE(e,{legendCmpt:t}){const n=t.get("selections");return n!=null&&n.length?{...e,fill:{value:"transparent"}}:e}function og(e){return ag(e,(t,n)=>Math.max(t,n.value))}function da(e){return ag(e,(t,n)=>me(t,n.value))}function ag(e,t){if(Gy(e))return ge(e.condition).reduce(t,e.value);if(lt(e))return e.value}function ug(e,t,n){const i=t.get("selections");if(!(i!=null&&i.length))return;const r=G(n.field);return i.map(s=>`(!length(data(${G(le(s)+Vn)})) || (${s}[${r}] && indexof(${s}[${r}], datum.value) >= 0))`).join(" || ")}const cl={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:n})=>{const{format:i,formatType:r}=t;return xd(e,e.type,i,r,n,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:n})=>{const{formatType:i}=e;return vd(i,t,n)},gradientLength:e=>{const{legend:t,legendConfig:n}=e;return t.gradientLength??n.gradientLength??fE(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:n})=>e.labelOverlap??t.labelOverlap??dE(n),symbolType:({legend:e,markDef:t,channel:n,encoding:i})=>e.symbolType??oE(t.type,n,i.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>yi(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:n})=>{if(mi(n)&&ot(t)){if(e==="gradient")return}else if(e==="symbol")return;return e},values:({fieldOrDatumDef:e,legend:t})=>sE(t,e)};function sE(e,t){const n=e.values;if(T(n))return Id(t,n);if(I(n))return n}function oE(e,t,n,i){if(t!=="shape"){const r=da(n)??i;if(r)return r}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function aE(e){const{legend:t}=e;return me(t.type,uE(e))}function uE({channel:e,timeUnit:t,scaleType:n}){if(mi(e)){if(q(["quarter","month","day"],t))return"symbol";if(ot(n))return"gradient"}return"symbol"}function cE({legendConfig:e,legendType:t,orient:n,legend:i}){return i.direction??e[t?"gradientDirection":"symbolDirection"]??lE(n,t)}function lE(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return t==="gradient"?"horizontal":void 0}}function fE({legendConfig:e,model:t,direction:n,orient:i,scaleType:r}){const{gradientHorizontalMaxLength:s,gradientHorizontalMinLength:o,gradientVerticalMaxLength:a,gradientVerticalMinLength:u}=e;if(ot(r))return n==="horizontal"?i==="top"||i==="bottom"?ll(t,"width",o,s):o:ll(t,"height",u,a)}function ll(e,t,n,i){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${i})`}}function dE(e){if(q(["quantile","threshold","log","symlog"],e))return"greedy"}function cg(e){const t=pe(e)?pE(e):yE(e);return e.component.legends=t,t}function pE(e){const{encoding:t}=e,n={};for(const i of[We,...ep]){const r=ye(t[i]);!r||!e.getScaleComponent(i)||i===Ge&&S(r)&&r.type===Mi||(n[i]=mE(e,i))}return n}function gE(e,t){const n=e.scaleName(t);if(e.mark==="trail"){if(t==="color")return{stroke:n};if(t==="size")return{strokeWidth:n}}return t==="color"?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}function hE(e,t,n,i){switch(t){case"disable":return n!==void 0;case"values":return!!(n!=null&&n.values);case"title":if(t==="title"&&e===(i==null?void 0:i.title))return!0}return e===(n||{})[t]}function mE(e,t){var R;let n=e.legend(t);const{markDef:i,encoding:r,config:s}=e,o=s.legend,a=new eE({},gE(e,t));mx(e,t,a);const u=n!==void 0?!n:o.disable;if(a.set("disable",u,n!==void 0),u)return a;n=n||{};const c=e.getScaleComponent(t).get("type"),l=ye(r[t]),f=S(l)?(R=Ee(l.timeUnit))==null?void 0:R.unit:void 0,d=n.orient||s.legend.orient||"right",p=aE({legend:n,channel:t,timeUnit:f,scaleType:c}),g=cE({legend:n,legendType:p,orient:d,legendConfig:o}),h={legend:n,channel:t,model:e,markDef:i,encoding:r,fieldOrDatumDef:l,legendConfig:o,config:s,scaleType:c,orient:d,legendType:p,direction:g};for(const v of sg){if(p==="gradient"&&v.startsWith("symbol")||p==="symbol"&&v.startsWith("gradient"))continue;const N=v in cl?cl[v](h):n[v];if(N!==void 0){const F=hE(N,v,n,e.fieldDef(t));(F||s.legend[v]===void 0)&&a.set(v,N,F)}}const m=(n==null?void 0:n.encoding)??{},y=a.get("selections"),x={},$={fieldOrDatumDef:l,model:e,channel:t,legendCmpt:a,legendType:p};for(const v of["labels","legend","title","symbols","gradient","entries"]){const N=ig(m[v]??{},e),F=v in ul?ul[v](N,$):N;F!==void 0&&!te(F)&&(x[v]={...y!=null&&y.length&&S(l)?{name:`${le(l.field)}_legend_${v}`}:{},...y!=null&&y.length?{interactive:!!y}:{},update:F})}return te(x)||a.set("encode",x,!!(n!=null&&n.encoding)),a}function yE(e){const{legends:t,resolve:n}=e.component;for(const i of e.children){cg(i);for(const r of E(i.component.legends))n.legend[r]=Bu(e.component.resolve,r),n.legend[r]==="shared"&&(t[r]=lg(t[r],i.component.legends[r]),t[r]||(n.legend[r]="independent",delete t[r]))}for(const i of E(t))for(const r of e.children)r.component.legends[i]&&n.legend[i]==="shared"&&delete r.component.legends[i];return t}function lg(e,t){var s,o,a,u;if(!e)return t.clone();const n=e.getWithExplicit("orient"),i=t.getWithExplicit("orient");if(n.explicit&&i.explicit&&n.value!==i.value)return;let r=!1;for(const c of sg){const l=ln(e.getWithExplicit(c),t.getWithExplicit(c),c,"legend",(f,d)=>{switch(c){case"symbolType":return bE(f,d);case"title":return Mf(f,d);case"type":return r=!0,qe("symbol")}return qs(f,d,c,"legend")});e.setWithExplicit(c,l)}return r&&((o=(s=e.implicit)==null?void 0:s.encode)!=null&&o.gradient&&Zr(e.implicit,["encode","gradient"]),(u=(a=e.explicit)==null?void 0:a.encode)!=null&&u.gradient&&Zr(e.explicit,["encode","gradient"])),e}function bE(e,t){return t.value==="circle"?t:e}function xE(e,t,n,i){var r,s;e.encode??(e.encode={}),(r=e.encode)[t]??(r[t]={}),(s=e.encode[t]).update??(s.update={}),e.encode[t].update[n]=i}function fg(e){const t=e.component.legends,n={};for(const r of E(t)){const s=e.getScaleComponent(r),o=se(s.get("domains"));if(n[o])for(const a of n[o])lg(a,t[r])||n[o].push(t[r]);else n[o]=[t[r].clone()]}return Oe(n).flat().map(r=>vE(r,e.config)).filter(r=>r!==void 0)}function vE(e,t){var o,a,u;const{disable:n,labelExpr:i,selections:r,...s}=e.combine();if(!n){if(t.aria===!1&&s.aria==null&&(s.aria=!1),(o=s.encode)!=null&&o.symbols){const c=s.encode.symbols.update;c.fill&&c.fill.value!=="transparent"&&!c.stroke&&!s.stroke&&(c.stroke={value:"transparent"});for(const l of ep)s[l]&&delete c[l]}if(s.title||delete s.title,i!==void 0){let c=i;(u=(a=s.encode)==null?void 0:a.labels)!=null&&u.update&&I(s.encode.labels.update.text)&&(c=jn(i,"datum.label",s.encode.labels.update.text.signal)),xE(s,"labels","text",{signal:c})}return s}}function EE(e){return Hi(e)||Gu(e)?AE(e):dg(e)}function AE(e){return e.children.reduce((t,n)=>t.concat(n.assembleProjections()),dg(e))}function dg(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:i}=n;if(t.data){const r={signal:`[${t.size.map(o=>o.signal).join(", ")}]`},s=t.data.reduce((o,a)=>{const u=I(a)?a.signal:`data('${e.lookupDataSource(a)}')`;return q(o,u)||o.push(u),o},[]);if(s.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:i,size:r,fit:{signal:s.length>1?`[${s.join(", ")}]`:s[0]},...n}]}else return[{name:i,translate:{signal:"[width / 2, height / 2]"},...n}]}const SE=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class pg extends tn{constructor(t,n,i,r){super({...n},{name:t}),this.specifiedProjection=n,this.size=i,this.data=r,this.merged=!1}get isFit(){return!!this.data}}function gg(e){e.component.projection=pe(e)?wE(e):$E(e)}function wE(e){if(e.hasProjection){const t=Be(e.specifiedProjection),n=!(t&&(t.scale!=null||t.translate!=null)),i=n?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,r=n?CE(e):void 0,s=new pg(e.projectionName(!0),{...Be(e.config.projection)??{},...t??{}},i,r);return s.get("type")||s.set("type","equalEarth",!1),s}}function CE(e){const t=[],{encoding:n}=e;for(const i of[[ht,gt],[Ze,mt]])(ye(n[i[0]])||ye(n[i[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(Ge)&&e.typedFieldDef(Ge).type===Mi&&t.push({signal:e.getName(`geojson_${t.length}`)}),t.length===0&&t.push(e.requestDataName(re.Main)),t}function FE(e,t){const n=Fa(SE,r=>!!(!pi(e.explicit,r)&&!pi(t.explicit,r)||pi(e.explicit,r)&&pi(t.explicit,r)&&St(e.get(r),t.get(r))));if(St(e.size,t.size)){if(n)return e;if(St(e.explicit,{}))return t;if(St(t.explicit,{}))return e}return null}function $E(e){if(e.children.length===0)return;let t;for(const i of e.children)gg(i);const n=Fa(e.children,i=>{const r=i.component.projection;if(r)if(t){const s=FE(t,r);return s&&(t=s),!!s}else return t=r,!0;else return!0});if(t&&n){const i=e.projectionName(!0),r=new pg(i,t.specifiedProjection,t.size,M(t.data));for(const s of e.children){const o=s.component.projection;o&&(o.isFit&&r.data.push(...s.component.projection.data),s.renameProjection(o.get("name"),i),o.merged=!0)}return r}}function OE(e,t,n,i){if(Nr(t,n)){const r=pe(e)?e.axis(n)??e.legend(n)??{}:{},s=C(t,{expr:"datum"}),o=C(t,{expr:"datum",binSuffix:"end"});return{formulaAs:C(t,{binSuffix:"range",forAs:!0}),formula:Fr(s,o,r.format,r.formatType,i)}}return{}}function hg(e,t){return`${_f(e)}_${t}`}function NE(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}function zu(e,t,n){const i=Ms(n,void 0)??{},r=hg(i,t);return e.getName(`${r}_bins`)}function TE(e){return"as"in e}function fl(e,t,n){let i,r;TE(e)?i=B(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:i=[C(e,{forAs:!0}),C(e,{binSuffix:"end",forAs:!0})];const s={...Ms(t,void 0)},o=hg(s,e.field),{signal:a,extentSignal:u}=NE(n,o);if(Ns(s.extent)){const l=s.extent;r=Xp(n,l.param,l),delete s.extent}const c={bin:s,field:e.field,as:[i],...a?{signal:a}:{},...u?{extentSignal:u}:{},...r?{span:r}:{}};return{key:o,binComponent:c}}class $t extends ee{clone(){return new $t(null,M(this.bins))}constructor(t,n){super(t),this.bins=n}static makeFromEncoding(t,n){const i=n.reduceFieldDef((r,s,o)=>{if(Re(s)&&oe(s.bin)){const{key:a,binComponent:u}=fl(s,s.bin,n);r[a]={...u,...r[a],...OE(n,s,o,n.config)}}return r},{});return te(i)?null:new $t(t,i)}static makeFromTransform(t,n,i){const{key:r,binComponent:s}=fl(n,n.bin,i);return new $t(t,{[r]:s})}merge(t,n){for(const i of E(t.bins))i in this.bins?(n(t.bins[i].signal,this.bins[i].signal),this.bins[i].as=wt([...this.bins[i].as,...t.bins[i].as],H)):this.bins[i]=t.bins[i];for(const i of t.children)t.removeChild(i),i.parent=this;t.remove()}producedFields(){return new Set(Oe(this.bins).map(t=>t.as).flat(2))}dependentFields(){return new Set(Oe(this.bins).map(t=>t.field))}hash(){return`Bin ${H(this.bins)}`}assemble(){return Oe(this.bins).flatMap(t=>{const n=[],[i,...r]=t.as,{extent:s,...o}=t.bin,a={type:"bin",field:Qe(t.field),as:i,signal:t.signal,...Ns(s)?{extent:null}:{extent:s},...t.span?{span:{signal:`span(${t.span})`}}:{},...o};!s&&t.extentSignal&&(n.push({type:"extent",field:Qe(t.field),signal:t.extentSignal}),a.extent={signal:t.extentSignal}),n.push(a);for(const u of r)for(let c=0;c<2;c++)n.push({type:"formula",expr:C({field:i[c]},{expr:"datum"}),as:u[c]});return t.formula&&n.push({type:"formula",expr:t.formula,as:t.formulaAs}),n})}}function DE(e,t,n,i){var s;const r=pe(i)?i.encoding[It(t)]:void 0;if(Re(n)&&pe(i)&&Fd(n,r,i.markDef,i.config))e.add(C(n,{})),e.add(C(n,{suffix:"end"})),n.bin&&Nr(n,t)&&e.add(C(n,{binSuffix:"range"}));else if(Ef(t)){const o=vf(t);e.add(i.getName(o))}else e.add(C(n));return ri(n)&&dy((s=n.scale)==null?void 0:s.range)&&e.add(n.scale.range.field),e}function _E(e,t){for(const n of E(t)){const i=t[n];for(const r of E(i))n in e?e[n][r]=new Set([...e[n][r]??[],...i[r]]):e[n]={[r]:i[r]}}}class ut extends ee{clone(){return new ut(null,new Set(this.dimensions),M(this.measures))}constructor(t,n,i){super(t),this.dimensions=n,this.measures=i}get groupBy(){return this.dimensions}static makeFromEncoding(t,n){let i=!1;n.forEachFieldDef(o=>{o.aggregate&&(i=!0)});const r={},s=new Set;return!i||(n.forEachFieldDef((o,a)=>{const{aggregate:u,field:c}=o;if(u)if(u==="count")r["*"]??(r["*"]={}),r["*"].count=new Set([C(o,{forAs:!0})]);else{if(Xt(u)||xn(u)){const l=Xt(u)?"argmin":"argmax",f=u[l];r[f]??(r[f]={}),r[f][l]=new Set([C({op:l,field:f},{forAs:!0})])}else r[c]??(r[c]={}),r[c][u]=new Set([C(o,{forAs:!0})]);Zt(a)&&n.scaleDomain(a)==="unaggregated"&&(r[c]??(r[c]={}),r[c].min=new Set([C({field:c,aggregate:"min"},{forAs:!0})]),r[c].max=new Set([C({field:c,aggregate:"max"},{forAs:!0})]))}else DE(s,a,o,n)}),s.size+E(r).length===0)?null:new ut(t,s,r)}static makeFromTransform(t,n){const i=new Set,r={};for(const s of n.aggregate){const{op:o,field:a,as:u}=s;o&&(o==="count"?(r["*"]??(r["*"]={}),r["*"].count=new Set([u||C(s,{forAs:!0})])):(r[a]??(r[a]={}),r[a][o]=new Set([u||C(s,{forAs:!0})])))}for(const s of n.groupby??[])i.add(s);return i.size+E(r).length===0?null:new ut(t,i,r)}merge(t){return df(this.dimensions,t.dimensions)?(_E(this.measures,t.measures),!0):(P0("different dimensions, cannot merge"),!1)}addDimensions(t){t.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...E(this.measures)])}producedFields(){const t=new Set;for(const n of E(this.measures))for(const i of E(this.measures[n])){const r=this.measures[n][i];r.size===0?t.add(`${i}_${n}`):r.forEach(t.add,t)}return t}hash(){return`Aggregate ${H({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const t=[],n=[],i=[];for(const s of E(this.measures))for(const o of E(this.measures[s]))for(const a of this.measures[s][o])i.push(a),t.push(o),n.push(s==="*"?null:Qe(s));return{type:"aggregate",groupby:[...this.dimensions].map(Qe),ops:t,fields:n,as:i}}}class Wi extends ee{constructor(t,n,i,r){super(t),this.model=n,this.name=i,this.data=r;for(const s of Je){const o=n.facet[s];if(o){const{bin:a,sort:u}=o;this[s]={name:n.getName(`${s}_domain`),fields:[C(o),...oe(a)?[C(o,{binSuffix:"end"})]:[]],...Ct(u)?{sortField:u}:T(u)?{sortIndexField:ki(o,s)}:{}}}}this.childModel=n.child}hash(){let t="Facet";for(const n of Je)this[n]&&(t+=` ${n.charAt(0)}:${H(this[n])}`);return t}get fields(){var n;const t=[];for(const i of Je)(n=this[i])!=null&&n.fields&&t.push(...this[i].fields);return t}dependentFields(){const t=new Set(this.fields);for(const n of Je)this[n]&&(this[n].sortField&&t.add(this[n].sortField.field),this[n].sortIndexField&&t.add(this[n].sortIndexField));return t}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const t={};for(const n of Rt){const i=this.childModel.component.scales[n];if(i&&!i.merged){const r=i.get("type"),s=i.get("range");if(we(r)&&vn(s)){const o=to(this.childModel,n),a=Wu(o);a?t[n]=a:A(Ma(n))}}}return t}assembleRowColumnHeaderData(t,n,i){const r={row:"y",column:"x",facet:void 0}[t],s=[],o=[],a=[];r&&i&&i[r]&&(n?(s.push(`distinct_${i[r]}`),o.push("max")):(s.push(i[r]),o.push("distinct")),a.push(`distinct_${i[r]}`));const{sortField:u,sortIndexField:c}=this[t];if(u){const{op:l=Ls,field:f}=u;s.push(f),o.push(l),a.push(C(u,{forAs:!0}))}else c&&(s.push(c),o.push("max"),a.push(c));return{name:this[t].name,source:n??this.data,transform:[{type:"aggregate",groupby:this[t].fields,...s.length?{fields:s,ops:o,as:a}:{}}]}}assembleFacetHeaderData(t){var u;const{columns:n}=this.model.layout,{layoutHeaders:i}=this.model.component,r=[],s={};for(const c of Ru){for(const l of Lu){const f=(i[c]&&i[c][l])??[];for(const d of f)if(((u=d.axes)==null?void 0:u.length)>0){s[c]=!0;break}}if(s[c]){const l=`length(data("${this.facet.name}"))`,f=c==="row"?n?{signal:`ceil(${l} / ${n})`}:1:n?{signal:`min(${l}, ${n})`}:{signal:l};r.push({name:`${this.facet.name}_${c}`,transform:[{type:"sequence",start:0,stop:f}]})}}const{row:o,column:a}=s;return(o||a)&&r.unshift(this.assembleRowColumnHeaderData("facet",null,t)),r}assemble(){const t=[];let n=null;const i=this.getChildIndependentFieldsWithStep(),{column:r,row:s,facet:o}=this;if(r&&s&&(i.x||i.y)){n=`cross_${this.column.name}_${this.row.name}`;const a=[].concat(i.x??[],i.y??[]),u=a.map(()=>"distinct");t.push({name:n,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:a,ops:u}]})}for(const a of[Gt,Wt])this[a]&&t.push(this.assembleRowColumnHeaderData(a,n,i));if(o){const a=this.assembleFacetHeaderData(i);a&&t.push(...a)}return t}}function dl(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function kE(e,t){const n=Na(e);if(t==="number")return`toNumber(${n})`;if(t==="boolean")return`toBoolean(${n})`;if(t==="string")return`toString(${n})`;if(t==="date")return`toDate(${n})`;if(t==="flatten")return n;if(t.startsWith("date:")){const i=dl(t.slice(5,t.length));return`timeParse(${n},'${i}')`}else if(t.startsWith("utc:")){const i=dl(t.slice(4,t.length));return`utcParse(${n},'${i}')`}else return A(Gm(t)),null}function IE(e){const t={};return Yr(e.filter,n=>{if(id(n)){let i=null;Ga(n)?i=Xe(n.equal):qa(n)?i=Xe(n.lte):Ha(n)?i=Xe(n.lt):Xa(n)?i=Xe(n.gt):Va(n)?i=Xe(n.gte):Ya(n)?i=n.range[0]:Ka(n)&&(i=(n.oneOf??n.in)[0]),i&&(ni(i)?t[n.field]="date":he(i)?t[n.field]="number":B(i)&&(t[n.field]="string")),n.timeUnit&&(t[n.field]="date")}}),t}function RE(e){const t={};function n(i){Ni(i)?t[i.field]="date":i.type==="quantitative"&&Am(i.aggregate)?t[i.field]="number":Ai(i.field)>1?i.field in t||(t[i.field]="flatten"):ri(i)&&Ct(i.sort)&&Ai(i.sort.field)>1&&(i.sort.field in t||(t[i.sort.field]="flatten"))}if((pe(e)||ct(e))&&e.forEachFieldDef((i,r)=>{if(Re(i))n(i);else{const s=ei(r),o=e.fieldDef(s);n({...i,type:o.type})}}),pe(e)){const{mark:i,markDef:r,encoding:s}=e;if(En(i)&&!e.encoding.order){const o=r.orient==="horizontal"?"y":"x",a=s[o];S(a)&&a.type==="quantitative"&&!(a.field in t)&&(t[a.field]="number")}}return t}function LE(e){const t={};if(pe(e)&&e.component.selection)for(const n of E(e.component.selection)){const i=e.component.selection[n];for(const r of i.project.items)!r.channel&&Ai(r.field)>1&&(t[r.field]="flatten")}return t}class De extends ee{clone(){return new De(null,M(this._parse))}constructor(t,n){super(t),this._parse=n}hash(){return`Parse ${H(this._parse)}`}static makeExplicit(t,n,i){var o;let r={};const s=n.data;return!on(s)&&((o=s==null?void 0:s.format)!=null&&o.parse)&&(r=s.format.parse),this.makeWithAncestors(t,r,{},i)}static makeWithAncestors(t,n,i,r){for(const a of E(i)){const u=r.getWithExplicit(a);u.value!==void 0&&(u.explicit||u.value===i[a]||u.value==="derived"||i[a]==="flatten"?delete i[a]:A(yc(a,i[a],u.value)))}for(const a of E(n)){const u=r.get(a);u!==void 0&&(u===n[a]?delete n[a]:A(yc(a,n[a],u)))}const s=new tn(n,i);r.copyAll(s);const o={};for(const a of E(s.combine())){const u=s.get(a);u!==null&&(o[a]=u)}return E(o).length===0||r.parseNothing?null:new De(t,o)}get parse(){return this._parse}merge(t){this._parse={...this._parse,...t.parse},t.remove()}assembleFormatParse(){const t={};for(const n of E(this._parse)){const i=this._parse[n];Ai(n)===1&&(t[n]=i)}return t}producedFields(){return new Set(E(this._parse))}dependentFields(){return new Set(E(this._parse))}assembleTransforms(t=!1){return E(this._parse).filter(n=>t?Ai(n)>1:!0).map(n=>{const i=kE(n,this._parse[n]);return i?{type:"formula",expr:i,as:Ta(n)}:null}).filter(n=>n!==null)}}class pn extends ee{clone(){return new pn(null)}constructor(t){super(t)}dependentFields(){return new Set}producedFields(){return new Set([ft])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:ft}}}class Rr extends ee{clone(){return new Rr(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${H(this.params)}`}assemble(){return{type:"graticule",...this.params===!0?{}:this.params}}}class Lr extends ee{clone(){return new Lr(null,this.params)}constructor(t,n){super(t),this.params=n}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${H(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class Jn extends ee{constructor(t){super(null),t??(t={name:"source"});let n;if(on(t)||(n=t.format?{...Me(t.format,["parse"])}:{}),dr(t))this._data={values:t.values};else if(Ti(t)){if(this._data={url:t.url},!n.type){let i=/(?:\.([^.]+))?$/.exec(t.url)[1];q(["json","csv","tsv","dsv","topojson"],i)||(i="json"),n.type=i}}else bp(t)?this._data={values:[{type:"Sphere"}]}:(mp(t)||on(t))&&(this._data={});this._generator=on(t),t.name&&(this._name=t.name),n&&!te(n)&&(this._data.format=n)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(t){this._name=t}set parent(t){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return{name:this._name,...this._data,transform:[]}}}var pl=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,n,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(e,n):r?r.value=n:t.set(e,n),n},PE=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:t.get(e)},nr;function Mu(e){return e instanceof Jn||e instanceof Rr||e instanceof Lr}class ju{constructor(){nr.set(this,void 0),pl(this,nr,!1,"f")}setModified(){pl(this,nr,!0,"f")}get modifiedFlag(){return PE(this,nr,"f")}}nr=new WeakMap;class oi extends ju{getNodeDepths(t,n,i){i.set(t,n);for(const r of t.children)this.getNodeDepths(r,n+1,i);return i}optimize(t){const i=[...this.getNodeDepths(t,0,new Map).entries()].sort((r,s)=>s[1]-r[1]);for(const r of i)this.run(r[0]);return this.modifiedFlag}}class Uu extends ju{optimize(t){this.run(t);for(const n of t.children)this.optimize(n);return this.modifiedFlag}}class BE extends Uu{mergeNodes(t,n){const i=n.shift();for(const r of n)t.removeChild(r),r.parent=i,r.remove()}run(t){const n=t.children.map(r=>r.hash()),i={};for(let r=0;r<n.length;r++)i[n[r]]===void 0?i[n[r]]=[t.children[r]]:i[n[r]].push(t.children[r]);for(const r of E(i))i[r].length>1&&(this.setModified(),this.mergeNodes(t,i[r]))}}class zE extends Uu{constructor(t){super(),this.requiresSelectionId=t&&Du(t)}run(t){t instanceof pn&&(this.requiresSelectionId&&(Mu(t.parent)||t.parent instanceof ut||t.parent instanceof De)||(this.setModified(),t.remove()))}}class ME extends ju{optimize(t){return this.run(t,new Set),this.modifiedFlag}run(t,n){let i=new Set;t instanceof Ft&&(i=t.producedFields(),$a(i,n)&&(this.setModified(),t.removeFormulas(n),t.producedFields.length===0&&t.remove()));for(const r of t.children)this.run(r,new Set([...n,...i]))}}class jE extends Uu{constructor(){super()}run(t){t instanceof Ie&&!t.isRequired()&&(this.setModified(),t.remove())}}class UE extends oi{run(t){if(!Mu(t)&&!(t.numChildren()>1)){for(const n of t.children)if(n instanceof De)if(t instanceof De)this.setModified(),t.merge(n);else{if(Oa(t.producedFields(),n.dependentFields()))continue;this.setModified(),n.swapWithParent()}}}}class WE extends oi{run(t){const n=[...t.children],i=t.children.filter(r=>r instanceof De);if(t.numChildren()>1&&i.length>=1){const r={},s=new Set;for(const o of i){const a=o.parse;for(const u of E(a))u in r?r[u]!==a[u]&&s.add(u):r[u]=a[u]}for(const o of s)delete r[o];if(!te(r)){this.setModified();const o=new De(t,r);for(const a of n){if(a instanceof De)for(const u of E(r))delete a.parse[u];t.removeChild(a),a.parent=o,a instanceof De&&E(a.parse).length===0&&a.remove()}}}}}class GE extends oi{run(t){t instanceof Ie||t.numChildren()>0||t instanceof Wi||t instanceof Jn||(this.setModified(),t.remove())}}class HE extends oi{run(t){const n=t.children.filter(r=>r instanceof Ft),i=n.pop();for(const r of n)this.setModified(),i.merge(r)}}class qE extends oi{run(t){const n=t.children.filter(r=>r instanceof ut),i={};for(const r of n){const s=H(r.groupBy);s in i||(i[s]=[]),i[s].push(r)}for(const r of E(i)){const s=i[r];if(s.length>1){const o=s.pop();for(const a of s)o.merge(a)&&(t.removeChild(a),a.parent=o,a.remove(),this.setModified())}}}}class XE extends oi{constructor(t){super(),this.model=t}run(t){const n=!(Mu(t)||t instanceof Ui||t instanceof De||t instanceof pn),i=[],r=[];for(const s of t.children)s instanceof $t&&(n&&!Oa(t.producedFields(),s.dependentFields())?i.push(s):r.push(s));if(i.length>0){const s=i.pop();for(const o of i)s.merge(o,this.model.renameSignal.bind(this.model));this.setModified(),t instanceof $t?t.merge(s,this.model.renameSignal.bind(this.model)):s.swapWithParent()}if(r.length>1){const s=r.pop();for(const o of r)s.merge(o,this.model.renameSignal.bind(this.model));this.setModified()}}}class VE extends oi{run(t){const n=[...t.children];if(!Mn(n,o=>o instanceof Ie)||t.numChildren()<=1)return;const r=[];let s;for(const o of n)if(o instanceof Ie){let a=o;for(;a.numChildren()===1;){const[u]=a.children;if(u instanceof Ie)a=u;else break}r.push(...a.children),s?(t.removeChild(o),o.parent=s.parent,s.parent.removeChild(s),s.parent=a,this.setModified()):s=a}else r.push(o);if(r.length){this.setModified();for(const o of r)o.parent.removeChild(o),o.parent=s}}}class ai extends ee{clone(){return new ai(null,M(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=wt(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return this.transform.groupby&&this.transform.groupby.forEach(t.add,t),this.transform.joinaggregate.map(n=>n.field).filter(n=>n!==void 0).forEach(t.add,t),t}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(t){return t.as??C(t)}hash(){return`JoinAggregateTransform ${H(this.transform)}`}assemble(){const t=[],n=[],i=[];for(const s of this.transform.joinaggregate)n.push(s.op),i.push(this.getDefaultName(s)),t.push(s.field===void 0?null:s.field);const r=this.transform.groupby;return{type:"joinaggregate",as:i,ops:n,fields:t,...r!==void 0?{groupby:r}:{}}}}function YE(e){return e.stack.stackBy.reduce((t,n)=>{const i=n.fieldDef,r=C(i);return r&&t.push(r),t},[])}function KE(e){return T(e)&&e.every(t=>B(t))&&e.length>1}class qt extends ee{clone(){return new qt(null,M(this._stack))}constructor(t,n){super(t),this._stack=n}static makeFromTransform(t,n){const{stack:i,groupby:r,as:s,offset:o="zero"}=n,a=[],u=[];if(n.sort!==void 0)for(const f of n.sort)a.push(f.field),u.push(me(f.order,"ascending"));const c={field:a,order:u};let l;return KE(s)?l=s:B(s)?l=[s,`${s}_end`]:l=[`${n.stack}_start`,`${n.stack}_end`],new qt(t,{dimensionFieldDefs:[],stackField:i,groupby:r,offset:o,sort:c,facetby:[],as:l})}static makeFromEncoding(t,n){const i=n.stack,{encoding:r}=n;if(!i)return null;const{groupbyChannels:s,fieldChannel:o,offset:a,impute:u}=i,c=s.map(p=>{const g=r[p];return Nt(g)}).filter(p=>!!p),l=YE(n),f=n.encoding.order;let d;if(T(f)||S(f))d=Pf(f);else{const p=$d(f)?f.sort:o==="y"?"descending":"ascending";d=l.reduce((g,h)=>(g.field.push(h),g.order.push(p),g),{field:[],order:[]})}return new qt(t,{dimensionFieldDefs:c,stackField:n.vgField(o),facetby:[],stackby:l,sort:d,offset:a,impute:u,as:[n.vgField(o,{suffix:"start",forAs:!0}),n.vgField(o,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(t){this._stack.facetby.push(...t)}dependentFields(){const t=new Set;return t.add(this._stack.stackField),this.getGroupbyFields().forEach(t.add,t),this._stack.facetby.forEach(t.add,t),this._stack.sort.field.forEach(t.add,t),t}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${H(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:t,impute:n,groupby:i}=this._stack;return t.length>0?t.map(r=>r.bin?n?[C(r,{binSuffix:"mid"})]:[C(r,{}),C(r,{binSuffix:"end"})]:[C(r)]).flat():i??[]}assemble(){const t=[],{facetby:n,dimensionFieldDefs:i,stackField:r,stackby:s,sort:o,offset:a,impute:u,as:c}=this._stack;if(u)for(const l of i){const{bandPosition:f=.5,bin:d}=l;if(d){const p=C(l,{expr:"datum"}),g=C(l,{expr:"datum",binSuffix:"end"});t.push({type:"formula",expr:`${f}*${p}+${1-f}*${g}`,as:C(l,{binSuffix:"mid",forAs:!0})})}t.push({type:"impute",field:r,groupby:[...s,...n],key:C(l,{binSuffix:"mid"}),method:"value",value:0})}return t.push({type:"stack",groupby:[...this.getGroupbyFields(),...n],field:r,sort:o,as:c,offset:a}),t}}class Gi extends ee{clone(){return new Gi(null,M(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=wt(this.transform.groupby.concat(t),n=>n)}dependentFields(){const t=new Set;return(this.transform.groupby??[]).forEach(t.add,t),(this.transform.sort??[]).forEach(n=>t.add(n.field)),this.transform.window.map(n=>n.field).filter(n=>n!==void 0).forEach(t.add,t),t}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(t){return t.as??C(t)}hash(){return`WindowTransform ${H(this.transform)}`}assemble(){const t=[],n=[],i=[],r=[];for(const f of this.transform.window)n.push(f.op),i.push(this.getDefaultName(f)),r.push(f.param===void 0?null:f.param),t.push(f.field===void 0?null:f.field);const s=this.transform.frame,o=this.transform.groupby;if(s&&s[0]===null&&s[1]===null&&n.every(f=>Ba(f)))return{type:"joinaggregate",as:i,ops:n,fields:t,...o!==void 0?{groupby:o}:{}};const a=[],u=[];if(this.transform.sort!==void 0)for(const f of this.transform.sort)a.push(f.field),u.push(f.order??"ascending");const c={field:a,order:u},l=this.transform.ignorePeers;return{type:"window",params:r,as:i,ops:n,fields:t,sort:c,...l!==void 0?{ignorePeers:l}:{},...o!==void 0?{groupby:o}:{},...s!==void 0?{frame:s}:{}}}}function JE(e){function t(n){if(!(n instanceof Wi)){const i=n.clone();if(i instanceof Ie){const r=ga+i.getSource();i.setSource(r),e.model.component.data.outputNodes[r]=i}else(i instanceof ut||i instanceof qt||i instanceof Gi||i instanceof ai)&&i.addDimensions(e.fields);for(const r of n.children.flatMap(t))r.parent=i;return[i]}return n.children.flatMap(t)}return t}function pa(e){if(e instanceof Wi)if(e.numChildren()===1&&!(e.children[0]instanceof Ie)){const t=e.children[0];(t instanceof ut||t instanceof qt||t instanceof Gi||t instanceof ai)&&t.addDimensions(e.fields),t.swapWithParent(),pa(e)}else{const t=e.model.component.data.main;mg(t);const n=JE(e),i=e.children.map(n).flat();for(const r of i)r.parent=t}else e.children.map(pa)}function mg(e){if(e instanceof Ie&&e.type===re.Main&&e.numChildren()===1){const t=e.children[0];t instanceof Wi||(t.swapWithParent(),mg(e))}}const ga="scale_",jr=5;function ha(e){for(const t of e){for(const n of t.children)if(n.parent!==t)return!1;if(!ha(t.children))return!1}return!0}function nt(e,t){let n=!1;for(const i of t)n=e.optimize(i)||n;return n}function gl(e,t,n){let i=e.sources,r=!1;return r=nt(new jE,i)||r,r=nt(new zE(t),i)||r,i=i.filter(s=>s.numChildren()>0),r=nt(new GE,i)||r,i=i.filter(s=>s.numChildren()>0),n||(r=nt(new UE,i)||r,r=nt(new XE(t),i)||r,r=nt(new ME,i)||r,r=nt(new WE,i)||r,r=nt(new qE,i)||r,r=nt(new HE,i)||r,r=nt(new BE,i)||r,r=nt(new VE,i)||r),e.sources=i,r}function QE(e,t){ha(e.sources);let n=0,i=0;for(let r=0;r<jr&&gl(e,t,!0);r++)n++;e.sources.map(pa);for(let r=0;r<jr&&gl(e,t,!1);r++)i++;ha(e.sources),Math.max(n,i)===jr&&A(`Maximum optimization runs(${jr}) reached.`)}class Ue{constructor(t){Object.defineProperty(this,"signal",{enumerable:!0,get:t})}static fromName(t,n){return new Ue(()=>t(n))}}function yg(e){pe(e)?ZE(e):eA(e)}function ZE(e){const t=e.component.scales;for(const n of E(t)){const i=nA(e,n);if(t[n].setWithExplicit("domains",i),rA(e,n),e.component.data.isFaceted){let s=e;for(;!ct(s)&&s.parent;)s=s.parent;if(s.component.resolve.scale[n]==="shared")for(const a of i.value)Ut(a)&&(a.data=ga+a.data.replace(ga,""))}}}function eA(e){for(const n of e.children)yg(n);const t=e.component.scales;for(const n of E(t)){let i,r=null;for(const s of e.children){const o=s.component.scales[n];if(o){i===void 0?i=o.getWithExplicit("domains"):i=ln(i,o.getWithExplicit("domains"),"domains","scale",ma);const a=o.get("selectionExtent");r&&a&&r.param!==a.param&&A(Mm),r=a}}t[n].setWithExplicit("domains",i),r&&t[n].set("selectionExtent",r,!0)}}function tA(e,t,n,i){if(e==="unaggregated"){const{valid:r,reason:s}=hl(t,n);if(!r){A(s);return}}else if(e===void 0&&i.useUnaggregatedDomain){const{valid:r}=hl(t,n);if(r)return"unaggregated"}return e}function nA(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:i}=e,r=tA(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return r!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:r}),t==="x"&&ye(i.x2)?ye(i.x)?ln(nn(n,r,e,"x"),nn(n,r,e,"x2"),"domain","scale",ma):nn(n,r,e,"x2"):t==="y"&&ye(i.y2)?ye(i.y)?ln(nn(n,r,e,"y"),nn(n,r,e,"y2"),"domain","scale",ma):nn(n,r,e,"y2"):nn(n,r,e,t)}function iA(e,t,n){return e.map(i=>({signal:`{data: ${js(i,{timeUnit:n,type:t})}}`}))}function Oo(e,t,n){var r;const i=(r=Ee(n))==null?void 0:r.unit;return t==="temporal"||i?iA(e,t,i):[e]}function nn(e,t,n,i){const{encoding:r}=n,s=ye(r[i]),{type:o}=s,a=s.timeUnit;if(fy(t)){const f=nn(e,void 0,n,i),d=Oo(t.unionWith,o,a);return At([...d,...f.value])}else{if(I(t))return At([t]);if(t&&t!=="unaggregated"&&!ld(t))return At(Oo(t,o,a))}const u=n.stack;if(u&&i===u.fieldChannel){if(u.offset==="normalize")return qe([[0,1]]);const f=n.requestDataName(re.Main);return qe([{data:f,field:n.vgField(i,{suffix:"start"})},{data:f,field:n.vgField(i,{suffix:"end"})}])}const c=Zt(i)&&S(s)?sA(n,i,e):void 0;if(Lt(s)){const f=Oo([s.datum],o,a);return qe(f)}const l=s;if(t==="unaggregated"){const f=n.requestDataName(re.Main),{field:d}=s;return qe([{data:f,field:C({field:d,aggregate:"min"})},{data:f,field:C({field:d,aggregate:"max"})}])}else if(oe(l.bin)){if(we(e))return qe(e==="bin-ordinal"?[]:[{data:lr(c)?n.requestDataName(re.Main):n.requestDataName(re.Raw),field:n.vgField(i,Nr(l,i)?{binSuffix:"range"}:{}),sort:c===!0||!V(c)?{field:n.vgField(i,{}),op:"min"}:c}]);{const{bin:f}=l;if(oe(f)){const d=zu(n,l.field,f);return qe([new Ue(()=>{const p=n.getSignalName(d);return`[${p}.start, ${p}.stop]`})])}else return qe([{data:n.requestDataName(re.Main),field:n.vgField(i,{})}])}}else if(l.timeUnit&&q(["time","utc"],e)&&Fd(l,pe(n)?n.encoding[It(i)]:void 0,n.markDef,n.config)){const f=n.requestDataName(re.Main);return qe([{data:f,field:n.vgField(i)},{data:f,field:n.vgField(i,{suffix:"end"})}])}else return qe(c?[{data:lr(c)?n.requestDataName(re.Main):n.requestDataName(re.Raw),field:n.vgField(i),sort:c}]:[{data:n.requestDataName(re.Main),field:n.vgField(i)}])}function No(e,t){const{op:n,field:i,order:r}=e;return{op:n??(t?"sum":Ls),...i?{field:Qe(i)}:{},...r?{order:r}:{}}}function rA(e,t){var a;const n=e.component.scales[t],i=e.specifiedScales[t].domain,r=(a=e.fieldDef(t))==null?void 0:a.bin,s=ld(i)&&i,o=ti(r)&&Ns(r.extent)&&r.extent;(s||o)&&n.set("selectionExtent",s??o,!0)}function sA(e,t,n){if(!we(n))return;const i=e.fieldDef(t),r=i.sort;if(Sd(r))return{op:"min",field:ki(i,t),order:"ascending"};const{stack:s}=e,o=s?new Set([...s.groupbyFields,...s.stackBy.map(a=>a.fieldDef.field)]):void 0;if(Ct(r)){const a=s&&!o.has(r.field);return No(r,a)}else if(Ad(r)){const{encoding:a,order:u}=r,c=e.fieldDef(a),{aggregate:l,field:f}=c,d=s&&!o.has(f);if(Xt(l)||xn(l))return No({field:C(c),order:u},d);if(Ba(l)||!l)return No({op:l,field:f,order:u},d)}else{if(r==="descending")return{op:"min",field:e.vgField(t),order:"descending"};if(q(["ascending",void 0],r))return!0}}function hl(e,t){const{aggregate:n,type:i}=e;return n?B(n)&&!wm.has(n)?{valid:!1,reason:g0(n)}:i==="quantitative"&&t==="log"?{valid:!1,reason:h0(e)}:{valid:!0}:{valid:!1,reason:p0(e)}}function ma(e,t,n,i){return e.explicit&&t.explicit&&A(v0(n,i,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function oA(e){const t=wt(e.map(o=>{if(Ut(o)){const{sort:a,...u}=o;return u}return o}),H),n=wt(e.map(o=>{if(Ut(o)){const a=o.sort;return a!==void 0&&!lr(a)&&("op"in a&&a.op==="count"&&delete a.field,a.order==="ascending"&&delete a.order),a}}).filter(o=>o!==void 0),H);if(t.length===0)return;if(t.length===1){const o=e[0];if(Ut(o)&&n.length>0){let a=n[0];if(n.length>1){A(xc);const u=n.filter(c=>V(c)&&"op"in c&&c.op!=="min");n.every(c=>V(c)&&"op"in c)&&u.length===1?a=u[0]:a=!0}else if(V(a)&&"field"in a){const u=a.field;o.field===u&&(a=a.order?{order:a.order}:!0)}return{...o,sort:a}}return o}const i=wt(n.map(o=>lr(o)||!("op"in o)||B(o.op)&&o.op in vm?o:(A(A0(o)),!0)),H);let r;i.length===1?r=i[0]:i.length>1&&(A(xc),r=!0);const s=wt(e.map(o=>Ut(o)?o.data:null),o=>o);return s.length===1&&s[0]!==null?{data:s[0],fields:t.map(a=>a.field),...r?{sort:r}:{}}:{fields:t,...r?{sort:r}:{}}}function Wu(e){if(Ut(e)&&B(e.field))return e.field;if(Cm(e)){let t;for(const n of e.fields)if(Ut(n)&&B(n.field)){if(!t)t=n.field;else if(t!==n.field)return A(S0),t}return A(w0),t}else if(Fm(e)){A(C0);const t=e.fields[0];return B(t)?t:void 0}}function to(e,t){const i=e.component.scales[t].get("domains").map(r=>(Ut(r)&&(r.data=e.lookupDataSource(r.data)),r));return oA(i)}function bg(e){return Hi(e)||Gu(e)?e.children.reduce((t,n)=>t.concat(bg(n)),ml(e)):ml(e)}function ml(e){return E(e.component.scales).reduce((t,n)=>{const i=e.component.scales[n];if(i.merged)return t;const r=i.combine(),{name:s,type:o,selectionExtent:a,domains:u,range:c,reverse:l,...f}=r,d=aA(r.range,s,n,e),p=to(e,n),g=a?q1(e,a,i,p):null;return t.push({name:s,type:o,...p?{domain:p}:{},...g?{domainRaw:g}:{},range:d,...l!==void 0?{reverse:l}:{},...f}),t},[])}function aA(e,t,n,i){if(Se(n)){if(vn(e))return{step:{signal:`${t}_step`}}}else if(V(e)&&Ut(e))return{...e,data:i.lookupDataSource(e.data)};return e}class xg extends tn{constructor(t,n){super({},{name:t}),this.merged=!1,this.setWithExplicit("type",n)}domainDefinitelyIncludesZero(){return this.get("zero")!==!1?!0:Mn(this.get("domains"),t=>T(t)&&t.length===2&&t[0]<=0&&t[1]>=0)}}const uA=["range","scheme"];function cA(e){const t=e.component.scales;for(const n of Os){const i=t[n];if(!i)continue;const r=lA(n,e);i.setWithExplicit("range",r)}}function yl(e,t){const n=e.fieldDef(t);if(n!=null&&n.bin){const{bin:i,field:r}=n,s=He(t),o=e.getName(s);if(V(i)&&i.binned&&i.step!==void 0)return new Ue(()=>{const a=e.scaleName(t),u=`(domain("${a}")[1] - domain("${a}")[0]) / ${i.step}`;return`${e.getSignalName(o)} / (${u})`});if(oe(i)){const a=zu(e,r,i);return new Ue(()=>{const u=e.getSignalName(a),c=`(${u}.stop - ${u}.start) / ${u}.step`;return`${e.getSignalName(o)} / (${c})`})}}}function lA(e,t){const n=t.specifiedScales[e],{size:i}=t,s=t.getScaleComponent(e).get("type");for(const f of uA)if(n[f]!==void 0){const d=Jo(s,f),p=fd(e,f);if(!d)A(Gf(s,f,e));else if(p)A(p);else switch(f){case"range":{const g=n.range;if(T(g)){if(Se(e))return At(g.map(h=>{if(h==="width"||h==="height"){const m=t.getName(h),y=t.getSignalName.bind(t);return Ue.fromName(y,m)}return h}))}else if(V(g))return At({data:t.requestDataName(re.Main),field:g.field,sort:{op:"min",field:t.vgField(e)}});return At(g)}case"scheme":return At(fA(n[f]))}}const o=e===fe||e==="xOffset"?"width":"height",a=i[o];if(Tt(a)){if(Se(e))if(we(s)){const f=vg(a,t,e);if(f)return At({step:f})}else A(Hf(o));else if(zi(e)){const f=e===gn?"x":"y";if(t.getScaleComponent(f).get("type")==="band"){const g=Eg(a,s);if(g)return At(g)}}}const{rangeMin:u,rangeMax:c}=n,l=dA(e,t);return(u!==void 0||c!==void 0)&&Jo(s,"rangeMin")&&T(l)&&l.length===2?At([u??l[0],c??l[1]]):qe(l)}function fA(e){return ly(e)?{scheme:e.name,...Me(e,["name"])}:{scheme:e}}function dA(e,t){const{size:n,config:i,mark:r,encoding:s}=t,o=t.getSignalName.bind(t),{type:a}=ye(s[e]),c=t.getScaleComponent(e).get("type"),{domain:l,domainMid:f}=t.specifiedScales[e];switch(e){case fe:case Ae:{if(q(["point","band"],c)){const g=Ag(e,n,i.view);if(Tt(g))return{step:vg(g,t,e)}}const d=He(e),p=t.getName(d);return e===Ae&&Ye(c)?[Ue.fromName(o,p),0]:[0,Ue.fromName(o,p)]}case gn:case Bi:return pA(e,t,c);case Jt:{const d=t.component.scales[e].get("zero"),p=Sg(r,d,i),g=mA(r,n,t,i);return Fi(c)?hA(p,g,gA(c,i,l,e)):[p,g]}case et:return[0,Math.PI*2];case Zn:return[0,360];case pt:return[0,new Ue(()=>{const d=t.getSignalName("width"),p=t.getSignalName("height");return`min(${d},${p})/2`})];case yn:return[i.scale.minStrokeWidth,i.scale.maxStrokeWidth];case bn:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case Ge:return"symbol";case We:case _t:case kt:return c==="ordinal"?a==="nominal"?"category":"ordinal":f!==void 0?"diverging":r==="rect"||r==="geoshape"?"heatmap":"ramp";case Qt:case hn:case mn:return[i.scale.minOpacity,i.scale.maxOpacity]}}function vg(e,t,n){const{encoding:i}=t,r=t.getScaleComponent(n),s=Ia(n),o=i[s];if(np({step:e,offsetIsDiscrete:U(o)&&sd(o.type)})==="offset"&&Bd(i,s)){const u=t.getScaleComponent(s);let l=`domain('${t.scaleName(s)}').length`;if(u.get("type")==="band"){const d=u.get("paddingInner")??u.get("padding")??0,p=u.get("paddingOuter")??u.get("padding")??0;l=`bandspace(${l}, ${d}, ${p})`}const f=r.get("paddingInner")??r.get("padding");return{signal:`${e.step} * ${l} / (1-${Tm(f)})`}}else return e.step}function Eg(e,t){if(np({step:e,offsetIsDiscrete:we(t)})==="offset")return{step:e.step}}function pA(e,t,n){const i=e===gn?"x":"y",s=t.getScaleComponent(i).get("type"),o=t.scaleName(i);if(s==="band"){const a=Ag(i,t.size,t.config.view);if(Tt(a)){const u=Eg(a,n);if(u)return u}return[0,{signal:`bandwidth('${o}')`}]}else{const a=t.encoding[i];if(S(a)&&a.timeUnit){const u=td(a.timeUnit,l=>`scale('${o}', ${l})`),c=t.config.scale.bandWithNestedOffsetPaddingInner;if(c){const l=I(c)?`${c.signal}/2`:`${c/2}`,f=I(c)?`(1 - ${c.signal}/2)`:`${1-c/2}`;return[{signal:`${l} * (${u})`},{signal:`${f} * (${u})`}]}return[0,{signal:u}]}return lf(`Cannot use ${e} scale if ${i} scale is not discrete.`)}}function Ag(e,t,n){const i=e===fe?"width":"height",r=t[i];return r||ls(n,i)}function gA(e,t,n,i){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return n!==void 0&&T(n)?n.length+1:(A(I0(i)),3)}}function hA(e,t,n){const i=()=>{const r=st(t),s=st(e),o=`(${r} - ${s}) / (${n} - 1)`;return`sequence(${s}, ${r} + ${o}, ${o})`};return I(t)?new Ue(i):{signal:i()}}function Sg(e,t,n){if(t)return I(t)?{signal:`${t.signal} ? 0 : ${Sg(e,!1,n)}`}:0;switch(e){case"bar":case"tick":return n.scale.minBandSize;case"line":case"trail":case"rule":return n.scale.minStrokeWidth;case"text":return n.scale.minFontSize;case"point":case"square":case"circle":return n.scale.minSize}throw new Error(Ts("size",e))}const bl=.95;function mA(e,t,n,i){const r={x:yl(n,"x"),y:yl(n,"y")};switch(e){case"bar":case"tick":{if(i.scale.maxBandSize!==void 0)return i.scale.maxBandSize;const s=xl(t,r,i.view);return he(s)?s-1:new Ue(()=>`${s.signal} - 1`)}case"line":case"trail":case"rule":return i.scale.maxStrokeWidth;case"text":return i.scale.maxFontSize;case"point":case"square":case"circle":{if(i.scale.maxSize)return i.scale.maxSize;const s=xl(t,r,i.view);return he(s)?Math.pow(bl*s,2):new Ue(()=>`pow(${bl} * ${s.signal}, 2)`)}}throw new Error(Ts("size",e))}function xl(e,t,n){const i=Tt(e.width)?e.width.step:cs(n,"width"),r=Tt(e.height)?e.height.step:cs(n,"height");return t.x||t.y?new Ue(()=>`min(${[t.x?t.x.signal:i,t.y?t.y.signal:r].join(", ")})`):Math.min(i,r)}function wg(e,t){pe(e)?yA(e,t):Fg(e,t)}function yA(e,t){const n=e.component.scales,{config:i,encoding:r,markDef:s,specifiedScales:o}=e;for(const a of E(n)){const u=o[a],c=n[a],l=e.getScaleComponent(a),f=ye(r[a]),d=u[t],p=l.get("type"),g=l.get("padding"),h=l.get("paddingInner"),m=Jo(p,t),y=fd(a,t);if(d!==void 0&&(m?y&&A(y):A(Gf(p,t,a))),m&&y===void 0)if(d!==void 0){const x=f.timeUnit,$=f.type;switch(t){case"domainMax":case"domainMin":ni(u[t])||$==="temporal"||x?c.set(t,{signal:js(u[t],{type:$,timeUnit:x})},!0):c.set(t,u[t],!0);break;default:c.copyKeyFromObject(t,u)}}else{const x=t in vl?vl[t]({model:e,channel:a,fieldOrDatumDef:f,scaleType:p,scalePadding:g,scalePaddingInner:h,domain:u.domain,domainMin:u.domainMin,domainMax:u.domainMax,markDef:s,config:i,hasNestedOffsetScale:Zo(r,a),hasSecondaryRangeChannel:!!r[It(a)]}):i.scale[t];x!==void 0&&c.set(t,x,!1)}}}const vl={bins:({model:e,fieldOrDatumDef:t})=>S(t)?bA(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>xA(e,t.type),nice:({scaleType:e,channel:t,domain:n,domainMin:i,domainMax:r,fieldOrDatumDef:s})=>vA(e,t,n,i,r,s),padding:({channel:e,scaleType:t,fieldOrDatumDef:n,markDef:i,config:r})=>EA(e,t,r.scale,n,i,r.bar),paddingInner:({scalePadding:e,channel:t,markDef:n,scaleType:i,config:r,hasNestedOffsetScale:s})=>AA(e,t,n.type,i,r.scale,s),paddingOuter:({scalePadding:e,channel:t,scaleType:n,scalePaddingInner:i,config:r,hasNestedOffsetScale:s})=>SA(e,t,n,i,r.scale,s),reverse:({fieldOrDatumDef:e,scaleType:t,channel:n,config:i})=>{const r=S(e)?e.sort:void 0;return wA(t,r,n,i.scale)},zero:({channel:e,fieldOrDatumDef:t,domain:n,markDef:i,scaleType:r,config:s,hasSecondaryRangeChannel:o})=>CA(e,t,n,i,r,s.scale,o)};function Cg(e){pe(e)?cA(e):Fg(e,"range")}function Fg(e,t){const n=e.component.scales;for(const i of e.children)t==="range"?Cg(i):wg(i,t);for(const i of E(n)){let r;for(const s of e.children){const o=s.component.scales[i];if(o){const a=o.getWithExplicit(t);r=ln(r,a,t,"scale",hp((u,c)=>{switch(t){case"range":return u.step&&c.step?u.step-c.step:0}return 0}))}}n[i].setWithExplicit(t,r)}}function bA(e,t){const n=t.bin;if(oe(n)){const i=zu(e,t.field,n);return new Ue(()=>e.getSignalName(i))}else if(Fe(n)&&ti(n)&&n.step!==void 0)return{step:n.step}}function xA(e,t){if(q([We,_t,kt],e)&&t!=="nominal")return"hcl"}function vA(e,t,n,i,r,s){var o;if(!((o=Nt(s))!=null&&o.bin||T(n)||r!=null||i!=null||q([je.TIME,je.UTC],e)))return Se(t)?!0:void 0}function EA(e,t,n,i,r,s){if(Se(e)){if(ot(t)){if(n.continuousPadding!==void 0)return n.continuousPadding;const{type:o,orient:a}=r;if(o==="bar"&&!(S(i)&&(i.bin||i.timeUnit))&&(a==="vertical"&&e==="x"||a==="horizontal"&&e==="y"))return s.continuousBandSize}if(t===je.POINT)return n.pointPadding}}function AA(e,t,n,i,r,s=!1){if(e===void 0){if(Se(t)){const{bandPaddingInner:o,barBandPaddingInner:a,rectBandPaddingInner:u,bandWithNestedOffsetPaddingInner:c}=r;return s?c:me(o,n==="bar"?a:u)}else if(zi(t)&&i===je.BAND)return r.offsetBandPaddingInner}}function SA(e,t,n,i,r,s=!1){if(e===void 0){if(Se(t)){const{bandPaddingOuter:o,bandWithNestedOffsetPaddingOuter:a}=r;if(s)return a;if(n===je.BAND)return me(o,I(i)?{signal:`${i.signal}/2`}:i/2)}else if(zi(t)){if(n===je.POINT)return .5;if(n===je.BAND)return r.offsetBandPaddingOuter}}}function wA(e,t,n,i){if(n==="x"&&i.xReverse!==void 0)return Ye(e)&&t==="descending"?I(i.xReverse)?{signal:`!${i.xReverse.signal}`}:!i.xReverse:i.xReverse;if(Ye(e)&&t==="descending")return!0}function CA(e,t,n,i,r,s,o){if(!!n&&n!=="unaggregated"&&Ye(r)){if(T(n)){const u=n[0],c=n[n.length-1];if(u<=0&&c>=0)return!0}return!1}if(e==="size"&&t.type==="quantitative"&&!Fi(r))return!0;if(!(S(t)&&t.bin)&&q([...Rt,...dm],e)){const{orient:u,type:c}=i;return q(["bar","area","line","trail"],c)&&(u==="horizontal"&&e==="y"||u==="vertical"&&e==="x")?!1:q(["bar","area"],c)&&!o?!0:s==null?void 0:s.zero}return!1}function FA(e,t,n,i,r=!1){const s=$A(t,n,i,r),{type:o}=e;return Zt(t)?o!==void 0?yy(t,o)?S(n)&&!my(o,n.type)?(A(b0(o,s)),s):o:(A(y0(t,o,s)),s):s:null}function $A(e,t,n,i){var r;switch(t.type){case"nominal":case"ordinal":{if(mi(e)||yo(e)==="discrete")return e==="shape"&&t.type==="ordinal"&&A(bo(e,"ordinal")),"ordinal";if(Se(e)||zi(e)){if(q(["rect","bar","image","rule"],n.type)||i)return"band"}else if(n.type==="arc"&&e in Pa)return"band";const s=n[He(e)];return Hn(s)||Oi(t)&&((r=t.axis)!=null&&r.tickBand)?"band":"point"}case"temporal":return mi(e)?"time":yo(e)==="discrete"?(A(bo(e,"temporal")),"ordinal"):S(t)&&t.timeUnit&&Ee(t.timeUnit).utc?"utc":"time";case"quantitative":return mi(e)?S(t)&&oe(t.bin)?"bin-ordinal":"linear":yo(e)==="discrete"?(A(bo(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(Uf(t.type))}function OA(e,{ignoreRange:t}={}){$g(e),yg(e);for(const n of hy)wg(e,n);t||Cg(e)}function $g(e){pe(e)?e.component.scales=NA(e):e.component.scales=DA(e)}function NA(e){const{encoding:t,mark:n,markDef:i}=e,r={};for(const s of Os){const o=ye(t[s]);if(o&&n===gd&&s===Ge&&o.type===Mi)continue;let a=o&&o.scale;if(zi(s)){const u=Ff(s);if(!Zo(t,u)){a&&A(i0(s));continue}}if(o&&a!==null&&a!==!1){a??(a={});const u=Zo(t,s),c=FA(a,s,o,i,u);r[s]=new xg(e.scaleName(`${s}`,!0),{value:c,explicit:a.type===c})}}return r}const TA=hp((e,t)=>Ec(e)-Ec(t));function DA(e){var t;const n=e.component.scales={},i={},r=e.component.resolve;for(const s of e.children){$g(s);for(const o of E(s.component.scales))if((t=r.scale)[o]??(t[o]=rg(o,e)),r.scale[o]==="shared"){const a=i[o],u=s.component.scales[o].getWithExplicit("type");a?sy(a.value,u.value)?i[o]=ln(a,u,"type","scale",TA):(r.scale[o]="independent",delete i[o]):i[o]=u}}for(const s of E(i)){const o=e.scaleName(s,!0),a=i[s];n[s]=new xg(o,a);for(const u of e.children){const c=u.component.scales[s];c&&(u.renameScale(c.get("name"),o),c.merged=!0)}}return n}class To{constructor(){this.nameMap={}}rename(t,n){this.nameMap[t]=n}has(t){return this.nameMap[t]!==void 0}get(t){for(;this.nameMap[t]&&t!==this.nameMap[t];)t=this.nameMap[t];return t}}function pe(e){return(e==null?void 0:e.type)==="unit"}function ct(e){return(e==null?void 0:e.type)==="facet"}function Gu(e){return(e==null?void 0:e.type)==="concat"}function Hi(e){return(e==null?void 0:e.type)==="layer"}class Hu{constructor(t,n,i,r,s,o,a){this.type=n,this.parent=i,this.config=s,this.correctDataNames=u=>{var c,l,f;return(c=u.from)!=null&&c.data&&(u.from.data=this.lookupDataSource(u.from.data)),(f=(l=u.from)==null?void 0:l.facet)!=null&&f.data&&(u.from.facet.data=this.lookupDataSource(u.from.facet.data)),u},this.parent=i,this.config=s,this.view=Be(a),this.name=t.name??r,this.title=rn(t.title)?{text:t.title}:t.title?Be(t.title):void 0,this.scaleNameMap=i?i.scaleNameMap:new To,this.projectionNameMap=i?i.projectionNameMap:new To,this.signalNameMap=i?i.signalNameMap:new To,this.data=t.data,this.description=t.description,this.transforms=N1(t.transform??[]),this.layout=n==="layer"||n==="unit"?{}:kb(t,n,s),this.component={data:{sources:i?i.component.data.sources:[],outputNodes:i?i.component.data.outputNodes:{},outputNodeRefCounts:i?i.component.data.outputNodeRefCounts:{},isFaceted:Ps(t)||(i==null?void 0:i.component.data.isFaceted)&&t.data===void 0},layoutSize:new tn,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...o?M(o):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){OA(this)}parseProjection(){gg(this)}renameTopLevelLayoutSizeSignal(){this.getName("width")!=="width"&&this.renameSignal(this.getName("width"),"width"),this.getName("height")!=="height"&&this.renameSignal(this.getName("height"),"height")}parseLegends(){cg(this)}assembleEncodeFromView(t){const{style:n,...i}=t,r={};for(const s of E(i)){const o=i[s];o!==void 0&&(r[s]=ue(o))}return r}assembleGroupEncodeEntry(t){let n={};return this.view&&(n=this.assembleEncodeFromView(this.view)),!t&&(this.description&&(n.description=ue(this.description)),this.type==="unit"||this.type==="layer")?{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...n??{}}:te(n)?void 0:n}assembleLayout(){if(!this.layout)return;const{spacing:t,...n}=this.layout,{component:i,config:r}=this,s=Qv(i.layoutHeaders,r);return{padding:t,...this.assembleDefaultLayout(),...n,...s?{titleBand:s}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:t}=this.component;let n=[];for(const i of Je)t[i].title&&n.push(qv(this,i));for(const i of Ru)n=n.concat(Xv(this,i));return n}assembleAxes(){return kv(this.component.axes,this.config)}assembleLegends(){return fg(this)}assembleProjections(){return EE(this)}assembleTitle(){const{encoding:t,...n}=this.title??{},i={...kf(this.config.title).nonMarkTitleProperties,...n,...t?{encode:{update:t}}:{}};if(i.text)return q(["unit","layer"],this.type)?q(["middle",void 0],i.anchor)&&(i.frame??(i.frame="group")):i.anchor??(i.anchor="start"),te(i)?void 0:i}assembleGroup(t=[]){const n={};t=t.concat(this.assembleSignals()),t.length>0&&(n.signals=t);const i=this.assembleLayout();i&&(n.layout=i),n.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const r=!this.parent||ct(this.parent)?bg(this):[];r.length>0&&(n.scales=r);const s=this.assembleAxes();s.length>0&&(n.axes=s);const o=this.assembleLegends();return o.length>0&&(n.legends=o),n}getName(t){return le((this.name?`${this.name}_`:"")+t)}getDataName(t){return this.getName(re[t].toLowerCase())}requestDataName(t){const n=this.getDataName(t),i=this.component.data.outputNodeRefCounts;return i[n]=(i[n]||0)+1,n}getSizeSignalRef(t){if(ct(this.parent)){const n=ng(t),i=$s(n),r=this.component.scales[i];if(r&&!r.merged){const s=r.get("type"),o=r.get("range");if(we(s)&&vn(o)){const a=r.get("name"),u=to(this,i),c=Wu(u);if(c){const l=C({aggregate:"distinct",field:c},{expr:"datum"});return{signal:tg(a,r,l)}}else return A(Ma(i)),null}}}return{signal:this.signalNameMap.get(this.getName(t))}}lookupDataSource(t){const n=this.component.data.outputNodes[t];return n?n.getSource():t}getSignalName(t){return this.signalNameMap.get(t)}renameSignal(t,n){this.signalNameMap.rename(t,n)}renameScale(t,n){this.scaleNameMap.rename(t,n)}renameProjection(t,n){this.projectionNameMap.rename(t,n)}scaleName(t,n){if(n)return this.getName(t);if(Sf(t)&&Zt(t)&&this.component.scales[t]||this.scaleNameMap.has(this.getName(t)))return this.scaleNameMap.get(this.getName(t))}projectionName(t){if(t)return this.getName("projection");if(this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection")))return this.projectionNameMap.get(this.getName("projection"))}getScaleComponent(t){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const n=this.component.scales[t];return n&&!n.merged?n:this.parent?this.parent.getScaleComponent(t):void 0}getSelectionComponent(t,n){let i=this.component.selection[t];if(!i&&this.parent&&(i=this.parent.getSelectionComponent(t,n)),!i)throw new Error(Rm(n));return i}hasAxisOrientSignalRef(){var t,n;return((t=this.component.axes.x)==null?void 0:t.some(i=>i.hasOrientSignalRef()))||((n=this.component.axes.y)==null?void 0:n.some(i=>i.hasOrientSignalRef()))}}class Og extends Hu{vgField(t,n={}){const i=this.fieldDef(t);if(i)return C(i,n)}reduceFieldDef(t,n){return ub(this.getMapping(),(i,r,s)=>{const o=Nt(r);return o?t(i,o,s):i},n)}forEachFieldDef(t,n){gu(this.getMapping(),(i,r)=>{const s=Nt(i);s&&t(s,r)},n)}}class no extends ee{clone(){return new no(null,M(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=M(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"value",i[1]??"density"],n.groupby&&n.minsteps==null&&n.maxsteps==null&&n.steps==null&&(this.transform.steps=200)}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${H(this.transform)}`}assemble(){const{density:t,...n}=this.transform;return{type:"kde",field:t,...n}}}class io extends ee{clone(){return new io(null,M(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=M(n)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${H(this.transform)}`}assemble(){const{extent:t,param:n}=this.transform;return{type:"extent",field:t,signal:n}}}class hr extends ee{clone(){return new hr(null,{...this.filter})}constructor(t,n){super(t),this.filter=n}static make(t,n){const{config:i,mark:r,markDef:s}=n;if(Q("invalid",s,i)!=="filter")return null;const a=n.reduceFieldDef((u,c,l)=>{const f=Zt(l)&&n.getScaleComponent(l);if(f){const d=f.get("type");Ye(d)&&c.aggregate!=="count"&&!En(r)&&(u[c.field]=c)}return u},{});return E(a).length?new hr(t,a):null}dependentFields(){return new Set(E(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${H(this.filter)}`}assemble(){const t=E(this.filter).reduce((n,i)=>{const r=this.filter[i],s=C(r,{expr:"datum"});return r!==null&&(r.type==="temporal"?n.push(`(isDate(${s}) || (isValid(${s}) && isFinite(+${s})))`):r.type==="quantitative"&&(n.push(`isValid(${s})`),n.push(`isFinite(+${s})`))),n},[]);return t.length>0?{type:"filter",expr:t.join(" && ")}:null}}class ro extends ee{clone(){return new ro(this.parent,M(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=M(n);const{flatten:i,as:r=[]}=this.transform;this.transform.as=i.map((s,o)=>r[o]??s)}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${H(this.transform)}`}assemble(){const{flatten:t,as:n}=this.transform;return{type:"flatten",fields:t,as:n}}}class so extends ee{clone(){return new so(null,M(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=M(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"key",i[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${H(this.transform)}`}assemble(){const{fold:t,as:n}=this.transform;return{type:"fold",fields:t,as:n}}}class xi extends ee{clone(){return new xi(null,M(this.fields),this.geojson,this.signal)}static parseAll(t,n){if(n.component.projection&&!n.component.projection.isFit)return t;let i=0;for(const r of[[ht,gt],[Ze,mt]]){const s=r.map(o=>{const a=ye(n.encoding[o]);return S(a)?a.field:Lt(a)?{expr:`${a.datum}`}:lt(a)?{expr:`${a.value}`}:void 0});(s[0]||s[1])&&(t=new xi(t,s,null,n.getName(`geojson_${i++}`)))}if(n.channelHasField(Ge)){const r=n.typedFieldDef(Ge);r.type===Mi&&(t=new xi(t,null,r.field,n.getName(`geojson_${i++}`)))}return t}constructor(t,n,i,r){super(t),this.fields=n,this.geojson=i,this.signal=r}dependentFields(){const t=(this.fields??[]).filter(B);return new Set([...this.geojson?[this.geojson]:[],...t])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${H(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}class mr extends ee{clone(){return new mr(null,this.projection,M(this.fields),M(this.as))}constructor(t,n,i,r){super(t),this.projection=n,this.fields=i,this.as=r}static parseAll(t,n){if(!n.projectionName())return t;for(const i of[[ht,gt],[Ze,mt]]){const r=i.map(o=>{const a=ye(n.encoding[o]);return S(a)?a.field:Lt(a)?{expr:`${a.datum}`}:lt(a)?{expr:`${a.value}`}:void 0}),s=i[0]===Ze?"2":"";(r[0]||r[1])&&(t=new mr(t,n.projectionName(),r,[n.getName(`x${s}`),n.getName(`y${s}`)]))}return t}dependentFields(){return new Set(this.fields.filter(B))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${H(this.fields)} ${H(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class zn extends ee{clone(){return new zn(null,M(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(t){const{start:n=0,stop:i,step:r}=t;return{signal:`sequence(${[n,i,...r?[r]:[]].join(",")})`}}static makeFromTransform(t,n){return new zn(t,n)}static makeFromEncoding(t,n){const i=n.encoding,r=i.x,s=i.y;if(S(r)&&S(s)){const o=r.impute?r:s.impute?s:void 0;if(o===void 0)return;const a=r.impute?s:s.impute?r:void 0,{method:u,value:c,frame:l,keyvals:f}=o.impute,d=Md(n.mark,i);return new zn(t,{impute:o.field,key:a.field,...u?{method:u}:{},...c!==void 0?{value:c}:{},...l?{frame:l}:{},...f!==void 0?{keyvals:f}:{},...d.length?{groupby:d}:{}})}return null}hash(){return`Impute ${H(this.transform)}`}assemble(){const{impute:t,key:n,keyvals:i,method:r,groupby:s,value:o,frame:a=[null,null]}=this.transform,u={type:"impute",field:t,key:n,...i?{keyvals:l1(i)?this.processSequence(i):i}:{},method:"value",...s?{groupby:s}:{},value:!r||r==="value"?o:null};if(r&&r!=="value"){const c={type:"window",as:[`imputed_${t}_value`],ops:[r],fields:[t],frame:a,ignorePeers:!1,...s?{groupby:s}:{}},l={type:"formula",expr:`datum.${t} === null ? datum.imputed_${t}_value : datum.${t}`,as:t};return[u,c,l]}else return[u]}}class oo extends ee{clone(){return new oo(null,M(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=M(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${H(this.transform)}`}assemble(){const{loess:t,on:n,...i}=this.transform;return{type:"loess",x:n,y:t,...i}}}class yr extends ee{clone(){return new yr(null,M(this.transform),this.secondary)}constructor(t,n,i){super(t),this.transform=n,this.secondary=i}static make(t,n,i,r){const s=n.component.data.sources,{from:o}=i;let a=null;if(f1(o)){let u=Dg(o.data,s);u||(u=new Jn(o.data),s.push(u));const c=n.getName(`lookup_${r}`);a=new Ie(u,c,re.Lookup,n.component.data.outputNodeRefCounts),n.component.data.outputNodes[c]=a}else if(d1(o)){const u=o.param;i={as:u,...i};let c;try{c=n.getSelectionComponent(le(u),u)}catch{throw new Error(Bm(u))}if(a=c.materialized,!a)throw new Error(zm(u))}return new yr(t,i,a.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?ge(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${H({transform:this.transform,secondary:this.secondary})}`}assemble(){let t;if(this.transform.from.fields)t={values:this.transform.from.fields,...this.transform.as?{as:ge(this.transform.as)}:{}};else{let n=this.transform.as;B(n)||(A(Xm),n="_lookup"),t={as:[n]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...t,...this.transform.default?{default:this.transform.default}:{}}}}class ao extends ee{clone(){return new ao(null,M(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=M(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"prob",i[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${H(this.transform)}`}assemble(){const{quantile:t,...n}=this.transform;return{type:"quantile",field:t,...n}}}class uo extends ee{clone(){return new uo(null,M(this.transform))}constructor(t,n){super(t),this.transform=n,this.transform=M(n);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??n.on,i[1]??n.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${H(this.transform)}`}assemble(){const{regression:t,on:n,...i}=this.transform;return{type:"regression",x:n,y:t,...i}}}class co extends ee{clone(){return new co(null,M(this.transform))}constructor(t,n){super(t),this.transform=n}addDimensions(t){this.transform.groupby=wt((this.transform.groupby??[]).concat(t),n=>n)}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${H(this.transform)}`}assemble(){const{pivot:t,value:n,groupby:i,limit:r,op:s}=this.transform;return{type:"pivot",field:t,value:n,...r!==void 0?{limit:r}:{},...s!==void 0?{op:s}:{},...i!==void 0?{groupby:i}:{}}}}class lo extends ee{clone(){return new lo(null,M(this.transform))}constructor(t,n){super(t),this.transform=n}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${H(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function Ng(e){let t=0;function n(i,r){if(i instanceof Jn&&!i.isGenerator&&!Ti(i.data)&&(e.push(r),r={name:null,source:r.name,transform:[]}),i instanceof De&&(i.parent instanceof Jn&&!r.source?(r.format={...r.format??{},parse:i.assembleFormatParse()},r.transform.push(...i.assembleTransforms(!0))):r.transform.push(...i.assembleTransforms())),i instanceof Wi){r.name||(r.name=`data_${t++}`),!r.source||r.transform.length>0?(e.push(r),i.data=r.name):i.data=r.source,e.push(...i.assemble());return}switch((i instanceof Rr||i instanceof Lr||i instanceof hr||i instanceof Ui||i instanceof _i||i instanceof mr||i instanceof ut||i instanceof yr||i instanceof Gi||i instanceof ai||i instanceof so||i instanceof ro||i instanceof no||i instanceof oo||i instanceof ao||i instanceof uo||i instanceof pn||i instanceof lo||i instanceof co||i instanceof io)&&r.transform.push(i.assemble()),(i instanceof $t||i instanceof Ft||i instanceof zn||i instanceof qt||i instanceof xi)&&r.transform.push(...i.assemble()),i instanceof Ie&&(r.source&&r.transform.length===0?i.setSource(r.source):i.parent instanceof Ie?i.setSource(r.name):(r.name||(r.name=`data_${t++}`),i.setSource(r.name),i.numChildren()===1&&(e.push(r),r={name:null,source:r.name,transform:[]}))),i.numChildren()){case 0:i instanceof Ie&&(!r.source||r.transform.length>0)&&e.push(r);break;case 1:n(i.children[0],r);break;default:{r.name||(r.name=`data_${t++}`);let s=r.name;!r.source||r.transform.length>0?e.push(r):s=r.source;for(const o of i.children)n(o,{name:null,source:s,transform:[]});break}}}return n}function _A(e){const t=[],n=Ng(t);for(const i of e.children)n(i,{source:e.name,name:null,transform:[]});return t}function kA(e,t){const n=[],i=Ng(n);let r=0;for(const o of e.sources){o.hasName()||(o.dataName=`source_${r++}`);const a=o.assemble();i(o,a)}for(const o of n)o.transform.length===0&&delete o.transform;let s=0;for(const[o,a]of n.entries())(a.transform??[]).length===0&&!a.source&&n.splice(s++,0,n.splice(o,1)[0]);for(const o of n)for(const a of o.transform??[])a.type==="lookup"&&(a.from=e.outputNodes[a.from].getSource());for(const o of n)o.name in t&&(o.values=t[o.name]);return n}function IA(e){return e==="top"||e==="left"||I(e)?"header":"footer"}function RA(e){for(const t of Je)LA(e,t);El(e,"x"),El(e,"y")}function LA(e,t){var o;const{facet:n,config:i,child:r,component:s}=e;if(e.channelHasField(t)){const a=n[t],u=Ii("title",null,i,t);let c=yi(a,i,{allowDisabling:!0,includeDefault:u===void 0||!!u});r.component.layoutHeaders[t].title&&(c=T(c)?c.join(", "):c,c+=` / ${r.component.layoutHeaders[t].title}`,r.component.layoutHeaders[t].title=null);const l=Ii("labelOrient",a.header,i,t),f=a.header!==null?me((o=a.header)==null?void 0:o.labels,i.header.labels,!0):!1,d=q(["bottom","right"],l)?"footer":"header";s.layoutHeaders[t]={title:a.header!==null?c:null,facetFieldDef:a,[d]:t==="facet"?[]:[Tg(e,t,f)]}}}function Tg(e,t,n){const i=t==="row"?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(i)?e.child.getSizeSignalRef(i):void 0,axes:[]}}function El(e,t){const{child:n}=e;if(n.component.axes[t]){const{layoutHeaders:i,resolve:r}=e.component;if(r.axis[t]=Bu(r,t),r.axis[t]==="shared"){const s=t==="x"?"column":"row",o=i[s];for(const a of n.component.axes[t]){const u=IA(a.get("orient"));o[u]??(o[u]=[Tg(e,s,!1)]);const c=tr(a,"main",e.config,{header:!0});c&&o[u][0].axes.push(c),a.mainExtracted=!0}}}}function PA(e){qu(e),hs(e,"width"),hs(e,"height")}function BA(e){qu(e);const t=e.layout.columns===1?"width":"childWidth",n=e.layout.columns===void 0?"height":"childHeight";hs(e,t),hs(e,n)}function qu(e){for(const t of e.children)t.parseLayoutSize()}function hs(e,t){const n=ng(t),i=$s(n),r=e.component.resolve,s=e.component.layoutSize;let o;for(const a of e.children){const u=a.component.layoutSize.getWithExplicit(n),c=r.scale[i]??rg(i,e);if(c==="independent"&&u.value==="step"){o=void 0;break}if(o){if(c==="independent"&&o.value!==u.value){o=void 0;break}o=ln(o,u,n,"")}else o=u}if(o){for(const a of e.children)e.renameSignal(a.getName(n),e.getName(t)),a.component.layoutSize.set(n,"merged",!1);s.setWithExplicit(t,o)}else s.setWithExplicit(t,{explicit:!1,value:void 0})}function zA(e){const{size:t,component:n}=e;for(const i of Rt){const r=He(i);if(t[r]){const s=t[r];n.layoutSize.set(r,Tt(s)?"step":s,!0)}else{const s=MA(e,r);n.layoutSize.set(r,s,!1)}}}function MA(e,t){const n=t==="width"?"x":"y",i=e.config,r=e.getScaleComponent(n);if(r){const s=r.get("type"),o=r.get("range");if(we(s)){const a=ls(i.view,t);return vn(o)||Tt(a)?"step":a}else return ta(i.view,t)}else{if(e.hasProjection||e.mark==="arc")return ta(i.view,t);{const s=ls(i.view,t);return Tt(s)?s.step:s}}}function ya(e,t,n){return C(t,{suffix:`by_${C(e)}`,...n??{}})}class ar extends Og{constructor(t,n,i,r){super(t,"facet",n,i,r,t.resolve),this.child=Ju(t.spec,this,this.getName("child"),void 0,r),this.children=[this.child],this.facet=this.initFacet(t.facet)}initFacet(t){if(!$r(t))return{facet:this.initFacetFieldDef(t,"facet")};const n=E(t),i={};for(const r of n){if(![Wt,Gt].includes(r)){A(Ts(r,"facet"));break}const s=t[r];if(s.field===void 0){A(Yo(s,r));break}i[r]=this.initFacetFieldDef(s,r)}return i}initFacetFieldDef(t,n){const i=du(t,n);return i.header?i.header=Be(i.header):i.header===null&&(i.header=null),i}channelHasField(t){return!!this.facet[t]}fieldDef(t){return this.facet[t]}parseData(){this.component.data=fo(this),this.child.parseData()}parseLayoutSize(){qu(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),RA(this)}assembleSelectionTopLevelSignals(t){return this.child.assembleSelectionTopLevelSignals(t)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(t){return this.child.assembleSelectionData(t)}getHeaderLayoutMixins(){const t={};for(const n of Je)for(const i of Lu){const r=this.component.layoutHeaders[n],s=r[i],{facetFieldDef:o}=r;if(o){const a=Ii("titleOrient",o.header,this.config,n);if(["right","bottom"].includes(a)){const u=Zs(n,a);t.titleAnchor??(t.titleAnchor={}),t.titleAnchor[u]="end"}}if(s!=null&&s[0]){const a=n==="row"?"height":"width",u=i==="header"?"headerBand":"footerBand";n!=="facet"&&!this.child.component.layoutSize.get(a)&&(t[u]??(t[u]={}),t[u][n]=.5),r.title&&(t.offset??(t.offset={}),t.offset[n==="row"?"rowTitle":"columnTitle"]=10)}}return t}assembleDefaultLayout(){const{column:t,row:n}=this.facet,i=t?this.columnDistinctSignal():n?1:void 0;let r="all";return(!n&&this.component.resolve.scale.x==="independent"||!t&&this.component.resolve.scale.y==="independent")&&(r="none"),{...this.getHeaderLayoutMixins(),...i?{columns:i}:{},bounds:"full",align:r}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof ar))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(t){return this.parent&&this.parent instanceof ar?{...this.channelHasField("column")?{encode:{update:{columns:{field:C(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(t)}:super.assembleGroup(t)}getCardinalityAggregateForChild(){const t=[],n=[],i=[];if(this.child instanceof ar){if(this.child.channelHasField("column")){const r=C(this.child.facet.column);t.push(r),n.push("distinct"),i.push(`distinct_${r}`)}}else for(const r of Rt){const s=this.child.component.scales[r];if(s&&!s.merged){const o=s.get("type"),a=s.get("range");if(we(o)&&vn(a)){const u=to(this.child,r),c=Wu(u);c?(t.push(c),n.push("distinct"),i.push(`distinct_${c}`)):A(Ma(r))}}}return{fields:t,ops:n,as:i}}assembleFacet(){const{name:t,data:n}=this.component.data.facetRoot,{row:i,column:r}=this.facet,{fields:s,ops:o,as:a}=this.getCardinalityAggregateForChild(),u=[];for(const l of Je){const f=this.facet[l];if(f){u.push(C(f));const{bin:d,sort:p}=f;if(oe(d)&&u.push(C(f,{binSuffix:"end"})),Ct(p)){const{field:g,op:h=Ls}=p,m=ya(f,p);i&&r?(s.push(m),o.push("max"),a.push(m)):(s.push(g),o.push(h),a.push(m))}else if(T(p)){const g=ki(f,l);s.push(g),o.push("max"),a.push(g)}}}const c=!!i&&!!r;return{name:t,data:n,groupby:u,...c||s.length>0?{aggregate:{...c?{cross:c}:{},...s.length?{fields:s,ops:o,as:a}:{}}}:{}}}facetSortFields(t){const{facet:n}=this,i=n[t];return i?Ct(i.sort)?[ya(i,i.sort,{expr:"datum"})]:T(i.sort)?[ki(i,t,{expr:"datum"})]:[C(i,{expr:"datum"})]:[]}facetSortOrder(t){const{facet:n}=this,i=n[t];if(i){const{sort:r}=i;return[(Ct(r)?r.order:!T(r)&&r)||"ascending"]}return[]}assembleLabelTitle(){var r;const{facet:t,config:n}=this;if(t.facet)return fa(t.facet,"facet",n);const i={row:["top","bottom"],column:["left","right"]};for(const s of Ru)if(t[s]){const o=Ii("labelOrient",(r=t[s])==null?void 0:r.header,n,s);if(i[s].includes(o))return fa(t[s],s,n)}}assembleMarks(){const{child:t}=this,n=this.component.data.facetRoot,i=_A(n),r=t.assembleGroupEncodeEntry(!1),s=this.assembleLabelTitle()||t.assembleTitle(),o=t.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...s?{title:s}:{},...o?{style:o}:{},from:{facet:this.assembleFacet()},sort:{field:Je.map(u=>this.facetSortFields(u)).flat(),order:Je.map(u=>this.facetSortOrder(u)).flat()},...i.length>0?{data:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup(U1(this,[]))}]}getMapping(){return this.facet}}function jA(e,t){const{row:n,column:i}=t;if(n&&i){let r=null;for(const s of[n,i])if(Ct(s.sort)){const{field:o,op:a=Ls}=s.sort;e=r=new ai(e,{joinaggregate:[{op:a,field:o,as:ya(s,s.sort,{forAs:!0})}],groupby:[C(s)]})}return r}return null}function Dg(e,t){var n,i,r,s;for(const o of t){const a=o.data;if(e.name&&o.hasName()&&e.name!==o.dataName)continue;const u=(n=e.format)==null?void 0:n.mesh,c=(i=a.format)==null?void 0:i.feature;if(u&&c)continue;const l=(r=e.format)==null?void 0:r.feature;if((l||c)&&l!==c)continue;const f=(s=a.format)==null?void 0:s.mesh;if(!((u||f)&&u!==f)){if(dr(e)&&dr(a)){if(St(e.values,a.values))return o}else if(Ti(e)&&Ti(a)){if(e.url===a.url)return o}else if(mp(e)&&e.name===o.dataName)return o}}return null}function UA(e,t){if(e.data||!e.parent){if(e.data===null){const i=new Jn({values:[]});return t.push(i),i}const n=Dg(e.data,t);if(n)return on(e.data)||(n.data.format=ff({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const i=new Jn(e.data);return t.push(i),i}}else return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}function WA(e,t,n){let i=0;for(const r of t.transforms){let s,o;if(A1(r))o=e=new _i(e,r),s="derived";else if(Cu(r)){const a=IE(r);o=e=De.makeWithAncestors(e,{},a,n)??e,e=new Ui(e,t,r.filter)}else if(fp(r))o=e=$t.makeFromTransform(e,r,t),s="number";else if(w1(r))s="date",n.getWithExplicit(r.field).value===void 0&&(e=new De(e,{[r.field]:s}),n.set(r.field,s,!1)),o=e=Ft.makeFromTransform(e,r);else if(C1(r))o=e=ut.makeFromTransform(e,r),s="number",Du(t)&&(e=new pn(e));else if(lp(r))o=e=yr.make(e,t,r,i++),s="derived";else if(x1(r))o=e=new Gi(e,r),s="number";else if(v1(r))o=e=new ai(e,r),s="number";else if(F1(r))o=e=qt.makeFromTransform(e,r),s="derived";else if($1(r))o=e=new so(e,r),s="derived";else if(O1(r))o=e=new io(e,r),s="derived";else if(E1(r))o=e=new ro(e,r),s="derived";else if(p1(r))o=e=new co(e,r),s="derived";else if(b1(r))e=new lo(e,r);else if(S1(r))o=e=zn.makeFromTransform(e,r),s="derived";else if(g1(r))o=e=new no(e,r),s="derived";else if(h1(r))o=e=new ao(e,r),s="derived";else if(m1(r))o=e=new uo(e,r),s="derived";else if(y1(r))o=e=new oo(e,r),s="derived";else{A(qm(r));continue}if(o&&s!==void 0)for(const a of o.producedFields()??[])n.set(a,s,!1)}return e}function fo(e){var h;let t=UA(e,e.component.data.sources);const{outputNodes:n,outputNodeRefCounts:i}=e.component.data,r=e.data,o=!(r&&(on(r)||Ti(r)||dr(r)))&&e.parent?e.parent.component.data.ancestorParse.clone():new M1;on(r)?(yp(r)?t=new Lr(t,r.sequence):Fu(r)&&(t=new Rr(t,r.graticule)),o.parseNothing=!0):((h=r==null?void 0:r.format)==null?void 0:h.parse)===null&&(o.parseNothing=!0),t=De.makeExplicit(t,e,o)??t,t=new pn(t);const a=e.parent&&Hi(e.parent);(pe(e)||ct(e))&&a&&(t=$t.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=WA(t,e,o));const u=LE(e),c=RE(e);t=De.makeWithAncestors(t,{},{...u,...c},o)??t,pe(e)&&(t=xi.parseAll(t,e),t=mr.parseAll(t,e)),(pe(e)||ct(e))&&(a||(t=$t.makeFromEncoding(t,e)??t),t=Ft.makeFromEncoding(t,e)??t,t=_i.parseAllForSortIndex(t,e));const l=e.getDataName(re.Raw),f=new Ie(t,l,re.Raw,i);if(n[l]=f,t=f,pe(e)){const m=ut.makeFromEncoding(t,e);m&&(t=m,Du(e)&&(t=new pn(t))),t=zn.makeFromEncoding(t,e)??t,t=qt.makeFromEncoding(t,e)??t}pe(e)&&(t=hr.make(t,e)??t);const d=e.getDataName(re.Main),p=new Ie(t,d,re.Main,i);n[d]=p,t=p,pe(e)&&Dv(e,p);let g=null;if(ct(e)){const m=e.getName("facet");t=jA(t,e.facet)??t,g=new Wi(t,e,m,p.getSource()),n[m]=g}return{...e.component.data,outputNodes:n,outputNodeRefCounts:i,raw:f,main:p,facetRoot:g,ancestorParse:o}}class GA extends Hu{constructor(t,n,i,r){var s,o,a,u;super(t,"concat",n,i,r,t.resolve),(((o=(s=t.resolve)==null?void 0:s.axis)==null?void 0:o.x)==="shared"||((u=(a=t.resolve)==null?void 0:a.axis)==null?void 0:u.y)==="shared")&&A(Wm),this.children=this.getChildren(t).map((c,l)=>Ju(c,this,this.getName(`concat_${l}`),void 0,r))}parseData(){this.component.data=fo(this);for(const t of this.children)t.parseData()}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of E(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){for(const t of this.children)t.parseAxesAndHeaders()}getChildren(t){return Gs(t)?t.vconcat:Su(t)?t.hconcat:t.concat}parseLayoutSize(){BA(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.forEach(t=>t.assembleSignals()),[]}assembleLayoutSignals(){const t=Pu(this);for(const n of this.children)t.push(...n.assembleLayoutSignals());return t}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleMarks(){return this.children.map(t=>{const n=t.assembleTitle(),i=t.assembleGroupStyle(),r=t.assembleGroupEncodeEntry(!1);return{type:"group",name:t.getName("group"),...n?{title:n}:{},...i?{style:i}:{},...r?{encode:{update:r}}:{},...t.assembleGroup()}})}assembleGroupStyle(){}assembleDefaultLayout(){const t=this.layout.columns;return{...t!=null?{columns:t}:{},bounds:"full",align:"each"}}}function HA(e){return e===!1||e===null}const qA={disable:1,gridScale:1,scale:1,...Ld,labelExpr:1,encode:1},_g=E(qA);class Xu extends tn{constructor(t={},n={},i=!1){super(),this.explicit=t,this.implicit=n,this.mainExtracted=i}clone(){return new Xu(M(this.explicit),M(this.implicit),this.mainExtracted)}hasAxisPart(t){return t==="axis"?!0:t==="grid"||t==="title"?!!this.get(t):!HA(this.get(t))}hasOrientSignalRef(){return I(this.explicit.orient)}}function XA(e,t,n){const{encoding:i,config:r}=e,s=ye(i[t])??ye(i[It(t)]),o=e.axis(t)||{},{format:a,formatType:u}=o;if(qn(u))return{text:at({fieldOrDatumDef:s,field:"datum.value",format:a,formatType:u,config:r}),...n};if(a===void 0&&u===void 0&&r.customFormatTypes){if($i(s)==="quantitative"){if(Oi(s)&&s.stack==="normalize"&&r.normalizedNumberFormatType)return{text:at({fieldOrDatumDef:s,field:"datum.value",format:r.normalizedNumberFormat,formatType:r.normalizedNumberFormatType,config:r}),...n};if(r.numberFormatType)return{text:at({fieldOrDatumDef:s,field:"datum.value",format:r.numberFormat,formatType:r.numberFormatType,config:r}),...n}}if($i(s)==="temporal"&&r.timeFormatType&&S(s)&&!s.timeUnit)return{text:at({fieldOrDatumDef:s,field:"datum.value",format:r.timeFormat,formatType:r.timeFormatType,config:r}),...n}}return n}function VA(e){return Rt.reduce((t,n)=>(e.component.scales[n]&&(t[n]=[tS(n,e)]),t),{})}const YA={bottom:"top",top:"bottom",left:"right",right:"left"};function KA(e){const{axes:t,resolve:n}=e.component,i={top:0,bottom:0,right:0,left:0};for(const r of e.children){r.parseAxesAndHeaders();for(const s of E(r.component.axes))n.axis[s]=Bu(e.component.resolve,s),n.axis[s]==="shared"&&(t[s]=JA(t[s],r.component.axes[s]),t[s]||(n.axis[s]="independent",delete t[s]))}for(const r of Rt){for(const s of e.children)if(s.component.axes[r]){if(n.axis[r]==="independent"){t[r]=(t[r]??[]).concat(s.component.axes[r]);for(const o of s.component.axes[r]){const{value:a,explicit:u}=o.getWithExplicit("orient");if(!I(a)){if(i[a]>0&&!u){const c=YA[a];i[a]>i[c]&&o.set("orient",c,!1)}i[a]++}}}delete s.component.axes[r]}if(n.axis[r]==="independent"&&t[r]&&t[r].length>1)for(const[s,o]of(t[r]||[]).entries())s>0&&o.get("grid")&&!o.explicit.grid&&(o.implicit.grid=!1)}}function JA(e,t){if(e){if(e.length!==t.length)return;const n=e.length;for(let i=0;i<n;i++){const r=e[i],s=t[i];if(!!r!=!!s)return;if(r&&s){const o=r.getWithExplicit("orient"),a=s.getWithExplicit("orient");if(o.explicit&&a.explicit&&o.value!==a.value)return;e[i]=QA(r,s)}}}else return t.map(n=>n.clone());return e}function QA(e,t){for(const n of _g){const i=ln(e.getWithExplicit(n),t.getWithExplicit(n),n,"axis",(r,s)=>{switch(n){case"title":return Mf(r,s);case"gridScale":return{explicit:r.explicit,value:me(r.value,s.value)}}return qs(r,s,n,"axis")});e.setWithExplicit(n,i)}return e}function ZA(e,t,n,i,r){if(t==="disable")return n!==void 0;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(I(n.labelAngle)?n.labelAngle:fr(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===Jp(i,r))return!0}return e===n[t]}const eS=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function tS(e,t){var y,x;let n=t.axis(e);const i=new Xu,r=ye(t.encoding[e]),{mark:s,config:o}=t,a=(n==null?void 0:n.orient)||((y=o[e==="x"?"axisX":"axisY"])==null?void 0:y.orient)||((x=o.axis)==null?void 0:x.orient)||jv(e),u=t.getScaleComponent(e).get("type"),c=Iv(e,u,a,t.config),l=n!==void 0?!n:ca("disable",o.style,n==null?void 0:n.style,c).configValue;if(i.set("disable",l,n!==void 0),l)return i;n=n||{};const f=Bv(r,n,e,o.style,c),d=vd(n.formatType,r,u),p=xd(r,r.type,n.format,n.formatType,o,!0),g={fieldOrDatumDef:r,axis:n,channel:e,model:t,scaleType:u,orient:a,labelAngle:f,format:p,formatType:d,mark:s,config:o};for(const $ of _g){const R=$ in ol?ol[$](g):Oc($)?n[$]:void 0,v=R!==void 0,N=ZA(R,$,n,t,e);if(v&&N)i.set($,R,N);else{const{configValue:F=void 0,configFrom:j=void 0}=Oc($)&&$!=="values"?ca($,o.style,n.style,c):{},J=F!==void 0;v&&!J?i.set($,R,N):(j!=="vgAxisConfig"||eS.has($)&&J||Tr(F)||I(F))&&i.set($,F,!1)}}const h=n.encoding??{},m=Rd.reduce(($,R)=>{if(!i.hasAxisPart(R))return $;const v=ig(h[R]??{},t),N=R==="labels"?XA(t,e,v):v;return N!==void 0&&!te(N)&&($[R]={update:N}),$},{});return te(m)||i.set("encode",m,!!n.encoding||n.labelAngle!==void 0),i}function nS({encoding:e,size:t}){for(const n of Rt){const i=He(n);Tt(t[i])&&sn(e[n])&&(delete t[i],A(Hf(i)))}return t}const iS={vgMark:"arc",encodeEntry:e=>({...tt(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...Te("x",e,{defaultPos:"mid"}),...Te("y",e,{defaultPos:"mid"}),...fn(e,"radius"),...fn(e,"theta")})},rS={vgMark:"area",encodeEntry:e=>({...tt(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...fs("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:e.markDef.orient==="horizontal"}),...fs("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:e.markDef.orient==="vertical"}),...Tu(e)})},sS={vgMark:"rect",encodeEntry:e=>({...tt(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...fn(e,"x"),...fn(e,"y")})},oS={vgMark:"shape",encodeEntry:e=>({...tt(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[{type:"geoshape",projection:e.projectionName(),...n&&S(n)&&n.type===Mi?{field:C(n,{expr:"datum"})}:{}}]}},aS={vgMark:"image",encodeEntry:e=>({...tt(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...fn(e,"x"),...fn(e,"y"),...Ou(e,"url")})},uS={vgMark:"line",encodeEntry:e=>({...tt(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...Te("x",e,{defaultPos:"mid"}),...Te("y",e,{defaultPos:"mid"}),...xe("size",e,{vgChannel:"strokeWidth"}),...Tu(e)})},cS={vgMark:"trail",encodeEntry:e=>({...tt(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...Te("x",e,{defaultPos:"mid"}),...Te("y",e,{defaultPos:"mid"}),...xe("size",e),...Tu(e)})};function Vu(e,t){const{config:n}=e;return{...tt(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...Te("x",e,{defaultPos:"mid"}),...Te("y",e,{defaultPos:"mid"}),...xe("size",e),...xe("angle",e),...lS(e,n,t)}}function lS(e,t,n){return n?{shape:{value:n}}:xe("shape",e)}const fS={vgMark:"symbol",encodeEntry:e=>Vu(e)},dS={vgMark:"symbol",encodeEntry:e=>Vu(e,"circle")},pS={vgMark:"symbol",encodeEntry:e=>Vu(e,"square")},gS={vgMark:"rect",encodeEntry:e=>({...tt(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...fn(e,"x"),...fn(e,"y")})},hS={vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return!e.encoding.x&&!e.encoding.y&&!e.encoding.latitude&&!e.encoding.longitude?{}:{...tt(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...fs("x",e,{defaultPos:n==="horizontal"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="vertical"}),...fs("y",e,{defaultPos:n==="vertical"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:n!=="horizontal"}),...xe("size",e,{vgChannel:"strokeWidth"})}}},mS={vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return{...tt(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...Te("x",e,{defaultPos:"mid"}),...Te("y",e,{defaultPos:"mid"}),...Ou(e),...xe("size",e,{vgChannel:"fontSize"}),...xe("angle",e),...Yc("align",yS(e.markDef,n,t)),...Yc("baseline",bS(e.markDef,n,t)),...Te("radius",e,{defaultPos:null}),...Te("theta",e,{defaultPos:null})}}};function yS(e,t,n){if(Q("align",e,n)===void 0)return"center"}function bS(e,t,n){if(Q("baseline",e,n)===void 0)return"middle"}const xS={vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,i=n.orient,r=i==="horizontal"?"width":"height",s=i==="horizontal"?"height":"width";return{...tt(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Te("x",e,{defaultPos:"mid",vgChannel:"xc"}),...Te("y",e,{defaultPos:"mid",vgChannel:"yc"}),...xe("size",e,{defaultValue:vS(e),vgChannel:r}),[s]:ue(Q("thickness",n,t))}}};function vS(e){const{config:t,markDef:n}=e,{orient:i}=n,r=i==="horizontal"?"width":"height",s=e.getScaleComponent(i==="horizontal"?"x":"y"),o=Q("size",n,t,{vgChannel:r})??t.tick.bandSize;if(o!==void 0)return o;{const a=s?s.get("range"):void 0;return a&&vn(a)&&he(a.step)?a.step*3/4:cs(t.view,r)*3/4}}const Ur={arc:iS,area:rS,bar:sS,circle:dS,geoshape:oS,image:aS,line:uS,point:fS,rect:gS,rule:hS,square:pS,text:mS,tick:xS,trail:cS};function ES(e){if(q([Is,_s,vy],e.mark)){const t=Md(e.mark,e.encoding);if(t.length>0)return AS(e,t)}else if(e.mark===ks){const t=Vo.some(n=>Q(n,e.markDef,e.config));if(e.stack&&!e.fieldDef("size")&&t)return SS(e)}return Yu(e)}const Al="faceted_path_";function AS(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:Al+e.requestDataName(re.Main),data:e.requestDataName(re.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:Yu(e,{fromPrefix:Al})}]}const Sl="stack_group_";function SS(e){var c;const[t]=Yu(e,{fromPrefix:Sl}),n=e.scaleName(e.stack.fieldChannel),i=(l={})=>e.vgField(e.stack.fieldChannel,l),r=(l,f)=>{const d=[i({prefix:"min",suffix:"start",expr:f}),i({prefix:"max",suffix:"start",expr:f}),i({prefix:"min",suffix:"end",expr:f}),i({prefix:"max",suffix:"end",expr:f})];return`${l}(${d.map(p=>`scale('${n}',${p})`).join(",")})`};let s,o;e.stack.fieldChannel==="x"?(s={...Ei(t.encode.update,["y","yc","y2","height",...Vo]),x:{signal:r("min","datum")},x2:{signal:r("max","datum")},clip:{value:!0}},o={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...Me(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(s={...Ei(t.encode.update,["x","xc","x2","width"]),y:{signal:r("min","datum")},y2:{signal:r("max","datum")},clip:{value:!0}},o={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...Me(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const l of Vo){const f=Vt(l,e.markDef,e.config);t.encode.update[l]?(s[l]=t.encode.update[l],delete t.encode.update[l]):f&&(s[l]=ue(f)),f&&(t.encode.update[l]={value:0})}const a=[];if(((c=e.stack.groupbyChannels)==null?void 0:c.length)>0)for(const l of e.stack.groupbyChannels){const f=e.fieldDef(l),d=C(f);d&&a.push(d),(f!=null&&f.bin||f!=null&&f.timeUnit)&&a.push(C(f,{binSuffix:"end"}))}return s=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((l,f)=>{if(t.encode.update[f])return{...l,[f]:t.encode.update[f]};{const d=Vt(f,e.markDef,e.config);return d!==void 0?{...l,[f]:ue(d)}:l}},s),s.stroke&&(s.strokeForeground={value:!0},s.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(re.Main),name:Sl+e.requestDataName(re.Main),groupby:a,aggregate:{fields:[i({suffix:"start"}),i({suffix:"start"}),i({suffix:"end"}),i({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:s},marks:[{type:"group",encode:{update:o},marks:[t]}]}]}function wS(e){var a;const{encoding:t,stack:n,mark:i,markDef:r,config:s}=e,o=t.order;if(!(!T(o)&&lt(o)&&qo(o.value)||!o&&qo(Q("order",r,s)))){if((T(o)||S(o))&&!n)return Pf(o,{expr:"datum"});if(En(i)){const u=r.orient==="horizontal"?"y":"x",c=t[u];if(S(c)){const l=c.sort;if(T(l))return{field:C(c,{prefix:u,suffix:"sort_index",expr:"datum"})};if(Ct(l))return{field:C({aggregate:pu(e.encoding)?l.op:void 0,field:l.field},{expr:"datum"})};if(Ad(l)){const f=e.fieldDef(l.encoding);return{field:C(f,{expr:"datum"}),order:l.order}}else return l===null?void 0:{field:C(c,{binSuffix:(a=e.stack)!=null&&a.impute?"mid":void 0,expr:"datum"})}}return}}}function Yu(e,t={fromPrefix:""}){const{mark:n,markDef:i,encoding:r,config:s}=e,o=me(i.clip,CS(e),FS(e)),a=Rf(i),u=r.key,c=wS(e),l=$S(e),f=Q("aria",i,s),d=Ur[n].postEncodingTransform?Ur[n].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:Ur[n].vgMark,...o?{clip:!0}:{},...a?{style:a}:{},...u?{key:u.field}:{},...c?{sort:c}:{},...l||{},...f===!1?{aria:f}:{},from:{data:t.fromPrefix+e.requestDataName(re.Main)},encode:{update:Ur[n].encodeEntry(e)},...d?{transform:d}:{}}]}function CS(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return t!=null&&t.get("selectionExtent")||n!=null&&n.get("selectionExtent")?!0:void 0}function FS(e){const t=e.component.projection;return t&&!t.isFit?!0:void 0}function $S(e){if(!e.component.selection)return null;const t=E(e.component.selection).length;let n=t,i=e.parent;for(;i&&n===0;)n=E(i.component.selection).length,i=i.parent;return n?{interactive:t>0||e.mark==="geoshape"||!!e.encoding.tooltip}:null}class kg extends Og{constructor(t,n,i,r={},s){super(t,"unit",n,i,s,void 0,Tc(t)?t.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const o=Ot(t.mark)?{...t.mark}:{type:t.mark},a=o.type;o.filled===void 0&&(o.filled=n1(o,s,{graticule:t.data&&Fu(t.data)}));const u=this.encoding=ob(t.encoding||{},a,o.filled,s);this.markDef=ap(o,u,s),this.size=nS({encoding:u,size:Tc(t)?{...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}}:r}),this.stack=op(this.markDef,u),this.specifiedScales=this.initScales(a,u),this.specifiedAxes=this.initAxes(u),this.specifiedLegends=this.initLegends(u),this.specifiedProjection=t.projection,this.selection=(t.params??[]).filter(c=>Eu(c))}get hasProjection(){const{encoding:t}=this,n=this.mark===gd,i=t&&rm.some(r=>U(t[r]));return n||i}scaleDomain(t){const n=this.specifiedScales[t];return n?n.domain:void 0}axis(t){return this.specifiedAxes[t]}legend(t){return this.specifiedLegends[t]}initScales(t,n){return Os.reduce((i,r)=>{const s=ye(n[r]);return s&&(i[r]=this.initScale(s.scale??{})),i},{})}initScale(t){const{domain:n,range:i}=t,r=Be(t);return T(n)&&(r.domain=n.map(Xe)),T(i)&&(r.range=i.map(Xe)),r}initAxes(t){return Rt.reduce((n,i)=>{const r=t[i];if(U(r)||i===fe&&U(t.x2)||i===Ae&&U(t.y2)){const s=U(r)?r.axis:void 0;n[i]=s&&this.initAxis({...s})}return n},{})}initAxis(t){const n=E(t),i={};for(const r of n){const s=t[r];i[r]=Tr(s)?If(s):Xe(s)}return i}initLegends(t){return pm.reduce((n,i)=>{const r=ye(t[i]);if(r&&hm(i)){const s=r.legend;n[i]=s&&Be(s)}return n},{})}parseData(){this.component.data=fo(this)}parseLayoutSize(){zA(this)}parseSelections(){this.component.selection=Tv(this,this.selection)}parseMarkGroup(){this.component.mark=ES(this)}parseAxesAndHeaders(){this.component.axes=VA(this)}assembleSelectionTopLevelSignals(t){return W1(this,t)}assembleSignals(){return[...Vp(this),...j1(this,[])]}assembleSelectionData(t){return G1(this,t)}assembleLayout(){return null}assembleLayoutSignals(){return Pu(this)}assembleMarks(){let t=this.component.mark??[];return(!this.parent||!Hi(this.parent))&&(t=vp(this,t)),t.map(this.correctDataNames)}assembleGroupStyle(){const{style:t}=this.view||{};return t!==void 0?t:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(t){return Pn(this.encoding,t)}fieldDef(t){const n=this.encoding[t];return Nt(n)}typedFieldDef(t){const n=this.fieldDef(t);return Re(n)?n:null}}class Ku extends Hu{constructor(t,n,i,r,s){super(t,"layer",n,i,s,t.resolve,t.view);const o={...r,...t.width?{width:t.width}:{},...t.height?{height:t.height}:{}};this.children=t.layer.map((a,u)=>{if(Hs(a))return new Ku(a,this,this.getName(`layer_${u}`),o,s);if(en(a))return new kg(a,this,this.getName(`layer_${u}`),o,s);throw new Error(za(a))})}parseData(){this.component.data=fo(this);for(const t of this.children)t.parseData()}parseLayoutSize(){PA(this)}parseSelections(){this.component.selection={};for(const t of this.children){t.parseSelections();for(const n of E(t.component.selection))this.component.selection[n]=t.component.selection[n]}}parseMarkGroup(){for(const t of this.children)t.parseMarkGroup()}parseAxesAndHeaders(){KA(this)}assembleSelectionTopLevelSignals(t){return this.children.reduce((n,i)=>i.assembleSelectionTopLevelSignals(n),t)}assembleSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleSignals()),Vp(this))}assembleLayoutSignals(){return this.children.reduce((t,n)=>t.concat(n.assembleLayoutSignals()),Pu(this))}assembleSelectionData(t){return this.children.reduce((n,i)=>i.assembleSelectionData(n),t)}assembleGroupStyle(){const t=new Set;for(const i of this.children)for(const r of ge(i.assembleGroupStyle()))t.add(r);const n=Array.from(t);return n.length>1?n:n.length===1?n[0]:void 0}assembleTitle(){let t=super.assembleTitle();if(t)return t;for(const n of this.children)if(t=n.assembleTitle(),t)return t}assembleLayout(){return null}assembleMarks(){return H1(this,this.children.flatMap(t=>t.assembleMarks()))}assembleLegends(){return this.children.reduce((t,n)=>t.concat(n.assembleLegends()),fg(this))}}function Ju(e,t,n,i,r){if(Ps(e))return new ar(e,t,n,r);if(Hs(e))return new Ku(e,t,n,i,r);if(en(e))return new kg(e,t,n,i,r);if(Tb(e))return new GA(e,t,n,r);throw new Error(za(e))}function OS(e,t={}){t.logger&&R0(t.logger),t.fieldTitle&&_d(t.fieldTitle);try{const n=sp(xs(t.config,e.config)),i=gp(e,n),r=Ju(i,null,"",void 0,n);return r.parse(),QE(r.component.data,r),{spec:TS(r,NS(e,i.autosize,n,r),e.datasets,e.usermeta),normalized:i}}finally{t.logger&&L0(),t.fieldTitle&&Jy()}}function NS(e,t,n,i){const r=i.component.layoutSize.get("width"),s=i.component.layoutSize.get("height");if(t===void 0?(t={type:"pad"},i.hasAxisOrientSignalRef()&&(t.resize=!0)):B(t)&&(t={type:t}),r&&s&&P1(t.type)){if(r==="step"&&s==="step")A(gc()),t.type="pad";else if(r==="step"||s==="step"){const o=r==="step"?"width":"height";A(gc($s(o)));const a=o==="width"?"height":"width";t.type=B1(a)}}return{...E(t).length===1&&t.type?t.type==="pad"?{}:{autosize:t.type}:{autosize:t},...Uc(n,!1),...Uc(e,!0)}}function TS(e,t,n={},i){const r=e.config?Gb(e.config):void 0,s=[].concat(e.assembleSelectionData([]),kA(e.component.data,n)),o=e.assembleProjections(),a=e.assembleTitle(),u=e.assembleGroupStyle(),c=e.assembleGroupEncodeEntry(!0);let l=e.assembleLayoutSignals();l=l.filter(p=>(p.name==="width"||p.name==="height")&&p.value!==void 0?(t[p.name]=+p.value,!1):!0);const{params:f,...d}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...d,...a?{title:a}:{},...u?{style:u}:{},...c?{encode:{update:c}}:{},data:s,...o.length>0?{projections:o}:{},...e.assembleGroup([...l,...e.assembleSelectionTopLevelSignals([]),...tp(f)]),...r?{config:r}:{},...i?{usermeta:i}:{}}}const DS=Xh.version,_S=Object.freeze(Object.defineProperty({__proto__:null,accessPathDepth:Ai,accessPathWithDatum:Na,compile:OS,contains:q,deepEqual:St,deleteNestedProperty:Zr,duplicate:M,entries:un,every:Fa,fieldIntersection:Oa,flatAccessWithDatum:pf,getFirstDefined:me,hasIntersection:$a,hash:H,internalField:mf,isBoolean:lr,isEmpty:te,isEqual:em,isInternalField:yf,isNullOrFalse:qo,isNumeric:Es,keys:E,logicalExpr:rr,mergeDeep:ff,never:lf,normalize:gp,normalizeAngle:fr,omit:Me,pick:Ei,prefixGenerator:Xo,removePathFromField:Ta,replaceAll:jn,replacePathInField:Qe,resetIdCounter:nm,setEqual:df,some:Mn,stringify:se,titleCase:Er,unique:wt,uniqueId:hf,vals:Oe,varName:le,version:DS},Symbol.toStringTag,{value:"Module"}));function Ig(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}}var kS="vega-themes",IS="2.14.0",RS="Themes for stylized Vega and Vega-Lite visualizations.",LS=["vega","vega-lite","themes","style"],PS="BSD-3-Clause",BS={name:"UW Interactive Data Lab",url:"https://idl.cs.washington.edu"},zS=[{name:"Emily Gu",url:"https://github.com/emilygu"},{name:"Arvind Satyanarayan",url:"http://arvindsatya.com"},{name:"Jeffrey Heer",url:"https://idl.cs.washington.edu"},{name:"Dominik Moritz",url:"https://www.domoritz.de"}],MS="build/vega-themes.js",jS="build/vega-themes.module.js",US="build/vega-themes.min.js",WS="build/vega-themes.min.js",GS="build/vega-themes.module.d.ts",HS={type:"git",url:"https://github.com/vega/vega-themes.git"},qS=["src","build"],XS={prebuild:"yarn clean",build:"rollup -c",clean:"rimraf build && rimraf examples/build","copy:data":"rsync -r node_modules/vega-datasets/data/* examples/data","copy:build":"rsync -r build/* examples/build","deploy:gh":"yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples",preversion:"yarn lint",serve:"browser-sync start -s -f build examples --serveStatic examples",start:"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",format:"eslint . --fix",lint:"eslint .",release:"release-it"},VS={"@babel/core":"^7.22.9","@babel/plugin-proposal-async-generator-functions":"^7.20.7","@babel/plugin-proposal-json-strings":"^7.18.6","@babel/plugin-proposal-object-rest-spread":"^7.20.7","@babel/plugin-proposal-optional-catch-binding":"^7.18.6","@babel/plugin-transform-runtime":"^7.22.9","@babel/preset-env":"^7.22.9","@babel/preset-typescript":"^7.22.5","@release-it/conventional-changelog":"^7.0.0","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.1.0","@rollup/plugin-terser":"^0.4.3","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","browser-sync":"^2.29.3",concurrently:"^8.2.0",eslint:"^8.45.0","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^5.0.0","gh-pages":"^5.0.0",prettier:"^3.0.0","release-it":"^16.1.0",rollup:"^3.26.2","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-ts":"^3.2.0",typescript:"^5.1.6",vega:"^5.25.0","vega-lite":"^5.9.3"},YS={vega:"*","vega-lite":"*"},KS={},JS={name:kS,version:IS,description:RS,keywords:LS,license:PS,author:BS,contributors:zS,main:MS,module:jS,unpkg:US,jsdelivr:WS,types:GS,repository:HS,files:qS,scripts:XS,devDependencies:VS,peerDependencies:YS,dependencies:KS};const li="#fff",wl="#888",QS={background:"#333",view:{stroke:wl},title:{color:li,subtitleColor:li},style:{"guide-label":{fill:li},"guide-title":{fill:li}},axis:{domainColor:li,gridColor:wl,tickColor:li}},Cn="#4572a7",ZS={background:"#fff",arc:{fill:Cn},area:{fill:Cn},line:{stroke:Cn,strokeWidth:2},path:{stroke:Cn},rect:{fill:Cn},shape:{stroke:Cn},symbol:{fill:Cn,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},Fn="#30a2da",Do="#cbcbcb",ew="#999",tw="#333",Cl="#f0f0f0",Fl="#333",nw={arc:{fill:Fn},area:{fill:Fn},axis:{domainColor:Do,grid:!0,gridColor:Do,gridWidth:1,labelColor:ew,labelFontSize:10,titleColor:tw,tickColor:Do,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:Cl,group:{fill:Cl},legend:{labelColor:Fl,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:Fl,titleFontSize:14,titlePadding:10},line:{stroke:Fn,strokeWidth:2},path:{stroke:Fn,strokeWidth:.5},rect:{fill:Fn},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:Fn},bar:{binSpacing:2,fill:Fn,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},$n="#000",iw={group:{fill:"#e5e5e5"},arc:{fill:$n},area:{fill:$n},line:{stroke:$n},path:{stroke:$n},rect:{fill:$n},shape:{stroke:$n},symbol:{fill:$n,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},rw=22,sw="normal",$l="Benton Gothic, sans-serif",Ol=11.5,ow="normal",On="#82c6df",_o="Benton Gothic Bold, sans-serif",Nl="normal",Tl=13,Yi={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},aw={background:"#ffffff",title:{anchor:"start",color:"#000000",font:_o,fontSize:rw,fontWeight:sw},arc:{fill:On},area:{fill:On},line:{stroke:On,strokeWidth:2},path:{stroke:On},rect:{fill:On},shape:{stroke:On},symbol:{fill:On,size:30},axis:{labelFont:$l,labelFontSize:Ol,labelFontWeight:ow,titleFont:_o,titleFontSize:Tl,titleFontWeight:Nl},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:$l,labelFontSize:Ol,symbolType:"square",titleFont:_o,titleFontSize:Tl,titleFontWeight:Nl},range:{category:Yi["category-6"],diverging:Yi["fireandice-6"],heatmap:Yi["fire-7"],ordinal:Yi["fire-7"],ramp:Yi["fire-7"]}},Nn="#ab5787",Wr="#979797",uw={background:"#f9f9f9",arc:{fill:Nn},area:{fill:Nn},line:{stroke:Nn},path:{stroke:Nn},rect:{fill:Nn},shape:{stroke:Nn},symbol:{fill:Nn,size:30},axis:{domainColor:Wr,domainWidth:.5,gridWidth:.2,labelColor:Wr,tickColor:Wr,tickWidth:.2,titleColor:Wr},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},Tn="#3e5c69",cw={background:"#fff",arc:{fill:Tn},area:{fill:Tn},line:{stroke:Tn},path:{stroke:Tn},rect:{fill:Tn},shape:{stroke:Tn},symbol:{fill:Tn},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},Ke="#1696d2",Dl="#000000",lw="#FFFFFF",Gr="Lato",ko="Lato",fw="Lato",dw="#DEDDDD",pw=18,Ki={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},gw={background:lw,title:{anchor:"start",fontSize:pw,font:Gr},axisX:{domain:!0,domainColor:Dl,domainWidth:1,grid:!1,labelFontSize:12,labelFont:ko,labelAngle:0,tickColor:Dl,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:Gr},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:dw,gridWidth:1,labelFontSize:12,labelFont:ko,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:Gr,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:ko,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:Gr,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:Ki["six-groups-cat-1"],diverging:Ki["diverging-colors"],heatmap:Ki["diverging-colors"],ordinal:Ki["six-groups-seq"],ramp:Ki["shades-blue"]},area:{fill:Ke},rect:{fill:Ke},line:{color:Ke,stroke:Ke,strokeWidth:5},trail:{color:Ke,stroke:Ke,strokeWidth:0,size:1},path:{stroke:Ke,strokeWidth:.5},point:{filled:!0},text:{font:fw,color:Ke,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:Ke,stroke:null}},arc:{fill:Ke},shape:{stroke:Ke},symbol:{fill:Ke,size:30}},Dn="#3366CC",_l="#ccc",Hr="Arial, sans-serif",hw={arc:{fill:Dn},area:{fill:Dn},path:{stroke:Dn},rect:{fill:Dn},shape:{stroke:Dn},symbol:{stroke:Dn},circle:{fill:Dn},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:Hr,fontSize:12},"guide-title":{font:Hr,fontSize:12},"group-title":{font:Hr,fontSize:12}},title:{font:Hr,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:_l,tickColor:_l,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},Qu=e=>e*(1/3+1),kl=Qu(9),Il=Qu(10),Rl=Qu(12),Ji="Segoe UI",Ll="wf_standard-font, helvetica, arial, sans-serif",Pl="#252423",Qi="#605E5C",Bl="transparent",mw="#C8C6C4",it="#118DFF",yw="#12239E",bw="#E66C37",xw="#6B007B",vw="#E044A7",Ew="#744EC2",Aw="#D9B300",Sw="#D64550",Rg=it,Lg="#DEEFFF",zl=[Lg,Rg],ww=[Lg,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",Rg],Cw={view:{stroke:Bl},background:Bl,font:Ji,header:{titleFont:Ll,titleFontSize:Rl,titleColor:Pl,labelFont:Ji,labelFontSize:Il,labelColor:Qi},axis:{ticks:!1,grid:!1,domain:!1,labelColor:Qi,labelFontSize:kl,titleFont:Ll,titleColor:Pl,titleFontSize:Rl,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:mw,gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:it},line:{stroke:it,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:Ji,fontSize:kl,fill:Qi},arc:{fill:it},area:{fill:it,line:!0,opacity:.6},path:{stroke:it},rect:{fill:it},point:{fill:it,filled:!0,size:75},shape:{stroke:it},symbol:{fill:it,strokeWidth:1.5,size:50},legend:{titleFont:Ji,titleFontWeight:"bold",titleColor:Qi,labelFont:Ji,labelFontSize:Il,labelColor:Qi,symbolType:"circle",symbolSize:75},range:{category:[it,yw,bw,xw,vw,Ew,Aw,Sw],diverging:zl,heatmap:zl,ordinal:ww}},Io='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',Ml=400,Fw=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],$w=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function po({type:e,background:t}){const n=e==="dark"?"#161616":"#ffffff",i=e==="dark"?"#f4f4f4":"#161616",r=e==="dark"?Fw:$w,s=e==="dark"?"#d4bbff":"#6929c4";return{background:t,arc:{fill:s},area:{fill:s},path:{stroke:s},rect:{fill:s},shape:{stroke:s},symbol:{stroke:s},circle:{fill:s},view:{fill:n,stroke:n},group:{fill:n},title:{color:i,anchor:"start",dy:-15,fontSize:16,font:Io,fontWeight:600},axis:{labelColor:i,labelFontSize:12,grid:!0,gridColor:"#525252",titleColor:i,labelAngle:0},style:{"guide-label":{font:Io,fill:i,fontWeight:Ml},"guide-title":{font:Io,fill:i,fontWeight:Ml}},range:{category:r,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const Ow=po({type:"light",background:"#ffffff"}),Nw=po({type:"light",background:"#f4f4f4"}),Tw=po({type:"dark",background:"#262626"}),Dw=po({type:"dark",background:"#161616"}),_w=JS.version,kw=Object.freeze(Object.defineProperty({__proto__:null,carbong10:Nw,carbong100:Dw,carbong90:Tw,carbonwhite:Ow,dark:QS,excel:ZS,fivethirtyeight:nw,ggplot2:iw,googlecharts:hw,latimes:aw,powerbi:Cw,quartz:uw,urbaninstitute:gw,version:_w,vox:cw},Symbol.toStringTag,{value:"Module"}));function br(e){"@babel/helpers - typeof";return br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},br(e)}function Iw(e,t){if(br(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(br(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rw(e){var t=Iw(e,"string");return br(t)==="symbol"?t:String(t)}function Lw(e,t,n){return t=Rw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pw(e,t){if(e==null)return{};var n={},i=Object.keys(e),r,s;for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function Bw(e,t){if(e==null)return{};var n=Pw(e,t),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)i=s[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}const zw=["title","image"];function Mw(e,t,n){if(T(e))return`[${e.map(i=>t(B(i)?i:jl(i,n))).join(", ")}]`;if(V(e)){let i="";const r=e,{title:s,image:o}=r,a=Bw(r,zw);s&&(i+=`<h2>${t(s)}</h2>`),o&&(i+=`<img src="${t(o)}">`);const u=Object.keys(a);if(u.length>0){i+="<table>";for(const c of u){let l=a[c];l!==void 0&&(V(l)&&(l=jl(l,n)),i+=`<tr><td class="key">${t(c)}:</td><td class="value">${t(l)}</td></tr>`)}i+="</table>"}return i||"{}"}return t(e)}function jw(e){const t=[];return function(n,i){if(typeof i!="object"||i===null)return i;const r=t.indexOf(this)+1;return t.length=r,t.length>e?"[Object]":t.indexOf(i)>=0?"[Circular]":(t.push(i),i)}}function jl(e,t){return JSON.stringify(e,jw(t))}var Uw=`#vg-tooltip-element {
15
+ visibility: hidden;
16
+ padding: 8px;
17
+ position: fixed;
18
+ z-index: 1000;
19
+ font-family: sans-serif;
20
+ font-size: 11px;
21
+ border-radius: 3px;
22
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
23
+ /* The default theme is the light theme. */
24
+ background-color: rgba(255, 255, 255, 0.95);
25
+ border: 1px solid #d9d9d9;
26
+ color: black;
27
+ }
28
+ #vg-tooltip-element.visible {
29
+ visibility: visible;
30
+ }
31
+ #vg-tooltip-element h2 {
32
+ margin-top: 0;
33
+ margin-bottom: 10px;
34
+ font-size: 13px;
35
+ }
36
+ #vg-tooltip-element table {
37
+ border-spacing: 0;
38
+ }
39
+ #vg-tooltip-element table tr {
40
+ border: none;
41
+ }
42
+ #vg-tooltip-element table tr td {
43
+ overflow: hidden;
44
+ text-overflow: ellipsis;
45
+ padding-top: 2px;
46
+ padding-bottom: 2px;
47
+ }
48
+ #vg-tooltip-element table tr td.key {
49
+ color: #808080;
50
+ max-width: 150px;
51
+ text-align: right;
52
+ padding-right: 4px;
53
+ }
54
+ #vg-tooltip-element table tr td.value {
55
+ display: block;
56
+ max-width: 300px;
57
+ max-height: 7em;
58
+ text-align: left;
59
+ }
60
+ #vg-tooltip-element.dark-theme {
61
+ background-color: rgba(32, 32, 32, 0.9);
62
+ border: 1px solid #f5f5f5;
63
+ color: white;
64
+ }
65
+ #vg-tooltip-element.dark-theme td.key {
66
+ color: #bfbfbf;
67
+ }
68
+ `;const Pg="vg-tooltip-element",Ww={offsetX:10,offsetY:10,id:Pg,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:Gw,maxDepth:2,formatTooltip:Mw};function Gw(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;")}function Hw(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return Uw.toString().replace(Pg,e)}function qw(e,t,n,i){let r=e.clientX+n;r+t.width>window.innerWidth&&(r=+e.clientX-n-t.width);let s=e.clientY+i;return s+t.height>window.innerHeight&&(s=+e.clientY-i-t.height),{x:r,y:s}}function Ul(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function Wl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ul(Object(n),!0).forEach(function(i){Lw(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ul(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}class Xw{constructor(t){this.options=Wl(Wl({},Ww),t);const n=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const i=document.createElement("style");i.setAttribute("id",this.options.styleId),i.innerHTML=Hw(n);const r=document.head;r.childNodes.length>0?r.insertBefore(i,r.childNodes[0]):r.appendChild(i)}}tooltipHandler(t,n,i,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),(document.fullscreenElement??document.body).appendChild(this.el)),r==null||r===""){this.el.classList.remove("visible",`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:s,y:o}=qw(n,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.style.top=`${o}px`,this.el.style.left=`${s}px`}}function xr(e){"@babel/helpers - typeof";return xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xr(e)}function Vw(e,t){if(xr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(xr(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yw(e){var t=Vw(e,"string");return xr(t)==="symbol"?t:String(t)}function Kw(e,t,n){return t=Yw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ro,Gl;function Qw(){return Gl||(Gl=1,Ro=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),Ro}var Zw=K;K.Node=Qn;K.create=K;function K(e){var t=this;if(t instanceof K||(t=new K),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(r){t.push(r)});else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}K.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t};K.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};K.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};K.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)tC(this,arguments[e]);return this.length};K.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)nC(this,arguments[e]);return this.length};K.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};K.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};K.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,i=0;n!==null;i++)e.call(t,n.value,i,this),n=n.next};K.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,i=this.length-1;n!==null;i--)e.call(t,n.value,i,this),n=n.prev};K.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++)n=n.next;if(t===e&&n!==null)return n.value};K.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++)n=n.prev;if(t===e&&n!==null)return n.value};K.prototype.map=function(e,t){t=t||this;for(var n=new K,i=this.head;i!==null;)n.push(e.call(t,i.value,this)),i=i.next;return n};K.prototype.mapReverse=function(e,t){t=t||this;for(var n=new K,i=this.tail;i!==null;)n.push(e.call(t,i.value,this)),i=i.prev;return n};K.prototype.reduce=function(e,t){var n,i=this.head;if(arguments.length>1)n=t;else if(this.head)i=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var r=0;i!==null;r++)n=e(n,i.value,r),i=i.next;return n};K.prototype.reduceReverse=function(e,t){var n,i=this.tail;if(arguments.length>1)n=t;else if(this.tail)i=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var r=this.length-1;i!==null;r--)n=e(n,i.value,r),i=i.prev;return n};K.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;n!==null;t++)e[t]=n.value,n=n.next;return e};K.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;n!==null;t++)e[t]=n.value,n=n.prev;return e};K.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new K;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,r=this.head;r!==null&&i<e;i++)r=r.next;for(;r!==null&&i<t;i++,r=r.next)n.push(r.value);return n};K.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new K;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,r=this.tail;r!==null&&i>t;i--)r=r.prev;for(;r!==null&&i>e;i--,r=r.prev)n.push(r.value);return n};K.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,r=this.head;r!==null&&i<e;i++)r=r.next;for(var s=[],i=0;r&&i<t;i++)s.push(r.value),r=this.removeNode(r);r===null&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(var i=0;i<n.length;i++)r=eC(this,r,n[i]);return s};K.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;n!==null;n=n.prev){var i=n.prev;n.prev=n.next,n.next=i}return this.head=t,this.tail=e,this};function eC(e,t,n){var i=t===e.head?new Qn(n,null,t,e):new Qn(n,t,t.next,e);return i.next===null&&(e.tail=i),i.prev===null&&(e.head=i),e.length++,i}function tC(e,t){e.tail=new Qn(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function nC(e,t){e.head=new Qn(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Qn(e,t,n,i){if(!(this instanceof Qn))return new Qn(e,t,n,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{Qw()(K)}catch{}const iC=Zw,kn=Symbol("max"),jt=Symbol("length"),fi=Symbol("lengthCalculator"),ur=Symbol("allowStale"),In=Symbol("maxAge"),zt=Symbol("dispose"),Hl=Symbol("noDisposeOnSet"),be=Symbol("lruList"),rt=Symbol("cache"),Bg=Symbol("updateAgeOnGet"),Lo=()=>1;class rC{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[kn]=t.max||1/0;const n=t.length||Lo;if(this[fi]=typeof n!="function"?Lo:n,this[ur]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[In]=t.maxAge||0,this[zt]=t.dispose,this[Hl]=t.noDisposeOnSet||!1,this[Bg]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[kn]=t||1/0,Zi(this)}get max(){return this[kn]}set allowStale(t){this[ur]=!!t}get allowStale(){return this[ur]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[In]=t,Zi(this)}get maxAge(){return this[In]}set lengthCalculator(t){typeof t!="function"&&(t=Lo),t!==this[fi]&&(this[fi]=t,this[jt]=0,this[be].forEach(n=>{n.length=this[fi](n.value,n.key),this[jt]+=n.length})),Zi(this)}get lengthCalculator(){return this[fi]}get length(){return this[jt]}get itemCount(){return this[be].length}rforEach(t,n){n=n||this;for(let i=this[be].tail;i!==null;){const r=i.prev;ql(this,t,i,n),i=r}}forEach(t,n){n=n||this;for(let i=this[be].head;i!==null;){const r=i.next;ql(this,t,i,n),i=r}}keys(){return this[be].toArray().map(t=>t.key)}values(){return this[be].toArray().map(t=>t.value)}reset(){this[zt]&&this[be]&&this[be].length&&this[be].forEach(t=>this[zt](t.key,t.value)),this[rt]=new Map,this[be]=new iC,this[jt]=0}dump(){return this[be].map(t=>ms(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[be]}set(t,n,i){if(i=i||this[In],i&&typeof i!="number")throw new TypeError("maxAge must be a number");const r=i?Date.now():0,s=this[fi](n,t);if(this[rt].has(t)){if(s>this[kn])return vi(this,this[rt].get(t)),!1;const u=this[rt].get(t).value;return this[zt]&&(this[Hl]||this[zt](t,u.value)),u.now=r,u.maxAge=i,u.value=n,this[jt]+=s-u.length,u.length=s,this.get(t),Zi(this),!0}const o=new sC(t,n,s,r,i);return o.length>this[kn]?(this[zt]&&this[zt](t,n),!1):(this[jt]+=o.length,this[be].unshift(o),this[rt].set(t,this[be].head),Zi(this),!0)}has(t){if(!this[rt].has(t))return!1;const n=this[rt].get(t).value;return!ms(this,n)}get(t){return Po(this,t,!0)}peek(t){return Po(this,t,!1)}pop(){const t=this[be].tail;return t?(vi(this,t),t.value):null}del(t){vi(this,this[rt].get(t))}load(t){this.reset();const n=Date.now();for(let i=t.length-1;i>=0;i--){const r=t[i],s=r.e||0;if(s===0)this.set(r.k,r.v);else{const o=s-n;o>0&&this.set(r.k,r.v,o)}}}prune(){this[rt].forEach((t,n)=>Po(this,n,!1))}}const Po=(e,t,n)=>{const i=e[rt].get(t);if(i){const r=i.value;if(ms(e,r)){if(vi(e,i),!e[ur])return}else n&&(e[Bg]&&(i.value.now=Date.now()),e[be].unshiftNode(i));return r.value}},ms=(e,t)=>{if(!t||!t.maxAge&&!e[In])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[In]&&n>e[In]},Zi=e=>{if(e[jt]>e[kn])for(let t=e[be].tail;e[jt]>e[kn]&&t!==null;){const n=t.prev;vi(e,t),t=n}},vi=(e,t)=>{if(t){const n=t.value;e[zt]&&e[zt](n.key,n.value),e[jt]-=n.length,e[rt].delete(n.key),e[be].removeNode(t)}};class sC{constructor(t,n,i,r,s){this.key=t,this.value=n,this.length=i,this.now=r,this.maxAge=s||0}}const ql=(e,t,n,i)=>{let r=n.value;ms(e,r)&&(vi(e,n),e[ur]||(r=void 0)),r&&t.call(i,r.value,r.key,e)};var oC=rC;const aC=Object.freeze({loose:!0}),uC=Object.freeze({}),cC=e=>e?typeof e!="object"?aC:e:uC;var Zu=cC,ba={exports:{}};const lC="2.0.0",zg=256,fC=Number.MAX_SAFE_INTEGER||9007199254740991,dC=16,pC=zg-6,gC=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var ec={MAX_LENGTH:zg,MAX_SAFE_COMPONENT_LENGTH:dC,MAX_SAFE_BUILD_LENGTH:pC,MAX_SAFE_INTEGER:fC,RELEASE_TYPES:gC,SEMVER_SPEC_VERSION:lC,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const hC=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var go=hC;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=ec,s=go;t=e.exports={};const o=t.re=[],a=t.safeRe=[],u=t.src=[],c=t.t={};let l=0;const f="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",r],[f,i]],p=h=>{for(const[m,y]of d)h=h.split(`${m}*`).join(`${m}{0,${y}}`).split(`${m}+`).join(`${m}{1,${y}}`);return h},g=(h,m,y)=>{const x=p(m),$=l++;s(h,$,m),c[h]=$,u[$]=m,o[$]=new RegExp(m,y?"g":void 0),a[$]=new RegExp(x,y?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),g("MAINVERSION",`(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${u[c.NUMERICIDENTIFIER]}|${u[c.NONNUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${u[c.NUMERICIDENTIFIERLOOSE]}|${u[c.NONNUMERICIDENTIFIER]})`),g("PRERELEASE",`(?:-(${u[c.PRERELEASEIDENTIFIER]}(?:\\.${u[c.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${u[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[c.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${f}+`),g("BUILD",`(?:\\+(${u[c.BUILDIDENTIFIER]}(?:\\.${u[c.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${u[c.MAINVERSION]}${u[c.PRERELEASE]}?${u[c.BUILD]}?`),g("FULL",`^${u[c.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${u[c.MAINVERSIONLOOSE]}${u[c.PRERELEASELOOSE]}?${u[c.BUILD]}?`),g("LOOSE",`^${u[c.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${u[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${u[c.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:${u[c.PRERELEASE]})?${u[c.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:${u[c.PRERELEASELOOSE]})?${u[c.BUILD]}?)?)?`),g("XRANGE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAINLOOSE]}$`),g("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),g("COERCERTL",u[c.COERCE],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${u[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",g("TILDE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${u[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",g("CARET",`^${u[c.LONECARET]}${u[c.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${u[c.LONECARET]}${u[c.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${u[c.GTLT]}\\s*(${u[c.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]}|${u[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${u[c.XRANGEPLAIN]})\\s+-\\s+(${u[c.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${u[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[c.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(ba,ba.exports);var tc=ba.exports;const Xl=/^[0-9]+$/,Mg=(e,t)=>{const n=Xl.test(e),i=Xl.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:e<t?-1:1},mC=(e,t)=>Mg(t,e);var yC={compareIdentifiers:Mg,rcompareIdentifiers:mC};const qr=go,{MAX_LENGTH:Vl,MAX_SAFE_INTEGER:Xr}=ec,{safeRe:Yl,t:Kl}=tc,bC=Zu,{compareIdentifiers:di}=yC;let xC=class vt{constructor(t,n){if(n=bC(n),t instanceof vt){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Vl)throw new TypeError(`version is longer than ${Vl} characters`);qr("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const i=t.trim().match(n.loose?Yl[Kl.LOOSE]:Yl[Kl.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Xr||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Xr||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Xr||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){const s=+r;if(s>=0&&s<Xr)return s}return r}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(qr("SemVer.compare",this.version,this.options,t),!(t instanceof vt)){if(typeof t=="string"&&t===this.version)return 0;t=new vt(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof vt||(t=new vt(t,this.options)),di(this.major,t.major)||di(this.minor,t.minor)||di(this.patch,t.patch)}comparePre(t){if(t instanceof vt||(t=new vt(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const i=this.prerelease[n],r=t.prerelease[n];if(qr("prerelease compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return di(i,r)}while(++n)}compareBuild(t){t instanceof vt||(t=new vt(t,this.options));let n=0;do{const i=this.build[n],r=t.build[n];if(qr("prerelease compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return di(i,r)}while(++n)}inc(t,n,i){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const r=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[r];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(n){let s=[n,r];i===!1&&(s=[n]),di(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var nc=xC;const Jl=nc,vC=(e,t,n)=>new Jl(e,n).compare(new Jl(t,n));var qi=vC;const EC=qi,AC=(e,t,n)=>EC(e,t,n)===0;var SC=AC;const wC=qi,CC=(e,t,n)=>wC(e,t,n)!==0;var FC=CC;const $C=qi,OC=(e,t,n)=>$C(e,t,n)>0;var NC=OC;const TC=qi,DC=(e,t,n)=>TC(e,t,n)>=0;var _C=DC;const kC=qi,IC=(e,t,n)=>kC(e,t,n)<0;var RC=IC;const LC=qi,PC=(e,t,n)=>LC(e,t,n)<=0;var BC=PC;const zC=SC,MC=FC,jC=NC,UC=_C,WC=RC,GC=BC,HC=(e,t,n,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return zC(e,n,i);case"!=":return MC(e,n,i);case">":return jC(e,n,i);case">=":return UC(e,n,i);case"<":return WC(e,n,i);case"<=":return GC(e,n,i);default:throw new TypeError(`Invalid operator: ${t}`)}};var qC=HC,Bo,Ql;function XC(){if(Ql)return Bo;Ql=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(l,f){if(f=n(f),l instanceof t){if(l.loose===!!f.loose)return l;l=l.value}l=l.trim().split(/\s+/).join(" "),o("comparator",l,f),this.options=f,this.loose=!!f.loose,this.parse(l),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(l){const f=this.options.loose?i[r.COMPARATORLOOSE]:i[r.COMPARATOR],d=l.match(f);if(!d)throw new TypeError(`Invalid comparator: ${l}`);this.operator=d[1]!==void 0?d[1]:"",this.operator==="="&&(this.operator=""),d[2]?this.semver=new a(d[2],this.options.loose):this.semver=e}toString(){return this.value}test(l){if(o("Comparator.test",l,this.options.loose),this.semver===e||l===e)return!0;if(typeof l=="string")try{l=new a(l,this.options)}catch{return!1}return s(l,this.operator,this.semver,this.options)}intersects(l,f){if(!(l instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(l.value,f).test(this.value):l.operator===""?l.value===""?!0:new u(this.value,f).test(l.semver):(f=n(f),f.includePrerelease&&(this.value==="<0.0.0-0"||l.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||l.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&l.operator.startsWith(">")||this.operator.startsWith("<")&&l.operator.startsWith("<")||this.semver.version===l.semver.version&&this.operator.includes("=")&&l.operator.includes("=")||s(this.semver,"<",l.semver,f)&&this.operator.startsWith(">")&&l.operator.startsWith("<")||s(this.semver,">",l.semver,f)&&this.operator.startsWith("<")&&l.operator.startsWith(">")))}}Bo=t;const n=Zu,{safeRe:i,t:r}=tc,s=qC,o=go,a=nc,u=jg();return Bo}var zo,Zl;function jg(){if(Zl)return zo;Zl=1;class e{constructor(w,P){if(P=i(P),w instanceof e)return w.loose===!!P.loose&&w.includePrerelease===!!P.includePrerelease?w:new e(w.raw,P);if(w instanceof r)return this.raw=w.value,this.set=[[w]],this.format(),this;if(this.options=P,this.loose=!!P.loose,this.includePrerelease=!!P.includePrerelease,this.raw=w.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(k=>this.parseRange(k.trim())).filter(k=>k.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const k=this.set[0];if(this.set=this.set.filter(L=>!g(L[0])),this.set.length===0)this.set=[k];else if(this.set.length>1){for(const L of this.set)if(L.length===1&&h(L[0])){this.set=[L];break}}}this.format()}format(){return this.range=this.set.map(w=>w.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(w){const k=((this.options.includePrerelease&&d)|(this.options.loose&&p))+":"+w,L=n.get(k);if(L)return L;const D=this.options.loose,z=D?a[u.HYPHENRANGELOOSE]:a[u.HYPHENRANGE];w=w.replace(z,Ce(this.options.includePrerelease)),s("hyphen replace",w),w=w.replace(a[u.COMPARATORTRIM],c),s("comparator trim",w),w=w.replace(a[u.TILDETRIM],l),s("tilde trim",w),w=w.replace(a[u.CARETTRIM],f),s("caret trim",w);let X=w.split(" ").map(ae=>y(ae,this.options)).join(" ").split(/\s+/).map(ae=>ne(ae,this.options));D&&(X=X.filter(ae=>(s("loose invalid filter",ae,this.options),!!ae.match(a[u.COMPARATORLOOSE])))),s("range list",X);const W=new Map,ie=X.map(ae=>new r(ae,this.options));for(const ae of ie){if(g(ae))return[ae];W.set(ae.value,ae)}W.size>1&&W.has("")&&W.delete("");const Ne=[...W.values()];return n.set(k,Ne),Ne}intersects(w,P){if(!(w instanceof e))throw new TypeError("a Range is required");return this.set.some(k=>m(k,P)&&w.set.some(L=>m(L,P)&&k.every(D=>L.every(z=>D.intersects(z,P)))))}test(w){if(!w)return!1;if(typeof w=="string")try{w=new o(w,this.options)}catch{return!1}for(let P=0;P<this.set.length;P++)if(bt(this.set[P],w,this.options))return!0;return!1}}zo=e;const t=oC,n=new t({max:1e3}),i=Zu,r=XC(),s=go,o=nc,{safeRe:a,t:u,comparatorTrimReplace:c,tildeTrimReplace:l,caretTrimReplace:f}=tc,{FLAG_INCLUDE_PRERELEASE:d,FLAG_LOOSE:p}=ec,g=O=>O.value==="<0.0.0-0",h=O=>O.value==="",m=(O,w)=>{let P=!0;const k=O.slice();let L=k.pop();for(;P&&k.length;)P=k.every(D=>L.intersects(D,w)),L=k.pop();return P},y=(O,w)=>(s("comp",O,w),O=v(O,w),s("caret",O),O=$(O,w),s("tildes",O),O=F(O,w),s("xrange",O),O=J(O,w),s("stars",O),O),x=O=>!O||O.toLowerCase()==="x"||O==="*",$=(O,w)=>O.trim().split(/\s+/).map(P=>R(P,w)).join(" "),R=(O,w)=>{const P=w.loose?a[u.TILDELOOSE]:a[u.TILDE];return O.replace(P,(k,L,D,z,X)=>{s("tilde",O,k,L,D,z,X);let W;return x(L)?W="":x(D)?W=`>=${L}.0.0 <${+L+1}.0.0-0`:x(z)?W=`>=${L}.${D}.0 <${L}.${+D+1}.0-0`:X?(s("replaceTilde pr",X),W=`>=${L}.${D}.${z}-${X} <${L}.${+D+1}.0-0`):W=`>=${L}.${D}.${z} <${L}.${+D+1}.0-0`,s("tilde return",W),W})},v=(O,w)=>O.trim().split(/\s+/).map(P=>N(P,w)).join(" "),N=(O,w)=>{s("caret",O,w);const P=w.loose?a[u.CARETLOOSE]:a[u.CARET],k=w.includePrerelease?"-0":"";return O.replace(P,(L,D,z,X,W)=>{s("caret",O,L,D,z,X,W);let ie;return x(D)?ie="":x(z)?ie=`>=${D}.0.0${k} <${+D+1}.0.0-0`:x(X)?D==="0"?ie=`>=${D}.${z}.0${k} <${D}.${+z+1}.0-0`:ie=`>=${D}.${z}.0${k} <${+D+1}.0.0-0`:W?(s("replaceCaret pr",W),D==="0"?z==="0"?ie=`>=${D}.${z}.${X}-${W} <${D}.${z}.${+X+1}-0`:ie=`>=${D}.${z}.${X}-${W} <${D}.${+z+1}.0-0`:ie=`>=${D}.${z}.${X}-${W} <${+D+1}.0.0-0`):(s("no pr"),D==="0"?z==="0"?ie=`>=${D}.${z}.${X}${k} <${D}.${z}.${+X+1}-0`:ie=`>=${D}.${z}.${X}${k} <${D}.${+z+1}.0-0`:ie=`>=${D}.${z}.${X} <${+D+1}.0.0-0`),s("caret return",ie),ie})},F=(O,w)=>(s("replaceXRanges",O,w),O.split(/\s+/).map(P=>j(P,w)).join(" ")),j=(O,w)=>{O=O.trim();const P=w.loose?a[u.XRANGELOOSE]:a[u.XRANGE];return O.replace(P,(k,L,D,z,X,W)=>{s("xRange",O,k,L,D,z,X,W);const ie=x(D),Ne=ie||x(z),ae=Ne||x(X),Sn=ae;return L==="="&&Sn&&(L=""),W=w.includePrerelease?"-0":"",ie?L===">"||L==="<"?k="<0.0.0-0":k="*":L&&Sn?(Ne&&(z=0),X=0,L===">"?(L=">=",Ne?(D=+D+1,z=0,X=0):(z=+z+1,X=0)):L==="<="&&(L="<",Ne?D=+D+1:z=+z+1),L==="<"&&(W="-0"),k=`${L+D}.${z}.${X}${W}`):Ne?k=`>=${D}.0.0${W} <${+D+1}.0.0-0`:ae&&(k=`>=${D}.${z}.0${W} <${D}.${+z+1}.0-0`),s("xRange return",k),k})},J=(O,w)=>(s("replaceStars",O,w),O.trim().replace(a[u.STAR],"")),ne=(O,w)=>(s("replaceGTE0",O,w),O.trim().replace(a[w.includePrerelease?u.GTE0PRE:u.GTE0],"")),Ce=O=>(w,P,k,L,D,z,X,W,ie,Ne,ae,Sn,ho)=>(x(k)?P="":x(L)?P=`>=${k}.0.0${O?"-0":""}`:x(D)?P=`>=${k}.${L}.0${O?"-0":""}`:z?P=`>=${P}`:P=`>=${P}${O?"-0":""}`,x(ie)?W="":x(Ne)?W=`<${+ie+1}.0.0-0`:x(ae)?W=`<${ie}.${+Ne+1}.0-0`:Sn?W=`<=${ie}.${Ne}.${ae}-${Sn}`:O?W=`<${ie}.${Ne}.${+ae+1}-0`:W=`<=${W}`,`${P} ${W}`.trim()),bt=(O,w,P)=>{for(let k=0;k<O.length;k++)if(!O[k].test(w))return!1;if(w.prerelease.length&&!P.includePrerelease){for(let k=0;k<O.length;k++)if(s(O[k].semver),O[k].semver!==r.ANY&&O[k].semver.prerelease.length>0){const L=O[k].semver;if(L.major===w.major&&L.minor===w.minor&&L.patch===w.patch)return!0}return!1}return!0};return zo}const VC=jg(),YC=(e,t,n)=>{try{t=new VC(t,n)}catch{return!1}return t.test(e)};var KC=YC,Ug=Jw(KC);function JC(e,t,n){const i=e.open(t),r=1e4,s=250,{origin:o}=new URL(t);let a=~~(r/s);function u(l){l.source===i&&(a=0,e.removeEventListener("message",u,!1))}e.addEventListener("message",u,!1);function c(){a<=0||(i.postMessage(n,o),setTimeout(c,s),a-=1)}setTimeout(c,s)}var QC=`.vega-embed {
69
+ position: relative;
70
+ display: inline-block;
71
+ box-sizing: border-box;
72
+ }
73
+ .vega-embed.has-actions {
74
+ padding-right: 38px;
75
+ }
76
+ .vega-embed details:not([open]) > :not(summary) {
77
+ display: none !important;
78
+ }
79
+ .vega-embed summary {
80
+ list-style: none;
81
+ position: absolute;
82
+ top: 0;
83
+ right: 0;
84
+ padding: 6px;
85
+ z-index: 1000;
86
+ background: white;
87
+ box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
88
+ color: #1b1e23;
89
+ border: 1px solid #aaa;
90
+ border-radius: 999px;
91
+ opacity: 0.2;
92
+ transition: opacity 0.4s ease-in;
93
+ cursor: pointer;
94
+ line-height: 0px;
95
+ }
96
+ .vega-embed summary::-webkit-details-marker {
97
+ display: none;
98
+ }
99
+ .vega-embed summary:active {
100
+ box-shadow: #aaa 0px 0px 0px 1px inset;
101
+ }
102
+ .vega-embed summary svg {
103
+ width: 14px;
104
+ height: 14px;
105
+ }
106
+ .vega-embed details[open] summary {
107
+ opacity: 0.7;
108
+ }
109
+ .vega-embed:hover summary, .vega-embed:focus-within summary {
110
+ opacity: 1 !important;
111
+ transition: opacity 0.2s ease;
112
+ }
113
+ .vega-embed .vega-actions {
114
+ position: absolute;
115
+ z-index: 1001;
116
+ top: 35px;
117
+ right: -9px;
118
+ display: flex;
119
+ flex-direction: column;
120
+ padding-bottom: 8px;
121
+ padding-top: 8px;
122
+ border-radius: 4px;
123
+ box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
124
+ border: 1px solid #d9d9d9;
125
+ background: white;
126
+ animation-duration: 0.15s;
127
+ animation-name: scale-in;
128
+ animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
129
+ text-align: left;
130
+ }
131
+ .vega-embed .vega-actions a {
132
+ padding: 8px 16px;
133
+ font-family: sans-serif;
134
+ font-size: 14px;
135
+ font-weight: 600;
136
+ white-space: nowrap;
137
+ color: #434a56;
138
+ text-decoration: none;
139
+ }
140
+ .vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {
141
+ background-color: #f7f7f9;
142
+ color: black;
143
+ }
144
+ .vega-embed .vega-actions::before, .vega-embed .vega-actions::after {
145
+ content: "";
146
+ display: inline-block;
147
+ position: absolute;
148
+ }
149
+ .vega-embed .vega-actions::before {
150
+ left: auto;
151
+ right: 14px;
152
+ top: -16px;
153
+ border: 8px solid rgba(0, 0, 0, 0);
154
+ border-bottom-color: #d9d9d9;
155
+ }
156
+ .vega-embed .vega-actions::after {
157
+ left: auto;
158
+ right: 15px;
159
+ top: -14px;
160
+ border: 7px solid rgba(0, 0, 0, 0);
161
+ border-bottom-color: #fff;
162
+ }
163
+ .vega-embed .chart-wrapper.fit-x {
164
+ width: 100%;
165
+ }
166
+ .vega-embed .chart-wrapper.fit-y {
167
+ height: 100%;
168
+ }
169
+
170
+ .vega-embed-wrapper {
171
+ max-width: 100%;
172
+ overflow: auto;
173
+ padding-right: 14px;
174
+ }
175
+
176
+ @keyframes scale-in {
177
+ from {
178
+ opacity: 0;
179
+ transform: scale(0.6);
180
+ }
181
+ to {
182
+ opacity: 1;
183
+ transform: scale(1);
184
+ }
185
+ }
186
+ `;function Wg(e,...t){for(const n of t)ZC(e,n);return e}function ZC(e,t){for(const n of Object.keys(t))xa(e,n,t[n],!0)}var eF="vega-embed",tF="6.22.2",nF="Publish Vega visualizations as embedded web components.",iF=["vega","data","visualization","component","embed"],rF={type:"git",url:"http://github.com/vega/vega-embed.git"},sF={name:"UW Interactive Data Lab",url:"http://idl.cs.washington.edu"},oF=[{name:"Dominik Moritz",url:"https://www.domoritz.de"}],aF={url:"https://github.com/vega/vega-embed/issues"},uF="https://github.com/vega/vega-embed#readme",cF="BSD-3-Clause",lF="build/vega-embed.js",fF="build/vega-embed.module.js",dF="build/vega-embed.min.js",pF="build/vega-embed.min.js",gF="build/vega-embed.module.d.ts",hF=["src","build","patches"],mF={"@babel/core":"^7.22.9","@babel/plugin-proposal-async-generator-functions":"^7.20.7","@babel/plugin-proposal-json-strings":"^7.18.6","@babel/plugin-proposal-object-rest-spread":"^7.20.7","@babel/plugin-proposal-optional-catch-binding":"^7.18.6","@babel/plugin-transform-runtime":"^7.22.9","@babel/preset-env":"^7.22.9","@babel/preset-typescript":"^7.22.5","@release-it/conventional-changelog":"^7.0.0","@rollup/plugin-commonjs":"25.0.3","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.1.0","@rollup/plugin-terser":"^0.4.3","@types/semver":"^7.5.0","@typescript-eslint/eslint-plugin":"^6.2.0","@typescript-eslint/parser":"^6.2.0","browser-sync":"^2.29.3",concurrently:"^8.2.0","del-cli":"^5.0.0",eslint:"^8.46.0","eslint-config-prettier":"^8.9.0","eslint-plugin-jest":"^27.2.3","eslint-plugin-prettier":"^5.0.0",jest:"^29.6.2","jest-canvas-mock":"^2.5.2","jest-environment-jsdom":"^29.6.2","patch-package":"^8.0.0","postinstall-postinstall":"^2.1.0",prettier:"^3.0.0","release-it":"^16.1.3",rollup:"3.27.0","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-ts":"^3.2.0",sass:"^1.64.1",typescript:"^5.1.6",vega:"^5.22.1","vega-lite":"^5.2.0"},yF={vega:"^5.21.0","vega-lite":"*"},bF={"fast-json-patch":"^3.1.1","json-stringify-pretty-compact":"^3.0.0",semver:"^7.5.4",tslib:"^2.6.1","vega-interpreter":"^1.0.5","vega-schema-url-parser":"^2.2.0","vega-themes":"^2.14.0","vega-tooltip":"^0.32.0"},xF=["yallist"],vF={prebuild:"yarn clean && yarn build:style",build:"rollup -c","build:style":"./build-style.sh",clean:"del-cli build src/style.ts",prepublishOnly:"yarn clean && yarn build",preversion:"yarn lint && yarn test",serve:"browser-sync start --directory -s -f build *.html",start:"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",pretest:"yarn build:style",test:"jest","test:inspect":"node --inspect-brk ./node_modules/.bin/jest --runInBand",prettierbase:"prettier '*.{css,scss,html}'",format:"eslint . --fix && yarn prettierbase --write",lint:"eslint . && yarn prettierbase --check",release:"release-it"},EF={name:eF,version:tF,description:nF,keywords:iF,repository:rF,author:sF,contributors:oF,bugs:aF,homepage:uF,license:cF,main:lF,module:fF,unpkg:dF,jsdelivr:pF,types:gF,files:hF,devDependencies:mF,peerDependencies:yF,dependencies:bF,bundledDependencies:xF,scripts:vF};function ef(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ef(Object(n),!0).forEach(function(i){Kw(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ef(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}const b$=EF.version,Et=Jg;let vr=_S;const Vr=typeof window<"u"?window:void 0;var sf;vr===void 0&&((sf=Vr==null?void 0:Vr.vl)!=null&&sf.compile)&&(vr=Vr.vl);const AF={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},SF={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},ir={vega:"Vega","vega-lite":"Vega-Lite"},ys={vega:Et.version,"vega-lite":vr?vr.version:"not available"},wF={vega:e=>e,"vega-lite":(e,t)=>vr.compile(e,{config:t}).spec},CF=`
187
+ <svg viewBox="0 0 16 16" fill="currentColor" stroke="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
188
+ <circle r="2" cy="8" cx="2"></circle>
189
+ <circle r="2" cy="8" cx="8"></circle>
190
+ <circle r="2" cy="8" cx="14"></circle>
191
+ </svg>`,FF="chart-wrapper";function $F(e){return typeof e=="function"}function tf(e,t,n,i){const r=`<html><head>${t}</head><body><pre><code class="json">`,s=`</code></pre>${n}</body></html>`,o=window.open("");o.document.write(r+e+s),o.document.title=`${ir[i]} JSON Source`}function OF(e,t){if(e.$schema){const n=Ig(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${ir[n.library]}, but mode argument sets ${ir[t]??t}.`);const i=n.library;return Ug(ys[i],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${ir[i]} ${n.version}, but the current version of ${ir[i]} is v${ys[i]}.`),i}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t??"vega"}function NF(e){return!!(e&&"load"in e)}function nf(e){return NF(e)?e:Et.loader(e)}function TF(e){var n;const t=((n=e.usermeta)==null?void 0:n.embedOptions)??{};return B(t.defaultStyle)&&(t.defaultStyle=!1),t}async function x$(e,t,n={}){let i,r;B(t)?(r=nf(n.loader),i=JSON.parse(await r.load(t))):i=t;const s=TF(i),o=s.loader;(!r||o)&&(r=nf(n.loader??o));const a=await rf(s,r),u=await rf(n,r),c=an(an({},Wg(u,a)),{},{config:xs(u.config??{},a.config??{})});return await _F(e,i,c,r)}async function rf(e,t){const n=B(e.config)?JSON.parse(await t.load(e.config)):e.config??{},i=B(e.patch)?JSON.parse(await t.load(e.patch)):e.patch;return an(an(an({},e),i?{patch:i}:{}),n?{config:n}:{})}function DF(e){const t=e.getRootNode?e.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}async function _F(e,t,n={},i){const r=n.theme?xs(kw[n.theme],n.config??{}):n.config,s=Li(n.actions)?n.actions:Wg({},AF,n.actions??{}),o=an(an({},SF),n.i18n),a=n.renderer??"canvas",u=n.logLevel??Et.Warn,c=n.downloadFileName??"visualization",l=typeof e=="string"?document.querySelector(e):e;if(!l)throw new Error(`${e} does not exist`);if(n.defaultStyle!==!1){const v="vega-embed-style",{root:N,rootContainer:F}=DF(l);if(!N.getElementById(v)){const j=document.createElement("style");j.id=v,j.innerHTML=n.defaultStyle===void 0||n.defaultStyle===!0?QC.toString():n.defaultStyle,F.appendChild(j)}}const f=OF(t,n.mode);let d=wF[f](t,r);if(f==="vega-lite"&&d.$schema){const v=Ig(d.$schema);Ug(ys.vega,`^${v.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${v.version}, but current version is v${ys.vega}.`)}l.classList.add("vega-embed"),s&&l.classList.add("has-actions"),l.innerHTML="";let p=l;if(s){const v=document.createElement("div");v.classList.add(FF),l.appendChild(v),p=v}const g=n.patch;if(g&&(d=g instanceof Function?g(d):vs(d,g,!0,!1).newDocument),n.formatLocale&&Et.formatLocale(n.formatLocale),n.timeFormatLocale&&Et.timeFormatLocale(n.timeFormatLocale),n.expressionFunctions)for(const v in n.expressionFunctions){const N=n.expressionFunctions[v];"fn"in N?Et.expressionFunction(v,N.fn,N.visitor):N instanceof Function&&Et.expressionFunction(v,N)}const{ast:h}=n,m=Et.parse(d,f==="vega-lite"?{}:r,{ast:h}),y=new(n.viewClass||Et.View)(m,an({loader:i,logLevel:u,renderer:a},h?{expr:Et.expressionInterpreter??n.expr??wh}:{}));if(y.addSignalListener("autosize",(v,N)=>{const{type:F}=N;F=="fit-x"?(p.classList.add("fit-x"),p.classList.remove("fit-y")):F=="fit-y"?(p.classList.remove("fit-x"),p.classList.add("fit-y")):F=="fit"?p.classList.add("fit-x","fit-y"):p.classList.remove("fit-x","fit-y")}),n.tooltip!==!1){const v=$F(n.tooltip)?n.tooltip:new Xw(n.tooltip===!0?{}:n.tooltip).call;y.tooltip(v)}let{hover:x}=n;if(x===void 0&&(x=f==="vega"),x){const{hoverSet:v,updateSet:N}=typeof x=="boolean"?{}:x;y.hover(v,N)}n&&(n.width!=null&&y.width(n.width),n.height!=null&&y.height(n.height),n.padding!=null&&y.padding(n.padding)),await y.initialize(p,n.bind).runAsync();let $;if(s!==!1){let v=l;if(n.defaultStyle!==!1){const F=document.createElement("details");F.title=o.CLICK_TO_VIEW_ACTIONS,l.append(F),v=F;const j=document.createElement("summary");j.innerHTML=CF,F.append(j),$=J=>{F.contains(J.target)||F.removeAttribute("open")},document.addEventListener("click",$)}const N=document.createElement("div");if(v.append(N),N.classList.add("vega-actions"),s===!0||s.export!==!1){for(const F of["svg","png"])if(s===!0||s.export===!0||s.export[F]){const j=o[`${F.toUpperCase()}_ACTION`],J=document.createElement("a"),ne=V(n.scaleFactor)?n.scaleFactor[F]:n.scaleFactor;J.text=j,J.href="#",J.target="_blank",J.download=`${c}.${F}`,J.addEventListener("mousedown",async function(Ce){Ce.preventDefault();const bt=await y.toImageURL(F,ne);this.href=bt}),N.append(J)}}if(s===!0||s.source!==!1){const F=document.createElement("a");F.text=o.SOURCE_ACTION,F.href="#",F.addEventListener("click",function(j){tf(mo(t),n.sourceHeader??"",n.sourceFooter??"",f),j.preventDefault()}),N.append(F)}if(f==="vega-lite"&&(s===!0||s.compiled!==!1)){const F=document.createElement("a");F.text=o.COMPILED_ACTION,F.href="#",F.addEventListener("click",function(j){tf(mo(d),n.sourceHeader??"",n.sourceFooter??"","vega"),j.preventDefault()}),N.append(F)}if(s===!0||s.editor!==!1){const F=n.editorUrl??"https://vega.github.io/editor/",j=document.createElement("a");j.text=o.EDITOR_ACTION,j.href="#",j.addEventListener("click",function(J){JC(window,F,{config:r,mode:f,renderer:a,spec:mo(t)}),J.preventDefault()}),N.append(j)}}function R(){$&&document.removeEventListener("click",$),y.finalize()}return{view:y,spec:t,vgSpec:d,finalize:R,embedOptions:n}}export{AF as DEFAULT_ACTIONS,x$ as default,OF as guessMode,Et as vega,vr as vegaLite,b$ as version};