fomantic-ui 2.9.1-beta.22 → 2.9.1-beta.23

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 (253) hide show
  1. package/.eslintrc.js +7 -59
  2. package/.stylelintrc.js +5 -7
  3. package/dist/components/accordion.css +1 -1
  4. package/dist/components/accordion.js +7 -7
  5. package/dist/components/accordion.min.css +1 -1
  6. package/dist/components/accordion.min.js +2 -2
  7. package/dist/components/ad.css +1 -1
  8. package/dist/components/ad.min.css +1 -1
  9. package/dist/components/api.js +54 -53
  10. package/dist/components/api.min.js +2 -2
  11. package/dist/components/breadcrumb.css +1 -1
  12. package/dist/components/breadcrumb.min.css +1 -1
  13. package/dist/components/button.css +1 -1
  14. package/dist/components/button.min.css +1 -1
  15. package/dist/components/calendar.css +3 -3
  16. package/dist/components/calendar.js +118 -99
  17. package/dist/components/calendar.min.css +2 -2
  18. package/dist/components/calendar.min.js +2 -2
  19. package/dist/components/card.css +1 -1
  20. package/dist/components/card.min.css +1 -1
  21. package/dist/components/checkbox.css +1 -1
  22. package/dist/components/checkbox.js +8 -8
  23. package/dist/components/checkbox.min.css +1 -1
  24. package/dist/components/checkbox.min.js +2 -2
  25. package/dist/components/comment.css +1 -1
  26. package/dist/components/comment.min.css +1 -1
  27. package/dist/components/container.css +1 -1
  28. package/dist/components/container.min.css +1 -1
  29. package/dist/components/dimmer.css +1 -1
  30. package/dist/components/dimmer.js +16 -18
  31. package/dist/components/dimmer.min.css +1 -1
  32. package/dist/components/dimmer.min.js +2 -2
  33. package/dist/components/divider.css +1 -1
  34. package/dist/components/divider.min.css +1 -1
  35. package/dist/components/dropdown.css +1 -1
  36. package/dist/components/dropdown.js +87 -87
  37. package/dist/components/dropdown.min.css +1 -1
  38. package/dist/components/dropdown.min.js +2 -2
  39. package/dist/components/embed.css +1 -1
  40. package/dist/components/embed.js +17 -23
  41. package/dist/components/embed.min.css +1 -1
  42. package/dist/components/embed.min.js +2 -2
  43. package/dist/components/feed.css +1 -1
  44. package/dist/components/feed.min.css +1 -1
  45. package/dist/components/flag.css +1 -1
  46. package/dist/components/flag.min.css +1 -1
  47. package/dist/components/flyout.css +2 -2
  48. package/dist/components/flyout.js +32 -30
  49. package/dist/components/flyout.min.css +1 -1
  50. package/dist/components/flyout.min.js +2 -2
  51. package/dist/components/form.css +2 -2
  52. package/dist/components/form.js +113 -89
  53. package/dist/components/form.min.css +2 -2
  54. package/dist/components/form.min.js +2 -2
  55. package/dist/components/grid.css +1 -1
  56. package/dist/components/grid.min.css +1 -1
  57. package/dist/components/header.css +1 -1
  58. package/dist/components/header.min.css +1 -1
  59. package/dist/components/icon.css +1 -1
  60. package/dist/components/icon.min.css +1 -1
  61. package/dist/components/image.css +1 -1
  62. package/dist/components/image.min.css +1 -1
  63. package/dist/components/input.css +1 -1
  64. package/dist/components/input.min.css +1 -1
  65. package/dist/components/item.css +1 -1
  66. package/dist/components/item.min.css +1 -1
  67. package/dist/components/label.css +1 -1
  68. package/dist/components/label.min.css +1 -1
  69. package/dist/components/list.css +1 -1
  70. package/dist/components/list.min.css +1 -1
  71. package/dist/components/loader.css +1 -1
  72. package/dist/components/loader.min.css +1 -1
  73. package/dist/components/message.css +1 -1
  74. package/dist/components/message.min.css +1 -1
  75. package/dist/components/modal.css +1 -1
  76. package/dist/components/modal.js +22 -22
  77. package/dist/components/modal.min.css +1 -1
  78. package/dist/components/modal.min.js +2 -2
  79. package/dist/components/nag.css +1 -1
  80. package/dist/components/nag.js +18 -16
  81. package/dist/components/nag.min.css +1 -1
  82. package/dist/components/nag.min.js +2 -2
  83. package/dist/components/placeholder.css +1 -1
  84. package/dist/components/placeholder.min.css +1 -1
  85. package/dist/components/popup.css +1 -1
  86. package/dist/components/popup.js +30 -30
  87. package/dist/components/popup.min.css +1 -1
  88. package/dist/components/popup.min.js +2 -2
  89. package/dist/components/progress.css +1 -1
  90. package/dist/components/progress.js +23 -21
  91. package/dist/components/progress.min.css +1 -1
  92. package/dist/components/progress.min.js +2 -2
  93. package/dist/components/rail.css +1 -1
  94. package/dist/components/rail.min.css +1 -1
  95. package/dist/components/rating.css +1 -1
  96. package/dist/components/rating.js +8 -8
  97. package/dist/components/rating.min.css +1 -1
  98. package/dist/components/rating.min.js +2 -2
  99. package/dist/components/reset.css +1 -1
  100. package/dist/components/reset.min.css +1 -1
  101. package/dist/components/reveal.css +1 -1
  102. package/dist/components/reveal.min.css +1 -1
  103. package/dist/components/search.css +1 -1
  104. package/dist/components/search.js +41 -46
  105. package/dist/components/search.min.css +1 -1
  106. package/dist/components/search.min.js +2 -2
  107. package/dist/components/segment.css +1 -1
  108. package/dist/components/segment.min.css +1 -1
  109. package/dist/components/shape.css +1 -1
  110. package/dist/components/shape.js +9 -9
  111. package/dist/components/shape.min.css +1 -1
  112. package/dist/components/shape.min.js +2 -2
  113. package/dist/components/sidebar.css +1 -1
  114. package/dist/components/sidebar.js +21 -19
  115. package/dist/components/sidebar.min.css +1 -1
  116. package/dist/components/sidebar.min.js +2 -2
  117. package/dist/components/site.css +1 -1
  118. package/dist/components/site.js +11 -10
  119. package/dist/components/site.min.css +1 -1
  120. package/dist/components/site.min.js +2 -2
  121. package/dist/components/slider.js +39 -42
  122. package/dist/components/slider.min.js +2 -2
  123. package/dist/components/state.js +7 -7
  124. package/dist/components/state.min.js +2 -2
  125. package/dist/components/statistic.css +1 -1
  126. package/dist/components/statistic.min.css +1 -1
  127. package/dist/components/step.css +1 -1
  128. package/dist/components/step.min.css +1 -1
  129. package/dist/components/sticky.css +1 -1
  130. package/dist/components/sticky.js +7 -7
  131. package/dist/components/sticky.min.css +1 -1
  132. package/dist/components/sticky.min.js +2 -2
  133. package/dist/components/tab.css +1 -1
  134. package/dist/components/tab.js +36 -38
  135. package/dist/components/tab.min.css +1 -1
  136. package/dist/components/tab.min.js +2 -2
  137. package/dist/components/table.css +1 -1
  138. package/dist/components/table.min.css +1 -1
  139. package/dist/components/text.css +1 -1
  140. package/dist/components/text.min.css +1 -1
  141. package/dist/components/toast.css +1 -1
  142. package/dist/components/toast.js +20 -17
  143. package/dist/components/toast.min.css +1 -1
  144. package/dist/components/toast.min.js +2 -2
  145. package/dist/components/transition.css +7 -7
  146. package/dist/components/transition.js +27 -21
  147. package/dist/components/transition.min.css +1 -1
  148. package/dist/components/transition.min.js +2 -2
  149. package/dist/components/visibility.js +8 -8
  150. package/dist/components/visibility.min.js +2 -2
  151. package/dist/semantic.css +60 -60
  152. package/dist/semantic.js +779 -735
  153. package/dist/semantic.min.css +2 -2
  154. package/dist/semantic.min.js +2 -2
  155. package/examples/responsive.html +1 -1
  156. package/gulpfile.js +1 -1
  157. package/package.json +1 -1
  158. package/scripts/nightly-version.js +3 -3
  159. package/src/definitions/behaviors/api.js +53 -52
  160. package/src/definitions/behaviors/form.js +112 -88
  161. package/src/definitions/behaviors/state.js +6 -6
  162. package/src/definitions/behaviors/visibility.js +7 -7
  163. package/src/definitions/collections/menu.less +2 -2
  164. package/src/definitions/elements/button.less +2 -2
  165. package/src/definitions/elements/loader.less +4 -4
  166. package/src/definitions/elements/step.less +1 -1
  167. package/src/definitions/globals/site.js +10 -9
  168. package/src/definitions/modules/accordion.js +6 -6
  169. package/src/definitions/modules/calendar.js +117 -98
  170. package/src/definitions/modules/calendar.less +2 -2
  171. package/src/definitions/modules/checkbox.js +7 -7
  172. package/src/definitions/modules/dimmer.js +15 -17
  173. package/src/definitions/modules/dimmer.less +10 -10
  174. package/src/definitions/modules/dropdown.js +86 -86
  175. package/src/definitions/modules/embed.js +16 -22
  176. package/src/definitions/modules/flyout.js +31 -29
  177. package/src/definitions/modules/flyout.less +1 -1
  178. package/src/definitions/modules/modal.js +21 -21
  179. package/src/definitions/modules/nag.js +17 -15
  180. package/src/definitions/modules/popup.js +29 -29
  181. package/src/definitions/modules/progress.js +22 -20
  182. package/src/definitions/modules/rating.js +7 -7
  183. package/src/definitions/modules/search.js +40 -45
  184. package/src/definitions/modules/shape.js +8 -8
  185. package/src/definitions/modules/sidebar.js +20 -18
  186. package/src/definitions/modules/slider.js +38 -41
  187. package/src/definitions/modules/sticky.js +6 -6
  188. package/src/definitions/modules/tab.js +35 -37
  189. package/src/definitions/modules/toast.js +19 -16
  190. package/src/definitions/modules/transition.js +26 -20
  191. package/src/themes/amazon/elements/button.overrides +7 -7
  192. package/src/themes/default/collections/form.variables +1 -1
  193. package/src/themes/default/elements/reveal.variables +1 -1
  194. package/src/themes/default/globals/site.variables +1 -1
  195. package/src/themes/default/modules/dimmer.variables +6 -6
  196. package/src/themes/default/modules/modal.variables +1 -1
  197. package/src/themes/default/modules/slider.variables +4 -4
  198. package/src/themes/default/modules/toast.variables +2 -2
  199. package/src/themes/default/modules/transition.overrides +12 -12
  200. package/src/themes/flat/collections/form.overrides +2 -2
  201. package/src/themes/flat/globals/site.variables +1 -1
  202. package/src/themes/github/collections/form.overrides +2 -2
  203. package/src/themes/github/collections/menu.variables +1 -1
  204. package/src/themes/github/collections/message.overrides +3 -3
  205. package/src/themes/github/elements/input.overrides +2 -2
  206. package/src/themes/timeline/views/feed.overrides +3 -3
  207. package/src/themes/twitter/elements/button.overrides +2 -2
  208. package/tasks/README.md +1 -3
  209. package/tasks/admin/components/create.js +9 -16
  210. package/tasks/admin/components/init.js +7 -7
  211. package/tasks/admin/components/update.js +7 -7
  212. package/tasks/admin/distributions/create.js +15 -17
  213. package/tasks/admin/distributions/init.js +7 -7
  214. package/tasks/admin/distributions/update.js +7 -7
  215. package/tasks/admin/publish.js +1 -1
  216. package/tasks/admin/register.js +2 -2
  217. package/tasks/admin/release.js +1 -1
  218. package/tasks/build/assets.js +2 -2
  219. package/tasks/build/css.js +8 -3
  220. package/tasks/build/javascript.js +3 -1
  221. package/tasks/build.js +1 -1
  222. package/tasks/check-install.js +1 -1
  223. package/tasks/clean.js +1 -1
  224. package/tasks/collections/README.md +3 -5
  225. package/tasks/collections/admin.js +1 -1
  226. package/tasks/collections/docs.js +1 -1
  227. package/tasks/collections/install.js +1 -1
  228. package/tasks/collections/rtl.js +1 -1
  229. package/tasks/collections/various.js +1 -1
  230. package/tasks/config/admin/github.js +5 -6
  231. package/tasks/config/admin/templates/css-package.js +1 -1
  232. package/tasks/config/admin/templates/less-package.js +1 -1
  233. package/tasks/config/npm/gulpfile.js +7 -7
  234. package/tasks/config/project/config.js +9 -16
  235. package/tasks/config/project/install.js +26 -25
  236. package/tasks/config/project/release.js +12 -14
  237. package/tasks/config/tasks.js +17 -19
  238. package/tasks/config/user.js +1 -1
  239. package/tasks/docs/build.js +5 -3
  240. package/tasks/docs/metadata.js +7 -8
  241. package/tasks/docs/serve.js +5 -3
  242. package/tasks/install.js +38 -38
  243. package/tasks/rtl/build.js +1 -1
  244. package/tasks/rtl/watch.js +1 -1
  245. package/tasks/version.js +1 -1
  246. package/tasks/watch.js +1 -1
  247. package/test/.eslintrc.js +0 -4
  248. package/test/meteor/assets.js +1 -1
  249. package/test/modules/module.spec.js +15 -15
  250. package/test/modules/popup.spec.js +1 -1
  251. package/test/modules/search.spec.js +1 -1
  252. package/test/modules/tab.spec.js +1 -1
  253. package/test/modules/transition.spec.js +1 -1
package/dist/semantic.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.1-beta.22+6a42d01
2
+ * # Fomantic UI - 2.9.1-beta.23+27384cb
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -9,7 +9,7 @@
9
9
  *
10
10
  */
