Simple Calendar – Google Calendar Plugin - Version 3.0.13

Version Description

  • January 25, 2016 =

  • Tweak: Lists that start on a custom date will start at the beginning of the day now.

  • Tweak: Make it so grouped calendars are properly sorted by event time.

  • Tweak: Updated option for controlling multi-day events.

  • Tweak: Allow line breaks from Google calendar description to persist if not using the html attribute.

  • Tweak: Updated text output for human date times.

  • Fix: Multi-day events that span over to the first day of the month should now show correctly.

  • Feature: Added dropdown option on how to handle line breaks and paragraphs for the event template tags.

  • Dev: Removed WP Requirements from Composer.

  • Dev: Removed always enqueue and disable scripts options so scripts will load automatically on every page.

Download this release

Release Info

Developer nickyoung87
Plugin Icon 128x128 Simple Calendar – Google Calendar Plugin
Version 3.0.13
Comparing to
See all releases

Code changes from version 3.0.12 to 3.0.13

Files changed (59) hide show
  1. assets/css/admin-activation.min.css +1 -1
  2. assets/css/admin-add-calendar.min.css +1 -1
  3. assets/css/admin.min.css +1 -1
  4. assets/css/default-calendar-grid.min.css +1 -1
  5. assets/css/default-calendar-list.min.css +1 -1
  6. assets/css/vendor/jquery.qtip.css +617 -0
  7. assets/css/vendor/jquery.qtip.min.css +3 -0
  8. assets/css/vendor/qtip.css +0 -124
  9. assets/css/vendor/qtip.min.css +0 -3
  10. assets/css/vendor/select2.css +77 -26
  11. assets/css/vendor/select2.min.css +1 -1
  12. assets/js/admin-add-calendar.min.js +1 -1
  13. assets/js/admin.min.js +1 -1
  14. assets/js/default-calendar.min.js +1 -1
  15. assets/js/vendor/imagesloaded.min.js +0 -7
  16. assets/js/vendor/{imagesloaded.js → imagesloaded.pkgd.js} +180 -131
  17. assets/js/vendor/imagesloaded.pkgd.min.js +7 -0
  18. assets/js/vendor/{qtip.js → jquery.qtip.js} +205 -205
  19. assets/js/vendor/{qtip.min.js → jquery.qtip.min.js} +0 -0
  20. assets/js/vendor/{tiptip.js → jquery.tipTip.js} +0 -0
  21. assets/js/vendor/{tiptip.min.js → jquery.tipTip.minified.js} +0 -0
  22. assets/js/vendor/select2.js +280 -113
  23. assets/js/vendor/select2.min.js +2 -2
  24. google-calendar-events.php +17 -14
  25. includes/abstracts/calendar.php +21 -3
  26. includes/admin/assets.php +2 -1
  27. includes/admin/fields/select.php +10 -0
  28. includes/admin/metaboxes/settings.php +28 -0
  29. includes/admin/pages.php +1 -18
  30. includes/admin/pages/advanced.php +3 -19
  31. includes/assets.php +23 -126
  32. includes/calendars/admin/default-calendar-admin.php +21 -5
  33. includes/calendars/default-calendar.php +1 -1
  34. includes/calendars/views/default-calendar-grid.php +1 -1
  35. includes/calendars/views/default-calendar-list.php +18 -0
  36. includes/events/event-builder.php +10 -6
  37. includes/feeds/grouped-calendars.php +19 -0
  38. includes/main.php +2 -1
  39. includes/post-types.php +19 -0
  40. includes/update.php +1 -0
  41. includes/updates/update-v3013.php +55 -0
  42. {vendor/nekojira/wp-requirements/src → includes}/wp-requirements.php +2 -2
  43. readme.txt +13 -1
  44. vendor/autoload_52.php +1 -1
  45. vendor/composer/ClassLoader.php +1 -1
  46. vendor/composer/autoload_classmap.php +0 -1
  47. vendor/composer/autoload_namespaces.php +0 -1
  48. vendor/composer/autoload_real_52.php +3 -3
  49. vendor/composer/installed.json +50 -91
  50. vendor/google/apiclient/src/Google/IO/Curl.php +1 -0
  51. vendor/mexitek/phpcolors/composer.json +3 -0
  52. vendor/mexitek/phpcolors/src/Mexitek/PHPColors/Color.php +10 -7
  53. vendor/mexitek/phpcolors/test/colorTest.php +0 -50
  54. vendor/mexitek/phpcolors/tests/bootstrap.php +11 -0
  55. vendor/mexitek/phpcolors/tests/colorAnalyze.phpt +35 -0
  56. vendor/mexitek/phpcolors/tests/colorChange.phpt +28 -0
  57. vendor/nekojira/wp-requirements/LICENSE.txt +0 -339
  58. vendor/nekojira/wp-requirements/README.md +0 -100
  59. vendor/nekojira/wp-requirements/composer.json +0 -31
assets/css/admin-activation.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.12
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.13
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
assets/css/admin-add-calendar.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.12
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.13
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
assets/css/admin.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.12
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.13
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
assets/css/default-calendar-grid.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.12
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.13
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
assets/css/default-calendar-list.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.12
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.13
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
assets/css/vendor/jquery.qtip.css ADDED
@@ -0,0 +1,617 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * qTip2 - Pretty powerful tooltips - v2.2.1
3
+ * http://qtip2.com
4
+ *
5
+ * Copyright (c) 2014
6
+ * Released under the MIT licenses
7
+ * http://jquery.org/license
8
+ *
9
+ * Date: Sun Sep 7 2014 12:09 GMT+0100+0100
10
+ * Plugins: tips modal viewport svg imagemap ie6
11
+ * Styles: core basic css3
12
+ */
13
+ .qtip{
14
+ position: absolute;
15
+ left: -28000px;
16
+ top: -28000px;
17
+ display: none;
18
+
19
+ max-width: 280px;
20
+ min-width: 50px;
21
+
22
+ font-size: 10.5px;
23
+ line-height: 12px;
24
+
25
+ direction: ltr;
26
+
27
+ box-shadow: none;
28
+ padding: 0;
29
+ }
30
+
31
+ .qtip-content{
32
+ position: relative;
33
+ padding: 5px 9px;
34
+ overflow: hidden;
35
+
36
+ text-align: left;
37
+ word-wrap: break-word;
38
+ }
39
+
40
+ .qtip-titlebar{
41
+ position: relative;
42
+ padding: 5px 35px 5px 10px;
43
+ overflow: hidden;
44
+
45
+ border-width: 0 0 1px;
46
+ font-weight: bold;
47
+ }
48
+
49
+ .qtip-titlebar + .qtip-content{ border-top-width: 0 !important; }
50
+
51
+ /* Default close button class */
52
+ .qtip-close{
53
+ position: absolute;
54
+ right: -9px; top: -9px;
55
+ z-index: 11; /* Overlap .qtip-tip */
56
+
57
+ cursor: pointer;
58
+ outline: medium none;
59
+
60
+ border: 1px solid transparent;
61
+ }
62
+
63
+ .qtip-titlebar .qtip-close{
64
+ right: 4px; top: 50%;
65
+ margin-top: -9px;
66
+ }
67
+
68
+ * html .qtip-titlebar .qtip-close{ top: 16px; } /* IE fix */
69
+
70
+ .qtip-titlebar .ui-icon,
71
+ .qtip-icon .ui-icon{
72
+ display: block;
73
+ text-indent: -1000em;
74
+ direction: ltr;
75
+ }
76
+
77
+ .qtip-icon, .qtip-icon .ui-icon{
78
+ -moz-border-radius: 3px;
79
+ -webkit-border-radius: 3px;
80
+ border-radius: 3px;
81
+ text-decoration: none;
82
+ }
83
+
84
+ .qtip-icon .ui-icon{
85
+ width: 18px;
86
+ height: 14px;
87
+
88
+ line-height: 14px;
89
+ text-align: center;
90
+ text-indent: 0;
91
+ font: normal bold 10px/13px Tahoma,sans-serif;
92
+
93
+ color: inherit;
94
+ background: transparent none no-repeat -100em -100em;
95
+ }
96
+
97
+ /* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
98
+ .qtip-focus{}
99
+
100
+ /* Applied on hover of tooltips i.e. added/removed on mouseenter/mouseleave respectively */
101
+ .qtip-hover{}
102
+
103
+ /* Default tooltip style */
104
+ .qtip-default{
105
+ border: 1px solid #F1D031;
106
+
107
+ background-color: #FFFFA3;
108
+ color: #555;
109
+ }
110
+
111
+ .qtip-default .qtip-titlebar{
112
+ background-color: #FFEF93;
113
+ }
114
+
115
+ .qtip-default .qtip-icon{
116
+ border-color: #CCC;
117
+ background: #F1F1F1;
118
+ color: #777;
119
+ }
120
+
121
+ .qtip-default .qtip-titlebar .qtip-close{
122
+ border-color: #AAA;
123
+ color: #111;
124
+ }
125
+
126
+
127
+ /*! Light tooltip style */
128
+ .qtip-light{
129
+ background-color: white;
130
+ border-color: #E2E2E2;
131
+ color: #454545;
132
+ }
133
+
134
+ .qtip-light .qtip-titlebar{
135
+ background-color: #f1f1f1;
136
+ }
137
+
138
+
139
+ /*! Dark tooltip style */
140
+ .qtip-dark{
141
+ background-color: #505050;
142
+ border-color: #303030;
143
+ color: #f3f3f3;
144
+ }
145
+
146
+ .qtip-dark .qtip-titlebar{
147
+ background-color: #404040;
148
+ }
149
+
150
+ .qtip-dark .qtip-icon{
151
+ border-color: #444;
152
+ }
153
+
154
+ .qtip-dark .qtip-titlebar .ui-state-hover{
155
+ border-color: #303030;
156
+ }
157
+
158
+
159
+ /*! Cream tooltip style */
160
+ .qtip-cream{
161
+ background-color: #FBF7AA;
162
+ border-color: #F9E98E;
163
+ color: #A27D35;
164
+ }
165
+
166
+ .qtip-cream .qtip-titlebar{
167
+ background-color: #F0DE7D;
168
+ }
169
+
170
+ .qtip-cream .qtip-close .qtip-icon{
171
+ background-position: -82px 0;
172
+ }
173
+
174
+
175
+ /*! Red tooltip style */
176
+ .qtip-red{
177
+ background-color: #F78B83;
178
+ border-color: #D95252;
179
+ color: #912323;
180
+ }
181
+
182
+ .qtip-red .qtip-titlebar{
183
+ background-color: #F06D65;
184
+ }
185
+
186
+ .qtip-red .qtip-close .qtip-icon{
187
+ background-position: -102px 0;
188
+ }
189
+
190
+ .qtip-red .qtip-icon{
191
+ border-color: #D95252;
192
+ }
193
+
194
+ .qtip-red .qtip-titlebar .ui-state-hover{
195
+ border-color: #D95252;
196
+ }
197
+
198
+
199
+ /*! Green tooltip style */
200
+ .qtip-green{
201
+ background-color: #CAED9E;
202
+ border-color: #90D93F;
203
+ color: #3F6219;
204
+ }
205
+
206
+ .qtip-green .qtip-titlebar{
207
+ background-color: #B0DE78;
208
+ }
209
+
210
+ .qtip-green .qtip-close .qtip-icon{
211
+ background-position: -42px 0;
212
+ }
213
+
214
+
215
+ /*! Blue tooltip style */
216
+ .qtip-blue{
217
+ background-color: #E5F6FE;
218
+ border-color: #ADD9ED;
219
+ color: #5E99BD;
220
+ }
221
+
222
+ .qtip-blue .qtip-titlebar{
223
+ background-color: #D0E9F5;
224
+ }
225
+
226
+ .qtip-blue .qtip-close .qtip-icon{
227
+ background-position: -2px 0;
228
+ }
229
+
230
+
231
+ .qtip-shadow{
232
+ -webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
233
+ -moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
234
+ box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
235
+ }
236
+
237
+ /* Add rounded corners to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
238
+ .qtip-rounded,
239
+ .qtip-tipsy,
240
+ .qtip-bootstrap{
241
+ -moz-border-radius: 5px;
242
+ -webkit-border-radius: 5px;
243
+ border-radius: 5px;
244
+ }
245
+
246
+ .qtip-rounded .qtip-titlebar{
247
+ -moz-border-radius: 4px 4px 0 0;
248
+ -webkit-border-radius: 4px 4px 0 0;
249
+ border-radius: 4px 4px 0 0;
250
+ }
251
+
252
+ /* Youtube tooltip style */
253
+ .qtip-youtube{
254
+ -moz-border-radius: 2px;
255
+ -webkit-border-radius: 2px;
256
+ border-radius: 2px;
257
+
258
+ -webkit-box-shadow: 0 0 3px #333;
259
+ -moz-box-shadow: 0 0 3px #333;
260
+ box-shadow: 0 0 3px #333;
261
+
262
+ color: white;
263
+ border: 0 solid transparent;
264
+
265
+ background: #4A4A4A;
266
+ background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,black));
267
+ background-image: -webkit-linear-gradient(top,#4A4A4A 0,black 100%);
268
+ background-image: -moz-linear-gradient(top,#4A4A4A 0,black 100%);
269
+ background-image: -ms-linear-gradient(top,#4A4A4A 0,black 100%);
270
+ background-image: -o-linear-gradient(top,#4A4A4A 0,black 100%);
271
+ }
272
+
273
+ .qtip-youtube .qtip-titlebar{
274
+ background-color: #4A4A4A;
275
+ background-color: rgba(0,0,0,0);
276
+ }
277
+
278
+ .qtip-youtube .qtip-content{
279
+ padding: .75em;
280
+ font: 12px arial,sans-serif;
281
+
282
+ filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);
283
+ -ms-filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);";
284
+ }
285
+
286
+ .qtip-youtube .qtip-icon{
287
+ border-color: #222;
288
+ }
289
+
290
+ .qtip-youtube .qtip-titlebar .ui-state-hover{
291
+ border-color: #303030;
292
+ }
293
+
294
+
295
+ /* jQuery TOOLS Tooltip style */
296
+ .qtip-jtools{
297
+ background: #232323;
298
+ background: rgba(0, 0, 0, 0.7);
299
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
300
+ background-image: -moz-linear-gradient(top, #717171, #232323);
301
+ background-image: -webkit-linear-gradient(top, #717171, #232323);
302
+ background-image: -ms-linear-gradient(top, #717171, #232323);
303
+ background-image: -o-linear-gradient(top, #717171, #232323);
304
+
305
+ border: 2px solid #ddd;
306
+ border: 2px solid rgba(241,241,241,1);
307
+
308
+ -moz-border-radius: 2px;
309
+ -webkit-border-radius: 2px;
310
+ border-radius: 2px;
311
+
312
+ -webkit-box-shadow: 0 0 12px #333;
313
+ -moz-box-shadow: 0 0 12px #333;
314
+ box-shadow: 0 0 12px #333;
315
+ }
316
+
317
+ /* IE Specific */
318
+ .qtip-jtools .qtip-titlebar{
319
+ background-color: transparent;
320
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A);
321
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)";
322
+ }
323
+ .qtip-jtools .qtip-content{
324
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323);
325
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)";
326
+ }
327
+
328
+ .qtip-jtools .qtip-titlebar,
329
+ .qtip-jtools .qtip-content{
330
+ background: transparent;
331
+ color: white;
332
+ border: 0 dashed transparent;
333
+ }
334
+
335
+ .qtip-jtools .qtip-icon{
336
+ border-color: #555;
337
+ }
338
+
339
+ .qtip-jtools .qtip-titlebar .ui-state-hover{
340
+ border-color: #333;
341
+ }
342
+
343
+
344
+ /* Cluetip style */
345
+ .qtip-cluetip{
346
+ -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
347
+ -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
348
+ box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
349
+
350
+ background-color: #D9D9C2;
351
+ color: #111;
352
+ border: 0 dashed transparent;
353
+ }
354
+
355
+ .qtip-cluetip .qtip-titlebar{
356
+ background-color: #87876A;
357
+ color: white;
358
+ border: 0 dashed transparent;
359
+ }
360
+
361
+ .qtip-cluetip .qtip-icon{
362
+ border-color: #808064;
363
+ }
364
+
365
+ .qtip-cluetip .qtip-titlebar .ui-state-hover{
366
+ border-color: #696952;
367
+ color: #696952;
368
+ }
369
+
370
+
371
+ /* Tipsy style */
372
+ .qtip-tipsy{
373
+ background: black;
374
+ background: rgba(0, 0, 0, .87);
375
+
376
+ color: white;
377
+ border: 0 solid transparent;
378
+
379
+ font-size: 11px;
380
+ font-family: 'Lucida Grande', sans-serif;
381
+ font-weight: bold;
382
+ line-height: 16px;
383
+ text-shadow: 0 1px black;
384
+ }
385
+
386
+ .qtip-tipsy .qtip-titlebar{
387
+ padding: 6px 35px 0 10px;
388
+ background-color: transparent;
389
+ }
390
+
391
+ .qtip-tipsy .qtip-content{
392
+ padding: 6px 10px;
393
+ }
394
+
395
+ .qtip-tipsy .qtip-icon{
396
+ border-color: #222;
397
+ text-shadow: none;
398
+ }
399
+
400
+ .qtip-tipsy .qtip-titlebar .ui-state-hover{
401
+ border-color: #303030;
402
+ }
403
+
404
+
405
+ /* Tipped style */
406
+ .qtip-tipped{
407
+ border: 3px solid #959FA9;
408
+
409
+ -moz-border-radius: 3px;
410
+ -webkit-border-radius: 3px;
411
+ border-radius: 3px;
412
+
413
+ background-color: #F9F9F9;
414
+ color: #454545;
415
+
416
+ font-weight: normal;
417
+ font-family: serif;
418
+ }
419
+
420
+ .qtip-tipped .qtip-titlebar{
421
+ border-bottom-width: 0;
422
+
423
+ color: white;
424
+ background: #3A79B8;
425
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#3A79B8), to(#2E629D));
426
+ background-image: -webkit-linear-gradient(top, #3A79B8, #2E629D);
427
+ background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
428
+ background-image: -ms-linear-gradient(top, #3A79B8, #2E629D);
429
+ background-image: -o-linear-gradient(top, #3A79B8, #2E629D);
430
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D);
431
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)";
432
+ }
433
+
434
+ .qtip-tipped .qtip-icon{
435
+ border: 2px solid #285589;
436
+ background: #285589;
437
+ }
438
+
439
+ .qtip-tipped .qtip-icon .ui-icon{
440
+ background-color: #FBFBFB;
441
+ color: #555;
442
+ }
443
+
444
+
445
+ /**
446
+ * Twitter Bootstrap style.
447
+ *
448
+ * Tested with IE 8, IE 9, Chrome 18, Firefox 9, Opera 11.
449
+ * Does not work with IE 7.
450
+ */
451
+ .qtip-bootstrap{
452
+ /** Taken from Bootstrap body */
453
+ font-size: 14px;
454
+ line-height: 20px;
455
+ color: #333333;
456
+
457
+ /** Taken from Bootstrap .popover */
458
+ padding: 1px;
459
+ background-color: #ffffff;
460
+ border: 1px solid #ccc;
461
+ border: 1px solid rgba(0, 0, 0, 0.2);
462
+ -webkit-border-radius: 6px;
463
+ -moz-border-radius: 6px;
464
+ border-radius: 6px;
465
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
466
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
467
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
468
+ -webkit-background-clip: padding-box;
469
+ -moz-background-clip: padding;
470
+ background-clip: padding-box;
471
+ }
472
+
473
+ .qtip-bootstrap .qtip-titlebar{
474
+ /** Taken from Bootstrap .popover-title */
475
+ padding: 8px 14px;
476
+ margin: 0;
477
+ font-size: 14px;
478
+ font-weight: normal;
479
+ line-height: 18px;
480
+ background-color: #f7f7f7;
481
+ border-bottom: 1px solid #ebebeb;
482
+ -webkit-border-radius: 5px 5px 0 0;
483
+ -moz-border-radius: 5px 5px 0 0;
484
+ border-radius: 5px 5px 0 0;
485
+ }
486
+
487
+ .qtip-bootstrap .qtip-titlebar .qtip-close{
488
+ /**
489
+ * Overrides qTip2:
490
+ * .qtip-titlebar .qtip-close{
491
+ * [...]
492
+ * right: 4px;
493
+ * top: 50%;
494
+ * [...]
495
+ * border-style: solid;
496
+ * }
497
+ */
498
+ right: 11px;
499
+ top: 45%;
500
+ border-style: none;
501
+ }
502
+
503
+ .qtip-bootstrap .qtip-content{
504
+ /** Taken from Bootstrap .popover-content */
505
+ padding: 9px 14px;
506
+ }
507
+
508
+ .qtip-bootstrap .qtip-icon{
509
+ /**
510
+ * Overrides qTip2:
511
+ * .qtip-default .qtip-icon {
512
+ * border-color: #CCC;
513
+ * background: #F1F1F1;
514
+ * color: #777;
515
+ * }
516
+ */
517
+ background: transparent;
518
+ }
519
+
520
+ .qtip-bootstrap .qtip-icon .ui-icon{
521
+ /**
522
+ * Overrides qTip2:
523
+ * .qtip-icon .ui-icon{
524
+ * width: 18px;
525
+ * height: 14px;
526
+ * }
527
+ */
528
+ width: auto;
529
+ height: auto;
530
+
531
+ /* Taken from Bootstrap .close */
532
+ float: right;
533
+ font-size: 20px;
534
+ font-weight: bold;
535
+ line-height: 18px;
536
+ color: #000000;
537
+ text-shadow: 0 1px 0 #ffffff;
538
+ opacity: 0.2;
539
+ filter: alpha(opacity=20);
540
+ }
541
+
542
+ .qtip-bootstrap .qtip-icon .ui-icon:hover{
543
+ /* Taken from Bootstrap .close:hover */
544
+ color: #000000;
545
+ text-decoration: none;
546
+ cursor: pointer;
547
+ opacity: 0.4;
548
+ filter: alpha(opacity=40);
549
+ }
550
+
551
+
552
+ /* IE9 fix - removes all filters */
553
+ .qtip:not(.ie9haxors) div.qtip-content,
554
+ .qtip:not(.ie9haxors) div.qtip-titlebar{
555
+ filter: none;
556
+ -ms-filter: none;
557
+ }
558
+
559
+
560
+ .qtip .qtip-tip{
561
+ margin: 0 auto;
562
+ overflow: hidden;
563
+ z-index: 10;
564
+
565
+ }
566
+
567
+ /* Opera bug #357 - Incorrect tip position
568
+ https://github.com/Craga89/qTip2/issues/367 */
569
+ x:-o-prefocus, .qtip .qtip-tip{
570
+ visibility: hidden;
571
+ }
572
+
573
+ .qtip .qtip-tip,
574
+ .qtip .qtip-tip .qtip-vml,
575
+ .qtip .qtip-tip canvas{
576
+ position: absolute;
577
+
578
+ color: #123456;
579
+ background: transparent;
580
+ border: 0 dashed transparent;
581
+ }
582
+
583
+ .qtip .qtip-tip canvas{ top: 0; left: 0; }
584
+
585
+ .qtip .qtip-tip .qtip-vml{
586
+ behavior: url(#default#VML);
587
+ display: inline-block;
588
+ visibility: visible;
589
+ }
590
+
591
+
592
+ #qtip-overlay{
593
+ position: fixed;
594
+ left: 0; top: 0;
595
+ width: 100%; height: 100%;
596
+ }
597
+
598
+ /* Applied to modals with show.modal.blur set to true */
599
+ #qtip-overlay.blurs{ cursor: pointer; }
600
+
601
+ /* Change opacity of overlay here */
602
+ #qtip-overlay div{
603
+ position: absolute;
604
+ left: 0; top: 0;
605
+ width: 100%; height: 100%;
606
+
607
+ background-color: black;
608
+
609
+ opacity: 0.7;
610
+ filter:alpha(opacity=70);
611
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
612
+ }
613
+
614
+
615
+ .qtipmodal-ie6fix{
616
+ position: absolute !important;
617
+ }
assets/css/vendor/jquery.qtip.min.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /* qTip2 v2.2.1 | Plugins: tips modal viewport svg imagemap ie6 | Styles: core basic css3 | qtip2.com | Licensed MIT | Sun Sep 07 2014 00:09:28 */
2
+
3
+ .qtip{position:absolute;left:-28000px;top:-28000px;display:none;max-width:280px;min-width:50px;font-size:10.5px;line-height:12px;direction:ltr;box-shadow:none;padding:0}.qtip-content{position:relative;padding:5px 9px;overflow:hidden;text-align:left;word-wrap:break-word}.qtip-titlebar{position:relative;padding:5px 35px 5px 10px;overflow:hidden;border-width:0 0 1px;font-weight:700}.qtip-titlebar+.qtip-content{border-top-width:0!important}.qtip-close{position:absolute;right:-9px;top:-9px;z-index:11;cursor:pointer;outline:0;border:1px solid transparent}.qtip-titlebar .qtip-close{right:4px;top:50%;margin-top:-9px}* html .qtip-titlebar .qtip-close{top:16px}.qtip-icon .ui-icon,.qtip-titlebar .ui-icon{display:block;text-indent:-1000em;direction:ltr}.qtip-icon,.qtip-icon .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;text-decoration:none}.qtip-icon .ui-icon{width:18px;height:14px;line-height:14px;text-align:center;text-indent:0;font:400 bold 10px/13px Tahoma,sans-serif;color:inherit;background:-100em -100em no-repeat}.qtip-default{border:1px solid #F1D031;background-color:#FFFFA3;color:#555}.qtip-default .qtip-titlebar{background-color:#FFEF93}.qtip-default .qtip-icon{border-color:#CCC;background:#F1F1F1;color:#777}.qtip-default .qtip-titlebar .qtip-close{border-color:#AAA;color:#111}.qtip-light{background-color:#fff;border-color:#E2E2E2;color:#454545}.qtip-light .qtip-titlebar{background-color:#f1f1f1}.qtip-dark{background-color:#505050;border-color:#303030;color:#f3f3f3}.qtip-dark .qtip-titlebar{background-color:#404040}.qtip-dark .qtip-icon{border-color:#444}.qtip-dark .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-cream{background-color:#FBF7AA;border-color:#F9E98E;color:#A27D35}.qtip-cream .qtip-titlebar{background-color:#F0DE7D}.qtip-cream .qtip-close .qtip-icon{background-position:-82px 0}.qtip-red{background-color:#F78B83;border-color:#D95252;color:#912323}.qtip-red .qtip-titlebar{background-color:#F06D65}.qtip-red .qtip-close .qtip-icon{background-position:-102px 0}.qtip-red .qtip-icon,.qtip-red .qtip-titlebar .ui-state-hover{border-color:#D95252}.qtip-green{background-color:#CAED9E;border-color:#90D93F;color:#3F6219}.qtip-green .qtip-titlebar{background-color:#B0DE78}.qtip-green .qtip-close .qtip-icon{background-position:-42px 0}.qtip-blue{background-color:#E5F6FE;border-color:#ADD9ED;color:#5E99BD}.qtip-blue .qtip-titlebar{background-color:#D0E9F5}.qtip-blue .qtip-close .qtip-icon{background-position:-2px 0}.qtip-shadow{-webkit-box-shadow:1px 1px 3px 1px rgba(0,0,0,.15);-moz-box-shadow:1px 1px 3px 1px rgba(0,0,0,.15);box-shadow:1px 1px 3px 1px rgba(0,0,0,.15)}.qtip-bootstrap,.qtip-rounded,.qtip-tipsy{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.qtip-rounded .qtip-titlebar{-moz-border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.qtip-youtube{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 3px #333;-moz-box-shadow:0 0 3px #333;box-shadow:0 0 3px #333;color:#fff;border:0 solid transparent;background:#4A4A4A;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,#000));background-image:-webkit-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-moz-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-ms-linear-gradient(top,#4A4A4A 0,#000 100%);background-image:-o-linear-gradient(top,#4A4A4A 0,#000 100%)}.qtip-youtube .qtip-titlebar{background-color:transparent}.qtip-youtube .qtip-content{padding:.75em;font:12px arial,sans-serif;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#4a4a4a, EndColorStr=#000000);-ms-filter:"progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);"}.qtip-youtube .qtip-icon{border-color:#222}.qtip-youtube .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-jtools{background:#232323;background:rgba(0,0,0,.7);background-image:-webkit-gradient(linear,left top,left bottom,from(#717171),to(#232323));background-image:-moz-linear-gradient(top,#717171,#232323);background-image:-webkit-linear-gradient(top,#717171,#232323);background-image:-ms-linear-gradient(top,#717171,#232323);background-image:-o-linear-gradient(top,#717171,#232323);border:2px solid #ddd;border:2px solid rgba(241,241,241,1);-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 0 12px #333;-moz-box-shadow:0 0 12px #333;box-shadow:0 0 12px #333}.qtip-jtools .qtip-titlebar{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171, endColorstr=#4A4A4A);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)"}.qtip-jtools .qtip-content{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A, endColorstr=#232323);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)"}.qtip-jtools .qtip-content,.qtip-jtools .qtip-titlebar{background:0 0;color:#fff;border:0 dashed transparent}.qtip-jtools .qtip-icon{border-color:#555}.qtip-jtools .qtip-titlebar .ui-state-hover{border-color:#333}.qtip-cluetip{-webkit-box-shadow:4px 4px 5px rgba(0,0,0,.4);-moz-box-shadow:4px 4px 5px rgba(0,0,0,.4);box-shadow:4px 4px 5px rgba(0,0,0,.4);background-color:#D9D9C2;color:#111;border:0 dashed transparent}.qtip-cluetip .qtip-titlebar{background-color:#87876A;color:#fff;border:0 dashed transparent}.qtip-cluetip .qtip-icon{border-color:#808064}.qtip-cluetip .qtip-titlebar .ui-state-hover{border-color:#696952;color:#696952}.qtip-tipsy{background:#000;background:rgba(0,0,0,.87);color:#fff;border:0 solid transparent;font-size:11px;font-family:'Lucida Grande',sans-serif;font-weight:700;line-height:16px;text-shadow:0 1px #000}.qtip-tipsy .qtip-titlebar{padding:6px 35px 0 10px;background-color:transparent}.qtip-tipsy .qtip-content{padding:6px 10px}.qtip-tipsy .qtip-icon{border-color:#222;text-shadow:none}.qtip-tipsy .qtip-titlebar .ui-state-hover{border-color:#303030}.qtip-tipped{border:3px solid #959FA9;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#F9F9F9;color:#454545;font-weight:400;font-family:serif}.qtip-tipped .qtip-titlebar{border-bottom-width:0;color:#fff;background:#3A79B8;background-image:-webkit-gradient(linear,left top,left bottom,from(#3A79B8),to(#2E629D));background-image:-webkit-linear-gradient(top,#3A79B8,#2E629D);background-image:-moz-linear-gradient(top,#3A79B8,#2E629D);background-image:-ms-linear-gradient(top,#3A79B8,#2E629D);background-image:-o-linear-gradient(top,#3A79B8,#2E629D);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8, endColorstr=#2E629D);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)"}.qtip-tipped .qtip-icon{border:2px solid #285589;background:#285589}.qtip-tipped .qtip-icon .ui-icon{background-color:#FBFBFB;color:#555}.qtip-bootstrap{font-size:14px;line-height:20px;color:#333;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.qtip-bootstrap .qtip-titlebar{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.qtip-bootstrap .qtip-titlebar .qtip-close{right:11px;top:45%;border-style:none}.qtip-bootstrap .qtip-content{padding:9px 14px}.qtip-bootstrap .qtip-icon{background:0 0}.qtip-bootstrap .qtip-icon .ui-icon{width:auto;height:auto;float:right;font-size:20px;font-weight:700;line-height:18px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.qtip-bootstrap .qtip-icon .ui-icon:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}.qtip:not(.ie9haxors) div.qtip-content,.qtip:not(.ie9haxors) div.qtip-titlebar{filter:none;-ms-filter:none}.qtip .qtip-tip{margin:0 auto;overflow:hidden;z-index:10}.qtip .qtip-tip,x:-o-prefocus{visibility:hidden}.qtip .qtip-tip,.qtip .qtip-tip .qtip-vml,.qtip .qtip-tip canvas{position:absolute;color:#123456;background:0 0;border:0 dashed transparent}.qtip .qtip-tip canvas{top:0;left:0}.qtip .qtip-tip .qtip-vml{behavior:url(#default#VML);display:inline-block;visibility:visible}#qtip-overlay{position:fixed;left:0;top:0;width:100%;height:100%}#qtip-overlay.blurs{cursor:pointer}#qtip-overlay div{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;opacity:.7;filter:alpha(opacity=70);-ms-filter:"alpha(Opacity=70)"}.qtipmodal-ie6fix{position:absolute!important}
assets/css/vendor/qtip.css DELETED
@@ -1,124 +0,0 @@
1
- /*
2
- * qTip2 - Pretty powerful tooltips - v2.2.1
3
- * http://qtip2.com
4
- *
5
- * Copyright (c) 2014
6
- * Released under the MIT licenses
7
- * http://jquery.org/license
8
- *
9
- * Date: Sun Sep 7 2014 12:09 GMT+0100+0100
10
- * Plugins: None
11
- * Styles: core
12
- */
13
- .qtip{
14
- position: absolute;
15
- left: -28000px;
16
- top: -28000px;
17
- display: none;
18
-
19
- max-width: 280px;
20
- min-width: 50px;
21
-
22
- font-size: 10.5px;
23
- line-height: 12px;
24
-
25
- direction: ltr;
26
-
27
- box-shadow: none;
28
- padding: 0;
29
- }
30
-
31
- .qtip-content{
32
- position: relative;
33
- padding: 5px 9px;
34
- overflow: hidden;
35
-
36
- text-align: left;
37
- word-wrap: break-word;
38
- }
39
-
40
- .qtip-titlebar{
41
- position: relative;
42
- padding: 5px 35px 5px 10px;
43
- overflow: hidden;
44
-
45
- border-width: 0 0 1px;
46
- font-weight: bold;
47
- }
48
-
49
- .qtip-titlebar + .qtip-content{ border-top-width: 0 !important; }
50
-
51
- /* Default close button class */
52
- .qtip-close{
53
- position: absolute;
54
- right: -9px; top: -9px;
55
- z-index: 11; /* Overlap .qtip-tip */
56
-
57
- cursor: pointer;
58
- outline: medium none;
59
-
60
- border: 1px solid transparent;
61
- }
62
-
63
- .qtip-titlebar .qtip-close{
64
- right: 4px; top: 50%;
65
- margin-top: -9px;
66
- }
67
-
68
- * html .qtip-titlebar .qtip-close{ top: 16px; } /* IE fix */
69
-
70
- .qtip-titlebar .ui-icon,
71
- .qtip-icon .ui-icon{
72
- display: block;
73
- text-indent: -1000em;
74
- direction: ltr;
75
- }
76
-
77
- .qtip-icon, .qtip-icon .ui-icon{
78
- -moz-border-radius: 3px;
79
- -webkit-border-radius: 3px;
80
- border-radius: 3px;
81
- text-decoration: none;
82
- }
83
-
84
- .qtip-icon .ui-icon{
85
- width: 18px;
86
- height: 14px;
87
-
88
- line-height: 14px;
89
- text-align: center;
90
- text-indent: 0;
91
- font: normal bold 10px/13px Tahoma,sans-serif;
92
-
93
- color: inherit;
94
- background: transparent none no-repeat -100em -100em;
95
- }
96
-
97
- /* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
98
- .qtip-focus{}
99
-
100
- /* Applied on hover of tooltips i.e. added/removed on mouseenter/mouseleave respectively */
101
- .qtip-hover{}
102
-
103
- /* Default tooltip style */
104
- .qtip-default{
105
- border: 1px solid #F1D031;
106
-
107
- background-color: #FFFFA3;
108
- color: #555;
109
- }
110
-
111
- .qtip-default .qtip-titlebar{
112
- background-color: #FFEF93;
113
- }
114
-
115
- .qtip-default .qtip-icon{
116
- border-color: #CCC;
117
- background: #F1F1F1;
118
- color: #777;
119
- }
120
-
121
- .qtip-default .qtip-titlebar .qtip-close{
122
- border-color: #AAA;
123
- color: #111;
124
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/vendor/qtip.min.css DELETED
@@ -1,3 +0,0 @@
1
- /* qTip2 v2.2.1 | Plugins: None | Styles: core | qtip2.com | Licensed MIT | Sun Sep 07 2014 00:09:32 */
2
-
3
- .qtip{position:absolute;left:-28000px;top:-28000px;display:none;max-width:280px;min-width:50px;font-size:10.5px;line-height:12px;direction:ltr;box-shadow:none;padding:0}.qtip-content{position:relative;padding:5px 9px;overflow:hidden;text-align:left;word-wrap:break-word}.qtip-titlebar{position:relative;padding:5px 35px 5px 10px;overflow:hidden;border-width:0 0 1px;font-weight:700}.qtip-titlebar+.qtip-content{border-top-width:0!important}.qtip-close{position:absolute;right:-9px;top:-9px;z-index:11;cursor:pointer;outline:0;border:1px solid transparent}.qtip-titlebar .qtip-close{right:4px;top:50%;margin-top:-9px}* html .qtip-titlebar .qtip-close{top:16px}.qtip-icon .ui-icon,.qtip-titlebar .ui-icon{display:block;text-indent:-1000em;direction:ltr}.qtip-icon,.qtip-icon .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;text-decoration:none}.qtip-icon .ui-icon{width:18px;height:14px;line-height:14px;text-align:center;text-indent:0;font:400 bold 10px/13px Tahoma,sans-serif;color:inherit;background:-100em -100em no-repeat}.qtip-default{border:1px solid #F1D031;background-color:#FFFFA3;color:#555}.qtip-default .qtip-titlebar{background-color:#FFEF93}.qtip-default .qtip-icon{border-color:#CCC;background:#F1F1F1;color:#777}.qtip-default .qtip-titlebar .qtip-close{border-color:#AAA;color:#111}
 
 
 
assets/css/vendor/select2.css CHANGED
@@ -18,6 +18,8 @@
18
  overflow: hidden;
19
  text-overflow: ellipsis;
20
  white-space: nowrap; }
 
 
21
  .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
22
  padding-right: 8px;
23
  padding-left: 20px; }
