@eui/core 17.0.0-next.8 → 17.0.0-rc.1

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 (332) hide show
  1. package/assets/i18n-eui/bg.json +1 -0
  2. package/assets/i18n-eui/cs.json +1 -0
  3. package/assets/i18n-eui/da.json +1 -0
  4. package/assets/i18n-eui/de.json +1 -0
  5. package/assets/i18n-eui/el.json +1 -0
  6. package/assets/i18n-eui/en.json +1 -0
  7. package/assets/i18n-eui/es.json +1 -0
  8. package/assets/i18n-eui/et.json +1 -0
  9. package/assets/i18n-eui/fi.json +1 -0
  10. package/assets/i18n-eui/fr.json +1 -0
  11. package/assets/i18n-eui/ga.json +1 -0
  12. package/assets/i18n-eui/hr.json +1 -0
  13. package/assets/i18n-eui/hu.json +1 -1
  14. package/assets/i18n-eui/it.json +1 -0
  15. package/assets/i18n-eui/lt.json +1 -1
  16. package/assets/i18n-eui/lv.json +1 -0
  17. package/assets/i18n-eui/mt.json +1 -0
  18. package/assets/i18n-eui/nl.json +1 -0
  19. package/assets/i18n-eui/pl.json +1 -0
  20. package/assets/i18n-eui/pt.json +1 -0
  21. package/assets/i18n-eui/ro.json +1 -1
  22. package/assets/i18n-eui/sk.json +1 -0
  23. package/assets/i18n-eui/sl.json +1 -0
  24. package/assets/i18n-eui/sv.json +1 -0
  25. package/docs/classes/ActivatedRouteAction.html +282 -0
  26. package/docs/classes/AddApiQueueItemAction.html +282 -0
  27. package/docs/classes/AddAppLoadedConfigModulesAction.html +282 -0
  28. package/docs/classes/ApiQueueServiceMock.html +545 -0
  29. package/docs/classes/AsyncStorageService.html +923 -0
  30. package/docs/classes/AsyncStorageServiceMock.html +427 -0
  31. package/docs/classes/EmptyApiQueueAction.html +282 -0
  32. package/docs/classes/ErrorSubClass.html +357 -0
  33. package/docs/classes/EuiCoreRootGuardClass.html +167 -0
  34. package/docs/classes/EuiError.html +363 -0
  35. package/docs/classes/I18nResourceImpl.html +506 -0
  36. package/docs/classes/InitStoreAction.html +282 -0
  37. package/docs/classes/LogServiceMock.html +223 -0
  38. package/docs/classes/OpenIdConnectServiceMock.html +223 -0
  39. package/docs/classes/RemoveApiQueueItemAction.html +282 -0
  40. package/docs/classes/RouterMock.html +482 -0
  41. package/docs/classes/StorageService.html +630 -0
  42. package/docs/classes/StorageServiceMock.html +316 -0
  43. package/docs/classes/StoreMock.html +391 -0
  44. package/docs/classes/TranslateServiceMock.html +907 -0
  45. package/docs/classes/UpdateAppConnectionAction.html +282 -0
  46. package/docs/classes/UpdateAppStatusAction.html +282 -0
  47. package/docs/classes/UpdateAppVersionAction.html +282 -0
  48. package/docs/classes/UpdateCurrentModuleAction.html +282 -0
  49. package/docs/classes/UpdateI18nStateAction.html +282 -0
  50. package/docs/classes/UpdateLocaleStateAction.html +282 -0
  51. package/docs/classes/UpdateNotificationsListAction.html +282 -0
  52. package/docs/classes/UpdateUserDashboardAction.html +282 -0
  53. package/docs/classes/UpdateUserDetailsAction.html +282 -0
  54. package/docs/classes/UpdateUserPreferencesAction.html +282 -0
  55. package/docs/classes/UpdateUserRightsAction.html +282 -0
  56. package/docs/classes/UpdateUserStateAction.html +282 -0
  57. package/docs/dependencies.html +337 -0
  58. package/docs/directives/TranslateMockDirective.html +266 -0
  59. package/docs/fonts/ionicons.eot +0 -0
  60. package/docs/fonts/ionicons.svg +2090 -0
  61. package/docs/fonts/ionicons.ttf +0 -0
  62. package/docs/fonts/ionicons.woff +0 -0
  63. package/docs/fonts/ionicons.woff2 +0 -0
  64. package/docs/fonts/roboto-v15-latin-300.eot +0 -0
  65. package/docs/fonts/roboto-v15-latin-300.svg +314 -0
  66. package/docs/fonts/roboto-v15-latin-300.ttf +0 -0
  67. package/docs/fonts/roboto-v15-latin-300.woff +0 -0
  68. package/docs/fonts/roboto-v15-latin-300.woff2 +0 -0
  69. package/docs/fonts/roboto-v15-latin-700.eot +0 -0
  70. package/docs/fonts/roboto-v15-latin-700.svg +310 -0
  71. package/docs/fonts/roboto-v15-latin-700.ttf +0 -0
  72. package/docs/fonts/roboto-v15-latin-700.woff +0 -0
  73. package/docs/fonts/roboto-v15-latin-700.woff2 +0 -0
  74. package/docs/fonts/roboto-v15-latin-italic.eot +0 -0
  75. package/docs/fonts/roboto-v15-latin-italic.svg +323 -0
  76. package/docs/fonts/roboto-v15-latin-italic.ttf +0 -0
  77. package/docs/fonts/roboto-v15-latin-italic.woff +0 -0
  78. package/docs/fonts/roboto-v15-latin-italic.woff2 +0 -0
  79. package/docs/fonts/roboto-v15-latin-regular.eot +0 -0
  80. package/docs/fonts/roboto-v15-latin-regular.svg +308 -0
  81. package/docs/fonts/roboto-v15-latin-regular.ttf +0 -0
  82. package/docs/fonts/roboto-v15-latin-regular.woff +0 -0
  83. package/docs/fonts/roboto-v15-latin-regular.woff2 +0 -0
  84. package/docs/images/compodoc-vectorise-inverted.png +0 -0
  85. package/docs/images/compodoc-vectorise-inverted.svg +201 -0
  86. package/docs/images/compodoc-vectorise.png +0 -0
  87. package/docs/images/compodoc-vectorise.svg +201 -0
  88. package/docs/images/favicon.ico +0 -0
  89. package/docs/index.html +171 -0
  90. package/docs/injectables/ApiQueueService.html +784 -0
  91. package/docs/injectables/CoreAppEffects.html +390 -0
  92. package/docs/injectables/EuiAppShellService.html +2822 -0
  93. package/docs/injectables/EuiDynamicComponentService.html +433 -0
  94. package/docs/injectables/EuiDynamicMenuService.html +377 -0
  95. package/docs/injectables/EuiGrowlService.html +821 -0
  96. package/docs/injectables/EuiPermissionService.html +642 -0
  97. package/docs/injectables/EuiTimezoneService.html +378 -0
  98. package/docs/injectables/GlobalErrorHandler.html +291 -0
  99. package/docs/injectables/I18nLoader.html +589 -0
  100. package/docs/injectables/I18nService.html +991 -0
  101. package/docs/injectables/I18nServiceMock.html +626 -0
  102. package/docs/injectables/LocalForageService.html +761 -0
  103. package/docs/injectables/LocalStorageService.html +548 -0
  104. package/docs/injectables/LocaleService.html +753 -0
  105. package/docs/injectables/LocaleServiceMock.html +453 -0
  106. package/docs/injectables/LogService.html +351 -0
  107. package/docs/injectables/OpenIdConnectService.html +225 -0
  108. package/docs/injectables/SessionStorageService.html +548 -0
  109. package/docs/injectables/StoreService.html +641 -0
  110. package/docs/injectables/StoreServiceMock.html +455 -0
  111. package/docs/injectables/UserService.html +738 -0
  112. package/docs/injectables/UserServiceMock.html +708 -0
  113. package/docs/interceptors/AddLangParamInterceptor.html +311 -0
  114. package/docs/interceptors/CachePreventionInterceptor.html +260 -0
  115. package/docs/interceptors/CorsSecurityInterceptor.html +260 -0
  116. package/docs/interceptors/CsrfPreventionInterceptor.html +260 -0
  117. package/docs/interceptors/EuLoginSessionTimeoutHandlingInterceptor.html +260 -0
  118. package/docs/interceptors/HttpErrorHandlerInterceptor.html +319 -0
  119. package/docs/interceptors/OpenIdConnectInterceptor.html +345 -0
  120. package/docs/interceptors/UxRequestErrorModelInterceptor.html +295 -0
  121. package/docs/interfaces/EuiTimeZone.html +247 -0
  122. package/docs/interfaces/LoadedResources.html +292 -0
  123. package/docs/interfaces/LoadedResourcesError.html +247 -0
  124. package/docs/interfaces/ModuleLoadEvent.html +292 -0
  125. package/docs/interfaces/OpenIdConnectUserDetails.html +439 -0
  126. package/docs/interfaces/ResourceError.html +298 -0
  127. package/docs/interfaces/UIState.html +1810 -0
  128. package/docs/js/compodoc.js +14 -0
  129. package/docs/js/lazy-load-graphs.js +44 -0
  130. package/docs/js/libs/EventDispatcher.js +5 -0
  131. package/docs/js/libs/bootstrap-native.js +1 -0
  132. package/docs/js/libs/clipboard.min.js +7 -0
  133. package/docs/js/libs/custom-elements-es5-adapter.js +15 -0
  134. package/docs/js/libs/custom-elements.min.js +38 -0
  135. package/docs/js/libs/d3.v3.min.js +2 -0
  136. package/docs/js/libs/deep-iterator.js +2 -0
  137. package/docs/js/libs/es6-shim.min.js +11 -0
  138. package/docs/js/libs/htmlparser.js +23 -0
  139. package/docs/js/libs/innersvg.js +9 -0
  140. package/docs/js/libs/lit-html.js +1 -0
  141. package/docs/js/libs/prism.js +46 -0
  142. package/docs/js/libs/promise.min.js +6 -0
  143. package/docs/js/libs/svg-pan-zoom.min.js +3 -0
  144. package/docs/js/libs/tablesort.min.js +6 -0
  145. package/docs/js/libs/tablesort.number.min.js +6 -0
  146. package/docs/js/libs/vis.min.js +47 -0
  147. package/docs/js/libs/zepto.min.js +2 -0
  148. package/docs/js/menu-wc.js +377 -0
  149. package/docs/js/menu-wc_es5.js +42 -0
  150. package/docs/js/menu.js +325 -0
  151. package/docs/js/routes.js +301 -0
  152. package/docs/js/search/lunr.min.js +6 -0
  153. package/docs/js/search/search-lunr.js +67 -0
  154. package/docs/js/search/search.js +268 -0
  155. package/docs/js/search/search_index.js +4 -0
  156. package/docs/js/sourceCode.js +58 -0
  157. package/docs/js/svg-pan-zoom.controls.js +53 -0
  158. package/docs/js/tabs.js +21 -0
  159. package/docs/js/tree.js +147 -0
  160. package/docs/license.html +379 -0
  161. package/docs/miscellaneous/enumerations.html +418 -0
  162. package/docs/miscellaneous/functions.html +1796 -0
  163. package/docs/miscellaneous/typealiases.html +258 -0
  164. package/docs/miscellaneous/variables.html +3967 -0
  165. package/docs/modules/CoreModule.html +254 -0
  166. package/docs/modules/I18nModule.html +198 -0
  167. package/docs/modules/LogModule.html +301 -0
  168. package/docs/modules/TranslateMockModule.html +176 -0
  169. package/docs/modules.html +168 -0
  170. package/docs/pipes/TranslateMockPipe.html +225 -0
  171. package/docs/properties.html +124 -0
  172. package/docs/styles/bootstrap-card.css +219 -0
  173. package/docs/styles/bootstrap.min.css +6 -0
  174. package/docs/styles/compodoc.css +1121 -0
  175. package/docs/styles/dark.css +121 -0
  176. package/docs/styles/ionicons.min.css +11 -0
  177. package/docs/styles/laravel.css +113 -0
  178. package/docs/styles/material.css +131 -0
  179. package/docs/styles/original.css +51 -0
  180. package/docs/styles/postmark.css +238 -0
  181. package/docs/styles/prism.css +301 -0
  182. package/docs/styles/readthedocs.css +117 -0
  183. package/docs/styles/reset.css +129 -0
  184. package/docs/styles/stripe.css +106 -0
  185. package/docs/styles/style.css +7 -0
  186. package/docs/styles/tablesort.css +33 -0
  187. package/docs/styles/vagrant.css +130 -0
  188. package/esm2022/lib/eui-core.module.mjs +7 -7
  189. package/esm2022/lib/helpers/date-helpers.mjs +1 -1
  190. package/esm2022/lib/helpers/dom-helpers.mjs +10 -8
  191. package/esm2022/lib/helpers/event-helpers.mjs +1 -1
  192. package/esm2022/lib/helpers/form-helpers.mjs +1 -1
  193. package/esm2022/lib/helpers/format-helpers.mjs +6 -5
  194. package/esm2022/lib/helpers/http-helpers.mjs +3 -5
  195. package/esm2022/lib/interceptors/add-lang-param.interceptor.mjs +4 -4
  196. package/esm2022/lib/interceptors/cache-prevention.interceptor.mjs +4 -4
  197. package/esm2022/lib/interceptors/cors-security.interceptor.mjs +4 -4
  198. package/esm2022/lib/interceptors/csrf-prevention.interceptor.mjs +4 -4
  199. package/esm2022/lib/interceptors/eu-login-session-timeout-handling.interceptor.mjs +13 -6
  200. package/esm2022/lib/interceptors/openid/openid-connect.interceptor.mjs +37 -8
  201. package/esm2022/lib/interceptors/openid/openid-connect.service.mjs +6 -4
  202. package/esm2022/lib/interceptors/ux-request-error-model.interceptor.mjs +10 -5
  203. package/esm2022/lib/services/app/eui-init-app.mjs +2 -2
  204. package/esm2022/lib/services/app/eui-pre-init-app.mjs +1 -1
  205. package/esm2022/lib/services/app/factories/log.mjs +1 -1
  206. package/esm2022/lib/services/config/tokens.mjs +3 -1
  207. package/esm2022/lib/services/dynamic-component/dynamic-component.service.mjs +9 -4
  208. package/esm2022/lib/services/dynamic-menu/dynamic-menu.service.mjs +8 -5
  209. package/esm2022/lib/services/errors/eui.error.mjs +5 -1
  210. package/esm2022/lib/services/errors/global-error-handler.mjs +7 -5
  211. package/esm2022/lib/services/errors/http-error-handler-callback-functions.mjs +2 -2
  212. package/esm2022/lib/services/errors/http-error-handler.interceptor.mjs +24 -17
  213. package/esm2022/lib/services/eui-app-shell.service.mjs +123 -15
  214. package/esm2022/lib/services/eui-timezone.service.mjs +4 -4
  215. package/esm2022/lib/services/growl/eui-growl.service.mjs +4 -4
  216. package/esm2022/lib/services/i18n/i18n.loader.mjs +16 -5
  217. package/esm2022/lib/services/i18n/i18n.resource.mjs +8 -3
  218. package/esm2022/lib/services/i18n/i18n.service.mjs +17 -19
  219. package/esm2022/lib/services/i18n/index.mjs +2 -2
  220. package/esm2022/lib/services/locale/locale.service.mjs +7 -5
  221. package/esm2022/lib/services/locale/locale.service.mock.mjs +4 -4
  222. package/esm2022/lib/services/log/log.module.mjs +5 -5
  223. package/esm2022/lib/services/log/log.service.mjs +4 -4
  224. package/esm2022/lib/services/log/log.service.mock.mjs +1 -1
  225. package/esm2022/lib/services/permission/permission.service.mjs +5 -5
  226. package/esm2022/lib/services/queue/api-queue.service.mjs +20 -8
  227. package/esm2022/lib/services/queue/api-queue.service.mock.mjs +5 -1
  228. package/esm2022/lib/services/storage/async-storage.service.mjs +1 -1
  229. package/esm2022/lib/services/storage/async-storage.service.mock.mjs +9 -1
  230. package/esm2022/lib/services/storage/local-forage.service.mjs +43 -18
  231. package/esm2022/lib/services/storage/local-storage.service.mjs +8 -4
  232. package/esm2022/lib/services/storage/session-storage.service.mjs +8 -4
  233. package/esm2022/lib/services/storage/storage.service.mjs +1 -1
  234. package/esm2022/lib/services/storage/storage.service.mock.mjs +1 -1
  235. package/esm2022/lib/services/store/actions/app.actions.mjs +3 -1
  236. package/esm2022/lib/services/store/actions/notifications.actions.mjs +3 -1
  237. package/esm2022/lib/services/store/actions/user.actions.mjs +3 -1
  238. package/esm2022/lib/services/store/effects/app.effects.mjs +4 -4
  239. package/esm2022/lib/services/store/reducers/app.reducers.mjs +2 -3
  240. package/esm2022/lib/services/store/reducers/core.reducers.mjs +3 -1
  241. package/esm2022/lib/services/store/reducers/i18n.reducers.mjs +2 -2
  242. package/esm2022/lib/services/store/reducers/locale.reducers.mjs +1 -1
  243. package/esm2022/lib/services/store/reducers/meta.reducers.mjs +4 -2
  244. package/esm2022/lib/services/store/reducers/notifications.reducers.mjs +2 -2
  245. package/esm2022/lib/services/store/reducers/user.reducers.mjs +2 -2
  246. package/esm2022/lib/services/store/store.service.mjs +14 -6
  247. package/esm2022/lib/services/store/store.service.mock.mjs +4 -4
  248. package/esm2022/lib/services/user/user.service.mjs +13 -7
  249. package/esm2022/lib/services/user/user.service.mock.mjs +11 -17
  250. package/fesm2022/eui-core.mjs +825 -591
  251. package/fesm2022/eui-core.mjs.map +1 -1
  252. package/lib/eui-core.module.d.ts +1 -1
  253. package/lib/eui-core.module.d.ts.map +1 -1
  254. package/lib/helpers/date-helpers.d.ts.map +1 -1
  255. package/lib/helpers/dom-helpers.d.ts +9 -7
  256. package/lib/helpers/dom-helpers.d.ts.map +1 -1
  257. package/lib/helpers/event-helpers.d.ts.map +1 -1
  258. package/lib/helpers/form-helpers.d.ts.map +1 -1
  259. package/lib/helpers/format-helpers.d.ts.map +1 -1
  260. package/lib/helpers/http-helpers.d.ts +2 -1
  261. package/lib/helpers/http-helpers.d.ts.map +1 -1
  262. package/lib/interceptors/add-lang-param.interceptor.d.ts +1 -1
  263. package/lib/interceptors/add-lang-param.interceptor.d.ts.map +1 -1
  264. package/lib/interceptors/cache-prevention.interceptor.d.ts +1 -1
  265. package/lib/interceptors/cache-prevention.interceptor.d.ts.map +1 -1
  266. package/lib/interceptors/cors-security.interceptor.d.ts +1 -1
  267. package/lib/interceptors/cors-security.interceptor.d.ts.map +1 -1
  268. package/lib/interceptors/csrf-prevention.interceptor.d.ts +1 -1
  269. package/lib/interceptors/csrf-prevention.interceptor.d.ts.map +1 -1
  270. package/lib/interceptors/eu-login-session-timeout-handling.interceptor.d.ts +1 -1
  271. package/lib/interceptors/eu-login-session-timeout-handling.interceptor.d.ts.map +1 -1
  272. package/lib/interceptors/openid/openid-connect.interceptor.d.ts.map +1 -1
  273. package/lib/interceptors/openid/openid-connect.service.d.ts.map +1 -1
  274. package/lib/interceptors/ux-request-error-model.interceptor.d.ts.map +1 -1
  275. package/lib/services/app/eui-init-app.d.ts +1 -1
  276. package/lib/services/app/eui-init-app.d.ts.map +1 -1
  277. package/lib/services/config/tokens.d.ts +2 -2
  278. package/lib/services/config/tokens.d.ts.map +1 -1
  279. package/lib/services/dynamic-component/dynamic-component.service.d.ts +3 -7
  280. package/lib/services/dynamic-component/dynamic-component.service.d.ts.map +1 -1
  281. package/lib/services/dynamic-menu/dynamic-menu.service.d.ts +6 -6
  282. package/lib/services/dynamic-menu/dynamic-menu.service.d.ts.map +1 -1
  283. package/lib/services/errors/eui.error.d.ts.map +1 -1
  284. package/lib/services/errors/global-error-handler.d.ts +1 -1
  285. package/lib/services/errors/global-error-handler.d.ts.map +1 -1
  286. package/lib/services/errors/http-error-handler-callback-functions.d.ts.map +1 -1
  287. package/lib/services/errors/http-error-handler.interceptor.d.ts.map +1 -1
  288. package/lib/services/eui-app-shell.service.d.ts +39 -10
  289. package/lib/services/eui-app-shell.service.d.ts.map +1 -1
  290. package/lib/services/i18n/i18n.loader.d.ts.map +1 -1
  291. package/lib/services/i18n/i18n.resource.d.ts +1 -1
  292. package/lib/services/i18n/i18n.resource.d.ts.map +1 -1
  293. package/lib/services/i18n/i18n.service.d.ts +4 -4
  294. package/lib/services/i18n/i18n.service.d.ts.map +1 -1
  295. package/lib/services/i18n/index.d.ts +0 -1
  296. package/lib/services/i18n/index.d.ts.map +1 -1
  297. package/lib/services/locale/locale.service.d.ts.map +1 -1
  298. package/lib/services/log/log.service.d.ts.map +1 -1
  299. package/lib/services/log/log.service.mock.d.ts.map +1 -1
  300. package/lib/services/permission/permission.service.d.ts.map +1 -1
  301. package/lib/services/queue/api-queue.service.d.ts +2 -2
  302. package/lib/services/queue/api-queue.service.d.ts.map +1 -1
  303. package/lib/services/queue/api-queue.service.mock.d.ts.map +1 -1
  304. package/lib/services/storage/async-storage.service.d.ts.map +1 -1
  305. package/lib/services/storage/async-storage.service.mock.d.ts.map +1 -1
  306. package/lib/services/storage/local-forage.service.d.ts +1 -1
  307. package/lib/services/storage/local-forage.service.d.ts.map +1 -1
  308. package/lib/services/storage/local-storage.service.d.ts.map +1 -1
  309. package/lib/services/storage/session-storage.service.d.ts.map +1 -1
  310. package/lib/services/storage/storage.service.d.ts.map +1 -1
  311. package/lib/services/storage/storage.service.mock.d.ts +1 -1
  312. package/lib/services/storage/storage.service.mock.d.ts.map +1 -1
  313. package/lib/services/store/actions/app.actions.d.ts.map +1 -1
  314. package/lib/services/store/actions/notifications.actions.d.ts.map +1 -1
  315. package/lib/services/store/actions/user.actions.d.ts.map +1 -1
  316. package/lib/services/store/reducers/app.reducers.d.ts.map +1 -1
  317. package/lib/services/store/reducers/core.reducers.d.ts.map +1 -1
  318. package/lib/services/store/reducers/meta.reducers.d.ts +2 -2
  319. package/lib/services/store/reducers/meta.reducers.d.ts.map +1 -1
  320. package/lib/services/store/reducers/user.reducers.d.ts.map +1 -1
  321. package/lib/services/store/store.service.d.ts +8 -8
  322. package/lib/services/store/store.service.d.ts.map +1 -1
  323. package/lib/services/store/store.service.mock.d.ts +2 -1
  324. package/lib/services/store/store.service.mock.d.ts.map +1 -1
  325. package/lib/services/user/user.service.d.ts +3 -3
  326. package/lib/services/user/user.service.d.ts.map +1 -1
  327. package/lib/services/user/user.service.mock.d.ts +10 -12
  328. package/lib/services/user/user.service.mock.d.ts.map +1 -1
  329. package/package.json +2 -2
  330. package/esm2022/lib/services/i18n/i18n.service.mock.mjs +0 -38
  331. package/lib/services/i18n/i18n.service.mock.d.ts +0 -20
  332. package/lib/services/i18n/i18n.service.mock.d.ts.map +0 -1
