rails-active-ui 0.3.0 → 0.3.2

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 (197) hide show
  1. checksums.yaml +4 -4
  2. data/app/javascript/ui/controllers/turbo_modal_controller.js +36 -0
  3. data/config/importmap.rb +1 -0
  4. data/formantic-ui/components/accordion.css +369 -0
  5. data/formantic-ui/components/accordion.js +595 -0
  6. data/formantic-ui/components/accordion.min.css +9 -0
  7. data/formantic-ui/components/accordion.min.js +11 -0
  8. data/formantic-ui/components/ad.css +264 -0
  9. data/formantic-ui/components/ad.min.css +10 -0
  10. data/formantic-ui/components/api.js +1225 -0
  11. data/formantic-ui/components/api.min.js +11 -0
  12. data/formantic-ui/components/breadcrumb.css +135 -0
  13. data/formantic-ui/components/breadcrumb.min.css +9 -0
  14. data/formantic-ui/components/button.css +4058 -0
  15. data/formantic-ui/components/button.min.css +9 -0
  16. data/formantic-ui/components/calendar.css +327 -0
  17. data/formantic-ui/components/calendar.js +2045 -0
  18. data/formantic-ui/components/calendar.min.css +9 -0
  19. data/formantic-ui/components/calendar.min.js +11 -0
  20. data/formantic-ui/components/card.css +1881 -0
  21. data/formantic-ui/components/card.min.css +9 -0
  22. data/formantic-ui/components/checkbox.css +785 -0
  23. data/formantic-ui/components/checkbox.js +888 -0
  24. data/formantic-ui/components/checkbox.min.css +9 -0
  25. data/formantic-ui/components/checkbox.min.js +11 -0
  26. data/formantic-ui/components/comment.css +283 -0
  27. data/formantic-ui/components/comment.min.css +9 -0
  28. data/formantic-ui/components/container.css +300 -0
  29. data/formantic-ui/components/container.min.css +9 -0
  30. data/formantic-ui/components/dimmer.css +367 -0
  31. data/formantic-ui/components/dimmer.js +732 -0
  32. data/formantic-ui/components/dimmer.min.css +9 -0
  33. data/formantic-ui/components/dimmer.min.js +11 -0
  34. data/formantic-ui/components/divider.css +287 -0
  35. data/formantic-ui/components/divider.min.css +9 -0
  36. data/formantic-ui/components/dropdown.css +2087 -0
  37. data/formantic-ui/components/dropdown.js +4432 -0
  38. data/formantic-ui/components/dropdown.min.css +9 -0
  39. data/formantic-ui/components/dropdown.min.js +11 -0
  40. data/formantic-ui/components/embed.css +155 -0
  41. data/formantic-ui/components/embed.js +688 -0
  42. data/formantic-ui/components/embed.min.css +9 -0
  43. data/formantic-ui/components/embed.min.js +11 -0
  44. data/formantic-ui/components/emoji.css +15311 -0
  45. data/formantic-ui/components/emoji.min.css +9 -0
  46. data/formantic-ui/components/feed.css +799 -0
  47. data/formantic-ui/components/feed.min.css +9 -0
  48. data/formantic-ui/components/flag.css +1149 -0
  49. data/formantic-ui/components/flag.min.css +9 -0
  50. data/formantic-ui/components/flyout.css +546 -0
  51. data/formantic-ui/components/flyout.js +1551 -0
  52. data/formantic-ui/components/flyout.min.css +9 -0
  53. data/formantic-ui/components/flyout.min.js +11 -0
  54. data/formantic-ui/components/form.css +1885 -0
  55. data/formantic-ui/components/form.js +2199 -0
  56. data/formantic-ui/components/form.min.css +9 -0
  57. data/formantic-ui/components/form.min.js +11 -0
  58. data/formantic-ui/components/grid.css +1952 -0
  59. data/formantic-ui/components/grid.min.css +9 -0
  60. data/formantic-ui/components/header.css +778 -0
  61. data/formantic-ui/components/header.min.css +9 -0
  62. data/formantic-ui/components/icon.css +7066 -0
  63. data/formantic-ui/components/icon.min.css +9 -0
  64. data/formantic-ui/components/image.css +315 -0
  65. data/formantic-ui/components/image.min.css +9 -0
  66. data/formantic-ui/components/input.css +1566 -0
  67. data/formantic-ui/components/input.min.css +9 -0
  68. data/formantic-ui/components/item.css +534 -0
  69. data/formantic-ui/components/item.min.css +9 -0
  70. data/formantic-ui/components/label.css +2114 -0
  71. data/formantic-ui/components/label.min.css +9 -0
  72. data/formantic-ui/components/list.css +955 -0
  73. data/formantic-ui/components/list.min.css +9 -0
  74. data/formantic-ui/components/loader.css +787 -0
  75. data/formantic-ui/components/loader.min.css +9 -0
  76. data/formantic-ui/components/menu.css +2131 -0
  77. data/formantic-ui/components/menu.min.css +9 -0
  78. data/formantic-ui/components/message.css +619 -0
  79. data/formantic-ui/components/message.min.css +9 -0
  80. data/formantic-ui/components/modal.css +779 -0
  81. data/formantic-ui/components/modal.js +1637 -0
  82. data/formantic-ui/components/modal.min.css +9 -0
  83. data/formantic-ui/components/modal.min.js +11 -0
  84. data/formantic-ui/components/nag.css +290 -0
  85. data/formantic-ui/components/nag.js +566 -0
  86. data/formantic-ui/components/nag.min.css +9 -0
  87. data/formantic-ui/components/nag.min.js +11 -0
  88. data/formantic-ui/components/placeholder.css +228 -0
  89. data/formantic-ui/components/placeholder.min.css +9 -0
  90. data/formantic-ui/components/popup.css +1184 -0
  91. data/formantic-ui/components/popup.js +1561 -0
  92. data/formantic-ui/components/popup.min.css +9 -0
  93. data/formantic-ui/components/popup.min.js +11 -0
  94. data/formantic-ui/components/progress.css +761 -0
  95. data/formantic-ui/components/progress.js +979 -0
  96. data/formantic-ui/components/progress.min.css +9 -0
  97. data/formantic-ui/components/progress.min.js +11 -0
  98. data/formantic-ui/components/rail.css +147 -0
  99. data/formantic-ui/components/rail.min.css +9 -0
  100. data/formantic-ui/components/rating.css +414 -0
  101. data/formantic-ui/components/rating.js +540 -0
  102. data/formantic-ui/components/rating.min.css +9 -0
  103. data/formantic-ui/components/rating.min.js +11 -0
  104. data/formantic-ui/components/reset.css +386 -0
  105. data/formantic-ui/components/reset.min.css +9 -0
  106. data/formantic-ui/components/reveal.css +277 -0
  107. data/formantic-ui/components/reveal.min.css +9 -0
  108. data/formantic-ui/components/search.css +541 -0
  109. data/formantic-ui/components/search.js +1641 -0
  110. data/formantic-ui/components/search.min.css +9 -0
  111. data/formantic-ui/components/search.min.js +11 -0
  112. data/formantic-ui/components/segment.css +1053 -0
  113. data/formantic-ui/components/segment.min.css +9 -0
  114. data/formantic-ui/components/shape.css +144 -0
  115. data/formantic-ui/components/shape.js +797 -0
  116. data/formantic-ui/components/shape.min.css +9 -0
  117. data/formantic-ui/components/shape.min.js +11 -0
  118. data/formantic-ui/components/sidebar.css +539 -0
  119. data/formantic-ui/components/sidebar.js +1054 -0
  120. data/formantic-ui/components/sidebar.min.css +9 -0
  121. data/formantic-ui/components/sidebar.min.js +11 -0
  122. data/formantic-ui/components/site.css +286 -0
  123. data/formantic-ui/components/site.js +455 -0
  124. data/formantic-ui/components/site.min.css +9 -0
  125. data/formantic-ui/components/site.min.js +11 -0
  126. data/formantic-ui/components/slider.css +926 -0
  127. data/formantic-ui/components/slider.js +1546 -0
  128. data/formantic-ui/components/slider.min.css +9 -0
  129. data/formantic-ui/components/slider.min.js +11 -0
  130. data/formantic-ui/components/state.js +697 -0
  131. data/formantic-ui/components/state.min.js +11 -0
  132. data/formantic-ui/components/statistic.css +586 -0
  133. data/formantic-ui/components/statistic.min.css +9 -0
  134. data/formantic-ui/components/step.css +1538 -0
  135. data/formantic-ui/components/step.min.css +9 -0
  136. data/formantic-ui/components/sticky.css +73 -0
  137. data/formantic-ui/components/sticky.js +917 -0
  138. data/formantic-ui/components/sticky.min.css +9 -0
  139. data/formantic-ui/components/sticky.min.js +11 -0
  140. data/formantic-ui/components/tab.css +84 -0
  141. data/formantic-ui/components/tab.js +967 -0
  142. data/formantic-ui/components/tab.min.css +9 -0
  143. data/formantic-ui/components/tab.min.js +11 -0
  144. data/formantic-ui/components/table.css +3473 -0
  145. data/formantic-ui/components/table.min.css +9 -0
  146. data/formantic-ui/components/text.css +155 -0
  147. data/formantic-ui/components/text.min.css +9 -0
  148. data/formantic-ui/components/toast.css +751 -0
  149. data/formantic-ui/components/toast.js +964 -0
  150. data/formantic-ui/components/toast.min.css +9 -0
  151. data/formantic-ui/components/toast.min.js +11 -0
  152. data/formantic-ui/components/transition.css +1148 -0
  153. data/formantic-ui/components/transition.js +1034 -0
  154. data/formantic-ui/components/transition.min.css +9 -0
  155. data/formantic-ui/components/transition.min.js +11 -0
  156. data/formantic-ui/components/visibility.js +1292 -0
  157. data/formantic-ui/components/visibility.min.js +11 -0
  158. data/formantic-ui/semantic.css +78485 -0
  159. data/formantic-ui/semantic.js +31036 -0
  160. data/formantic-ui/semantic.min.css +11 -0
  161. data/formantic-ui/semantic.min.js +11 -0
  162. data/formantic-ui/themes/basic/assets/fonts/LICENSE.txt +91 -0
  163. data/formantic-ui/themes/basic/assets/fonts/icons.woff +0 -0
  164. data/formantic-ui/themes/basic/assets/fonts/icons.woff2 +0 -0
  165. data/formantic-ui/themes/default/assets/fonts/LICENSE_Lato.txt +94 -0
  166. data/formantic-ui/themes/default/assets/fonts/LICENSE_icons.txt +165 -0
  167. data/formantic-ui/themes/default/assets/fonts/Lato-Bold.woff +0 -0
  168. data/formantic-ui/themes/default/assets/fonts/Lato-Bold.woff2 +0 -0
  169. data/formantic-ui/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
  170. data/formantic-ui/themes/default/assets/fonts/Lato-BoldItalic.woff2 +0 -0
  171. data/formantic-ui/themes/default/assets/fonts/Lato-Italic.woff +0 -0
  172. data/formantic-ui/themes/default/assets/fonts/Lato-Italic.woff2 +0 -0
  173. data/formantic-ui/themes/default/assets/fonts/Lato-Regular.woff +0 -0
  174. data/formantic-ui/themes/default/assets/fonts/Lato-Regular.woff2 +0 -0
  175. data/formantic-ui/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
  176. data/formantic-ui/themes/default/assets/fonts/LatoLatin-Bold.woff2 +0 -0
  177. data/formantic-ui/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
  178. data/formantic-ui/themes/default/assets/fonts/LatoLatin-BoldItalic.woff2 +0 -0
  179. data/formantic-ui/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
  180. data/formantic-ui/themes/default/assets/fonts/LatoLatin-Italic.woff2 +0 -0
  181. data/formantic-ui/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
  182. data/formantic-ui/themes/default/assets/fonts/LatoLatin-Regular.woff2 +0 -0
  183. data/formantic-ui/themes/default/assets/fonts/brand-icons.woff +0 -0
  184. data/formantic-ui/themes/default/assets/fonts/brand-icons.woff2 +0 -0
  185. data/formantic-ui/themes/default/assets/fonts/icons.woff +0 -0
  186. data/formantic-ui/themes/default/assets/fonts/icons.woff2 +0 -0
  187. data/formantic-ui/themes/default/assets/fonts/outline-icons.woff +0 -0
  188. data/formantic-ui/themes/default/assets/fonts/outline-icons.woff2 +0 -0
  189. data/formantic-ui/themes/famfamfam/assets/images/flags.png +0 -0
  190. data/formantic-ui/themes/github/assets/fonts/LICENSE.txt +94 -0
  191. data/formantic-ui/themes/github/assets/fonts/octicons.woff +0 -0
  192. data/formantic-ui/themes/github/assets/fonts/octicons.woff2 +0 -0
  193. data/formantic-ui/themes/material/assets/fonts/LICENSE.txt +202 -0
  194. data/formantic-ui/themes/material/assets/fonts/icons.woff +0 -0
  195. data/formantic-ui/themes/material/assets/fonts/icons.woff2 +0 -0
  196. data/lib/ui/version.rb +1 -1
  197. metadata +194 -1