@@ -40,7 +42,8 @@
40
  box-sizing: border-box;
41
  border: none;
42
  font-size: 100%;
43
- margin-top: 5px; }
 
44
  .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
45
  -webkit-appearance: none; }
46
 
@@ -113,14 +116,14 @@
113
  filter: alpha(opacity=0); }
114
 
115
  .select2-hidden-accessible {
116
- border: 0;
117
- clip: rect(0 0 0 0);
118
- height: 1px;
119
- margin: -1px;
120
- overflow: hidden;
121
- padding: 0;
122
- position: absolute;
123
- width: 1px; }
124
 
125
  .select2-container--default .select2-selection--single {
126
  background-color: #fff;
@@ -152,19 +155,24 @@
152
  position: absolute;
153
  top: 50%;
154
  width: 0; }
 
155
  .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
156
  float: left; }
 
157
  .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
158
  left: 1px;
159
  right: auto; }
 
160
  .select2-container--default.select2-container--disabled .select2-selection--single {
161
  background-color: #eee;
162
  cursor: default; }
163
  .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
164
  display: none; }
 
165
  .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
166
  border-color: transparent transparent #888 transparent;
167
  border-width: 0 4px 5px 4px; }
 
168
  .select2-container--default .select2-selection--multiple {
169
  background-color: white;
170
  border: 1px solid #aaa;
@@ -203,43 +211,60 @@
203
  margin-right: 2px; }
204
  .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
205
  color: #333; }
206
- .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder {
 
207
  float: right; }
 
208
  .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
209
  margin-left: 5px;
210
  margin-right: auto; }
 
211
  .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
212
  margin-left: 2px;
213
  margin-right: auto; }
 
214
  .select2-container--default.select2-container--focus .select2-selection--multiple {
215
  border: solid black 1px;
216
  outline: 0; }
 
217
  .select2-container--default.select2-container--disabled .select2-selection--multiple {
218
  background-color: #eee;
219
  cursor: default; }
 
220
  .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
221
  display: none; }
 
222
  .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
223
  border-top-left-radius: 0;
224
  border-top-right-radius: 0; }
 
225
  .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
226
  border-bottom-left-radius: 0;
227
  border-bottom-right-radius: 0; }
 
228
  .select2-container--default .select2-search--dropdown .select2-search__field {
229
  border: 1px solid #aaa; }
 
230
  .select2-container--default .select2-search--inline .select2-search__field {
231
  background: transparent;
232
  border: none;
233
- outline: 0; }
 
 
 
234
  .select2-container--default .select2-results > .select2-results__options {
235
  max-height: 200px;
236
  overflow-y: auto; }
 
237
  .select2-container--default .select2-results__option[role=group] {
238
  padding: 0; }
 
239
  .select2-container--default .select2-results__option[aria-disabled=true] {
240
  color: #999; }
 
241
  .select2-container--default .select2-results__option[aria-selected=true] {
242
  background-color: #ddd; }
 
243
  .select2-container--default .select2-results__option .select2-results__option {
244
  padding-left: 1em; }
245
  .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
@@ -259,24 +284,26 @@
259
  .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
260
  margin-left: -5em;
261
  padding-left: 6em; }
 
262
  .select2-container--default .select2-results__option--highlighted[aria-selected] {
263
  background-color: #5897fb;
264
  color: white; }
 
265
  .select2-container--default .select2-results__group {
266
  cursor: default;
267
  display: block;
268
  padding: 6px; }
269
 
270
  .select2-container--classic .select2-selection--single {
271
- background-color: #f6f6f6;
272
  border: 1px solid #aaa;
273
  border-radius: 4px;
274
  outline: 0;
275
- background-image: -webkit-linear-gradient(top, #ffffff 50%, #eeeeee 100%);
276
- background-image: -o-linear-gradient(top, #ffffff 50%, #eeeeee 100%);
277
- background-image: linear-gradient(to bottom, #ffffff 50%, #eeeeee 100%);
278
  background-repeat: repeat-x;
279
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); }
280
  .select2-container--classic .select2-selection--single:focus {
281
  border: 1px solid #5897fb; }
282
  .select2-container--classic .select2-selection--single .select2-selection__rendered {
@@ -304,7 +331,7 @@
304
  background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
305
  background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
306
  background-repeat: repeat-x;
307
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#cccccc', GradientType=0); }
308
  .select2-container--classic .select2-selection--single .select2-selection__arrow b {
309
  border-color: #888 transparent transparent transparent;
310
  border-style: solid;
@@ -316,8 +343,10 @@
316
  position: absolute;
317
  top: 50%;
318
  width: 0; }
 
319
  .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
320
  float: left; }
 
321
  .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
322
  border: none;
323
  border-right: 1px solid #aaa;
@@ -326,6 +355,7 @@
326
  border-bottom-left-radius: 4px;
327
  left: 1px;
328
  right: auto; }
 
329
  .select2-container--classic.select2-container--open .select2-selection--single {
330
  border: 1px solid #5897fb; }
331
  .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
@@ -334,24 +364,27 @@
334
  .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
335
  border-color: transparent transparent #888 transparent;
336
  border-width: 0 4px 5px 4px; }
 
337
  .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
338
  border-top: none;
339
  border-top-left-radius: 0;
340
  border-top-right-radius: 0;
341
- background-image: -webkit-linear-gradient(top, #ffffff 0%, #eeeeee 50%);
342
- background-image: -o-linear-gradient(top, #ffffff 0%, #eeeeee 50%);
343
- background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 50%);
344
  background-repeat: repeat-x;
345
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); }
 
346
  .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
347
  border-bottom: none;
348
  border-bottom-left-radius: 0;
349
  border-bottom-right-radius: 0;
350
- background-image: -webkit-linear-gradient(top, #eeeeee 50%, #ffffff 100%);
351
- background-image: -o-linear-gradient(top, #eeeeee 50%, #ffffff 100%);
352
- background-image: linear-gradient(to bottom, #eeeeee 50%, #ffffff 100%);
353
  background-repeat: repeat-x;
354
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); }
 
355
  .select2-container--classic .select2-selection--multiple {
356
  background-color: white;
357
  border: 1px solid #aaa;
@@ -383,49 +416,67 @@
383
  margin-right: 2px; }
384
  .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
385
  color: #555; }
 
386
  .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
387
  float: right; }
 
388
  .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
389
  margin-left: 5px;
390
  margin-right: auto; }
 
391
  .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
392
  margin-left: 2px;
393
  margin-right: auto; }
 
394
  .select2-container--classic.select2-container--open .select2-selection--multiple {
395
  border: 1px solid #5897fb; }
 
396
  .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
397
  border-top: none;
398
  border-top-left-radius: 0;
399
  border-top-right-radius: 0; }
 
400
  .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
401
  border-bottom: none;
402
  border-bottom-left-radius: 0;
403
  border-bottom-right-radius: 0; }
 
404
  .select2-container--classic .select2-search--dropdown .select2-search__field {
405
  border: 1px solid #aaa;
406
  outline: 0; }
 
407
  .select2-container--classic .select2-search--inline .select2-search__field {
408
- outline: 0; }
 
 
409
  .select2-container--classic .select2-dropdown {
410
  background-color: white;
411
  border: 1px solid transparent; }
 
412
  .select2-container--classic .select2-dropdown--above {
413
  border-bottom: none; }
 
414
  .select2-container--classic .select2-dropdown--below {
415
  border-top: none; }
 
416
  .select2-container--classic .select2-results > .select2-results__options {
417
  max-height: 200px;
418
  overflow-y: auto; }
 
419
  .select2-container--classic .select2-results__option[role=group] {
420
  padding: 0; }
 
421
  .select2-container--classic .select2-results__option[aria-disabled=true] {
422
  color: grey; }
 
423
  .select2-container--classic .select2-results__option--highlighted[aria-selected] {
424
  background-color: #3875d7;
425
  color: white; }
 
426
  .select2-container--classic .select2-results__group {
427
  cursor: default;
428
  display: block;
429
  padding: 6px; }
 
430
  .select2-container--classic.select2-container--open .select2-dropdown {
431
  border-color: #5897fb; }
18
  overflow: hidden;
19
  text-overflow: ellipsis;
20
  white-space: nowrap; }
21
+ .select2-container .select2-selection--single .select2-selection__clear {
22
+ position: relative; }
23
  .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
24
  padding-right: 8px;
25
  padding-left: 20px; }
42
  box-sizing: border-box;
43
  border: none;
44
  font-size: 100%;
45
+ margin-top: 5px;
46
+ padding: 0; }
47
  .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
48
  -webkit-appearance: none; }
49
 
116
  filter: alpha(opacity=0); }
117
 
118
  .select2-hidden-accessible {
119
+ border: 0 !important;
120
+ clip: rect(0 0 0 0) !important;
121
+ height: 1px !important;
122
+ margin: -1px !important;
123
+ overflow: hidden !important;
124
+ padding: 0 !important;
125
+ position: absolute !important;
126
+ width: 1px !important; }
127
 
128
  .select2-container--default .select2-selection--single {
129
  background-color: #fff;
155
  position: absolute;
156
  top: 50%;
157
  width: 0; }
158
+
159
  .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
160
  float: left; }
161
+
162
  .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
163
  left: 1px;
164
  right: auto; }
165
+
166
  .select2-container--default.select2-container--disabled .select2-selection--single {
167
  background-color: #eee;
168
  cursor: default; }
169
  .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
170
  display: none; }
171
+
172
  .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
173
  border-color: transparent transparent #888 transparent;
174
  border-width: 0 4px 5px 4px; }
175
+
176
  .select2-container--default .select2-selection--multiple {
177
  background-color: white;
178
  border: 1px solid #aaa;
211
  margin-right: 2px; }
212
  .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
213
  color: #333; }
214
+
215
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
216
  float: right; }
217
+
218
  .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
219
  margin-left: 5px;
220
  margin-right: auto; }
221
+
222
  .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
223
  margin-left: 2px;
224
  margin-right: auto; }
225
+
226
  .select2-container--default.select2-container--focus .select2-selection--multiple {
227
  border: solid black 1px;
228
  outline: 0; }
229
+
230
  .select2-container--default.select2-container--disabled .select2-selection--multiple {
231
  background-color: #eee;
232
  cursor: default; }
233
+
234
  .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
235
  display: none; }
236
+
237
  .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
238
  border-top-left-radius: 0;
239
  border-top-right-radius: 0; }
240
+
241
  .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
242
  border-bottom-left-radius: 0;
243
  border-bottom-right-radius: 0; }
244
+
245
  .select2-container--default .select2-search--dropdown .select2-search__field {
246
  border: 1px solid #aaa; }
247
+
248
  .select2-container--default .select2-search--inline .select2-search__field {
249
  background: transparent;
250
  border: none;
251
+ outline: 0;
252
+ box-shadow: none;
253
+ -webkit-appearance: textfield; }
254
+
255
  .select2-container--default .select2-results > .select2-results__options {
256
  max-height: 200px;
257
  overflow-y: auto; }
258
+
259
  .select2-container--default .select2-results__option[role=group] {
260
  padding: 0; }
261
+
262
  .select2-container--default .select2-results__option[aria-disabled=true] {
263
  color: #999; }
264
+
265
  .select2-container--default .select2-results__option[aria-selected=true] {
266
  background-color: #ddd; }
267
+
268
  .select2-container--default .select2-results__option .select2-results__option {
269
  padding-left: 1em; }
270
  .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
284
  .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
285
  margin-left: -5em;
286
  padding-left: 6em; }
287
+
288
  .select2-container--default .select2-results__option--highlighted[aria-selected] {
289
  background-color: #5897fb;
290
  color: white; }
291
+
292
  .select2-container--default .select2-results__group {
293
  cursor: default;
294
  display: block;
295
  padding: 6px; }
296
 
297
  .select2-container--classic .select2-selection--single {
298
+ background-color: #f7f7f7;
299
  border: 1px solid #aaa;
300
  border-radius: 4px;
301
  outline: 0;
302
+ background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
303
+ background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
304
+ background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
305
  background-repeat: repeat-x;
306
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
307
  .select2-container--classic .select2-selection--single:focus {
308
  border: 1px solid #5897fb; }
309
  .select2-container--classic .select2-selection--single .select2-selection__rendered {
331
  background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
332
  background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
333
  background-repeat: repeat-x;
334
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
335
  .select2-container--classic .select2-selection--single .select2-selection__arrow b {
336
  border-color: #888 transparent transparent transparent;
337
  border-style: solid;
343
  position: absolute;
344
  top: 50%;
345
  width: 0; }
346
+
347
  .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
348
  float: left; }
349
+
350
  .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
351
  border: none;
352
  border-right: 1px solid #aaa;
355
  border-bottom-left-radius: 4px;
356
  left: 1px;
357
  right: auto; }
358
+
359
  .select2-container--classic.select2-container--open .select2-selection--single {
360
  border: 1px solid #5897fb; }
361
  .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
364
  .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
365
  border-color: transparent transparent #888 transparent;
366
  border-width: 0 4px 5px 4px; }
367
+
368
  .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
369
  border-top: none;
370
  border-top-left-radius: 0;
371
  border-top-right-radius: 0;
372
+ background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
373
+ background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
374
+ background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
375
  background-repeat: repeat-x;
376
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
377
+
378
  .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
379
  border-bottom: none;
380
  border-bottom-left-radius: 0;
381
  border-bottom-right-radius: 0;
382
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
383
+ background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
384
+ background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
385
  background-repeat: repeat-x;
386
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
387
+
388
  .select2-container--classic .select2-selection--multiple {
389
  background-color: white;
390
  border: 1px solid #aaa;
416
  margin-right: 2px; }
417
  .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
418
  color: #555; }
419
+
420
  .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
421
  float: right; }
422
+
423
  .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
424
  margin-left: 5px;
425
  margin-right: auto; }
426
+
427
  .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
428
  margin-left: 2px;
429
  margin-right: auto; }
430
+
431
  .select2-container--classic.select2-container--open .select2-selection--multiple {
432
  border: 1px solid #5897fb; }
433
+
434
  .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
435
  border-top: none;
436
  border-top-left-radius: 0;
437
  border-top-right-radius: 0; }
438
+
439
  .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
440
  border-bottom: none;
441
  border-bottom-left-radius: 0;
442
  border-bottom-right-radius: 0; }
443
+
444
  .select2-container--classic .select2-search--dropdown .select2-search__field {
445
  border: 1px solid #aaa;
446
  outline: 0; }
447
+
448
  .select2-container--classic .select2-search--inline .select2-search__field {
449
+ outline: 0;
450
+ box-shadow: none; }
451
+
452
  .select2-container--classic .select2-dropdown {
453
  background-color: white;
454
  border: 1px solid transparent; }
455
+
456
  .select2-container--classic .select2-dropdown--above {
457
  border-bottom: none; }
458
+
459
  .select2-container--classic .select2-dropdown--below {
460
  border-top: none; }
461
+
462
  .select2-container--classic .select2-results > .select2-results__options {
463
  max-height: 200px;
464
  overflow-y: auto; }
465
+
466
  .select2-container--classic .select2-results__option[role=group] {
467
  padding: 0; }
468
+
469
  .select2-container--classic .select2-results__option[aria-disabled=true] {
470
  color: grey; }
471
+
472
  .select2-container--classic .select2-results__option--highlighted[aria-selected] {
473
  background-color: #3875d7;
474
  color: white; }
475
+
476
  .select2-container--classic .select2-results__group {
477
  cursor: default;
478
  display: block;
479
  padding: 6px; }
480
+
481
  .select2-container--classic.select2-container--open .select2-dropdown {
482
  border-color: #5897fb; }
assets/css/vendor/select2.min.css CHANGED
@@ -1 +1 @@
1
- .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none;}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px;}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none;}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap;}.select2-container .select2-search--inline{float:left;}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none;}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051;}.select2-results{display:block;}.select2-results__options{list-style:none;margin:0;padding:0;}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none;}.select2-results__option[aria-selected]{cursor:pointer;}.select2-container--open .select2-dropdown{left:0;}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0;}.select2-search--dropdown{display:block;padding:4px;}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box;}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none;}.select2-search--dropdown.select2-search--hide{display:none;}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0);}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px;}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px;}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999;}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px;}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0;}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left;}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto;}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default;}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none;}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px;}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%;}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left;}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px;}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px;}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333;}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder{float:right;}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto;}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0;}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default;}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none;}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0;}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0;}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa;}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto;}.select2-container--default .select2-results__option[role=group]{padding:0;}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999;}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd;}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em;}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0;}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em;}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em;}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em;}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em;}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em;}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white;}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;}.select2-container--classic .select2-selection--single{background-color:#f6f6f6;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #ffffff 50%, #eeeeee 100%);background-image:-o-linear-gradient(top, #ffffff 50%, #eeeeee 100%);background-image:linear-gradient(to bottom, #ffffff 50%, #eeeeee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb;}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px;}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px;}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999;}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#cccccc', GradientType=0);}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0;}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left;}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto;}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb;}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none;}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px;}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #ffffff 0%, #eeeeee 50%);background-image:-o-linear-gradient(top, #ffffff 0%, #eeeeee 50%);background-image:linear-gradient(to bottom, #ffffff 0%, #eeeeee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eeeeee 50%, #ffffff 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, #ffffff 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, #ffffff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0;}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb;}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px;}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none;}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px;}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px;}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto;}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb;}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0;}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0;}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;}.select2-container--classic .select2-dropdown{background-color:white;border:1px solid transparent;}.select2-container--classic .select2-dropdown--above{border-bottom:none;}.select2-container--classic .select2-dropdown--below{border-top:none;}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto;}.select2-container--classic .select2-results__option[role=group]{padding:0;}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey;}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:white;}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px;}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb;}
1
+ .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
assets/js/admin-add-calendar.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.12
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.13
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
assets/js/admin.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.12
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.13
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
assets/js/default-calendar.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.0.12
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.0.13
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2016
4
  * Licensed GPLv2+ */
assets/js/vendor/imagesloaded.min.js DELETED
@@ -1,7 +0,0 @@
1
- /*!
2
- * imagesLoaded PACKAGED v3.1.8
3
- * JavaScript is all like "You images are done yet or what?"
4
- * MIT License
5
- */
6
-
7
- (function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s});
 
 
 
 
 
 
 
assets/js/vendor/{imagesloaded.js → imagesloaded.pkgd.js} RENAMED
@@ -1,10 +1,9 @@
1
  /*!
2
- * imagesLoaded PACKAGED v3.1.8
3
  * JavaScript is all like "You images are done yet or what?"
4
  * MIT License
5
  */
6
 
7
-
8
  /*!
9
  * EventEmitter v4.2.6 - git.io/ee
10
  * Oliver Caldwell
@@ -13,7 +12,7 @@
13
  */
