WordPress Download Manager - Version 3.2.23

Version Description

  • 2021.11.25 =
  • Fixed some sanitization issues
  • Removed chosen js library, using select2 now
Download this release

Release Info

Developer codename065
Plugin Icon 128x128 WordPress Download Manager
Version 3.2.23
Comparing to
See all releases

Code changes from version 3.2.21 to 3.2.23

Files changed (111) hide show
  1. assets/chosen-select/chosen-sprite.png +0 -0
  2. assets/chosen-select/chosen-sprite@2x.png +0 -0
  3. assets/chosen-select/chosen.css +0 -496
  4. assets/chosen-select/chosen.jquery.js +0 -1359
  5. assets/chosen-select/chosen.jquery.min.js +0 -3
  6. assets/chosen-select/chosen.min.css +0 -11
  7. assets/chosen-select/chosen.proto.js +0 -1399
  8. assets/chosen-select/chosen.proto.min.js +0 -3
  9. assets/css/chosen-sprite.png +0 -0
  10. assets/css/chosen.css +0 -438
  11. assets/css/select2-spinner.gif +0 -0
  12. assets/css/select2.css +0 -615
  13. assets/css/select2x2.png +0 -0
  14. assets/js/select2.min.js +0 -22
  15. assets/select2/css/select2.css +537 -0
  16. assets/select2/css/select2.min.css +1 -0
  17. assets/select2/js/i18n/af.js +3 -0
  18. assets/select2/js/i18n/ar.js +3 -0
  19. assets/select2/js/i18n/az.js +3 -0
  20. assets/select2/js/i18n/bg.js +3 -0
  21. assets/select2/js/i18n/bn.js +3 -0
  22. assets/select2/js/i18n/bs.js +3 -0
  23. assets/select2/js/i18n/ca.js +3 -0
  24. assets/select2/js/i18n/cs.js +3 -0
  25. assets/select2/js/i18n/da.js +3 -0
  26. assets/select2/js/i18n/de.js +3 -0
  27. assets/select2/js/i18n/dsb.js +3 -0
  28. assets/select2/js/i18n/el.js +3 -0
  29. assets/select2/js/i18n/en.js +3 -0
  30. assets/select2/js/i18n/eo.js +3 -0
  31. assets/select2/js/i18n/es.js +3 -0
  32. assets/select2/js/i18n/et.js +3 -0
  33. assets/select2/js/i18n/eu.js +3 -0
  34. assets/select2/js/i18n/fa.js +3 -0
  35. assets/select2/js/i18n/fi.js +3 -0
  36. assets/select2/js/i18n/fr.js +3 -0
  37. assets/select2/js/i18n/gl.js +3 -0
  38. assets/select2/js/i18n/he.js +3 -0
  39. assets/select2/js/i18n/hi.js +3 -0
  40. assets/select2/js/i18n/hr.js +3 -0
  41. assets/select2/js/i18n/hsb.js +3 -0
  42. assets/select2/js/i18n/hu.js +3 -0
  43. assets/select2/js/i18n/hy.js +3 -0
  44. assets/select2/js/i18n/id.js +3 -0
  45. assets/select2/js/i18n/is.js +3 -0
  46. assets/select2/js/i18n/it.js +3 -0
  47. assets/select2/js/i18n/ja.js +3 -0
  48. assets/select2/js/i18n/ka.js +3 -0
  49. assets/select2/js/i18n/km.js +3 -0
  50. assets/select2/js/i18n/ko.js +3 -0
  51. assets/select2/js/i18n/lt.js +3 -0
  52. assets/select2/js/i18n/lv.js +3 -0
  53. assets/select2/js/i18n/mk.js +3 -0
  54. assets/select2/js/i18n/ms.js +3 -0
  55. assets/select2/js/i18n/nb.js +3 -0
  56. assets/select2/js/i18n/ne.js +3 -0
  57. assets/select2/js/i18n/nl.js +3 -0
  58. assets/select2/js/i18n/pa.js +3 -0
  59. assets/select2/js/i18n/pl.js +3 -0
  60. assets/select2/js/i18n/ps.js +3 -0
  61. assets/select2/js/i18n/pt-BR.js +3 -0
  62. assets/select2/js/i18n/pt.js +3 -0
  63. assets/select2/js/i18n/ro.js +3 -0
  64. assets/select2/js/i18n/ru.js +3 -0
  65. assets/select2/js/i18n/sk.js +3 -0
  66. assets/select2/js/i18n/sl.js +3 -0
  67. assets/select2/js/i18n/sq.js +3 -0
  68. assets/select2/js/i18n/sr-Cyrl.js +3 -0
  69. assets/select2/js/i18n/sr.js +3 -0
  70. assets/select2/js/i18n/sv.js +3 -0
  71. assets/select2/js/i18n/te.js +3 -0
  72. assets/select2/js/i18n/th.js +3 -0
  73. assets/select2/js/i18n/tk.js +3 -0
  74. assets/select2/js/i18n/tr.js +3 -0
  75. assets/select2/js/i18n/uk.js +3 -0
  76. assets/select2/js/i18n/vi.js +3 -0
  77. assets/select2/js/i18n/zh-CN.js +3 -0
  78. assets/select2/js/i18n/zh-TW.js +3 -0
  79. assets/select2/js/select2.min.js +2 -0
  80. download-manager.php +2 -24
  81. readme.txt +8 -1
  82. src/Admin/AdminController.php +18 -41
  83. src/Admin/Menu/Categories.php +3 -1
  84. src/Admin/Menu/Packages.php +2 -2
  85. src/Admin/Menu/Settings.php +4 -8
  86. src/Admin/Menu/Stats.php +3 -0
  87. src/Admin/Menu/Templates.php +12 -140
  88. src/Admin/views/addons-list.php +1 -16
  89. src/Admin/views/import.php +1 -1
  90. src/Admin/views/metaboxes/additional-preview-images.php +2 -2
  91. src/Admin/views/metaboxes/package-settings.php +1 -1
  92. src/Admin/views/settings.php +2 -2
  93. src/Admin/views/settings/addon-update.php +1 -1
  94. src/Admin/views/stats/history.php +4 -2
  95. src/Admin/views/templates/email-template-editor.php +1 -1
  96. src/Admin/views/templates/email-template-settings.php +1 -8
  97. src/Admin/views/templates/emails-template.php +2 -2
  98. src/Admin/views/templates/list-templates.php +1 -1
  99. src/Admin/views/templates/templates-beta.php +0 -503
  100. src/Admin/views/templates/templates.php +3 -9
  101. src/Admin/views/welcome.php +2 -4
  102. src/AssetManager/Asset.php +1 -2
  103. src/AssetManager/views/asset-manager-ui.php +2 -2
  104. src/Package/PackageLocks.php +1 -1
  105. src/Package/Shortcodes.php +4 -4
  106. src/User/EditProfile.php +1 -1
  107. src/User/Login.php +4 -4
  108. src/__/Apply.php +28 -200
  109. src/__/Updater.php +6 -3
  110. src/__/__.php +7 -0
  111. src/__/views/message.php +1 -6
assets/chosen-select/chosen-sprite.png DELETED
Binary file
assets/chosen-select/chosen-sprite@2x.png DELETED
Binary file
assets/chosen-select/chosen.css DELETED
@@ -1,496 +0,0 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.8.7
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2018 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */
12
-
13
- /* @group Base */
14
- .chosen-container {
15
- position: relative;
16
- display: inline-block;
17
- vertical-align: middle;
18
- font-size: 13px;
19
- -webkit-user-select: none;
20
- -moz-user-select: none;
21
- -ms-user-select: none;
22
- user-select: none;
23
- }
24
-
25
- .chosen-container * {
26
- -webkit-box-sizing: border-box;
27
- box-sizing: border-box;
28
- }
29
-
30
- .chosen-container .chosen-drop {
31
- position: absolute;
32
- top: 100%;
33
- z-index: 1010;
34
- width: 100%;
35
- border: 1px solid #aaa;
36
- border-top: 0;
37
- background: #fff;
38
- -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
39
- box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
40
- clip: rect(0, 0, 0, 0);
41
- -webkit-clip-path: inset(100% 100%);
42
- clip-path: inset(100% 100%);
43
- }
44
-
45
- .chosen-container.chosen-with-drop .chosen-drop {
46
- clip: auto;
47
- -webkit-clip-path: none;
48
- clip-path: none;
49
- }
50
-
51
- .chosen-container a {
52
- cursor: pointer;
53
- }
54
-
55
- .chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name {
56
- margin-right: 4px;
57
- overflow: hidden;
58
- white-space: nowrap;
59
- text-overflow: ellipsis;
60
- font-weight: normal;
61
- color: #999999;
62
- }
63
-
64
- .chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after {
65
- content: ":";
66
- padding-left: 2px;
67
- vertical-align: top;
68
- }
69
-
70
- /* @end */
71
- /* @group Single Chosen */
72
- .chosen-container-single .chosen-single {
73
- position: relative;
74
- display: block;
75
- overflow: hidden;
76
- padding: 0 0 0 8px;
77
- height: 25px;
78
- border: 1px solid #aaa;
79
- border-radius: 5px;
80
- background-color: #fff;
81
- background: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #fff), color-stop(50%, #f6f6f6), color-stop(52%, #eee), to(#f4f4f4));
82
- background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
83
- background-clip: padding-box;
84
- -webkit-box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
85
- box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
86
- color: #444;
87
- text-decoration: none;
88
- white-space: nowrap;
89
- line-height: 24px;
90
- }
91
-
92
- .chosen-container-single .chosen-default {
93
- color: #999;
94
- }
95
-
96
- .chosen-container-single .chosen-single span {
97
- display: block;
98
- overflow: hidden;
99
- margin-right: 26px;
100
- text-overflow: ellipsis;
101
- white-space: nowrap;
102
- }
103
-
104
- .chosen-container-single .chosen-single-with-deselect span {
105
- margin-right: 38px;
106
- }
107
-
108
- .chosen-container-single .chosen-single abbr {
109
- position: absolute;
110
- top: 6px;
111
- right: 26px;
112
- display: block;
113
- width: 12px;
114
- height: 12px;
115
- background: url("chosen-sprite.png") -42px 1px no-repeat;
116
- font-size: 1px;
117
- }
118
-
119
- .chosen-container-single .chosen-single abbr:hover {
120
- background-position: -42px -10px;
121
- }
122
-
123
- .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
124
- background-position: -42px -10px;
125
- }
126
-
127
- .chosen-container-single .chosen-single div {
128
- position: absolute;
129
- top: 0;
130
- right: 0;
131
- display: block;
132
- width: 18px;
133
- height: 100%;
134
- }
135
-
136
- .chosen-container-single .chosen-single div b {
137
- display: block;
138
- width: 100%;
139
- height: 100%;
140
- background: url("chosen-sprite.png") no-repeat 0px 2px;
141
- }
142
-
143
- .chosen-container-single .chosen-search {
144
- position: relative;
145
- z-index: 1010;
146
- margin: 0;
147
- padding: 3px 4px;
148
- white-space: nowrap;
149
- }
150
-
151
- .chosen-container-single .chosen-search input[type="text"] {
152
- margin: 1px 0;
153
- padding: 4px 20px 4px 5px;
154
- width: 100%;
155
- height: auto;
156
- outline: 0;
157
- border: 1px solid #aaa;
158
- background: url("chosen-sprite.png") no-repeat 100% -20px;
159
- font-size: 1em;
160
- font-family: sans-serif;
161
- line-height: normal;
162
- border-radius: 0;
163
- }
164
-
165
- .chosen-container-single .chosen-drop {
166
- margin-top: -1px;
167
- border-radius: 0 0 4px 4px;
168
- background-clip: padding-box;
169
- }
170
-
171
- .chosen-container-single.chosen-container-single-nosearch .chosen-search {
172
- position: absolute;
173
- clip: rect(0, 0, 0, 0);
174
- -webkit-clip-path: inset(100% 100%);
175
- clip-path: inset(100% 100%);
176
- }
177
-
178
- /* @end */
179
- /* @group Results */
180
- .chosen-container .chosen-results {
181
- color: #444;
182
- position: relative;
183
- overflow-x: hidden;
184
- overflow-y: auto;
185
- margin: 0 4px 4px 0;
186
- padding: 0 0 0 4px;
187
- max-height: 240px;
188
- -webkit-overflow-scrolling: touch;
189
- }
190
-
191
- .chosen-container .chosen-results li {
192
- display: none;
193
- margin: 0;
194
- padding: 5px 6px;
195
- list-style: none;
196
- line-height: 15px;
197
- word-wrap: break-word;
198
- -webkit-touch-callout: none;
199
- }
200
-
201
- .chosen-container .chosen-results li.active-result {
202
- display: list-item;
203
- cursor: pointer;
204
- }
205
-
206
- .chosen-container .chosen-results li.disabled-result {
207
- display: list-item;
208
- color: #ccc;
209
- cursor: default;
210
- }
211
-
212
- .chosen-container .chosen-results li.highlighted {
213
- background-color: #3875d7;
214
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
215
- background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
216
- color: #fff;
217
- }
218
-
219
- .chosen-container .chosen-results li.no-results {
220
- color: #777;
221
- display: list-item;
222
- background: #f4f4f4;
223
- }
224
-
225
- .chosen-container .chosen-results li.group-result {
226
- display: list-item;
227
- font-weight: bold;
228
- cursor: default;
229
- }
230
-
231
- .chosen-container .chosen-results li.group-option {
232
- padding-left: 15px;
233
- }
234
-
235
- .chosen-container .chosen-results li em {
236
- font-style: normal;
237
- text-decoration: underline;
238
- }
239
-
240
- /* @end */
241
- /* @group Multi Chosen */
242
- .chosen-container-multi .chosen-choices {
243
- position: relative;
244
- overflow: hidden;
245
- margin: 0;
246
- padding: 0 5px;
247
- width: 100%;
248
- height: auto;
249
- border: 1px solid #aaa;
250
- background-color: #fff;
251
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #eee), color-stop(15%, #fff));
252
- background-image: linear-gradient(#eee 1%, #fff 15%);
253
- cursor: text;
254
- }
255
-
256
- .chosen-container-multi .chosen-choices li {
257
- float: left;
258
- list-style: none;
259
- }
260
-
261
- .chosen-container-multi .chosen-choices li.search-field {
262
- margin: 0;
263
- padding: 0;
264
- white-space: nowrap;
265
- }
266
-
267
- .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
268
- margin: 1px 0;
269
- padding: 0;
270
- height: 25px;
271
- outline: 0;
272
- border: 0 !important;
273
- background: transparent !important;
274
- -webkit-box-shadow: none;
275
- box-shadow: none;
276
- color: #999;
277
- font-size: 100%;
278
- font-family: sans-serif;
279
- line-height: normal;
280
- border-radius: 0;
281
- width: 25px;
282
- }
283
-
284
- .chosen-container-multi .chosen-choices li.search-choice {
285
- position: relative;
286
- margin: 3px 5px 3px 0;
287
- padding: 3px 20px 3px 5px;
288
- border: 1px solid #aaa;
289
- max-width: 100%;
290
- border-radius: 3px;
291
- background-color: #eeeeee;
292
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee));
293
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
294
- background-size: 100% 19px;
295
- background-repeat: repeat-x;
296
- background-clip: padding-box;
297
- -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
298
- box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
299
- color: #333;
300
- line-height: 13px;
301
- cursor: default;
302
- }
303
-
304
- .chosen-container-multi .chosen-choices li.search-choice span {
305
- word-wrap: break-word;
306
- }
307
-
308
- .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
309
- position: absolute;
310
- top: 4px;
311
- right: 3px;
312
- display: block;
313
- width: 12px;
314
- height: 12px;
315
- background: url("chosen-sprite.png") -42px 1px no-repeat;
316
- font-size: 1px;
317
- }
318
-
319
- .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
320
- background-position: -42px -10px;
321
- }
322
-
323
- .chosen-container-multi .chosen-choices li.search-choice-disabled {
324
- padding-right: 5px;
325
- border: 1px solid #ccc;
326
- background-color: #e4e4e4;
327
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), to(#eee));
328
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
329
- color: #666;
330
- }
331
-
332
- .chosen-container-multi .chosen-choices li.search-choice-focus {
333
- background: #d4d4d4;
334
- }
335
-
336
- .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
337
- background-position: -42px -10px;
338
- }
339
-
340
- .chosen-container-multi .chosen-results {
341
- margin: 0;
342
- padding: 0;
343
- }
344
-
345
- .chosen-container-multi .chosen-drop .result-selected {
346
- display: list-item;
347
- color: #ccc;
348
- cursor: default;
349
- }
350
-
351
- /* @end */
352
- /* @group Active */
353
- .chosen-container-active .chosen-single {
354
- border: 1px solid #5897fb;
355
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
356
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
357
- }
358
-
359
- .chosen-container-active.chosen-with-drop .chosen-single {
360
- border: 1px solid #aaa;
361
- border-bottom-right-radius: 0;
362
- border-bottom-left-radius: 0;
363
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #eee), color-stop(80%, #fff));
364
- background-image: linear-gradient(#eee 20%, #fff 80%);
365
- -webkit-box-shadow: 0 1px 0 #fff inset;
366
- box-shadow: 0 1px 0 #fff inset;
367
- }
368
-
369
- .chosen-container-active.chosen-with-drop .chosen-single div {
370
- border-left: none;
371
- background: transparent;
372
- }
373
-
374
- .chosen-container-active.chosen-with-drop .chosen-single div b {
375
- background-position: -18px 2px;
376
- }
377
-
378
- .chosen-container-active .chosen-choices {
379
- border: 1px solid #5897fb;
380
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
381
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
382
- }
383
-
384
- .chosen-container-active .chosen-choices li.search-field input[type="text"] {
385
- color: #222 !important;
386
- }
387
-
388
- /* @end */
389
- /* @group Disabled Support */
390
- .chosen-disabled {
391
- opacity: 0.5 !important;
392
- cursor: default;
393
- }
394
-
395
- .chosen-disabled .chosen-single {
396
- cursor: default;
397
- }
398
-
399
- .chosen-disabled .chosen-choices .search-choice .search-choice-close {
400
- cursor: default;
401
- }
402
-
403
- /* @end */
404
- /* @group Right to Left */
405
- .chosen-rtl {
406
- text-align: right;
407
- }
408
-
409
- .chosen-rtl .chosen-single {
410
- overflow: visible;
411
- padding: 0 8px 0 0;
412
- }
413
-
414
- .chosen-rtl .chosen-single span {
415
- margin-right: 0;
416
- margin-left: 26px;
417
- direction: rtl;
418
- }
419
-
420
- .chosen-rtl .chosen-single-with-deselect span {
421
- margin-left: 38px;
422
- }
423
-
424
- .chosen-rtl .chosen-single div {
425
- right: auto;
426
- left: 3px;
427
- }
428
-
429
- .chosen-rtl .chosen-single abbr {
430
- right: auto;
431
- left: 26px;
432
- }
433
-
434
- .chosen-rtl .chosen-choices li {
435
- float: right;
436
- }
437
-
438
- .chosen-rtl .chosen-choices li.search-field input[type="text"] {
439
- direction: rtl;
440
- }
441
-
442
- .chosen-rtl .chosen-choices li.search-choice {
443
- margin: 3px 5px 3px 0;
444
- padding: 3px 5px 3px 19px;
445
- }
446
-
447
- .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
448
- right: auto;
449
- left: 4px;
450
- }
451
-
452
- .chosen-rtl.chosen-container-single .chosen-results {
453
- margin: 0 0 4px 4px;
454
- padding: 0 4px 0 0;
455
- }
456
-
457
- .chosen-rtl .chosen-results li.group-option {
458
- padding-right: 15px;
459
- padding-left: 0;
460
- }
461
-
462
- .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
463
- border-right: none;
464
- }
465
-
466
- .chosen-rtl .chosen-search input[type="text"] {
467
- padding: 4px 5px 4px 20px;
468
- background: url("chosen-sprite.png") no-repeat -30px -20px;
469
- direction: rtl;
470
- }
471
-
472
- .chosen-rtl.chosen-container-single .chosen-single div b {
473
- background-position: 6px 2px;
474
- }
475
-
476
- .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
477
- background-position: -12px 2px;
478
- }
479
-
480
- /* @end */
481
- /* @group Retina compatibility */
482
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
483
- .chosen-rtl .chosen-search input[type="text"],
484
- .chosen-container-single .chosen-single abbr,
485
- .chosen-container-single .chosen-single div b,
486
- .chosen-container-single .chosen-search input[type="text"],
487
- .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
488
- .chosen-container .chosen-results-scroll-down span,
489
- .chosen-container .chosen-results-scroll-up span {
490
- background-image: url("chosen-sprite@2x.png") !important;
491
- background-size: 52px 37px !important;
492
- background-repeat: no-repeat !important;
493
- }
494
- }
495
-
496
- /* @end */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/chosen-select/chosen.jquery.js DELETED
@@ -1,1359 +0,0 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.8.7
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2018 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */
12
-
13
- (function() {
14
- var $, AbstractChosen, Chosen, SelectParser,
15
- bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
16
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
17
- hasProp = {}.hasOwnProperty;
18
-
19
- SelectParser = (function() {
20
- function SelectParser() {
21
- this.options_index = 0;
22
- this.parsed = [];
23
- }
24
-
25
- SelectParser.prototype.add_node = function(child) {
26
- if (child.nodeName.toUpperCase() === "OPTGROUP") {
27
- return this.add_group(child);
28
- } else {
29
- return this.add_option(child);
30
- }
31
- };
32
-
33
- SelectParser.prototype.add_group = function(group) {
34
- var group_position, i, len, option, ref, results1;
35
- group_position = this.parsed.length;
36
- this.parsed.push({
37
- array_index: group_position,
38
- group: true,
39
- label: group.label,
40
- title: group.title ? group.title : void 0,
41
- children: 0,
42
- disabled: group.disabled,
43
- classes: group.className
44
- });
45
- ref = group.childNodes;
46
- results1 = [];
47
- for (i = 0, len = ref.length; i < len; i++) {
48
- option = ref[i];
49
- results1.push(this.add_option(option, group_position, group.disabled));
50
- }
51
- return results1;
52
- };
53
-
54
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
55
- if (option.nodeName.toUpperCase() === "OPTION") {
56
- if (option.text !== "") {
57
- if (group_position != null) {
58
- this.parsed[group_position].children += 1;
59
- }
60
- this.parsed.push({
61
- array_index: this.parsed.length,
62
- options_index: this.options_index,
63
- value: option.value,
64
- text: option.text,
65
- html: option.innerHTML,
66
- title: option.title ? option.title : void 0,
67
- selected: option.selected,
68
- disabled: group_disabled === true ? group_disabled : option.disabled,
69
- group_array_index: group_position,
70
- group_label: group_position != null ? this.parsed[group_position].label : null,
71
- classes: option.className,
72
- style: option.style.cssText
73
- });
74
- } else {
75
- this.parsed.push({
76
- array_index: this.parsed.length,
77
- options_index: this.options_index,
78
- empty: true
79
- });
80
- }
81
- return this.options_index += 1;
82
- }
83
- };
84
-
85
- return SelectParser;
86
-
87
- })();
88
-
89
- SelectParser.select_to_array = function(select) {
90
- var child, i, len, parser, ref;
91
- parser = new SelectParser();
92
- ref = select.childNodes;
93
- for (i = 0, len = ref.length; i < len; i++) {
94
- child = ref[i];
95
- parser.add_node(child);
96
- }
97
- return parser.parsed;
98
- };
99
-
100
- AbstractChosen = (function() {
101
- function AbstractChosen(form_field, options1) {
102
- this.form_field = form_field;
103
- this.options = options1 != null ? options1 : {};
104
- this.label_click_handler = bind(this.label_click_handler, this);
105
- if (!AbstractChosen.browser_is_supported()) {
106
- return;
107
- }
108
- this.is_multiple = this.form_field.multiple;
109
- this.set_default_text();
110
- this.set_default_values();
111
- this.setup();
112
- this.set_up_html();
113
- this.register_observers();
114
- this.on_ready();
115
- }
116
-
117
- AbstractChosen.prototype.set_default_values = function() {
118
- this.click_test_action = (function(_this) {
119
- return function(evt) {
120
- return _this.test_active_click(evt);
121
- };
122
- })(this);
123
- this.activate_action = (function(_this) {
124
- return function(evt) {
125
- return _this.activate_field(evt);
126
- };
127
- })(this);
128
- this.active_field = false;
129
- this.mouse_on_container = false;
130
- this.results_showing = false;
131
- this.result_highlighted = null;
132
- this.is_rtl = this.options.rtl || /\bchosen-rtl\b/.test(this.form_field.className);
133
- this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
134
- this.disable_search_threshold = this.options.disable_search_threshold || 0;
135
- this.disable_search = this.options.disable_search || false;
136
- this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
137
- this.group_search = this.options.group_search != null ? this.options.group_search : true;
138
- this.search_contains = this.options.search_contains || false;
139
- this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
140
- this.max_selected_options = this.options.max_selected_options || Infinity;
141
- this.inherit_select_classes = this.options.inherit_select_classes || false;
142
- this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
143
- this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
144
- this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
145
- this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
146
- this.case_sensitive_search = this.options.case_sensitive_search || false;
147
- return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;
148
- };
149
-
150
- AbstractChosen.prototype.set_default_text = function() {
151
- if (this.form_field.getAttribute("data-placeholder")) {
152
- this.default_text = this.form_field.getAttribute("data-placeholder");
153
- } else if (this.is_multiple) {
154
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
155
- } else {
156
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
157
- }
158
- this.default_text = this.escape_html(this.default_text);
159
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
160
- };
161
-
162
- AbstractChosen.prototype.choice_label = function(item) {
163
- if (this.include_group_label_in_selected && (item.group_label != null)) {
164
- return "<b class='group-name'>" + (this.escape_html(item.group_label)) + "</b>" + item.html;
165
- } else {
166
- return item.html;
167
- }
168
- };
169
-
170
- AbstractChosen.prototype.mouse_enter = function() {
171
- return this.mouse_on_container = true;
172
- };
173
-
174
- AbstractChosen.prototype.mouse_leave = function() {
175
- return this.mouse_on_container = false;
176
- };
177
-
178
- AbstractChosen.prototype.input_focus = function(evt) {
179
- if (this.is_multiple) {
180
- if (!this.active_field) {
181
- return setTimeout(((function(_this) {
182
- return function() {
183
- return _this.container_mousedown();
184
- };
185
- })(this)), 50);
186
- }
187
- } else {
188
- if (!this.active_field) {
189
- return this.activate_field();
190
- }
191
- }
192
- };
193
-
194
- AbstractChosen.prototype.input_blur = function(evt) {
195
- if (!this.mouse_on_container) {
196
- this.active_field = false;
197
- return setTimeout(((function(_this) {
198
- return function() {
199
- return _this.blur_test();
200
- };
201
- })(this)), 100);
202
- }
203
- };
204
-
205
- AbstractChosen.prototype.label_click_handler = function(evt) {
206
- if (this.is_multiple) {
207
- return this.container_mousedown(evt);
208
- } else {
209
- return this.activate_field();
210
- }
211
- };
212
-
213
- AbstractChosen.prototype.results_option_build = function(options) {
214
- var content, data, data_content, i, len, ref, shown_results;
215
- content = '';
216
- shown_results = 0;
217
- ref = this.results_data;
218
- for (i = 0, len = ref.length; i < len; i++) {
219
- data = ref[i];
220
- data_content = '';
221
- if (data.group) {
222
- data_content = this.result_add_group(data);
223
- } else {
224
- data_content = this.result_add_option(data);
225
- }
226
- if (data_content !== '') {
227
- shown_results++;
228
- content += data_content;
229
- }
230
- if (options != null ? options.first : void 0) {
231
- if (data.selected && this.is_multiple) {
232
- this.choice_build(data);
233
- } else if (data.selected && !this.is_multiple) {
234
- this.single_set_selected_text(this.choice_label(data));
235
- }
236
- }
237
- if (shown_results >= this.max_shown_results) {
238
- break;
239
- }
240
- }
241
- return content;
242
- };
243
-
244
- AbstractChosen.prototype.result_add_option = function(option) {
245
- var classes, option_el;
246
- if (!option.search_match) {
247
- return '';
248
- }
249
- if (!this.include_option_in_results(option)) {
250
- return '';
251
- }
252
- classes = [];
253
- if (!option.disabled && !(option.selected && this.is_multiple)) {
254
- classes.push("active-result");
255
- }
256
- if (option.disabled && !(option.selected && this.is_multiple)) {
257
- classes.push("disabled-result");
258
- }
259
- if (option.selected) {
260
- classes.push("result-selected");
261
- }
262
- if (option.group_array_index != null) {
263
- classes.push("group-option");
264
- }
265
- if (option.classes !== "") {
266
- classes.push(option.classes);
267
- }
268
- option_el = document.createElement("li");
269
- option_el.className = classes.join(" ");
270
- if (option.style) {
271
- option_el.style.cssText = option.style;
272
- }
273
- option_el.setAttribute("data-option-array-index", option.array_index);
274
- option_el.innerHTML = option.highlighted_html || option.html;
275
- if (option.title) {
276
- option_el.title = option.title;
277
- }
278
- return this.outerHTML(option_el);
279
- };
280
-
281
- AbstractChosen.prototype.result_add_group = function(group) {
282
- var classes, group_el;
283
- if (!(group.search_match || group.group_match)) {
284
- return '';
285
- }
286
- if (!(group.active_options > 0)) {
287
- return '';
288
- }
289
- classes = [];
290
- classes.push("group-result");
291
- if (group.classes) {
292
- classes.push(group.classes);
293
- }
294
- group_el = document.createElement("li");
295
- group_el.className = classes.join(" ");
296
- group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);
297
- if (group.title) {
298
- group_el.title = group.title;
299
- }
300
- return this.outerHTML(group_el);
301
- };
302
-
303
- AbstractChosen.prototype.results_update_field = function() {
304
- this.set_default_text();
305
- if (!this.is_multiple) {
306
- this.results_reset_cleanup();
307
- }
308
- this.result_clear_highlight();
309
- this.results_build();
310
- if (this.results_showing) {
311
- return this.winnow_results();
312
- }
313
- };
314
-
315
- AbstractChosen.prototype.reset_single_select_options = function() {
316
- var i, len, ref, result, results1;
317
- ref = this.results_data;
318
- results1 = [];
319
- for (i = 0, len = ref.length; i < len; i++) {
320
- result = ref[i];
321
- if (result.selected) {
322
- results1.push(result.selected = false);
323
- } else {
324
- results1.push(void 0);
325
- }
326
- }
327
- return results1;
328
- };
329
-
330
- AbstractChosen.prototype.results_toggle = function() {
331
- if (this.results_showing) {
332
- return this.results_hide();
333
- } else {
334
- return this.results_show();
335
- }
336
- };
337
-
338
- AbstractChosen.prototype.results_search = function(evt) {
339
- if (this.results_showing) {
340
- return this.winnow_results();
341
- } else {
342
- return this.results_show();
343
- }
344
- };
345
-
346
- AbstractChosen.prototype.winnow_results = function(options) {
347
- var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
348
- this.no_results_clear();
349
- results = 0;
350
- query = this.get_search_text();
351
- escapedQuery = query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
352
- regex = this.get_search_regex(escapedQuery);
353
- ref = this.results_data;
354
- for (i = 0, len = ref.length; i < len; i++) {
355
- option = ref[i];
356
- option.search_match = false;
357
- results_group = null;
358
- search_match = null;
359
- option.highlighted_html = '';
360
- if (this.include_option_in_results(option)) {
361
- if (option.group) {
362
- option.group_match = false;
363
- option.active_options = 0;
364
- }
365
- if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
366
- results_group = this.results_data[option.group_array_index];
367
- if (results_group.active_options === 0 && results_group.search_match) {
368
- results += 1;
369
- }
370
- results_group.active_options += 1;
371
- }
372
- text = option.group ? option.label : option.text;
373
- if (!(option.group && !this.group_search)) {
374
- search_match = this.search_string_match(text, regex);
375
- option.search_match = search_match != null;
376
- if (option.search_match && !option.group) {
377
- results += 1;
378
- }
379
- if (option.search_match) {
380
- if (query.length) {
381
- startpos = search_match.index;
382
- prefix = text.slice(0, startpos);
383
- fix = text.slice(startpos, startpos + query.length);
384
- suffix = text.slice(startpos + query.length);
385
- option.highlighted_html = (this.escape_html(prefix)) + "<em>" + (this.escape_html(fix)) + "</em>" + (this.escape_html(suffix));
386
- }
387
- if (results_group != null) {
388
- results_group.group_match = true;
389
- }
390
- } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
391
- option.search_match = true;
392
- }
393
- }
394
- }
395
- }
396
- this.result_clear_highlight();
397
- if (results < 1 && query.length) {
398
- this.update_results_content("");
399
- return this.no_results(query);
400
- } else {
401
- this.update_results_content(this.results_option_build());
402
- if (!(options != null ? options.skip_highlight : void 0)) {
403
- return this.winnow_results_set_highlight();
404
- }
405
- }
406
- };
407
-
408
- AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
409
- var regex_flag, regex_string;
410
- regex_string = this.search_contains ? escaped_search_string : "(^|\\s|\\b)" + escaped_search_string + "[^\\s]*";
411
- if (!(this.enable_split_word_search || this.search_contains)) {
412
- regex_string = "^" + regex_string;
413
- }
414
- regex_flag = this.case_sensitive_search ? "" : "i";
415
- return new RegExp(regex_string, regex_flag);
416
- };
417
-
418
- AbstractChosen.prototype.search_string_match = function(search_string, regex) {
419
- var match;
420
- match = regex.exec(search_string);
421
- if (!this.search_contains && (match != null ? match[1] : void 0)) {
422
- match.index += 1;
423
- }
424
- return match;
425
- };
426
-
427
- AbstractChosen.prototype.choices_count = function() {
428
- var i, len, option, ref;
429
- if (this.selected_option_count != null) {
430
- return this.selected_option_count;
431
- }
432
- this.selected_option_count = 0;
433
- ref = this.form_field.options;
434
- for (i = 0, len = ref.length; i < len; i++) {
435
- option = ref[i];
436
- if (option.selected) {
437
- this.selected_option_count += 1;
438
- }
439
- }
440
- return this.selected_option_count;
441
- };
442
-
443
- AbstractChosen.prototype.choices_click = function(evt) {
444
- evt.preventDefault();
445
- this.activate_field();
446
- if (!(this.results_showing || this.is_disabled)) {
447
- return this.results_show();
448
- }
449
- };
450
-
451
- AbstractChosen.prototype.keydown_checker = function(evt) {
452
- var ref, stroke;
453
- stroke = (ref = evt.which) != null ? ref : evt.keyCode;
454
- this.search_field_scale();
455
- if (stroke !== 8 && this.pending_backstroke) {
456
- this.clear_backstroke();
457
- }
458
- switch (stroke) {
459
- case 8:
460
- this.backstroke_length = this.get_search_field_value().length;
461
- break;
462
- case 9:
463
- if (this.results_showing && !this.is_multiple) {
464
- this.result_select(evt);
465
- }
466
- this.mouse_on_container = false;
467
- break;
468
- case 13:
469
- if (this.results_showing) {
470
- evt.preventDefault();
471
- }
472
- break;
473
- case 27:
474
- if (this.results_showing) {
475
- evt.preventDefault();
476
- }
477
- break;
478
- case 32:
479
- if (this.disable_search) {
480
- evt.preventDefault();
481
- }
482
- break;
483
- case 38:
484
- evt.preventDefault();
485
- this.keyup_arrow();
486
- break;
487
- case 40:
488
- evt.preventDefault();
489
- this.keydown_arrow();
490
- break;
491
- }
492
- };
493
-
494
- AbstractChosen.prototype.keyup_checker = function(evt) {
495
- var ref, stroke;
496
- stroke = (ref = evt.which) != null ? ref : evt.keyCode;
497
- this.search_field_scale();
498
- switch (stroke) {
499
- case 8:
500
- if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
501
- this.keydown_backstroke();
502
- } else if (!this.pending_backstroke) {
503
- this.result_clear_highlight();
504
- this.results_search();
505
- }
506
- break;
507
- case 13:
508
- evt.preventDefault();
509
- if (this.results_showing) {
510
- this.result_select(evt);
511
- }
512
- break;
513
- case 27:
514
- if (this.results_showing) {
515
- this.results_hide();
516
- }
517
- break;
518
- case 9:
519
- case 16:
520
- case 17:
521
- case 18:
522
- case 38:
523
- case 40:
524
- case 91:
525
- break;
526
- default:
527
- this.results_search();
528
- break;
529
- }
530
- };
531
-
532
- AbstractChosen.prototype.clipboard_event_checker = function(evt) {
533
- if (this.is_disabled) {
534
- return;
535
- }
536
- return setTimeout(((function(_this) {
537
- return function() {
538
- return _this.results_search();
539
- };
540
- })(this)), 50);
541
- };
542
-
543
- AbstractChosen.prototype.container_width = function() {
544
- if (this.options.width != null) {
545
- return this.options.width;
546
- } else {
547
- return this.form_field.offsetWidth + "px";
548
- }
549
- };
550
-
551
- AbstractChosen.prototype.include_option_in_results = function(option) {
552
- if (this.is_multiple && (!this.display_selected_options && option.selected)) {
553
- return false;
554
- }
555
- if (!this.display_disabled_options && option.disabled) {
556
- return false;
557
- }
558
- if (option.empty) {
559
- return false;
560
- }
561
- return true;
562
- };
563
-
564
- AbstractChosen.prototype.search_results_touchstart = function(evt) {
565
- this.touch_started = true;
566
- return this.search_results_mouseover(evt);
567
- };
568
-
569
- AbstractChosen.prototype.search_results_touchmove = function(evt) {
570
- this.touch_started = false;
571
- return this.search_results_mouseout(evt);
572
- };
573
-
574
- AbstractChosen.prototype.search_results_touchend = function(evt) {
575
- if (this.touch_started) {
576
- return this.search_results_mouseup(evt);
577
- }
578
- };
579
-
580
- AbstractChosen.prototype.outerHTML = function(element) {
581
- var tmp;
582
- if (element.outerHTML) {
583
- return element.outerHTML;
584
- }
585
- tmp = document.createElement("div");
586
- tmp.appendChild(element);
587
- return tmp.innerHTML;
588
- };
589
-
590
- AbstractChosen.prototype.get_single_html = function() {
591
- return "<a class=\"chosen-single chosen-default\">\n <span>" + this.default_text + "</span>\n <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n <div class=\"chosen-search\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n </div>\n <ul class=\"chosen-results\"></ul>\n</div>";
592
- };
593
-
594
- AbstractChosen.prototype.get_multi_html = function() {
595
- return "<ul class=\"chosen-choices\">\n <li class=\"search-field\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" value=\"" + this.default_text + "\" />\n </li>\n</ul>\n<div class=\"chosen-drop\">\n <ul class=\"chosen-results\"></ul>\n</div>";
596
- };
597
-
598
- AbstractChosen.prototype.get_no_results_html = function(terms) {
599
- return "<li class=\"no-results\">\n " + this.results_none_found + " <span>" + (this.escape_html(terms)) + "</span>\n</li>";
600
- };
601
-
602
- AbstractChosen.browser_is_supported = function() {
603
- if ("Microsoft Internet Explorer" === window.navigator.appName) {
604
- return document.documentMode >= 8;
605
- }
606
- if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
607
- return false;
608
- }
609
- return true;
610
- };
611
-
612
- AbstractChosen.default_multiple_text = "Select Some Options";
613
-
614
- AbstractChosen.default_single_text = "Select an Option";
615
-
616
- AbstractChosen.default_no_result_text = "No results match";
617
-
618
- return AbstractChosen;
619
-
620
- })();
621
-
622
- $ = jQuery;
623
-
624
- $.fn.extend({
625
- chosen: function(options) {
626
- if (!AbstractChosen.browser_is_supported()) {
627
- return this;
628
- }
629
- return this.each(function(input_field) {
630
- var $this, chosen;
631
- $this = $(this);
632
- chosen = $this.data('chosen');
633
- if (options === 'destroy') {
634
- if (chosen instanceof Chosen) {
635
- chosen.destroy();
636
- }
637
- return;
638
- }
639
- if (!(chosen instanceof Chosen)) {
640
- $this.data('chosen', new Chosen(this, options));
641
- }
642
- });
643
- }
644
- });
645
-
646
- Chosen = (function(superClass) {
647
- extend(Chosen, superClass);
648
-
649
- function Chosen() {
650
- return Chosen.__super__.constructor.apply(this, arguments);
651
- }
652
-
653
- Chosen.prototype.setup = function() {
654
- this.form_field_jq = $(this.form_field);
655
- return this.current_selectedIndex = this.form_field.selectedIndex;
656
- };
657
-
658
- Chosen.prototype.set_up_html = function() {
659
- var container_classes, container_props;
660
- container_classes = ["chosen-container"];
661
- container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
662
- if (this.inherit_select_classes && this.form_field.className) {
663
- container_classes.push(this.form_field.className);
664
- }
665
- if (this.is_rtl) {
666
- container_classes.push("chosen-rtl");
667
- }
668
- container_props = {
669
- 'class': container_classes.join(' '),
670
- 'title': this.form_field.title
671
- };
672
- if (this.form_field.id.length) {
673
- container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
674
- }
675
- this.container = $("<div />", container_props);
676
- this.container.width(this.container_width());
677
- if (this.is_multiple) {
678
- this.container.html(this.get_multi_html());
679
- } else {
680
- this.container.html(this.get_single_html());
681
- }
682
- this.form_field_jq.hide().after(this.container);
683
- this.dropdown = this.container.find('div.chosen-drop').first();
684
- this.search_field = this.container.find('input').first();
685
- this.search_results = this.container.find('ul.chosen-results').first();
686
- this.search_field_scale();
687
- this.search_no_results = this.container.find('li.no-results').first();
688
- if (this.is_multiple) {
689
- this.search_choices = this.container.find('ul.chosen-choices').first();
690
- this.search_container = this.container.find('li.search-field').first();
691
- } else {
692
- this.search_container = this.container.find('div.chosen-search').first();
693
- this.selected_item = this.container.find('.chosen-single').first();
694
- }
695
- this.results_build();
696
- this.set_tab_index();
697
- return this.set_label_behavior();
698
- };
699
-
700
- Chosen.prototype.on_ready = function() {
701
- return this.form_field_jq.trigger("chosen:ready", {
702
- chosen: this
703
- });
704
- };
705
-
706
- Chosen.prototype.register_observers = function() {
707
- this.container.on('touchstart.chosen', (function(_this) {
708
- return function(evt) {
709
- _this.container_mousedown(evt);
710
- };
711
- })(this));
712
- this.container.on('touchend.chosen', (function(_this) {
713
- return function(evt) {
714
- _this.container_mouseup(evt);
715
- };
716
- })(this));
717
- this.container.on('mousedown.chosen', (function(_this) {
718
- return function(evt) {
719
- _this.container_mousedown(evt);
720
- };
721
- })(this));
722
- this.container.on('mouseup.chosen', (function(_this) {
723
- return function(evt) {
724
- _this.container_mouseup(evt);
725
- };
726
- })(this));
727
- this.container.on('mouseenter.chosen', (function(_this) {
728
- return function(evt) {
729
- _this.mouse_enter(evt);
730
- };
731
- })(this));
732
- this.container.on('mouseleave.chosen', (function(_this) {
733
- return function(evt) {
734
- _this.mouse_leave(evt);
735
- };
736
- })(this));
737
- this.search_results.on('mouseup.chosen', (function(_this) {
738
- return function(evt) {
739
- _this.search_results_mouseup(evt);
740
- };
741
- })(this));
742
- this.search_results.on('mouseover.chosen', (function(_this) {
743
- return function(evt) {
744
- _this.search_results_mouseover(evt);
745
- };
746
- })(this));
747
- this.search_results.on('mouseout.chosen', (function(_this) {
748
- return function(evt) {
749
- _this.search_results_mouseout(evt);
750
- };
751
- })(this));
752
- this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {
753
- return function(evt) {
754
- _this.search_results_mousewheel(evt);
755
- };
756
- })(this));
757
- this.search_results.on('touchstart.chosen', (function(_this) {
758
- return function(evt) {
759
- _this.search_results_touchstart(evt);
760
- };
761
- })(this));
762
- this.search_results.on('touchmove.chosen', (function(_this) {
763
- return function(evt) {
764
- _this.search_results_touchmove(evt);
765
- };
766
- })(this));
767
- this.search_results.on('touchend.chosen', (function(_this) {
768
- return function(evt) {
769
- _this.search_results_touchend(evt);
770
- };
771
- })(this));
772
- this.form_field_jq.on("chosen:updated.chosen", (function(_this) {
773
- return function(evt) {
774
- _this.results_update_field(evt);
775
- };
776
- })(this));
777
- this.form_field_jq.on("chosen:activate.chosen", (function(_this) {
778
- return function(evt) {
779
- _this.activate_field(evt);
780
- };
781
- })(this));
782
- this.form_field_jq.on("chosen:open.chosen", (function(_this) {
783
- return function(evt) {
784
- _this.container_mousedown(evt);
785
- };
786
- })(this));
787
- this.form_field_jq.on("chosen:close.chosen", (function(_this) {
788
- return function(evt) {
789
- _this.close_field(evt);
790
- };
791
- })(this));
792
- this.search_field.on('blur.chosen', (function(_this) {
793
- return function(evt) {
794
- _this.input_blur(evt);
795
- };
796
- })(this));
797
- this.search_field.on('keyup.chosen', (function(_this) {
798
- return function(evt) {
799
- _this.keyup_checker(evt);
800
- };
801
- })(this));
802
- this.search_field.on('keydown.chosen', (function(_this) {
803
- return function(evt) {
804
- _this.keydown_checker(evt);
805
- };
806
- })(this));
807
- this.search_field.on('focus.chosen', (function(_this) {
808
- return function(evt) {
809
- _this.input_focus(evt);
810
- };
811
- })(this));
812
- this.search_field.on('cut.chosen', (function(_this) {
813
- return function(evt) {
814
- _this.clipboard_event_checker(evt);
815
- };
816
- })(this));
817
- this.search_field.on('paste.chosen', (function(_this) {
818
- return function(evt) {
819
- _this.clipboard_event_checker(evt);
820
- };
821
- })(this));
822
- if (this.is_multiple) {
823
- return this.search_choices.on('click.chosen', (function(_this) {
824
- return function(evt) {
825
- _this.choices_click(evt);
826
- };
827
- })(this));
828
- } else {
829
- return this.container.on('click.chosen', function(evt) {
830
- evt.preventDefault();
831
- });
832
- }
833
- };
834
-
835
- Chosen.prototype.destroy = function() {
836
- $(this.container[0].ownerDocument).off('click.chosen', this.click_test_action);
837
- if (this.form_field_label.length > 0) {
838
- this.form_field_label.off('click.chosen');
839
- }
840
- if (this.search_field[0].tabIndex) {
841
- this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
842
- }
843
- this.container.remove();
844
- this.form_field_jq.removeData('chosen');
845
- return this.form_field_jq.show();
846
- };
847
-
848
- Chosen.prototype.search_field_disabled = function() {
849
- this.is_disabled = this.form_field.disabled || this.form_field_jq.parents('fieldset').is(':disabled');
850
- this.container.toggleClass('chosen-disabled', this.is_disabled);
851
- this.search_field[0].disabled = this.is_disabled;
852
- if (!this.is_multiple) {
853
- this.selected_item.off('focus.chosen', this.activate_field);
854
- }
855
- if (this.is_disabled) {
856
- return this.close_field();
857
- } else if (!this.is_multiple) {
858
- return this.selected_item.on('focus.chosen', this.activate_field);
859
- }
860
- };
861
-
862
- Chosen.prototype.container_mousedown = function(evt) {
863
- var ref;
864
- if (this.is_disabled) {
865
- return;
866
- }
867
- if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {
868
- evt.preventDefault();
869
- }
870
- if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
871
- if (!this.active_field) {
872
- if (this.is_multiple) {
873
- this.search_field.val("");
874
- }
875
- $(this.container[0].ownerDocument).on('click.chosen', this.click_test_action);
876
- this.results_show();
877
- } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
878
- evt.preventDefault();
879
- this.results_toggle();
880
- }
881
- return this.activate_field();
882
- }
883
- };
884
-
885
- Chosen.prototype.container_mouseup = function(evt) {
886
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
887
- return this.results_reset(evt);
888
- }
889
- };
890
-
891
- Chosen.prototype.search_results_mousewheel = function(evt) {
892
- var delta;
893
- if (evt.originalEvent) {
894
- delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
895
- }
896
- if (delta != null) {
897
- evt.preventDefault();
898
- if (evt.type === 'DOMMouseScroll') {
899
- delta = delta * 40;
900
- }
901
- return this.search_results.scrollTop(delta + this.search_results.scrollTop());
902
- }
903
- };
904
-
905
- Chosen.prototype.blur_test = function(evt) {
906
- if (!this.active_field && this.container.hasClass("chosen-container-active")) {
907
- return this.close_field();
908
- }
909
- };
910
-
911
- Chosen.prototype.close_field = function() {
912
- $(this.container[0].ownerDocument).off("click.chosen", this.click_test_action);
913
- this.active_field = false;
914
- this.results_hide();
915
- this.container.removeClass("chosen-container-active");
916
- this.clear_backstroke();
917
- this.show_search_field_default();
918
- this.search_field_scale();
919
- return this.search_field.blur();
920
- };
921
-
922
- Chosen.prototype.activate_field = function() {
923
- if (this.is_disabled) {
924
- return;
925
- }
926
- this.container.addClass("chosen-container-active");
927
- this.active_field = true;
928
- this.search_field.val(this.search_field.val());
929
- return this.search_field.focus();
930
- };
931
-
932
- Chosen.prototype.test_active_click = function(evt) {
933
- var active_container;
934
- active_container = $(evt.target).closest('.chosen-container');
935
- if (active_container.length && this.container[0] === active_container[0]) {
936
- return this.active_field = true;
937
- } else {
938
- return this.close_field();
939
- }
940
- };
941
-
942
- Chosen.prototype.results_build = function() {
943
- this.parsing = true;
944
- this.selected_option_count = null;
945
- this.results_data = SelectParser.select_to_array(this.form_field);
946
- if (this.is_multiple) {
947
- this.search_choices.find("li.search-choice").remove();
948
- } else {
949
- this.single_set_selected_text();
950
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
951
- this.search_field[0].readOnly = true;
952
- this.container.addClass("chosen-container-single-nosearch");
953
- } else {
954
- this.search_field[0].readOnly = false;
955
- this.container.removeClass("chosen-container-single-nosearch");
956
- }
957
- }
958
- this.update_results_content(this.results_option_build({
959
- first: true
960
- }));
961
- this.search_field_disabled();
962
- this.show_search_field_default();
963
- this.search_field_scale();
964
- return this.parsing = false;
965
- };
966
-
967
- Chosen.prototype.result_do_highlight = function(el) {
968
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
969
- if (el.length) {
970
- this.result_clear_highlight();
971
- this.result_highlight = el;
972
- this.result_highlight.addClass("highlighted");
973
- maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
974
- visible_top = this.search_results.scrollTop();
975
- visible_bottom = maxHeight + visible_top;
976
- high_top = this.result_highlight.position().top + this.search_results.scrollTop();
977
- high_bottom = high_top + this.result_highlight.outerHeight();
978
- if (high_bottom >= visible_bottom) {
979
- return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
980
- } else if (high_top < visible_top) {
981
- return this.search_results.scrollTop(high_top);
982
- }
983
- }
984
- };
985
-
986
- Chosen.prototype.result_clear_highlight = function() {
987
- if (this.result_highlight) {
988
- this.result_highlight.removeClass("highlighted");
989
- }
990
- return this.result_highlight = null;
991
- };
992
-
993
- Chosen.prototype.results_show = function() {
994
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
995
- this.form_field_jq.trigger("chosen:maxselected", {
996
- chosen: this
997
- });
998
- return false;
999
- }
1000
- this.container.addClass("chosen-with-drop");
1001
- this.results_showing = true;
1002
- this.search_field.focus();
1003
- this.search_field.val(this.get_search_field_value());
1004
- this.winnow_results();
1005
- return this.form_field_jq.trigger("chosen:showing_dropdown", {
1006
- chosen: this
1007
- });
1008
- };
1009
-
1010
- Chosen.prototype.update_results_content = function(content) {
1011
- return this.search_results.html(content);
1012
- };
1013
-
1014
- Chosen.prototype.results_hide = function() {
1015
- if (this.results_showing) {
1016
- this.result_clear_highlight();
1017
- this.container.removeClass("chosen-with-drop");
1018
- this.form_field_jq.trigger("chosen:hiding_dropdown", {
1019
- chosen: this
1020
- });
1021
- }
1022
- return this.results_showing = false;
1023
- };
1024
-
1025
- Chosen.prototype.set_tab_index = function(el) {
1026
- var ti;
1027
- if (this.form_field.tabIndex) {
1028
- ti = this.form_field.tabIndex;
1029
- this.form_field.tabIndex = -1;
1030
- return this.search_field[0].tabIndex = ti;
1031
- }
1032
- };
1033
-
1034
- Chosen.prototype.set_label_behavior = function() {
1035
- this.form_field_label = this.form_field_jq.parents("label");
1036
- if (!this.form_field_label.length && this.form_field.id.length) {
1037
- this.form_field_label = $("label[for='" + this.form_field.id + "']");
1038
- }
1039
- if (this.form_field_label.length > 0) {
1040
- return this.form_field_label.on('click.chosen', this.label_click_handler);
1041
- }
1042
- };
1043
-
1044
- Chosen.prototype.show_search_field_default = function() {
1045
- if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
1046
- this.search_field.val(this.default_text);
1047
- return this.search_field.addClass("default");
1048
- } else {
1049
- this.search_field.val("");
1050
- return this.search_field.removeClass("default");
1051
- }
1052
- };
1053
-
1054
- Chosen.prototype.search_results_mouseup = function(evt) {
1055
- var target;
1056
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
1057
- if (target.length) {
1058
- this.result_highlight = target;
1059
- this.result_select(evt);
1060
- return this.search_field.focus();
1061
- }
1062
- };
1063
-
1064
- Chosen.prototype.search_results_mouseover = function(evt) {
1065
- var target;
1066
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
1067
- if (target) {
1068
- return this.result_do_highlight(target);
1069
- }
1070
- };
1071
-
1072
- Chosen.prototype.search_results_mouseout = function(evt) {
1073
- if ($(evt.target).hasClass("active-result") || $(evt.target).parents('.active-result').first()) {
1074
- return this.result_clear_highlight();
1075
- }
1076
- };
1077
-
1078
- Chosen.prototype.choice_build = function(item) {
1079
- var choice, close_link;
1080
- choice = $('<li />', {
1081
- "class": "search-choice"
1082
- }).html("<span>" + (this.choice_label(item)) + "</span>");
1083
- if (item.disabled) {
1084
- choice.addClass('search-choice-disabled');
1085
- } else {
1086
- close_link = $('<a />', {
1087
- "class": 'search-choice-close',
1088
- 'data-option-array-index': item.array_index
1089
- });
1090
- close_link.on('click.chosen', (function(_this) {
1091
- return function(evt) {
1092
- return _this.choice_destroy_link_click(evt);
1093
- };
1094
- })(this));
1095
- choice.append(close_link);
1096
- }
1097
- return this.search_container.before(choice);
1098
- };
1099
-
1100
- Chosen.prototype.choice_destroy_link_click = function(evt) {
1101
- evt.preventDefault();
1102
- evt.stopPropagation();
1103
- if (!this.is_disabled) {
1104
- return this.choice_destroy($(evt.target));
1105
- }
1106
- };
1107
-
1108
- Chosen.prototype.choice_destroy = function(link) {
1109
- if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1110
- if (this.active_field) {
1111
- this.search_field.focus();
1112
- } else {
1113
- this.show_search_field_default();
1114
- }
1115
- if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {
1116
- this.results_hide();
1117
- }
1118
- link.parents('li').first().remove();
1119
- return this.search_field_scale();
1120
- }
1121
- };
1122
-
1123
- Chosen.prototype.results_reset = function() {
1124
- this.reset_single_select_options();
1125
- this.form_field.options[0].selected = true;
1126
- this.single_set_selected_text();
1127
- this.show_search_field_default();
1128
- this.results_reset_cleanup();
1129
- this.trigger_form_field_change();
1130
- if (this.active_field) {
1131
- return this.results_hide();
1132
- }
1133
- };
1134
-
1135
- Chosen.prototype.results_reset_cleanup = function() {
1136
- this.current_selectedIndex = this.form_field.selectedIndex;
1137
- return this.selected_item.find("abbr").remove();
1138
- };
1139
-
1140
- Chosen.prototype.result_select = function(evt) {
1141
- var high, item;
1142
- if (this.result_highlight) {
1143
- high = this.result_highlight;
1144
- this.result_clear_highlight();
1145
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1146
- this.form_field_jq.trigger("chosen:maxselected", {
1147
- chosen: this
1148
- });
1149
- return false;
1150
- }
1151
- if (this.is_multiple) {
1152
- high.removeClass("active-result");
1153
- } else {
1154
- this.reset_single_select_options();
1155
- }
1156
- high.addClass("result-selected");
1157
- item = this.results_data[high[0].getAttribute("data-option-array-index")];
1158
- item.selected = true;
1159
- this.form_field.options[item.options_index].selected = true;
1160
- this.selected_option_count = null;
1161
- if (this.is_multiple) {
1162
- this.choice_build(item);
1163
- } else {
1164
- this.single_set_selected_text(this.choice_label(item));
1165
- }
1166
- if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
1167
- if (evt.metaKey || evt.ctrlKey) {
1168
- this.winnow_results({
1169
- skip_highlight: true
1170
- });
1171
- } else {
1172
- this.search_field.val("");
1173
- this.winnow_results();
1174
- }
1175
- } else {
1176
- this.results_hide();
1177
- this.show_search_field_default();
1178
- }
1179
- if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1180
- this.trigger_form_field_change({
1181
- selected: this.form_field.options[item.options_index].value
1182
- });
1183
- }
1184
- this.current_selectedIndex = this.form_field.selectedIndex;
1185
- evt.preventDefault();
1186
- return this.search_field_scale();
1187
- }
1188
- };
1189
-
1190
- Chosen.prototype.single_set_selected_text = function(text) {
1191
- if (text == null) {
1192
- text = this.default_text;
1193
- }
1194
- if (text === this.default_text) {
1195
- this.selected_item.addClass("chosen-default");
1196
- } else {
1197
- this.single_deselect_control_build();
1198
- this.selected_item.removeClass("chosen-default");
1199
- }
1200
- return this.selected_item.find("span").html(text);
1201
- };
1202
-
1203
- Chosen.prototype.result_deselect = function(pos) {
1204
- var result_data;
1205
- result_data = this.results_data[pos];
1206
- if (!this.form_field.options[result_data.options_index].disabled) {
1207
- result_data.selected = false;
1208
- this.form_field.options[result_data.options_index].selected = false;
1209
- this.selected_option_count = null;
1210
- this.result_clear_highlight();
1211
- if (this.results_showing) {
1212
- this.winnow_results();
1213
- }
1214
- this.trigger_form_field_change({
1215
- deselected: this.form_field.options[result_data.options_index].value
1216
- });
1217
- this.search_field_scale();
1218
- return true;
1219
- } else {
1220
- return false;
1221
- }
1222
- };
1223
-
1224
- Chosen.prototype.single_deselect_control_build = function() {
1225
- if (!this.allow_single_deselect) {
1226
- return;
1227
- }
1228
- if (!this.selected_item.find("abbr").length) {
1229
- this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1230
- }
1231
- return this.selected_item.addClass("chosen-single-with-deselect");
1232
- };
1233
-
1234
- Chosen.prototype.get_search_field_value = function() {
1235
- return this.search_field.val();
1236
- };
1237
-
1238
- Chosen.prototype.get_search_text = function() {
1239
- return $.trim(this.get_search_field_value());
1240
- };
1241
-
1242
- Chosen.prototype.escape_html = function(text) {
1243
- return $('<div/>').text(text).html();
1244
- };
1245
-
1246
- Chosen.prototype.winnow_results_set_highlight = function() {
1247
- var do_high, selected_results;
1248
- selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1249
- do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1250
- if (do_high != null) {
1251
- return this.result_do_highlight(do_high);
1252
- }
1253
- };
1254
-
1255
- Chosen.prototype.no_results = function(terms) {
1256
- var no_results_html;
1257
- no_results_html = this.get_no_results_html(terms);
1258
- this.search_results.append(no_results_html);
1259
- return this.form_field_jq.trigger("chosen:no_results", {
1260
- chosen: this
1261
- });
1262
- };
1263
-
1264
- Chosen.prototype.no_results_clear = function() {
1265
- return this.search_results.find(".no-results").remove();
1266
- };
1267
-
1268
- Chosen.prototype.keydown_arrow = function() {
1269
- var next_sib;
1270
- if (this.results_showing && this.result_highlight) {
1271
- next_sib = this.result_highlight.nextAll("li.active-result").first();
1272
- if (next_sib) {
1273
- return this.result_do_highlight(next_sib);
1274
- }
1275
- } else {
1276
- return this.results_show();
1277
- }
1278
- };
1279
-
1280
- Chosen.prototype.keyup_arrow = function() {
1281
- var prev_sibs;
1282
- if (!this.results_showing && !this.is_multiple) {
1283
- return this.results_show();
1284
- } else if (this.result_highlight) {
1285
- prev_sibs = this.result_highlight.prevAll("li.active-result");
1286
- if (prev_sibs.length) {
1287
- return this.result_do_highlight(prev_sibs.first());
1288
- } else {
1289
- if (this.choices_count() > 0) {
1290
- this.results_hide();
1291
- }
1292
- return this.result_clear_highlight();
1293
- }
1294
- }
1295
- };
1296
-
1297
- Chosen.prototype.keydown_backstroke = function() {
1298
- var next_available_destroy;
1299
- if (this.pending_backstroke) {
1300
- this.choice_destroy(this.pending_backstroke.find("a").first());
1301
- return this.clear_backstroke();
1302
- } else {
1303
- next_available_destroy = this.search_container.siblings("li.search-choice").last();
1304
- if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1305
- this.pending_backstroke = next_available_destroy;
1306
- if (this.single_backstroke_delete) {
1307
- return this.keydown_backstroke();
1308
- } else {
1309
- return this.pending_backstroke.addClass("search-choice-focus");
1310
- }
1311
- }
1312
- }
1313
- };
1314
-
1315
- Chosen.prototype.clear_backstroke = function() {
1316
- if (this.pending_backstroke) {
1317
- this.pending_backstroke.removeClass("search-choice-focus");
1318
- }
1319
- return this.pending_backstroke = null;
1320
- };
1321
-
1322
- Chosen.prototype.search_field_scale = function() {
1323
- var div, i, len, style, style_block, styles, width;
1324
- if (!this.is_multiple) {
1325
- return;
1326
- }
1327
- style_block = {
1328
- position: 'absolute',
1329
- left: '-1000px',
1330
- top: '-1000px',
1331
- display: 'none',
1332
- whiteSpace: 'pre'
1333
- };
1334
- styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];
1335
- for (i = 0, len = styles.length; i < len; i++) {
1336
- style = styles[i];
1337
- style_block[style] = this.search_field.css(style);
1338
- }
1339
- div = $('<div />').css(style_block);
1340
- div.text(this.get_search_field_value());
1341
- $('body').append(div);
1342
- width = div.width() + 25;
1343
- div.remove();
1344
- if (this.container.is(':visible')) {
1345
- width = Math.min(this.container.outerWidth() - 10, width);
1346
- }
1347
- return this.search_field.width(width);
1348
- };
1349
-
1350
- Chosen.prototype.trigger_form_field_change = function(extra) {
1351
- this.form_field_jq.trigger("input", extra);
1352
- return this.form_field_jq.trigger("change", extra);
1353
- };
1354
-
1355
- return Chosen;
1356
-
1357
- })(AbstractChosen);
1358
-
1359
- }).call(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/chosen-select/chosen.jquery.min.js DELETED
@@ -1,3 +0,0 @@
1
- /* Chosen v1.8.7 | (c) 2011-2018 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
-
3
- (function(){var t,e,s,i,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function s(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},o={}.hasOwnProperty;(i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,n,r,o;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),o=[],s=0,i=(r=t.childNodes).length;s<i;s++)n=r[s],o.push(this.add_option(n,e,t.disabled));return o},t.prototype.add_option=function(t,e,s){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===s?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var e,s,n,r,o;for(r=new i,s=0,n=(o=t.childNodes).length;s<n;s++)e=o[s],r.add_node(e);return r.parsed},e=function(){function t(e,s){this.form_field=e,this.options=null!=s?s:{},this.label_click_handler=n(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){return this.click_test_action=function(t){return function(e){return t.test_active_click(e)}}(this),this.activate_action=function(t){return function(e){return t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+this.escape_html(t.group_label)+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout(function(t){return function(){return t.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(t){return function(){return t.blur_test()}}(this),100)},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,s,i,n,r,o,h;for(e="",h=0,n=0,r=(o=this.results_data).length;n<r&&(s=o[n],i="",""!==(i=s.group?this.result_add_group(s):this.result_add_option(s))&&(h++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(h>=this.max_shown_results));n++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),t.style&&(s.style.cssText=t.style),s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.highlighted_html||t.html,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,s,i,n;for(n=[],t=0,e=(s=this.results_data).length;t<e;t++)(i=s[t]).selected?n.push(i.selected=!1):n.push(void 0);return n},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(t){var e,s,i,n,r,o,h,l,c,_,a,u,d,p,f;for(this.no_results_clear(),_=0,e=(h=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(e),i=0,n=(l=this.results_data).length;i<n;i++)(r=l[i]).search_match=!1,a=null,u=null,r.highlighted_html="",this.include_option_in_results(r)&&(r.group&&(r.group_match=!1,r.active_options=0),null!=r.group_array_index&&this.results_data[r.group_array_index]&&(0===(a=this.results_data[r.group_array_index]).active_options&&a.search_match&&(_+=1),a.active_options+=1),f=r.group?r.label:r.text,r.group&&!this.group_search||(u=this.search_string_match(f,c),r.search_match=null!=u,r.search_match&&!r.group&&(_+=1),r.search_match?(h.length&&(d=u.index,o=f.slice(0,d),s=f.slice(d,d+h.length),p=f.slice(d+h.length),r.highlighted_html=this.escape_html(o)+"<em>"+this.escape_html(s)+"</em>"+this.escape_html(p)),null!=a&&(a.group_match=!0)):null!=r.group_array_index&&this.results_data[r.group_array_index].search_match&&(r.search_match=!0)));return this.result_clear_highlight(),_<1&&h.length?(this.update_results_content(""),this.no_results(h)):(this.update_results_content(this.results_option_build()),(null!=t?t.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,s;return s=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),e=this.case_sensitive_search?"":"i",new RegExp(s,e)},t.prototype.search_string_match=function(t,e){var s;return s=e.exec(t),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},t.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t<e;t++)s[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keydown_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),s){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){if(!this.is_disabled)return setTimeout(function(t){return function(){return t.results_search()}}(this),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var n,r;r=(n=t(this)).data("chosen"),"destroy"!==i?r instanceof s||n.data("chosen",new s(this,i)):r instanceof s&&r.destroy()}):this}}),s=function(s){function n(){return n.__super__.constructor.apply(this,arguments)}return r(n,e),n.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={"class":e.join(" "),title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",s),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){return this.container.on("touchstart.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},n.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(e){var s;if(!this.is_disabled)return!e||"mousedown"!==(s=e.type)&&"touchstart"!==s||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},n.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},n.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},n.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(e){var s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(t){var e,s,i,n,r;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),r=this.search_results.scrollTop(),n=i+r,s=this.result_highlight.position().top+this.search_results.scrollTop(),(e=s+this.result_highlight.outerHeight())>=n)return this.search_results.scrollTop(e-i>0?e-i:0);if(s<r)return this.search_results.scrollTop(s)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(t){return this.search_results.html(t)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},n.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(e){var s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=s,this.result_select(e),this.search_field.focus()},n.prototype.search_results_mouseover=function(e){var s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(s)},n.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},n.prototype.choice_build=function(e){var s,i;return s=t("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?s.addClass("search-choice-disabled"):((i=t("<a />",{"class":"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",function(t){return function(e){return t.choice_destroy_link_click(e)}}(this)),s.append(i)),this.search_container.before(s)},n.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},n.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(t){var e,s;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),s=this.results_data[e[0].getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?t.metaKey||t.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},n.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return this.search_field.val()},n.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},n.prototype.escape_html=function(e){return t("<div/>").text(e).html()},n.prototype.winnow_results_set_highlight=function(){var t,e;if(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(t=e.length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},n.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var e,s,i,n,r,o,h;if(this.is_multiple){for(r={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)r[n=o[s]]=this.search_field.css(n);return(e=t("<div />").css(r)).text(this.get_search_field_value()),t("body").append(e),h=e.width()+25,e.remove(),this.container.is(":visible")&&(h=Math.min(this.container.outerWidth()-10,h)),this.search_field.width(h)}},n.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},n}()}).call(this);
 
 
 
assets/chosen-select/chosen.min.css DELETED
@@ -1,11 +0,0 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.8.7
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2018 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container.chosen-with-drop .chosen-drop{clip:auto;-webkit-clip-path:none;clip-path:none}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),to(#f4f4f4));background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;-webkit-box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;clip:rect(0,0,0,0);-webkit-clip-path:inset(100% 100%);clip-path:inset(100% 100%)}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(1%,#eee),color-stop(15%,#fff));background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#eee),color-stop(80%,#fff));background-image:linear-gradient(#eee 20%,#fff 80%);-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
 
 
 
 
 
 
 
 
 
 
 
assets/chosen-select/chosen.proto.js DELETED
@@ -1,1399 +0,0 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.8.7
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2018 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */
12
-
13
- (function() {
14
- var AbstractChosen, SelectParser,
15
- bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
16
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
17
- hasProp = {}.hasOwnProperty;
18
-
19
- SelectParser = (function() {
20
- function SelectParser() {
21
- this.options_index = 0;
22
- this.parsed = [];
23
- }
24
-
25
- SelectParser.prototype.add_node = function(child) {
26
- if (child.nodeName.toUpperCase() === "OPTGROUP") {
27
- return this.add_group(child);
28
- } else {
29
- return this.add_option(child);
30
- }
31
- };
32
-
33
- SelectParser.prototype.add_group = function(group) {
34
- var group_position, i, len, option, ref, results1;
35
- group_position = this.parsed.length;
36
- this.parsed.push({
37
- array_index: group_position,
38
- group: true,
39
- label: group.label,
40
- title: group.title ? group.title : void 0,
41
- children: 0,
42
- disabled: group.disabled,
43
- classes: group.className
44
- });
45
- ref = group.childNodes;
46
- results1 = [];
47
- for (i = 0, len = ref.length; i < len; i++) {
48
- option = ref[i];
49
- results1.push(this.add_option(option, group_position, group.disabled));
50
- }
51
- return results1;
52
- };
53
-
54
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
55
- if (option.nodeName.toUpperCase() === "OPTION") {
56
- if (option.text !== "") {
57
- if (group_position != null) {
58
- this.parsed[group_position].children += 1;
59
- }
60
- this.parsed.push({
61
- array_index: this.parsed.length,
62
- options_index: this.options_index,
63
- value: option.value,
64
- text: option.text,
65
- html: option.innerHTML,
66
- title: option.title ? option.title : void 0,
67
- selected: option.selected,
68
- disabled: group_disabled === true ? group_disabled : option.disabled,
69
- group_array_index: group_position,
70
- group_label: group_position != null ? this.parsed[group_position].label : null,
71
- classes: option.className,
72
- style: option.style.cssText
73
- });
74
- } else {
75
- this.parsed.push({
76
- array_index: this.parsed.length,
77
- options_index: this.options_index,
78
- empty: true
79
- });
80
- }
81
- return this.options_index += 1;
82
- }
83
- };
84
-
85
- return SelectParser;
86
-
87
- })();
88
-
89
- SelectParser.select_to_array = function(select) {
90
- var child, i, len, parser, ref;
91
- parser = new SelectParser();
92
- ref = select.childNodes;
93
- for (i = 0, len = ref.length; i < len; i++) {
94
- child = ref[i];
95
- parser.add_node(child);
96
- }
97
- return parser.parsed;
98
- };
99
-
100
- AbstractChosen = (function() {
101
- function AbstractChosen(form_field, options1) {
102
- this.form_field = form_field;
103
- this.options = options1 != null ? options1 : {};
104
- this.label_click_handler = bind(this.label_click_handler, this);
105
- if (!AbstractChosen.browser_is_supported()) {
106
- return;
107
- }
108
- this.is_multiple = this.form_field.multiple;
109
- this.set_default_text();
110
- this.set_default_values();
111
- this.setup();
112
- this.set_up_html();
113
- this.register_observers();
114
- this.on_ready();
115
- }
116
-
117
- AbstractChosen.prototype.set_default_values = function() {
118
- this.click_test_action = (function(_this) {
119
- return function(evt) {
120
- return _this.test_active_click(evt);
121
- };
122
- })(this);
123
- this.activate_action = (function(_this) {
124
- return function(evt) {
125
- return _this.activate_field(evt);
126
- };
127
- })(this);
128
- this.active_field = false;
129
- this.mouse_on_container = false;
130
- this.results_showing = false;
131
- this.result_highlighted = null;
132
- this.is_rtl = this.options.rtl || /\bchosen-rtl\b/.test(this.form_field.className);
133
- this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
134
- this.disable_search_threshold = this.options.disable_search_threshold || 0;
135
- this.disable_search = this.options.disable_search || false;
136
- this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
137
- this.group_search = this.options.group_search != null ? this.options.group_search : true;
138
- this.search_contains = this.options.search_contains || false;
139
- this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
140
- this.max_selected_options = this.options.max_selected_options || Infinity;
141
- this.inherit_select_classes = this.options.inherit_select_classes || false;
142
- this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
143
- this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
144
- this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
145
- this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
146
- this.case_sensitive_search = this.options.case_sensitive_search || false;
147
- return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;
148
- };
149
-
150
- AbstractChosen.prototype.set_default_text = function() {
151
- if (this.form_field.getAttribute("data-placeholder")) {
152
- this.default_text = this.form_field.getAttribute("data-placeholder");
153
- } else if (this.is_multiple) {
154
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
155
- } else {
156
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
157
- }
158
- this.default_text = this.escape_html(this.default_text);
159
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
160
- };
161
-
162
- AbstractChosen.prototype.choice_label = function(item) {
163
- if (this.include_group_label_in_selected && (item.group_label != null)) {
164
- return "<b class='group-name'>" + (this.escape_html(item.group_label)) + "</b>" + item.html;
165
- } else {
166
- return item.html;
167
- }
168
- };
169
-
170
- AbstractChosen.prototype.mouse_enter = function() {
171
- return this.mouse_on_container = true;
172
- };
173
-
174
- AbstractChosen.prototype.mouse_leave = function() {
175
- return this.mouse_on_container = false;
176
- };
177
-
178
- AbstractChosen.prototype.input_focus = function(evt) {
179
- if (this.is_multiple) {
180
- if (!this.active_field) {
181
- return setTimeout(((function(_this) {
182
- return function() {
183
- return _this.container_mousedown();
184
- };
185
- })(this)), 50);
186
- }
187
- } else {
188
- if (!this.active_field) {
189
- return this.activate_field();
190
- }
191
- }
192
- };
193
-
194
- AbstractChosen.prototype.input_blur = function(evt) {
195
- if (!this.mouse_on_container) {
196
- this.active_field = false;
197
- return setTimeout(((function(_this) {
198
- return function() {
199
- return _this.blur_test();
200
- };
201
- })(this)), 100);
202
- }
203
- };
204
-
205
- AbstractChosen.prototype.label_click_handler = function(evt) {
206
- if (this.is_multiple) {
207
- return this.container_mousedown(evt);
208
- } else {
209
- return this.activate_field();
210
- }
211
- };
212
-
213
- AbstractChosen.prototype.results_option_build = function(options) {
214
- var content, data, data_content, i, len, ref, shown_results;
215
- content = '';
216
- shown_results = 0;
217
- ref = this.results_data;
218
- for (i = 0, len = ref.length; i < len; i++) {
219
- data = ref[i];
220
- data_content = '';
221
- if (data.group) {
222
- data_content = this.result_add_group(data);
223
- } else {
224
- data_content = this.result_add_option(data);
225
- }
226
- if (data_content !== '') {
227
- shown_results++;
228
- content += data_content;
229
- }
230
- if (options != null ? options.first : void 0) {
231
- if (data.selected && this.is_multiple) {
232
- this.choice_build(data);
233
- } else if (data.selected && !this.is_multiple) {
234
- this.single_set_selected_text(this.choice_label(data));
235
- }
236
- }
237
- if (shown_results >= this.max_shown_results) {
238
- break;
239
- }
240
- }
241
- return content;
242
- };
243
-
244
- AbstractChosen.prototype.result_add_option = function(option) {
245
- var classes, option_el;
246
- if (!option.search_match) {
247
- return '';
248
- }
249
- if (!this.include_option_in_results(option)) {
250
- return '';
251
- }
252
- classes = [];
253
- if (!option.disabled && !(option.selected && this.is_multiple)) {
254
- classes.push("active-result");
255
- }
256
- if (option.disabled && !(option.selected && this.is_multiple)) {
257
- classes.push("disabled-result");
258
- }
259
- if (option.selected) {
260
- classes.push("result-selected");
261
- }
262
- if (option.group_array_index != null) {
263
- classes.push("group-option");
264
- }
265
- if (option.classes !== "") {
266
- classes.push(option.classes);
267
- }
268
- option_el = document.createElement("li");
269
- option_el.className = classes.join(" ");
270
- if (option.style) {
271
- option_el.style.cssText = option.style;
272
- }
273
- option_el.setAttribute("data-option-array-index", option.array_index);
274
- option_el.innerHTML = option.highlighted_html || option.html;
275
- if (option.title) {
276
- option_el.title = option.title;
277
- }
278
- return this.outerHTML(option_el);
279
- };
280
-
281
- AbstractChosen.prototype.result_add_group = function(group) {
282
- var classes, group_el;
283
- if (!(group.search_match || group.group_match)) {
284
- return '';
285
- }
286
- if (!(group.active_options > 0)) {
287
- return '';
288
- }
289
- classes = [];
290
- classes.push("group-result");
291
- if (group.classes) {
292
- classes.push(group.classes);
293
- }
294
- group_el = document.createElement("li");
295
- group_el.className = classes.join(" ");
296
- group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);
297
- if (group.title) {
298
- group_el.title = group.title;
299
- }
300
- return this.outerHTML(group_el);
301
- };
302
-
303
- AbstractChosen.prototype.results_update_field = function() {
304
- this.set_default_text();
305
- if (!this.is_multiple) {
306
- this.results_reset_cleanup();
307
- }
308
- this.result_clear_highlight();
309
- this.results_build();
310
- if (this.results_showing) {
311
- return this.winnow_results();
312
- }
313
- };
314
-
315
- AbstractChosen.prototype.reset_single_select_options = function() {
316
- var i, len, ref, result, results1;
317
- ref = this.results_data;
318
- results1 = [];
319
- for (i = 0, len = ref.length; i < len; i++) {
320
- result = ref[i];
321
- if (result.selected) {
322
- results1.push(result.selected = false);
323
- } else {
324
- results1.push(void 0);
325
- }
326
- }
327
- return results1;
328
- };
329
-
330
- AbstractChosen.prototype.results_toggle = function() {
331
- if (this.results_showing) {
332
- return this.results_hide();
333
- } else {
334
- return this.results_show();
335
- }
336
- };
337
-
338
- AbstractChosen.prototype.results_search = function(evt) {
339
- if (this.results_showing) {
340
- return this.winnow_results();
341
- } else {
342
- return this.results_show();
343
- }
344
- };
345
-
346
- AbstractChosen.prototype.winnow_results = function(options) {
347
- var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
348
- this.no_results_clear();
349
- results = 0;
350
- query = this.get_search_text();
351
- escapedQuery = query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
352
- regex = this.get_search_regex(escapedQuery);
353
- ref = this.results_data;
354
- for (i = 0, len = ref.length; i < len; i++) {
355
- option = ref[i];
356
- option.search_match = false;
357
- results_group = null;
358
- search_match = null;
359
- option.highlighted_html = '';
360
- if (this.include_option_in_results(option)) {
361
- if (option.group) {
362
- option.group_match = false;
363
- option.active_options = 0;
364
- }
365
- if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
366
- results_group = this.results_data[option.group_array_index];
367
- if (results_group.active_options === 0 && results_group.search_match) {
368
- results += 1;
369
- }
370
- results_group.active_options += 1;
371
- }
372
- text = option.group ? option.label : option.text;
373
- if (!(option.group && !this.group_search)) {
374
- search_match = this.search_string_match(text, regex);
375
- option.search_match = search_match != null;
376
- if (option.search_match && !option.group) {
377
- results += 1;
378
- }
379
- if (option.search_match) {
380
- if (query.length) {
381
- startpos = search_match.index;
382
- prefix = text.slice(0, startpos);
383
- fix = text.slice(startpos, startpos + query.length);
384
- suffix = text.slice(startpos + query.length);
385
- option.highlighted_html = (this.escape_html(prefix)) + "<em>" + (this.escape_html(fix)) + "</em>" + (this.escape_html(suffix));
386
- }
387
- if (results_group != null) {
388
- results_group.group_match = true;
389
- }
390
- } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
391
- option.search_match = true;
392
- }
393
- }
394
- }
395
- }
396
- this.result_clear_highlight();
397
- if (results < 1 && query.length) {
398
- this.update_results_content("");
399
- return this.no_results(query);
400
- } else {
401
- this.update_results_content(this.results_option_build());
402
- if (!(options != null ? options.skip_highlight : void 0)) {
403
- return this.winnow_results_set_highlight();
404
- }
405
- }
406
- };
407
-
408
- AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
409
- var regex_flag, regex_string;
410
- regex_string = this.search_contains ? escaped_search_string : "(^|\\s|\\b)" + escaped_search_string + "[^\\s]*";
411
- if (!(this.enable_split_word_search || this.search_contains)) {
412
- regex_string = "^" + regex_string;
413
- }
414
- regex_flag = this.case_sensitive_search ? "" : "i";
415
- return new RegExp(regex_string, regex_flag);
416
- };
417
-
418
- AbstractChosen.prototype.search_string_match = function(search_string, regex) {
419
- var match;
420
- match = regex.exec(search_string);
421
- if (!this.search_contains && (match != null ? match[1] : void 0)) {
422
- match.index += 1;
423
- }
424
- return match;
425
- };
426
-
427
- AbstractChosen.prototype.choices_count = function() {
428
- var i, len, option, ref;
429
- if (this.selected_option_count != null) {
430
- return this.selected_option_count;
431
- }
432
- this.selected_option_count = 0;
433
- ref = this.form_field.options;
434
- for (i = 0, len = ref.length; i < len; i++) {
435
- option = ref[i];
436
- if (option.selected) {
437
- this.selected_option_count += 1;
438
- }
439
- }
440
- return this.selected_option_count;
441
- };
442
-
443
- AbstractChosen.prototype.choices_click = function(evt) {
444
- evt.preventDefault();
445
- this.activate_field();
446
- if (!(this.results_showing || this.is_disabled)) {
447
- return this.results_show();
448
- }
449
- };
450
-
451
- AbstractChosen.prototype.keydown_checker = function(evt) {
452
- var ref, stroke;
453
- stroke = (ref = evt.which) != null ? ref : evt.keyCode;
454
- this.search_field_scale();
455
- if (stroke !== 8 && this.pending_backstroke) {
456
- this.clear_backstroke();
457
- }
458
- switch (stroke) {
459
- case 8:
460
- this.backstroke_length = this.get_search_field_value().length;
461
- break;
462
- case 9:
463
- if (this.results_showing && !this.is_multiple) {
464
- this.result_select(evt);
465
- }
466
- this.mouse_on_container = false;
467
- break;
468
- case 13:
469
- if (this.results_showing) {
470
- evt.preventDefault();
471
- }
472
- break;
473
- case 27:
474
- if (this.results_showing) {
475
- evt.preventDefault();
476
- }
477
- break;
478
- case 32:
479
- if (this.disable_search) {
480
- evt.preventDefault();
481
- }
482
- break;
483
- case 38:
484
- evt.preventDefault();
485
- this.keyup_arrow();
486
- break;
487
- case 40:
488
- evt.preventDefault();
489
- this.keydown_arrow();
490
- break;
491
- }
492
- };
493
-
494
- AbstractChosen.prototype.keyup_checker = function(evt) {
495
- var ref, stroke;
496
- stroke = (ref = evt.which) != null ? ref : evt.keyCode;
497
- this.search_field_scale();
498
- switch (stroke) {
499
- case 8:
500
- if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
501
- this.keydown_backstroke();
502
- } else if (!this.pending_backstroke) {
503
- this.result_clear_highlight();
504
- this.results_search();
505
- }
506
- break;
507
- case 13:
508
- evt.preventDefault();
509
- if (this.results_showing) {
510
- this.result_select(evt);
511
- }
512
- break;
513
- case 27:
514
- if (this.results_showing) {
515
- this.results_hide();
516
- }
517
- break;
518
- case 9:
519
- case 16:
520
- case 17:
521
- case 18:
522
- case 38:
523
- case 40:
524
- case 91:
525
- break;
526
- default:
527
- this.results_search();
528
- break;
529
- }
530
- };
531
-
532
- AbstractChosen.prototype.clipboard_event_checker = function(evt) {
533
- if (this.is_disabled) {
534
- return;
535
- }
536
- return setTimeout(((function(_this) {
537
- return function() {
538
- return _this.results_search();
539
- };
540
- })(this)), 50);
541
- };
542
-
543
- AbstractChosen.prototype.container_width = function() {
544
- if (this.options.width != null) {
545
- return this.options.width;
546
- } else {
547
- return this.form_field.offsetWidth + "px";
548
- }
549
- };
550
-
551
- AbstractChosen.prototype.include_option_in_results = function(option) {
552
- if (this.is_multiple && (!this.display_selected_options && option.selected)) {
553
- return false;
554
- }
555
- if (!this.display_disabled_options && option.disabled) {
556
- return false;
557
- }
558
- if (option.empty) {
559
- return false;
560
- }
561
- return true;
562
- };
563
-
564
- AbstractChosen.prototype.search_results_touchstart = function(evt) {
565
- this.touch_started = true;
566
- return this.search_results_mouseover(evt);
567
- };
568
-
569
- AbstractChosen.prototype.search_results_touchmove = function(evt) {
570
- this.touch_started = false;
571
- return this.search_results_mouseout(evt);
572
- };
573
-
574
- AbstractChosen.prototype.search_results_touchend = function(evt) {
575
- if (this.touch_started) {
576
- return this.search_results_mouseup(evt);
577
- }
578
- };
579
-
580
- AbstractChosen.prototype.outerHTML = function(element) {
581
- var tmp;
582
- if (element.outerHTML) {
583
- return element.outerHTML;
584
- }
585
- tmp = document.createElement("div");
586
- tmp.appendChild(element);
587
- return tmp.innerHTML;
588
- };
589
-
590
- AbstractChosen.prototype.get_single_html = function() {
591
- return "<a class=\"chosen-single chosen-default\">\n <span>" + this.default_text + "</span>\n <div><b></b></div>\n</a>\n<div class=\"chosen-drop\">\n <div class=\"chosen-search\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" />\n </div>\n <ul class=\"chosen-results\"></ul>\n</div>";
592
- };
593
-
594
- AbstractChosen.prototype.get_multi_html = function() {
595
- return "<ul class=\"chosen-choices\">\n <li class=\"search-field\">\n <input class=\"chosen-search-input\" type=\"text\" autocomplete=\"off\" value=\"" + this.default_text + "\" />\n </li>\n</ul>\n<div class=\"chosen-drop\">\n <ul class=\"chosen-results\"></ul>\n</div>";
596
- };
597
-
598
- AbstractChosen.prototype.get_no_results_html = function(terms) {
599
- return "<li class=\"no-results\">\n " + this.results_none_found + " <span>" + (this.escape_html(terms)) + "</span>\n</li>";
600
- };
601
-
602
- AbstractChosen.browser_is_supported = function() {
603
- if ("Microsoft Internet Explorer" === window.navigator.appName) {
604
- return document.documentMode >= 8;
605
- }
606
- if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
607
- return false;
608
- }
609
- return true;
610
- };
611
-
612
- AbstractChosen.default_multiple_text = "Select Some Options";
613
-
614
- AbstractChosen.default_single_text = "Select an Option";
615
-
616
- AbstractChosen.default_no_result_text = "No results match";
617
-
618
- return AbstractChosen;
619
-
620
- })();
621
-
622
- this.Chosen = (function(superClass) {
623
- var triggerHtmlEvent;
624
-
625
- extend(Chosen, superClass);
626
-
627
- function Chosen() {
628
- return Chosen.__super__.constructor.apply(this, arguments);
629
- }
630
-
631
- Chosen.prototype.setup = function() {
632
- return this.current_selectedIndex = this.form_field.selectedIndex;
633
- };
634
-
635
- Chosen.prototype.set_up_html = function() {
636
- var container_classes, container_props;
637
- container_classes = ["chosen-container"];
638
- container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
639
- if (this.inherit_select_classes && this.form_field.className) {
640
- container_classes.push(this.form_field.className);
641
- }
642
- if (this.is_rtl) {
643
- container_classes.push("chosen-rtl");
644
- }
645
- container_props = {
646
- 'class': container_classes.join(' '),
647
- 'title': this.form_field.title
648
- };
649
- if (this.form_field.id.length) {
650
- container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
651
- }
652
- this.container = new Element('div', container_props);
653
- this.container.setStyle({
654
- width: this.container_width()
655
- });
656
- if (this.is_multiple) {
657
- this.container.update(this.get_multi_html());
658
- } else {
659
- this.container.update(this.get_single_html());
660
- }
661
- this.form_field.hide().insert({
662
- after: this.container
663
- });
664
- this.dropdown = this.container.down('div.chosen-drop');
665
- this.search_field = this.container.down('input');
666
- this.search_results = this.container.down('ul.chosen-results');
667
- this.search_field_scale();
668
- this.search_no_results = this.container.down('li.no-results');
669
- if (this.is_multiple) {
670
- this.search_choices = this.container.down('ul.chosen-choices');
671
- this.search_container = this.container.down('li.search-field');
672
- } else {
673
- this.search_container = this.container.down('div.chosen-search');
674
- this.selected_item = this.container.down('.chosen-single');
675
- }
676
- this.results_build();
677
- this.set_tab_index();
678
- return this.set_label_behavior();
679
- };
680
-
681
- Chosen.prototype.on_ready = function() {
682
- return this.form_field.fire("chosen:ready", {
683
- chosen: this
684
- });
685
- };
686
-
687
- Chosen.prototype.register_observers = function() {
688
- this.container.observe("touchstart", (function(_this) {
689
- return function(evt) {
690
- return _this.container_mousedown(evt);
691
- };
692
- })(this));
693
- this.container.observe("touchend", (function(_this) {
694
- return function(evt) {
695
- return _this.container_mouseup(evt);
696
- };
697
- })(this));
698
- this.container.observe("mousedown", (function(_this) {
699
- return function(evt) {
700
- return _this.container_mousedown(evt);
701
- };
702
- })(this));
703
- this.container.observe("mouseup", (function(_this) {
704
- return function(evt) {
705
- return _this.container_mouseup(evt);
706
- };
707
- })(this));
708
- this.container.observe("mouseenter", (function(_this) {
709
- return function(evt) {
710
- return _this.mouse_enter(evt);
711
- };
712
- })(this));
713
- this.container.observe("mouseleave", (function(_this) {
714
- return function(evt) {
715
- return _this.mouse_leave(evt);
716
- };
717
- })(this));
718
- this.search_results.observe("mouseup", (function(_this) {
719
- return function(evt) {
720
- return _this.search_results_mouseup(evt);
721
- };
722
- })(this));
723
- this.search_results.observe("mouseover", (function(_this) {
724
- return function(evt) {
725
- return _this.search_results_mouseover(evt);
726
- };
727
- })(this));
728
- this.search_results.observe("mouseout", (function(_this) {
729
- return function(evt) {
730
- return _this.search_results_mouseout(evt);
731
- };
732
- })(this));
733
- this.search_results.observe("mousewheel", (function(_this) {
734
- return function(evt) {
735
- return _this.search_results_mousewheel(evt);
736
- };
737
- })(this));
738
- this.search_results.observe("DOMMouseScroll", (function(_this) {
739
- return function(evt) {
740
- return _this.search_results_mousewheel(evt);
741
- };
742
- })(this));
743
- this.search_results.observe("touchstart", (function(_this) {
744
- return function(evt) {
745
- return _this.search_results_touchstart(evt);
746
- };
747
- })(this));
748
- this.search_results.observe("touchmove", (function(_this) {
749
- return function(evt) {
750
- return _this.search_results_touchmove(evt);
751
- };
752
- })(this));
753
- this.search_results.observe("touchend", (function(_this) {
754
- return function(evt) {
755
- return _this.search_results_touchend(evt);
756
- };
757
- })(this));
758
- this.form_field.observe("chosen:updated", (function(_this) {
759
- return function(evt) {
760
- return _this.results_update_field(evt);
761
- };
762
- })(this));
763
- this.form_field.observe("chosen:activate", (function(_this) {
764
- return function(evt) {
765
- return _this.activate_field(evt);
766
- };
767
- })(this));
768
- this.form_field.observe("chosen:open", (function(_this) {
769
- return function(evt) {
770
- return _this.container_mousedown(evt);
771
- };
772
- })(this));
773
- this.form_field.observe("chosen:close", (function(_this) {
774
- return function(evt) {
775
- return _this.close_field(evt);
776
- };
777
- })(this));
778
- this.search_field.observe("blur", (function(_this) {
779
- return function(evt) {
780
- return _this.input_blur(evt);
781
- };
782
- })(this));
783
- this.search_field.observe("keyup", (function(_this) {
784
- return function(evt) {
785
- return _this.keyup_checker(evt);
786
- };
787
- })(this));
788
- this.search_field.observe("keydown", (function(_this) {
789
- return function(evt) {
790
- return _this.keydown_checker(evt);
791
- };
792
- })(this));
793
- this.search_field.observe("focus", (function(_this) {
794
- return function(evt) {
795
- return _this.input_focus(evt);
796
- };
797
- })(this));
798
- this.search_field.observe("cut", (function(_this) {
799
- return function(evt) {
800
- return _this.clipboard_event_checker(evt);
801
- };
802
- })(this));
803
- this.search_field.observe("paste", (function(_this) {
804
- return function(evt) {
805
- return _this.clipboard_event_checker(evt);
806
- };
807
- })(this));
808
- if (this.is_multiple) {
809
- return this.search_choices.observe("click", (function(_this) {
810
- return function(evt) {
811
- return _this.choices_click(evt);
812
- };
813
- })(this));
814
- } else {
815
- return this.container.observe("click", (function(_this) {
816
- return function(evt) {
817
- return evt.preventDefault();
818
- };
819
- })(this));
820
- }
821
- };
822
-
823
- Chosen.prototype.destroy = function() {
824
- var event, i, len, ref;
825
- this.container.ownerDocument.stopObserving("click", this.click_test_action);
826
- ref = ['chosen:updated', 'chosen:activate', 'chosen:open', 'chosen:close'];
827
- for (i = 0, len = ref.length; i < len; i++) {
828
- event = ref[i];
829
- this.form_field.stopObserving(event);
830
- }
831
- this.container.stopObserving();
832
- this.search_results.stopObserving();
833
- this.search_field.stopObserving();
834
- if (this.form_field_label != null) {
835
- this.form_field_label.stopObserving();
836
- }
837
- if (this.is_multiple) {
838
- this.search_choices.stopObserving();
839
- this.container.select(".search-choice-close").each(function(choice) {
840
- return choice.stopObserving();
841
- });
842
- } else {
843
- this.selected_item.stopObserving();
844
- }
845
- if (this.search_field.tabIndex) {
846
- this.form_field.tabIndex = this.search_field.tabIndex;
847
- }
848
- this.container.remove();
849
- return this.form_field.show();
850
- };
851
-
852
- Chosen.prototype.search_field_disabled = function() {
853
- var ref;
854
- this.is_disabled = this.form_field.disabled || ((ref = this.form_field.up('fieldset')) != null ? ref.disabled : void 0) || false;
855
- if (this.is_disabled) {
856
- this.container.addClassName('chosen-disabled');
857
- } else {
858
- this.container.removeClassName('chosen-disabled');
859
- }
860
- this.search_field.disabled = this.is_disabled;
861
- if (!this.is_multiple) {
862
- this.selected_item.stopObserving('focus', this.activate_field);
863
- }
864
- if (this.is_disabled) {
865
- return this.close_field();
866
- } else if (!this.is_multiple) {
867
- return this.selected_item.observe('focus', this.activate_field);
868
- }
869
- };
870
-
871
- Chosen.prototype.container_mousedown = function(evt) {
872
- var ref;
873
- if (this.is_disabled) {
874
- return;
875
- }
876
- if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {
877
- evt.preventDefault();
878
- }
879
- if (!((evt != null) && evt.target.hasClassName("search-choice-close"))) {
880
- if (!this.active_field) {
881
- if (this.is_multiple) {
882
- this.search_field.clear();
883
- }
884
- this.container.ownerDocument.observe("click", this.click_test_action);
885
- this.results_show();
886
- } else if (!this.is_multiple && evt && (evt.target === this.selected_item || evt.target.up("a.chosen-single"))) {
887
- this.results_toggle();
888
- }
889
- return this.activate_field();
890
- }
891
- };
892
-
893
- Chosen.prototype.container_mouseup = function(evt) {
894
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
895
- return this.results_reset(evt);
896
- }
897
- };
898
-
899
- Chosen.prototype.search_results_mousewheel = function(evt) {
900
- var delta;
901
- delta = evt.deltaY || -evt.wheelDelta || evt.detail;
902
- if (delta != null) {
903
- evt.preventDefault();
904
- if (evt.type === 'DOMMouseScroll') {
905
- delta = delta * 40;
906
- }
907
- return this.search_results.scrollTop = delta + this.search_results.scrollTop;
908
- }
909
- };
910
-
911
- Chosen.prototype.blur_test = function(evt) {
912
- if (!this.active_field && this.container.hasClassName("chosen-container-active")) {
913
- return this.close_field();
914
- }
915
- };
916
-
917
- Chosen.prototype.close_field = function() {
918
- this.container.ownerDocument.stopObserving("click", this.click_test_action);
919
- this.active_field = false;
920
- this.results_hide();
921
- this.container.removeClassName("chosen-container-active");
922
- this.clear_backstroke();
923
- this.show_search_field_default();
924
- this.search_field_scale();
925
- return this.search_field.blur();
926
- };
927
-
928
- Chosen.prototype.activate_field = function() {
929
- if (this.is_disabled) {
930
- return;
931
- }
932
- this.container.addClassName("chosen-container-active");
933
- this.active_field = true;
934
- this.search_field.value = this.get_search_field_value();
935
- return this.search_field.focus();
936
- };
937
-
938
- Chosen.prototype.test_active_click = function(evt) {
939
- if (evt.target.up('.chosen-container') === this.container) {
940
- return this.active_field = true;
941
- } else {
942
- return this.close_field();
943
- }
944
- };
945
-
946
- Chosen.prototype.results_build = function() {
947
- this.parsing = true;
948
- this.selected_option_count = null;
949
- this.results_data = SelectParser.select_to_array(this.form_field);
950
- if (this.is_multiple) {
951
- this.search_choices.select("li.search-choice").invoke("remove");
952
- } else {
953
- this.single_set_selected_text();
954
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
955
- this.search_field.readOnly = true;
956
- this.container.addClassName("chosen-container-single-nosearch");
957
- } else {
958
- this.search_field.readOnly = false;
959
- this.container.removeClassName("chosen-container-single-nosearch");
960
- }
961
- }
962
- this.update_results_content(this.results_option_build({
963
- first: true
964
- }));
965
- this.search_field_disabled();
966
- this.show_search_field_default();
967
- this.search_field_scale();
968
- return this.parsing = false;
969
- };
970
-
971
- Chosen.prototype.result_do_highlight = function(el) {
972
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
973
- this.result_clear_highlight();
974
- this.result_highlight = el;
975
- this.result_highlight.addClassName("highlighted");
976
- maxHeight = parseInt(this.search_results.getStyle('maxHeight'), 10);
977
- visible_top = this.search_results.scrollTop;
978
- visible_bottom = maxHeight + visible_top;
979
- high_top = this.result_highlight.positionedOffset().top;
980
- high_bottom = high_top + this.result_highlight.getHeight();
981
- if (high_bottom >= visible_bottom) {
982
- return this.search_results.scrollTop = (high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0;
983
- } else if (high_top < visible_top) {
984
- return this.search_results.scrollTop = high_top;
985
- }
986
- };
987
-
988
- Chosen.prototype.result_clear_highlight = function() {
989
- if (this.result_highlight) {
990
- this.result_highlight.removeClassName('highlighted');
991
- }
992
- return this.result_highlight = null;
993
- };
994
-
995
- Chosen.prototype.results_show = function() {
996
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
997
- this.form_field.fire("chosen:maxselected", {
998
- chosen: this
999
- });
1000
- return false;
1001
- }
1002
- this.container.addClassName("chosen-with-drop");
1003
- this.results_showing = true;
1004
- this.search_field.focus();
1005
- this.search_field.value = this.get_search_field_value();
1006
- this.winnow_results();
1007
- return this.form_field.fire("chosen:showing_dropdown", {
1008
- chosen: this
1009
- });
1010
- };
1011
-
1012
- Chosen.prototype.update_results_content = function(content) {
1013
- return this.search_results.update(content);
1014
- };
1015
-
1016
- Chosen.prototype.results_hide = function() {
1017
- if (this.results_showing) {
1018
- this.result_clear_highlight();
1019
- this.container.removeClassName("chosen-with-drop");
1020
- this.form_field.fire("chosen:hiding_dropdown", {
1021
- chosen: this
1022
- });
1023
- }
1024
- return this.results_showing = false;
1025
- };
1026
-
1027
- Chosen.prototype.set_tab_index = function(el) {
1028
- var ti;
1029
- if (this.form_field.tabIndex) {
1030
- ti = this.form_field.tabIndex;
1031
- this.form_field.tabIndex = -1;
1032
- return this.search_field.tabIndex = ti;
1033
- }
1034
- };
1035
-
1036
- Chosen.prototype.set_label_behavior = function() {
1037
- this.form_field_label = this.form_field.up("label");
1038
- if (this.form_field_label == null) {
1039
- this.form_field_label = $$("label[for='" + this.form_field.id + "']").first();
1040
- }
1041
- if (this.form_field_label != null) {
1042
- return this.form_field_label.observe("click", this.label_click_handler);
1043
- }
1044
- };
1045
-
1046
- Chosen.prototype.show_search_field_default = function() {
1047
- if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
1048
- this.search_field.value = this.default_text;
1049
- return this.search_field.addClassName("default");
1050
- } else {
1051
- this.search_field.value = "";
1052
- return this.search_field.removeClassName("default");
1053
- }
1054
- };
1055
-
1056
- Chosen.prototype.search_results_mouseup = function(evt) {
1057
- var target;
1058
- target = evt.target.hasClassName("active-result") ? evt.target : evt.target.up(".active-result");
1059
- if (target) {
1060
- this.result_highlight = target;
1061
- this.result_select(evt);
1062
- return this.search_field.focus();
1063
- }
1064
- };
1065
-
1066
- Chosen.prototype.search_results_mouseover = function(evt) {
1067
- var target;
1068
- target = evt.target.hasClassName("active-result") ? evt.target : evt.target.up(".active-result");
1069
- if (target) {
1070
- return this.result_do_highlight(target);
1071
- }
1072
- };
1073
-
1074
- Chosen.prototype.search_results_mouseout = function(evt) {
1075
- if (evt.target.hasClassName('active-result') || evt.target.up('.active-result')) {
1076
- return this.result_clear_highlight();
1077
- }
1078
- };
1079
-
1080
- Chosen.prototype.choice_build = function(item) {
1081
- var choice, close_link;
1082
- choice = new Element('li', {
1083
- "class": "search-choice"
1084
- }).update("<span>" + (this.choice_label(item)) + "</span>");
1085
- if (item.disabled) {
1086
- choice.addClassName('search-choice-disabled');
1087
- } else {
1088
- close_link = new Element('a', {
1089
- href: '#',
1090
- "class": 'search-choice-close',
1091
- rel: item.array_index
1092
- });
1093
- close_link.observe("click", (function(_this) {
1094
- return function(evt) {
1095
- return _this.choice_destroy_link_click(evt);
1096
- };
1097
- })(this));
1098
- choice.insert(close_link);
1099
- }
1100
- return this.search_container.insert({
1101
- before: choice
1102
- });
1103
- };
1104
-
1105
- Chosen.prototype.choice_destroy_link_click = function(evt) {
1106
- evt.preventDefault();
1107
- evt.stopPropagation();
1108
- if (!this.is_disabled) {
1109
- return this.choice_destroy(evt.target);
1110
- }
1111
- };
1112
-
1113
- Chosen.prototype.choice_destroy = function(link) {
1114
- if (this.result_deselect(link.readAttribute("rel"))) {
1115
- if (this.active_field) {
1116
- this.search_field.focus();
1117
- } else {
1118
- this.show_search_field_default();
1119
- }
1120
- if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {
1121
- this.results_hide();
1122
- }
1123
- link.up('li').remove();
1124
- return this.search_field_scale();
1125
- }
1126
- };
1127
-
1128
- Chosen.prototype.results_reset = function() {
1129
- this.reset_single_select_options();
1130
- this.form_field.options[0].selected = true;
1131
- this.single_set_selected_text();
1132
- this.show_search_field_default();
1133
- this.results_reset_cleanup();
1134
- this.trigger_form_field_change();
1135
- if (this.active_field) {
1136
- return this.results_hide();
1137
- }
1138
- };
1139
-
1140
- Chosen.prototype.results_reset_cleanup = function() {
1141
- var deselect_trigger;
1142
- this.current_selectedIndex = this.form_field.selectedIndex;
1143
- deselect_trigger = this.selected_item.down("abbr");
1144
- if (deselect_trigger) {
1145
- return deselect_trigger.remove();
1146
- }
1147
- };
1148
-
1149
- Chosen.prototype.result_select = function(evt) {
1150
- var high, item;
1151
- if (this.result_highlight) {
1152
- high = this.result_highlight;
1153
- this.result_clear_highlight();
1154
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1155
- this.form_field.fire("chosen:maxselected", {
1156
- chosen: this
1157
- });
1158
- return false;
1159
- }
1160
- if (this.is_multiple) {
1161
- high.removeClassName("active-result");
1162
- } else {
1163
- this.reset_single_select_options();
1164
- }
1165
- high.addClassName("result-selected");
1166
- item = this.results_data[high.getAttribute("data-option-array-index")];
1167
- item.selected = true;
1168
- this.form_field.options[item.options_index].selected = true;
1169
- this.selected_option_count = null;
1170
- if (this.is_multiple) {
1171
- this.choice_build(item);
1172
- } else {
1173
- this.single_set_selected_text(this.choice_label(item));
1174
- }
1175
- if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
1176
- if (evt.metaKey || evt.ctrlKey) {
1177
- this.winnow_results({
1178
- skip_highlight: true
1179
- });
1180
- } else {
1181
- this.search_field.value = "";
1182
- this.winnow_results();
1183
- }
1184
- } else {
1185
- this.results_hide();
1186
- this.show_search_field_default();
1187
- }
1188
- if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1189
- this.trigger_form_field_change();
1190
- }
1191
- this.current_selectedIndex = this.form_field.selectedIndex;
1192
- evt.preventDefault();
1193
- return this.search_field_scale();
1194
- }
1195
- };
1196
-
1197
- Chosen.prototype.single_set_selected_text = function(text) {
1198
- if (text == null) {
1199
- text = this.default_text;
1200
- }
1201
- if (text === this.default_text) {
1202
- this.selected_item.addClassName("chosen-default");
1203
- } else {
1204
- this.single_deselect_control_build();
1205
- this.selected_item.removeClassName("chosen-default");
1206
- }
1207
- return this.selected_item.down("span").update(text);
1208
- };
1209
-
1210
- Chosen.prototype.result_deselect = function(pos) {
1211
- var result_data;
1212
- result_data = this.results_data[pos];
1213
- if (!this.form_field.options[result_data.options_index].disabled) {
1214
- result_data.selected = false;
1215
- this.form_field.options[result_data.options_index].selected = false;
1216
- this.selected_option_count = null;
1217
- this.result_clear_highlight();
1218
- if (this.results_showing) {
1219
- this.winnow_results();
1220
- }
1221
- this.trigger_form_field_change();
1222
- this.search_field_scale();
1223
- return true;
1224
- } else {
1225
- return false;
1226
- }
1227
- };
1228
-
1229
- Chosen.prototype.single_deselect_control_build = function() {
1230
- if (!this.allow_single_deselect) {
1231
- return;
1232
- }
1233
- if (!this.selected_item.down("abbr")) {
1234
- this.selected_item.down("span").insert({
1235
- after: "<abbr class=\"search-choice-close\"></abbr>"
1236
- });
1237
- }
1238
- return this.selected_item.addClassName("chosen-single-with-deselect");
1239
- };
1240
-
1241
- Chosen.prototype.get_search_field_value = function() {
1242
- return this.search_field.value;
1243
- };
1244
-
1245
- Chosen.prototype.get_search_text = function() {
1246
- return this.get_search_field_value().strip();
1247
- };
1248
-
1249
- Chosen.prototype.escape_html = function(text) {
1250
- return text.escapeHTML();
1251
- };
1252
-
1253
- Chosen.prototype.winnow_results_set_highlight = function() {
1254
- var do_high;
1255
- if (!this.is_multiple) {
1256
- do_high = this.search_results.down(".result-selected.active-result");
1257
- }
1258
- if (do_high == null) {
1259
- do_high = this.search_results.down(".active-result");
1260
- }
1261
- if (do_high != null) {
1262
- return this.result_do_highlight(do_high);
1263
- }
1264
- };
1265
-
1266
- Chosen.prototype.no_results = function(terms) {
1267
- this.search_results.insert(this.get_no_results_html(terms));
1268
- return this.form_field.fire("chosen:no_results", {
1269
- chosen: this
1270
- });
1271
- };
1272
-
1273
- Chosen.prototype.no_results_clear = function() {
1274
- var nr, results1;
1275
- nr = null;
1276
- results1 = [];
1277
- while (nr = this.search_results.down(".no-results")) {
1278
- results1.push(nr.remove());
1279
- }
1280
- return results1;
1281
- };
1282
-
1283
- Chosen.prototype.keydown_arrow = function() {
1284
- var next_sib;
1285
- if (this.results_showing && this.result_highlight) {
1286
- next_sib = this.result_highlight.next('.active-result');
1287
- if (next_sib) {
1288
- return this.result_do_highlight(next_sib);
1289
- }
1290
- } else {
1291
- return this.results_show();
1292
- }
1293
- };
1294
-
1295
- Chosen.prototype.keyup_arrow = function() {
1296
- var actives, prevs, sibs;
1297
- if (!this.results_showing && !this.is_multiple) {
1298
- return this.results_show();
1299
- } else if (this.result_highlight) {
1300
- sibs = this.result_highlight.previousSiblings();
1301
- actives = this.search_results.select("li.active-result");
1302
- prevs = sibs.intersect(actives);
1303
- if (prevs.length) {
1304
- return this.result_do_highlight(prevs.first());
1305
- } else {
1306
- if (this.choices_count() > 0) {
1307
- this.results_hide();
1308
- }
1309
- return this.result_clear_highlight();
1310
- }
1311
- }
1312
- };
1313
-
1314
- Chosen.prototype.keydown_backstroke = function() {
1315
- var next_available_destroy;
1316
- if (this.pending_backstroke) {
1317
- this.choice_destroy(this.pending_backstroke.down("a"));
1318
- return this.clear_backstroke();
1319
- } else {
1320
- next_available_destroy = this.search_container.siblings().last();
1321
- if (next_available_destroy && next_available_destroy.hasClassName("search-choice") && !next_available_destroy.hasClassName("search-choice-disabled")) {
1322
- this.pending_backstroke = next_available_destroy;
1323
- if (this.pending_backstroke) {
1324
- this.pending_backstroke.addClassName("search-choice-focus");
1325
- }
1326
- if (this.single_backstroke_delete) {
1327
- return this.keydown_backstroke();
1328
- } else {
1329
- return this.pending_backstroke.addClassName("search-choice-focus");
1330
- }
1331
- }
1332
- }
1333
- };
1334
-
1335
- Chosen.prototype.clear_backstroke = function() {
1336
- if (this.pending_backstroke) {
1337
- this.pending_backstroke.removeClassName("search-choice-focus");
1338
- }
1339
- return this.pending_backstroke = null;
1340
- };
1341
-
1342
- Chosen.prototype.search_field_scale = function() {
1343
- var container_width, div, i, len, style, style_block, styles, width;
1344
- if (!this.is_multiple) {
1345
- return;
1346
- }
1347
- style_block = {
1348
- position: 'absolute',
1349
- left: '-1000px',
1350
- top: '-1000px',
1351
- display: 'none',
1352
- whiteSpace: 'pre'
1353
- };
1354
- styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];
1355
- for (i = 0, len = styles.length; i < len; i++) {
1356
- style = styles[i];
1357
- style_block[style] = this.search_field.getStyle(style);
1358
- }
1359
- div = new Element('div').update(this.escape_html(this.get_search_field_value()));
1360
- div.setStyle(style_block);
1361
- document.body.appendChild(div);
1362
- width = div.measure('width') + 25;
1363
- div.remove();
1364
- if (container_width = this.container.getWidth()) {
1365
- width = Math.min(container_width - 10, width);
1366
- }
1367
- return this.search_field.setStyle({
1368
- width: width + 'px'
1369
- });
1370
- };
1371
-
1372
- Chosen.prototype.trigger_form_field_change = function() {
1373
- triggerHtmlEvent(this.form_field, 'input');
1374
- return triggerHtmlEvent(this.form_field, 'change');
1375
- };
1376
-
1377
- triggerHtmlEvent = function(element, eventType) {
1378
- var error, evt;
1379
- if (element.dispatchEvent) {
1380
- try {
1381
- evt = new Event(eventType, {
1382
- bubbles: true,
1383
- cancelable: true
1384
- });
1385
- } catch (error) {
1386
- evt = document.createEvent('HTMLEvents');
1387
- evt.initEvent(eventType, true, true);
1388
- }
1389
- return element.dispatchEvent(evt);
1390
- } else {
1391
- return element.fireEvent("on" + eventType, document.createEventObject());
1392
- }
1393
- };
1394
-
1395
- return Chosen;
1396
-
1397
- })(AbstractChosen);
1398
-
1399
- }).call(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/chosen-select/chosen.proto.min.js DELETED
@@ -1,3 +0,0 @@
1
- /* Chosen v1.8.7 | (c) 2011-2018 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
-
3
- (function(){var e,t,s=function(e,t){return function(){return e.apply(t,arguments)}},i=function(e,t){function s(){this.constructor=e}for(var i in t)r.call(t,i)&&(e[i]=t[i]);return s.prototype=t.prototype,e.prototype=new s,e.__super__=t.prototype,e},r={}.hasOwnProperty;(t=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,s,i,r,n,o;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),o=[],s=0,i=(n=e.childNodes).length;s<i;s++)r=n[s],o.push(this.add_option(r,t,e.disabled));return o},e.prototype.add_option=function(e,t,s){if("OPTION"===e.nodeName.toUpperCase())return""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:!0===s?s:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}()).select_to_array=function(e){var s,i,r,n,o;for(n=new t,i=0,r=(o=e.childNodes).length;i<r;i++)s=o[i],n.add_node(s);return n.parsed},e=function(){function e(t,i){this.form_field=t,this.options=null!=i?i:{},this.label_click_handler=s(this.label_click_handler,this),e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return e.prototype.set_default_values=function(){return this.click_test_action=function(e){return function(t){return e.test_active_click(t)}}(this),this.activate_action=function(e){return function(t){return e.activate_field(t)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+this.escape_html(e.group_label)+"</b>"+e.html:e.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout(function(e){return function(){return e.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(e){return function(){return e.blur_test()}}(this),100)},e.prototype.label_click_handler=function(e){return this.is_multiple?this.container_mousedown(e):this.activate_field()},e.prototype.results_option_build=function(e){var t,s,i,r,n,o,l;for(t="",l=0,r=0,n=(o=this.results_data).length;r<n&&(s=o[r],i="",""!==(i=s.group?this.result_add_group(s):this.result_add_option(s))&&(l++,t+=i),(null!=e?e.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(l>=this.max_shown_results));r++);return t},e.prototype.result_add_option=function(e){var t,s;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),s=document.createElement("li"),s.className=t.join(" "),e.style&&(s.style.cssText=e.style),s.setAttribute("data-option-array-index",e.array_index),s.innerHTML=e.highlighted_html||e.html,e.title&&(s.title=e.title),this.outerHTML(s)):""},e.prototype.result_add_group=function(e){var t,s;return(e.search_match||e.group_match)&&e.active_options>0?((t=[]).push("group-result"),e.classes&&t.push(e.classes),s=document.createElement("li"),s.className=t.join(" "),s.innerHTML=e.highlighted_html||this.escape_html(e.label),e.title&&(s.title=e.title),this.outerHTML(s)):""},e.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},e.prototype.reset_single_select_options=function(){var e,t,s,i,r;for(r=[],e=0,t=(s=this.results_data).length;e<t;e++)(i=s[e]).selected?r.push(i.selected=!1):r.push(void 0);return r},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.winnow_results=function(e){var t,s,i,r,n,o,l,h,c,a,_,u,d,p,f;for(this.no_results_clear(),a=0,t=(l=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(t),i=0,r=(h=this.results_data).length;i<r;i++)(n=h[i]).search_match=!1,_=null,u=null,n.highlighted_html="",this.include_option_in_results(n)&&(n.group&&(n.group_match=!1,n.active_options=0),null!=n.group_array_index&&this.results_data[n.group_array_index]&&(0===(_=this.results_data[n.group_array_index]).active_options&&_.search_match&&(a+=1),_.active_options+=1),f=n.group?n.label:n.text,n.group&&!this.group_search||(u=this.search_string_match(f,c),n.search_match=null!=u,n.search_match&&!n.group&&(a+=1),n.search_match?(l.length&&(d=u.index,o=f.slice(0,d),s=f.slice(d,d+l.length),p=f.slice(d+l.length),n.highlighted_html=this.escape_html(o)+"<em>"+this.escape_html(s)+"</em>"+this.escape_html(p)),null!=_&&(_.group_match=!0)):null!=n.group_array_index&&this.results_data[n.group_array_index].search_match&&(n.search_match=!0)));return this.result_clear_highlight(),a<1&&l.length?(this.update_results_content(""),this.no_results(l)):(this.update_results_content(this.results_option_build()),(null!=e?e.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},e.prototype.get_search_regex=function(e){var t,s;return s=this.search_contains?e:"(^|\\s|\\b)"+e+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),t=this.case_sensitive_search?"":"i",new RegExp(s,t)},e.prototype.search_string_match=function(e,t){var s;return s=t.exec(e),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},e.prototype.choices_count=function(){var e,t,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,e=0,t=(s=this.form_field.options).length;e<t;e++)s[e].selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(e){if(e.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},e.prototype.keydown_checker=function(e){var t,s;switch(s=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},e.prototype.keyup_checker=function(e){var t,s;switch(s=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),s){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:e.preventDefault(),this.results_showing&&this.result_select(e);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},e.prototype.clipboard_event_checker=function(e){if(!this.is_disabled)return setTimeout(function(e){return function(){return e.results_search()}}(this),50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(e){return!(this.is_multiple&&!this.display_selected_options&&e.selected)&&(!(!this.display_disabled_options&&e.disabled)&&!e.empty)},e.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},e.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},e.prototype.search_results_touchend=function(e){if(this.touch_started)return this.search_results_mouseup(e)},e.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:((t=document.createElement("div")).appendChild(e),t.innerHTML)},e.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},e.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},e.prototype.get_no_results_html=function(e){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(e)+"</span>\n</li>"},e.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),this.Chosen=function(s){function r(){return r.__super__.constructor.apply(this,arguments)}var n;return i(r,e),r.prototype.setup=function(){return this.current_selectedIndex=this.form_field.selectedIndex},r.prototype.set_up_html=function(){var e,t;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),t={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(t.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=new Element("div",t),this.container.setStyle({width:this.container_width()}),this.is_multiple?this.container.update(this.get_multi_html()):this.container.update(this.get_single_html()),this.form_field.hide().insert({after:this.container}),this.dropdown=this.container.down("div.chosen-drop"),this.search_field=this.container.down("input"),this.search_results=this.container.down("ul.chosen-results"),this.search_field_scale(),this.search_no_results=this.container.down("li.no-results"),this.is_multiple?(this.search_choices=this.container.down("ul.chosen-choices"),this.search_container=this.container.down("li.search-field")):(this.search_container=this.container.down("div.chosen-search"),this.selected_item=this.container.down(".chosen-single")),this.results_build(),this.set_tab_index(),this.set_label_behavior()},r.prototype.on_ready=function(){return this.form_field.fire("chosen:ready",{chosen:this})},r.prototype.register_observers=function(){return this.container.observe("touchstart",function(e){return function(t){return e.container_mousedown(t)}}(this)),this.container.observe("touchend",function(e){return function(t){return e.container_mouseup(t)}}(this)),this.container.observe("mousedown",function(e){return function(t){return e.container_mousedown(t)}}(this)),this.container.observe("mouseup",function(e){return function(t){return e.container_mouseup(t)}}(this)),this.container.observe("mouseenter",function(e){return function(t){return e.mouse_enter(t)}}(this)),this.container.observe("mouseleave",function(e){return function(t){return e.mouse_leave(t)}}(this)),this.search_results.observe("mouseup",function(e){return function(t){return e.search_results_mouseup(t)}}(this)),this.search_results.observe("mouseover",function(e){return function(t){return e.search_results_mouseover(t)}}(this)),this.search_results.observe("mouseout",function(e){return function(t){return e.search_results_mouseout(t)}}(this)),this.search_results.observe("mousewheel",function(e){return function(t){return e.search_results_mousewheel(t)}}(this)),this.search_results.observe("DOMMouseScroll",function(e){return function(t){return e.search_results_mousewheel(t)}}(this)),this.search_results.observe("touchstart",function(e){return function(t){return e.search_results_touchstart(t)}}(this)),this.search_results.observe("touchmove",function(e){return function(t){return e.search_results_touchmove(t)}}(this)),this.search_results.observe("touchend",function(e){return function(t){return e.search_results_touchend(t)}}(this)),this.form_field.observe("chosen:updated",function(e){return function(t){return e.results_update_field(t)}}(this)),this.form_field.observe("chosen:activate",function(e){return function(t){return e.activate_field(t)}}(this)),this.form_field.observe("chosen:open",function(e){return function(t){return e.container_mousedown(t)}}(this)),this.form_field.observe("chosen:close",function(e){return function(t){return e.close_field(t)}}(this)),this.search_field.observe("blur",function(e){return function(t){return e.input_blur(t)}}(this)),this.search_field.observe("keyup",function(e){return function(t){return e.keyup_checker(t)}}(this)),this.search_field.observe("keydown",function(e){return function(t){return e.keydown_checker(t)}}(this)),this.search_field.observe("focus",function(e){return function(t){return e.input_focus(t)}}(this)),this.search_field.observe("cut",function(e){return function(t){return e.clipboard_event_checker(t)}}(this)),this.search_field.observe("paste",function(e){return function(t){return e.clipboard_event_checker(t)}}(this)),this.is_multiple?this.search_choices.observe("click",function(e){return function(t){return e.choices_click(t)}}(this)):this.container.observe("click",function(e){return e.preventDefault()})},r.prototype.destroy=function(){var e,t,s,i;for(this.container.ownerDocument.stopObserving("click",this.click_test_action),t=0,s=(i=["chosen:updated","chosen:activate","chosen:open","chosen:close"]).length;t<s;t++)e=i[t],this.form_field.stopObserving(e);return this.container.stopObserving(),this.search_results.stopObserving(),this.search_field.stopObserving(),null!=this.form_field_label&&this.form_field_label.stopObserving(),this.is_multiple?(this.search_choices.stopObserving(),this.container.select(".search-choice-close").each(function(e){return e.stopObserving()})):this.selected_item.stopObserving(),this.search_field.tabIndex&&(this.form_field.tabIndex=this.search_field.tabIndex),this.container.remove(),this.form_field.show()},r.prototype.search_field_disabled=function(){var e;return this.is_disabled=this.form_field.disabled||(null!=(e=this.form_field.up("fieldset"))?e.disabled:void 0)||!1,this.is_disabled?this.container.addClassName("chosen-disabled"):this.container.removeClassName("chosen-disabled"),this.search_field.disabled=this.is_disabled,this.is_multiple||this.selected_item.stopObserving("focus",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.observe("focus",this.activate_field)},r.prototype.container_mousedown=function(e){var t;if(!this.is_disabled)return!e||"mousedown"!==(t=e.type)&&"touchstart"!==t||this.results_showing||e.preventDefault(),null!=e&&e.target.hasClassName("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||e.target!==this.selected_item&&!e.target.up("a.chosen-single")||this.results_toggle():(this.is_multiple&&this.search_field.clear(),this.container.ownerDocument.observe("click",this.click_test_action),this.results_show()),this.activate_field())},r.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled)return this.results_reset(e)},r.prototype.search_results_mousewheel=function(e){var t;if(null!=(t=e.deltaY||-e.wheelDelta||e.detail))return e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop=t+this.search_results.scrollTop},r.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClassName("chosen-container-active"))return this.close_field()},r.prototype.close_field=function(){return this.container.ownerDocument.stopObserving("click",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClassName("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},r.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClassName("chosen-container-active"),this.active_field=!0,this.search_field.value=this.get_search_field_value(),this.search_field.focus()},r.prototype.test_active_click=function(e){return e.target.up(".chosen-container")===this.container?this.active_field=!0:this.close_field()},r.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=t.select_to_array(this.form_field),this.is_multiple?this.search_choices.select("li.search-choice").invoke("remove"):(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field.readOnly=!0,this.container.addClassName("chosen-container-single-nosearch")):(this.search_field.readOnly=!1,this.container.removeClassName("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},r.prototype.result_do_highlight=function(e){var t,s,i,r,n;return this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClassName("highlighted"),i=parseInt(this.search_results.getStyle("maxHeight"),10),n=this.search_results.scrollTop,r=i+n,s=this.result_highlight.positionedOffset().top,(t=s+this.result_highlight.getHeight())>=r?this.search_results.scrollTop=t-i>0?t-i:0:s<n?this.search_results.scrollTop=s:void 0},r.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClassName("highlighted"),this.result_highlight=null},r.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field.fire("chosen:maxselected",{chosen:this}),!1):(this.container.addClassName("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.value=this.get_search_field_value(),this.winnow_results(),this.form_field.fire("chosen:showing_dropdown",{chosen:this}))},r.prototype.update_results_content=function(e){return this.search_results.update(e)},r.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClassName("chosen-with-drop"),this.form_field.fire("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},r.prototype.set_tab_index=function(e){var t;if(this.form_field.tabIndex)return t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field.tabIndex=t},r.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field.up("label"),null==this.form_field_label&&(this.form_field_label=$$("label[for='"+this.form_field.id+"']").first()),null!=this.form_field_label)return this.form_field_label.observe("click",this.label_click_handler)},r.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.value=this.default_text,this.search_field.addClassName("default")):(this.search_field.value="",this.search_field.removeClassName("default"))},r.prototype.search_results_mouseup=function(e){var t;if(t=e.target.hasClassName("active-result")?e.target:e.target.up(".active-result"))return this.result_highlight=t,this.result_select(e),this.search_field.focus()},r.prototype.search_results_mouseover=function(e){var t;if(t=e.target.hasClassName("active-result")?e.target:e.target.up(".active-result"))return this.result_do_highlight(t)},r.prototype.search_results_mouseout=function(e){if(e.target.hasClassName("active-result")||e.target.up(".active-result"))return this.result_clear_highlight()},r.prototype.choice_build=function(e){var t,s;return t=new Element("li",{class:"search-choice"}).update("<span>"+this.choice_label(e)+"</span>"),e.disabled?t.addClassName("search-choice-disabled"):((s=new Element("a",{href:"#",class:"search-choice-close",rel:e.array_index})).observe("click",function(e){return function(t){return e.choice_destroy_link_click(t)}}(this)),t.insert(s)),this.search_container.insert({before:t})},r.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(e.target)},r.prototype.choice_destroy=function(e){if(this.result_deselect(e.readAttribute("rel")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),e.up("li").remove(),this.search_field_scale()},r.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},r.prototype.results_reset_cleanup=function(){var e;if(this.current_selectedIndex=this.form_field.selectedIndex,e=this.selected_item.down("abbr"))return e.remove()},r.prototype.result_select=function(e){var t,s;if(this.result_highlight)return t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field.fire("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClassName("active-result"):this.reset_single_select_options(),t.addClassName("result-selected"),s=this.results_data[t.getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||e.metaKey||e.ctrlKey)?e.metaKey||e.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.value="",this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change(),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())},r.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClassName("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClassName("chosen-default")),this.selected_item.down("span").update(e)},r.prototype.result_deselect=function(e){var t;return t=this.results_data[e],!this.form_field.options[t.options_index].disabled&&(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change(),this.search_field_scale(),!0)},r.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.down("abbr")||this.selected_item.down("span").insert({after:'<abbr class="search-choice-close"></abbr>'}),this.selected_item.addClassName("chosen-single-with-deselect")},r.prototype.get_search_field_value=function(){return this.search_field.value},r.prototype.get_search_text=function(){return this.get_search_field_value().strip()},r.prototype.escape_html=function(e){return e.escapeHTML()},r.prototype.winnow_results_set_highlight=function(){var e;if(this.is_multiple||(e=this.search_results.down(".result-selected.active-result")),null==e&&(e=this.search_results.down(".active-result")),null!=e)return this.result_do_highlight(e)},r.prototype.no_results=function(e){return this.search_results.insert(this.get_no_results_html(e)),this.form_field.fire("chosen:no_results",{chosen:this})},r.prototype.no_results_clear=function(){var e,t;for(e=null,t=[];e=this.search_results.down(".no-results");)t.push(e.remove());return t},r.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.next(".active-result"))?this.result_do_highlight(e):void 0:this.results_show()},r.prototype.keyup_arrow=function(){var e,t,s;return this.results_showing||this.is_multiple?this.result_highlight?(s=this.result_highlight.previousSiblings(),e=this.search_results.select("li.active-result"),(t=s.intersect(e)).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},r.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.down("a")),this.clear_backstroke()):(e=this.search_container.siblings().last())&&e.hasClassName("search-choice")&&!e.hasClassName("search-choice-disabled")?(this.pending_backstroke=e,this.pending_backstroke&&this.pending_backstroke.addClassName("search-choice-focus"),this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClassName("search-choice-focus")):void 0},r.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClassName("search-choice-focus"),this.pending_backstroke=null},r.prototype.search_field_scale=function(){var e,t,s,i,r,n,o,l;if(this.is_multiple){for(n={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)n[r=o[s]]=this.search_field.getStyle(r);return(t=new Element("div").update(this.escape_html(this.get_search_field_value()))).setStyle(n),document.body.appendChild(t),l=t.measure("width")+25,t.remove(),(e=this.container.getWidth())&&(l=Math.min(e-10,l)),this.search_field.setStyle({width:l+"px"})}},r.prototype.trigger_form_field_change=function(){return n(this.form_field,"input"),n(this.form_field,"change")},n=function(e,t){var s;if(e.dispatchEvent){try{s=new Event(t,{bubbles:!0,cancelable:!0})}catch(e){(s=document.createEvent("HTMLEvents")).initEvent(t,!0,!0)}return e.dispatchEvent(s)}return e.fireEvent("on"+t,document.createEventObject())},r}()}).call(this);
 
 
 
assets/css/chosen-sprite.png DELETED
Binary file
assets/css/chosen.css DELETED
@@ -1,438 +0,0 @@
1
- .w3eden .chosen-select {
2
- width: 100%;
3
- }
4
- .w3eden .chosen-select-deselect {
5
- width: 100%;
6
- }
7
- .w3eden .chosen-container {
8
- display: inline-block;
9
- font-size: 12px;
10
- position: relative;
11
- vertical-align: middle;
12
- min-width: 100px;
13
- }
14
- .w3eden .chosen-container .chosen-drop {
15
- background: #fff;
16
- border: 1px solid var(--color-primary);
17
- border-top: 0;
18
- border-bottom-right-radius: 3px;
19
- border-bottom-left-radius: 3px;
20
- -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
21
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
22
- margin-top: -2px;
23
- position: absolute;
24
- top: 100%;
25
- left: -9000px;
26
- z-index: 1060;
27
- min-width: 100px;
28
- padding: 0 !important;
29
- }
30
- .w3eden .chosen-container.chosen-with-drop .chosen-drop {
31
- left: 0;
32
- right: 0;
33
- }
34
- .w3eden .chosen-container .chosen-results {
35
- color: #555555;
36
- margin: 0 !important;
37
- max-height: 240px;
38
- padding: 0 !important;
39
- position: relative;
40
- overflow-x: hidden;
41
- overflow-y: auto;
42
- -webkit-overflow-scrolling: touch;
43
- }
44
- .w3eden .chosen-container .chosen-results li {
45
- display: none;
46
- line-height: 32px !important;
47
- list-style: none;
48
- margin: 0;
49
- padding: 0 10px !important;
50
- }
51
- .w3eden .chosen-container .chosen-results li em {
52
- background: #feffde;
53
- font-style: normal;
54
- }
55
- .w3eden .chosen-container .chosen-results li.group-result {
56
- display: list-item;
57
- cursor: default;
58
- color: #999;
59
- font-weight: bold;
60
- }
61
- .w3eden .chosen-container .chosen-results li.group-option {
62
- padding-left: 15px;
63
- }
64
- .w3eden .chosen-container .chosen-results li.active-result {
65
- cursor: pointer;
66
- display: list-item;
67
- }
68
- .w3eden .chosen-container .chosen-results li.highlighted {
69
- background-color: var(--color-primary);
70
- background-image: none;
71
- color: white;
72
- }
73
- .w3eden .chosen-container .chosen-results li.highlighted em {
74
- background: transparent;
75
- }
76
- .w3eden .chosen-container .chosen-results li.disabled-result {
77
- display: list-item;
78
- color: #777777;
79
- }
80
- .w3eden .chosen-container .chosen-results .no-results {
81
- background: #eeeeee;
82
- display: list-item;
83
- }
84
- .w3eden .chosen-container .chosen-results-scroll {
85
- background: white;
86
- margin: 0 4px;
87
- position: absolute;
88
- text-align: center;
89
- width: 321px;
90
- z-index: 1;
91
- }
92
- .w3eden .chosen-container .chosen-results-scroll span {
93
- display: inline-block;
94
- height: 1.42857;
95
- text-indent: -5000px;
96
- width: 9px;
97
- }
98
- .w3eden .chosen-container .chosen-results-scroll-down {
99
- bottom: 0;
100
- }
101
- .w3eden .chosen-container .chosen-results-scroll-down span {
102
- background: url("chosen-sprite.png") no-repeat -4px -3px;
103
- }
104
- .w3eden .chosen-container .chosen-results-scroll-up span {
105
- background: url("chosen-sprite.png") no-repeat -22px -3px;
106
- }
107
- .w3eden .chosen-container-single .chosen-single {
108
- background-color: #fff;
109
- cursor: pointer;
110
- -webkit-background-clip: padding-box;
111
- -moz-background-clip: padding;
112
- background-clip: padding-box;
113
- border: 1px solid #d5d5d5;
114
- border-top-right-radius: 3px;
115
- border-top-left-radius: 3px;
116
- border-bottom-right-radius: 3px;
117
- border-bottom-left-radius: 3px;
118
- /*
119
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
120
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
121
- */
122
-
123
- color: #555555;
124
- display: block;
125
- height: 34px;
126
- overflow: hidden;
127
- line-height: 32px;
128
- padding: 0 0 0 8px;
129
- position: relative;
130
- text-decoration: none;
131
- white-space: nowrap;
132
- }
133
- .w3eden .chosen-container-single .chosen-single span {
134
- display: block;
135
- margin-right: 26px;
136
- overflow: hidden;
137
- text-overflow: ellipsis;
138
- white-space: nowrap;
139
- }
140
- .w3eden .chosen-container-single .chosen-single abbr {
141
- background: url("chosen-sprite.png") right top no-repeat;
142
- display: block;
143
- font-size: 1px;
144
- height: 10px;
145
- position: absolute;
146
- right: 26px;
147
- top: 12px;
148
- width: 12px;
149
- }
150
- .w3eden .chosen-container-single .chosen-single abbr:hover {
151
- background-position: right -11px;
152
- }
153
- .w3eden .chosen-container-single .chosen-single.chosen-disabled .chosen-single abbr:hover {
154
- background-position: right 2px;
155
- }
156
- .w3eden .chosen-container-single .chosen-single div {
157
- display: block;
158
- height: 100%;
159
- position: absolute;
160
- top: 0;
161
- right: 0;
162
- width: 18px;
163
- }
164
- .w3eden .chosen-container-single .chosen-single div b {
165
- background: transparent;
166
- display: block;
167
- height: 100%;
168
- width: 100%;
169
- }
170
- .w3eden .chosen-container-single .chosen-default {
171
- color: #777777;
172
- }
173
- .w3eden .chosen-container-single .chosen-search {
174
- margin: 0;
175
- padding: 3px 4px;
176
- position: relative;
177
- white-space: nowrap;
178
- z-index: 1000;
179
- }
180
- .w3eden .chosen-container-single .chosen-search input[type="text"] {
181
- background: #fff;
182
- border: 1px solid #dddddd;
183
- border-radius: 2px;
184
- box-shadow: none !important;
185
- margin: 1px 0;
186
- padding: 4px 20px 4px 4px;
187
- width: 100%;
188
- }
189
- .w3eden .chosen-container-single .chosen-drop {
190
- margin-top: -2px;
191
- border-bottom-right-radius: 4px;
192
- border-bottom-left-radius: 4px;
193
- -webkit-background-clip: padding-box;
194
- -moz-background-clip: padding;
195
- background-clip: padding-box;
196
- }
197
- .w3eden .chosen-container-single-nosearch .chosen-search input[type="text"] {
198
- position: absolute;
199
- left: -9000px;
200
- }
201
- .w3eden .chosen-container-multi .chosen-choices {
202
- background-color: #fff;
203
- border: 1px solid #d5d5d5;
204
- border-top-right-radius: 4px;
205
- border-top-left-radius: 4px;
206
- border-bottom-right-radius: 4px;
207
- border-bottom-left-radius: 4px;
208
- /*
209
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
210
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
211
- */
212
-
213
- cursor: text;
214
- height: auto !important;
215
- height: 1%;
216
- margin: 0;
217
- overflow: hidden;
218
- padding: 0;
219
- position: relative;
220
- }
221
- .w3eden .chosen-container-multi .chosen-choices li {
222
- float: left;
223
- list-style: none;
224
- }
225
- .w3eden .chosen-container-multi .chosen-choices .search-field {
226
- margin: 0;
227
- padding: 0;
228
- white-space: nowrap;
229
- }
230
- .w3eden .chosen-container-multi .chosen-choices .search-field input[type="text"] {
231
- background: transparent !important;
232
- border: 0 !important;
233
- -webkit-box-shadow: none;
234
- box-shadow: none;
235
- color: #555555;
236
- height: 32px;
237
- margin: 0;
238
- padding: 4px;
239
- outline: 0;
240
- }
241
- .w3eden .chosen-container-multi .chosen-choices .search-field .default {
242
- margin-left: 6px !important;
243
- color: #999;
244
- }
245
- .w3eden .chosen-container-multi .chosen-choices .search-choice {
246
- -webkit-background-clip: padding-box;
247
- -moz-background-clip: padding;
248
- background-clip: padding-box;
249
- background-color: #fafafa;
250
- border: 1px solid #d5d5d5;
251
- border-radius: 2px;
252
- background-repeat: repeat-x;
253
- color: #333333;
254
- cursor: default;
255
- line-height: 8px;
256
- font-size: 10px;
257
- margin: 6px 0 6px 6px;
258
- padding: 5px 25px 5px 8px;
259
- position: relative;
260
- }
261
- .w3eden .search-choice-close:after {
262
- content: "&times;";
263
- position: absolute;
264
- }
265
- .w3eden .chosen-container-multi .chosen-choices .search-choice .search-choice-close {
266
- background: url("chosen-sprite.png") right top no-repeat;
267
- display: block;
268
- font-size: 1px;
269
- height: 10px;
270
- position: absolute;
271
- right: 4px;
272
- top: 5px;
273
- width: 12px;
274
- cursor: pointer;
275
- }
276
- .w3eden .chosen-container-multi .chosen-choices .search-choice .search-choice-close:hover {
277
- background-position: right -11px;
278
- }
279
- .w3eden .chosen-container-multi .chosen-choices .search-choice-focus {
280
- background: #d4d4d4;
281
- }
282
- .w3eden .chosen-container-multi .chosen-choices .search-choice-focus .search-choice-close {
283
- background-position: right -11px;
284
- }
285
- .w3eden .chosen-container-multi .chosen-results {
286
- margin: 0 0 0 0;
287
- padding: 0;
288
- }
289
- .w3eden .chosen-container-multi .chosen-drop .result-selected {
290
- display: none;
291
- }
292
- .w3eden .chosen-container-active .chosen-single {
293
- border: 1px solid var(--color-primary);
294
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 2px rgba(var(--color-primary-rgb), 0.2);
295
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
296
- -o-transition: border linear 0.2s, box-shadow linear 0.2s;
297
- transition: border linear 0.2s, box-shadow linear 0.2s;
298
- }
299
- .w3eden .chosen-container-active.chosen-with-drop .chosen-single {
300
- background-color: #fff;
301
- border: 1px solid var(--color-primary);
302
- border-bottom-right-radius: 0;
303
- border-bottom-left-radius: 0;
304
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 2px rgba(var(--color-primary-rgb), 0.2);
305
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
306
- -o-transition: border linear 0.2s, box-shadow linear 0.2s;
307
- transition: border linear 0.2s, box-shadow linear 0.2s;
308
- }
309
- .w3eden .chosen-container-active.chosen-with-drop .chosen-single div {
310
- background: transparent;
311
- border-left: none;
312
- }
313
- .w3eden .chosen-container-active.chosen-with-drop .chosen-single div b {
314
- background-position: -18px 7px;
315
- }
316
- .w3eden .chosen-container-active .chosen-choices {
317
- border: 1px solid var(--color-primary);
318
- border-bottom-right-radius: 0;
319
- border-bottom-left-radius: 0;
320
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 2px rgba(var(--color-primary-rgb), 0.2);
321
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
322
- -o-transition: border linear 0.2s, box-shadow linear 0.2s;
323
- transition: border linear 0.2s, box-shadow linear 0.2s;
324
- }
325
- .w3eden .chosen-container-active .chosen-choices .search-field input[type="text"] {
326
- color: #111 !important;
327
- }
328
- .w3eden .chosen-container-active.chosen-with-drop .chosen-choices {
329
- border-bottom-right-radius: 0;
330
- border-bottom-left-radius: 0;
331
- }
332
- .w3eden .chosen-disabled {
333
- cursor: default;
334
- opacity: 0.5 !important;
335
- }
336
- .w3eden .chosen-disabled .chosen-single {
337
- cursor: default;
338
- }
339
- .w3eden .chosen-disabled .chosen-choices .search-choice .search-choice-close {
340
- cursor: default;
341
- }
342
- .w3eden .chosen-rtl {
343
- text-align: right;
344
- }
345
- .w3eden .chosen-rtl .chosen-single {
346
- padding: 0 8px 0 0;
347
- overflow: visible;
348
- }
349
- .w3eden .chosen-rtl .chosen-single span {
350
- margin-left: 26px;
351
- margin-right: 0;
352
- direction: rtl;
353
- }
354
- .w3eden .chosen-rtl .chosen-single div {
355
- left: 7px;
356
- right: auto;
357
- }
358
- .w3eden .chosen-rtl .chosen-single abbr {
359
- left: 26px;
360
- right: auto;
361
- }
362
- .w3eden .chosen-rtl .chosen-choices .search-field input[type="text"] {
363
- direction: rtl;
364
- }
365
- .w3eden .chosen-rtl .chosen-choices li {
366
- float: right;
367
- }
368
- .w3eden .chosen-rtl .chosen-choices .search-choice {
369
- margin: 6px 5px 3px 0;
370
- padding: 3px 5px 3px 19px;
371
- }
372
- .w3eden .chosen-rtl .chosen-choices .search-choice .search-choice-close {
373
- background-position: right top;
374
- left: 4px;
375
- right: auto;
376
- }
377
- .w3eden .chosen-rtl.chosen-container-single .chosen-results {
378
- margin: 0 0 4px 4px;
379
- padding: 0 4px 0 0;
380
- }
381
- .w3eden .chosen-rtl .chosen-results .group-option {
382
- padding-left: 0;
383
- padding-right: 15px;
384
- }
385
- .w3eden .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
386
- border-right: none;
387
- }
388
- .w3eden .chosen-rtl .chosen-search input[type="text"] {
389
- background: url("chosen-sprite.png") no-repeat -28px -20px, #ffffff;
390
- direction: rtl;
391
- padding: 4px 5px 4px 20px;
392
- }
393
- @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 2dppx) {
394
- .w3eden .chosen-rtl .chosen-search input[type="text"],
395
- .w3eden .chosen-container-single .chosen-single abbr,
396
- .w3eden .chosen-container-single .chosen-single div b,
397
- .w3eden .chosen-container-single .chosen-search input[type="text"],
398
- .w3eden .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
399
- .w3eden .chosen-container .chosen-results-scroll-down span,
400
- .w3eden .chosen-container .chosen-results-scroll-up span {
401
- background: transparent;
402
- background-size: 52px 37px !important;
403
- background-repeat: no-repeat !important;
404
- }
405
- }
406
- .w3eden .search-choice-close:after {
407
- color: #aaaaaa;
408
- content: "\f057";
409
- font-family: "Font Awesome\ 5 Free";
410
- font-size: 8pt;
411
- height: 10px !important;
412
- left: 2px;
413
- position: absolute;
414
- top: 0px;
415
- width: 10px !important;
416
- }
417
- .w3eden .search-choice-close:hover:after {
418
- color: rgba(204, 34, 61, 0.86);
419
- }
420
- .w3eden .chosen-container-single .chosen-single div b:after {
421
- content: "\f0dc";
422
- font-family: "Font Awesome\ 5 Free";
423
- font-size: 9pt;
424
- height: 10px !important;
425
- left: -2px;
426
- position: absolute;
427
- top: 0px;
428
- width: 10px !important;
429
- }
430
- .w3eden .chosen-container-single:hover .chosen-single div b:after,
431
- .w3eden .chosen-container-single.chosen-with-drop .chosen-single div b:after {
432
- color: var(--color-primary);
433
- }
434
- .w3eden .chosen-container-single.chosen-with-drop .chosen-single,
435
- .w3eden .chosen-container-single .chosen-single:hover {
436
- text-decoration: none;
437
- color: var(--color-primary) !important;
438
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/select2-spinner.gif DELETED
Binary file
assets/css/select2.css DELETED
@@ -1,615 +0,0 @@
1
- /*
2
- Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
3
- */
4
- .select2-container {
5
- margin: 0;
6
- position: relative;
7
- display: inline-block;
8
- /* inline-block for ie7 */
9
- zoom: 1;
10
- *display: inline;
11
- vertical-align: middle;
12
- }
13
-
14
- .select2-container,
15
- .select2-drop,
16
- .select2-search,
17
- .select2-search input {
18
- /*
19
- Force border-box so that % widths fit the parent
20
- container without overlap because of margin/padding.
21
-
22
- More Info : http://www.quirksmode.org/css/box.html
23
- */
24
- -webkit-box-sizing: border-box; /* webkit */
25
- -moz-box-sizing: border-box; /* firefox */
26
- box-sizing: border-box; /* css3 */
27
- }
28
-
29
- .select2-container .select2-choice {
30
- display: block;
31
- height: 26px;
32
- padding: 0 0 0 8px;
33
- overflow: hidden;
34
- position: relative;
35
-
36
- border: 1px solid #aaa;
37
- white-space: nowrap;
38
- line-height: 26px;
39
- color: #444;
40
- text-decoration: none;
41
-
42
- border-radius: 4px;
43
-
44
- background-clip: padding-box;
45
-
46
- -webkit-touch-callout: none;
47
- -webkit-user-select: none;
48
- -moz-user-select: none;
49
- -ms-user-select: none;
50
- user-select: none;
51
-
52
- background-color: #fff;
53
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff));
54
- background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);
55
- background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%);
56
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
57
- background-image: linear-gradient(top, #fff 0%, #eee 50%);
58
- }
59
-
60
- .select2-container.select2-drop-above .select2-choice {
61
- border-bottom-color: #aaa;
62
-
63
- border-radius: 0 0 4px 4px;
64
-
65
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff));
66
- background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%);
67
- background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%);
68
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
69
- background-image: linear-gradient(top, #eee 0%, #fff 90%);
70
- }
71
-
72
- .select2-container.select2-allowclear .select2-choice .select2-chosen {
73
- margin-right: 42px;
74
- }
75
-
76
- .select2-container .select2-choice > .select2-chosen {
77
- margin-right: 26px;
78
- display: block;
79
- overflow: hidden;
80
-
81
- white-space: nowrap;
82
-
83
- text-overflow: ellipsis;
84
- }
85
-
86
- .select2-container .select2-choice abbr {
87
- display: none;
88
- width: 12px;
89
- height: 12px;
90
- position: absolute;
91
- right: 24px;
92
- top: 8px;
93
-
94
- font-size: 1px;
95
- text-decoration: none;
96
-
97
- border: 0;
98
- background: url('chosen-sprite.png') right top no-repeat;
99
- cursor: pointer;
100
- outline: 0;
101
- }
102
-
103
- .select2-container.select2-allowclear .select2-choice abbr {
104
- display: inline-block;
105
- }
106
-
107
- .select2-container .select2-choice abbr:hover {
108
- background-position: right -11px;
109
- cursor: pointer;
110
- }
111
-
112
- .select2-drop-mask {
113
- border: 0;
114
- margin: 0;
115
- padding: 0;
116
- position: fixed;
117
- left: 0;
118
- top: 0;
119
- min-height: 100%;
120
- min-width: 100%;
121
- height: auto;
122
- width: auto;
123
- opacity: 0;
124
- z-index: 9998;
125
- /* styles required for IE to work */
126
- background-color: #fff;
127
- filter: alpha(opacity=0);
128
- }
129
-
130
- .select2-drop {
131
- width: 100%;
132
- margin-top: -1px;
133
- position: absolute;
134
- z-index: 9999;
135
- top: 100%;
136
-
137
- background: #fff;
138
- color: #000;
139
- border: 1px solid #aaa;
140
- border-top: 0;
141
-
142
- border-radius: 0 0 4px 4px;
143
-
144
- -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
145
- box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
146
- }
147
-
148
- .select2-drop-auto-width {
149
- border-top: 1px solid #aaa;
150
- width: auto;
151
- }
152
-
153
- .select2-drop-auto-width .select2-search {
154
- padding-top: 4px;
155
- }
156
-
157
- .select2-drop.select2-drop-above {
158
- margin-top: 1px;
159
- border-top: 1px solid #aaa;
160
- border-bottom: 0;
161
-
162
- border-radius: 4px 4px 0 0;
163
-
164
- -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
165
- box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
166
- }
167
-
168
- .select2-drop-active {
169
- border: 1px solid #5897fb;
170
- border-top: none;
171
- }
172
-
173
- .select2-drop.select2-drop-above.select2-drop-active {
174
- border-top: 1px solid #5897fb;
175
- }
176
-
177
- .select2-container .select2-choice .select2-arrow {
178
- display: inline-block;
179
- width: 18px;
180
- height: 100%;
181
- position: absolute;
182
- right: 0;
183
- top: 0;
184
-
185
- border-left: 1px solid #aaa;
186
- border-radius: 0 4px 4px 0;
187
-
188
- background-clip: padding-box;
189
-
190
- background: #ccc;
191
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
192
- background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
193
- background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
194
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
195
- background-image: linear-gradient(top, #ccc 0%, #eee 60%);
196
- }
197
-
198
- .select2-container .select2-choice .select2-arrow b {
199
- display: block;
200
- width: 100%;
201
- height: 100%;
202
- background: url('chosen-sprite.png') no-repeat 0 1px;
203
- }
204
-
205
- .select2-search {
206
- display: inline-block;
207
- width: 100%;
208
- min-height: 26px;
209
- margin: 0;
210
- padding-left: 4px;
211
- padding-right: 4px;
212
-
213
- position: relative;
214
- z-index: 10000;
215
-
216
- white-space: nowrap;
217
- }
218
-
219
- .select2-search input {
220
- width: 100%;
221
- height: auto !important;
222
- min-height: 26px;
223
- padding: 4px 20px 4px 5px;
224
- margin: 0;
225
-
226
- outline: 0;
227
- font-family: sans-serif;
228
- font-size: 1em;
229
-
230
- border: 1px solid #aaa;
231
- border-radius: 0;
232
-
233
- -webkit-box-shadow: none;
234
- box-shadow: none;
235
-
236
- background: #fff url('chosen-sprite.png') no-repeat 100% -22px;
237
- background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
238
- background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
239
- background: url('chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
240
- background: url('chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #fff 85%, #eee 99%);
241
- }
242
-
243
- .select2-drop.select2-drop-above .select2-search input {
244
- margin-top: 4px;
245
- }
246
-
247
- .select2-search input.select2-active {
248
- background: #fff url('select2-spinner.gif') no-repeat 100%;
249
- background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
250
- background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
251
- background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
252
- background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(top, #fff 85%, #eee 99%);
253
- }
254
-
255
- .select2-container-active .select2-choice,
256
- .select2-container-active .select2-choices {
257
- border: 1px solid #5897fb;
258
- outline: none;
259
-
260
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
261
- box-shadow: 0 0 5px rgba(0, 0, 0, .3);
262
- }
263
-
264
- .select2-dropdown-open .select2-choice {
265
- border-bottom-color: transparent;
266
- -webkit-box-shadow: 0 1px 0 #fff inset;
267
- box-shadow: 0 1px 0 #fff inset;
268
-
269
- border-bottom-left-radius: 0;
270
- border-bottom-right-radius: 0;
271
-
272
- background-color: #eee;
273
- background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee));
274
- background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%);
275
- background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%);
276
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
277
- background-image: linear-gradient(top, #fff 0%, #eee 50%);
278
- }
279
-
280
- .select2-dropdown-open.select2-drop-above .select2-choice,
281
- .select2-dropdown-open.select2-drop-above .select2-choices {
282
- border: 1px solid #5897fb;
283
- border-top-color: transparent;
284
-
285
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee));
286
- background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%);
287
- background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%);
288
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
289
- background-image: linear-gradient(bottom, #fff 0%, #eee 50%);
290
- }
291
-
292
- .select2-dropdown-open .select2-choice .select2-arrow {
293
- background: transparent;
294
- border-left: none;
295
- filter: none;
296
- }
297
- .select2-dropdown-open .select2-choice .select2-arrow b {
298
- background-position: -18px 1px;
299
- }
300
-
301
- /* results */
302
- .select2-results {
303
- max-height: 200px;
304
- padding: 0 0 0 4px;
305
- margin: 4px 4px 4px 0;
306
- position: relative;
307
- overflow-x: hidden;
308
- overflow-y: auto;
309
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
310
- }
311
-
312
- .select2-results ul.select2-result-sub {
313
- margin: 0;
314
- padding-left: 0;
315
- }
316
-
317
- .select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
318
- .select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 40px }
319
- .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 60px }
320
- .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 80px }
321
- .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 100px }
322
- .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 110px }
323
- .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px }
324
-
325
- .select2-results li {
326
- list-style: none;
327
- display: list-item;
328
- background-image: none;
329
- }
330
-
331
- .select2-results li.select2-result-with-children > .select2-result-label {
332
- font-weight: bold;
333
- }
334
-
335
- .select2-results .select2-result-label {
336
- padding: 3px 7px 4px;
337
- margin: 0;
338
- cursor: pointer;
339
-
340
- min-height: 1em;
341
-
342
- -webkit-touch-callout: none;
343
- -webkit-user-select: none;
344
- -moz-user-select: none;
345
- -ms-user-select: none;
346
- user-select: none;
347
- }
348
-
349
- .select2-results .select2-highlighted {
350
- background: #3875d7;
351
- color: #fff;
352
- }
353
-
354
- .select2-results li em {
355
- background: #feffde;
356
- font-style: normal;
357
- }
358
-
359
- .select2-results .select2-highlighted em {
360
- background: transparent;
361
- }
362
-
363
- .select2-results .select2-highlighted ul {
364
- background: #fff;
365
- color: #000;
366
- }
367
-
368
-
369
- .select2-results .select2-no-results,
370
- .select2-results .select2-searching,
371
- .select2-results .select2-selection-limit {
372
- background: #f4f4f4;
373
- display: list-item;
374
- }
375
-
376
- /*
377
- disabled look for disabled choices in the results dropdown
378
- */
379
- .select2-results .select2-disabled.select2-highlighted {
380
- color: #666;
381
- background: #f4f4f4;
382
- display: list-item;
383
- cursor: default;
384
- }
385
- .select2-results .select2-disabled {
386
- background: #f4f4f4;
387
- display: list-item;
388
- cursor: default;
389
- }
390
-
391
- .select2-results .select2-selected {
392
- display: none;
393
- }
394
-
395
- .select2-more-results.select2-active {
396
- background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%;
397
- }
398
-
399
- .select2-more-results {
400
- background: #f4f4f4;
401
- display: list-item;
402
- }
403
-
404
- /* disabled styles */
405
-
406
- .select2-container.select2-container-disabled .select2-choice {
407
- background-color: #f4f4f4;
408
- background-image: none;
409
- border: 1px solid #ddd;
410
- cursor: default;
411
- }
412
-
413
- .select2-container.select2-container-disabled .select2-choice .select2-arrow {
414
- background-color: #f4f4f4;
415
- background-image: none;
416
- border-left: 0;
417
- }
418
-
419
- .select2-container.select2-container-disabled .select2-choice abbr {
420
- display: none;
421
- }
422
-
423
-
424
- /* multiselect */
425
-
426
- .select2-container-multi .select2-choices {
427
- height: auto !important;
428
- height: 1%;
429
- margin: 0;
430
- padding: 0;
431
- position: relative;
432
-
433
- border: 1px solid #aaa;
434
- cursor: text;
435
- overflow: hidden;
436
-
437
- background-color: #fff;
438
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff));
439
- background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%);
440
- background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%);
441
- background-image: linear-gradient(top, #eee 1%, #fff 15%);
442
- }
443
-
444
- .select2-locked {
445
- padding: 3px 5px 3px 5px !important;
446
- }
447
-
448
- .select2-container-multi .select2-choices {
449
- min-height: 26px;
450
- }
451
-
452
- .select2-container-multi.select2-container-active .select2-choices {
453
- border: 1px solid #5897fb;
454
- outline: none;
455
-
456
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
457
- box-shadow: 0 0 5px rgba(0, 0, 0, .3);
458
- }
459
- .select2-container-multi .select2-choices li {
460
- float: left;
461
- list-style: none;
462
- }
463
- .select2-container-multi .select2-choices .select2-search-field {
464
- margin: 0;
465
- padding: 0;
466
- white-space: nowrap;
467
- }
468
-
469
- .select2-container-multi .select2-choices .select2-search-field input {
470
- padding: 5px;
471
- margin: 1px 0;
472
-
473
- font-family: sans-serif;
474
- font-size: 100%;
475
- color: #666;
476
- outline: 0;
477
- border: 0;
478
- -webkit-box-shadow: none;
479
- box-shadow: none;
480
- background: transparent !important;
481
- }
482
-
483
- .select2-container-multi .select2-choices .select2-search-field input.select2-active {
484
- background: #fff url('select2-spinner.gif') no-repeat 100% !important;
485
- }
486
-
487
- .select2-default {
488
- color: #999 !important;
489
- }
490
-
491
- .select2-container-multi .select2-choices .select2-search-choice {
492
- padding: 3px 5px 3px 18px;
493
- margin: 3px 0 3px 5px;
494
- position: relative;
495
-
496
- line-height: 13px;
497
- color: #333;
498
- cursor: default;
499
- border: 1px solid #aaaaaa;
500
-
501
- border-radius: 3px;
502
-
503
- -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
504
- box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
505
-
506
- background-clip: padding-box;
507
-
508
- -webkit-touch-callout: none;
509
- -webkit-user-select: none;
510
- -moz-user-select: none;
511
- -ms-user-select: none;
512
- user-select: none;
513
-
514
- background-color: #e4e4e4;
515
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0);
516
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee));
517
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
518
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
519
- background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
520
- }
521
- .select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
522
- cursor: default;
523
- }
524
- .select2-container-multi .select2-choices .select2-search-choice-focus {
525
- background: #d4d4d4;
526
- }
527
-
528
- .select2-search-choice-close {
529
- display: block;
530
- width: 12px;
531
- height: 13px;
532
- position: absolute;
533
- right: 3px;
534
- top: 4px;
535
-
536
- font-size: 1px;
537
- outline: none;
538
- background: url('chosen-sprite.png') right top no-repeat;
539
- }
540
-
541
- .select2-container-multi .select2-search-choice-close {
542
- left: 3px;
543
- }
544
-
545
- .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
546
- background-position: right -11px;
547
- }
548
- .select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
549
- background-position: right -11px;
550
- }
551
-
552
- /* disabled styles */
553
- .select2-container-multi.select2-container-disabled .select2-choices {
554
- background-color: #f4f4f4;
555
- background-image: none;
556
- border: 1px solid #ddd;
557
- cursor: default;
558
- }
559
-
560
- .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
561
- padding: 3px 5px 3px 5px;
562
- border: 1px solid #ddd;
563
- background-image: none;
564
- background-color: #f4f4f4;
565
- }
566
-
567
- .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none;
568
- background: none;
569
- }
570
- /* end multiselect */
571
-
572
-
573
- .select2-result-selectable .select2-match,
574
- .select2-result-unselectable .select2-match {
575
- text-decoration: underline;
576
- }
577
-
578
- .select2-offscreen, .select2-offscreen:focus {
579
- clip: rect(0 0 0 0) !important;
580
- width: 1px !important;
581
- height: 1px !important;
582
- border: 0 !important;
583
- margin: 0 !important;
584
- padding: 0 !important;
585
- overflow: hidden !important;
586
- position: absolute !important;
587
- outline: 0 !important;
588
- left: 0px !important;
589
- top: 0px !important;
590
- }
591
-
592
- .select2-display-none {
593
- display: none;
594
- }
595
-
596
- .select2-measure-scrollbar {
597
- position: absolute;
598
- top: -10000px;
599
- left: -10000px;
600
- width: 100px;
601
- height: 100px;
602
- overflow: scroll;
603
- }
604
- /* Retina-ize icons */
605
-
606
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) {
607
- .select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice .select2-arrow b {
608
- background-image: url('select2x2.png') !important;
609
- background-repeat: no-repeat !important;
610
- background-size: 60px 40px !important;
611
- }
612
- .select2-search input {
613
- background-position: 100% -21px !important;
614
- }
615
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/select2x2.png DELETED
Binary file
assets/js/select2.min.js DELETED
@@ -1,22 +0,0 @@
1
- /*
2
- Copyright 2012 Igor Vaynberg
3
-
4
- Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
5
-
6
- This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
7
- General Public License version 2 (the "GPL License"). You may choose either license to govern your
8
- use of this software only upon the condition that you accept all of the terms of either the Apache
9
- License or the GPL License.
10
-
11
- You may obtain a copy of the Apache License and the GPL License at:
12
-
13
- http://www.apache.org/licenses/LICENSE-2.0
14
- http://www.gnu.org/licenses/gpl-2.0.html
15
-
16
- Unless required by applicable law or agreed to in writing, software distributed under the Apache License
17
- or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
18
- either express or implied. See the Apache License and the GPL License for the specific language governing
19
- permissions and limitations under the Apache License and the GPL License.
20
- */
21
- !function(a){"undefined"==typeof a.fn.each2&&a.extend(a.fn,{each2:function(b){for(var c=a([0]),d=-1,e=this.length;++d<e&&(c.context=c[0]=this[d])&&b.call(c[0],d,c)!==!1;);return this}})}(jQuery),function(a,b){"use strict";function n(a){var b,c,d,e;if(!a||a.length<1)return a;for(b="",c=0,d=a.length;d>c;c++)e=a.charAt(c),b+=m[e]||e;return b}function o(a,b){for(var c=0,d=b.length;d>c;c+=1)if(q(a,b[c]))return c;return-1}function p(){var b=a(l);b.appendTo("body");var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function q(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function r(b,c){var d,e,f;if(null===b||b.length<1)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function s(a){return a.outerWidth(!1)-a.width()}function t(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function u(c){c.on("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function v(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function w(a){var c,b=!1;return function(){return b===!1&&(c=a(),b=!0),c}}function x(a,b){var c=v(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){o(a.target,b.get())>=0&&c(a)})}function y(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus(),a.is(":visible")&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function z(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function A(a){a.preventDefault(),a.stopPropagation()}function B(a){a.preventDefault(),a.stopImmediatePropagation()}function C(b){if(!h){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);h=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),h.attr("class","select2-sizer"),a("body").append(h)}return h.text(b.val()),h.width()}function D(b,c,d){var e,g,f=[];e=b.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=c.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(g))})),b.attr("class",f.join(" "))}function E(a,b,c,d){var e=n(a.toUpperCase()).indexOf(n(b.toUpperCase())),f=b.length;return 0>e?(c.push(d(a)),void 0):(c.push(d(a.substring(0,e))),c.push("<span class='select2-match'>"),c.push(d(a.substring(e,e+f))),c.push("</span>"),c.push(d(a.substring(e+f,a.length))),void 0)}function F(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function G(c){var d,e=null,f=c.quietMillis||100,g=c.url,h=this;return function(i){window.clearTimeout(d),d=window.setTimeout(function(){var d=c.data,f=g,j=c.transport||a.fn.select2.ajaxDefaults.transport,k={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},l=a.extend({},a.fn.select2.ajaxDefaults.params,k);d=d?d.call(h,i.term,i.page,i.context):null,f="function"==typeof f?f.call(h,i.term,i.page,i.context):f,e&&e.abort(),c.params&&(a.isFunction(c.params)?a.extend(l,c.params.call(h)):a.extend(l,c.params)),a.extend(l,{url:f,dataType:c.dataType,data:d,success:function(a){var b=c.results(a,i.page);i.callback(b)}}),e=j.call(h,l)},f)}}function H(b){var d,e,c=b,f=function(a){return""+a.text};a.isArray(c)&&(e=c,c={results:e}),a.isFunction(c)===!1&&(e=c,c=function(){return e});var g=c();return g.text&&(f=g.text,a.isFunction(f)||(d=g.text,f=function(a){return a[d]})),function(b){var g,d=b.term,e={results:[]};return""===d?(b.callback(c()),void 0):(g=function(c,e){var h,i;if(c=c[0],c.children){h={};for(i in c)c.hasOwnProperty(i)&&(h[i]=c[i]);h.children=[],a(c.children).each2(function(a,b){g(b,h.children)}),(h.children.length||b.matcher(d,f(h),c))&&e.push(h)}else b.matcher(d,f(c),c)&&e.push(c)},a(c().results).each2(function(a,b){g(b,e.results)}),b.callback(e),void 0)}}function I(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]};a(d?c():c).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g)}}function J(b,c){if(a.isFunction(b))return!0;if(!b)return!1;throw new Error(c+" must be a function or a falsy value")}function K(b){return a.isFunction(b)?b():b}function L(b){var c=0;return a.each(b,function(a,b){b.children?c+=L(b.children):c++}),c}function M(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||e.tokenSeparators.length<1)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice.call(this,h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(q(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:void 0}function N(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,h,j,k,i={x:0,y:0},c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case c.SHIFT:case c.CTRL:case c.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},l="<div class='select2-measure-scrollbar'></div>",m={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z"};j=a(document),g=function(){var a=1;return function(){return a++}}(),j.on("mousemove",function(a){i.x=a.pageX,i.y=a.pageY}),d=N(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,f=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&c.element.data("select2").destroy(),this.container=this.createContainer(),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+g()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=w(function(){return c.element.closest("body")}),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",c.element.attr("style")),this.container.css(K(c.containerCss)),this.container.addClass(K(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",A),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(c.dropdownCssClass)),this.dropdown.data("select2",this),this.dropdown.on("click",A),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",A),u(this.results),this.dropdown.on("mousemove-filtered touchstart touchmove touchend",f,this.bind(this.highlightUnderEvent)),x(80,this.results),this.dropdown.on("scroll-debounced",f,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),A(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),A(a))}),t(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",f,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),k=k||p(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.nextSearchTerm=b},destroy:function(){var a=this.opts.element,c=a.data("select2");this.close(),this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),c!==b&&(c.container.remove(),c.dropdown.remove(),a.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show())},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:q(a.attr("locked"),"locked")||q(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:void 0},prepareOpts:function(c){var d,e,f,g,h=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),c=a.extend({},{populateResults:function(d,e,f){var g,i=this.opts.id;g=function(d,e,j){var k,l,m,n,o,p,q,r,s,t;for(d=c.sortResults(d,e,f),k=0,l=d.length;l>k;k+=1)m=d[k],o=m.disabled===!0,n=!o&&i(m)!==b,p=m.children&&m.children.length>0,q=a("<li></li>"),q.addClass("select2-results-dept-"+j),q.addClass("select2-result"),q.addClass(n?"select2-result-selectable":"select2-result-unselectable"),o&&q.addClass("select2-disabled"),p&&q.addClass("select2-result-with-children"),q.addClass(h.opts.formatResultCssClass(m)),r=a(document.createElement("div")),r.addClass("select2-result-label"),t=c.formatResult(m,r,f,h.opts.escapeMarkup),t!==b&&r.html(t),q.append(r),p&&(s=a("<ul></ul>"),s.addClass("select2-result-sub"),g(m.children,s,j+1),q.append(s)),q.data("select2-data",m),e.append(q)},g(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(f=c.id,c.id=function(a){return a[f]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(a){var f,g,i,c={results:[],more:!1},e=a.term;i=function(b,c){var d;b.is("option")?a.matcher(e,b.text(),b)&&c.push(h.optionToData(b)):b.is("optgroup")&&(d=h.optionToData(b),b.children().each2(function(a,b){i(b,d.children)}),d.children.length>0&&c.push(d))},f=d.children(),this.getPlaceholder()!==b&&f.length>0&&(g=this.getPlaceholderOption(),g&&(f=f.not(g))),f.each2(function(a,b){i(b,c.results)}),a.callback(c)}),c.id=function(a){return a.id},c.formatResultCssClass=function(a){return a.css}):"query"in c||("ajax"in c?(g=c.element.data("ajax-url"),g&&g.length>0&&(c.ajax.url=g),c.query=G.call(c.element,c.ajax)):"data"in c?c.query=H(c.data):"tags"in c&&(c.query=I(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(b){return{id:a.trim(b),text:a.trim(b)}}),c.initSelection===b&&(c.initSelection=function(b,d){var e=[];a(r(b.val(),c.separator)).each(function(){var b={id:this,text:this},d=c.tags;a.isFunction(d)&&(d=d()),a(d).each(function(){return q(this.id,b.id)?(b=this,!1):void 0}),e.push(b)}),d(e)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");return c},monitorSource:function(){var c,d,a=this.opts.element;a.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),c=this.bind(function(){var c=a.prop("disabled");c===b&&(c=!1),this.enable(!c);var d=a.prop("readonly");d===b&&(d=!1),this.readonly(d),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(K(this.opts.containerCssClass)),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(this.opts.dropdownCssClass))}),a.on("propertychange.select2",c),this.mutationCallback===b&&(this.mutationCallback=function(a){a.forEach(c)}),d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,d!==b&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new d(this.mutationCallback),this.propertyObserver.observe(a.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(b){var c=a.Event("select2-selecting",{val:this.id(b),object:b});return this.opts.element.trigger(c),!c.isDefaultPrevented()},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var a=this._enabled&&!this._readonly,b=!a;return a===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",b),this.close(),this.enabledInterface=a,!0)},enable:function(a){a===b&&(a=!0),this._enabled!==a&&(this._enabled=a,this.opts.element.prop("disabled",!a),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(a){return a===b&&(a=!1),this._readonly===a?!1:(this._readonly=a,this.opts.element.prop("readonly",a),this.enableInterface(),!0)},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t,u,v,w,x,b=this.dropdown,c=this.container.offset(),d=this.container.outerHeight(!1),e=this.container.outerWidth(!1),f=b.outerHeight(!1),g=a(window),h=g.width(),i=g.height(),j=g.scrollLeft()+h,l=g.scrollTop()+i,m=c.top+d,n=c.left,o=l>=m+f,p=c.top-f>=this.body().scrollTop(),q=b.outerWidth(!1),r=j>=n+q,s=b.hasClass("select2-drop-above");s?(u=!0,!p&&o&&(v=!0,u=!1)):(u=!1,!o&&p&&(v=!0,u=!0)),v&&(b.hide(),c=this.container.offset(),d=this.container.outerHeight(!1),e=this.container.outerWidth(!1),f=b.outerHeight(!1),j=g.scrollLeft()+h,l=g.scrollTop()+i,m=c.top+d,n=c.left,q=b.outerWidth(!1),r=j>=n+q,b.show()),this.opts.dropdownAutoWidth?(x=a(".select2-results",b)[0],b.addClass("select2-drop-auto-width"),b.css("width",""),q=b.outerWidth(!1)+(x.scrollHeight===x.clientHeight?0:k.width),q>e?e=q:q=e,r=j>=n+q):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body().css("position")&&(t=this.body().offset(),m-=t.top,n-=t.left),r||(n=c.left+e-q),w={left:n,width:e},u?(w.bottom=i-c.top,w.top="auto",this.container.addClass("select2-drop-above"),b.addClass("select2-drop-above")):(w.top=m,w.bottom="auto",this.container.removeClass("select2-drop-above"),b.removeClass("select2-drop-above")),w=a.extend(w,K(this.opts.dropdownCss)),b.css(w)},shouldOpen:function(){var b;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(b=a.Event("select2-opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),!0):!1},opening:function(){var f,b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),f=a("#select2-drop-mask"),0==f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body()),f.on("mousedown touchstart click",function(b){var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close({focus:!0}),b.preventDefault(),b.stopPropagation())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),f.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var g=this;this.container.parents().add(window).each(function(){a(this).on(d+" "+c+" "+e,function(){g.positionDropdown()})})},close:function(){if(this.opened()){var b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).off(c).off(d).off(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("select2-close"))}},externalSearch:function(a){this.open(),this.search.val(a),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return K(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var c,d,e,f,g,h,i,b=this.results;if(d=this.highlight(),!(0>d)){if(0==d)return b.scrollTop(0),void 0;c=this.findHighlightableChoices().find(".select2-result-label"),e=a(c[d]),f=e.offset().top+e.outerHeight(!0),d===c.length-1&&(i=b.find("li.select2-more-results"),i.length>0&&(f=i.offset().top+i.outerHeight(!0))),g=b.offset().top+b.outerHeight(!0),f>g&&b.scrollTop(b.scrollTop()+(f-g)),h=e.offset().top-b.offset().top,0>h&&"none"!=e.css("display")&&b.scrollTop(b.scrollTop()+h)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled, .select2-selected)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&d<c.length;){d+=b;var e=a(c[d]);if(e.hasClass("select2-result-selectable")&&!e.hasClass("select2-disabled")&&!e.hasClass("select2-selected")){this.highlight(d);break}}},highlight:function(b){var d,e,c=this.findHighlightableChoices();return 0===arguments.length?o(c.filter(".select2-highlighted")[0],c.get()):(b>=c.length&&(b=c.length-1),0>b&&(b=0),this.removeHighlight(),d=a(c[b]),d.addClass("select2-highlighted"),this.ensureHighlightVisible(),e=d.data("select2-data"),e&&this.opts.element.trigger({type:"select2-highlight",val:this.id(e),choice:e}),void 0)},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),d=this.resultsPage+1,e=this,f=this.search.val(),g=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),c<=this.opts.loadMorePadding&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:f,page:d,context:g,matcher:this.opts.matcher,callback:this.bind(function(c){e.opened()&&(e.opts.populateResults.call(this,a,c.results,{term:f,page:d,context:g}),e.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).text(e.opts.formatLoadMore(d+1)),window.setTimeout(function(){e.loadMoreIfNeeded()},10)):b.remove(),e.positionDropdown(),e.resultsPage=d,e.context=c.context,this.opts.element.trigger({type:"select2-loaded",items:c}))})})))},tokenize:function(){},updateResults:function(c){function m(){d.removeClass("select2-active"),h.positionDropdown()}function n(a){e.html(a),m()}var g,i,l,d=this.search,e=this.results,f=this.opts,h=this,j=d.val(),k=a.data(this.container,"select2-last-term");if((c===!0||!k||!q(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){l=++this.queryCount;var o=this.getMaximumSelectionSize();if(o>=1&&(g=this.data(),a.isArray(g)&&g.length>=o&&J(f.formatSelectionTooBig,"formatSelectionTooBig")))return n("<li class='select2-selection-limit'>"+f.formatSelectionTooBig(o)+"</li>"),void 0;if(d.val().length<f.minimumInputLength)return J(f.formatInputTooShort,"formatInputTooShort")?n("<li class='select2-no-results'>"+f.formatInputTooShort(d.val(),f.minimumInputLength)+"</li>"):n(""),c&&this.showSearch&&this.showSearch(!0),void 0;
22
- if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return J(f.formatInputTooLong,"formatInputTooLong")?n("<li class='select2-no-results'>"+f.formatInputTooLong(d.val(),f.maximumInputLength)+"</li>"):n(""),void 0;f.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+f.formatSearching()+"</li>"),d.addClass("select2-active"),this.removeHighlight(),i=this.tokenize(),i!=b&&null!=i&&d.val(i),this.resultsPage=1,f.query({element:f.element,term:d.val(),page:this.resultsPage,context:null,matcher:f.matcher,callback:this.bind(function(g){var i;if(l==this.queryCount){if(!this.opened())return this.search.removeClass("select2-active"),void 0;if(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==d.val()&&(i=this.opts.createSearchChoice.call(h,d.val(),g.results),i!==b&&null!==i&&h.id(i)!==b&&null!==h.id(i)&&0===a(g.results).filter(function(){return q(h.id(this),h.id(i))}).length&&g.results.unshift(i)),0===g.results.length&&J(f.formatNoMatches,"formatNoMatches"))return n("<li class='select2-no-results'>"+f.formatNoMatches(d.val())+"</li>"),void 0;e.empty(),h.opts.populateResults.call(this,e,g.results,{term:d.val(),page:this.resultsPage,context:null}),g.more===!0&&J(f.formatLoadMore,"formatLoadMore")&&(e.append("<li class='select2-more-results'>"+h.opts.escapeMarkup(f.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){h.loadMoreIfNeeded()},10)),this.postprocessResults(g,c),m(),this.opts.element.trigger({type:"select2-loaded",items:g})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){y(this.search)},selectHighlighted:function(a){var b=this.highlight(),c=this.results.find(".select2-highlighted"),d=c.closest(".select2-result").data("select2-data");d?(this.highlight(b),this.onSelect(d,a)):a&&a.noFocus&&this.close()},getPlaceholder:function(){var a;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((a=this.getPlaceholderOption())!==b?a.text():b)},getPlaceholderOption:function(){if(this.select){var a=this.select.children("option").first();if(this.opts.placeholderOption!==b)return"first"===this.opts.placeholderOption&&a||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===a.text()&&""===a.val())return a}},initContainerWidth:function(){function c(){var c,d,e,f,g,h;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(c=this.opts.element.attr("style"),c!==b)for(d=c.split(";"),f=0,g=d.length;g>f;f+=1)if(h=d[f].replace(/\s/g,""),e=h.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==e&&e.length>=1)return e[1];return"resolve"===this.opts.width?(c=this.opts.element.css("width"),c.indexOf("%")>0?c:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return a.isFunction(this.opts.width)?this.opts.width():this.opts.width}var d=c.call(this);null!==d&&this.container.css("width",d)}}),e=N(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'>&nbsp;</span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow'><b></b></span>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var c,d,e;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.search.focus(),c=this.search.get(0),c.createTextRange?(d=c.createTextRange(),d.collapse(!1),d.select()):c.setSelectionRange&&(e=this.search.val().length,c.setSelectionRange(e,e)),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(a){this.opened()&&(this.parent.close.apply(this,arguments),a=a||{focus:!0},this.focusser.removeAttr("disabled"),a.focus&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},destroy:function(){a("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments)},initContainer:function(){var b,d=this.container,e=this.dropdown;this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=b=d.find(".select2-choice"),this.focusser=d.find(".select2-focusser"),this.focusser.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id")),this.focusser.attr("tabindex",this.elementTabIndex),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){if(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)return A(a),void 0;switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),A(a),void 0;case c.ENTER:return this.selectHighlighted(),A(a),void 0;case c.TAB:return this.selectHighlighted({noFocus:!0}),void 0;case c.ESC:return this.cancel(a),A(a),void 0}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body().get(0)&&window.setTimeout(this.bind(function(){this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.ESC){if(this.opts.openOnEnter===!1&&a.which===c.ENTER)return A(a),void 0;if(a.which==c.DOWN||a.which==c.UP||a.which==c.ENTER&&this.opts.openOnEnter){if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return;return this.open(),A(a),void 0}return a.which==c.DELETE||a.which==c.BACKSPACE?(this.opts.allowClear&&this.clear(),A(a),void 0):void 0}})),t(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){if(this.opts.minimumResultsForSearch>=0){if(a.stopPropagation(),this.opened())return;this.open()}})),b.on("mousedown","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),B(a),this.close(),this.selection.focus())})),b.on("mousedown",this.bind(function(b){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),A(b)})),e.on("mousedown",this.bind(function(){this.search.focus()})),b.on("focus",this.bind(function(a){A(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(b){var c=this.selection.data("select2-data");if(c){var d=a.Event("select2-clearing");if(this.opts.element.trigger(d),d.isDefaultPrevented())return;var e=this.getPlaceholderOption();this.opts.element.val(e?e.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),b!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder())})}},isPlaceholderOptionSelected:function(){var a;return this.getPlaceholder()?(a=this.getPlaceholderOption())!==b&&a.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val():!1},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find("option").filter(function(){return this.selected});b(c.optionToData(d))}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=q(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&a!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,b,c){var d=0,e=this;if(this.findHighlightableChoices().each2(function(a,b){return q(e.id(b.data("select2-data")),e.opts.element.val())?(d=a,!1):void 0}),c!==!1&&(b===!0&&d>=0?this.highlight(d):this.highlight(0)),b===!0){var g=this.opts.minimumResultsForSearch;g>=0&&this.showSearch(L(a.results)>=g)}},showSearch:function(b){this.showSearchInput!==b&&(this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b))},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.close(),b&&b.noFocus||this.focusser.focus(),q(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var d,e,c=this.selection.find(".select2-chosen");this.selection.data("select2-data",a),c.empty(),null!==a&&(d=this.opts.formatSelection(a,c,this.opts.escapeMarkup)),d!==b&&c.append(d),e=this.opts.formatSelectionCssClass(a,c),e!==b&&c.addClass(e),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var a,c=!1,d=null,e=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find("option").filter(function(){return this.selected}).each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(!a&&0!==a)return this.clear(c),void 0;if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c,d=!1;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(arguments.length>1&&(d=arguments[1]),a?(c=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),d&&this.triggerChange({added:a,removed:c})):this.clear(d),void 0)}}),f=N(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find("option").filter(function(){return this.selected}).each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=r(c.val(),b.separator),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return q(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){for(var a=[],c=0;c<e.length;c++)for(var g=e[c],h=0;h<f.length;h++){var i=f[h];if(q(g,b.id(i))){a.push(i),f.splice(h,1);break}}d(a)}:a.noop})}),b},selectChoice:function(a){var b=this.container.find(".select2-search-choice-focus");b.length&&a&&a[0]==b[0]||(b.length&&this.opts.element.trigger("choice-deselected",b),b.removeClass("select2-search-choice-focus"),a&&a.length&&(this.close(),a.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",a)))},destroy:function(){a("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments)},initContainer:function(){var d,b=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=d=this.container.find(b);var e=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){e.search[0].focus(),e.selectChoice(a(this))}),this.search.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){++this.keydowns;var b=d.find(".select2-search-choice-focus"),e=b.prev(".select2-search-choice:not(.select2-locked)"),f=b.next(".select2-search-choice:not(.select2-locked)"),g=z(this.search);if(b.length&&(a.which==c.LEFT||a.which==c.RIGHT||a.which==c.BACKSPACE||a.which==c.DELETE||a.which==c.ENTER)){var h=b;return a.which==c.LEFT&&e.length?h=e:a.which==c.RIGHT?h=f.length?f:null:a.which===c.BACKSPACE?(this.unselect(b.first()),this.search.width(10),h=e.length?e:f):a.which==c.DELETE?(this.unselect(b.first()),this.search.width(10),h=f.length?f:null):a.which==c.ENTER&&(h=null),this.selectChoice(h),A(a),h&&h.length||this.open(),void 0}if((a.which===c.BACKSPACE&&1==this.keydowns||a.which==c.LEFT)&&0==g.offset&&!g.length)return this.selectChoice(d.find(".select2-search-choice:not(.select2-locked)").last()),A(a),void 0;if(this.selectChoice(null),this.opened())switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),A(a),void 0;case c.ENTER:return this.selectHighlighted(),A(a),void 0;case c.TAB:return this.selectHighlighted({noFocus:!0}),this.close(),void 0;case c.ESC:return this.cancel(a),A(a),void 0}if(a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.BACKSPACE&&a.which!==c.ESC){if(a.which===c.ENTER){if(this.opts.openOnEnter===!1)return;if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return}this.open(),(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)&&A(a),a.which===c.ENTER&&A(a)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(b){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),b.stopImmediatePropagation(),this.opts.element.trigger(a.Event("select2-blur"))})),this.container.on("click",b,this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",b,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),this.updateResults(!0),this.search.focus(),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){o(e.id(this),c)<0&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer.call(this,a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,b){this.triggerSelect(a)&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(a,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),b&&b.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,k,d=!c.locked,e=a("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),f=a("<li class='select2-search-choice select2-locked'><div></div></li>"),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div"),this.opts.escapeMarkup),j!=b&&g.find("div").replaceWith("<div>"+j+"</div>"),k=this.opts.formatSelectionCssClass(c,g.find("div")),k!=b&&g.addClass(k),d&&g.find(".select2-search-choice-close").on("mousedown",A).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),A(b))})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(b){var d,e,c=this.getVal();if(b=b.closest(".select2-search-choice"),0===b.length)throw"Invalid argument: "+b+". Must be .select2-search-choice";if(d=b.data("select2-data")){for(;(e=o(this.id(d),c))>=0;)c.splice(e,1),this.setVal(c),this.select&&this.postprocessResults();var f=a.Event("select2-removing");f.val=this.id(d),f.choice=d,this.opts.element.trigger(f),f.isDefaultPrevented()||(b.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(d),choice:d}),this.triggerChange({removed:d}))}},postprocessResults:function(a,b,c){var d=this.getVal(),e=this.results.find(".select2-result"),f=this.results.find(".select2-result-with-children"),g=this;e.each2(function(a,b){var c=g.id(b.data("select2-data"));o(c,d)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),f.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&c!==!1&&g.highlight(0),!this.opts.createSearchChoice&&!e.filter(".select2-result:not(.select2-selected)").length>0&&(!a||a&&!a.more&&0===this.results.find(".select2-no-results").length)&&J(g.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+g.opts.formatNoMatches(g.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-s(this.search)},resizeSearch:function(){var a,b,c,d,e,f=s(this.search);a=C(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(Math.floor(e))},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),r(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){o(this,c)<0&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;c<b.length;c++)for(var d=0;d<a.length;d++)q(this.opts.id(b[c]),this.opts.id(a[d]))&&(b.splice(c,1),c>0&&c--,a.splice(d,1),d--);return{added:b,removed:a}},val:function(c,d){var e,f=this;if(0===arguments.length)return this.getVal();if(e=this.data(),e.length||(e=[]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange({added:this.data(),removed:e}),void 0;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange(this.buildChangeDetails(e,this.data()));else{if(this.opts.initSelection===b)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a.map(b,f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange(f.buildChangeDetails(e,f.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(b,c){var e,f,d=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(f=this.data(),b||(b=[]),e=a.map(b,function(a){return d.opts.id(a)}),this.setVal(e),this.updateSelection(b),this.clearSearch(),c&&this.triggerChange(this.buildChangeDetails(f,this.data())),void 0)}}),a.fn.select2=function(){var d,g,h,i,j,c=Array.prototype.slice.call(arguments,0),k=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],l=["opened","isFocused","container","dropdown"],m=["val","data"],n={search:"externalSearch"};return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?j=d.element.prop("multiple"):(j=d.multiple||!1,"tags"in d&&(d.multiple=j=!0)),g=j?new f:new e,g.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(o(c[0],k)<0)throw"Unknown method: "+c[0];if(i=b,g=a(this).data("select2"),g===b)return;if(h=c[0],"container"===h?i=g.container:"dropdown"===h?i=g.dropdown:(n[h]&&(h=n[h]),i=g[h].apply(g,c.slice(1))),o(c[0],l)>=0||o(c[0],m)&&1==c.length)return!1}}),i===b?this:i},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return E(a.text,c.term,e,d),e.join("")},formatSelection:function(a,c,d){return a?d(a.text):b},sortResults:function(a){return a},formatResultCssClass:function(){return b},formatSelectionCssClass:function(){return b},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a.id},matcher:function(a,b){return n(""+b).toUpperCase().indexOf(n(""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:F,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b}},a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:G,local:H,tags:I},util:{debounce:v,markMatch:E,escapeMarkup:F,stripDiacritics:n},"class":{"abstract":d,single:e,multi:f}}}}(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/select2/css/select2.css ADDED
@@ -0,0 +1,537 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .select2-container {
2
+ box-sizing: border-box;
3
+ display: inline-block;
4
+ margin: 0;
5
+ position: relative;
6
+ vertical-align: middle; }
7
+ .select2-container .select2-selection--single {
8
+ box-sizing: border-box;
9
+ cursor: pointer;
10
+ display: block;
11
+ height: 28px;
12
+ user-select: none;
13
+ -webkit-user-select: none; }
14
+ .select2-container .select2-selection--single .select2-selection__rendered {
15
+ display: block;
16
+ padding-left: 8px;
17
+ padding-right: 20px;
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ white-space: nowrap; }
21
+ .select2-container .select2-selection--single .select2-selection__clear {
22
+ background-color: transparent;
23
+ border: none;
24
+ font-size: 1em; }
25
+ .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
26
+ padding-right: 8px;
27
+ padding-left: 20px; }
28
+ .select2-container .select2-selection--multiple {
29
+ box-sizing: border-box;
30
+ cursor: pointer;
31
+ display: block;
32
+ min-height: 32px;
33
+ user-select: none;
34
+ -webkit-user-select: none; }
35
+ .select2-container .select2-selection--multiple .select2-selection__rendered {
36
+ display: inline;
37
+ list-style: none;
38
+ padding: 0; }
39
+ .select2-container .select2-selection--multiple .select2-selection__clear {
40
+ background-color: transparent;
41
+ border: none;
42
+ font-size: 1em; }
43
+ .select2-container .select2-search--inline .select2-search__field {
44
+ box-sizing: border-box;
45
+ border: none;
46
+ font-size: 100%;
47
+ margin-top: 5px;
48
+ margin-left: 5px;
49
+ padding: 0;
50
+ max-width: 100%;
51
+ resize: none;
52
+ height: 18px;
53
+ vertical-align: bottom;
54
+ font-family: sans-serif;
55
+ overflow: hidden;
56
+ word-break: keep-all; }
57
+ .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
58
+ -webkit-appearance: none; }
59
+
60
+ .select2-dropdown {
61
+ background-color: white;
62
+ border: 1px solid #aaa;
63
+ border-radius: 4px;
64
+ box-sizing: border-box;
65
+ display: block;
66
+ position: absolute;
67
+ left: -100000px;
68
+ width: 100%;
69
+ z-index: 1051; }
70
+
71
+ .select2-results {
72
+ display: block; }
73
+
74
+ .select2-results__options {
75
+ list-style: none;
76
+ margin: 0;
77
+ padding: 0; }
78
+
79
+ .select2-results__option {
80
+ padding: 6px;
81
+ user-select: none;
82
+ -webkit-user-select: none; }
83
+
84
+ .select2-results__option--selectable {
85
+ cursor: pointer; }
86
+
87
+ .select2-container--open .select2-dropdown {
88
+ left: 0; }
89
+
90
+ .select2-container--open .select2-dropdown--above {
91
+ border-bottom: none;
92
+ border-bottom-left-radius: 0;
93
+ border-bottom-right-radius: 0; }
94
+
95
+ .select2-container--open .select2-dropdown--below {
96
+ border-top: none;
97
+ border-top-left-radius: 0;
98
+ border-top-right-radius: 0; }
99
+
100
+ .select2-search--dropdown {
101
+ display: block;
102
+ padding: 4px; }
103
+ .select2-search--dropdown .select2-search__field {
104
+ padding: 4px;
105
+ width: 100%;
106
+ box-sizing: border-box; }
107
+ .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
108
+ -webkit-appearance: none; }
109
+ .select2-search--dropdown.select2-search--hide {
110
+ display: none; }
111
+
112
+ .select2-close-mask {
113
+ border: 0;
114
+ margin: 0;
115
+ padding: 0;
116
+ display: block;
117
+ position: fixed;
118
+ left: 0;
119
+ top: 0;
120
+ min-height: 100%;
121
+ min-width: 100%;
122
+ height: auto;
123
+ width: auto;
124
+ opacity: 0;
125
+ z-index: 99;
126
+ background-color: #fff;
127
+ filter: alpha(opacity=0); }
128
+
129
+ .select2-hidden-accessible {
130
+ border: 0 !important;
131
+ clip: rect(0 0 0 0) !important;
132
+ -webkit-clip-path: inset(50%) !important;
133
+ clip-path: inset(50%) !important;
134
+ height: 1px !important;
135
+ overflow: hidden !important;
136
+ padding: 0 !important;
137
+ position: absolute !important;
138
+ width: 1px !important;
139
+ white-space: nowrap !important; }
140
+
141
+ .select2-container--default .select2-selection--single {
142
+ background-color: #fff;
143
+ border: 1px solid #aaa;
144
+ border-radius: 4px; }
145
+ .select2-container--default .select2-selection--single .select2-selection__rendered {
146
+ color: #444;
147
+ line-height: 28px; }
148
+ .select2-container--default .select2-selection--single .select2-selection__clear {
149
+ cursor: pointer;
150
+ float: right;
151
+ font-weight: bold;
152
+ height: 26px;
153
+ margin-right: 20px;
154
+ padding-right: 0px; }
155
+ .select2-container--default .select2-selection--single .select2-selection__placeholder {
156
+ color: #999; }
157
+ .select2-container--default .select2-selection--single .select2-selection__arrow {
158
+ height: 26px;
159
+ position: absolute;
160
+ top: 1px;
161
+ right: 1px;
162
+ width: 20px; }
163
+ .select2-container--default .select2-selection--single .select2-selection__arrow b {
164
+ border-color: #888 transparent transparent transparent;
165
+ border-style: solid;
166
+ border-width: 5px 4px 0 4px;
167
+ height: 0;
168
+ left: 50%;
169
+ margin-left: -4px;
170
+ margin-top: -2px;
171
+ position: absolute;
172
+ top: 50%;
173
+ width: 0; }
174
+
175
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
176
+ float: left; }
177
+
178
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
179
+ left: 1px;
180
+ right: auto; }
181
+
182
+ .select2-container--default.select2-container--disabled .select2-selection--single {
183
+ background-color: #eee;
184
+ cursor: default; }
185
+ .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
186
+ display: none; }
187
+
188
+ .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
189
+ border-color: transparent transparent #888 transparent;
190
+ border-width: 0 4px 5px 4px; }
191
+
192
+ .select2-container--default .select2-selection--multiple {
193
+ background-color: white;
194
+ border: 1px solid #aaa;
195
+ border-radius: 4px;
196
+ cursor: text;
197
+ padding-bottom: 5px;
198
+ padding-right: 5px;
199
+ position: relative; }
200
+ .select2-container--default .select2-selection--multiple.select2-selection--clearable {
201
+ padding-right: 25px; }
202
+ .select2-container--default .select2-selection--multiple .select2-selection__clear {
203
+ cursor: pointer;
204
+ font-weight: bold;
205
+ height: 20px;
206
+ margin-right: 10px;
207
+ margin-top: 5px;
208
+ position: absolute;
209
+ right: 0;
210
+ padding: 1px; }
211
+ .select2-container--default .select2-selection--multiple .select2-selection__choice {
212
+ background-color: #e4e4e4;
213
+ border: 1px solid #aaa;
214
+ border-radius: 4px;
215
+ box-sizing: border-box;
216
+ display: inline-block;
217
+ margin-left: 5px;
218
+ margin-top: 5px;
219
+ padding: 0;
220
+ padding-left: 20px;
221
+ position: relative;
222
+ max-width: 100%;
223
+ overflow: hidden;
224
+ text-overflow: ellipsis;
225
+ vertical-align: bottom;
226
+ white-space: nowrap; }
227
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
228
+ cursor: default;
229
+ padding-left: 2px;
230
+ padding-right: 5px; }
231
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
232
+ background-color: transparent;
233
+ border: none;
234
+ border-right: 1px solid #aaa;
235
+ border-top-left-radius: 4px;
236
+ border-bottom-left-radius: 4px;
237
+ color: #999;
238
+ cursor: pointer;
239
+ font-size: 1em;
240
+ font-weight: bold;
241
+ padding: 0 4px;
242
+ position: absolute;
243
+ left: 0;
244
+ top: 0; }
245
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover, .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus {
246
+ background-color: #f1f1f1;
247
+ color: #333;
248
+ outline: none; }
249
+
250
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
251
+ margin-left: 5px;
252
+ margin-right: auto; }
253
+
254
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display {
255
+ padding-left: 5px;
256
+ padding-right: 2px; }
257
+
258
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
259
+ border-left: 1px solid #aaa;
260
+ border-right: none;
261
+ border-top-left-radius: 0;
262
+ border-bottom-left-radius: 0;
263
+ border-top-right-radius: 4px;
264
+ border-bottom-right-radius: 4px; }
265
+
266
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__clear {
267
+ float: left;
268
+ margin-left: 10px;
269
+ margin-right: auto; }
270
+
271
+ .select2-container--default.select2-container--focus .select2-selection--multiple {
272
+ border: solid black 1px;
273
+ outline: 0; }
274
+
275
+ .select2-container--default.select2-container--disabled .select2-selection--multiple {
276
+ background-color: #eee;
277
+ cursor: default; }
278
+
279
+ .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
280
+ display: none; }
281
+
282
+ .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
283
+ border-top-left-radius: 0;
284
+ border-top-right-radius: 0; }
285
+
286
+ .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
287
+ border-bottom-left-radius: 0;
288
+ border-bottom-right-radius: 0; }
289
+
290
+ .select2-container--default .select2-search--dropdown .select2-search__field {
291
+ border: 1px solid #aaa; }
292
+
293
+ .select2-container--default .select2-search--inline .select2-search__field {
294
+ background: transparent;
295
+ border: none;
296
+ outline: 0;
297
+ box-shadow: none;
298
+ -webkit-appearance: textfield; }
299
+
300
+ .select2-container--default .select2-results > .select2-results__options {
301
+ max-height: 200px;
302
+ overflow-y: auto; }
303
+
304
+ .select2-container--default .select2-results__option .select2-results__option {
305
+ padding-left: 1em; }
306
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
307
+ padding-left: 0; }
308
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
309
+ margin-left: -1em;
310
+ padding-left: 2em; }
311
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
312
+ margin-left: -2em;
313
+ padding-left: 3em; }
314
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
315
+ margin-left: -3em;
316
+ padding-left: 4em; }
317
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
318
+ margin-left: -4em;
319
+ padding-left: 5em; }
320
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
321
+ margin-left: -5em;
322
+ padding-left: 6em; }
323
+
324
+ .select2-container--default .select2-results__option--group {
325
+ padding: 0; }
326
+
327
+ .select2-container--default .select2-results__option--disabled {
328
+ color: #999; }
329
+
330
+ .select2-container--default .select2-results__option--selected {
331
+ background-color: #ddd; }
332
+
333
+ .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
334
+ background-color: #5897fb;
335
+ color: white; }
336
+
337
+ .select2-container--default .select2-results__group {
338
+ cursor: default;
339
+ display: block;
340
+ padding: 6px; }
341
+
342
+ .select2-container--classic .select2-selection--single {
343
+ background-color: #f7f7f7;
344
+ border: 1px solid #aaa;
345
+ border-radius: 4px;
346
+ outline: 0;
347
+ background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
348
+ background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
349
+ background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
350
+ background-repeat: repeat-x;
351
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
352
+ .select2-container--classic .select2-selection--single:focus {
353
+ border: 1px solid #5897fb; }
354
+ .select2-container--classic .select2-selection--single .select2-selection__rendered {
355
+ color: #444;
356
+ line-height: 28px; }
357
+ .select2-container--classic .select2-selection--single .select2-selection__clear {
358
+ cursor: pointer;
359
+ float: right;
360
+ font-weight: bold;
361
+ height: 26px;
362
+ margin-right: 20px; }
363
+ .select2-container--classic .select2-selection--single .select2-selection__placeholder {
364
+ color: #999; }
365
+ .select2-container--classic .select2-selection--single .select2-selection__arrow {
366
+ background-color: #ddd;
367
+ border: none;
368
+ border-left: 1px solid #aaa;
369
+ border-top-right-radius: 4px;
370
+ border-bottom-right-radius: 4px;
371
+ height: 26px;
372
+ position: absolute;
373
+ top: 1px;
374
+ right: 1px;
375
+ width: 20px;
376
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
377
+ background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
378
+ background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
379
+ background-repeat: repeat-x;
380
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
381
+ .select2-container--classic .select2-selection--single .select2-selection__arrow b {
382
+ border-color: #888 transparent transparent transparent;
383
+ border-style: solid;
384
+ border-width: 5px 4px 0 4px;
385
+ height: 0;
386
+ left: 50%;
387
+ margin-left: -4px;
388
+ margin-top: -2px;
389
+ position: absolute;
390
+ top: 50%;
391
+ width: 0; }
392
+
393
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
394
+ float: left; }
395
+
396
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
397
+ border: none;
398
+ border-right: 1px solid #aaa;
399
+ border-radius: 0;
400
+ border-top-left-radius: 4px;
401
+ border-bottom-left-radius: 4px;
402
+ left: 1px;
403
+ right: auto; }
404
+
405
+ .select2-container--classic.select2-container--open .select2-selection--single {
406
+ border: 1px solid #5897fb; }
407
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
408
+ background: transparent;
409
+ border: none; }
410
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
411
+ border-color: transparent transparent #888 transparent;
412
+ border-width: 0 4px 5px 4px; }
413
+
414
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
415
+ border-top: none;
416
+ border-top-left-radius: 0;
417
+ border-top-right-radius: 0;
418
+ background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
419
+ background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
420
+ background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
421
+ background-repeat: repeat-x;
422
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
423
+
424
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
425
+ border-bottom: none;
426
+ border-bottom-left-radius: 0;
427
+ border-bottom-right-radius: 0;
428
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
429
+ background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
430
+ background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
431
+ background-repeat: repeat-x;
432
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
433
+
434
+ .select2-container--classic .select2-selection--multiple {
435
+ background-color: white;
436
+ border: 1px solid #aaa;
437
+ border-radius: 4px;
438
+ cursor: text;
439
+ outline: 0;
440
+ padding-bottom: 5px;
441
+ padding-right: 5px; }
442
+ .select2-container--classic .select2-selection--multiple:focus {
443
+ border: 1px solid #5897fb; }
444
+ .select2-container--classic .select2-selection--multiple .select2-selection__clear {
445
+ display: none; }
446
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice {
447
+ background-color: #e4e4e4;
448
+ border: 1px solid #aaa;
449
+ border-radius: 4px;
450
+ display: inline-block;
451
+ margin-left: 5px;
452
+ margin-top: 5px;
453
+ padding: 0; }
454
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__display {
455
+ cursor: default;
456
+ padding-left: 2px;
457
+ padding-right: 5px; }
458
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
459
+ background-color: transparent;
460
+ border: none;
461
+ border-top-left-radius: 4px;
462
+ border-bottom-left-radius: 4px;
463
+ color: #888;
464
+ cursor: pointer;
465
+ font-size: 1em;
466
+ font-weight: bold;
467
+ padding: 0 4px; }
468
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
469
+ color: #555;
470
+ outline: none; }
471
+
472
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
473
+ margin-left: 5px;
474
+ margin-right: auto; }
475
+
476
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display {
477
+ padding-left: 5px;
478
+ padding-right: 2px; }
479
+
480
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
481
+ border-top-left-radius: 0;
482
+ border-bottom-left-radius: 0;
483
+ border-top-right-radius: 4px;
484
+ border-bottom-right-radius: 4px; }
485
+
486
+ .select2-container--classic.select2-container--open .select2-selection--multiple {
487
+ border: 1px solid #5897fb; }
488
+
489
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
490
+ border-top: none;
491
+ border-top-left-radius: 0;
492
+ border-top-right-radius: 0; }
493
+
494
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
495
+ border-bottom: none;
496
+ border-bottom-left-radius: 0;
497
+ border-bottom-right-radius: 0; }
498
+
499
+ .select2-container--classic .select2-search--dropdown .select2-search__field {
500
+ border: 1px solid #aaa;
501
+ outline: 0; }
502
+
503
+ .select2-container--classic .select2-search--inline .select2-search__field {
504
+ outline: 0;
505
+ box-shadow: none; }
506
+
507
+ .select2-container--classic .select2-dropdown {
508
+ background-color: white;
509
+ border: 1px solid transparent; }
510
+
511
+ .select2-container--classic .select2-dropdown--above {
512
+ border-bottom: none; }
513
+
514
+ .select2-container--classic .select2-dropdown--below {
515
+ border-top: none; }
516
+
517
+ .select2-container--classic .select2-results > .select2-results__options {
518
+ max-height: 200px;
519
+ overflow-y: auto; }
520
+
521
+ .select2-container--classic .select2-results__option--group {
522
+ padding: 0; }
523
+
524
+ .select2-container--classic .select2-results__option--disabled {
525
+ color: grey; }
526
+
527
+ .select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable {
528
+ background-color: #3875d7;
529
+ color: white; }
530
+
531
+ .select2-container--classic .select2-results__group {
532
+ cursor: default;
533
+ display: block;
534
+ padding: 6px; }
535
+
536
+ .select2-container--classic.select2-container--open .select2-dropdown {
537
+ border-color: #5897fb; }
assets/select2/css/select2.min.css ADDED
@@ -0,0 +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 .select2-selection--single .select2-selection__clear{background-color:transparent;border:none;font-size:1em}.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;list-style:none;padding:0}.select2-container .select2-selection--multiple .select2-selection__clear{background-color:transparent;border:none;font-size:1em}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;margin-left:5px;padding:0;max-width:100%;resize:none;height:18px;vertical-align:bottom;font-family:sans-serif;overflow:hidden;word-break:keep-all}.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--selectable{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;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !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;height:26px;margin-right:20px;padding-right:0px}.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;padding-bottom:5px;padding-right:5px;position:relative}.select2-container--default .select2-selection--multiple.select2-selection--clearable{padding-right:25px}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;font-weight:bold;height:20px;margin-right:10px;margin-top:5px;position:absolute;right:0;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:inline-block;margin-left:5px;margin-top:5px;padding:0;padding-left:20px;position:relative;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}.select2-container--default .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-right:1px solid #aaa;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#999;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;position:absolute;left:0;top:0}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus{background-color:#f1f1f1;color:#333;outline:none}.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__display{padding-left:5px;padding-right:2px}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-left:1px solid #aaa;border-right:none;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__clear{float:left;margin-left:10px;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;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 .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--group{padding:0}.select2-container--default .select2-results__option--disabled{color:#999}.select2-container--default .select2-results__option--selected{background-color:#ddd}.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{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;height:26px;margin-right:20px}.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;padding-bottom:5px;padding-right:5px}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.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;display:inline-block;margin-left:5px;margin-top:5px;padding:0}.select2-container--classic .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#888;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;outline:none}.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__display{padding-left:5px;padding-right:2px}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}.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--group{padding:0}.select2-container--classic .select2-results__option--disabled{color:grey}.select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable{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/select2/js/i18n/af.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Verwyders asseblief "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Voer asseblief "+(e.minimum-e.input.length)+" of meer karakters"},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var n="Kies asseblief net "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"},removeAllItems:function(){return"Verwyder alle items"}}}),e.define,e.require}();
assets/select2/js/i18n/ar.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(n){return"الرجاء حذف "+(n.input.length-n.maximum)+" عناصر"},inputTooShort:function(n){return"الرجاء إضافة "+(n.minimum-n.input.length)+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(n){return"تستطيع إختيار "+n.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"},removeAllItems:function(){return"قم بإزالة كل العناصر"}}}),n.define,n.require}();
assets/select2/js/i18n/az.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/az",[],function(){return{inputTooLong:function(n){return n.input.length-n.maximum+" simvol silin"},inputTooShort:function(n){return n.minimum-n.input.length+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(n){return"Sadəcə "+n.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"},removeAllItems:function(){return"Bütün elementləri sil"}}}),n.define,n.require}();
assets/select2/js/i18n/bg.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bg",[],function(){return{inputTooLong:function(n){var e=n.input.length-n.maximum,u="Моля въведете с "+e+" по-малко символ";return e>1&&(u+="a"),u},inputTooShort:function(n){var e=n.minimum-n.input.length,u="Моля въведете още "+e+" символ";return e>1&&(u+="a"),u},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(n){var e="Можете да направите до "+n.maximum+" ";return n.maximum>1?e+="избора":e+="избор",e},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"},removeAllItems:function(){return"Премахнете всички елементи"}}}),n.define,n.require}();
assets/select2/js/i18n/bn.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/bn",[],function(){return{errorLoading:function(){return"ফলাফলগুলি লোড করা যায়নি।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।";return 1!=e&&(u="অনুগ্রহ করে "+e+" টি অক্ষর মুছে দিন।"),u},inputTooShort:function(n){return n.minimum-n.input.length+" টি অক্ষর অথবা অধিক অক্ষর লিখুন।"},loadingMore:function(){return"আরো ফলাফল লোড হচ্ছে ..."},maximumSelected:function(n){var e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।";return 1!=n.maximum&&(e=n.maximum+" টি আইটেম নির্বাচন করতে পারবেন।"),e},noResults:function(){return"কোন ফলাফল পাওয়া যায়নি।"},searching:function(){return"অনুসন্ধান করা হচ্ছে ..."}}}),n.define,n.require}();
assets/select2/js/i18n/bs.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/bs",[],function(){function e(e,n,r,t){return e%10==1&&e%100!=11?n:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(n){var r=n.input.length-n.maximum,t="Obrišite "+r+" simbol";return t+=e(r,"","a","a")},inputTooShort:function(n){var r=n.minimum-n.input.length,t="Ukucajte bar još "+r+" simbol";return t+=e(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(n){var r="Možete izabrati samo "+n.maximum+" stavk";return r+=e(n.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Uklonite sve stavke"}}}),e.define,e.require}();
assets/select2/js/i18n/ca.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Si us plau, elimina "+n+" car";return r+=1==n?"àcter":"àcters"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Si us plau, introdueix "+n+" car";return r+=1==n?"àcter":"àcters"},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var n="Només es pot seleccionar "+e.maximum+" element";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"},removeAllItems:function(){return"Treu tots els elements"}}}),e.define,e.require}();
assets/select2/js/i18n/cs.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/cs",[],function(){function e(e,n){switch(e){case 2:return n?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadejte o jeden znak méně.":t<=4?"Prosím, zadejte o "+e(t,!0)+" znaky méně.":"Prosím, zadejte o "+t+" znaků méně."},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadejte ještě jeden znak.":t<=4?"Prosím, zadejte ještě další "+e(t,!0)+" znaky.":"Prosím, zadejte ještě dalších "+t+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(n){var t=n.maximum;return 1==t?"Můžete zvolit jen jednu položku.":t<=4?"Můžete zvolit maximálně "+e(t,!1)+" položky.":"Můžete zvolit maximálně "+t+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"},removeAllItems:function(){return"Odstraňte všechny položky"}}}),e.define,e.require}();
assets/select2/js/i18n/da.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){return"Angiv venligst "+(e.input.length-e.maximum)+" tegn mindre"},inputTooShort:function(e){return"Angiv venligst "+(e.minimum-e.input.length)+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var n="Du kan kun vælge "+e.maximum+" emne";return 1!=e.maximum&&(n+="r"),n},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();
assets/select2/js/i18n/de.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){return"Bitte "+(e.input.length-e.maximum)+" Zeichen weniger eingeben"},inputTooShort:function(e){return"Bitte "+(e.minimum-e.input.length)+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var n="Sie können nur "+e.maximum+" Element";return 1!=e.maximum&&(n+="e"),n+=" auswählen"},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"},removeAllItems:function(){return"Entferne alle Elemente"}}}),e.define,e.require}();
assets/select2/js/i18n/dsb.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/dsb",[],function(){var n=["znamuško","znamušce","znamuška","znamuškow"],e=["zapisk","zapiska","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Pšosym lašuj "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Pšosym zapódaj nanejmjenjej "+a+" "+u(a,n)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(n){return"Móžoš jano "+n.maximum+" "+u(n.maximum,e)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();
assets/select2/js/i18n/el.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(n){var e=n.input.length-n.maximum,u="Παρακαλώ διαγράψτε "+e+" χαρακτήρ";return 1==e&&(u+="α"),1!=e&&(u+="ες"),u},inputTooShort:function(n){return"Παρακαλώ συμπληρώστε "+(n.minimum-n.input.length)+" ή περισσότερους χαρακτήρες"},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(n){var e="Μπορείτε να επιλέξετε μόνο "+n.maximum+" επιλογ";return 1==n.maximum&&(e+="ή"),1!=n.maximum&&(e+="ές"),e},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"},removeAllItems:function(){return"Καταργήστε όλα τα στοιχεία"}}}),n.define,n.require}();
assets/select2/js/i18n/en.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Please delete "+n+" character";return 1!=n&&(r+="s"),r},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var n="You can only select "+e.maximum+" item";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}}),e.define,e.require}();
assets/select2/js/i18n/eo.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/eo",[],function(){return{errorLoading:function(){return"La rezultoj ne povas esti ŝargitaj."},inputTooLong:function(n){var e=n.input.length-n.maximum,r="Bonvolu forigi "+e+" signo";return r+=1==e?"n":"jn"},inputTooShort:function(n){return"Bv. enigi "+(n.minimum-n.input.length)+" aŭ pli multajn signojn"},loadingMore:function(){return"Ŝargado de pliaj rezultoj…"},maximumSelected:function(n){var e="Vi povas elekti nur "+n.maximum+" ero";return 1==n.maximum?e+="n":e+="jn",e},noResults:function(){return"Neniuj rezultoj trovitaj"},searching:function(){return"Serĉado…"},removeAllItems:function(){return"Forigi ĉiujn erojn"}}}),n.define,n.require}();
assets/select2/js/i18n/es.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Por favor, elimine "+n+" car";return r+=1==n?"ácter":"acteres"},inputTooShort:function(e){var n=e.minimum-e.input.length,r="Por favor, introduzca "+n+" car";return r+=1==n?"ácter":"acteres"},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var n="Sólo puede seleccionar "+e.maximum+" elemento";return 1!=e.maximum&&(n+="s"),n},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Eliminar todos los elementos"}}}),e.define,e.require}();
assets/select2/js/i18n/et.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var n=e.input.length-e.maximum,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" vähem"},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Sisesta "+n+" täht";return 1!=n&&(t+="e"),t+=" rohkem"},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var n="Saad vaid "+e.maximum+" tulemus";return 1==e.maximum?n+="e":n+="t",n+=" valida"},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"},removeAllItems:function(){return"Eemalda kõik esemed"}}}),e.define,e.require}();
assets/select2/js/i18n/eu.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gutxiago"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return n+=1==t?"karaktere bat":t+" karaktere",n+=" gehiago"},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return 1===e.maximum?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"},removeAllItems:function(){return"Kendu elementu guztiak"}}}),e.define,e.require}();
assets/select2/js/i18n/fa.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(n){return"لطفاً "+(n.input.length-n.maximum)+" کاراکتر را حذف نمایید"},inputTooShort:function(n){return"لطفاً تعداد "+(n.minimum-n.input.length)+" کاراکتر یا بیشتر وارد نمایید"},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(n){return"شما تنها می‌توانید "+n.maximum+" آیتم را انتخاب نمایید"},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."},removeAllItems:function(){return"همه موارد را حذف کنید"}}}),n.define,n.require}();
assets/select2/js/i18n/fi.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(n){return"Ole hyvä ja anna "+(n.input.length-n.maximum)+" merkkiä vähemmän"},inputTooShort:function(n){return"Ole hyvä ja anna "+(n.minimum-n.input.length)+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(n){return"Voit valita ainoastaan "+n.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"},removeAllItems:function(){return"Poista kaikki kohteet"}}}),n.define,n.require}();
assets/select2/js/i18n/fr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"},removeItem:function(){return"Supprimer l'élément"}}}),e.define,e.require}();
assets/select2/js/i18n/gl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var n=e.input.length-e.maximum;return 1===n?"Elimine un carácter":"Elimine "+n+" caracteres"},inputTooShort:function(e){var n=e.minimum-e.input.length;return 1===n?"Engada un carácter":"Engada "+n+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return 1===e.maximum?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Elimina todos os elementos"}}}),e.define,e.require}();
assets/select2/js/i18n/he.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="נא למחוק ";return r+=1===e?"תו אחד":e+" תווים"},inputTooShort:function(n){var e=n.minimum-n.input.length,r="נא להכניס ";return r+=1===e?"תו אחד":e+" תווים",r+=" או יותר"},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(n){var e="באפשרותך לבחור עד ";return 1===n.maximum?e+="פריט אחד":e+=n.maximum+" פריטים",e},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"},removeAllItems:function(){return"הסר את כל הפריטים"}}}),n.define,n.require}();
assets/select2/js/i18n/hi.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(n){var e=n.input.length-n.maximum,r=e+" अक्षर को हटा दें";return e>1&&(r=e+" अक्षरों को हटा दें "),r},inputTooShort:function(n){return"कृपया "+(n.minimum-n.input.length)+" या अधिक अक्षर दर्ज करें"},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(n){return"आप केवल "+n.maximum+" आइटम का चयन कर सकते हैं"},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."},removeAllItems:function(){return"सभी वस्तुओं को हटा दें"}}}),n.define,n.require}();
assets/select2/js/i18n/hr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hr",[],function(){function n(n){var e=" "+n+" znak";return n%10<5&&n%10>0&&(n%100<5||n%100>19)?n%10>1&&(e+="a"):e+="ova",e}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(e){return"Unesite "+n(e.input.length-e.maximum)},inputTooShort:function(e){return"Unesite još "+n(e.minimum-e.input.length)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(n){return"Maksimalan broj odabranih stavki je "+n.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Ukloni sve stavke"}}}),n.define,n.require}();
assets/select2/js/i18n/hsb.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hsb",[],function(){var n=["znamješko","znamješce","znamješka","znamješkow"],e=["zapisk","zapiskaj","zapiski","zapiskow"],u=function(n,e){return 1===n?e[0]:2===n?e[1]:n>2&&n<=4?e[2]:n>=5?e[3]:void 0};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(e){var a=e.input.length-e.maximum;return"Prošu zhašej "+a+" "+u(a,n)},inputTooShort:function(e){var a=e.minimum-e.input.length;return"Prošu zapodaj znajmjeńša "+a+" "+u(a,n)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(n){return"Móžeš jenož "+n.maximum+" "+u(n.maximum,e)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"},removeAllItems:function(){return"Remove all items"}}}),n.define,n.require}();
assets/select2/js/i18n/hu.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){return"Túl hosszú. "+(e.input.length-e.maximum)+" karakterrel több, mint kellene."},inputTooShort:function(e){return"Túl rövid. Még "+(e.minimum-e.input.length)+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"},removeAllItems:function(){return"Távolítson el minden elemet"},removeItem:function(){return"Elem eltávolítása"},search:function(){return"Keresés"}}}),e.define,e.require}();
assets/select2/js/i18n/hy.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(n){return"Խնդրում ենք հեռացնել "+(n.input.length-n.maximum)+" նշան"},inputTooShort:function(n){return"Խնդրում ենք մուտքագրել "+(n.minimum-n.input.length)+" կամ ավել նշաններ"},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(n){return"Դուք կարող եք ընտրել առավելագույնը "+n.maximum+" կետ"},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"},removeAllItems:function(){return"Հեռացնել բոլոր տարրերը"}}}),n.define,n.require}();
assets/select2/js/i18n/id.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(n){return"Hapuskan "+(n.input.length-n.maximum)+" huruf"},inputTooShort:function(n){return"Masukkan "+(n.minimum-n.input.length)+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(n){return"Anda hanya dapat memilih "+n.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Hapus semua item"}}}),n.define,n.require}();
assets/select2/js/i18n/is.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/is",[],function(){return{inputTooLong:function(n){var t=n.input.length-n.maximum,e="Vinsamlegast styttið texta um "+t+" staf";return t<=1?e:e+"i"},inputTooShort:function(n){var t=n.minimum-n.input.length,e="Vinsamlegast skrifið "+t+" staf";return t>1&&(e+="i"),e+=" í viðbót"},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(n){return"Þú getur aðeins valið "+n.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"},removeAllItems:function(){return"Fjarlægðu öll atriði"}}}),n.define,n.require}();
assets/select2/js/i18n/it.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Per favore cancella "+n+" caratter";return t+=1!==n?"i":"e"},inputTooShort:function(e){return"Per favore inserisci "+(e.minimum-e.input.length)+" o più caratteri"},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var n="Puoi selezionare solo "+e.maximum+" element";return 1!==e.maximum?n+="i":n+="o",n},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"},removeAllItems:function(){return"Rimuovi tutti gli oggetti"}}}),e.define,e.require}();
assets/select2/js/i18n/ja.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(n){return n.input.length-n.maximum+" 文字を削除してください"},inputTooShort:function(n){return"少なくとも "+(n.minimum-n.input.length)+" 文字を入力してください"},loadingMore:function(){return"読み込み中…"},maximumSelected:function(n){return n.maximum+" 件しか選択できません"},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"},removeAllItems:function(){return"すべてのアイテムを削除"}}}),n.define,n.require}();
assets/select2/js/i18n/ka.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ka",[],function(){return{errorLoading:function(){return"მონაცემების ჩატვირთვა შეუძლებელია."},inputTooLong:function(n){return"გთხოვთ აკრიფეთ "+(n.input.length-n.maximum)+" სიმბოლოთი ნაკლები"},inputTooShort:function(n){return"გთხოვთ აკრიფეთ "+(n.minimum-n.input.length)+" სიმბოლო ან მეტი"},loadingMore:function(){return"მონაცემების ჩატვირთვა…"},maximumSelected:function(n){return"თქვენ შეგიძლიათ აირჩიოთ არაუმეტეს "+n.maximum+" ელემენტი"},noResults:function(){return"რეზულტატი არ მოიძებნა"},searching:function(){return"ძიება…"},removeAllItems:function(){return"ამოიღე ყველა ელემენტი"}}}),n.define,n.require}();
assets/select2/js/i18n/km.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(n){return"សូមលុបចេញ "+(n.input.length-n.maximum)+" អក្សរ"},inputTooShort:function(n){return"សូមបញ្ចូល"+(n.minimum-n.input.length)+" អក្សរ រឺ ច្រើនជាងនេះ"},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(n){return"អ្នកអាចជ្រើសរើសបានតែ "+n.maximum+" ជម្រើសប៉ុណ្ណោះ"},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."},removeAllItems:function(){return"លុបធាតុទាំងអស់"}}}),n.define,n.require}();
assets/select2/js/i18n/ko.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(n){return"너무 깁니다. "+(n.input.length-n.maximum)+" 글자 지워주세요."},inputTooShort:function(n){return"너무 짧습니다. "+(n.minimum-n.input.length)+" 글자 더 입력해주세요."},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(n){return"최대 "+n.maximum+"개까지만 선택 가능합니다."},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"},removeAllItems:function(){return"모든 항목 삭제"}}}),n.define,n.require}();
assets/select2/js/i18n/lt.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/lt",[],function(){function n(n,e,i,t){return n%10==1&&(n%100<11||n%100>19)?e:n%10>=2&&n%10<=9&&(n%100<11||n%100>19)?i:t}return{inputTooLong:function(e){var i=e.input.length-e.maximum,t="Pašalinkite "+i+" simbol";return t+=n(i,"į","ius","ių")},inputTooShort:function(e){var i=e.minimum-e.input.length,t="Įrašykite dar "+i+" simbol";return t+=n(i,"į","ius","ių")},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(e){var i="Jūs galite pasirinkti tik "+e.maximum+" element";return i+=n(e.maximum,"ą","us","ų")},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"},removeAllItems:function(){return"Pašalinti visus elementus"}}}),n.define,n.require}();
assets/select2/js/i18n/lv.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/lv",[],function(){function e(e,n,u,i){return 11===e?n:e%10==1?u:i}return{inputTooLong:function(n){var u=n.input.length-n.maximum,i="Lūdzu ievadiet par "+u;return(i+=" simbol"+e(u,"iem","u","iem"))+" mazāk"},inputTooShort:function(n){var u=n.minimum-n.input.length,i="Lūdzu ievadiet vēl "+u;return i+=" simbol"+e(u,"us","u","us")},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(n){var u="Jūs varat izvēlēties ne vairāk kā "+n.maximum;return u+=" element"+e(n.maximum,"us","u","us")},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"},removeAllItems:function(){return"Noņemt visus vienumus"}}}),e.define,e.require}();
assets/select2/js/i18n/mk.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/mk",[],function(){return{inputTooLong:function(n){var e=(n.input.length,n.maximum,"Ве молиме внесете "+n.maximum+" помалку карактер");return 1!==n.maximum&&(e+="и"),e},inputTooShort:function(n){var e=(n.minimum,n.input.length,"Ве молиме внесете уште "+n.maximum+" карактер");return 1!==n.maximum&&(e+="и"),e},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(n){var e="Можете да изберете само "+n.maximum+" ставк";return 1===n.maximum?e+="а":e+="и",e},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"},removeAllItems:function(){return"Отстрани ги сите предмети"}}}),n.define,n.require}();
assets/select2/js/i18n/ms.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(n){return"Sila hapuskan "+(n.input.length-n.maximum)+" aksara"},inputTooShort:function(n){return"Sila masukkan "+(n.minimum-n.input.length)+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(n){return"Anda hanya boleh memilih "+n.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"},removeAllItems:function(){return"Keluarkan semua item"}}}),n.define,n.require}();
assets/select2/js/i18n/nb.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){return"Vennligst fjern "+(e.input.length-e.maximum)+" tegn"},inputTooShort:function(e){return"Vennligst skriv inn "+(e.minimum-e.input.length)+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"},removeAllItems:function(){return"Fjern alle elementer"}}}),e.define,e.require}();
assets/select2/js/i18n/ne.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ne",[],function(){return{errorLoading:function(){return"नतिजाहरु देखाउन सकिएन।"},inputTooLong:function(n){var e=n.input.length-n.maximum,u="कृपया "+e+" अक्षर मेटाउनुहोस्।";return 1!=e&&(u+="कृपया "+e+" अक्षरहरु मेटाउनुहोस्।"),u},inputTooShort:function(n){return"कृपया बाँकी रहेका "+(n.minimum-n.input.length)+" वा अरु धेरै अक्षरहरु भर्नुहोस्।"},loadingMore:function(){return"अरु नतिजाहरु भरिँदैछन् …"},maximumSelected:function(n){var e="तँपाई "+n.maximum+" वस्तु मात्र छान्न पाउँनुहुन्छ।";return 1!=n.maximum&&(e="तँपाई "+n.maximum+" वस्तुहरु मात्र छान्न पाउँनुहुन्छ।"),e},noResults:function(){return"कुनै पनि नतिजा भेटिएन।"},searching:function(){return"खोजि हुँदैछ…"}}}),n.define,n.require}();
assets/select2/js/i18n/nl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){return"Gelieve "+(e.input.length-e.maximum)+" karakters te verwijderen"},inputTooShort:function(e){return"Gelieve "+(e.minimum-e.input.length)+" of meer karakters in te voeren"},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var n=1==e.maximum?"kan":"kunnen",r="Er "+n+" maar "+e.maximum+" item";return 1!=e.maximum&&(r+="s"),r+=" worden geselecteerd"},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"},removeAllItems:function(){return"Verwijder alle items"}}}),e.define,e.require}();
assets/select2/js/i18n/pa.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pa",[],function(){return{errorLoading:function(){return"ਨਤੀਜੇ ਲੋਡ ਨਹੀਂ ਕੀਤੇ ਜਾ ਸਕਦੇ ।"},inputTooLong:function(n){var e=n.input.length-n.maximum;return"ਕ੍ਰਿਪਾ ਕਰਕੇ "+e+(1!=e?" ਅੱਖਰਾਂ ਨੂੰ ":" ਅੱਖਰ ")+"ਮਿਟਾਓ ।"},inputTooShort:function(n){var e=n.minimum-n.input.length;return"ਕ੍ਰਿਪਾ ਕਰਕੇ "+e+" ਜਾਂ "+e+" ਤੋਂ ਵੱਧ"+(e>1?" ਅੱਖਰਾਂ ":" ਅੱਖਰ ")+"ਦੀ ਵਰਤੋਂ ਕਰੋ ।"},loadingMore:function(){return"ਹੋਰ ਨਤੀਜੇ ਲੋਡ ਹੋ ਰਹੇ ਹਨ ...।"},maximumSelected:function(n){var e="ਤੁਸੀਂ ਸਿਰਫ਼ "+n.maximum+" ਨਤੀਜਾ ਚੁਣ ਸਕਦੇ ਹੋ ।";return 1!=n.maximum&&(e="ਤੁਸੀਂ ਸਿਰਫ਼ "+n.maximum+" ਨਤੀਜੇ ਚੁਣ ਸਕਦੇ ਹੋ ।"),e},noResults:function(){return"ਨਤੀਜਾ ਨਹੀਂ ਮਿਲ ਰਿਹਾ ਹੈ ।"},searching:function(){return"ਖ਼ੋਜ ਕਰ ਰਹੇਂ ਹਾਂ ...।"},removeAllItems:function(){return"ਸਾਰੇ ਨਤੀਜੇ ਮਿਟਾਓ ।"}}}),n.define,n.require}();
assets/select2/js/i18n/pl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/pl",[],function(){var n=["znak","znaki","znaków"],e=["element","elementy","elementów"],r=function(n,e){return 1===n?e[0]:n>1&&n<=4?e[1]:n>=5?e[2]:void 0};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Usuń "+t+" "+r(t,n)},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Podaj przynajmniej "+t+" "+r(t,n)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(n){return"Możesz zaznaczyć tylko "+n.maximum+" "+r(n.maximum,e)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"},removeAllItems:function(){return"Usuń wszystkie przedmioty"}}}),n.define,n.require}();
assets/select2/js/i18n/ps.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(n){var e=n.input.length-n.maximum,r="د مهربانۍ لمخي "+e+" توری ړنګ کړئ";return 1!=e&&(r=r.replace("توری","توري")),r},inputTooShort:function(n){return"لږ تر لږه "+(n.minimum-n.input.length)+" يا ډېر توري وليکئ"},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(n){var e="تاسو يوازي "+n.maximum+" قلم په نښه کولای سی";return 1!=n.maximum&&(e=e.replace("قلم","قلمونه")),e},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."},removeAllItems:function(){return"ټول توکي لرې کړئ"}}}),n.define,n.require}();
assets/select2/js/i18n/pt-BR.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var n=e.input.length-e.maximum,r="Apague "+n+" caracter";return 1!=n&&(r+="es"),r},inputTooShort:function(e){return"Digite "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var n="Você só pode selecionar "+e.maximum+" ite";return 1==e.maximum?n+="m":n+="ns",n},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}();
assets/select2/js/i18n/pt.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var r=e.input.length-e.maximum,n="Por favor apague "+r+" ";return n+=1!=r?"caracteres":"caractere"},inputTooShort:function(e){return"Introduza "+(e.minimum-e.input.length)+" ou mais caracteres"},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var r="Apenas pode seleccionar "+e.maximum+" ";return r+=1!=e.maximum?"itens":"item"},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"},removeAllItems:function(){return"Remover todos os itens"}}}),e.define,e.require}();
assets/select2/js/i18n/ro.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return 1!==t&&(n+="e"),n},inputTooShort:function(e){return"Vă rugăm să introduceți "+(e.minimum-e.input.length)+" sau mai multe caractere"},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",1!==e.maximum&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"},removeAllItems:function(){return"Eliminați toate elementele"}}}),e.define,e.require}();
assets/select2/js/i18n/ru.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/ru",[],function(){function n(n,e,r,u){return n%10<5&&n%10>0&&n%100<5||n%100>20?n%10>1?r:e:u}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Пожалуйста, введите на "+r+" символ";return u+=n(r,"","a","ов"),u+=" меньше"},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Пожалуйста, введите ещё хотя бы "+r+" символ";return u+=n(r,"","a","ов")},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(e){var r="Вы можете выбрать не более "+e.maximum+" элемент";return r+=n(e.maximum,"","a","ов")},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"},removeAllItems:function(){return"Удалить все элементы"}}}),n.define,n.require}();
assets/select2/js/i18n/sk.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(n){var t=n.input.length-n.maximum;return 1==t?"Prosím, zadajte o jeden znak menej":t>=2&&t<=4?"Prosím, zadajte o "+e[t](!0)+" znaky menej":"Prosím, zadajte o "+t+" znakov menej"},inputTooShort:function(n){var t=n.minimum-n.input.length;return 1==t?"Prosím, zadajte ešte jeden znak":t<=4?"Prosím, zadajte ešte ďalšie "+e[t](!0)+" znaky":"Prosím, zadajte ešte ďalších "+t+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(n){return 1==n.maximum?"Môžete zvoliť len jednu položku":n.maximum>=2&&n.maximum<=4?"Môžete zvoliť najviac "+e[n.maximum](!1)+" položky":"Môžete zvoliť najviac "+n.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"},removeAllItems:function(){return"Odstráňte všetky položky"}}}),e.define,e.require}();
assets/select2/js/i18n/sl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Prosim zbrišite "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},inputTooShort:function(e){var n=e.minimum-e.input.length,t="Prosim vpišite še "+n+" znak";return 2==n?t+="a":1!=n&&(t+="e"),t},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var n="Označite lahko največ "+e.maximum+" predmet";return 2==e.maximum?n+="a":1!=e.maximum&&(n+="e"),n},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"},removeAllItems:function(){return"Odstranite vse elemente"}}}),e.define,e.require}();
assets/select2/js/i18n/sq.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/sq",[],function(){return{errorLoading:function(){return"Rezultatet nuk mund të ngarkoheshin."},inputTooLong:function(e){var n=e.input.length-e.maximum,t="Të lutem fshi "+n+" karakter";return 1!=n&&(t+="e"),t},inputTooShort:function(e){return"Të lutem shkruaj "+(e.minimum-e.input.length)+" ose më shumë karaktere"},loadingMore:function(){return"Duke ngarkuar më shumë rezultate…"},maximumSelected:function(e){var n="Mund të zgjedhësh vetëm "+e.maximum+" element";return 1!=e.maximum&&(n+="e"),n},noResults:function(){return"Nuk u gjet asnjë rezultat"},searching:function(){return"Duke kërkuar…"},removeAllItems:function(){return"Hiq të gjitha sendet"}}}),e.define,e.require}();
assets/select2/js/i18n/sr-Cyrl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr-Cyrl",[],function(){function n(n,e,r,u){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:u}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(e){var r=e.input.length-e.maximum,u="Обришите "+r+" симбол";return u+=n(r,"","а","а")},inputTooShort:function(e){var r=e.minimum-e.input.length,u="Укуцајте бар још "+r+" симбол";return u+=n(r,"","а","а")},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(e){var r="Можете изабрати само "+e.maximum+" ставк";return r+=n(e.maximum,"у","е","и")},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}();
assets/select2/js/i18n/sr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sr",[],function(){function n(n,e,r,t){return n%10==1&&n%100!=11?e:n%10>=2&&n%10<=4&&(n%100<12||n%100>14)?r:t}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(e){var r=e.input.length-e.maximum,t="Obrišite "+r+" simbol";return t+=n(r,"","a","a")},inputTooShort:function(e){var r=e.minimum-e.input.length,t="Ukucajte bar još "+r+" simbol";return t+=n(r,"","a","a")},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(e){var r="Možete izabrati samo "+e.maximum+" stavk";return r+=n(e.maximum,"u","e","i")},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"},removeAllItems:function(){return"Уклоните све ставке"}}}),n.define,n.require}();
assets/select2/js/i18n/sv.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(n){return"Vänligen sudda ut "+(n.input.length-n.maximum)+" tecken"},inputTooShort:function(n){return"Vänligen skriv in "+(n.minimum-n.input.length)+" eller fler tecken"},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(n){return"Du kan max välja "+n.maximum+" element"},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"},removeAllItems:function(){return"Ta bort alla objekt"}}}),n.define,n.require}();
assets/select2/js/i18n/te.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/te",[],function(){return{errorLoading:function(){return"ఫలితాలు చూపించలేకపోతున్నాము"},inputTooLong:function(n){var e=n.input.length-n.maximum,r=e;return r+=1!=e?" అక్షరాలు తొలిగించండి":" అక్షరం తొలిగించండి"},inputTooShort:function(n){return n.minimum-n.input.length+" లేక మరిన్ని అక్షరాలను జోడించండి"},loadingMore:function(){return"మరిన్ని ఫలితాలు…"},maximumSelected:function(n){var e="మీరు "+n.maximum;return 1!=n.maximum?e+=" అంశాల్ని మాత్రమే ఎంచుకోగలరు":e+=" అంశాన్ని మాత్రమే ఎంచుకోగలరు",e},noResults:function(){return"ఫలితాలు లేవు"},searching:function(){return"శోధిస్తున్నాము…"},removeAllItems:function(){return"అన్ని అంశాల్ని తొలిగించండి"},removeItem:function(){return"తొలిగించు"}}}),n.define,n.require}();
assets/select2/js/i18n/th.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(n){return"โปรดลบออก "+(n.input.length-n.maximum)+" ตัวอักษร"},inputTooShort:function(n){return"โปรดพิมพ์เพิ่มอีก "+(n.minimum-n.input.length)+" ตัวอักษร"},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(n){return"คุณสามารถเลือกได้ไม่เกิน "+n.maximum+" รายการ"},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"},removeAllItems:function(){return"ลบรายการทั้งหมด"}}}),n.define,n.require}();
assets/select2/js/i18n/tk.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/tk",[],function(){return{errorLoading:function(){return"Netije ýüklenmedi."},inputTooLong:function(e){return e.input.length-e.maximum+" harp bozuň."},inputTooShort:function(e){return"Ýene-de iň az "+(e.minimum-e.input.length)+" harp ýazyň."},loadingMore:function(){return"Köpräk netije görkezilýär…"},maximumSelected:function(e){return"Diňe "+e.maximum+" sanysyny saýlaň."},noResults:function(){return"Netije tapylmady."},searching:function(){return"Gözlenýär…"},removeAllItems:function(){return"Remove all items"}}}),e.define,e.require}();
assets/select2/js/i18n/tr.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(n){return n.input.length-n.maximum+" karakter daha girmelisiniz"},inputTooShort:function(n){return"En az "+(n.minimum-n.input.length)+" karakter daha girmelisiniz"},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(n){return"Sadece "+n.maximum+" seçim yapabilirsiniz"},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"},removeAllItems:function(){return"Tüm öğeleri kaldır"}}}),n.define,n.require}();
assets/select2/js/i18n/uk.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/uk",[],function(){function n(n,e,u,r){return n%100>10&&n%100<15?r:n%10==1?e:n%10>1&&n%10<5?u:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(e){return"Будь ласка, видаліть "+(e.input.length-e.maximum)+" "+n(e.maximum,"літеру","літери","літер")},inputTooShort:function(n){return"Будь ласка, введіть "+(n.minimum-n.input.length)+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(e){return"Ви можете вибрати лише "+e.maximum+" "+n(e.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"},removeAllItems:function(){return"Видалити всі елементи"}}}),n.define,n.require}();
assets/select2/js/i18n/vi.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/vi",[],function(){return{inputTooLong:function(n){return"Vui lòng xóa bớt "+(n.input.length-n.maximum)+" ký tự"},inputTooShort:function(n){return"Vui lòng nhập thêm từ "+(n.minimum-n.input.length)+" ký tự trở lên"},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(n){return"Chỉ có thể chọn được "+n.maximum+" lựa chọn"},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"},removeAllItems:function(){return"Xóa tất cả các mục"}}}),n.define,n.require}();
assets/select2/js/i18n/zh-CN.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(n){return"请删除"+(n.input.length-n.maximum)+"个字符"},inputTooShort:function(n){return"请再输入至少"+(n.minimum-n.input.length)+"个字符"},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(n){return"最多只能选择"+n.maximum+"个项目"},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"},removeAllItems:function(){return"删除所有项目"}}}),n.define,n.require}();
assets/select2/js/i18n/zh-TW.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ !function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var n=jQuery.fn.select2.amd;n.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(n){return"請刪掉"+(n.input.length-n.maximum)+"個字元"},inputTooShort:function(n){return"請再輸入"+(n.minimum-n.input.length)+"個字元"},loadingMore:function(){return"載入中…"},maximumSelected:function(n){return"你只能選擇最多"+n.maximum+"項"},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"},removeAllItems:function(){return"刪除所有項目"}}}),n.define,n.require}();
assets/select2/js/select2.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /*! Select2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+ !function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(t){var e,n,s,p,r,o,h,f,g,m,y,v,i,a,_,s=(t&&t.fn&&t.fn.select2&&t.fn.select2.amd&&(u=t.fn.select2.amd),u&&u.requirejs||(u?n=u:u={},g={},m={},y={},v={},i=Object.prototype.hasOwnProperty,a=[].slice,_=/\.js$/,h=function(e,t){var n,s,i=c(e),r=i[0],t=t[1];return e=i[1],r&&(n=x(r=l(r,t))),r?e=n&&n.normalize?n.normalize(e,(s=t,function(e){return l(e,s)})):l(e,t):(r=(i=c(e=l(e,t)))[0],e=i[1],r&&(n=x(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},f={require:function(e){return w(e)},exports:function(e){var t=g[e];return void 0!==t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},r=function(e,t,n,s){var i,r,o,a,l,c=[],u=typeof n,d=A(s=s||e);if("undefined"==u||"function"==u){for(t=!t.length&&n.length?["require","exports","module"]:t,a=0;a<t.length;a+=1)if("require"===(r=(o=h(t[a],d)).f))c[a]=f.require(e);else if("exports"===r)c[a]=f.exports(e),l=!0;else if("module"===r)i=c[a]=f.module(e);else if(b(g,r)||b(m,r)||b(v,r))c[a]=x(r);else{if(!o.p)throw new Error(e+" missing "+r);o.p.load(o.n,w(s,!0),function(t){return function(e){g[t]=e}}(r),{}),c[a]=g[r]}u=n?n.apply(g[e],c):void 0,e&&(i&&i.exports!==p&&i.exports!==g[e]?g[e]=i.exports:u===p&&l||(g[e]=u))}else e&&(g[e]=n)},e=n=o=function(e,t,n,s,i){if("string"==typeof e)return f[e]?f[e](t):x(h(e,A(t)).f);if(!e.splice){if((y=e).deps&&o(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=s,s=i),s?r(p,e,t,n):setTimeout(function(){r(p,e,t,n)},4),o},o.config=function(e){return o(e)},e._defined=g,(s=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),b(g,e)||b(m,e)||(m[e]=[e,t,n])}).amd={jQuery:!0},u.requirejs=e,u.require=n,u.define=s),u.define("almond",function(){}),u.define("jquery",[],function(){var e=t||$;return null==e&&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."),e}),u.define("select2/utils",["jquery"],function(r){var s={};function c(e){var t,n=e.prototype,s=[];for(t in n)"function"==typeof n[t]&&"constructor"!==t&&s.push(t);return s}s.Extend=function(e,t){var n,s={}.hasOwnProperty;function i(){this.constructor=e}for(n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},s.Decorate=function(s,i){var e=c(i),t=c(s);function r(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=s.prototype.constructor;0<t&&(e.call(arguments,s.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=s.displayName,r.prototype=new function(){this.constructor=r};for(var n=0;n<t.length;n++){var o=t[n];r.prototype[o]=s.prototype[o]}for(var a=0;a<e.length;a++){var l=e[a];r.prototype[l]=function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}(l)}return r};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,s=e.length;n<s;n++)e[n].apply(this,t)},s.Observable=e,s.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},s.bind=function(e,t){return function(){e.apply(t,arguments)}},s._convertData=function(e){for(var t in e){var n=t.split("-"),s=e;if(1!==n.length){for(var i=0;i<n.length;i++){var r=n[i];(r=r.substring(0,1).toLowerCase()+r.substring(1))in s||(s[r]={}),i==n.length-1&&(s[r]=e[t]),s=s[r]}delete e[t]}}return e},s.hasScroll=function(e,t){var n=r(t),s=t.style.overflowX,i=t.style.overflowY;return(s!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===s||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},s.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},s.__cache={};var n=0;return s.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null!=t||(t=e.id?"select2-data-"+e.id:"select2-data-"+(++n).toString()+"-"+s.generateChars(4),e.setAttribute("data-select2-id",t)),t},s.StoreData=function(e,t,n){e=s.GetUniqueElementId(e);s.__cache[e]||(s.__cache[e]={}),s.__cache[e][t]=n},s.GetData=function(e,t){var n=s.GetUniqueElementId(e);return t?s.__cache[n]&&null!=s.__cache[n][t]?s.__cache[n][t]:r(e).data(t):s.__cache[n]},s.RemoveData=function(e){var t=s.GetUniqueElementId(e);null!=s.__cache[t]&&delete s.__cache[t],e.removeAttribute("data-select2-id")},s.copyNonInternalCssClasses=function(e,t){var n=(n=e.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0===e.indexOf("select2-")}),t=(t=t.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0!==e.indexOf("select2-")}),t=n.concat(t);e.setAttribute("class",t.join(" "))},s}),u.define("select2/results",["jquery","./utils"],function(d,p){function s(e,t,n){this.$element=e,this.data=n,this.options=t,s.__super__.constructor.call(this)}return p.Extend(s,p.Observable),s.prototype.render=function(){var e=d('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=d('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),s=this.options.get("translations").get(e.message);n.append(t(s(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},s.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},s.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var s=e.results[n],s=this.option(s);t.push(s)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},s.prototype.position=function(e,t){t.find(".select2-results").append(e)},s.prototype.sort=function(e){return this.options.get("sorter")(e)},s.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");(0<t.length?t:e).first().trigger("mouseenter"),this.ensureHighlightVisible()},s.prototype.setClasses=function(){var t=this;this.data.current(function(e){var s=e.map(function(e){return e.id.toString()});t.$results.find(".select2-results__option--selectable").each(function(){var e=d(this),t=p.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<s.indexOf(n)?(this.classList.add("select2-results__option--selected"),e.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),e.attr("aria-selected","false"))})})},s.prototype.showLoading=function(e){this.hideLoading();e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},e=this.option(e);e.className+=" loading-results",this.$results.prepend(e)},s.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},s.prototype.option=function(e){var t=document.createElement("li");t.classList.add("select2-results__option"),t.classList.add("select2-results__option--selectable");var n,s={role:"option"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(n in(null!=e.element&&i.call(e.element,":disabled")||null==e.element&&e.disabled)&&(s["aria-disabled"]="true",t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--disabled")),null==e.id&&t.classList.remove("select2-results__option--selectable"),null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(s.role="group",s["aria-label"]=e.text,t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--group")),s){var r=s[n];t.setAttribute(n,r)}if(e.children){var o=d(t),a=document.createElement("strong");a.className="select2-results__group",this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],u=this.option(u);l.push(u)}i=d("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});i.append(l),o.append(a),o.append(i)}else this.template(e,t);return p.StoreData(t,"data",e),t},s.prototype.bind=function(t,e){var i=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e,t=i.getHighlightedResults();0!==t.length&&(e=p.GetData(t[0],"data"),t.hasClass("select2-results__option--selected")?i.trigger("close",{}):i.trigger("select",{data:e}))}),t.on("results:previous",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t);s<=0||(e=s-1,0===t.length&&(e=0),(s=n.eq(e)).trigger("mouseenter"),t=i.$results.offset().top,n=s.offset().top,s=i.$results.scrollTop()+(n-t),0===e?i.$results.scrollTop(0):n-t<0&&i.$results.scrollTop(s))}),t.on("results:next",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t)+1;s>=n.length||((e=n.eq(s)).trigger("mouseenter"),t=i.$results.offset().top+i.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=i.$results.scrollTop()+n-t,0===s?i.$results.scrollTop(0):t<n&&i.$results.scrollTop(e))}),t.on("results:focus",function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")}),t.on("results:message",function(e){i.displayMessage(e)}),d.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,t=0<e.deltaY&&t-e.deltaY<=0,n=e.deltaY<0&&n<=i.$results.height();t?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):n&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option--selectable",function(e){var t=d(this),n=p.GetData(this,"data");t.hasClass("select2-results__option--selected")?i.options.get("multiple")?i.trigger("unselect",{originalEvent:e,data:n}):i.trigger("close",{}):i.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".select2-results__option--selectable",function(e){var t=p.GetData(this,"data");i.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),i.trigger("results:focus",{data:t,element:d(this)})})},s.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},s.prototype.destroy=function(){this.$results.remove()},s.prototype.ensureHighlightVisible=function(){var e,t,n,s,i=this.getHighlightedResults();0!==i.length&&(e=this.$results.find(".select2-results__option--selectable").index(i),s=this.$results.offset().top,t=i.offset().top,n=this.$results.scrollTop()+(t-s),s=t-s,n-=2*i.outerHeight(!1),e<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(n))},s.prototype.template=function(e,t){var n=this.options.get("templateResult"),s=this.options.get("escapeMarkup"),e=n(e,t);null==e?t.style.display="none":"string"==typeof e?t.innerHTML=s(e):d(t).append(e)},s}),u.define("select2/keys",[],function(){return{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}}),u.define("select2/selection/base",["jquery","../utils","../keys"],function(n,s,i){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return s.Extend(r,s.Observable),r.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=s.GetData(this.$element[0],"old-tabindex")?this._tabindex=s.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},r.prototype.bind=function(e,t){var n=this,s=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",s),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},r.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},r.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&s.GetData(this,"element").select2("close")})})},r.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},r.prototype.position=function(e,t){t.find(".selection").append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r}),u.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,s){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var s=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",s),this.$selection.attr("aria-controls",s),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){var t,n;0!==e.length?(n=e[0],t=this.$selection.find(".select2-selection__rendered"),e=this.display(n,t),t.empty().append(e),(n=n.title||n.text)?t.attr("title",n):t.removeAttr("title")):this.clear()},i}),u.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,c){function r(e,t){r.__super__.constructor.apply(this,arguments)}return c.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var s=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){var t;n.isDisabled()||(t=i(this).parent(),t=c.GetData(t[0],"data"),n.trigger("unselect",{originalEvent:e,data:t}))}),this.$selection.on("keydown",".select2-selection__choice__remove",function(e){n.isDisabled()||e.stopPropagation()})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",s=0;s<e.length;s++){var i=e[s],r=this.selectionContainer(),o=this.display(i,r),a=n+c.generateChars(4)+"-";i.id?a+=i.id:a+=c.generateChars(4),r.find(".select2-selection__choice__display").append(o).attr("id",a);var l=i.title||i.text;l&&r.attr("title",l);o=this.options.get("translations").get("removeItem"),l=r.find(".select2-selection__choice__remove");l.attr("title",o()),l.attr("aria-label",o()),l.attr("aria-describedby",a),c.StoreData(r[0],"data",i),t.push(r)}this.$selection.find(".select2-selection__rendered").append(t)}},r}),u.define("select2/selection/placeholder",[],function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice");t=t.title||t.text||n.text();return this.$selection.find(".select2-selection__rendered").attr("title",t),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();t=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(t)},e}),u.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,s,a){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),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(e){s._handleClear(e)}),t.on("keypress",function(e){s._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var s=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var r={data:s};if(this.trigger("clear",r),r.prevented)this.$element.val(i);else{for(var o=0;o<s.length;o++)if(r={data:s[o]},this.trigger("unselect",r),r.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=s.DELETE&&t.which!=s.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){var n,s;e.call(this,t),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),0<this.$selection.find(".select2-selection__placeholder").length||0===t.length||(n=this.$selection.find(".select2-selection__rendered").attr("id"),s=this.options.get("translations").get("removeAllItems"),(e=i('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>')).attr("title",s()),e.attr("aria-label",s()),e.attr("aria-describedby",n),a.StoreData(e[0],"data",t),this.$selection.prepend(e),this.$selection[0].classList.add("select2-selection--clearable"))},e}),u.define("select2/selection/search",["jquery","../utils","../keys"],function(s,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=this.options.get("translations").get("search"),n=s('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=n,this.$search=n.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",t());e=e.call(this);return this._transferTabIndex(),e.append(this.$searchContainer),e},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results",r=t.id+"-container";e.call(this,t,n),s.$search.attr("aria-describedby",r),t.on("open",function(){s.$search.attr("aria-controls",i),s.$search.trigger("focus")}),t.on("close",function(){s.$search.val(""),s.resizeSearch(),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.trigger("focus")}),t.on("enable",function(){s.$search.prop("disabled",!1),s._transferTabIndex()}),t.on("disable",function(){s.$search.prop("disabled",!0)}),t.on("focus",function(e){s.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){s.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){s._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){var t;e.stopPropagation(),s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented(),e.which!==l.BACKSPACE||""!==s.$search.val()||0<(t=s.$selection.find(".select2-selection__choice").last()).length&&(t=a.GetData(t[0],"data"),s.searchRemoveChoice(t),e.preventDefault())}),this.$selection.on("click",".select2-search--inline",function(e){s.$search.val()&&e.stopPropagation()});var t=document.documentMode,o=t&&t<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){o?s.$selection.off("input.search input.searchcheck"):s.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){var t;o&&"input"===e.type?s.$selection.off("input.search input.searchcheck"):(t=e.which)!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&s.handleSearch(e)})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},e}),u.define("select2/selection/selectionCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("selectionCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/selection/eventRelay",["jquery"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var s=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],r=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){var n;-1!==i.indexOf(e)&&(t=t||{},n=o.Event("select2:"+e,{params:t}),s.$element.trigger(n),-1!==r.indexOf(e)&&(t.prevented=n.isDefaultPrevented()))})},e}),u.define("select2/translation",["jquery","require"],function(t,n){function s(e){this.dict=e||{}}return s.prototype.all=function(){return this.dict},s.prototype.get=function(e){return this.dict[e]},s.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},s._cache={},s.loadPath=function(e){var t;return e in s._cache||(t=n(e),s._cache[e]=t),new s(s._cache[e])},s}),u.define("select2/diacritics",[],function(){return{"Ⓐ":"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","Œ":"OE","Ƣ":"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","œ":"oe","ƣ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),u.define("select2/data/base",["../utils"],function(n){function s(e,t){s.__super__.constructor.call(this)}return n.Extend(s,n.Observable),s.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},s.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},s.prototype.bind=function(e,t){},s.prototype.destroy=function(){},s.prototype.generateResultId=function(e,t){e=e.id+"-result-";return e+=n.generateChars(4),null!=t.id?e+="-"+t.id.toString():e+="-"+n.generateChars(4),e},s}),u.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(e){return t.item(l(e))}))},n.prototype.select=function(i){var e,r=this;if(i.selected=!0,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var s=i[n].id;-1===t.indexOf(s)&&t.push(s)}r.$element.val(t),r.$element.trigger("input").trigger("change")}):(e=i.id,this.$element.val(e),this.$element.trigger("input").trigger("change"))},n.prototype.unselect=function(i){var r=this;if(this.$element.prop("multiple")){if(i.selected=!1,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var s=e[n].id;s!==i.id&&-1===t.indexOf(s)&&t.push(s)}r.$element.val(t),r.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(t,e){var n=[],s=this;this.$element.children().each(function(){var e;"option"!==this.tagName.toLowerCase()&&"optgroup"!==this.tagName.toLowerCase()||(e=l(this),e=s.item(e),null!==(e=s.matches(t,e))&&n.push(e))}),e({results:n})},n.prototype.addOptions=function(e){this.$element.append(e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);e=this._normalizeItem(e);return e.element=t,a.StoreData(t,"data",e),l(t)},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;var n=e[0];if("option"===n.tagName.toLowerCase())t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===n.tagName.toLowerCase()){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var s=e.children("option"),i=[],r=0;r<s.length;r++){var o=l(s[r]),o=this.item(o);i.push(o)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),u.define("select2/data/array",["./select","../utils","jquery"],function(e,t,c){function s(e,t){this._dataToConvert=t.get("data")||[],s.__super__.constructor.call(this,e,t)}return t.Extend(s,e),s.prototype.bind=function(e,t){s.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},s.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),s.__super__.select.call(this,n)},s.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),s=n.map(function(){return t.item(c(this)).id}).get(),i=[];for(var r=0;r<e.length;r++){var o,a,l=this._normalizeItem(e[r]);0<=s.indexOf(l.id)?(o=n.filter(function(e){return function(){return c(this).val()==e.id}}(l)),a=this.item(o),a=c.extend(!0,{},l,a),a=this.option(a),o.replaceWith(a)):(a=this.option(l),l.children&&(l=this.convertToOptions(l.children),a.append(l)),i.push(a))}return i},s}),u.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,r){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return r.extend({},e,{q:e.term})},transport:function(e,t,n){e=r.ajax(e);return e.then(t),e.fail(n),e}};return r.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(t,n){var s=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var i=r.extend({type:"GET"},this.ajaxOptions);function e(){var e=i.transport(i,function(e){e=s.processResults(e,t);s.options.get("debug")&&window.console&&console.error&&(e&&e.results&&Array.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(e)},function(){"status"in e&&(0===e.status||"0"===e.status)||s.trigger("results:message",{message:"errorLoading"})});s._request=e}"function"==typeof i.url&&(i.url=i.url.call(this.$element,t)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),u.define("select2/data/tags",["jquery"],function(t){function e(e,t,n){var s=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);i=n.get("insertTag");if(void 0!==i&&(this.insertTag=i),e.call(this,t,n),Array.isArray(s))for(var r=0;r<s.length;r++){var o=s[r],o=this._normalizeItem(o),o=this.option(o);this.$element.append(o)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var s=t.results,i=0;i<s.length;i++){var r=s[i],o=null!=r.children&&!e({results:r.children},!0);if((r.text||"").toUpperCase()===(c.term||"").toUpperCase()||o)return!n&&(t.data=s,void u(t))}if(n)return!0;var a,l=d.createTag(c);null!=l&&((a=d.option(l)).attr("data-select2-tag","true"),d.addOptions([a]),d.insertTag(s,l)),t.results=s,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){if(null==t.term)return null;t=t.term.trim();return""===t?null:{id:t,text:t}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||t(this).remove()})},e}),u.define("select2/data/tokenizer",["jquery"],function(c){function e(e,t,n){var s=n.get("tokenizer");void 0!==s&&(this.tokenizer=s),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var s=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=s._normalizeItem(e);s.$element.find("option").filter(function(){return c(this).val()===n.id}).length||((t=s.option(n)).attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([t])),t=n,s.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.trigger("focus")),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,s){for(var i=n.get("tokenSeparators")||[],r=t.term,o=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};o<r.length;){var l=r[o];-1!==i.indexOf(l)?(l=r.substr(0,o),null!=(l=a(c.extend({},t,{term:l})))?(s(l),r=r.substr(o+1)||"",o=0):o++):o++}return{term:r}},e}),u.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(){s._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var s=this;this._checkIfMaximumSelected(function(){e.call(s,t,n)})},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){e=null!=e?e.length:0;0<n.maximumSelectionLength&&e>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()})},e}),u.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),u.define("select2/dropdown/search",["jquery"],function(r){function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("translations").get("search"),e=r('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=e,this.$search=e.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n()),t.prepend(e),t},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){s.handleSearch(e)}),t.on("open",function(){s.$search.attr("tabindex",0),s.$search.attr("aria-controls",i),s.$search.trigger("focus"),window.setTimeout(function(){s.$search.trigger("focus")},0)}),t.on("close",function(){s.$search.attr("tabindex",-1),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.val(""),s.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||s.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(s.showSearch(e)?s.$searchContainer[0].classList.remove("select2-search--hide"):s.$searchContainer[0].classList.add("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")})},e.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},e.prototype.showSearch=function(e,t){return!0},e}),u.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,s){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,s)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),s=t.length-1;0<=s;s--){var i=t[s];this.placeholder.id===i.id&&n.splice(s,1)}return n},e}),u.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,s){this.lastParams={},e.call(this,t,n,s),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("query",function(e){s.lastParams=e,s.loading=!0}),t.on("query:append",function(e){s.lastParams=e,s.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&e&&(e=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=e+50&&this.loadMore())},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),u.define("select2/dropdown/attachBody",["jquery","../utils"],function(u,o){function e(e,t,n){this.$dropdownParent=u(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("open",function(){s._showDropdown(),s._attachPositioningHandler(t),s._bindContainerResultHandlers(t)}),t.on("close",function(){s._hideDropdown(),s._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=u("<span></span>"),e=e.call(this);return t.append(e),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){var n;this._containerResultsHandlersBound||(n=this,t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0)},e.prototype._attachPositioningHandler=function(e,t){var n=this,s="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id,t=this.$container.parents().filter(o.hasScroll);t.each(function(){o.StoreData(this,"select2-scroll-position",{x:u(this).scrollLeft(),y:u(this).scrollTop()})}),t.on(s,function(e){var t=o.GetData(this,"select2-scroll-position");u(this).scrollTop(t.y)}),u(window).on(s+" "+i+" "+r,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,s="resize.select2."+t.id,t="orientationchange.select2."+t.id;this.$container.parents().filter(o.hasScroll).off(n),u(window).off(n+" "+s+" "+t)},e.prototype._positionDropdown=function(){var e=u(window),t=this.$dropdown[0].classList.contains("select2-dropdown--above"),n=this.$dropdown[0].classList.contains("select2-dropdown--below"),s=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=i.top,r.bottom=i.top+r.height;var o=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-o,e=l>i.bottom+o,a={left:i.left,top:r.bottom},l=this.$dropdownParent;"static"===l.css("position")&&(l=l.offsetParent());i={top:0,left:0};(u.contains(document.body,l[0])||l[0].isConnected)&&(i=l.offset()),a.top-=i.top,a.left-=i.left,t||n||(s="below"),e||!c||t?!c&&e&&t&&(s="below"):s="above",("above"==s||t&&"below"!==s)&&(a.top=r.top-i.top-o),null!=s&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+s),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+s)),this.$dropdownContainer.css(a)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),u.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,s){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,s)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,s=0;s<t.length;s++){var i=t[s];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),u.define("select2/dropdown/selectOnClose",["../utils"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("close",function(e){s._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}n=this.getHighlightedResults();n.length<1||(null!=(n=s.GetData(n[0],"data")).element&&n.element.selected||null==n.element&&n.selected||this.trigger("select",{data:n}))},e}),u.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(e){s._selectTriggered(e)}),t.on("unselect",function(e){s._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),u.define("select2/dropdown/dropdownCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("dropdownCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(s){function e(){}return e.prototype.highlightFirstItem=function(e){var t=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(0<t.length){var n=t.first(),t=s.GetData(n[0],"data").element;if(t&&t.getAttribute&&"true"===t.getAttribute("data-select2-tag"))return void n.trigger("mouseenter")}e.call(this)},e}),u.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,e="Please delete "+t+" character";return 1!=t&&(e+="s"),e},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}}),u.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./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","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],function(l,r,o,a,c,u,d,p,h,f,g,t,m,y,v,_,b,$,w,x,A,D,S,E,O,C,L,T,q,I,e){function n(){this.reset()}return n.prototype.apply=function(e){var t;null==(e=l.extend(!0,{},this.defaults,e)).dataAdapter&&(null!=e.ajax?e.dataAdapter=v:null!=e.data?e.dataAdapter=y:e.dataAdapter=m,0<e.minimumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,$)),0<e.maximumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,w)),0<e.maximumSelectionLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,x)),e.tags&&(e.dataAdapter=f.Decorate(e.dataAdapter,_)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=f.Decorate(e.dataAdapter,b))),null==e.resultsAdapter&&(e.resultsAdapter=r,null!=e.ajax&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,E)),null!=e.placeholder&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,S)),e.selectOnClose&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,L)),e.tags&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter&&(e.multiple?e.dropdownAdapter=A:(t=f.Decorate(A,D),e.dropdownAdapter=t),0!==e.minimumResultsForSearch&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,C)),e.closeOnSelect&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,T)),null!=e.dropdownCssClass&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,q)),e.dropdownAdapter=f.Decorate(e.dropdownAdapter,O)),null==e.selectionAdapter&&(e.multiple?e.selectionAdapter=a:e.selectionAdapter=o,null!=e.placeholder&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,c)),e.allowClear&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,u)),e.multiple&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,d)),null!=e.selectionCssClass&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,p)),e.selectionAdapter=f.Decorate(e.selectionAdapter,h)),e.language=this._resolveLanguage(e.language),e.language.push("en");for(var n=[],s=0;s<e.language.length;s++){var i=e.language[s];-1===n.indexOf(i)&&n.push(i)}return e.language=n,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:f.escapeMarkup,language:{},matcher:function e(t,n){if(null==t.term||""===t.term.trim())return n;if(n.children&&0<n.children.length){for(var s=l.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&s.children.splice(i,1);return 0<s.children.length?s:e(t,s)}var r=a(n.text).toUpperCase(),o=a(t.term).toUpperCase();return-1<r.indexOf(o)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,s=this.defaults.language,i=t.prop("lang"),t=t.closest("[lang]").prop("lang"),t=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(s),this._resolveLanguage(t));return e.language=t,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(l.isEmptyObject(e))return[];if(l.isPlainObject(e))return[e];for(var t,n=Array.isArray(e)?e:[e],s=[],i=0;i<n.length;i++)s.push(n[i]),"string"==typeof n[i]&&0<n[i].indexOf("-")&&(t=n[i].split("-")[0],s.push(t));return s},n.prototype._processTranslations=function(e,t){for(var n=new g,s=0;s<e.length;s++){var i=new g,r=e[s];if("string"==typeof r)try{i=g.loadPath(r)}catch(e){try{r=this.defaults.amdLanguageBase+r,i=g.loadPath(r)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+r+'" could not be automatically loaded. A fallback will be used instead.')}}else i=l.isPlainObject(r)?new g(r):r;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[l.camelCase(e)]=t;n=f._convertData(n);l.extend(!0,this.defaults,n)},new n}),u.define("select2/options",["jquery","./defaults","./utils"],function(c,n,u){function e(e,t){this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=n.applyFromElement(this.options,t)),this.options=n.apply(this.options)}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.autocomplete&&e.prop("autocomplete")&&(this.options.autocomplete=e.prop("autocomplete")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),u.GetData(e[0],"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.'),u.StoreData(e[0],"data",u.GetData(e[0],"select2Tags")),u.StoreData(e[0],"tags",!0)),u.GetData(e[0],"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."),e.attr("ajax--url",u.GetData(e[0],"ajaxUrl")),u.StoreData(e[0],"ajax-Url",u.GetData(e[0],"ajaxUrl")));var n={};function s(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var r=e[0].attributes[i].name,o="data-";r.substr(0,o.length)==o&&(r=r.substring(o.length),o=u.GetData(e[0],r),n[r.replace(/-([a-z])/g,s)]=o)}c.fn.jquery&&"1."==c.fn.jquery.substr(0,2)&&e[0].dataset&&(n=c.extend(!0,{},e[0].dataset,n));var a,l=c.extend(!0,{},u.GetData(e[0]),n);for(a in l=u._convertData(l))-1<t.indexOf(a)||(c.isPlainObject(this.options[a])?c.extend(this.options[a],l[a]):this.options[a]=l[a]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),u.define("select2/core",["jquery","./options","./utils","./keys"],function(t,i,r,s){var o=function(e,t){null!=r.GetData(e[0],"select2")&&r.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new i(t,e),o.__super__.constructor.call(this);var n=e.attr("tabindex")||0;r.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");t=this.options.get("dataAdapter");this.dataAdapter=new t(e,this.options);n=this.render();this._placeContainer(n);t=this.options.get("selectionAdapter");this.selection=new t(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,n);t=this.options.get("dropdownAdapter");this.dropdown=new t(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,n);n=this.options.get("resultsAdapter");this.results=new n(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var s=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){s.trigger("selection:update",{data:e})}),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),r.StoreData(e[0],"select2",this),e.data("select2",this)};return r.Extend(o,r.Observable),o.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+r.generateChars(2):r.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var s=this._resolveWidth(e,"style");return null!=s?s:this._resolveWidth(e,"element")}if("element"==t){s=e.outerWidth(!1);return s<=0?"auto":s+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;e=e.attr("style");if("string"!=typeof e)return null;for(var i=e.split(";"),r=0,o=i.length;r<o;r+=1){var a=i[r].replace(/\s/g,"").match(n);if(null!==a&&1<=a.length)return a[1]}return null},o.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)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=r.bind(this._syncAttributes,this),this._syncS=r.bind(this._syncSubtree,this),this._observer=new window.MutationObserver(function(e){t._syncA(),t._syncS(e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},o.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerSelectionEvents=function(){var n=this,s=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===s.indexOf(e)&&n.trigger(e,t)})},o.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container[0].classList.add("select2-container--open")}),this.on("close",function(){n.$container[0].classList.remove("select2-container--open")}),this.on("enable",function(){n.$container[0].classList.remove("select2-container--disabled")}),this.on("disable",function(){n.$container[0].classList.add("select2-container--disabled")}),this.on("blur",function(){n.$container[0].classList.remove("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===s.ESC||t===s.UP&&e.altKey?(n.close(e),e.preventDefault()):t===s.ENTER||t===s.TAB?(n.trigger("results:select",{}),e.preventDefault()):t===s.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===s.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===s.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===s.ENTER||t===s.SPACE||t===s.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&0<e.addedNodes.length){for(var n=0;n<e.addedNodes.length;n++)if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&0<e.removedNodes.length)return!0;if(Array.isArray(e))return e.some(function(e){return t._isChangeMutation(e)})}return!1},o.prototype._syncSubtree=function(e){var e=this._isChangeMutation(e),t=this;e&&this.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,s={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in s){var i=s[e],s={prevented:!1,name:e,args:t};if(n.call(this,i,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},o.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},o.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){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!=e&&0!==e.length||(e=[!0]);e=!e[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&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 t=[];return this.dataAdapter.current(function(e){t=e}),t},o.prototype.val=function(e){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==e||0===e.length)return this.$element.val();e=e[0];Array.isArray(e)&&(e=e.map(function(e){return e.toString()})),this.$element.val(e).trigger("input").trigger("change")},o.prototype.destroy=function(){r.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",r.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),r.RemoveData(this.$element[0]),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},o.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),r.StoreData(e[0],"element",this.$element),e},o}),u.define("jquery-mousewheel",["jquery"],function(e){return e}),u.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,r,t,o){var a;return null==i.fn.select2&&(a=["open","close","destroy"],i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new r(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,s)}),-1<a.indexOf(t)?this:n}),null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),r}),{define:u.define,require:u.require});function b(e,t){return i.call(e,t)}function l(e,t){var n,s,i,r,o,a,l,c,u,d,p=t&&t.split("/"),h=y.map,f=h&&h["*"]||{};if(e){for(t=(e=e.split("/")).length-1,y.nodeIdCompat&&_.test(e[t])&&(e[t]=e[t].replace(_,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),c=0;c<e.length;c++)"."===(d=e[c])?(e.splice(c,1),--c):".."===d&&(0===c||1===c&&".."===e[2]||".."===e[c-1]||0<c&&(e.splice(c-1,2),c-=2));e=e.join("/")}if((p||f)&&h){for(c=(n=e.split("/")).length;0<c;--c){if(s=n.slice(0,c).join("/"),p)for(u=p.length;0<u;--u)if(i=h[p.slice(0,u).join("/")],i=i&&i[s]){r=i,o=c;break}if(r)break;!a&&f&&f[s]&&(a=f[s],l=c)}!r&&a&&(r=a,o=l),r&&(n.splice(0,o,r),e=n.join("/"))}return e}function w(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),o.apply(p,e.concat([t,n]))}}function x(e){var t;if(b(m,e)&&(t=m[e],delete m[e],v[e]=!0,r.apply(p,t)),!b(g,e)&&!b(v,e))throw new Error("No "+e);return g[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function A(e){return e?c(e):[]}var u=s.require("jquery.select2");return t.fn.select2.amd=s,u});
download-manager.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://www.wpdownloadmanager.com/purchases/
5
  Description: Manage, Protect and Track file downloads, and sell digital products from your WordPress site. A complete digital asset management solution.
6
  Author: W3 Eden, Inc.
7
  Author URI: https://www.wpdownloadmanager.com/
8
- Version: 3.2.21
9
  Text Domain: download-manager
10
  Domain Path: /languages
11
  */
@@ -39,7 +39,7 @@ use WPDM\Widgets\WidgetController;
39
 
40
  global $WPDM;
41
 
42
- define('WPDM_VERSION','3.2.21');
43
 
44
  define('WPDM_TEXT_DOMAIN','download-manager');
45
 
@@ -72,9 +72,6 @@ if(!defined('WPDM_MENU_ACCESS_CAP'))
72
  define('WPDM_BASE_DIR',dirname(__FILE__).'/');
73
  define('WPDM_SRC_DIR',dirname(__FILE__).'/src/');
74
 
75
- /**
76
- * Plugin base url
77
- */
78
  define('WPDM_BASE_URL',plugins_url('/download-manager/'));
79
 
80
  if(!defined('UPLOAD_DIR'))
@@ -450,25 +447,6 @@ final class WordPressDownloadManager{
450
  }
451
 
452
 
453
- if(is_object($post) && ( wpdm_query_var('adb_page') != '' || get_option('__wpdm_author_dashboard') == $post->ID || has_shortcode($post->post_content,'wpdm_frontend') || has_shortcode($post->post_content,'wpdm_package_form') || has_shortcode($post->post_content,'wpdm_user_dashboard') || (function_exists('has_block') && has_block('download-manager/dashboard')) || has_shortcode($post->post_content,'wpdm-file-browser') ) ){
454
- wp_enqueue_script('jquery-validate');
455
- wp_enqueue_script('jquery-ui');
456
- wp_enqueue_script('jquery-ui-datepicker');
457
- wp_enqueue_script('thickbox');
458
- wp_enqueue_style('thickbox');
459
- wp_enqueue_script('media-upload');
460
- wp_enqueue_script('jquery-ui-datepicker');
461
- wp_enqueue_script('jquery-ui-slider');
462
- wp_enqueue_script('jquery-ui-sortable');
463
- wp_enqueue_script('jquery-ui-timepicker', WPDM_BASE_URL.'assets/js/jquery-ui-timepicker-addon.js',array('jquery','jquery-ui-core','jquery-ui-datepicker','jquery-ui-slider') );
464
- wp_enqueue_media();
465
- wp_enqueue_style('jqui-css', plugins_url('/download-manager/assets/jqui/theme/jquery-ui.css'));
466
-
467
- wp_enqueue_script('chosen', plugins_url('/download-manager/assets/js/chosen.jquery.min.js'), array('jquery'));
468
- wp_enqueue_style('chosen-css', plugins_url('/download-manager/assets/css/chosen.css'), 999999);
469
- }
470
-
471
-
472
  if (is_array($wpdmss) && !in_array('wpdm-bootstrap-css', $wpdmss)) {
473
  wp_enqueue_style('wpdm-front-bootstrap' );
474
  }
5
  Description: Manage, Protect and Track file downloads, and sell digital products from your WordPress site. A complete digital asset management solution.
6
  Author: W3 Eden, Inc.
7
  Author URI: https://www.wpdownloadmanager.com/
8
+ Version: 3.2.23
9
  Text Domain: download-manager
10
  Domain Path: /languages
11
  */
39
 
40
  global $WPDM;
41
 
42
+ define('WPDM_VERSION','3.2.23');
43
 
44
  define('WPDM_TEXT_DOMAIN','download-manager');
45
 
72
  define('WPDM_BASE_DIR',dirname(__FILE__).'/');
73
  define('WPDM_SRC_DIR',dirname(__FILE__).'/src/');
74
 
 
 
 
75
  define('WPDM_BASE_URL',plugins_url('/download-manager/'));
76
 
77
  if(!defined('UPLOAD_DIR'))
447
  }
448
 
449
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  if (is_array($wpdmss) && !in_array('wpdm-bootstrap-css', $wpdmss)) {
451
  wp_enqueue_style('wpdm-front-bootstrap' );
452
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: download manager, document management, file manager, digital store, ecomme
5
  Requires at least: 5.3
6
  Tested up to: 5.8
7
  License: GPLv2 or later
8
-
9
 
10
 
11
  This File Management & Digital Store plugin will help you to control file downloads & sell digital products from your WP site.
@@ -181,6 +181,13 @@ Check download stats and get a push notification when someone downloads, install
181
 
182
  == Changelog ==
183
 
 
 
 
 
 
 
 
184
  = 3.2.21 - 2021.11.23 =
185
  * Added option to delete file from server
186
  * Improved admin UI
5
  Requires at least: 5.3
6
  Tested up to: 5.8
7
  License: GPLv2 or later
8
+ Stable tag: 3.2.23
9
 
10
 
11
  This File Management & Digital Store plugin will help you to control file downloads & sell digital products from your WP site.
181
 
182
  == Changelog ==
183
 
184
+ = 3.2.23 - 2021.11.25 =
185
+ * Fixed some sanitization issues
186
+ * Removed chosen js library, using select2 now
187
+
188
+ = 3.2.22 - 2021.11.24 =
189
+ * Fixed a security issue with the email template editor
190
+
191
  = 3.2.21 - 2021.11.23 =
192
  * Added option to delete file from server
193
  * Improved admin UI
src/Admin/AdminController.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace WPDM\Admin;
4
 
 
5
  use WPDM\__\Email;
6
  use WPDM\Admin\Menu\AddOns;
7
  use WPDM\Admin\Menu\Categories;
@@ -33,10 +34,6 @@ class AdminController {
33
  add_action('admin_init', array(new Email(), 'preview'));
34
  add_action('admin_head', array($this, 'adminHead'));
35
 
36
- add_action('wp_ajax_updatenow', array($this, 'updateNow'));
37
-
38
- add_action('wp_ajax_wpdm_email_package_link', array($this, 'emailPackageLink'));
39
-
40
  add_action('wp_ajax_updateaddon', array($this, 'updateAddon'));
41
  add_action('wp_ajax_installaddon', array($this, 'installAddon'));
42
 
@@ -95,28 +92,28 @@ class AdminController {
95
  wp_enqueue_script('media-upload');
96
  wp_enqueue_media();
97
 
98
- wp_enqueue_script('chosen', plugins_url('/download-manager/assets/js/chosen.jquery.min.js'), array('jquery'));
99
- wp_enqueue_style('chosen-css', plugins_url('/download-manager/assets/css/chosen.css'));
100
- wp_enqueue_style('jqui-css', plugins_url('/download-manager/assets/jqui/theme/jquery-ui.css'));
101
 
102
  wp_enqueue_script('wpdm-admin-bootstrap' );
103
 
104
- wp_enqueue_script('wpdm-vue', plugins_url('/download-manager/assets/js/vue.min.js'));
105
- wp_enqueue_script('wpdm-admin', plugins_url('/download-manager/assets/js/wpdm-admin.js'), array('jquery'));
106
 
107
 
108
  wp_enqueue_style( 'wpdm-font-awesome' );
109
  wp_enqueue_style( 'wpdm-admin-bootstrap' );
110
 
111
  //wp_enqueue_style('wpdm-bootstrap-theme', plugins_url('/download-manager/assets/css/front.css'));
112
- wp_enqueue_style('wpdm-admin-styles', plugins_url('/download-manager/assets/css/admin-styles.css'), 9999);
113
 
114
  wp_enqueue_style( 'wp-color-picker' );
115
  wp_enqueue_script( 'wp-color-picker' );
116
 
117
 
118
  }
119
- wp_enqueue_style('wpdm-gutenberg-styles', plugins_url('/download-manager/assets/css/gutenberg-styles.css'), 9999);
120
  }
121
 
122
  function pageHeader($title, $icon, $menus = [], $actions = [], $params = [])
@@ -124,41 +121,19 @@ class AdminController {
124
  include wpdm_admin_tpl_path("page-header.php", __DIR__.'/views');
125
  }
126
 
127
- /**
128
- * @usage mail package link to specified email address
129
- * @since 4.6.9
130
- */
131
- function emailPackageLink(){
132
- if(!wp_verify_nonce(wpdm_query_var('__edlnonce'), NONCE_KEY)) die('!!error!!');
133
- $data = isset($_POST['emldllink'])?$_POST['emldllink']:array();
134
- if(!isset($data['email']) || empty($data['email'])) die('!!error!!');
135
- $user_emails = explode(",", $data['email']);
136
- $pack = get_post($data['pid']);
137
- $subject = !isset($data['subject']) || empty($data['subject'])? 'Download: '.$pack->post_title:$data['subject'];
138
- $data['message'] = !isset($data['message']) || empty($data['message'])? 'Please click on following link to start download:':$data['message'];
139
- $usage = isset($data['usage'])?(int)$data['usage']:3;
140
- $expire = isset($data['expire'])?(double)$data['expire']:60;
141
- foreach ($user_emails as $user_email) {
142
- $download_link = WPDM()->package->expirableDownloadPage($data['pid'], $usage, $expire*$data['expire_multiply']);
143
- $message = wp_kses_stripslashes($data['message']) . "<br/><a class='button' href='{$download_link}'>Download</a><br/>";
144
- $params = array('subject' => $subject, 'to_email' => trim($user_email), 'message' => $message );
145
- Email::send("default", $params);
146
- }
147
- die('!!sent!!');
148
-
149
- }
150
 
151
  /**
152
  * @usage Single click add-on update
153
  */
154
  function updateAddon() {
155
- if (isset($_POST['updateurl']) && current_user_can(WPDM_ADMIN_CAP)) {
 
156
  include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
157
  include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
158
  $upgrader = new \Plugin_Upgrader(new \Plugin_Installer_Skin(compact('title', 'url', 'nonce', 'plugin', 'api')));
159
- $downloadlink = $_POST['updateurl'] . '&wpdm_access_token=' . wpdm_access_token() . '&__wpdmnocache=' . uniqid();
160
  $update = new \stdClass();
161
- $plugininfo = wpdm_plugin_data($_POST['plugin']);
162
  deactivate_plugins($plugininfo['plugin_index_file'], true);
163
  delete_plugins(array($plugininfo['plugin_index_file']));
164
  $upgrader->install($downloadlink);
@@ -174,13 +149,14 @@ class AdminController {
174
  * @usage Single click add-on install
175
  */
176
  function installAddon() {
177
- if (isset($_POST['updateurl']) && current_user_can(WPDM_ADMIN_CAP)) {
 
178
  include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
179
  include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
180
  $upgrader = new \Plugin_Upgrader(new \Plugin_Installer_Skin(compact('title', 'url', 'nonce', 'plugin', 'api')));
181
- $downloadlink = $_POST['updateurl'] . '&wpdm_access_token=' . wpdm_access_token();
182
  $upgrader->install($downloadlink);
183
- $plugininfo = wpdm_plugin_data($_POST['plugin']);
184
  if (file_exists(dirname(WPDM_BASE_DIR) . '/' . $plugininfo['plugin_index_file']))
185
  activate_plugin($plugininfo['plugin_index_file']);
186
  die("Installed Successfully");
@@ -206,6 +182,7 @@ class AdminController {
206
 
207
  function removeNotices()
208
  {
 
209
  update_option('__wpdm_hide_admin_notice', 1, false);
210
  wp_send_json(['success' => true]);
211
  }
@@ -226,7 +203,7 @@ class AdminController {
226
  });
227
 
228
  jQuery('body').on('click', '#wpdmvnotice .notice-dismiss', function (){
229
- jQuery.post(ajaxurl, {action: 'wpdm_remove_admin_notice'});
230
  });
231
 
232
  });
2
 
3
  namespace WPDM\Admin;
4
 
5
+ use WPDM\__\__;
6
  use WPDM\__\Email;
7
  use WPDM\Admin\Menu\AddOns;
8
  use WPDM\Admin\Menu\Categories;
34
  add_action('admin_init', array(new Email(), 'preview'));
35
  add_action('admin_head', array($this, 'adminHead'));
36
 
 
 
 
 
37
  add_action('wp_ajax_updateaddon', array($this, 'updateAddon'));
38
  add_action('wp_ajax_installaddon', array($this, 'installAddon'));
39
 
92
  wp_enqueue_script('media-upload');
93
  wp_enqueue_media();
94
 
95
+ wp_enqueue_script('select2', WPDM_BASE_URL.'assets/select2/js/select2.min.js', array('jquery'));
96
+ wp_enqueue_style('select2-css', WPDM_BASE_URL.'assets/select2/css/select2.min.css');
97
+ wp_enqueue_style('jqui-css', WPDM_BASE_URL.'assets/jqui/theme/jquery-ui.css');
98
 
99
  wp_enqueue_script('wpdm-admin-bootstrap' );
100
 
101
+ wp_enqueue_script('wpdm-vue', WPDM_BASE_URL.'assets/js/vue.min.js');
102
+ wp_enqueue_script('wpdm-admin', WPDM_BASE_URL.'js/wpdm-admin.js', array('jquery'));
103
 
104
 
105
  wp_enqueue_style( 'wpdm-font-awesome' );
106
  wp_enqueue_style( 'wpdm-admin-bootstrap' );
107
 
108
  //wp_enqueue_style('wpdm-bootstrap-theme', plugins_url('/download-manager/assets/css/front.css'));
109
+ wp_enqueue_style('wpdm-admin-styles', WPDM_BASE_URL.'assets/css/admin-styles.css', 9999);
110
 
111
  wp_enqueue_style( 'wp-color-picker' );
112
  wp_enqueue_script( 'wp-color-picker' );
113
 
114
 
115
  }
116
+ wp_enqueue_style('wpdm-gutenberg-styles',WPDM_BASE_URL.'assets/css/gutenberg-styles.css', 9999);
117
  }
118
 
119
  function pageHeader($title, $icon, $menus = [], $actions = [], $params = [])
121
  include wpdm_admin_tpl_path("page-header.php", __DIR__.'/views');
122
  }
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
 
125
  /**
126
  * @usage Single click add-on update
127
  */
128
  function updateAddon() {
129
+ if (isset($_POST['updateurl'])) {
130
+ __::isAuthentic('__upanonce', WPDM_PRI_NONCE, WPDM_ADMIN_CAP);
131
  include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
132
  include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
133
  $upgrader = new \Plugin_Upgrader(new \Plugin_Installer_Skin(compact('title', 'url', 'nonce', 'plugin', 'api')));
134
+ $downloadlink = wpdm_query_var('updateurl') . '&wpdm_access_token=' . wpdm_access_token() . '&__wpdmnocache=' . uniqid();
135
  $update = new \stdClass();
136
+ $plugininfo = wpdm_plugin_data(wpdm_query_var('plugin'));
137
  deactivate_plugins($plugininfo['plugin_index_file'], true);
138
  delete_plugins(array($plugininfo['plugin_index_file']));
139
  $upgrader->install($downloadlink);
149
  * @usage Single click add-on install
150
  */
151
  function installAddon() {
152
+ if (isset($_POST['updateurl'])) {
153
+ __::isAuthentic('__upanonce', WPDM_PRI_NONCE, WPDM_ADMIN_CAP);
154
  include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
155
  include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
156
  $upgrader = new \Plugin_Upgrader(new \Plugin_Installer_Skin(compact('title', 'url', 'nonce', 'plugin', 'api')));
157
+ $downloadlink = wpdm_query_var('updateurl') . '&wpdm_access_token=' . wpdm_access_token();
158
  $upgrader->install($downloadlink);
159
+ $plugininfo = wpdm_plugin_data(wpdm_query_var('plugin'));
160
  if (file_exists(dirname(WPDM_BASE_DIR) . '/' . $plugininfo['plugin_index_file']))
161
  activate_plugin($plugininfo['plugin_index_file']);
162
  die("Installed Successfully");
182
 
183
  function removeNotices()
184
  {
185
+ __::isAuthentic('__rnnonce', WPDM_PUB_NONCE, WPDM_ADMIN_CAP);
186
  update_option('__wpdm_hide_admin_notice', 1, false);
187
  wp_send_json(['success' => true]);
188
  }
203
  });
204
 
205
  jQuery('body').on('click', '#wpdmvnotice .notice-dismiss', function (){
206
+ jQuery.post(ajaxurl, {action: 'wpdm_remove_admin_notice', __rnnonce: '<?= wp_create_nonce(WPDM_PUB_NONCE) ?>'});
207
  });
208
 
209
  });
src/Admin/Menu/Categories.php CHANGED
@@ -8,6 +8,8 @@
8
  namespace WPDM\Admin\Menu;
9
 
10
 
 
 
11
  class Categories
12
  {
13
 
@@ -471,7 +473,7 @@ class Categories
471
  //$MetaData = get_option( "__wpdmcategory" );
472
  //$MetaData = maybe_unserialize($MetaData);
473
  foreach ($_POST['__wpdmcategory'] as $metaKey => $metaValue){
474
- update_term_meta($term_id, "__wpdm_".$metaKey, $metaValue);
475
  }
476
  //$MetaData[$term_id] = $_POST['__wpdmcategory'];
477
  //update_option( "__wpdmcategory", $MetaData );
8
  namespace WPDM\Admin\Menu;
9
 
10
 
11
+ use WPDM\__\__;
12
+
13
  class Categories
14
  {
15
 
473
  //$MetaData = get_option( "__wpdmcategory" );
474
  //$MetaData = maybe_unserialize($MetaData);
475
  foreach ($_POST['__wpdmcategory'] as $metaKey => $metaValue){
476
+ update_term_meta($term_id, "__wpdm_".__::sanitize_var($metaKey, 'txt'), __::sanitize_var($metaValue));
477
  }
478
  //$MetaData[$term_id] = $_POST['__wpdmcategory'];
479
  //update_option( "__wpdmcategory", $MetaData );
src/Admin/Menu/Packages.php CHANGED
@@ -147,7 +147,7 @@ class Packages
147
  check_ajax_referer(NONCE_KEY);
148
  if(!current_user_can('upload_files')) die('-2');
149
 
150
- $name = isset($_FILES['package_file']['name']) && !isset($_REQUEST["chunks"])?$_FILES['package_file']['name']:$_REQUEST['name'];
151
 
152
  $ext = FileSystem::fileExt($name);
153
 
@@ -158,7 +158,7 @@ class Packages
158
  @set_time_limit(0);
159
 
160
  if(!file_exists(UPLOAD_DIR)){
161
- WordPressDownloadManager::createDir();
162
  }
163
 
164
  if(file_exists(UPLOAD_DIR.$name) && get_option('__wpdm_overwrrite_file',0)==1){
147
  check_ajax_referer(NONCE_KEY);
148
  if(!current_user_can('upload_files')) die('-2');
149
 
150
+ $name = isset($_FILES['package_file']['name']) && !isset($_REQUEST["chunks"])?$_FILES['package_file']['name']:wpdm_query_var('name', 'escs');
151
 
152
  $ext = FileSystem::fileExt($name);
153
 
158
  @set_time_limit(0);
159
 
160
  if(!file_exists(UPLOAD_DIR)){
161
+ WPDM()->createDir();
162
  }
163
 
164
  if(file_exists(UPLOAD_DIR.$name) && get_option('__wpdm_overwrrite_file',0)==1){
src/Admin/Menu/Settings.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace WPDM\Admin\Menu;
4
 
 
5
  use WPDM\__\Installer;
6
  use WPDM\__\Session;
7
 
@@ -205,21 +206,15 @@ class Settings
205
 
206
  $refresh = 0;
207
 
208
- $page_id = $_POST['__wpdm_user_dashboard'];
209
  if($page_id != '') {
210
  $page_name = get_post_field("post_name", $page_id);
211
  add_rewrite_rule('^' . $page_name . '/(.+)/?', 'index.php?page_id=' . $page_id . '&udb_page=$matches[1]', 'top');
212
  $refresh = 1;
213
  }
214
 
215
- $page_id = $_POST['__wpdm_author_dashboard'];
216
- if($page_id != '') {
217
- $page_name = get_post_field("post_name", $page_id);
218
- add_rewrite_rule('^' . $page_name . '/(.+)/?', 'index.php?page_id=' . $page_id . '&adb_page=$matches[1]', 'top');
219
- $refresh = 1;
220
- }
221
 
222
- $page_id = $_POST['__wpdm_author_profile'];
223
  if((int)$page_id > 0) {
224
  $page_name = get_post_field("post_name", $page_id);
225
  add_rewrite_rule('^' . $page_name . '/(.+)/?$', 'index.php?pagename=' . $page_name . '&profile=$matches[1]', 'top');
@@ -283,6 +278,7 @@ class Settings
283
 
284
  function pluginUpdate(){
285
  if(isset($_REQUEST['__lononce']) && wp_verify_nonce($_REQUEST['__lononce'], WPDMSET_NONCE_KEY)){
 
286
  delete_option('__wpdm_suname');
287
  delete_option('__wpdm_supass');
288
  delete_option('__wpdm_purchased_items');
2
 
3
  namespace WPDM\Admin\Menu;
4
 
5
+ use WPDM\__\__;
6
  use WPDM\__\Installer;
7
  use WPDM\__\Session;
8
 
206
 
207
  $refresh = 0;
208
 
209
+ $page_id = wpdm_query_var('__wpdm_user_dashboard', 'int');
210
  if($page_id != '') {
211
  $page_name = get_post_field("post_name", $page_id);
212
  add_rewrite_rule('^' . $page_name . '/(.+)/?', 'index.php?page_id=' . $page_id . '&udb_page=$matches[1]', 'top');
213
  $refresh = 1;
214
  }
215
 
 
 
 
 
 
 
216
 
217
+ $page_id = wpdm_query_var('__wpdm_author_profile', 'int');
218
  if((int)$page_id > 0) {
219
  $page_name = get_post_field("post_name", $page_id);
220
  add_rewrite_rule('^' . $page_name . '/(.+)/?$', 'index.php?pagename=' . $page_name . '&profile=$matches[1]', 'top');
278
 
279
  function pluginUpdate(){
280
  if(isset($_REQUEST['__lononce']) && wp_verify_nonce($_REQUEST['__lononce'], WPDMSET_NONCE_KEY)){
281
+ __::isAuthentic('__lononce');
282
  delete_option('__wpdm_suname');
283
  delete_option('__wpdm_supass');
284
  delete_option('__wpdm_purchased_items');
src/Admin/Menu/Stats.php CHANGED
@@ -9,6 +9,7 @@
9
  namespace WPDM\Admin\Menu;
10
 
11
 
 
12
  use WPDM\__\Crypt;
13
  use WPDM\__\FileSystem;
14
 
@@ -34,6 +35,7 @@ class Stats
34
 
35
  public function ajax_callback_get_packages()
36
  {
 
37
  global $wpdb;
38
  $posts_table = "{$wpdb->base_prefix}posts";
39
  $packages = [];
@@ -54,6 +56,7 @@ class Stats
54
 
55
  public function ajax_callback_get_users()
56
  {
 
57
  global $wpdb;
58
  $users_table = "{$wpdb->prefix}users";
59
  $term = wpdm_query_var('term');
9
  namespace WPDM\Admin\Menu;
10
 
11
 
12
+ use WPDM\__\__;
13
  use WPDM\__\Crypt;
14
  use WPDM\__\FileSystem;
15
 
35
 
36
  public function ajax_callback_get_packages()
37
  {
38
+ __::isAuthentic('__spnonce', WPDM_PUB_NONCE, WPDM_MENU_ACCESS_CAP);
39
  global $wpdb;
40
  $posts_table = "{$wpdb->base_prefix}posts";
41
  $packages = [];
56
 
57
  public function ajax_callback_get_users()
58
  {
59
+ __::isAuthentic('__spnonce', WPDM_PUB_NONCE, WPDM_MENU_ACCESS_CAP);
60
  global $wpdb;
61
  $users_table = "{$wpdb->prefix}users";
62
  $term = wpdm_query_var('term');
src/Admin/Menu/Templates.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace WPDM\Admin\Menu;
4
 
5
 
 
6
  use WPDM\__\Crypt;
7
  use WPDM\__\Template;
8
 
@@ -15,22 +16,16 @@ class Templates
15
  add_filter('wdm_before_fetch_template', array($this, 'introduceCustomTags'), 99, 3 );
16
  //add_action('admin_init', array($this, 'Save'));
17
  add_action('wp_ajax_template_preview', array($this, 'preview'));
18
- add_action('wp_ajax_wpdm_delete_template', array($this, 'deleteTemplate'));
19
- add_action('wp_ajax_wpdm_save_template', array($this, 'save'));
20
  add_action('wp_ajax_wpdm_save_email_template', array($this, 'saveEmailTemplate'));
21
  add_action('wp_ajax_update_template_status', array($this, 'updateTemplateStatus'));
22
  add_action('wp_ajax_wpdm_save_email_setting', array($this, 'saveEmailSetting'));
23
- add_action('wp_ajax_wpdm_save_custom_tag', array($this, 'saveCustomTag'));
24
- add_action('wp_ajax_wpdm_edit_custom_tag', array($this, 'editCustomTag'));
25
- add_action('wp_ajax_wpdm_delete_custom_tag', array($this, 'deleteCustomTag'));
26
  add_action('wp_ajax_connect_template_server', array($this, 'templateServer'));
27
- add_action('wp_ajax_wpdm_import_template', array($this, 'importTemplate'));
28
  add_action('admin_menu', array($this, 'menu'));
29
  }
30
 
31
  function livePreview(){
32
-
33
- if(wp_verify_nonce(wpdm_query_var('_tplnonce'), NONCE_KEY) && current_user_can(WPDM_ADMIN_CAP) && wpdm_query_var('template_preview') !== '') {
34
  add_filter( 'show_admin_bar', '__return_false' );
35
  $page_template = Template::locate('template-preview.php', WPDM_SRC_DIR.'__/views');
36
  $type = wpdm_query_var('_type');
@@ -41,7 +36,7 @@ class Templates
41
  $package = get_posts(array('post_type' => 'wpdmpro', 'posts_per_page' => 1, 'post_status' => 'publish'));
42
  $package = (array)$package[0];
43
  }
44
- $template = Crypt::decrypt($_REQUEST['template_preview']);
45
  $template = stripslashes_deep(str_replace(array("\r", "\n"), "", html_entity_decode(urldecode($template))));
46
  $output = wpdm_fetch_template($template, $package, $type);
47
  $template = "<div class='w3eden' style='max-width: 900px;margin: 20px auto !important;padding: 40px;'>{$output}</div><script> jQuery(function($) { var body = document.body, html = document.documentElement; var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight ); window.parent.wpdmifh(height); });</script>";
@@ -82,62 +77,9 @@ class Templates
82
  include wpdm_admin_tpl_path('templates/templates.php');
83
  }
84
 
85
- /**
86
- * @usage Delete link/page template
87
- * @since 4.7.0
88
- */
89
-
90
- function deleteTemplate(){
91
- if (current_user_can(WPDM_ADMIN_CAP)) {
92
- $ttype = wpdm_query_var('ttype');
93
- $tplid = wpdm_query_var('tplid');
94
- /*$tpldata = maybe_unserialize(get_option("_fm_{$ttype}_templates"));
95
- if (!is_array($tpldata)) $tpldata = array();
96
- unset($tpldata[$tplid]);
97
- update_option("_fm_{$ttype}_templates", $tpldata);*/
98
- WPDM()->packageTemplate->delete($tplid, $ttype);
99
- die('ok');
100
- }
101
-
102
- }
103
-
104
-
105
- /**
106
- * @usage Save Link/Page Templates
107
- */
108
- function save()
109
- {
110
- //if (!isset($_GET['page']) || $_GET['page'] != 'templates') return;
111
-
112
- $ttype = isset($_REQUEST['_type']) ? wpdm_query_var('_type') : 'link';
113
-
114
- if (isset($_REQUEST['task']) && $_REQUEST['task'] == 'DeleteTemplate') {
115
- WPDM()->packageTemplate->delete(wpdm_query_var('tplid'), $ttype);
116
- wp_send_json(array('success' => true));
117
- }
118
-
119
- if (isset($_POST['tpl'])) {
120
-
121
- $tplid = wpdm_query_var('tplid');
122
- if(!$tplid)
123
- wp_send_json(array('success' => false));
124
- if(wpdm_query_var('tplid_old') !== '' && isset($tpldata[wpdm_query_var('tplid_old')])){
125
- unset($tpldata[wpdm_query_var('tplid_old')]);
126
- }
127
-
128
- WPDM()->packageTemplate->delete(wpdm_query_var('tplid_old'), wpdm_query_var('_type'))
129
- ->add(wpdm_query_var('tplid'), wpdm_query_var('tpl/name'), wpdm_query_var('tpl/content', 'escs'), wpdm_query_var('tpl/css', 'escs'));
130
-
131
- wp_send_json(array('success' => true, 'message' => __( "Template is saved successfully!", "download-manager" )));
132
-
133
- die();
134
- }
135
-
136
-
137
- }
138
-
139
  function saveEmailTemplate(){
140
  if (isset($_POST['email_template'])) {
 
141
  $email_template = wpdm_query_var('email_template', array('validate' => array('subject' => '', 'message' => 'escs', 'from_name' => '', 'from_email' => '')));
142
  update_option("__wpdm_etpl_".wpdm_query_var('id'), $email_template, false);
143
  wp_send_json(array('success' => true, 'message' => 'Email Template Saved!'));
@@ -154,9 +96,7 @@ class Templates
154
  error_reporting(0);
155
 
156
  $wposts = array();
157
-
158
- if(!current_user_can(WPDM_ADMIN_CAP)) die(__( "Unauthorized Access!", "download-manager" ));
159
-
160
  $template = isset($_REQUEST['template'])?wpdm_query_var('template', 'escs'):'';
161
  $type = wpdm_query_var("_type");
162
  $css = wpdm_query_var("css","txt");
@@ -266,46 +206,12 @@ class Templates
266
  }
267
 
268
  function saveEmailSetting(){
269
- if(wp_verify_nonce(wpdm_query_var('__sesnonce'), WPDM_PRI_NONCE) && current_user_can(WPDM_ADMIN_CAP)) {
270
- check_ajax_referer(WPDM_PRI_NONCE, '__sesnonce');
271
- update_option('__wpdm_email_template', wpdm_query_var('__wpdm_email_template'), false);
272
- $email_settings = wpdm_query_var('__wpdm_email_setting', array('validate' => array('logo' => 'url', 'banner' => 'url', 'youtube' => 'url', 'twitter' => 'url', 'facebook' => 'url', 'footer_text' => 'txts')));
273
- update_option('__wpdm_email_setting', $email_settings, false);
274
- die("Done!");
275
- }
276
- }
277
-
278
- function saveCustomTag(){
279
- if(wp_verify_nonce(wpdm_query_var('__ctxnonce'), NONCE_KEY) && current_user_can(WPDM_ADMIN_CAP)){
280
- $upload_dir = wp_upload_dir();
281
- $upload_dir = $upload_dir['basedir'];
282
- $tags_dir = $upload_dir.'/wpdm-custom-tags/';
283
- if(!file_exists($tags_dir)) mkdir($tags_dir, 0755, true);
284
- file_put_contents($tags_dir.wpdm_query_var('ctag/name', 'filename').'.tag', stripslashes($_REQUEST['ctag']['value']));
285
- wp_send_json(array('success' => true, 'name' => wpdm_query_var('ctag/name', 'filename'), 'value' => htmlspecialchars(stripslashes($_REQUEST['ctag']['value']))));
286
- }
287
- }
288
-
289
- function editCustomTag(){
290
- if(current_user_can(WPDM_ADMIN_CAP)){
291
- $upload_dir = wp_upload_dir();
292
- $upload_dir = $upload_dir['basedir'];
293
- $tags_dir = $upload_dir.'/wpdm-custom-tags/';
294
- if(!file_exists($tags_dir)) mkdir($tags_dir, 0755, true);
295
- $tag_value = file_get_contents($tags_dir.wpdm_query_var('tag', 'filename').'.tag');
296
- wp_send_json(array('success' => true, 'name' => wpdm_query_var('tag', 'filename'), 'value' => stripslashes($tag_value)));
297
- }
298
- }
299
 
300
- function deleteCustomTag(){
301
- if(current_user_can(WPDM_ADMIN_CAP)){
302
- $upload_dir = wp_upload_dir();
303
- $upload_dir = $upload_dir['basedir'];
304
- $tags_dir = $upload_dir.'/wpdm-custom-tags/';
305
- if(!file_exists($tags_dir)) mkdir($tags_dir, 0755, true);
306
- @unlink($tags_dir.wpdm_query_var('tag', 'filename').'.tag');
307
- wp_send_json(array('success' => true));
308
- }
309
  }
310
 
311
  function updateTemplateStatus(){
@@ -335,42 +241,8 @@ class Templates
335
  }
336
 
337
  function templateServer(){
338
- $access = \WPDM\__\Settings::license_det();
339
- $access = json_decode($access);
340
-
341
- if(is_object($access) && $access->expire > time()){
342
- $templates = wpdm_remote_get("https://www.wpdownloadmanager.com/wpdm-templates/import.json");
343
- $templates = (array)json_decode($templates);
344
- ?>
345
- <div class="row">
346
- <?php foreach ($templates as $template => $info) { ?>
347
- <div class="col-md-3">
348
- <div class="panel panel-default">
349
- <div class="panel-body text-center">
350
- <img src="<?php echo $info->preview; ?>" alt="Preview" />
351
- </div>
352
- <div class="panel-footer import-footer" style="position: relative">
353
- <button data-template="<?php echo $template; ?>" data-type="<?php echo $info->type; ?>" class="btn btn-sm btn-import-template btn-secondary">Import</button>
354
- <div style="width: calc(100% - 100px)" class="ellipsis">
355
- <?php echo $info->name; ?>
356
- </div>
357
- </div>
358
- </div>
359
- </div>
360
- <?php } ?>
361
- </div>
362
- <?php
363
- } else {
364
- wpdmpro_required();
365
- }
366
  die();
367
  }
368
 
369
- function importTemplate(){
370
- if(!wpdm_query_var('template'))
371
- wp_send_json(['success' => false]);
372
- $template = "https://www.wpdownloadmanager.com/wpdm-templates/".wpdm_query_var('template').".xml";
373
- WPDM()->packageTemplate->import($template, wpdm_query_var('template_type'));
374
- wp_send_json(['success' => true]);
375
- }
376
  }
3
  namespace WPDM\Admin\Menu;
4
 
5
 
6
+ use WPDM\__\__;
7
  use WPDM\__\Crypt;
8
  use WPDM\__\Template;
9
 
16
  add_filter('wdm_before_fetch_template', array($this, 'introduceCustomTags'), 99, 3 );
17
  //add_action('admin_init', array($this, 'Save'));
18
  add_action('wp_ajax_template_preview', array($this, 'preview'));
 
 
19
  add_action('wp_ajax_wpdm_save_email_template', array($this, 'saveEmailTemplate'));
20
  add_action('wp_ajax_update_template_status', array($this, 'updateTemplateStatus'));
21
  add_action('wp_ajax_wpdm_save_email_setting', array($this, 'saveEmailSetting'));
 
 
 
22
  add_action('wp_ajax_connect_template_server', array($this, 'templateServer'));
 
23
  add_action('admin_menu', array($this, 'menu'));
24
  }
25
 
26
  function livePreview(){
27
+ if(wpdm_query_var('template_preview') !== '') {
28
+ __::isAuthentic('_tplnonce', NONCE_KEY, WPDM_ADMIN_CAP);
29
  add_filter( 'show_admin_bar', '__return_false' );
30
  $page_template = Template::locate('template-preview.php', WPDM_SRC_DIR.'__/views');
31
  $type = wpdm_query_var('_type');
36
  $package = get_posts(array('post_type' => 'wpdmpro', 'posts_per_page' => 1, 'post_status' => 'publish'));
37
  $package = (array)$package[0];
38
  }
39
+ $template = Crypt::decrypt(wpdm_query_var('template_preview'));
40
  $template = stripslashes_deep(str_replace(array("\r", "\n"), "", html_entity_decode(urldecode($template))));
41
  $output = wpdm_fetch_template($template, $package, $type);
42
  $template = "<div class='w3eden' style='max-width: 900px;margin: 20px auto !important;padding: 40px;'>{$output}</div><script> jQuery(function($) { var body = document.body, html = document.documentElement; var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight ); window.parent.wpdmifh(height); });</script>";
77
  include wpdm_admin_tpl_path('templates/templates.php');
78
  }
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  function saveEmailTemplate(){
81
  if (isset($_POST['email_template'])) {
82
+ __::isAuthentic('__setnonce', WPDM_PRI_NONCE, WPDM_ADMIN_CAP);
83
  $email_template = wpdm_query_var('email_template', array('validate' => array('subject' => '', 'message' => 'escs', 'from_name' => '', 'from_email' => '')));
84
  update_option("__wpdm_etpl_".wpdm_query_var('id'), $email_template, false);
85
  wp_send_json(array('success' => true, 'message' => 'Email Template Saved!'));
96
  error_reporting(0);
97
 
98
  $wposts = array();
99
+ __::isAuthentic('_tplnonce', WPDM_PUB_NONCE, WPDM_ADMIN_CAP);
 
 
100
  $template = isset($_REQUEST['template'])?wpdm_query_var('template', 'escs'):'';
101
  $type = wpdm_query_var("_type");
102
  $css = wpdm_query_var("css","txt");
206
  }
207
 
208
  function saveEmailSetting(){
209
+ __::isAuthentic('__sesnonce', WPDM_PRI_NONCE, WPDM_ADMIN_CAP, true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
211
+ update_option('__wpdm_email_template', wpdm_query_var('__wpdm_email_template'), false);
212
+ $email_settings = wpdm_query_var('__wpdm_email_setting', array('validate' => array('logo' => 'url', 'banner' => 'url', 'youtube' => 'url', 'twitter' => 'url', 'facebook' => 'url', 'footer_text' => 'txts')));
213
+ update_option('__wpdm_email_setting', $email_settings, false);
214
+ die("Done!");
 
 
 
 
 
215
  }
216
 
217
  function updateTemplateStatus(){
241
  }
242
 
243
  function templateServer(){
244
+ wpdmpro_required();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  die();
246
  }
247
 
 
 
 
 
 
 
 
248
  }
src/Admin/views/addons-list.php CHANGED
@@ -1,8 +1,3 @@
1
-
2
- <script type="text/javascript" src="<?php echo includes_url();?>/js/jquery/jquery.form.min.js"></script>
3
- <link rel="stylesheet" href="<?php echo plugins_url('/download-manager/assets/css/chosen.css'); ?>" />
4
- <script language="JavaScript" src="<?php echo plugins_url('/download-manager/assets/js/chosen.jquery.min.js'); ?>"></script>
5
-
6
  <style>
7
 
8
  .note{
@@ -29,17 +24,7 @@
29
  min-width: 150px;
30
  }
31
 
32
- .wpdm-loading {
33
- background: url('<?php echo plugins_url('download-manager/images/wpdm-settings.png'); ?>') center center no-repeat;
34
- width: 16px;
35
- height: 16px;
36
- /*border-bottom: 2px solid #2a2dcb;*/
37
- /*border-left: 2px solid #ffffff;*/
38
- /*border-right: 2px solid #c30;*/
39
- /*border-top: 2px solid #3dd269;*/
40
- /*border-radius: 100%;*/
41
 
42
- }
43
 
44
  .w3eden .panel-footer{
45
  line-height: 22px;
@@ -216,7 +201,7 @@
216
  display: none;
217
  }
218
  </style>
219
- <link rel="stylesheet" href="<?= WPDM_BASE_URL ?>/assets/css/settings-ui.css" />
220
  <div class="wrap w3eden">
221
  <div id="wpdm-admin-page-header">
222
  <div id="wpdm-admin-main-header">
 
 
 
 
 
1
  <style>
2
 
3
  .note{
24
  min-width: 150px;
25
  }
26
 
 
 
 
 
 
 
 
 
 
27
 
 
28
 
29
  .w3eden .panel-footer{
30
  line-height: 22px;
201
  display: none;
202
  }
203
  </style>
204
+ <link rel="stylesheet" href="<?= WPDM_BASE_URL ?>assets/css/settings-ui.css" />
205
  <div class="wrap w3eden">
206
  <div id="wpdm-admin-page-header">
207
  <div id="wpdm-admin-main-header">
src/Admin/views/import.php CHANGED
@@ -473,7 +473,7 @@
473
  var ifiles = [];
474
  jQuery(function($) {
475
 
476
- $('select').chosen({});
477
 
478
  $('body').on('click', '.slctdir', function(){
479
  WPDM.blockUI('#importarea');
473
  var ifiles = [];
474
  jQuery(function($) {
475
 
476
+ $('select').select2({});
477
 
478
  $('body').on('click', '.slctdir', function(){
479
  WPDM.blockUI('#importarea');
src/Admin/views/metaboxes/additional-preview-images.php CHANGED
@@ -15,8 +15,8 @@ if(!defined("ABSPATH")) die("Shit happens!");
15
  $image = ((int)$mpv > 0) ? wp_get_attachment_image($mpv) : "<img src='".wpdm_dynamic_thumb($mpv, array(128, 128), true)."' />";
16
  ?>
17
  <div id='<?php echo ++$mmv; ?>' style='float:left;margin:3px;' class='adp'>
18
- <input type='hidden' id='in_<?php echo $mmv; ?>' name='file[additional_previews][]' value='<?php echo $mpv; ?>' />
19
- <img style='position:absolute;z-index:9999;cursor:pointer;width: 16px;height: 16px' id='del_<?php echo $mmv; ?>' rel="<?php echo $mmv; ?>" src='<?php echo plugins_url(); ?>/download-manager/assets/images/delete.svg' class="del_adp" align=left />
20
  <?php echo $image; ?>
21
  <div style='clear:both'></div>
22
  </div>
15
  $image = ((int)$mpv > 0) ? wp_get_attachment_image($mpv) : "<img src='".wpdm_dynamic_thumb($mpv, array(128, 128), true)."' />";
16
  ?>
17
  <div id='<?php echo ++$mmv; ?>' style='float:left;margin:3px;' class='adp'>
18
+ <input type='hidden' id='in_<?php echo $mmv; ?>' name='file[additional_previews][]' value='<?php echo esc_attr($mpv); ?>' />
19
+ <img style='position:absolute;z-index:9999;cursor:pointer;width: 16px;height: 16px' id='del_<?php echo $mmv; ?>' rel="<?php echo $mmv; ?>" src='<?= WPDM_BASE_URL ?>assets/images/delete.svg' class="del_adp" />
20
  <?php echo $image; ?>
21
  <div style='clear:both'></div>
22
  </div>
src/Admin/views/metaboxes/package-settings.php CHANGED
@@ -217,7 +217,7 @@
217
 
218
 
219
 
220
- jQuery("#wpdm-settings select").chosen({no_results_text: ""});
221
 
222
  jQuery('.handlediv').click(function(){
223
  jQuery(this).parent().find('.inside').slideToggle();
217
 
218
 
219
 
220
+ jQuery("#wpdm-settings select").select2({no_results_text: ""});
221
 
222
  jQuery('.handlediv').click(function(){
223
  jQuery(this).parent().find('.inside').slideToggle();
src/Admin/views/settings.php CHANGED
@@ -117,7 +117,7 @@ if (!defined("ABSPATH")) die("Shit happens!");
117
  $(this).fadeOut();
118
  });
119
 
120
- $('select:not(.system-ui)').chosen({disable_search_threshold: 4});
121
  $("ul#tabs li").click(function () {
122
 
123
  });
@@ -133,7 +133,7 @@ if (!defined("ABSPATH")) die("Shit happens!");
133
  $('#fm_settings').html(res);
134
  $('#section').val(section)
135
  $('#wdms_loading').removeClass('wpdm-spin');
136
- $('select:not(.system-ui)').chosen({disable_search_threshold: 4});
137
  window.history.pushState({
138
  "html": res,
139
  "pageTitle": "response.pageTitle"
117
  $(this).fadeOut();
118
  });
119
 
120
+ $('select:not(.system-ui)').select2({disable_search_threshold: 4});
121
  $("ul#tabs li").click(function () {
122
 
123
  });
133
  $('#fm_settings').html(res);
134
  $('#section').val(section)
135
  $('#wdms_loading').removeClass('wpdm-spin');
136
+ $('select:not(.system-ui)').select2({disable_search_threshold: 4});
137
  window.history.pushState({
138
  "html": res,
139
  "pageTitle": "response.pageTitle"
src/Admin/views/settings/addon-update.php CHANGED
@@ -142,7 +142,7 @@
142
  $('.btn-update').on('click', function (res) {
143
  var bhtml = $(this).html(), btn = $(this);
144
  btn.html('<i class="fa fa-sync fa-spin"></i> <?php _e( "Please Wait..." , "download-manager" ); ?>');
145
- $.post('admin-ajax.php?action='+$(this).data('action'), {updateurl: $(this).data('url'), plugin: $(this).data('plugin')}, function (res) {
146
  btn.html('<i class="fa fa-check-circle"></i> <?php _e( "Success!" , "download-manager" ); ?>');
147
  });
148
  return false;
142
  $('.btn-update').on('click', function (res) {
143
  var bhtml = $(this).html(), btn = $(this);
144
  btn.html('<i class="fa fa-sync fa-spin"></i> <?php _e( "Please Wait..." , "download-manager" ); ?>');
145
+ $.post('admin-ajax.php?action='+$(this).data('action'), {updateurl: $(this).data('url'), plugin: $(this).data('plugin'), __upanonce: '<?= wp_create_nonce(WPDM_PRI_NONCE) ?>'}, function (res) {
146
  btn.html('<i class="fa fa-check-circle"></i> <?php _e( "Success!" , "download-manager" ); ?>');
147
  });
148
  return false;
src/Admin/views/stats/history.php CHANGED
@@ -306,8 +306,8 @@ $pagination = array(
306
 
307
  <!-- SCRIPTS -->
308
 
309
- <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
310
- <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>
311
  <script>
312
  jQuery(function($) {
313
 
@@ -328,6 +328,7 @@ $pagination = array(
328
  data: function(params) {
329
  return {
330
  action: 'wpdm_stats_get_packages',
 
331
  term: params.term, // search term
332
  };
333
  },
@@ -347,6 +348,7 @@ $pagination = array(
347
  data: function(params) {
348
  return {
349
  action: 'wpdm_stats_get_users',
 
350
  term: params.term, // search term
351
  };
352
  },
306
 
307
  <!-- SCRIPTS -->
308
 
309
+ <link href="<?= WPDM_BASE_URL ?>assets/select2/css/select2.min.css" rel="stylesheet" />
310
+ <script src="<?= WPDM_BASE_URL ?>assets/select2/js/select2.min.js"></script>
311
  <script>
312
  jQuery(function($) {
313
 
328
  data: function(params) {
329
  return {
330
  action: 'wpdm_stats_get_packages',
331
+ __spnonce: '<?= wp_create_nonce(WPDM_PUB_NONCE); ?>',
332
  term: params.term, // search term
333
  };
334
  },
348
  data: function(params) {
349
  return {
350
  action: 'wpdm_stats_get_users',
351
+ __spnonce: '<?= wp_create_nonce(WPDM_PUB_NONCE); ?>',
352
  term: params.term, // search term
353
  };
354
  },
src/Admin/views/templates/email-template-editor.php CHANGED
@@ -28,7 +28,7 @@ $info = \WPDM\__\Email::info(wpdm_query_var('id'));
28
 
29
  <form action="" method="post" id="email-editor-form">
30
 
31
-
32
  <input type="hidden" name="id" value="<?php echo wpdm_query_var('id'); ?>" />
33
  <input type="text" name="email_template[subject]" required="required" title="<?php echo __( "Email Subject" , "download-manager" ); ?>" placeholder="<?php echo __( "Email Subject" , "download-manager" ); ?>" x-moz-errormessage="<?php echo __( "Email Subject" , "download-manager" ); ?>" value="<?php echo $tpl['subject']; ?>" class="form-control input-lg">
34
  <ul class="nav nav-tabs" style="margin-top: 10px; ">
28
 
29
  <form action="" method="post" id="email-editor-form">
30
 
31
+ <?php wp_nonce_field(WPDM_PRI_NONCE, '__setnonce'); ?>
32
  <input type="hidden" name="id" value="<?php echo wpdm_query_var('id'); ?>" />
33
  <input type="text" name="email_template[subject]" required="required" title="<?php echo __( "Email Subject" , "download-manager" ); ?>" placeholder="<?php echo __( "Email Subject" , "download-manager" ); ?>" x-moz-errormessage="<?php echo __( "Email Subject" , "download-manager" ); ?>" value="<?php echo $tpl['subject']; ?>" class="form-control input-lg">
34
  <ul class="nav nav-tabs" style="margin-top: 10px; ">
src/Admin/views/templates/email-template-settings.php CHANGED
@@ -41,14 +41,7 @@ if($ttype == 'email'){ ?>
41
  <div class="form-group">
42
  <?php _e( "Banner/Background Image URL" , "download-manager" ); ?>
43
  <?php echo wpdm_media_field(array('placeholder' => __("Banner/Background Image URL" , "download-manager"), 'name' => '__wpdm_email_setting[banner]', 'id' => 'banner-url', 'value' => (isset($__wpdm_email_setting['banner'])?$__wpdm_email_setting['banner']:''))); ?>
44
- <div class="xbubble" style="margin-top: 5px;box-shadow: none;z-index: 999">
45
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/brush.jpg" style="height: 32px;margin: 2px" />
46
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/a.jpg" style="height: 32px;margin: 2px" />
47
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/crain.jpg" style="height: 32px;margin: 2px" />
48
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/c.jpg" style="height: 32px;margin: 2px" />
49
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/z.jpg" style="height: 32px;margin: 2px" />
50
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/oilpaint.jpg" style="height: 32px;margin: 2px" />
51
- </div>
52
  </div>
53
  <div class="form-group">
54
  <?php _e( "Footer Text" , "download-manager" ); ?>
41
  <div class="form-group">
42
  <?php _e( "Banner/Background Image URL" , "download-manager" ); ?>
43
  <?php echo wpdm_media_field(array('placeholder' => __("Banner/Background Image URL" , "download-manager"), 'name' => '__wpdm_email_setting[banner]', 'id' => 'banner-url', 'value' => (isset($__wpdm_email_setting['banner'])?$__wpdm_email_setting['banner']:''))); ?>
44
+
 
 
 
 
 
 
 
45
  </div>
46
  <div class="form-group">
47
  <?php _e( "Footer Text" , "download-manager" ); ?>
src/Admin/views/templates/emails-template.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
 
3
  $etpl = get_option('_wpdm_etpl');
4
- if(isset($_GET['loadetpl'])&&file_exists(WPDM_BASE_DIR.'email-templates/'.esc_attr($_GET['loadetpl']))){
5
- $etpl['body'] = file_get_contents(WPDM_BASE_DIR.'email-templates/'.esc_attr($_GET['loadetpl']));
6
  }
7
 
8
  ?>
1
  <?php
2
 
3
  $etpl = get_option('_wpdm_etpl');
4
+ if(isset($_GET['loadetpl']) && file_exists(WPDM_BASE_DIR.'email-templates/'.wpdm_query_var('filename', 'txt')) && substr_count(wpdm_query_var('filename', 'txt'), '.html')){
5
+ $etpl['body'] = file_get_contents(WPDM_BASE_DIR.'email-templates/'.wpdm_query_var('filename', 'txt'));
6
  }
7
 
8
  ?>
src/Admin/views/templates/list-templates.php CHANGED
@@ -72,7 +72,7 @@ if(!isset($_GET['_type']) || $_GET['_type'] !== 'email'){ ?>
72
  </div>
73
  </td>
74
  <td style="text-align: right">
75
- <a data-toggle="modal" href="#" data-href="admin-ajax.php?action=template_preview&_type=<?php echo $ttype; ?>&template=<?php echo $ctpl; ?>" data-target="#preview-modal" rel="<?php echo $ctpl; ?>" class="template_preview btn btn-sm btn-success"><i class="fa fa-desktop"></i> Preview</a>
76
  <?php if(!in_array($ctpl, $ctemplates)){ ?>
77
  <a href="edit.php?post_type=wpdmpro&page=templates&_type=<?php echo $ttype; ?>&task=NewTemplate&clone=<?php echo $ctpl; ?>" class="btn btn-sm btn-primary"><i class="fa fa-copy"></i> <?php echo __( "Clone" , "download-manager" ); ?></a>
78
  <?php } else { ?>
72
  </div>
73
  </td>
74
  <td style="text-align: right">
75
+ <a data-toggle="modal" href="#" data-href="admin-ajax.php?action=template_preview&_type=<?php echo $ttype; ?>&template=<?php echo $ctpl; ?>&_tplnonce=<?= wp_create_nonce(WPDM_PUB_NONCE) ?>" data-target="#preview-modal" rel="<?php echo $ctpl; ?>" class="template_preview btn btn-sm btn-success"><i class="fa fa-desktop"></i> Preview</a>
76
  <?php if(!in_array($ctpl, $ctemplates)){ ?>
77
  <a href="edit.php?post_type=wpdmpro&page=templates&_type=<?php echo $ttype; ?>&task=NewTemplate&clone=<?php echo $ctpl; ?>" class="btn btn-sm btn-primary"><i class="fa fa-copy"></i> <?php echo __( "Clone" , "download-manager" ); ?></a>
78
  <?php } else { ?>
src/Admin/views/templates/templates-beta.php DELETED
@@ -1,503 +0,0 @@
1
-
2
-
3
- <div class="wrap w3eden">
4
-
5
- <div class="panel panel-default" id="wpdm-wrapper-panel">
6
- <div class="panel-heading">
7
- <b><i class="fa fa-magic color-purple"></i> &nbsp; <?php echo __( "Templates" , "download-manager" ); ?></b>
8
- <div class="pull-right">
9
- <a href="edit.php?post_type=wpdmpro&page=templates&_type=page&task=NewTemplate" class="btn btn-sm btn-info"><i class="fa fa-file"></i> <?php echo __( "Create Page Template" , "download-manager" ); ?></a> <a href="edit.php?post_type=wpdmpro&page=templates&_type=link&task=NewTemplate" class="btn btn-sm btn-primary"><i class="fa fa-link"></i> <?php echo __( "Create Link Template" , "download-manager" ); ?></a>
10
- </div>
11
- <div style="clear: both"></div>
12
- </div>
13
- <ul id="tabs" class="nav nav-tabs nav-wrapper-tabs" style="padding: 60px 10px 0 10px;background: #f5f5f5">
14
- <li <?php if(!isset($_GET['_type'])||$_GET['_type']=='link'){ ?>class="active"<?php } ?>><a href="edit.php?post_type=wpdmpro&page=templates&_type=link" id="link"><?php _e( "Link Templates" , "download-manager" ); ?></a></li>
15
- <li <?php if(isset($_GET['_type'])&&$_GET['_type']=='page'){ ?>class="active"<?php } ?>><a href="edit.php?post_type=wpdmpro&page=templates&_type=page" id="page"><?php _e( "Page Templates" , "download-manager" ); ?></a></li>
16
- <li <?php if(isset($_GET['_type'])&&$_GET['_type']=='email'){ ?>class="active"<?php } ?>><a href="edit.php?post_type=wpdmpro&page=templates&_type=email" id="email"><?php _e( "Email Templates" , "download-manager" ); ?></a></li>
17
- <li <?php if(isset($_GET['_type'])&&$_GET['_type']=='custom-tags'){ ?>class="active"<?php } ?>><a href="edit.php?post_type=wpdmpro&page=templates&_type=custom-tags" id="custom-tags"><?php _e( "Custom Tags" , "download-manager" ); ?></a></li>
18
- </ul>
19
- <div class="tab-content panel-body">
20
- <?php if(wpdm_query_var('_type') !== 'custom-tags'){ ?>
21
- <?php if(!isset($_GET['_type']) || $_GET['_type']!='email'){ ?>
22
- <blockquote class="alert alert-info" style="margin-bottom: 10px">
23
- <?php echo __( "Pre-designed templates can't be deleted or edited from this section. But you can clone any of them and edit as your own. If you seriously want to edit any pre-designed template you have to edit those directly edting php files at /download-manager/templates/ dir" , "download-manager" ); ?>
24
- </blockquote>
25
- <?php } ?>
26
-
27
-
28
- <?php
29
- $ttype = isset($_GET['_type'])?wpdm_query_var('_type'):'link';
30
- if($ttype != 'email'){
31
- $ctpls = WPDM\Admin\Menu\Templates::Dropdown(array('data_type' => 'ARRAY', 'type' => $ttype));
32
- $ctemplates = maybe_unserialize(get_option("_fm_{$ttype}_templates",true));
33
- if(is_array($ctemplates))
34
- $ctemplates = array_keys($ctemplates);
35
- if(!is_array($ctemplates)) $ctemplates = array();
36
- $tplstatus = maybe_unserialize(get_option("_fm_{$ttype}_template_status"));
37
-
38
- foreach($ctpls as $ctpl => $title){
39
- $tplid = str_replace(".php","",$ctpl);
40
- $status = isset($tplstatus[$tplid])?(int)$tplstatus[$tplid]:1;
41
- ?>
42
-
43
- <div class="col-md-3">
44
- <div class="panel panel-default" id="template-<?php echo $ttype; ?>-<?php echo $ctpl; ?>">
45
- <div class="panel-body">
46
- <div class="btn-group template-status" data-toggle="buttons">
47
- <label title="<?php echo __( "Activate Template", "download-manager" ) ?>" class="btn btn-<?php echo $status === 1?'success active':'secondary'; ?> btn-sm btn-status <?php echo str_replace(".php","",$ctpl); ?>" data-value="1" data-id="<?php echo str_replace(".php","",$ctpl); ?>"><input type="radio" <?php checked($status,1); ?> name="<?php echo $ctpl; ?>-status" value="1"/><i class="fa fa-check"></i></label><label title="<?php echo __( "Disable Template", "download-manager" ) ?>" class="btn btn-<?php echo $status === 0?'danger active':'secondary'; ?> btn-sm btn-status <?php echo str_replace(".php","",$ctpl); ?>" data-value="0" data-id="<?php echo str_replace(".php","",$ctpl); ?>"><input type="radio" name="<?php echo $ctpl; ?>-status" <?php checked($status,0); ?> value="0"/><i class="fa fa-times"></i></label>
48
- </div>
49
- <img src="<?php echo WPDM_BASE_URL.'assets/template-previews/link-template-audio.png' ?>" alt="<?php echo $title; ?>" />
50
- </div>
51
- <div class="panel-footer">
52
- <input class="form-control input-tplid" type="text" readonly="readonly" onclick="this.select()" value="<?php echo $tplid; ?>" />
53
- </div>
54
- <div class="panel-footer">
55
- <?php echo $title; ?>
56
- </div>
57
- <div class="panel-footer">
58
- <a data-toggle="modal" href="#" data-href="admin-ajax.php?action=template_preview&_type=<?php echo $ttype; ?>&template=<?php echo $ctpl; ?>" data-target="#preview-modal" rel="<?php echo $ctpl; ?>" class="template_preview btn btn-sm btn-success"><i class="fa fa-desktop"></i> Preview</a>
59
- <?php if(!in_array($ctpl, $ctemplates)){ ?>
60
- <a href="edit.php?post_type=wpdmpro&page=templates&_type=<?php echo $ttype; ?>&task=NewTemplate&clone=<?php echo $ctpl; ?>" class="btn btn-sm btn-primary"><i class="fa fa-copy"></i> <?php echo __( "Clone" , "download-manager" ); ?></a>
61
- <?php } else { ?>
62
- <a href="edit.php?post_type=wpdmpro&page=templates&_type=<?php echo $ttype; ?>&task=EditTemplate&tplid=<?php echo $ctpl; ?>" class="btn btn-sm btn-info"><i class="fas fa-pencil-alt"></i> <?php echo __( "Edit" , "download-manager" ); ?></a>
63
- <a data-ttype="<?php echo $ttype; ?>" data-tplid="<?php echo $ctpl; ?>" href="edit.php?post_type=wpdmpro&page=templates&_type=<?php echo $ttype; ?>&task=DeleteTemplate&tplid=<?php echo $ctpl; ?>" class="submitdelete delete-template btn btn-sm btn-danger"><i class="fa fa-trash-o"></i> <?php echo __( "Delete" , "download-manager" ); ?></a>
64
- <?php } ?>
65
- </div>
66
- </div>
67
- </div>
68
-
69
- <?php
70
- }} else {
71
- $templates = \WPDM\__\Email::templates();
72
- foreach($templates as $ctpl => $template){
73
- ?>
74
- <tr valign="top" class="author-self status-inherit" id="post-8">
75
- <td class="column-icon media-icon" style="text-align: left;">
76
- <?php echo $template['label']; ?> ( <?php _e( "To:" , "download-manager" ); ?> <?php echo ucfirst($template['for']); ?> )
77
-
78
- </td>
79
- <td>
80
- <?php echo $ctpl; ?>
81
- </td>
82
- <td style="text-align: right">
83
-
84
- <a href="edit.php?post_type=wpdmpro&page=templates&_type=email&task=EditEmailTemplate&id=<?php echo $ctpl; ?>" class="btn btn-sm btn-primary"><i class="fas fa-pencil-alt"></i> <?php echo __( "Edit" , "download-manager" ); ?></a>
85
-
86
- </td>
87
-
88
-
89
- </tr>
90
- <?php
91
- }}
92
- ?>
93
-
94
-
95
-
96
-
97
- <?php if($ttype == 'email'){ ?>
98
- <form method="post" id="emlstform">
99
- <div class="panel panel-default">
100
- <div class="panel-heading">Email Settings</div>
101
- <div class="panel-body">
102
-
103
- <div class="row">
104
- <div class="col-md-4">
105
- <div class="form-group">
106
- <?php _e( "Email Template" , "download-manager" ); ?>
107
- <select name="__wpdm_email_template" class="form-control wpdm-custom-select" style="width: 200px" id="etmpl">
108
- <?php
109
- $eds = \WPDM\__\FileSystem::scanDir(WPDM_BASE_DIR.'email-templates');
110
- $__wpdm_email_template = get_option('__wpdm_email_template', "default.html");
111
- $__wpdm_email_setting = maybe_unserialize(get_option('__wpdm_email_setting'));
112
- foreach ($eds as $file) {
113
- if(strstr($file, ".html")) {
114
- ?>
115
- <option value="<?php echo basename($file); ?>" <?php selected($__wpdm_email_template, basename($file)); ?> ><?php echo ucfirst(str_replace(".html", "", basename($file))); ?></option>
116
- <?php
117
- }
118
- }
119
- ?>
120
- </select>
121
- </div>
122
- <div class="form-group">
123
- <?php _e( "Logo URL" , "download-manager" ); ?>
124
- <?php echo wpdm_media_field(array('placeholder' => __("Logo URL" , "download-manager"), 'name' => '__wpdm_email_setting[logo]', 'id' => 'logo-url', 'value' => (isset($__wpdm_email_setting['logo'])?$__wpdm_email_setting['logo']:''))); ?>
125
- </div>
126
- <div class="form-group">
127
- <?php _e( "Banner/Background Image URL" , "download-manager" ); ?>
128
- <?php echo wpdm_media_field(array('placeholder' => __("Banner/Background Image URL" , "download-manager"), 'name' => '__wpdm_email_setting[banner]', 'id' => 'banner-url', 'value' => (isset($__wpdm_email_setting['banner'])?$__wpdm_email_setting['banner']:''))); ?>
129
- <div class="xbubble" style="margin-top: 5px;box-shadow: none;z-index: 999">
130
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/brush.jpg" style="height: 32px;margin: 2px" />
131
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/a.jpg" style="height: 32px;margin: 2px" />
132
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/crain.jpg" style="height: 32px;margin: 2px" />
133
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/c.jpg" style="height: 32px;margin: 2px" />
134
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/z.jpg" style="height: 32px;margin: 2px" />
135
- <img class="bselect" src="https://wpdmcdn.s3.amazonaws.com/emails/oilpaint.jpg" style="height: 32px;margin: 2px" />
136
- </div>
137
- </div>
138
- <div class="form-group">
139
- <?php _e( "Footer Text" , "download-manager" ); ?>
140
- <textarea name="__wpdm_email_setting[footer_text]" class="form-control"><?php echo isset($__wpdm_email_setting['footer_text'])?stripslashes($__wpdm_email_setting['footer_text']):'';?></textarea>
141
- </div>
142
- <div class="form-group">
143
- <?php _e( "Facebook Page URL" , "download-manager" ); ?>
144
- <input type="text" name="__wpdm_email_setting[facebook]" value="<?php echo isset($__wpdm_email_setting['facebook'])?($__wpdm_email_setting['facebook']):'';?>" class="form-control">
145
- </div>
146
- <div class="form-group">
147
- <?php _e( "Twitter Profile URL" , "download-manager" ); ?>
148
- <input type="text" name="__wpdm_email_setting[twitter]" value="<?php echo isset($__wpdm_email_setting['twitter'])?$__wpdm_email_setting['twitter']:'';?>" class="form-control">
149
- </div>
150
- <div class="form-group">
151
- <?php _e( "Youtube Profile URL" , "download-manager" ); ?>
152
- <input type="text" name="__wpdm_email_setting[youtube]" value="<?php echo isset($__wpdm_email_setting['youtube'])?$__wpdm_email_setting['youtube']:'';?>" class="form-control">
153
- </div>
154
- </div>
155
- <div class="col-md-8">
156
- <div class="w3econtainer">
157
- <div class="w3erow">
158
- <div class="w3ecolumn w3eleft">
159
- <span class="w3edot" style="background:#ED594A;"></span>
160
- <span class="w3edot" style="background:#FDD800;"></span>
161
- <span class="w3edot" style="background:#5AC05A;"></span>
162
- </div>
163
- <div class="w3ecolumn w3emiddle">
164
- /email-templates/<span id="etplname"></span>
165
- </div>
166
- <div class="w3ecolumn w3eright">
167
- <div style="float:right">
168
- <span class="w3ebar"></span>
169
- <span class="w3ebar"></span>
170
- <span class="w3ebar"></span>
171
- </div>
172
- </div>
173
- </div>
174
-
175
- <div class="w3econtent">
176
- <iframe style="margin: 0;width: 100%;height: 550px;border-radius: 3px" id="preview" src="edit.php?action=email_template_preview&id=user-signup&etmpl=<?php echo $__wpdm_email_template; ?>">
177
-
178
- </iframe>
179
- </div>
180
- </div>
181
-
182
- </div>
183
- </div>
184
-
185
- </div>
186
- <div class="panel-footer text-right">
187
- <button class="btn btn-primary" id="emsbtn" style="width: 180px;"><i class="fas fa-hdd"></i> <?php _e( "Save Changes" , "download-manager" ); ?></button>
188
- </div>
189
- </div>
190
- </form>
191
- <?php } ?>
192
- <?php } else { ?>
193
- <div style="text-align: right;padding: 10px;"><a href="#" data-toggle="modal" data-target="#newtagmodal" class="btn btn-success"><i class="fa fa-plus-circle"></i> <?php _e( "Add New Tag", "download-manager" ); ?></a></div>
194
- <table class="table table-striped" id="tagstable">
195
- <thead>
196
- <tr>
197
- <th><?php _e( "Tag", "download-manager" ) ?></th>
198
- <th><?php _e( "Value", "download-manager" ) ?></th>
199
- <th><?php _e( "Action", "download-manager" ) ?></th>
200
- </tr>
201
- </thead>
202
- <tbody>
203
- <?php
204
- $upload_dir = wp_upload_dir();
205
- $upload_dir = $upload_dir['basedir'];
206
- $tags_dir = $upload_dir.'/wpdm-custom-tags/';
207
- if(!file_exists($tags_dir)) mkdir($tags_dir, 0755, true);
208
- $custom_tags = scandir($tags_dir);
209
- foreach ($custom_tags as $custom_tag){
210
- if(strstr($custom_tag, '.tag')) {
211
- $content = file_get_contents($tags_dir.$custom_tag);
212
- $custom_tag = str_replace(".tag", "", $custom_tag);
213
- ?>
214
- <tr id="row_<?php echo $custom_tag; ?>">
215
- <td>[<?php echo $custom_tag; ?>]</td>
216
- <td><pre style="background: #ffffff;border-radius: 3px;font-size: 10px"><?php echo htmlspecialchars(stripslashes($content)); ?></pre></td>
217
- <td style="width: 220px">
218
- <a href="#" class="btn btn-info tag-edit" data-tag="<?php echo $custom_tag; ?>"><?php _e( "Edit", "download-manager" ); ?></a>
219
- <a href="#" class="btn btn-danger tag-delete" data-tag="<?php echo $custom_tag; ?>"><?php _e( "Delete", "download-manager" ); ?></a>
220
- </td>
221
- </tr>
222
- <?php
223
- }
224
- } ?>
225
- </tbody>
226
- </table>
227
-
228
- <?php } ?>
229
- </div>
230
- </div>
231
-
232
- <div class="modal fade" id="newtagmodal" tabindex="-1" role="dialog" aria-labelledby="preview" aria-hidden="true">
233
- <div class="modal-dialog">
234
- <form method="post" id="newtagform">
235
- <input type="hidden" name="action" value="wpdm_save_custom_tag">
236
- <input type="hidden" name="__ctxnonce" value="<?php echo wp_create_nonce(NONCE_KEY); ?>">
237
- <div class="modal-content">
238
- <div class="modal-header">
239
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
240
- <h4 class="modal-title" id="myModalLabel"><?php _e( "New Tag" , "download-manager" ); ?></h4>
241
- </div>
242
- <div class="modal-body">
243
- <div class="form-group">
244
- <input type="text" id="tag_name" name="ctag[name]" class="form-control input-lg" placeholder="<?php echo __( "Tag Name", "download-manager" ) ?>" />
245
- </div>
246
- <div class="form-group">
247
- <textarea id="tag_value" placeholder="<?php echo __( "Tag Value", "download-manager" ) ?>" class="form-control" style="height: 100px" name="ctag[value]"></textarea>
248
- <em class="note"><?php echo __( "No php code, only text, html, css and js", "download-manager" ); ?></em>
249
- </div>
250
- </div>
251
- <div class="modal-footer">
252
- <button type="submit" id="newtagformsubmit" style="width: 180px" class="btn btn-success btn-lg"><?php echo __( "Save Tag", "download-manager" ) ?></button>
253
- </div>
254
- </div>
255
- </form>
256
- </div>
257
- </div>
258
-
259
-
260
- <div class="modal fade" id="preview-modal" tabindex="-1" role="dialog" aria-labelledby="preview" aria-hidden="true">
261
- <div class="modal-dialog">
262
- <div class="modal-content">
263
- <div class="modal-header">
264
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
265
- <h4 class="modal-title" id="myModalLabel"><?php _e( "Template Preview" , "download-manager" ); ?></h4>
266
- </div>
267
- <div class="modal-body" id="preview-area">
268
-
269
- </div>
270
- <div class="modal-footer text-left" style="text-align: left">
271
- <div class='alert alert-info'><?php _e( "This is a preview, original template color scheme may look little different, but structure will be same" , "download-manager" ); ?></div>
272
- </div>
273
- </div>
274
- </div>
275
- </div>
276
-
277
-
278
- <style>
279
- #tagstable td{ vertical-align: top; }
280
- div.notice, .updated{ display: none; }
281
- img{ max-width: 100%; }
282
- .input-tplid{ background: #ffffff !important; }
283
- .xbubble
284
- {
285
- position: relative;
286
- padding: 10px;
287
- background: #eeeeee;
288
- -webkit-border-radius: 3px;
289
- -moz-border-radius: 3px;
290
- border-radius: 3px;
291
- }
292
-
293
- .xbubble:after
294
- {
295
- content: '';
296
- position: absolute;
297
- border-style: solid;
298
- border-width: 0 10px 10px;
299
- border-color: #eeeeee transparent;
300
- display: block;
301
- width: 0;
302
- z-index: 1;
303
- top: -10px;
304
- left: 17px;
305
- }
306
- .w3ebselect{
307
- padding: 2px;
308
- border-radius: 2px;
309
- background: #ffffff;
310
- cursor: pointer;
311
- }
312
-
313
- .w3econtainer {
314
- border: 3px solid #333;
315
- border-radius: 4px;
316
- background: #333;
317
- }
318
-
319
- /* Container for columns and the top "toolbar" */
320
- .w3erow {
321
- padding: 7px 10px 10px;
322
- background: #333;
323
- color: #8db4b6;
324
- letter-spacing: 0.5px;
325
- font-size: 10px;
326
- font-weight: 400;
327
- }
328
-
329
- /* Create three unequal columns that floats next to each other */
330
- .w3ecolumn {
331
- float: left;
332
- }
333
-
334
- .w3eleft {
335
- width: 60px;
336
- }
337
-
338
- .w3eright {
339
- width: 10%;
340
- }
341
-
342
- .w3emiddle {
343
- width: calc(90% - 60px);
344
- }
345
-
346
- /* Clear floats after the columns */
347
- .w3erow:after {
348
- content: "";
349
- display: table;
350
- clear: both;
351
- }
352
-
353
- /* Three dots */
354
- .w3edot {
355
- margin-top: 4px;
356
- height: 12px;
357
- width: 12px;
358
- background-color: #bbb;
359
- border-radius: 50%;
360
- display: inline-block;
361
- }
362
-
363
- /* Style the input field */
364
- input[type=text].w3e {
365
- width: 100%;
366
- border-radius: 3px;
367
- border: none;
368
- background-color: white;
369
- margin-top: -8px;
370
- height: 25px;
371
- color: #666;
372
- padding: 5px;
373
- }
374
-
375
- /* Three bars (hamburger menu) */
376
- .w3ebar {
377
- width: 17px;
378
- height: 3px;
379
- background-color: #aaa;
380
- margin: 3px 0;
381
- display: block;
382
- }
383
-
384
- .panel-body{
385
- position: relative;
386
- }
387
- .panel-body .btn-group.template-status{
388
- position: absolute;
389
- right: 10px;
390
- top: 10px;
391
- }
392
-
393
-
394
- /* Page content */
395
- .w3econtent {
396
- padding: 0;
397
- margin-bottom: -4px;
398
- }
399
-
400
- </style>
401
- <script>
402
-
403
-
404
-
405
- jQuery(function($){
406
- $('.bselect').click(function(){
407
- $('#banner-url').val(this.src);
408
- });
409
- <?php if(isset($ttype)) { ?>
410
- $('.template_preview').click(function(){
411
- $('#preview-area').html("<i class='fa fa-spin fa-spinner'></i> Loading Preview...").load($(this).attr('data-href'));
412
- });
413
- $('#etmpl').on('change', function () {
414
- $('#preview').attr('src', 'edit.php?action=email_template_preview&id=user-signup&etmpl='+$(this).val());
415
- $('#etplname').html($(this).val());
416
- });
417
- $('#etplname').html($('#etmpl').val());
418
- $('#emlstform').submit(function (e) {
419
- e.preventDefault();
420
- $('#emsbtn').html('<i class="fa fa-sync fa-spin"></i> <?php _e( "Saving..." , "download-manager" ); ?>');
421
- $(this).ajaxSubmit({
422
- url: ajaxurl+"?action=wpdm_save_email_setting",
423
- success: function (res) {
424
- $('#emsbtn').html('<i class="fas fa-hdd"></i> <?php _e( "Save Changes" , "download-manager" ); ?>');
425
- document.getElementById('preview').contentDocument.location.reload(true);
426
- }
427
- });
428
- });
429
-
430
- $('.btn-status').on('click', function () {
431
- var v = $(this).data('value');
432
- var c = '.'+$(this).data('id');
433
- var $this = this;
434
- $.post(ajaxurl, {action: 'update_template_status', template: $(this).data('id'), type: '<?php echo $ttype; ?>', status: v}, function (res) {
435
- $(c).removeClass('btn-danger').removeClass('btn-success').addClass('btn-secondary');
436
- if(v==1)
437
- $($this).addClass('btn-success').removeClass('btn-secondary');
438
- else
439
- $($this).addClass('btn-danger').removeClass('btn-secondary');
440
- });
441
-
442
-
443
- });
444
-
445
-
446
- $('.delete-template').on('click', function (e) {
447
- if(!confirm('<?php _e( "Are you sure?" , "download-manager" ); ?>')) return false;
448
- e.preventDefault();
449
- var rowid = '#template-'+$(this).data('ttype')+"-"+$(this).data('tplid');
450
- $(this).html('<i class="fa fa-times fa-spin"></i> Delete');
451
- $.get(ajaxurl, {action: 'wpdm_delete_template', ttype: $(this).data('ttype'), tplid: $(this).data('tplid')}, function (res) {
452
- $(rowid).remove();
453
- });
454
- });
455
- <?php } ?>
456
- $('#newtagform').submit(function (e) {
457
- e.preventDefault();
458
- var obtnlbl = $('#newtagformsubmit').html();
459
- $('#newtagformsubmit').html("<i class='fa fa-sun fa-spin'></i>").attr('disabled', 'disabled');
460
- $(this).ajaxSubmit({
461
- url: ajaxurl,
462
- resetForm: true,
463
- success: function (response) {
464
- $('#newtagformsubmit').html(obtnlbl).removeAttr('disabled');
465
- $('#row_'+response.name).hide();
466
- $('#tagstable tbody').append(
467
- ' <tr id="row_'+response.name+'">\n' +
468
- ' <td>['+response.name+']</td>\n' +
469
- ' <td><pre style="background: #ffffff;border-radius: 3px;font-size: 10px">'+response.value+'</pre></td>\n' +
470
- ' <td style="width: 220px">\n' +
471
- ' <a href="#" class="btn btn-info tag-edit" data-tag="'+response.name+'"><?php _e("Edit", "download-manager"); ?></a>\n' +
472
- ' <a href="#" class="btn btn-danger tag-delete" data-tag="'+response.name+'"><?php _e("Delete", "download-manager"); ?></a>\n' +
473
- ' </td>\n' +
474
- ' </tr>'
475
- );
476
- $('#newtagmodal').modal('hide');
477
- }
478
- });
479
- });
480
- $('body').on('click', '.tag-edit', function () {
481
- $('#newtagmodal').modal('show');
482
- WPDM.blockUI('#newtagform');
483
- $.get(ajaxurl, {tag: $(this).data('tag'), action: 'wpdm_edit_custom_tag'}, function (response) {
484
- $('#tag_name').val(response.name);
485
- $('#tag_value').val(response.value);
486
- WPDM.unblockUI('#newtagform');
487
- })
488
- });
489
- $('body').on('click', '.tag-delete', function (e) {
490
- e.preventDefault();
491
- if(!confirm('<?php echo __( "Are you sure?", "download-manager" ); ?>')) return false;
492
- var tag = $(this).data('tag');
493
- $.get(ajaxurl, {tag: $(this).data('tag'), action: 'wpdm_delete_custom_tag'}, function (response) {
494
- $('#row_'+tag).hide();
495
- })
496
- });
497
- });
498
-
499
- </script>
500
- </div>
501
-
502
-
503
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Admin/views/templates/templates.php CHANGED
@@ -141,6 +141,9 @@ if(wpdm_query_var('_type') === 'custom-tags'){
141
  padding: 0;
142
  margin-bottom: -4px;
143
  }
 
 
 
144
 
145
  </style>
146
  <script>
@@ -186,15 +189,6 @@ if(wpdm_query_var('_type') === 'custom-tags'){
186
  });
187
 
188
 
189
- $('.delete-template').on('click', function (e) {
190
- if(!confirm('<?php _e( "Are you sure?" , "download-manager" ); ?>')) return false;
191
- e.preventDefault();
192
- var rowid = '#template-'+$(this).data('ttype')+"-"+$(this).data('tplid');
193
- $(this).html('<i class="fa fa-times fa-spin"></i> Delete');
194
- $.get(ajaxurl, {action: 'wpdm_delete_template', ttype: $(this).data('ttype'), tplid: $(this).data('tplid')}, function (res) {
195
- $(rowid).remove();
196
- });
197
- });
198
  <?php } ?>
199
  $('#newtagform').submit(function (e) {
200
  e.preventDefault();
141
  padding: 0;
142
  margin-bottom: -4px;
143
  }
144
+ .btn-group .btn-status input{
145
+ display: none;
146
+ }
147
 
148
  </style>
149
  <script>
189
  });
190
 
191
 
 
 
 
 
 
 
 
 
 
192
  <?php } ?>
193
  $('#newtagform').submit(function (e) {
194
  e.preventDefault();
src/Admin/views/welcome.php CHANGED
@@ -1,8 +1,6 @@
1
  <script type="text/javascript" src="<?php echo includes_url();?>/js/jquery/jquery.form.min.js"></script>
2
- <link rel="stylesheet" href="<?php echo plugins_url('/download-manager/assets/css/chosen.css'); ?>" />
3
- <script language="JavaScript" src="<?php echo plugins_url('/download-manager/assets/js/chosen.jquery.min.js'); ?>"></script>
4
- <link rel="stylesheet" type="text/css" href="<?php echo plugins_url('/download-manager/assets/bootstrap3/css/bootstrap.css');?>" />
5
- <script src="<?php echo plugins_url('/download-manager/assets/bootstrap/js/bootstrap.bundle.min.js');?>"></script>
6
  <link href='https://fonts.googleapis.com/css?family=Overpass:300,400,700' rel='stylesheet' type='text/css'>
7
  <link href="<?php echo WPDM_BASE_URL . 'assets/fontawesome/css/all.css'; ?>" rel="stylesheet">
8
  <link rel="stylesheet" href="<?php echo plugins_url('/download-manager/assets/css/front3.css'); ?>" />
1
  <script type="text/javascript" src="<?php echo includes_url();?>/js/jquery/jquery.form.min.js"></script>
2
+ <link rel="stylesheet" type="text/css" href="<?php echo WPDM_BASE_URL ?>assets/bootstrap3/css/bootstrap.css" />
3
+ <script src="<?php echo WPDM_BASE_URL; ?>assets/bootstrap/js/bootstrap.bundle.min.js"></script>
 
 
4
  <link href='https://fonts.googleapis.com/css?family=Overpass:300,400,700' rel='stylesheet' type='text/css'>
5
  <link href="<?php echo WPDM_BASE_URL . 'assets/fontawesome/css/all.css'; ?>" rel="stylesheet">
6
  <link rel="stylesheet" href="<?php echo plugins_url('/download-manager/assets/css/front3.css'); ?>" />
src/AssetManager/Asset.php CHANGED
@@ -208,8 +208,7 @@ class Asset
208
  $mime = wp_check_filetype($path);
209
  if(strstr(wpdm_valueof($mime, 'type'), "text/")) {
210
  $class = str_replace("text/", "", wpdm_valueof($mime, 'type'));
211
- $script = '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.9/styles/default.min.css"><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.9/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script>';
212
- return "<pre class='wpdm-asset wpdm-asset-text'><code class='$class'>" . esc_attr(file_get_contents($path)) . "</code></pre>{$script}";
213
  }
214
  $icon = \WPDM\__\FileSystem::fileTypeIcon($ext);
215
 
208
  $mime = wp_check_filetype($path);
209
  if(strstr(wpdm_valueof($mime, 'type'), "text/")) {
210
  $class = str_replace("text/", "", wpdm_valueof($mime, 'type'));
211
+ return "<pre class='wpdm-asset wpdm-asset-text'><code class='$class'>" . esc_attr(file_get_contents($path)) . "</code></pre>";
 
212
  }
213
  $icon = \WPDM\__\FileSystem::fileTypeIcon($ext);
214
 
src/AssetManager/views/asset-manager-ui.php CHANGED
@@ -631,12 +631,12 @@ if(is_admin()){
631
  </div>
632
  </div>
633
 
634
- <img src="http://wpdm/wp-content/plugins/download-manager/assets/images/share-links.png" style="max-width: 100%; margin-top: 10px; opacity: 0.2;" align="Share Links">
635
 
636
 
637
  </div>
638
  <div role="tabpanel" class="tab-pane" id="comments">
639
- <img src="http://wpdm/wp-content/plugins/download-manager/assets/images/asset-comments.png" style="max-width: 100%; margin-top: 15px; opacity: 0.5;" align="Comments">
640
  </div>
641
  </div>
642
 
631
  </div>
632
  </div>
633
 
634
+ <img src="<?= WPDM_BASE_URL ?>assets/images/share-links.png" style="max-width: 100%; margin-top: 10px; opacity: 0.2;" align="Share Links">
635
 
636
 
637
  </div>
638
  <div role="tabpanel" class="tab-pane" id="comments">
639
+ <img src="<?= WPDM_BASE_URL ?>assets/images/asset-comments.png" style="max-width: 100%; margin-top: 15px; opacity: 0.5;" align="Comments">
640
  </div>
641
  </div>
642
 
src/Package/PackageLocks.php CHANGED
@@ -48,7 +48,7 @@ class PackageLocks
48
  $limit = get_option('__wpdm_private_link_usage_limit', 3);
49
  $xpire_period = ((int)get_option('__wpdm_private_link_expiration_period', 3)) * ((int)get_option('__wpdm_private_link_expiration_period_unit', 60));
50
  $xpire_period = $xpire_period > 0 ? $xpire_period : 3600;
51
- $ret = wpdm_remote_post('https://www.google.com/recaptcha/api/siteverify', array('secret' => get_option('_wpdm_recaptcha_secret_key'), 'response' => $_POST['reCaptchaVerify'], 'remoteip' => $_SERVER['REMOTE_ADDR']));
52
  $ret = json_decode($ret);
53
  if ($ret->success == 1) {
54
  $download_url = WPDM()->package->expirableDownloadLink(wpdm_query_var('__wpdm_ID', 'int'), $limit, $xpire_period);
48
  $limit = get_option('__wpdm_private_link_usage_limit', 3);
49
  $xpire_period = ((int)get_option('__wpdm_private_link_expiration_period', 3)) * ((int)get_option('__wpdm_private_link_expiration_period_unit', 60));
50
  $xpire_period = $xpire_period > 0 ? $xpire_period : 3600;
51
+ $ret = wpdm_remote_post('https://www.google.com/recaptcha/api/siteverify', array('secret' => get_option('_wpdm_recaptcha_secret_key'), 'response' => wpdm_query_var('reCaptchaVerify'), 'remoteip' => $_SERVER['REMOTE_ADDR']));
52
  $ret = json_decode($ret);
53
  if ($ret->success == 1) {
54
  $download_url = WPDM()->package->expirableDownloadLink(wpdm_query_var('__wpdm_ID', 'int'), $limit, $xpire_period);
src/Package/Shortcodes.php CHANGED
@@ -271,9 +271,9 @@ class Shortcodes
271
  $burl = get_permalink();
272
  $sap = get_option('permalink_structure') ? '?' : '&';
273
  $burl = $burl . $sap;
274
- if (isset($_GET['p']) && $_GET['p'] != '') $burl .= 'p=' . esc_attr($_GET['p']) . '&';
275
- if (isset($_GET['src']) && $_GET['src'] != '') $burl .= 'src=' . esc_attr($_GET['src']) . '&';
276
- $orderby = isset($_GET['orderby']) ? esc_attr($_GET['orderby']) : 'date';
277
  $order = ucfirst($order);
278
 
279
  $order_field = " " . __(ucwords(str_replace("_", " ", $order_field)), "wpdmpro");
@@ -396,7 +396,7 @@ class Shortcodes
396
  }
397
  $terms = isset($params['categories']) ? explode(",", $params['categories']) : array();
398
  $tag = isset($params['tag']) ? $params['tag'] : '';
399
- if (isset($_GET['wpdmc'])) $terms = array(esc_attr($_GET['wpdmc']));
400
  $total_files = wp_count_posts('wpdmpro')->publish;
401
  if (count($terms) > 0) {
402
  $tax_query = array(array(
271
  $burl = get_permalink();
272
  $sap = get_option('permalink_structure') ? '?' : '&';
273
  $burl = $burl . $sap;
274
+ if (isset($_GET['p']) && $_GET['p'] != '') $burl .= 'p=' . wpdm_query_var('p', 'txt') . '&';
275
+ if (isset($_GET['src']) && $_GET['src'] != '') $burl .= 'src=' . wpdm_query_var('src', 'txt') . '&';
276
+ $orderby = isset($_GET['orderby']) ? wpdm_query_var('orderby', 'txt') : 'date';
277
  $order = ucfirst($order);
278
 
279
  $order_field = " " . __(ucwords(str_replace("_", " ", $order_field)), "wpdmpro");
396
  }
397
  $terms = isset($params['categories']) ? explode(",", $params['categories']) : array();
398
  $tag = isset($params['tag']) ? $params['tag'] : '';
399
+ if (isset($_GET['wpdmc'])) $terms = array(wpdm_query_var('wpdmc', 'txt'));
400
  $total_files = wp_count_posts('wpdmpro')->publish;
401
  if (count($terms) > 0) {
402
  $tax_query = array(array(
src/User/EditProfile.php CHANGED
@@ -71,7 +71,7 @@ class EditProfile
71
 
72
  wp_update_user($pfile_data);
73
 
74
- update_user_meta($current_user->ID, 'payment_account', $_POST['payment_account']);
75
  Session::set('member_success', 'Profile data updated successfully.');
76
  }
77
 
71
 
72
  wp_update_user($pfile_data);
73
 
74
+ update_user_meta($current_user->ID, 'payment_account', wpdm_query_var('payment_account'));
75
  Session::set('member_success', 'Profile data updated successfully.');
76
  }
77
 
src/User/Login.php CHANGED
@@ -95,8 +95,8 @@ class Login
95
  $regurl = get_permalink($regurl);
96
  }
97
  $log_redirect = $_SERVER['REQUEST_URI'];
98
- if (isset($params['redirect'])) $log_redirect = esc_url($params['redirect']);
99
- if (isset($_GET['redirect_to'])) $log_redirect = esc_url($_GET['redirect_to']);
100
 
101
  $up = parse_url($log_redirect);
102
  if (isset($up['host']) && $up['host'] != $_SERVER['SERVER_NAME']) $log_redirect = $_SERVER['REQUEST_URI'];
@@ -164,9 +164,9 @@ class Login
164
 
165
  Session::clear('login_error');
166
  $creds = array();
167
- $creds['user_login'] = isset($_POST['wpdm_login']['log']) ? $_POST['wpdm_login']['log'] : '';
168
  $creds['user_password'] = isset($_POST['wpdm_login']['pwd']) ? $_POST['wpdm_login']['pwd'] : '';
169
- $creds['remember'] = isset($_POST['rememberme']) ? $_POST['rememberme'] : false;
170
  $user = wp_signon($creds, false);
171
  if (is_wp_error($user)) {
172
  $login_error = $user->get_error_message();
95
  $regurl = get_permalink($regurl);
96
  }
97
  $log_redirect = $_SERVER['REQUEST_URI'];
98
+ if (isset($params['redirect'])) $log_redirect = esc_url_raw($params['redirect']);
99
+ if (isset($_GET['redirect_to'])) $log_redirect = esc_url_raw($_GET['redirect_to']);
100
 
101
  $up = parse_url($log_redirect);
102
  if (isset($up['host']) && $up['host'] != $_SERVER['SERVER_NAME']) $log_redirect = $_SERVER['REQUEST_URI'];
164
 
165
  Session::clear('login_error');
166
  $creds = array();
167
+ $creds['user_login'] = isset($_POST['wpdm_login']['log']) ? wpdm_query_var('wpdm_login/log') : '';
168
  $creds['user_password'] = isset($_POST['wpdm_login']['pwd']) ? $_POST['wpdm_login']['pwd'] : '';
169
+ $creds['remember'] = isset($_POST['rememberme']) ? wpdm_query_var('rememberme', 'int') : false;
170
  $user = wp_signon($creds, false);
171
  if (is_wp_error($user)) {
172
  $login_error = $user->get_error_message();
src/__/Apply.php CHANGED
@@ -26,16 +26,10 @@ class Apply
26
  add_filter('wpdm_custom_data', array($this, 'skipLocks'), 10, 2);
27
  add_action("wp_ajax_nopriv_showLockOptions", array($this, 'showLockOptions'));
28
  add_action("wp_ajax_showLockOptions", array($this, 'showLockOptions'));
29
- add_action("wp_ajax_wpdm_addtofav", array($this, 'addToFav'));
30
 
31
  add_action('wp_ajax_wpdm_verify_file_pass', array($this, 'checkFilePassword'));
32
  add_action('wp_ajax_nopriv_wpdm_verify_file_pass', array($this, 'checkFilePassword'));
33
 
34
- add_action("wp_ajax_wpdm_email_lock", [$this, 'verifyEmailLock']);
35
- add_action("wp_ajax_nopriv_wpdm_email_lock", [$this, 'verifyEmailLock']);
36
-
37
- add_action("wp_ajax_wpdm_create_term", [$this, 'createTerm']);
38
-
39
  add_action("wp_ajax_wpdm_generate_password", [$this, 'generatePassword']);
40
  add_action("wp_ajax_wpdm-activate-shop", [$this, 'activatePremiumPackage']);
41
  add_action("wp_ajax_wpdm-install-addon", [$this, 'installAddon']);
@@ -74,7 +68,6 @@ class Apply
74
  add_action('save_post', array($this, 'dashboardPages'));
75
  add_action('wp_ajax_clear_cache', array($this, 'clearCache'));
76
  add_action('wp_ajax_clear_stats', array($this, 'clearStats'));
77
- add_action('wp_ajax_generate_tdl', array($this, 'generateTDL'));
78
  add_action('admin_head', array($this, 'uiColors'));
79
 
80
  }
@@ -440,14 +433,15 @@ class Apply
440
  {
441
  if (isset($_POST['actioninddlpvr'], $_POST['wpdmfileid']) && $_POST['actioninddlpvr'] != '') {
442
  $limit = get_option('__wpdm_private_link_usage_limit', 3);
443
- $fileid = intval($_POST['wpdmfileid']);
444
- $data = get_post_meta($_POST['wpdmfileid'], '__wpdm_fileinfo', true);
 
445
  $data = $data ? $data : array();
446
  $package = get_post($fileid);
447
  $packagemeta = wpdm_custom_data($fileid);
448
- $password = isset($data[$_POST['wpdmfile']]['password']) && $data[$_POST['wpdmfile']]['password'] != "" ? $data[$_POST['wpdmfile']]['password'] : $packagemeta['password'];
449
  $pu = isset($packagemeta['password_usage']) && is_array($packagemeta['password_usage']) ? $packagemeta['password_usage'] : array();
450
- if ($password == $_POST['filepass'] || strpos($password, "[" . $_POST['filepass'] . "]") !== FALSE) {
451
  $pul = $packagemeta['password_usage_limit'];
452
  if (is_array($pu) && isset($pu[$password]) && $pu[$password] >= $pul && $pul > 0) {
453
  $data['error'] = __("Password usages limit exceeded", "download-manager");
@@ -556,31 +550,10 @@ class Apply
556
  function showLockOptions()
557
  {
558
  if (!isset($_REQUEST['id'])) die('ID Missing!');
559
- echo WPDM()->package->downloadLink((int)$_REQUEST['id'], 1);
560
  die();
561
  }
562
 
563
- function addToFav()
564
- {
565
- if (!is_user_logged_in()) die('error');
566
- $pid = (int)$_REQUEST['pid'];
567
- $ufavs = maybe_unserialize(get_post_meta($pid, '__wpdm_favs', true));
568
- $myfavs = maybe_unserialize(get_user_meta(get_current_user_id(), '__wpdm_favs', true));
569
- if (!is_array($myfavs)) $myfavs = array();
570
- if (!is_array($ufavs)) $ufavs = array();
571
-
572
- if (is_array($myfavs) && ($key = array_search($_REQUEST['pid'], $myfavs)) !== false) {
573
- unset($myfavs[$key]);
574
- if (isset($ufavs[get_current_user_id()])) unset($ufavs[get_current_user_id()]);
575
- } else {
576
- $myfavs[] = $_REQUEST['pid'];
577
- $ufavs[get_current_user_id()] = time();
578
- }
579
- update_user_meta(get_current_user_id(), '__wpdm_favs', $myfavs);
580
- update_post_meta($pid, '__wpdm_favs', $ufavs);
581
- die('ok');
582
- }
583
-
584
 
585
  function verifyEmail($errors, $sanitized_user_login, $user_email)
586
  {
@@ -615,28 +588,6 @@ class Apply
615
  return $user;
616
  }
617
 
618
- function generateTDL()
619
- {
620
- if (is_user_logged_in() && AuthorDashboard::hasAccess(get_current_user_id()) && wp_verify_nonce($_REQUEST['__tdlnonce'], NONCE_KEY)) {
621
- $pid = (int)$_REQUEST['pid'];
622
- $pack = get_post($pid);
623
- if (current_user_can(WPDM_ADMIN_CAP) || $pack->post_author == get_current_user_id()) {
624
- Session::set('__wpdm_unlocked_' . $pid, 1);
625
- $key = uniqid();
626
- $expire = time() + ((int)$_REQUEST['exmisd'] * (int)$_REQUEST['expire_multiply']);
627
- update_post_meta($pid, "__wpdmkey_" . $key, array('use' => (int)$_REQUEST['ulimit'], 'expire' => $expire));
628
- $download_page_key = Crypt::encrypt(array('pid' => $pid, 'key' => $key));
629
- $download_page = home_url("wpdm-download/{$download_page_key}");
630
- $download_url = wpdm_download_url($pid, array("_wpdmkey" => $key));
631
- wp_send_json(array('download_url' => $download_url, 'download_page' => $download_page));
632
- die();
633
- }
634
- }
635
- wp_send_json(array('download_url' => 'Error! Unauthorized Access', 'download_page' => 'Error! Unauthorized Access'));
636
-
637
- }
638
-
639
-
640
 
641
  function validateLoginPage($content)
642
  {
@@ -659,129 +610,6 @@ class Apply
659
  return $feed;
660
  }
661
 
662
- function verifyEmailLock(){
663
- global $wpdb;
664
-
665
- if (!isset($_POST['__wpdm_ID'])) return;
666
- $id = (int)$_POST['__wpdm_ID'];
667
- $key = uniqid();
668
- $file = get_post($id, ARRAY_A);
669
- $file = wpdm_setup_package_data($file);
670
- $file1 = $file;
671
- $data = array('error' => '', 'downloadurl' => '');
672
-
673
- if (wpdm_verify_email(wpdm_query_var('email'))) {
674
-
675
- $subject = "Your Download Link";
676
- $site = get_option('blogname');
677
-
678
- $limit = get_option('__wpdm_private_link_usage_limit',3);
679
- $xpire_period = ((int)get_option('__wpdm_private_link_expiration_period', 3)) * ((int)get_option('__wpdm_private_link_expiration_period_unit', 60));
680
- $xpire_period = $xpire_period > 0 ? $xpire_period : 3600;
681
-
682
- //When there are custom form data with the email lock form, ex: Name, Company Name, Position, etc.
683
- $custom_form_data = isset($_POST['custom_form_field']) ? $_POST['custom_form_field'] : array();
684
- if(wpdm_query_var('name') !== '') $custom_form_data = ['name' => wpdm_query_var('name')] + $custom_form_data;
685
-
686
- //do something before sending download link
687
- do_action("wpdm_before_email_download_link", $_POST, $file);
688
-
689
- $show_download_link_instantly = isset($file['email_lock_idl']) ? (int)$file['email_lock_idl'] : 3;
690
- $show_download_link_instantly_also_mail = isset($file['email_lock_idl_email']) ? (int)$file['email_lock_idl_email'] : 0;
691
-
692
- $request_status = $show_download_link_instantly === 0 ? 3 : $show_download_link_instantly;
693
- $wpdb->insert("{$wpdb->prefix}ahm_emails", array('email' => $_POST['email'], 'pid' => $file['ID'], 'date' => time(), 'custom_data' => serialize($custom_form_data), 'request_status' => $request_status));
694
- $subscriberID = $wpdb->insert_id;
695
-
696
- $download_url = add_query_arg(['subscriber' => \WPDM\__\Crypt::encrypt($subscriberID)], WPDM()->package->expirableDownloadLink($id, $limit, $xpire_period));
697
- $download_page_url = add_query_arg(['subscriber' =>\WPDM\__\Crypt::encrypt($subscriberID)], WPDM()->package->expirableDownloadPage($id, $limit, $xpire_period));
698
-
699
- if($show_download_link_instantly === 0 || ($show_download_link_instantly == 1 && $show_download_link_instantly_also_mail == 0)) {
700
- $name = isset($cff['name'])?$cff['name']:'';
701
- $email_params = array('to_email' => $_POST['email'], 'name' => $name, 'download_count' => $limit, 'package_name' => $file['post_title'], 'package_url' => get_permalink($id), 'download_url' => $download_url, 'download_page_url' => $download_page_url);
702
- $email_params = apply_filters("wpdm_email_lock_mail_params", $email_params, $file);
703
- \WPDM\__\Email::send("email-lock", $email_params);
704
-
705
- }
706
- $elmsg = sanitize_textarea_field(get_post_meta($id, '__wpdm_email_lock_msg', true));
707
- if ($show_download_link_instantly === 0) {
708
- $data['downloadurl'] = "";
709
- $data['msg'] = ($elmsg !='' ? $elmsg : __( "Download link sent to your email!" , "download-manager" ));
710
- $data['type'] = 'success';
711
- } else if ($show_download_link_instantly === 2) {
712
- $data['downloadurl'] = "";
713
- $data['msg'] = ($elmsg !='' ? $elmsg : __( "Admin will review your request soon!" , "download-manager" ));
714
- $data['type'] = 'success';
715
- } else {
716
- $data['downloadurl'] = $download_url;
717
- if($show_download_link_instantly_also_mail == 0)
718
- $data['msg'] = ($elmsg !='' ? $elmsg : __( "Download link also sent to your email!" , "download-manager" ));
719
- else
720
- $data['msg'] = ($elmsg !='' ? $elmsg : __( "Download will be started shortly!" , "download-manager" ));
721
- }
722
-
723
- if(!wpdm_is_ajax()){
724
-
725
- @setcookie("wpdm_getlink_data_".$key, json_encode($data));
726
-
727
- if(isset($data['downloadurl']) && $data['downloadurl']!=''){
728
- header("location: ".$data['downloadurl']);
729
- die();
730
- }
731
-
732
- header("location: ".$_SERVER['HTTP_REFERER']."#nojs_popup|ckid:".$key);
733
- die();
734
- }
735
-
736
- $_pdata = $_POST;
737
- $_pdata['pid'] = $file['ID'];
738
- $_pdata['time'] = time();
739
- Session::set("__wpdm_email_lock_verified", $_pdata, 604800);
740
- wp_send_json($data);
741
- die();
742
- } else {
743
- $data['downloadurl'] = "";
744
- $data['msg'] = get_option('__wpdm_blocked_domain_msg');
745
- if(trim($data['msg']) === '') $data['msg'] = __( "Invalid Email Address!" , "download-manager" );
746
- $data['type'] = 'error';
747
-
748
- if(!wpdm_is_ajax()){
749
-
750
- @setcookie("wpdm_getlink_data_".$key, json_encode($data));
751
-
752
- if(isset($data['downloadurl']) && $data['downloadurl']!=''){
753
- header("location: ".$data['downloadurl']);
754
- die();
755
- }
756
-
757
- header("location: ".$_SERVER['HTTP_REFERER']."#nojs_popup|ckid:".$key);
758
- die();
759
- }
760
-
761
- wp_send_json($data);
762
- die();
763
- }
764
-
765
- }
766
-
767
-
768
- function createTerm()
769
- {
770
- if(wp_verify_nonce(wpdm_query_var('__nonce'), NONCE_KEY)) {
771
- $_term = wp_create_term(wpdm_query_var('term'), wpdm_query_var('taxonomy'));
772
- $_term_id = wpdm_valueof($_term, 'term_id');
773
- if($_term_id) {
774
- $term = get_term($_term_id);
775
- wp_send_json(['success' => true, 'term' => $term, 'html' => '<li class="wpdm-tag"><label><input type="checkbox" name="taxonomy['.wpdm_query_var('taxonomy').'][]" class="wpdmtag" value="'.$term->term_id.'"> <span class="tagname">'.$term->name.'</span></label></li>']);
776
- } else {
777
- wp_send_json(['success' => false, 'term' => $_term]);
778
- }
779
- } else {
780
- wp_send_json(['success' => false]);
781
- }
782
- }
783
-
784
-
785
  function shopLogo($args, $id)
786
  {
787
  if (is_object($id)) $id = $id->user_id;
@@ -835,7 +663,7 @@ class Apply
835
  .w3eden .wpdm_cart thead th,
836
  .w3eden #csp .list-group-item,
837
  .w3eden .modal-title {
838
- font-family: <?php echo $font; ?> -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
839
  text-transform: uppercase;
840
  font-weight: 700;
841
  }
@@ -849,7 +677,7 @@ class Apply
849
  <style>
850
  <?php
851
  echo '/* WPDM Link Template Styles */';
852
- echo $css;
853
  ?>
854
  </style>
855
  <?php
@@ -882,40 +710,40 @@ class Apply
882
  <style>
883
 
884
  :root {
885
- --color-primary: <?php echo $primary; ?>;
886
  --color-primary-rgb: <?php echo wpdm_hex2rgb($primary); ?>;
887
  --color-primary-hover: <?php echo isset($uicolors['primary'])?$uicolors['primary_hover']:'#4a8eff'; ?>;
888
  --color-primary-active: <?php echo isset($uicolors['primary'])?$uicolors['primary_active']:'#4a8eff'; ?>;
889
- --color-secondary: <?php echo $secondary; ?>;
890
  --color-secondary-rgb: <?php echo wpdm_hex2rgb($secondary); ?>;
891
- --color-secondary-hover: <?php echo isset($uicolors['secondary'])?$uicolors['secondary_hover']:'#4a8eff'; ?>;
892
- --color-secondary-active: <?php echo isset($uicolors['secondary'])?$uicolors['secondary_active']:'#4a8eff'; ?>;
893
  --color-success: <?php echo $success; ?>;
894
  --color-success-rgb: <?php echo wpdm_hex2rgb($success); ?>;
895
- --color-success-hover: <?php echo isset($uicolors['success_hover'])?$uicolors['success_hover']:'#4a8eff'; ?>;
896
- --color-success-active: <?php echo isset($uicolors['success_active'])?$uicolors['success_active']:'#4a8eff'; ?>;
897
- --color-info: <?php echo $info; ?>;
898
  --color-info-rgb: <?php echo wpdm_hex2rgb($info); ?>;
899
- --color-info-hover: <?php echo isset($uicolors['info_hover'])?$uicolors['info_hover']:'#2CA8FF'; ?>;
900
- --color-info-active: <?php echo isset($uicolors['info_active'])?$uicolors['info_active']:'#2CA8FF'; ?>;
901
- --color-warning: <?php echo $warning; ?>;
902
  --color-warning-rgb: <?php echo wpdm_hex2rgb($warning); ?>;
903
- --color-warning-hover: <?php echo isset($uicolors['warning_hover'])?$uicolors['warning_hover']:'orange'; ?>;
904
- --color-warning-active: <?php echo isset($uicolors['warning_active'])?$uicolors['warning_active']:'orange'; ?>;
905
  --color-danger: <?php echo $danger; ?>;
906
  --color-danger-rgb: <?php echo wpdm_hex2rgb($danger); ?>;
907
- --color-danger-hover: <?php echo isset($uicolors['danger_hover'])?$uicolors['danger_hover']:'#ff5062'; ?>;
908
- --color-danger-active: <?php echo isset($uicolors['danger_active'])?$uicolors['danger_active']:'#ff5062'; ?>;
909
- --color-green: <?php echo isset($uicolors['green'])?$uicolors['green']:'#30b570'; ?>;
910
- --color-blue: <?php echo isset($uicolors['blue'])?$uicolors['blue']:'#0073ff'; ?>;
911
- --color-purple: <?php echo isset($uicolors['purple'])?$uicolors['purple']:'#8557D3'; ?>;
912
- --color-red: <?php echo isset($uicolors['red'])?$uicolors['red']:'#ff5062'; ?>;
913
  --color-muted: rgba(69, 89, 122, 0.6);
914
- --wpdm-font: <?php echo $font; ?> -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
915
  }
916
 
917
  .wpdm-download-link<?php echo $class; ?> {
918
- border-radius: <?php echo (isset($ui_button['borderradius'])?$ui_button['borderradius']:4); ?>px;
919
  }
920
 
921
 
26
  add_filter('wpdm_custom_data', array($this, 'skipLocks'), 10, 2);
27
  add_action("wp_ajax_nopriv_showLockOptions", array($this, 'showLockOptions'));
28
  add_action("wp_ajax_showLockOptions", array($this, 'showLockOptions'));
 
29
 
30
  add_action('wp_ajax_wpdm_verify_file_pass', array($this, 'checkFilePassword'));
31
  add_action('wp_ajax_nopriv_wpdm_verify_file_pass', array($this, 'checkFilePassword'));
32
 
 
 
 
 
 
33
  add_action("wp_ajax_wpdm_generate_password", [$this, 'generatePassword']);
34
  add_action("wp_ajax_wpdm-activate-shop", [$this, 'activatePremiumPackage']);
35
  add_action("wp_ajax_wpdm-install-addon", [$this, 'installAddon']);
68
  add_action('save_post', array($this, 'dashboardPages'));
69
  add_action('wp_ajax_clear_cache', array($this, 'clearCache'));
70
  add_action('wp_ajax_clear_stats', array($this, 'clearStats'));
 
71
  add_action('admin_head', array($this, 'uiColors'));
72
 
73
  }
433
  {
434
  if (isset($_POST['actioninddlpvr'], $_POST['wpdmfileid']) && $_POST['actioninddlpvr'] != '') {
435
  $limit = get_option('__wpdm_private_link_usage_limit', 3);
436
+ $fileid = wpdm_query_var('wpdmfileid', 'int');
437
+ $filepass = wpdm_query_var('filepass', 'escs');
438
+ $data = get_post_meta(wpdm_query_var('wpdmfileid', 'int'), '__wpdm_fileinfo', true);
439
  $data = $data ? $data : array();
440
  $package = get_post($fileid);
441
  $packagemeta = wpdm_custom_data($fileid);
442
+ $password = isset($data[$fileid]['password']) && $data[$fileid]['password'] != "" ? $data[$fileid]['password'] : $packagemeta['password'];
443
  $pu = isset($packagemeta['password_usage']) && is_array($packagemeta['password_usage']) ? $packagemeta['password_usage'] : array();
444
+ if ($password == $filepass || substr_count($password, "[" . $filepass . "]") > 0) {
445
  $pul = $packagemeta['password_usage_limit'];
446
  if (is_array($pu) && isset($pu[$password]) && $pu[$password] >= $pul && $pul > 0) {
447
  $data['error'] = __("Password usages limit exceeded", "download-manager");
550
  function showLockOptions()
551
  {
552
  if (!isset($_REQUEST['id'])) die('ID Missing!');
553
+ echo WPDM()->package->downloadLink(wpdm_query_var('id', 'int'), 1);
554
  die();
555
  }
556
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
557
 
558
  function verifyEmail($errors, $sanitized_user_login, $user_email)
559
  {
588
  return $user;
589
  }
590
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
591
 
592
  function validateLoginPage($content)
593
  {
610
  return $feed;
611
  }
612
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
  function shopLogo($args, $id)
614
  {
615
  if (is_object($id)) $id = $id->user_id;
663
  .w3eden .wpdm_cart thead th,
664
  .w3eden #csp .list-group-item,
665
  .w3eden .modal-title {
666
+ font-family: <?php echo __::sanitize_var($font); ?> -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
667
  text-transform: uppercase;
668
  font-weight: 700;
669
  }
677
  <style>
678
  <?php
679
  echo '/* WPDM Link Template Styles */';
680
+ echo wpdm_escs($css);
681
  ?>
682
  </style>
683
  <?php
710
  <style>
711
 
712
  :root {
713
+ --color-primary: <?php echo esc_attr($primary); ?>;
714
  --color-primary-rgb: <?php echo wpdm_hex2rgb($primary); ?>;
715
  --color-primary-hover: <?php echo isset($uicolors['primary'])?$uicolors['primary_hover']:'#4a8eff'; ?>;
716
  --color-primary-active: <?php echo isset($uicolors['primary'])?$uicolors['primary_active']:'#4a8eff'; ?>;
717
+ --color-secondary: <?php echo esc_attr($secondary); ?>;
718
  --color-secondary-rgb: <?php echo wpdm_hex2rgb($secondary); ?>;
719
+ --color-secondary-hover: <?php echo isset($uicolors['secondary'])?esc_attr($uicolors['secondary_hover']):'#4a8eff'; ?>;
720
+ --color-secondary-active: <?php echo isset($uicolors['secondary'])?esc_attr($uicolors['secondary_active']):'#4a8eff'; ?>;
721
  --color-success: <?php echo $success; ?>;
722
  --color-success-rgb: <?php echo wpdm_hex2rgb($success); ?>;
723
+ --color-success-hover: <?php echo isset($uicolors['success_hover'])?esc_attr($uicolors['success_hover']):'#4a8eff'; ?>;
724
+ --color-success-active: <?php echo isset($uicolors['success_active'])?esc_attr($uicolors['success_active']):'#4a8eff'; ?>;
725
+ --color-info: <?php echo esc_attr($info); ?>;
726
  --color-info-rgb: <?php echo wpdm_hex2rgb($info); ?>;
727
+ --color-info-hover: <?php echo isset($uicolors['info_hover'])?esc_attr($uicolors['info_hover']):'#2CA8FF'; ?>;
728
+ --color-info-active: <?php echo isset($uicolors['info_active'])?esc_attr($uicolors['info_active']):'#2CA8FF'; ?>;
729
+ --color-warning: <?php echo esc_attr($warning); ?>;
730
  --color-warning-rgb: <?php echo wpdm_hex2rgb($warning); ?>;
731
+ --color-warning-hover: <?php echo isset($uicolors['warning_hover'])?esc_attr($uicolors['warning_hover']):'orange'; ?>;
732
+ --color-warning-active: <?php echo isset($uicolors['warning_active'])?esc_attr($uicolors['warning_active']):'orange'; ?>;
733
  --color-danger: <?php echo $danger; ?>;
734
  --color-danger-rgb: <?php echo wpdm_hex2rgb($danger); ?>;
735
+ --color-danger-hover: <?php echo isset($uicolors['danger_hover'])?esc_attr($uicolors['danger_hover']):'#ff5062'; ?>;
736
+ --color-danger-active: <?php echo isset($uicolors['danger_active'])?esc_attr($uicolors['danger_active']):'#ff5062'; ?>;
737
+ --color-green: <?php echo isset($uicolors['green'])?esc_attr($uicolors['green']):'#30b570'; ?>;
738
+ --color-blue: <?php echo isset($uicolors['blue'])?esc_attr($uicolors['blue']):'#0073ff'; ?>;
739
+ --color-purple: <?php echo isset($uicolors['purple'])?esc_attr($uicolors['purple']):'#8557D3'; ?>;
740
+ --color-red: <?php echo isset($uicolors['red'])?esc_attr($uicolors['red']):'#ff5062'; ?>;
741
  --color-muted: rgba(69, 89, 122, 0.6);
742
+ --wpdm-font: <?php echo __::sanitize_var($font); ?> -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
743
  }
744
 
745
  .wpdm-download-link<?php echo $class; ?> {
746
+ border-radius: <?php echo (isset($ui_button['borderradius'])?esc_attr($ui_button['borderradius']):4); ?>px;
747
  }
748
 
749
 
src/__/Updater.php CHANGED
@@ -31,15 +31,17 @@ class Updater
31
  function checkUpdate()
32
  {
33
 
34
- if (!current_user_can(WPDM_ADMIN_CAP) || get_option('wpdm_update_notice') === 'disabled') die();
 
 
35
 
36
  include_once(ABSPATH . 'wp-admin/includes/plugin.php');
37
 
38
  $latest = $this->getLatestVersions();
39
  $plugins = get_plugins();
40
 
41
- $page = isset($_REQUEST['page']) ? esc_attr($_REQUEST['page']) : '';
42
- $plugin_info_url = isset($_REQUEST['plugin_url']) ? $_REQUEST['plugin_url'] : 'https://www.wpdownloadmanager.com/purchases/';
43
  if (is_array($latest)) {
44
  foreach ($latest as $plugin_dir => $latestv) {
45
  if ($plugin_dir !== 'download-manager') {
@@ -106,6 +108,7 @@ NOTICE;
106
  console.log('Checking WPDM Version!');
107
  jQuery.post(ajaxurl, {
108
  action: 'wpdm_check_update',
 
109
  page: '<?php echo $page; ?>'
110
  }, function (res) {
111
  jQuery('#wpfooter').after(res);
31
  function checkUpdate()
32
  {
33
 
34
+ if (get_option('wpdm_update_notice') === 'disabled') die();
35
+
36
+ __::isAuthentic('__upcnonce', WPDM_PRI_NONCE, WPDM_ADMIN_CAP);
37
 
38
  include_once(ABSPATH . 'wp-admin/includes/plugin.php');
39
 
40
  $latest = $this->getLatestVersions();
41
  $plugins = get_plugins();
42
 
43
+ $page = wpdm_query_var('page');
44
+ $plugin_info_url = wpdm_query_var('plugin_url', 'url', 'https://www.wpdownloadmanager.com/purchases/');
45
  if (is_array($latest)) {
46
  foreach ($latest as $plugin_dir => $latestv) {
47
  if ($plugin_dir !== 'download-manager') {
108
  console.log('Checking WPDM Version!');
109
  jQuery.post(ajaxurl, {
110
  action: 'wpdm_check_update',
111
+ __upcnonce: '<?= wp_create_nonce(WPDM_PRI_NONCE) ?>',
112
  page: '<?php echo $page; ?>'
113
  }, function (res) {
114
  jQuery('#wpfooter').after(res);
src/__/__.php CHANGED
@@ -431,6 +431,13 @@ class __
431
  return $number;
432
  }
433
 
 
 
 
 
 
 
 
434
  static function isAuthentic($nonce_var, $nonce_key, $access_level, $is_ajax = true){
435
  $nonce_var = __::sanitize_var($nonce_var, 'txt');
436
  if($is_ajax) {
431
  return $number;
432
  }
433
 
434
+ /**
435
+ * WPDM Admin action authentication function
436
+ * @param $nonce_var
437
+ * @param $nonce_key
438
+ * @param $access_level
439
+ * @param bool $is_ajax
440
+ */
441
  static function isAuthentic($nonce_var, $nonce_key, $access_level, $is_ajax = true){
442
  $nonce_var = __::sanitize_var($nonce_var, 'txt');
443
  if($is_ajax) {
src/__/views/message.php CHANGED
@@ -19,12 +19,7 @@ if (!defined('ABSPATH')) die();
19
  <link rel="stylesheet" href="<?php echo WPDM_BASE_URL; ?>assets/css/front.css" />
20
  <link rel="stylesheet" href="<?php echo WPDM_BASE_URL; ?>assets/font-awesome/css/font-awesome.min.css" />
21
  <link href="https://fonts.googleapis.com/css?family=Overpass:400,700" rel="stylesheet">
22
- <!--
23
- <script src="<?php echo includes_url(); ?>/js/jquery/jquery.js"></script>
24
- <script src="<?php echo includes_url(); ?>/js/jquery/jquery.form.min.js"></script>
25
- <script src="<?php echo WPDM_BASE_URL; ?>assets/bootstrap/js/bootstrap.min.js"></script>
26
- <script src="<?php echo WPDM_BASE_URL; ?>assets/js/front.js"></script>
27
- -->
28
  <?php
29
  \WPDM\__\Apply::uiColors();
30
  ?>
19
  <link rel="stylesheet" href="<?php echo WPDM_BASE_URL; ?>assets/css/front.css" />
20
  <link rel="stylesheet" href="<?php echo WPDM_BASE_URL; ?>assets/font-awesome/css/font-awesome.min.css" />
21
  <link href="https://fonts.googleapis.com/css?family=Overpass:400,700" rel="stylesheet">
22
+
 
 
 
 
 
23
  <?php
24
  \WPDM\__\Apply::uiColors();
25
  ?>