@@ -0,0 +1,6 @@
1
+ /**
2
+ * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9
3
+ * Copyright (C) 2020 Oliver Nightingale
4
+ * @license MIT
5
+ */
6
+ !function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.9",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){var n=r[i],s=e[n];if(Array.isArray(s))t[n]=s.slice();else{if("string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s)throw new TypeError("clone is not deep and does not support nested objects");t[n]=s}}return t},e.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r},e.FieldRef.joiner="/",e.FieldRef.fromString=function(t){var r=t.indexOf(e.FieldRef.joiner);if(r===-1)throw"malformed field ref string";var i=t.slice(0,r),n=t.slice(r+1);return new e.FieldRef(n,i,t)},e.FieldRef.prototype.toString=function(){return void 0==this._stringValue&&(this._stringValue=this.fieldName+e.FieldRef.joiner+this.docRef),this._stringValue},e.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},e.Set.complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},e.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},e.Set.prototype.contains=function(e){return!!this.elements[e]},e.Set.prototype.intersect=function(t){var r,i,n,s=[];if(t===e.Set.complete)return this;if(t===e.Set.empty)return t;this.length<t.length?(r=this,i=t):(r=t,i=this),n=Object.keys(r.elements);for(var o=0;o<n.length;o++){var a=n[o];a in i.elements&&s.push(a)}return new e.Set(s)},e.Set.prototype.union=function(t){return t===e.Set.complete?e.Set.complete:t===e.Set.empty?this:new e.Set(Object.keys(this.elements).concat(Object.keys(t.elements)))},e.idf=function(e,t){var r=0;for(var i in e)"_index"!=i&&(r+=Object.keys(e[i]).length);var n=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(n))},e.Token=function(e,t){this.str=e||"",this.metadata=t||{}},e.Token.prototype.toString=function(){return this.str},e.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},e.Token.prototype.clone=function(t){return t=t||function(e){return e},new e.Token(t(this.str,this.metadata),this.metadata)},e.tokenizer=function(t,r){if(null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(t){return new e.Token(e.utils.asString(t).toLowerCase(),e.utils.clone(r))});for(var i=t.toString().toLowerCase(),n=i.length,s=[],o=0,a=0;o<=n;o++){var u=i.charAt(o),l=o-a;if(u.match(e.tokenizer.separator)||o==n){if(l>0){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r<t;r++){for(var i=this._stack[r],n=[],s=0;s<e.length;s++){var o=i(e[s],s,e);if(null!==o&&void 0!==o&&""!==o)if(Array.isArray(o))for(var a=0;a<o.length;a++)n.push(o[a]);else n.push(o)}e=n}return e},e.Pipeline.prototype.runString=function(t,r){var i=new e.Token(t,r);return this.run([i]).map(function(e){return e.toString()})},e.Pipeline.prototype.reset=function(){this._stack=[]},e.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return e.Pipeline.warnIfFunctionNotRegistered(t),t.label})},e.Vector=function(e){this._magnitude=0,this.elements=e||[]},e.Vector.prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,r=this.elements.length/2,i=r-t,n=Math.floor(i/2),s=this.elements[2*n];i>1&&(s<e&&(t=n),s>e&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:s<e?2*(n+1):void 0},e.Vector.prototype.insert=function(e,t){this.upsert(e,t,function(){throw"duplicate index"})},e.Vector.prototype.upsert=function(e,t,r){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=r(this.elements[i+1],t):this.elements.splice(i,0,e,t)},e.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,r=1;r<t;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},e.Vector.prototype.dot=function(e){for(var t=0,r=this.elements,i=e.elements,n=r.length,s=i.length,o=0,a=0,u=0,l=0;u<n&&l<s;)o=r[u],a=i[l],o<a?u+=2:o>a?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t<this.elements.length;t+=2,r++)e[r]=this.elements[t];return e},e.Vector.prototype.toJSON=function(){return this.elements},e.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"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},r="[^aeiou]",i="[aeiouy]",n=r+"[^aeiouy]*",s=i+"[aeiou]*",o="^("+n+")?"+s+n,a="^("+n+")?"+s+n+"("+s+")?$",u="^("+n+")?"+s+n+s+n,l="^("+n+")?"+i,c=new RegExp(o),h=new RegExp(u),d=new RegExp(a),f=new RegExp(l),p=/^(.+?)(ss|i)es$/,y=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,v=/^(.+?)(ed|ing)$/,g=/.$/,x=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),Q=new RegExp("^"+n+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,S=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,L=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,b=/^(.+?)(s|t)(ion)$/,P=/^(.+?)e$/,T=/ll$/,O=new RegExp("^"+n+i+"[^aeiouwxy]$"),I=function(r){var i,n,s,o,a,u,l;if(r.length<3)return r;if(s=r.substr(0,1),"y"==s&&(r=s.toUpperCase()+r.substr(1)),o=p,a=y,o.test(r)?r=r.replace(o,"$1$2"):a.test(r)&&(r=r.replace(a,"$1$2")),o=m,a=v,o.test(r)){var I=o.exec(r);o=c,o.test(I[1])&&(o=g,r=r.replace(o,""))}else if(a.test(r)){var I=a.exec(r);i=I[1],a=f,a.test(i)&&(r=i,a=x,u=w,l=Q,a.test(r)?r+="e":u.test(r)?(o=g,r=r.replace(o,"")):l.test(r)&&(r+="e"))}if(o=k,o.test(r)){var I=o.exec(r);i=I[1],r=i+"i"}if(o=S,o.test(r)){var I=o.exec(r);i=I[1],n=I[2],o=c,o.test(i)&&(r=i+e[n])}if(o=E,o.test(r)){var I=o.exec(r);i=I[1],n=I[2],o=c,o.test(i)&&(r=i+t[n])}if(o=L,a=b,o.test(r)){var I=o.exec(r);i=I[1],o=h,o.test(i)&&(r=i)}else if(a.test(r)){var I=a.exec(r);i=I[1]+I[2],a=h,a.test(i)&&(r=i)}if(o=P,o.test(r)){var I=o.exec(r);i=I[1],o=h,a=d,u=O,(o.test(i)||a.test(i)&&!u.test(i))&&(r=i)}return o=T,a=h,o.test(r)&&a.test(r)&&(o=g,r=r.replace(o,"")),"y"==s&&(r=s.toLowerCase()+r.substr(1)),r};return function(e){return e.update(I)}}(),e.Pipeline.registerFunction(e.stemmer,"stemmer"),e.generateStopWordFilter=function(e){var t=e.reduce(function(e,t){return e[t]=t,e},{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},e.stopWordFilter=e.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"]),e.Pipeline.registerFunction(e.stopWordFilter,"stopWordFilter"),e.trimmer=function(e){return e.update(function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")})},e.Pipeline.registerFunction(e.trimmer,"trimmer"),e.TokenSet=function(){this["final"]=!1,this.edges={},this.id=e.TokenSet._nextId,e.TokenSet._nextId+=1},e.TokenSet._nextId=1,e.TokenSet.fromArray=function(t){for(var r=new e.TokenSet.Builder,i=0,n=t.length;i<n;i++)r.insert(t[i]);return r.finish(),r.root},e.TokenSet.fromClause=function(t){return"editDistance"in t?e.TokenSet.fromFuzzyString(t.term,t.editDistance):e.TokenSet.fromString(t.term)},e.TokenSet.fromFuzzyString=function(t,r){for(var i=new e.TokenSet,n=[{node:i,editsRemaining:r,str:t}];n.length;){var s=n.pop();if(s.str.length>0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n<s;n++){var o=t[n],a=n==s-1;if("*"==o)r.edges[o]=r,r["final"]=a;else{var u=new e.TokenSet;u["final"]=a,r.edges[o]=u,r=u}}return i},e.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var r=t.pop(),i=Object.keys(r.node.edges),n=i.length;r.node["final"]&&(r.prefix.charAt(0),e.push(r.prefix));for(var s=0;s<n;s++){var o=i[s];t.push({prefix:r.prefix.concat(o),node:r.node.edges[o]})}}return e},e.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this["final"]?"1":"0",t=Object.keys(this.edges).sort(),r=t.length,i=0;i<r;i++){var n=t[i],s=this.edges[n];e=e+n+s.id}return e},e.TokenSet.prototype.intersect=function(t){for(var r=new e.TokenSet,i=void 0,n=[{qNode:t,output:r,node:this}];n.length;){i=n.pop();for(var s=Object.keys(i.qNode.edges),o=s.length,a=Object.keys(i.node.edges),u=a.length,l=0;l<o;l++)for(var c=s[l],h=0;h<u;h++){var d=a[h];if(d==c||"*"==c){var f=i.node.edges[d],p=i.qNode.edges[c],y=f["final"]&&p["final"],m=void 0;d in i.output.edges?(m=i.output.edges[d],m["final"]=m["final"]||y):(m=new e.TokenSet,m["final"]=y,i.output.edges[d]=m),n.push({qNode:p,output:m,node:f})}}}return r},e.TokenSet.Builder=function(){this.previousWord="",this.root=new e.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},e.TokenSet.Builder.prototype.insert=function(t){var r,i=0;if(t<this.previousWord)throw new Error("Out of order word insertion");for(var n=0;n<t.length&&n<this.previousWord.length&&t[n]==this.previousWord[n];n++)i++;this.minimize(i),r=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(var n=i;n<t.length;n++){var s=new e.TokenSet,o=t[n];r.edges[o]=s,this.uncheckedNodes.push({parent:r,"char":o,child:s}),r=s}r["final"]=!0,this.previousWord=t},e.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},e.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var r=this.uncheckedNodes[t],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()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u<this.fields.length;u++)n[this.fields[u]]=new e.Vector;t.call(r,r);for(var u=0;u<r.clauses.length;u++){var l=r.clauses[u],c=null,h=e.Set.empty;c=l.usePipeline?this.pipeline.runString(l.term,{fields:l.fields}):[l.term];for(var d=0;d<c.length;d++){var f=c[d];l.term=f;var p=e.TokenSet.fromClause(l),y=this.tokenSet.intersect(p).toArray();if(0===y.length&&l.presence===e.Query.presence.REQUIRED){for(var m=0;m<l.fields.length;m++){var v=l.fields[m];o[v]=e.Set.empty}break}for(var g=0;g<y.length;g++)for(var x=y[g],w=this.invertedIndex[x],Q=w._index,m=0;m<l.fields.length;m++){var v=l.fields[m],k=w[v],S=Object.keys(k),E=x+"/"+v,L=new e.Set(S);if(l.presence==e.Query.presence.REQUIRED&&(h=h.union(L),void 0===o[v]&&(o[v]=e.Set.complete)),l.presence!=e.Query.presence.PROHIBITED){if(n[v].upsert(Q,l.boost,function(e,t){return e+t}),!s[E]){for(var b=0;b<S.length;b++){var P,T=S[b],O=new e.FieldRef(T,v),I=k[T];void 0===(P=i[O])?i[O]=new e.MatchData(x,v,I):P.add(x,v,I)}s[E]=!0}}else void 0===a[v]&&(a[v]=e.Set.empty),a[v]=a[v].union(L)}}if(l.presence===e.Query.presence.REQUIRED)for(var m=0;m<l.fields.length;m++){var v=l.fields[m];o[v]=o[v].intersect(h)}}for(var R=e.Set.complete,F=e.Set.empty,u=0;u<this.fields.length;u++){var v=this.fields[u];o[v]&&(R=R.intersect(o[v])),a[v]&&(F=F.union(a[v]))}var C=Object.keys(i),N=[],_=Object.create(null);if(r.isNegated()){C=Object.keys(this.fieldVectors);for(var u=0;u<C.length;u++){var O=C[u],j=e.FieldRef.fromString(O);i[O]=new e.MatchData}}for(var u=0;u<C.length;u++){var j=e.FieldRef.fromString(C[u]),D=j.docRef;if(R.contains(D)&&!F.contains(D)){var A,B=this.fieldVectors[j],V=n[j.fieldName].similarity(B);if(void 0!==(A=_[D]))A.score+=V,A.matchData.combine(i[j]);else{var z={ref:D,score:V,matchData:i[j]};_[D]=z,N.push(z)}}}return N.sort(function(e,t){return t.score-e.score})},e.Index.prototype.toJSON=function(){var t=Object.keys(this.invertedIndex).sort().map(function(e){return[e,this.invertedIndex[e]]},this),r=Object.keys(this.fieldVectors).map(function(e){return[e,this.fieldVectors[e].toJSON()]},this);return{version:e.version,fields:this.fields,fieldVectors:r,invertedIndex:t,pipeline:this.pipeline.toJSON()}},e.Index.load=function(t){var r={},i={},n=t.fieldVectors,s=Object.create(null),o=t.invertedIndex,a=new e.TokenSet.Builder,u=e.Pipeline.load(t.pipeline);t.version!=e.version&&e.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+e.version+"' does not match serialized index '"+t.version+"'");for(var l=0;l<n.length;l++){var c=n[l],h=c[0],d=c[1];i[h]=new e.Vector(d)}for(var l=0;l<o.length;l++){var c=o[l],f=c[0],p=c[1];a.insert(f),s[f]=p}return a.finish(),r.fields=t.fields,r.fieldVectors=i,r.invertedIndex=s,r.tokenSet=a.root,r.pipeline=u,new e.Index(r)},e.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=e.tokenizer,this.pipeline=new e.Pipeline,this.searchPipeline=new e.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},e.Builder.prototype.ref=function(e){this._ref=e},e.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},e.Builder.prototype.b=function(e){e<0?this._b=0:e>1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s<n.length;s++){var o=n[s],a=this._fields[o].extractor,u=a?a(t):t[o],l=this.tokenizer(u,{fields:[o]}),c=this.pipeline.run(l),h=new e.FieldRef(i,o),d=Object.create(null);this.fieldTermFrequencies[h]=d,this.fieldLengths[h]=0,this.fieldLengths[h]+=c.length;for(var f=0;f<c.length;f++){var p=c[f];if(void 0==d[p]&&(d[p]=0),d[p]+=1,void 0==this.invertedIndex[p]){var y=Object.create(null);y._index=this.termIndex,this.termIndex+=1;for(var m=0;m<n.length;m++)y[n[m]]=Object.create(null);this.invertedIndex[p]=y}void 0==this.invertedIndex[p][o][i]&&(this.invertedIndex[p][o][i]=Object.create(null));for(var v=0;v<this.metadataWhitelist.length;v++){var g=this.metadataWhitelist[v],x=p.metadata[g];void 0==this.invertedIndex[p][o][i][g]&&(this.invertedIndex[p][o][i][g]=[]),this.invertedIndex[p][o][i][g].push(x)}}}},e.Builder.prototype.calculateAverageFieldLengths=function(){for(var t=Object.keys(this.fieldLengths),r=t.length,i={},n={},s=0;s<r;s++){var o=e.FieldRef.fromString(t[s]),a=o.fieldName;n[a]||(n[a]=0),n[a]+=1,i[a]||(i[a]=0),i[a]+=this.fieldLengths[o]}for(var u=Object.keys(this._fields),s=0;s<u.length;s++){var l=u[s];i[l]=i[l]/n[l]}this.averageFieldLength=i},e.Builder.prototype.createFieldVectors=function(){for(var t={},r=Object.keys(this.fieldTermFrequencies),i=r.length,n=Object.create(null),s=0;s<i;s++){for(var o=e.FieldRef.fromString(r[s]),a=o.fieldName,u=this.fieldLengths[o],l=new e.Vector,c=this.fieldTermFrequencies[o],h=Object.keys(c),d=h.length,f=this._fields[a].boost||1,p=this._documents[o.docRef].boost||1,y=0;y<d;y++){var m,v,g,x=h[y],w=c[x],Q=this.invertedIndex[x]._index;void 0===n[x]?(m=e.idf(this.invertedIndex[x],this.documentCount),n[x]=m):m=n[x],v=m*((this._k1+1)*w)/(this._k1*(1-this._b+this._b*(u/this.averageFieldLength[a]))+w),v*=f,v*=p,g=Math.round(1e3*v)/1e3,l.insert(Q,g)}t[o]=l}this.fieldVectors=t},e.Builder.prototype.createTokenSet=function(){this.tokenSet=e.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},e.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new e.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},e.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},e.MatchData=function(e,t,r){for(var i=Object.create(null),n=Object.keys(r||{}),s=0;s<n.length;s++){var o=n[s];i[o]=r[o].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=i)},e.MatchData.prototype.combine=function(e){for(var t=Object.keys(e.metadata),r=0;r<t.length;r++){var i=t[r],n=Object.keys(e.metadata[i]);void 0==this.metadata[i]&&(this.metadata[i]=Object.create(null));for(var s=0;s<n.length;s++){var o=n[s],a=Object.keys(e.metadata[i][o]);void 0==this.metadata[i][o]&&(this.metadata[i][o]=Object.create(null));for(var u=0;u<a.length;u++){var l=a[u];void 0==this.metadata[i][o][l]?this.metadata[i][o][l]=e.metadata[i][o][l]:this.metadata[i][o][l]=this.metadata[i][o][l].concat(e.metadata[i][o][l])}}}},e.MatchData.prototype.add=function(e,t,r){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=r);if(!(t in this.metadata[e]))return void(this.metadata[e][t]=r);for(var i=Object.keys(r),n=0;n<i.length;n++){var s=i[n];s in this.metadata[e][t]?this.metadata[e][t][s]=this.metadata[e][t][s].concat(r[s]):this.metadata[e][t][s]=r[s]}},e.Query=function(e){this.clauses=[],this.allFields=e},e.Query.wildcard=new String("*"),e.Query.wildcard.NONE=0,e.Query.wildcard.LEADING=1,e.Query.wildcard.TRAILING=2,e.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},e.Query.prototype.clause=function(t){return"fields"in t||(t.fields=this.allFields),"boost"in t||(t.boost=1),"usePipeline"in t||(t.usePipeline=!0),"wildcard"in t||(t.wildcard=e.Query.wildcard.NONE),t.wildcard&e.Query.wildcard.LEADING&&t.term.charAt(0)!=e.Query.wildcard&&(t.term="*"+t.term),t.wildcard&e.Query.wildcard.TRAILING&&t.term.slice(-1)!=e.Query.wildcard&&(t.term=""+t.term+"*"),"presence"in t||(t.presence=e.Query.presence.OPTIONAL),this.clauses.push(t),this},e.Query.prototype.isNegated=function(){for(var t=0;t<this.clauses.length;t++)if(this.clauses[t].presence!=e.Query.presence.PROHIBITED)return!1;return!0},e.Query.prototype.term=function(t,r){if(Array.isArray(t))return t.forEach(function(t){this.term(t,e.utils.clone(r))},this),this;var i=r||{};return i.term=t.toString(),this.clause(i),this},e.QueryParseError=function(e,t,r){this.name="QueryParseError",this.message=e,this.start=t,this.end=r},e.QueryParseError.prototype=new Error,e.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},e.QueryLexer.prototype.run=function(){for(var t=e.QueryLexer.lexText;t;)t=t(this)},e.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],e.push(this.str.slice(t,r)),t=r+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},e.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},e.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},e.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos<this.length},e.QueryLexer.EOS="EOS",e.QueryLexer.FIELD="FIELD",e.QueryLexer.TERM="TERM",e.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",e.QueryLexer.BOOST="BOOST",e.QueryLexer.PRESENCE="PRESENCE",e.QueryLexer.lexField=function(t){return t.backup(),t.emit(e.QueryLexer.FIELD),t.ignore(),e.QueryLexer.lexText},e.QueryLexer.lexTerm=function(t){if(t.width()>1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}();
@@ -0,0 +1,67 @@
1
+ (function(compodoc) {
2
+
3
+ function LunrSearchEngine() {
4
+ this.index = undefined;
5
+ this.store = {};
6
+ this.name = 'LunrSearchEngine';
7
+ }
8
+
9
+ LunrSearchEngine.prototype.init = function() {
10
+ var that = this,
11
+ d = new promise.Promise();
12
+
13
+ that.index = lunr.Index.load(COMPODOC_SEARCH_INDEX.index);
14
+ that.store = COMPODOC_SEARCH_INDEX.store;
15
+ d.done();
16
+
17
+ return d;
18
+ };
19
+
20
+ LunrSearchEngine.prototype.search = function(q, offset, length) {
21
+ var that = this,
22
+ results = [],
23
+ d = new promise.Promise();
24
+
25
+ if (this.index) {
26
+ results = $.map(this.index.search('*' + q + '*'), function(result) {
27
+ var doc = that.store[result.ref];
28
+
29
+ return {
30
+ title: doc.title,
31
+ url: doc.url,
32
+ body: doc.summary || doc.body
33
+ };
34
+ });
35
+ }
36
+
37
+ d.done({
38
+ query: q,
39
+ results: length === 0 ? results : results.slice(0, length),
40
+ count: results.length
41
+ });
42
+
43
+ return d;
44
+ };
45
+
46
+ compodoc.addEventListener(compodoc.EVENTS.READY, function(event) {
47
+ var engine = new LunrSearchEngine(),
48
+ initialized = false;
49
+
50
+ function query(q, offset, length) {
51
+ if (!initialized) throw new Error('Search has not been initialized');
52
+ return engine.search(q, offset, length);
53
+ }
54
+
55
+ compodoc.search = {
56
+ query: query
57
+ };
58
+
59
+ engine.init()
60
+ .then(function() {
61
+ initialized = true;
62
+ compodoc.dispatchEvent({
63
+ type: compodoc.EVENTS.SEARCH_READY
64
+ });
65
+ });
66
+ });
67
+ })(compodoc);
@@ -0,0 +1,268 @@
1
+ (function(compodoc) {
2
+ var usePushState = (typeof history.pushState !== 'undefined'),
3
+
4
+ // DOM Elements
5
+ $body = $('body'),
6
+ $searchResults,
7
+ $searchInput,
8
+ $searchList,
9
+ $searchTitle,
10
+ $searchResultsCount,
11
+ $searchQuery,
12
+ $mainContainer,
13
+ $xsMenu;
14
+
15
+ // Throttle search
16
+ function throttle(fn, wait) {
17
+ var timeout;
18
+
19
+ return function() {
20
+ var ctx = this, args = arguments;
21
+ if (!timeout) {
22
+ timeout = setTimeout(function() {
23
+ timeout = undefined;
24
+ fn.apply(ctx, args);
25
+ }, wait);
26
+ }
27
+ };
28
+ }
29
+
30
+ function displayResults(res) {
31
+ var noResults = res.count == 0;
32
+ var groups = {};
33
+ $searchResults.toggleClass('no-results', noResults);
34
+
35
+ // Clear old results
36
+ $searchList.empty();
37
+
38
+ // Display title for research
39
+ $searchResultsCount.text(res.count);
40
+ $searchQuery.text(res.query);
41
+
42
+ // Group result by context
43
+ res.results.forEach(function(res) {
44
+ var context = res.title.split(' - ')[0];
45
+ if (typeof groups[context] === 'undefined') {
46
+ groups[context] = {
47
+ results: [res]
48
+ }
49
+ } else {
50
+ groups[context].results.push(res)
51
+ }
52
+ });
53
+
54
+ var sortedGroups = Object.keys(groups).sort();
55
+
56
+ for (var i = 0; i < sortedGroups.length; i++) {
57
+ var property = sortedGroups[i];
58
+
59
+ var $li = $('<li>', {
60
+ 'class': 'search-results-group'
61
+ });
62
+ var finalPropertyLabel = '';
63
+ var propertyLabels = property.split('-');
64
+
65
+ if (propertyLabels.length === 2 && propertyLabels[0] !== 'miscellaneous' && propertyLabels[0] !== 'additional') {
66
+ finalPropertyLabel = propertyLabels[0].charAt(0).toUpperCase() + propertyLabels[0].substring(1) + ' - ' + propertyLabels[1].charAt(0).toUpperCase() + propertyLabels[1].substring(1) + ' (' + groups[property].results.length + ')';
67
+ } else if (propertyLabels[0] === 'additional') {
68
+ finalPropertyLabel = 'Additional pages' + ' (' + groups[property].results.length + ')'
69
+ } else {
70
+ finalPropertyLabel = propertyLabels[0].charAt(0).toUpperCase() + propertyLabels[0].substring(1) + ' (' + groups[property].results.length + ')'
71
+ }
72
+ var $groupTitle = $('<h3>', {
73
+ 'text': finalPropertyLabel
74
+ });
75
+ $groupTitle.appendTo($li);
76
+
77
+ var $ulResults = $('<ul>', {
78
+ 'class': 'search-results-list'
79
+ })
80
+
81
+ groups[property].results.forEach(function(res) {
82
+ var link = '';
83
+ var $liResult = $('<li>', {
84
+ 'class': 'search-results-item'
85
+ });
86
+ switch (COMPODOC_CURRENT_PAGE_DEPTH) {
87
+ case 0:
88
+ link = './';
89
+ break;
90
+ case 1:
91
+ case 2:
92
+ case 3:
93
+ case 4:
94
+ case 5:
95
+ link = '../'.repeat(COMPODOC_CURRENT_PAGE_DEPTH);
96
+ break;
97
+ };
98
+ var finalResLabel = res.title.split(' - ')[1].charAt(0).toUpperCase() + res.title.split(' - ')[1].substring(1);
99
+ var $link = $('<a>', {
100
+ 'href': link + res.url,
101
+ 'text': finalResLabel
102
+ });
103
+ $link.appendTo($liResult);
104
+ $liResult.appendTo($ulResults);
105
+ });
106
+ $ulResults.appendTo($li);
107
+
108
+ $li.appendTo($searchList);
109
+ }
110
+ }
111
+
112
+ function launchSearch(q) {
113
+ $body.addClass('with-search');
114
+
115
+ if ($xsMenu.css('display') === 'block') {
116
+ $mainContainer.css('height', 'calc(100% - 100px)');
117
+ $mainContainer.css('margin-top', '100px');
118
+ }
119
+
120
+ throttle(compodoc.search.query(q, 0, MAX_SEARCH_RESULTS)
121
+ .then(function(results) {
122
+ displayResults(results);
123
+ }), 1000);
124
+ }
125
+
126
+ function closeSearch() {
127
+ $body.removeClass('with-search');
128
+ if ($xsMenu.css('display') === 'block') {
129
+ $mainContainer.css('height', 'calc(100% - 50px)');
130
+ $mainContainer.css('margin-top', '50px');
131
+ }
132
+ }
133
+
134
+ function bindMenuButton() {
135
+ document.getElementById('btn-menu').addEventListener('click', function() {
136
+ if ($xsMenu.css('display') === 'none') {
137
+ $body.removeClass('with-search');
138
+ $mainContainer.css('height', 'calc(100% - 50px)');
139
+ $mainContainer.css('margin-top', '50px');
140
+ }
141
+ $.each($searchInputs, function(index, item){
142
+ var item = $(item);
143
+ item.val('');
144
+ });
145
+ });
146
+ }
147
+
148
+ function bindSearch() {
149
+ // Bind DOM
150
+ $searchInputs = $('#book-search-input input');
151
+
152
+ $searchResults = $('.search-results');
153
+ $searchList = $searchResults.find('.search-results-list');
154
+ $searchTitle = $searchResults.find('.search-results-title');
155
+ $searchResultsCount = $searchTitle.find('.search-results-count');
156
+ $searchQuery = $searchTitle.find('.search-query');
157
+ $mainContainer = $('.container-fluid');
158
+ $xsMenu = $('.xs-menu');
159
+
160
+ // Launch query based on input content
161
+ function handleUpdate(item) {
162
+ var q = item.val();
163
+
164
+ if (q.length == 0) {
165
+ closeSearch();
166
+ window.location.href = window.location.href.replace(window.location.search, '');
167
+ } else {
168
+ launchSearch(q);
169
+ }
170
+ }
171
+
172
+ // Detect true content change in search input
173
+ var propertyChangeUnbound = false;
174
+
175
+ $.each($searchInputs, function(index, item){
176
+ var item = $(item);
177
+ // HTML5 (IE9 & others)
178
+ item.on('input', function(e) {
179
+ // Unbind propertychange event for IE9+
180
+ if (!propertyChangeUnbound) {
181
+ $(this).unbind('propertychange');
182
+ propertyChangeUnbound = true;
183
+ }
184
+
185
+ handleUpdate($(this));
186
+ });
187
+ // Workaround for IE < 9
188
+ item.on('propertychange', function(e) {
189
+ if (e.originalEvent.propertyName == 'value') {
190
+ handleUpdate($(this));
191
+ }
192
+ });
193
+ // Push to history on blur
194
+ item.on('blur', function(e) {
195
+ // Update history state
196
+ if (usePushState) {
197
+ var uri = updateQueryString('q', $(this).val());
198
+ if ($(this).val() !== '') {
199
+ history.pushState({ path: uri }, null, uri);
200
+ }
201
+ }
202
+ });
203
+ });
204
+ }
205
+
206
+ function launchSearchFromQueryString() {
207
+ var q = getParameterByName('q');
208
+ if (q && q.length > 0) {
209
+ // Update search inputs
210
+ $.each($searchInputs, function(index, item){
211
+ var item = $(item);
212
+ item.val(q)
213
+ });
214
+ // Launch search
215
+ launchSearch(q);
216
+ }
217
+ }
218
+
219
+ compodoc.addEventListener(compodoc.EVENTS.SEARCH_READY, function(event) {
220
+ bindSearch();
221
+
222
+ bindMenuButton();
223
+
224
+ launchSearchFromQueryString();
225
+ });
226
+
227
+ function getParameterByName(name) {
228
+ var url = window.location.href;
229
+ name = name.replace(/[\[\]]/g, '\\$&');
230
+ var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', 'i'),
231
+ results = regex.exec(url);
232
+ if (!results) return null;
233
+ if (!results[2]) return '';
234
+ return decodeURIComponent(results[2].replace(/\+/g, ' '));
235
+ }
236
+
237
+ function updateQueryString(key, value) {
238
+ value = encodeURIComponent(value);
239
+
240
+ var url = window.location.href;
241
+ var re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'),
242
+ hash;
243
+
244
+ if (re.test(url)) {
245
+ if (typeof value !== 'undefined' && value !== null)
246
+ return url.replace(re, '$1' + key + '=' + value + '$2$3');
247
+ else {
248
+ hash = url.split('#');
249
+ url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, '');
250
+ if (typeof hash[1] !== 'undefined' && hash[1] !== null)
251
+ url += '#' + hash[1];
252
+ return url;
253
+ }
254
+ }
255
+ else {
256
+ if (typeof value !== 'undefined' && value !== null) {
257
+ var separator = url.indexOf('?') !== -1 ? '&' : '?';
258
+ hash = url.split('#');
259
+ url = hash[0] + separator + key + '=' + value;
260
+ if (typeof hash[1] !== 'undefined' && hash[1] !== null)
261
+ url += '#' + hash[1];
262
+ return url;
263
+ }
264
+ else
265
+ return url;
266
+ }
267
+ }
268
+ })(compodoc);