14
 
15
  (function () {
16
-
17
 
18
  /**
19
  * Class for managing events.
@@ -557,17 +556,17 @@ if ( typeof define === 'function' && define.amd ) {
557
  })( this );
558
 
559
  /*!
560
- * imagesLoaded v3.1.8
561
  * JavaScript is all like "You images are done yet or what?"
562
  * MIT License
563
  */
564
 
565
- ( function( window, factory ) {
566
  // universal module definition
567
 
568
  /*global define: false, module: false, require: false */
569
 
570
- if ( typeof define === 'function' && define.amd ) {
571
  // AMD
572
  define( [
573
  'eventEmitter/EventEmitter',
@@ -575,7 +574,7 @@ if ( typeof define === 'function' && define.amd ) {
575
  ], function( EventEmitter, eventie ) {
576
  return factory( window, EventEmitter, eventie );
577
  });
578
- } else if ( typeof exports === 'object' ) {
579
  // CommonJS
580
  module.exports = factory(
581
  window,
@@ -601,7 +600,6 @@ function factory( window, EventEmitter, eventie ) {
601
 
602
  var $ = window.jQuery;
603
  var console = window.console;
604
- var hasConsole = typeof console !== 'undefined';
605
 
606
  // -------------------------- helpers -------------------------- //
607
 
@@ -615,7 +613,7 @@ function extend( a, b ) {
615
 
616
  var objToString = Object.prototype.toString;
617
  function isArray( obj ) {
618
- return objToString.call( obj ) === '[object Array]';
619
  }
620
 
621
  // turn element or nodeList into an array
@@ -624,9 +622,9 @@ function makeArray( obj ) {
624
  if ( isArray( obj ) ) {
625
  // use object if already an array
626
  ary = obj;
627
- } else if ( typeof obj.length === 'number' ) {
628
  // convert nodeList to array
629
- for ( var i=0, len = obj.length; i < len; i++ ) {
630
  ary.push( obj[i] );
631
  }
632
  } else {
@@ -646,17 +644,17 @@ function makeArray( obj ) {
646
  function ImagesLoaded( elem, options, onAlways ) {
647
  // coerce ImagesLoaded() without new, to be new ImagesLoaded()
648
  if ( !( this instanceof ImagesLoaded ) ) {
649
- return new ImagesLoaded( elem, options );
650
  }
651
  // use elem as selector string
652
- if ( typeof elem === 'string' ) {
653
  elem = document.querySelectorAll( elem );
654
  }
655
 
656
  this.elements = makeArray( elem );
657
  this.options = extend( {}, this.options );
658
 
659
- if ( typeof options === 'function' ) {
660
  onAlways = options;
661
  } else {
662
  extend( this.options, options );
@@ -688,27 +686,73 @@ function makeArray( obj ) {
688
  this.images = [];
689
 
690
  // filter & find items if we have an item selector
691
- for ( var i=0, len = this.elements.length; i < len; i++ ) {
692
  var elem = this.elements[i];
693
- // filter siblings
694
- if ( elem.nodeName === 'IMG' ) {
695
- this.addImage( elem );
696
- }
697
- // find children
698
- // no non-element nodes, #143
699
- var nodeType = elem.nodeType;
700
- if ( !nodeType || !( nodeType === 1 || nodeType === 9 || nodeType === 11 ) ) {
701
- continue;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
702
  }
703
- var childElems = elem.querySelectorAll('img');
704
- // concat childElems to filterFound array
705
- for ( var j=0, jLen = childElems.length; j < jLen; j++ ) {
706
- var img = childElems[j];
707
- this.addImage( img );
 
 
 
 
 
 
 
 
 
 
 
 
 
708
  }
 
709
  }
710
  };
711
 
 
 
 
 
 
712
  /**
713
  * @param {Image} img
714
  */
@@ -717,74 +761,64 @@ function makeArray( obj ) {
717
  this.images.push( loadingImage );
718
  };
719
 
 
 
 
 
 
720
  ImagesLoaded.prototype.check = function() {
721
  var _this = this;
722
- var checkedCount = 0;
723
- var length = this.images.length;
724
  this.hasAnyBroken = false;
725
  // complete if no images
726
- if ( !length ) {
727
  this.complete();
728
  return;
729
  }
730
 
731
- function onConfirm( image, message ) {
732
- if ( _this.options.debug && hasConsole ) {
733
- console.log( 'confirm', image, message );
734
- }
735
-
736
- _this.progress( image );
737
- checkedCount++;
738
- if ( checkedCount === length ) {
739
- _this.complete();
740
- }
741
- return true; // bind once
742
  }
743
 
744
- for ( var i=0; i < length; i++ ) {
745
  var loadingImage = this.images[i];
746
- loadingImage.on( 'confirm', onConfirm );
747
  loadingImage.check();
748
  }
749
  };
750
 
751
- ImagesLoaded.prototype.progress = function( image ) {
 
752
  this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
753
- // HACK - Chrome triggers event before object properties have changed. #83
754
- var _this = this;
755
- setTimeout( function() {
756
- _this.emit( 'progress', _this, image );
757
- if ( _this.jqDeferred && _this.jqDeferred.notify ) {
758
- _this.jqDeferred.notify( _this, image );
759
- }
760
- });
 
 
 
 
 
761
  };
762
 
763
  ImagesLoaded.prototype.complete = function() {
764
  var eventName = this.hasAnyBroken ? 'fail' : 'done';
765
  this.isComplete = true;
766
- var _this = this;
767
- // HACK - another setTimeout so that confirm happens after progress
768
- setTimeout( function() {
769
- _this.emit( eventName, _this );
770
- _this.emit( 'always', _this );
771
- if ( _this.jqDeferred ) {
772
- var jqMethod = _this.hasAnyBroken ? 'reject' : 'resolve';
773
- _this.jqDeferred[ jqMethod ]( _this );
774
- }
775
- });
776
  };
777
 
778
- // -------------------------- jquery -------------------------- //
779
-
780
- if ( $ ) {
781
- $.fn.imagesLoaded = function( options, callback ) {
782
- var instance = new ImagesLoaded( this, options, callback );
783
- return instance.jqDeferred.promise( $(this) );
784
- };
785
- }
786
-
787
-
788
  // -------------------------- -------------------------- //
789
 
790
  function LoadingImage( img ) {
@@ -794,100 +828,115 @@ function makeArray( obj ) {
794
  LoadingImage.prototype = new EventEmitter();
795
 
796
  LoadingImage.prototype.check = function() {
797
- // first check cached any previous images that have same src
798
- var resource = cache[ this.img.src ] || new Resource( this.img.src );
799
- if ( resource.isConfirmed ) {
800
- this.confirm( resource.isLoaded, 'cached was confirmed' );
801
- return;
802
- }
803
-
804
  // If complete is true and browser supports natural sizes,
805
  // try to check for image status manually.
806
- if ( this.img.complete && this.img.naturalWidth !== undefined ) {
 
807
  // report based on naturalWidth
808
  this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
809
  return;
810
  }
811
 
812
  // If none of the checks above matched, simulate loading on detached element.
813
- var _this = this;
814
- resource.on( 'confirm', function( resrc, message ) {
815
- _this.confirm( resrc.isLoaded, message );
816
- return true;
817
- });
 
 
 
818
 
819
- resource.check();
 
820
  };
821
 
822
  LoadingImage.prototype.confirm = function( isLoaded, message ) {
823
  this.isLoaded = isLoaded;
824
- this.emit( 'confirm', this, message );
825
- };
826
-
827
- // -------------------------- Resource -------------------------- //
828
-
829
- // Resource checks each src, only once
830
- // separate class from LoadingImage to prevent memory leaks. See #115
831
-
832
- var cache = {};
833
-
834
- function Resource( src ) {
835
- this.src = src;
836
- // add to cache
837
- cache[ src ] = this;
838
- }
839
-
840
- Resource.prototype = new EventEmitter();
841
-
842
- Resource.prototype.check = function() {
843
- // only trigger checking once
844
- if ( this.isChecked ) {
845
- return;
846
- }
847
- // simulate loading on detached element
848
- var proxyImage = new Image();
849
- eventie.bind( proxyImage, 'load', this );
850
- eventie.bind( proxyImage, 'error', this );
851
- proxyImage.src = this.src;
852
- // set flag
853
- this.isChecked = true;
854
  };
855
 
856
  // ----- events ----- //
857
 
858
  // trigger specified handler for event type
859
- Resource.prototype.handleEvent = function( event ) {
860
  var method = 'on' + event.type;
861
  if ( this[ method ] ) {
862
  this[ method ]( event );
863
  }
864
  };
865
 
866
- Resource.prototype.onload = function( event ) {
867
  this.confirm( true, 'onload' );
868
- this.unbindProxyEvents( event );
869
  };
870
 
871
- Resource.prototype.onerror = function( event ) {
872
  this.confirm( false, 'onerror' );
873
- this.unbindProxyEvents( event );
 
 
 
 
 
 
 
874
  };
875
 
876
- // ----- confirm ----- //
 
 
 
 
 
 
 
 
 
877
 
878
- Resource.prototype.confirm = function( isLoaded, message ) {
879
- this.isConfirmed = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
880
  this.isLoaded = isLoaded;
881
- this.emit( 'confirm', this, message );
882
  };
883
 
884
- Resource.prototype.unbindProxyEvents = function( event ) {
885
- eventie.unbind( event.target, 'load', this );
886
- eventie.unbind( event.target, 'error', this );
 
 
 
 
 
 
 
 
 
 
 
887
  };
 
 
888
 
889
- // ----- ----- //
890
 
891
  return ImagesLoaded;
892
 
893
  });
 
1
  /*!
2
+ * imagesLoaded PACKAGED v3.2.0
3
  * JavaScript is all like "You images are done yet or what?"
4
  * MIT License
5
  */
6
 
 
7
  /*!
8
  * EventEmitter v4.2.6 - git.io/ee
9
  * Oliver Caldwell
12
  */
13
 
14
  (function () {
15
+ 'use strict';
16
 
17
  /**
18
  * Class for managing events.
556
  })( this );
557
 
558
  /*!
559
+ * imagesLoaded v3.2.0
560
  * JavaScript is all like "You images are done yet or what?"
561
  * MIT License
562
  */
563
 
564
+ ( function( window, factory ) { 'use strict';
565
  // universal module definition
566
 
567
  /*global define: false, module: false, require: false */
568
 
569
+ if ( typeof define == 'function' && define.amd ) {
570
  // AMD
571
  define( [
572
  'eventEmitter/EventEmitter',
574
  ], function( EventEmitter, eventie ) {
575
  return factory( window, EventEmitter, eventie );
576
  });
577
+ } else if ( typeof module == 'object' && module.exports ) {
578
  // CommonJS
579
  module.exports = factory(
580
  window,
600
 
601
  var $ = window.jQuery;
602
  var console = window.console;
 
603
 
604
  // -------------------------- helpers -------------------------- //
605
 
613
 
614
  var objToString = Object.prototype.toString;
615
  function isArray( obj ) {
616
+ return objToString.call( obj ) == '[object Array]';
617
  }
618
 
619
  // turn element or nodeList into an array
622
  if ( isArray( obj ) ) {
623
  // use object if already an array
624
  ary = obj;
625
+ } else if ( typeof obj.length == 'number' ) {
626
  // convert nodeList to array
627
+ for ( var i=0; i < obj.length; i++ ) {
628
  ary.push( obj[i] );
629
  }
630
  } else {
644
  function ImagesLoaded( elem, options, onAlways ) {
645
  // coerce ImagesLoaded() without new, to be new ImagesLoaded()
646
  if ( !( this instanceof ImagesLoaded ) ) {
647
+ return new ImagesLoaded( elem, options, onAlways );
648
  }
649
  // use elem as selector string
650
+ if ( typeof elem == 'string' ) {
651
  elem = document.querySelectorAll( elem );
652
  }
653
 
654
  this.elements = makeArray( elem );
655
  this.options = extend( {}, this.options );
656
 
657
+ if ( typeof options == 'function' ) {
658
  onAlways = options;
659
  } else {
660
  extend( this.options, options );
686
  this.images = [];
687
 
688
  // filter & find items if we have an item selector
689
+ for ( var i=0; i < this.elements.length; i++ ) {
690
  var elem = this.elements[i];
691
+ this.addElementImages( elem );
692
+ }
693
+ };
694
+
695
+ /**
696
+ * @param {Node} element
697
+ */
698
+ ImagesLoaded.prototype.addElementImages = function( elem ) {
699
+ // filter siblings
700
+ if ( elem.nodeName == 'IMG' ) {
701
+ this.addImage( elem );
702
+ }
703
+ // get background image on element
704
+ if ( this.options.background === true ) {
705
+ this.addElementBackgroundImages( elem );
706
+ }
707
+
708
+ // find children
709
+ // no non-element nodes, #143
710
+ var nodeType = elem.nodeType;
711
+ if ( !nodeType || !elementNodeTypes[ nodeType ] ) {
712
+ return;
713
+ }
714
+ var childImgs = elem.querySelectorAll('img');
715
+ // concat childElems to filterFound array
716
+ for ( var i=0; i < childImgs.length; i++ ) {
717
+ var img = childImgs[i];
718
+ this.addImage( img );
719
+ }
720
+
721
+ // get child background images
722
+ if ( typeof this.options.background == 'string' ) {
723
+ var children = elem.querySelectorAll( this.options.background );
724
+ for ( i=0; i < children.length; i++ ) {
725
+ var child = children[i];
726
+ this.addElementBackgroundImages( child );
727
  }
728
+ }
729
+ };
730
+
731
+ var elementNodeTypes = {
732
+ 1: true,
733
+ 9: true,
734
+ 11: true
735
+ };
736
+
737
+ ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {
738
+ var style = getStyle( elem );
739
+ // get url inside url("...")
740
+ var reURL = /url\(['"]*([^'"\)]+)['"]*\)/gi;
741
+ var matches = reURL.exec( style.backgroundImage );
742
+ while ( matches !== null ) {
743
+ var url = matches && matches[1];
744
+ if ( url ) {
745
+ this.addBackground( url, elem );
746
  }
747
+ matches = reURL.exec( style.backgroundImage );
748
  }
749
  };
750
 
751
+ // IE8
752
+ var getStyle = window.getComputedStyle || function( elem ) {
753
+ return elem.currentStyle;
754
+ };
755
+
756
  /**
757
  * @param {Image} img
758
  */
761
  this.images.push( loadingImage );
762
  };
763
 
764
+ ImagesLoaded.prototype.addBackground = function( url, elem ) {
765
+ var background = new Background( url, elem );
766
+ this.images.push( background );
767
+ };
768
+
769
  ImagesLoaded.prototype.check = function() {
770
  var _this = this;
771
+ this.progressedCount = 0;
 
772
  this.hasAnyBroken = false;
773
  // complete if no images
774
+ if ( !this.images.length ) {
775
  this.complete();
776
  return;
777
  }
778
 
779
+ function onProgress( image, elem, message ) {
780
+ // HACK - Chrome triggers event before object properties have changed. #83
781
+ setTimeout( function() {
782
+ _this.progress( image, elem, message );
783
+ });
 
 
 
 
 
 
784
  }
785
 
786
+ for ( var i=0; i < this.images.length; i++ ) {
787
  var loadingImage = this.images[i];
788
+ loadingImage.once( 'progress', onProgress );
789
  loadingImage.check();
790
  }
791
  };
792
 
793
+ ImagesLoaded.prototype.progress = function( image, elem, message ) {
794
+ this.progressedCount++;
795
  this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
796
+ // progress event
797
+ this.emit( 'progress', this, image, elem );
798
+ if ( this.jqDeferred && this.jqDeferred.notify ) {
799
+ this.jqDeferred.notify( this, image );
800
+ }
801
+ // check if completed
802
+ if ( this.progressedCount == this.images.length ) {
803
+ this.complete();
804
+ }
805
+
806
+ if ( this.options.debug && console ) {
807
+ console.log( 'progress: ' + message, image, elem );
808
+ }
809
  };
810
 
811
  ImagesLoaded.prototype.complete = function() {
812
  var eventName = this.hasAnyBroken ? 'fail' : 'done';
813
  this.isComplete = true;
814
+ this.emit( eventName, this );
815
+ this.emit( 'always', this );
816
+ if ( this.jqDeferred ) {
817
+ var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
818
+ this.jqDeferred[ jqMethod ]( this );
819
+ }
 
 
 
 
820
  };
821
 
 
 
 
 
 
 
 
 
 
 
822
  // -------------------------- -------------------------- //
823
 
824
  function LoadingImage( img ) {
828
  LoadingImage.prototype = new EventEmitter();
829
 
830
  LoadingImage.prototype.check = function() {
 
 
 
 
 
 
 
831
  // If complete is true and browser supports natural sizes,
832
  // try to check for image status manually.
833
+ var isComplete = this.getIsImageComplete();
834
+ if ( isComplete ) {
835
  // report based on naturalWidth
836
  this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
837
  return;
838
  }
839
 
840
  // If none of the checks above matched, simulate loading on detached element.
841
+ this.proxyImage = new Image();
842
+ eventie.bind( this.proxyImage, 'load', this );
843
+ eventie.bind( this.proxyImage, 'error', this );
844
+ // bind to image as well for Firefox. #191
845
+ eventie.bind( this.img, 'load', this );
846
+ eventie.bind( this.img, 'error', this );
847
+ this.proxyImage.src = this.img.src;
848
+ };
849
 
850
+ LoadingImage.prototype.getIsImageComplete = function() {
851
+ return this.img.complete && this.img.naturalWidth !== undefined;
852
  };
853
 
854
  LoadingImage.prototype.confirm = function( isLoaded, message ) {
855
  this.isLoaded = isLoaded;
856
+ this.emit( 'progress', this, this.img, message );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
857
  };
858
 
859
  // ----- events ----- //
860
 
861
  // trigger specified handler for event type
862
+ LoadingImage.prototype.handleEvent = function( event ) {
863
  var method = 'on' + event.type;
864
  if ( this[ method ] ) {
865
  this[ method ]( event );
866
  }
867
  };
868
 
869
+ LoadingImage.prototype.onload = function() {
870
  this.confirm( true, 'onload' );
871
+ this.unbindEvents();
872
  };
873
 
874
+ LoadingImage.prototype.onerror = function() {
875
  this.confirm( false, 'onerror' );
876
+ this.unbindEvents();
877
+ };
878
+
879
+ LoadingImage.prototype.unbindEvents = function() {
880
+ eventie.unbind( this.proxyImage, 'load', this );
881
+ eventie.unbind( this.proxyImage, 'error', this );
882
+ eventie.unbind( this.img, 'load', this );
883
+ eventie.unbind( this.img, 'error', this );
884
  };
885
 
886
+ // -------------------------- Background -------------------------- //
887
+
888
+ function Background( url, element ) {
889
+ this.url = url;
890
+ this.element = element;
891
+ this.img = new Image();
892
+ }
893
+
894
+ // inherit LoadingImage prototype
895
+ Background.prototype = new LoadingImage();
896
 
897
+ Background.prototype.check = function() {
898
+ eventie.bind( this.img, 'load', this );
899
+ eventie.bind( this.img, 'error', this );
900
+ this.img.src = this.url;
901
+ // check if image is already complete
902
+ var isComplete = this.getIsImageComplete();
903
+ if ( isComplete ) {
904
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
905
+ this.unbindEvents();
906
+ }
907
+ };
908
+
909
+ Background.prototype.unbindEvents = function() {
910
+ eventie.unbind( this.img, 'load', this );
911
+ eventie.unbind( this.img, 'error', this );
912
+ };
913
+
914
+ Background.prototype.confirm = function( isLoaded, message ) {
915
  this.isLoaded = isLoaded;
916
+ this.emit( 'progress', this, this.element, message );
917
  };
918
 
919
+ // -------------------------- jQuery -------------------------- //
920
+
921
+ ImagesLoaded.makeJQueryPlugin = function( jQuery ) {
922
+ jQuery = jQuery || window.jQuery;
923
+ if ( !jQuery ) {
924
+ return;
925
+ }
926
+ // set local variable
927
+ $ = jQuery;
928
+ // $().imagesLoaded()
929
+ $.fn.imagesLoaded = function( options, callback ) {
930
+ var instance = new ImagesLoaded( this, options, callback );
931
+ return instance.jqDeferred.promise( $(this) );
932
+ };
933
  };
934
+ // try making plugin
935
+ ImagesLoaded.makeJQueryPlugin();
936
 
937
+ // -------------------------- -------------------------- //
938
 
939
  return ImagesLoaded;
940
 
941
  });
942
+
assets/js/vendor/imagesloaded.pkgd.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*!
2
+ * imagesLoaded PACKAGED v3.2.0
3
+ * JavaScript is all like "You images are done yet or what?"
4
+ * MIT License
5
+ */
6
+
7
+ (function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),s="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(s?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,s=this.getListenersAsObject(e);for(r in s)s.hasOwnProperty(r)&&(i=t(s[r],n),-1!==i&&s[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,s=e?this.removeListener:this.addListener,o=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)s.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?s.call(this,i,r):o.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,s,o=this.getListenersAsObject(e);for(r in o)if(o.hasOwnProperty(r))for(i=o[r].length;i--;)n=o[r][i],n.once===!0&&this.removeListener(e,n.listener),s=n.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=s,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var s={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",s):e.eventie=s}(this),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"==f.call(e)}function s(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e);return t}function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=s(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),u&&(this.jqDeferred=new u.Deferred);var r=this;setTimeout(function(){r.check()})}function h(e){this.img=e}function a(e,t){this.url=e,this.element=t,this.img=new Image}var u=e.jQuery,c=e.console,f=Object.prototype.toString;o.prototype=new t,o.prototype.options={},o.prototype.getImages=function(){this.images=[];for(var e=0;e<this.elements.length;e++){var t=this.elements[e];this.addElementImages(t)}},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&d[t]){for(var n=e.querySelectorAll("img"),i=0;i<n.length;i++){var r=n[i];this.addImage(r)}if("string"==typeof this.options.background){var s=e.querySelectorAll(this.options.background);for(i=0;i<s.length;i++){var o=s[i];this.addElementBackgroundImages(o)}}}};var d={1:!0,9:!0,11:!0};o.prototype.addElementBackgroundImages=function(e){for(var t=m(e),n=/url\(['"]*([^'"\)]+)['"]*\)/gi,i=n.exec(t.backgroundImage);null!==i;){var r=i&&i[1];r&&this.addBackground(r,e),i=n.exec(t.backgroundImage)}};var m=e.getComputedStyle||function(e){return e.currentStyle};return o.prototype.addImage=function(e){var t=new h(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var n=new a(e,t);this.images.push(n)},o.prototype.check=function(){function e(e,n,i){setTimeout(function(){t.progress(e,n,i)})}var t=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();for(var n=0;n<this.images.length;n++){var i=this.images[n];i.once("progress",e),i.check()}},o.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emit("progress",this,e,t),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&c&&c.log("progress: "+n,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emit(e,this),this.emit("always",this),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=new t,h.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,n.bind(this.proxyImage,"load",this),n.bind(this.proxyImage,"error",this),n.bind(this.img,"load",this),n.bind(this.img,"error",this),void(this.proxyImage.src=this.img.src))},h.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},h.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("progress",this,this.img,t)},h.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){n.unbind(this.proxyImage,"load",this),n.unbind(this.proxyImage,"error",this),n.unbind(this.img,"load",this),n.unbind(this.img,"error",this)},a.prototype=new h,a.prototype.check=function(){n.bind(this.img,"load",this),n.bind(this.img,"error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},a.prototype.unbindEvents=function(){n.unbind(this.img,"load",this),n.unbind(this.img,"error",this)},a.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("progress",this,this.element,t)},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(u=t,u.fn.imagesLoaded=function(e,t){var n=new o(this,e,t);return n.jqDeferred.promise(u(this))})},o.makeJQueryPlugin(),o});
assets/js/vendor/{qtip.js → jquery.qtip.js} RENAMED
@@ -94,211 +94,211 @@ BROWSER = {
94
  .replace('undefined', '3_2').replace('_', '.').replace('_', '')
95
  ) || FALSE
96
  };
97
- ;function QTip(target, options, id, attr) {
98
- // Elements and ID
99
- this.id = id;
100
- this.target = target;
101
- this.tooltip = NULL;
102
- this.elements = { target: target };
103
-
104
- // Internal constructs
105
- this._id = NAMESPACE + '-' + id;
106
- this.timers = { img: {} };
107
- this.options = options;
108
- this.plugins = {};
109
-
110
- // Cache object
111
- this.cache = {
112
- event: {},
113
- target: $(),
114
- disabled: FALSE,
115
- attr: attr,
116
- onTooltip: FALSE,
117
- lastClass: ''
118
- };
119
-
120
- // Set the initial flags
121
- this.rendered = this.destroyed = this.disabled = this.waiting =
122
- this.hiddenDuringWait = this.positioning = this.triggering = FALSE;
123
- }
124
- PROTOTYPE = QTip.prototype;
125
-
126
- PROTOTYPE._when = function(deferreds) {
127
- return $.when.apply($, deferreds);
128
- };
129
-
130
- PROTOTYPE.render = function(show) {
131
- if(this.rendered || this.destroyed) { return this; } // If tooltip has already been rendered, exit
132
-
133
- var self = this,
134
- options = this.options,
135
- cache = this.cache,
136
- elements = this.elements,
137
- text = options.content.text,
138
- title = options.content.title,
139
- button = options.content.button,
140
- posOptions = options.position,
141
- namespace = '.'+this._id+' ',
142
- deferreds = [],
143
- tooltip;
144
-
145
- // Add ARIA attributes to target
146
- $.attr(this.target[0], 'aria-describedby', this._id);
147
-
148
- // Create public position object that tracks current position corners
149
- cache.posClass = this._createPosClass(
150
- (this.position = { my: posOptions.my, at: posOptions.at }).my
151
- );
152
-
153
- // Create tooltip element
154
- this.tooltip = elements.tooltip = tooltip = $('<div/>', {
155
- 'id': this._id,
156
- 'class': [ NAMESPACE, CLASS_DEFAULT, options.style.classes, cache.posClass ].join(' '),
157
- 'width': options.style.width || '',
158
- 'height': options.style.height || '',
159
- 'tracking': posOptions.target === 'mouse' && posOptions.adjust.mouse,
160
-
161
- /* ARIA specific attributes */
162
- 'role': 'alert',
163
- 'aria-live': 'polite',
164
- 'aria-atomic': FALSE,
165
- 'aria-describedby': this._id + '-content',
166
- 'aria-hidden': TRUE
167
- })
168
- .toggleClass(CLASS_DISABLED, this.disabled)
169
- .attr(ATTR_ID, this.id)
170
- .data(NAMESPACE, this)
171
- .appendTo(posOptions.container)
172
- .append(
173
- // Create content element
174
- elements.content = $('<div />', {
175
- 'class': NAMESPACE + '-content',
176
- 'id': this._id + '-content',
177
- 'aria-atomic': TRUE
178
- })
179
- );
180
-
181
- // Set rendered flag and prevent redundant reposition calls for now
182
- this.rendered = -1;
183
- this.positioning = TRUE;
184
-
185
- // Create title...
186
- if(title) {
187
- this._createTitle();
188
-
189
- // Update title only if its not a callback (called in toggle if so)
190
- if(!$.isFunction(title)) {
191
- deferreds.push( this._updateTitle(title, FALSE) );
192
- }
193
- }
194
-
195
- // Create button
196
- if(button) { this._createButton(); }
197
-
198
- // Set proper rendered flag and update content if not a callback function (called in toggle)
199
- if(!$.isFunction(text)) {
200
- deferreds.push( this._updateContent(text, FALSE) );
201
- }
202
- this.rendered = TRUE;
203
-
204
- // Setup widget classes
205
- this._setWidget();
206
-
207
- // Initialize 'render' plugins
208
- $.each(PLUGINS, function(name) {
209
- var instance;
210
- if(this.initialize === 'render' && (instance = this(self))) {
211
- self.plugins[name] = instance;
212
- }
213
- });
214
-
215
- // Unassign initial events and assign proper events
216
- this._unassignEvents();
217
- this._assignEvents();
218
-
219
- // When deferreds have completed
220
- this._when(deferreds).then(function() {
221
- // tooltiprender event
222
- self._trigger('render');
223
-
224
- // Reset flags
225
- self.positioning = FALSE;
226
-
227
- // Show tooltip if not hidden during wait period
228
- if(!self.hiddenDuringWait && (options.show.ready || show)) {
229
- self.toggle(TRUE, cache.event, FALSE);
230
- }
231
- self.hiddenDuringWait = FALSE;
232
- });
233
-
234
- // Expose API
235
- QTIP.api[this.id] = this;
236
-
237
- return this;
238
- };
239
-
240
- PROTOTYPE.destroy = function(immediate) {
241
- // Set flag the signify destroy is taking place to plugins
242
- // and ensure it only gets destroyed once!
243
- if(this.destroyed) { return this.target; }
244
-
245
- function process() {
246
- if(this.destroyed) { return; }
247
- this.destroyed = TRUE;
248
-
249
- var target = this.target,
250
- title = target.attr(oldtitle),
251
- timer;
252
-
253
- // Destroy tooltip if rendered
254
- if(this.rendered) {
255
- this.tooltip.stop(1,0).find('*').remove().end().remove();
256
- }
257
-
258
- // Destroy all plugins
259
- $.each(this.plugins, function(name) {
260
- this.destroy && this.destroy();
261
- });
262
-
263
- // Clear timers
264
- for(timer in this.timers) {
265
- clearTimeout(this.timers[timer]);
266
- }
267
-
268
- // Remove api object and ARIA attributes
269
- target.removeData(NAMESPACE)
270
- .removeAttr(ATTR_ID)
271
- .removeAttr(ATTR_HAS)
272
- .removeAttr('aria-describedby');
273
-
274
- // Reset old title attribute if removed
275
- if(this.options.suppress && title) {
276
- target.attr('title', title).removeAttr(oldtitle);
277
- }
278
-
279
- // Remove qTip events associated with this API
280
- this._unassignEvents();
281
-
282
- // Remove ID from used id objects, and delete object references
283
- // for better garbage collection and leak protection
284
- this.options = this.elements = this.cache = this.timers =
285
- this.plugins = this.mouse = NULL;
286
-
287
- // Delete epoxsed API object
288
- delete QTIP.api[this.id];
289
- }
290
-
291
- // If an immediate destory is needed
292
- if((immediate !== TRUE || this.triggering === 'hide') && this.rendered) {
293
- this.tooltip.one('tooltiphidden', $.proxy(process, this));
294
- !this.triggering && this.hide();
295
- }
296
-
297
- // If we're not in the process of hiding... process
298
- else { process.call(this); }
299
-
300
- return this.target;
301
- };
302
  ;function invalidOpt(a) {
303
  return a === NULL || $.type(a) !== 'object';
304
  }
94
  .replace('undefined', '3_2').replace('_', '.').replace('_', '')
95
  ) || FALSE
96
  };
97
+ ;function QTip(target, options, id, attr) {
98
+ // Elements and ID
99
+ this.id = id;
100
+ this.target = target;
101
+ this.tooltip = NULL;
102
+ this.elements = { target: target };
103
+
104
+ // Internal constructs
105
+ this._id = NAMESPACE + '-' + id;
106
+ this.timers = { img: {} };
107
+ this.options = options;
108
+ this.plugins = {};
109
+
110
+ // Cache object
111
+ this.cache = {
112
+ event: {},
113
+ target: $(),
114
+ disabled: FALSE,
115
+ attr: attr,
116
+ onTooltip: FALSE,
117
+ lastClass: ''
118
+ };
119
+
120
+ // Set the initial flags
121
+ this.rendered = this.destroyed = this.disabled = this.waiting =
122
+ this.hiddenDuringWait = this.positioning = this.triggering = FALSE;
123
+ }
124
+ PROTOTYPE = QTip.prototype;
125
+
126
+ PROTOTYPE._when = function(deferreds) {
127
+ return $.when.apply($, deferreds);
128
+ };
129
+
130
+ PROTOTYPE.render = function(show) {
131
+ if(this.rendered || this.destroyed) { return this; } // If tooltip has already been rendered, exit
132
+
133
+ var self = this,
134
+ options = this.options,
135
+ cache = this.cache,
136
+ elements = this.elements,
137
+ text = options.content.text,
138
+ title = options.content.title,
139
+ button = options.content.button,
140
+ posOptions = options.position,
141
+ namespace = '.'+this._id+' ',
142
+ deferreds = [],
143
+ tooltip;
144
+
145
+ // Add ARIA attributes to target
146
+ $.attr(this.target[0], 'aria-describedby', this._id);
147
+
148
+ // Create public position object that tracks current position corners
149
+ cache.posClass = this._createPosClass(
150
+ (this.position = { my: posOptions.my, at: posOptions.at }).my
151
+ );
152
+
153
+ // Create tooltip element
154
+ this.tooltip = elements.tooltip = tooltip = $('<div/>', {
155
+ 'id': this._id,
156
+ 'class': [ NAMESPACE, CLASS_DEFAULT, options.style.classes, cache.posClass ].join(' '),
157
+ 'width': options.style.width || '',
158
+ 'height': options.style.height || '',
159
+ 'tracking': posOptions.target === 'mouse' && posOptions.adjust.mouse,
160
+
161
+ /* ARIA specific attributes */
162
+ 'role': 'alert',
163
+ 'aria-live': 'polite',
164
+ 'aria-atomic': FALSE,
165
+ 'aria-describedby': this._id + '-content',
166
+ 'aria-hidden': TRUE
167
+ })
168
+ .toggleClass(CLASS_DISABLED, this.disabled)
169
+ .attr(ATTR_ID, this.id)
170
+ .data(NAMESPACE, this)
171
+ .appendTo(posOptions.container)
172
+ .append(
173
+ // Create content element
174
+ elements.content = $('<div />', {
175
+ 'class': NAMESPACE + '-content',
176
+ 'id': this._id + '-content',
177
+ 'aria-atomic': TRUE
178
+ })
179
+ );
180
+
181
+ // Set rendered flag and prevent redundant reposition calls for now
182
+ this.rendered = -1;
183
+ this.positioning = TRUE;
184
+
185
+ // Create title...
186
+ if(title) {
187
+ this._createTitle();
188
+
189
+ // Update title only if its not a callback (called in toggle if so)
190
+ if(!$.isFunction(title)) {
191
+ deferreds.push( this._updateTitle(title, FALSE) );
192
+ }
193
+ }
194
+
195
+ // Create button
196
+ if(button) { this._createButton(); }
197
+
198
+ // Set proper rendered flag and update content if not a callback function (called in toggle)
199
+ if(!$.isFunction(text)) {
200
+ deferreds.push( this._updateContent(text, FALSE) );
201
+ }
202
+ this.rendered = TRUE;
203
+
204
+ // Setup widget classes
205
+ this._setWidget();
206
+
207
+ // Initialize 'render' plugins
208
+ $.each(PLUGINS, function(name) {
209
+ var instance;
210
+ if(this.initialize === 'render' && (instance = this(self))) {
211
+ self.plugins[name] = instance;
212
+ }
213
+ });
214
+
215
+ // Unassign initial events and assign proper events
216
+ this._unassignEvents();
217
+ this._assignEvents();
218
+
219
+ // When deferreds have completed
220
+ this._when(deferreds).then(function() {
221
+ // tooltiprender event
222
+ self._trigger('render');
223
+
224
+ // Reset flags
225
+ self.positioning = FALSE;
226
+
227
+ // Show tooltip if not hidden during wait period
228
+ if(!self.hiddenDuringWait && (options.show.ready || show)) {
229
+ self.toggle(TRUE, cache.event, FALSE);
230
+ }
231
+ self.hiddenDuringWait = FALSE;
232
+ });
233
+
234
+ // Expose API
235
+ QTIP.api[this.id] = this;
236
+
237
+ return this;
238
+ };
239
+
240
+ PROTOTYPE.destroy = function(immediate) {
241
+ // Set flag the signify destroy is taking place to plugins
242
+ // and ensure it only gets destroyed once!
243
+ if(this.destroyed) { return this.target; }
244
+
245
+ function process() {
246
+ if(this.destroyed) { return; }
247
+ this.destroyed = TRUE;
248
+
249
+ var target = this.target,
250
+ title = target.attr(oldtitle),
251
+ timer;
252
+
253
+ // Destroy tooltip if rendered
254
+ if(this.rendered) {
255
+ this.tooltip.stop(1,0).find('*').remove().end().remove();
256
+ }
257
+
258
+ // Destroy all plugins
259
+ $.each(this.plugins, function(name) {
260
+ this.destroy && this.destroy();
261
+ });
262
+
263
+ // Clear timers
264
+ for(timer in this.timers) {
265
+ clearTimeout(this.timers[timer]);
266
+ }
267
+
268
+ // Remove api object and ARIA attributes
269
+ target.removeData(NAMESPACE)
270
+ .removeAttr(ATTR_ID)
271
+ .removeAttr(ATTR_HAS)
272
+ .removeAttr('aria-describedby');
273
+
274
+ // Reset old title attribute if removed
275
+ if(this.options.suppress && title) {
276
+ target.attr('title', title).removeAttr(oldtitle);
277
+ }
278
+
279
+ // Remove qTip events associated with this API
280
+ this._unassignEvents();
281
+
282
+ // Remove ID from used id objects, and delete object references
283
+ // for better garbage collection and leak protection
284
+ this.options = this.elements = this.cache = this.timers =
285
+ this.plugins = this.mouse = NULL;
286
+
287
+ // Delete epoxsed API object
288
+ delete QTIP.api[this.id];
289
+ }
290
+
291
+ // If an immediate destory is needed
292
+ if((immediate !== TRUE || this.triggering === 'hide') && this.rendered) {
293
+ this.tooltip.one('tooltiphidden', $.proxy(process, this));
294
+ !this.triggering && this.hide();
295
+ }
296
+
297
+ // If we're not in the process of hiding... process
298
+ else { process.call(this); }
299
+
300
+ return this.target;
301
+ };
302
  ;function invalidOpt(a) {
303
  return a === NULL || $.type(a) !== 'object';
304
  }
assets/js/vendor/{qtip.min.js → jquery.qtip.min.js} RENAMED
File without changes
assets/js/vendor/{tiptip.js → jquery.tipTip.js} RENAMED
File without changes
assets/js/vendor/{tiptip.min.js → jquery.tipTip.minified.js} RENAMED
File without changes
assets/js/vendor/select2.js CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
- * Select2 4.0.0
3
  * https://select2.github.io
4
  *
5
  * Released under the MIT license
@@ -30,7 +30,7 @@
30
  var S2;(function () { if (!S2 || !S2.requirejs) {
31
  if (!S2) { S2 = {}; } else { require = S2; }
32
  /**
33
- * @license almond 0.2.9 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
34
  * Available via the MIT or new BSD license.
35
  * see: http://github.com/jrburke/almond for details
36
  */
@@ -75,12 +75,6 @@ var requirejs, require, define;
75
  //otherwise, assume it is a top-level require that will
76
  //be relative to baseUrl in the end.
77
  if (baseName) {
78
- //Convert baseName to array, and lop off the last part,
79
- //so that . matches that "directory" and not name of the baseName's
80
- //module. For instance, baseName of "one/two/three", maps to
81
- //"one/two/three.js", but we want the directory, "one/two" for
82
- //this normalization.
83
- baseParts = baseParts.slice(0, baseParts.length - 1);
84
  name = name.split('/');
85
  lastIndex = name.length - 1;
86
 
@@ -89,7 +83,11 @@ var requirejs, require, define;
89
  name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
90
  }
91
 
92
- name = baseParts.concat(name);
 
 
 
 
93
 
94
  //start trimDots
95
  for (i = 0; i < name.length; i += 1) {
@@ -181,7 +179,15 @@ var requirejs, require, define;
181
  //A version of a require function that passes a moduleName
182
  //value for items that may need to
183
  //look up paths relative to the moduleName
184
- return req.apply(undef, aps.call(arguments, 0).concat([relName, forceSync]));
 
 
 
 
 
 
 
 
185
  };
186
  }
187
 
@@ -431,6 +437,9 @@ var requirejs, require, define;
431
  requirejs._defined = defined;
432
 
433
  define = function (name, deps, callback) {
 
 
 
434
 
435
  //This module may not have dependencies
436
  if (!deps.splice) {
@@ -773,7 +782,8 @@ S2.define('select2/results',[
773
  this.hideLoading();
774
 
775
  var $message = $(
776
- '<li role="treeitem" class="select2-results__option"></li>'
 
777
  );
778
 
779
  var message = this.options.get('translations').get(params.message);
@@ -784,9 +794,15 @@ S2.define('select2/results',[
784
  )
785
  );
786
 
 
 
787
  this.$results.append($message);
788
  };
789
 
 
 
 
 
790
  Results.prototype.append = function (data) {
791
  this.hideLoading();
792
 
@@ -986,6 +1002,7 @@ S2.define('select2/results',[
986
  });
987
 
988
  container.on('query', function (params) {
 
989
  self.showLoading(params);
990
  });
991
 
@@ -1041,7 +1058,7 @@ S2.define('select2/results',[
1041
  var data = $highlighted.data('data');
1042
 
1043
  if ($highlighted.attr('aria-selected') == 'true') {
1044
- self.trigger('close');
1045
  } else {
1046
  self.trigger('select', {
1047
  data: data
@@ -1163,7 +1180,7 @@ S2.define('select2/results',[
1163
  data: data
1164
  });
1165
  } else {
1166
- self.trigger('close');
1167
  }
1168
 
1169
  return;
@@ -1229,7 +1246,7 @@ S2.define('select2/results',[
1229
  var template = this.options.get('templateResult');
1230
  var escapeMarkup = this.options.get('escapeMarkup');
1231
 
1232
- var content = template(result);
1233
 
1234
  if (content == null) {
1235
  container.style.display = 'none';
@@ -1286,7 +1303,7 @@ S2.define('select2/selection/base',[
1286
  BaseSelection.prototype.render = function () {
1287
  var $selection = $(
1288
  '<span class="select2-selection" role="combobox" ' +
1289
- 'aria-autocomplete="list" aria-haspopup="true" aria-expanded="false">' +
1290
  '</span>'
1291
  );
1292
 
@@ -1319,7 +1336,7 @@ S2.define('select2/selection/base',[
1319
  });
1320
 
1321
  this.$selection.on('blur', function (evt) {
1322
- self.trigger('blur', evt);
1323
  });
1324
 
1325
  this.$selection.on('keydown', function (evt) {
@@ -1366,6 +1383,24 @@ S2.define('select2/selection/base',[
1366
  });
1367
  };
1368
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1369
  BaseSelection.prototype._attachCloseHandler = function (container) {
1370
  var self = this;
1371
 
@@ -1475,11 +1510,11 @@ S2.define('select2/selection/single',[
1475
  this.$selection.find('.select2-selection__rendered').empty();
1476
  };
1477
 
1478
- SingleSelection.prototype.display = function (data) {
1479
  var template = this.options.get('templateSelection');
1480
  var escapeMarkup = this.options.get('escapeMarkup');
1481
 
1482
- return escapeMarkup(template(data));
1483
  };
1484
 
1485
  SingleSelection.prototype.selectionContainer = function () {
@@ -1494,9 +1529,9 @@ S2.define('select2/selection/single',[
1494
 
1495
  var selection = data[0];
1496
 
1497
- var formatted = this.display(selection);
1498
-
1499
  var $rendered = this.$selection.find('.select2-selection__rendered');
 
 
1500
  $rendered.empty().append(formatted);
1501
  $rendered.prop('title', selection.title || selection.text);
1502
  };
@@ -1538,29 +1573,37 @@ S2.define('select2/selection/multiple',[
1538
  });
1539
  });
1540
 
1541
- this.$selection.on('click', '.select2-selection__choice__remove',
 
 
1542
  function (evt) {
1543
- var $remove = $(this);
1544
- var $selection = $remove.parent();
 
 
1545
 
1546
- var data = $selection.data('data');
 
1547
 
1548
- self.trigger('unselect', {
1549
- originalEvent: evt,
1550
- data: data
1551
- });
1552
- });
 
 
 
1553
  };
1554
 
1555
  MultipleSelection.prototype.clear = function () {
1556
  this.$selection.find('.select2-selection__rendered').empty();
1557
  };
1558
 
1559
- MultipleSelection.prototype.display = function (data) {
1560
  var template = this.options.get('templateSelection');
1561
  var escapeMarkup = this.options.get('escapeMarkup');
1562
 
1563
- return escapeMarkup(template(data));
1564
  };
1565
 
1566
  MultipleSelection.prototype.selectionContainer = function () {
@@ -1587,8 +1630,8 @@ S2.define('select2/selection/multiple',[
1587
  for (var d = 0; d < data.length; d++) {
1588
  var selection = data[d];
1589
 
1590
- var formatted = this.display(selection);
1591
  var $selection = this.selectionContainer();
 
1592
 
1593
  $selection.append(formatted);
1594
  $selection.prop('title', selection.title || selection.text);
@@ -1720,7 +1763,7 @@ S2.define('select2/selection/allowClear',[
1720
 
1721
  this.$element.val(this.placeholder.id).trigger('change');
1722
 
1723
- this.trigger('toggle');
1724
  };
1725
 
1726
  AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
@@ -1768,7 +1811,7 @@ S2.define('select2/selection/search',[
1768
  '<li class="select2-search select2-search--inline">' +
1769
  '<input class="select2-search__field" type="search" tabindex="-1"' +
1770
  ' autocomplete="off" autocorrect="off" autocapitalize="off"' +
1771
- ' spellcheck="false" role="textbox" />' +
1772
  '</li>'
1773
  );
1774
 
@@ -1777,6 +1820,8 @@ S2.define('select2/selection/search',[
1777
 
1778
  var $rendered = decorated.call(this);
1779
 
 
 
1780
  return $rendered;
1781
  };
1782
 
@@ -1786,32 +1831,39 @@ S2.define('select2/selection/search',[
1786
  decorated.call(this, container, $container);
1787
 
1788
  container.on('open', function () {
1789
- self.$search.attr('tabindex', 0);
1790
-
1791
- self.$search.focus();
1792
  });
1793
 
1794
  container.on('close', function () {
1795
- self.$search.attr('tabindex', -1);
1796
-
1797
  self.$search.val('');
1798
- self.$search.focus();
 
1799
  });
1800
 
1801
  container.on('enable', function () {
1802
  self.$search.prop('disabled', false);
 
 
1803
  });
1804
 
1805
  container.on('disable', function () {
1806
  self.$search.prop('disabled', true);
1807
  });
1808
 
 
 
 
 
 
 
 
 
1809
  this.$selection.on('focusin', '.select2-search--inline', function (evt) {
1810
  self.trigger('focus', evt);
1811
  });
1812
 
1813
  this.$selection.on('focusout', '.select2-search--inline', function (evt) {
1814
- self.trigger('blur', evt);
1815
  });
1816
 
1817
  this.$selection.on('keydown', '.select2-search--inline', function (evt) {
@@ -1837,18 +1889,73 @@ S2.define('select2/selection/search',[
1837
  }
1838
  });
1839
 
 
 
 
 
 
 
 
 
1840
  // Workaround for browsers which do not support the `input` event
1841
  // This will prevent double-triggering of events for browsers which support
1842
  // both the `keyup` and `input` events.
1843
- this.$selection.on('input', '.select2-search--inline', function (evt) {
1844
- // Unbind the duplicated `keyup` event
1845
- self.$selection.off('keyup.search');
1846
- });
 
 
 
 
 
 
 
1847
 
1848
- this.$selection.on('keyup.search input', '.select2-search--inline',
1849
- function (evt) {
1850
- self.handleSearch(evt);
1851
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1852
  };
1853
 
1854
  Search.prototype.createPlaceholder = function (decorated, placeholder) {
@@ -1856,6 +1963,8 @@ S2.define('select2/selection/search',[
1856
  };
1857
 
1858
  Search.prototype.update = function (decorated, data) {
 
 
1859
  this.$search.attr('placeholder', '');
1860
 
1861
  decorated.call(this, data);
@@ -1864,6 +1973,9 @@ S2.define('select2/selection/search',[
1864
  .append(this.$searchContainer);
1865
 
1866
  this.resizeSearch();
 
 
 
1867
  };
1868
 
1869
  Search.prototype.handleSearch = function () {
@@ -1885,9 +1997,8 @@ S2.define('select2/selection/search',[
1885
  data: item
1886
  });
1887
 
1888
- this.trigger('open');
1889
-
1890
- this.$search.val(item.text + ' ');
1891
  };
1892
 
1893
  Search.prototype.resizeSearch = function () {
@@ -3223,7 +3334,7 @@ S2.define('select2/data/array',[
3223
  var existingData = this.item($existingOption);
3224
  var newData = $.extend(true, {}, existingData, item);
3225
 
3226
- var $newOption = this.option(existingData);
3227
 
3228
  $existingOption.replaceWith($newOption);
3229
 
@@ -3259,7 +3370,7 @@ S2.define('select2/data/ajax',[
3259
  this.processResults = this.ajaxOptions.processResults;
3260
  }
3261
 
3262
- ArrayAdapter.__super__.constructor.call(this, $element, options);
3263
  }
3264
 
3265
  Utils.Extend(AjaxAdapter, ArrayAdapter);
@@ -3267,9 +3378,9 @@ S2.define('select2/data/ajax',[
3267
  AjaxAdapter.prototype._applyDefaults = function (options) {
3268
  var defaults = {
3269
  data: function (params) {
3270
- return {
3271
  q: params.term
3272
- };
3273
  },
3274
  transport: function (params, success, failure) {
3275
  var $request = $.ajax(params);
@@ -3306,11 +3417,11 @@ S2.define('select2/data/ajax',[
3306
  }, this.ajaxOptions);
3307
 
3308
  if (typeof options.url === 'function') {
3309
- options.url = options.url(params);
3310
  }
3311
 
3312
  if (typeof options.data === 'function') {
3313
- options.data = options.data(params);
3314
  }
3315
 
3316
  function request () {
@@ -3493,7 +3604,9 @@ S2.define('select2/data/tokenizer',[
3493
  var self = this;
3494
 
3495
  function select (data) {
3496
- self.select(data);
 
 
3497
  }
3498
 
3499
  params.term = params.term || '';
@@ -3541,6 +3654,11 @@ S2.define('select2/data/tokenizer',[
3541
 
3542
  var data = createTag(partParams);
3543
 
 
 
 
 
 
3544
  callback(data);
3545
 
3546
  // Reset the term to not include the tokenized portion
@@ -3678,6 +3796,10 @@ S2.define('select2/dropdown',[
3678
  return $dropdown;
3679
  };
3680
 
 
 
 
 
3681
  Dropdown.prototype.position = function ($dropdown, $container) {
3682
  // Should be implmented in subclasses
3683
  };
@@ -3904,7 +4026,9 @@ S2.define('select2/dropdown/infiniteScroll',[
3904
 
3905
  InfiniteScroll.prototype.createLoadingMore = function () {
3906
  var $option = $(
3907
- '<li class="option load-more" role="treeitem"></li>'
 
 
3908
  );
3909
 
3910
  var message = this.options.get('translations').get('loadingMore');
@@ -3922,7 +4046,7 @@ S2.define('select2/dropdown/attachBody',[
3922
  '../utils'
3923
  ], function ($, Utils) {
3924
  function AttachBody (decorated, $element, options) {
3925
- this.$dropdownParent = options.get('dropdownParent') || document.body;
3926
 
3927
  decorated.call(this, $element, options);
3928
  }
@@ -3963,6 +4087,12 @@ S2.define('select2/dropdown/attachBody',[
3963
  });
3964
  };
3965
 
 
 
 
 
 
 
3966
  AttachBody.prototype.position = function (decorated, $dropdown, $container) {
3967
  // Clone all of the container classes
3968
  $dropdown.attr('class', $container.attr('class'));
@@ -3993,7 +4123,8 @@ S2.define('select2/dropdown/attachBody',[
3993
  this.$dropdownContainer.detach();
3994
  };
3995
 
3996
- AttachBody.prototype._attachPositioningHandler = function (container) {
 
3997
  var self = this;
3998
 
3999
  var scrollEvent = 'scroll.select2.' + container.id;
@@ -4020,7 +4151,8 @@ S2.define('select2/dropdown/attachBody',[
4020
  });
4021
  };
4022
 
4023
- AttachBody.prototype._detachPositioningHandler = function (container) {
 
4024
  var scrollEvent = 'scroll.select2.' + container.id;
4025
  var resizeEvent = 'resize.select2.' + container.id;
4026
  var orientationEvent = 'orientationchange.select2.' + container.id;
@@ -4068,6 +4200,14 @@ S2.define('select2/dropdown/attachBody',[
4068
  top: container.bottom
4069
  };
4070
 
 
 
 
 
 
 
 
 
4071
  if (!isCurrentlyAbove && !isCurrentlyBelow) {
4072
  newDirection = 'below';
4073
  }
@@ -4096,8 +4236,6 @@ S2.define('select2/dropdown/attachBody',[
4096
  };
4097
 
4098
  AttachBody.prototype._resizeDropdown = function () {
4099
- this.$dropdownContainer.width();
4100
-
4101
  var css = {
4102
  width: this.$container.outerWidth(false) + 'px'
4103
  };
@@ -4178,12 +4316,23 @@ S2.define('select2/dropdown/selectOnClose',[
4178
  SelectOnClose.prototype._handleSelectOnClose = function () {
4179
  var $highlightedResults = this.getHighlightedResults();
4180
 
 
4181
  if ($highlightedResults.length < 1) {
4182
  return;
4183
  }
4184
 
 
 
 
 
 
 
 
 
 
 
4185
  this.trigger('select', {
4186
- data: $highlightedResults.data('data')
4187
  });
4188
  };
4189
 
@@ -4217,7 +4366,7 @@ S2.define('select2/dropdown/closeOnSelect',[
4217
  return;
4218
  }
4219
 
4220
- this.trigger('close');
4221
  };
4222
 
4223
  return CloseOnSelect;
@@ -4868,8 +5017,8 @@ S2.define('select2/core',[
4868
 
4869
  // Hide the original select
4870
  $element.addClass('select2-hidden-accessible');
4871
- $element.attr('aria-hidden', 'true');
4872
-
4873
  // Synchronize any monitored attributes
4874
  this._syncAttributes();
4875
 
@@ -5004,12 +5153,16 @@ S2.define('select2/core',[
5004
 
5005
  Select2.prototype._registerSelectionEvents = function () {
5006
  var self = this;
5007
- var nonRelayEvents = ['toggle'];
5008
 
5009
  this.selection.on('toggle', function () {
5010
  self.toggleDropdown();
5011
  });
5012
 
 
 
 
 
5013
  this.selection.on('*', function (name, params) {
5014
  if ($.inArray(name, nonRelayEvents) !== -1) {
5015
  return;
@@ -5054,17 +5207,13 @@ S2.define('select2/core',[
5054
  self.$container.addClass('select2-container--disabled');
5055
  });
5056
 
5057
- this.on('focus', function () {
5058
- self.$container.addClass('select2-container--focus');
5059
- });
5060
-
5061
  this.on('blur', function () {
5062
  self.$container.removeClass('select2-container--focus');
5063
  });
5064
 
5065
  this.on('query', function (params) {
5066
  if (!self.isOpen()) {
5067
- self.trigger('open');
5068
  }
5069
 
5070
  this.dataAdapter.query(params, function (data) {
@@ -5088,30 +5237,31 @@ S2.define('select2/core',[
5088
  var key = evt.which;
5089
 
5090
  if (self.isOpen()) {
5091
- if (key === KEYS.ENTER) {
5092
- self.trigger('results:select');
 
 
 
 
 
5093
 
5094
  evt.preventDefault();
5095
  } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
5096
- self.trigger('results:toggle');
5097
 
5098
  evt.preventDefault();
5099
  } else if (key === KEYS.UP) {
5100
- self.trigger('results:previous');
5101
 
5102
  evt.preventDefault();
5103
  } else if (key === KEYS.DOWN) {
5104
- self.trigger('results:next');
5105
-
5106
- evt.preventDefault();
5107
- } else if (key === KEYS.ESC || key === KEYS.TAB) {
5108
- self.close();
5109
 
5110
  evt.preventDefault();
5111
  }
5112
  } else {
5113
  if (key === KEYS.ENTER || key === KEYS.SPACE ||
5114
- ((key === KEYS.DOWN || key === KEYS.UP) && evt.altKey)) {
5115
  self.open();
5116
 
5117
  evt.preventDefault();
@@ -5128,9 +5278,9 @@ S2.define('select2/core',[
5128
  this.close();
5129
  }
5130
 
5131
- this.trigger('disable');
5132
  } else {
5133
- this.trigger('enable');
5134
  }
5135
  };
5136
 
@@ -5147,6 +5297,10 @@ S2.define('select2/core',[
5147
  'unselect': 'unselecting'
5148
  };
5149
 
 
 
 
 
5150
  if (name in preTriggerMap) {
5151
  var preTriggerName = preTriggerMap[name];
5152
  var preTriggerArgs = {
@@ -5185,8 +5339,6 @@ S2.define('select2/core',[
5185
  }
5186
 
5187
  this.trigger('query', {});
5188
-
5189
- this.trigger('open');
5190
  };
5191
 
5192
  Select2.prototype.close = function () {
@@ -5194,13 +5346,27 @@ S2.define('select2/core',[
5194
  return;
5195
  }
5196
 
5197
- this.trigger('close');
5198
  };
5199
 
5200
  Select2.prototype.isOpen = function () {
5201
  return this.$container.hasClass('select2-container--open');
5202
  };
5203
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5204
  Select2.prototype.enable = function (args) {
5205
  if (this.options.get('debug') && window.console && console.warn) {
5206
  console.warn(
@@ -5281,7 +5447,7 @@ S2.define('select2/core',[
5281
  this.$element.attr('tabindex', this.$element.data('old-tabindex'));
5282
 
5283
  this.$element.removeClass('select2-hidden-accessible');
5284
- this.$element.attr('aria-hidden', 'false');
5285
  this.$element.removeData('select2');
5286
 
5287
  this.dataAdapter.destroy();
@@ -5317,16 +5483,20 @@ S2.define('select2/core',[
5317
  return Select2;
5318
  });
5319
 
 
 
 
 
 
 
 
5320
  S2.define('jquery.select2',[
5321
  'jquery',
5322
- 'require',
5323
 
5324
  './select2/core',
5325
  './select2/defaults'
5326
- ], function ($, require, Select2, Defaults) {
5327
- // Force jQuery.mousewheel to be loaded if it hasn't already
5328
- require('jquery.mousewheel');
5329
-
5330
  if ($.fn.select2 == null) {
5331
  // All methods that should return the element
5332
  var thisMethods = ['open', 'close', 'destroy'];
@@ -5336,25 +5506,29 @@ S2.define('jquery.select2',[
5336
 
5337
  if (typeof options === 'object') {
5338
  this.each(function () {
5339
- var instanceOptions = $.extend({}, options, true);
5340
 
5341
  var instance = new Select2($(this), instanceOptions);
5342
  });
5343
 
5344
  return this;
5345
  } else if (typeof options === 'string') {
5346
- var instance = this.data('select2');
5347
 
5348
- if (instance == null && window.console && console.error) {
5349
- console.error(
5350
- 'The select2(\'' + options + '\') method was called on an ' +
5351
- 'element that is not using Select2.'
5352
- );
5353
- }
 
 
 
5354
 
5355
- var args = Array.prototype.slice.call(arguments, 1);
5356
 
5357
- var ret = instance[options](args);
 
5358
 
5359
  // Check if we should be returning `this`
5360
  if ($.inArray(options, thisMethods) > -1) {
@@ -5375,13 +5549,6 @@ S2.define('jquery.select2',[
5375
  return Select2;
5376
  });
5377
 
5378
- S2.define('jquery.mousewheel',[
5379
- 'jquery'
5380
- ], function ($) {
5381
- // Used to shim jQuery.mousewheel for non-full builds.
5382
- return $;
5383
- });
5384
-
5385
  // Return the AMD loader configuration so it can be used outside of this file
5386
  return {
5387
  define: S2.define,
1
  /*!
2
+ * Select2 4.0.1
3
  * https://select2.github.io
4
  *
5
  * Released under the MIT license
30
  var S2;(function () { if (!S2 || !S2.requirejs) {
31
  if (!S2) { S2 = {}; } else { require = S2; }
32
  /**
33
+ * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
34
  * Available via the MIT or new BSD license.
35
  * see: http://github.com/jrburke/almond for details
36
  */
75
  //otherwise, assume it is a top-level require that will
76
  //be relative to baseUrl in the end.
77
  if (baseName) {
 
 
 
 
 
 
78
  name = name.split('/');
79
  lastIndex = name.length - 1;
80
 
83
  name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
84
  }
85
 
86
+ //Lop off the last part of baseParts, so that . matches the
87
+ //"directory" and not name of the baseName's module. For instance,
88
+ //baseName of "one/two/three", maps to "one/two/three.js", but we
89
+ //want the directory, "one/two" for this normalization.
90
+ name = baseParts.slice(0, baseParts.length - 1).concat(name);
91
 
92
  //start trimDots
93
  for (i = 0; i < name.length; i += 1) {
179
  //A version of a require function that passes a moduleName
180
  //value for items that may need to
181
  //look up paths relative to the moduleName
182
+ var args = aps.call(arguments, 0);
183
+
184
+ //If first arg is not require('string'), and there is only
185
+ //one arg, it is the array form without a callback. Insert
186
+ //a null so that the following concat is correct.
187
+ if (typeof args[0] !== 'string' && args.length === 1) {
188
+ args.push(null);
189
+ }
190
+ return req.apply(undef, args.concat([relName, forceSync]));
191
  };
192
  }
193
 
437
  requirejs._defined = defined;
438
 
439
  define = function (name, deps, callback) {
440
+ if (typeof name !== 'string') {
441
+ throw new Error('See almond README: incorrect module build, no module name');
442
+ }
443
 
444
  //This module may not have dependencies
445
  if (!deps.splice) {
782
  this.hideLoading();
783
 
784
  var $message = $(
785
+ '<li role="treeitem" aria-live="assertive"' +
786
+ ' class="select2-results__option"></li>'
787
  );
788
 
789
  var message = this.options.get('translations').get(params.message);
794
  )
795
  );
796
 
797
+ $message[0].className += ' select2-results__message';
798
+
799
  this.$results.append($message);
800
  };
801
 
802
+ Results.prototype.hideMessages = function () {
803
+ this.$results.find('.select2-results__message').remove();
804
+ };
805
+
806
  Results.prototype.append = function (data) {
807
  this.hideLoading();
808
 
1002
  });
1003
 
1004
  container.on('query', function (params) {
1005
+ self.hideMessages();
1006
  self.showLoading(params);
1007
  });
1008
 
1058
  var data = $highlighted.data('data');
1059
 
1060
  if ($highlighted.attr('aria-selected') == 'true') {
1061
+ self.trigger('close', {});
1062
  } else {
1063
  self.trigger('select', {
1064
  data: data
1180
  data: data
1181
  });
1182
  } else {
1183
+ self.trigger('close', {});
1184
  }
1185
 
1186
  return;
1246
  var template = this.options.get('templateResult');
1247
  var escapeMarkup = this.options.get('escapeMarkup');
1248
 
1249
+ var content = template(result, container);
1250
 
1251
  if (content == null) {
1252
  container.style.display = 'none';
1303
  BaseSelection.prototype.render = function () {
1304
  var $selection = $(
1305
  '<span class="select2-selection" role="combobox" ' +
1306
+ ' aria-haspopup="true" aria-expanded="false">' +
1307
  '</span>'
1308
  );
1309
 
1336
  });
1337
 
1338
  this.$selection.on('blur', function (evt) {
1339
+ self._handleBlur(evt);
1340
  });
1341
 
1342
  this.$selection.on('keydown', function (evt) {
1383
  });
1384
  };
1385
 
1386
+ BaseSelection.prototype._handleBlur = function (evt) {
1387
+ var self = this;
1388
+
1389
+ // This needs to be delayed as the active element is the body when the tab
1390
+ // key is pressed, possibly along with others.
1391
+ window.setTimeout(function () {
1392
+ // Don't trigger `blur` if the focus is still in the selection
1393
+ if (
1394
+ (document.activeElement == self.$selection[0]) ||
1395
+ ($.contains(self.$selection[0], document.activeElement))
1396
+ ) {
1397
+ return;
1398
+ }
1399
+
1400
+ self.trigger('blur', evt);
1401
+ }, 1);
1402
+ };
1403
+
1404
  BaseSelection.prototype._attachCloseHandler = function (container) {
1405
  var self = this;
1406
 
1510
  this.$selection.find('.select2-selection__rendered').empty();
1511
  };
1512
 
1513
+ SingleSelection.prototype.display = function (data, container) {
1514
  var template = this.options.get('templateSelection');
1515
  var escapeMarkup = this.options.get('escapeMarkup');
1516
 
1517
+ return escapeMarkup(template(data, container));
1518
  };
1519
 
1520
  SingleSelection.prototype.selectionContainer = function () {
1529
 
1530
  var selection = data[0];
1531
 
 
 
1532
  var $rendered = this.$selection.find('.select2-selection__rendered');
1533
+ var formatted = this.display(selection, $rendered);
1534
+
1535
  $rendered.empty().append(formatted);
1536
  $rendered.prop('title', selection.title || selection.text);
1537
  };
1573
  });
1574
  });
1575
 
1576
+ this.$selection.on(
1577
+ 'click',
1578
+ '.select2-selection__choice__remove',
1579
  function (evt) {
1580
+ // Ignore the event if it is disabled
1581
+ if (self.options.get('disabled')) {
1582
+ return;
1583
+ }
1584
 
1585
+ var $remove = $(this);
1586
+ var $selection = $remove.parent();
1587
 
1588
+ var data = $selection.data('data');
1589
+
1590
+ self.trigger('unselect', {
1591
+ originalEvent: evt,
1592
+ data: data
1593
+ });
1594
+ }
1595
+ );
1596
  };
1597
 
1598
  MultipleSelection.prototype.clear = function () {
1599
  this.$selection.find('.select2-selection__rendered').empty();
1600
  };
1601
 
1602
+ MultipleSelection.prototype.display = function (data, container) {
1603
  var template = this.options.get('templateSelection');
1604
  var escapeMarkup = this.options.get('escapeMarkup');
1605
 
1606
+ return escapeMarkup(template(data, container));
1607
  };
1608
 
1609
  MultipleSelection.prototype.selectionContainer = function () {
1630
  for (var d = 0; d < data.length; d++) {
1631
  var selection = data[d];
1632
 
 
1633
  var $selection = this.selectionContainer();
1634
+ var formatted = this.display(selection, $selection);
1635
 
1636
  $selection.append(formatted);
1637
  $selection.prop('title', selection.title || selection.text);
1763
 
1764
  this.$element.val(this.placeholder.id).trigger('change');
1765
 
1766
+ this.trigger('toggle', {});
1767
  };
1768
 
1769
  AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
1811
  '<li class="select2-search select2-search--inline">' +
1812
  '<input class="select2-search__field" type="search" tabindex="-1"' +
1813
  ' autocomplete="off" autocorrect="off" autocapitalize="off"' +
1814
+ ' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
1815
  '</li>'
1816
  );
1817
 
1820
 
1821
  var $rendered = decorated.call(this);
1822
 
1823
+ this._transferTabIndex();
1824
+
1825
  return $rendered;
1826
  };
1827
 
1831
  decorated.call(this, container, $container);
1832
 
1833
  container.on('open', function () {
1834
+ self.$search.trigger('focus');
 
 
1835
  });
1836
 
1837
  container.on('close', function () {
 
 
1838
  self.$search.val('');
1839
+ self.$search.removeAttr('aria-activedescendant');
1840
+ self.$search.trigger('focus');
1841
  });
1842
 
1843
  container.on('enable', function () {
1844
  self.$search.prop('disabled', false);
1845
+
1846
+ self._transferTabIndex();
1847
  });
1848
 
1849
  container.on('disable', function () {
1850
  self.$search.prop('disabled', true);
1851
  });
1852
 
1853
+ container.on('focus', function (evt) {
1854
+ self.$search.trigger('focus');
1855
+ });
1856
+
1857
+ container.on('results:focus', function (params) {
1858
+ self.$search.attr('aria-activedescendant', params.id);
1859
+ });
1860
+
1861
  this.$selection.on('focusin', '.select2-search--inline', function (evt) {
1862
  self.trigger('focus', evt);
1863
  });
1864
 
1865
  this.$selection.on('focusout', '.select2-search--inline', function (evt) {
1866
+ self._handleBlur(evt);
1867
  });
1868
 
1869
  this.$selection.on('keydown', '.select2-search--inline', function (evt) {
1889
  }
1890
  });
1891
 
1892
+ // Try to detect the IE version should the `documentMode` property that
1893
+ // is stored on the document. This is only implemented in IE and is
1894
+ // slightly cleaner than doing a user agent check.
1895
+ // This property is not available in Edge, but Edge also doesn't have
1896
+ // this bug.
1897
+ var msie = document.documentMode;
1898
+ var disableInputEvents = msie && msie <= 11;
1899
+
1900
  // Workaround for browsers which do not support the `input` event
1901
  // This will prevent double-triggering of events for browsers which support
1902
  // both the `keyup` and `input` events.
1903
+ this.$selection.on(
1904
+ 'input.searchcheck',
1905
+ '.select2-search--inline',
1906
+ function (evt) {
1907
+ // IE will trigger the `input` event when a placeholder is used on a
1908
+ // search box. To get around this issue, we are forced to ignore all
1909
+ // `input` events in IE and keep using `keyup`.
1910
+ if (disableInputEvents) {
1911
+ self.$selection.off('input.search input.searchcheck');
1912
+ return;
1913
+ }
1914
 
1915
+ // Unbind the duplicated `keyup` event
1916
+ self.$selection.off('keyup.search');
1917
+ }
1918
+ );
1919
+
1920
+ this.$selection.on(
1921
+ 'keyup.search input.search',
1922
+ '.select2-search--inline',
1923
+ function (evt) {
1924
+ // IE will trigger the `input` event when a placeholder is used on a
1925
+ // search box. To get around this issue, we are forced to ignore all
1926
+ // `input` events in IE and keep using `keyup`.
1927
+ if (disableInputEvents && evt.type === 'input') {
1928
+ self.$selection.off('input.search input.searchcheck');
1929
+ return;
1930
+ }
1931
+
1932
+ var key = evt.which;
1933
+
1934
+ // We can freely ignore events from modifier keys
1935
+ if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
1936
+ return;
1937
+ }
1938
+
1939
+ // Tabbing will be handled during the `keydown` phase
1940
+ if (key == KEYS.TAB) {
1941
+ return;
1942
+ }
1943
+
1944
+ self.handleSearch(evt);
1945
+ }
1946
+ );
1947
+ };
1948
+
1949
+ /**
1950
+ * This method will transfer the tabindex attribute from the rendered
1951
+ * selection to the search box. This allows for the search box to be used as
1952
+ * the primary focus instead of the selection container.
1953
+ *
1954
+ * @private
1955
+ */
1956
+ Search.prototype._transferTabIndex = function (decorated) {
1957
+ this.$search.attr('tabindex', this.$selection.attr('tabindex'));
1958
+ this.$selection.attr('tabindex', '-1');
1959
  };
1960
 
1961
  Search.prototype.createPlaceholder = function (decorated, placeholder) {
1963
  };
1964
 
1965
  Search.prototype.update = function (decorated, data) {
1966
+ var searchHadFocus = this.$search[0] == document.activeElement;
1967
+
1968
  this.$search.attr('placeholder', '');
1969
 
1970
  decorated.call(this, data);
1973
  .append(this.$searchContainer);
1974
 
1975
  this.resizeSearch();
1976
+ if (searchHadFocus) {
1977
+ this.$search.focus();
1978
+ }
1979
  };
1980
 
1981
  Search.prototype.handleSearch = function () {
1997
  data: item
1998
  });
1999
 
2000
+ this.$search.val(item.text);
2001
+ this.handleSearch();
 
2002
  };
2003
 
2004
  Search.prototype.resizeSearch = function () {
3334
  var existingData = this.item($existingOption);
3335
  var newData = $.extend(true, {}, existingData, item);
3336
 
3337
+ var $newOption = this.option(newData);
3338
 
3339
  $existingOption.replaceWith($newOption);
3340
 
3370
  this.processResults = this.ajaxOptions.processResults;
3371
  }
3372
 
3373
+ AjaxAdapter.__super__.constructor.call(this, $element, options);
3374
  }
3375
 
3376
  Utils.Extend(AjaxAdapter, ArrayAdapter);
3378
  AjaxAdapter.prototype._applyDefaults = function (options) {
3379
  var defaults = {
3380
  data: function (params) {
3381
+ return $.extend({}, params, {
3382
  q: params.term
3383
+ });
3384
  },
3385
  transport: function (params, success, failure) {
3386
  var $request = $.ajax(params);
3417
  }, this.ajaxOptions);
3418
 
3419
  if (typeof options.url === 'function') {
3420
+ options.url = options.url.call(this.$element, params);
3421
  }
3422
 
3423
  if (typeof options.data === 'function') {
3424
+ options.data = options.data.call(this.$element, params);
3425
  }
3426
 
3427
  function request () {
3604
  var self = this;
3605
 
3606
  function select (data) {
3607
+ self.trigger('select', {
3608
+ data: data
3609
+ });
3610
  }
3611
 
3612
  params.term = params.term || '';
3654
 
3655
  var data = createTag(partParams);
3656
 
3657
+ if (data == null) {
3658
+ i++;
3659
+ continue;
3660
+ }
3661
+
3662
  callback(data);
3663
 
3664
  // Reset the term to not include the tokenized portion
3796
  return $dropdown;
3797
  };
3798
 
3799
+ Dropdown.prototype.bind = function () {
3800
+ // Should be implemented in subclasses
3801
+ };
3802
+
3803
  Dropdown.prototype.position = function ($dropdown, $container) {
3804
  // Should be implmented in subclasses
3805
  };
4026
 
4027
  InfiniteScroll.prototype.createLoadingMore = function () {
4028
  var $option = $(
4029
+ '<li ' +
4030
+ 'class="select2-results__option select2-results__option--load-more"' +
4031
+ 'role="treeitem" aria-disabled="true"></li>'
4032
  );
4033
 
4034
  var message = this.options.get('translations').get('loadingMore');
4046
  '../utils'
4047
  ], function ($, Utils) {
4048
  function AttachBody (decorated, $element, options) {
4049
+ this.$dropdownParent = options.get('dropdownParent') || $(document.body);
4050
 
4051
  decorated.call(this, $element, options);
4052
  }
4087
  });
4088
  };
4089
 
4090
+ AttachBody.prototype.destroy = function (decorated) {
4091
+ decorated.call(this);
4092
+
4093
+ this.$dropdownContainer.remove();
4094
+ };
4095
+
4096
  AttachBody.prototype.position = function (decorated, $dropdown, $container) {
4097
  // Clone all of the container classes
4098
  $dropdown.attr('class', $container.attr('class'));
4123
  this.$dropdownContainer.detach();
4124
  };
4125
 
4126
+ AttachBody.prototype._attachPositioningHandler =
4127
+ function (decorated, container) {
4128
  var self = this;
4129
 
4130
  var scrollEvent = 'scroll.select2.' + container.id;
4151
  });
4152
  };
4153
 
4154
+ AttachBody.prototype._detachPositioningHandler =
4155
+ function (decorated, container) {
4156
  var scrollEvent = 'scroll.select2.' + container.id;
4157
  var resizeEvent = 'resize.select2.' + container.id;
4158
  var orientationEvent = 'orientationchange.select2.' + container.id;
4200
  top: container.bottom
4201
  };
4202
 
4203
+ // Fix positioning with static parents
4204
+ if (this.$dropdownParent[0].style.position !== 'static') {
4205
+ var parentOffset = this.$dropdownParent.offset();
4206
+
4207
+ css.top -= parentOffset.top;
4208
+ css.left -= parentOffset.left;
4209
+ }
4210
+
4211
  if (!isCurrentlyAbove && !isCurrentlyBelow) {
4212
  newDirection = 'below';
4213
  }
4236
  };
4237
 
4238
  AttachBody.prototype._resizeDropdown = function () {
 
 
4239
  var css = {
4240
  width: this.$container.outerWidth(false) + 'px'
4241
  };
4316
  SelectOnClose.prototype._handleSelectOnClose = function () {
4317
  var $highlightedResults = this.getHighlightedResults();
4318
 
4319
+ // Only select highlighted results
4320
  if ($highlightedResults.length < 1) {
4321
  return;
4322
  }
4323
 
4324
+ var data = $highlightedResults.data('data');
4325
+
4326
+ // Don't re-select already selected resulte
4327
+ if (
4328
+ (data.element != null && data.element.selected) ||
4329
+ (data.element == null && data.selected)
4330
+ ) {
4331
+ return;
4332
+ }
4333
+
4334
  this.trigger('select', {
4335
+ data: data
4336
  });
4337
  };
4338
 
4366
  return;
4367
  }
4368
 
4369
+ this.trigger('close', {});
4370
  };
4371
 
4372
  return CloseOnSelect;
5017
 
5018
  // Hide the original select
5019
  $element.addClass('select2-hidden-accessible');
5020
+ $element.attr('aria-hidden', 'true');
5021
+
5022
  // Synchronize any monitored attributes
5023
  this._syncAttributes();
5024
 
5153
 
5154
  Select2.prototype._registerSelectionEvents = function () {
5155
  var self = this;
5156
+ var nonRelayEvents = ['toggle', 'focus'];
5157
 
5158
  this.selection.on('toggle', function () {
5159
  self.toggleDropdown();
5160
  });
5161
 
5162
+ this.selection.on('focus', function (params) {
5163
+ self.focus(params);
5164
+ });
5165
+
5166
  this.selection.on('*', function (name, params) {
5167
  if ($.inArray(name, nonRelayEvents) !== -1) {
5168
  return;
5207
  self.$container.addClass('select2-container--disabled');
5208
  });
5209
 
 
 
 
 
5210
  this.on('blur', function () {
5211
  self.$container.removeClass('select2-container--focus');
5212
  });
5213
 
5214
  this.on('query', function (params) {
5215
  if (!self.isOpen()) {
5216
+ self.trigger('open', {});
5217
  }
5218
 
5219
  this.dataAdapter.query(params, function (data) {
5237
  var key = evt.which;
5238
 
5239
  if (self.isOpen()) {
5240
+ if (key === KEYS.ESC || key === KEYS.TAB ||
5241
+ (key === KEYS.UP && evt.altKey)) {
5242
+ self.close();
5243
+
5244
+ evt.preventDefault();
5245
+ } else if (key === KEYS.ENTER) {
5246
+ self.trigger('results:select', {});
5247
 
5248
  evt.preventDefault();
5249
  } else if ((key === KEYS.SPACE && evt.ctrlKey)) {
5250
+ self.trigger('results:toggle', {});
5251
 
5252
  evt.preventDefault();
5253
  } else if (key === KEYS.UP) {
5254
+ self.trigger('results:previous', {});
5255
 
5256
  evt.preventDefault();
5257
  } else if (key === KEYS.DOWN) {
5258
+ self.trigger('results:next', {});
 
 
 
 
5259
 
5260
  evt.preventDefault();
5261
  }
5262
  } else {
5263
  if (key === KEYS.ENTER || key === KEYS.SPACE ||
5264
+ (key === KEYS.DOWN && evt.altKey)) {
5265
  self.open();
5266
 
5267
  evt.preventDefault();
5278
  this.close();
5279
  }
5280
 
5281
+ this.trigger('disable', {});
5282
  } else {
5283
+ this.trigger('enable', {});
5284
  }
5285
  };
5286
 
5297
  'unselect': 'unselecting'
5298
  };
5299
 
5300
+ if (args === undefined) {
5301
+ args = {};
5302
+ }
5303
+
5304
  if (name in preTriggerMap) {
5305
  var preTriggerName = preTriggerMap[name];
5306
  var preTriggerArgs = {
5339
  }
5340
 
5341
  this.trigger('query', {});
 
 
5342
  };
5343
 
5344
  Select2.prototype.close = function () {
5346
  return;
5347
  }
5348
 
5349
+ this.trigger('close', {});
5350
  };
5351
 
5352
  Select2.prototype.isOpen = function () {
5353
  return this.$container.hasClass('select2-container--open');
5354
  };
5355
 
5356
+ Select2.prototype.hasFocus = function () {
5357
+ return this.$container.hasClass('select2-container--focus');
5358
+ };
5359
+
5360
+ Select2.prototype.focus = function (data) {
5361
+ // No need to re-trigger focus events if we are already focused
5362
+ if (this.hasFocus()) {
5363
+ return;
5364
+ }
5365
+
5366
+ this.$container.addClass('select2-container--focus');
5367
+ this.trigger('focus', {});
5368
+ };
5369
+
5370
  Select2.prototype.enable = function (args) {
5371
  if (this.options.get('debug') && window.console && console.warn) {
5372
  console.warn(
5447
  this.$element.attr('tabindex', this.$element.data('old-tabindex'));
5448
 
5449
  this.$element.removeClass('select2-hidden-accessible');
5450
+ this.$element.attr('aria-hidden', 'false');
5451
  this.$element.removeData('select2');
5452
 
5453
  this.dataAdapter.destroy();
5483
  return Select2;
5484
  });
5485
 
5486
+ S2.define('jquery-mousewheel',[
5487
+ 'jquery'
5488
+ ], function ($) {
5489
+ // Used to shim jQuery.mousewheel for non-full builds.
5490
+ return $;
5491
+ });
5492
+
5493
  S2.define('jquery.select2',[
5494
  'jquery',
5495
+ 'jquery-mousewheel',
5496
 
5497
  './select2/core',
5498
  './select2/defaults'
5499
+ ], function ($, _, Select2, Defaults) {
 
 
 
5500
  if ($.fn.select2 == null) {
5501
  // All methods that should return the element
5502
  var thisMethods = ['open', 'close', 'destroy'];
5506
 
5507
  if (typeof options === 'object') {
5508
  this.each(function () {
5509
+ var instanceOptions = $.extend(true, {}, options);
5510
 
5511
  var instance = new Select2($(this), instanceOptions);
5512
  });
5513
 
5514
  return this;
5515
  } else if (typeof options === 'string') {
5516
+ var ret;
5517
 
5518
+ this.each(function () {
5519
+ var instance = $(this).data('select2');
5520
+
5521
+ if (instance == null && window.console && console.error) {
5522
+ console.error(
5523
+ 'The select2(\'' + options + '\') method was called on an ' +
5524
+ 'element that is not using Select2.'
5525
+ );
5526
+ }
5527
 
5528
+ var args = Array.prototype.slice.call(arguments, 1);
5529
 
5530
+ ret = instance[options].apply(instance, args);
5531
+ });
5532
 
5533
  // Check if we should be returning `this`
5534
  if ($.inArray(options, thisMethods) > -1) {
5549
  return Select2;
5550
  });
5551
 
 
 
 
 
 
 
 
5552
  // Return the AMD loader configuration so it can be used outside of this file
5553
  return {
5554
  define: S2.define,
assets/js/vendor/select2.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){return n.apply(b,v.call(arguments,0).concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice;this.listeners=this.listeners||{},a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),this.$results.append(d)},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";{a(h)}this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b){var c=this,d=b.id+"-results";this.$results.attr("id",d),b.on("results:all",function(a){c.clear(),c.append(a.data),b.isOpen()&&c.setClasses()}),b.on("results:append",function(a){c.append(a.data),b.isOpen()&&c.setClasses()}),b.on("query",function(a){c.showLoading(a)}),b.on("select",function(){b.isOpen()&&c.setClasses()}),b.on("unselect",function(){b.isOpen()&&c.setClasses()}),b.on("open",function(){c.$results.attr("aria-expanded","true"),c.$results.attr("aria-hidden","false"),c.setClasses(),c.ensureHighlightVisible()}),b.on("close",function(){c.$results.attr("aria-expanded","false"),c.$results.attr("aria-hidden","true"),c.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=c.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=c.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?c.trigger("close"):c.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=c.getHighlightedResults(),b=c.$results.find("[aria-selected]"),d=b.index(a);if(0!==d){var e=d-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=c.$results.offset().top,h=f.offset().top,i=c.$results.scrollTop()+(h-g);0===e?c.$results.scrollTop(0):0>h-g&&c.$results.scrollTop(i)}}),b.on("results:next",function(){var a=c.getHighlightedResults(),b=c.$results.find("[aria-selected]"),d=b.index(a),e=d+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=c.$results.offset().top+c.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=c.$results.scrollTop()+h-g;0===e?c.$results.scrollTop(0):h>g&&c.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){c.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=c.$results.scrollTop(),d=c.$results.get(0).scrollHeight-c.$results.scrollTop()+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&d<=c.$results.height();e?(c.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(c.$results.scrollTop(c.$results.get(0).scrollHeight-c.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var d=a(this),e=d.data("data");return"true"===d.attr("aria-selected")?void(c.options.get("multiple")?c.trigger("unselect",{originalEvent:b,data:e}):c.trigger("close")):void c.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(){var b=a(this).data("data");c.getHighlightedResults().removeClass("select2-results__option--highlighted"),c.trigger("results:focus",{data:b,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a){var b=this,d=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){b.trigger("focus",a)}),this.$selection.on("blur",function(a){b.trigger("blur",a)}),this.$selection.on("keydown",function(a){b.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){b.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){b.update(a.data)}),a.on("open",function(){b.$selection.attr("aria-expanded","true"),b.$selection.attr("aria-owns",d),b._attachCloseHandler(a)}),a.on("close",function(){b.$selection.attr("aria-expanded","false"),b.$selection.removeAttr("aria-activedescendant"),b.$selection.removeAttr("aria-owns"),b.$selection.focus(),b._detachCloseHandler(a)}),a.on("enable",function(){b.$selection.attr("tabindex",b._tabindex)}),a.on("disable",function(){b.$selection.attr("tabindex","-1")})},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c){function d(){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},d.prototype.bind=function(a){var b=this;d.__super__.bind.apply(this,arguments);var c=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",c),this.$selection.attr("aria-labelledby",c),this.$selection.on("mousedown",function(a){1===a.which&&b.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(){}),this.$selection.on("blur",function(){}),a.on("selection:update",function(a){b.update(a.data)})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a){var b=this.options.get("templateSelection"),c=this.options.get("escapeMarkup");return c(b(a))},d.prototype.selectionContainer=function(){return a("<span></span>")},d.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.display(b),d=this.$selection.find(".select2-selection__rendered");d.empty().append(c),d.prop("title",b.title||b.text)},d}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(){var b=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){b.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(c){var d=a(this),e=d.parent(),f=e.data("data");b.trigger("unselect",{originalEvent:c,data:f})})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a){var b=this.options.get("templateSelection"),c=this.options.get("escapeMarkup");return c(b(a))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.display(e),g=this.selectionContainer();g.append(f),g.prop("title",e.title||e.text),g.data("data",e),b.push(g)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(){function a(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},a.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},a}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle")}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus()}),b.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val(""),e.$search.focus()}),b.on("enable",function(){e.$search.prop("disabled",!1)}),b.on("disable",function(){e.$search.prop("disabled",!0)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e.trigger("blur",a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}}),this.$selection.on("input",".select2-search--inline",function(){e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input",".select2-search--inline",function(a){e.handleSearch(a)})},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.trigger("open"),this.$search.val(b.text+" ")},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a){var b=this;this.container=a,a.on("select",function(a){b.select(a.data)}),a.on("unselect",function(a){b.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};
2
- if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=(c.extend(!0,{},l,j),this.option(l));k.replaceWith(m)}else{var n=this.option(j);if(j.children){var o=this.convertToOptions(j.children);b.appendMany(n,o)}h.push(n)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(b,c){this.ajaxOptions=this._applyDefaults(c.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),a.__super__.constructor.call(this,b,c)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return{q:a.term}},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url(a)),"function"==typeof f.data&&(f.data=f.data(a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");if(void 0!==f&&(this.createTag=f),b.call(this,c,d),a.isArray(e))for(var g=0;g<e.length;g++){var h=e[g],i=this._normalizeItem(h),j=this.option(i);this.$element.append(j)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(){var b=(this._lastTag,this.$element.find("option[data-select2-tag]"));b.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(a,b,c){function d(a){e.select(a)}var e=this;b.term=b.term||"";var f=this.tokenizer(b,this.options,d);f.term!==b.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.focus()),b.term=f.term),a.call(this,b,c)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);e(m),g=g.substr(h+1)||"",h=0}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.position=function(){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a){function b(){}return b.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},b.prototype.handleSearch=function(){if(!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},b.prototype.showSearch=function(){return!0},b}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="option load-more" role="treeitem"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(a,b,c){this.$dropdownParent=c.get("dropdownParent")||document.body,a.call(this,b,c)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c){var d=this,e="scroll.select2."+c.id,f="resize.select2."+c.id,g="orientationchange.select2."+c.id,h=this.$container.parents().filter(b.hasScroll);h.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),h.on(e,function(){var b=a(this).data("select2-scroll-position");a(this).scrollTop(b.y)}),a(window).on(e+" "+f+" "+g,function(){d._positionDropdown(),d._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c){var d="scroll.select2."+c.id,e="resize.select2."+c.id,f="orientationchange.select2."+c.id,g=this.$container.parents().filter(b.hasScroll);g.off(d),a(window).off(d+" "+e+" "+f)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=(this.$container.position(),this.$container.offset());f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom};c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){this.$dropdownContainer.width();var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(){d._handleSelectOnClose()})},a.prototype._handleSelectOnClose=function(){var a=this.getHighlightedResults();a.length<1||this.trigger("select",{data:a.data("data")})},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close")},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(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,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend({},this.defaults,l),null==l.dataAdapter){if(l.dataAdapter=null!=l.ajax?o:null!=l.data?n:m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.selectionAdapter=l.multiple?e:d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(this.options.dir=a.prop("dir")?a.prop("dir"):a.closest("[dir]").prop("dir")?a.closest("[dir]").prop("dir"):"ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("focus",function(){a.$container.addClass("select2-container--focus")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open"),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ENTER?(a.trigger("results:select"),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle"),b.preventDefault()):c===d.UP?(a.trigger("results:previous"),b.preventDefault()):c===d.DOWN?(a.trigger("results:next"),b.preventDefault()):(c===d.ESC||c===d.TAB)&&(a.close(),b.preventDefault()):(c===d.ENTER||c===d.SPACE||(c===d.DOWN||c===d.UP)&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable")):this.trigger("enable")},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||(this.trigger("query",{}),this.trigger("open"))},e.prototype.close=function(){this.isOpen()&&this.trigger("close")},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery.select2",["jquery","require","./select2/core","./select2/defaults"],function(a,b,c,d){if(b("jquery.mousewheel"),null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){{var d=a.extend({},b,!0);new c(a(this),d)}}),this;if("string"==typeof b){var d=this.data("select2");null==d&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var f=Array.prototype.slice.call(arguments,1),g=d[b](f);return a.inArray(b,e)>-1?this:g}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),b.define("jquery.mousewheel",["jquery"],function(a){return a}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
1
+ /*! Select2 4.0.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice;this.listeners=this.listeners||{},a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-d.$results.scrollTop()+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){
2
+ var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},l,j),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");if(void 0!==f&&(this.createTag=f),b.call(this,c,d),a.isArray(e))for(var g=0;g<e.length;g++){var h=e[g],i=this._normalizeItem(h),j=this.option(i);this.$element.append(j)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(a,b,c){function d(a){e.trigger("select",{data:a})}var e=this;b.term=b.term||"";var f=this.tokenizer(b,this.options,d);f.term!==b.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.focus()),b.term=f.term),a.call(this,b,c)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=(this.$container.position(),this.$container.offset());f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom};if("static"!==this.$dropdownParent[0].style.position){var m=this.$dropdownParent.offset();l.top-=m.top,l.left-=m.left}c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(){d._handleSelectOnClose()})},a.prototype._handleSelectOnClose=function(){var a=this.getHighlightedResults();if(!(a.length<1)){var b=a.data("data");null!=b.element&&b.element.selected||null==b.element&&b.selected||this.trigger("select",{data:b})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(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,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend({},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
google-calendar-events.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Simple Calendar
4
  * Plugin URI: https://simplecalendar.io
5
  * Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.
6
- * Version: 3.0.12
7
  * Author: Moonstone Media
8
  * Author URI: https://simplecalendar.io
9
  * Text Domain: google-calendar-events
@@ -26,13 +26,13 @@ if ( version_compare( PHP_VERSION, '5.3.0' ) === -1 ) {
26
  }
27
 
28
  // Plugin constants.
29
- $this_plugin_path = trailingslashit( dirname( __FILE__ ) );
30
- $this_plugin_dir = plugin_dir_url( __FILE__ );
31
  $this_plugin_constants = array(
32
- 'SIMPLE_CALENDAR_VERSION' => '3.0.12',
33
  'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
34
  'SIMPLE_CALENDAR_URL' => $this_plugin_dir,
35
- 'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/',
36
  'SIMPLE_CALENDAR_PATH' => $this_plugin_path,
37
  'SIMPLE_CALENDAR_INC' => $this_plugin_path . 'includes/',
38
  );
@@ -42,21 +42,24 @@ foreach ( $this_plugin_constants as $constant => $value ) {
42
  }
43
  }
44
 
 
 
 
 
45
  // Check plugin requirements before loading plugin.
46
- $this_plugin_checks = new WP_Requirements(
47
- 'Simple Calendar',
48
- plugin_basename( __FILE__ ),
49
- array(
50
- 'PHP' => '5.3.3',
51
- 'WordPress' => '4.0.0',
52
  'Extensions' => array(
53
  'curl',
 
 
54
  'mbstring',
55
- )
56
- )
57
- );
58
  if ( $this_plugin_checks->pass() === false ) {
59
  $this_plugin_checks->halt();
 
60
  return;
61
  }
62
 
3
  * Plugin Name: Simple Calendar
4
  * Plugin URI: https://simplecalendar.io
5
  * Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.
6
+ * Version: 3.0.13
7
  * Author: Moonstone Media
8
  * Author URI: https://simplecalendar.io
9
  * Text Domain: google-calendar-events
26
  }
27
 
28
  // Plugin constants.
29
+ $this_plugin_path = trailingslashit( dirname( __FILE__ ) );
30
+ $this_plugin_dir = plugin_dir_url( __FILE__ );
31
  $this_plugin_constants = array(
32
+ 'SIMPLE_CALENDAR_VERSION' => '3.0.13',
33
  'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
34
  'SIMPLE_CALENDAR_URL' => $this_plugin_dir,
35
+ 'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/',
36
  'SIMPLE_CALENDAR_PATH' => $this_plugin_path,
37
  'SIMPLE_CALENDAR_INC' => $this_plugin_path . 'includes/',
38
  );
42
  }
43
  }
44
 
45
+ // Plugin requirements
46
+
47
+ include_once 'includes/wp-requirements.php';
48
+
49
  // Check plugin requirements before loading plugin.
50
+ $this_plugin_checks = new SimCal_WP_Requirements( 'Simple Calendar', plugin_basename( __FILE__ ), array(
51
+ 'PHP' => '5.3.3',
52
+ 'WordPress' => '4.0.0',
 
 
 
53
  'Extensions' => array(
54
  'curl',
55
+ 'iconv',
56
+ 'json',
57
  'mbstring',
58
+ ),
59
+ ) );
 
60
  if ( $this_plugin_checks->pass() === false ) {
61
  $this_plugin_checks->halt();
62
+
63
  return;
64
  }
65
 
includes/abstracts/calendar.php CHANGED
@@ -448,7 +448,23 @@ abstract class Calendar {
448
  if ( empty( $template ) ) {
449
  $template = isset( $this->post->post_content ) ? $this->post->post_content : '';
450
  }
451
- $this->events_template = wpautop( wp_kses_post( trim( $template ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
452
  }
453
 
454
  /**
@@ -632,7 +648,7 @@ abstract class Calendar {
632
  $this->start = Carbon::today( $this->timezone )->addYears( $nth )->startOfYear()->getTimeStamp();
633
  } elseif ( 'custom_date' == $calendar_begins ) {
634
  if ( $date = get_post_meta( $this->id, '_calendar_begins_custom_date', true ) ) {
635
- $this->start = Carbon::createFromFormat( 'Y-m-d', esc_attr( $date ) )->setTimezone( $this->timezone )->getTimestamp();
636
  }
637
  }
638
  }
@@ -767,7 +783,9 @@ abstract class Calendar {
767
 
768
  if ( 'yes' == $poweredby ) {
769
  $align = is_rtl() ? 'left' : 'right';
770
- echo '<small class="simcal-powered simcal-align-' . $align .'">Powered by <a href="https://simplecalendar.io" target="_blank">Simple Calendar</a></small>';
 
 
771
  }
772
 
773
  echo '</div>';
448
  if ( empty( $template ) ) {
449
  $template = isset( $this->post->post_content ) ? $this->post->post_content : '';
450
  }
451
+
452
+ // TODO: Removed wpautop() call.
453
+
454
+ $event_formatting = get_post_meta( $this->id, '_event_formatting', true );
455
+
456
+ switch( $event_formatting ) {
457
+ case 'none':
458
+ $this->events_template = wp_kses_post( trim( $template ) );
459
+ break;
460
+ case 'no_linebreaks':
461
+ $this->events_template = wpautop( wp_kses_post( trim( $template ) ), false );
462
+ break;
463
+ default:
464
+ $this->events_template = wpautop( wp_kses_post( trim( $template ) ), true );
465
+ }
466
+
467
+ //$this->events_template = wpautop( wp_kses_post( trim( $template ) ), true );
468
  }
469
 
470
  /**
648
  $this->start = Carbon::today( $this->timezone )->addYears( $nth )->startOfYear()->getTimeStamp();
649
  } elseif ( 'custom_date' == $calendar_begins ) {
650
  if ( $date = get_post_meta( $this->id, '_calendar_begins_custom_date', true ) ) {
651
+ $this->start = Carbon::createFromFormat( 'Y-m-d', esc_attr( $date ) )->setTimezone( $this->timezone )->startOfDay()->getTimestamp();
652
  }
653
  }
654
  }
783
 
784
  if ( 'yes' == $poweredby ) {
785
  $align = is_rtl() ? 'left' : 'right';
786
+ echo '<small class="simcal-powered simcal-align-' . $align .'">' .
787
+ sprintf( __( 'Powered by <a href="%s" target="_blank">Simple Calendar</a>', 'google-calendar-events' ), simcal_get_url( 'home' ) ) .
788
+ '</small>';
789
  }
790
 
791
  echo '</div>';
includes/admin/assets.php CHANGED
@@ -55,9 +55,10 @@ class Assets {
55
  * Register Admin Scripts *
56
  * ====================== */
57
 
 
58
  wp_register_script(
59
  'simcal-tiptip',
60
- $js_path_vendor . 'tiptip' . $this->min . '.js',
61
  array( 'jquery' ),
62
  '1.3',
63
  true
55
  * Register Admin Scripts *
56
  * ====================== */
57
 
58
+ // TipTip uses ".minified.js" filename ending.
59
  wp_register_script(
60
  'simcal-tiptip',
61
+ $js_path_vendor . 'jquery.tipTip' . ( ( $this->min !== '' ) ? '.minified' : '' ) . '.js',
62
  array( 'jquery' ),
63
  '1.3',
64
  true
includes/admin/fields/select.php CHANGED
@@ -67,6 +67,10 @@ class Select extends Field {
67
  $class .= ' simcal-field-multiselect';
68
  }
69
 
 
 
 
 
70
  $this->type_class = $class;
71
 
72
  $allow_void = isset( $field['allow_void'] ) ? $field['allow_void'] : '';
@@ -86,6 +90,12 @@ class Select extends Field {
86
  $this->value = explode( ',', $this->value );
87
  }
88
 
 
 
 
 
 
 
89
  ?>
90
  <select name="<?php echo $this->name; ?><?php if ( $this->multiselect === true ) { echo '[]'; } ?>"
91
  id="<?php echo $this->id; ?>"
67
  $class .= ' simcal-field-multiselect';
68
  }
69
 
70
+ if ( isset( $field['default'] ) ) {
71
+ $this->default = $field['default'];
72
+ }
73
+
74
  $this->type_class = $class;
75
 
76
  $allow_void = isset( $field['allow_void'] ) ? $field['allow_void'] : '';
90
  $this->value = explode( ',', $this->value );
91
  }
92
 
93
+ if ( $this->default ) {
94
+ if ( empty( $this->value ) || $this->value == '' ) {
95
+ $this->value = $this->default;
96
+ }
97
+ }
98
+
99
  ?>
100
  <select name="<?php echo $this->name; ?><?php if ( $this->multiselect === true ) { echo '[]'; } ?>"
101
  id="<?php echo $this->id; ?>"
includes/admin/metaboxes/settings.php CHANGED
@@ -478,6 +478,30 @@ class Settings implements Meta_Box {
478
  'value' => get_post_meta( $post->ID, '_no_events_message', true ),
479
  ) );
480
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
481
  ?>
482
  </td>
483
  </tr>
@@ -839,6 +863,10 @@ class Settings implements Meta_Box {
839
  $message = isset( $_POST['_no_events_message'] ) ? wp_kses_post( $_POST['_no_events_message'] ) : '';
840
  update_post_meta( $post_id, '_no_events_message', $message );
841
 
 
 
 
 
842
  /* ======================= *
843
  * Advanced settings panel *
844
  * ======================= */
478
  'value' => get_post_meta( $post->ID, '_no_events_message', true ),
479
  ) );
480
 
481
+ ?>
482
+ </td>
483
+ </tr>
484
+ <tr class="simcal-panel-field">
485
+ <th><label for="_event_formatting"><?php _e( 'Event Formatting', 'google-calendar-events' ); ?></label></th>
486
+ <td>
487
+ <?php
488
+
489
+ $event_formatting = get_post_meta( $post->ID, '_event_formatting', true );
490
+
491
+ simcal_print_field( array(
492
+ 'type' => 'select',
493
+ 'name' => '_event_formatting',
494
+ 'id' => '_event_formatting',
495
+ 'tooltip' => __( 'How to preserve line breaks and paragraphs in the event template builder.', 'google-calendar-events' ),
496
+ 'value' => $event_formatting,
497
+ 'default' => 'preserve_linebreaks',
498
+ 'options' => array(
499
+ 'preserve_linebreaks' => __( 'Preserve line breaks, auto paragraphs (default)', 'google-calendar-events' ),
500
+ 'no_linebreaks' => __( 'No line breaks, auto paragraphs', 'google-calendar-events' ),
501
+ 'none' => __( 'No line breaks, no auto paragraphs', 'google-calendar-events' ),
502
+ ),
503
+ ) );
504
+
505
  ?>
506
  </td>
507
  </tr>
863
  $message = isset( $_POST['_no_events_message'] ) ? wp_kses_post( $_POST['_no_events_message'] ) : '';
864
  update_post_meta( $post_id, '_no_events_message', $message );
865
 
866
+ // _event_formatting
867
+ $event_formatting = isset( $_POST['_event_formatting'] ) ? sanitize_key( $_POST['_event_formatting'] ) : 'preserve_linebreaks';
868
+ update_post_meta( $post_id, '_event_formatting', $event_formatting );
869
+
870
  /* ======================= *
871
  * Advanced settings panel *
872
  * ======================= */
includes/admin/pages.php CHANGED
@@ -259,24 +259,7 @@ class Pages {
259
  }
260
  }
261
  }
262
-
263
- // Add option to show we ran through default settings
264
- // We also run a check here for the main settings page option. This is to determine if this is a fresh install or if they already had
265
- // the plugin installed. The main feed settings page would give the best idea of that since user's have to enter an API key on this page to get it working.
266
- if ( false === get_option( 'simple-calendar_defaults' ) && false === get_option( 'simple-calendar_settings_feeds' ) ) {
267
-
268
- $default_advanced = array (
269
- 'assets' => array (
270
- 'always_enqueue' => 'yes',
271
- ),
272
- );
273
-
274
- update_option( 'simple-calendar_settings_advanced', $default_advanced );
275
-
276
- add_option( 'simple-calendar_defaults', 1 );
277
- }
278
-
279
-
280
  ?>
281
  </form>
282
  </div>
259
  }
260
  }
261
  }
262
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  ?>
264
  </form>
265
  </div>
includes/admin/pages/advanced.php CHANGED
@@ -45,8 +45,8 @@ class Advanced extends Admin_Page {
45
  public function add_sections() {
46
  return apply_filters( 'simcal_add_' . $this->option_group . '_' . $this->id .'_sections', array(
47
  'assets' => array(
48
- 'title' => __( 'Scripts and Styles', 'google-calendar-events' ),
49
- 'description' => __( 'Manage front end assets that handle the calendars appearance and user interface.', 'google-calendar-events' )
50
  ),
51
  'installation' => array(
52
  'title' => __( 'Installation', 'google-calendar-events' ),
@@ -72,30 +72,14 @@ class Advanced extends Admin_Page {
72
  if ( 'assets' == $section ) {
73
 
74
  $fields[ $section ] = array(
75
- 'always_enqueue' => array(
76
- 'title' => __( 'Always Enqueue', 'google-calendar-events' ),
77
- 'tooltip' => __( 'If ticked, this option will load all scripts on every page load.', 'google-calendar-events' ),
78
- 'type' => 'checkbox',
79
- 'name' => 'simple-calendar_' . $this->option_group . '_' . $this->id . '[' . $section . '][always_enqueue]',
80
- 'id' => 'simple-calendar-' . $this->option_group . '-' . $this->id . '-' . $section . '-always-enqueue',
81
- 'value' => $this->get_option_value( $section, 'always_enqueue' ),
82
- ),
83
  'disable_css' => array(
84
- 'title' => __( 'Disable Styles', 'google-calendar-events' ),
85
  'tooltip' => __( 'If ticked, this option will prevent front end stylesheet to load.', 'google-calendar-events' ),
86
  'type' => 'checkbox',
87
  'name' => 'simple-calendar_' . $this->option_group . '_' . $this->id . '[' . $section . '][disable_css]',
88
  'id' => 'simple-calendar-' . $this->option_group . '-' . $this->id . '-' . $section . '-disable-css',
89
  'value' => $this->get_option_value( $section, 'disable_css' )
90
  ),
91
- 'disable_js' => array(
92
- 'title' => __( 'Disable Scripts', 'google-calendar-events' ),
93
- 'tooltip' => __( 'If ticked, this option will prevent front end JavaScript to load.', 'google-calendar-events' ),
94
- 'type' => 'checkbox',
95
- 'name' => 'simple-calendar_' . $this->option_group . '_' . $this->id . '[' . $section . '][disable_js]',
96
- 'id' => 'simple-calendar-' . $this->option_group . '-' . $this->id . '-' . $section . '-disable-js',
97
- 'value' => $this->get_option_value( $section, 'disable_js' )
98
- )
99
  );
100
 
101
  } elseif ( 'installation' == $section ) {
45
  public function add_sections() {
46
  return apply_filters( 'simcal_add_' . $this->option_group . '_' . $this->id .'_sections', array(
47
  'assets' => array(
48
+ 'title' => __( 'Styles', 'google-calendar-events' ),
49
+ 'description' => __( 'Manage front end assets that handle the calendars appearance.', 'google-calendar-events' )
50
  ),
51
  'installation' => array(
52
  'title' => __( 'Installation', 'google-calendar-events' ),
72
  if ( 'assets' == $section ) {
73
 
74
  $fields[ $section ] = array(
 
 
 
 
 
 
 
 
75
  'disable_css' => array(
76
+ 'title' => __( 'Disable CSS', 'google-calendar-events' ),
77
  'tooltip' => __( 'If ticked, this option will prevent front end stylesheet to load.', 'google-calendar-events' ),
78
  'type' => 'checkbox',
79
  'name' => 'simple-calendar_' . $this->option_group . '_' . $this->id . '[' . $section . '][disable_css]',
80
  'id' => 'simple-calendar-' . $this->option_group . '-' . $this->id . '-' . $section . '-disable-css',
81
  'value' => $this->get_option_value( $section, 'disable_css' )
82
  ),
 
 
 
 
 
 
 
 
83
  );
84
 
85
  } elseif ( 'installation' == $section ) {
includes/assets.php CHANGED
@@ -45,14 +45,6 @@ class Assets {
45
  */
46
  private $styles = array();
47
 
48
- /**
49
- * Disable scripts.
50
- *
51
- * @access public
52
- * @var bool
53
- */
54
- public $disable_scripts = false;
55
-
56
  /**
57
  * Disable styles.
58
  *
@@ -61,14 +53,6 @@ class Assets {
61
  */
62
  public $disable_styles = false;
63
 
64
- /**
65
- * Disable styles.
66
- *
67
- * @access public
68
- * @var bool
69
- */
70
- public $always_enqueue = false;
71
-
72
  /**
73
  * Hook in tabs.
74
  *
@@ -79,18 +63,11 @@ class Assets {
79
  $this->min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG == true ) ? '' : '.min';
80
 
81
  $settings = get_option( 'simple-calendar_settings_advanced' );
82
- if ( isset( $settings['assets']['disable_js'] ) ) {
83
- $this->disable_scripts = 'yes' == $settings['assets']['disable_js'] ? true : false;
84
- }
85
 
86
  if ( isset( $settings['assets']['disable_css'] ) ) {
87
  $this->disable_styles = 'yes' == $settings['assets']['disable_css'] ? true : false;
88
  }
89
 
90
- if ( isset( $settings['assets']['always_enqueue'] ) ) {
91
- $this->always_enqueue = 'yes' == $settings['assets']['always_enqueue'] ? true : false;
92
- }
93
-
94
  add_action( 'init', array( $this, 'register' ), 20 );
95
  add_action( 'init', array( $this, 'enqueue' ), 40 );
96
  }
@@ -115,22 +92,21 @@ class Assets {
115
 
116
  do_action( 'simcal_enqueue_assets', $this->min );
117
 
118
- if ( false === $this->disable_scripts ) {
119
- $min = $this->min;
120
- // Improves compatibility with themes and plugins using Isotope and Masonry.
121
- add_action( 'wp_enqueue_scripts',
122
- function () use ( $min ) {
123
- if ( wp_script_is( 'simcal-qtip', 'enqueued' ) ) {
124
- wp_enqueue_script(
125
- 'simplecalendar-imagesloaded',
126
- SIMPLE_CALENDAR_ASSETS . 'js/vendor/imagesloaded' . $min . '.js',
127
- array( 'simcal-qtip' ),
128
- '3.1.8',
129
- true
130
- );
131
- }
132
- }, 1000 );
133
- }
134
  }
135
 
136
  /**
@@ -140,93 +116,14 @@ class Assets {
140
  */
141
  public function load() {
142
 
143
- if ( $this->always_enqueue ) {
144
- $scripts = $this->get_default_scripts();
145
- $styles = $this->get_default_styles();
146
-
147
- $this->scripts = apply_filters( 'simcal_front_end_scripts', $scripts, $this->min );
148
- $this->styles = apply_filters( 'simcal_front_end_styles', $styles, $this->min );
149
-
150
- $this->load_scripts( $this->scripts );
151
- $this->load_styles( $this->styles );
152
-
153
- return;
154
- }
155
-
156
- $id = 0;
157
- $cal_id = array();
158
- $scripts = $styles = array();
159
-
160
- if ( is_singular() ) {
161
-
162
- global $post, $post_type;
163
-
164
- if ( 'calendar' == $post_type ) {
165
-
166
- $id = get_queried_object_id();
167
-
168
- $view = simcal_get_calendar_view( $id );
169
- if ( $view instanceof Calendar_View ) {
170
- $scripts[] = $view->scripts( $this->min );
171
- $styles[] = $view->styles( $this->min );
172
- }
173
-
174
- } else {
175
-
176
- $id = absint( get_post_meta( $post->ID, '_simcal_attach_calendar_id', true ) );
177
-
178
- if ( $id === 0 ) {
179
-
180
- preg_match_all( '/' . get_shortcode_regex() . '/s', $post->post_content, $matches, PREG_SET_ORDER );
181
-
182
- if ( ! empty( $matches ) && is_array( $matches ) ) {
183
- foreach ( $matches as $shortcode ) {
184
- if ( 'calendar' === $shortcode[2] || 'gcal' === $shortcode[2] ) {
185
- $atts = shortcode_parse_atts( $shortcode[3] );
186
- $cal_id[] = isset( $atts['id'] ) ? intval( $atts['id'] ) : 0;
187
- }
188
- }
189
- }
190
- }
191
- }
192
- }
193
-
194
- foreach( $cal_id as $i ) {
195
-
196
- if ( $i > 0 ) {
197
-
198
- $view = simcal_get_calendar_view( $i );
199
-
200
- if ( $view instanceof Calendar_View ) {
201
- $scripts[] = $view->scripts( $this->min );
202
- $styles[] = $view->styles( $this->min );
203
- }
204
- }
205
- }
206
-
207
- $this->get_widgets_assets();
208
 
209
  $this->scripts = apply_filters( 'simcal_front_end_scripts', $scripts, $this->min );
 
210
 
211
- // First check if there is a multi-dimensional array of scripts
212
- if ( isset( $this->scripts[0] ) ) {
213
- foreach ( $this->scripts as $script ) {
214
- $this->load_scripts ( $script );
215
- }
216
- } else {
217
- $this->load_scripts( $this->scripts );
218
- }
219
-
220
- $this->styles = apply_filters( 'simcal_front_end_styles', $styles, $this->min );
221
-
222
- // First check if there is a multi-dimensional array of styles
223
- if ( isset( $this->styles[0] ) ) {
224
- foreach( $this->styles as $style ) {
225
- $this->load_styles( $style );
226
- }
227
- } else {
228
- $this->load_styles( $this->styles );
229
- }
230
  }
231
 
232
  /**
@@ -275,7 +172,7 @@ class Assets {
275
  public function load_scripts( $scripts ) {
276
 
277
  // Only load if not disabled in the settings
278
- if ( ! empty( $scripts ) && is_array( $scripts ) && false === $this->disable_scripts ) {
279
 
280
  foreach ( $scripts as $script => $v ) {
281
 
@@ -344,7 +241,7 @@ class Assets {
344
  public function get_default_scripts() {
345
  return array(
346
  'simcal-qtip' => array(
347
- 'src' => SIMPLE_CALENDAR_ASSETS . 'js/vendor/qtip' . $this->min . '.js',
348
  'deps' => array( 'jquery' ),
349
  'ver' => '2.2.1',
350
  'in_footer' => true,
@@ -372,7 +269,7 @@ class Assets {
372
  public function get_default_styles() {
373
  return array(
374
  'simcal-qtip' => array(
375
- 'src' => SIMPLE_CALENDAR_ASSETS . 'css/vendor/qtip' . $this->min . '.css',
376
  'ver' => '2.2.1',
377
  'media' => 'all',
378
  ),
45
  */
46
  private $styles = array();
47
 
 
 
 
 
 
 
 
 
48
  /**
49
  * Disable styles.
50
  *
53
  */
54
  public $disable_styles = false;
55
 
 
 
 
 
 
 
 
 
56
  /**
57
  * Hook in tabs.
58
  *
63
  $this->min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG == true ) ? '' : '.min';
64
 
65
  $settings = get_option( 'simple-calendar_settings_advanced' );
 
 
 
66
 
67
  if ( isset( $settings['assets']['disable_css'] ) ) {
68
  $this->disable_styles = 'yes' == $settings['assets']['disable_css'] ? true : false;
69
  }
70
 
 
 
 
 
71
  add_action( 'init', array( $this, 'register' ), 20 );
72
  add_action( 'init', array( $this, 'enqueue' ), 40 );
73
  }
92
 
93
  do_action( 'simcal_enqueue_assets', $this->min );
94
 
95
+
96
+ $min = $this->min;
97
+ // Improves compatibility with themes and plugins using Isotope and Masonry.
98
+ add_action( 'wp_enqueue_scripts',
99
+ function () use ( $min ) {
100
+ if ( wp_script_is( 'simcal-qtip', 'enqueued' ) ) {
101
+ wp_enqueue_script(
102
+ 'simplecalendar-imagesloaded',
103
+ SIMPLE_CALENDAR_ASSETS . 'js/vendor/imagesloaded.pkgd' . $min . '.js',
104
+ array( 'simcal-qtip' ),
105
+ '3.1.8',
106
+ true
107
+ );
108
+ }
109
+ }, 1000 );
 
110
  }
111
 
112
  /**
116
  */
117
  public function load() {
118
 
119
+ $scripts = $this->get_default_scripts();
120
+ $styles = $this->get_default_styles();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
 
122
  $this->scripts = apply_filters( 'simcal_front_end_scripts', $scripts, $this->min );
123
+ $this->styles = apply_filters( 'simcal_front_end_styles', $styles, $this->min );
124
 
125
+ $this->load_scripts( $this->scripts );
126
+ $this->load_styles( $this->styles );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  }
128
 
129
  /**
172
  public function load_scripts( $scripts ) {
173
 
174
  // Only load if not disabled in the settings
175
+ if ( ! empty( $scripts ) && is_array( $scripts ) ) {
176
 
177
  foreach ( $scripts as $script => $v ) {
178
 
241
  public function get_default_scripts() {
242
  return array(
243
  'simcal-qtip' => array(
244
+ 'src' => SIMPLE_CALENDAR_ASSETS . 'js/vendor/jquery.qtip' . $this->min . '.js',
245
  'deps' => array( 'jquery' ),
246
  'ver' => '2.2.1',
247
  'in_footer' => true,
269
  public function get_default_styles() {
270
  return array(
271
  'simcal-qtip' => array(
272
+ 'src' => SIMPLE_CALENDAR_ASSETS . 'css/vendor/jquery.qtip' . $this->min . '.css',
273
  'ver' => '2.2.1',
274
  'media' => 'all',
275
  ),
includes/calendars/admin/default-calendar-admin.php CHANGED
@@ -281,16 +281,32 @@ class Default_Calendar_Admin {
281
  </td>
282
  </tr>
283
  <tr class="simcal-panel-field simcal-default-calendar-grid simcal-default-calendar-list" style="display: none;">
284
- <th><label for="_default_calendar_event_bubbles_action"><?php _e( 'Expand multi day events', 'google-calendar-events' ); ?></label></th>
285
  <td>
286
  <?php
287
 
 
 
 
 
 
 
 
 
288
  simcal_print_field( array(
289
- 'type' => 'checkbox',
290
  'name' => '_default_calendar_expand_multi_day_events',
291
  'id' => '_default_calendar_expand_multi_day_events',
292
- 'tooltip' => __( 'Show events spanning multiple days on each day.', 'google-calendar-events' ),
293
- 'value' => get_post_meta( $post_id, '_default_calendar_expand_multi_day_events', true ),
 
 
 
 
 
 
 
 
294
  ) );
295
 
296
  ?>
@@ -431,7 +447,7 @@ class Default_Calendar_Admin {
431
  update_post_meta( $post_id, '_default_calendar_trim_titles_chars', $chars );
432
 
433
  // Expand multiple day events on each day.
434
- $multi_day = isset( $_POST['_default_calendar_expand_multi_day_events'] ) ? 'yes' : 'no';
435
  update_post_meta( $post_id, '_default_calendar_expand_multi_day_events', $multi_day );
436
 
437
  }
281
  </td>
282
  </tr>
283
  <tr class="simcal-panel-field simcal-default-calendar-grid simcal-default-calendar-list" style="display: none;">
284
+ <th><label for="_default_calendar_event_bubbles_action"><?php _e( 'Expand multi-day events', 'google-calendar-events' ); ?></label></th>
285
  <td>
286
  <?php
287
 
288
+ $post_meta = get_post_meta( $post_id );
289
+
290
+ if ( ! is_array( $post_meta ) && ! empty( $post_meta ) ) {
291
+ $multi_day_value = 'current_day_only';
292
+ } else {
293
+ $multi_day_value = get_post_meta( $post_id, '_default_calendar_expand_multi_day_events', true );
294
+ }
295
+
296
  simcal_print_field( array(
297
+ 'type' => 'select',
298
  'name' => '_default_calendar_expand_multi_day_events',
299
  'id' => '_default_calendar_expand_multi_day_events',
300
+ 'tooltip' => __( 'For events spanning multiple days, you can display them on each day of the event, ' .
301
+ 'only on the first day of the event, or on all days of the event, but only up to the current day. ' .
302
+ 'Third option applies to list views only.', 'google-calendar-events' ),
303
+ 'value' => $multi_day_value,
304
+ 'options' => array(
305
+ 'yes' => __( 'Yes, display on all days of event', 'google-calendar-events' ),
306
+ 'no' => __( 'No, display only on first day of event', 'google-calendar-events' ),
307
+ 'current_day_only' => __( 'No, display on all days of event up to current day (list view only)', 'google-calendar-events' ),
308
+ ),
309
+ 'default' => 'current_day_only',
310
  ) );
311
 
312
  ?>
447
  update_post_meta( $post_id, '_default_calendar_trim_titles_chars', $chars );
448
 
449
  // Expand multiple day events on each day.
450
+ $multi_day = isset( $_POST['_default_calendar_expand_multi_day_events'] ) && ! empty( $_POST['_default_calendar_expand_multi_day_events'] ) ? sanitize_key( $_POST['_default_calendar_expand_multi_day_events'] ) : 'current_day_only';
451
  update_post_meta( $post_id, '_default_calendar_expand_multi_day_events', $multi_day );
452
 
453
  }
includes/calendars/default-calendar.php CHANGED
@@ -166,7 +166,7 @@ class Default_Calendar extends Calendar {
166
  }
167
 
168
  // Expand multiple day events.
169
- if ( 'yes' == get_post_meta( $this->id, '_default_calendar_expand_multi_day_events', true ) ) {
170
  $this->events = $this->expand_multiple_days_events();
171
  }
172
 
166
  }
167
 
168
  // Expand multiple day events.
169
+ if ( 'yes' == get_post_meta( $this->id, '_default_calendar_expand_multi_day_events', true ) || ( 'list' == $view && 'current_day_only' == get_post_meta( $this->id, '_default_calendar_expand_multi_day_events', true ) ) ) {
170
  $this->events = $this->expand_multiple_days_events();
171
  }
172
 
includes/calendars/views/default-calendar-grid.php CHANGED
@@ -294,7 +294,7 @@ class Default_Calendar_Grid implements Calendar_View {
294
 
295
  // Variables to cycle days in current month and find today in calendar.
296
  $now = $calendar->now;
297
- $current = Carbon::create( $year, $month, 1, 0, 0, 59, $calendar->timezone );
298
  $current_min = $current->getTimestamp();
299
  $current_max = $current->endOfDay()->getTimestamp();
300
 
294
 
295
  // Variables to cycle days in current month and find today in calendar.
296
  $now = $calendar->now;
297
+ $current = Carbon::create( $year, $month, 1, 0, 0, 0, $calendar->timezone );
298
  $current_min = $current->getTimestamp();
299
  $current_max = $current->endOfDay()->getTimestamp();
300
 
includes/calendars/views/default-calendar-list.php CHANGED
@@ -468,6 +468,24 @@ class Default_Calendar_List implements Calendar_View {
468
 
469
  foreach ( $current_events as $ymd => $events ) :
470
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  $day_ts = Carbon::createFromFormat( 'Ymd', $ymd, $calendar->timezone )->getTimestamp();
472
 
473
  if ( ! $calendar->compact_list ) :
468
 
469
  foreach ( $current_events as $ymd => $events ) :
470
 
471
+ // This is where we can find out if an event is a multi-day event and if it needs to be shown.
472
+ // Since this is for list view we are showing the event on the day viewed if it is part of that day even when
473
+ // expand multi-day events are turned off.
474
+ if ( isset( $events[0][0]->multiple_days ) && $events[0][0]->multiple_days > 0 ) {
475
+ if ( 'current_day_only' == get_post_meta($calendar->id, '_default_calendar_expand_multi_day_events', true ) ) {
476
+
477
+ $year = substr( $ymd, 0, 4 );
478
+ $month = substr( $ymd, 4, 2 );
479
+ $day = substr( $ymd, 6, 2 );
480
+
481
+ $temp_date = Carbon::createFromDate( $year, $month, $day );
482
+
483
+ if( ! ( $temp_date < Carbon::now()->endOfDay() ) ) {
484
+ continue;
485
+ }
486
+ }
487
+ }
488
+
489
  $day_ts = Carbon::createFromFormat( 'Ymd', $ymd, $calendar->timezone )->getTimestamp();
490
 
491
  if ( ! $calendar->compact_list ) :
includes/events/event-builder.php CHANGED
@@ -175,7 +175,9 @@ class Event_Builder {
175
  );
176
 
177
  // Removes extra consecutive <br> tags.
178
- return preg_replace( '#(<br */?>\s*)+#i', '<br />', trim( $result ) );
 
 
179
  }
180
 
181
  /**
@@ -556,6 +558,8 @@ class Event_Builder {
556
  $markdown = new \Parsedown();
557
  $description = $markdown->text( wp_strip_all_tags( $description ) );
558
  }
 
 
559
  }
560
 
561
  $description = $this->limit_words( $description, $attr['limit'] );
@@ -692,17 +696,17 @@ class Event_Builder {
692
  $value = human_time_diff( $event_dt->getTimestamp(), Carbon::now( $event->timezone )->getTimestamp() );
693
 
694
  if ( $event_dt->getTimestamp() < Carbon::now( $event->timezone )->getTimestamp() ) {
695
- $value .= ' ' . _x( 'before', 'human date event builder code modifier', 'google-calendar-events' );
696
  } else {
697
- $value .= ' ' . _x( 'after', 'human date event builder code modifier', 'google-calendar-events' );
698
  }
699
  } else {
700
  $value = date_i18n( $dt_format, $event_dt->getTimestamp() );
701
  }
702
 
703
- return '<span class="simcal-event-' . $bound . ' ' . 'simcal-event-' . $bound . '-' . $format . '"' .
704
- 'data-event-' . $bound . '="' . $event_dt->getTimestamp() . '"' .
705
- 'data-event-format="' . $dt_format . '"' .
706
  'itemprop="' . $bound . 'Date" content="' . $event_dt->toIso8601String() . '">' .
707
  $value .
708
  '</span>';
175
  );
176
 
177
  // Removes extra consecutive <br> tags.
178
+ // TODO: Doesn't seem to work but going to remove it to allow multiple <br> tags in the editor
179
+ /*return preg_replace( '#(<br *//*?>\s*)+#i', '<br />', trim( $result ) );*/
180
+ return trim( $result );
181
  }
182
 
183
  /**
558
  $markdown = new \Parsedown();
559
  $description = $markdown->text( wp_strip_all_tags( $description ) );
560
  }
561
+ } else {
562
+ $description = wpautop( $description );
563
  }
564
 
565
  $description = $this->limit_words( $description, $attr['limit'] );
696
  $value = human_time_diff( $event_dt->getTimestamp(), Carbon::now( $event->timezone )->getTimestamp() );
697
 
698
  if ( $event_dt->getTimestamp() < Carbon::now( $event->timezone )->getTimestamp() ) {
699
+ $value .= ' ' . _x( 'ago', 'human date event builder code modifier', 'google-calendar-events' );
700
  } else {
701
+ $value .= ' ' . _x( 'from now', 'human date event builder code modifier', 'google-calendar-events' );
702
  }
703
  } else {
704
  $value = date_i18n( $dt_format, $event_dt->getTimestamp() );
705
  }
706
 
707
+ return '<span class="simcal-event-' . $bound . ' ' . 'simcal-event-' . $bound . '-' . $format . '" ' .
708
+ 'data-event-' . $bound . '="' . $event_dt->getTimestamp() . '" ' .
709
+ 'data-event-format="' . $dt_format . '" ' .
710
  'itemprop="' . $bound . 'Date" content="' . $event_dt->toIso8601String() . '">' .
711
  $value .
712
  '</span>';
includes/feeds/grouped-calendars.php CHANGED
@@ -162,10 +162,29 @@ class Grouped_Calendars extends Feed {
162
  }
163
 
164
  }
 
 
 
165
 
166
  return $events;
167
  }
168
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  /**
170
  * Array filter key.
171
  *
162
  }
163
 
164
  }
165
+
166
+ // Sort events by start time before returning
167
+ uasort( $events, array( $this, 'sort_by_start_time' ) );
168
 
169
  return $events;
170
  }
171
 
172
+ /**
173
+ * uasort helper to sort events by start time.
174
+ *
175
+ * @since 3.0.13
176
+ * @access private
177
+ */
178
+ private function sort_by_start_time( $a, $b ) {
179
+ if ( $a == $b ) {
180
+ return 0;
181
+ }
182
+
183
+ return ( $a[0]->start < $b[0]->start ) ? -1 : 1;
184
+ }
185
+
186
+
187
+
188
  /**
189
  * Array filter key.
190
  *
includes/main.php CHANGED
@@ -191,7 +191,7 @@ final class Plugin {
191
  do_action( 'before_simcal_init' );
192
 
193
  // Set up localization.
194
- load_plugin_textdomain( 'google-calendar-events', false, dirname( plugin_basename( SIMPLE_CALENDAR_MAIN_FILE ) ) . '/languages/' );
195
 
196
  // Init objects factory.
197
  $this->objects = new Objects();
@@ -249,6 +249,7 @@ final class Plugin {
249
  return 'https://wordpress.org/support/plugin/google-calendar-events';
250
  case 'gdev-console':
251
  return 'https://console.developers.google.com';
 
252
  default :
253
  return self::$homepage;
254
  }
191
  do_action( 'before_simcal_init' );
192
 
193
  // Set up localization.
194
+ load_plugin_textdomain( 'google-calendar-events', false, dirname( plugin_basename( SIMPLE_CALENDAR_MAIN_FILE ) ) . '/i18n/' );
195
 
196
  // Init objects factory.
197
  $this->objects = new Objects();
249
  return 'https://wordpress.org/support/plugin/google-calendar-events';
250
  case 'gdev-console':
251
  return 'https://console.developers.google.com';
252
+ case 'home' :
253
  default :
254
  return self::$homepage;
255
  }
includes/post-types.php CHANGED
@@ -33,6 +33,25 @@ class Post_Types {
33
  add_filter( 'the_content', array( $this, 'filter_post_content' ), 100 );
34
  // Delete calendar transients and notices upon post deletion.
35
  add_action( 'before_delete_post', array( $this, 'upon_deletion' ), 10, 1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
 
38
  /**
33
  add_filter( 'the_content', array( $this, 'filter_post_content' ), 100 );
34
  // Delete calendar transients and notices upon post deletion.
35
  add_action( 'before_delete_post', array( $this, 'upon_deletion' ), 10, 1 );
36
+ // Remove the rich editor so users are forced to use the HTML editor for our CPT
37
+ // TODO: Added
38
+ add_filter( 'user_can_richedit', array( $this, 'disable_wysiwyg' ) );
39
+ }
40
+
41
+ /**
42
+ * Disable riche editor for our CPT.
43
+ *
44
+ * @since 3.0.13
45
+ */
46
+ // TODO: Added
47
+ function disable_wysiwyg( $default ) {
48
+ global $post;
49
+
50
+ if ( $post->post_type === 'calendar' ) {
51
+ return false;
52
+ }
53
+
54
+ return $default;
55
  }
56
 
57
  /**
includes/update.php CHANGED
@@ -54,6 +54,7 @@ class Update {
54
  '2.1.0',
55
  '2.2.0',
56
  '3.0.0',
 
57
  );
58
 
59
  /**
54
  '2.1.0',
55
  '2.2.0',
56
  '3.0.0',
57
+ '3.0.13',
58
  );
59
 
60
  /**
includes/updates/update-v3013.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Update to 3.0.13
4
+ *
5
+ * @package SimpleCalendar/Updates
6
+ */
7
+ namespace SimpleCalendar\Updates;
8
+
9
+ use Carbon\Carbon;
10
+ use SimpleCalendar\Post_Types;
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit;
14
+ }
15
+
16
+ /**
17
+ * Update to 3.0.13
18
+ */
19
+ class Update_V3013 {
20
+
21
+ /**
22
+ * Update posts and options.
23
+ *
24
+ * @param array $posts
25
+ */
26
+ public function __construct( $posts ) {
27
+
28
+ $this->update_options();
29
+ }
30
+
31
+
32
+ /**
33
+ * Update options.
34
+ */
35
+ public function update_options() {
36
+
37
+ $settings_advanced = get_option( 'simple-calendar_settings_advanced' );
38
+
39
+ // Remove stored always_enqueue value
40
+ if ( isset( $settings_advanced['assets']['always_enqueue'] ) ) {
41
+ unset( $settings_advanced['assets']['always_enqueue'] );
42
+ }
43
+
44
+ // Remove stored disable_js value
45
+ if ( isset( $settings_advanced['assets']['disable_js'] ) ) {
46
+ unset( $settings_advanced['assets']['disable_js'] );
47
+ }
48
+
49
+ update_option( 'simple-calendar_settings_advanced', $settings_advanced );
50
+
51
+ // Delete legacy options.
52
+ delete_option( 'simple-calendar_defaults' );
53
+ }
54
+
55
+ }
{vendor/nekojira/wp-requirements/src → includes}/wp-requirements.php RENAMED
@@ -11,9 +11,9 @@
11
  * @license GPL2+
12
  */
13
 
14
- if ( ! class_exists( 'WP_Requirements' ) ) {
15
 
16
- class WP_Requirements {
17
 
18
  /**
19
  * Plugin name.
11
  * @license GPL2+
12
  */
13
 
14
+ if ( ! class_exists( 'SimCal_WP_Requirements' ) ) {
15
 
16
+ class SimCal_WP_Requirements {
17
 
18
  /**
19
  * Plugin name.
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: moonstonemedia, pderksen, nickyoung87, nekojira, rosshanney
3
  Tags: calendar, calendars, calendar manager, custom calendar, custom calendars, event, events, events feed, google calendar, google
4
  Requires at least: 4.0
5
  Tested up to: 4.4
6
- Stable tag: 3.0.12
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -80,6 +80,18 @@ We'd love your help! Here's a few things you can do:
80
 
81
  == Changelog ==
82
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  = 3.0.12 - January 5, 2016 =
84
 
85
  * Fix: All-day events on the first day of the month will now show up correctly.
3
  Tags: calendar, calendars, calendar manager, custom calendar, custom calendars, event, events, events feed, google calendar, google
4
  Requires at least: 4.0
5
  Tested up to: 4.4
6
+ Stable tag: 3.0.13
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
80
 
81
  == Changelog ==
82
 
83
+ = 3.0.13 - January 25, 2016 =
84
+
85
+ * Tweak: Lists that start on a custom date will start at the beginning of the day now.
86
+ * Tweak: Make it so grouped calendars are properly sorted by event time.
87
+ * Tweak: Updated option for controlling multi-day events.
88
+ * Tweak: Allow line breaks from Google calendar description to persist if not using the html attribute.
89
+ * Tweak: Updated text output for human date times.
90
+ * Fix: Multi-day events that span over to the first day of the month should now show correctly.
91
+ * Feature: Added dropdown option on how to handle line breaks and paragraphs for the event template tags.
92
+ * Dev: Removed WP Requirements from Composer.
93
+ * Dev: Removed always enqueue and disable scripts options so scripts will load automatically on every page.
94
+
95
  = 3.0.12 - January 5, 2016 =
96
 
97
  * Fix: All-day events on the first day of the month will now show up correctly.
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInitb55f7e1ddb2cda36284e4e381d3b925d::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInitf50f71b9e5ccf3b414fb1e6d3dd4abf9::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -147,7 +147,7 @@ class ClassLoader
147
  * appending or prepending to the ones previously set for this namespace.
148
  *
149
  * @param string $prefix The prefix/namespace, with trailing '\\'
150
- * @param array|string $paths The PSR-0 base directories
151
  * @param bool $prepend Whether to prepend the directories
152
  *
153
  * @throws \InvalidArgumentException
147
  * appending or prepending to the ones previously set for this namespace.
148
  *
149
  * @param string $prefix The prefix/namespace, with trailing '\\'
150
+ * @param array|string $paths The PSR-4 base directories
151
  * @param bool $prepend Whether to prepend the directories
152
  *
153
  * @throws \InvalidArgumentException
vendor/composer/autoload_classmap.php CHANGED
@@ -3665,7 +3665,6 @@ return array(
3665
  'Symfony\\Component\\Translation\\Util\\ArrayConverter' => $vendorDir . '/symfony/translation/Util/ArrayConverter.php',
3666
  'Symfony\\Component\\Translation\\Writer\\TranslationWriter' => $vendorDir . '/symfony/translation/Writer/TranslationWriter.php',
3667
  'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
3668
- 'WP_Requirements' => $vendorDir . '/nekojira/wp-requirements/src/wp-requirements.php',
3669
  'xrstf\\Composer52\\AutoloadGenerator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php',
3670
  'xrstf\\Composer52\\Generator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/Generator.php',
3671
  );
3665
  'Symfony\\Component\\Translation\\Util\\ArrayConverter' => $vendorDir . '/symfony/translation/Util/ArrayConverter.php',
3666
  'Symfony\\Component\\Translation\\Writer\\TranslationWriter' => $vendorDir . '/symfony/translation/Writer/TranslationWriter.php',
3667
  'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
 
3668
  'xrstf\\Composer52\\AutoloadGenerator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php',
3669
  'xrstf\\Composer52\\Generator' => $vendorDir . '/xrstf/composer-php52/lib/xrstf/Composer52/Generator.php',
3670
  );
vendor/composer/autoload_namespaces.php CHANGED
@@ -9,5 +9,4 @@ return array(
9
  'xrstf\\Composer52' => array($vendorDir . '/xrstf/composer-php52/lib'),
10
  'Parsedown' => array($vendorDir . '/erusev/parsedown'),
11
  'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src'),
12
- '' => array($vendorDir . '/nekojira/wp-requirements/src'),
13
  );
9
  'xrstf\\Composer52' => array($vendorDir . '/xrstf/composer-php52/lib'),
10
  'Parsedown' => array($vendorDir . '/erusev/parsedown'),
11
  'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src'),
 
12
  );
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInitb55f7e1ddb2cda36284e4e381d3b925d {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitb55f7e1ddb2cda36284e4e381d3b925d {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitb55f7e1ddb2cda36284e4e381d3b925d', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitb55f7e1ddb2cda36284e4e381d3b925d', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInitf50f71b9e5ccf3b414fb1e6d3dd4abf9 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitf50f71b9e5ccf3b414fb1e6d3dd4abf9', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitf50f71b9e5ccf3b414fb1e6d3dd4abf9', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/installed.json CHANGED
@@ -115,97 +115,6 @@
115
  ],
116
  "homepage": "http://www.xrstf.de/"
117
  },
118
- {
119
- "name": "nekojira/wp-requirements",
120
- "version": "1.4.1",
121
- "version_normalized": "1.4.1.0",
122
- "source": {
123
- "type": "git",
124
- "url": "https://github.com/unfulvio/wp-requirements.git",
125
- "reference": "c12147245286b5b9053d1745995677e6df36e96d"
126
- },
127
- "dist": {
128
- "type": "zip",
129
- "url": "https://api.github.com/repos/unfulvio/wp-requirements/zipball/c12147245286b5b9053d1745995677e6df36e96d",
130
- "reference": "c12147245286b5b9053d1745995677e6df36e96d",
131
- "shasum": ""
132
- },
133
- "time": "2015-10-05 09:08:37",
134
- "type": "library",
135
- "installation-source": "dist",
136
- "autoload": {
137
- "psr-0": {
138
- "": "src"
139
- }
140
- },
141
- "notification-url": "https://packagist.org/downloads/",
142
- "license": [
143
- "GPL-2.0+"
144
- ],
145
- "authors": [
146
- {
147
- "name": "Fulvio Notarstefano",
148
- "email": "fulvio.notarstefano@gmail.com",
149
- "homepage": "https://github.com/nekojira",
150
- "role": "Developer"
151
- }
152
- ],
153
- "description": "Utility for WordPress plugin developers to check PHP version, WordPress version and presence of PHP extensions in current installation.",
154
- "homepage": "https://github.com/nekojira/wp-requirements/",
155
- "keywords": [
156
- "php",
157
- "requirements",
158
- "version",
159
- "wordpress"
160
- ]
161
- },
162
- {
163
- "name": "mexitek/phpcolors",
164
- "version": "dev-master",
165
- "version_normalized": "9999999-dev",
166
- "source": {
167
- "type": "git",
168
- "url": "https://github.com/mexitek/phpColors.git",
169
- "reference": "89bf30473a68dc8845e46e9db3e536b969e18c11"
170
- },
171
- "dist": {
172
- "type": "zip",
173
- "url": "https://api.github.com/repos/mexitek/phpColors/zipball/89bf30473a68dc8845e46e9db3e536b969e18c11",
174
- "reference": "89bf30473a68dc8845e46e9db3e536b969e18c11",
175
- "shasum": ""
176
- },
177
- "require": {
178
- "php": ">=5.3.0"
179
- },
180
- "time": "2015-09-09 15:43:06",
181
- "type": "library",
182
- "installation-source": "source",
183
- "autoload": {
184
- "classmap": [
185
- "src"
186
- ]
187
- },
188
- "notification-url": "https://packagist.org/downloads/",
189
- "license": [
190
- "MIT"
191
- ],
192
- "authors": [
193
- {
194
- "name": "Arlo Carreon",
195
- "homepage": "http://arlocarreon.com",
196
- "role": "creator"
197
- }
198
- ],
199
- "description": "A series of methods that let you manipulate colors. Just incase you ever need different shades of one color on the fly.",
200
- "homepage": "http://mexitek.github.com/phpColors/",
201
- "keywords": [
202
- "color",
203
- "css",
204
- "design",
205
- "frontend",
206
- "ui"
207
- ]
208
- },
209
  {
210
  "name": "nesbot/carbon",
211
  "version": "1.21.0",
@@ -526,5 +435,55 @@
526
  ],
527
  "description": "Symfony Translation Component",
528
  "homepage": "https://symfony.com"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
529
  }
530
  ]
115
  ],
116
  "homepage": "http://www.xrstf.de/"
117
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  {
119
  "name": "nesbot/carbon",
120
  "version": "1.21.0",
435
  ],
436
  "description": "Symfony Translation Component",
437
  "homepage": "https://symfony.com"
438
+ },
439
+ {
440
+ "name": "mexitek/phpcolors",
441
+ "version": "dev-master",
442
+ "version_normalized": "9999999-dev",
443
+ "source": {
444
+ "type": "git",
445
+ "url": "https://github.com/mexitek/phpColors.git",
446
+ "reference": "629eb54bf7f920529c815fd5f85b5af9651ae9f0"
447
+ },
448
+ "dist": {
449
+ "type": "zip",
450
+ "url": "https://api.github.com/repos/mexitek/phpColors/zipball/629eb54bf7f920529c815fd5f85b5af9651ae9f0",
451
+ "reference": "629eb54bf7f920529c815fd5f85b5af9651ae9f0",
452
+ "shasum": ""
453
+ },
454
+ "require": {
455
+ "php": ">=5.3.0"
456
+ },
457
+ "require-dev": {
458
+ "nette/tester": "~1.6"
459
+ },
460
+ "time": "2016-01-12 23:45:10",
461
+ "type": "library",
462
+ "installation-source": "source",
463
+ "autoload": {
464
+ "classmap": [
465
+ "src"
466
+ ]
467
+ },
468
+ "notification-url": "https://packagist.org/downloads/",
469
+ "license": [
470
+ "MIT"
471
+ ],
472
+ "authors": [
473
+ {
474
+ "name": "Arlo Carreon",
475
+ "homepage": "http://arlocarreon.com",
476
+ "role": "creator"
477
+ }
478
+ ],
479
+ "description": "A series of methods that let you manipulate colors. Just incase you ever need different shades of one color on the fly.",
480
+ "homepage": "http://mexitek.github.com/phpColors/",
481
+ "keywords": [
482
+ "color",
483
+ "css",
484
+ "design",
485
+ "frontend",
486
+ "ui"
487
+ ]
488
  }
489
  ]
vendor/google/apiclient/src/Google/IO/Curl.php CHANGED
@@ -109,6 +109,7 @@ class Google_IO_Curl extends Google_IO_Abstract
109
  );
110
 
111
  $response = curl_exec($curl);
 
112
  if ($response === false) {
113
  $error = curl_error($curl);
114
  $code = curl_errno($curl);
109
  );
110
 
111
  $response = curl_exec($curl);
112
+
113
  if ($response === false) {
114
  $error = curl_error($curl);
115
  $code = curl_errno($curl);
vendor/mexitek/phpcolors/composer.json CHANGED
@@ -7,6 +7,9 @@
7
  "require": {
8
  "php": ">=5.3.0"
9
  },
 
 
 
10
  "authors" : [
11
  { "name": "Arlo Carreon", "homepage":"http://arlocarreon.com", "role" : "creator" }
12
  ],
7
  "require": {
8
  "php": ">=5.3.0"
9
  },
10
+ "require-dev": {
11
+ "nette/tester": "~1.6"
12
+ },
13
  "authors" : [
14
  { "name": "Arlo Carreon", "homepage":"http://arlocarreon.com", "role" : "creator" }
15
  ],
vendor/mexitek/phpcolors/src/Mexitek/PHPColors/Color.php CHANGED
@@ -190,10 +190,11 @@ class Color {
190
  throw new Exception("Param was not an RGB array");
191
  }
192
 
 
193
  // Convert RGB to HEX
194
- $hex[0] = dechex( $rgb['R'] );
195
- $hex[1] = dechex( $rgb['G'] );
196
- $hex[2] = dechex( $rgb['B'] );
197
 
198
  return implode( '', $hex );
199
 
@@ -262,9 +263,10 @@ class Color {
262
  /**
263
  * Returns whether or not given color is considered "light"
264
  * @param string|Boolean $color
 
265
  * @return boolean
266
  */
267
- public function isLight( $color = FALSE ){
268
  // Get our color
269
  $color = ($color) ? $color : $this->_hex;
270
 
@@ -273,15 +275,16 @@ class Color {
273
  $g = hexdec($color[2].$color[3]);
274
  $b = hexdec($color[4].$color[5]);
275
 
276
- return (( $r*299 + $g*587 + $b*114 )/1000 > 130);
277
  }
278
 
279
  /**
280
  * Returns whether or not a given color is considered "dark"
281
  * @param string|Boolean $color
 
282
  * @return boolean
283
  */
284
- public function isDark( $color = FALSE ){
285
  // Get our color
286
  $color = ($color) ? $color:$this->_hex;
287
 
@@ -290,7 +293,7 @@ class Color {
290
  $g = hexdec($color[2].$color[3]);
291
  $b = hexdec($color[4].$color[5]);
292
 
293
- return (( $r*299 + $g*587 + $b*114 )/1000 <= 130);
294
  }
295
 
296
  /**
190
  throw new Exception("Param was not an RGB array");
191
  }
192
 
193
+ // https://github.com/mexitek/phpColors/issues/25#issuecomment-88354815
194
  // Convert RGB to HEX
195
+ $hex[0] = str_pad(dechex($rgb['R']), 2, '0', STR_PAD_LEFT);
196
+ $hex[1] = str_pad(dechex($rgb['G']), 2, '0', STR_PAD_LEFT);
197
+ $hex[2] = str_pad(dechex($rgb['B']), 2, '0', STR_PAD_LEFT);
198
 
199
  return implode( '', $hex );
200
 
263
  /**
264
  * Returns whether or not given color is considered "light"
265
  * @param string|Boolean $color
266
+ * @param int $lighterThan
267
  * @return boolean
268
  */
269
+ public function isLight( $color = FALSE, $lighterThan = 130 ){
270
  // Get our color
271
  $color = ($color) ? $color : $this->_hex;
272
 
275
  $g = hexdec($color[2].$color[3]);
276
  $b = hexdec($color[4].$color[5]);
277
 
278
+ return (( $r*299 + $g*587 + $b*114 )/1000 > $lighterThan);
279
  }
280
 
281
  /**
282
  * Returns whether or not a given color is considered "dark"
283
  * @param string|Boolean $color
284
+ * @param int $darkerThan
285
  * @return boolean
286
  */
287
+ public function isDark( $color = FALSE, $darkerThan = 130 ){
288
  // Get our color
289
  $color = ($color) ? $color:$this->_hex;
290
 
293
  $g = hexdec($color[2].$color[3]);
294
  $b = hexdec($color[4].$color[5]);
295
 
296
+ return (( $r*299 + $g*587 + $b*114 )/1000 <= $darkerThan);
297
  }
298
 
299
  /**
vendor/mexitek/phpcolors/test/colorTest.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- require_once __DIR__ . "/../src/Mexitek/PHPColors/Color.php";
4
- use Mexitek\PHPColors\Color;
5
-
6
- class ColorTest extends PHPUnit_Framework_TestCase {
7
-
8
- protected function setUp() {}
9
-
10
- public function testDarkenWithDefaultAdjustment() {
11
-
12
- $expected = array(
13
- "336699" => "264d73",
14
- "913399" => "6d2673"
15
- );
16
-
17
- foreach ($expected as $original => $darker) {
18
-
19
- $color = new Color($original);
20
-
21
- $this->assertEquals(
22
- $darker,
23
- $color->darken(),
24
- "Incorrect darker color returned."
25
- );
26
- }
27
- }
28
-
29
- public function testLightenWithDefaultAdjustment() {
30
-
31
- $expected = array(
32
- "336699" => "4080bf",
33
- "913399" => "b540bf"
34
- );
35
-
36
- foreach ($expected as $original => $darker) {
37
-
38
- $color = new Color($original);
39
-
40
- $this->assertEquals(
41
- $darker,
42
- $color->lighten(),
43
- "Incorrect lighter color returned."
44
- );
45
- }
46
- }
47
-
48
- }
49
-
50
- /* End of file Color.php */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/mexitek/phpcolors/tests/bootstrap.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require __DIR__ . '/../vendor/autoload.php';
4
+ require __DIR__ . '/../src/Mexitek/PHPColors/Color.php';
5
+
6
+ if (!class_exists('Tester\Assert')) {
7
+ echo "Install Nette Tester using `composer update --dev`\n";
8
+ exit(1);
9
+ }
10
+
11
+ Tester\Environment::setup();
vendor/mexitek/phpcolors/tests/colorAnalyze.phpt ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require __DIR__ . '/bootstrap.php';
4
+
5
+ use Mexitek\PHPColors\Color;
6
+ use Tester\Assert;
7
+
8
+
9
+ $isDark = array(
10
+ "000000" => TRUE,
11
+ "336699" => TRUE,
12
+ "913399" => TRUE,
13
+ "E5C3E8" => FALSE,
14
+ "D7E8DD" => FALSE,
15
+ "218A47" => TRUE,
16
+ "3D41CA" => TRUE,
17
+ "E5CCDD" => FALSE,
18
+ "FFFFFF" => FALSE,
19
+ );
20
+
21
+ foreach ($isDark as $colorHex => $state) {
22
+ $color = new Color($colorHex);
23
+ Assert::same($state, $color->isDark(), 'Incorrect dark color analyzed (#'. $colorHex .').');
24
+ }
25
+
26
+ $isLight = array(
27
+ "FFFFFF" => TRUE,
28
+ "A3FFE5" => TRUE,
29
+ "000000" => FALSE,
30
+ );
31
+
32
+ foreach ($isLight as $colorHex => $state) {
33
+ $color = new Color($colorHex);
34
+ Assert::same($state, $color->isLight(), 'Incorrect light color analyzed (#'. $colorHex .').');
35
+ }
vendor/mexitek/phpcolors/tests/colorChange.phpt ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require __DIR__ . '/bootstrap.php';
4
+
5
+ use Mexitek\PHPColors\Color;
6
+ use Tester\Assert;
7
+
8
+
9
+ $expected = array(
10
+ "336699" => "264d73",
11
+ "913399" => "6d2673"
12
+ );
13
+
14
+ foreach ($expected as $original => $darker) {
15
+ $color = new Color($original);
16
+ Assert::same($darker, $color->darken(), 'Incorrect darker color returned.');
17
+ }
18
+
19
+
20
+ $expected = array(
21
+ "336699" => "4080bf",
22
+ "913399" => "b540bf"
23
+ );
24
+
25
+ foreach ($expected as $original => $lighter) {
26
+ $color = new Color($original);
27
+ Assert::same($lighter, $color->lighten(), "Incorrect lighter color returned.");
28
+ }
vendor/nekojira/wp-requirements/LICENSE.txt DELETED
@@ -1,339 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your
12
- freedom to share and change it. By contrast, the GNU General Public
13
- License is intended to guarantee your freedom to share and change free
14
- software--to make sure the software is free for all its users. This
15
- General Public License applies to most of the Free Software
16
- Foundation's software and to any other program whose authors commit to
17
- using it. (Some other Free Software Foundation software is covered by
18
- the GNU Lesser General Public License instead.) You can apply it to
19
- your programs, too.
20
-
21
- When we speak of free software, we are referring to freedom, not
22
- price. Our General Public Licenses are designed to make sure that you
23
- have the freedom to distribute copies of free software (and charge for
24
- this service if you wish), that you receive source code or can get it
25
- if you want it, that you can change the software or use pieces of it
26
- in new free programs; and that you know you can do these things.
27
-
28
- To protect your rights, we need to make restrictions that forbid
29
- anyone to deny you these rights or to ask you to surrender the rights.
30
- These restrictions translate to certain responsibilities for you if you
31
- distribute copies of the software, or if you modify it.
32
-
33
- For example, if you distribute copies of such a program, whether
34
- gratis or for a fee, you must give the recipients all the rights that
35
- you have. You must make sure that they, too, receive or can get the
36
- source code. And you must show them these terms so they know their
37
- rights.
38
-
39
- We protect your rights with two steps: (1) copyright the software, and
40
- (2) offer you this license which gives you legal permission to copy,
41
- distribute and/or modify the software.
42
-
43
- Also, for each author's protection and ours, we want to make certain
44
- that everyone understands that there is no warranty for this free
45
- software. If the software is modified by someone else and passed on, we
46
- want its recipients to know that what they have is not the original, so
47
- that any problems introduced by others will not reflect on the original
48
- authors' reputations.
49
-
50
- Finally, any free program is threatened constantly by software
51
- patents. We wish to avoid the danger that redistributors of a free
52
- program will individually obtain patent licenses, in effect making the
53
- program proprietary. To prevent this, we have made it clear that any
54
- patent must be licensed for everyone's free use or not licensed at all.
55
-
56
- The precise terms and conditions for copying, distribution and
57
- modification follow.
58
-
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
- 0. This License applies to any program or other work which contains
63
- a notice placed by the copyright holder saying it may be distributed
64
- under the terms of this General Public License. The "Program", below,
65
- refers to any such program or work, and a "work based on the Program"
66
- means either the Program or any derivative work under copyright law:
67
- that is to say, a work containing the Program or a portion of it,
68
- either verbatim or with modifications and/or translated into another
69
- language. (Hereinafter, translation is included without limitation in
70
- the term "modification".) Each licensee is addressed as "you".
71
-
72
- Activities other than copying, distribution and modification are not
73
- covered by this License; they are outside its scope. The act of
74
- running the Program is not restricted, and the output from the Program
75
- is covered only if its contents constitute a work based on the
76
- Program (independent of having been made by running the Program).
77
- Whether that is true depends on what the Program does.
78
-
79
- 1. You may copy and distribute verbatim copies of the Program's
80
- source code as you receive it, in any medium, provided that you
81
- conspicuously and appropriately publish on each copy an appropriate
82
- copyright notice and disclaimer of warranty; keep intact all the
83
- notices that refer to this License and to the absence of any warranty;
84
- and give any other recipients of the Program a copy of this License
85
- along with the Program.
86
-
87
- You may charge a fee for the physical act of transferring a copy, and
88
- you may at your option offer warranty protection in exchange for a fee.
89
-
90
- 2. You may modify your copy or copies of the Program or any portion
91
- of it, thus forming a work based on the Program, and copy and
92
- distribute such modifications or work under the terms of Section 1
93
- above, provided that you also meet all of these conditions:
94
-
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
113
-
114
- These requirements apply to the modified work as a whole. If
115
- identifiable sections of that work are not derived from the Program,
116
- and can be reasonably considered independent and separate works in
117
- themselves, then this License, and its terms, do not apply to those
118
- sections when you distribute them as separate works. But when you
119
- distribute the same sections as part of a whole which is a work based
120
- on the Program, the distribution of the whole must be on the terms of
121
- this License, whose permissions for other licensees extend to the
122
- entire whole, and thus to each and every part regardless of who wrote it.
123
-
124
- Thus, it is not the intent of this section to claim rights or contest
125
- your rights to work written entirely by you; rather, the intent is to
126
- exercise the right to control the distribution of derivative or
127
- collective works based on the Program.
128
-
129
- In addition, mere aggregation of another work not based on the Program
130
- with the Program (or with a work based on the Program) on a volume of
131
- a storage or distribution medium does not bring the other work under
132
- the scope of this License.
133
-
134
- 3. You may copy and distribute the Program (or a work based on it,
135
- under Section 2) in object code or executable form under the terms of
136
- Sections 1 and 2 above provided that you also do one of the following:
137
-
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
148
-
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
154
-
155
- The source code for a work means the preferred form of the work for
156
- making modifications to it. For an executable work, complete source
157
- code means all the source code for all modules it contains, plus any
158
- associated interface definition files, plus the scripts used to
159
- control compilation and installation of the executable. However, as a
160
- special exception, the source code distributed need not include
161
- anything that is normally distributed (in either source or binary
162
- form) with the major components (compiler, kernel, and so on) of the
163
- operating system on which the executable runs, unless that component
164
- itself accompanies the executable.
165
-
166
- If distribution of executable or object code is made by offering
167
- access to copy from a designated place, then offering equivalent
168
- access to copy the source code from the same place counts as
169
- distribution of the source code, even though third parties are not
170
- compelled to copy the source along with the object code.
171
-
172
- 4. You may not copy, modify, sublicense, or distribute the Program
173
- except as expressly provided under this License. Any attempt
174
- otherwise to copy, modify, sublicense or distribute the Program is
175
- void, and will automatically terminate your rights under this License.
176
- However, parties who have received copies, or rights, from you under
177
- this License will not have their licenses terminated so long as such
178
- parties remain in full compliance.
179
-
180
- 5. You are not required to accept this License, since you have not
181
- signed it. However, nothing else grants you permission to modify or
182
- distribute the Program or its derivative works. These actions are
183
- prohibited by law if you do not accept this License. Therefore, by
184
- modifying or distributing the Program (or any work based on the
185
- Program), you indicate your acceptance of this License to do so, and
186
- all its terms and conditions for copying, distributing or modifying
187
- the Program or works based on it.
188
-
189
- 6. Each time you redistribute the Program (or any work based on the
190
- Program), the recipient automatically receives a license from the
191
- original licensor to copy, distribute or modify the Program subject to
192
- these terms and conditions. You may not impose any further
193
- restrictions on the recipients' exercise of the rights granted herein.
194
- You are not responsible for enforcing compliance by third parties to
195
- this License.
196
-
197
- 7. If, as a consequence of a court judgment or allegation of patent
198
- infringement or for any other reason (not limited to patent issues),
199
- conditions are imposed on you (whether by court order, agreement or
200
- otherwise) that contradict the conditions of this License, they do not
201
- excuse you from the conditions of this License. If you cannot
202
- distribute so as to satisfy simultaneously your obligations under this
203
- License and any other pertinent obligations, then as a consequence you
204
- may not distribute the Program at all. For example, if a patent
205
- license would not permit royalty-free redistribution of the Program by
206
- all those who receive copies directly or indirectly through you, then
207
- the only way you could satisfy both it and this License would be to
208
- refrain entirely from distribution of the Program.
209
-
210
- If any portion of this section is held invalid or unenforceable under
211
- any particular circumstance, the balance of the section is intended to
212
- apply and the section as a whole is intended to apply in other
213
- circumstances.
214
-
215
- It is not the purpose of this section to induce you to infringe any
216
- patents or other property right claims or to contest validity of any
217
- such claims; this section has the sole purpose of protecting the
218
- integrity of the free software distribution system, which is
219
- implemented by public license practices. Many people have made
220
- generous contributions to the wide range of software distributed
221
- through that system in reliance on consistent application of that
222
- system; it is up to the author/donor to decide if he or she is willing
223
- to distribute software through any other system and a licensee cannot
224
- impose that choice.
225
-
226
- This section is intended to make thoroughly clear what is believed to
227
- be a consequence of the rest of this License.
228
-
229
- 8. If the distribution and/or use of the Program is restricted in
230
- certain countries either by patents or by copyrighted interfaces, the
231
- original copyright holder who places the Program under this License
232
- may add an explicit geographical distribution limitation excluding
233
- those countries, so that distribution is permitted only in or among
234
- countries not thus excluded. In such case, this License incorporates
235
- the limitation as if written in the body of this License.
236
-
237
- 9. The Free Software Foundation may publish revised and/or new versions
238
- of the General Public License from time to time. Such new versions will
239
- be similar in spirit to the present version, but may differ in detail to
240
- address new problems or concerns.
241
-
242
- Each version is given a distinguishing version number. If the Program
243
- specifies a version number of this License which applies to it and "any
244
- later version", you have the option of following the terms and conditions
245
- either of that version or of any later version published by the Free
246
- Software Foundation. If the Program does not specify a version number of
247
- this License, you may choose any version ever published by the Free Software
248
- Foundation.
249
-
250
- 10. If you wish to incorporate parts of the Program into other free
251
- programs whose distribution conditions are different, write to the author
252
- to ask for permission. For software which is copyrighted by the Free
253
- Software Foundation, write to the Free Software Foundation; we sometimes
254
- make exceptions for this. Our decision will be guided by the two goals
255
- of preserving the free status of all derivatives of our free software and
256
- of promoting the sharing and reuse of software generally.
257
-
258
- NO WARRANTY
259
-
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
- REPAIR OR CORRECTION.
269
-
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
- POSSIBILITY OF SUCH DAMAGES.
279
-
280
- END OF TERMS AND CONDITIONS
281
-
282
- How to Apply These Terms to Your New Programs
283
-
284
- If you develop a new program, and you want it to be of the greatest
285
- possible use to the public, the best way to achieve this is to make it
286
- free software which everyone can redistribute and change under these terms.
287
-
288
- To do so, attach the following notices to the program. It is safest
289
- to attach them to the start of each source file to most effectively
290
- convey the exclusion of warranty; and each file should have at least
291
- the "copyright" line and a pointer to where the full notice is found.
292
-
293
- <one line to give the program's name and a brief idea of what it does.>
294
- Copyright (C) <year> <name of author>
295
-
296
- This program is free software; you can redistribute it and/or modify
297
- it under the terms of the GNU General Public License as published by
298
- the Free Software Foundation; either version 2 of the License, or
299
- (at your option) any later version.
300
-
301
- This program is distributed in the hope that it will be useful,
302
- but WITHOUT ANY WARRANTY; without even the implied warranty of
303
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
- GNU General Public License for more details.
305
-
306
- You should have received a copy of the GNU General Public License along
307
- with this program; if not, write to the Free Software Foundation, Inc.,
308
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
-
310
- Also add information on how to contact you by electronic and paper mail.
311
-
312
- If the program is interactive, make it output a short notice like this
313
- when it starts in an interactive mode:
314
-
315
- Gnomovision version 69, Copyright (C) year name of author
316
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
- This is free software, and you are welcome to redistribute it
318
- under certain conditions; type `show c' for details.
319
-
320
- The hypothetical commands `show w' and `show c' should show the appropriate
321
- parts of the General Public License. Of course, the commands you use may
322
- be called something other than `show w' and `show c'; they could even be
323
- mouse-clicks or menu items--whatever suits your program.
324
-
325
- You should also get your employer (if you work as a programmer) or your
326
- school, if any, to sign a "copyright disclaimer" for the program, if
327
- necessary. Here is a sample; alter the names:
328
-
329
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
-
332
- <signature of Ty Coon>, 1 April 1989
333
- Ty Coon, President of Vice
334
-
335
- This General Public License does not permit incorporating your program into
336
- proprietary programs. If your program is a subroutine library, you may
337
- consider it more useful to permit linking proprietary applications with the
338
- library. If this is what you want to do, use the GNU Lesser General
339
- Public License instead of this License.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/nekojira/wp-requirements/README.md DELETED
@@ -1,100 +0,0 @@
1
- #WP Requirements
2
-
3
- [![GitHub version](https://badge.fury.io/gh/nekojira%2Fwp-requirements.svg)](http://badge.fury.io/gh/nekojira%2Fwp-requirements)
4
- [![Build Status](https://scrutinizer-ci.com/g/nekojira/wp-requirements/badges/build.png?b=master)](https://scrutinizer-ci.com/g/nekojira/wp-requirements/build-status/master)
5
- [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nekojira/wp-requirements/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nekojira/wp-requirements/)
6
-
7
- Hi! I'm a little utility that you can use in your WordPress plugin development.
8
-
9
- Include me in your plugin and I will check if the PHP version or the installed WordPress version is the right one. If not, I will let you know and you can halt your script and display a message in WordPress dashboard so the admin will know why your plugin can't be activated.
10
-
11
- ### Usage
12
-
13
- Pass the requirements to a new instance of this class like so:
14
-
15
- $my_plugin_requirements = new WP_Requirements(
16
- 'My Plugin Name',
17
- plugin_basename( __FILE__ ),
18
- array(
19
- 'PHP' => 'x.y.z',
20
- 'WordPress => 'x.y.z.',
21
- 'Extensions' => array(
22
- 'extension_name',
23
- 'another_extension',
24
- )
25
- )
26
- );
27
-
28
- Replace 'x.y.z' with the semantic version number you want to require. For PHP extension, just pass the extension name as array string values.
29
-
30
- You need to specify at least one value in the arguments array. **Mind the casing in the array keys**.
31
-
32
- Then, you can use the following method to know if it passed (will return *bool*):
33
-
34
- $my_requirements_check->pass();
35
-
36
- ### Implementation
37
-
38
- There are two ways you can include WP Requirements in your project.
39
-
40
- ##### Copy this class
41
-
42
- You can copy the class found in `/src/wp-requirements.php` in this project.
43
-
44
- > **Important!** If you choose to do so, please rename this class with the prefix used by your project (for example: from `WP_Requirements` to `My_Plugin_Requirements` ). In this way there is less risk of a naming collision between projects.
45
-
46
- ##### Use Composer
47
-
48
- Include this library with:
49
-
50
- $ composer require nekojira/wp-requirements
51
-
52
- However, if you choose to do so, remind that Composer can only work with PHP 5.3.0 onwards. If your goal is to require a PHP version check against older versions of PHP, but want to use Composer, you need a workaround.
53
-
54
- You could specify an additional autoloader compatible with PHP 5.2, for example using the [PHP 5.2 Autoloading for Composer](https://bitbucket.org/xrstf/composer-php52), by including in your `package.json` file the following:
55
-
56
- "require": {
57
- "xrstf/composer-php52": "1.*"
58
- },
59
- "scripts": {
60
- "post-install-cmd": [
61
- "xrstf\\Composer52\\Generator::onPostInstallCmd"
62
- ],
63
- "post-update-cmd": [
64
- "xrstf\\Composer52\\Generator::onPostInstallCmd"
65
- ],
66
- "post-autoload-dump": [
67
- "xrstf\\Composer52\\Generator::onPostInstallCmd"
68
- ]
69
- }
70
-
71
- ### Usage example
72
-
73
- Either require with `include_once` or with Composer first, then at the beginning of your plugin, after the plugin headers, place some code like this:
74
-
75
- $my_plugin_requirements = new WP_Requirements(
76
- 'My Plugin Name',
77
- plugin_basename( __FILE__ ),
78
- array(
79
- 'PHP' => '5.3.2',
80
- 'WordPress' => '3.9.0',
81
- )
82
- );
83
-
84
- if ( $my_plugin_requirements->pass() === false ) {
85
- // Deactivate the plugin and print an admin notice.
86
- $my_plugin_requirements->halt();
87
- // Halt the execution of the rest of the plugin.
88
- return;
89
- }
90
-
91
- // Then from here on, continue with your code.
92
- // Perhaps with `include_once 'includes/main_class.php'`
93
- // which may contain potentially incompatible PHP code.
94
-
95
- ### Resources
96
-
97
- WP Requirements was inspired by a post appeared on [wordpress.org](https://wordpress.org) at
98
- [https://make.wordpress.org/plugins/2015/06/05/policy-on-php-versions/](https://make.wordpress.org/plugins/2015/06/05/policy-on-php-versions/)
99
-
100
- You can also try [WP Update PHP](https://github.com/WPupdatePHP/wp-update-php) which however only checks for PHP but provides insightful explanations for the users on why they should keep their PHP version up to date.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/nekojira/wp-requirements/composer.json DELETED
@@ -1,31 +0,0 @@
1
- {
2
- "name": "nekojira/wp-requirements",
3
- "description": "Utility for WordPress plugin developers to check PHP version, WordPress version and presence of PHP extensions in current installation.",
4
- "version": "1.4.1",
5
- "license": "GPL-2.0+",
6
- "type": "library",
7
- "homepage": "https://github.com/nekojira/wp-requirements/",
8
- "support": {
9
- "issues": "https://github.com/nekojira/wp-requirements/issues",
10
- "source": "https://github.com/nekojira/wp-requirements"
11
- },
12
- "authors": [
13
- {
14
- "name": "Fulvio Notarstefano",
15
- "email": "fulvio.notarstefano@gmail.com",
16
- "homepage": "https://github.com/nekojira",
17
- "role": "Developer"
18
- }
19
- ],
20
- "keywords" : [
21
- "php",
22
- "requirements",
23
- "wordpress",
24
- "version"
25
- ],
26
- "autoload": {
27
- "psr-0": {
28
- "": "src"
29
- }
30
- }
31
- }