@fluxhub/fluxhub-lib 1.0.337 → 1.0.339

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 (192) hide show
  1. package/bundles/fluxhub-fluxhub-lib.umd.js +43 -47
  2. package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
  3. package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
  4. package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
  5. package/esm2015/lib/controls/fhgrid.js +39 -34
  6. package/esm2015/lib/wkf_engine/wkfdatiaggiuntivi.js +12 -12
  7. package/esm5/lib/controls/fhgrid.js +39 -39
  8. package/esm5/lib/wkf_engine/wkfdatiaggiuntivi.js +12 -12
  9. package/fesm2015/fluxhub-fluxhub-lib.js +43 -42
  10. package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
  11. package/fesm5/fluxhub-fluxhub-lib.js +43 -47
  12. package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
  13. package/fluxhub-fluxhub-lib.metadata.json +1 -1
  14. package/lib/controls/fhgrid.d.ts +6 -1
  15. package/package.json +1 -1
  16. package/docs/classes/CustomEvent.html +0 -264
  17. package/docs/classes/FHValueAccessor.html +0 -508
  18. package/docs/classes/MomentDateAdapter.html +0 -1988
  19. package/docs/classes/OfficeOperation.html +0 -270
  20. package/docs/classes/OfficeResult.html +0 -216
  21. package/docs/classes/dati_aggiuntivi.html +0 -5343
  22. package/docs/classes/dt.html +0 -314
  23. package/docs/classes/wkfapp.html +0 -2110
  24. package/docs/components/ApprovaGridComponent.html +0 -699
  25. package/docs/components/ComboBoxEditor.html +0 -932
  26. package/docs/components/CurrencyComponent.html +0 -391
  27. package/docs/components/DateComponent.html +0 -853
  28. package/docs/components/DtPick.html +0 -1075
  29. package/docs/components/FHAutoCompleteComponent.html +0 -2485
  30. package/docs/components/FHComboboxComponent.html +0 -1735
  31. package/docs/components/FHConfirmComponent.html +0 -591
  32. package/docs/components/FHCurrencyFieldComponent.html +0 -1434
  33. package/docs/components/FHDatePickerComponent.html +0 -1558
  34. package/docs/components/FHFieldPickListComponent.html +0 -1046
  35. package/docs/components/FHGridComponent.html +0 -4555
  36. package/docs/components/FHGridJSONComponent.html +0 -4530
  37. package/docs/components/FHGridToolBarComponent.html +0 -758
  38. package/docs/components/FHListComponent.html +0 -1589
  39. package/docs/components/FHListPick.html +0 -731
  40. package/docs/components/FHLogPanelComponent.html +0 -685
  41. package/docs/components/FHMdReader.html +0 -462
  42. package/docs/components/FHNumericFieldComponent.html +0 -1261
  43. package/docs/components/FHPickListComponent.html +0 -1565
  44. package/docs/components/FHRichText.html +0 -961
  45. package/docs/components/FHRoleManager.html +0 -524
  46. package/docs/components/FHTableManager.html +0 -524
  47. package/docs/components/FHTimePickerComponent.html +0 -1990
  48. package/docs/components/FHUploadComponent.html +0 -1376
  49. package/docs/components/FHUploadPanelComponent.html +0 -1271
  50. package/docs/components/FHUserFieldComponent.html +0 -1300
  51. package/docs/components/FHUserPickerComponent.html +0 -1118
  52. package/docs/components/FHViewerComponent.html +0 -1578
  53. package/docs/components/FHWinComboSelect.html +0 -701
  54. package/docs/components/FSInput.html +0 -327
  55. package/docs/components/FSResult.html +0 -317
  56. package/docs/components/FormBuilderComponent.html +0 -937
  57. package/docs/components/FormExecuterComponent.html +0 -692
  58. package/docs/components/NumericEditorComponent.html +0 -636
  59. package/docs/components/QGParam.html +0 -457
  60. package/docs/components/QGResult.html +0 -339
  61. package/docs/components/QParam.html +0 -354
  62. package/docs/components/QResult.html +0 -317
  63. package/docs/components/TextAreaEditor.html +0 -827
  64. package/docs/components/WinAskButtonsComponent.html +0 -505
  65. package/docs/components/WinAskNumberComponent.html +0 -679
  66. package/docs/components/WinAskTextBigComponent.html +0 -682
  67. package/docs/components/WinAskTextComponent.html +0 -669
  68. package/docs/components/WinOutputComponent.html +0 -631
  69. package/docs/components/WinWait.html +0 -564
  70. package/docs/components/fhimagepreview.html +0 -1151
  71. package/docs/components/win_assegna.html +0 -675
  72. package/docs/components/win_commenti.html +0 -1416
  73. package/docs/components/win_commento_sel_notif.html +0 -598
  74. package/docs/components/win_conferma.html +0 -677
  75. package/docs/components/win_grid_help.html +0 -461
  76. package/docs/components/win_info_doc.html +0 -700
  77. package/docs/components/win_log.html +0 -1631
  78. package/docs/components/win_manage_roles.html +0 -936
  79. package/docs/components/win_manage_values.html +0 -1009
  80. package/docs/components/win_mappa.html +0 -859
  81. package/docs/components/win_recupera_doc.html +0 -693
  82. package/docs/components/win_riassegna_select_level.html +0 -725
  83. package/docs/components/win_riassegna_select_user.html +0 -684
  84. package/docs/components/win_salva_annulla.html +0 -467
  85. package/docs/components/win_select_canale.html +0 -562
  86. package/docs/components/win_select_level.html +0 -717
  87. package/docs/components/win_show_image.html +0 -447
  88. package/docs/components/win_time_slider.html +0 -605
  89. package/docs/components/win_uploads.html +0 -1276
  90. package/docs/components/wkf_header_bar.html +0 -764
  91. package/docs/coverage.html +0 -1432
  92. package/docs/dependencies.html +0 -265
  93. package/docs/directives/DecimalMask.html +0 -338
  94. package/docs/directives/FHCurrencyFormatterDirective.html +0 -352
  95. package/docs/fonts/ionicons.eot +0 -0
  96. package/docs/fonts/ionicons.svg +0 -2090
  97. package/docs/fonts/ionicons.ttf +0 -0
  98. package/docs/fonts/ionicons.woff +0 -0
  99. package/docs/fonts/ionicons.woff2 +0 -0
  100. package/docs/fonts/roboto-v15-latin-300.eot +0 -0
  101. package/docs/fonts/roboto-v15-latin-300.svg +0 -314
  102. package/docs/fonts/roboto-v15-latin-300.ttf +0 -0
  103. package/docs/fonts/roboto-v15-latin-300.woff +0 -0
  104. package/docs/fonts/roboto-v15-latin-300.woff2 +0 -0
  105. package/docs/fonts/roboto-v15-latin-700.eot +0 -0
  106. package/docs/fonts/roboto-v15-latin-700.svg +0 -310
  107. package/docs/fonts/roboto-v15-latin-700.ttf +0 -0
  108. package/docs/fonts/roboto-v15-latin-700.woff +0 -0
  109. package/docs/fonts/roboto-v15-latin-700.woff2 +0 -0
  110. package/docs/fonts/roboto-v15-latin-regular.eot +0 -0
  111. package/docs/fonts/roboto-v15-latin-regular.svg +0 -308
  112. package/docs/fonts/roboto-v15-latin-regular.ttf +0 -0
  113. package/docs/fonts/roboto-v15-latin-regular.woff +0 -0
  114. package/docs/fonts/roboto-v15-latin-regular.woff2 +0 -0
  115. package/docs/graph/dependencies.svg +0 -1594
  116. package/docs/guards/FHGuard.html +0 -386
  117. package/docs/images/compodoc-vectorise-inverted.png +0 -0
  118. package/docs/images/compodoc-vectorise-inverted.svg +0 -201
  119. package/docs/images/compodoc-vectorise.png +0 -0
  120. package/docs/images/compodoc-vectorise.svg +0 -201
  121. package/docs/images/coverage-badge-documentation.svg +0 -9
  122. package/docs/images/favicon.ico +0 -0
  123. package/docs/index.html +0 -114
  124. package/docs/injectables/AppMakerService.html +0 -380
  125. package/docs/injectables/AppService.html +0 -1592
  126. package/docs/injectables/AuthenticationService.html +0 -947
  127. package/docs/injectables/FileService.html +0 -354
  128. package/docs/injectables/GridService.html +0 -394
  129. package/docs/injectables/HighlightService.html +0 -239
  130. package/docs/injectables/LocalDBService.html +0 -513
  131. package/docs/injectables/OdbcService.html +0 -380
  132. package/docs/injectables/OfficeAutomatorService.html +0 -496
  133. package/docs/injectables/QueryService.html +0 -420
  134. package/docs/injectables/UtilityService.html +0 -2818
  135. package/docs/injectables/WkfService.html +0 -380
  136. package/docs/interfaces/FHGridColumn.html +0 -403
  137. package/docs/interfaces/ImageViewerConfig.html +0 -491
  138. package/docs/js/compodoc.js +0 -14
  139. package/docs/js/lazy-load-graphs.js +0 -44
  140. package/docs/js/libs/EventDispatcher.js +0 -5
  141. package/docs/js/libs/bootstrap-native.js +0 -2
  142. package/docs/js/libs/clipboard.min.js +0 -7
  143. package/docs/js/libs/custom-elements-es5-adapter.js +0 -15
  144. package/docs/js/libs/custom-elements.min.js +0 -38
  145. package/docs/js/libs/d3.v3.min.js +0 -2
  146. package/docs/js/libs/deep-iterator.js +0 -2
  147. package/docs/js/libs/es6-shim.min.js +0 -11
  148. package/docs/js/libs/htmlparser.js +0 -23
  149. package/docs/js/libs/innersvg.js +0 -9
  150. package/docs/js/libs/lit-html.js +0 -1
  151. package/docs/js/libs/prism.js +0 -14
  152. package/docs/js/libs/promise.min.js +0 -6
  153. package/docs/js/libs/svg-pan-zoom.min.js +0 -3
  154. package/docs/js/libs/tablesort.min.js +0 -6
  155. package/docs/js/libs/tablesort.number.min.js +0 -6
  156. package/docs/js/libs/vis.min.js +0 -46
  157. package/docs/js/libs/zepto.min.js +0 -2
  158. package/docs/js/menu-wc.js +0 -528
  159. package/docs/js/menu.js +0 -261
  160. package/docs/js/routes.js +0 -280
  161. package/docs/js/search/lunr.min.js +0 -6
  162. package/docs/js/search/search-lunr.js +0 -67
  163. package/docs/js/search/search.js +0 -271
  164. package/docs/js/search/search_index.js +0 -4
  165. package/docs/js/sourceCode.js +0 -58
  166. package/docs/js/svg-pan-zoom.controls.js +0 -53
  167. package/docs/js/tabs.js +0 -21
  168. package/docs/js/tree.js +0 -147
  169. package/docs/miscellaneous/typealiases.html +0 -146
  170. package/docs/miscellaneous/variables.html +0 -593
  171. package/docs/modules/FluxhubLibModule/dependencies.svg +0 -1594
  172. package/docs/modules/FluxhubLibModule.html +0 -2325
  173. package/docs/modules.html +0 -123
  174. package/docs/overview.html +0 -1780
  175. package/docs/pipes/FHCurrencyPipe.html +0 -310
  176. package/docs/pipes/ReplaceLineBreaks.html +0 -210
  177. package/docs/pipes/SafePipe.html +0 -224
  178. package/docs/styles/bootstrap-card.css +0 -219
  179. package/docs/styles/bootstrap.min.css +0 -5
  180. package/docs/styles/compodoc.css +0 -985
  181. package/docs/styles/ionicons.min.css +0 -11
  182. package/docs/styles/laravel.css +0 -69
  183. package/docs/styles/material.css +0 -109
  184. package/docs/styles/original.css +0 -47
  185. package/docs/styles/postmark.css +0 -210
  186. package/docs/styles/prism.css +0 -267
  187. package/docs/styles/readthedocs.css +0 -98
  188. package/docs/styles/reset.css +0 -48
  189. package/docs/styles/stripe.css +0 -65
  190. package/docs/styles/style.css +0 -7
  191. package/docs/styles/tablesort.css +0 -33
  192. package/docs/styles/vagrant.css +0 -96