11
11
  /*!
12
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Site
12
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Site
13
13
  * https://github.com/fomantic/Fomantic-UI/
14
14
  *
15
15
  *
@@ -25,17 +25,17 @@
25
25
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
26
26
  }
27
27
 
28
- window = (window !== undefined && window.Math == Math)
28
+ window = (window !== undefined && window.Math === Math)
29
29
  ? window
30
30
  : globalThis;
31
31
 
32
- $.site = $.fn.site = function (parameters) {
32
+ $.fn.site = function (parameters) {
33
33
  var
34
- time = new Date().getTime(),
34
+ time = Date.now(),
35
35
  performance = [],
36
36
 
37
37
  query = arguments[0],
38
- methodInvoked = (typeof query == 'string'),
38
+ methodInvoked = (typeof query === 'string'),
39
39
  queryArguments = [].slice.call(arguments, 1),
40
40
 
41
41
  settings = ($.isPlainObject(parameters))
@@ -81,13 +81,13 @@
81
81
  module.verbose('Console not available, normalizing events');
82
82
  module.disable.console();
83
83
  }
84
- if (typeof console.group == 'undefined' || typeof console.groupEnd == 'undefined' || typeof console.groupCollapsed == 'undefined') {
84
+ if (console.group === undefined || console.groupEnd === undefined || console.groupCollapsed === undefined) {
85
85
  module.verbose('Console group not available, normalizing events');
86
86
  window.console.group = function () {};
87
87
  window.console.groupEnd = function () {};
88
88
  window.console.groupCollapsed = function () {};
89
89
  }
90
- if (typeof console.markTimeline == 'undefined') {
90
+ if (console.markTimeline === undefined) {
91
91
  module.verbose('Mark timeline not available, normalizing events');
92
92
  window.console.markTimeline = function () {};
93
93
  }
@@ -319,7 +319,7 @@
319
319
  previousTime
320
320
  ;
321
321
  if (settings.performance) {
322
- currentTime = new Date().getTime();
322
+ currentTime = Date.now();
323
323
  previousTime = time || currentTime;
324
324
  executionTime = currentTime - previousTime;
325
325
  time = currentTime;
@@ -367,8 +367,8 @@
367
367
  ;
368
368
  passedArguments = passedArguments || queryArguments;
369
369
  context = context || element;
370
- if (typeof query == 'string' && object !== undefined) {
371
- query = query.split(/[\. ]/);
370
+ if (typeof query === 'string' && object !== undefined) {
371
+ query = query.split(/[ .]/);
372
372
  maxDepth = query.length - 1;
373
373
  $.each(query, function (depth, value) {
374
374
  var camelCaseValue = (depth != maxDepth)
@@ -427,6 +427,7 @@
427
427
  ? returnedValue
428
428
  : this;
429
429
  };
430
+ $.site = $.fn.site;
430
431
 
431
432
  $.site.settings = {
432
433
 
@@ -489,7 +490,7 @@
489
490
  })(jQuery, window, document);
490
491
 
491
492
  /*!
492
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Form Validation
493
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Form Validation
493
494
  * https://github.com/fomantic/Fomantic-UI/
494
495
  *
495
496
  *
@@ -505,7 +506,7 @@
505
506
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
506
507
  }
507
508
 
508
- window = (typeof window != 'undefined' && window.Math == Math)
509
+ window = (window !== undefined && window.Math === Math)
509
510
  ? window
510
511
  : globalThis;
511
512
 
@@ -514,12 +515,12 @@
514
515
  $allModules = $(this),
515
516
  moduleSelector = $allModules.selector || '',
516
517
 
517
- time = new Date().getTime(),
518
+ time = Date.now(),
518
519
  performance = [],
519
520
 
520
521
  query = arguments[0],
521
522
  legacyParameters = arguments[1],
522
- methodInvoked = (typeof query == 'string'),
523
+ methodInvoked = (typeof query === 'string'),
523
524
  queryArguments = [].slice.call(arguments, 1),
524
525
  returnedValue
525
526
  ;
@@ -626,7 +627,10 @@
626
627
  },
627
628
 
628
629
  attachEvents: function (selector, action) {
629
- action = action || 'submit';
630
+ if (!action) {
631
+ action = 'submit';
632
+ }
633
+
630
634
  $(selector).on('click' + eventNamespace, function (event) {
631
635
  module[action]();
632
636
  event.preventDefault();
@@ -767,15 +771,13 @@
767
771
  isDirty
768
772
  ;
769
773
 
770
- if (isCheckbox) {
771
- isDirty = module.is.checkboxDirty($el);
772
- } else {
773
- isDirty = module.is.fieldDirty($el);
774
- }
774
+ isDirty = isCheckbox
775
+ ? module.is.checkboxDirty($el)
776
+ : module.is.fieldDirty($el);
775
777
 
776
778
  $el.data(settings.metadata.isDirty, isDirty);
777
779
 
778
- formIsDirty |= isDirty;
780
+ formIsDirty = formIsDirty || isDirty;
779
781
  });
780
782
 
781
783
  if (formIsDirty) {
@@ -792,16 +794,17 @@
792
794
  },
793
795
  // duck type rule test
794
796
  shorthandRules: function (rules) {
795
- return (typeof rules == 'string' || Array.isArray(rules));
797
+ return (typeof rules === 'string' || Array.isArray(rules));
796
798
  },
797
799
  empty: function ($field) {
798
800
  if (!$field || $field.length === 0) {
799
801
  return true;
800
- } else if ($field.is(selector.checkbox)) {
802
+ }
803
+ if ($field.is(selector.checkbox)) {
801
804
  return !$field.is(':checked');
802
- } else {
803
- return module.is.blank($field);
804
805
  }
806
+
807
+ return module.is.blank($field);
805
808
  },
806
809
  blank: function ($field) {
807
810
  return String($field.val()).trim() === '';
@@ -814,16 +817,16 @@
814
817
  module.verbose('Checking if field is valid', field);
815
818
 
816
819
  return module.validate.field(validation[field], field, !!showErrors);
817
- } else {
818
- module.verbose('Checking if form is valid');
819
- $.each(validation, function (fieldName, field) {
820
- if (!module.is.valid(fieldName, showErrors)) {
821
- allValid = false;
822
- }
823
- });
824
-
825
- return allValid;
826
820
  }
821
+
822
+ module.verbose('Checking if form is valid');
823
+ $.each(validation, function (fieldName, field) {
824
+ if (!module.is.valid(fieldName, showErrors)) {
825
+ allValid = false;
826
+ }
827
+ });
828
+
829
+ return allValid;
827
830
  },
828
831
  dirty: function () {
829
832
  return dirty;
@@ -978,9 +981,9 @@
978
981
  changeEvent: function (type, $input) {
979
982
  if (type == 'checkbox' || type == 'radio' || type == 'hidden' || $input.is('select')) {
980
983
  return 'change';
981
- } else {
982
- return module.get.inputEvent();
983
984
  }
985
+
986
+ return module.get.inputEvent();
984
987
  },
985
988
  inputEvent: function () {
986
989
  return (document.createElement('input').oninput !== undefined)
@@ -997,7 +1000,7 @@
997
1000
  if (!Array.isArray(rules) && typeof rules === 'object') {
998
1001
  fullFields[name] = rules;
999
1002
  } else {
1000
- if (typeof rules == 'string') {
1003
+ if (typeof rules === 'string') {
1001
1004
  rules = [rules];
1002
1005
  }
1003
1006
  fullFields[name] = {
@@ -1032,28 +1035,28 @@
1032
1035
  if (!rule.prompt) {
1033
1036
  suffixPrompt = (
1034
1037
  parts[0] === ''
1035
- ? settings.prompt.maxValue.replace(/\{ruleValue\}/g, '{max}')
1038
+ ? settings.prompt.maxValue.replace(/{ruleValue}/g, '{max}')
1036
1039
  : parts[1] === ''
1037
- ? settings.prompt.minValue.replace(/\{ruleValue\}/g, '{min}')
1040
+ ? settings.prompt.minValue.replace(/{ruleValue}/g, '{min}')
1038
1041
  : settings.prompt.range
1039
1042
  );
1040
- prompt += suffixPrompt.replace(/\{name\}/g, ' ' + settings.text.and);
1043
+ prompt += suffixPrompt.replace(/{name}/g, ' ' + settings.text.and);
1041
1044
  }
1042
- prompt = prompt.replace(/\{min\}/g, parts[0]);
1043
- prompt = prompt.replace(/\{max\}/g, parts[1]);
1045
+ prompt = prompt.replace(/{min}/g, parts[0]);
1046
+ prompt = prompt.replace(/{max}/g, parts[1]);
1044
1047
  }
1045
1048
  if (requiresValue) {
1046
- prompt = prompt.replace(/\{value\}/g, $field.val());
1049
+ prompt = prompt.replace(/{value}/g, $field.val());
1047
1050
  }
1048
1051
  if (requiresName) {
1049
1052
  $label = $field.closest(selector.group).find('label').eq(0);
1050
1053
  name = ($label.length == 1)
1051
1054
  ? $label.text()
1052
1055
  : $field.prop('placeholder') || settings.text.unspecifiedField;
1053
- prompt = prompt.replace(/\{name\}/g, name);
1056
+ prompt = prompt.replace(/{name}/g, name);
1054
1057
  }
1055
- prompt = prompt.replace(/\{identifier\}/g, field.identifier);
1056
- prompt = prompt.replace(/\{ruleValue\}/g, ancillary);
1058
+ prompt = prompt.replace(/{identifier}/g, field.identifier);
1059
+ prompt = prompt.replace(/{ruleValue}/g, ancillary);
1057
1060
  if (!rule.prompt) {
1058
1061
  module.verbose('Using default validation prompt for type', prompt, ruleName);
1059
1062
  }
@@ -1109,16 +1112,20 @@
1109
1112
  module.verbose('Finding field with identifier', identifier);
1110
1113
  identifier = module.escape.string(identifier);
1111
1114
  var t;
1112
- if ((t = $field.filter('#' + identifier)).length > 0) {
1115
+ t = $field.filter('#' + identifier);
1116
+ if (t.length > 0) {
1113
1117
  return t;
1114
1118
  }
1115
- if ((t = $field.filter('[name="' + identifier + '"]')).length > 0) {
1119
+ t = $field.filter('[name="' + identifier + '"]');
1120
+ if (t.length > 0) {
1116
1121
  return t;
1117
1122
  }
1118
- if ((t = $field.filter('[name="' + identifier + '[]"]')).length > 0) {
1123
+ t = $field.filter('[name="' + identifier + '[]"]');
1124
+ if (t.length > 0) {
1119
1125
  return t;
1120
1126
  }
1121
- if ((t = $field.filter('[data-' + metadata.validate + '="' + identifier + '"]')).length > 0) {
1127
+ t = $field.filter('[data-' + metadata.validate + '="' + identifier + '"]');
1128
+ if (t.length > 0) {
1122
1129
  return t;
1123
1130
  }
1124
1131
  module.error(error.noField.replace('{identifier}', identifier));
@@ -1211,11 +1218,7 @@
1211
1218
  : false;
1212
1219
  }
1213
1220
  } else if (isCheckbox) {
1214
- if (isChecked) {
1215
- values[name] = value || true;
1216
- } else {
1217
- values[name] = false;
1218
- }
1221
+ values[name] = isChecked ? value || true : false;
1219
1222
  } else if (isCalendar) {
1220
1223
  var date = $calendar.calendar('get date');
1221
1224
 
@@ -1345,7 +1348,7 @@
1345
1348
  $.each(newValidation.rules, function (_index, rule) {
1346
1349
  if ($.grep(validation[name].rules, function (item) {
1347
1350
  return item.type == rule.type;
1348
- }).length == 0) {
1351
+ }).length === 0) {
1349
1352
  validation[name].rules.push(rule);
1350
1353
  }
1351
1354
  });
@@ -1361,9 +1364,9 @@
1361
1364
  $field = module.get.field(identifier),
1362
1365
  $fieldGroup = $field.closest($group),
1363
1366
  $prompt = $fieldGroup.children(selector.prompt),
1364
- promptExists = ($prompt.length !== 0)
1367
+ promptExists = ($prompt.length > 0)
1365
1368
  ;
1366
- errors = (typeof errors == 'string')
1369
+ errors = (typeof errors === 'string')
1367
1370
  ? [errors]
1368
1371
  : errors;
1369
1372
  module.verbose('Adding field error state', identifier);
@@ -1719,7 +1722,7 @@
1719
1722
  showErrors = (showErrors !== undefined)
1720
1723
  ? showErrors
1721
1724
  : true;
1722
- if (typeof field == 'string') {
1725
+ if (typeof field === 'string') {
1723
1726
  module.verbose('Validating field', field);
1724
1727
  fieldName = field;
1725
1728
  field = validation[field];
@@ -1737,7 +1740,7 @@
1737
1740
  module.debug('Using field name as identifier', identifier);
1738
1741
  field.identifier = identifier;
1739
1742
  }
1740
- var isDisabled = !$field.filter(':not(:disabled)').length;
1743
+ var isDisabled = $field.filter(':not(:disabled)').length === 0;
1741
1744
  if (isDisabled) {
1742
1745
  module.debug('Field is disabled. Skipping', identifier);
1743
1746
  } else if (field.optional && module.is.blank($field)) {
@@ -1816,7 +1819,7 @@
1816
1819
  });
1817
1820
  }
1818
1821
 
1819
- return internal ? invalidFields : !(invalidFields.length > 0);
1822
+ return internal ? invalidFields : invalidFields.length === 0;
1820
1823
  },
1821
1824
  },
1822
1825
 
@@ -1872,7 +1875,7 @@
1872
1875
  previousTime
1873
1876
  ;
1874
1877
  if (settings.performance) {
1875
- currentTime = new Date().getTime();
1878
+ currentTime = Date.now();
1876
1879
  previousTime = time || currentTime;
1877
1880
  executionTime = currentTime - previousTime;
1878
1881
  time = currentTime;
@@ -1901,7 +1904,7 @@
1901
1904
  title += ' \'' + moduleSelector + '\'';
1902
1905
  }
1903
1906
  if ($allModules.length > 1) {
1904
- title += ' ' + '(' + $allModules.length + ')';
1907
+ title += ' (' + $allModules.length + ')';
1905
1908
  }
1906
1909
  if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
1907
1910
  console.groupCollapsed(title);
@@ -1926,8 +1929,8 @@
1926
1929
  ;
1927
1930
  passedArguments = passedArguments || queryArguments;
1928
1931
  context = context || element;
1929
- if (typeof query == 'string' && object !== undefined) {
1930
- query = query.split(/[\. ]/);
1932
+ if (typeof query === 'string' && object !== undefined) {
1933
+ query = query.split(/[ .]/);
1931
1934
  maxDepth = query.length - 1;
1932
1935
  $.each(query, function (depth, value) {
1933
1936
  var camelCaseValue = (depth != maxDepth)
@@ -2019,15 +2022,15 @@
2019
2022
  },
2020
2023
 
2021
2024
  regExp: {
2022
- htmlID: /^[a-zA-Z][\w:.-]*$/g,
2023
- bracket: /\[(.*)\]/i,
2025
+ htmlID: /^[A-Za-z][\w.:-]*$/g,
2026
+ bracket: /\[(.*)]/i,
2024
2027
  decimal: /^\d+\.?\d*$/,
2025
- email: /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,
2026
- escape: /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|:,=@]/g,
2028
+ email: /^[\w!#$%&'*+./=?^`{|}~-]+@[\da-z]([\da-z-]*[\da-z])?(\.[\da-z]([\da-z-]*[\da-z])?)*$/i,
2029
+ escape: /[$()*+,./:=?@[\\\]^{|}-]/g,
2027
2030
  flags: /^\/(.*)\/(.*)?/,
2028
- integer: /^\-?\d+$/,
2029
- number: /^\-?\d*(\.\d+)?$/,
2030
- url: /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i,
2031
+ integer: /^-?\d+$/,
2032
+ number: /^-?\d*(\.\d+)?$/,
2033
+ url: /(https?:\/\/(?:www\.|(?!www))[^\s.]+\.\S{2,}|www\.\S+\.\S{2,})/i,
2031
2034
  },
2032
2035
 
2033
2036
  text: {
@@ -2172,7 +2175,7 @@
2172
2175
 
2173
2176
  // is not empty or blank string
2174
2177
  empty: function (value) {
2175
- return !(value === undefined || '' === value || Array.isArray(value) && value.length === 0);
2178
+ return !(value === undefined || value === '' || (Array.isArray(value) && value.length === 0));
2176
2179
  },
2177
2180
 
2178
2181
  // checkbox checked
@@ -2222,7 +2225,7 @@
2222
2225
  return $.fn.form.settings.rules.range(value, range, 'integer');
2223
2226
  },
2224
2227
  range: function (value, range, regExp) {
2225
- if (typeof regExp == 'string') {
2228
+ if (typeof regExp === 'string') {
2226
2229
  regExp = $.fn.form.settings.regExp[regExp];
2227
2230
  }
2228
2231
  if (!(regExp instanceof RegExp)) {
@@ -2234,10 +2237,12 @@
2234
2237
  parts
2235
2238
  ;
2236
2239
  if (!range || ['', '..'].indexOf(range) !== -1) {
2240
+
2237
2241
  // do nothing
2238
2242
  } else if (range.indexOf('..') == -1) {
2239
2243
  if (regExp.test(range)) {
2240
- min = max = range - 0;
2244
+ min = range - 0;
2245
+ max = min;
2241
2246
  }
2242
2247
  } else {
2243
2248
  parts = range.split('..', 2);
@@ -2268,10 +2273,10 @@
2268
2273
 
2269
2274
  // is value (case insensitive)
2270
2275
  is: function (value, text) {
2271
- text = (typeof text == 'string')
2276
+ text = (typeof text === 'string')
2272
2277
  ? text.toLowerCase()
2273
2278
  : text;
2274
- value = (typeof value == 'string')
2279
+ value = (typeof value === 'string')
2275
2280
  ? value.toLowerCase()
2276
2281
  : value;
2277
2282
 
@@ -2285,10 +2290,10 @@
2285
2290
 
2286
2291
  // value is not another value (case insensitive)
2287
2292
  not: function (value, notValue) {
2288
- value = (typeof value == 'string')
2293
+ value = (typeof value === 'string')
2289
2294
  ? value.toLowerCase()
2290
2295
  : value;
2291
- notValue = (typeof notValue == 'string')
2296
+ notValue = (typeof notValue === 'string')
2292
2297
  ? notValue.toLowerCase()
2293
2298
  : notValue;
2294
2299
 
@@ -2359,14 +2364,24 @@
2359
2364
  matchingValue,
2360
2365
  matchingElement
2361
2366
  ;
2362
- if ((matchingElement = $module.find('[data-validate="' + identifier + '"]')).length > 0) {
2363
- matchingValue = matchingElement.val();
2364
- } else if ((matchingElement = $module.find('#' + identifier)).length > 0) {
2367
+ matchingElement = $module.find('[data-validate="' + identifier + '"]');
2368
+ if (matchingElement.length > 0) {
2365
2369
  matchingValue = matchingElement.val();
2366
- } else if ((matchingElement = $module.find('[name="' + identifier + '"]')).length > 0) {
2367
- matchingValue = matchingElement.val();
2368
- } else if ((matchingElement = $module.find('[name="' + identifier + '[]"]')).length > 0) {
2369
- matchingValue = matchingElement;
2370
+ } else {
2371
+ matchingElement = $module.find('#' + identifier);
2372
+ if (matchingElement.length > 0) {
2373
+ matchingValue = matchingElement.val();
2374
+ } else {
2375
+ matchingElement = $module.find('[name="' + identifier + '"]');
2376
+ if (matchingElement.length > 0) {
2377
+ matchingValue = matchingElement.val();
2378
+ } else {
2379
+ matchingElement = $module.find('[name="' + identifier + '[]"]');
2380
+ if (matchingElement.length > 0) {
2381
+ matchingValue = matchingElement;
2382
+ }
2383
+ }
2384
+ }
2370
2385
  }
2371
2386
 
2372
2387
  return (matchingValue !== undefined)
@@ -2381,14 +2396,24 @@
2381
2396
  matchingValue,
2382
2397
  matchingElement
2383
2398
  ;
2384
- if ((matchingElement = $module.find('[data-validate="' + identifier + '"]')).length > 0) {
2385
- matchingValue = matchingElement.val();
2386
- } else if ((matchingElement = $module.find('#' + identifier)).length > 0) {
2399
+ matchingElement = $module.find('[data-validate="' + identifier + '"]');
2400
+ if (matchingElement.length > 0) {
2387
2401
  matchingValue = matchingElement.val();
2388
- } else if ((matchingElement = $module.find('[name="' + identifier + '"]')).length > 0) {
2389
- matchingValue = matchingElement.val();
2390
- } else if ((matchingElement = $module.find('[name="' + identifier + '[]"]')).length > 0) {
2391
- matchingValue = matchingElement;
2402
+ } else {
2403
+ matchingElement = $module.find('#' + identifier);
2404
+ if (matchingElement.length > 0) {
2405
+ matchingValue = matchingElement.val();
2406
+ } else {
2407
+ matchingElement = $module.find('[name="' + identifier + '"]');
2408
+ if (matchingElement.length > 0) {
2409
+ matchingValue = matchingElement.val();
2410
+ } else {
2411
+ matchingElement = $module.find('[name="' + identifier + '[]"]');
2412
+ if (matchingElement.length > 0) {
2413
+ matchingValue = matchingElement;
2414
+ }
2415
+ }
2416
+ }
2392
2417
  }
2393
2418
 
2394
2419
  return (matchingValue !== undefined)
@@ -2412,7 +2437,7 @@
2412
2437
  length: [16],
2413
2438
  },
2414
2439
  discover: {
2415
- pattern: /^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,
2440
+ pattern: /^(6011|622(12[6-9]|1[3-9]\d|[2-8]\d{2}|9[01]\d|92[0-5]|64[4-9])|65)/,
2416
2441
  length: [16],
2417
2442
  },
2418
2443
  unionPay: {
@@ -2420,7 +2445,7 @@
2420
2445
  length: [16, 17, 18, 19],
2421
2446
  },
2422
2447
  jcb: {
2423
- pattern: /^35(2[89]|[3-8][0-9])/,
2448
+ pattern: /^35(2[89]|[3-8]\d)/,
2424
2449
  length: [16],
2425
2450
  },
2426
2451
  maestro: {
@@ -2442,7 +2467,7 @@
2442
2467
  },
2443
2468
  valid = {},
2444
2469
  validCard = false,
2445
- requiredTypes = (typeof cardTypes == 'string')
2470
+ requiredTypes = (typeof cardTypes === 'string')
2446
2471
  ? cardTypes.split(',')
2447
2472
  : false,
2448
2473
  unionPay,
@@ -2454,7 +2479,7 @@
2454
2479
  }
2455
2480
 
2456
2481
  // allow dashes and spaces in card
2457
- cardNumber = cardNumber.replace(/[\s\-]/g, '');
2482
+ cardNumber = cardNumber.replace(/[\s-]/g, '');
2458
2483
 
2459
2484
  // verify card types
2460
2485
  if (requiredTypes) {
@@ -2466,7 +2491,7 @@
2466
2491
  length: ($.inArray(cardNumber.length, validation.length) !== -1),
2467
2492
  pattern: (cardNumber.search(validation.pattern) !== -1),
2468
2493
  };
2469
- if (valid.length && valid.pattern) {
2494
+ if (valid.length > 0 && valid.pattern) {
2470
2495
  validCard = true;
2471
2496
  }
2472
2497
  }
@@ -2498,7 +2523,7 @@
2498
2523
  ;
2499
2524
  while (length--) {
2500
2525
  sum += producedValue[multiple][parseInt(cardNumber.charAt(length), 10)];
2501
- multiple ^= 1;
2526
+ multiple ^= 1; // eslint-disable-line no-bitwise
2502
2527
  }
2503
2528
 
2504
2529
  return (sum % 10 === 0 && sum > 0);
@@ -2542,7 +2567,7 @@
2542
2567
  })(jQuery, window, document);
2543
2568
 
2544
2569
  /*!
2545
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Accordion
2570
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Accordion
2546
2571
  * https://github.com/fomantic/Fomantic-UI/
2547
2572
  *
2548
2573
  *
@@ -2558,7 +2583,7 @@
2558
2583
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
2559
2584
  }
2560
2585
 
2561
- window = (typeof window != 'undefined' && window.Math == Math)
2586
+ window = (window !== undefined && window.Math === Math)
2562
2587
  ? window
2563
2588
  : globalThis;
2564
2589
 
@@ -2566,11 +2591,11 @@
2566
2591
  var
2567
2592
  $allModules = $(this),
2568
2593
 
2569
- time = new Date().getTime(),
2594
+ time = Date.now(),
2570
2595
  performance = [],
2571
2596
 
2572
2597
  query = arguments[0],
2573
- methodInvoked = (typeof query == 'string'),
2598
+ methodInvoked = (typeof query === 'string'),
2574
2599
  queryArguments = [].slice.call(arguments, 1),
2575
2600
 
2576
2601
  returnedValue
@@ -2970,7 +2995,7 @@
2970
2995
  previousTime
2971
2996
  ;
2972
2997
  if (settings.performance) {
2973
- currentTime = new Date().getTime();
2998
+ currentTime = Date.now();
2974
2999
  previousTime = time || currentTime;
2975
3000
  executionTime = currentTime - previousTime;
2976
3001
  time = currentTime;
@@ -3021,8 +3046,8 @@
3021
3046
  ;
3022
3047
  passedArguments = passedArguments || queryArguments;
3023
3048
  context = context || element;
3024
- if (typeof query == 'string' && object !== undefined) {
3025
- query = query.split(/[\. ]/);
3049
+ if (typeof query === 'string' && object !== undefined) {
3050
+ query = query.split(/[ .]/);
3026
3051
  maxDepth = query.length - 1;
3027
3052
  $.each(query, function (depth, value) {
3028
3053
  var camelCaseValue = (depth != maxDepth)
@@ -3140,7 +3165,7 @@
3140
3165
  })(jQuery, window, document);
3141
3166
 
3142
3167
  /*!
3143
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Calendar
3168
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Calendar
3144
3169
  * https://github.com/fomantic/Fomantic-UI/
3145
3170
  *
3146
3171
  *
@@ -3156,7 +3181,7 @@
3156
3181
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
3157
3182
  }
3158
3183
 
3159
- window = (typeof window != 'undefined' && window.Math == Math)
3184
+ window = (window !== undefined && window.Math === Math)
3160
3185
  ? window
3161
3186
  : globalThis;
3162
3187
 
@@ -3167,11 +3192,11 @@
3167
3192
 
3168
3193
  moduleSelector = $allModules.selector || '',
3169
3194
 
3170
- time = new Date().getTime(),
3195
+ time = Date.now(),
3171
3196
  performance = [],
3172
3197
 
3173
3198
  query = arguments[0],
3174
- methodInvoked = (typeof query == 'string'),
3199
+ methodInvoked = (typeof query === 'string'),
3175
3200
  queryArguments = [].slice.call(arguments, 1),
3176
3201
  returnedValue,
3177
3202
  timeGapTable = {
@@ -3265,9 +3290,9 @@
3265
3290
  if (settings.inline) {
3266
3291
  return;
3267
3292
  }
3268
- if (!$activator.length) {
3293
+ if ($activator.length === 0) {
3269
3294
  $activator = $module.children().first();
3270
- if (!$activator.length) {
3295
+ if ($activator.length === 0) {
3271
3296
  return;
3272
3297
  }
3273
3298
  }
@@ -3276,7 +3301,7 @@
3276
3301
 
3277
3302
  return;
3278
3303
  }
3279
- if (!$container.length) {
3304
+ if ($container.length === 0) {
3280
3305
  if (settings.context) {
3281
3306
  module.popupId = namespace + '_popup_' + (Math.random().toString(16) + '000000000').slice(2, 10);
3282
3307
  $container = $('<div/>', { id: module.popupId }).addClass(className.popup).appendTo($document.find(settings.context));
@@ -3285,7 +3310,7 @@
3285
3310
  // the styling (eg input action button needs to be the last child to have correct border radius)
3286
3311
  var
3287
3312
  $activatorParent = $activator.parent(),
3288
- domPositionFunction = $activatorParent.closest(selector.append).length !== 0 ? 'appendTo' : 'prependTo'
3313
+ domPositionFunction = $activatorParent.closest(selector.append).length > 0 ? 'appendTo' : 'prependTo'
3289
3314
  ;
3290
3315
  $container = $('<div/>').addClass(className.popup)[domPositionFunction]($activatorParent);
3291
3316
  }
@@ -3304,7 +3329,7 @@
3304
3329
 
3305
3330
  return settings.onHidden.apply($container, arguments);
3306
3331
  };
3307
- if (!$input.length) {
3332
+ if ($input.length === 0) {
3308
3333
  // no input, $container has to handle focus/blur
3309
3334
  $container.attr('tabindex', '0');
3310
3335
  onVisible = function () {
@@ -3336,17 +3361,17 @@
3336
3361
  module.popup(options);
3337
3362
  },
3338
3363
  inline: function () {
3339
- if ($activator.length && !settings.inline) {
3364
+ if ($activator.length > 0 && !settings.inline) {
3340
3365
  return;
3341
3366
  }
3342
3367
  settings.inline = true;
3343
3368
  $container = $('<div/>').addClass(className.calendar).appendTo($module);
3344
- if (!$input.length) {
3369
+ if ($input.length === 0) {
3345
3370
  $container.attr('tabindex', '0');
3346
3371
  }
3347
3372
  },
3348
3373
  input: function () {
3349
- if (settings.touchReadonly && $input.length && isTouch) {
3374
+ if (settings.touchReadonly && $input.length > 0 && isTouch) {
3350
3375
  $input.prop('readonly', true);
3351
3376
  }
3352
3377
  module.check.disabled();
@@ -3357,7 +3382,7 @@
3357
3382
  date = parser.date(settings.initialDate, settings);
3358
3383
  } else if ($module.data(metadata.date) !== undefined) {
3359
3384
  date = parser.date($module.data(metadata.date), settings);
3360
- } else if ($input.length) {
3385
+ } else if ($input.length > 0) {
3361
3386
  date = parser.date($input.val(), settings);
3362
3387
  }
3363
3388
  module.set.date(date, settings.formatInput, false);
@@ -3442,7 +3467,7 @@
3442
3467
  }
3443
3468
 
3444
3469
  var month = startMonth + p;
3445
- var firstMonthDayColumn = (new Date(year, month, 1).getDay() - settings.firstDayOfWeek % 7 + 7) % 7;
3470
+ var firstMonthDayColumn = (new Date(year, month, 1).getDay() - (settings.firstDayOfWeek % 7) + 7) % 7;
3446
3471
  if (!settings.constantHeight && isDay) {
3447
3472
  var requiredCells = new Date(year, month + 1, 0).getDate() + firstMonthDayColumn;
3448
3473
  rows = Math.ceil(requiredCells / 7);
@@ -3475,7 +3500,8 @@
3475
3500
  if (isDay && settings.showWeekNumbers) {
3476
3501
  tempMode += ' andweek';
3477
3502
  }
3478
- var table = $('<table/>').addClass(className.table).addClass(tempMode).addClass(numberText[columns] + ' column').appendTo(container);
3503
+ var table = $('<table/>').addClass(className.table).addClass(tempMode).addClass(numberText[columns] + ' column')
3504
+ .appendTo(container);
3479
3505
  if (isInverted) {
3480
3506
  table.addClass(className.inverted);
3481
3507
  }
@@ -3687,7 +3713,7 @@
3687
3713
  var winWidth = $(window).width();
3688
3714
  $container.find('td[data-position]').each(function () {
3689
3715
  var $cell = $(this);
3690
- var tooltipWidth = window.getComputedStyle($cell[0], '::after').width.replace(/[^0-9\.]/g, '');
3716
+ var tooltipWidth = window.getComputedStyle($cell[0], '::after').width.replace(/[^\d.]/g, '');
3691
3717
  var tooltipPosition = $cell.attr('data-position');
3692
3718
  // use a fallback width of 250 (calendar width) for IE/Edge (which return "auto")
3693
3719
  var calcPosition = (winWidth - $cell.width() - (parseInt(tooltipWidth, 10) || 250)) > $cell.offset().left ? 'right' : 'left';
@@ -3705,7 +3731,7 @@
3705
3731
  $container.on('mouseup' + eventNamespace, module.event.mouseup);
3706
3732
  $container.on('touchend' + eventNamespace, module.event.mouseup);
3707
3733
  $container.on('mouseover' + eventNamespace, module.event.mouseover);
3708
- if ($input.length) {
3734
+ if ($input.length > 0) {
3709
3735
  $input.on('input' + eventNamespace, module.event.inputChange);
3710
3736
  $input.on('focus' + eventNamespace, module.event.inputFocus);
3711
3737
  $input.on('blur' + eventNamespace, module.event.inputBlur);
@@ -3720,7 +3746,7 @@
3720
3746
  events: function () {
3721
3747
  module.debug('Unbinding events');
3722
3748
  $container.off(eventNamespace);
3723
- if ($input.length) {
3749
+ if ($input.length > 0) {
3724
3750
  $input.off(eventNamespace);
3725
3751
  }
3726
3752
  },
@@ -3736,7 +3762,7 @@
3736
3762
  }
3737
3763
  },
3738
3764
  mousedown: function (event) {
3739
- if ($input.length) {
3765
+ if ($input.length > 0) {
3740
3766
  // prevent the mousedown on the calendar causing the input to lose focus
3741
3767
  event.preventDefault();
3742
3768
  }
@@ -3783,38 +3809,51 @@
3783
3809
 
3784
3810
  if (module.popup('is visible')) {
3785
3811
  var mode = module.get.mode();
3786
- if (keyCode === 37 || keyCode === 38 || keyCode === 39 || keyCode === 40) {
3812
+ switch (keyCode) {
3787
3813
  // arrow keys
3788
- var bigIncrement = mode === 'day' ? 7 : mode === 'hour' ? 4 : mode === 'minute' ? timeGap.column : 3;
3789
- var increment = keyCode === 37 ? -1 : keyCode === 38 ? -bigIncrement : keyCode == 39 ? 1 : bigIncrement;
3790
- increment *= mode === 'minute' ? settings.minTimeGap : 1;
3791
- var focusDate = module.get.focusDate() || module.get.date() || new Date();
3792
- var year = focusDate.getFullYear() + (mode === 'year' ? increment : 0);
3793
- var month = focusDate.getMonth() + (mode === 'month' ? increment : 0);
3794
- var day = focusDate.getDate() + (mode === 'day' ? increment : 0);
3795
- var hour = focusDate.getHours() + (mode === 'hour' ? increment : 0);
3796
- var minute = focusDate.getMinutes() + (mode === 'minute' ? increment : 0);
3797
- var newFocusDate = new Date(year, month, day, hour, minute);
3798
- if (settings.type === 'time') {
3799
- newFocusDate = module.helper.mergeDateTime(focusDate, newFocusDate);
3800
- }
3801
- if (module.helper.isDateInRange(newFocusDate, mode)) {
3802
- module.set.focusDate(newFocusDate);
3814
+ case 37:
3815
+ case 38:
3816
+ case 39:
3817
+ case 40: {
3818
+ var bigIncrement = mode === 'day' ? 7 : mode === 'hour' ? 4 : mode === 'minute' ? timeGap.column : 3;
3819
+ var increment = keyCode === 37 ? -1 : keyCode === 38 ? -bigIncrement : keyCode == 39 ? 1 : bigIncrement;
3820
+ increment *= mode === 'minute' ? settings.minTimeGap : 1;
3821
+ var focusDate = module.get.focusDate() || module.get.date() || new Date();
3822
+ var year = focusDate.getFullYear() + (mode === 'year' ? increment : 0);
3823
+ var month = focusDate.getMonth() + (mode === 'month' ? increment : 0);
3824
+ var day = focusDate.getDate() + (mode === 'day' ? increment : 0);
3825
+ var hour = focusDate.getHours() + (mode === 'hour' ? increment : 0);
3826
+ var minute = focusDate.getMinutes() + (mode === 'minute' ? increment : 0);
3827
+ var newFocusDate = new Date(year, month, day, hour, minute);
3828
+ if (settings.type === 'time') {
3829
+ newFocusDate = module.helper.mergeDateTime(focusDate, newFocusDate);
3830
+ }
3831
+ if (module.helper.isDateInRange(newFocusDate, mode)) {
3832
+ module.set.focusDate(newFocusDate);
3833
+ }
3834
+
3835
+ break;
3803
3836
  }
3804
- } else if (keyCode === 13) {
3805
- // enter
3806
- var date = module.get.focusDate();
3807
- if (date && !settings.isDisabled(date, mode) && !module.helper.isDisabled(date, mode) && module.helper.isEnabled(date, mode)) {
3808
- if (settings.onSelect.call(element, date, module.get.mode()) !== false) {
3809
- module.selectDate(date);
3837
+ // enter key
3838
+ case 13: {
3839
+ var date = module.get.focusDate();
3840
+ if (date && !settings.isDisabled(date, mode) && !module.helper.isDisabled(date, mode) && module.helper.isEnabled(date, mode)) {
3841
+ if (settings.onSelect.call(element, date, module.get.mode()) !== false) {
3842
+ module.selectDate(date);
3843
+ }
3810
3844
  }
3845
+ // disable form submission:
3846
+ event.preventDefault();
3847
+ event.stopPropagation();
3848
+
3849
+ break;
3811
3850
  }
3812
- // disable form submission:
3813
- event.preventDefault();
3814
- event.stopPropagation();
3815
- } else if (keyCode === 27) {
3816
- module.popup('hide');
3817
- event.stopPropagation();
3851
+ // escape key
3852
+ case 27:
3853
+ module.popup('hide');
3854
+ event.stopPropagation();
3855
+
3856
+ break;
3818
3857
  }
3819
3858
  }
3820
3859
 
@@ -3865,7 +3904,7 @@
3865
3904
 
3866
3905
  disconnect: {
3867
3906
  classObserver: function () {
3868
- if ($input.length && classObserver) {
3907
+ if ($input.length > 0 && classObserver) {
3869
3908
  classObserver.disconnect();
3870
3909
  }
3871
3910
  },
@@ -3873,7 +3912,7 @@
3873
3912
 
3874
3913
  observe: {
3875
3914
  class: function () {
3876
- if ($input.length && classObserver) {
3915
+ if ($input.length > 0 && classObserver) {
3877
3916
  classObserver.observe($module[0], {
3878
3917
  attributes: true,
3879
3918
  });
@@ -4031,7 +4070,7 @@
4031
4070
  }
4032
4071
  module.set.dataKeyValue(metadata.date, date);
4033
4072
 
4034
- if (updateInput && $input.length) {
4073
+ if (updateInput && $input.length > 0) {
4035
4074
  $input.val(text);
4036
4075
  }
4037
4076
 
@@ -4172,14 +4211,14 @@
4172
4211
  },
4173
4212
 
4174
4213
  focus: function () {
4175
- if ($input.length) {
4214
+ if ($input.length > 0) {
4176
4215
  $input.trigger('focus');
4177
4216
  } else {
4178
4217
  $container.trigger('focus');
4179
4218
  }
4180
4219
  },
4181
4220
  blur: function () {
4182
- if ($input.length) {
4221
+ if ($input.length > 0) {
4183
4222
  $input.trigger('blur');
4184
4223
  } else {
4185
4224
  $container.trigger('blur');
@@ -4230,7 +4269,7 @@
4230
4269
  ss: ('0' + s).slice(-2),
4231
4270
  a: a,
4232
4271
  A: a.toUpperCase(),
4233
- S: ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D % 100 - D % 10 !== 10) * D % 10],
4272
+ S: ['th', 'st', 'nd', 'rd'][(D % 10) > 3 ? 0 : (((D % 100) - (D % 10) === 10) ? 0 : D % 10)],
4234
4273
  w: w,
4235
4274
  ww: ('0' + w).slice(-2),
4236
4275
  }
@@ -4339,9 +4378,9 @@
4339
4378
 
4340
4379
  return enabled;
4341
4380
  });
4342
- } else {
4343
- return true;
4344
4381
  }
4382
+
4383
+ return true;
4345
4384
  },
4346
4385
  findDayAsObject: function (date, mode, dates) {
4347
4386
  if (mode === 'day' || mode === 'month' || mode === 'year') {
@@ -4356,11 +4395,13 @@
4356
4395
  dateObject[metadata.date] = d;
4357
4396
 
4358
4397
  return dateObject;
4359
- } else if (d !== null && typeof d === 'object') {
4398
+ }
4399
+ if (d !== null && typeof d === 'object') {
4360
4400
  if (d[metadata.year]) {
4361
4401
  if (typeof d[metadata.year] === 'number' && date.getFullYear() == d[metadata.year]) {
4362
4402
  return d;
4363
- } else if (Array.isArray(d[metadata.year])) {
4403
+ }
4404
+ if (Array.isArray(d[metadata.year])) {
4364
4405
  if (d[metadata.year].indexOf(date.getFullYear()) > -1) {
4365
4406
  return d;
4366
4407
  }
@@ -4368,7 +4409,8 @@
4368
4409
  } else if (d[metadata.month]) {
4369
4410
  if (typeof d[metadata.month] === 'number' && date.getMonth() == d[metadata.month]) {
4370
4411
  return d;
4371
- } else if (Array.isArray(d[metadata.month])) {
4412
+ }
4413
+ if (Array.isArray(d[metadata.month])) {
4372
4414
  if (d[metadata.month].indexOf(date.getMonth()) > -1) {
4373
4415
  return d;
4374
4416
  }
@@ -4381,7 +4423,8 @@
4381
4423
  } else if (d[metadata.date] && mode === 'day') {
4382
4424
  if (d[metadata.date] instanceof Date && module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode)) {
4383
4425
  return d;
4384
- } else if (Array.isArray(d[metadata.date])) {
4426
+ }
4427
+ if (Array.isArray(d[metadata.date])) {
4385
4428
  if (d[metadata.date].some(function (idate) {
4386
4429
  return module.helper.dateEqual(date, idate, mode);
4387
4430
  })) {
@@ -4402,7 +4445,8 @@
4402
4445
  if (d[metadata.hours]) {
4403
4446
  if (typeof d[metadata.hours] === 'number' && date.getHours() == d[metadata.hours]) {
4404
4447
  return d;
4405
- } else if (Array.isArray(d[metadata.hours])) {
4448
+ }
4449
+ if (Array.isArray(d[metadata.hours])) {
4406
4450
  if (d[metadata.hours].indexOf(date.getHours()) > -1) {
4407
4451
  return d;
4408
4452
  }
@@ -4413,11 +4457,13 @@
4413
4457
  d = hours[i];
4414
4458
  if (typeof d === 'number' && date.getHours() == d) {
4415
4459
  return null;
4416
- } else if (d !== null && typeof d === 'object') {
4460
+ }
4461
+ if (d !== null && typeof d === 'object') {
4417
4462
  if (d[metadata.days] && hourCheck(date, d)) {
4418
4463
  if (typeof d[metadata.days] === 'number' && date.getDay() == d[metadata.days]) {
4419
4464
  return d;
4420
- } else if (Array.isArray(d[metadata.days])) {
4465
+ }
4466
+ if (Array.isArray(d[metadata.days])) {
4421
4467
  if (d[metadata.days].indexOf(date.getDay()) > -1) {
4422
4468
  return d;
4423
4469
  }
@@ -4425,7 +4471,8 @@
4425
4471
  } else if (d[metadata.date] && hourCheck(date, d)) {
4426
4472
  if (d[metadata.date] instanceof Date && module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]))) {
4427
4473
  return d;
4428
- } else if (Array.isArray(d[metadata.date])) {
4474
+ }
4475
+ if (Array.isArray(d[metadata.date])) {
4429
4476
  if (d[metadata.date].some(function (idate) {
4430
4477
  return module.helper.dateEqual(date, idate, mode);
4431
4478
  })) {
@@ -4452,7 +4499,10 @@
4452
4499
  return date;
4453
4500
  },
4454
4501
  dateDiff: function (date1, date2, mode) {
4455
- mode = mode || 'day';
4502
+ if (!mode) {
4503
+ mode = 'day';
4504
+ }
4505
+
4456
4506
  var isTimeOnly = settings.type === 'time';
4457
4507
  var isYear = mode === 'year';
4458
4508
  var isYearOrMonth = isYear || mode === 'month';
@@ -4575,7 +4625,7 @@
4575
4625
  previousTime
4576
4626
  ;
4577
4627
  if (settings.performance) {
4578
- currentTime = new Date().getTime();
4628
+ currentTime = Date.now();
4579
4629
  previousTime = time || currentTime;
4580
4630
  executionTime = currentTime - previousTime;
4581
4631
  time = currentTime;
@@ -4626,8 +4676,8 @@
4626
4676
  ;
4627
4677
  passedArguments = passedArguments || queryArguments;
4628
4678
  context = context || element;
4629
- if (typeof query == 'string' && object !== undefined) {
4630
- query = query.split(/[\. ]/);
4679
+ if (typeof query === 'string' && object !== undefined) {
4680
+ query = query.split(/[ .]/);
4631
4681
  maxDepth = query.length - 1;
4632
4682
  $.each(query, function (depth, value) {
4633
4683
  var camelCaseValue = (depth != maxDepth)
@@ -4775,8 +4825,7 @@
4775
4825
  today: function (settings) {
4776
4826
  return settings.type === 'date' ? settings.text.today : settings.text.now;
4777
4827
  },
4778
- cell: function (cell, date, cellOptions) {
4779
- },
4828
+ cell: function (cell, date, cellOptions) {},
4780
4829
  },
4781
4830
 
4782
4831
  parser: {
@@ -4787,17 +4836,18 @@
4787
4836
  if (!text) {
4788
4837
  return null;
4789
4838
  }
4790
- text = String(text).trim().replace(/([.:\/\-])\s+/g, '$1').replace(/\s+([.:\/-])/g, '$1').replace(/\s+/g, ' ');
4839
+ text = String(text).trim().replace(/([./:-])\s+/g, '$1').replace(/\s+([./:-])/g, '$1')
4840
+ .replace(/\s+/g, ' ');
4791
4841
  if (text.length === 0) {
4792
4842
  return null;
4793
4843
  }
4794
- if (text.match(/^[0-9]{4}[\/\-\.][0-9]{1,2}[\/\-\.][0-9]{1,2}$/)) {
4795
- text = text.replace(/[\/\-\.]/g, '/') + ' 00:00:00';
4844
+ if (/^\d{4}(?:[./-]\d{1,2}){2}$/.test(text)) {
4845
+ text = text.replace(/[./-]/g, '/') + ' 00:00:00';
4796
4846
  }
4797
4847
  // Reverse date and month in some cases
4798
- text = settings.monthFirst || !text.match(/^[0-9]{1,2}[\/\-\.]/) ? text : text.replace(/[\/\-\.]/g, '/').replace(/([0-9]+)\/([0-9]+)/, '$2/$1');
4848
+ text = settings.monthFirst || !/^\d{1,2}[./-]/.test(text) ? text : text.replace(/[./-]/g, '/').replace(/(\d+)\/(\d+)/, '$2/$1');
4799
4849
  var textDate = new Date(text);
4800
- var numberOnly = text.match(/^[0-9]+$/) !== null;
4850
+ var numberOnly = text.match(/^\d+$/) !== null;
4801
4851
  if (!numberOnly && !isNaN(textDate.getDate())) {
4802
4852
  return textDate;
4803
4853
  }
@@ -4815,7 +4865,7 @@
4815
4865
  month = -1,
4816
4866
  year = -1
4817
4867
  ;
4818
- var isAm = undefined;
4868
+ var isAm;
4819
4869
 
4820
4870
  var isTimeOnly = settings.type === 'time';
4821
4871
  var isDateOnly = settings.type.indexOf('time') < 0;
@@ -4845,7 +4895,7 @@
4845
4895
  if (hour < 0 || minute < 0) {
4846
4896
  parts = number.split(':');
4847
4897
  for (k = 0; k < Math.min(2, parts.length); k++) {
4848
- j = parseInt(parts[k]);
4898
+ j = parseInt(parts[k], 10);
4849
4899
  if (isNaN(j)) {
4850
4900
  j = 0;
4851
4901
  }
@@ -4884,7 +4934,7 @@
4884
4934
 
4885
4935
  // year > settings.centuryBreak
4886
4936
  for (i = 0; i < numbers.length; i++) {
4887
- j = parseInt(numbers[i]);
4937
+ j = parseInt(numbers[i], 10);
4888
4938
  if (isNaN(j)) {
4889
4939
  continue;
4890
4940
  }
@@ -4903,11 +4953,11 @@
4903
4953
  if (month < 0) {
4904
4954
  for (i = 0; i < numbers.length; i++) {
4905
4955
  k = i > 1 || settings.monthFirst ? i : i === 1 ? 0 : 1;
4906
- j = parseInt(numbers[k]);
4956
+ j = parseInt(numbers[k], 10);
4907
4957
  if (isNaN(j)) {
4908
4958
  continue;
4909
4959
  }
4910
- if (1 <= j && j <= 12) {
4960
+ if (j >= 1 && j <= 12) {
4911
4961
  month = j;
4912
4962
  numbers.splice(k, 1);
4913
4963
 
@@ -4918,11 +4968,11 @@
4918
4968
 
4919
4969
  // day
4920
4970
  for (i = 0; i < numbers.length; i++) {
4921
- j = parseInt(numbers[i]);
4971
+ j = parseInt(numbers[i], 10);
4922
4972
  if (isNaN(j)) {
4923
4973
  continue;
4924
4974
  }
4925
- if (1 <= j && j <= 31) {
4975
+ if (j >= 1 && j <= 31) {
4926
4976
  day = j;
4927
4977
  numbers.splice(i, 1);
4928
4978
 
@@ -4933,7 +4983,7 @@
4933
4983
  // year <= settings.centuryBreak
4934
4984
  if (year < 0) {
4935
4985
  for (i = numbers.length - 1; i >= 0; i--) {
4936
- j = parseInt(numbers[i]);
4986
+ j = parseInt(numbers[i], 10);
4937
4987
  if (isNaN(j)) {
4938
4988
  continue;
4939
4989
  }
@@ -4952,11 +5002,11 @@
4952
5002
  // hour
4953
5003
  if (hour < 0) {
4954
5004
  for (i = 0; i < numbers.length; i++) {
4955
- j = parseInt(numbers[i]);
5005
+ j = parseInt(numbers[i], 10);
4956
5006
  if (isNaN(j)) {
4957
5007
  continue;
4958
5008
  }
4959
- if (0 <= j && j <= 23) {
5009
+ if (j >= 0 && j <= 23) {
4960
5010
  hour = j;
4961
5011
  numbers.splice(i, 1);
4962
5012
 
@@ -4968,11 +5018,11 @@
4968
5018
  // minute
4969
5019
  if (minute < 0) {
4970
5020
  for (i = 0; i < numbers.length; i++) {
4971
- j = parseInt(numbers[i]);
5021
+ j = parseInt(numbers[i], 10);
4972
5022
  if (isNaN(j)) {
4973
5023
  continue;
4974
5024
  }
4975
- if (0 <= j && j <= 59) {
5025
+ if (j >= 0 && j <= 59) {
4976
5026
  minute = j;
4977
5027
  numbers.splice(i, 1);
4978
5028
 
@@ -5028,28 +5078,22 @@
5028
5078
  },
5029
5079
 
5030
5080
  // callback when date changes
5031
- onChange: function (date, text, mode) {
5032
- },
5081
+ onChange: function (date, text, mode) {},
5033
5082
 
5034
5083
  // callback before show animation, return false to prevent show
5035
- onShow: function () {
5036
- },
5084
+ onShow: function () {},
5037
5085
 
5038
5086
  // callback after show animation
5039
- onVisible: function () {
5040
- },
5087
+ onVisible: function () {},
5041
5088
 
5042
5089
  // callback before hide animation, return false to prevent hide
5043
- onHide: function () {
5044
- },
5090
+ onHide: function () {},
5045
5091
 
5046
5092
  // callback after hide animation
5047
- onHidden: function () {
5048
- },
5093
+ onHidden: function () {},
5049
5094
 
5050
5095
  // callback before item is selected, return false to prevent selection
5051
- onSelect: function (date, mode) {
5052
- },
5096
+ onSelect: function (date, mode) {},
5053
5097
 
5054
5098
  // is the given date disabled?
5055
5099
  isDisabled: function (date, mode) {
@@ -5066,7 +5110,7 @@
5066
5110
  regExp: {
5067
5111
  dateWords: /[^A-Za-z\u00C0-\u024F]+/g,
5068
5112
  dateNumbers: /[^\d:]+/g,
5069
- token: /d{1,4}|D{1,2}|M{1,4}|YY(?:YY)?|([Hhmsw])\1?|[SAaY]|"[^"]*"|'[^']*'/g,
5113
+ token: /d{1,4}|D{1,2}|M{1,4}|YY(?:YY)?|([Hhmsw])\1?|[ASYa]|"[^"]*"|'[^']*'/g,
5070
5114
  },
5071
5115
 
5072
5116
  error: {
@@ -5125,7 +5169,7 @@
5125
5169
  })(jQuery, window, document);
5126
5170
 
5127
5171
  /*!
5128
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Checkbox
5172
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Checkbox
5129
5173
  * https://github.com/fomantic/Fomantic-UI/
5130
5174
  *
5131
5175
  *
@@ -5141,7 +5185,7 @@
5141
5185
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
5142
5186
  }
5143
5187
 
5144
- window = (typeof window != 'undefined' && window.Math == Math)
5188
+ window = (window !== undefined && window.Math === Math)
5145
5189
  ? window
5146
5190
  : globalThis;
5147
5191
 
@@ -5150,11 +5194,11 @@
5150
5194
  $allModules = $(this),
5151
5195
  moduleSelector = $allModules.selector || '',
5152
5196
 
5153
- time = new Date().getTime(),
5197
+ time = Date.now(),
5154
5198
  performance = [],
5155
5199
 
5156
5200
  query = arguments[0],
5157
- methodInvoked = (typeof query == 'string'),
5201
+ methodInvoked = (typeof query === 'string'),
5158
5202
  queryArguments = [].slice.call(arguments, 1),
5159
5203
  returnedValue
5160
5204
  ;
@@ -5292,7 +5336,7 @@
5292
5336
  },
5293
5337
 
5294
5338
  preventDefaultOnInputTarget: function () {
5295
- if (typeof event !== 'undefined' && event !== null && $(event.target).is(selector.input)) {
5339
+ if (event !== undefined && event !== null && $(event.target).is(selector.input)) {
5296
5340
  module.verbose('Preventing default check action after manual check action');
5297
5341
  event.preventDefault();
5298
5342
  }
@@ -5838,7 +5882,7 @@
5838
5882
  previousTime
5839
5883
  ;
5840
5884
  if (settings.performance) {
5841
- currentTime = new Date().getTime();
5885
+ currentTime = Date.now();
5842
5886
  previousTime = time || currentTime;
5843
5887
  executionTime = currentTime - previousTime;
5844
5888
  time = currentTime;
@@ -5889,8 +5933,8 @@
5889
5933
  ;
5890
5934
  passedArguments = passedArguments || queryArguments;
5891
5935
  context = context || element;
5892
- if (typeof query == 'string' && object !== undefined) {
5893
- query = query.split(/[\. ]/);
5936
+ if (typeof query === 'string' && object !== undefined) {
5937
+ query = query.split(/[ .]/);
5894
5938
  maxDepth = query.length - 1;
5895
5939
  $.each(query, function (depth, value) {
5896
5940
  var camelCaseValue = (depth != maxDepth)
@@ -6010,7 +6054,7 @@
6010
6054
  })(jQuery, window, document);
6011
6055
 
6012
6056
  /*!
6013
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Dimmer
6057
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Dimmer
6014
6058
  * https://github.com/fomantic/Fomantic-UI/
6015
6059
  *
6016
6060
  *
@@ -6026,7 +6070,7 @@
6026
6070
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
6027
6071
  }
6028
6072
 
6029
- window = (typeof window != 'undefined' && window.Math == Math)
6073
+ window = (window !== undefined && window.Math === Math)
6030
6074
  ? window
6031
6075
  : globalThis;
6032
6076
 
@@ -6034,11 +6078,11 @@
6034
6078
  var
6035
6079
  $allModules = $(this),
6036
6080
 
6037
- time = new Date().getTime(),
6081
+ time = Date.now(),
6038
6082
  performance = [],
6039
6083
 
6040
6084
  query = arguments[0],
6041
- methodInvoked = (typeof query == 'string'),
6085
+ methodInvoked = (typeof query === 'string'),
6042
6086
  queryArguments = [].slice.call(arguments, 1),
6043
6087
 
6044
6088
  returnedValue
@@ -6081,11 +6125,9 @@
6081
6125
  } else {
6082
6126
  $dimmable = $module;
6083
6127
  if (module.has.dimmer()) {
6084
- if (settings.dimmerName) {
6085
- $dimmer = $dimmable.find(selector.dimmer).filter('.' + settings.dimmerName);
6086
- } else {
6087
- $dimmer = $dimmable.find(selector.dimmer);
6088
- }
6128
+ $dimmer = settings.dimmerName
6129
+ ? $dimmable.find(selector.dimmer).filter('.' + settings.dimmerName)
6130
+ : $dimmable.find(selector.dimmer);
6089
6131
  } else {
6090
6132
  $dimmer = module.create();
6091
6133
  }
@@ -6347,9 +6389,9 @@
6347
6389
  duration: function () {
6348
6390
  if (module.is.active()) {
6349
6391
  return settings.transition.hideDuration || settings.duration.hide || settings.duration;
6350
- } else {
6351
- return settings.transition.showDuration || settings.duration.show || settings.duration;
6352
6392
  }
6393
+
6394
+ return settings.transition.showDuration || settings.duration.show || settings.duration;
6353
6395
  },
6354
6396
  },
6355
6397
 
@@ -6357,9 +6399,9 @@
6357
6399
  dimmer: function () {
6358
6400
  if (settings.dimmerName) {
6359
6401
  return ($module.find(selector.dimmer).filter('.' + settings.dimmerName).length > 0);
6360
- } else {
6361
- return ($module.find(selector.dimmer).length > 0);
6362
6402
  }
6403
+
6404
+ return ($module.find(selector.dimmer).length > 0);
6363
6405
  },
6364
6406
  },
6365
6407
 
@@ -6530,7 +6572,7 @@
6530
6572
  previousTime
6531
6573
  ;
6532
6574
  if (settings.performance) {
6533
- currentTime = new Date().getTime();
6575
+ currentTime = Date.now();
6534
6576
  previousTime = time || currentTime;
6535
6577
  executionTime = currentTime - previousTime;
6536
6578
  time = currentTime;
@@ -6559,7 +6601,7 @@
6559
6601
  title += ' \'' + moduleSelector + '\'';
6560
6602
  }
6561
6603
  if ($allModules.length > 1) {
6562
- title += ' ' + '(' + $allModules.length + ')';
6604
+ title += ' (' + $allModules.length + ')';
6563
6605
  }
6564
6606
  if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
6565
6607
  console.groupCollapsed(title);
@@ -6584,8 +6626,8 @@
6584
6626
  ;
6585
6627
  passedArguments = passedArguments || queryArguments;
6586
6628
  context = context || element;
6587
- if (typeof query == 'string' && object !== undefined) {
6588
- query = query.split(/[\. ]/);
6629
+ if (typeof query === 'string' && object !== undefined) {
6630
+ query = query.split(/[ .]/);
6589
6631
  maxDepth = query.length - 1;
6590
6632
  $.each(query, function (depth, value) {
6591
6633
  var camelCaseValue = (depth != maxDepth)
@@ -6732,7 +6774,7 @@
6732
6774
  .addClass(settings.className.loader)
6733
6775
  .addClass(settings.loaderVariation)
6734
6776
  ;
6735
- if (!!settings.loaderText) {
6777
+ if (settings.loaderText) {
6736
6778
  l.text(settings.loaderText);
6737
6779
  l.addClass('text');
6738
6780
  }
@@ -6747,7 +6789,7 @@
6747
6789
  })(jQuery, window, document);
6748
6790
 
6749
6791
  /*!
6750
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Dropdown
6792
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Dropdown
6751
6793
  * https://github.com/fomantic/Fomantic-UI/
6752
6794
  *
6753
6795
  *
@@ -6763,7 +6805,7 @@
6763
6805
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
6764
6806
  }
6765
6807
 
6766
- window = (typeof window != 'undefined' && window.Math == Math)
6808
+ window = (window !== undefined && window.Math === Math)
6767
6809
  ? window
6768
6810
  : globalThis;
6769
6811
 
@@ -6774,11 +6816,11 @@
6774
6816
 
6775
6817
  moduleSelector = $allModules.selector || '',
6776
6818
 
6777
- time = new Date().getTime(),
6819
+ time = Date.now(),
6778
6820
  performance = [],
6779
6821
 
6780
6822
  query = arguments[0],
6781
- methodInvoked = (typeof query == 'string'),
6823
+ methodInvoked = (typeof query === 'string'),
6782
6824
  queryArguments = [].slice.call(arguments, 1),
6783
6825
  returnedValue
6784
6826
  ;
@@ -7109,7 +7151,7 @@
7109
7151
  .addClass(className.search)
7110
7152
  .prop('autocomplete', module.is.chrome() ? 'fomantic-search' : 'off')
7111
7153
  ;
7112
- if (labelNode.length) {
7154
+ if (labelNode.length > 0) {
7113
7155
  if (!labelNode.attr('id')) {
7114
7156
  labelNode.attr('id', '_' + module.get.id() + '_formLabel');
7115
7157
  }
@@ -7475,7 +7517,7 @@
7475
7517
  if (module.is.multiple()) {
7476
7518
  module.filterActive();
7477
7519
  }
7478
- if (query || (!query && module.get.activeItem().length == 0)) {
7520
+ if (query || (!query && module.get.activeItem().length === 0)) {
7479
7521
  module.select.firstUnfiltered();
7480
7522
  }
7481
7523
  if (module.has.allResultsFiltered()) {
@@ -7690,7 +7732,7 @@
7690
7732
  // Dividers which are direct siblings are considered a group
7691
7733
  var $lastDivider = $(this).nextUntil(selector.item);
7692
7734
 
7693
- return ($lastDivider.length ? $lastDivider : $(this))
7735
+ return ($lastDivider.length > 0 ? $lastDivider : $(this))
7694
7736
  // Count all non-filtered items until the next divider (or end of the dropdown)
7695
7737
  .nextUntil(selector.divider)
7696
7738
  .filter(selector.item + ':not(.' + className.filtered + ')')
@@ -7715,17 +7757,22 @@
7715
7757
  if (queryLength === termLength) {
7716
7758
  return (query === term);
7717
7759
  }
7718
- search: for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) {
7760
+ for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) {
7719
7761
  var
7762
+ continueSearch = false,
7720
7763
  queryCharacter = query.charCodeAt(characterIndex)
7721
7764
  ;
7722
7765
  while (nextCharacterIndex < termLength) {
7723
7766
  if (term.charCodeAt(nextCharacterIndex++) === queryCharacter) {
7724
- continue search;
7767
+ continueSearch = true;
7768
+
7769
+ break;
7725
7770
  }
7726
7771
  }
7727
7772
 
7728
- return false;
7773
+ if (!continueSearch) {
7774
+ return false;
7775
+ }
7729
7776
  }
7730
7777
 
7731
7778
  return true;
@@ -8352,19 +8399,20 @@
8352
8399
  event.preventDefault();
8353
8400
 
8354
8401
  return;
8355
- } else {
8356
- module.verbose('Up key pressed, changing active item');
8357
- $selectedItem
8358
- .removeClass(className.selected)
8359
- ;
8360
- $nextItem
8361
- .addClass(className.selected)
8362
- ;
8363
- module.set.scrollPosition($nextItem);
8364
- if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
8365
- module.set.selectedItem($nextItem);
8366
- }
8367
8402
  }
8403
+
8404
+ module.verbose('Up key pressed, changing active item');
8405
+ $selectedItem
8406
+ .removeClass(className.selected)
8407
+ ;
8408
+ $nextItem
8409
+ .addClass(className.selected)
8410
+ ;
8411
+ module.set.scrollPosition($nextItem);
8412
+ if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
8413
+ module.set.selectedItem($nextItem);
8414
+ }
8415
+
8368
8416
  event.preventDefault();
8369
8417
  }
8370
8418
 
@@ -8378,19 +8426,20 @@
8378
8426
  event.preventDefault();
8379
8427
 
8380
8428
  return;
8381
- } else {
8382
- module.verbose('Down key pressed, changing active item');
8383
- $item
8384
- .removeClass(className.selected)
8385
- ;
8386
- $nextItem
8387
- .addClass(className.selected)
8388
- ;
8389
- module.set.scrollPosition($nextItem);
8390
- if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
8391
- module.set.selectedItem($nextItem);
8392
- }
8393
8429
  }
8430
+
8431
+ module.verbose('Down key pressed, changing active item');
8432
+ $item
8433
+ .removeClass(className.selected)
8434
+ ;
8435
+ $nextItem
8436
+ .addClass(className.selected)
8437
+ ;
8438
+ module.set.scrollPosition($nextItem);
8439
+ if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
8440
+ module.set.selectedItem($nextItem);
8441
+ }
8442
+
8394
8443
  event.preventDefault();
8395
8444
  }
8396
8445
 
@@ -8473,11 +8522,11 @@
8473
8522
  callback();
8474
8523
 
8475
8524
  return true;
8476
- } else {
8477
- module.verbose('Event occurred in dropdown, canceling callback');
8478
-
8479
- return false;
8480
8525
  }
8526
+
8527
+ module.verbose('Event occurred in dropdown, canceling callback');
8528
+
8529
+ return false;
8481
8530
  },
8482
8531
  eventOnElement: function (event, callback) {
8483
8532
  var
@@ -8495,11 +8544,11 @@
8495
8544
  callback();
8496
8545
 
8497
8546
  return true;
8498
- } else {
8499
- module.verbose('Event occurred in dropdown menu, canceling callback');
8500
-
8501
- return false;
8502
8547
  }
8548
+
8549
+ module.verbose('Event occurred in dropdown menu, canceling callback');
8550
+
8551
+ return false;
8503
8552
  },
8504
8553
  },
8505
8554
 
@@ -8557,7 +8606,7 @@
8557
8606
  return $module.data(metadata.defaultValue);
8558
8607
  },
8559
8608
  placeholderText: function () {
8560
- if (settings.placeholder != 'auto' && typeof settings.placeholder == 'string') {
8609
+ if (settings.placeholder != 'auto' && typeof settings.placeholder === 'string') {
8561
8610
  return settings.placeholder;
8562
8611
  }
8563
8612
 
@@ -8628,7 +8677,8 @@
8628
8677
  ;
8629
8678
  if (returnEndPos && 'selectionEnd' in input) {
8630
8679
  return input.selectionEnd;
8631
- } else if (!returnEndPos && 'selectionStart' in input) {
8680
+ }
8681
+ if (!returnEndPos && 'selectionStart' in input) {
8632
8682
  return input.selectionStart;
8633
8683
  }
8634
8684
  if (document.selection) {
@@ -8665,7 +8715,7 @@
8665
8715
  }
8666
8716
 
8667
8717
  return (!module.has.selectInput() && module.is.multiple())
8668
- ? (typeof value == 'string') // delimited string
8718
+ ? (typeof value === 'string') // delimited string
8669
8719
  ? (raw ? value : module.escape.htmlEntities(value)).split(settings.delimiter)
8670
8720
  : ''
8671
8721
  : value;
@@ -8676,7 +8726,7 @@
8676
8726
  remoteValues = false
8677
8727
  ;
8678
8728
  if (values) {
8679
- if (typeof values == 'string') {
8729
+ if (typeof values === 'string') {
8680
8730
  values = [values];
8681
8731
  }
8682
8732
  $.each(values, function (index, value) {
@@ -8867,9 +8917,7 @@
8867
8917
  return;
8868
8918
  }
8869
8919
  if (isMultiple) {
8870
- if ($.inArray(module.escape.htmlEntities(String(optionValue)), value.map(function (v) {
8871
- return String(v);
8872
- })) !== -1) {
8920
+ if ($.inArray(module.escape.htmlEntities(String(optionValue)), value.map(String)) !== -1) {
8873
8921
  $selectedItem = ($selectedItem)
8874
8922
  ? $selectedItem.add($choice)
8875
8923
  : $choice;
@@ -8918,16 +8966,16 @@
8918
8966
  }
8919
8967
 
8920
8968
  return true;
8921
- } else {
8922
- module.verbose('No longer at maximum selection count');
8923
- module.remove.message();
8924
- module.remove.filteredItem();
8925
- if (module.is.searchSelection()) {
8926
- module.filterItems();
8927
- }
8969
+ }
8928
8970
 
8929
- return false;
8971
+ module.verbose('No longer at maximum selection count');
8972
+ module.remove.message();
8973
+ module.remove.filteredItem();
8974
+ if (module.is.searchSelection()) {
8975
+ module.filterItems();
8930
8976
  }
8977
+
8978
+ return false;
8931
8979
  }
8932
8980
 
8933
8981
  return true;
@@ -9626,7 +9674,7 @@
9626
9674
  var
9627
9675
  $addition = $menu.children(selector.addition),
9628
9676
  $existingItem = module.get.item(value),
9629
- alreadyHasValue = $existingItem && $existingItem.not(selector.addition).length,
9677
+ alreadyHasValue = $existingItem && $existingItem.not(selector.addition).length > 0,
9630
9678
  hasUserSuggestion = $addition.length > 0,
9631
9679
  html
9632
9680
  ;
@@ -9951,7 +9999,7 @@
9951
9999
  }
9952
10000
  },
9953
10001
  diacritics: function (text) {
9954
- return settings.ignoreDiacritics ? text.normalize('NFD').replace(/[\u0300-\u036f]/g, '') : text;
10002
+ return settings.ignoreDiacritics ? text.normalize('NFD').replace(/[\u0300-\u036F]/g, '') : text;
9955
10003
  },
9956
10004
  },
9957
10005
 
@@ -10010,7 +10058,7 @@
10010
10058
  return ($currentMenu || $menu).find(selector.menu).length > 0;
10011
10059
  },
10012
10060
  message: function () {
10013
- return ($menu.children(selector.message).length !== 0);
10061
+ return ($menu.children(selector.message).length > 0);
10014
10062
  },
10015
10063
  label: function (value) {
10016
10064
  var
@@ -10052,9 +10100,7 @@
10052
10100
  : (values == value)
10053
10101
  ;
10054
10102
 
10055
- return (hasValue)
10056
- ? true
10057
- : false;
10103
+ return !!(hasValue);
10058
10104
  },
10059
10105
  valueIgnoringCase: function (value) {
10060
10106
  var
@@ -10471,8 +10517,8 @@
10471
10517
  },
10472
10518
  htmlEntities: function (string) {
10473
10519
  var
10474
- badChars = /[<>"'`]/g,
10475
- shouldEscape = /[&<>"'`]/,
10520
+ badChars = /["'<>`]/g,
10521
+ shouldEscape = /["&'<>`]/,
10476
10522
  escape = {
10477
10523
  '<': '&lt;',
10478
10524
  '>': '&gt;',
@@ -10485,7 +10531,7 @@
10485
10531
  }
10486
10532
  ;
10487
10533
  if (shouldEscape.test(string)) {
10488
- string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, '&amp;');
10534
+ string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
10489
10535
 
10490
10536
  return string.replace(badChars, escapedChar);
10491
10537
  }
@@ -10551,7 +10597,7 @@
10551
10597
  previousTime
10552
10598
  ;
10553
10599
  if (settings.performance) {
10554
- currentTime = new Date().getTime();
10600
+ currentTime = Date.now();
10555
10601
  previousTime = time || currentTime;
10556
10602
  executionTime = currentTime - previousTime;
10557
10603
  time = currentTime;
@@ -10602,8 +10648,8 @@
10602
10648
  ;
10603
10649
  passedArguments = passedArguments || queryArguments;
10604
10650
  context = context || element;
10605
- if (typeof query == 'string' && object !== undefined) {
10606
- query = query.split(/[\. ]/);
10651
+ if (typeof query === 'string' && object !== undefined) {
10652
+ query = query.split(/[ .]/);
10607
10653
  maxDepth = query.length - 1;
10608
10654
  $.each(query, function (depth, value) {
10609
10655
  var camelCaseValue = (depth != maxDepth)
@@ -10787,7 +10833,7 @@
10787
10833
  },
10788
10834
 
10789
10835
  regExp: {
10790
- escape: /[-[\]{}()*+?.,\\^$|#\s:=@]/g,
10836
+ escape: /[\s#$()*+,.:=?@[\\\]^{|}-]/g,
10791
10837
  quote: /"/g,
10792
10838
  },
10793
10839
 
@@ -10903,8 +10949,8 @@
10903
10949
  return string;
10904
10950
  }
10905
10951
  var
10906
- badChars = /[<>"'`]/g,
10907
- shouldEscape = /[&<>"'`]/,
10952
+ badChars = /["'<>`]/g,
10953
+ shouldEscape = /["&'<>`]/,
10908
10954
  escape = {
10909
10955
  '<': '&lt;',
10910
10956
  '>': '&gt;',
@@ -10917,7 +10963,7 @@
10917
10963
  }
10918
10964
  ;
10919
10965
  if (shouldEscape.test(string)) {
10920
- string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, '&amp;');
10966
+ string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
10921
10967
 
10922
10968
  return string.replace(badChars, escapedChar);
10923
10969
  }
@@ -10933,11 +10979,9 @@
10933
10979
  deQuote = $.fn.dropdown.settings.templates.deQuote
10934
10980
  ;
10935
10981
  html += '<i class="dropdown icon"></i>';
10936
- if (placeholder) {
10937
- html += '<div class="default text">' + escape(placeholder, preserveHTML) + '</div>';
10938
- } else {
10939
- html += '<div class="text"></div>';
10940
- }
10982
+ html += placeholder
10983
+ ? '<div class="default text">' + escape(placeholder, preserveHTML) + '</div>'
10984
+ : '<div class="text"></div>';
10941
10985
  html += '<div class="' + deQuote(className.menu) + '">';
10942
10986
  html += $.fn.dropdown.settings.templates.menu(select, fields, preserveHTML, className);
10943
10987
  html += '</div>';
@@ -10955,9 +10999,7 @@
10955
10999
  ;
10956
11000
  $.each(values, function (index, option) {
10957
11001
  var
10958
- itemType = (option[fields.type])
10959
- ? option[fields.type]
10960
- : 'item',
11002
+ itemType = option[fields.type] || 'item',
10961
11003
  isMenu = itemType.indexOf('menu') !== -1
10962
11004
  ;
10963
11005
 
@@ -10977,15 +11019,15 @@
10977
11019
  : '',
10978
11020
  hasDescription = (escape(option[fields.description] || '', preserveHTML) != '')
10979
11021
  ;
10980
- html += '<div class="' + deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] ? option[fields.class] : className.item)) + '" data-value="' + deQuote(option[fields.value], true) + '"' + maybeText + '>';
11022
+ html += '<div class="' + deQuote(maybeActionable + maybeDisabled + maybeDescriptionVertical + (option[fields.class] || className.item)) + '" data-value="' + deQuote(option[fields.value], true) + '"' + maybeText + '>';
10981
11023
  if (isMenu) {
10982
11024
  html += '<i class="' + (itemType.indexOf('left') !== -1 ? 'left' : '') + ' dropdown icon"></i>';
10983
11025
  }
10984
11026
  if (option[fields.image]) {
10985
- html += '<img class="' + deQuote(option[fields.imageClass] ? option[fields.imageClass] : className.image) + '" src="' + deQuote(option[fields.image]) + '">';
11027
+ html += '<img class="' + deQuote(option[fields.imageClass] || className.image) + '" src="' + deQuote(option[fields.image]) + '">';
10986
11028
  }
10987
11029
  if (option[fields.icon]) {
10988
- html += '<i class="' + deQuote(option[fields.icon] + ' ' + (option[fields.iconClass] ? option[fields.iconClass] : className.icon)) + '"></i>';
11030
+ html += '<i class="' + deQuote(option[fields.icon] + ' ' + (option[fields.iconClass] || className.icon)) + '"></i>';
10989
11031
  }
10990
11032
  if (hasDescription) {
10991
11033
  html += '<span class="' + deQuote(className.description) + '">' + escape(option[fields.description] || '', preserveHTML) + '</span>';
@@ -11007,12 +11049,12 @@
11007
11049
  } else if (itemType === 'header') {
11008
11050
  var
11009
11051
  groupName = escape(option[fields.name] || '', preserveHTML),
11010
- groupIcon = deQuote(option[fields.icon] ? option[fields.icon] : className.groupIcon)
11052
+ groupIcon = deQuote(option[fields.icon] || className.groupIcon)
11011
11053
  ;
11012
11054
  if (groupName !== '' || groupIcon !== '') {
11013
- html += '<div class="' + deQuote(option[fields.class] ? option[fields.class] : className.header) + '">';
11055
+ html += '<div class="' + deQuote(option[fields.class] || className.header) + '">';
11014
11056
  if (groupIcon !== '') {
11015
- html += '<i class="' + deQuote(groupIcon + ' ' + (option[fields.iconClass] ? option[fields.iconClass] : className.icon)) + '"></i>';
11057
+ html += '<i class="' + deQuote(groupIcon + ' ' + (option[fields.iconClass] || className.icon)) + '"></i>';
11016
11058
  }
11017
11059
  html += groupName;
11018
11060
  html += '</div>';
@@ -11050,7 +11092,7 @@
11050
11092
  })(jQuery, window, document);
11051
11093
 
11052
11094
  /*!
11053
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Embed
11095
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Embed
11054
11096
  * https://github.com/fomantic/Fomantic-UI/
11055
11097
  *
11056
11098
  *
@@ -11066,7 +11108,7 @@
11066
11108
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
11067
11109
  }
11068
11110
 
11069
- window = (typeof window != 'undefined' && window.Math == Math)
11111
+ window = (window !== undefined && window.Math === Math)
11070
11112
  ? window
11071
11113
  : globalThis;
11072
11114
 
@@ -11076,11 +11118,11 @@
11076
11118
 
11077
11119
  moduleSelector = $allModules.selector || '',
11078
11120
 
11079
- time = new Date().getTime(),
11121
+ time = Date.now(),
11080
11122
  performance = [],
11081
11123
 
11082
11124
  query = arguments[0],
11083
- methodInvoked = (typeof query == 'string'),
11125
+ methodInvoked = (typeof query === 'string'),
11084
11126
  queryArguments = [].slice.call(arguments, 1),
11085
11127
 
11086
11128
  returnedValue
@@ -11257,18 +11299,14 @@
11257
11299
  return settings.placeholder || $module.data(metadata.placeholder);
11258
11300
  },
11259
11301
  icon: function () {
11260
- return (settings.icon)
11261
- ? settings.icon
11262
- : ($module.data(metadata.icon) !== undefined)
11263
- ? $module.data(metadata.icon)
11264
- : module.determine.icon();
11302
+ return settings.icon || (($module.data(metadata.icon) !== undefined)
11303
+ ? $module.data(metadata.icon)
11304
+ : module.determine.icon());
11265
11305
  },
11266
11306
  source: function (url) {
11267
- return (settings.source)
11268
- ? settings.source
11269
- : ($module.data(metadata.source) !== undefined)
11270
- ? $module.data(metadata.source)
11271
- : module.determine.source();
11307
+ return settings.source || (($module.data(metadata.source) !== undefined)
11308
+ ? $module.data(metadata.source)
11309
+ : module.determine.source());
11272
11310
  },
11273
11311
  type: function () {
11274
11312
  var source = module.get.source();
@@ -11278,11 +11316,9 @@
11278
11316
  : false;
11279
11317
  },
11280
11318
  url: function () {
11281
- return (settings.url)
11282
- ? settings.url
11283
- : ($module.data(metadata.url) !== undefined)
11284
- ? $module.data(metadata.url)
11285
- : module.determine.url();
11319
+ return settings.url || (($module.data(metadata.url) !== undefined)
11320
+ ? $module.data(metadata.url)
11321
+ : module.determine.url());
11286
11322
  },
11287
11323
  },
11288
11324
 
@@ -11487,7 +11523,7 @@
11487
11523
  previousTime
11488
11524
  ;
11489
11525
  if (settings.performance) {
11490
- currentTime = new Date().getTime();
11526
+ currentTime = Date.now();
11491
11527
  previousTime = time || currentTime;
11492
11528
  executionTime = currentTime - previousTime;
11493
11529
  time = currentTime;
@@ -11516,7 +11552,7 @@
11516
11552
  title += ' \'' + moduleSelector + '\'';
11517
11553
  }
11518
11554
  if ($allModules.length > 1) {
11519
- title += ' ' + '(' + $allModules.length + ')';
11555
+ title += ' (' + $allModules.length + ')';
11520
11556
  }
11521
11557
  if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
11522
11558
  console.groupCollapsed(title);
@@ -11541,8 +11577,8 @@
11541
11577
  ;
11542
11578
  passedArguments = passedArguments || queryArguments;
11543
11579
  context = context || element;
11544
- if (typeof query == 'string' && object !== undefined) {
11545
- query = query.split(/[\. ]/);
11580
+ if (typeof query === 'string' && object !== undefined) {
11581
+ query = query.split(/[ .]/);
11546
11582
  maxDepth = query.length - 1;
11547
11583
  $.each(query, function (depth, value) {
11548
11584
  var camelCaseValue = (depth != maxDepth)
@@ -11740,7 +11776,7 @@
11740
11776
  })(jQuery, window, document);
11741
11777
 
11742
11778
  /*!
11743
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Flyout
11779
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Flyout
11744
11780
  * https://github.com/fomantic/Fomantic-UI/
11745
11781
  *
11746
11782
  *
@@ -11756,11 +11792,11 @@
11756
11792
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
11757
11793
  }
11758
11794
 
11759
- window = (typeof window != 'undefined' && window.Math == Math)
11795
+ window = (window !== undefined && window.Math === Math)
11760
11796
  ? window
11761
11797
  : globalThis;
11762
11798
 
11763
- $.flyout = $.fn.flyout = function (parameters) {
11799
+ $.fn.flyout = function (parameters) {
11764
11800
  var
11765
11801
  $allModules = $(this),
11766
11802
  $window = $(window),
@@ -11771,11 +11807,11 @@
11771
11807
 
11772
11808
  moduleSelector = $allModules.selector || '',
11773
11809
 
11774
- time = new Date().getTime(),
11810
+ time = Date.now(),
11775
11811
  performance = [],
11776
11812
 
11777
11813
  query = arguments[0],
11778
- methodInvoked = (typeof query == 'string'),
11814
+ methodInvoked = (typeof query === 'string'),
11779
11815
  queryArguments = [].slice.call(arguments, 1),
11780
11816
 
11781
11817
  requestAnimationFrame = window.requestAnimationFrame
@@ -12656,9 +12692,11 @@
12656
12692
  direction: function () {
12657
12693
  if ($module.hasClass(className.top)) {
12658
12694
  return className.top;
12659
- } else if ($module.hasClass(className.right)) {
12695
+ }
12696
+ if ($module.hasClass(className.right)) {
12660
12697
  return className.right;
12661
- } else if ($module.hasClass(className.bottom)) {
12698
+ }
12699
+ if ($module.hasClass(className.bottom)) {
12662
12700
  return className.bottom;
12663
12701
  }
12664
12702
 
@@ -12715,7 +12753,7 @@
12715
12753
  bodyMargin: function () {
12716
12754
  initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
12717
12755
  var
12718
- bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
12756
+ bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
12719
12757
  bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
12720
12758
  ;
12721
12759
  tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
@@ -12768,9 +12806,9 @@
12768
12806
  module.verbose('Browser was found to be iOS', userAgent);
12769
12807
 
12770
12808
  return true;
12771
- } else {
12772
- return false;
12773
12809
  }
12810
+
12811
+ return false;
12774
12812
  },
12775
12813
  mobile: function () {
12776
12814
  var
@@ -12781,11 +12819,11 @@
12781
12819
  module.verbose('Browser was found to be mobile', userAgent);
12782
12820
 
12783
12821
  return true;
12784
- } else {
12785
- module.verbose('Browser is not mobile, using regular transition', userAgent);
12786
-
12787
- return false;
12788
12822
  }
12823
+
12824
+ module.verbose('Browser is not mobile, using regular transition', userAgent);
12825
+
12826
+ return false;
12789
12827
  },
12790
12828
  hidden: function () {
12791
12829
  return !module.is.visible();
@@ -12842,8 +12880,8 @@
12842
12880
  return string;
12843
12881
  }
12844
12882
  var
12845
- badChars = /[<>"'`]/g,
12846
- shouldEscape = /[&<>"'`]/,
12883
+ badChars = /["'<>`]/g,
12884
+ shouldEscape = /["&'<>`]/,
12847
12885
  escape = {
12848
12886
  '<': '&lt;',
12849
12887
  '>': '&gt;',
@@ -12856,7 +12894,7 @@
12856
12894
  }
12857
12895
  ;
12858
12896
  if (shouldEscape.test(string)) {
12859
- string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, '&amp;');
12897
+ string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
12860
12898
 
12861
12899
  return string.replace(badChars, escapedChar);
12862
12900
  }
@@ -12922,7 +12960,7 @@
12922
12960
  previousTime
12923
12961
  ;
12924
12962
  if (settings.performance) {
12925
- currentTime = new Date().getTime();
12963
+ currentTime = Date.now();
12926
12964
  previousTime = time || currentTime;
12927
12965
  executionTime = currentTime - previousTime;
12928
12966
  time = currentTime;
@@ -12973,8 +13011,8 @@
12973
13011
  ;
12974
13012
  passedArguments = passedArguments || queryArguments;
12975
13013
  context = element || context;
12976
- if (typeof query == 'string' && object !== undefined) {
12977
- query = query.split(/[\. ]/);
13014
+ if (typeof query === 'string' && object !== undefined) {
13015
+ query = query.split(/[ .]/);
12978
13016
  maxDepth = query.length - 1;
12979
13017
  $.each(query, function (depth, value) {
12980
13018
  var camelCaseValue = (depth != maxDepth)
@@ -13048,6 +13086,7 @@
13048
13086
  ? returnedValue
13049
13087
  : this;
13050
13088
  };
13089
+ $.flyout = $.fn.flyout;
13051
13090
 
13052
13091
  $.fn.flyout.settings = {
13053
13092
 
@@ -13181,17 +13220,16 @@
13181
13220
  content: '',
13182
13221
  title: '',
13183
13222
  }, queryArguments[0]);
13184
- } else {
13185
- if (!isFunction(queryArguments[queryArguments.length - 1])) {
13186
- queryArguments.push(function () {});
13187
- }
13188
-
13189
- return {
13190
- handler: queryArguments.pop(),
13191
- content: queryArguments.pop() || '',
13192
- title: queryArguments.pop() || '',
13193
- };
13194
13223
  }
13224
+ if (!isFunction(queryArguments[queryArguments.length - 1])) {
13225
+ queryArguments.push(function () {});
13226
+ }
13227
+
13228
+ return {
13229
+ handler: queryArguments.pop(),
13230
+ content: queryArguments.pop() || '',
13231
+ title: queryArguments.pop() || '',
13232
+ };
13195
13233
  },
13196
13234
  alert: function () {
13197
13235
  var
@@ -13270,7 +13308,7 @@
13270
13308
  })(jQuery, window, document);
13271
13309
 
13272
13310
  /*!
13273
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Modal
13311
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Modal
13274
13312
  * https://github.com/fomantic/Fomantic-UI/
13275
13313
  *
13276
13314
  *
@@ -13286,11 +13324,11 @@
13286
13324
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
13287
13325
  }
13288
13326
 
13289
- window = (typeof window != 'undefined' && window.Math == Math)
13327
+ window = (window !== undefined && window.Math === Math)
13290
13328
  ? window
13291
13329
  : globalThis;
13292
13330
 
13293
- $.modal = $.fn.modal = function (parameters) {
13331
+ $.fn.modal = function (parameters) {
13294
13332
  var
13295
13333
  $allModules = $(this),
13296
13334
  $window = $(window),
@@ -13299,11 +13337,11 @@
13299
13337
 
13300
13338
  moduleSelector = $allModules.selector || '',
13301
13339
 
13302
- time = new Date().getTime(),
13340
+ time = Date.now(),
13303
13341
  performance = [],
13304
13342
 
13305
13343
  query = arguments[0],
13306
- methodInvoked = (typeof query == 'string'),
13344
+ methodInvoked = (typeof query === 'string'),
13307
13345
  queryArguments = [].slice.call(arguments, 1),
13308
13346
 
13309
13347
  requestAnimationFrame = window.requestAnimationFrame
@@ -14027,7 +14065,7 @@
14027
14065
  bodyMargin: function () {
14028
14066
  initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
14029
14067
  var
14030
- bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
14068
+ bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
14031
14069
  bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
14032
14070
  ;
14033
14071
  tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
@@ -14135,8 +14173,8 @@
14135
14173
  return string;
14136
14174
  }
14137
14175
  var
14138
- badChars = /[<>"'`]/g,
14139
- shouldEscape = /[&<>"'`]/,
14176
+ badChars = /["'<>`]/g,
14177
+ shouldEscape = /["&'<>`]/,
14140
14178
  escape = {
14141
14179
  '<': '&lt;',
14142
14180
  '>': '&gt;',
@@ -14149,7 +14187,7 @@
14149
14187
  }
14150
14188
  ;
14151
14189
  if (shouldEscape.test(string)) {
14152
- string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, '&amp;');
14190
+ string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
14153
14191
 
14154
14192
  return string.replace(badChars, escapedChar);
14155
14193
  }
@@ -14460,7 +14498,7 @@
14460
14498
  previousTime
14461
14499
  ;
14462
14500
  if (settings.performance) {
14463
- currentTime = new Date().getTime();
14501
+ currentTime = Date.now();
14464
14502
  previousTime = time || currentTime;
14465
14503
  executionTime = currentTime - previousTime;
14466
14504
  time = currentTime;
@@ -14511,8 +14549,8 @@
14511
14549
  ;
14512
14550
  passedArguments = passedArguments || queryArguments;
14513
14551
  context = context || element;
14514
- if (typeof query == 'string' && object !== undefined) {
14515
- query = query.split(/[\. ]/);
14552
+ if (typeof query === 'string' && object !== undefined) {
14553
+ query = query.split(/[ .]/);
14516
14554
  maxDepth = query.length - 1;
14517
14555
  $.each(query, function (depth, value) {
14518
14556
  var camelCaseValue = (depth != maxDepth)
@@ -14583,6 +14621,7 @@
14583
14621
  ? returnedValue
14584
14622
  : this;
14585
14623
  };
14624
+ $.modal = $.fn.modal;
14586
14625
 
14587
14626
  $.fn.modal.settings = {
14588
14627
 
@@ -14734,17 +14773,16 @@
14734
14773
  content: '',
14735
14774
  title: '',
14736
14775
  }, queryArguments[0]);
14737
- } else {
14738
- if (!isFunction(queryArguments[queryArguments.length - 1])) {
14739
- queryArguments.push(function () {});
14740
- }
14741
-
14742
- return {
14743
- handler: queryArguments.pop(),
14744
- content: queryArguments.pop() || '',
14745
- title: queryArguments.pop() || '',
14746
- };
14747
14776
  }
14777
+ if (!isFunction(queryArguments[queryArguments.length - 1])) {
14778
+ queryArguments.push(function () {});
14779
+ }
14780
+
14781
+ return {
14782
+ handler: queryArguments.pop(),
14783
+ content: queryArguments.pop() || '',
14784
+ title: queryArguments.pop() || '',
14785
+ };
14748
14786
  },
14749
14787
  alert: function () {
14750
14788
  var
@@ -14833,7 +14871,7 @@
14833
14871
  })(jQuery, window, document);
14834
14872
 
14835
14873
  /*!
14836
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Nag
14874
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Nag
14837
14875
  * https://github.com/fomantic/Fomantic-UI/
14838
14876
  *
14839
14877
  *
@@ -14849,7 +14887,7 @@
14849
14887
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
14850
14888
  }
14851
14889
 
14852
- window = (typeof window != 'undefined' && window.Math == Math)
14890
+ window = (window !== undefined && window.Math === Math)
14853
14891
  ? window
14854
14892
  : globalThis;
14855
14893
 
@@ -14858,11 +14896,11 @@
14858
14896
  $allModules = $(this),
14859
14897
  moduleSelector = $allModules.selector || '',
14860
14898
 
14861
- time = new Date().getTime(),
14899
+ time = Date.now(),
14862
14900
  performance = [],
14863
14901
 
14864
14902
  query = arguments[0],
14865
- methodInvoked = (typeof query == 'string'),
14903
+ methodInvoked = (typeof query === 'string'),
14866
14904
  queryArguments = [].slice.call(arguments, 1),
14867
14905
  returnedValue
14868
14906
  ;
@@ -14996,20 +15034,22 @@
14996
15034
  }
14997
15035
  if (expires instanceof Date && expires.getTime()) {
14998
15036
  return expires.toUTCString();
14999
- } else {
15000
- module.error(error.expiresFormat);
15001
15037
  }
15038
+
15039
+ module.error(error.expiresFormat);
15002
15040
  },
15003
15041
  storage: function () {
15004
15042
  if (settings.storageMethod === 'localstorage' && window.localStorage !== undefined) {
15005
15043
  module.debug('Using local storage');
15006
15044
 
15007
15045
  return window.localStorage;
15008
- } else if (settings.storageMethod === 'sessionstorage' && window.sessionStorage !== undefined) {
15046
+ }
15047
+ if (settings.storageMethod === 'sessionstorage' && window.sessionStorage !== undefined) {
15009
15048
  module.debug('Using session storage');
15010
15049
 
15011
15050
  return window.sessionStorage;
15012
- } else if ('cookie' in document) {
15051
+ }
15052
+ if ('cookie' in document) {
15013
15053
  module.debug('Using cookie');
15014
15054
 
15015
15055
  return {
@@ -15020,12 +15060,12 @@
15020
15060
  .replace(/[()]/g, escape)
15021
15061
  ;
15022
15062
  value = encodeURIComponent(value)
15023
- .replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent)
15063
+ .replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g, decodeURIComponent)
15024
15064
  ;
15025
15065
 
15026
15066
  var cookieOptions = '';
15027
15067
  for (var option in options) {
15028
- if (options.hasOwnProperty(option)) {
15068
+ if (Object.prototype.hasOwnProperty.call(options, option)) {
15029
15069
  cookieOptions += '; ' + option;
15030
15070
  if (typeof options[option] === 'string') {
15031
15071
  cookieOptions += '=' + options[option].split(';')[0];
@@ -15039,7 +15079,7 @@
15039
15079
  for (var i = 0, il = cookies.length; i < il; i++) {
15040
15080
  var
15041
15081
  parts = cookies[i].split('='),
15042
- foundKey = parts[0].replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
15082
+ foundKey = parts[0].replace(/(%[\da-f]{2})+/gi, decodeURIComponent)
15043
15083
  ;
15044
15084
  if (key === foundKey) {
15045
15085
  return parts[1] || '';
@@ -15050,9 +15090,9 @@
15050
15090
  storage.setItem(key, '', options);
15051
15091
  },
15052
15092
  };
15053
- } else {
15054
- module.error(error.noStorage);
15055
15093
  }
15094
+
15095
+ module.error(error.noStorage);
15056
15096
  },
15057
15097
  storageOptions: function () {
15058
15098
  var
@@ -15186,7 +15226,7 @@
15186
15226
  previousTime
15187
15227
  ;
15188
15228
  if (settings.performance) {
15189
- currentTime = new Date().getTime();
15229
+ currentTime = Date.now();
15190
15230
  previousTime = time || currentTime;
15191
15231
  executionTime = currentTime - previousTime;
15192
15232
  time = currentTime;
@@ -15237,8 +15277,8 @@
15237
15277
  ;
15238
15278
  passedArguments = passedArguments || queryArguments;
15239
15279
  context = context || element;
15240
- if (typeof query == 'string' && object !== undefined) {
15241
- query = query.split(/[\. ]/);
15280
+ if (typeof query === 'string' && object !== undefined) {
15281
+ query = query.split(/[ .]/);
15242
15282
  maxDepth = query.length - 1;
15243
15283
  $.each(query, function (depth, value) {
15244
15284
  var camelCaseValue = (depth != maxDepth)
@@ -15384,7 +15424,7 @@
15384
15424
  })(jQuery, window, document);
15385
15425
 
15386
15426
  /*!
15387
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Popup
15427
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Popup
15388
15428
  * https://github.com/fomantic/Fomantic-UI/
15389
15429
  *
15390
15430
  *
@@ -15400,7 +15440,7 @@
15400
15440
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
15401
15441
  }
15402
15442
 
15403
- window = (typeof window != 'undefined' && window.Math == Math)
15443
+ window = (window !== undefined && window.Math === Math)
15404
15444
  ? window
15405
15445
  : globalThis;
15406
15446
 
@@ -15417,11 +15457,11 @@
15417
15457
  ? 'touchstart'
15418
15458
  : 'click',
15419
15459
 
15420
- time = new Date().getTime(),
15460
+ time = Date.now(),
15421
15461
  performance = [],
15422
15462
 
15423
15463
  query = arguments[0],
15424
- methodInvoked = (typeof query == 'string'),
15464
+ methodInvoked = (typeof query === 'string'),
15425
15465
  queryArguments = [].slice.call(arguments, 1),
15426
15466
 
15427
15467
  returnedValue
@@ -15667,7 +15707,7 @@
15667
15707
  if (settings.hoverable) {
15668
15708
  module.bind.popup();
15669
15709
  }
15670
- } else if ($target.next(selector.popup).length !== 0) {
15710
+ } else if ($target.next(selector.popup).length > 0) {
15671
15711
  module.verbose('Pre-existing popup found');
15672
15712
  settings.inline = true;
15673
15713
  settings.popup = $target.next(selector.popup).data(metadata.activator, $module);
@@ -15710,7 +15750,8 @@
15710
15750
  module.debug('onShow callback returned false, cancelling popup animation');
15711
15751
 
15712
15752
  return;
15713
- } else if (!settings.preserve && !settings.popup) {
15753
+ }
15754
+ if (!settings.preserve && !settings.popup) {
15714
15755
  module.refresh();
15715
15756
  }
15716
15757
  if ($popup && module.set.position()) {
@@ -15755,11 +15796,9 @@
15755
15796
  }
15756
15797
  if (settings.inline || settings.popup) {
15757
15798
  return (module.has.popup());
15758
- } else {
15759
- return ($popup.closest($context).length >= 1)
15760
- ? true
15761
- : false;
15762
15799
  }
15800
+
15801
+ return ($popup.closest($context).length > 0);
15763
15802
  },
15764
15803
 
15765
15804
  removePopup: function () {
@@ -15975,7 +16014,8 @@
15975
16014
  startEvent: function () {
15976
16015
  if (settings.on == 'hover') {
15977
16016
  return 'mouseenter';
15978
- } else if (settings.on == 'focus') {
16017
+ }
16018
+ if (settings.on == 'focus') {
15979
16019
  return 'focus';
15980
16020
  }
15981
16021
 
@@ -15987,7 +16027,8 @@
15987
16027
  endEvent: function () {
15988
16028
  if (settings.on == 'hover') {
15989
16029
  return 'mouseleave';
15990
- } else if (settings.on == 'focus') {
16030
+ }
16031
+ if (settings.on == 'focus') {
15991
16032
  return 'blur';
15992
16033
  }
15993
16034
 
@@ -16297,19 +16338,18 @@
16297
16338
  return ($popup)
16298
16339
  ? module.set.position(position, calculations)
16299
16340
  : false;
16341
+ }
16342
+ if (settings.lastResort) {
16343
+ module.debug('No position found, showing with last position');
16300
16344
  } else {
16301
- if (settings.lastResort) {
16302
- module.debug('No position found, showing with last position');
16303
- } else {
16304
- module.debug('Popup could not find a position to display', $popup);
16305
- module.error(error.cannotPlace, element);
16306
- module.remove.attempts();
16307
- module.remove.loading();
16308
- module.reset();
16309
- settings.onUnplaceable.call($popup, element);
16345
+ module.debug('Popup could not find a position to display', $popup);
16346
+ module.error(error.cannotPlace, element);
16347
+ module.remove.attempts();
16348
+ module.remove.loading();
16349
+ module.reset();
16350
+ settings.onUnplaceable.call($popup, element);
16310
16351
 
16311
- return false;
16312
- }
16352
+ return false;
16313
16353
  }
16314
16354
  }
16315
16355
  module.debug('Position is on stage', position);
@@ -16578,7 +16618,7 @@
16578
16618
  previousTime
16579
16619
  ;
16580
16620
  if (settings.performance) {
16581
- currentTime = new Date().getTime();
16621
+ currentTime = Date.now();
16582
16622
  previousTime = time || currentTime;
16583
16623
  executionTime = currentTime - previousTime;
16584
16624
  time = currentTime;
@@ -16629,8 +16669,8 @@
16629
16669
  ;
16630
16670
  passedArguments = passedArguments || queryArguments;
16631
16671
  context = context || element;
16632
- if (typeof query == 'string' && object !== undefined) {
16633
- query = query.split(/[\. ]/);
16672
+ if (typeof query === 'string' && object !== undefined) {
16673
+ query = query.split(/[ .]/);
16634
16674
  maxDepth = query.length - 1;
16635
16675
  $.each(query, function (depth, value) {
16636
16676
  var camelCaseValue = (depth != maxDepth)
@@ -16856,8 +16896,8 @@
16856
16896
  templates: {
16857
16897
  escape: function (string) {
16858
16898
  var
16859
- badChars = /[<>"'`]/g,
16860
- shouldEscape = /[&<>"'`]/,
16899
+ badChars = /["'<>`]/g,
16900
+ shouldEscape = /["&'<>`]/,
16861
16901
  escape = {
16862
16902
  '<': '&lt;',
16863
16903
  '>': '&gt;',
@@ -16870,7 +16910,7 @@
16870
16910
  }
16871
16911
  ;
16872
16912
  if (shouldEscape.test(string)) {
16873
- string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, '&amp;');
16913
+ string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
16874
16914
 
16875
16915
  return string.replace(badChars, escapedChar);
16876
16916
  }
@@ -16901,7 +16941,7 @@
16901
16941
  })(jQuery, window, document);
16902
16942
 
16903
16943
  /*!
16904
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Progress
16944
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Progress
16905
16945
  * https://github.com/fomantic/Fomantic-UI/
16906
16946
  *
16907
16947
  *
@@ -16917,7 +16957,7 @@
16917
16957
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16918
16958
  }
16919
16959
 
16920
- window = (typeof window != 'undefined' && window.Math == Math)
16960
+ window = (window !== undefined && window.Math === Math)
16921
16961
  ? window
16922
16962
  : globalThis;
16923
16963
 
@@ -16927,11 +16967,11 @@
16927
16967
 
16928
16968
  moduleSelector = $allModules.selector || '',
16929
16969
 
16930
- time = new Date().getTime(),
16970
+ time = Date.now(),
16931
16971
  performance = [],
16932
16972
 
16933
16973
  query = arguments[0],
16934
- methodInvoked = (typeof query == 'string'),
16974
+ methodInvoked = (typeof query === 'string'),
16935
16975
  queryArguments = [].slice.call(arguments, 1),
16936
16976
 
16937
16977
  returnedValue
@@ -16997,7 +17037,7 @@
16997
17037
  var precision = 1;
16998
17038
  var ratio = min / total;
16999
17039
  while (precisionPower < 10) {
17000
- ratio = ratio * precision;
17040
+ ratio *= precision;
17001
17041
  if (ratio > 1) {
17002
17042
  break;
17003
17043
  }
@@ -17011,7 +17051,7 @@
17011
17051
  ? element
17012
17052
  : !isNaN(element)
17013
17053
  ? [element]
17014
- : typeof element == 'string'
17054
+ : typeof element === 'string'
17015
17055
  ? element.split(',')
17016
17056
  : [];
17017
17057
  },
@@ -17164,13 +17204,16 @@
17164
17204
 
17165
17205
  get: {
17166
17206
  text: function (templateText, index) {
17207
+ if (!index) {
17208
+ index = 0;
17209
+ }
17210
+
17167
17211
  var
17168
- index_ = index || 0,
17169
- value = module.get.value(index_),
17212
+ value = module.get.value(index),
17170
17213
  total = module.get.total(),
17171
17214
  percent = (animating)
17172
- ? module.get.displayPercent(index_)
17173
- : module.get.percent(index_),
17215
+ ? module.get.displayPercent(index)
17216
+ : module.get.percent(index),
17174
17217
  left = (total !== false)
17175
17218
  ? Math.max(0, total - value)
17176
17219
  : (100 - percent)
@@ -17181,7 +17224,7 @@
17181
17224
  .replace('{total}', total || 0)
17182
17225
  .replace('{left}', left)
17183
17226
  .replace('{percent}', percent)
17184
- .replace('{bar}', settings.text.bars[index_] || '')
17227
+ .replace('{bar}', settings.text.bars[index] || '')
17185
17228
  ;
17186
17229
  module.verbose('Adding variables to progress bar text', templateText);
17187
17230
 
@@ -17257,7 +17300,7 @@
17257
17300
  totalWidth = $module.width(),
17258
17301
  minDisplay = parseInt($bar.css('min-width'), 10),
17259
17302
  displayPercent = (barWidth > minDisplay)
17260
- ? (barWidth / totalWidth * 100)
17303
+ ? ((barWidth / totalWidth) * 100)
17261
17304
  : module.percent
17262
17305
  ;
17263
17306
 
@@ -17267,10 +17310,10 @@
17267
17310
  },
17268
17311
 
17269
17312
  percent: function (index) {
17270
- return module.percent && module.percent[index || 0] || 0;
17313
+ return (module.percent && module.percent[index || 0]) || 0;
17271
17314
  },
17272
17315
  value: function (index) {
17273
- return module.nextValue || module.value && module.value[index || 0] || 0;
17316
+ return module.nextValue || (module.value && module.value[index || 0]) || 0;
17274
17317
  },
17275
17318
  total: function () {
17276
17319
  return module.total !== undefined ? module.total : false;
@@ -17388,7 +17431,7 @@
17388
17431
  },
17389
17432
  duration: function (duration) {
17390
17433
  duration = duration || settings.duration;
17391
- duration = (typeof duration == 'number')
17434
+ duration = (typeof duration === 'number')
17392
17435
  ? duration + 'ms'
17393
17436
  : duration;
17394
17437
  module.verbose('Setting progress bar transition duration', duration);
@@ -17400,7 +17443,7 @@
17400
17443
  },
17401
17444
  percent: function (percents) {
17402
17445
  percents = module.helper.forceArray(percents).map(function (percent) {
17403
- percent = (typeof percent == 'string')
17446
+ percent = (typeof percent === 'string')
17404
17447
  ? +(percent.replace('%', ''))
17405
17448
  : percent;
17406
17449
 
@@ -17476,7 +17519,6 @@
17476
17519
  module.set.state();
17477
17520
  },
17478
17521
  label: function (text) {
17479
- text = text || '';
17480
17522
  if (text) {
17481
17523
  text = module.get.text(text);
17482
17524
  module.verbose('Setting label to text', text);
@@ -17709,7 +17751,7 @@
17709
17751
  previousTime
17710
17752
  ;
17711
17753
  if (settings.performance) {
17712
- currentTime = new Date().getTime();
17754
+ currentTime = Date.now();
17713
17755
  previousTime = time || currentTime;
17714
17756
  executionTime = currentTime - previousTime;
17715
17757
  time = currentTime;
@@ -17760,8 +17802,8 @@
17760
17802
  ;
17761
17803
  passedArguments = passedArguments || queryArguments;
17762
17804
  context = context || element;
17763
- if (typeof query == 'string' && object !== undefined) {
17764
- query = query.split(/[\. ]/);
17805
+ if (typeof query === 'string' && object !== undefined) {
17806
+ query = query.split(/[ .]/);
17765
17807
  maxDepth = query.length - 1;
17766
17808
  $.each(query, function (depth, value) {
17767
17809
  var camelCaseValue = (depth != maxDepth)
@@ -17874,7 +17916,7 @@
17874
17916
  },
17875
17917
 
17876
17918
  regExp: {
17877
- variable: /\{\$*[a-z0-9]+\}/gi,
17919
+ variable: /{\$*[\da-z]+}/gi,
17878
17920
  },
17879
17921
 
17880
17922
  metadata: {
@@ -17910,7 +17952,7 @@
17910
17952
  })(jQuery, window, document);
17911
17953
 
17912
17954
  /*!
17913
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Slider
17955
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Slider
17914
17956
  * https://github.com/fomantic/Fomantic-UI/
17915
17957
  *
17916
17958
  *
@@ -17926,7 +17968,7 @@
17926
17968
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
17927
17969
  }
17928
17970
 
17929
- window = (typeof window != 'undefined' && window.Math == Math)
17971
+ window = (window !== undefined && window.Math === Math)
17930
17972
  ? window
17931
17973
  : globalThis;
17932
17974
 
@@ -17938,11 +17980,11 @@
17938
17980
 
17939
17981
  moduleSelector = $allModules.selector || '',
17940
17982
 
17941
- time = new Date().getTime(),
17983
+ time = Date.now(),
17942
17984
  performance = [],
17943
17985
 
17944
17986
  query = arguments[0],
17945
- methodInvoked = (typeof query == 'string'),
17987
+ methodInvoked = (typeof query === 'string'),
17946
17988
  queryArguments = [].slice.call(arguments, 1),
17947
17989
 
17948
17990
  alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
@@ -18049,7 +18091,7 @@
18049
18091
  if ($module.attr('tabindex') === undefined) {
18050
18092
  $module.attr('tabindex', 0);
18051
18093
  }
18052
- if ($module.find('.inner').length == 0) {
18094
+ if ($module.find('.inner').length === 0) {
18053
18095
  $module.append("<div class='inner'>"
18054
18096
  + "<div class='track'></div>"
18055
18097
  + "<div class='track-fill'></div>"
@@ -18060,7 +18102,7 @@
18060
18102
  $thumb = $module.find('.thumb:not(.second)');
18061
18103
  $currThumb = $thumb;
18062
18104
  if (module.is.range()) {
18063
- if ($module.find('.thumb.second').length == 0) {
18105
+ if ($module.find('.thumb.second').length === 0) {
18064
18106
  $module.find('.inner').append("<div class='thumb second'></div>");
18065
18107
  }
18066
18108
  $secondThumb = $module.find('.thumb.second');
@@ -18072,7 +18114,7 @@
18072
18114
  labels: function () {
18073
18115
  if (module.is.labeled()) {
18074
18116
  $labels = $module.find('.labels:not(.auto)');
18075
- if ($labels.length != 0) {
18117
+ if ($labels.length > 0) {
18076
18118
  module.setup.customLabel();
18077
18119
  } else {
18078
18120
  module.setup.autoLabel();
@@ -18107,7 +18149,7 @@
18107
18149
  },
18108
18150
  autoLabel: function () {
18109
18151
  $labels = $module.find('.labels');
18110
- if ($labels.length != 0) {
18152
+ if ($labels.length > 0) {
18111
18153
  $labels.empty();
18112
18154
  } else {
18113
18155
  $labels = $module.append('<ul class="auto labels"></ul>').find('.labels');
@@ -18434,23 +18476,23 @@
18434
18476
  trackOffset: function () {
18435
18477
  if (module.is.vertical()) {
18436
18478
  return $track.offset().top;
18437
- } else {
18438
- return $track.offset().left;
18439
18479
  }
18480
+
18481
+ return $track.offset().left;
18440
18482
  },
18441
18483
  trackLength: function () {
18442
18484
  if (module.is.vertical()) {
18443
18485
  return $track.height();
18444
- } else {
18445
- return $track.width();
18446
18486
  }
18487
+
18488
+ return $track.width();
18447
18489
  },
18448
18490
  trackLeft: function () {
18449
18491
  if (module.is.vertical()) {
18450
18492
  return $track.position().top;
18451
- } else {
18452
- return $track.position().left;
18453
18493
  }
18494
+
18495
+ return $track.position().left;
18454
18496
  },
18455
18497
  trackStartPos: function () {
18456
18498
  return module.is.reversed() ? module.get.trackLeft() + module.get.trackLength() : module.get.trackLeft();
@@ -18485,11 +18527,7 @@
18485
18527
  ;
18486
18528
  if (step != 0) {
18487
18529
  var split = String(step).split('.');
18488
- if (split.length == 2) {
18489
- decimalPlaces = split[1].length;
18490
- } else {
18491
- decimalPlaces = 0;
18492
- }
18530
+ decimalPlaces = split.length == 2 ? split[1].length : 0;
18493
18531
  } else {
18494
18532
  decimalPlaces = settings.decimalPlaces;
18495
18533
  }
@@ -18548,12 +18586,12 @@
18548
18586
  case 'second':
18549
18587
  if (module.is.range()) {
18550
18588
  return module.secondThumbVal;
18551
- } else {
18552
- module.error(error.notrange);
18553
-
18554
- break;
18555
18589
  }
18556
- case 'first':
18590
+
18591
+ module.error(error.notrange);
18592
+
18593
+ break;
18594
+
18557
18595
  default:
18558
18596
  return module.thumbVal;
18559
18597
  }
@@ -18566,12 +18604,12 @@
18566
18604
  case 'second':
18567
18605
  if (module.is.range()) {
18568
18606
  return secondPos;
18569
- } else {
18570
- module.error(error.notrange);
18571
-
18572
- break;
18573
18607
  }
18574
- case 'first':
18608
+
18609
+ module.error(error.notrange);
18610
+
18611
+ break;
18612
+
18575
18613
  default:
18576
18614
  return position;
18577
18615
  }
@@ -18763,15 +18801,18 @@
18763
18801
  ;
18764
18802
  if (key == downArrow || key == leftArrow) {
18765
18803
  return SINGLE_BACKSTEP;
18766
- } else if (key == upArrow || key == rightArrow) {
18804
+ }
18805
+ if (key == upArrow || key == rightArrow) {
18767
18806
  return SINGLE_STEP;
18768
- } else if (key == keys.pageDown) {
18807
+ }
18808
+ if (key == keys.pageDown) {
18769
18809
  return BIG_BACKSTEP;
18770
- } else if (key == keys.pageUp) {
18810
+ }
18811
+ if (key == keys.pageUp) {
18771
18812
  return BIG_STEP;
18772
- } else {
18773
- return NO_STEP;
18774
18813
  }
18814
+
18815
+ return NO_STEP;
18775
18816
  },
18776
18817
  },
18777
18818
 
@@ -18920,8 +18961,8 @@
18920
18961
  thumbPosValue,
18921
18962
  min = module.get.min(),
18922
18963
  max = module.get.max(),
18923
- thumbPosPercent = 100 * (newValue - min) / (max - min),
18924
- trackStartPosPercent = 100 * (Math.min(thumbVal, secondThumbVal) - min) / (max - min),
18964
+ thumbPosPercent = 100 * ((newValue - min) / (max - min)),
18965
+ trackStartPosPercent = 100 * ((Math.min(thumbVal, secondThumbVal) - min) / (max - min)),
18925
18966
  trackEndPosPercent = 100 * (1 - (Math.max(thumbVal, secondThumbVal) - min) / (max - min))
18926
18967
  ;
18927
18968
  if (module.is.vertical()) {
@@ -19057,7 +19098,7 @@
19057
19098
  previousTime
19058
19099
  ;
19059
19100
  if (settings.performance) {
19060
- currentTime = new Date().getTime();
19101
+ currentTime = Date.now();
19061
19102
  previousTime = time || currentTime;
19062
19103
  executionTime = currentTime - previousTime;
19063
19104
  time = currentTime;
@@ -19109,8 +19150,8 @@
19109
19150
  ;
19110
19151
  passedArguments = passedArguments || queryArguments;
19111
19152
  context = context || element;
19112
- if (typeof query == 'string' && object !== undefined) {
19113
- query = query.split(/[\. ]/);
19153
+ if (typeof query === 'string' && object !== undefined) {
19154
+ query = query.split(/[ .]/);
19114
19155
  maxDepth = query.length - 1;
19115
19156
  $.each(query, function (depth, value) {
19116
19157
  var camelCaseValue = (depth != maxDepth)
@@ -19211,9 +19252,7 @@
19211
19252
  // page up/down multiplier. How many more times the steps to take on page up/down press
19212
19253
  pageMultiplier: 2,
19213
19254
 
19214
- selector: {
19215
-
19216
- },
19255
+ selector: {},
19217
19256
 
19218
19257
  className: {
19219
19258
  reversed: 'reversed',
@@ -19245,7 +19284,7 @@
19245
19284
  })(jQuery, window, document);
19246
19285
 
19247
19286
  /*!
19248
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Rating
19287
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Rating
19249
19288
  * https://github.com/fomantic/Fomantic-UI/
19250
19289
  *
19251
19290
  *
@@ -19261,7 +19300,7 @@
19261
19300
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
19262
19301
  }
19263
19302
 
19264
- window = (typeof window != 'undefined' && window.Math == Math)
19303
+ window = (window !== undefined && window.Math === Math)
19265
19304
  ? window
19266
19305
  : globalThis;
19267
19306
 
@@ -19270,11 +19309,11 @@
19270
19309
  $allModules = $(this),
19271
19310
  moduleSelector = $allModules.selector || '',
19272
19311
 
19273
- time = new Date().getTime(),
19312
+ time = Date.now(),
19274
19313
  performance = [],
19275
19314
 
19276
19315
  query = arguments[0],
19277
- methodInvoked = (typeof query == 'string'),
19316
+ methodInvoked = (typeof query === 'string'),
19278
19317
  queryArguments = [].slice.call(arguments, 1),
19279
19318
  returnedValue
19280
19319
  ;
@@ -19602,7 +19641,7 @@
19602
19641
  previousTime
19603
19642
  ;
19604
19643
  if (settings.performance) {
19605
- currentTime = new Date().getTime();
19644
+ currentTime = Date.now();
19606
19645
  previousTime = time || currentTime;
19607
19646
  executionTime = currentTime - previousTime;
19608
19647
  time = currentTime;
@@ -19631,7 +19670,7 @@
19631
19670
  title += ' \'' + moduleSelector + '\'';
19632
19671
  }
19633
19672
  if ($allModules.length > 1) {
19634
- title += ' ' + '(' + $allModules.length + ')';
19673
+ title += ' (' + $allModules.length + ')';
19635
19674
  }
19636
19675
  if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
19637
19676
  console.groupCollapsed(title);
@@ -19656,8 +19695,8 @@
19656
19695
  ;
19657
19696
  passedArguments = passedArguments || queryArguments;
19658
19697
  context = context || element;
19659
- if (typeof query == 'string' && object !== undefined) {
19660
- query = query.split(/[\. ]/);
19698
+ if (typeof query === 'string' && object !== undefined) {
19699
+ query = query.split(/[ .]/);
19661
19700
  maxDepth = query.length - 1;
19662
19701
  $.each(query, function (depth, value) {
19663
19702
  var camelCaseValue = (depth != maxDepth)
@@ -19786,7 +19825,7 @@
19786
19825
  })(jQuery, window, document);
19787
19826
 
19788
19827
  /*!
19789
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Search
19828
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Search
19790
19829
  * https://github.com/fomantic/Fomantic-UI/
19791
19830
  *
19792
19831
  *
@@ -19802,7 +19841,7 @@
19802
19841
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
19803
19842
  }
19804
19843
 
19805
- window = (typeof window != 'undefined' && window.Math == Math)
19844
+ window = (window !== undefined && window.Math === Math)
19806
19845
  ? window
19807
19846
  : globalThis;
19808
19847
 
@@ -19811,15 +19850,15 @@
19811
19850
  $allModules = $(this),
19812
19851
  moduleSelector = $allModules.selector || '',
19813
19852
 
19814
- time = new Date().getTime(),
19853
+ time = Date.now(),
19815
19854
  performance = [],
19816
19855
 
19817
19856
  query = arguments[0],
19818
- methodInvoked = (typeof query == 'string'),
19857
+ methodInvoked = (typeof query === 'string'),
19819
19858
  queryArguments = [].slice.call(arguments, 1),
19820
19859
  returnedValue
19821
19860
  ;
19822
- $(this).each(function () {
19861
+ $allModules.each(function () {
19823
19862
  var
19824
19863
  settings = ($.isPlainObject(parameters))
19825
19864
  ? $.extend(true, {}, $.fn.search.settings, parameters)
@@ -20332,7 +20371,7 @@
20332
20371
  $searchButton.removeClass(className.pressed);
20333
20372
  },
20334
20373
  diacritics: function (text) {
20335
- return settings.ignoreDiacritics ? text.normalize('NFD').replace(/[\u0300-\u036f]/g, '') : text;
20374
+ return settings.ignoreDiacritics ? text.normalize('NFD').replace(/[\u0300-\u036F]/g, '') : text;
20336
20375
  },
20337
20376
  },
20338
20377
 
@@ -20450,15 +20489,13 @@
20450
20489
  $.each(searchFields, function (index, field) {
20451
20490
  $.each(source, function (label, content) {
20452
20491
  var
20453
- fieldExists = (typeof content[field] == 'string') || (typeof content[field] == 'number')
20492
+ fieldExists = (typeof content[field] === 'string') || (typeof content[field] === 'number')
20454
20493
  ;
20455
20494
  if (fieldExists) {
20456
20495
  var text;
20457
- if (typeof content[field] === 'string') {
20458
- text = module.remove.diacritics(content[field]);
20459
- } else {
20460
- text = content[field].toString();
20461
- }
20496
+ text = typeof content[field] === 'string'
20497
+ ? module.remove.diacritics(content[field])
20498
+ : content[field].toString();
20462
20499
  if (text.search(matchRegExp) !== -1) {
20463
20500
  // content starts with value (first in results)
20464
20501
  addResult(results, content);
@@ -20500,17 +20537,22 @@
20500
20537
  if (queryLength === termLength) {
20501
20538
  return (query === term);
20502
20539
  }
20503
- search: for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) {
20540
+ for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) {
20504
20541
  var
20542
+ continueSearch = false,
20505
20543
  queryCharacter = query.charCodeAt(characterIndex)
20506
20544
  ;
20507
20545
  while (nextCharacterIndex < termLength) {
20508
20546
  if (term.charCodeAt(nextCharacterIndex++) === queryCharacter) {
20509
- continue search;
20547
+ continueSearch = true;
20548
+
20549
+ break;
20510
20550
  }
20511
20551
  }
20512
20552
 
20513
- return false;
20553
+ if (!continueSearch) {
20554
+ return false;
20555
+ }
20514
20556
  }
20515
20557
 
20516
20558
  return true;
@@ -20594,7 +20636,7 @@
20594
20636
  if (settings.cache) {
20595
20637
  module.verbose('Checking cache for generated html for query', name);
20596
20638
 
20597
- return (typeof cache == 'object') && (cache[name] !== undefined)
20639
+ return (typeof cache === 'object') && (cache[name] !== undefined)
20598
20640
  ? cache[name]
20599
20641
  : false;
20600
20642
  }
@@ -20916,7 +20958,7 @@
20916
20958
  previousTime
20917
20959
  ;
20918
20960
  if (settings.performance) {
20919
- currentTime = new Date().getTime();
20961
+ currentTime = Date.now();
20920
20962
  previousTime = time || currentTime;
20921
20963
  executionTime = currentTime - previousTime;
20922
20964
  time = currentTime;
@@ -20945,7 +20987,7 @@
20945
20987
  title += ' \'' + moduleSelector + '\'';
20946
20988
  }
20947
20989
  if ($allModules.length > 1) {
20948
- title += ' ' + '(' + $allModules.length + ')';
20990
+ title += ' (' + $allModules.length + ')';
20949
20991
  }
20950
20992
  if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
20951
20993
  console.groupCollapsed(title);
@@ -20970,8 +21012,8 @@
20970
21012
  ;
20971
21013
  passedArguments = passedArguments || queryArguments;
20972
21014
  context = context || element;
20973
- if (typeof query == 'string' && object !== undefined) {
20974
- query = query.split(/[\. ]/);
21015
+ if (typeof query === 'string' && object !== undefined) {
21016
+ query = query.split(/[ .]/);
20975
21017
  maxDepth = query.length - 1;
20976
21018
  $.each(query, function (depth, value) {
20977
21019
  var camelCaseValue = (depth != maxDepth)
@@ -21142,7 +21184,7 @@
21142
21184
  },
21143
21185
 
21144
21186
  regExp: {
21145
- escape: /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
21187
+ escape: /[$()*+./?[\\\]^{|}-]/g,
21146
21188
  beginsWith: '(?:\\s|^)',
21147
21189
  },
21148
21190
 
@@ -21178,8 +21220,8 @@
21178
21220
  return string;
21179
21221
  }
21180
21222
  var
21181
- badChars = /[<>"'`]/g,
21182
- shouldEscape = /[&<>"'`]/,
21223
+ badChars = /["'<>`]/g,
21224
+ shouldEscape = /["&'<>`]/,
21183
21225
  escape = {
21184
21226
  '<': '&lt;',
21185
21227
  '>': '&gt;',
@@ -21191,7 +21233,7 @@
21191
21233
  return escape[chr];
21192
21234
  };
21193
21235
  if (shouldEscape.test(string)) {
21194
- string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, '&amp;');
21236
+ string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
21195
21237
 
21196
21238
  return string.replace(badChars, escapedChar);
21197
21239
  }
@@ -21233,11 +21275,9 @@
21233
21275
  // each item inside category
21234
21276
  html += '<div class="results">';
21235
21277
  $.each(category.results, function (index, result) {
21236
- if (result[fields.url]) {
21237
- html += '<a class="result" href="' + result[fields.url].replace(/"/g, '') + '">';
21238
- } else {
21239
- html += '<a class="result">';
21240
- }
21278
+ html += result[fields.url]
21279
+ ? '<a class="result" href="' + result[fields.url].replace(/"/g, '') + '">'
21280
+ : '<a class="result">';
21241
21281
  if (result[fields.image] !== undefined) {
21242
21282
  html += ''
21243
21283
  + '<div class="image">'
@@ -21264,17 +21304,15 @@
21264
21304
  }
21265
21305
  });
21266
21306
  if (response[fields.action]) {
21267
- if (fields.actionURL === false) {
21268
- html += ''
21307
+ html += fields.actionURL === false
21308
+ ? ''
21269
21309
  + '<div class="action">'
21270
21310
  + escape(response[fields.action][fields.actionText], preserveHTML)
21271
- + '</div>';
21272
- } else {
21273
- html += ''
21311
+ + '</div>'
21312
+ : ''
21274
21313
  + '<a href="' + response[fields.action][fields.actionURL].replace(/"/g, '') + '" class="action">'
21275
21314
  + escape(response[fields.action][fields.actionText], preserveHTML)
21276
21315
  + '</a>';
21277
- }
21278
21316
  }
21279
21317
 
21280
21318
  return html;
@@ -21290,11 +21328,9 @@
21290
21328
  if (response[fields.results] !== undefined) {
21291
21329
  // each result
21292
21330
  $.each(response[fields.results], function (index, result) {
21293
- if (result[fields.url]) {
21294
- html += '<a class="result" href="' + result[fields.url].replace(/"/g, '') + '">';
21295
- } else {
21296
- html += '<a class="result">';
21297
- }
21331
+ html += result[fields.url]
21332
+ ? '<a class="result" href="' + result[fields.url].replace(/"/g, '') + '">'
21333
+ : '<a class="result">';
21298
21334
  if (result[fields.image] !== undefined) {
21299
21335
  html += ''
21300
21336
  + '<div class="image">'
@@ -21316,17 +21352,15 @@
21316
21352
  html += '</a>';
21317
21353
  });
21318
21354
  if (response[fields.action]) {
21319
- if (fields.actionURL === false) {
21320
- html += ''
21355
+ html += fields.actionURL === false
21356
+ ? ''
21321
21357
  + '<div class="action">'
21322
21358
  + escape(response[fields.action][fields.actionText], preserveHTML)
21323
- + '</div>';
21324
- } else {
21325
- html += ''
21359
+ + '</div>'
21360
+ : ''
21326
21361
  + '<a href="' + response[fields.action][fields.actionURL].replace(/"/g, '') + '" class="action">'
21327
21362
  + escape(response[fields.action][fields.actionText], preserveHTML)
21328
21363
  + '</a>';
21329
- }
21330
21364
  }
21331
21365
 
21332
21366
  return html;
@@ -21345,7 +21379,7 @@
21345
21379
  })(jQuery, window, document);
21346
21380
 
21347
21381
  /*!
21348
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Shape
21382
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Shape
21349
21383
  * https://github.com/fomantic/Fomantic-UI/
21350
21384
  *
21351
21385
  *
@@ -21361,7 +21395,7 @@
21361
21395
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
21362
21396
  }
21363
21397
 
21364
- window = (typeof window != 'undefined' && window.Math == Math)
21398
+ window = (window !== undefined && window.Math === Math)
21365
21399
  ? window
21366
21400
  : globalThis;
21367
21401
 
@@ -21369,11 +21403,11 @@
21369
21403
  var
21370
21404
  $allModules = $(this),
21371
21405
 
21372
- time = new Date().getTime(),
21406
+ time = Date.now(),
21373
21407
  performance = [],
21374
21408
 
21375
21409
  query = arguments[0],
21376
- methodInvoked = (typeof query == 'string'),
21410
+ methodInvoked = (typeof query === 'string'),
21377
21411
  queryArguments = [].slice.call(arguments, 1),
21378
21412
 
21379
21413
  requestAnimationFrame = window.requestAnimationFrame
@@ -21555,7 +21589,7 @@
21555
21589
 
21556
21590
  duration: function (duration) {
21557
21591
  duration = duration || settings.duration;
21558
- duration = (typeof duration == 'number')
21592
+ duration = (typeof duration === 'number')
21559
21593
  ? duration + 'ms'
21560
21594
  : duration;
21561
21595
  module.verbose('Setting animation duration', duration);
@@ -21992,7 +22026,7 @@
21992
22026
  previousTime
21993
22027
  ;
21994
22028
  if (settings.performance) {
21995
- currentTime = new Date().getTime();
22029
+ currentTime = Date.now();
21996
22030
  previousTime = time || currentTime;
21997
22031
  executionTime = currentTime - previousTime;
21998
22032
  time = currentTime;
@@ -22021,7 +22055,7 @@
22021
22055
  title += ' \'' + moduleSelector + '\'';
22022
22056
  }
22023
22057
  if ($allModules.length > 1) {
22024
- title += ' ' + '(' + $allModules.length + ')';
22058
+ title += ' (' + $allModules.length + ')';
22025
22059
  }
22026
22060
  if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
22027
22061
  console.groupCollapsed(title);
@@ -22046,8 +22080,8 @@
22046
22080
  ;
22047
22081
  passedArguments = passedArguments || queryArguments;
22048
22082
  context = context || element;
22049
- if (typeof query == 'string' && object !== undefined) {
22050
- query = query.split(/[\. ]/);
22083
+ if (typeof query === 'string' && object !== undefined) {
22084
+ query = query.split(/[ .]/);
22051
22085
  maxDepth = query.length - 1;
22052
22086
  $.each(query, function (depth, value) {
22053
22087
  var camelCaseValue = (depth != maxDepth)
@@ -22177,7 +22211,7 @@
22177
22211
  })(jQuery, window, document);
22178
22212
 
22179
22213
  /*!
22180
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Sidebar
22214
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Sidebar
22181
22215
  * https://github.com/fomantic/Fomantic-UI/
22182
22216
  *
22183
22217
  *
@@ -22193,7 +22227,7 @@
22193
22227
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
22194
22228
  }
22195
22229
 
22196
- window = (typeof window != 'undefined' && window.Math == Math)
22230
+ window = (window !== undefined && window.Math === Math)
22197
22231
  ? window
22198
22232
  : globalThis;
22199
22233
 
@@ -22208,11 +22242,11 @@
22208
22242
 
22209
22243
  moduleSelector = $allModules.selector || '',
22210
22244
 
22211
- time = new Date().getTime(),
22245
+ time = Date.now(),
22212
22246
  performance = [],
22213
22247
 
22214
22248
  query = arguments[0],
22215
- methodInvoked = (typeof query == 'string'),
22249
+ methodInvoked = (typeof query === 'string'),
22216
22250
  queryArguments = [].slice.call(arguments, 1),
22217
22251
 
22218
22252
  requestAnimationFrame = window.requestAnimationFrame
@@ -22487,7 +22521,7 @@
22487
22521
  module.verbose('Forcing repaint event');
22488
22522
  element.style.display = 'none';
22489
22523
  var ignored = element.offsetHeight;
22490
- element.scrollTop = element.scrollTop;
22524
+ element.scrollTop = element.scrollTop; // eslint-disable-line no-self-assign
22491
22525
  element.style.display = '';
22492
22526
  },
22493
22527
 
@@ -22552,7 +22586,7 @@
22552
22586
  bodyMargin: function () {
22553
22587
  initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
22554
22588
  var
22555
- bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
22589
+ bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
22556
22590
  bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
22557
22591
  ;
22558
22592
  tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
@@ -22581,9 +22615,9 @@
22581
22615
  module.hideOthers(module.show);
22582
22616
 
22583
22617
  return;
22584
- } else {
22585
- module.hideOthers();
22586
22618
  }
22619
+
22620
+ module.hideOthers();
22587
22621
  } else {
22588
22622
  settings.transition = 'overlay';
22589
22623
  }
@@ -22887,9 +22921,11 @@
22887
22921
  direction: function () {
22888
22922
  if ($module.hasClass(className.top)) {
22889
22923
  return className.top;
22890
- } else if ($module.hasClass(className.right)) {
22924
+ }
22925
+ if ($module.hasClass(className.right)) {
22891
22926
  return className.right;
22892
- } else if ($module.hasClass(className.bottom)) {
22927
+ }
22928
+ if ($module.hasClass(className.bottom)) {
22893
22929
  return className.bottom;
22894
22930
  }
22895
22931
 
@@ -22981,9 +23017,9 @@
22981
23017
  module.verbose('Browser was found to be iOS', userAgent);
22982
23018
 
22983
23019
  return true;
22984
- } else {
22985
- return false;
22986
23020
  }
23021
+
23022
+ return false;
22987
23023
  },
22988
23024
  mobile: function () {
22989
23025
  var
@@ -22994,11 +23030,11 @@
22994
23030
  module.verbose('Browser was found to be mobile', userAgent);
22995
23031
 
22996
23032
  return true;
22997
- } else {
22998
- module.verbose('Browser is not mobile, using regular transition', userAgent);
22999
-
23000
- return false;
23001
23033
  }
23034
+
23035
+ module.verbose('Browser is not mobile, using regular transition', userAgent);
23036
+
23037
+ return false;
23002
23038
  },
23003
23039
  hidden: function () {
23004
23040
  return !module.is.visible();
@@ -23085,7 +23121,7 @@
23085
23121
  previousTime
23086
23122
  ;
23087
23123
  if (settings.performance) {
23088
- currentTime = new Date().getTime();
23124
+ currentTime = Date.now();
23089
23125
  previousTime = time || currentTime;
23090
23126
  executionTime = currentTime - previousTime;
23091
23127
  time = currentTime;
@@ -23136,8 +23172,8 @@
23136
23172
  ;
23137
23173
  passedArguments = passedArguments || queryArguments;
23138
23174
  context = context || element;
23139
- if (typeof query == 'string' && object !== undefined) {
23140
- query = query.split(/[\. ]/);
23175
+ if (typeof query === 'string' && object !== undefined) {
23176
+ query = query.split(/[ .]/);
23141
23177
  maxDepth = query.length - 1;
23142
23178
  $.each(query, function (depth, value) {
23143
23179
  var camelCaseValue = (depth != maxDepth)
@@ -23284,7 +23320,7 @@
23284
23320
  })(jQuery, window, document);
23285
23321
 
23286
23322
  /*!
23287
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Sticky
23323
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Sticky
23288
23324
  * https://github.com/fomantic/Fomantic-UI/
23289
23325
  *
23290
23326
  *
@@ -23300,7 +23336,7 @@
23300
23336
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
23301
23337
  }
23302
23338
 
23303
- window = (typeof window != 'undefined' && window.Math == Math)
23339
+ window = (window !== undefined && window.Math === Math)
23304
23340
  ? window
23305
23341
  : globalThis;
23306
23342
 
@@ -23310,11 +23346,11 @@
23310
23346
  $document = $(document),
23311
23347
  moduleSelector = $allModules.selector || '',
23312
23348
 
23313
- time = new Date().getTime(),
23349
+ time = Date.now(),
23314
23350
  performance = [],
23315
23351
 
23316
23352
  query = arguments[0],
23317
- methodInvoked = (typeof query == 'string'),
23353
+ methodInvoked = (typeof query === 'string'),
23318
23354
  queryArguments = [].slice.call(arguments, 1),
23319
23355
  returnedValue
23320
23356
  ;
@@ -24025,7 +24061,7 @@
24025
24061
  previousTime
24026
24062
  ;
24027
24063
  if (settings.performance) {
24028
- currentTime = new Date().getTime();
24064
+ currentTime = Date.now();
24029
24065
  previousTime = time || currentTime;
24030
24066
  executionTime = currentTime - previousTime;
24031
24067
  time = currentTime;
@@ -24076,8 +24112,8 @@
24076
24112
  ;
24077
24113
  passedArguments = passedArguments || queryArguments;
24078
24114
  context = context || element;
24079
- if (typeof query == 'string' && object !== undefined) {
24080
- query = query.split(/[\. ]/);
24115
+ if (typeof query === 'string' && object !== undefined) {
24116
+ query = query.split(/[ .]/);
24081
24117
  maxDepth = query.length - 1;
24082
24118
  $.each(query, function (depth, value) {
24083
24119
  var camelCaseValue = (depth != maxDepth)
@@ -24208,7 +24244,7 @@
24208
24244
  })(jQuery, window, document);
24209
24245
 
24210
24246
  /*!
24211
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Tab
24247
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Tab
24212
24248
  * https://github.com/fomantic/Fomantic-UI/
24213
24249
  *
24214
24250
  *
@@ -24228,7 +24264,7 @@
24228
24264
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
24229
24265
  }
24230
24266
 
24231
- window = (typeof window != 'undefined' && window.Math == Math)
24267
+ window = (window !== undefined && window.Math === Math)
24232
24268
  ? window
24233
24269
  : globalThis;
24234
24270
 
@@ -24240,11 +24276,11 @@
24240
24276
  : $(this),
24241
24277
  $document = $(document),
24242
24278
  moduleSelector = $allModules.selector || '',
24243
- time = new Date().getTime(),
24279
+ time = Date.now(),
24244
24280
  performance = [],
24245
24281
 
24246
24282
  query = arguments[0],
24247
- methodInvoked = (typeof query == 'string'),
24283
+ methodInvoked = (typeof query === 'string'),
24248
24284
  queryArguments = [].slice.call(arguments, 1),
24249
24285
 
24250
24286
  initializedHistory = false,
@@ -24253,7 +24289,6 @@
24253
24289
 
24254
24290
  $allModules.each(function () {
24255
24291
  var
24256
-
24257
24292
  settings = ($.isPlainObject(parameters))
24258
24293
  ? $.extend(true, {}, $.fn.tab.settings, parameters)
24259
24294
  : $.extend({}, $.fn.tab.settings),
@@ -24402,25 +24437,24 @@
24402
24437
  module.error(error.state);
24403
24438
 
24404
24439
  return false;
24405
- } else {
24406
- if (settings.historyType == 'state') {
24407
- module.debug('Using HTML5 to manage state');
24408
- if (settings.path !== false) {
24409
- $.address
24410
- .history(true)
24411
- .state(settings.path)
24412
- ;
24413
- $(window).trigger('popstate');
24414
- } else {
24415
- module.error(error.path);
24440
+ }
24441
+ if (settings.historyType == 'state') {
24442
+ module.debug('Using HTML5 to manage state');
24443
+ if (settings.path !== false) {
24444
+ $.address
24445
+ .history(true)
24446
+ .state(settings.path)
24447
+ ;
24448
+ $(window).trigger('popstate');
24449
+ } else {
24450
+ module.error(error.path);
24416
24451
 
24417
- return false;
24418
- }
24452
+ return false;
24419
24453
  }
24420
- $.address
24421
- .bind('change', module.event.history.change)
24422
- ;
24423
24454
  }
24455
+ $.address
24456
+ .bind('change', module.event.history.change)
24457
+ ;
24424
24458
  },
24425
24459
 
24426
24460
  event: {
@@ -24497,7 +24531,7 @@
24497
24531
  set: {
24498
24532
  auto: function () {
24499
24533
  var
24500
- url = (typeof settings.path == 'string')
24534
+ url = (typeof settings.path === 'string')
24501
24535
  ? settings.path.replace(/\/$/, '') + '/{$tab}'
24502
24536
  : '/{$tab}'
24503
24537
  ;
@@ -24593,16 +24627,16 @@
24593
24627
  }
24594
24628
 
24595
24629
  return false;
24596
- } else {
24597
- module.debug('Opened local tab', currentPath);
24598
- module.activate.all(currentPath);
24599
- if (!module.cache.read(currentPath)) {
24600
- module.cache.add(currentPath, true);
24601
- module.debug('First time tab loaded calling tab init');
24602
- settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent);
24603
- }
24604
- settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent);
24605
24630
  }
24631
+
24632
+ module.debug('Opened local tab', currentPath);
24633
+ module.activate.all(currentPath);
24634
+ if (!module.cache.read(currentPath)) {
24635
+ module.cache.add(currentPath, true);
24636
+ module.debug('First time tab loaded calling tab init');
24637
+ settings.onFirstLoad.call($tab[0], currentPath, parameterArray, historyEvent);
24638
+ }
24639
+ settings.onLoad.call($tab[0], currentPath, parameterArray, historyEvent);
24606
24640
  } else if (tabPath.search('/') == -1 && tabPath !== '') {
24607
24641
  // look for in page anchor
24608
24642
  tabPath = module.escape.string(tabPath);
@@ -24661,7 +24695,7 @@
24661
24695
  evaluateScripts = (evaluateScripts !== undefined)
24662
24696
  ? evaluateScripts
24663
24697
  : settings.evaluateScripts;
24664
- if (typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && typeof html !== 'string') {
24698
+ if (typeof settings.cacheType === 'string' && settings.cacheType.toLowerCase() == 'dom' && typeof html !== 'string') {
24665
24699
  $tab
24666
24700
  .empty()
24667
24701
  .append($(html).clone(true))
@@ -24707,7 +24741,7 @@
24707
24741
 
24708
24742
  if (settings.loadOnce) {
24709
24743
  module.cache.add(fullTabPath, true);
24710
- } else if (typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && $tab.children().length > 0) {
24744
+ } else if (typeof settings.cacheType === 'string' && settings.cacheType.toLowerCase() == 'dom' && $tab.children().length > 0) {
24711
24745
  setTimeout(function () {
24712
24746
  var
24713
24747
  $clone = $tab.children().clone(true)
@@ -24925,7 +24959,7 @@
24925
24959
  pathName = activeTabPath;
24926
24960
  }
24927
24961
 
24928
- return typeof pathName == 'string'
24962
+ return typeof pathName === 'string'
24929
24963
  ? pathName.split('/')
24930
24964
  : [pathName];
24931
24965
  },
@@ -24993,7 +25027,7 @@
24993
25027
  previousTime
24994
25028
  ;
24995
25029
  if (settings.performance) {
24996
- currentTime = new Date().getTime();
25030
+ currentTime = Date.now();
24997
25031
  previousTime = time || currentTime;
24998
25032
  executionTime = currentTime - previousTime;
24999
25033
  time = currentTime;
@@ -25044,8 +25078,8 @@
25044
25078
  ;
25045
25079
  passedArguments = passedArguments || queryArguments;
25046
25080
  context = context || element;
25047
- if (typeof query == 'string' && object !== undefined) {
25048
- query = query.split(/[\. ]/);
25081
+ if (typeof query === 'string' && object !== undefined) {
25082
+ query = query.split(/[ .]/);
25049
25083
  maxDepth = query.length - 1;
25050
25084
  $.each(query, function (depth, value) {
25051
25085
  var camelCaseValue = (depth != maxDepth)
@@ -25164,7 +25198,7 @@
25164
25198
  },
25165
25199
 
25166
25200
  regExp: {
25167
- escape: /[-[\]{}()*+?.,\\^$|#\s:=@]/g,
25201
+ escape: /[\s#$()*+,.:=?@[\\\]^{|}-]/g,
25168
25202
  },
25169
25203
 
25170
25204
  metadata: {
@@ -25187,7 +25221,7 @@
25187
25221
  })(jQuery, window, document);
25188
25222
 
25189
25223
  /*!
25190
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Toast
25224
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Toast
25191
25225
  * https://github.com/fomantic/Fomantic-UI/
25192
25226
  *
25193
25227
  *
@@ -25203,20 +25237,20 @@
25203
25237
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
25204
25238
  }
25205
25239
 
25206
- window = (typeof window != 'undefined' && window.Math == Math)
25240
+ window = (window !== undefined && window.Math === Math)
25207
25241
  ? window
25208
25242
  : globalThis;
25209
25243
 
25210
- $.toast = $.fn.toast = function (parameters) {
25244
+ $.fn.toast = function (parameters) {
25211
25245
  var
25212
25246
  $allModules = $(this),
25213
25247
  moduleSelector = $allModules.selector || '',
25214
25248
 
25215
- time = new Date().getTime(),
25249
+ time = Date.now(),
25216
25250
  performance = [],
25217
25251
 
25218
25252
  query = arguments[0],
25219
- methodInvoked = (typeof query == 'string'),
25253
+ methodInvoked = (typeof query === 'string'),
25220
25254
  queryArguments = [].slice.call(arguments, 1),
25221
25255
  returnedValue
25222
25256
  ;
@@ -25460,7 +25494,7 @@
25460
25494
  }
25461
25495
  }
25462
25496
  if (settings.displayTime === 'auto') {
25463
- settings.displayTime = Math.max(settings.minDisplayTime, $toast.text().split(' ').length / settings.wordsPerMinute * 60000);
25497
+ settings.displayTime = Math.max(settings.minDisplayTime, ($toast.text().split(' ').length / settings.wordsPerMinute) * 60000);
25464
25498
  }
25465
25499
  $toastBox.append($toast);
25466
25500
 
@@ -25497,7 +25531,7 @@
25497
25531
  }
25498
25532
  if (settings.displayTime > 0) {
25499
25533
  var progressingClass = className.progressing + ' ' + (settings.pauseOnHover ? className.pausable : '');
25500
- if (!!settings.showProgress) {
25534
+ if (settings.showProgress) {
25501
25535
  $progress = $('<div/>', {
25502
25536
  class: className.progress + ' ' + (settings.classProgress || settings.class),
25503
25537
  'data-percent': '',
@@ -25757,8 +25791,8 @@
25757
25791
  return string;
25758
25792
  }
25759
25793
  var
25760
- badChars = /[<>"'`]/g,
25761
- shouldEscape = /[&<>"'`]/,
25794
+ badChars = /["'<>`]/g,
25795
+ shouldEscape = /["&'<>`]/,
25762
25796
  escape = {
25763
25797
  '<': '&lt;',
25764
25798
  '>': '&gt;',
@@ -25771,7 +25805,7 @@
25771
25805
  }
25772
25806
  ;
25773
25807
  if (shouldEscape.test(string)) {
25774
- string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, '&amp;');
25808
+ string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
25775
25809
 
25776
25810
  return string.replace(badChars, escapedChar);
25777
25811
  }
@@ -25848,7 +25882,7 @@
25848
25882
  previousTime
25849
25883
  ;
25850
25884
  if (settings.performance) {
25851
- currentTime = new Date().getTime();
25885
+ currentTime = Date.now();
25852
25886
  previousTime = time || currentTime;
25853
25887
  executionTime = currentTime - previousTime;
25854
25888
  time = currentTime;
@@ -25899,8 +25933,8 @@
25899
25933
  ;
25900
25934
  passedArguments = passedArguments || queryArguments;
25901
25935
  context = context || element;
25902
- if (typeof query == 'string' && object !== undefined) {
25903
- query = query.split(/[\. ]/);
25936
+ if (typeof query === 'string' && object !== undefined) {
25937
+ query = query.split(/[ .]/);
25904
25938
  maxDepth = query.length - 1;
25905
25939
  $.each(query, function (depth, value) {
25906
25940
  var camelCaseValue = (depth != maxDepth)
@@ -25961,6 +25995,7 @@
25961
25995
  ? returnedValue
25962
25996
  : this;
25963
25997
  };
25998
+ $.toast = $.fn.toast;
25964
25999
 
25965
26000
  $.fn.toast.settings = {
25966
26001
 
@@ -26098,13 +26133,15 @@
26098
26133
  ;
26099
26134
  if (x < 1 / d1) {
26100
26135
  return n1 * x * x;
26101
- } else if (x < 2 / d1) {
26136
+ }
26137
+ if (x < 2 / d1) {
26102
26138
  return n1 * (x -= 1.5 / d1) * x + 0.75;
26103
- } else if (x < 2.5 / d1) {
26139
+ }
26140
+ if (x < 2.5 / d1) {
26104
26141
  return n1 * (x -= 2.25 / d1) * x + 0.9375;
26105
- } else {
26106
- return n1 * (x -= 2.625 / d1) * x + 0.984375;
26107
26142
  }
26143
+
26144
+ return n1 * (x -= 2.625 / d1) * x + 0.984375;
26108
26145
  },
26109
26146
  easeOutCubic: function (t) {
26110
26147
  return (--t) * t * t + 1;
@@ -26113,7 +26150,7 @@
26113
26150
  })(jQuery, window, document);
26114
26151
 
26115
26152
  /*!
26116
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Transition
26153
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Transition
26117
26154
  * https://github.com/fomantic/Fomantic-UI/
26118
26155
  *
26119
26156
  *
@@ -26129,7 +26166,7 @@
26129
26166
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
26130
26167
  }
26131
26168
 
26132
- window = (typeof window != 'undefined' && window.Math == Math)
26169
+ window = (window !== undefined && window.Math === Math)
26133
26170
  ? window
26134
26171
  : globalThis;
26135
26172
 
@@ -26138,7 +26175,7 @@
26138
26175
  $allModules = $(this),
26139
26176
  moduleSelector = $allModules.selector || '',
26140
26177
 
26141
- time = new Date().getTime(),
26178
+ time = Date.now(),
26142
26179
  performance = [],
26143
26180
 
26144
26181
  moduleArguments = arguments,
@@ -26281,14 +26318,15 @@
26281
26318
  }
26282
26319
 
26283
26320
  return false;
26284
- } else if (!settings.allowRepeats && module.is.occurring()) {
26321
+ }
26322
+ if (!settings.allowRepeats && module.is.occurring()) {
26285
26323
  module.debug('Animation is already occurring, will not execute repeated animation', settings.animation);
26286
26324
 
26287
26325
  return false;
26288
- } else {
26289
- module.debug('New animation started, completing previous early', settings.animation);
26290
- instance.complete();
26291
26326
  }
26327
+
26328
+ module.debug('New animation started, completing previous early', settings.animation);
26329
+ instance.complete();
26292
26330
  }
26293
26331
  if (module.can.animate()) {
26294
26332
  module.set.animating(settings.animation);
@@ -26428,7 +26466,7 @@
26428
26466
  },
26429
26467
  duration: function (animationName, duration) {
26430
26468
  duration = duration || settings.duration;
26431
- duration = (typeof duration == 'number')
26469
+ duration = (typeof duration === 'number')
26432
26470
  ? duration + 'ms'
26433
26471
  : duration;
26434
26472
  if (duration || duration === 0) {
@@ -26602,33 +26640,38 @@
26602
26640
  },
26603
26641
  get: {
26604
26642
  settings: function (animation, duration, onComplete) {
26605
- if (typeof animation == 'object') { // single settings object
26643
+ if (typeof animation === 'object') { // single settings object
26606
26644
  return $.extend(true, {}, $.fn.transition.settings, animation);
26607
- } else if (typeof onComplete == 'function') { // all arguments provided
26645
+ }
26646
+ if (typeof onComplete === 'function') { // all arguments provided
26608
26647
  return $.extend({}, $.fn.transition.settings, {
26609
26648
  animation: animation,
26610
26649
  onComplete: onComplete,
26611
26650
  duration: duration,
26612
26651
  });
26613
- } else if (typeof duration == 'string' || typeof duration == 'number') { // only duration provided
26652
+ }
26653
+ if (typeof duration === 'string' || typeof duration === 'number') { // only duration provided
26614
26654
  return $.extend({}, $.fn.transition.settings, {
26615
26655
  animation: animation,
26616
26656
  duration: duration,
26617
26657
  });
26618
- } else if (typeof duration == 'object') { // duration is actually settings object
26658
+ }
26659
+ if (typeof duration === 'object') { // duration is actually settings object
26619
26660
  return $.extend({}, $.fn.transition.settings, duration, {
26620
26661
  animation: animation,
26621
26662
  });
26622
- } else if (typeof duration == 'function') { // duration is actually callback
26663
+ }
26664
+ if (typeof duration === 'function') { // duration is actually callback
26623
26665
  return $.extend({}, $.fn.transition.settings, {
26624
26666
  animation: animation,
26625
26667
  onComplete: duration,
26626
26668
  });
26627
- } else { // only animation provided
26628
- return $.extend({}, $.fn.transition.settings, {
26629
- animation: animation,
26630
- });
26631
26669
  }
26670
+
26671
+ // only animation provided
26672
+ return $.extend({}, $.fn.transition.settings, {
26673
+ animation: animation,
26674
+ });
26632
26675
  },
26633
26676
  animationClass: function (animation) {
26634
26677
  var
@@ -26992,7 +27035,7 @@
26992
27035
  previousTime
26993
27036
  ;
26994
27037
  if (settings.performance) {
26995
- currentTime = new Date().getTime();
27038
+ currentTime = Date.now();
26996
27039
  previousTime = time || currentTime;
26997
27040
  executionTime = currentTime - previousTime;
26998
27041
  time = currentTime;
@@ -27021,7 +27064,7 @@
27021
27064
  title += ' \'' + moduleSelector + '\'';
27022
27065
  }
27023
27066
  if ($allModules.length > 1) {
27024
- title += ' ' + '(' + $allModules.length + ')';
27067
+ title += ' (' + $allModules.length + ')';
27025
27068
  }
27026
27069
  if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
27027
27070
  console.groupCollapsed(title);
@@ -27047,8 +27090,8 @@
27047
27090
  ;
27048
27091
  passedArguments = passedArguments || queryArguments;
27049
27092
  context = context || element;
27050
- if (typeof query == 'string' && object !== undefined) {
27051
- query = query.split(/[\. ]/);
27093
+ if (typeof query === 'string' && object !== undefined) {
27094
+ query = query.split(/[ .]/);
27052
27095
  maxDepth = query.length - 1;
27053
27096
  $.each(query, function (depth, value) {
27054
27097
  var camelCaseValue = (depth != maxDepth)
@@ -27192,7 +27235,7 @@
27192
27235
  })(jQuery, window, document);
27193
27236
 
27194
27237
  /*!
27195
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - API
27238
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - API
27196
27239
  * https://github.com/fomantic/Fomantic-UI/
27197
27240
  *
27198
27241
  *
@@ -27212,22 +27255,22 @@
27212
27255
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
27213
27256
  }
27214
27257
 
27215
- window = (typeof window != 'undefined' && window.Math == Math)
27258
+ window = (window !== undefined && window.Math === Math)
27216
27259
  ? window
27217
27260
  : globalThis;
27218
27261
 
27219
- $.api = $.fn.api = function (parameters) {
27262
+ $.fn.api = function (parameters) {
27220
27263
  var
27221
27264
  // use window context if none specified
27222
27265
  $allModules = isFunction(this)
27223
27266
  ? $(window)
27224
27267
  : $(this),
27225
27268
  moduleSelector = $allModules.selector || '',
27226
- time = new Date().getTime(),
27269
+ time = Date.now(),
27227
27270
  performance = [],
27228
27271
 
27229
27272
  query = arguments[0],
27230
- methodInvoked = (typeof query == 'string'),
27273
+ methodInvoked = (typeof query === 'string'),
27231
27274
  queryArguments = [].slice.call(arguments, 1),
27232
27275
 
27233
27276
  returnedValue
@@ -27319,7 +27362,7 @@
27319
27362
 
27320
27363
  decode: {
27321
27364
  json: function (response) {
27322
- if (response !== undefined && typeof response == 'string') {
27365
+ if (response !== undefined && typeof response === 'string') {
27323
27366
  try {
27324
27367
  response = JSON.parse(response);
27325
27368
  } catch (e) {
@@ -27400,10 +27443,10 @@
27400
27443
  module.error(error.beforeSend);
27401
27444
 
27402
27445
  return;
27403
- } else {
27404
- module.cancelled = false;
27405
27446
  }
27406
27447
 
27448
+ module.cancelled = false;
27449
+
27407
27450
  // get url
27408
27451
  url = module.get.templatedURL();
27409
27452
 
@@ -27497,11 +27540,11 @@
27497
27540
  module.verbose('XHR request determined to be aborted');
27498
27541
 
27499
27542
  return true;
27500
- } else {
27501
- module.verbose('XHR request was not aborted');
27502
-
27503
- return false;
27504
27543
  }
27544
+
27545
+ module.verbose('XHR request was not aborted');
27546
+
27547
+ return false;
27505
27548
  },
27506
27549
  validResponse: function (response) {
27507
27550
  if ((!module.is.expectingJSON()) || !isFunction(settings.successTest)) {
@@ -27514,11 +27557,11 @@
27514
27557
  module.debug('Response passed success test', response);
27515
27558
 
27516
27559
  return true;
27517
- } else {
27518
- module.debug('Response failed success test', response);
27519
-
27520
- return false;
27521
27560
  }
27561
+
27562
+ module.debug('Response failed success test', response);
27563
+
27564
+ return false;
27522
27565
  },
27523
27566
  },
27524
27567
 
@@ -27569,13 +27612,13 @@
27569
27612
  url = false;
27570
27613
 
27571
27614
  return false;
27572
- } else {
27573
- module.verbose('Found required variable', variable, value);
27574
- value = (settings.encodeParameters)
27575
- ? module.get.urlEncodedValue(value)
27576
- : value;
27577
- url = url.replace(templatedString, value);
27578
27615
  }
27616
+
27617
+ module.verbose('Found required variable', variable, value);
27618
+ value = (settings.encodeParameters)
27619
+ ? module.get.urlEncodedValue(value)
27620
+ : value;
27621
+ url = url.replace(templatedString, value);
27579
27622
  });
27580
27623
  }
27581
27624
  if (optionalVariables) {
@@ -27601,11 +27644,9 @@
27601
27644
  } else {
27602
27645
  module.verbose('Optional variable not found', variable);
27603
27646
  // remove preceding slash if set
27604
- if (url.indexOf('/' + templatedString) !== -1) {
27605
- url = url.replace('/' + templatedString, '');
27606
- } else {
27607
- url = url.replace(templatedString, '');
27608
- }
27647
+ url = url.indexOf('/' + templatedString) !== -1
27648
+ ? url.replace('/' + templatedString, '')
27649
+ : url.replace(templatedString, '');
27609
27650
  }
27610
27651
  });
27611
27652
  }
@@ -27624,8 +27665,8 @@
27624
27665
 
27625
27666
  if (useFormDataApi) {
27626
27667
  formData = new FormData($form[0]);
27627
- settings.processData = typeof settings.processData !== 'undefined' ? settings.processData : false;
27628
- settings.contentType = typeof settings.contentType !== 'undefined' ? settings.contentType : false;
27668
+ settings.processData = settings.processData !== undefined ? settings.processData : false;
27669
+ settings.contentType = settings.contentType !== undefined ? settings.contentType : false;
27629
27670
  } else {
27630
27671
  var
27631
27672
  formArray = $form.serializeArray(),
@@ -27656,8 +27697,7 @@
27656
27697
  ? floatValue
27657
27698
  : (el.value === 'false' ? false : el.value)),
27658
27699
  nameKeys = el.name.match(settings.regExp.key) || [],
27659
- k,
27660
- pushKey = el.name.replace(/\[\]$/, '')
27700
+ pushKey = el.name.replace(/\[]$/, '')
27661
27701
  ;
27662
27702
  if (!(pushKey in pushes)) {
27663
27703
  pushes[pushKey] = 0;
@@ -27671,7 +27711,9 @@
27671
27711
  value = pushValues[pushKey];
27672
27712
  }
27673
27713
 
27674
- while ((k = nameKeys.pop()) !== undefined) {
27714
+ while (nameKeys.length > 0) {
27715
+ var k = nameKeys.pop();
27716
+
27675
27717
  if (k == '' && !Array.isArray(value)) { // foo[]
27676
27718
  value = build([], pushes[pushKey]++, value);
27677
27719
  } else if (settings.regExp.fixed.test(k)) { // foo[n]
@@ -27730,7 +27772,7 @@
27730
27772
  done: function (response, textStatus, xhr) {
27731
27773
  var
27732
27774
  context = this,
27733
- elapsedTime = (new Date().getTime() - requestStartTime),
27775
+ elapsedTime = (Date.now() - requestStartTime),
27734
27776
  timeLeft = (settings.loadingDuration - elapsedTime),
27735
27777
  translatedResponse = (isFunction(settings.onResponse))
27736
27778
  ? module.is.expectingJSON() && !settings.rawResponse
@@ -27759,7 +27801,7 @@
27759
27801
  fail: function (xhr, status, httpMessage) {
27760
27802
  var
27761
27803
  context = this,
27762
- elapsedTime = (new Date().getTime() - requestStartTime),
27804
+ elapsedTime = (Date.now() - requestStartTime),
27763
27805
  timeLeft = (settings.loadingDuration - elapsedTime)
27764
27806
  ;
27765
27807
  timeLeft = (timeLeft > 0)
@@ -27813,7 +27855,8 @@
27813
27855
  settings.onAbort.call(context, status, $module, xhr);
27814
27856
 
27815
27857
  return true;
27816
- } else if (status == 'invalid') {
27858
+ }
27859
+ if (status == 'invalid') {
27817
27860
  module.debug('JSON did not pass success test. A server-side error has most likely occurred', response);
27818
27861
  } else if (status == 'error') {
27819
27862
  if (xhr !== undefined) {
@@ -27920,7 +27963,7 @@
27920
27963
  loading: function () {
27921
27964
  module.verbose('Adding loading state to element', $context);
27922
27965
  $context.addClass(className.loading);
27923
- requestStartTime = new Date().getTime();
27966
+ requestStartTime = Date.now();
27924
27967
  },
27925
27968
  },
27926
27969
 
@@ -28014,9 +28057,7 @@
28014
28057
  if (!isWindow(element)) {
28015
28058
  if (module.is.input()) {
28016
28059
  data.value = $module.val();
28017
- } else if (module.is.form()) {
28018
-
28019
- } else {
28060
+ } else if (!module.is.form()) {
28020
28061
  data.text = $module.text();
28021
28062
  }
28022
28063
  }
@@ -28028,21 +28069,23 @@
28028
28069
  module.debug('API called without element, no events attached');
28029
28070
 
28030
28071
  return false;
28031
- } else if (settings.on == 'auto') {
28072
+ }
28073
+ if (settings.on == 'auto') {
28032
28074
  if ($module.is('input')) {
28033
28075
  return (element.oninput !== undefined)
28034
28076
  ? 'input'
28035
28077
  : (element.onpropertychange !== undefined)
28036
28078
  ? 'propertychange'
28037
28079
  : 'keyup';
28038
- } else if ($module.is('form')) {
28080
+ }
28081
+ if ($module.is('form')) {
28039
28082
  return 'submit';
28040
- } else {
28041
- return 'click';
28042
28083
  }
28043
- } else {
28044
- return settings.on;
28084
+
28085
+ return 'click';
28045
28086
  }
28087
+
28088
+ return settings.on;
28046
28089
  },
28047
28090
  templatedURL: function (action) {
28048
28091
  action = action || $module.data(metadata.action) || settings.action || false;
@@ -28142,7 +28185,7 @@
28142
28185
  previousTime
28143
28186
  ;
28144
28187
  if (settings.performance) {
28145
- currentTime = new Date().getTime();
28188
+ currentTime = Date.now();
28146
28189
  previousTime = time || currentTime;
28147
28190
  executionTime = currentTime - previousTime;
28148
28191
  time = currentTime;
@@ -28193,8 +28236,8 @@
28193
28236
  ;
28194
28237
  passedArguments = passedArguments || queryArguments;
28195
28238
  context = context || element;
28196
- if (typeof query == 'string' && object !== undefined) {
28197
- query = query.split(/[\. ]/);
28239
+ if (typeof query === 'string' && object !== undefined) {
28240
+ query = query.split(/[ .]/);
28198
28241
  maxDepth = query.length - 1;
28199
28242
  $.each(query, function (depth, value) {
28200
28243
  var camelCaseValue = (depth != maxDepth)
@@ -28254,6 +28297,7 @@
28254
28297
  ? returnedValue
28255
28298
  : this;
28256
28299
  };
28300
+ $.api = $.fn.api;
28257
28301
 
28258
28302
  $.api.settings = {
28259
28303
 
@@ -28379,13 +28423,13 @@
28379
28423
  },
28380
28424
 
28381
28425
  regExp: {
28382
- required: /\{\$*[a-z0-9]+\}/gi,
28383
- optional: /\{\/\$*[a-z0-9]+\}/gi,
28384
- validate: /^[a-z_][a-z0-9_-]*(?:\[[a-z0-9_-]*\])*$/i,
28385
- key: /[a-z0-9_-]+|(?=\[\])/gi,
28426
+ required: /{\$*[\da-z]+}/gi,
28427
+ optional: /{\/\$*[\da-z]+}/gi,
28428
+ validate: /^[_a-z][\w-]*(?:\[[\w-]*])*$/i,
28429
+ key: /[\w-]+|(?=\[])/gi,
28386
28430
  push: /^$/,
28387
28431
  fixed: /^\d+$/,
28388
- named: /^[a-z0-9_-]+$/i,
28432
+ named: /^[\w-]+$/i,
28389
28433
  },
28390
28434
 
28391
28435
  className: {
@@ -28406,7 +28450,7 @@
28406
28450
  })(jQuery, window, document);
28407
28451
 
28408
28452
  /*!
28409
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - State
28453
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - State
28410
28454
  * https://github.com/fomantic/Fomantic-UI/
28411
28455
  *
28412
28456
  *
@@ -28422,7 +28466,7 @@
28422
28466
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
28423
28467
  }
28424
28468
 
28425
- window = (typeof window != 'undefined' && window.Math == Math)
28469
+ window = (window !== undefined && window.Math === Math)
28426
28470
  ? window
28427
28471
  : globalThis;
28428
28472
 
@@ -28432,11 +28476,11 @@
28432
28476
 
28433
28477
  moduleSelector = $allModules.selector || '',
28434
28478
 
28435
- time = new Date().getTime(),
28479
+ time = Date.now(),
28436
28480
  performance = [],
28437
28481
 
28438
28482
  query = arguments[0],
28439
- methodInvoked = (typeof query == 'string'),
28483
+ methodInvoked = (typeof query === 'string'),
28440
28484
  queryArguments = [].slice.call(arguments, 1),
28441
28485
 
28442
28486
  returnedValue
@@ -28871,7 +28915,7 @@
28871
28915
  previousTime
28872
28916
  ;
28873
28917
  if (settings.performance) {
28874
- currentTime = new Date().getTime();
28918
+ currentTime = Date.now();
28875
28919
  previousTime = time || currentTime;
28876
28920
  executionTime = currentTime - previousTime;
28877
28921
  time = currentTime;
@@ -28922,8 +28966,8 @@
28922
28966
  ;
28923
28967
  passedArguments = passedArguments || queryArguments;
28924
28968
  context = context || element;
28925
- if (typeof query == 'string' && object !== undefined) {
28926
- query = query.split(/[\. ]/);
28969
+ if (typeof query === 'string' && object !== undefined) {
28970
+ query = query.split(/[ .]/);
28927
28971
  maxDepth = query.length - 1;
28928
28972
  $.each(query, function (depth, value) {
28929
28973
  var camelCaseValue = (depth != maxDepth)
@@ -29100,7 +29144,7 @@
29100
29144
  })(jQuery, window, document);
29101
29145
 
29102
29146
  /*!
29103
- * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Visibility
29147
+ * # Fomantic-UI 2.9.1-beta.23+27384cb - Visibility
29104
29148
  * https://github.com/fomantic/Fomantic-UI/
29105
29149
  *
29106
29150
  *
@@ -29116,7 +29160,7 @@
29116
29160
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
29117
29161
  }
29118
29162
 
29119
- window = (typeof window != 'undefined' && window.Math == Math)
29163
+ window = (window !== undefined && window.Math === Math)
29120
29164
  ? window
29121
29165
  : globalThis;
29122
29166
 
@@ -29125,11 +29169,11 @@
29125
29169
  $allModules = $(this),
29126
29170
  moduleSelector = $allModules.selector || '',
29127
29171
 
29128
- time = new Date().getTime(),
29172
+ time = Date.now(),
29129
29173
  performance = [],
29130
29174
 
29131
29175
  query = arguments[0],
29132
- methodInvoked = (typeof query == 'string'),
29176
+ methodInvoked = (typeof query === 'string'),
29133
29177
  queryArguments = [].slice.call(arguments, 1),
29134
29178
  returnedValue,
29135
29179
 
@@ -29328,7 +29372,7 @@
29328
29372
  },
29329
29373
 
29330
29374
  precache: function (images, callback) {
29331
- if (!(images instanceof Array)) {
29375
+ if (!(Array.isArray(images))) {
29332
29376
  images = [images];
29333
29377
  }
29334
29378
  var
@@ -30173,7 +30217,7 @@
30173
30217
  previousTime
30174
30218
  ;
30175
30219
  if (settings.performance) {
30176
- currentTime = new Date().getTime();
30220
+ currentTime = Date.now();
30177
30221
  previousTime = time || currentTime;
30178
30222
  executionTime = currentTime - previousTime;
30179
30223
  time = currentTime;
@@ -30224,8 +30268,8 @@
30224
30268
  ;
30225
30269
  passedArguments = passedArguments || queryArguments;
30226
30270
  context = context || element;
30227
- if (typeof query == 'string' && object !== undefined) {
30228
- query = query.split(/[\. ]/);
30271
+ if (typeof query === 'string' && object !== undefined) {
30272
+ query = query.split(/[ .]/);
30229
30273
  maxDepth = query.length - 1;
30230
30274
  $.each(query, function (depth, value) {
30231
30275
  var camelCaseValue = (depth != maxDepth)