emissions-api-sdk 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +9 -0
  2. package/dist/Constants.js +2 -1
  3. package/dist/api/Usage.js +26 -0
  4. package/dist/coverage/clover.xml +44 -33
  5. package/dist/coverage/coverage-final.json +4 -3
  6. package/dist/coverage/lcov-report/index.html +19 -19
  7. package/dist/coverage/lcov-report/src/Client.ts.html +23 -23
  8. package/dist/coverage/lcov-report/src/Constants.ts.html +10 -4
  9. package/dist/coverage/lcov-report/src/api/Calculation.ts.html +1 -1
  10. package/dist/coverage/lcov-report/src/api/Factor.ts.html +1 -1
  11. package/dist/coverage/lcov-report/src/api/FactorSets.ts.html +1 -1
  12. package/dist/coverage/lcov-report/src/api/Fugitive.ts.html +1 -1
  13. package/dist/coverage/lcov-report/src/api/Location.ts.html +1 -1
  14. package/dist/coverage/lcov-report/src/api/Mobile.ts.html +1 -1
  15. package/dist/coverage/lcov-report/src/api/Stationary.ts.html +1 -1
  16. package/dist/coverage/lcov-report/src/api/TransportationAndDistribution.ts.html +1 -1
  17. package/dist/coverage/lcov-report/src/api/Usage.ts.html +160 -0
  18. package/dist/coverage/lcov-report/src/api/index.html +21 -6
  19. package/dist/coverage/lcov-report/src/index.html +7 -7
  20. package/dist/coverage/lcov-report/src/request.ts.html +1 -1
  21. package/dist/coverage/lcov-report/src/utils.ts.html +5 -5
  22. package/dist/coverage/lcov-report/test/index.html +1 -1
  23. package/dist/coverage/lcov-report/test/mocks/CommonRequest.ts.html +1 -1
  24. package/dist/coverage/lcov-report/test/mocks/FactorRequest.ts.html +1 -1
  25. package/dist/coverage/lcov-report/test/mocks/GenericCalculationRequest.ts.html +1 -1
  26. package/dist/coverage/lcov-report/test/mocks/LocationRequest.ts.html +1 -1
  27. package/dist/coverage/lcov-report/test/mocks/SearchRequest.ts.html +1 -1
  28. package/dist/coverage/lcov-report/test/mocks/index.html +1 -1
  29. package/dist/coverage/lcov-report/test/testUtils.ts.html +1 -1
  30. package/dist/coverage/lcov.info +75 -55
  31. package/dist/index.js +2 -1
  32. package/dist/interfaces/response/UsageResponse.js +5 -0
  33. package/dist/types/Constants.d.ts +1 -0
  34. package/dist/types/api/Usage.d.ts +13 -0
  35. package/dist/types/index.d.ts +2 -0
  36. package/dist/types/interfaces/response/UnitResponse.d.ts +11 -2
  37. package/dist/types/interfaces/response/UsageResponse.d.ts +17 -0
  38. package/docs/_sources/reference.rst.txt +6 -0
  39. package/docs/_static/basic.css +0 -8
  40. package/docs/_static/pygments.css +164 -146
  41. package/docs/_static/searchtools.js +8 -5
  42. package/docs/_static/styles/furo.css +1 -1
  43. package/docs/_static/styles/furo.css.map +1 -1
  44. package/docs/authentication.html +19 -28
  45. package/docs/client.html +19 -28
  46. package/docs/genindex.html +23 -28
  47. package/docs/getting_started.html +19 -28
  48. package/docs/index.html +20 -28
  49. package/docs/objects.inv +0 -0
  50. package/docs/reference.html +48 -28
  51. package/docs/sdk.html +19 -28
  52. package/docs/search.html +19 -28
  53. package/docs/searchindex.js +1 -1
  54. package/docs/troubleshooting.html +19 -28
  55. package/package.json +1 -1
  56. package/sphinx-build/source/reference.rst +6 -0
  57. package/src/Constants.ts +2 -0
  58. package/src/api/Usage.ts +26 -0
  59. package/src/index.ts +3 -1
  60. package/src/interfaces/response/UnitResponse.ts +12 -2
  61. package/src/interfaces/response/UsageResponse.ts +23 -0
  62. package/test/apiTest.test.ts +34 -3