@@ -0,0 +1,566 @@
1
+ /*!
2
+ * # Fomantic-UI 2.9.4 - Nag
3
+ * https://github.com/fomantic/Fomantic-UI/
4
+ *
5
+ *
6
+ * Released under the MIT license
7
+ * https://opensource.org/licenses/MIT
8
+ *
9
+ */
10
+
11
+ (function ($, window, document) {
12
+ 'use strict';
13
+
14
+ function isFunction(obj) {
15
+ return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
+ }
17
+
18
+ window = window !== undefined && window.Math === Math
19
+ ? window
20
+ : globalThis;
21
+
22
+ $.fn.nag = function (parameters) {
23
+ var
24
+ $allModules = $(this),
25
+ $body = $('body'),
26
+
27
+ time = Date.now(),
28
+ performance = [],
29
+
30
+ query = arguments[0],
31
+ methodInvoked = typeof query === 'string',
32
+ queryArguments = [].slice.call(arguments, 1),
33
+ contextCheck = function (context, win) {
34
+ var $context;
35
+ if ([window, document].indexOf(context) >= 0) {
36
+ $context = $(context);
37
+ } else {
38
+ $context = $(win.document).find(context);
39
+ if ($context.length === 0) {
40
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
41
+ }
42
+ }
43
+
44
+ return $context;
45
+ },
46
+ returnedValue
47
+ ;
48
+ $allModules.each(function () {
49
+ var
50
+ settings = $.isPlainObject(parameters)
51
+ ? $.extend(true, {}, $.fn.nag.settings, parameters)
52
+ : $.extend({}, $.fn.nag.settings),
53
+
54
+ selector = settings.selector,
55
+ error = settings.error,
56
+ namespace = settings.namespace,
57
+
58
+ eventNamespace = '.' + namespace,
59
+ moduleNamespace = namespace + '-module',
60
+
61
+ $module = $(this),
62
+
63
+ $context = settings.context ? contextCheck(settings.context, window) : $body,
64
+
65
+ element = this,
66
+ instance = $module.data(moduleNamespace),
67
+ storage,
68
+ module
69
+ ;
70
+ module = {
71
+
72
+ initialize: function () {
73
+ module.verbose('Initializing element');
74
+ if (typeof settings.value !== 'string') {
75
+ settings.value = JSON.stringify(settings.value);
76
+ }
77
+ storage = module.get.storage();
78
+ $module
79
+ .on('click' + eventNamespace, selector.close, module.dismiss)
80
+ .data(moduleNamespace, module)
81
+ ;
82
+
83
+ if (settings.detachable && $module.parent()[0] !== $context[0]) {
84
+ $module
85
+ .detach()
86
+ .prependTo($context)
87
+ ;
88
+ }
89
+
90
+ if (settings.displayTime > 0) {
91
+ setTimeout(function () {
92
+ module.hide();
93
+ }, settings.displayTime);
94
+ }
95
+ module.show();
96
+ },
97
+
98
+ destroy: function () {
99
+ module.verbose('Destroying instance');
100
+ $module
101
+ .removeData(moduleNamespace)
102
+ .off(eventNamespace)
103
+ ;
104
+ },
105
+
106
+ show: function () {
107
+ if (module.should.show() && !$module.is(':visible')) {
108
+ if (settings.onShow.call(element) === false) {
109
+ module.debug('onShow callback returned false, cancelling nag animation');
110
+
111
+ return false;
112
+ }
113
+ module.debug('Showing nag', settings.animation.show);
114
+ if (settings.animation.show === 'fade') {
115
+ $module
116
+ .fadeIn(settings.duration, settings.easing, settings.onVisible)
117
+ ;
118
+ } else {
119
+ $module
120
+ .slideDown(settings.duration, settings.easing, settings.onVisible)
121
+ ;
122
+ }
123
+ }
124
+ },
125
+
126
+ hide: function () {
127
+ if (settings.onHide.call(element) === false) {
128
+ module.debug('onHide callback returned false, cancelling nag animation');
129
+
130
+ return false;
131
+ }
132
+ module.debug('Hiding nag', settings.animation.hide);
133
+ if (settings.animation.hide === 'fade') {
134
+ $module
135
+ .fadeOut(settings.duration, settings.easing, settings.onHidden)
136
+ ;
137
+ } else {
138
+ $module
139
+ .slideUp(settings.duration, settings.easing, settings.onHidden)
140
+ ;
141
+ }
142
+ },
143
+
144
+ dismiss: function (event) {
145
+ if (module.hide() !== false && settings.storageMethod) {
146
+ module.debug('Dismissing nag', settings.storageMethod, settings.key, settings.value, settings.expires);
147
+ module.storage.set(settings.key, settings.value);
148
+ }
149
+ if (event) {
150
+ event.stopImmediatePropagation();
151
+ event.preventDefault();
152
+ }
153
+ },
154
+
155
+ should: {
156
+ show: function () {
157
+ if (settings.persist) {
158
+ module.debug('Persistent nag is set, can show nag');
159
+
160
+ return true;
161
+ }
162
+ if (module.storage.get(settings.key) != settings.value.toString()) {
163
+ module.debug('Stored value is not set, can show nag', module.storage.get(settings.key));
164
+
165
+ return true;
166
+ }
167
+ module.debug('Stored value is set, cannot show nag', module.storage.get(settings.key));
168
+
169
+ return false;
170
+ },
171
+ },
172
+
173
+ get: {
174
+ expirationDate: function (expires) {
175
+ if (typeof expires === 'number') {
176
+ expires = new Date(Date.now() + expires * 864e5);
177
+ }
178
+ if (expires instanceof Date && expires.getTime()) {
179
+ return expires.toUTCString();
180
+ }
181
+
182
+ module.error(error.expiresFormat);
183
+ },
184
+ storage: function () {
185
+ if (settings.storageMethod === 'localstorage' && window.localStorage !== undefined) {
186
+ module.debug('Using local storage');
187
+
188
+ return window.localStorage;
189
+ }
190
+ if (settings.storageMethod === 'sessionstorage' && window.sessionStorage !== undefined) {
191
+ module.debug('Using session storage');
192
+
193
+ return window.sessionStorage;
194
+ }
195
+ if ('cookie' in document) {
196
+ module.debug('Using cookie');
197
+
198
+ return {
199
+ setItem: function (key, value, options) {
200
+ // RFC6265 compliant encoding
201
+ key = encodeURIComponent(key)
202
+ .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
203
+ .replace(/[()]/g, escape)
204
+ ;
205
+ value = encodeURIComponent(value)
206
+ .replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g, decodeURIComponent)
207
+ ;
208
+
209
+ var cookieOptions = '';
210
+ for (var option in options) {
211
+ if (Object.prototype.hasOwnProperty.call(options, option)) {
212
+ cookieOptions += '; ' + option;
213
+ if (typeof options[option] === 'string') {
214
+ cookieOptions += '=' + options[option].split(';')[0];
215
+ }
216
+ }
217
+ }
218
+ document.cookie = key + '=' + value + cookieOptions;
219
+ },
220
+ getItem: function (key) {
221
+ var cookies = document.cookie.split('; ');
222
+ for (var i = 0, il = cookies.length; i < il; i++) {
223
+ var
224
+ parts = cookies[i].split('='),
225
+ foundKey = parts[0].replace(/(%[\da-f]{2})+/gi, decodeURIComponent)
226
+ ;
227
+ if (key === foundKey) {
228
+ return parts[1] || '';
229
+ }
230
+ }
231
+ },
232
+ removeItem: function (key, options) {
233
+ storage.setItem(key, '', options);
234
+ },
235
+ };
236
+ }
237
+
238
+ module.error(error.noStorage);
239
+ },
240
+ storageOptions: function () {
241
+ var
242
+ options = {}
243
+ ;
244
+ if (settings.expires) {
245
+ options.expires = module.get.expirationDate(settings.expires);
246
+ }
247
+ if (settings.domain) {
248
+ options.domain = settings.domain;
249
+ }
250
+ if (settings.path) {
251
+ options.path = settings.path;
252
+ }
253
+ if (settings.secure) {
254
+ options.secure = settings.secure;
255
+ }
256
+ if (settings.samesite) {
257
+ options.samesite = settings.samesite;
258
+ }
259
+
260
+ return options;
261
+ },
262
+ },
263
+
264
+ clear: function () {
265
+ module.storage.remove(settings.key);
266
+ },
267
+
268
+ storage: {
269
+ set: function (key, value) {
270
+ var
271
+ options = module.get.storageOptions()
272
+ ;
273
+ if (storage === window.localStorage && options.expires) {
274
+ module.debug('Storing expiration value in localStorage', key, options.expires);
275
+ storage.setItem(key + settings.expirationKey, options.expires);
276
+ }
277
+ module.debug('Value stored', key, value);
278
+ try {
279
+ storage.setItem(key, value, options);
280
+ } catch (e) {
281
+ module.error(error.setItem, e);
282
+ }
283
+ },
284
+ get: function (key) {
285
+ var
286
+ storedValue
287
+ ;
288
+ storedValue = storage.getItem(key);
289
+ if (storage === window.localStorage) {
290
+ var expiration = storage.getItem(key + settings.expirationKey);
291
+ if (expiration !== null && expiration !== undefined && new Date(expiration) < new Date()) {
292
+ module.debug('Value in localStorage has expired. Deleting key', key);
293
+ module.storage.remove(key);
294
+ storedValue = null;
295
+ }
296
+ }
297
+ if (storedValue === 'undefined' || storedValue === 'null' || storedValue === undefined || storedValue === null) {
298
+ storedValue = undefined;
299
+ }
300
+
301
+ return storedValue;
302
+ },
303
+ remove: function (key) {
304
+ var
305
+ options = module.get.storageOptions()
306
+ ;
307
+ options.expires = module.get.expirationDate(-1);
308
+ if (storage === window.localStorage) {
309
+ storage.removeItem(key + settings.expirationKey);
310
+ }
311
+ storage.removeItem(key, options);
312
+ },
313
+ },
314
+
315
+ setting: function (name, value) {
316
+ module.debug('Changing setting', name, value);
317
+ if ($.isPlainObject(name)) {
318
+ $.extend(true, settings, name);
319
+ } else if (value !== undefined) {
320
+ if ($.isPlainObject(settings[name])) {
321
+ $.extend(true, settings[name], value);
322
+ } else {
323
+ settings[name] = value;
324
+ }
325
+ } else {
326
+ return settings[name];
327
+ }
328
+ },
329
+ internal: function (name, value) {
330
+ if ($.isPlainObject(name)) {
331
+ $.extend(true, module, name);
332
+ } else if (value !== undefined) {
333
+ module[name] = value;
334
+ } else {
335
+ return module[name];
336
+ }
337
+ },
338
+ debug: function () {
339
+ if (!settings.silent && settings.debug) {
340
+ if (settings.performance) {
341
+ module.performance.log(arguments);
342
+ } else {
343
+ module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
344
+ module.debug.apply(console, arguments);
345
+ }
346
+ }
347
+ },
348
+ verbose: function () {
349
+ if (!settings.silent && settings.verbose && settings.debug) {
350
+ if (settings.performance) {
351
+ module.performance.log(arguments);
352
+ } else {
353
+ module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
354
+ module.verbose.apply(console, arguments);
355
+ }
356
+ }
357
+ },
358
+ error: function () {
359
+ if (!settings.silent) {
360
+ module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
361
+ module.error.apply(console, arguments);
362
+ }
363
+ },
364
+ performance: {
365
+ log: function (message) {
366
+ var
367
+ currentTime,
368
+ executionTime,
369
+ previousTime
370
+ ;
371
+ if (settings.performance) {
372
+ currentTime = Date.now();
373
+ previousTime = time || currentTime;
374
+ executionTime = currentTime - previousTime;
375
+ time = currentTime;
376
+ performance.push({
377
+ Name: message[0],
378
+ Arguments: [].slice.call(message, 1) || '',
379
+ Element: element,
380
+ 'Execution Time': executionTime,
381
+ });
382
+ }
383
+ clearTimeout(module.performance.timer);
384
+ module.performance.timer = setTimeout(function () {
385
+ module.performance.display();
386
+ }, 500);
387
+ },
388
+ display: function () {
389
+ var
390
+ title = settings.name + ':',
391
+ totalTime = 0
392
+ ;
393
+ time = false;
394
+ clearTimeout(module.performance.timer);
395
+ $.each(performance, function (index, data) {
396
+ totalTime += data['Execution Time'];
397
+ });
398
+ title += ' ' + totalTime + 'ms';
399
+ if (performance.length > 0) {
400
+ console.groupCollapsed(title);
401
+ if (console.table) {
402
+ console.table(performance);
403
+ } else {
404
+ $.each(performance, function (index, data) {
405
+ console.log(data.Name + ': ' + data['Execution Time'] + 'ms');
406
+ });
407
+ }
408
+ console.groupEnd();
409
+ }
410
+ performance = [];
411
+ },
412
+ },
413
+ invoke: function (query, passedArguments, context) {
414
+ var
415
+ object = instance,
416
+ maxDepth,
417
+ found,
418
+ response
419
+ ;
420
+ passedArguments = passedArguments || queryArguments;
421
+ context = context || element;
422
+ if (typeof query === 'string' && object !== undefined) {
423
+ query = query.split(/[ .]/);
424
+ maxDepth = query.length - 1;
425
+ $.each(query, function (depth, value) {
426
+ var camelCaseValue = depth !== maxDepth
427
+ ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
428
+ : query
429
+ ;
430
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
431
+ object = object[camelCaseValue];
432
+ } else if (object[camelCaseValue] !== undefined) {
433
+ found = object[camelCaseValue];
434
+
435
+ return false;
436
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
437
+ object = object[value];
438
+ } else if (object[value] !== undefined) {
439
+ found = object[value];
440
+
441
+ return false;
442
+ } else {
443
+ module.error(error.method, query);
444
+
445
+ return false;
446
+ }
447
+ });
448
+ }
449
+ if (isFunction(found)) {
450
+ response = found.apply(context, passedArguments);
451
+ } else if (found !== undefined) {
452
+ response = found;
453
+ }
454
+ if (Array.isArray(returnedValue)) {
455
+ returnedValue.push(response);
456
+ } else if (returnedValue !== undefined) {
457
+ returnedValue = [returnedValue, response];
458
+ } else if (response !== undefined) {
459
+ returnedValue = response;
460
+ }
461
+
462
+ return found;
463
+ },
464
+ };
465
+
466
+ if (methodInvoked) {
467
+ if (instance === undefined) {
468
+ module.initialize();
469
+ }
470
+ module.invoke(query);
471
+ } else {
472
+ if (instance !== undefined) {
473
+ instance.invoke('destroy');
474
+ }
475
+ module.initialize();
476
+ }
477
+ });
478
+
479
+ return returnedValue !== undefined
480
+ ? returnedValue
481
+ : this;
482
+ };
483
+
484
+ $.fn.nag.settings = {
485
+
486
+ name: 'Nag',
487
+
488
+ silent: false,
489
+ debug: false,
490
+ verbose: false,
491
+ performance: true,
492
+
493
+ namespace: 'Nag',
494
+
495
+ // allows cookie to be overridden
496
+ persist: false,
497
+
498
+ // set to zero to require manually dismissal, otherwise hides on its own
499
+ displayTime: 0,
500
+
501
+ animation: {
502
+ show: 'slide',
503
+ hide: 'slide',
504
+ },
505
+
506
+ context: false,
507
+ detachable: false,
508
+
509
+ expires: 30,
510
+
511
+ // cookie storage only options
512
+ domain: false,
513
+ path: '/',
514
+ secure: false,
515
+ samesite: false,
516
+
517
+ // type of storage to use
518
+ storageMethod: 'cookie',
519
+
520
+ // value to store in dismissed localstorage/cookie
521
+ key: 'nag',
522
+ value: 'dismiss',
523
+
524
+ // Key suffix to support expiration in localstorage
525
+ expirationKey: 'ExpirationDate',
526
+
527
+ error: {
528
+ noStorage: 'Unsupported storage method',
529
+ method: 'The method you called is not defined.',
530
+ setItem: 'Unexpected error while setting value',
531
+ expiresFormat: '"expires" must be a number of days or a Date Object',
532
+ },
533
+
534
+ className: {
535
+ bottom: 'bottom',
536
+ fixed: 'fixed',
537
+ },
538
+
539
+ selector: {
540
+ close: '> .close.icon',
541
+ },
542
+
543
+ duration: 500,
544
+ easing: 'easeOutQuad',
545
+
546
+ // callback before show animation, return false to prevent show
547
+ onShow: function () {},
548
+
549
+ // called after show animation
550
+ onVisible: function () {},
551
+
552
+ // callback before hide animation, return false to prevent hide
553
+ onHide: function () {},
554
+
555
+ // callback after hide animation
556
+ onHidden: function () {},
557
+
558
+ };
559
+
560
+ // Adds easing
561
+ $.extend($.easing, {
562
+ easeOutQuad: function (x) {
563
+ return 1 - (1 - x) * (1 - x);
564
+ },
565
+ });
566
+ })(jQuery, window, document);
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * # Fomantic-UI 2.9.4 - Nag
3
+ * https://github.com/fomantic/Fomantic-UI/
4
+ *
5
+ *
6
+ * Released under the MIT license
7
+ * https://opensource.org/licenses/MIT
8
+ *
9
+ */.ui.nag{display:none;opacity:.95;position:relative;top:0;left:0;z-index:999;min-height:0;width:100%;margin:0;padding:.75em 1em;background:#909090;box-shadow:0 1px 2px 0 rgba(0,0,0,.2);font-size:1rem;text-align:center;color:rgba(0,0,0,.87);border-radius:0 0 .28571429rem .28571429rem;transition:.2s background ease}a.ui.nag{cursor:pointer}.ui.nag>.title{display:inline-block;margin:0 .5em;color:#fff}.ui.nag>.close.icon{cursor:pointer;opacity:.4;position:absolute;top:50%;right:1em;font-size:1em;margin:-.5em 0 0;color:#fff;transition:opacity .2s ease}.ui.nag:not(.overlay):not(.fixed){border-radius:.28571429rem}.ui.nag:hover{background:#909090;opacity:1}.ui.nag>.close:hover{opacity:1}.ui.overlay.nag,.ui.overlay.nags{position:absolute}.ui.fixed.nag,.ui.fixed.nags{position:fixed}.ui.bottom.nag,.ui.bottom.nags{border-radius:.28571429rem .28571429rem 0 0;top:auto;bottom:0}.ui.inverted.nag,.ui.inverted.nags .nag{background-color:#f3f4f5;color:rgba(0,0,0,.85)}.ui.inverted.nag>.close,.ui.inverted.nags .nag>.close{color:rgba(0,0,0,.6)}.ui.inverted.nag>.title,.ui.inverted.nags .nag>.title{color:rgba(0,0,0,.6)}.ui.mini.nag,.ui.mini.nags .nag{font-size:.78571429rem}.ui.tiny.nag,.ui.tiny.nags .nag{font-size:.85714286rem}.ui.small.nag,.ui.small.nags .nag{font-size:.92857143rem}.ui.large.nag,.ui.large.nags .nag{font-size:1.14285714rem}.ui.big.nag,.ui.big.nags .nag{font-size:1.28571429rem}.ui.huge.nag,.ui.huge.nags .nag{font-size:1.42857143rem;line-height:1}.ui.massive.nag,.ui.massive.nags .nag{font-size:1.71428571rem;line-height:1}.ui.primary.nag{background-color:#2185d0}.ui.inverted.primary.nag{background-color:#54c8ff}.ui.secondary.nag{background-color:#1b1c1d}.ui.inverted.secondary.nag{background-color:#545454}.ui.red.nag{background-color:#db2828}.ui.inverted.red.nag{background-color:#ff695e}.ui.orange.nag{background-color:#f2711c}.ui.inverted.orange.nag{background-color:#ff851b}.ui.yellow.nag{background-color:#fbbd08}.ui.inverted.yellow.nag{background-color:#ffe21f}.ui.olive.nag{background-color:#b5cc18}.ui.inverted.olive.nag{background-color:#d9e778}.ui.green.nag{background-color:#21ba45}.ui.inverted.green.nag{background-color:#2ecc40}.ui.teal.nag{background-color:#00b5ad}.ui.inverted.teal.nag{background-color:#6dffff}.ui.blue.nag{background-color:#2185d0}.ui.inverted.blue.nag{background-color:#54c8ff}.ui.violet.nag{background-color:#6435c9}.ui.inverted.violet.nag{background-color:#a291fb}.ui.purple.nag{background-color:#a333c8}.ui.inverted.purple.nag{background-color:#dc73ff}.ui.pink.nag{background-color:#e03997}.ui.inverted.pink.nag{background-color:#ff8edf}.ui.brown.nag{background-color:#a5673f}.ui.inverted.brown.nag{background-color:#d67c1c}.ui.grey.nag{background-color:#767676}.ui.inverted.grey.nag{background-color:#dcddde}.ui.black.nag{background-color:#1b1c1d;color:rgba(255,255,255,.9)}.ui.inverted.black.nag{background-color:#545454}.ui.inverted.black.nag .title{color:#fff}.ui.nags{top:0;left:0;width:100%}.ui.ui.nags .nag{border-radius:0}.ui.nags:not(.bottom) .nag:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.bottom.nags .nag:first-child{border-radius:.28571429rem .28571429rem 0 0}.ui.nags:not(.fixed):not(.overlay) .nag:first-child{border-radius:.28571429rem .28571429rem 0 0}.ui.nags:not(.fixed):not(.overlay) .nag:only-child{border-radius:.28571429rem}
@@ -0,0 +1,11 @@
1
+ /*
2
+ * # Fomantic UI - 2.9.4
3
+ * https://github.com/fomantic/Fomantic-UI
4
+ * https://fomantic-ui.com/
5
+ *
6
+ * Copyright 2025 Contributors
7
+ * Released under the MIT license
8
+ * https://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+ !function(w,S,D){"use strict";S=void 0!==S&&S.Math===Math?S:globalThis,w.fn.nag=function(g){var p,e=w(this),m=w("body"),f=Date.now(),h=[],v=g,b="string"==typeof v,y=[].slice.call(arguments,1),x=function(e,n){var o;return 0<=[S,D].indexOf(e)?o=w(e):0===(o=w(n.document).find(e)).length&&(o=n.frameElement?x(e,n.parent):m),o};return e.each(function(){var t,i=w.isPlainObject(g)?w.extend(!0,{},w.fn.nag.settings,g):w.extend({},w.fn.nag.settings),e=i.selector,c=i.error,n=i.namespace,o="."+n,a=n+"-module",r=w(this),s=i.context?x(i.context,S):m,l=this,d=r.data(a),u={initialize:function(){u.verbose("Initializing element"),"string"!=typeof i.value&&(i.value=JSON.stringify(i.value)),t=u.get.storage(),r.on("click"+o,e.close,u.dismiss).data(a,u),i.detachable&&r.parent()[0]!==s[0]&&r.detach().prependTo(s),0<i.displayTime&&setTimeout(function(){u.hide()},i.displayTime),u.show()},destroy:function(){u.verbose("Destroying instance"),r.removeData(a).off(o)},show:function(){if(u.should.show()&&!r.is(":visible")){if(!1===i.onShow.call(l))return u.debug("onShow callback returned false, cancelling nag animation"),!1;u.debug("Showing nag",i.animation.show),"fade"===i.animation.show?r.fadeIn(i.duration,i.easing,i.onVisible):r.slideDown(i.duration,i.easing,i.onVisible)}},hide:function(){if(!1===i.onHide.call(l))return u.debug("onHide callback returned false, cancelling nag animation"),!1;u.debug("Hiding nag",i.animation.hide),"fade"===i.animation.hide?r.fadeOut(i.duration,i.easing,i.onHidden):r.slideUp(i.duration,i.easing,i.onHidden)},dismiss:function(e){!1!==u.hide()&&i.storageMethod&&(u.debug("Dismissing nag",i.storageMethod,i.key,i.value,i.expires),u.storage.set(i.key,i.value)),e&&(e.stopImmediatePropagation(),e.preventDefault())},should:{show:function(){return i.persist?(u.debug("Persistent nag is set, can show nag"),!0):u.storage.get(i.key)!=i.value.toString()?(u.debug("Stored value is not set, can show nag",u.storage.get(i.key)),!0):(u.debug("Stored value is set, cannot show nag",u.storage.get(i.key)),!1)}},get:{expirationDate:function(e){if((e="number"==typeof e?new Date(Date.now()+864e5*e):e)instanceof Date&&e.getTime())return e.toUTCString();u.error(c.expiresFormat)},storage:function(){return"localstorage"===i.storageMethod&&void 0!==S.localStorage?(u.debug("Using local storage"),S.localStorage):"sessionstorage"===i.storageMethod&&void 0!==S.sessionStorage?(u.debug("Using session storage"),S.sessionStorage):"cookie"in D?(u.debug("Using cookie"),{setItem:function(e,n,o){e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),n=encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g,decodeURIComponent);var t,i="";for(t in o)Object.prototype.hasOwnProperty.call(o,t)&&(i+="; "+t,"string"==typeof o[t]&&(i+="="+o[t].split(";")[0]));D.cookie=e+"="+n+i},getItem:function(e){for(var n=D.cookie.split("; "),o=0,t=n.length;o<t;o++){var i=n[o].split("=");if(e===i[0].replace(/(%[\da-f]{2})+/gi,decodeURIComponent))return i[1]||""}},removeItem:function(e,n){t.setItem(e,"",n)}}):void u.error(c.noStorage)},storageOptions:function(){var e={};return i.expires&&(e.expires=u.get.expirationDate(i.expires)),i.domain&&(e.domain=i.domain),i.path&&(e.path=i.path),i.secure&&(e.secure=i.secure),i.samesite&&(e.samesite=i.samesite),e}},clear:function(){u.storage.remove(i.key)},storage:{set:function(e,n){var o=u.get.storageOptions();t===S.localStorage&&o.expires&&(u.debug("Storing expiration value in localStorage",e,o.expires),t.setItem(e+i.expirationKey,o.expires)),u.debug("Value stored",e,n);try{t.setItem(e,n,o)}catch(e){u.error(c.setItem,e)}},get:function(e){var n,o=t.getItem(e);return t===S.localStorage&&null!=(n=t.getItem(e+i.expirationKey))&&new Date(n)<new Date&&(u.debug("Value in localStorage has expired. Deleting key",e),u.storage.remove(e),o=null),o="undefined"!==o&&"null"!==o&&null!=o?o:void 0},remove:function(e){var n=u.get.storageOptions();n.expires=u.get.expirationDate(-1),t===S.localStorage&&t.removeItem(e+i.expirationKey),t.removeItem(e,n)}},setting:function(e,n){if(u.debug("Changing setting",e,n),w.isPlainObject(e))w.extend(!0,i,e);else{if(void 0===n)return i[e];w.isPlainObject(i[e])?w.extend(!0,i[e],n):i[e]=n}},internal:function(e,n){if(w.isPlainObject(e))w.extend(!0,u,e);else{if(void 0===n)return u[e];u[e]=n}},debug:function(){!i.silent&&i.debug&&(i.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,i.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),u.verbose.apply(console,arguments)))},error:function(){i.silent||(u.error=Function.prototype.bind.call(console.error,console,i.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var n,o;i.performance&&(o=(n=Date.now())-(f||n),f=n,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:l,"Execution Time":o})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(function(){u.performance.display()},500)},display:function(){var e=i.name+":",o=0;f=!1,clearTimeout(u.performance.timer),w.each(h,function(e,n){o+=n["Execution Time"]}),e+=" "+o+"ms",0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):w.each(h,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(t,e,n){var i,a,o,r,s=d;return e=e||y,n=n||l,"string"==typeof t&&void 0!==s&&(t=t.split(/[ .]/),i=t.length-1,w.each(t,function(e,n){var o=e!==i?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(w.isPlainObject(s[o])&&e!==i)s=s[o];else{if(void 0!==s[o])return a=s[o],!1;{if(!w.isPlainObject(s[n])||e===i)return void 0!==s[n]?a=s[n]:u.error(c.method,t),!1;s=s[n]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?o=a.apply(n,e):void 0!==a&&(o=a),Array.isArray(p)?p.push(o):void 0!==p?p=[p,o]:void 0!==o&&(p=o),a}};b?(void 0===d&&u.initialize(),u.invoke(v)):(void 0!==d&&d.invoke("destroy"),u.initialize())}),void 0!==p?p:this},w.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",secure:!1,samesite:!1,storageMethod:"cookie",key:"nag",value:"dismiss",expirationKey:"ExpirationDate",error:{noStorage:"Unsupported storage method",method:"The method you called is not defined.",setItem:"Unexpected error while setting value",expiresFormat:'"expires" must be a number of days or a Date Object'},className:{bottom:"bottom",fixed:"fixed"},selector:{close:"> .close.icon"},duration:500,easing:"easeOutQuad",onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){}},w.extend(w.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document);