package/docs/js/menu.js DELETED
@@ -1,261 +0,0 @@
1
- document.addEventListener('DOMContentLoaded', function() {
2
- var menuCollapsed = false,
3
- mobileMenu = document.getElementById('mobile-menu');
4
-
5
- var localContextInUrl = '';
6
-
7
- if (COMPODOC_CURRENT_PAGE_CONTEXT !== '') {
8
- localContextInUrl = localContextInUrl;
9
- switch (COMPODOC_CURRENT_PAGE_CONTEXT) {
10
- case 'additional-page':
11
- localContextInUrl = 'additional-documentation';
12
- break;
13
- case 'class':
14
- localContextInUrl = 'classes';
15
- break;
16
- case 'miscellaneous-functions':
17
- case 'miscellaneous-variables':
18
- case 'miscellaneous-typealiases':
19
- case 'miscellaneous-enumerations':
20
- localContextInUrl = 'miscellaneous';
21
- default:
22
- break;
23
- }
24
- }
25
-
26
- function hasClass(el, cls) {
27
- return el.className && new RegExp('(\\s|^)' + cls + '(\\s|$)').test(el.className);
28
- }
29
-
30
- var processLink = function(link, url) {
31
- if (url.charAt(0) !== '.') {
32
- var prefix = '';
33
- switch (COMPODOC_CURRENT_PAGE_DEPTH) {
34
- case 5:
35
- prefix = '../../../../../';
36
- break;
37
- case 4:
38
- prefix = '../../../../';
39
- break;
40
- case 3:
41
- prefix = '../../../';
42
- break;
43
- case 2:
44
- prefix = '../../';
45
- break;
46
- case 1:
47
- prefix = '../';
48
- break;
49
- case 0:
50
- prefix = './';
51
- break;
52
- }
53
- link.setAttribute('href', prefix + url);
54
- }
55
- };
56
-
57
- var processMenuLinks = function(links, dontAddClass) {
58
- for (var i = 0; i < links.length; i++) {
59
- var link = links[i];
60
- var linkHref = link.getAttribute('href');
61
- if (linkHref) {
62
- var linkHrefFile = linkHref.substr(linkHref.lastIndexOf('/') + 1, linkHref.length);
63
- if (
64
- linkHrefFile.toLowerCase() === COMPODOC_CURRENT_PAGE_URL.toLowerCase() &&
65
- link.innerHTML.indexOf('Getting started') == -1 &&
66
- !dontAddClass &&
67
- linkHref.toLowerCase().indexOf(localContextInUrl.toLowerCase()) !== -1
68
- ) {
69
- link.classList.add('active');
70
- }
71
- processLink(link, linkHref);
72
- }
73
- }
74
- };
75
- var chapterLinks = document.querySelectorAll('[data-type="chapter-link"]');
76
- processMenuLinks(chapterLinks);
77
- var entityLinks = document.querySelectorAll('[data-type="entity-link"]');
78
- processMenuLinks(entityLinks);
79
- var indexLinks = document.querySelectorAll('[data-type="index-link"]');
80
- processMenuLinks(indexLinks, true);
81
- var entityLogos = document.querySelectorAll('[data-type="compodoc-logo"]');
82
- var processLogos = function(entityLogo) {
83
- for (var i = 0; i < entityLogos.length; i++) {
84
- var entityLogo = entityLogos[i];
85
- if (entityLogo) {
86
- var url = entityLogo.getAttribute('data-src');
87
- if (url.charAt(0) !== '.') {
88
- var prefix = '';
89
- switch (COMPODOC_CURRENT_PAGE_DEPTH) {
90
- case 5:
91
- prefix = '../../../../../';
92
- break;
93
- case 4:
94
- prefix = '../../../../';
95
- break;
96
- case 3:
97
- prefix = '../../../';
98
- break;
99
- case 2:
100
- prefix = '../../';
101
- break;
102
- case 1:
103
- prefix = '../';
104
- break;
105
- case 0:
106
- prefix = './';
107
- break;
108
- }
109
- entityLogo.src = prefix + url;
110
- }
111
- }
112
- }
113
- };
114
- processLogos(entityLogos);
115
-
116
- setTimeout(function() {
117
- document.getElementById('btn-menu').addEventListener('click', function() {
118
- if (menuCollapsed) {
119
- mobileMenu.style.display = 'none';
120
- } else {
121
- mobileMenu.style.display = 'block';
122
- document.getElementsByTagName('body')[0].style['overflow-y'] = 'hidden';
123
- }
124
- menuCollapsed = !menuCollapsed;
125
- });
126
-
127
- /**
128
- * Native bootstrap doesn't wait DOMContentLoaded event to start his job, re do it here
129
- */
130
- var Collapses = document.querySelectorAll('[data-toggle="collapse"]');
131
- for (var o = 0, cll = Collapses.length; o < cll; o++) {
132
- var collapse = Collapses[o],
133
- options = {};
134
- options.duration = collapse.getAttribute('data-duration');
135
- new Collapse(collapse, options);
136
- }
137
-
138
- // collapse menu
139
- var classnameMenuToggler = document.getElementsByClassName('menu-toggler'),
140
- faAngleUpClass = 'ion-ios-arrow-up',
141
- faAngleDownClass = 'ion-ios-arrow-down',
142
- toggleItemMenu = function(e) {
143
- var element = $(e.target),
144
- parent = element[0].parentNode,
145
- parentLink,
146
- elementIconChild;
147
- if (parent) {
148
- if (!$(parent).hasClass('linked')) {
149
- e.preventDefault();
150
- } else {
151
- parentLink = parent.parentNode;
152
- if (parentLink && element.hasClass('link-name')) {
153
- $(parentLink).trigger('click');
154
- }
155
- }
156
- elementIconChild = parent.getElementsByClassName(faAngleUpClass)[0];
157
- if (!elementIconChild) {
158
- elementIconChild = parent.getElementsByClassName(faAngleDownClass)[0];
159
- }
160
- if (elementIconChild) {
161
- elementIconChild = $(elementIconChild);
162
- if (elementIconChild.hasClass(faAngleUpClass)) {
163
- elementIconChild.addClass(faAngleDownClass);
164
- elementIconChild.removeClass(faAngleUpClass);
165
- } else {
166
- elementIconChild.addClass(faAngleUpClass);
167
- elementIconChild.removeClass(faAngleDownClass);
168
- }
169
- }
170
- }
171
- };
172
-
173
- for (var i = 0; i < classnameMenuToggler.length; i++) {
174
- classnameMenuToggler[i].addEventListener('click', toggleItemMenu, false);
175
- }
176
-
177
- // Scroll to active link
178
- var menus = document.querySelectorAll('.menu'),
179
- i = 0,
180
- len = menus.length,
181
- activeMenu,
182
- activeMenuClass,
183
- activeLink;
184
-
185
- for (i; i < len; i++) {
186
- if (getComputedStyle(menus[i]).display != 'none') {
187
- activeMenu = menus[i];
188
- activeMenuClass = activeMenu.getAttribute('class').split(' ')[0];
189
- }
190
- }
191
-
192
- if (activeMenu) {
193
- activeLink = document.querySelector('.' + activeMenuClass + ' .active');
194
- if (activeLink) {
195
- var linkType = activeLink.getAttribute('data-type');
196
- var linkContext = activeLink.getAttribute('data-context');
197
- if (linkType === 'entity-link') {
198
- var parentLi = activeLink.parentNode,
199
- parentUl,
200
- parentChapterMenu;
201
- if (parentLi) {
202
- parentUl = parentLi.parentNode;
203
- if (parentUl) {
204
- parentChapterMenu = parentUl.parentNode;
205
- if (parentChapterMenu) {
206
- var toggler = parentChapterMenu.querySelector('.menu-toggler'),
207
- elementIconChild = toggler.getElementsByClassName(
208
- faAngleUpClass
209
- )[0];
210
- if (toggler && !elementIconChild) {
211
- toggler.click();
212
- }
213
- }
214
- }
215
- }
216
- if (linkContext && linkContext === 'sub-entity') {
217
- // Toggle also the master parent menu
218
- var linkContextId = activeLink.getAttribute('data-context-id');
219
- var toggler = activeMenu.querySelector(
220
- '.chapter.' + linkContextId + ' a .menu-toggler'
221
- );
222
- if (toggler) {
223
- toggler.click();
224
- }
225
- if (linkContextId === 'additional') {
226
- var mainToggler = activeMenu.querySelector(
227
- '.chapter.' + linkContextId + ' div.menu-toggler'
228
- );
229
- if (mainToggler) {
230
- mainToggler.click();
231
- }
232
- }
233
- }
234
- } else if (linkType === 'chapter-link') {
235
- var linkContextId = activeLink.getAttribute('data-context-id');
236
- var toggler = activeLink.querySelector('.menu-toggler');
237
- if (toggler) {
238
- toggler.click();
239
- }
240
- if (linkContextId === 'additional') {
241
- var mainToggler = activeMenu.querySelector(
242
- '.chapter.' + linkContextId + ' div.menu-toggler'
243
- );
244
- if (mainToggler) {
245
- mainToggler.click();
246
- }
247
- }
248
- }
249
- setTimeout(function() {
250
- activeMenu.scrollTop = activeLink.offsetTop;
251
- if (
252
- activeLink.innerHTML.toLowerCase().indexOf('readme') != -1 ||
253
- activeLink.innerHTML.toLowerCase().indexOf('overview') != -1
254
- ) {
255
- activeMenu.scrollTop = 0;
256
- }
257
- }, 300);
258
- }
259
- }
260
- }, 0);
261
- });
package/docs/js/routes.js DELETED
@@ -1,280 +0,0 @@
1
- document.addEventListener('DOMContentLoaded', function() {
2
-
3
- function htmlEntities(str) {
4
- return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
5
- }
6
-
7
- function foundLazyModuleWithPath(path) {
8
- //path is like app/customers/customers.module#CustomersModule
9
- var split = path.split('#'),
10
- lazyModulePath = split[0],
11
- lazyModuleName = split[1];
12
- return lazyModuleName;
13
- }
14
-
15
- function getBB(selection) {
16
- selection.each(function(d){d.bbox = this.getBBox();})
17
- }
18
-
19
- var test_cases,
20
- test_case,
21
- test_case_num,
22
- engine;
23
-
24
- var tree = ROUTES_INDEX;
25
-
26
- function cleanStringChildren(obj) {
27
- for (var property in obj) {
28
- if (obj.hasOwnProperty(property)) {
29
- if (property === 'children' && typeof obj[property] === 'object') {
30
- for (var i = obj[property].length - 1; i >= 0 ; i--) {
31
- if (typeof obj[property][i] === 'string') {
32
- obj[property].splice(i, 1);
33
- }
34
- }
35
- }
36
- if (typeof obj[property] === 'object') {
37
- cleanStringChildren(obj[property]);
38
- }
39
- }
40
- }
41
- }
42
- cleanStringChildren(tree);
43
-
44
- engine = d3.layout.tree().setNodeSizes(true);
45
-
46
- engine.spacing(function(a, b) {
47
- return a.parent == b.parent ?
48
- 0 : engine.rootXSize();
49
- })
50
-
51
- engine.nodeSize(function(d) {
52
- return [document.getElementById(d.id).getBBox()["height"] + 70, document.getElementById(d.id).getBBox()["width"] + 30];
53
- });
54
-
55
- var nodes = d3.layout.hierarchy()(tree),
56
-
57
- svg = d3.select("#body-routes").append('svg'),
58
- svg_g = svg.append("g"),
59
- svg_p = svg.append("g"),
60
- last_id = 0,
61
-
62
- node = svg_g.selectAll(".node")
63
- .data(nodes, function(d) {
64
- return d.id || (d.id = ++last_id);
65
- })
66
- .enter().append("g")
67
- .attr("class", "node");
68
-
69
- svg
70
- .attr('id', 'main')
71
-
72
- svg_g
73
- .attr("transform", "translate(20,0)")
74
- .attr('id', 'main-group')
75
-
76
- svg_p
77
- .attr("transform", "translate(20,0)")
78
- .attr('id', 'paths')
79
-
80
- var infos_group = node.append("g")
81
- .attr({
82
- "id": function(d) {
83
- return d.id;
84
- },
85
- dx: 0,
86
- dy: 0,
87
- })
88
-
89
- //Node icon
90
- infos_group.append("text")
91
- .attr('font-family', 'Ionicons')
92
- .attr("y", 5)
93
- .attr("x", 0)
94
- .attr('class', function(d) {
95
- return d.children || d._children
96
- ? "icon has-children"
97
- : "icon";
98
- })
99
- .attr('font-size', function(d) {
100
- return '15px'
101
- }).text(function(d) {
102
- return '\uf183'
103
- });
104
-
105
- //node infos
106
- infos_group.append("svg:text")
107
- .attr("x", function(d) {
108
- return 0;
109
- })
110
- .attr("y", function(d) {
111
- return 10;
112
- })
113
- .attr("dy", ".35em")
114
- .attr('class', 'text')
115
- .attr("text-anchor", function(d) {
116
- return "start";
117
- }).html(function(d) {
118
- // if kind === module name + module
119
- // if kind === component component + path
120
- var _name = '';
121
- if (d.kind === 'module') {
122
- if (d.module) {
123
- _name += '<tspan x="0" dy="1.4em"><a href="./modules/' + d.module + '.html">' + d.module + '</a></tspan>';
124
- if (d.name) {
125
- _name += '<tspan x="0" dy="1.4em">' + d.name + '</tspan>';
126
- }
127
- } else {
128
- _name += '<tspan x="0" dy="1.4em">' + htmlEntities(d.name) + '</tspan>';
129
- }
130
- } else if (d.kind === 'component') {
131
- _name += '<tspan x="0" dy="1.4em">' + d.path + '</tspan>'
132
- _name += '<tspan x="0" dy="1.4em"><a href="./components/' + d.component + '.html">' + d.component + '</a></tspan>'
133
- if (d.outlet) {
134
- _name += '<tspan x="0" dy="1.4em">&lt;outlet&gt; : ' + d.outlet + '</tspan>'
135
- }
136
- } else {
137
- _name += '<tspan x="0" dy="1.4em">/' + d.path + '</tspan>'
138
- if (d.component) {
139
- _name += '<tspan x="0" dy="1.4em"><a href="./components/' + d.component + '.html">' + d.component + '</a></tspan>'
140
- }
141
- if (d.loadChildren) {
142
- var moduleName = foundLazyModuleWithPath(d.loadChildren);
143
- _name += '<tspan x="0" dy="1.4em"><a href="./modules/' + moduleName + '.html">' + moduleName + '</a></tspan>'
144
- }
145
- if (d.canActivate) {
146
- _name += '<tspan x="0" dy="1.4em">&#10003; canActivate</tspan>'
147
- }
148
- if (d.canDeactivate) {
149
- _name += '<tspan x="0" dy="1.4em">&#215;&nbsp;&nbsp;canDeactivate</tspan>'
150
- }
151
- if (d.canActivateChild) {
152
- _name += '<tspan x="0" dy="1.4em">&#10003; canActivateChild</tspan>'
153
- }
154
- if (d.canLoad) {
155
- _name += '<tspan x="0" dy="1.4em">&#8594; canLoad</tspan>'
156
- }
157
- if (d.redirectTo) {
158
- _name += '<tspan x="0" dy="1.4em">&rarr; ' + d.redirectTo + '</tspan>'
159
- }
160
- if (d.pathMatch) {
161
- _name += '<tspan x="0" dy="1.4em">&gt; ' + d.pathMatch + '</tspan>'
162
- }
163
- if (d.outlet) {
164
- _name += '<tspan x="0" dy="1.4em">&lt;outlet&gt; : ' + d.outlet + '</tspan>'
165
- }
166
- }
167
- return _name;
168
- })
169
- .call(getBB);
170
-
171
- //
172
- // Node lazy loaded ?
173
- //
174
- infos_group.append('svg:text')
175
- .attr("y", function(d) {
176
- return 45;
177
- })
178
- .attr("x", function(d) {
179
- return -18;
180
- })
181
- .attr('font-family', 'Ionicons')
182
- .attr('class', function(d) {
183
- return "icon";
184
- })
185
- .attr('font-size', function(d) {
186
- return '15px'
187
- }).text(function(d) {
188
- var _text = '';
189
- if (d.loadChildren) {
190
- _text = '\uf4c1';
191
- }
192
- if (d.guarded) {
193
- _text = '\uf1b0';
194
- }
195
- return _text;
196
- });
197
-
198
- //Node text background
199
- infos_group.insert("rect","text")
200
- .attr("width", function(d){
201
- return d.bbox.width;
202
- })
203
- .attr("height", function(d){
204
- return d.bbox.height;
205
- })
206
- .attr("y", function(d) {
207
- return 15;
208
- })
209
- .style("fill", "white")
210
- .style("fill-opacity", 0.75);
211
-
212
- nodes = engine.nodes(tree);
213
-
214
- function node_extents(n) {
215
- return [n.x - n.x_size / 2, n.y,
216
- n.x + n.x_size / 2, n.y + n.y_size
217
- ];
218
- }
219
- var root_extents = node_extents(nodes[0]);
220
- var xmin = root_extents[0],
221
- ymin = root_extents[1],
222
- xmax = root_extents[2],
223
- ymax = root_extents[3],
224
- area_sum = (xmax - xmin) * (ymax - ymin),
225
- x_size_min = nodes[0].x_size,
226
- y_size_min = nodes[0].y_size;
227
-
228
- nodes.slice(1).forEach(function(n) {
229
- var ne = node_extents(n);
230
- xmin = Math.min(xmin, ne[0]);
231
- ymin = Math.min(ymin, ne[1]);
232
- xmax = Math.max(xmax, ne[2]);
233
- ymax = Math.max(ymax, ne[3]);
234
- area_sum += (ne[2] - ne[0]) * (ne[3] - ne[1]);
235
- x_size_min = Math.min(x_size_min, n.x_size);
236
- y_size_min = Math.min(y_size_min, n.y_size);
237
- });
238
-
239
- var area_ave = area_sum / nodes.length;
240
- var scale = 80 / Math.sqrt(area_ave);
241
-
242
- function svg_x(node_y) {
243
- return (node_y - ymin);
244
- }
245
-
246
- function svg_y(node_x) {
247
- return (node_x - xmin) * scale;
248
- }
249
-
250
-
251
- var nodebox_right_margin = Math.min(x_size_min * scale, 10);
252
- var nodebox_vertical_margin = Math.min(y_size_min * scale, 3);
253
-
254
- node.attr("transform", function(d) {
255
- return "translate(" + svg_x(d.y) + "," + svg_y(d.x) + ")";
256
- })
257
-
258
- var diagonal = d3.svg.diagonal()
259
- .projection(function(d) {
260
- return [svg_x(d.y), svg_y(d.x)];
261
- });
262
-
263
- var links = engine.links(nodes);
264
- var links = svg_p.selectAll(".link")
265
- .data(links)
266
- .enter().append("path")
267
- .attr("class", "link")
268
- .attr("d", diagonal);
269
-
270
- var _svg = document.getElementById('main'),
271
- main_g = _svg.childNodes[0]
272
-
273
- _svg.removeChild(main_g);
274
- _svg.appendChild(main_g);
275
-
276
- svg.attr({
277
- width: document.getElementById('main-group').getBBox()['width'] + 30,
278
- height: document.getElementById('main-group').getBBox()['height'] + 50,
279
- });
280
- });
@@ -1,6 +0,0 @@
1
- /**
2
- * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.6
3
- * Copyright (C) 2019 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.6",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(e){return e},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().trim().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(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.complete;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})}();