@@ -76,157 +76,175 @@
76
76
  .highlight .il { color: #7F4707 } /* Literal.Number.Integer.Long */
77
77
  @media not print {
78
78
  body[data-theme="dark"] .highlight pre { line-height: 125%; }
79
- body[data-theme="dark"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
80
- body[data-theme="dark"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
79
+ body[data-theme="dark"] .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; }
80
+ body[data-theme="dark"] .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; }
81
81
  body[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
82
82
  body[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
83
- body[data-theme="dark"] .highlight .hll { background-color: #ffd9002e }
84
- body[data-theme="dark"] .highlight { background: #2b2b2b; color: #F8F8F2 }
85
- body[data-theme="dark"] .highlight .c { color: #D4D0AB } /* Comment */
86
- body[data-theme="dark"] .highlight .err { color: #FFA07A } /* Error */
87
- body[data-theme="dark"] .highlight .k { color: #DCC6E0 } /* Keyword */
88
- body[data-theme="dark"] .highlight .l { color: #F5AB35 } /* Literal */
89
- body[data-theme="dark"] .highlight .n { color: #F8F8F2 } /* Name */
90
- body[data-theme="dark"] .highlight .o { color: #ABE338 } /* Operator */
91
- body[data-theme="dark"] .highlight .p { color: #F8F8F2 } /* Punctuation */
92
- body[data-theme="dark"] .highlight .ch { color: #D4D0AB } /* Comment.Hashbang */
93
- body[data-theme="dark"] .highlight .cm { color: #D4D0AB } /* Comment.Multiline */
94
- body[data-theme="dark"] .highlight .cp { color: #D4D0AB } /* Comment.Preproc */
95
- body[data-theme="dark"] .highlight .cpf { color: #D4D0AB } /* Comment.PreprocFile */
96
- body[data-theme="dark"] .highlight .c1 { color: #D4D0AB } /* Comment.Single */
97
- body[data-theme="dark"] .highlight .cs { color: #D4D0AB } /* Comment.Special */
98
- body[data-theme="dark"] .highlight .gd { color: #00E0E0 } /* Generic.Deleted */
99
- body[data-theme="dark"] .highlight .ge { font-style: italic } /* Generic.Emph */
100
- body[data-theme="dark"] .highlight .gh { color: #00E0E0 } /* Generic.Heading */
101
- body[data-theme="dark"] .highlight .gs { font-weight: bold } /* Generic.Strong */
102
- body[data-theme="dark"] .highlight .gu { color: #00E0E0 } /* Generic.Subheading */
103
- body[data-theme="dark"] .highlight .kc { color: #DCC6E0 } /* Keyword.Constant */
104
- body[data-theme="dark"] .highlight .kd { color: #DCC6E0 } /* Keyword.Declaration */
105
- body[data-theme="dark"] .highlight .kn { color: #DCC6E0 } /* Keyword.Namespace */
106
- body[data-theme="dark"] .highlight .kp { color: #DCC6E0 } /* Keyword.Pseudo */
107
- body[data-theme="dark"] .highlight .kr { color: #DCC6E0 } /* Keyword.Reserved */
108
- body[data-theme="dark"] .highlight .kt { color: #F5AB35 } /* Keyword.Type */
109
- body[data-theme="dark"] .highlight .ld { color: #F5AB35 } /* Literal.Date */
110
- body[data-theme="dark"] .highlight .m { color: #F5AB35 } /* Literal.Number */
111
- body[data-theme="dark"] .highlight .s { color: #ABE338 } /* Literal.String */
112
- body[data-theme="dark"] .highlight .na { color: #FFD700 } /* Name.Attribute */
113
- body[data-theme="dark"] .highlight .nb { color: #F5AB35 } /* Name.Builtin */
114
- body[data-theme="dark"] .highlight .nc { color: #00E0E0 } /* Name.Class */
115
- body[data-theme="dark"] .highlight .no { color: #00E0E0 } /* Name.Constant */
116
- body[data-theme="dark"] .highlight .nd { color: #F5AB35 } /* Name.Decorator */
117
- body[data-theme="dark"] .highlight .ni { color: #ABE338 } /* Name.Entity */
118
- body[data-theme="dark"] .highlight .ne { color: #DCC6E0 } /* Name.Exception */
119
- body[data-theme="dark"] .highlight .nf { color: #00E0E0 } /* Name.Function */
120
- body[data-theme="dark"] .highlight .nl { color: #F5AB35 } /* Name.Label */
121
- body[data-theme="dark"] .highlight .nn { color: #F8F8F2 } /* Name.Namespace */
122
- body[data-theme="dark"] .highlight .nx { color: #F8F8F2 } /* Name.Other */
123
- body[data-theme="dark"] .highlight .py { color: #00E0E0 } /* Name.Property */
124
- body[data-theme="dark"] .highlight .nt { color: #00E0E0 } /* Name.Tag */
125
- body[data-theme="dark"] .highlight .nv { color: #FFA07A } /* Name.Variable */
126
- body[data-theme="dark"] .highlight .ow { color: #DCC6E0 } /* Operator.Word */
127
- body[data-theme="dark"] .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */
128
- body[data-theme="dark"] .highlight .w { color: #F8F8F2 } /* Text.Whitespace */
129
- body[data-theme="dark"] .highlight .mb { color: #F5AB35 } /* Literal.Number.Bin */
130
- body[data-theme="dark"] .highlight .mf { color: #F5AB35 } /* Literal.Number.Float */
131
- body[data-theme="dark"] .highlight .mh { color: #F5AB35 } /* Literal.Number.Hex */
132
- body[data-theme="dark"] .highlight .mi { color: #F5AB35 } /* Literal.Number.Integer */
133
- body[data-theme="dark"] .highlight .mo { color: #F5AB35 } /* Literal.Number.Oct */
134
- body[data-theme="dark"] .highlight .sa { color: #ABE338 } /* Literal.String.Affix */
135
- body[data-theme="dark"] .highlight .sb { color: #ABE338 } /* Literal.String.Backtick */
136
- body[data-theme="dark"] .highlight .sc { color: #ABE338 } /* Literal.String.Char */
137
- body[data-theme="dark"] .highlight .dl { color: #ABE338 } /* Literal.String.Delimiter */
138
- body[data-theme="dark"] .highlight .sd { color: #ABE338 } /* Literal.String.Doc */
139
- body[data-theme="dark"] .highlight .s2 { color: #ABE338 } /* Literal.String.Double */
140
- body[data-theme="dark"] .highlight .se { color: #ABE338 } /* Literal.String.Escape */
141
- body[data-theme="dark"] .highlight .sh { color: #ABE338 } /* Literal.String.Heredoc */
142
- body[data-theme="dark"] .highlight .si { color: #ABE338 } /* Literal.String.Interpol */
143
- body[data-theme="dark"] .highlight .sx { color: #ABE338 } /* Literal.String.Other */
144
- body[data-theme="dark"] .highlight .sr { color: #FFA07A } /* Literal.String.Regex */
145
- body[data-theme="dark"] .highlight .s1 { color: #ABE338 } /* Literal.String.Single */
146
- body[data-theme="dark"] .highlight .ss { color: #00E0E0 } /* Literal.String.Symbol */
147
- body[data-theme="dark"] .highlight .bp { color: #F5AB35 } /* Name.Builtin.Pseudo */
148
- body[data-theme="dark"] .highlight .fm { color: #00E0E0 } /* Name.Function.Magic */
149
- body[data-theme="dark"] .highlight .vc { color: #FFA07A } /* Name.Variable.Class */
150
- body[data-theme="dark"] .highlight .vg { color: #FFA07A } /* Name.Variable.Global */
151
- body[data-theme="dark"] .highlight .vi { color: #FFA07A } /* Name.Variable.Instance */
152
- body[data-theme="dark"] .highlight .vm { color: #F5AB35 } /* Name.Variable.Magic */
153
- body[data-theme="dark"] .highlight .il { color: #F5AB35 } /* Literal.Number.Integer.Long */
83
+ body[data-theme="dark"] .highlight .hll { background-color: #404040 }
84
+ body[data-theme="dark"] .highlight { background: #202020; color: #D0D0D0 }
85
+ body[data-theme="dark"] .highlight .c { color: #ABABAB; font-style: italic } /* Comment */
86
+ body[data-theme="dark"] .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */
87
+ body[data-theme="dark"] .highlight .esc { color: #D0D0D0 } /* Escape */
88
+ body[data-theme="dark"] .highlight .g { color: #D0D0D0 } /* Generic */
89
+ body[data-theme="dark"] .highlight .k { color: #6EBF26; font-weight: bold } /* Keyword */
90
+ body[data-theme="dark"] .highlight .l { color: #D0D0D0 } /* Literal */
91
+ body[data-theme="dark"] .highlight .n { color: #D0D0D0 } /* Name */
92
+ body[data-theme="dark"] .highlight .o { color: #D0D0D0 } /* Operator */
93
+ body[data-theme="dark"] .highlight .x { color: #D0D0D0 } /* Other */
94
+ body[data-theme="dark"] .highlight .p { color: #D0D0D0 } /* Punctuation */
95
+ body[data-theme="dark"] .highlight .ch { color: #ABABAB; font-style: italic } /* Comment.Hashbang */
96
+ body[data-theme="dark"] .highlight .cm { color: #ABABAB; font-style: italic } /* Comment.Multiline */
97
+ body[data-theme="dark"] .highlight .cp { color: #FF3A3A; font-weight: bold } /* Comment.Preproc */
98
+ body[data-theme="dark"] .highlight .cpf { color: #ABABAB; font-style: italic } /* Comment.PreprocFile */
99
+ body[data-theme="dark"] .highlight .c1 { color: #ABABAB; font-style: italic } /* Comment.Single */
100
+ body[data-theme="dark"] .highlight .cs { color: #E50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
101
+ body[data-theme="dark"] .highlight .gd { color: #FF3A3A } /* Generic.Deleted */
102
+ body[data-theme="dark"] .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */
103
+ body[data-theme="dark"] .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
104
+ body[data-theme="dark"] .highlight .gr { color: #FF3A3A } /* Generic.Error */
105
+ body[data-theme="dark"] .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */
106
+ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */
107
+ body[data-theme="dark"] .highlight .go { color: #CCC } /* Generic.Output */
108
+ body[data-theme="dark"] .highlight .gp { color: #AAA } /* Generic.Prompt */
109
+ body[data-theme="dark"] .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */
110
+ body[data-theme="dark"] .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */
111
+ body[data-theme="dark"] .highlight .gt { color: #FF3A3A } /* Generic.Traceback */
112
+ body[data-theme="dark"] .highlight .kc { color: #6EBF26; font-weight: bold } /* Keyword.Constant */
113
+ body[data-theme="dark"] .highlight .kd { color: #6EBF26; font-weight: bold } /* Keyword.Declaration */
114
+ body[data-theme="dark"] .highlight .kn { color: #6EBF26; font-weight: bold } /* Keyword.Namespace */
115
+ body[data-theme="dark"] .highlight .kp { color: #6EBF26 } /* Keyword.Pseudo */
116
+ body[data-theme="dark"] .highlight .kr { color: #6EBF26; font-weight: bold } /* Keyword.Reserved */
117
+ body[data-theme="dark"] .highlight .kt { color: #6EBF26; font-weight: bold } /* Keyword.Type */
118
+ body[data-theme="dark"] .highlight .ld { color: #D0D0D0 } /* Literal.Date */
119
+ body[data-theme="dark"] .highlight .m { color: #51B2FD } /* Literal.Number */
120
+ body[data-theme="dark"] .highlight .s { color: #ED9D13 } /* Literal.String */
121
+ body[data-theme="dark"] .highlight .na { color: #BBB } /* Name.Attribute */
122
+ body[data-theme="dark"] .highlight .nb { color: #2FBCCD } /* Name.Builtin */
123
+ body[data-theme="dark"] .highlight .nc { color: #71ADFF; text-decoration: underline } /* Name.Class */
124
+ body[data-theme="dark"] .highlight .no { color: #40FFFF } /* Name.Constant */
125
+ body[data-theme="dark"] .highlight .nd { color: #FFA500 } /* Name.Decorator */
126
+ body[data-theme="dark"] .highlight .ni { color: #D0D0D0 } /* Name.Entity */
127
+ body[data-theme="dark"] .highlight .ne { color: #BBB } /* Name.Exception */
128
+ body[data-theme="dark"] .highlight .nf { color: #71ADFF } /* Name.Function */
129
+ body[data-theme="dark"] .highlight .nl { color: #D0D0D0 } /* Name.Label */
130
+ body[data-theme="dark"] .highlight .nn { color: #71ADFF; text-decoration: underline } /* Name.Namespace */
131
+ body[data-theme="dark"] .highlight .nx { color: #D0D0D0 } /* Name.Other */
132
+ body[data-theme="dark"] .highlight .py { color: #D0D0D0 } /* Name.Property */
133
+ body[data-theme="dark"] .highlight .nt { color: #6EBF26; font-weight: bold } /* Name.Tag */
134
+ body[data-theme="dark"] .highlight .nv { color: #40FFFF } /* Name.Variable */
135
+ body[data-theme="dark"] .highlight .ow { color: #6EBF26; font-weight: bold } /* Operator.Word */
136
+ body[data-theme="dark"] .highlight .pm { color: #D0D0D0 } /* Punctuation.Marker */
137
+ body[data-theme="dark"] .highlight .w { color: #666 } /* Text.Whitespace */
138
+ body[data-theme="dark"] .highlight .mb { color: #51B2FD } /* Literal.Number.Bin */
139
+ body[data-theme="dark"] .highlight .mf { color: #51B2FD } /* Literal.Number.Float */
140
+ body[data-theme="dark"] .highlight .mh { color: #51B2FD } /* Literal.Number.Hex */
141
+ body[data-theme="dark"] .highlight .mi { color: #51B2FD } /* Literal.Number.Integer */
142
+ body[data-theme="dark"] .highlight .mo { color: #51B2FD } /* Literal.Number.Oct */
143
+ body[data-theme="dark"] .highlight .sa { color: #ED9D13 } /* Literal.String.Affix */
144
+ body[data-theme="dark"] .highlight .sb { color: #ED9D13 } /* Literal.String.Backtick */
145
+ body[data-theme="dark"] .highlight .sc { color: #ED9D13 } /* Literal.String.Char */
146
+ body[data-theme="dark"] .highlight .dl { color: #ED9D13 } /* Literal.String.Delimiter */
147
+ body[data-theme="dark"] .highlight .sd { color: #ED9D13 } /* Literal.String.Doc */
148
+ body[data-theme="dark"] .highlight .s2 { color: #ED9D13 } /* Literal.String.Double */
149
+ body[data-theme="dark"] .highlight .se { color: #ED9D13 } /* Literal.String.Escape */
150
+ body[data-theme="dark"] .highlight .sh { color: #ED9D13 } /* Literal.String.Heredoc */
151
+ body[data-theme="dark"] .highlight .si { color: #ED9D13 } /* Literal.String.Interpol */
152
+ body[data-theme="dark"] .highlight .sx { color: #FFA500 } /* Literal.String.Other */
153
+ body[data-theme="dark"] .highlight .sr { color: #ED9D13 } /* Literal.String.Regex */
154
+ body[data-theme="dark"] .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */
155
+ body[data-theme="dark"] .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */
156
+ body[data-theme="dark"] .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */
157
+ body[data-theme="dark"] .highlight .fm { color: #71ADFF } /* Name.Function.Magic */
158
+ body[data-theme="dark"] .highlight .vc { color: #40FFFF } /* Name.Variable.Class */
159
+ body[data-theme="dark"] .highlight .vg { color: #40FFFF } /* Name.Variable.Global */
160
+ body[data-theme="dark"] .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */
161
+ body[data-theme="dark"] .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */
162
+ body[data-theme="dark"] .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */
154
163
  @media (prefers-color-scheme: dark) {
155
164
  body:not([data-theme="light"]) .highlight pre { line-height: 125%; }
156
- body:not([data-theme="light"]) .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
157
- body:not([data-theme="light"]) .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
165
+ body:not([data-theme="light"]) .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; }
166
+ body:not([data-theme="light"]) .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; }
158
167
  body:not([data-theme="light"]) .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
159
168
  body:not([data-theme="light"]) .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
160
- body:not([data-theme="light"]) .highlight .hll { background-color: #ffd9002e }
161
- body:not([data-theme="light"]) .highlight { background: #2b2b2b; color: #F8F8F2 }
162
- body:not([data-theme="light"]) .highlight .c { color: #D4D0AB } /* Comment */
163
- body:not([data-theme="light"]) .highlight .err { color: #FFA07A } /* Error */
164
- body:not([data-theme="light"]) .highlight .k { color: #DCC6E0 } /* Keyword */
165
- body:not([data-theme="light"]) .highlight .l { color: #F5AB35 } /* Literal */
166
- body:not([data-theme="light"]) .highlight .n { color: #F8F8F2 } /* Name */
167
- body:not([data-theme="light"]) .highlight .o { color: #ABE338 } /* Operator */
168
- body:not([data-theme="light"]) .highlight .p { color: #F8F8F2 } /* Punctuation */
169
- body:not([data-theme="light"]) .highlight .ch { color: #D4D0AB } /* Comment.Hashbang */
170
- body:not([data-theme="light"]) .highlight .cm { color: #D4D0AB } /* Comment.Multiline */
171
- body:not([data-theme="light"]) .highlight .cp { color: #D4D0AB } /* Comment.Preproc */
172
- body:not([data-theme="light"]) .highlight .cpf { color: #D4D0AB } /* Comment.PreprocFile */
173
- body:not([data-theme="light"]) .highlight .c1 { color: #D4D0AB } /* Comment.Single */
174
- body:not([data-theme="light"]) .highlight .cs { color: #D4D0AB } /* Comment.Special */
175
- body:not([data-theme="light"]) .highlight .gd { color: #00E0E0 } /* Generic.Deleted */
176
- body:not([data-theme="light"]) .highlight .ge { font-style: italic } /* Generic.Emph */
177
- body:not([data-theme="light"]) .highlight .gh { color: #00E0E0 } /* Generic.Heading */
178
- body:not([data-theme="light"]) .highlight .gs { font-weight: bold } /* Generic.Strong */
179
- body:not([data-theme="light"]) .highlight .gu { color: #00E0E0 } /* Generic.Subheading */
180
- body:not([data-theme="light"]) .highlight .kc { color: #DCC6E0 } /* Keyword.Constant */
181
- body:not([data-theme="light"]) .highlight .kd { color: #DCC6E0 } /* Keyword.Declaration */
182
- body:not([data-theme="light"]) .highlight .kn { color: #DCC6E0 } /* Keyword.Namespace */
183
- body:not([data-theme="light"]) .highlight .kp { color: #DCC6E0 } /* Keyword.Pseudo */
184
- body:not([data-theme="light"]) .highlight .kr { color: #DCC6E0 } /* Keyword.Reserved */
185
- body:not([data-theme="light"]) .highlight .kt { color: #F5AB35 } /* Keyword.Type */
186
- body:not([data-theme="light"]) .highlight .ld { color: #F5AB35 } /* Literal.Date */
187
- body:not([data-theme="light"]) .highlight .m { color: #F5AB35 } /* Literal.Number */
188
- body:not([data-theme="light"]) .highlight .s { color: #ABE338 } /* Literal.String */
189
- body:not([data-theme="light"]) .highlight .na { color: #FFD700 } /* Name.Attribute */
190
- body:not([data-theme="light"]) .highlight .nb { color: #F5AB35 } /* Name.Builtin */
191
- body:not([data-theme="light"]) .highlight .nc { color: #00E0E0 } /* Name.Class */
192
- body:not([data-theme="light"]) .highlight .no { color: #00E0E0 } /* Name.Constant */
193
- body:not([data-theme="light"]) .highlight .nd { color: #F5AB35 } /* Name.Decorator */
194
- body:not([data-theme="light"]) .highlight .ni { color: #ABE338 } /* Name.Entity */
195
- body:not([data-theme="light"]) .highlight .ne { color: #DCC6E0 } /* Name.Exception */
196
- body:not([data-theme="light"]) .highlight .nf { color: #00E0E0 } /* Name.Function */
197
- body:not([data-theme="light"]) .highlight .nl { color: #F5AB35 } /* Name.Label */
198
- body:not([data-theme="light"]) .highlight .nn { color: #F8F8F2 } /* Name.Namespace */
199
- body:not([data-theme="light"]) .highlight .nx { color: #F8F8F2 } /* Name.Other */
200
- body:not([data-theme="light"]) .highlight .py { color: #00E0E0 } /* Name.Property */
201
- body:not([data-theme="light"]) .highlight .nt { color: #00E0E0 } /* Name.Tag */
202
- body:not([data-theme="light"]) .highlight .nv { color: #FFA07A } /* Name.Variable */
203
- body:not([data-theme="light"]) .highlight .ow { color: #DCC6E0 } /* Operator.Word */
204
- body:not([data-theme="light"]) .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */
205
- body:not([data-theme="light"]) .highlight .w { color: #F8F8F2 } /* Text.Whitespace */
206
- body:not([data-theme="light"]) .highlight .mb { color: #F5AB35 } /* Literal.Number.Bin */
207
- body:not([data-theme="light"]) .highlight .mf { color: #F5AB35 } /* Literal.Number.Float */
208
- body:not([data-theme="light"]) .highlight .mh { color: #F5AB35 } /* Literal.Number.Hex */
209
- body:not([data-theme="light"]) .highlight .mi { color: #F5AB35 } /* Literal.Number.Integer */
210
- body:not([data-theme="light"]) .highlight .mo { color: #F5AB35 } /* Literal.Number.Oct */
211
- body:not([data-theme="light"]) .highlight .sa { color: #ABE338 } /* Literal.String.Affix */
212
- body:not([data-theme="light"]) .highlight .sb { color: #ABE338 } /* Literal.String.Backtick */
213
- body:not([data-theme="light"]) .highlight .sc { color: #ABE338 } /* Literal.String.Char */
214
- body:not([data-theme="light"]) .highlight .dl { color: #ABE338 } /* Literal.String.Delimiter */
215
- body:not([data-theme="light"]) .highlight .sd { color: #ABE338 } /* Literal.String.Doc */
216
- body:not([data-theme="light"]) .highlight .s2 { color: #ABE338 } /* Literal.String.Double */
217
- body:not([data-theme="light"]) .highlight .se { color: #ABE338 } /* Literal.String.Escape */
218
- body:not([data-theme="light"]) .highlight .sh { color: #ABE338 } /* Literal.String.Heredoc */
219
- body:not([data-theme="light"]) .highlight .si { color: #ABE338 } /* Literal.String.Interpol */
220
- body:not([data-theme="light"]) .highlight .sx { color: #ABE338 } /* Literal.String.Other */
221
- body:not([data-theme="light"]) .highlight .sr { color: #FFA07A } /* Literal.String.Regex */
222
- body:not([data-theme="light"]) .highlight .s1 { color: #ABE338 } /* Literal.String.Single */
223
- body:not([data-theme="light"]) .highlight .ss { color: #00E0E0 } /* Literal.String.Symbol */
224
- body:not([data-theme="light"]) .highlight .bp { color: #F5AB35 } /* Name.Builtin.Pseudo */
225
- body:not([data-theme="light"]) .highlight .fm { color: #00E0E0 } /* Name.Function.Magic */
226
- body:not([data-theme="light"]) .highlight .vc { color: #FFA07A } /* Name.Variable.Class */
227
- body:not([data-theme="light"]) .highlight .vg { color: #FFA07A } /* Name.Variable.Global */
228
- body:not([data-theme="light"]) .highlight .vi { color: #FFA07A } /* Name.Variable.Instance */
229
- body:not([data-theme="light"]) .highlight .vm { color: #F5AB35 } /* Name.Variable.Magic */
230
- body:not([data-theme="light"]) .highlight .il { color: #F5AB35 } /* Literal.Number.Integer.Long */
169
+ body:not([data-theme="light"]) .highlight .hll { background-color: #404040 }
170
+ body:not([data-theme="light"]) .highlight { background: #202020; color: #D0D0D0 }
171
+ body:not([data-theme="light"]) .highlight .c { color: #ABABAB; font-style: italic } /* Comment */
172
+ body:not([data-theme="light"]) .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */
173
+ body:not([data-theme="light"]) .highlight .esc { color: #D0D0D0 } /* Escape */
174
+ body:not([data-theme="light"]) .highlight .g { color: #D0D0D0 } /* Generic */
175
+ body:not([data-theme="light"]) .highlight .k { color: #6EBF26; font-weight: bold } /* Keyword */
176
+ body:not([data-theme="light"]) .highlight .l { color: #D0D0D0 } /* Literal */
177
+ body:not([data-theme="light"]) .highlight .n { color: #D0D0D0 } /* Name */
178
+ body:not([data-theme="light"]) .highlight .o { color: #D0D0D0 } /* Operator */
179
+ body:not([data-theme="light"]) .highlight .x { color: #D0D0D0 } /* Other */
180
+ body:not([data-theme="light"]) .highlight .p { color: #D0D0D0 } /* Punctuation */
181
+ body:not([data-theme="light"]) .highlight .ch { color: #ABABAB; font-style: italic } /* Comment.Hashbang */
182
+ body:not([data-theme="light"]) .highlight .cm { color: #ABABAB; font-style: italic } /* Comment.Multiline */
183
+ body:not([data-theme="light"]) .highlight .cp { color: #FF3A3A; font-weight: bold } /* Comment.Preproc */
184
+ body:not([data-theme="light"]) .highlight .cpf { color: #ABABAB; font-style: italic } /* Comment.PreprocFile */
185
+ body:not([data-theme="light"]) .highlight .c1 { color: #ABABAB; font-style: italic } /* Comment.Single */
186
+ body:not([data-theme="light"]) .highlight .cs { color: #E50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
187
+ body:not([data-theme="light"]) .highlight .gd { color: #FF3A3A } /* Generic.Deleted */
188
+ body:not([data-theme="light"]) .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */
189
+ body:not([data-theme="light"]) .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
190
+ body:not([data-theme="light"]) .highlight .gr { color: #FF3A3A } /* Generic.Error */
191
+ body:not([data-theme="light"]) .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */
192
+ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */
193
+ body:not([data-theme="light"]) .highlight .go { color: #CCC } /* Generic.Output */
194
+ body:not([data-theme="light"]) .highlight .gp { color: #AAA } /* Generic.Prompt */
195
+ body:not([data-theme="light"]) .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */
196
+ body:not([data-theme="light"]) .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */
197
+ body:not([data-theme="light"]) .highlight .gt { color: #FF3A3A } /* Generic.Traceback */
198
+ body:not([data-theme="light"]) .highlight .kc { color: #6EBF26; font-weight: bold } /* Keyword.Constant */
199
+ body:not([data-theme="light"]) .highlight .kd { color: #6EBF26; font-weight: bold } /* Keyword.Declaration */
200
+ body:not([data-theme="light"]) .highlight .kn { color: #6EBF26; font-weight: bold } /* Keyword.Namespace */
201
+ body:not([data-theme="light"]) .highlight .kp { color: #6EBF26 } /* Keyword.Pseudo */
202
+ body:not([data-theme="light"]) .highlight .kr { color: #6EBF26; font-weight: bold } /* Keyword.Reserved */
203
+ body:not([data-theme="light"]) .highlight .kt { color: #6EBF26; font-weight: bold } /* Keyword.Type */
204
+ body:not([data-theme="light"]) .highlight .ld { color: #D0D0D0 } /* Literal.Date */
205
+ body:not([data-theme="light"]) .highlight .m { color: #51B2FD } /* Literal.Number */
206
+ body:not([data-theme="light"]) .highlight .s { color: #ED9D13 } /* Literal.String */
207
+ body:not([data-theme="light"]) .highlight .na { color: #BBB } /* Name.Attribute */
208
+ body:not([data-theme="light"]) .highlight .nb { color: #2FBCCD } /* Name.Builtin */
209
+ body:not([data-theme="light"]) .highlight .nc { color: #71ADFF; text-decoration: underline } /* Name.Class */
210
+ body:not([data-theme="light"]) .highlight .no { color: #40FFFF } /* Name.Constant */
211
+ body:not([data-theme="light"]) .highlight .nd { color: #FFA500 } /* Name.Decorator */
212
+ body:not([data-theme="light"]) .highlight .ni { color: #D0D0D0 } /* Name.Entity */
213
+ body:not([data-theme="light"]) .highlight .ne { color: #BBB } /* Name.Exception */
214
+ body:not([data-theme="light"]) .highlight .nf { color: #71ADFF } /* Name.Function */
215
+ body:not([data-theme="light"]) .highlight .nl { color: #D0D0D0 } /* Name.Label */
216
+ body:not([data-theme="light"]) .highlight .nn { color: #71ADFF; text-decoration: underline } /* Name.Namespace */
217
+ body:not([data-theme="light"]) .highlight .nx { color: #D0D0D0 } /* Name.Other */
218
+ body:not([data-theme="light"]) .highlight .py { color: #D0D0D0 } /* Name.Property */
219
+ body:not([data-theme="light"]) .highlight .nt { color: #6EBF26; font-weight: bold } /* Name.Tag */
220
+ body:not([data-theme="light"]) .highlight .nv { color: #40FFFF } /* Name.Variable */
221
+ body:not([data-theme="light"]) .highlight .ow { color: #6EBF26; font-weight: bold } /* Operator.Word */
222
+ body:not([data-theme="light"]) .highlight .pm { color: #D0D0D0 } /* Punctuation.Marker */
223
+ body:not([data-theme="light"]) .highlight .w { color: #666 } /* Text.Whitespace */
224
+ body:not([data-theme="light"]) .highlight .mb { color: #51B2FD } /* Literal.Number.Bin */
225
+ body:not([data-theme="light"]) .highlight .mf { color: #51B2FD } /* Literal.Number.Float */
226
+ body:not([data-theme="light"]) .highlight .mh { color: #51B2FD } /* Literal.Number.Hex */
227
+ body:not([data-theme="light"]) .highlight .mi { color: #51B2FD } /* Literal.Number.Integer */
228
+ body:not([data-theme="light"]) .highlight .mo { color: #51B2FD } /* Literal.Number.Oct */
229
+ body:not([data-theme="light"]) .highlight .sa { color: #ED9D13 } /* Literal.String.Affix */
230
+ body:not([data-theme="light"]) .highlight .sb { color: #ED9D13 } /* Literal.String.Backtick */
231
+ body:not([data-theme="light"]) .highlight .sc { color: #ED9D13 } /* Literal.String.Char */
232
+ body:not([data-theme="light"]) .highlight .dl { color: #ED9D13 } /* Literal.String.Delimiter */
233
+ body:not([data-theme="light"]) .highlight .sd { color: #ED9D13 } /* Literal.String.Doc */
234
+ body:not([data-theme="light"]) .highlight .s2 { color: #ED9D13 } /* Literal.String.Double */
235
+ body:not([data-theme="light"]) .highlight .se { color: #ED9D13 } /* Literal.String.Escape */
236
+ body:not([data-theme="light"]) .highlight .sh { color: #ED9D13 } /* Literal.String.Heredoc */
237
+ body:not([data-theme="light"]) .highlight .si { color: #ED9D13 } /* Literal.String.Interpol */
238
+ body:not([data-theme="light"]) .highlight .sx { color: #FFA500 } /* Literal.String.Other */
239
+ body:not([data-theme="light"]) .highlight .sr { color: #ED9D13 } /* Literal.String.Regex */
240
+ body:not([data-theme="light"]) .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */
241
+ body:not([data-theme="light"]) .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */
242
+ body:not([data-theme="light"]) .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */
243
+ body:not([data-theme="light"]) .highlight .fm { color: #71ADFF } /* Name.Function.Magic */
244
+ body:not([data-theme="light"]) .highlight .vc { color: #40FFFF } /* Name.Variable.Class */
245
+ body:not([data-theme="light"]) .highlight .vg { color: #40FFFF } /* Name.Variable.Global */
246
+ body:not([data-theme="light"]) .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */
247
+ body:not([data-theme="light"]) .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */
248
+ body:not([data-theme="light"]) .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */
231
249
  }
232
250
  }
@@ -513,9 +513,11 @@ const Search = {
513
513
  // perform the search on the required terms
514
514
  searchTerms.forEach((word) => {
515
515
  const files = [];
516
+ // find documents, if any, containing the query word in their text/title term indices
517
+ // use Object.hasOwnProperty to avoid mismatching against prototype properties
516
518
  const arr = [
517
- { files: terms[word], score: Scorer.term },
518
- { files: titleTerms[word], score: Scorer.title },
519
+ { files: terms.hasOwnProperty(word) ? terms[word] : undefined, score: Scorer.term },
520
+ { files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, score: Scorer.title },
519
521
  ];
520
522
  // add support for partial matches
521
523
  if (word.length > 2) {
@@ -547,8 +549,9 @@ const Search = {
547
549
 
548
550
  // set score for the word in each file
549
551
  recordFiles.forEach((file) => {
550
- if (!scoreMap.has(file)) scoreMap.set(file, {});
551
- scoreMap.get(file)[word] = record.score;
552
+ if (!scoreMap.has(file)) scoreMap.set(file, new Map());
553
+ const fileScores = scoreMap.get(file);
554
+ fileScores.set(word, record.score);
552
555
  });
553
556
  });
554
557
 
@@ -587,7 +590,7 @@ const Search = {
587
590
  break;
588
591
 
589
592
  // select one (max) score for the file.
590
- const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
593
+ const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w)));
591
594
  // add result to the result list
592
595
  results.push([
593
596
  docNames[file],