@alphafi/alphafi-sdk 0.0.49 → 0.0.50

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 (252) hide show
  1. package/dist/cjs/adminFunctions.d.ts +2 -1
  2. package/dist/cjs/adminFunctions.d.ts.map +1 -1
  3. package/dist/cjs/adminFunctions.js +47 -0
  4. package/dist/cjs/adminFunctions.js.map +1 -1
  5. package/dist/cjs/common/maps.d.ts +1 -0
  6. package/dist/cjs/common/maps.d.ts.map +1 -1
  7. package/dist/cjs/common/maps.js.map +1 -1
  8. package/dist/cjs/common/types.d.ts +17 -3
  9. package/dist/cjs/common/types.d.ts.map +1 -1
  10. package/dist/cjs/common/types.js.map +1 -1
  11. package/dist/cjs/index.d.ts +2 -1
  12. package/dist/cjs/index.d.ts.map +1 -1
  13. package/dist/cjs/index.js +3 -2
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/cjs/sui-sdk/client.d.ts +8 -0
  16. package/dist/cjs/sui-sdk/client.d.ts.map +1 -1
  17. package/dist/cjs/sui-sdk/client.js +12 -0
  18. package/dist/cjs/sui-sdk/client.js.map +1 -1
  19. package/dist/cjs/sui-sdk/functions/getPositionRange.d.ts +10 -0
  20. package/dist/cjs/sui-sdk/functions/getPositionRange.d.ts.map +1 -0
  21. package/dist/cjs/sui-sdk/functions/getPositionRange.js +86 -0
  22. package/dist/cjs/sui-sdk/functions/getPositionRange.js.map +1 -0
  23. package/dist/cjs/sui-sdk/functions/getReceipts.d.ts +4 -12
  24. package/dist/cjs/sui-sdk/functions/getReceipts.d.ts.map +1 -1
  25. package/dist/cjs/sui-sdk/functions/getReceipts.js +0 -81
  26. package/dist/cjs/sui-sdk/functions/getReceipts.js.map +1 -1
  27. package/dist/cjs/transactions/zapDeposit.d.ts.map +1 -1
  28. package/dist/cjs/transactions/zapDeposit.js +58 -29
  29. package/dist/cjs/transactions/zapDeposit.js.map +1 -1
  30. package/dist/esm/adminFunctions.d.ts +2 -1
  31. package/dist/esm/adminFunctions.d.ts.map +1 -1
  32. package/dist/esm/adminFunctions.js +48 -2
  33. package/dist/esm/adminFunctions.js.map +1 -1
  34. package/dist/esm/common/maps.d.ts +1 -0
  35. package/dist/esm/common/maps.d.ts.map +1 -1
  36. package/dist/esm/common/maps.js.map +1 -1
  37. package/dist/esm/common/types.d.ts +17 -3
  38. package/dist/esm/common/types.d.ts.map +1 -1
  39. package/dist/esm/common/types.js.map +1 -1
  40. package/dist/esm/index.d.ts +2 -1
  41. package/dist/esm/index.d.ts.map +1 -1
  42. package/dist/esm/index.js +2 -1
  43. package/dist/esm/index.js.map +1 -1
  44. package/dist/esm/sui-sdk/client.d.ts +8 -0
  45. package/dist/esm/sui-sdk/client.d.ts.map +1 -1
  46. package/dist/esm/sui-sdk/client.js +10 -0
  47. package/dist/esm/sui-sdk/client.js.map +1 -1
  48. package/dist/esm/sui-sdk/functions/getPositionRange.d.ts +10 -0
  49. package/dist/esm/sui-sdk/functions/getPositionRange.d.ts.map +1 -0
  50. package/dist/esm/sui-sdk/functions/getPositionRange.js +82 -0
  51. package/dist/esm/sui-sdk/functions/getPositionRange.js.map +1 -0
  52. package/dist/esm/sui-sdk/functions/getReceipts.d.ts +4 -12
  53. package/dist/esm/sui-sdk/functions/getReceipts.d.ts.map +1 -1
  54. package/dist/esm/sui-sdk/functions/getReceipts.js +2 -81
  55. package/dist/esm/sui-sdk/functions/getReceipts.js.map +1 -1
  56. package/dist/esm/transactions/zapDeposit.d.ts.map +1 -1
  57. package/dist/esm/transactions/zapDeposit.js +59 -30
  58. package/dist/esm/transactions/zapDeposit.js.map +1 -1
  59. package/docs/assets/highlight.css +51 -74
  60. package/docs/assets/icons.js +17 -20
  61. package/docs/assets/main.js +5 -2163
  62. package/docs/assets/navigation.js +1 -2
  63. package/docs/assets/search.js +1 -2
  64. package/docs/assets/style.css +850 -846
  65. package/docs/functions/alphaLpBreakdown.html +1 -253
  66. package/docs/functions/cetusLpBreakdown.html +1 -253
  67. package/docs/functions/claimBlueRewardTxb.html +1 -0
  68. package/docs/functions/claimRewardTxb.html +1 -243
  69. package/docs/functions/coinAmountToXTokensDoubleAsset.html +1 -267
  70. package/docs/functions/coinAmountToXTokensSingleAsset.html +1 -260
  71. package/docs/functions/coinsInPool.html +1 -438
  72. package/docs/functions/collectRewards.html +1 -242
  73. package/docs/functions/deposit.html +1 -246
  74. package/docs/functions/depositDoubleAssetTxb.html +1 -270
  75. package/docs/functions/depositSingleAssetTxb.html +1 -263
  76. package/docs/functions/fetchAfterTransactionEvents.html +1 -306
  77. package/docs/functions/fetchAutoCompoundingEvents.html +1 -257
  78. package/docs/functions/fetchAutoCompoundingEventsGql.html +1 -251
  79. package/docs/functions/fetchCetusPools.html +1 -231
  80. package/docs/functions/fetchChainIdentifier.html +1 -233
  81. package/docs/functions/fetchCheckRatioEvents.html +1 -249
  82. package/docs/functions/fetchLiquidityChangeEvents.html +1 -257
  83. package/docs/functions/fetchMultiReceipts.html +1 -261
  84. package/docs/functions/fetchNftHolders.html +1 -233
  85. package/docs/functions/fetchPools.html +1 -230
  86. package/docs/functions/fetchPortfolioData.html +1 -243
  87. package/docs/functions/fetchProtocolData.html +1 -231
  88. package/docs/functions/fetchTVL.html +1 -253
  89. package/docs/functions/fetchUserVaultBalances.html +1 -245
  90. package/docs/functions/fetchUserVaults.html +1 -243
  91. package/docs/functions/fetchUserWalletData.html +1 -243
  92. package/docs/functions/fetchWithdrawV2Events.html +1 -255
  93. package/docs/functions/getAirdropShare.html +1 -243
  94. package/docs/functions/getAllDoubleAssetVaults.html +1 -235
  95. package/docs/functions/getAllSingleAssetVaults.html +1 -235
  96. package/docs/functions/getAllVaultBalances.html +1 -265
  97. package/docs/functions/getAllVaults.html +1 -233
  98. package/docs/functions/getAlphaUnlocks.html +1 -245
  99. package/docs/functions/getAlphaVaultBalance.html +1 -255
  100. package/docs/functions/getAmounts.html +1 -272
  101. package/docs/functions/getApr.html +1 -243
  102. package/docs/functions/getAprs.html +1 -255
  103. package/docs/functions/getApy.html +1 -243
  104. package/docs/functions/getApys.html +1 -255
  105. package/docs/functions/getCetusInvestorTicksMap.html +1 -284
  106. package/docs/functions/getCetusSqrtPriceMap.html +1 -249
  107. package/docs/functions/getCoinAmountsFromLiquidity.html +1 -273
  108. package/docs/functions/getConf.html +1 -11763
  109. package/docs/functions/getCurrentTick.html +1 -247
  110. package/docs/functions/getDoubleAssetVaultBalance.html +1 -268
  111. package/docs/functions/getDoubleAssetVaults.html +1 -253
  112. package/docs/functions/getHoldersFromTransactions.html +1 -299
  113. package/docs/functions/getInvestor.html +1 -259
  114. package/docs/functions/getInvestorPoolMap.html +1 -241
  115. package/docs/functions/getLastAutoCompoundTime.html +1 -249
  116. package/docs/functions/getLatestPrices.html +1 -253
  117. package/docs/functions/getLiquidity.html +1 -260
  118. package/docs/functions/getMultiInvestor.html +1 -231
  119. package/docs/functions/getMultiLatestPrices.html +1 -233
  120. package/docs/functions/getMultiParentPool.html +1 -231
  121. package/docs/functions/getMultiPool.html +1 -231
  122. package/docs/functions/getMultiReceipts.html +1 -243
  123. package/docs/functions/getParentPool.html +1 -266
  124. package/docs/functions/getPool.html +1 -262
  125. package/docs/functions/getPoolExchangeRateMap.html +1 -249
  126. package/docs/functions/getPoolsWeightDistribution.html +1 -0
  127. package/docs/functions/getPositionRange.html +1 -283
  128. package/docs/functions/getPositionRanges.html +1 -289
  129. package/docs/functions/getPositionTicks.html +1 -249
  130. package/docs/functions/getPriceToTick.html +1 -254
  131. package/docs/functions/getRebalanceHistories.html +1 -269
  132. package/docs/functions/getRebalanceHistory.html +1 -255
  133. package/docs/functions/getReceipts.html +1 -268
  134. package/docs/functions/getSingleAssetVaultBalance.html +1 -268
  135. package/docs/functions/getSingleAssetVaults.html +1 -253
  136. package/docs/functions/getSuiClient.html +3 -247
  137. package/docs/functions/getSuiNodeUrl.html +3 -232
  138. package/docs/functions/getTVLs-1.html +1 -243
  139. package/docs/functions/getTickToPrice.html +1 -254
  140. package/docs/functions/getTvls.html +1 -259
  141. package/docs/functions/getUserTokensFromTransactions.html +1 -269
  142. package/docs/functions/getUserTokensInUsdFromTransactions.html +1 -263
  143. package/docs/functions/getVaultBalance.html +1 -277
  144. package/docs/functions/getVaultBalanceForActiveUsers.html +1 -261
  145. package/docs/functions/getVaults.html +1 -250
  146. package/docs/functions/getXTokenVaultBalanceForActiveUsers.html +1 -261
  147. package/docs/functions/getZapAmounts.html +1 -323
  148. package/docs/functions/lastAutocompoundTime.html +1 -249
  149. package/docs/functions/liquidityToTokens.html +1 -253
  150. package/docs/functions/multiLiquidityToTokens.html +1 -271
  151. package/docs/functions/multiTokensToUsd.html +1 -262
  152. package/docs/functions/multiXTokensToLiquidity.html +1 -257
  153. package/docs/functions/parseUserWalletData.html +1 -243
  154. package/docs/functions/pendingBlueRewardAmount.html +1 -0
  155. package/docs/functions/setSuiClient.html +7 -255
  156. package/docs/functions/setSuiNodeUrl.html +5 -249
  157. package/docs/functions/withdraw.html +1 -249
  158. package/docs/functions/withdrawAlphaTxb.html +1 -257
  159. package/docs/functions/withdrawTxb.html +1 -260
  160. package/docs/functions/zapDepositTxb.html +1 -300
  161. package/docs/index.html +41 -587
  162. package/docs/interfaces/Coin.html +12 -474
  163. package/docs/interfaces/CoinPair.html +3 -358
  164. package/docs/interfaces/NaviVoloData.html +3 -514
  165. package/docs/interfaces/PoolData.html +6 -0
  166. package/docs/interfaces/PoolWeightDistribution.html +4 -0
  167. package/docs/interfaces/RebalanceHistoryType.html +9 -652
  168. package/docs/modules.html +186 -1315
  169. package/docs/types/AfterTransactionEventNode.html +1 -305
  170. package/docs/types/Allocator.html +1 -321
  171. package/docs/types/AlphaFiDoubleAssetVault.html +1 -258
  172. package/docs/types/AlphaFiMultiVaultBalance.html +1 -219
  173. package/docs/types/AlphaFiSingleAssetVault.html +1 -244
  174. package/docs/types/AlphaFiVault.html +1 -214
  175. package/docs/types/AlphaFiVaultBalance.html +1 -220
  176. package/docs/types/AlphaPoolType.html +1 -383
  177. package/docs/types/AlphaReceipt.html +1 -220
  178. package/docs/types/AlphaReceiptFields.html +1 -421
  179. package/docs/types/AlphaVaultBalance.html +1 -245
  180. package/docs/types/AutoBalancePoolNames.html +1 -0
  181. package/docs/types/AutoCompoundingEventNode.html +1 -225
  182. package/docs/types/BluefinInvestor.html +1 -209
  183. package/docs/types/BluefinPoolType.html +1 -440
  184. package/docs/types/BucketInvestor.html +1 -249
  185. package/docs/types/CetusInvestor.html +1 -240
  186. package/docs/types/CetusPoolType.html +1 -433
  187. package/docs/types/CetusSwapOptions.html +1 -209
  188. package/docs/types/CoinAmounts.html +1 -216
  189. package/docs/types/CoinName.html +1 -290
  190. package/docs/types/CoinType.html +1 -291
  191. package/docs/types/CommonInvestorFields.html +1 -276
  192. package/docs/types/CreatePoolOptions.html +1 -246
  193. package/docs/types/Distributor.html +1 -341
  194. package/docs/types/DoubleAssetMultiVaultBalance.html +1 -236
  195. package/docs/types/DoubleAssetPoolNames.html +1 -289
  196. package/docs/types/DoubleAssetTokenHoldings.html +1 -232
  197. package/docs/types/DoubleAssetVaultBalance.html +1 -229
  198. package/docs/types/GetHoldersParams.html +1 -221
  199. package/docs/types/GetTokenHoldingsParams.html +1 -227
  200. package/docs/types/GetUserTokensFromTransactionsParams.html +1 -233
  201. package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +1 -244
  202. package/docs/types/GetVaultBalanceForActiveUsersParams.html +1 -231
  203. package/docs/types/GetVaultBalanceParams.html +1 -217
  204. package/docs/types/HoldingsObj.html +1 -223
  205. package/docs/types/Icon.html +1 -266
  206. package/docs/types/Investor.html +1 -245
  207. package/docs/types/LiquidityChangeEventNode.html +1 -220
  208. package/docs/types/LiquidityToTokensParams.html +1 -255
  209. package/docs/types/LiquidityToUsdParams.html +1 -267
  210. package/docs/types/LoopingDebt.html +1 -258
  211. package/docs/types/LoopingPoolNames.html +1 -0
  212. package/docs/types/LpBreakdownType.html +1 -238
  213. package/docs/types/MemberPoolDataType.html +1 -276
  214. package/docs/types/MemberType.html +1 -269
  215. package/docs/types/MultiGetVaultBalancesParams.html +1 -229
  216. package/docs/types/NaviInvestor.html +1 -235
  217. package/docs/types/OtherReceiptFields.html +1 -373
  218. package/docs/types/PoolName.html +1 -326
  219. package/docs/types/PoolReceipt.html +1 -253
  220. package/docs/types/PoolType.html +1 -388
  221. package/docs/types/Receipt.html +1 -475
  222. package/docs/types/ReceiptGQL.html +1 -374
  223. package/docs/types/SingleAssetMultiVaultBalance.html +1 -232
  224. package/docs/types/SingleAssetPoolNames.html +1 -247
  225. package/docs/types/SingleAssetTokenHoldings.html +1 -228
  226. package/docs/types/SingleAssetVaultBalance.html +1 -223
  227. package/docs/types/SingleGetVaultBalancesParams.html +1 -224
  228. package/docs/types/StrategyType.html +1 -217
  229. package/docs/types/SuiNetwork.html +1 -213
  230. package/docs/types/SwapOptions.html +1 -248
  231. package/docs/types/TickSpacing.html +1 -212
  232. package/docs/types/TotalWeightType.html +1 -246
  233. package/docs/types/TransactionBlockType.html +1 -358
  234. package/docs/types/UserPoolLiquidity.html +1 -221
  235. package/docs/types/UserPoolTokenHoldings.html +1 -217
  236. package/docs/types/UserUsdHoldings.html +1 -223
  237. package/docs/types/VaultBalance.html +1 -216
  238. package/docs/types/WithdrawV2EventNode.html +1 -208
  239. package/docs/variables/bluefinPoolMap.html +1 -214
  240. package/docs/variables/cetusPoolMap.html +1 -214
  241. package/docs/variables/coinsList.html +1 -220
  242. package/docs/variables/defunctPoolsSet.html +1 -209
  243. package/docs/variables/doubleAssetPoolCoinMap.html +1 -237
  244. package/docs/variables/ignoredWalletsForDailyRevenue.html +1 -218
  245. package/docs/variables/loopingAccountAddresses.html +1 -219
  246. package/docs/variables/loopingPoolCoinMap.html +1 -233
  247. package/docs/variables/naviAssetMap.html +1 -215
  248. package/docs/variables/poolIdPoolNameMap.html +1 -218
  249. package/docs/variables/poolInfo.html +1 -304
  250. package/docs/variables/singleAssetPoolCoinMap.html +1 -229
  251. package/docs/variables/stableCoins.html +1 -207
  252. package/package.json +2 -3
@@ -1,2167 +1,9 @@
1
1
  "use strict";
2
- window.translations = {
3
- copy: "Copy",
4
- copied: "Copied!",
5
- normally_hidden:
6
- "This member is normally hidden due to your filter settings.",
7
- };
8
- ("use strict");
9
- (() => {
10
- var Pe = Object.create;
11
- var ie = Object.defineProperty;
12
- var Oe = Object.getOwnPropertyDescriptor;
13
- var _e = Object.getOwnPropertyNames;
14
- var Re = Object.getPrototypeOf,
15
- Me = Object.prototype.hasOwnProperty;
16
- var Fe = (t, e) => () => (
17
- e || t((e = { exports: {} }).exports, e), e.exports
18
- );
19
- var De = (t, e, n, r) => {
20
- if ((e && typeof e == "object") || typeof e == "function")
21
- for (let i of _e(e))
22
- !Me.call(t, i) &&
23
- i !== n &&
24
- ie(t, i, {
25
- get: () => e[i],
26
- enumerable: !(r = Oe(e, i)) || r.enumerable,
27
- });
28
- return t;
29
- };
30
- var Ae = (t, e, n) => (
31
- (n = t != null ? Pe(Re(t)) : {}),
32
- De(
33
- e || !t || !t.__esModule
34
- ? ie(n, "default", { value: t, enumerable: !0 })
35
- : n,
36
- t,
37
- )
38
- );
39
- var ue = Fe((ae, le) => {
40
- (function () {
41
- var t = function (e) {
42
- var n = new t.Builder();
43
- return (
44
- n.pipeline.add(t.trimmer, t.stopWordFilter, t.stemmer),
45
- n.searchPipeline.add(t.stemmer),
46
- e.call(n, n),
47
- n.build()
48
- );
49
- };
50
- t.version = "2.3.9";
51
- (t.utils = {}),
52
- (t.utils.warn = (function (e) {
53
- return function (n) {
54
- e.console && console.warn && console.warn(n);
55
- };
56
- })(this)),
57
- (t.utils.asString = function (e) {
58
- return e == null ? "" : e.toString();
59
- }),
60
- (t.utils.clone = function (e) {
61
- if (e == null) return e;
62
- for (
63
- var n = Object.create(null), r = Object.keys(e), i = 0;
64
- i < r.length;
65
- i++
66
- ) {
67
- var s = r[i],
68
- o = e[s];
69
- if (Array.isArray(o)) {
70
- n[s] = o.slice();
71
- continue;
72
- }
73
- if (
74
- typeof o == "string" ||
75
- typeof o == "number" ||
76
- typeof o == "boolean"
77
- ) {
78
- n[s] = o;
79
- continue;
80
- }
81
- throw new TypeError(
82
- "clone is not deep and does not support nested objects",
83
- );
84
- }
85
- return n;
86
- }),
87
- (t.FieldRef = function (e, n, r) {
88
- (this.docRef = e), (this.fieldName = n), (this._stringValue = r);
89
- }),
90
- (t.FieldRef.joiner = "/"),
91
- (t.FieldRef.fromString = function (e) {
92
- var n = e.indexOf(t.FieldRef.joiner);
93
- if (n === -1) throw "malformed field ref string";
94
- var r = e.slice(0, n),
95
- i = e.slice(n + 1);
96
- return new t.FieldRef(i, r, e);
97
- }),
98
- (t.FieldRef.prototype.toString = function () {
99
- return (
100
- this._stringValue == null &&
101
- (this._stringValue =
102
- this.fieldName + t.FieldRef.joiner + this.docRef),
103
- this._stringValue
104
- );
105
- });
106
- (t.Set = function (e) {
107
- if (((this.elements = Object.create(null)), e)) {
108
- this.length = e.length;
109
- for (var n = 0; n < this.length; n++) this.elements[e[n]] = !0;
110
- } else this.length = 0;
111
- }),
112
- (t.Set.complete = {
113
- intersect: function (e) {
114
- return e;
115
- },
116
- union: function () {
117
- return this;
118
- },
119
- contains: function () {
120
- return !0;
121
- },
122
- }),
123
- (t.Set.empty = {
124
- intersect: function () {
125
- return this;
126
- },
127
- union: function (e) {
128
- return e;
129
- },
130
- contains: function () {
131
- return !1;
132
- },
133
- }),
134
- (t.Set.prototype.contains = function (e) {
135
- return !!this.elements[e];
136
- }),
137
- (t.Set.prototype.intersect = function (e) {
138
- var n,
139
- r,
140
- i,
141
- s = [];
142
- if (e === t.Set.complete) return this;
143
- if (e === t.Set.empty) return e;
144
- this.length < e.length
145
- ? ((n = this), (r = e))
146
- : ((n = e), (r = this)),
147
- (i = Object.keys(n.elements));
148
- for (var o = 0; o < i.length; o++) {
149
- var a = i[o];
150
- a in r.elements && s.push(a);
151
- }
152
- return new t.Set(s);
153
- }),
154
- (t.Set.prototype.union = function (e) {
155
- return e === t.Set.complete
156
- ? t.Set.complete
157
- : e === t.Set.empty
158
- ? this
159
- : new t.Set(
160
- Object.keys(this.elements).concat(Object.keys(e.elements)),
161
- );
162
- }),
163
- (t.idf = function (e, n) {
164
- var r = 0;
165
- for (var i in e) i != "_index" && (r += Object.keys(e[i]).length);
166
- var s = (n - r + 0.5) / (r + 0.5);
167
- return Math.log(1 + Math.abs(s));
168
- }),
169
- (t.Token = function (e, n) {
170
- (this.str = e || ""), (this.metadata = n || {});
171
- }),
172
- (t.Token.prototype.toString = function () {
173
- return this.str;
174
- }),
175
- (t.Token.prototype.update = function (e) {
176
- return (this.str = e(this.str, this.metadata)), this;
177
- }),
178
- (t.Token.prototype.clone = function (e) {
179
- return (
180
- (e =
181
- e ||
182
- function (n) {
183
- return n;
184
- }),
185
- new t.Token(e(this.str, this.metadata), this.metadata)
186
- );
187
- });
188
- (t.tokenizer = function (e, n) {
189
- if (e == null || e == null) return [];
190
- if (Array.isArray(e))
191
- return e.map(function (m) {
192
- return new t.Token(
193
- t.utils.asString(m).toLowerCase(),
194
- t.utils.clone(n),
195
- );
196
- });
197
- for (
198
- var r = e.toString().toLowerCase(),
199
- i = r.length,
200
- s = [],
201
- o = 0,
202
- a = 0;
203
- o <= i;
204
- o++
205
- ) {
206
- var l = r.charAt(o),
207
- u = o - a;
208
- if (l.match(t.tokenizer.separator) || o == i) {
209
- if (u > 0) {
210
- var d = t.utils.clone(n) || {};
211
- (d.position = [a, u]),
212
- (d.index = s.length),
213
- s.push(new t.Token(r.slice(a, o), d));
214
- }
215
- a = o + 1;
216
- }
217
- }
218
- return s;
219
- }),
220
- (t.tokenizer.separator = /[\s\-]+/);
221
- (t.Pipeline = function () {
222
- this._stack = [];
223
- }),
224
- (t.Pipeline.registeredFunctions = Object.create(null)),
225
- (t.Pipeline.registerFunction = function (e, n) {
226
- n in this.registeredFunctions &&
227
- t.utils.warn("Overwriting existing registered function: " + n),
228
- (e.label = n),
229
- (t.Pipeline.registeredFunctions[e.label] = e);
230
- }),
231
- (t.Pipeline.warnIfFunctionNotRegistered = function (e) {
232
- var n = e.label && e.label in this.registeredFunctions;
233
- n ||
234
- t.utils.warn(
235
- `Function is not registered with pipeline. This may cause problems when serialising the index.
236
- `,
237
- e,
238
- );
239
- }),
240
- (t.Pipeline.load = function (e) {
241
- var n = new t.Pipeline();
242
- return (
243
- e.forEach(function (r) {
244
- var i = t.Pipeline.registeredFunctions[r];
245
- if (i) n.add(i);
246
- else throw new Error("Cannot load unregistered function: " + r);
247
- }),
248
- n
249
- );
250
- }),
251
- (t.Pipeline.prototype.add = function () {
252
- var e = Array.prototype.slice.call(arguments);
253
- e.forEach(function (n) {
254
- t.Pipeline.warnIfFunctionNotRegistered(n), this._stack.push(n);
255
- }, this);
256
- }),
257
- (t.Pipeline.prototype.after = function (e, n) {
258
- t.Pipeline.warnIfFunctionNotRegistered(n);
259
- var r = this._stack.indexOf(e);
260
- if (r == -1) throw new Error("Cannot find existingFn");
261
- (r = r + 1), this._stack.splice(r, 0, n);
262
- }),
263
- (t.Pipeline.prototype.before = function (e, n) {
264
- t.Pipeline.warnIfFunctionNotRegistered(n);
265
- var r = this._stack.indexOf(e);
266
- if (r == -1) throw new Error("Cannot find existingFn");
267
- this._stack.splice(r, 0, n);
268
- }),
269
- (t.Pipeline.prototype.remove = function (e) {
270
- var n = this._stack.indexOf(e);
271
- n != -1 && this._stack.splice(n, 1);
272
- }),
273
- (t.Pipeline.prototype.run = function (e) {
274
- for (var n = this._stack.length, r = 0; r < n; r++) {
275
- for (var i = this._stack[r], s = [], o = 0; o < e.length; o++) {
276
- var a = i(e[o], o, e);
277
- if (!(a == null || a === ""))
278
- if (Array.isArray(a))
279
- for (var l = 0; l < a.length; l++) s.push(a[l]);
280
- else s.push(a);
281
- }
282
- e = s;
283
- }
284
- return e;
285
- }),
286
- (t.Pipeline.prototype.runString = function (e, n) {
287
- var r = new t.Token(e, n);
288
- return this.run([r]).map(function (i) {
289
- return i.toString();
290
- });
291
- }),
292
- (t.Pipeline.prototype.reset = function () {
293
- this._stack = [];
294
- }),
295
- (t.Pipeline.prototype.toJSON = function () {
296
- return this._stack.map(function (e) {
297
- return t.Pipeline.warnIfFunctionNotRegistered(e), e.label;
298
- });
299
- });
300
- (t.Vector = function (e) {
301
- (this._magnitude = 0), (this.elements = e || []);
302
- }),
303
- (t.Vector.prototype.positionForIndex = function (e) {
304
- if (this.elements.length == 0) return 0;
305
- for (
306
- var n = 0,
307
- r = this.elements.length / 2,
308
- i = r - n,
309
- s = Math.floor(i / 2),
310
- o = this.elements[s * 2];
311
- i > 1 && (o < e && (n = s), o > e && (r = s), o != e);
312
-
313
- )
314
- (i = r - n),
315
- (s = n + Math.floor(i / 2)),
316
- (o = this.elements[s * 2]);
317
- if (o == e || o > e) return s * 2;
318
- if (o < e) return (s + 1) * 2;
319
- }),
320
- (t.Vector.prototype.insert = function (e, n) {
321
- this.upsert(e, n, function () {
322
- throw "duplicate index";
323
- });
324
- }),
325
- (t.Vector.prototype.upsert = function (e, n, r) {
326
- this._magnitude = 0;
327
- var i = this.positionForIndex(e);
328
- this.elements[i] == e
329
- ? (this.elements[i + 1] = r(this.elements[i + 1], n))
330
- : this.elements.splice(i, 0, e, n);
331
- }),
332
- (t.Vector.prototype.magnitude = function () {
333
- if (this._magnitude) return this._magnitude;
334
- for (var e = 0, n = this.elements.length, r = 1; r < n; r += 2) {
335
- var i = this.elements[r];
336
- e += i * i;
337
- }
338
- return (this._magnitude = Math.sqrt(e));
339
- }),
340
- (t.Vector.prototype.dot = function (e) {
341
- for (
342
- var n = 0,
343
- r = this.elements,
344
- i = e.elements,
345
- s = r.length,
346
- o = i.length,
347
- a = 0,
348
- l = 0,
349
- u = 0,
350
- d = 0;
351
- u < s && d < o;
352
-
353
- )
354
- (a = r[u]),
355
- (l = i[d]),
356
- a < l
357
- ? (u += 2)
358
- : a > l
359
- ? (d += 2)
360
- : a == l && ((n += r[u + 1] * i[d + 1]), (u += 2), (d += 2));
361
- return n;
362
- }),
363
- (t.Vector.prototype.similarity = function (e) {
364
- return this.dot(e) / this.magnitude() || 0;
365
- }),
366
- (t.Vector.prototype.toArray = function () {
367
- for (
368
- var e = new Array(this.elements.length / 2), n = 1, r = 0;
369
- n < this.elements.length;
370
- n += 2, r++
371
- )
372
- e[r] = this.elements[n];
373
- return e;
374
- }),
375
- (t.Vector.prototype.toJSON = function () {
376
- return this.elements;
377
- });
378
- (t.stemmer = (function () {
379
- var e = {
380
- ational: "ate",
381
- tional: "tion",
382
- enci: "ence",
383
- anci: "ance",
384
- izer: "ize",
385
- bli: "ble",
386
- alli: "al",
387
- entli: "ent",
388
- eli: "e",
389
- ousli: "ous",
390
- ization: "ize",
391
- ation: "ate",
392
- ator: "ate",
393
- alism: "al",
394
- iveness: "ive",
395
- fulness: "ful",
396
- ousness: "ous",
397
- aliti: "al",
398
- iviti: "ive",
399
- biliti: "ble",
400
- logi: "log",
401
- },
402
- n = {
403
- icate: "ic",
404
- ative: "",
405
- alize: "al",
406
- iciti: "ic",
407
- ical: "ic",
408
- ful: "",
409
- ness: "",
410
- },
411
- r = "[^aeiou]",
412
- i = "[aeiouy]",
413
- s = r + "[^aeiouy]*",
414
- o = i + "[aeiou]*",
415
- a = "^(" + s + ")?" + o + s,
416
- l = "^(" + s + ")?" + o + s + "(" + o + ")?$",
417
- u = "^(" + s + ")?" + o + s + o + s,
418
- d = "^(" + s + ")?" + i,
419
- m = new RegExp(a),
420
- p = new RegExp(u),
421
- b = new RegExp(l),
422
- g = new RegExp(d),
423
- L = /^(.+?)(ss|i)es$/,
424
- f = /^(.+?)([^s])s$/,
425
- y = /^(.+?)eed$/,
426
- S = /^(.+?)(ed|ing)$/,
427
- w = /.$/,
428
- k = /(at|bl|iz)$/,
429
- _ = new RegExp("([^aeiouylsz])\\1$"),
430
- B = new RegExp("^" + s + i + "[^aeiouwxy]$"),
431
- A = /^(.+?[^aeiou])y$/,
432
- j =
433
- /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,
434
- q = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,
435
- V =
436
- /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,
437
- $ = /^(.+?)(s|t)(ion)$/,
438
- C = /^(.+?)e$/,
439
- z = /ll$/,
440
- W = new RegExp("^" + s + i + "[^aeiouwxy]$"),
441
- H = function (c) {
442
- var v, P, T, h, x, O, M;
443
- if (c.length < 3) return c;
444
- if (
445
- ((T = c.substr(0, 1)),
446
- T == "y" && (c = T.toUpperCase() + c.substr(1)),
447
- (h = L),
448
- (x = f),
449
- h.test(c)
450
- ? (c = c.replace(h, "$1$2"))
451
- : x.test(c) && (c = c.replace(x, "$1$2")),
452
- (h = y),
453
- (x = S),
454
- h.test(c))
455
- ) {
456
- var E = h.exec(c);
457
- (h = m), h.test(E[1]) && ((h = w), (c = c.replace(h, "")));
458
- } else if (x.test(c)) {
459
- var E = x.exec(c);
460
- (v = E[1]),
461
- (x = g),
462
- x.test(v) &&
463
- ((c = v),
464
- (x = k),
465
- (O = _),
466
- (M = B),
467
- x.test(c)
468
- ? (c = c + "e")
469
- : O.test(c)
470
- ? ((h = w), (c = c.replace(h, "")))
471
- : M.test(c) && (c = c + "e"));
472
- }
473
- if (((h = A), h.test(c))) {
474
- var E = h.exec(c);
475
- (v = E[1]), (c = v + "i");
476
- }
477
- if (((h = j), h.test(c))) {
478
- var E = h.exec(c);
479
- (v = E[1]), (P = E[2]), (h = m), h.test(v) && (c = v + e[P]);
480
- }
481
- if (((h = q), h.test(c))) {
482
- var E = h.exec(c);
483
- (v = E[1]), (P = E[2]), (h = m), h.test(v) && (c = v + n[P]);
484
- }
485
- if (((h = V), (x = $), h.test(c))) {
486
- var E = h.exec(c);
487
- (v = E[1]), (h = p), h.test(v) && (c = v);
488
- } else if (x.test(c)) {
489
- var E = x.exec(c);
490
- (v = E[1] + E[2]), (x = p), x.test(v) && (c = v);
491
- }
492
- if (((h = C), h.test(c))) {
493
- var E = h.exec(c);
494
- (v = E[1]),
495
- (h = p),
496
- (x = b),
497
- (O = W),
498
- (h.test(v) || (x.test(v) && !O.test(v))) && (c = v);
499
- }
500
- return (
501
- (h = z),
502
- (x = p),
503
- h.test(c) && x.test(c) && ((h = w), (c = c.replace(h, ""))),
504
- T == "y" && (c = T.toLowerCase() + c.substr(1)),
505
- c
506
- );
507
- };
508
- return function (R) {
509
- return R.update(H);
510
- };
511
- })()),
512
- t.Pipeline.registerFunction(t.stemmer, "stemmer");
513
- (t.generateStopWordFilter = function (e) {
514
- var n = e.reduce(function (r, i) {
515
- return (r[i] = i), r;
516
- }, {});
517
- return function (r) {
518
- if (r && n[r.toString()] !== r.toString()) return r;
519
- };
520
- }),
521
- (t.stopWordFilter = t.generateStopWordFilter([
522
- "a",
523
- "able",
524
- "about",
525
- "across",
526
- "after",
527
- "all",
528
- "almost",
529
- "also",
530
- "am",
531
- "among",
532
- "an",
533
- "and",
534
- "any",
535
- "are",
536
- "as",
537
- "at",
538
- "be",
539
- "because",
540
- "been",
541
- "but",
542
- "by",
543
- "can",
544
- "cannot",
545
- "could",
546
- "dear",
547
- "did",
548
- "do",
549
- "does",
550
- "either",
551
- "else",
552
- "ever",
553
- "every",
554
- "for",
555
- "from",
556
- "get",
557
- "got",
558
- "had",
559
- "has",
560
- "have",
561
- "he",
562
- "her",
563
- "hers",
564
- "him",
565
- "his",
566
- "how",
567
- "however",
568
- "i",
569
- "if",
570
- "in",
571
- "into",
572
- "is",
573
- "it",
574
- "its",
575
- "just",
576
- "least",
577
- "let",
578
- "like",
579
- "likely",
580
- "may",
581
- "me",
582
- "might",
583
- "most",
584
- "must",
585
- "my",
586
- "neither",
587
- "no",
588
- "nor",
589
- "not",
590
- "of",
591
- "off",
592
- "often",
593
- "on",
594
- "only",
595
- "or",
596
- "other",
597
- "our",
598
- "own",
599
- "rather",
600
- "said",
601
- "say",
602
- "says",
603
- "she",
604
- "should",
605
- "since",
606
- "so",
607
- "some",
608
- "than",
609
- "that",
610
- "the",
611
- "their",
612
- "them",
613
- "then",
614
- "there",
615
- "these",
616
- "they",
617
- "this",
618
- "tis",
619
- "to",
620
- "too",
621
- "twas",
622
- "us",
623
- "wants",
624
- "was",
625
- "we",
626
- "were",
627
- "what",
628
- "when",
629
- "where",
630
- "which",
631
- "while",
632
- "who",
633
- "whom",
634
- "why",
635
- "will",
636
- "with",
637
- "would",
638
- "yet",
639
- "you",
640
- "your",
641
- ])),
642
- t.Pipeline.registerFunction(t.stopWordFilter, "stopWordFilter");
643
- (t.trimmer = function (e) {
644
- return e.update(function (n) {
645
- return n.replace(/^\W+/, "").replace(/\W+$/, "");
646
- });
647
- }),
648
- t.Pipeline.registerFunction(t.trimmer, "trimmer");
649
- (t.TokenSet = function () {
650
- (this.final = !1),
651
- (this.edges = {}),
652
- (this.id = t.TokenSet._nextId),
653
- (t.TokenSet._nextId += 1);
654
- }),
655
- (t.TokenSet._nextId = 1),
656
- (t.TokenSet.fromArray = function (e) {
657
- for (
658
- var n = new t.TokenSet.Builder(), r = 0, i = e.length;
659
- r < i;
660
- r++
661
- )
662
- n.insert(e[r]);
663
- return n.finish(), n.root;
664
- }),
665
- (t.TokenSet.fromClause = function (e) {
666
- return "editDistance" in e
667
- ? t.TokenSet.fromFuzzyString(e.term, e.editDistance)
668
- : t.TokenSet.fromString(e.term);
669
- }),
670
- (t.TokenSet.fromFuzzyString = function (e, n) {
671
- for (
672
- var r = new t.TokenSet(),
673
- i = [{ node: r, editsRemaining: n, str: e }];
674
- i.length;
675
-
676
- ) {
677
- var s = i.pop();
678
- if (s.str.length > 0) {
679
- var o = s.str.charAt(0),
680
- a;
681
- o in s.node.edges
682
- ? (a = s.node.edges[o])
683
- : ((a = new t.TokenSet()), (s.node.edges[o] = a)),
684
- s.str.length == 1 && (a.final = !0),
685
- i.push({
686
- node: a,
687
- editsRemaining: s.editsRemaining,
688
- str: s.str.slice(1),
689
- });
690
- }
691
- if (s.editsRemaining != 0) {
692
- if ("*" in s.node.edges) var l = s.node.edges["*"];
693
- else {
694
- var l = new t.TokenSet();
695
- s.node.edges["*"] = l;
696
- }
697
- if (
698
- (s.str.length == 0 && (l.final = !0),
699
- i.push({
700
- node: l,
701
- editsRemaining: s.editsRemaining - 1,
702
- str: s.str,
703
- }),
704
- s.str.length > 1 &&
705
- i.push({
706
- node: s.node,
707
- editsRemaining: s.editsRemaining - 1,
708
- str: s.str.slice(1),
709
- }),
710
- s.str.length == 1 && (s.node.final = !0),
711
- s.str.length >= 1)
712
- ) {
713
- if ("*" in s.node.edges) var u = s.node.edges["*"];
714
- else {
715
- var u = new t.TokenSet();
716
- s.node.edges["*"] = u;
717
- }
718
- s.str.length == 1 && (u.final = !0),
719
- i.push({
720
- node: u,
721
- editsRemaining: s.editsRemaining - 1,
722
- str: s.str.slice(1),
723
- });
724
- }
725
- if (s.str.length > 1) {
726
- var d = s.str.charAt(0),
727
- m = s.str.charAt(1),
728
- p;
729
- m in s.node.edges
730
- ? (p = s.node.edges[m])
731
- : ((p = new t.TokenSet()), (s.node.edges[m] = p)),
732
- s.str.length == 1 && (p.final = !0),
733
- i.push({
734
- node: p,
735
- editsRemaining: s.editsRemaining - 1,
736
- str: d + s.str.slice(2),
737
- });
738
- }
739
- }
740
- }
741
- return r;
742
- }),
743
- (t.TokenSet.fromString = function (e) {
744
- for (
745
- var n = new t.TokenSet(), r = n, i = 0, s = e.length;
746
- i < s;
747
- i++
748
- ) {
749
- var o = e[i],
750
- a = i == s - 1;
751
- if (o == "*") (n.edges[o] = n), (n.final = a);
752
- else {
753
- var l = new t.TokenSet();
754
- (l.final = a), (n.edges[o] = l), (n = l);
755
- }
756
- }
757
- return r;
758
- }),
759
- (t.TokenSet.prototype.toArray = function () {
760
- for (var e = [], n = [{ prefix: "", node: this }]; n.length; ) {
761
- var r = n.pop(),
762
- i = Object.keys(r.node.edges),
763
- s = i.length;
764
- r.node.final && (r.prefix.charAt(0), e.push(r.prefix));
765
- for (var o = 0; o < s; o++) {
766
- var a = i[o];
767
- n.push({ prefix: r.prefix.concat(a), node: r.node.edges[a] });
768
- }
769
- }
770
- return e;
771
- }),
772
- (t.TokenSet.prototype.toString = function () {
773
- if (this._str) return this._str;
774
- for (
775
- var e = this.final ? "1" : "0",
776
- n = Object.keys(this.edges).sort(),
777
- r = n.length,
778
- i = 0;
779
- i < r;
780
- i++
781
- ) {
782
- var s = n[i],
783
- o = this.edges[s];
784
- e = e + s + o.id;
785
- }
786
- return e;
787
- }),
788
- (t.TokenSet.prototype.intersect = function (e) {
789
- for (
790
- var n = new t.TokenSet(),
791
- r = void 0,
792
- i = [{ qNode: e, output: n, node: this }];
793
- i.length;
794
-
795
- ) {
796
- r = i.pop();
797
- for (
798
- var s = Object.keys(r.qNode.edges),
799
- o = s.length,
800
- a = Object.keys(r.node.edges),
801
- l = a.length,
802
- u = 0;
803
- u < o;
804
- u++
805
- )
806
- for (var d = s[u], m = 0; m < l; m++) {
807
- var p = a[m];
808
- if (p == d || d == "*") {
809
- var b = r.node.edges[p],
810
- g = r.qNode.edges[d],
811
- L = b.final && g.final,
812
- f = void 0;
813
- p in r.output.edges
814
- ? ((f = r.output.edges[p]), (f.final = f.final || L))
815
- : ((f = new t.TokenSet()),
816
- (f.final = L),
817
- (r.output.edges[p] = f)),
818
- i.push({ qNode: g, output: f, node: b });
819
- }
820
- }
821
- }
822
- return n;
823
- }),
824
- (t.TokenSet.Builder = function () {
825
- (this.previousWord = ""),
826
- (this.root = new t.TokenSet()),
827
- (this.uncheckedNodes = []),
828
- (this.minimizedNodes = {});
829
- }),
830
- (t.TokenSet.Builder.prototype.insert = function (e) {
831
- var n,
832
- r = 0;
833
- if (e < this.previousWord)
834
- throw new Error("Out of order word insertion");
835
- for (
836
- var i = 0;
837
- i < e.length &&
838
- i < this.previousWord.length &&
839
- e[i] == this.previousWord[i];
840
- i++
841
- )
842
- r++;
843
- this.minimize(r),
844
- this.uncheckedNodes.length == 0
845
- ? (n = this.root)
846
- : (n = this.uncheckedNodes[this.uncheckedNodes.length - 1].child);
847
- for (var i = r; i < e.length; i++) {
848
- var s = new t.TokenSet(),
849
- o = e[i];
850
- (n.edges[o] = s),
851
- this.uncheckedNodes.push({ parent: n, char: o, child: s }),
852
- (n = s);
853
- }
854
- (n.final = !0), (this.previousWord = e);
855
- }),
856
- (t.TokenSet.Builder.prototype.finish = function () {
857
- this.minimize(0);
858
- }),
859
- (t.TokenSet.Builder.prototype.minimize = function (e) {
860
- for (var n = this.uncheckedNodes.length - 1; n >= e; n--) {
861
- var r = this.uncheckedNodes[n],
862
- i = r.child.toString();
863
- i in this.minimizedNodes
864
- ? (r.parent.edges[r.char] = this.minimizedNodes[i])
865
- : ((r.child._str = i), (this.minimizedNodes[i] = r.child)),
866
- this.uncheckedNodes.pop();
867
- }
868
- });
869
- (t.Index = function (e) {
870
- (this.invertedIndex = e.invertedIndex),
871
- (this.fieldVectors = e.fieldVectors),
872
- (this.tokenSet = e.tokenSet),
873
- (this.fields = e.fields),
874
- (this.pipeline = e.pipeline);
875
- }),
876
- (t.Index.prototype.search = function (e) {
877
- return this.query(function (n) {
878
- var r = new t.QueryParser(e, n);
879
- r.parse();
880
- });
881
- }),
882
- (t.Index.prototype.query = function (e) {
883
- for (
884
- var n = new t.Query(this.fields),
885
- r = Object.create(null),
886
- i = Object.create(null),
887
- s = Object.create(null),
888
- o = Object.create(null),
889
- a = Object.create(null),
890
- l = 0;
891
- l < this.fields.length;
892
- l++
893
- )
894
- i[this.fields[l]] = new t.Vector();
895
- e.call(n, n);
896
- for (var l = 0; l < n.clauses.length; l++) {
897
- var u = n.clauses[l],
898
- d = null,
899
- m = t.Set.empty;
900
- u.usePipeline
901
- ? (d = this.pipeline.runString(u.term, { fields: u.fields }))
902
- : (d = [u.term]);
903
- for (var p = 0; p < d.length; p++) {
904
- var b = d[p];
905
- u.term = b;
906
- var g = t.TokenSet.fromClause(u),
907
- L = this.tokenSet.intersect(g).toArray();
908
- if (L.length === 0 && u.presence === t.Query.presence.REQUIRED) {
909
- for (var f = 0; f < u.fields.length; f++) {
910
- var y = u.fields[f];
911
- o[y] = t.Set.empty;
912
- }
913
- break;
914
- }
915
- for (var S = 0; S < L.length; S++)
916
- for (
917
- var w = L[S], k = this.invertedIndex[w], _ = k._index, f = 0;
918
- f < u.fields.length;
919
- f++
920
- ) {
921
- var y = u.fields[f],
922
- B = k[y],
923
- A = Object.keys(B),
924
- j = w + "/" + y,
925
- q = new t.Set(A);
926
- if (
927
- (u.presence == t.Query.presence.REQUIRED &&
928
- ((m = m.union(q)),
929
- o[y] === void 0 && (o[y] = t.Set.complete)),
930
- u.presence == t.Query.presence.PROHIBITED)
931
- ) {
932
- a[y] === void 0 && (a[y] = t.Set.empty),
933
- (a[y] = a[y].union(q));
934
- continue;
935
- }
936
- if (
937
- (i[y].upsert(_, u.boost, function (Ie, Ce) {
938
- return Ie + Ce;
939
- }),
940
- !s[j])
941
- ) {
942
- for (var V = 0; V < A.length; V++) {
943
- var $ = A[V],
944
- C = new t.FieldRef($, y),
945
- z = B[$],
946
- W;
947
- (W = r[C]) === void 0
948
- ? (r[C] = new t.MatchData(w, y, z))
949
- : W.add(w, y, z);
950
- }
951
- s[j] = !0;
952
- }
953
- }
954
- }
955
- if (u.presence === t.Query.presence.REQUIRED)
956
- for (var f = 0; f < u.fields.length; f++) {
957
- var y = u.fields[f];
958
- o[y] = o[y].intersect(m);
959
- }
960
- }
961
- for (
962
- var H = t.Set.complete, R = t.Set.empty, l = 0;
963
- l < this.fields.length;
964
- l++
965
- ) {
966
- var y = this.fields[l];
967
- o[y] && (H = H.intersect(o[y])), a[y] && (R = R.union(a[y]));
968
- }
969
- var c = Object.keys(r),
970
- v = [],
971
- P = Object.create(null);
972
- if (n.isNegated()) {
973
- c = Object.keys(this.fieldVectors);
974
- for (var l = 0; l < c.length; l++) {
975
- var C = c[l],
976
- T = t.FieldRef.fromString(C);
977
- r[C] = new t.MatchData();
978
- }
979
- }
980
- for (var l = 0; l < c.length; l++) {
981
- var T = t.FieldRef.fromString(c[l]),
982
- h = T.docRef;
983
- if (H.contains(h) && !R.contains(h)) {
984
- var x = this.fieldVectors[T],
985
- O = i[T.fieldName].similarity(x),
986
- M;
987
- if ((M = P[h]) !== void 0)
988
- (M.score += O), M.matchData.combine(r[T]);
989
- else {
990
- var E = { ref: h, score: O, matchData: r[T] };
991
- (P[h] = E), v.push(E);
992
- }
993
- }
994
- }
995
- return v.sort(function (ke, Qe) {
996
- return Qe.score - ke.score;
997
- });
998
- }),
999
- (t.Index.prototype.toJSON = function () {
1000
- var e = Object.keys(this.invertedIndex)
1001
- .sort()
1002
- .map(function (r) {
1003
- return [r, this.invertedIndex[r]];
1004
- }, this),
1005
- n = Object.keys(this.fieldVectors).map(function (r) {
1006
- return [r, this.fieldVectors[r].toJSON()];
1007
- }, this);
1008
- return {
1009
- version: t.version,
1010
- fields: this.fields,
1011
- fieldVectors: n,
1012
- invertedIndex: e,
1013
- pipeline: this.pipeline.toJSON(),
1014
- };
1015
- }),
1016
- (t.Index.load = function (e) {
1017
- var n = {},
1018
- r = {},
1019
- i = e.fieldVectors,
1020
- s = Object.create(null),
1021
- o = e.invertedIndex,
1022
- a = new t.TokenSet.Builder(),
1023
- l = t.Pipeline.load(e.pipeline);
1024
- e.version != t.version &&
1025
- t.utils.warn(
1026
- "Version mismatch when loading serialised index. Current version of lunr '" +
1027
- t.version +
1028
- "' does not match serialized index '" +
1029
- e.version +
1030
- "'",
1031
- );
1032
- for (var u = 0; u < i.length; u++) {
1033
- var d = i[u],
1034
- m = d[0],
1035
- p = d[1];
1036
- r[m] = new t.Vector(p);
1037
- }
1038
- for (var u = 0; u < o.length; u++) {
1039
- var d = o[u],
1040
- b = d[0],
1041
- g = d[1];
1042
- a.insert(b), (s[b] = g);
1043
- }
1044
- return (
1045
- a.finish(),
1046
- (n.fields = e.fields),
1047
- (n.fieldVectors = r),
1048
- (n.invertedIndex = s),
1049
- (n.tokenSet = a.root),
1050
- (n.pipeline = l),
1051
- new t.Index(n)
1052
- );
1053
- });
1054
- (t.Builder = function () {
1055
- (this._ref = "id"),
1056
- (this._fields = Object.create(null)),
1057
- (this._documents = Object.create(null)),
1058
- (this.invertedIndex = Object.create(null)),
1059
- (this.fieldTermFrequencies = {}),
1060
- (this.fieldLengths = {}),
1061
- (this.tokenizer = t.tokenizer),
1062
- (this.pipeline = new t.Pipeline()),
1063
- (this.searchPipeline = new t.Pipeline()),
1064
- (this.documentCount = 0),
1065
- (this._b = 0.75),
1066
- (this._k1 = 1.2),
1067
- (this.termIndex = 0),
1068
- (this.metadataWhitelist = []);
1069
- }),
1070
- (t.Builder.prototype.ref = function (e) {
1071
- this._ref = e;
1072
- }),
1073
- (t.Builder.prototype.field = function (e, n) {
1074
- if (/\//.test(e))
1075
- throw new RangeError(
1076
- "Field '" + e + "' contains illegal character '/'",
1077
- );
1078
- this._fields[e] = n || {};
1079
- }),
1080
- (t.Builder.prototype.b = function (e) {
1081
- e < 0 ? (this._b = 0) : e > 1 ? (this._b = 1) : (this._b = e);
1082
- }),
1083
- (t.Builder.prototype.k1 = function (e) {
1084
- this._k1 = e;
1085
- }),
1086
- (t.Builder.prototype.add = function (e, n) {
1087
- var r = e[this._ref],
1088
- i = Object.keys(this._fields);
1089
- (this._documents[r] = n || {}), (this.documentCount += 1);
1090
- for (var s = 0; s < i.length; s++) {
1091
- var o = i[s],
1092
- a = this._fields[o].extractor,
1093
- l = a ? a(e) : e[o],
1094
- u = this.tokenizer(l, { fields: [o] }),
1095
- d = this.pipeline.run(u),
1096
- m = new t.FieldRef(r, o),
1097
- p = Object.create(null);
1098
- (this.fieldTermFrequencies[m] = p),
1099
- (this.fieldLengths[m] = 0),
1100
- (this.fieldLengths[m] += d.length);
1101
- for (var b = 0; b < d.length; b++) {
1102
- var g = d[b];
1103
- if (
1104
- (p[g] == null && (p[g] = 0),
1105
- (p[g] += 1),
1106
- this.invertedIndex[g] == null)
1107
- ) {
1108
- var L = Object.create(null);
1109
- (L._index = this.termIndex), (this.termIndex += 1);
1110
- for (var f = 0; f < i.length; f++)
1111
- L[i[f]] = Object.create(null);
1112
- this.invertedIndex[g] = L;
1113
- }
1114
- this.invertedIndex[g][o][r] == null &&
1115
- (this.invertedIndex[g][o][r] = Object.create(null));
1116
- for (var y = 0; y < this.metadataWhitelist.length; y++) {
1117
- var S = this.metadataWhitelist[y],
1118
- w = g.metadata[S];
1119
- this.invertedIndex[g][o][r][S] == null &&
1120
- (this.invertedIndex[g][o][r][S] = []),
1121
- this.invertedIndex[g][o][r][S].push(w);
1122
- }
1123
- }
1124
- }
1125
- }),
1126
- (t.Builder.prototype.calculateAverageFieldLengths = function () {
1127
- for (
1128
- var e = Object.keys(this.fieldLengths),
1129
- n = e.length,
1130
- r = {},
1131
- i = {},
1132
- s = 0;
1133
- s < n;
1134
- s++
1135
- ) {
1136
- var o = t.FieldRef.fromString(e[s]),
1137
- a = o.fieldName;
1138
- i[a] || (i[a] = 0),
1139
- (i[a] += 1),
1140
- r[a] || (r[a] = 0),
1141
- (r[a] += this.fieldLengths[o]);
1142
- }
1143
- for (var l = Object.keys(this._fields), s = 0; s < l.length; s++) {
1144
- var u = l[s];
1145
- r[u] = r[u] / i[u];
1146
- }
1147
- this.averageFieldLength = r;
1148
- }),
1149
- (t.Builder.prototype.createFieldVectors = function () {
1150
- for (
1151
- var e = {},
1152
- n = Object.keys(this.fieldTermFrequencies),
1153
- r = n.length,
1154
- i = Object.create(null),
1155
- s = 0;
1156
- s < r;
1157
- s++
1158
- ) {
1159
- for (
1160
- var o = t.FieldRef.fromString(n[s]),
1161
- a = o.fieldName,
1162
- l = this.fieldLengths[o],
1163
- u = new t.Vector(),
1164
- d = this.fieldTermFrequencies[o],
1165
- m = Object.keys(d),
1166
- p = m.length,
1167
- b = this._fields[a].boost || 1,
1168
- g = this._documents[o.docRef].boost || 1,
1169
- L = 0;
1170
- L < p;
1171
- L++
1172
- ) {
1173
- var f = m[L],
1174
- y = d[f],
1175
- S = this.invertedIndex[f]._index,
1176
- w,
1177
- k,
1178
- _;
1179
- i[f] === void 0
1180
- ? ((w = t.idf(this.invertedIndex[f], this.documentCount)),
1181
- (i[f] = w))
1182
- : (w = i[f]),
1183
- (k =
1184
- (w * ((this._k1 + 1) * y)) /
1185
- (this._k1 *
1186
- (1 - this._b + this._b * (l / this.averageFieldLength[a])) +
1187
- y)),
1188
- (k *= b),
1189
- (k *= g),
1190
- (_ = Math.round(k * 1e3) / 1e3),
1191
- u.insert(S, _);
1192
- }
1193
- e[o] = u;
1194
- }
1195
- this.fieldVectors = e;
1196
- }),
1197
- (t.Builder.prototype.createTokenSet = function () {
1198
- this.tokenSet = t.TokenSet.fromArray(
1199
- Object.keys(this.invertedIndex).sort(),
1200
- );
1201
- }),
1202
- (t.Builder.prototype.build = function () {
1203
- return (
1204
- this.calculateAverageFieldLengths(),
1205
- this.createFieldVectors(),
1206
- this.createTokenSet(),
1207
- new t.Index({
1208
- invertedIndex: this.invertedIndex,
1209
- fieldVectors: this.fieldVectors,
1210
- tokenSet: this.tokenSet,
1211
- fields: Object.keys(this._fields),
1212
- pipeline: this.searchPipeline,
1213
- })
1214
- );
1215
- }),
1216
- (t.Builder.prototype.use = function (e) {
1217
- var n = Array.prototype.slice.call(arguments, 1);
1218
- n.unshift(this), e.apply(this, n);
1219
- }),
1220
- (t.MatchData = function (e, n, r) {
1221
- for (
1222
- var i = Object.create(null), s = Object.keys(r || {}), o = 0;
1223
- o < s.length;
1224
- o++
1225
- ) {
1226
- var a = s[o];
1227
- i[a] = r[a].slice();
1228
- }
1229
- (this.metadata = Object.create(null)),
1230
- e !== void 0 &&
1231
- ((this.metadata[e] = Object.create(null)),
1232
- (this.metadata[e][n] = i));
1233
- }),
1234
- (t.MatchData.prototype.combine = function (e) {
1235
- for (var n = Object.keys(e.metadata), r = 0; r < n.length; r++) {
1236
- var i = n[r],
1237
- s = Object.keys(e.metadata[i]);
1238
- this.metadata[i] == null &&
1239
- (this.metadata[i] = Object.create(null));
1240
- for (var o = 0; o < s.length; o++) {
1241
- var a = s[o],
1242
- l = Object.keys(e.metadata[i][a]);
1243
- this.metadata[i][a] == null &&
1244
- (this.metadata[i][a] = Object.create(null));
1245
- for (var u = 0; u < l.length; u++) {
1246
- var d = l[u];
1247
- this.metadata[i][a][d] == null
1248
- ? (this.metadata[i][a][d] = e.metadata[i][a][d])
1249
- : (this.metadata[i][a][d] = this.metadata[i][a][d].concat(
1250
- e.metadata[i][a][d],
1251
- ));
1252
- }
1253
- }
1254
- }
1255
- }),
1256
- (t.MatchData.prototype.add = function (e, n, r) {
1257
- if (!(e in this.metadata)) {
1258
- (this.metadata[e] = Object.create(null)), (this.metadata[e][n] = r);
1259
- return;
1260
- }
1261
- if (!(n in this.metadata[e])) {
1262
- this.metadata[e][n] = r;
1263
- return;
1264
- }
1265
- for (var i = Object.keys(r), s = 0; s < i.length; s++) {
1266
- var o = i[s];
1267
- o in this.metadata[e][n]
1268
- ? (this.metadata[e][n][o] = this.metadata[e][n][o].concat(r[o]))
1269
- : (this.metadata[e][n][o] = r[o]);
1270
- }
1271
- }),
1272
- (t.Query = function (e) {
1273
- (this.clauses = []), (this.allFields = e);
1274
- }),
1275
- (t.Query.wildcard = new String("*")),
1276
- (t.Query.wildcard.NONE = 0),
1277
- (t.Query.wildcard.LEADING = 1),
1278
- (t.Query.wildcard.TRAILING = 2),
1279
- (t.Query.presence = { OPTIONAL: 1, REQUIRED: 2, PROHIBITED: 3 }),
1280
- (t.Query.prototype.clause = function (e) {
1281
- return (
1282
- "fields" in e || (e.fields = this.allFields),
1283
- "boost" in e || (e.boost = 1),
1284
- "usePipeline" in e || (e.usePipeline = !0),
1285
- "wildcard" in e || (e.wildcard = t.Query.wildcard.NONE),
1286
- e.wildcard & t.Query.wildcard.LEADING &&
1287
- e.term.charAt(0) != t.Query.wildcard &&
1288
- (e.term = "*" + e.term),
1289
- e.wildcard & t.Query.wildcard.TRAILING &&
1290
- e.term.slice(-1) != t.Query.wildcard &&
1291
- (e.term = "" + e.term + "*"),
1292
- "presence" in e || (e.presence = t.Query.presence.OPTIONAL),
1293
- this.clauses.push(e),
1294
- this
1295
- );
1296
- }),
1297
- (t.Query.prototype.isNegated = function () {
1298
- for (var e = 0; e < this.clauses.length; e++)
1299
- if (this.clauses[e].presence != t.Query.presence.PROHIBITED)
1300
- return !1;
1301
- return !0;
1302
- }),
1303
- (t.Query.prototype.term = function (e, n) {
1304
- if (Array.isArray(e))
1305
- return (
1306
- e.forEach(function (i) {
1307
- this.term(i, t.utils.clone(n));
1308
- }, this),
1309
- this
1310
- );
1311
- var r = n || {};
1312
- return (r.term = e.toString()), this.clause(r), this;
1313
- }),
1314
- (t.QueryParseError = function (e, n, r) {
1315
- (this.name = "QueryParseError"),
1316
- (this.message = e),
1317
- (this.start = n),
1318
- (this.end = r);
1319
- }),
1320
- (t.QueryParseError.prototype = new Error()),
1321
- (t.QueryLexer = function (e) {
1322
- (this.lexemes = []),
1323
- (this.str = e),
1324
- (this.length = e.length),
1325
- (this.pos = 0),
1326
- (this.start = 0),
1327
- (this.escapeCharPositions = []);
1328
- }),
1329
- (t.QueryLexer.prototype.run = function () {
1330
- for (var e = t.QueryLexer.lexText; e; ) e = e(this);
1331
- }),
1332
- (t.QueryLexer.prototype.sliceString = function () {
1333
- for (
1334
- var e = [], n = this.start, r = this.pos, i = 0;
1335
- i < this.escapeCharPositions.length;
1336
- i++
1337
- )
1338
- (r = this.escapeCharPositions[i]),
1339
- e.push(this.str.slice(n, r)),
1340
- (n = r + 1);
1341
- return (
1342
- e.push(this.str.slice(n, this.pos)),
1343
- (this.escapeCharPositions.length = 0),
1344
- e.join("")
1345
- );
1346
- }),
1347
- (t.QueryLexer.prototype.emit = function (e) {
1348
- this.lexemes.push({
1349
- type: e,
1350
- str: this.sliceString(),
1351
- start: this.start,
1352
- end: this.pos,
1353
- }),
1354
- (this.start = this.pos);
1355
- }),
1356
- (t.QueryLexer.prototype.escapeCharacter = function () {
1357
- this.escapeCharPositions.push(this.pos - 1), (this.pos += 1);
1358
- }),
1359
- (t.QueryLexer.prototype.next = function () {
1360
- if (this.pos >= this.length) return t.QueryLexer.EOS;
1361
- var e = this.str.charAt(this.pos);
1362
- return (this.pos += 1), e;
1363
- }),
1364
- (t.QueryLexer.prototype.width = function () {
1365
- return this.pos - this.start;
1366
- }),
1367
- (t.QueryLexer.prototype.ignore = function () {
1368
- this.start == this.pos && (this.pos += 1), (this.start = this.pos);
1369
- }),
1370
- (t.QueryLexer.prototype.backup = function () {
1371
- this.pos -= 1;
1372
- }),
1373
- (t.QueryLexer.prototype.acceptDigitRun = function () {
1374
- var e, n;
1375
- do (e = this.next()), (n = e.charCodeAt(0));
1376
- while (n > 47 && n < 58);
1377
- e != t.QueryLexer.EOS && this.backup();
1378
- }),
1379
- (t.QueryLexer.prototype.more = function () {
1380
- return this.pos < this.length;
1381
- }),
1382
- (t.QueryLexer.EOS = "EOS"),
1383
- (t.QueryLexer.FIELD = "FIELD"),
1384
- (t.QueryLexer.TERM = "TERM"),
1385
- (t.QueryLexer.EDIT_DISTANCE = "EDIT_DISTANCE"),
1386
- (t.QueryLexer.BOOST = "BOOST"),
1387
- (t.QueryLexer.PRESENCE = "PRESENCE"),
1388
- (t.QueryLexer.lexField = function (e) {
1389
- return (
1390
- e.backup(),
1391
- e.emit(t.QueryLexer.FIELD),
1392
- e.ignore(),
1393
- t.QueryLexer.lexText
1394
- );
1395
- }),
1396
- (t.QueryLexer.lexTerm = function (e) {
1397
- if (
1398
- (e.width() > 1 && (e.backup(), e.emit(t.QueryLexer.TERM)),
1399
- e.ignore(),
1400
- e.more())
1401
- )
1402
- return t.QueryLexer.lexText;
1403
- }),
1404
- (t.QueryLexer.lexEditDistance = function (e) {
1405
- return (
1406
- e.ignore(),
1407
- e.acceptDigitRun(),
1408
- e.emit(t.QueryLexer.EDIT_DISTANCE),
1409
- t.QueryLexer.lexText
1410
- );
1411
- }),
1412
- (t.QueryLexer.lexBoost = function (e) {
1413
- return (
1414
- e.ignore(),
1415
- e.acceptDigitRun(),
1416
- e.emit(t.QueryLexer.BOOST),
1417
- t.QueryLexer.lexText
1418
- );
1419
- }),
1420
- (t.QueryLexer.lexEOS = function (e) {
1421
- e.width() > 0 && e.emit(t.QueryLexer.TERM);
1422
- }),
1423
- (t.QueryLexer.termSeparator = t.tokenizer.separator),
1424
- (t.QueryLexer.lexText = function (e) {
1425
- for (;;) {
1426
- var n = e.next();
1427
- if (n == t.QueryLexer.EOS) return t.QueryLexer.lexEOS;
1428
- if (n.charCodeAt(0) == 92) {
1429
- e.escapeCharacter();
1430
- continue;
1431
- }
1432
- if (n == ":") return t.QueryLexer.lexField;
1433
- if (n == "~")
1434
- return (
1435
- e.backup(),
1436
- e.width() > 0 && e.emit(t.QueryLexer.TERM),
1437
- t.QueryLexer.lexEditDistance
1438
- );
1439
- if (n == "^")
1440
- return (
1441
- e.backup(),
1442
- e.width() > 0 && e.emit(t.QueryLexer.TERM),
1443
- t.QueryLexer.lexBoost
1444
- );
1445
- if ((n == "+" && e.width() === 1) || (n == "-" && e.width() === 1))
1446
- return e.emit(t.QueryLexer.PRESENCE), t.QueryLexer.lexText;
1447
- if (n.match(t.QueryLexer.termSeparator))
1448
- return t.QueryLexer.lexTerm;
1449
- }
1450
- }),
1451
- (t.QueryParser = function (e, n) {
1452
- (this.lexer = new t.QueryLexer(e)),
1453
- (this.query = n),
1454
- (this.currentClause = {}),
1455
- (this.lexemeIdx = 0);
1456
- }),
1457
- (t.QueryParser.prototype.parse = function () {
1458
- this.lexer.run(), (this.lexemes = this.lexer.lexemes);
1459
- for (var e = t.QueryParser.parseClause; e; ) e = e(this);
1460
- return this.query;
1461
- }),
1462
- (t.QueryParser.prototype.peekLexeme = function () {
1463
- return this.lexemes[this.lexemeIdx];
1464
- }),
1465
- (t.QueryParser.prototype.consumeLexeme = function () {
1466
- var e = this.peekLexeme();
1467
- return (this.lexemeIdx += 1), e;
1468
- }),
1469
- (t.QueryParser.prototype.nextClause = function () {
1470
- var e = this.currentClause;
1471
- this.query.clause(e), (this.currentClause = {});
1472
- }),
1473
- (t.QueryParser.parseClause = function (e) {
1474
- var n = e.peekLexeme();
1475
- if (n != null)
1476
- switch (n.type) {
1477
- case t.QueryLexer.PRESENCE:
1478
- return t.QueryParser.parsePresence;
1479
- case t.QueryLexer.FIELD:
1480
- return t.QueryParser.parseField;
1481
- case t.QueryLexer.TERM:
1482
- return t.QueryParser.parseTerm;
1483
- default:
1484
- var r = "expected either a field or a term, found " + n.type;
1485
- throw (
1486
- (n.str.length >= 1 && (r += " with value '" + n.str + "'"),
1487
- new t.QueryParseError(r, n.start, n.end))
1488
- );
1489
- }
1490
- }),
1491
- (t.QueryParser.parsePresence = function (e) {
1492
- var n = e.consumeLexeme();
1493
- if (n != null) {
1494
- switch (n.str) {
1495
- case "-":
1496
- e.currentClause.presence = t.Query.presence.PROHIBITED;
1497
- break;
1498
- case "+":
1499
- e.currentClause.presence = t.Query.presence.REQUIRED;
1500
- break;
1501
- default:
1502
- var r = "unrecognised presence operator'" + n.str + "'";
1503
- throw new t.QueryParseError(r, n.start, n.end);
1504
- }
1505
- var i = e.peekLexeme();
1506
- if (i == null) {
1507
- var r = "expecting term or field, found nothing";
1508
- throw new t.QueryParseError(r, n.start, n.end);
1509
- }
1510
- switch (i.type) {
1511
- case t.QueryLexer.FIELD:
1512
- return t.QueryParser.parseField;
1513
- case t.QueryLexer.TERM:
1514
- return t.QueryParser.parseTerm;
1515
- default:
1516
- var r = "expecting term or field, found '" + i.type + "'";
1517
- throw new t.QueryParseError(r, i.start, i.end);
1518
- }
1519
- }
1520
- }),
1521
- (t.QueryParser.parseField = function (e) {
1522
- var n = e.consumeLexeme();
1523
- if (n != null) {
1524
- if (e.query.allFields.indexOf(n.str) == -1) {
1525
- var r = e.query.allFields
1526
- .map(function (o) {
1527
- return "'" + o + "'";
1528
- })
1529
- .join(", "),
1530
- i = "unrecognised field '" + n.str + "', possible fields: " + r;
1531
- throw new t.QueryParseError(i, n.start, n.end);
1532
- }
1533
- e.currentClause.fields = [n.str];
1534
- var s = e.peekLexeme();
1535
- if (s == null) {
1536
- var i = "expecting term, found nothing";
1537
- throw new t.QueryParseError(i, n.start, n.end);
1538
- }
1539
- switch (s.type) {
1540
- case t.QueryLexer.TERM:
1541
- return t.QueryParser.parseTerm;
1542
- default:
1543
- var i = "expecting term, found '" + s.type + "'";
1544
- throw new t.QueryParseError(i, s.start, s.end);
1545
- }
1546
- }
1547
- }),
1548
- (t.QueryParser.parseTerm = function (e) {
1549
- var n = e.consumeLexeme();
1550
- if (n != null) {
1551
- (e.currentClause.term = n.str.toLowerCase()),
1552
- n.str.indexOf("*") != -1 && (e.currentClause.usePipeline = !1);
1553
- var r = e.peekLexeme();
1554
- if (r == null) {
1555
- e.nextClause();
1556
- return;
1557
- }
1558
- switch (r.type) {
1559
- case t.QueryLexer.TERM:
1560
- return e.nextClause(), t.QueryParser.parseTerm;
1561
- case t.QueryLexer.FIELD:
1562
- return e.nextClause(), t.QueryParser.parseField;
1563
- case t.QueryLexer.EDIT_DISTANCE:
1564
- return t.QueryParser.parseEditDistance;
1565
- case t.QueryLexer.BOOST:
1566
- return t.QueryParser.parseBoost;
1567
- case t.QueryLexer.PRESENCE:
1568
- return e.nextClause(), t.QueryParser.parsePresence;
1569
- default:
1570
- var i = "Unexpected lexeme type '" + r.type + "'";
1571
- throw new t.QueryParseError(i, r.start, r.end);
1572
- }
1573
- }
1574
- }),
1575
- (t.QueryParser.parseEditDistance = function (e) {
1576
- var n = e.consumeLexeme();
1577
- if (n != null) {
1578
- var r = parseInt(n.str, 10);
1579
- if (isNaN(r)) {
1580
- var i = "edit distance must be numeric";
1581
- throw new t.QueryParseError(i, n.start, n.end);
1582
- }
1583
- e.currentClause.editDistance = r;
1584
- var s = e.peekLexeme();
1585
- if (s == null) {
1586
- e.nextClause();
1587
- return;
1588
- }
1589
- switch (s.type) {
1590
- case t.QueryLexer.TERM:
1591
- return e.nextClause(), t.QueryParser.parseTerm;
1592
- case t.QueryLexer.FIELD:
1593
- return e.nextClause(), t.QueryParser.parseField;
1594
- case t.QueryLexer.EDIT_DISTANCE:
1595
- return t.QueryParser.parseEditDistance;
1596
- case t.QueryLexer.BOOST:
1597
- return t.QueryParser.parseBoost;
1598
- case t.QueryLexer.PRESENCE:
1599
- return e.nextClause(), t.QueryParser.parsePresence;
1600
- default:
1601
- var i = "Unexpected lexeme type '" + s.type + "'";
1602
- throw new t.QueryParseError(i, s.start, s.end);
1603
- }
1604
- }
1605
- }),
1606
- (t.QueryParser.parseBoost = function (e) {
1607
- var n = e.consumeLexeme();
1608
- if (n != null) {
1609
- var r = parseInt(n.str, 10);
1610
- if (isNaN(r)) {
1611
- var i = "boost must be numeric";
1612
- throw new t.QueryParseError(i, n.start, n.end);
1613
- }
1614
- e.currentClause.boost = r;
1615
- var s = e.peekLexeme();
1616
- if (s == null) {
1617
- e.nextClause();
1618
- return;
1619
- }
1620
- switch (s.type) {
1621
- case t.QueryLexer.TERM:
1622
- return e.nextClause(), t.QueryParser.parseTerm;
1623
- case t.QueryLexer.FIELD:
1624
- return e.nextClause(), t.QueryParser.parseField;
1625
- case t.QueryLexer.EDIT_DISTANCE:
1626
- return t.QueryParser.parseEditDistance;
1627
- case t.QueryLexer.BOOST:
1628
- return t.QueryParser.parseBoost;
1629
- case t.QueryLexer.PRESENCE:
1630
- return e.nextClause(), t.QueryParser.parsePresence;
1631
- default:
1632
- var i = "Unexpected lexeme type '" + s.type + "'";
1633
- throw new t.QueryParseError(i, s.start, s.end);
1634
- }
1635
- }
1636
- }),
1637
- (function (e, n) {
1638
- typeof define == "function" && define.amd
1639
- ? define(n)
1640
- : typeof ae == "object"
1641
- ? (le.exports = n())
1642
- : (e.lunr = n());
1643
- })(this, function () {
1644
- return t;
1645
- });
1646
- })();
1647
- });
1648
- var se = [];
1649
- function G(t, e) {
1650
- se.push({ selector: e, constructor: t });
1651
- }
1652
- var U = class {
1653
- constructor() {
1654
- this.alwaysVisibleMember = null;
1655
- this.createComponents(document.body),
1656
- this.ensureFocusedElementVisible(),
1657
- this.listenForCodeCopies(),
1658
- window.addEventListener("hashchange", () =>
1659
- this.ensureFocusedElementVisible(),
1660
- ),
1661
- document.body.style.display ||
1662
- (this.ensureFocusedElementVisible(),
1663
- this.updateIndexVisibility(),
1664
- this.scrollToHash());
1665
- }
1666
- createComponents(e) {
1667
- se.forEach((n) => {
1668
- e.querySelectorAll(n.selector).forEach((r) => {
1669
- r.dataset.hasInstance ||
1670
- (new n.constructor({ el: r, app: this }),
1671
- (r.dataset.hasInstance = String(!0)));
1672
- });
1673
- });
1674
- }
1675
- filterChanged() {
1676
- this.ensureFocusedElementVisible();
1677
- }
1678
- showPage() {
1679
- document.body.style.display &&
1680
- (document.body.style.removeProperty("display"),
1681
- this.ensureFocusedElementVisible(),
1682
- this.updateIndexVisibility(),
1683
- this.scrollToHash());
1684
- }
1685
- scrollToHash() {
1686
- if (location.hash) {
1687
- let e = document.getElementById(location.hash.substring(1));
1688
- if (!e) return;
1689
- e.scrollIntoView({ behavior: "instant", block: "start" });
1690
- }
1691
- }
1692
- ensureActivePageVisible() {
1693
- let e = document.querySelector(".tsd-navigation .current"),
1694
- n = e?.parentElement;
1695
- for (; n && !n.classList.contains(".tsd-navigation"); )
1696
- n instanceof HTMLDetailsElement && (n.open = !0), (n = n.parentElement);
1697
- if (e && !Ve(e)) {
1698
- let r =
1699
- e.getBoundingClientRect().top -
1700
- document.documentElement.clientHeight / 4;
1701
- (document.querySelector(".site-menu").scrollTop = r),
1702
- (document.querySelector(".col-sidebar").scrollTop = r);
1703
- }
1704
- }
1705
- updateIndexVisibility() {
1706
- let e = document.querySelector(".tsd-index-content"),
1707
- n = e?.open;
1708
- e && (e.open = !0),
1709
- document.querySelectorAll(".tsd-index-section").forEach((r) => {
1710
- r.style.display = "block";
1711
- let i = Array.from(r.querySelectorAll(".tsd-index-link")).every(
1712
- (s) => s.offsetParent == null,
1713
- );
1714
- r.style.display = i ? "none" : "block";
1715
- }),
1716
- e && (e.open = n);
1717
- }
1718
- ensureFocusedElementVisible() {
1719
- if (
1720
- (this.alwaysVisibleMember &&
1721
- (this.alwaysVisibleMember.classList.remove("always-visible"),
1722
- this.alwaysVisibleMember.firstElementChild.remove(),
1723
- (this.alwaysVisibleMember = null)),
1724
- !location.hash)
1725
- )
1726
- return;
1727
- let e = document.getElementById(location.hash.substring(1));
1728
- if (!e) return;
1729
- let n = e.parentElement;
1730
- for (; n && n.tagName !== "SECTION"; ) n = n.parentElement;
1731
- if (!n) return;
1732
- let r = n.offsetParent == null,
1733
- i = n;
1734
- for (; i !== document.body; )
1735
- i instanceof HTMLDetailsElement && (i.open = !0), (i = i.parentElement);
1736
- if (n.offsetParent == null) {
1737
- (this.alwaysVisibleMember = n), n.classList.add("always-visible");
1738
- let s = document.createElement("p");
1739
- s.classList.add("warning"),
1740
- (s.textContent = window.translations.normally_hidden),
1741
- n.prepend(s);
1742
- }
1743
- r && e.scrollIntoView();
1744
- }
1745
- listenForCodeCopies() {
1746
- document.querySelectorAll("pre > button").forEach((e) => {
1747
- let n;
1748
- e.addEventListener("click", () => {
1749
- e.previousElementSibling instanceof HTMLElement &&
1750
- navigator.clipboard.writeText(
1751
- e.previousElementSibling.innerText.trim(),
1752
- ),
1753
- (e.textContent = window.translations.copied),
1754
- e.classList.add("visible"),
1755
- clearTimeout(n),
1756
- (n = setTimeout(() => {
1757
- e.classList.remove("visible"),
1758
- (n = setTimeout(() => {
1759
- e.textContent = window.translations.copy;
1760
- }, 100));
1761
- }, 1e3));
1762
- });
1763
- });
1764
- }
1765
- };
1766
- function Ve(t) {
1767
- let e = t.getBoundingClientRect(),
1768
- n = Math.max(document.documentElement.clientHeight, window.innerHeight);
1769
- return !(e.bottom < 0 || e.top - n >= 0);
1770
- }
1771
- var oe = (t, e = 100) => {
1772
- let n;
1773
- return () => {
1774
- clearTimeout(n), (n = setTimeout(() => t(), e));
1775
- };
1776
- };
1777
- var pe = Ae(ue());
1778
- async function ce(t, e) {
1779
- if (!window.searchData) return;
1780
- let n = await fetch(window.searchData),
1781
- r = new Blob([await n.arrayBuffer()])
1782
- .stream()
1783
- .pipeThrough(new DecompressionStream("gzip")),
1784
- i = await new Response(r).json();
1785
- (t.data = i),
1786
- (t.index = pe.Index.load(i.index)),
1787
- e.classList.remove("loading"),
1788
- e.classList.add("ready");
1789
- }
1790
- function fe() {
1791
- let t = document.getElementById("tsd-search");
1792
- if (!t) return;
1793
- let e = { base: t.dataset.base + "/" },
1794
- n = document.getElementById("tsd-search-script");
1795
- t.classList.add("loading"),
1796
- n &&
1797
- (n.addEventListener("error", () => {
1798
- t.classList.remove("loading"), t.classList.add("failure");
1799
- }),
1800
- n.addEventListener("load", () => {
1801
- ce(e, t);
1802
- }),
1803
- ce(e, t));
1804
- let r = document.querySelector("#tsd-search input"),
1805
- i = document.querySelector("#tsd-search .results");
1806
- if (!r || !i)
1807
- throw new Error(
1808
- "The input field or the result list wrapper was not found",
1809
- );
1810
- i.addEventListener("mouseup", () => {
1811
- te(t);
1812
- }),
1813
- r.addEventListener("focus", () => t.classList.add("has-focus")),
1814
- He(t, i, r, e);
1815
- }
1816
- function He(t, e, n, r) {
1817
- n.addEventListener(
1818
- "input",
1819
- oe(() => {
1820
- Ne(t, e, n, r);
1821
- }, 200),
1822
- ),
1823
- n.addEventListener("keydown", (i) => {
1824
- i.key == "Enter"
1825
- ? Be(e, t)
1826
- : i.key == "ArrowUp"
1827
- ? (de(e, n, -1), i.preventDefault())
1828
- : i.key === "ArrowDown" && (de(e, n, 1), i.preventDefault());
1829
- }),
1830
- document.body.addEventListener("keypress", (i) => {
1831
- i.altKey ||
1832
- i.ctrlKey ||
1833
- i.metaKey ||
1834
- (!n.matches(":focus") &&
1835
- i.key === "/" &&
1836
- (i.preventDefault(), n.focus()));
1837
- }),
1838
- document.body.addEventListener("keyup", (i) => {
1839
- t.classList.contains("has-focus") &&
1840
- (i.key === "Escape" ||
1841
- (!e.matches(":focus-within") && !n.matches(":focus"))) &&
1842
- (n.blur(), te(t));
1843
- });
1844
- }
1845
- function te(t) {
1846
- t.classList.remove("has-focus");
1847
- }
1848
- function Ne(t, e, n, r) {
1849
- if (!r.index || !r.data) return;
1850
- e.textContent = "";
1851
- let i = n.value.trim(),
1852
- s;
1853
- if (i) {
1854
- let o = i
1855
- .split(" ")
1856
- .map((a) => (a.length ? `*${a}*` : ""))
1857
- .join(" ");
1858
- s = r.index.search(o);
1859
- } else s = [];
1860
- for (let o = 0; o < s.length; o++) {
1861
- let a = s[o],
1862
- l = r.data.rows[Number(a.ref)],
1863
- u = 1;
1864
- l.name.toLowerCase().startsWith(i.toLowerCase()) &&
1865
- (u *= 1 + 1 / (1 + Math.abs(l.name.length - i.length))),
1866
- (a.score *= u);
1867
- }
1868
- if (s.length === 0) {
1869
- let o = document.createElement("li");
1870
- o.classList.add("no-results");
1871
- let a = document.createElement("span");
1872
- (a.textContent = "No results found"), o.appendChild(a), e.appendChild(o);
1873
- }
1874
- s.sort((o, a) => a.score - o.score);
1875
- for (let o = 0, a = Math.min(10, s.length); o < a; o++) {
1876
- let l = r.data.rows[Number(s[o].ref)],
1877
- u = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon"><use href="#icon-${l.kind}"></use></svg>`,
1878
- d = he(l.name, i);
1879
- globalThis.DEBUG_SEARCH_WEIGHTS &&
1880
- (d += ` (score: ${s[o].score.toFixed(2)})`),
1881
- l.parent &&
1882
- (d = `<span class="parent">
1883
- ${he(l.parent, i)}.</span>${d}`);
1884
- let m = document.createElement("li");
1885
- m.classList.value = l.classes ?? "";
1886
- let p = document.createElement("a");
1887
- (p.href = r.base + l.url),
1888
- (p.innerHTML = u + d),
1889
- m.append(p),
1890
- p.addEventListener("focus", () => {
1891
- e.querySelector(".current")?.classList.remove("current"),
1892
- m.classList.add("current");
1893
- }),
1894
- e.appendChild(m);
1895
- }
1896
- }
1897
- function de(t, e, n) {
1898
- let r = t.querySelector(".current");
1899
- if (!r)
1900
- (r = t.querySelector(n == 1 ? "li:first-child" : "li:last-child")),
1901
- r && r.classList.add("current");
1902
- else {
1903
- let i = r;
1904
- if (n === 1)
1905
- do i = i.nextElementSibling ?? void 0;
1906
- while (i instanceof HTMLElement && i.offsetParent == null);
1907
- else
1908
- do i = i.previousElementSibling ?? void 0;
1909
- while (i instanceof HTMLElement && i.offsetParent == null);
1910
- i
1911
- ? (r.classList.remove("current"), i.classList.add("current"))
1912
- : n === -1 && (r.classList.remove("current"), e.focus());
1913
- }
1914
- }
1915
- function Be(t, e) {
1916
- let n = t.querySelector(".current");
1917
- if ((n || (n = t.querySelector("li:first-child")), n)) {
1918
- let r = n.querySelector("a");
1919
- r && (window.location.href = r.href), te(e);
1920
- }
1921
- }
1922
- function he(t, e) {
1923
- if (e === "") return t;
1924
- let n = t.toLocaleLowerCase(),
1925
- r = e.toLocaleLowerCase(),
1926
- i = [],
1927
- s = 0,
1928
- o = n.indexOf(r);
1929
- for (; o != -1; )
1930
- i.push(
1931
- ee(t.substring(s, o)),
1932
- `<b>${ee(t.substring(o, o + r.length))}</b>`,
1933
- ),
1934
- (s = o + r.length),
1935
- (o = n.indexOf(r, s));
1936
- return i.push(ee(t.substring(s))), i.join("");
1937
- }
1938
- var je = {
1939
- "&": "&amp;",
1940
- "<": "&lt;",
1941
- ">": "&gt;",
1942
- "'": "&#039;",
1943
- '"': "&quot;",
1944
- };
1945
- function ee(t) {
1946
- return t.replace(/[&<>"'"]/g, (e) => je[e]);
1947
- }
1948
- var I = class {
1949
- constructor(e) {
1950
- (this.el = e.el), (this.app = e.app);
1951
- }
1952
- };
1953
- var F = "mousedown",
1954
- ye = "mousemove",
1955
- N = "mouseup",
1956
- J = { x: 0, y: 0 },
1957
- me = !1,
1958
- ne = !1,
1959
- qe = !1,
1960
- D = !1,
1961
- ve = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
1962
- navigator.userAgent,
1963
- );
1964
- document.documentElement.classList.add(ve ? "is-mobile" : "not-mobile");
1965
- ve &&
1966
- "ontouchstart" in document.documentElement &&
1967
- ((qe = !0), (F = "touchstart"), (ye = "touchmove"), (N = "touchend"));
1968
- document.addEventListener(F, (t) => {
1969
- (ne = !0), (D = !1);
1970
- let e = F == "touchstart" ? t.targetTouches[0] : t;
1971
- (J.y = e.pageY || 0), (J.x = e.pageX || 0);
1972
- });
1973
- document.addEventListener(ye, (t) => {
1974
- if (ne && !D) {
1975
- let e = F == "touchstart" ? t.targetTouches[0] : t,
1976
- n = J.x - (e.pageX || 0),
1977
- r = J.y - (e.pageY || 0);
1978
- D = Math.sqrt(n * n + r * r) > 10;
1979
- }
1980
- });
1981
- document.addEventListener(N, () => {
1982
- ne = !1;
1983
- });
1984
- document.addEventListener("click", (t) => {
1985
- me && (t.preventDefault(), t.stopImmediatePropagation(), (me = !1));
1986
- });
1987
- var X = class extends I {
1988
- constructor(e) {
1989
- super(e),
1990
- (this.className = this.el.dataset.toggle || ""),
1991
- this.el.addEventListener(N, (n) => this.onPointerUp(n)),
1992
- this.el.addEventListener("click", (n) => n.preventDefault()),
1993
- document.addEventListener(F, (n) => this.onDocumentPointerDown(n)),
1994
- document.addEventListener(N, (n) => this.onDocumentPointerUp(n));
1995
- }
1996
- setActive(e) {
1997
- if (this.active == e) return;
1998
- (this.active = e),
1999
- document.documentElement.classList.toggle("has-" + this.className, e),
2000
- this.el.classList.toggle("active", e);
2001
- let n = (this.active ? "to-has-" : "from-has-") + this.className;
2002
- document.documentElement.classList.add(n),
2003
- setTimeout(() => document.documentElement.classList.remove(n), 500);
2004
- }
2005
- onPointerUp(e) {
2006
- D || (this.setActive(!0), e.preventDefault());
2007
- }
2008
- onDocumentPointerDown(e) {
2009
- if (this.active) {
2010
- if (e.target.closest(".col-sidebar, .tsd-filter-group")) return;
2011
- this.setActive(!1);
2012
- }
2013
- }
2014
- onDocumentPointerUp(e) {
2015
- if (!D && this.active && e.target.closest(".col-sidebar")) {
2016
- let n = e.target.closest("a");
2017
- if (n) {
2018
- let r = window.location.href;
2019
- r.indexOf("#") != -1 && (r = r.substring(0, r.indexOf("#"))),
2020
- n.href.substring(0, r.length) == r &&
2021
- setTimeout(() => this.setActive(!1), 250);
2022
- }
2023
- }
2024
- }
2025
- };
2026
- var re;
2027
- try {
2028
- re = localStorage;
2029
- } catch {
2030
- re = {
2031
- getItem() {
2032
- return null;
2033
- },
2034
- setItem() {},
2035
- };
2036
- }
2037
- var Q = re;
2038
- var ge = document.head.appendChild(document.createElement("style"));
2039
- ge.dataset.for = "filters";
2040
- var Y = class extends I {
2041
- constructor(e) {
2042
- super(e),
2043
- (this.key = `filter-${this.el.name}`),
2044
- (this.value = this.el.checked),
2045
- this.el.addEventListener("change", () => {
2046
- this.setLocalStorage(this.el.checked);
2047
- }),
2048
- this.setLocalStorage(this.fromLocalStorage()),
2049
- (ge.innerHTML += `html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }
2050
- `),
2051
- this.app.updateIndexVisibility();
2052
- }
2053
- fromLocalStorage() {
2054
- let e = Q.getItem(this.key);
2055
- return e ? e === "true" : this.el.checked;
2056
- }
2057
- setLocalStorage(e) {
2058
- Q.setItem(this.key, e.toString()),
2059
- (this.value = e),
2060
- this.handleValueChange();
2061
- }
2062
- handleValueChange() {
2063
- (this.el.checked = this.value),
2064
- document.documentElement.classList.toggle(this.key, this.value),
2065
- this.app.filterChanged(),
2066
- this.app.updateIndexVisibility();
2067
- }
2068
- };
2069
- var Z = class extends I {
2070
- constructor(e) {
2071
- super(e),
2072
- (this.summary = this.el.querySelector(".tsd-accordion-summary")),
2073
- (this.icon = this.summary.querySelector("svg")),
2074
- (this.key = `tsd-accordion-${this.summary.dataset.key ?? this.summary.textContent.trim().replace(/\s+/g, "-").toLowerCase()}`);
2075
- let n = Q.getItem(this.key);
2076
- (this.el.open = n ? n === "true" : this.el.open),
2077
- this.el.addEventListener("toggle", () => this.update());
2078
- let r = this.summary.querySelector("a");
2079
- r &&
2080
- r.addEventListener("click", () => {
2081
- location.assign(r.href);
2082
- }),
2083
- this.update();
2084
- }
2085
- update() {
2086
- (this.icon.style.transform = `rotate(${this.el.open ? 0 : -90}deg)`),
2087
- Q.setItem(this.key, this.el.open.toString());
2088
- }
2089
- };
2090
- function Ee(t) {
2091
- let e = Q.getItem("tsd-theme") || "os";
2092
- (t.value = e),
2093
- xe(e),
2094
- t.addEventListener("change", () => {
2095
- Q.setItem("tsd-theme", t.value), xe(t.value);
2096
- });
2097
- }
2098
- function xe(t) {
2099
- document.documentElement.dataset.theme = t;
2100
- }
2101
- var K;
2102
- function we() {
2103
- let t = document.getElementById("tsd-nav-script");
2104
- t && (t.addEventListener("load", Le), Le());
2105
- }
2106
- async function Le() {
2107
- let t = document.getElementById("tsd-nav-container");
2108
- if (!t || !window.navigationData) return;
2109
- let n = await (await fetch(window.navigationData)).arrayBuffer(),
2110
- r = new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),
2111
- i = await new Response(r).json();
2112
- (K = t.dataset.base), K.endsWith("/") || (K += "/"), (t.innerHTML = "");
2113
- for (let s of i) Se(s, t, []);
2114
- window.app.createComponents(t),
2115
- window.app.showPage(),
2116
- window.app.ensureActivePageVisible();
2117
- }
2118
- function Se(t, e, n) {
2119
- let r = e.appendChild(document.createElement("li"));
2120
- if (t.children) {
2121
- let i = [...n, t.text],
2122
- s = r.appendChild(document.createElement("details"));
2123
- s.className = t.class ? `${t.class} tsd-accordion` : "tsd-accordion";
2124
- let o = s.appendChild(document.createElement("summary"));
2125
- (o.className = "tsd-accordion-summary"),
2126
- (o.dataset.key = i.join("$")),
2127
- (o.innerHTML =
2128
- '<svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>'),
2129
- be(t, o);
2130
- let a = s.appendChild(document.createElement("div"));
2131
- a.className = "tsd-accordion-details";
2132
- let l = a.appendChild(document.createElement("ul"));
2133
- l.className = "tsd-nested-navigation";
2134
- for (let u of t.children) Se(u, l, i);
2135
- } else be(t, r, t.class);
2136
- }
2137
- function be(t, e, n) {
2138
- if (t.path) {
2139
- let r = e.appendChild(document.createElement("a"));
2140
- (r.href = K + t.path),
2141
- n && (r.className = n),
2142
- location.pathname === r.pathname &&
2143
- !r.href.includes("#") &&
2144
- r.classList.add("current"),
2145
- t.kind &&
2146
- (r.innerHTML = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon"><use href="#icon-${t.kind}"></use></svg>`),
2147
- (r.appendChild(document.createElement("span")).textContent = t.text);
2148
- } else {
2149
- let r = e.appendChild(document.createElement("span"));
2150
- (r.innerHTML =
2151
- '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon"><use href="#icon-folder"></use></svg>'),
2152
- (r.appendChild(document.createElement("span")).textContent = t.text);
2153
- }
2154
- }
2155
- G(X, "a[data-toggle]");
2156
- G(Z, ".tsd-accordion");
2157
- G(Y, ".tsd-filter-item input[type=checkbox]");
2158
- var Te = document.getElementById("tsd-theme");
2159
- Te && Ee(Te);
2160
- var $e = new U();
2161
- Object.defineProperty(window, "app", { value: $e });
2162
- fe();
2163
- we();
2164
- })();
2
+ window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings."};
3
+ "use strict";(()=>{var Pe=Object.create;var ie=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _e(e))!Me.call(t,i)&&i!==n&&ie(t,i,{get:()=>e[i],enumerable:!(r=Oe(e,i))||r.enumerable});return t};var Ae=(t,e,n)=>(n=t!=null?Pe(Re(t)):{},De(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ue=Fe((ae,le)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){var s=r[i],o=e[s];if(Array.isArray(o)){n[s]=o.slice();continue}if(typeof o=="string"||typeof o=="number"||typeof o=="boolean"){n[s]=o;continue}throw new TypeError("clone is not deep and does not support nested objects")}return n},t.FieldRef=function(e,n,r){this.docRef=e,this.fieldName=n,this._stringValue=r},t.FieldRef.joiner="/",t.FieldRef.fromString=function(e){var n=e.indexOf(t.FieldRef.joiner);if(n===-1)throw"malformed field ref string";var r=e.slice(0,n),i=e.slice(n+1);return new t.FieldRef(i,r,e)},t.FieldRef.prototype.toString=function(){return this._stringValue==null&&(this._stringValue=this.fieldName+t.FieldRef.joiner+this.docRef),this._stringValue};t.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var n=0;n<this.length;n++)this.elements[e[n]]=!0}else this.length=0},t.Set.complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},t.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},t.Set.prototype.contains=function(e){return!!this.elements[e]},t.Set.prototype.intersect=function(e){var n,r,i,s=[];if(e===t.Set.complete)return this;if(e===t.Set.empty)return e;this.length<e.length?(n=this,r=e):(n=e,r=this),i=Object.keys(n.elements);for(var o=0;o<i.length;o++){var a=i[o];a in r.elements&&s.push(a)}return new t.Set(s)},t.Set.prototype.union=function(e){return e===t.Set.complete?t.Set.complete:e===t.Set.empty?this:new t.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},t.idf=function(e,n){var r=0;for(var i in e)i!="_index"&&(r+=Object.keys(e[i]).length);var s=(n-r+.5)/(r+.5);return Math.log(1+Math.abs(s))},t.Token=function(e,n){this.str=e||"",this.metadata=n||{}},t.Token.prototype.toString=function(){return this.str},t.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},t.Token.prototype.clone=function(e){return e=e||function(n){return n},new t.Token(e(this.str,this.metadata),this.metadata)};t.tokenizer=function(e,n){if(e==null||e==null)return[];if(Array.isArray(e))return e.map(function(m){return new t.Token(t.utils.asString(m).toLowerCase(),t.utils.clone(n))});for(var r=e.toString().toLowerCase(),i=r.length,s=[],o=0,a=0;o<=i;o++){var l=r.charAt(o),u=o-a;if(l.match(t.tokenizer.separator)||o==i){if(u>0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index.
4
+ `,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r<n;r++){for(var i=this._stack[r],s=[],o=0;o<e.length;o++){var a=i(e[o],o,e);if(!(a==null||a===""))if(Array.isArray(a))for(var l=0;l<a.length;l++)s.push(a[l]);else s.push(a)}e=s}return e},t.Pipeline.prototype.runString=function(e,n){var r=new t.Token(e,n);return this.run([r]).map(function(i){return i.toString()})},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})};t.Vector=function(e){this._magnitude=0,this.elements=e||[]},t.Vector.prototype.positionForIndex=function(e){if(this.elements.length==0)return 0;for(var n=0,r=this.elements.length/2,i=r-n,s=Math.floor(i/2),o=this.elements[s*2];i>1&&(o<e&&(n=s),o>e&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(o<e)return(s+1)*2},t.Vector.prototype.insert=function(e,n){this.upsert(e,n,function(){throw"duplicate index"})},t.Vector.prototype.upsert=function(e,n,r){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=r(this.elements[i+1],n):this.elements.splice(i,0,e,n)},t.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,n=this.elements.length,r=1;r<n;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},t.Vector.prototype.dot=function(e){for(var n=0,r=this.elements,i=e.elements,s=r.length,o=i.length,a=0,l=0,u=0,d=0;u<s&&d<o;)a=r[u],l=i[d],a<l?u+=2:a>l?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n<this.elements.length;n+=2,r++)e[r]=this.elements[n];return e},t.Vector.prototype.toJSON=function(){return this.elements};t.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},n={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},r="[^aeiou]",i="[aeiouy]",s=r+"[^aeiouy]*",o=i+"[aeiou]*",a="^("+s+")?"+o+s,l="^("+s+")?"+o+s+"("+o+")?$",u="^("+s+")?"+o+s+o+s,d="^("+s+")?"+i,m=new RegExp(a),p=new RegExp(u),b=new RegExp(l),g=new RegExp(d),L=/^(.+?)(ss|i)es$/,f=/^(.+?)([^s])s$/,y=/^(.+?)eed$/,S=/^(.+?)(ed|ing)$/,w=/.$/,k=/(at|bl|iz)$/,_=new RegExp("([^aeiouylsz])\\1$"),B=new RegExp("^"+s+i+"[^aeiouwxy]$"),A=/^(.+?[^aeiou])y$/,j=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,q=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,V=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,$=/^(.+?)(s|t)(ion)$/,C=/^(.+?)e$/,z=/ll$/,W=new RegExp("^"+s+i+"[^aeiouwxy]$"),H=function(c){var v,P,T,h,x,O,M;if(c.length<3)return c;if(T=c.substr(0,1),T=="y"&&(c=T.toUpperCase()+c.substr(1)),h=L,x=f,h.test(c)?c=c.replace(h,"$1$2"):x.test(c)&&(c=c.replace(x,"$1$2")),h=y,x=S,h.test(c)){var E=h.exec(c);h=m,h.test(E[1])&&(h=w,c=c.replace(h,""))}else if(x.test(c)){var E=x.exec(c);v=E[1],x=g,x.test(v)&&(c=v,x=k,O=_,M=B,x.test(c)?c=c+"e":O.test(c)?(h=w,c=c.replace(h,"")):M.test(c)&&(c=c+"e"))}if(h=A,h.test(c)){var E=h.exec(c);v=E[1],c=v+"i"}if(h=j,h.test(c)){var E=h.exec(c);v=E[1],P=E[2],h=m,h.test(v)&&(c=v+e[P])}if(h=q,h.test(c)){var E=h.exec(c);v=E[1],P=E[2],h=m,h.test(v)&&(c=v+n[P])}if(h=V,x=$,h.test(c)){var E=h.exec(c);v=E[1],h=p,h.test(v)&&(c=v)}else if(x.test(c)){var E=x.exec(c);v=E[1]+E[2],x=p,x.test(v)&&(c=v)}if(h=C,h.test(c)){var E=h.exec(c);v=E[1],h=p,x=b,O=W,(h.test(v)||x.test(v)&&!O.test(v))&&(c=v)}return h=z,x=p,h.test(c)&&x.test(c)&&(h=w,c=c.replace(h,"")),T=="y"&&(c=T.toLowerCase()+c.substr(1)),c};return function(R){return R.update(H)}}(),t.Pipeline.registerFunction(t.stemmer,"stemmer");t.generateStopWordFilter=function(e){var n=e.reduce(function(r,i){return r[i]=i,r},{});return function(r){if(r&&n[r.toString()]!==r.toString())return r}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter");t.trimmer=function(e){return e.update(function(n){return n.replace(/^\W+/,"").replace(/\W+$/,"")})},t.Pipeline.registerFunction(t.trimmer,"trimmer");t.TokenSet=function(){this.final=!1,this.edges={},this.id=t.TokenSet._nextId,t.TokenSet._nextId+=1},t.TokenSet._nextId=1,t.TokenSet.fromArray=function(e){for(var n=new t.TokenSet.Builder,r=0,i=e.length;r<i;r++)n.insert(e[r]);return n.finish(),n.root},t.TokenSet.fromClause=function(e){return"editDistance"in e?t.TokenSet.fromFuzzyString(e.term,e.editDistance):t.TokenSet.fromString(e.term)},t.TokenSet.fromFuzzyString=function(e,n){for(var r=new t.TokenSet,i=[{node:r,editsRemaining:n,str:e}];i.length;){var s=i.pop();if(s.str.length>0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i<s;i++){var o=e[i],a=i==s-1;if(o=="*")n.edges[o]=n,n.final=a;else{var l=new t.TokenSet;l.final=a,n.edges[o]=l,n=l}}return r},t.TokenSet.prototype.toArray=function(){for(var e=[],n=[{prefix:"",node:this}];n.length;){var r=n.pop(),i=Object.keys(r.node.edges),s=i.length;r.node.final&&(r.prefix.charAt(0),e.push(r.prefix));for(var o=0;o<s;o++){var a=i[o];n.push({prefix:r.prefix.concat(a),node:r.node.edges[a]})}}return e},t.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",n=Object.keys(this.edges).sort(),r=n.length,i=0;i<r;i++){var s=n[i],o=this.edges[s];e=e+s+o.id}return e},t.TokenSet.prototype.intersect=function(e){for(var n=new t.TokenSet,r=void 0,i=[{qNode:e,output:n,node:this}];i.length;){r=i.pop();for(var s=Object.keys(r.qNode.edges),o=s.length,a=Object.keys(r.node.edges),l=a.length,u=0;u<o;u++)for(var d=s[u],m=0;m<l;m++){var p=a[m];if(p==d||d=="*"){var b=r.node.edges[p],g=r.qNode.edges[d],L=b.final&&g.final,f=void 0;p in r.output.edges?(f=r.output.edges[p],f.final=f.final||L):(f=new t.TokenSet,f.final=L,r.output.edges[p]=f),i.push({qNode:g,output:f,node:b})}}}return n},t.TokenSet.Builder=function(){this.previousWord="",this.root=new t.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},t.TokenSet.Builder.prototype.insert=function(e){var n,r=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<e.length&&i<this.previousWord.length&&e[i]==this.previousWord[i];i++)r++;this.minimize(r),this.uncheckedNodes.length==0?n=this.root:n=this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(var i=r;i<e.length;i++){var s=new t.TokenSet,o=e[i];n.edges[o]=s,this.uncheckedNodes.push({parent:n,char:o,child:s}),n=s}n.final=!0,this.previousWord=e},t.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},t.TokenSet.Builder.prototype.minimize=function(e){for(var n=this.uncheckedNodes.length-1;n>=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l<this.fields.length;l++)i[this.fields[l]]=new t.Vector;e.call(n,n);for(var l=0;l<n.clauses.length;l++){var u=n.clauses[l],d=null,m=t.Set.empty;u.usePipeline?d=this.pipeline.runString(u.term,{fields:u.fields}):d=[u.term];for(var p=0;p<d.length;p++){var b=d[p];u.term=b;var g=t.TokenSet.fromClause(u),L=this.tokenSet.intersect(g).toArray();if(L.length===0&&u.presence===t.Query.presence.REQUIRED){for(var f=0;f<u.fields.length;f++){var y=u.fields[f];o[y]=t.Set.empty}break}for(var S=0;S<L.length;S++)for(var w=L[S],k=this.invertedIndex[w],_=k._index,f=0;f<u.fields.length;f++){var y=u.fields[f],B=k[y],A=Object.keys(B),j=w+"/"+y,q=new t.Set(A);if(u.presence==t.Query.presence.REQUIRED&&(m=m.union(q),o[y]===void 0&&(o[y]=t.Set.complete)),u.presence==t.Query.presence.PROHIBITED){a[y]===void 0&&(a[y]=t.Set.empty),a[y]=a[y].union(q);continue}if(i[y].upsert(_,u.boost,function(Ie,Ce){return Ie+Ce}),!s[j]){for(var V=0;V<A.length;V++){var $=A[V],C=new t.FieldRef($,y),z=B[$],W;(W=r[C])===void 0?r[C]=new t.MatchData(w,y,z):W.add(w,y,z)}s[j]=!0}}}if(u.presence===t.Query.presence.REQUIRED)for(var f=0;f<u.fields.length;f++){var y=u.fields[f];o[y]=o[y].intersect(m)}}for(var H=t.Set.complete,R=t.Set.empty,l=0;l<this.fields.length;l++){var y=this.fields[l];o[y]&&(H=H.intersect(o[y])),a[y]&&(R=R.union(a[y]))}var c=Object.keys(r),v=[],P=Object.create(null);if(n.isNegated()){c=Object.keys(this.fieldVectors);for(var l=0;l<c.length;l++){var C=c[l],T=t.FieldRef.fromString(C);r[C]=new t.MatchData}}for(var l=0;l<c.length;l++){var T=t.FieldRef.fromString(c[l]),h=T.docRef;if(H.contains(h)&&!R.contains(h)){var x=this.fieldVectors[T],O=i[T.fieldName].similarity(x),M;if((M=P[h])!==void 0)M.score+=O,M.matchData.combine(r[T]);else{var E={ref:h,score:O,matchData:r[T]};P[h]=E,v.push(E)}}}return v.sort(function(ke,Qe){return Qe.score-ke.score})},t.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map(function(r){return[r,this.invertedIndex[r]]},this),n=Object.keys(this.fieldVectors).map(function(r){return[r,this.fieldVectors[r].toJSON()]},this);return{version:t.version,fields:this.fields,fieldVectors:n,invertedIndex:e,pipeline:this.pipeline.toJSON()}},t.Index.load=function(e){var n={},r={},i=e.fieldVectors,s=Object.create(null),o=e.invertedIndex,a=new t.TokenSet.Builder,l=t.Pipeline.load(e.pipeline);e.version!=t.version&&t.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+t.version+"' does not match serialized index '"+e.version+"'");for(var u=0;u<i.length;u++){var d=i[u],m=d[0],p=d[1];r[m]=new t.Vector(p)}for(var u=0;u<o.length;u++){var d=o[u],b=d[0],g=d[1];a.insert(b),s[b]=g}return a.finish(),n.fields=e.fields,n.fieldVectors=r,n.invertedIndex=s,n.tokenSet=a.root,n.pipeline=l,new t.Index(n)};t.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=t.tokenizer,this.pipeline=new t.Pipeline,this.searchPipeline=new t.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},t.Builder.prototype.ref=function(e){this._ref=e},t.Builder.prototype.field=function(e,n){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=n||{}},t.Builder.prototype.b=function(e){e<0?this._b=0:e>1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s<i.length;s++){var o=i[s],a=this._fields[o].extractor,l=a?a(e):e[o],u=this.tokenizer(l,{fields:[o]}),d=this.pipeline.run(u),m=new t.FieldRef(r,o),p=Object.create(null);this.fieldTermFrequencies[m]=p,this.fieldLengths[m]=0,this.fieldLengths[m]+=d.length;for(var b=0;b<d.length;b++){var g=d[b];if(p[g]==null&&(p[g]=0),p[g]+=1,this.invertedIndex[g]==null){var L=Object.create(null);L._index=this.termIndex,this.termIndex+=1;for(var f=0;f<i.length;f++)L[i[f]]=Object.create(null);this.invertedIndex[g]=L}this.invertedIndex[g][o][r]==null&&(this.invertedIndex[g][o][r]=Object.create(null));for(var y=0;y<this.metadataWhitelist.length;y++){var S=this.metadataWhitelist[y],w=g.metadata[S];this.invertedIndex[g][o][r][S]==null&&(this.invertedIndex[g][o][r][S]=[]),this.invertedIndex[g][o][r][S].push(w)}}}},t.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),n=e.length,r={},i={},s=0;s<n;s++){var o=t.FieldRef.fromString(e[s]),a=o.fieldName;i[a]||(i[a]=0),i[a]+=1,r[a]||(r[a]=0),r[a]+=this.fieldLengths[o]}for(var l=Object.keys(this._fields),s=0;s<l.length;s++){var u=l[s];r[u]=r[u]/i[u]}this.averageFieldLength=r},t.Builder.prototype.createFieldVectors=function(){for(var e={},n=Object.keys(this.fieldTermFrequencies),r=n.length,i=Object.create(null),s=0;s<r;s++){for(var o=t.FieldRef.fromString(n[s]),a=o.fieldName,l=this.fieldLengths[o],u=new t.Vector,d=this.fieldTermFrequencies[o],m=Object.keys(d),p=m.length,b=this._fields[a].boost||1,g=this._documents[o.docRef].boost||1,L=0;L<p;L++){var f=m[L],y=d[f],S=this.invertedIndex[f]._index,w,k,_;i[f]===void 0?(w=t.idf(this.invertedIndex[f],this.documentCount),i[f]=w):w=i[f],k=w*((this._k1+1)*y)/(this._k1*(1-this._b+this._b*(l/this.averageFieldLength[a]))+y),k*=b,k*=g,_=Math.round(k*1e3)/1e3,u.insert(S,_)}e[o]=u}this.fieldVectors=e},t.Builder.prototype.createTokenSet=function(){this.tokenSet=t.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},t.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new t.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},t.Builder.prototype.use=function(e){var n=Array.prototype.slice.call(arguments,1);n.unshift(this),e.apply(this,n)},t.MatchData=function(e,n,r){for(var i=Object.create(null),s=Object.keys(r||{}),o=0;o<s.length;o++){var a=s[o];i[a]=r[a].slice()}this.metadata=Object.create(null),e!==void 0&&(this.metadata[e]=Object.create(null),this.metadata[e][n]=i)},t.MatchData.prototype.combine=function(e){for(var n=Object.keys(e.metadata),r=0;r<n.length;r++){var i=n[r],s=Object.keys(e.metadata[i]);this.metadata[i]==null&&(this.metadata[i]=Object.create(null));for(var o=0;o<s.length;o++){var a=s[o],l=Object.keys(e.metadata[i][a]);this.metadata[i][a]==null&&(this.metadata[i][a]=Object.create(null));for(var u=0;u<l.length;u++){var d=l[u];this.metadata[i][a][d]==null?this.metadata[i][a][d]=e.metadata[i][a][d]:this.metadata[i][a][d]=this.metadata[i][a][d].concat(e.metadata[i][a][d])}}}},t.MatchData.prototype.add=function(e,n,r){if(!(e in this.metadata)){this.metadata[e]=Object.create(null),this.metadata[e][n]=r;return}if(!(n in this.metadata[e])){this.metadata[e][n]=r;return}for(var i=Object.keys(r),s=0;s<i.length;s++){var o=i[s];o in this.metadata[e][n]?this.metadata[e][n][o]=this.metadata[e][n][o].concat(r[o]):this.metadata[e][n][o]=r[o]}},t.Query=function(e){this.clauses=[],this.allFields=e},t.Query.wildcard=new String("*"),t.Query.wildcard.NONE=0,t.Query.wildcard.LEADING=1,t.Query.wildcard.TRAILING=2,t.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},t.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=t.Query.wildcard.NONE),e.wildcard&t.Query.wildcard.LEADING&&e.term.charAt(0)!=t.Query.wildcard&&(e.term="*"+e.term),e.wildcard&t.Query.wildcard.TRAILING&&e.term.slice(-1)!=t.Query.wildcard&&(e.term=""+e.term+"*"),"presence"in e||(e.presence=t.Query.presence.OPTIONAL),this.clauses.push(e),this},t.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=t.Query.presence.PROHIBITED)return!1;return!0},t.Query.prototype.term=function(e,n){if(Array.isArray(e))return e.forEach(function(i){this.term(i,t.utils.clone(n))},this),this;var r=n||{};return r.term=e.toString(),this.clause(r),this},t.QueryParseError=function(e,n,r){this.name="QueryParseError",this.message=e,this.start=n,this.end=r},t.QueryParseError.prototype=new Error,t.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},t.QueryLexer.prototype.run=function(){for(var e=t.QueryLexer.lexText;e;)e=e(this)},t.QueryLexer.prototype.sliceString=function(){for(var e=[],n=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],e.push(this.str.slice(n,r)),n=r+1;return e.push(this.str.slice(n,this.pos)),this.escapeCharPositions.length=0,e.join("")},t.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},t.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},t.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos<this.length},t.QueryLexer.EOS="EOS",t.QueryLexer.FIELD="FIELD",t.QueryLexer.TERM="TERM",t.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",t.QueryLexer.BOOST="BOOST",t.QueryLexer.PRESENCE="PRESENCE",t.QueryLexer.lexField=function(e){return e.backup(),e.emit(t.QueryLexer.FIELD),e.ignore(),t.QueryLexer.lexText},t.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ae=="object"?le.exports=n():e.lunr=n()}(this,function(){return t})})()});var se=[];function G(t,e){se.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){se.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!Ve(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function Ve(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var oe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var pe=Ae(ue());async function ce(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=pe.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function fe(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{ce(e,t)}),ce(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{te(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),He(t,i,r,e)}function He(t,e,n,r){n.addEventListener("input",oe(()=>{Ne(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Be(e,t):i.key=="ArrowUp"?(de(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(de(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),te(t))})}function te(t){t.classList.remove("has-focus")}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;o<s.length;o++){let a=s[o],l=r.data.rows[Number(a.ref)],u=1;l.name.toLowerCase().startsWith(i.toLowerCase())&&(u*=1+1/(1+Math.abs(l.name.length-i.length))),a.score*=u}if(s.length===0){let o=document.createElement("li");o.classList.add("no-results");let a=document.createElement("span");a.textContent="No results found",o.appendChild(a),e.appendChild(o)}s.sort((o,a)=>a.score-o.score);for(let o=0,a=Math.min(10,s.length);o<a;o++){let l=r.data.rows[Number(s[o].ref)],u=`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon"><use href="#icon-${l.kind}"></use></svg>`,d=he(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=`<span class="parent">
5
+ ${he(l.parent,i)}.</span>${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function de(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Be(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),te(e)}}function he(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ee(t.substring(s,o)),`<b>${ee(t.substring(o,o+r.length))}</b>`),s=o+r.length,o=n.indexOf(r,s);return i.push(ee(t.substring(s))),i.join("")}var je={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#039;",'"':"&quot;"};function ee(t){return t.replace(/[&<>"'"]/g,e=>je[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",ye="mousemove",N="mouseup",J={x:0,y:0},me=!1,ne=!1,qe=!1,D=!1,ve=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(ve?"is-mobile":"not-mobile");ve&&"ontouchstart"in document.documentElement&&(qe=!0,F="touchstart",ye="touchmove",N="touchend");document.addEventListener(F,t=>{ne=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(ye,t=>{if(ne&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(N,()=>{ne=!1});document.addEventListener("click",t=>{me&&(t.preventDefault(),t.stopImmediatePropagation(),me=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var re;try{re=localStorage}catch{re={getItem(){return null},setItem(){}}}var Q=re;var ge=document.head.appendChild(document.createElement("style"));ge.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ge.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }
6
+ `,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='<svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>',be(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&r.classList.add("current"),t.kind&&(r.innerHTML=`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon"><use href="#icon-${t.kind}"></use></svg>`),r.appendChild(document.createElement("span")).textContent=t.text}else{let r=e.appendChild(document.createElement("span"));r.innerHTML='<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon"><use href="#icon-folder"></use></svg>',r.appendChild(document.createElement("span")).textContent=t.text}}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})();
2165
7
  /*! Bundled license information:
2166
8
 
2167
9
  lunr/lunr.js: