iqvoc 3.3.1 → 3.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/CHANGELOG.md +101 -0
  2. data/app/assets/javascripts/framework.js +1 -0
  3. data/app/assets/stylesheets/framework.css +2 -0
  4. data/app/views/layouts/application.html.erb +2 -11
  5. data/iqvoc.gemspec +2 -1
  6. data/lib/iqvoc.rb +0 -3
  7. data/lib/iqvoc/version.rb +1 -1
  8. data/public/assets/blueprint/ie-0761b92d02baf44f0b2011e3009e6aa9.css.gz +0 -0
  9. data/public/assets/blueprint/ie.css.gz +0 -0
  10. data/public/assets/iqvoc/ie_fixes-7a001f31445ddfb2e0668c419f81742f.css.gz +0 -0
  11. data/public/assets/iqvoc/ie_fixes.css.gz +0 -0
  12. data/public/assets/manifest-6f0772f7ec93cc20de428ae859353e92.js +21 -0
  13. data/public/assets/manifest-6f0772f7ec93cc20de428ae859353e92.js.gz +0 -0
  14. data/public/assets/manifest-d52be2520b68121c73695e4026876a98.css +1421 -0
  15. data/public/assets/manifest-d52be2520b68121c73695e4026876a98.css.gz +0 -0
  16. data/public/assets/manifest.css +295 -0
  17. data/public/assets/manifest.css.gz +0 -0
  18. data/public/assets/manifest.js +2 -2
  19. data/public/assets/manifest.js.gz +0 -0
  20. data/public/assets/manifest.yml +2 -5
  21. data/vendor/assets/images/ajax-loader.gif +0 -0
  22. data/vendor/assets/images/file.gif +0 -0
  23. data/vendor/assets/images/folder-closed.gif +0 -0
  24. data/vendor/assets/images/folder.gif +0 -0
  25. data/vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  26. data/vendor/assets/images/jquery-ui/ui-bg_flat_55_fbec88_40x100.png +0 -0
  27. data/vendor/assets/images/jquery-ui/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  28. data/vendor/assets/images/jquery-ui/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  29. data/vendor/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  30. data/vendor/assets/images/jquery-ui/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  31. data/vendor/assets/images/jquery-ui/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  32. data/vendor/assets/images/jquery-ui/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  33. data/vendor/assets/images/jquery-ui/ui-icons_217bc0_256x240.png +0 -0
  34. data/vendor/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  35. data/vendor/assets/images/jquery-ui/ui-icons_469bdd_256x240.png +0 -0
  36. data/vendor/assets/images/jquery-ui/ui-icons_6da8d5_256x240.png +0 -0
  37. data/vendor/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  38. data/vendor/assets/images/jquery-ui/ui-icons_d8e7f3_256x240.png +0 -0
  39. data/vendor/assets/images/jquery-ui/ui-icons_f9bd01_256x240.png +0 -0
  40. data/vendor/assets/images/minus.gif +0 -0
  41. data/vendor/assets/images/plus.gif +0 -0
  42. data/vendor/assets/images/treeview-black-line.gif +0 -0
  43. data/vendor/assets/images/treeview-black.gif +0 -0
  44. data/vendor/assets/images/treeview-default-line.gif +0 -0
  45. data/vendor/assets/images/treeview-default.gif +0 -0
  46. data/vendor/assets/images/treeview-famfamfam-line.gif +0 -0
  47. data/vendor/assets/images/treeview-famfamfam.gif +0 -0
  48. data/vendor/assets/images/treeview-gray-line.gif +0 -0
  49. data/vendor/assets/images/treeview-gray.gif +0 -0
  50. data/vendor/assets/images/treeview-red-line.gif +0 -0
  51. data/vendor/assets/images/treeview-red.gif +0 -0
  52. data/vendor/assets/javascripts/excanvas.js +35 -0
  53. data/vendor/assets/javascripts/jit_rgraph.js +153 -0
  54. data/vendor/assets/javascripts/jquery-1.7.1.js +9266 -0
  55. data/vendor/assets/javascripts/jquery-ui-1.8.16.custom.js +3269 -0
  56. data/vendor/assets/javascripts/jquery-ui.datepicker-de.js +22 -0
  57. data/vendor/assets/javascripts/jquery.treeview.async.js +82 -0
  58. data/vendor/assets/javascripts/jquery.treeview.js +251 -0
  59. data/vendor/assets/javascripts/json2.js +485 -0
  60. data/vendor/assets/javascripts/rails.js +373 -0
  61. data/vendor/assets/javascripts/storage.js +122 -0
  62. data/vendor/assets/stylesheets/blueprint/ie.css +35 -0
  63. data/vendor/assets/stylesheets/blueprint/print.css +33 -0
  64. data/vendor/assets/stylesheets/blueprint/screen.css +262 -0
  65. data/vendor/assets/stylesheets/jquery-ui-1.8.16.custom.css +410 -0
  66. data/vendor/assets/stylesheets/jquery.treeview.css.erb +75 -0
  67. metadata +68 -17
@@ -1,3 +1,298 @@
1
+ @media screen, projection {
2
+
3
+ /* -----------------------------------------------------------------------
4
+
5
+
6
+ Blueprint CSS Framework 0.9
7
+ http://blueprintcss.org
8
+
9
+ * Copyright (c) 2007-Present. See LICENSE for more info.
10
+ * See README for instructions on how to use Blueprint.
11
+ * For credits and origins, see AUTHORS.
12
+ * This is a compressed file. See the sources in the 'src' directory.
13
+
14
+ ----------------------------------------------------------------------- */
15
+
16
+ /* reset.css */
17
+ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
18
+ article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;}
19
+ body {line-height:1.5;}
20
+ table {border-collapse:separate;border-spacing:0;}
21
+ caption, th, td {text-align:left;font-weight:normal;}
22
+ table, td, th {vertical-align:middle;}
23
+ blockquote:before, blockquote:after, q:before, q:after {content:"";}
24
+ blockquote, q {quotes:"" "";}
25
+ a img {border:none;}
26
+
27
+ /* typography.css */
28
+ html {font-size:100.01%;}
29
+ body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
30
+ h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
31
+ h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
32
+ h2 {font-size:2em;margin-bottom:0.75em;}
33
+ h3 {font-size:1.5em;line-height:1;margin-bottom:0.5em;}
34
+ h4 {font-size:1.2em;line-height:1.25;margin-bottom:0.1em;}
35
+ h5 {font-size:1em;font-weight:bold;margin-bottom:0.1em;}
36
+ h6 {font-size:1em;font-weight:bold;}
37
+ h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
38
+ p {margin:0 0 1.5em;}
39
+ p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
40
+ p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
41
+ a:focus, a:hover {color:#000;}
42
+ a {color:#009;text-decoration:underline;}
43
+ blockquote {margin:1.5em;color:#666;font-style:italic;}
44
+ strong {font-weight:bold;}
45
+ em, dfn {font-style:italic;}
46
+ dfn {font-weight:bold;}
47
+ sup, sub {line-height:0;}
48
+ abbr, acronym {border-bottom:1px dotted #666;}
49
+ address {margin:0 0 1.5em;font-style:italic;}
50
+ del {color:#666;}
51
+ pre {margin:1.5em 0;white-space:pre;}
52
+ pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
53
+ li ul, li ol {margin:0;}
54
+ ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;}
55
+ ul {list-style-type:disc;}
56
+ ol {list-style-type:decimal;}
57
+ dl {margin:0 0 1.5em 0;}
58
+ dl dt {font-weight:bold;}
59
+ dd {margin-left:1.5em;}
60
+ table {margin-bottom:1.4em;width:100%;}
61
+ th {font-weight:bold;}
62
+ thead th {background:#c3d9ff;}
63
+ th, td, caption {padding:4px 10px 4px 5px;}
64
+ tr.even td {background:#e5ecf9;}
65
+ tfoot {font-style:italic;}
66
+ caption {background:#eee;}
67
+ .small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
68
+ .large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
69
+ .hide {display:none;}
70
+ .quiet {color:#666;}
71
+ .loud {color:#000;}
72
+ .highlight {background:#ff0;}
73
+ .added {background:#060;color:#fff;}
74
+ .removed {background:#900;color:#fff;}
75
+ .first {margin-left:0;padding-left:0;}
76
+ .last {margin-right:0;padding-right:0;}
77
+ .top {margin-top:0;padding-top:0;}
78
+ .bottom {margin-bottom:0;padding-bottom:0;}
79
+
80
+ /* forms.css */
81
+ label {font-weight:bold;}
82
+ fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
83
+ legend {font-weight:bold;font-size:1.2em;}
84
+ input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;}
85
+ input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;}
86
+ input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;}
87
+ input.text, input.title {width:300px;padding:5px;}
88
+ input.title {font-size:1.5em;}
89
+ textarea {width:390px;height:250px;padding:5px;}
90
+ input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;}
91
+ form.inline {line-height:3;}
92
+ form.inline p {margin-bottom:0;}
93
+ .error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
94
+ .error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
95
+ .notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
96
+ .success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
97
+ .error a {color:#8a1f11;}
98
+ .notice a {color:#514721;}
99
+ .success a {color:#264409;}
100
+
101
+ /* grid.css */
102
+ .container {width:950px;margin:0 auto;}
103
+ .showgrid {background:url(src/grid.png);}
104
+ .column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20, .span-21, .span-22, .span-23, .span-24 {float:left;margin-right:10px;}
105
+ .last {margin-right:0;}
106
+ .span-1 {width:30px;}
107
+ .span-2 {width:70px;}
108
+ .span-3 {width:110px;}
109
+ .span-4 {width:150px;}
110
+ .span-5 {width:190px;}
111
+ .span-6 {width:230px;}
112
+ .span-7 {width:270px;}
113
+ .span-8 {width:310px;}
114
+ .span-9 {width:350px;}
115
+ .span-10 {width:390px;}
116
+ .span-11 {width:430px;}
117
+ .span-12 {width:470px;}
118
+ .span-13 {width:510px;}
119
+ .span-14 {width:550px;}
120
+ .span-15 {width:590px;}
121
+ .span-16 {width:630px;}
122
+ .span-17 {width:670px;}
123
+ .span-18 {width:710px;}
124
+ .span-19 {width:750px;}
125
+ .span-20 {width:790px;}
126
+ .span-21 {width:830px;}
127
+ .span-22 {width:870px;}
128
+ .span-23 {width:910px;}
129
+ .span-24 {width:950px;margin-right:0;}
130
+ input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {border-left-width:1px!important;border-right-width:1px!important;padding-left:5px!important;padding-right:5px!important;}
131
+ input.span-1, textarea.span-1 {width:18px!important;}
132
+ input.span-2, textarea.span-2 {width:58px!important;}
133
+ input.span-3, textarea.span-3 {width:98px!important;}
134
+ input.span-4, textarea.span-4 {width:138px!important;}
135
+ input.span-5, textarea.span-5 {width:178px!important;}
136
+ input.span-6, textarea.span-6 {width:218px!important;}
137
+ input.span-7, textarea.span-7 {width:258px!important;}
138
+ input.span-8, textarea.span-8 {width:298px!important;}
139
+ input.span-9, textarea.span-9 {width:338px!important;}
140
+ input.span-10, textarea.span-10 {width:378px!important;}
141
+ input.span-11, textarea.span-11 {width:418px!important;}
142
+ input.span-12, textarea.span-12 {width:458px!important;}
143
+ input.span-13, textarea.span-13 {width:498px!important;}
144
+ input.span-14, textarea.span-14 {width:538px!important;}
145
+ input.span-15, textarea.span-15 {width:578px!important;}
146
+ input.span-16, textarea.span-16 {width:618px!important;}
147
+ input.span-17, textarea.span-17 {width:658px!important;}
148
+ input.span-18, textarea.span-18 {width:698px!important;}
149
+ input.span-19, textarea.span-19 {width:738px!important;}
150
+ input.span-20, textarea.span-20 {width:778px!important;}
151
+ input.span-21, textarea.span-21 {width:818px!important;}
152
+ input.span-22, textarea.span-22 {width:858px!important;}
153
+ input.span-23, textarea.span-23 {width:898px!important;}
154
+ input.span-24, textarea.span-24 {width:938px!important;}
155
+ .append-1 {padding-right:40px;}
156
+ .append-2 {padding-right:80px;}
157
+ .append-3 {padding-right:120px;}
158
+ .append-4 {padding-right:160px;}
159
+ .append-5 {padding-right:200px;}
160
+ .append-6 {padding-right:240px;}
161
+ .append-7 {padding-right:280px;}
162
+ .append-8 {padding-right:320px;}
163
+ .append-9 {padding-right:360px;}
164
+ .append-10 {padding-right:400px;}
165
+ .append-11 {padding-right:440px;}
166
+ .append-12 {padding-right:480px;}
167
+ .append-13 {padding-right:520px;}
168
+ .append-14 {padding-right:560px;}
169
+ .append-15 {padding-right:600px;}
170
+ .append-16 {padding-right:640px;}
171
+ .append-17 {padding-right:680px;}
172
+ .append-18 {padding-right:720px;}
173
+ .append-19 {padding-right:760px;}
174
+ .append-20 {padding-right:800px;}
175
+ .append-21 {padding-right:840px;}
176
+ .append-22 {padding-right:880px;}
177
+ .append-23 {padding-right:920px;}
178
+ .prepend-1 {padding-left:40px;}
179
+ .prepend-2 {padding-left:80px;}
180
+ .prepend-3 {padding-left:120px;}
181
+ .prepend-4 {padding-left:160px;}
182
+ .prepend-5 {padding-left:200px;}
183
+ .prepend-6 {padding-left:240px;}
184
+ .prepend-7 {padding-left:280px;}
185
+ .prepend-8 {padding-left:320px;}
186
+ .prepend-9 {padding-left:360px;}
187
+ .prepend-10 {padding-left:400px;}
188
+ .prepend-11 {padding-left:440px;}
189
+ .prepend-12 {padding-left:480px;}
190
+ .prepend-13 {padding-left:520px;}
191
+ .prepend-14 {padding-left:560px;}
192
+ .prepend-15 {padding-left:600px;}
193
+ .prepend-16 {padding-left:640px;}
194
+ .prepend-17 {padding-left:680px;}
195
+ .prepend-18 {padding-left:720px;}
196
+ .prepend-19 {padding-left:760px;}
197
+ .prepend-20 {padding-left:800px;}
198
+ .prepend-21 {padding-left:840px;}
199
+ .prepend-22 {padding-left:880px;}
200
+ .prepend-23 {padding-left:920px;}
201
+ .border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
202
+ .colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
203
+ .pull-1 {margin-left:-40px;}
204
+ .pull-2 {margin-left:-80px;}
205
+ .pull-3 {margin-left:-120px;}
206
+ .pull-4 {margin-left:-160px;}
207
+ .pull-5 {margin-left:-200px;}
208
+ .pull-6 {margin-left:-240px;}
209
+ .pull-7 {margin-left:-280px;}
210
+ .pull-8 {margin-left:-320px;}
211
+ .pull-9 {margin-left:-360px;}
212
+ .pull-10 {margin-left:-400px;}
213
+ .pull-11 {margin-left:-440px;}
214
+ .pull-12 {margin-left:-480px;}
215
+ .pull-13 {margin-left:-520px;}
216
+ .pull-14 {margin-left:-560px;}
217
+ .pull-15 {margin-left:-600px;}
218
+ .pull-16 {margin-left:-640px;}
219
+ .pull-17 {margin-left:-680px;}
220
+ .pull-18 {margin-left:-720px;}
221
+ .pull-19 {margin-left:-760px;}
222
+ .pull-20 {margin-left:-800px;}
223
+ .pull-21 {margin-left:-840px;}
224
+ .pull-22 {margin-left:-880px;}
225
+ .pull-23 {margin-left:-920px;}
226
+ .pull-24 {margin-left:-960px;}
227
+ .pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;}
228
+ .push-1 {margin:0 -40px 1.5em 40px;}
229
+ .push-2 {margin:0 -80px 1.5em 80px;}
230
+ .push-3 {margin:0 -120px 1.5em 120px;}
231
+ .push-4 {margin:0 -160px 1.5em 160px;}
232
+ .push-5 {margin:0 -200px 1.5em 200px;}
233
+ .push-6 {margin:0 -240px 1.5em 240px;}
234
+ .push-7 {margin:0 -280px 1.5em 280px;}
235
+ .push-8 {margin:0 -320px 1.5em 320px;}
236
+ .push-9 {margin:0 -360px 1.5em 360px;}
237
+ .push-10 {margin:0 -400px 1.5em 400px;}
238
+ .push-11 {margin:0 -440px 1.5em 440px;}
239
+ .push-12 {margin:0 -480px 1.5em 480px;}
240
+ .push-13 {margin:0 -520px 1.5em 520px;}
241
+ .push-14 {margin:0 -560px 1.5em 560px;}
242
+ .push-15 {margin:0 -600px 1.5em 600px;}
243
+ .push-16 {margin:0 -640px 1.5em 640px;}
244
+ .push-17 {margin:0 -680px 1.5em 680px;}
245
+ .push-18 {margin:0 -720px 1.5em 720px;}
246
+ .push-19 {margin:0 -760px 1.5em 760px;}
247
+ .push-20 {margin:0 -800px 1.5em 800px;}
248
+ .push-21 {margin:0 -840px 1.5em 840px;}
249
+ .push-22 {margin:0 -880px 1.5em 880px;}
250
+ .push-23 {margin:0 -920px 1.5em 920px;}
251
+ .push-24 {margin:0 -960px 1.5em 960px;}
252
+ .push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;}
253
+ .prepend-top {margin-top:1.5em;}
254
+ .append-bottom {margin-bottom:1.5em;}
255
+ .box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
256
+ hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
257
+ hr.space {background:#fff;color:#fff;visibility:hidden;}
258
+ .clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
259
+ .clearfix, .container {display:block;}
260
+ .clear {clear:both;}
261
+
262
+ }
263
+ @media print {
264
+
265
+ /* -----------------------------------------------------------------------
266
+
267
+
268
+ Blueprint CSS Framework 0.9
269
+ http://blueprintcss.org
270
+
271
+ * Copyright (c) 2007-Present. See LICENSE for more info.
272
+ * See README for instructions on how to use Blueprint.
273
+ * For credits and origins, see AUTHORS.
274
+ * This is a compressed file. See the sources in the 'src' directory.
275
+
276
+ ----------------------------------------------------------------------- */
277
+
278
+ /* print.css */
279
+ body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
280
+ .container {background:none;}
281
+ hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
282
+ hr.space {background:#fff;color:#fff;visibility:hidden;}
283
+ h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
284
+ code {font:.9em "Courier New", Monaco, Courier, monospace;}
285
+ a img {border:none;}
286
+ p img.top {margin-top:0;}
287
+ blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
288
+ .small {font-size:.9em;}
289
+ .large {font-size:1.1em;}
290
+ .quiet {color:#999;}
291
+ .hide {display:none;}
292
+ a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
293
+ a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}
294
+
295
+ }
1
296
  .treeview, .treeview ul {
2
297
  padding: 0;
3
298
  margin: 0;
Binary file
@@ -17,5 +17,5 @@
17
17
  ,n,o,p,q,r,s;if(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))return;d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f=="undefined"||!!a&&f.event.triggered===a.type?b:f.event.dispatch.apply(i.elem,arguments)},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!g||!(o=g.events))return;b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();return c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n)),c.result}return},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;return a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];return a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey),h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(this instanceof f.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0;else return new f.Event(a,b)},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return f.event.remove(this,"._change"),z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;return g===1&&(h=e,e=function(a){return f().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++)),this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;return f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler),this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=J),this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return f(this.context).on(a,this.selector,b,c),this},die:function(a,b){return f(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;return f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){return i=!1,0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length!==1||w[0]!=="~"&&w[0]!=="+"||!d.parentNode?d:d.parentNode,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);return l&&(m(l,h,e,f),m.uniqueSort(e)),e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}return d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]),{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);return a[0]=e++,a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");return!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" "),a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);return d||e.push.apply(e,g),!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){return a.unshift(!0),a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}return j=a.nodeIndex-e,c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){return a=Array.prototype.slice.call(a,0),b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){return a===b?(h=!0,0):!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b)return h=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)return;m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!a.getElementsByClassName||a.getElementsByClassName("e").length===0)return;a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}return c=c.length>1?f.unique(c):c,this.pushStack(c,"closest",a)},index:function(a){return a?typeof a=="string"?f.inArray(this[0],f(a)):f.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);return L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse()),this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.isFunction(a)?this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))}):typeof a!="object"&&a!==b?this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a)):f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return f.isFunction(a)?this.each(function(b){f(this).wrapInner(a.call(this,b))}):this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);return a.push.apply(a,this.toArray()),this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);return a.push.apply(a,f.clean(arguments)),a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"))
18
18
  ;while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){return this[0]&&this[0].parentNode?f.isFunction(a)?this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=f(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})):this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];return b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1),{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1)return e[b](this[0]),this;for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}return d=e=null,h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){return arguments.length===2&&c===b?this:f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b)return k&&"get"in k&&(g=k.get(a,!1,e))!==b?g:j[c];h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c)return a.offsetWidth!==0?bC(a,b,d):(f.swap(a,bw,function(){e=bC(a,b,d)}),e)},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;return f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight}),c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;return b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;return f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d)),f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;return f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}}),this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){return f.isFunction(d)&&(g=g||e,e=d,d=b),f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b),a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s===2)return;s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return s||(d.mimeType=a),this},abort:function(a){return a=a||"abort",p&&p.abort(a),w(0,a),this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(!d.beforeSend||d.beforeSend.call(e,v,d)!==!1&&s!==2){for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v}return v.abort(),!1},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";return b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){return g||f.error(h+" was not called"),g[0]},b.dataTypes[0]="json","script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return f.globalEval(a),a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";return f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c),this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);return f.isEmptyObject(a)?this.each(e.complete,[!1]):(a=f.extend({},a),e.queue===!1?this.each(g):this.queue(e.queue,g))},stop:function(a,c,d){return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)},d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a}return this.elem[this.prop]},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}return i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;return f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft)),{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;return c===b?(e=this[0],e?(g=cy(e),g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]):null):this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window),function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");c&&b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);return b.trigger(e,d),e.result!==!1},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},handleRemote:function(d){var e,f,g,h=d.data("cross-domain")||null,i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType,j;if(c.fire(d,"ajax:before")){if(d.is("form")){e=d.attr("method"),f=d.attr("action"),g=d.serializeArray();var k=d.data("ujs:submit-button");k&&(g.push(k),d.data("ujs:submit-button",null))}else d.is(c.inputChangeSelector)?(e=d.data("method"),f=d.data("url"),g=d.serialize(),d.data("params")&&(g=g+"&"+d.data("params"))):(e=d.data("method"),f=d.attr("href"),g=d.data("params")||null);return j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){return e.dataType===b&&a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script),c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}},f&&(j.url=f),c.ajax(j)}return!1},handleMethod:function(c){var d=c.attr("href"),e=c.data("method"),f=c.attr("target"),g=a("meta[name=csrf-token]").attr("content"),h=a("meta[name=csrf-param]").attr("content"),i=a('<form method="post" action="'+d+'"></form>'),j='<input name="_method" value="'+e+'" type="hidden" />';h!==b&&g!==b&&(j+='<input name="'+h+'" value="'+g+'" type="hidden" />'),f&&i.attr("target",f),i.hide().append(j).appendTo("body"),i.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]()),b[c](b.data("disable-with")),b.prop("disabled",!0)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with")&&b[c](b.data("ujs:enable-with")),b.prop("disabled",!1)})},allowAction:function(a){var b=a.data("confirm"),d=!1,e;return b?(c.fire(a,"confirm")&&(d=c.confirm(b),e=c.fire(a,"confirm:complete",[d])),d&&e):!0},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";return b.find(g).each(function(){f=a(this);if(d?f.val():!f.val())e=e.add(f)}),e.length?e:!1},nonBlankInputs:function(a,b){return c.blankInputs(a,b,!0)},stopEverything:function(b){return a(b.target).trigger("ujs:everythingStopped"),b.stopImmediatePropagation(),!1},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=!0;return e!==b&&e.submit!==b&&a.each(e.submit,function(a,b){if(typeof b.handler=="function")return f=b.handler(d)}),f},disableElement:function(a){a.data("ujs:enable-with",a.html()),a.html(a.data("disable-with")),a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==b&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1)),a.unbind("click.railsDisable")}},a.ajaxPrefilter(function(a,b,d){a.crossDomain||c.CSRFProtection(d)}),a(document).delegate(c.linkDisableSelector,"ajax:complete",function(){c.enableElement(a(this))}),a(document).delegate(c.linkClickSelector,"click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);e.is(c.linkDisableSelector)&&c.disableElement(e);if(e.data("remote")!==b)return(d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g?!0:(c.handleRemote(e)===!1&&c.enableElement(e),!1);if(e.data("method"))return c.handleMethod
19
19
  (e),!1}),a(document).delegate(c.inputChangeSelector,"change.rails",function(b){var d=a(this);return c.allowAction(d)?(c.handleRemote(d),!1):c.stopEverything(b)}),a(document).delegate(c.formSubmitSelector,"submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g]))return c.stopEverything(d);if(f)return h?c.fire(e,"ajax:aborted:file",[h]):!a.support.submitBubbles&&a().jquery<"1.7"&&c.callFormSubmitBindings(e,d)===!1?c.stopEverything(d):(c.handleRemote(e),!1);setTimeout(function(){c.disableFormElements(e)},13)}),a(document).delegate(c.formInputClickSelector,"click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)}),a(document).delegate(c.formSubmitSelector,"ajax:beforeSend.rails",function(b){this==b.target&&c.disableFormElements(a(this))}),a(document).delegate(c.formSubmitSelector,"ajax:complete.rails",function(b){this==b.target&&c.enableFormElements(a(this))})}(jQuery),function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;return!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&&d(h))}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.16",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode)return;for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;return b[d]>0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}})}(jQuery),function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&&e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e=this.options[b];c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),d=d||{};if(c.originalEvent)for(var f=a.event.props.length,g;f;)g=a.event.props[--f],c[g]=c.originalEvent[g];return this.element.trigger(c,d),!(a.isFunction(e)&&e.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}}(jQuery),function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f=a.fn.position,g=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return f.apply(this,arguments);b=a.extend({},b);var g=a(b.of),h=g[0],i=(b.collision||"flip").split(" "),j=b.offset?b.offset.split(" "):[0,0],k,l,m;return h.nodeType===9?(k=g.width(),l=g.height(),m={top:0,left:0}):h.setTimeout?(k=g.width(),l=g.height(),m={top:g.scrollTop(),left:g.scrollLeft()}):h.preventDefault?(b.at="left top",k=l=0,m={top:b.of.pageY,left:b.of.pageX}):(k=g.outerWidth(),l=g.outerHeight(),m=g.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&&(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),i.length===1&&(i[1]=i[0]),j[0]=parseInt(j[0],10)||0,j.length===1&&(j[1]=j[0]),j[1]=parseInt(j[1],10)||0,b.at[0]==="right"?m.left+=k:b.at[0]===e&&(m.left+=k/2),b.at[1]==="bottom"?m.top+=l:b.at[1]===e&&(m.top+=l/2),m.left+=j[0],m.top+=j[1],this.each(function(){var c=a(this),d=c.outerWidth(),f=c.outerHeight(),g=parseInt(a.curCSS(this,"marginLeft",!0))||0,h=parseInt(a.curCSS(this,"marginTop",!0))||0,n=d+g+(parseInt(a.curCSS(this,"marginRight",!0))||0),o=f+h+(parseInt(a.curCSS(this,"marginBottom",!0))||0),p=a.extend({},m),q;b.my[0]==="right"?p.left-=d:b.my[0]===e&&(p.left-=d/2),b.my[1]==="bottom"?p.top-=f:b.my[1]===e&&(p.top-=f/2),p.left=Math.round(p.left),p.top=Math.round(p.top),q={left:p.left-g,top:p.top-h},a.each(["left","top"],function(c,e){a.ui.position[i[c]]&&a.ui.position[i[c]][e](p,{targetWidth:k,targetHeight:l,elemWidth:d,elemHeight:f,collisionPosition:q,collisionWidth:n,collisionHeight:o,offset:j,my:b.my,at:b.at})}),a.fn.bgiframe&&c.bgiframe(),c.offset(a.extend(p,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e>0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?this.each(function(){a.offset.setOffset(this,b)}):g.call(this)})}(jQuery),function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._move("previous",c),c.preventDefault();break;case e.DOWN:b._move("next",c),c.preventDefault();break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.response=function(){return b._response.apply(b,arguments)},this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,d,e;a.isArray(this.options.source)?(d=this.options.source,this.source=function(b,c){c(a.ui.autocomplete.filter(d,b.term))}):typeof this.options.source=="string"?(e=this.options.source,this.source=function(d,f){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:e,data:d,dataType:"json",autocompleteRequest:++c,success:function(a,b){this.autocompleteRequest===c&&f(a)},error:function(){this.autocompleteRequest===c&&f([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)===!1)return;return this._search(a)},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this.response)},_response:function(a){!this.options.disabled&&a&&a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close(),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})}(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10}),result.length||(result=this.element.children(".ui-menu-item:first")),this.activate(b,result)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery),function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.16"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$('<span class="'+this._appendClass+'">'+c+"</span>"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('<button type="button"></button>').addClass(this._triggerClass).html(g==""?f:$("<img/>").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;d<a.length;d++)a[d].length>b&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?$.extend({},$.datepicker._defaults):d?b=="all"?$.extend({},d.settings):this._get(d,b):null;var e=b||{};typeof b=="string"&&(e={},e[b]=c);if(d){this._curInst==d&&this._hideDatepicker();var f=this._getDateDatepicker(a,!0),g=this._getMinMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e),g!==null&&e.dateFormat!==undefined&&e.minDate===undefined&&(d.settings.minDate=this._formatDate(d,g)),h!==null&&e.dateFormat!==undefined&&e.maxDate===undefined&&(d.settings.maxDate=this._formatDate(d,h)),this._attachments($(a),d),this._autoSize(d),this._setDate(d,f),this._updateAlternate(d),this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target),c=!0,d=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if($.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._hideDatepicker(),c=!1;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);e[0]&&$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);var f=$.datepicker._get(b,"onSelect");if(f){var g=$.datepicker._formatDate(b);f.apply(b.input?b.input[0]:null,[g,b])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&$.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&$.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else a.keyCode==36&&a.ctrlKey?$.datepicker._showDatepicker
20
- (this):c=!1;c&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d<" "||!c||c.indexOf(d)>-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(a){$.datepicker.log(a)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._datepickerShowing&&$.datepicker._triggerOnClose($.datepicker._curInst),$.datepicker._curInst.dpDiv.stop(!0,!0));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a));var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+$(document).scrollLeft(),i=document.documentElement.clientHeight+$(document).scrollTop();return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");b&&b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b),this._curInst=null};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),$.datepicker._triggerOnClose(b),this._datepickerShowing=!1,this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target);b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1<a.length&&a.charAt(s+1)==b;return c&&s++,c},o=function(a){var c=n(a),d=a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;return r+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase())return f=c[0],r+=d.length,!1});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0;for(var s=0;s<a.length;s++)if(m)a.charAt(s)=="'"&&!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r<b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);i==-1?i=(new Date).getFullYear():i<100&&(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i<=d?0:-100));if(l>-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1<a.length&&a.charAt(m+1)==b;return c&&m++,c},i=function(a,b,c){var d=""+b;if(h(a))while(d.length<c)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m<a.length;m++)if(l)a.charAt(m)=="'"&&!h("'")?l=!1:k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){var b="",c=!1,d=function(b){var c=e+1<a.length&&a.charAt(e+1)==b;return c&&e++,c};for(var e=0;e<a.length;e++)if(c)a.charAt(e)=="'"&&!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()==a.lastVal)return;var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMonth=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN(b)?c:d(b):new Date(b.getTime());return f=f&&f.toString()=="Invalid Date"?c:f,f&&(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0)),this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&p<l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))>p)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', -"+i+", 'M');\""+' title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>":e?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', +"+i+", 'M');\""+' title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":e?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>",x=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?w:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+a.id+"');\""+">"+u+"</button>":"")+(c?"":w)+"</div>":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L<g[0];L++){var M="";this.maxRows=4;for(var N=0;N<g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),P=" ui-corner-all",Q="";if(j){Q+='<div class="ui-datepicker-group';if(g[1]>1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'">'+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var R=z?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="<th"+((S+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+A[T]+'">'+C[T]+"</span></th>"}Q+=R+"</tr></thead><tbody>";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z<X;Z++){Q+="<tr>";var _=z?'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(Y)+"</td>":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Y<l||m&&Y>m;_+='<td class="'+((S+y+6)%7>=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&&n==a.selectedMonth&&a._keyEvent||J.getTime()==Y.getTime()&&J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(bc?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&&!G?"":" "+ba[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&&ba[2]?' title="'+ba[2]+'"':"")+(bc?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+a.id+"',"+Y.getMonth()+","+Y.getFullYear()+', this);return false;"')+">"+(bb&&!G?"&#xa0;":bc?'<span class="ui-state-default">'+Y.getDate()+"</span>":'<a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#">'+Y.getDate()+"</a>")+"</td>",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+"</tr>"}n++,n>11&&(n=0,o++),Q+="</tbody></table>"+(j?"</div>"+(g[0]>0&&N==g[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='<div class="ui-datepicker-title">',m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" "+">";for(var p=0;p<12;p++)(!n||p>=d.getMonth())&&(!o||p<=e.getMonth())&&(m+='<option value="'+p+'"'+(p==b?' selected="selected"':"")+">"+h[p]+"</option>");m+="</select>"}k||(l+=m+(f||!i||!j?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" "+">";for(;t<=u;t++)a.yearshtml+='<option value="'+t+'"'+(t==c?' selected="selected"':"")+">"+t+"</option>";a.yearshtml+="</select>",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?"&#xa0;":"")+m),l+="</div>",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return e=d&&e>d?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.16",window["DP_jQuery_"+dpuuid]=$}(jQuery),jQuery(function(a){a.datepicker.regional.de={closeText:"schließen",prevText:"&#x3c;zurück",nextText:"Vor&#x3e;",currentText:"heute",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"Wo",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}}),function(a){a.extend(a.fn,{swapClass:function(a,b){var c=this.filter("."+a);return this.filter("."+b).removeClass(b).addClass(a),c.removeClass(a).addClass(b),this},replaceClass:function(a,b){return this.filter("."+a).removeClass(a).addClass(b).end()},hoverClass:function(b){return b=b||"hover",this.hover(function(){a(this).addClass(b)},function(){a(this).removeClass(b)})},heightToggle:function(a,b){a?this.animate({height:"toggle"},a,b):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"](),b&&b.apply(this,arguments)})},heightHide:function(a,b){a?this.animate({height:"hide"},a,b):(this.hide(),b&&this.each(b))},prepareBranches:function(a){return a.prerendered||(this.filter(":last-child:not(ul)").addClass(b.last),this.filter((a.collapsed?"":"."+b.closed)+":not(."+b.open+")").find(">ul").hide()),this.filter(":has(>ul)")},applyClasses:function(c,d){this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(b){d.apply(a(this).next())}).add(a("a",this)).hoverClass(),c.prerendered||(this.filter(":has(>ul:hidden)").addClass(b.expandable).replaceClass(b.last,b.lastExpandable),this.not(":has(>ul:hidden)").addClass(b.collapsable).replaceClass(b.last,b.lastCollapsable),this.prepend('<div class="'+b.hitarea+'"/>').find("div."+b.hitarea).each(function(){var b="";a.each(a(this).parent().attr("class").split(" "),function(){b+=this+"-hitarea "}),a(this).addClass(b)})),this.find("div."+b.hitarea).click(d)},treeview:function(c){function e(c,d){function e(d){return function(){return f.apply(a("div."+b.hitarea,c).filter(function(){return d?a(this).parent("."+d).length:!0})),!1}}a("a:eq(0)",d).click(e(b.collapsable)),a("a:eq(1)",d).click(e(b.expandable)),a("a:eq(2)",d).click(e())}function f(){a(this).parent().find(">.hitarea").swapClass(b.collapsableHitarea,b.expandableHitarea).swapClass(b.lastCollapsableHitarea,b.lastExpandableHitarea).end().swapClass(b.collapsable,b.expandable).swapClass(b.lastCollapsable,b.lastExpandable).find(">ul").heightToggle(c.animated,c.toggle),c.unique&&a(this).parent().siblings().find(">.hitarea").replaceClass(b.collapsableHitarea,b.expandableHitarea).replaceClass(b.lastCollapsableHitarea,b.lastExpandableHitarea).end().replaceClass(b.collapsable,b.expandable).replaceClass(b.lastCollapsable,b.lastExpandable).find(">ul").heightHide(c.animated,c.toggle)}function g(){function b(a){return a?1:0}var d=[];i.each(function(b,c){d[b]=a(c).is(":has(>ul:visible)")?1:0}),a.cookie(c.cookieId,d.join(""))}function h(){var b=a.cookie(c.cookieId);if(b){var d=b.split("");i.each(function(b,c){a(c).find(">ul")[parseInt(d[b])?"show":"hide"]()})}}c=a.extend({cookieId:"treeview"},c);if(c.add)return this.trigger("add",[c.add]);if(c.toggle){var d=c.toggle;c.toggle=function(){return d.apply(a(this).parent()[0],arguments)}}this.addClass("treeview");var i=this.find("li").prepareBranches(c);switch(c.persist){case"cookie":var j=c.toggle;c.toggle=function(){g(),j&&j.apply(this,arguments)},h();break;case"location":var k=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase()});k.length&&k.addClass("selected").parents("ul, li").add(k.next()).show()}return i.applyClasses(c,f),c.control&&(e(this,c.control),a(c.control).show()),this.bind("add",function(d,e){a(e).prev().removeClass(b.last).removeClass(b.lastCollapsable).removeClass(b.lastExpandable).find(">.hitarea").removeClass(b.lastCollapsableHitarea).removeClass(b.lastExpandableHitarea),a(e).find("li").andSelf().prepareBranches(c).applyClasses(c,f)})}});var b=a.fn.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"};a.fn.Treeview=a.fn.treeview}(jQuery),function(a){function b(b,c,d,e){function f(b){var c=a("<li/>").attr("id",this.id||"").html('<a href="'+this.url+'" class="'+(this.classes||"")+'">'+this.text+"</a>"+(this.additionalText?this.additionalText:"")).appendTo(b);this.classes&&c.children("span").addClass(this.classes),this.expanded&&c.addClass("open");if(this.hasChildren||this.children&&this.children.length){var d=a("<ul/>").appendTo(c);this.hasChildren&&(c.addClass("hasChildren"),f.call({classes:"placeholder",text:"&nbsp;",children:[]},d)),this.children&&this.children.length&&a.each(this.children,f,[d])}}a.ajax(a.extend(!0,{url:b.url,dataType:"json",data:{root:c},success:function(b){d.empty(),a.each(b,f,[d]),a(e).treeview({add:d})}},b.ajax))}a.fn.treeviewLoad=b;var c=a.fn.treeview;a.fn.treeview=function(d){if(!d.url)return c.apply(this,arguments);var e=this;e.children().size()||b(d,d.root||"source",this,e);var f=d.toggle;return c.call(this,a.extend({},d,{collapsed:!0,toggle:function(){var c=a(this);if(c.hasClass("hasChildren")){var g=c.removeClass("hasChildren").find("ul");b(d,this.id,g,e)}f&&f.apply(this,arguments)}}))}}(jQuery),(typeof window.localStorage=="undefined"||typeof window.sessionStorage=="undefined")&&function(){var a=function(a){function b(a,b,c){var d,e;c?(d=new Date,d.setTime(d.getTime()+c*24*60*60*1e3),e="; expires="+d.toGMTString()):e="",document.cookie=a+"="+b+e+"; path=/"}function c(a){var b=a+"=",c=document.cookie.split(";"),d,e;for(d=0;d<c.length;d++){e=c[d];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(b)==0)return e.substring(b.length,e.length)}return null}function d(c){c=JSON.stringify(c),a=="session"?window.name=c:b("localStorage",c,365)}function e(){a=="session"?window.name="":b("localStorage","",365)}function f(){var b=a=="session"?window.name:c("localStorage");try{return b?JSON.parse(b):{}}catch(d){return{}}}var g=f();return{length:0,clear:function(){g={},this.length=0,e()},getItem:function(a){return g[a]===undefined?null:g[a]},key:function(a){var b=0;for(var c in g){if(b==a)return c;b++}return null},removeItem:function(a){delete g[a],this.length--,d(g)},setItem:function(a,b){g[a]=b+"",this.length++,d(g)}}};typeof window.localStorage=="undefined"&&(window.localStorage=new a("local")),typeof window.sessionStorage=="undefined"&&(window.sessionStorage=new a("session"))}();var IQVOC=function(a){"use strict";var b=function(b){b=b.nodeType?b:a(b)[0];var c=a("a",b),d=c.attr("href");if(d.indexOf("/new.html")!==-1){var e=a("ul",b),f=c.text()+" &#9660;";c.click(function(a){c.html(f),e.removeClass("hidden").slideDown().find("li").load(d+" #new_user_session"),a.preventDefault()})}},c=function(b){var c=a(b||this);c.find("ul").slideUp(function(){c.removeClass("hover")})},d=function(b){b=b.jquery?b:a(b);var d=a("> li",b),e;d.find("ul").hide(),d.live({mouseenter:function(b){clearTimeout(e),d.not(this).filter(".hover").each(function(a,b){c(b)}),a(this).addClass("hover").find("ul").not(".hidden").slideDown()},mouseleave:function(a){clearTimeout(e),e=setTimeout(jQuery.proxy(c,this),600)}})},e=function(b){var c=a(this).closest("fieldset"),d=a("ol li:last-child",c),e=d.find("label:first")[0].getAttribute("for");e=e?e.match(/^concept_note_umt_usage_notes/):!1;if(d.is(":hidden"))return d.show(),!1;var f=d.clone(),g=d.find(e?"select":"textarea")[0].id.match(/_(\d+)_/)[1];g=String(parseInt(g,10)+1);var h="_"+g+"_",i="["+g+"]";f.find("label")[0].setAttribute("for",(d.find("label")[0].getAttribute("for")||"").replace(/_\d+_/,h));var j,k;return e||(j=d.find("textarea")[0],k=f.find("textarea").val("")[0],k.id=j.id.replace(/_\d+_/,h),k.name=j.name.replace(/\[\d+\]/,i)),j=d.find("select")[0],k=f.find("select")[0],k.id=j.id.replace(/_\d+_/,h),k.name=j.name.replace(/\[\d+\]/,i),f.addClass("new"),a("ol",c).append(f),!1},f=localStorage||null;return f===null&&(f={},f.getItem=function(){return null},f.setItem=a.noop),{Storage:f,dynamicAuth:b,enhancedDropdown:d,createNote:e}}(jQuery);jQuery(document).ready(function(a){"use strict";var b=a("head meta[name=i18n-locale]"
21
- ).attr("content");IQVOC.enhancedDropdown(".menu"),IQVOC.dynamicAuth("#auth_controls"),IQVOC.visualization&&IQVOC.visualization.init("infovis",function(a){IQVOC.Storage.getItem("visualization")==="enlarged"&&a.data("widget").toggleSize(!0)});var c=a("ul.lang-widget")[0];a("a",c).each(function(b,c){var d=a(c),e=d.closest("li"),f=a('<input type="radio" name="primary_language">');d.hasClass("current")&&(f[0].checked=!0);var g=a("<label />").append(f).append(d);return e.append(g),g[0]}),a("input:radio",c).live("change",function(b){window.location=a(this).closest("label").find("a").attr("href")});var d=function(c){a(".translation[lang]").each(function(d,e){var f=a(e),g=f.attr("lang");g!==b&&a.inArray(g,c)===-1?f.addClass("hidden"):f.removeClass("hidden")})},e=function(c){a(".inline_note.new select").each(function(d,e){a(e).find("option").each(function(d,e){var f=a(e),g=f.val();g!==b&&a.inArray(g,c)===-1&&f.remove()})})};a(document).bind("lang_selected",function(a,b){d(b.langs),e(b.langs)});var f=new IQVOC.LanguageSelector(c,"lang_selected");a("#concept_new, #concept_edit").length&&a(":checkbox",f.container).prop("disabled",!0),a("input.entity_select").each(function(a,b){IQVOC.EntitySelector(b)}),a("fieldset.note_relation ol li.inline_note.new").hide(),a("fieldset.note_relation input[type=button]").click(function(a){IQVOC.createNote.apply(this,arguments),f.notify()}),a("li.inline_note input:checkbox").change(function(b){var c=this.checked?"addClass":"removeClass";a(this).closest("li")[c]("deleted")}),a.datepicker.setDefaults(a.datepicker.regional[b]),a("input.datepicker").datepicker({dateFormat:"yy-mm-dd"}),a("tr.highlightable").hover(function(b){var c=b.type==="mouseenter"?"addClass":"removeClass";a(this)[c]("hover")}).click(function(b){window.location=a(this).attr("data-url")}),a("button#language_select_all").click(function(){a("input[type=checkbox].lang_check").attr("checked",!0)}),a("button#language_select_none").click(function(){a("input[type=checkbox].lang_check").attr("checked",!1)}),a("select.search_type").change(function(){var b=a("li.result_type_filter");a(this).val().match(/labeling/)?b.show():b.hide()}),a("select.search_type").change(),a("ul.hybrid-treeview").each(function(){var b=a(this).attr("data-url"),c=this;a(this).treeview({collapsed:!0,toggle:function(){var d=a(this);if(d.hasClass("hasChildren")){var e=d.removeClass("hasChildren").find("ul");a.fn.treeviewLoad({url:b},this.id,e,c)}}})})}),IQVOC.LanguageSelector=function(a){"use strict";var b,c,d=function(c,d){this.container=c,this.namespace=d,this.langs=b(d),this.checkboxes=a("input:checkbox",c).live("change",this.onChange),a(c).addClass("widget").data("widget",this),this.init()};return a.extend(d.prototype,{onChange:function(b){var c=a(this),d=c.closest(".widget").data("widget");this.checked?d.add(c.val()):d.remove(c.val())},init:function(){this.langs===null&&(this.langs=a.map(this.checkboxes,function(b,c){return a(b).val()}));var b=this;this.checkboxes.each(function(c,d){d.checked=a.inArray(a(d).val(),b.langs)!==-1}),this.notify()},notify:function(){a(document).trigger(this.namespace,{langs:this.langs})},add:function(b){a.inArray(b,this.langs)===-1&&(this.langs.push(b),c(this.langs,this.namespace,this))},remove:function(b){var d=a.inArray(b,this.langs);d!==-1&&(this.langs.splice(d,1),c(this.langs,this.namespace,this))}}),b=function(a){var b=IQVOC.Storage.getItem(a);return b===null?null:b?b.split(","):[]},c=function(a,b,c){IQVOC.Storage.setItem(b,a.join(",")),c.notify()},d}(jQuery),IQVOC.EntitySelector=function(a){"use strict";var b=function(c){if(!(this instanceof b))return new b(c);this.el=a(c).hide(),this.container=a('<div class="entity_select" />').data("widget",this),this.delimiter=",",this.singular=this.el.data("singular")||!1,this.entities=this.getSelection(),this.uriTemplate=this.el.data("entity-uri");var d=this,e=a.map(this.el.data("entities"),function(a,b){return d.createEntity(a)});e=a('<ul class="entity_list" />').append(e);var f=this.el.data("exclude")||null,g=a('<img src="/assets/spinner.gif" class="hidden" />');this.input=a("<input />").autocomplete({minLength:3,source:function(b,c){var e=d.el.data("query-url");a.getJSON(e,{query:b.term},function(b,e,h){var i=d.getSelection().concat(f?[f]:[]);b=a.map(b,function(b,c){return a.inArray(b.id,i)!==-1?null:{value:b.id,label:b.name}}),d.input.autocomplete("option","autoFocus",b.length===1),c(b),g.addClass("hidden")})},search:function(a,b){g.removeClass("hidden")},focus:function(a,b){return!1},select:this.onSelect}),this.container.append(this.input).append(g).append(e).insertAfter(c).prepend(c),this.singular&&this.entities.length&&this.input.hide()};return a.extend(b.prototype,{onSelect:function(b,c){var d=a(this).val(""),e=d.closest(".entity_select").data("widget");if(e.add(c.item.value)){var f=e.createEntity({id:c.item.value,name:c.item.label});e.container.find("ul").append(f),e.singular&&e.input.hide()}return!1},onDelete:function(b){var c=a(this),d=c.closest("li"),e=c.closest(".entity_select").data("widget");e.remove(d.data("id")),d.remove(),e.singular&&!e.entities.length&&e.input.show(),b.preventDefault()},createEntity:function(b){var c;if(this.uriTemplate){var d=this.uriTemplate.replace("%7Bid%7D",b.id);c=a('<a target="_blank" />').attr("href",d).text(b.name)}else c=a("<span />").text(b.name);var e=a('<a href="javascript:;" class="btn">x</a>').click(this.onDelete);return a("<li />").data("id",b.id).append(c).append(e)[0]},add:function(b){return a.inArray(b,this.entities)===-1?(this.entities.push(b),this.setSelection(),!0):!1},remove:function(b){var c=a.inArray(b,this.entities);c!==-1&&(this.entities.splice(c,1),this.setSelection())},setSelection:function(){this.el.val(this.entities.join(this.delimiter))},getSelection:function(){return a.map(this.el.val().split(this.delimiter),function(b,c){return b?a.trim(b):null})}}),b}(jQuery)
20
+ (this):c=!1;c&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d<" "||!c||c.indexOf(d)>-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(a){$.datepicker.log(a)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._datepickerShowing&&$.datepicker._triggerOnClose($.datepicker._curInst),$.datepicker._curInst.dpDiv.stop(!0,!0));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a));var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+$(document).scrollLeft(),i=document.documentElement.clientHeight+$(document).scrollTop();return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");b&&b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b),this._curInst=null};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),$.datepicker._triggerOnClose(b),this._datepickerShowing=!1,this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target);b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1<a.length&&a.charAt(s+1)==b;return c&&s++,c},o=function(a){var c=n(a),d=a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;return r+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase())return f=c[0],r+=d.length,!1});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0;for(var s=0;s<a.length;s++)if(m)a.charAt(s)=="'"&&!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r<b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);i==-1?i=(new Date).getFullYear():i<100&&(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i<=d?0:-100));if(l>-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1<a.length&&a.charAt(m+1)==b;return c&&m++,c},i=function(a,b,c){var d=""+b;if(h(a))while(d.length<c)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m<a.length;m++)if(l)a.charAt(m)=="'"&&!h("'")?l=!1:k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){var b="",c=!1,d=function(b){var c=e+1<a.length&&a.charAt(e+1)==b;return c&&e++,c};for(var e=0;e<a.length;e++)if(c)a.charAt(e)=="'"&&!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()==a.lastVal)return;var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMonth=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN(b)?c:d(b):new Date(b.getTime());return f=f&&f.toString()=="Invalid Date"?c:f,f&&(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0)),this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&p<l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))>p)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', -"+i+", 'M');\""+' title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>":e?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', +"+i+", 'M');\""+' title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":e?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>",x=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?w:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+a.id+"');\""+">"+u+"</button>":"")+(c?"":w)+"</div>":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L<g[0];L++){var M="";this.maxRows=4;for(var N=0;N<g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),P=" ui-corner-all",Q="";if(j){Q+='<div class="ui-datepicker-group';if(g[1]>1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'">'+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var R=z?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="<th"+((S+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+A[T]+'">'+C[T]+"</span></th>"}Q+=R+"</tr></thead><tbody>";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z<X;Z++){Q+="<tr>";var _=z?'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(Y)+"</td>":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Y<l||m&&Y>m;_+='<td class="'+((S+y+6)%7>=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&&n==a.selectedMonth&&a._keyEvent||J.getTime()==Y.getTime()&&J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(bc?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&&!G?"":" "+ba[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&&ba[2]?' title="'+ba[2]+'"':"")+(bc?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+a.id+"',"+Y.getMonth()+","+Y.getFullYear()+', this);return false;"')+">"+(bb&&!G?"&#xa0;":bc?'<span class="ui-state-default">'+Y.getDate()+"</span>":'<a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#">'+Y.getDate()+"</a>")+"</td>",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+"</tr>"}n++,n>11&&(n=0,o++),Q+="</tbody></table>"+(j?"</div>"+(g[0]>0&&N==g[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='<div class="ui-datepicker-title">',m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" "+">";for(var p=0;p<12;p++)(!n||p>=d.getMonth())&&(!o||p<=e.getMonth())&&(m+='<option value="'+p+'"'+(p==b?' selected="selected"':"")+">"+h[p]+"</option>");m+="</select>"}k||(l+=m+(f||!i||!j?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" "+">";for(;t<=u;t++)a.yearshtml+='<option value="'+t+'"'+(t==c?' selected="selected"':"")+">"+t+"</option>";a.yearshtml+="</select>",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?"&#xa0;":"")+m),l+="</div>",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return e=d&&e>d?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.16",window["DP_jQuery_"+dpuuid]=$}(jQuery),jQuery(function(a){a.datepicker.regional.de={closeText:"schließen",prevText:"&#x3c;zurück",nextText:"Vor&#x3e;",currentText:"heute",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"Wo",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}}),function(a){a.extend(a.fn,{swapClass:function(a,b){var c=this.filter("."+a);return this.filter("."+b).removeClass(b).addClass(a),c.removeClass(a).addClass(b),this},replaceClass:function(a,b){return this.filter("."+a).removeClass(a).addClass(b).end()},hoverClass:function(b){return b=b||"hover",this.hover(function(){a(this).addClass(b)},function(){a(this).removeClass(b)})},heightToggle:function(a,b){a?this.animate({height:"toggle"},a,b):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"](),b&&b.apply(this,arguments)})},heightHide:function(a,b){a?this.animate({height:"hide"},a,b):(this.hide(),b&&this.each(b))},prepareBranches:function(a){return a.prerendered||(this.filter(":last-child:not(ul)").addClass(b.last),this.filter((a.collapsed?"":"."+b.closed)+":not(."+b.open+")").find(">ul").hide()),this.filter(":has(>ul)")},applyClasses:function(c,d){this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(b){d.apply(a(this).next())}).add(a("a",this)).hoverClass(),c.prerendered||(this.filter(":has(>ul:hidden)").addClass(b.expandable).replaceClass(b.last,b.lastExpandable),this.not(":has(>ul:hidden)").addClass(b.collapsable).replaceClass(b.last,b.lastCollapsable),this.prepend('<div class="'+b.hitarea+'"/>').find("div."+b.hitarea).each(function(){var b="";a.each(a(this).parent().attr("class").split(" "),function(){b+=this+"-hitarea "}),a(this).addClass(b)})),this.find("div."+b.hitarea).click(d)},treeview:function(c){function e(c,d){function e(d){return function(){return f.apply(a("div."+b.hitarea,c).filter(function(){return d?a(this).parent("."+d).length:!0})),!1}}a("a:eq(0)",d).click(e(b.collapsable)),a("a:eq(1)",d).click(e(b.expandable)),a("a:eq(2)",d).click(e())}function f(){a(this).parent().find(">.hitarea").swapClass(b.collapsableHitarea,b.expandableHitarea).swapClass(b.lastCollapsableHitarea,b.lastExpandableHitarea).end().swapClass(b.collapsable,b.expandable).swapClass(b.lastCollapsable,b.lastExpandable).find(">ul").heightToggle(c.animated,c.toggle),c.unique&&a(this).parent().siblings().find(">.hitarea").replaceClass(b.collapsableHitarea,b.expandableHitarea).replaceClass(b.lastCollapsableHitarea,b.lastExpandableHitarea).end().replaceClass(b.collapsable,b.expandable).replaceClass(b.lastCollapsable,b.lastExpandable).find(">ul").heightHide(c.animated,c.toggle)}function g(){function b(a){return a?1:0}var d=[];i.each(function(b,c){d[b]=a(c).is(":has(>ul:visible)")?1:0}),a.cookie(c.cookieId,d.join(""))}function h(){var b=a.cookie(c.cookieId);if(b){var d=b.split("");i.each(function(b,c){a(c).find(">ul")[parseInt(d[b])?"show":"hide"]()})}}c=a.extend({cookieId:"treeview"},c);if(c.add)return this.trigger("add",[c.add]);if(c.toggle){var d=c.toggle;c.toggle=function(){return d.apply(a(this).parent()[0],arguments)}}this.addClass("treeview");var i=this.find("li").prepareBranches(c);switch(c.persist){case"cookie":var j=c.toggle;c.toggle=function(){g(),j&&j.apply(this,arguments)},h();break;case"location":var k=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase()});k.length&&k.addClass("selected").parents("ul, li").add(k.next()).show()}return i.applyClasses(c,f),c.control&&(e(this,c.control),a(c.control).show()),this.bind("add",function(d,e){a(e).prev().removeClass(b.last).removeClass(b.lastCollapsable).removeClass(b.lastExpandable).find(">.hitarea").removeClass(b.lastCollapsableHitarea).removeClass(b.lastExpandableHitarea),a(e).find("li").andSelf().prepareBranches(c).applyClasses(c,f)})}});var b=a.fn.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"};a.fn.Treeview=a.fn.treeview}(jQuery),function(a){function b(b,c,d,e){function f(b){var c=a("<li/>").attr("id",this.id||"").html('<a href="'+this.url+'" class="'+(this.classes||"")+'">'+this.text+"</a>"+(this.additionalText?this.additionalText:"")).appendTo(b);this.classes&&c.children("span").addClass(this.classes),this.expanded&&c.addClass("open");if(this.hasChildren||this.children&&this.children.length){var d=a("<ul/>").appendTo(c);this.hasChildren&&(c.addClass("hasChildren"),f.call({classes:"placeholder",text:"&nbsp;",children:[]},d)),this.children&&this.children.length&&a.each(this.children,f,[d])}}a.ajax(a.extend(!0,{url:b.url,dataType:"json",data:{root:c},success:function(b){d.empty(),a.each(b,f,[d]),a(e).treeview({add:d})}},b.ajax))}a.fn.treeviewLoad=b;var c=a.fn.treeview;a.fn.treeview=function(d){if(!d.url)return c.apply(this,arguments);var e=this;e.children().size()||b(d,d.root||"source",this,e);var f=d.toggle;return c.call(this,a.extend({},d,{collapsed:!0,toggle:function(){var c=a(this);if(c.hasClass("hasChildren")){var g=c.removeClass("hasChildren").find("ul");b(d,this.id,g,e)}f&&f.apply(this,arguments)}}))}}(jQuery),(typeof window.localStorage=="undefined"||typeof window.sessionStorage=="undefined")&&function(){var a=function(a){function b(a,b,c){var d,e;c?(d=new Date,d.setTime(d.getTime()+c*24*60*60*1e3),e="; expires="+d.toGMTString()):e="",document.cookie=a+"="+b+e+"; path=/"}function c(a){var b=a+"=",c=document.cookie.split(";"),d,e;for(d=0;d<c.length;d++){e=c[d];while(e.charAt(0)==" ")e=e.substring(1,e.length);if(e.indexOf(b)==0)return e.substring(b.length,e.length)}return null}function d(c){c=JSON.stringify(c),a=="session"?window.name=c:b("localStorage",c,365)}function e(){a=="session"?window.name="":b("localStorage","",365)}function f(){var b=a=="session"?window.name:c("localStorage");try{return b?JSON.parse(b):{}}catch(d){return{}}}var g=f();return{length:0,clear:function(){g={},this.length=0,e()},getItem:function(a){return g[a]===undefined?null:g[a]},key:function(a){var b=0;for(var c in g){if(b==a)return c;b++}return null},removeItem:function(a){delete g[a],this.length--,d(g)},setItem:function(a,b){g[a]=b+"",this.length++,d(g)}}};typeof window.localStorage=="undefined"&&(window.localStorage=new a("local")),typeof window.sessionStorage=="undefined"&&(window.sessionStorage=new a("session"))}();if(typeof JSON=="undefined"){var JSON;JSON||(JSON={}),function(){function f(a){return a<10?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";return e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g,e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)typeof rep[c]=="string"&&(d=rep[c],e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));return e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g,e}}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g
21
+ ,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(!b||typeof b=="function"||typeof b=="object"&&typeof b.length=="number")return str("",{"":a});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()}var IQVOC=function(a){"use strict";var b=function(b){b=b.nodeType?b:a(b)[0];var c=a("a",b),d=c.attr("href");if(d.indexOf("/new.html")!==-1){var e=a("ul",b),f=c.text()+" &#9660;";c.click(function(a){c.html(f),e.removeClass("hidden").slideDown().find("li").load(d+" #new_user_session"),a.preventDefault()})}},c=function(b){var c=a(b||this);c.find("ul").slideUp(function(){c.removeClass("hover")})},d=function(b){b=b.jquery?b:a(b);var d=a("> li",b),e;d.find("ul").hide(),d.live({mouseenter:function(b){clearTimeout(e),d.not(this).filter(".hover").each(function(a,b){c(b)}),a(this).addClass("hover").find("ul").not(".hidden").slideDown()},mouseleave:function(a){clearTimeout(e),e=setTimeout(jQuery.proxy(c,this),600)}})},e=function(b){var c=a(this).closest("fieldset"),d=a("ol li:last-child",c),e=d.find("label:first")[0].getAttribute("for");e=e?e.match(/^concept_note_umt_usage_notes/):!1;if(d.is(":hidden"))return d.show(),!1;var f=d.clone(),g=d.find(e?"select":"textarea")[0].id.match(/_(\d+)_/)[1];g=String(parseInt(g,10)+1);var h="_"+g+"_",i="["+g+"]";f.find("label")[0].setAttribute("for",(d.find("label")[0].getAttribute("for")||"").replace(/_\d+_/,h));var j,k;return e||(j=d.find("textarea")[0],k=f.find("textarea").val("")[0],k.id=j.id.replace(/_\d+_/,h),k.name=j.name.replace(/\[\d+\]/,i)),j=d.find("select")[0],k=f.find("select")[0],k.id=j.id.replace(/_\d+_/,h),k.name=j.name.replace(/\[\d+\]/,i),f.addClass("new"),a("ol",c).append(f),!1},f=localStorage||null;return f===null&&(f={},f.getItem=function(){return null},f.setItem=a.noop),{Storage:f,dynamicAuth:b,enhancedDropdown:d,createNote:e}}(jQuery);jQuery(document).ready(function(a){"use strict";var b=a("head meta[name=i18n-locale]").attr("content");IQVOC.enhancedDropdown(".menu"),IQVOC.dynamicAuth("#auth_controls"),IQVOC.visualization&&IQVOC.visualization.init("infovis",function(a){IQVOC.Storage.getItem("visualization")==="enlarged"&&a.data("widget").toggleSize(!0)});var c=a("ul.lang-widget")[0];a("a",c).each(function(b,c){var d=a(c),e=d.closest("li"),f=a('<input type="radio" name="primary_language">');d.hasClass("current")&&(f[0].checked=!0);var g=a("<label />").append(f).append(d);return e.append(g),g[0]}),a("input:radio",c).live("change",function(b){window.location=a(this).closest("label").find("a").attr("href")});var d=function(c){a(".translation[lang]").each(function(d,e){var f=a(e),g=f.attr("lang");g!==b&&a.inArray(g,c)===-1?f.addClass("hidden"):f.removeClass("hidden")})},e=function(c){a(".inline_note.new select").each(function(d,e){a(e).find("option").each(function(d,e){var f=a(e),g=f.val();g!==b&&a.inArray(g,c)===-1&&f.remove()})})};a(document).bind("lang_selected",function(a,b){d(b.langs),e(b.langs)});var f=new IQVOC.LanguageSelector(c,"lang_selected");a("#concept_new, #concept_edit").length&&a(":checkbox",f.container).prop("disabled",!0),a("input.entity_select").each(function(a,b){IQVOC.EntitySelector(b)}),a("fieldset.note_relation ol li.inline_note.new").hide(),a("fieldset.note_relation input[type=button]").click(function(a){IQVOC.createNote.apply(this,arguments),f.notify()}),a("li.inline_note input:checkbox").change(function(b){var c=this.checked?"addClass":"removeClass";a(this).closest("li")[c]("deleted")}),a.datepicker.setDefaults(a.datepicker.regional[b]),a("input.datepicker").datepicker({dateFormat:"yy-mm-dd"}),a("tr.highlightable").hover(function(b){var c=b.type==="mouseenter"?"addClass":"removeClass";a(this)[c]("hover")}).click(function(b){window.location=a(this).attr("data-url")}),a("button#language_select_all").click(function(){a("input[type=checkbox].lang_check").attr("checked",!0)}),a("button#language_select_none").click(function(){a("input[type=checkbox].lang_check").attr("checked",!1)}),a("select.search_type").change(function(){var b=a("li.result_type_filter");a(this).val().match(/labeling/)?b.show():b.hide()}),a("select.search_type").change(),a("ul.hybrid-treeview").each(function(){var b=a(this).attr("data-url"),c=this;a(this).treeview({collapsed:!0,toggle:function(){var d=a(this);if(d.hasClass("hasChildren")){var e=d.removeClass("hasChildren").find("ul");a.fn.treeviewLoad({url:b},this.id,e,c)}}})})}),IQVOC.LanguageSelector=function(a){"use strict";var b,c,d=function(c,d){this.container=c,this.namespace=d,this.langs=b(d),this.checkboxes=a("input:checkbox",c).live("change",this.onChange),a(c).addClass("widget").data("widget",this),this.init()};return a.extend(d.prototype,{onChange:function(b){var c=a(this),d=c.closest(".widget").data("widget");this.checked?d.add(c.val()):d.remove(c.val())},init:function(){this.langs===null&&(this.langs=a.map(this.checkboxes,function(b,c){return a(b).val()}));var b=this;this.checkboxes.each(function(c,d){d.checked=a.inArray(a(d).val(),b.langs)!==-1}),this.notify()},notify:function(){a(document).trigger(this.namespace,{langs:this.langs})},add:function(b){a.inArray(b,this.langs)===-1&&(this.langs.push(b),c(this.langs,this.namespace,this))},remove:function(b){var d=a.inArray(b,this.langs);d!==-1&&(this.langs.splice(d,1),c(this.langs,this.namespace,this))}}),b=function(a){var b=IQVOC.Storage.getItem(a);return b===null?null:b?b.split(","):[]},c=function(a,b,c){IQVOC.Storage.setItem(b,a.join(",")),c.notify()},d}(jQuery),IQVOC.EntitySelector=function(a){"use strict";var b=function(c){if(!(this instanceof b))return new b(c);this.el=a(c).hide(),this.container=a('<div class="entity_select" />').data("widget",this),this.delimiter=",",this.singular=this.el.data("singular")||!1,this.entities=this.getSelection(),this.uriTemplate=this.el.data("entity-uri");var d=this,e=a.map(this.el.data("entities"),function(a,b){return d.createEntity(a)});e=a('<ul class="entity_list" />').append(e);var f=this.el.data("exclude")||null,g=a('<img src="/assets/spinner.gif" class="hidden" />');this.input=a("<input />").autocomplete({minLength:3,source:function(b,c){var e=d.el.data("query-url");a.getJSON(e,{query:b.term},function(b,e,h){var i=d.getSelection().concat(f?[f]:[]);b=a.map(b,function(b,c){return a.inArray(b.id,i)!==-1?null:{value:b.id,label:b.name}}),d.input.autocomplete("option","autoFocus",b.length===1),c(b),g.addClass("hidden")})},search:function(a,b){g.removeClass("hidden")},focus:function(a,b){return!1},select:this.onSelect}),this.container.append(this.input).append(g).append(e).insertAfter(c).prepend(c),this.singular&&this.entities.length&&this.input.hide()};return a.extend(b.prototype,{onSelect:function(b,c){var d=a(this).val(""),e=d.closest(".entity_select").data("widget");if(e.add(c.item.value)){var f=e.createEntity({id:c.item.value,name:c.item.label});e.container.find("ul").append(f),e.singular&&e.input.hide()}return!1},onDelete:function(b){var c=a(this),d=c.closest("li"),e=c.closest(".entity_select").data("widget");e.remove(d.data("id")),d.remove(),e.singular&&!e.entities.length&&e.input.show(),b.preventDefault()},createEntity:function(b){var c;if(this.uriTemplate){var d=this.uriTemplate.replace("%7Bid%7D",b.id);c=a('<a target="_blank" />').attr("href",d).text(b.name)}else c=a("<span />").text(b.name);var e=a('<a href="javascript:;" class="btn">x</a>').click(this.onDelete);return a("<li />").data("id",b.id).append(c).append(e)[0]},add:function(b){return a.inArray(b,this.entities)===-1?(this.entities.push(b),this.setSelection(),!0):!1},remove:function(b){var c=a.inArray(b,this.entities);c!==-1&&(this.entities.splice(c,1),this.setSelection())},setSelection:function(){this.el.val(this.entities.join(this.delimiter))},getSelection:function(){return a.map(this.el.val().split(this.delimiter),function(b,c){return b?a.trim(b):null})}}),b}(jQuery)
Binary file
@@ -30,9 +30,9 @@ tokenizer_show.png: tokenizer_show-3e3b535ad0047218c41a67bab0bde5a1.png
30
30
  top_01.png: top_01-20317bcf2744bf21f09646edf1db83e3.png
31
31
  trunk.png: trunk-608b3757340ea0e291ef7bae37739530.png
32
32
  unfinished.png: unfinished-7f5796d43fa537f8e16caddaf0ba759b.png
33
- manifest.js: manifest-d65a2a29c82b44dda72b13621ddb47c7.js
33
+ manifest.js: manifest-6f0772f7ec93cc20de428ae859353e92.js
34
34
  iqvoc/ie_fixes.css: iqvoc/ie_fixes-7a001f31445ddfb2e0668c419f81742f.css
35
- manifest.css: manifest-8554416e5abd292b31e978c42f20350f.css
35
+ manifest.css: manifest-d52be2520b68121c73695e4026876a98.css
36
36
  ajax-loader.gif: ajax-loader-0fa916c3be443770cc9e800077e4e9b2.gif
37
37
  file.gif: file-45c18a58eafafdac404d858f4a148cd2.gif
38
38
  folder-closed.gif: folder-closed-c6f37b78cc35d7b09ce4115625d665c2.gif
@@ -64,7 +64,4 @@ treeview-gray-line.gif: treeview-gray-line-139b3c730f3ea071ee459da1c97ceddb.gif
64
64
  treeview-gray.gif: treeview-gray-7725ad8dad103df1dddd282e8b76ad38.gif
65
65
  treeview-red-line.gif: treeview-red-line-1a93b70ab4c8e3cd5982e91e9def3afe.gif
66
66
  treeview-red.gif: treeview-red-abf293cd5d1fe415f8c11bd96936f8e4.gif
67
- json2.js: json2-c87ab6ae12eefd145eaabf20addd7d14.js
68
67
  blueprint/ie.css: blueprint/ie-0761b92d02baf44f0b2011e3009e6aa9.css
69
- blueprint/print.css: blueprint/print-5340d510f8a3aaea2879ccb701f5ce4a.css
70
- blueprint/screen.css: blueprint/screen-b57fcdc7a38d7572b2f442522dbbde0d.css
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,35 @@
1
+ // Copyright 2006 Google Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_||
15
+ b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d<c.length;d++)this.initElement(c[d])},
16
+ initElement:function(b){if(!b.getContext){b.getContext=X;b.innerHTML="";b.attachEvent("onpropertychange",Z);b.attachEvent("onresize",$);var a=b.attributes;if(a.width&&a.width.specified)b.style.width=a.width.nodeValue+"px";else b.width=b.clientWidth;if(a.height&&a.height.specified)b.style.height=a.height.nodeValue+"px";else b.height=b.clientHeight}return b}};function Z(b){var a=b.srcElement;switch(b.propertyName){case "width":a.style.width=a.attributes.width.nodeValue+"px";a.getContext().clearRect();
17
+ break;case "height":a.style.height=a.attributes.height.nodeValue+"px";a.getContext().clearRect();break}}function $(b){var a=b.srcElement;if(a.firstChild){a.firstChild.style.width=a.clientWidth+"px";a.firstChild.style.height=a.clientHeight+"px"}}M.init();var N=[],B=0;for(;B<16;B++){var C=0;for(;C<16;C++)N[B*16+C]=B.toString(16)+C.toString(16)}function I(){return[[1,0,0],[0,1,0],[0,0,1]]}function y(b,a){var c=I(),d=0;for(;d<3;d++){var f=0;for(;f<3;f++){var h=0,g=0;for(;g<3;g++)h+=b[d][g]*a[g][f];c[d][f]=
18
+ h}}return c}function O(b,a){a.fillStyle=b.fillStyle;a.lineCap=b.lineCap;a.lineJoin=b.lineJoin;a.lineWidth=b.lineWidth;a.miterLimit=b.miterLimit;a.shadowBlur=b.shadowBlur;a.shadowColor=b.shadowColor;a.shadowOffsetX=b.shadowOffsetX;a.shadowOffsetY=b.shadowOffsetY;a.strokeStyle=b.strokeStyle;a.globalAlpha=b.globalAlpha;a.arcScaleX_=b.arcScaleX_;a.arcScaleY_=b.arcScaleY_;a.lineScale_=b.lineScale_}function P(b){var a,c=1;b=String(b);if(b.substring(0,3)=="rgb"){var d=b.indexOf("(",3),f=b.indexOf(")",d+
19
+ 1),h=b.substring(d+1,f).split(",");a="#";var g=0;for(;g<3;g++)a+=N[Number(h[g])];if(h.length==4&&b.substr(3,1)=="a")c=h[3]}else a=b;return{color:a,alpha:c}}function aa(b){switch(b){case "butt":return"flat";case "round":return"round";case "square":default:return"square"}}function H(b){this.m_=I();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=k*1;this.globalAlpha=1;this.canvas=b;
20
+ var a=b.ownerDocument.createElement("div");a.style.width=b.clientWidth+"px";a.style.height=b.clientHeight+"px";a.style.overflow="hidden";a.style.position="absolute";b.appendChild(a);this.element_=a;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}var i=H.prototype;i.clearRect=function(){this.element_.innerHTML=""};i.beginPath=function(){this.currentPath_=[]};i.moveTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};
21
+ i.lineTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};i.bezierCurveTo=function(b,a,c,d,f,h){var g=this.getCoords_(f,h),l=this.getCoords_(b,a),e=this.getCoords_(c,d);Q(this,l,e,g)};function Q(b,a,c,d){b.currentPath_.push({type:"bezierCurveTo",cp1x:a.x,cp1y:a.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});b.currentX_=d.x;b.currentY_=d.y}i.quadraticCurveTo=function(b,a,c,d){var f=this.getCoords_(b,a),h=this.getCoords_(c,d),g={x:this.currentX_+
22
+ 0.6666666666666666*(f.x-this.currentX_),y:this.currentY_+0.6666666666666666*(f.y-this.currentY_)};Q(this,g,{x:g.x+(h.x-this.currentX_)/3,y:g.y+(h.y-this.currentY_)/3},h)};i.arc=function(b,a,c,d,f,h){c*=k;var g=h?"at":"wa",l=b+G(d)*c-v,e=a+F(d)*c-v,m=b+G(f)*c-v,r=a+F(f)*c-v;if(l==m&&!h)l+=0.125;var n=this.getCoords_(b,a),o=this.getCoords_(l,e),q=this.getCoords_(m,r);this.currentPath_.push({type:g,x:n.x,y:n.y,radius:c,xStart:o.x,yStart:o.y,xEnd:q.x,yEnd:q.y})};i.rect=function(b,a,c,d){this.moveTo(b,
23
+ a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath()};i.strokeRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.stroke();this.currentPath_=f};i.fillRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.fill();this.currentPath_=f};i.createLinearGradient=function(b,
24
+ a,c,d){var f=new D("gradient");f.x0_=b;f.y0_=a;f.x1_=c;f.y1_=d;return f};i.createRadialGradient=function(b,a,c,d,f,h){var g=new D("gradientradial");g.x0_=b;g.y0_=a;g.r0_=c;g.x1_=d;g.y1_=f;g.r1_=h;return g};i.drawImage=function(b){var a,c,d,f,h,g,l,e,m=b.runtimeStyle.width,r=b.runtimeStyle.height;b.runtimeStyle.width="auto";b.runtimeStyle.height="auto";var n=b.width,o=b.height;b.runtimeStyle.width=m;b.runtimeStyle.height=r;if(arguments.length==3){a=arguments[1];c=arguments[2];h=g=0;l=d=n;e=f=o}else if(arguments.length==
25
+ 5){a=arguments[1];c=arguments[2];d=arguments[3];f=arguments[4];h=g=0;l=n;e=o}else if(arguments.length==9){h=arguments[1];g=arguments[2];l=arguments[3];e=arguments[4];a=arguments[5];c=arguments[6];d=arguments[7];f=arguments[8]}else throw Error("Invalid number of arguments");var q=this.getCoords_(a,c),t=[];t.push(" <g_vml_:group",' coordsize="',k*10,",",k*10,'"',' coordorigin="0,0"',' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var E=[];E.push("M11=",
26
+ this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",j(q.x/k),",","Dy=",j(q.y/k),"");var p=q,z=this.getCoords_(a+d,c),w=this.getCoords_(a,c+f),x=this.getCoords_(a+d,c+f);p.x=s.max(p.x,z.x,w.x,x.x);p.y=s.max(p.y,z.y,w.y,x.y);t.push("padding:0 ",j(p.x/k),"px ",j(p.y/k),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",E.join(""),", sizingmethod='clip');")}else t.push("top:",j(q.y/k),"px;left:",j(q.x/k),"px;");t.push(' ">','<g_vml_:image src="',b.src,
27
+ '"',' style="width:',k*d,"px;"," height:",k*f,'px;"',' cropleft="',h/n,'"',' croptop="',g/o,'"',' cropright="',(n-h-l)/n,'"',' cropbottom="',(o-g-e)/o,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("<g_vml_:shape",' filled="',!!b,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0 0" coordsize="',k*10," ",k*10,'"',' stroked="',
28
+ !b,'"',' path="');var h={x:null,y:null},g={x:null,y:null},l=0;for(;l<this.currentPath_.length;l++){var e=this.currentPath_[l];switch(e.type){case "moveTo":a.push(" m ",j(e.x),",",j(e.y));break;case "lineTo":a.push(" l ",j(e.x),",",j(e.y));break;case "close":a.push(" x ");e=null;break;case "bezierCurveTo":a.push(" c ",j(e.cp1x),",",j(e.cp1y),",",j(e.cp2x),",",j(e.cp2y),",",j(e.x),",",j(e.y));break;case "at":case "wa":a.push(" ",e.type," ",j(e.x-this.arcScaleX_*e.radius),",",j(e.y-this.arcScaleY_*e.radius),
29
+ " ",j(e.x+this.arcScaleX_*e.radius),",",j(e.y+this.arcScaleY_*e.radius)," ",j(e.xStart),",",j(e.yStart)," ",j(e.xEnd),",",j(e.yEnd));break}if(e){if(h.x==null||e.x<h.x)h.x=e.x;if(g.x==null||e.x>g.x)g.x=e.x;if(h.y==null||e.y<h.y)h.y=e.y;if(g.y==null||e.y>g.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_),
30
+ z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l<J;l++){var T=u[l];S.push(T.offset*q+
31
+ o+" "+T.color)}a.push('<g_vml_:fill type="',m.type_,'"',' method="none" focus="100%"',' color="',da,'"',' color2="',ea,'"',' colors="',S.join(","),'"',' opacity="',ga,'"',' g_o_:opacity2="',fa,'"',' angle="',r,'"',' focusposition="',n.x,",",n.y,'" />')}else a.push('<g_vml_:fill color="',d,'" opacity="',f,'" />');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("<g_vml_:stroke",' opacity="',f,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',aa(this.lineCap),
32
+ '"',' weight="',K,'px"',' color="',d,'" />')}a.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(),
33
+ this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a,
34
+ 0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager=
35
+ M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})();
@@ -0,0 +1,153 @@
1
+
2
+ /*
3
+ Copyright (c) 2011 Sencha Inc. - Author: Nicolas Garcia Belmonte (http://philogb.github.com/)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
22
+
23
+ */
24
+
25
+ (function(){window.$jit=function(a){var a=a||window,b;for(b in $jit)$jit[b].$extend&&(a[b]=$jit[b])};$jit.version="2.0.1";var f=function(a){return document.getElementById(a)};f.empty=function(){};f.extend=function(a,b){for(var c in b||{})a[c]=b[c];return a};f.lambda=function(a){return typeof a=="function"?a:function(){return a}};f.time=Date.now||function(){return+new Date};f.splat=function(a){var b=f.type(a);return b?b!="array"?[a]:a:[]};f.type=function(a){var b=f.type.s.call(a).match(/^\[object\s(.*)\]$/)[1].toLowerCase();
26
+ if(b!="object")return b;if(a&&a.$$family)return a.$$family;return a&&a.nodeName&&a.nodeType==1?"element":b};f.type.s=Object.prototype.toString;f.each=function(a,b){if(f.type(a)=="object")for(var c in a)b(a[c],c);else{c=0;for(var d=a.length;c<d;c++)b(a[c],c)}};f.indexOf=function(a,b){if(Array.indexOf)return a.indexOf(b);for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1};f.map=function(a,b){var c=[];f.each(a,function(a,e){c.push(b(a,e))});return c};f.reduce=function(a,b,c){var d=a.length;
27
+ if(d==0)return c;for(var e=arguments.length==3?c:a[--d];d--;)e=b(e,a[d]);return e};f.merge=function(){for(var a={},b=0,c=arguments.length;b<c;b++){var d=arguments[b];if(f.type(d)=="object")for(var e in d){var g=d[e],h=a[e];a[e]=h&&f.type(g)=="object"&&f.type(h)=="object"?f.merge(h,g):f.unlink(g)}}return a};f.unlink=function(a){var b;switch(f.type(a)){case "object":b={};for(var c in a)b[c]=f.unlink(a[c]);break;case "array":b=[];c=0;for(var d=a.length;c<d;c++)b[c]=f.unlink(a[c]);break;default:return a}return b};
28
+ f.zip=function(){if(arguments.length===0)return[];for(var a=0,b=[],c=arguments.length,d=arguments[0].length;a<d;a++){for(var e=0,g=[];e<c;e++)g.push(arguments[e][a]);b.push(g)}return b};f.rgbToHex=function(a,b){if(a.length<3)return null;if(a.length==4&&a[3]==0&&!b)return"transparent";for(var c=[],d=0;d<3;d++){var e=(a[d]-0).toString(16);c.push(e.length==1?"0"+e:e)}return b?c:"#"+c.join("")};f.hexToRgb=function(a){if(a.length!=7){a=a.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);a.shift();if(a.length!=
29
+ 3)return null;for(var b=[],c=0;c<3;c++){var d=a[c];d.length==1&&(d+=d);b.push(parseInt(d,16))}return b}else return a=parseInt(a.slice(1),16),[a>>16,a>>8&255,a&255]};f.destroy=function(a){f.clean(a);a.parentNode&&a.parentNode.removeChild(a);a.clearAttributes&&a.clearAttributes()};f.clean=function(a){for(var a=a.childNodes,b=0,c=a.length;b<c;b++)f.destroy(a[b])};f.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)};f.addEvents=function(a,b){for(var c in b)f.addEvent(a,
30
+ c,b[c])};f.hasClass=function(a,b){return(" "+a.className+" ").indexOf(" "+b+" ")>-1};f.addClass=function(a,b){if(!f.hasClass(a,b))a.className=a.className+" "+b};f.removeClass=function(a,b){a.className=a.className.replace(RegExp("(^|\\s)"+b+"(?:\\s|$)"),"$1")};f.getPos=function(a){var b=function(a){for(var b={x:0,y:0};a&&!/^(?:body|html)$/i.test(a.tagName);)b.x+=a.offsetLeft,b.y+=a.offsetTop,a=a.offsetParent;return b}(a),a=function(a){for(var b={x:0,y:0};a&&!/^(?:body|html)$/i.test(a.tagName);)b.x+=
31
+ a.scrollLeft,b.y+=a.scrollTop,a=a.parentNode;return b}(a);return{x:b.x-a.x,y:b.y-a.y}};f.event={get:function(a,b){return a||(b||window).event},getWheel:function(a){return a.wheelDelta?a.wheelDelta/120:-(a.detail||0)/3},isRightClick:function(a){return a.which==3||a.button==2},getPos:function(a,b){var b=b||window,a=a||b.event,c=b.document,c=c.documentElement||c.body;a.touches&&a.touches.length&&(a=a.touches[0]);return{x:a.pageX||a.clientX+c.scrollLeft,y:a.pageY||a.clientY+c.scrollTop}},stop:function(a){a.stopPropagation&&
32
+ a.stopPropagation();a.cancelBubble=!0;a.preventDefault?a.preventDefault():a.returnValue=!1}};$jit.util=$jit.id=f;var i=function(a){var a=a||{},b=function(){for(var a in this)typeof this[a]!="function"&&(this[a]=f.unlink(this[a]));this.constructor=b;if(i.prototyping)return this;a=this.initialize?this.initialize.apply(this,arguments):this;this.$$family="class";return a},c;for(c in i.Mutators)a[c]&&(a=i.Mutators[c](a,a[c]),delete a[c]);f.extend(b,this);b.constructor=i;b.prototype=a;return b};i.Mutators=
33
+ {Implements:function(a,b){f.each(f.splat(b),function(b){i.prototyping=b;var b=typeof b=="function"?new b:b,d;for(d in b)d in a||(a[d]=b[d]);delete i.prototyping});return a}};f.extend(i,{inherit:function(a,b){for(var c in b){var d=b[c],e=a[c],g=f.type(d);e&&g=="function"?d!=e&&i.override(a,c,d):a[c]=g=="object"?f.merge(e,d):d}return a},override:function(a,b,c){var d=i.prototyping;d&&a[b]!=d[b]&&(d=null);a[b]=function(){var e=this.parent;this.parent=d?d[b]:a[b];var g=c.apply(this,arguments);this.parent=
34
+ e;return g}}});i.prototype.implement=function(){var a=this.prototype;f.each(Array.prototype.slice.call(arguments||[]),function(b){i.inherit(a,b)});return this};$jit.Class=i;$jit.json={prune:function(a,b){this.each(a,function(a,d){if(d==b&&a.children)delete a.children,a.children=[]})},getParent:function(a,b){if(a.id==b)return!1;var c=a.children;if(c&&c.length>0)for(var d=0;d<c.length;d++)if(c[d].id==b)return a;else{var e=this.getParent(c[d],b);if(e)return e}return!1},getSubtree:function(a,b){if(a.id==
35
+ b)return a;for(var c=0,d=a.children;d&&c<d.length;c++){var e=this.getSubtree(d[c],b);if(e!=null)return e}return null},eachLevel:function(a,b,c,d){if(b<=c&&(d(a,b),a.children))for(var e=0,a=a.children;e<a.length;e++)this.eachLevel(a[e],b+1,c,d)},each:function(a,b){this.eachLevel(a,0,Number.MAX_VALUE,b)}};$jit.Trans={$extend:!0,linear:function(a){return a}};var v=$jit.Trans;(function(){var a=function(a,c){c=f.splat(c);return f.extend(a,{easeIn:function(d){return a(d,c)},easeOut:function(d){return 1-
36
+ a(1-d,c)},easeInOut:function(d){return d<=0.5?a(2*d,c)/2:(2-a(2*(1-d),c))/2}})};f.each({Pow:function(a,c){return Math.pow(a,c[0]||6)},Expo:function(a){return Math.pow(2,8*(a-1))},Circ:function(a){return 1-Math.sin(Math.acos(a))},Sine:function(a){return 1-Math.sin((1-a)*Math.PI/2)},Back:function(a,c){c=c[0]||1.618;return Math.pow(a,2)*((c+1)*a-c)},Bounce:function(a){for(var c,d=0,e=1;;d+=e,e/=2)if(a>=(7-4*d)/11){c=e*e-Math.pow((11-6*d-11*a)/4,2);break}return c},Elastic:function(a,c){return Math.pow(2,
37
+ 10*--a)*Math.cos(20*a*Math.PI*(c[0]||1)/3)}},function(b,c){v[c]=a(b)});f.each(["Quad","Cubic","Quart","Quint"],function(b,c){v[b]=a(function(a){return Math.pow(a,[c+2])})})})();var B=new i({initialize:function(a){this.setOptions(a)},setOptions:function(a){this.opt=f.merge({duration:2500,fps:40,transition:v.Quart.easeInOut,compute:f.empty,complete:f.empty,link:"ignore"},a||{});return this},step:function(){var a=f.time(),b=this.opt;a<this.time+b.duration?(a=b.transition((a-this.time)/b.duration),b.compute(a)):
38
+ (this.timer=clearInterval(this.timer),b.compute(1),b.complete())},start:function(){if(!this.check())return this;this.time=0;this.startTimer();return this},startTimer:function(){var a=this,b=this.opt.fps;if(this.timer)return!1;this.time=f.time()-this.time;this.timer=setInterval(function(){a.step()},Math.round(1E3/b));return!0},pause:function(){this.stopTimer();return this},resume:function(){this.startTimer();return this},stopTimer:function(){if(!this.timer)return!1;this.time=f.time()-this.time;this.timer=
39
+ clearInterval(this.timer);return!0},check:function(){if(!this.timer)return!0;if(this.opt.link=="cancel")return this.stopTimer(),!0;return!1}}),o=function(){for(var a=arguments,b=0,c=a.length,d={};b<c;b++){var e=o[a[b]];e.$extend?f.extend(d,e):d[a[b]]=e}return d};o.Canvas={$extend:!0,injectInto:"id",type:"2D",width:!1,height:!1,useCanvas:!1,withLabels:!0,background:!1,Scene:{Lighting:{enable:!1,ambient:[1,1,1],directional:{direction:{x:-100,y:-100,z:-100},color:[0.5,0.3,0.1]}}}};o.Node={$extend:!1,
40
+ overridable:!1,type:"circle",color:"#ccb",alpha:1,dim:3,height:20,width:90,autoHeight:!1,autoWidth:!1,lineWidth:1,transform:!0,align:"center",angularWidth:1,span:1,CanvasStyles:{}};o.Edge={$extend:!1,overridable:!1,type:"line",color:"#ccb",lineWidth:1,dim:15,alpha:1,epsilon:7,CanvasStyles:{}};o.Fx={$extend:!0,fps:40,duration:2500,transition:$jit.Trans.Quart.easeInOut,clearCanvas:!0};o.Label={$extend:!1,overridable:!1,type:"HTML",style:" ",size:10,family:"sans-serif",textAlign:"center",textBaseline:"alphabetic",
41
+ color:"#fff"};o.Tips={$extend:!1,enable:!1,type:"auto",offsetX:20,offsetY:20,force:!1,onShow:f.empty,onHide:f.empty};o.NodeStyles={$extend:!1,enable:!1,type:"auto",stylesHover:!1,stylesClick:!1};o.Events={$extend:!1,enable:!1,enableForEdges:!1,type:"auto",onClick:f.empty,onRightClick:f.empty,onMouseMove:f.empty,onMouseEnter:f.empty,onMouseLeave:f.empty,onDragStart:f.empty,onDragMove:f.empty,onDragCancel:f.empty,onDragEnd:f.empty,onTouchStart:f.empty,onTouchMove:f.empty,onTouchEnd:f.empty,onMouseWheel:f.empty};
42
+ o.Navigation={$extend:!1,enable:!1,type:"auto",panning:!1,zooming:!1};o.Controller={$extend:!0,onBeforeCompute:f.empty,onAfterCompute:f.empty,onCreateLabel:f.empty,onPlaceLabel:f.empty,onComplete:f.empty,onBeforePlotLine:f.empty,onAfterPlotLine:f.empty,onBeforePlotNode:f.empty,onAfterPlotNode:f.empty,request:!1};var r={initialize:function(a,b){this.viz=b;this.canvas=b.canvas;this.config=b.config[a];this.nodeTypes=b.fx.nodeTypes;var c=this.config.type;this.labelContainer=(this.dom=c=="auto"?b.config.Label.type!=
43
+ "Native":c!="Native")&&b.labels.getLabelContainer();this.isEnabled()&&this.initializePost()},initializePost:f.empty,setAsProperty:f.lambda(!1),isEnabled:function(){return this.config.enable},isLabel:function(a,b,c){var a=f.event.get(a,b),b=this.labelContainer,d=a.target||a.srcElement,a=a.relatedTarget;return c?a&&a==this.viz.canvas.getCtx().canvas&&!!d&&this.isDescendantOf(d,b):this.isDescendantOf(d,b)},isDescendantOf:function(a,b){for(;a&&a.parentNode;){if(a.parentNode==b)return a;a=a.parentNode}return!1}},
44
+ y={onMouseUp:f.empty,onMouseDown:f.empty,onMouseMove:f.empty,onMouseOver:f.empty,onMouseOut:f.empty,onMouseWheel:f.empty,onTouchStart:f.empty,onTouchMove:f.empty,onTouchEnd:f.empty,onTouchCancel:f.empty},E=new i({initialize:function(a){this.viz=a;this.canvas=a.canvas;this.edge=this.node=!1;this.registeredObjects=[];this.attachEvents()},attachEvents:function(){var a=this.canvas.getElement(),b=this;a.oncontextmenu=f.lambda(!1);f.addEvents(a,{mouseup:function(a,c){var g=f.event.get(a,c);b.handleEvent("MouseUp",
45
+ a,c,b.makeEventObject(a,c),f.event.isRightClick(g))},mousedown:function(a,c){var g=f.event.get(a,c);b.handleEvent("MouseDown",a,c,b.makeEventObject(a,c),f.event.isRightClick(g))},mousemove:function(a,c){b.handleEvent("MouseMove",a,c,b.makeEventObject(a,c))},mouseover:function(a,c){b.handleEvent("MouseOver",a,c,b.makeEventObject(a,c))},mouseout:function(a,c){b.handleEvent("MouseOut",a,c,b.makeEventObject(a,c))},touchstart:function(a,c){b.handleEvent("TouchStart",a,c,b.makeEventObject(a,c))},touchmove:function(a,
46
+ c){b.handleEvent("TouchMove",a,c,b.makeEventObject(a,c))},touchend:function(a,c){b.handleEvent("TouchEnd",a,c,b.makeEventObject(a,c))}});var c=function(a,c){var g=f.event.get(a,c),g=f.event.getWheel(g);b.handleEvent("MouseWheel",a,c,g)};!document.getBoxObjectFor&&window.mozInnerScreenX==null?f.addEvent(a,"mousewheel",c):a.addEventListener("DOMMouseScroll",c,!1)},register:function(a){this.registeredObjects.push(a)},handleEvent:function(){for(var a=Array.prototype.slice.call(arguments),b=a.shift(),
47
+ c=0,d=this.registeredObjects,e=d.length;c<e;c++)d[c]["on"+b].apply(d[c],a)},makeEventObject:function(a,b){var c=this,d=this.viz.graph,e=this.viz.fx,g=e.nodeTypes,h=e.edgeTypes;return{pos:!1,node:!1,edge:!1,contains:!1,getNodeCalled:!1,getEdgeCalled:!1,getPos:function(){var d=c.viz.canvas,e=d.getSize(),g=d.getPos(),h=d.translateOffsetX,n=d.translateOffsetY,i=d.scaleOffsetX,d=d.scaleOffsetY,u=f.event.getPos(a,b);return this.pos={x:(u.x-g.x-e.width/2-h)*1/i,y:(u.y-g.y-e.height/2-n)*1/d}},getNode:function(){if(this.getNodeCalled)return this.node;
48
+ this.getNodeCalled=!0;for(var a in d.nodes){var b=d.nodes[a],h=b&&g[b.getData("type")];if(h=h&&h.contains&&h.contains.call(e,b,this.getPos()))return this.contains=h,c.node=this.node=b}return c.node=this.node=!1},getEdge:function(){if(this.getEdgeCalled)return this.edge;this.getEdgeCalled=!0;var a={},b;for(b in d.edges){var g=d.edges[b];a[b]=!0;for(var f in g)if(!(f in a)){var n=g[f],i=n&&h[n.getData("type")];if(i=i&&i.contains&&i.contains.call(e,n,this.getPos()))return this.contains=i,c.edge=this.edge=
49
+ n}}return c.edge=this.edge=!1},getContains:function(){if(this.getNodeCalled)return this.contains;this.getNode();return this.contains}}}}),w={initializeExtras:function(){var a=new E(this),b=this;f.each(["NodeStyles","Tips","Navigation","Events"],function(c){var d=new w.Classes[c](c,b);d.isEnabled()&&a.register(d);d.setAsProperty()&&(b[c.toLowerCase()]=d)})},Classes:{}};w.Classes.Events=new i({Implements:[r,y],initializePost:function(){this.fx=this.viz.fx;this.ntypes=this.viz.fx.nodeTypes;this.etypes=
50
+ this.viz.fx.edgeTypes;this.moved=this.touchMoved=this.touched=this.pressed=this.hovered=!1},setAsProperty:f.lambda(!0),onMouseUp:function(a,b,c,d){a=f.event.get(a,b);if(!this.moved)if(d)this.config.onRightClick(this.hovered,c,a);else this.config.onClick(this.pressed,c,a);if(this.pressed){if(this.moved)this.config.onDragEnd(this.pressed,c,a);else this.config.onDragCancel(this.pressed,c,a);this.pressed=this.moved=!1}},onMouseOut:function(a,b,c){var d=f.event.get(a,b),e;if(this.dom&&(e=this.isLabel(a,
51
+ b,!0)))this.config.onMouseLeave(this.viz.graph.getNode(e.id),c,d),this.hovered=!1;else{a=d.relatedTarget;for(b=this.canvas.getElement();a&&a.parentNode;){if(b==a.parentNode)return;a=a.parentNode}if(this.hovered)this.config.onMouseLeave(this.hovered,c,d),this.hovered=!1}},onMouseOver:function(a,b,c){var d=f.event.get(a,b),e;if(this.dom&&(e=this.isLabel(a,b,!0)))this.hovered=this.viz.graph.getNode(e.id),this.config.onMouseEnter(this.hovered,c,d)},onMouseMove:function(a,b,c){a=f.event.get(a,b);if(this.pressed)this.moved=
52
+ !0,this.config.onDragMove(this.pressed,c,a);else if(this.dom)this.config.onMouseMove(this.hovered,c,a);else{if(this.hovered){var b=this.hovered,d=b.nodeFrom?this.etypes[b.getData("type")]:this.ntypes[b.getData("type")];if(d&&d.contains&&d.contains.call(this.fx,b,c.getPos())){this.config.onMouseMove(b,c,a);return}else this.config.onMouseLeave(b,c,a),this.hovered=!1}if(this.hovered=c.getNode()||this.config.enableForEdges&&c.getEdge())this.config.onMouseEnter(this.hovered,c,a);else this.config.onMouseMove(!1,
53
+ c,a)}},onMouseWheel:function(a,b,c){this.config.onMouseWheel(c,f.event.get(a,b))},onMouseDown:function(a,b,c){var d=f.event.get(a,b);if(this.dom){if(a=this.isLabel(a,b))this.pressed=this.viz.graph.getNode(a.id)}else this.pressed=c.getNode()||this.config.enableForEdges&&c.getEdge();this.pressed&&this.config.onDragStart(this.pressed,c,d)},onTouchStart:function(a,b,c){var d=f.event.get(a,b),e;(this.touched=this.dom&&(e=this.isLabel(a,b))?this.viz.graph.getNode(e.id):c.getNode()||this.config.enableForEdges&&
54
+ c.getEdge())&&this.config.onTouchStart(this.touched,c,d)},onTouchMove:function(a,b,c){a=f.event.get(a,b);if(this.touched)this.touchMoved=!0,this.config.onTouchMove(this.touched,c,a)},onTouchEnd:function(a,b,c){a=f.event.get(a,b);if(this.touched){if(this.touchMoved)this.config.onTouchEnd(this.touched,c,a);else this.config.onTouchCancel(this.touched,c,a);this.touched=this.touchMoved=!1}}});w.Classes.Tips=new i({Implements:[r,y],initializePost:function(){if(document.body){var a=f("_tooltip")||document.createElement("div");
55
+ a.id="_tooltip";a.className="tip";f.extend(a.style,{position:"absolute",display:"none",zIndex:13E3});document.body.appendChild(a);this.tip=a;this.node=!1}},setAsProperty:f.lambda(!0),onMouseOut:function(a,b){f.event.get(a,b);if(this.dom&&this.isLabel(a,b,!0))this.hide(!0);else{for(var c=a.relatedTarget,d=this.canvas.getElement();c&&c.parentNode;){if(d==c.parentNode)return;c=c.parentNode}this.hide(!1)}},onMouseOver:function(a,b){var c;if(this.dom&&(c=this.isLabel(a,b,!1)))this.node=this.viz.graph.getNode(c.id),
56
+ this.config.onShow(this.tip,this.node,c)},onMouseMove:function(a,b,c){this.dom&&this.isLabel(a,b)&&this.setTooltipPosition(f.event.getPos(a,b));if(!this.dom){var d=c.getNode();if(d){if(this.config.force||!this.node||this.node.id!=d.id)this.node=d,this.config.onShow(this.tip,d,c.getContains());this.setTooltipPosition(f.event.getPos(a,b))}else this.hide(!0)}},setTooltipPosition:function(a){var b=this.tip,c=b.style,d=this.config;c.display="";var e={height:document.body.clientHeight,width:document.body.clientWidth},
57
+ b={width:b.offsetWidth,height:b.offsetHeight},g=d.offsetX,d=d.offsetY;c.top=(a.y+d+b.height>e.height?a.y-b.height-d:a.y+d)+"px";c.left=(a.x+b.width+g>e.width?a.x-b.width-g:a.x+g)+"px"},hide:function(a){this.tip.style.display="none";a&&this.config.onHide()}});w.Classes.NodeStyles=new i({Implements:[r,y],initializePost:function(){this.fx=this.viz.fx;this.types=this.viz.fx.nodeTypes;this.nStyles=this.config;this.nodeStylesOnHover=this.nStyles.stylesHover;this.nodeStylesOnClick=this.nStyles.stylesClick;
58
+ this.hoveredNode=!1;this.fx.nodeFxAnimation=new B;this.move=this.down=!1},onMouseOut:function(a,b){this.down=this.move=!1;if(this.hoveredNode){this.dom&&this.isLabel(a,b,!0)&&this.toggleStylesOnHover(this.hoveredNode,!1);for(var c=a.relatedTarget,d=this.canvas.getElement();c&&c.parentNode;){if(d==c.parentNode)return;c=c.parentNode}this.toggleStylesOnHover(this.hoveredNode,!1);this.hoveredNode=!1}},onMouseOver:function(a,b){var c;if(this.dom&&(c=this.isLabel(a,b,!0)))if(c=this.viz.graph.getNode(c.id),
59
+ !c.selected)this.hoveredNode=c,this.toggleStylesOnHover(this.hoveredNode,!0)},onMouseDown:function(a,b,c,d){if(!d){var e;if(this.dom&&(e=this.isLabel(a,b)))this.down=this.viz.graph.getNode(e.id);else if(!this.dom)this.down=c.getNode();this.move=!1}},onMouseUp:function(a,b,c,d){if(!d){if(!this.move)this.onClick(c.getNode());this.down=this.move=!1}},getRestoredStyles:function(a,b){var c={},d=this["nodeStylesOn"+b],e;for(e in d)c[e]=a.styles["$"+e];return c},toggleStylesOnHover:function(a,b){this.nodeStylesOnHover&&
60
+ this.toggleStylesOn("Hover",a,b)},toggleStylesOnClick:function(a,b){this.nodeStylesOnClick&&this.toggleStylesOn("Click",a,b)},toggleStylesOn:function(a,b,c){var d=this.viz;if(c){if(!b.styles)b.styles=f.merge(b.data,{});for(var e in this["nodeStylesOn"+a])c="$"+e,c in b.styles||(b.styles[c]=b.getData(e));d.fx.nodeFx(f.extend({elements:{id:b.id,properties:this["nodeStylesOn"+a]},transition:v.Quart.easeOut,duration:300,fps:40},this.config))}else a=this.getRestoredStyles(b,a),d.fx.nodeFx(f.extend({elements:{id:b.id,
61
+ properties:a},transition:v.Quart.easeOut,duration:300,fps:40},this.config))},onClick:function(a){if(a){var b=this.nodeStylesOnClick;if(b)a.selected?(this.toggleStylesOnClick(a,!1),delete a.selected):(this.viz.graph.eachNode(function(a){if(a.selected){for(var d in b)a.setData(d,a.styles["$"+d],"end");delete a.selected}}),this.toggleStylesOnClick(a,!0),a.selected=!0,delete a.hovered,this.hoveredNode=!1)}},onMouseMove:function(a,b,c){if(this.down)this.move=!0;if(!this.dom||!this.isLabel(a,b)){var d=
62
+ this.nodeStylesOnHover;if(d&&!this.dom){if(this.hoveredNode&&(a=this.types[this.hoveredNode.getData("type")])&&a.contains&&a.contains.call(this.fx,this.hoveredNode,c.getPos()))return;c=c.getNode();if((this.hoveredNode||c)&&!c.hovered)if(c&&!c.selected)this.fx.nodeFxAnimation.stopTimer(),this.viz.graph.eachNode(function(a){if(a.hovered&&!a.selected){for(var b in d)a.setData(b,a.styles["$"+b],"end");delete a.hovered}}),c.hovered=!0,this.hoveredNode=c,this.toggleStylesOnHover(c,!0);else if(this.hoveredNode&&
63
+ !this.hoveredNode.selected)this.fx.nodeFxAnimation.stopTimer(),this.toggleStylesOnHover(this.hoveredNode,!1),delete this.hoveredNode.hovered,this.hoveredNode=!1}}}});w.Classes.Navigation=new i({Implements:[r,y],initializePost:function(){this.pressed=this.pos=!1},onMouseWheel:function(a,b,c){this.config.zooming&&(f.event.stop(f.event.get(a,b)),a=1+c*(this.config.zooming/1E3),this.canvas.scale(a,a))},onMouseDown:function(a,b,c){if(this.config.panning&&!(this.config.panning=="avoid nodes"&&(this.dom?
64
+ this.isLabel(a,b):c.getNode()))){this.pressed=!0;this.pos=c.getPos();var a=this.canvas,b=a.translateOffsetX,c=a.translateOffsetY,d=a.scaleOffsetY;this.pos.x*=a.scaleOffsetX;this.pos.x+=b;this.pos.y*=d;this.pos.y+=c}},onMouseMove:function(a,b,c){if(this.config.panning&&this.pressed&&!(this.config.panning=="avoid nodes"&&(this.dom?this.isLabel(a,b):c.getNode()))){var a=this.pos,c=c.getPos(),d=this.canvas,e=d.translateOffsetX,g=d.translateOffsetY,b=d.scaleOffsetX,d=d.scaleOffsetY;c.x*=b;c.y*=d;c.x+=
65
+ e;c.y+=g;e=c.x-a.x;a=c.y-a.y;this.pos=c;this.canvas.translate(e*1/b,a*1/d)}},onMouseUp:function(){if(this.config.panning)this.pressed=!1}});var s;(function(){function a(a,b){var g=document.createElement(a),h;for(h in b)typeof b[h]=="object"?f.extend(g[h],b[h]):g[h]=b[h];a=="canvas"&&!c&&G_vmlCanvasManager&&(g=G_vmlCanvasManager.initElement(document.body.appendChild(g)));return g}var b=typeof HTMLCanvasElement,c=b=="object"||b=="function";$jit.Canvas=s=new i({canvases:[],pos:!1,element:!1,labelContainer:!1,
66
+ translateOffsetX:0,translateOffsetY:0,scaleOffsetX:1,scaleOffsetY:1,initialize:function(b,c){this.viz=b;this.opt=this.config=c;var g=f.type(c.injectInto)=="string"?c.injectInto:c.injectInto.id,h=c.type,l=g+"-label",j=f(g),t=c.width||j.offsetWidth,C=c.height||j.offsetHeight;this.id=g;var n={injectInto:g,width:t,height:C};this.element=a("div",{id:g+"-canvaswidget",style:{position:"relative",width:t+"px",height:C+"px"}});this.labelContainer=this.createLabelContainer(c.Label.type,l,n);this.canvases.push(new s.Base[h]({config:f.extend({idSuffix:"-canvas"},
67
+ n),plot:function(){b.fx.plot()},resize:function(){b.refresh()}}));if(g=c.background)n=new s.Background[g.type](b,f.extend(g,n)),this.canvases.push(new s.Base[h](n));for(h=this.canvases.length;h--;)this.element.appendChild(this.canvases[h].canvas),h>0&&this.canvases[h].plot();this.element.appendChild(this.labelContainer);j.appendChild(this.element);var i=null,u=this;f.addEvent(window,"scroll",function(){clearTimeout(i);i=setTimeout(function(){u.getPos(!0)},500)})},getCtx:function(a){return this.canvases[a||
68
+ 0].getCtx()},getConfig:function(){return this.opt},getElement:function(){return this.element},getSize:function(a){return this.canvases[a||0].getSize()},resize:function(a,b){this.getPos(!0);this.translateOffsetX=this.translateOffsetY=0;this.scaleOffsetX=this.scaleOffsetY=1;for(var c=0,h=this.canvases.length;c<h;c++)this.canvases[c].resize(a,b);c=this.element.style;c.width=a+"px";c.height=b+"px";if(this.labelContainer)this.labelContainer.style.width=a+"px"},translate:function(a,b,c){this.translateOffsetX+=
69
+ a*this.scaleOffsetX;this.translateOffsetY+=b*this.scaleOffsetY;for(var h=0,f=this.canvases.length;h<f;h++)this.canvases[h].translate(a,b,c)},scale:function(a,b){var c=this.scaleOffsetX*a,h=this.scaleOffsetY*b,f=this.translateOffsetX*(a-1)/c,j=this.translateOffsetY*(b-1)/h;this.scaleOffsetX=c;this.scaleOffsetY=h;c=0;for(h=this.canvases.length;c<h;c++)this.canvases[c].scale(a,b,!0);this.translate(f,j,!1)},getPos:function(a){if(a||!this.pos)return this.pos=f.getPos(this.getElement());return this.pos},
70
+ clear:function(a){this.canvases[a||0].clear()},path:function(a,b){var c=this.canvases[0].getCtx();c.beginPath();b(c);c[a]();c.closePath()},createLabelContainer:function(b,c,g){if(b=="HTML"||b=="Native")return a("div",{id:c,style:{overflow:"visible",position:"absolute",top:0,left:0,width:g.width+"px",height:0}});else if(b=="SVG"){b=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");b.setAttribute("width",g.width);b.setAttribute("height",g.height);var h=b.style;h.position="absolute";h.left=
71
+ h.top="0px";h=document.createElementNS("http://www.w3.org/2000/svg","svg:g");h.setAttribute("width",g.width);h.setAttribute("height",g.height);h.setAttribute("x",0);h.setAttribute("y",0);h.setAttribute("id",c);b.appendChild(h);return b}}});s.Base={};s.Base["2D"]=new i({translateOffsetX:0,translateOffsetY:0,scaleOffsetX:1,scaleOffsetY:1,initialize:function(a){this.viz=a;this.opt=a.config;this.size=!1;this.createCanvas();this.translateToCenter()},createCanvas:function(){var b=this.opt,c=b.width,g=b.height;
72
+ this.canvas=a("canvas",{id:b.injectInto+b.idSuffix,width:c,height:g,style:{position:"absolute",top:0,left:0,width:c+"px",height:g+"px"}})},getCtx:function(){if(!this.ctx)return this.ctx=this.canvas.getContext("2d");return this.ctx},getSize:function(){if(this.size)return this.size;var a=this.canvas;return this.size={width:a.width,height:a.height}},translateToCenter:function(a){var b=this.getSize(),c=a?b.width-a.width-this.translateOffsetX*2:b.width;height=a?b.height-a.height-this.translateOffsetY*
73
+ 2:b.height;b=this.getCtx();a&&b.scale(1/this.scaleOffsetX,1/this.scaleOffsetY);b.translate(c/2,height/2)},resize:function(a,b){var g=this.getSize(),h=this.canvas,f=h.style;this.size=!1;h.width=a;h.height=b;f.width=a+"px";f.height=b+"px";c?this.translateToCenter():this.translateToCenter(g);this.translateOffsetX=this.translateOffsetY=0;this.scaleOffsetX=this.scaleOffsetY=1;this.clear();this.viz.resize(a,b,this)},translate:function(a,b,c){var h=this.scaleOffsetY;this.translateOffsetX+=a*this.scaleOffsetX;
74
+ this.translateOffsetY+=b*h;this.getCtx().translate(a,b);!c&&this.plot()},scale:function(a,b,c){this.scaleOffsetX*=a;this.scaleOffsetY*=b;this.getCtx().scale(a,b);!c&&this.plot()},clear:function(){var a=this.getSize(),b=this.translateOffsetX,c=this.translateOffsetY,h=this.scaleOffsetX,f=this.scaleOffsetY;this.getCtx().clearRect((-a.width/2-b)*1/h,(-a.height/2-c)*1/f,a.width*1/h,a.height*1/f)},plot:function(){this.clear();this.viz.plot(this)}});s.Background={};s.Background.Circles=new i({initialize:function(a,
75
+ b){this.viz=a;this.config=f.merge({idSuffix:"-bkcanvas",levelDistance:100,numberOfCircles:6,CanvasStyles:{},offset:0},b)},resize:function(a,b,c){this.plot(c)},plot:function(a){var a=a.getCtx(),b=this.config,c=b.CanvasStyles,h;for(h in c)a[h]=c[h];h=b.numberOfCircles;b=b.levelDistance;for(c=1;c<=h;c++)a.beginPath(),a.arc(0,0,b*c,0,2*Math.PI,!1),a.stroke(),a.closePath()}})})();var q=function(a,b){this.theta=a||0;this.rho=b||0};$jit.Polar=q;q.prototype={getc:function(a){return this.toComplex(a)},getp:function(){return this},
76
+ set:function(a){a=a.getp();this.theta=a.theta;this.rho=a.rho},setc:function(a,b){this.rho=Math.sqrt(a*a+b*b);this.theta=Math.atan2(b,a);this.theta<0&&(this.theta+=Math.PI*2)},setp:function(a,b){this.theta=a;this.rho=b},clone:function(){return new q(this.theta,this.rho)},toComplex:function(a){var b=Math.cos(this.theta)*this.rho,c=Math.sin(this.theta)*this.rho;if(a)return{x:b,y:c};return new m(b,c)},add:function(a){return new q(this.theta+a.theta,this.rho+a.rho)},scale:function(a){return new q(this.theta,
77
+ this.rho*a)},equals:function(a){return this.theta==a.theta&&this.rho==a.rho},$add:function(a){this.theta+=a.theta;this.rho+=a.rho;return this},$madd:function(a){this.theta=(this.theta+a.theta)%(Math.PI*2);this.rho+=a.rho;return this},$scale:function(a){this.rho*=a;return this},isZero:function(){var a=Math.abs;return a(this.theta)<1.0E-4&&a(this.rho)<1.0E-4},interpolate:function(a,b){var c=Math.PI,d=c*2,e=function(a){return a<0?a%d+d:a%d},g=this.theta,h=a.theta,f=Math.abs(g-h);return{theta:f==c?g>
78
+ h?e(h+(g-d-h)*b):e(h-d+(g-h)*b):f>=c?g>h?e(h+(g-d-h)*b):e(h-d+(g-(h-d))*b):e(h+(g-h)*b),rho:(this.rho-a.rho)*b+a.rho}}};q.KER=new q(0,0);var m=function(a,b){this.x=a||0;this.y=b||0};$jit.Complex=m;m.prototype={getc:function(){return this},getp:function(a){return this.toPolar(a)},set:function(a){a=a.getc(!0);this.x=a.x;this.y=a.y},setc:function(a,b){this.x=a;this.y=b},setp:function(a,b){this.x=Math.cos(a)*b;this.y=Math.sin(a)*b},clone:function(){return new m(this.x,this.y)},toPolar:function(a){var b=
79
+ this.norm(),c=Math.atan2(this.y,this.x);c<0&&(c+=Math.PI*2);if(a)return{theta:c,rho:b};return new q(c,b)},norm:function(){return Math.sqrt(this.squaredNorm())},squaredNorm:function(){return this.x*this.x+this.y*this.y},add:function(a){return new m(this.x+a.x,this.y+a.y)},prod:function(a){return new m(this.x*a.x-this.y*a.y,this.y*a.x+this.x*a.y)},conjugate:function(){return new m(this.x,-this.y)},scale:function(a){return new m(this.x*a,this.y*a)},equals:function(a){return this.x==a.x&&this.y==a.y},
80
+ $add:function(a){this.x+=a.x;this.y+=a.y;return this},$prod:function(a){var b=this.x,c=this.y;this.x=b*a.x-c*a.y;this.y=c*a.x+b*a.y;return this},$conjugate:function(){this.y=-this.y;return this},$scale:function(a){this.x*=a;this.y*=a;return this},$div:function(a){var b=this.x,c=this.y,d=a.squaredNorm();this.x=b*a.x+c*a.y;this.y=c*a.x-b*a.y;return this.$scale(1/d)},isZero:function(){var a=Math.abs;return a(this.x)<1.0E-4&&a(this.y)<1.0E-4}};m.KER=new m(0,0);$jit.Graph=new i({initialize:function(a,
81
+ b,c,d){var e={klass:m,Node:{}};this.Node=b;this.Edge=c;this.Label=d;this.opt=f.merge(e,a||{});this.nodes={};this.edges={};var g=this;this.nodeList={};for(var h in z)g.nodeList[h]=function(a){return function(){var b=Array.prototype.slice.call(arguments);g.eachNode(function(c){c[a].apply(c,b)})}}(h)},getNode:function(a){if(this.hasNode(a))return this.nodes[a];return!1},get:function(a){return this.getNode(a)},getByName:function(a){for(var b in this.nodes){var c=this.nodes[b];if(c.name==a)return c}return!1},
82
+ getAdjacence:function(a,b){if(a in this.edges)return this.edges[a][b];return!1},addNode:function(a){if(!this.nodes[a.id]){var b=this.edges[a.id]={};this.nodes[a.id]=new k.Node(f.extend({id:a.id,name:a.name,data:f.merge(a.data||{},{}),adjacencies:b},this.opt.Node),this.opt.klass,this.Node,this.Edge,this.Label)}return this.nodes[a.id]},addAdjacence:function(a,b,c){this.hasNode(a.id)||this.addNode(a);this.hasNode(b.id)||this.addNode(b);a=this.nodes[a.id];b=this.nodes[b.id];if(!a.adjacentTo(b)){var d=
83
+ this.edges[a.id]=this.edges[a.id]||{},e=this.edges[b.id]=this.edges[b.id]||{};d[b.id]=e[a.id]=new k.Adjacence(a,b,c,this.Edge,this.Label);return d[b.id]}return this.edges[a.id][b.id]},removeNode:function(a){if(this.hasNode(a)){delete this.nodes[a];var b=this.edges[a],c;for(c in b)delete this.edges[c][a];delete this.edges[a]}},removeAdjacence:function(a,b){delete this.edges[a][b];delete this.edges[b][a]},hasNode:function(a){return a in this.nodes},empty:function(){this.nodes={};this.edges={}}});var k=
84
+ $jit.Graph,z;(function(){var a=function(a,b,c,h,f){var j,c=c||"current";if(c=="current")j=this.data;else if(c=="start")j=this.startData;else if(c=="end")j=this.endData;a="$"+(a?a+"-":"")+b;if(h)return j[a];if(!this.Config.overridable)return f[b]||0;return a in j?j[a]:a in this.data?this.data[a]:f[b]||0},b=function(a,b,c,h){var h=h||"current",f;if(h=="current")f=this.data;else if(h=="start")f=this.startData;else if(h=="end")f=this.endData;f["$"+(a?a+"-":"")+b]=c},c=function(a,b){var a="$"+(a?a+"-":
85
+ ""),c=this;f.each(b,function(b){b=a+b;delete c.data[b];delete c.endData[b];delete c.startData[b]})};z={getData:function(b,c,g){return a.call(this,"",b,c,g,this.Config)},setData:function(a,c,g){b.call(this,"",a,c,g)},setDataset:function(a,b){var a=f.splat(a),c;for(c in b)for(var h=0,l=f.splat(b[c]),j=a.length;h<j;h++)this.setData(c,l[h],a[h])},removeData:function(){c.call(this,"",Array.prototype.slice.call(arguments))},getCanvasStyle:function(b,c,g){return a.call(this,"canvas",b,c,g,this.Config.CanvasStyles)},
86
+ setCanvasStyle:function(a,c,g){b.call(this,"canvas",a,c,g)},setCanvasStyles:function(a,b){var a=f.splat(a),c;for(c in b)for(var h=0,l=f.splat(b[c]),j=a.length;h<j;h++)this.setCanvasStyle(c,l[h],a[h])},removeCanvasStyle:function(){c.call(this,"canvas",Array.prototype.slice.call(arguments))},getLabelData:function(b,c,g){return a.call(this,"label",b,c,g,this.Label)},setLabelData:function(a,c,g){b.call(this,"label",a,c,g)},setLabelDataset:function(a,b){var a=f.splat(a),c;for(c in b)for(var h=0,l=f.splat(b[c]),
87
+ j=a.length;h<j;h++)this.setLabelData(c,l[h],a[h])},removeLabelData:function(){c.call(this,"label",Array.prototype.slice.call(arguments))}}})();k.Node=new i({initialize:function(a,b,c,d,e){b={id:"",name:"",data:{},startData:{},endData:{},adjacencies:{},selected:!1,drawn:!1,exist:!1,angleSpan:{begin:0,end:0},pos:new b,startPos:new b,endPos:new b};f.extend(this,f.extend(b,a));this.Config=this.Node=c;this.Edge=d;this.Label=e},adjacentTo:function(a){return a.id in this.adjacencies},getAdjacency:function(a){return this.adjacencies[a]},
88
+ getPos:function(a){a=a||"current";if(a=="current")return this.pos;else if(a=="end")return this.endPos;else if(a=="start")return this.startPos},setPos:function(a,b){var b=b||"current",c;if(b=="current")c=this.pos;else if(b=="end")c=this.endPos;else if(b=="start")c=this.startPos;c.set(a)}});k.Node.implement(z);k.Adjacence=new i({initialize:function(a,b,c,d,e){this.nodeFrom=a;this.nodeTo=b;this.data=c||{};this.startData={};this.endData={};this.Config=this.Edge=d;this.Label=e}});k.Adjacence.implement(z);
89
+ k.Util={filter:function(a){if(!a||f.type(a)!="string")return function(){return!0};var b=a.split(" ");return function(a){for(var d=0;d<b.length;d++)if(a[b[d]])return!1;return!0}},getNode:function(a,b){return a.nodes[b]},eachNode:function(a,b,c){var c=this.filter(c),d;for(d in a.nodes)c(a.nodes[d])&&b(a.nodes[d])},each:function(a,b,c){this.eachNode(a,b,c)},eachAdjacency:function(a,b,c){var d=a.adjacencies,c=this.filter(c),e;for(e in d){var g=d[e];if(c(g)){if(g.nodeFrom!=a){var h=g.nodeFrom;g.nodeFrom=
90
+ g.nodeTo;g.nodeTo=h}b(g,e)}}},computeLevels:function(a,b,c,d){var c=c||0,e=this.filter(d);this.eachNode(a,function(a){a._flag=!1;a._depth=-1},d);a=a.getNode(b);a._depth=c;for(var g=[a];g.length!=0;){var h=g.pop();h._flag=!0;this.eachAdjacency(h,function(a){a=a.nodeTo;if(a._flag==!1&&e(a)){if(a._depth<0)a._depth=h._depth+1+c;g.unshift(a)}},d)}},eachBFS:function(a,b,c,d){var e=this.filter(d);this.clean(a);for(var g=[a.getNode(b)];g.length!=0;)a=g.pop(),a._flag=!0,c(a,a._depth),this.eachAdjacency(a,
91
+ function(a){a=a.nodeTo;if(a._flag==!1&&e(a))a._flag=!0,g.unshift(a)},d)},eachLevel:function(a,b,c,d,e){var g=a._depth,h=this.filter(e),f=this,c=c===!1?Number.MAX_VALUE-g:c;(function t(a,b,c){var e=a._depth;e>=b&&e<=c&&h(a)&&d(a,e);e<c&&f.eachAdjacency(a,function(a){a=a.nodeTo;a._depth>e&&t(a,b,c)})})(a,b+g,c+g)},eachSubgraph:function(a,b,c){this.eachLevel(a,0,!1,b,c)},eachSubnode:function(a,b,c){this.eachLevel(a,1,1,b,c)},anySubnode:function(a,b,c){var d=!1,b=b||f.lambda(!0),e=f.type(b)=="string"?
92
+ function(a){return a[b]}:b;this.eachSubnode(a,function(a){e(a)&&(d=!0)},c);return d},getSubnodes:function(a,b,c){var d=[],b=b||0,e;f.type(b)=="array"?(e=b[0],b=b[1]):(e=b,b=Number.MAX_VALUE-a._depth);this.eachLevel(a,e,b,function(a){d.push(a)},c);return d},getParents:function(a){var b=[];this.eachAdjacency(a,function(c){c=c.nodeTo;c._depth<a._depth&&b.push(c)});return b},isDescendantOf:function(a,b){if(a.id==b)return!0;for(var c=this.getParents(a),d=!1,e=0;!d&&e<c.length;e++)d=d||this.isDescendantOf(c[e],
93
+ b);return d},clean:function(a){this.eachNode(a,function(a){a._flag=!1})},getClosestNodeToOrigin:function(a,b,c){return this.getClosestNodeToPos(a,q.KER,b,c)},getClosestNodeToPos:function(a,b,c,d){var e=null,c=c||"current",b=b&&b.getc(!0)||m.KER,g=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d};this.eachNode(a,function(a){e=e==null||g(a.getPos(c).getc(!0),b)<g(e.getPos(c).getc(!0),b)?a:e},d);return e}};f.each(["get","getNode","each","eachNode","computeLevels","eachBFS","clean","getClosestNodeToPos",
94
+ "getClosestNodeToOrigin"],function(a){k.prototype[a]=function(){return k.Util[a].apply(k.Util,[this].concat(Array.prototype.slice.call(arguments)))}});f.each(["eachAdjacency","eachLevel","eachSubgraph","eachSubnode","anySubnode","getSubnodes","getParents","isDescendantOf"],function(a){k.Node.prototype[a]=function(){return k.Util[a].apply(k.Util,[this].concat(Array.prototype.slice.call(arguments)))}});k.Op={options:{type:"nothing",duration:2E3,hideLabels:!0,fps:30},initialize:function(a){this.viz=
95
+ a},removeNode:function(a,b){var c=this.viz,d=f.merge(this.options,c.controller,b),e=f.splat(a),g,h,l;switch(d.type){case "nothing":for(g=0;g<e.length;g++)c.graph.removeNode(e[g]);break;case "replot":this.removeNode(e,{type:"nothing"});c.labels.clearLabels();c.refresh(!0);break;case "fade:seq":case "fade":h=this;for(g=0;g<e.length;g++)l=c.graph.getNode(e[g]),l.setData("alpha",0,"end");c.fx.animate(f.merge(d,{modes:["node-property:alpha"],onComplete:function(){h.removeNode(e,{type:"nothing"});c.labels.clearLabels();
96
+ c.reposition();c.fx.animate(f.merge(d,{modes:["linear"]}))}}));break;case "fade:con":h=this;for(g=0;g<e.length;g++)l=c.graph.getNode(e[g]),l.setData("alpha",0,"end"),l.ignore=!0;c.reposition();c.fx.animate(f.merge(d,{modes:["node-property:alpha","linear"],onComplete:function(){h.removeNode(e,{type:"nothing"});d.onComplete&&d.onComplete()}}));break;case "iter":h=this;c.fx.sequence({condition:function(){return e.length!=0},step:function(){h.removeNode(e.shift(),{type:"nothing"});c.labels.clearLabels()},
97
+ onComplete:function(){d.onComplete&&d.onComplete()},duration:Math.ceil(d.duration/e.length)});break;default:this.doError()}},removeEdge:function(a,b){var c=this.viz,d=f.merge(this.options,c.controller,b),e=f.type(a[0])=="string"?[a]:a,g,h,l;switch(d.type){case "nothing":for(g=0;g<e.length;g++)c.graph.removeAdjacence(e[g][0],e[g][1]);break;case "replot":this.removeEdge(e,{type:"nothing"});c.refresh(!0);break;case "fade:seq":case "fade":h=this;for(g=0;g<e.length;g++)(l=c.graph.getAdjacence(e[g][0],
98
+ e[g][1]))&&l.setData("alpha",0,"end");c.fx.animate(f.merge(d,{modes:["edge-property:alpha"],onComplete:function(){h.removeEdge(e,{type:"nothing"});c.reposition();c.fx.animate(f.merge(d,{modes:["linear"]}))}}));break;case "fade:con":h=this;for(g=0;g<e.length;g++)if(l=c.graph.getAdjacence(e[g][0],e[g][1]))l.setData("alpha",0,"end"),l.ignore=!0;c.reposition();c.fx.animate(f.merge(d,{modes:["edge-property:alpha","linear"],onComplete:function(){h.removeEdge(e,{type:"nothing"});d.onComplete&&d.onComplete()}}));
99
+ break;case "iter":h=this;c.fx.sequence({condition:function(){return e.length!=0},step:function(){h.removeEdge(e.shift(),{type:"nothing"});c.labels.clearLabels()},onComplete:function(){d.onComplete()},duration:Math.ceil(d.duration/e.length)});break;default:this.doError()}},sum:function(a,b){var c=this.viz,d=f.merge(this.options,c.controller,b),e=c.root,g;c.root=b.id||c.root;switch(d.type){case "nothing":g=c.construct(a);g.eachNode(function(a){a.eachAdjacency(function(a){c.graph.addAdjacence(a.nodeFrom,
100
+ a.nodeTo,a.data)})});break;case "replot":c.refresh(!0);this.sum(a,{type:"nothing"});c.refresh(!0);break;case "fade:seq":case "fade":case "fade:con":that=this;g=c.construct(a);var h=!this.preprocessSum(g)?["node-property:alpha"]:["node-property:alpha","edge-property:alpha"];c.reposition();d.type!="fade:con"?c.fx.animate(f.merge(d,{modes:["linear"],onComplete:function(){c.fx.animate(f.merge(d,{modes:h,onComplete:function(){d.onComplete()}}))}})):(c.graph.eachNode(function(a){a.id!=e&&a.pos.isZero()&&
101
+ (a.pos.set(a.endPos),a.startPos.set(a.endPos))}),c.fx.animate(f.merge(d,{modes:["linear"].concat(h)})));break;default:this.doError()}},morph:function(a,b,c){var c=c||{},d=this.viz,e=f.merge(this.options,d.controller,b),g=d.root,h;d.root=b.id||d.root;switch(e.type){case "nothing":h=d.construct(a);h.eachNode(function(a){var b=d.graph.hasNode(a.id);a.eachAdjacency(function(a){var b=!!d.graph.getAdjacence(a.nodeFrom.id,a.nodeTo.id);d.graph.addAdjacence(a.nodeFrom,a.nodeTo,a.data);if(b){var b=d.graph.getAdjacence(a.nodeFrom.id,
102
+ a.nodeTo.id),c;for(c in a.data||{})b.data[c]=a.data[c]}});if(b){var b=d.graph.getNode(a.id),c;for(c in a.data||{})b.data[c]=a.data[c]}});d.graph.eachNode(function(a){a.eachAdjacency(function(a){h.getAdjacence(a.nodeFrom.id,a.nodeTo.id)||d.graph.removeAdjacence(a.nodeFrom.id,a.nodeTo.id)});h.hasNode(a.id)||d.graph.removeNode(a.id)});break;case "replot":d.labels.clearLabels(!0);this.morph(a,{type:"nothing"});d.refresh(!0);d.refresh(!0);break;case "fade:seq":case "fade":case "fade:con":that=this;h=d.construct(a);
103
+ var l="node-property"in c&&f.map(f.splat(c["node-property"]),function(a){return"$"+a});d.graph.eachNode(function(a){var b=h.getNode(a.id);if(b){var b=b.data,c;for(c in b)l&&f.indexOf(l,c)>-1?a.endData[c]=b[c]:a.data[c]=b[c]}else a.setData("alpha",1),a.setData("alpha",1,"start"),a.setData("alpha",0,"end"),a.ignore=!0});d.graph.eachNode(function(a){a.ignore||a.eachAdjacency(function(a){if(!a.nodeFrom.ignore&&!a.nodeTo.ignore){var b=h.getNode(a.nodeFrom.id),a=h.getNode(a.nodeTo.id);b.adjacentTo(a)||
104
+ (a=d.graph.getAdjacence(b.id,a.id),j=!0,a.setData("alpha",1),a.setData("alpha",1,"start"),a.setData("alpha",0,"end"))}})});var j=this.preprocessSum(h),a=!j?["node-property:alpha"]:["node-property:alpha","edge-property:alpha"];a[0]+="node-property"in c?":"+f.splat(c["node-property"]).join(":"):"";a[1]=(a[1]||"edge-property:alpha")+("edge-property"in c?":"+f.splat(c["edge-property"]).join(":"):"");"label-property"in c&&a.push("label-property:"+f.splat(c["label-property"]).join(":"));d.reposition?d.reposition():
105
+ d.compute("end");d.graph.eachNode(function(a){a.id!=g&&a.pos.getp().equals(q.KER)&&(a.pos.set(a.endPos),a.startPos.set(a.endPos))});d.fx.animate(f.merge(e,{modes:[c.position||"polar"].concat(a),onComplete:function(){d.graph.eachNode(function(a){a.ignore&&d.graph.removeNode(a.id)});d.graph.eachNode(function(a){a.eachAdjacency(function(a){a.ignore&&d.graph.removeAdjacence(a.nodeFrom.id,a.nodeTo.id)})});e.onComplete()}}))}},contract:function(a,b){var c=this.viz;if(!a.collapsed&&a.anySubnode(f.lambda(!0)))b=
106
+ f.merge(this.options,c.config,b||{},{modes:["node-property:alpha:span","linear"]}),a.collapsed=!0,function e(a){a.eachSubnode(function(a){a.ignore=!0;a.setData("alpha",0,b.type=="animate"?"end":"current");e(a)})}(a),b.type=="animate"?(c.compute("end"),c.rotated&&c.rotate(c.rotated,"none",{property:"end"}),function g(b){b.eachSubnode(function(b){b.setPos(a.getPos("end"),"end");g(b)})}(a),c.fx.animate(b)):b.type=="replot"&&c.refresh()},expand:function(a,b){if("collapsed"in a){var c=this.viz,b=f.merge(this.options,
107
+ c.config,b||{},{modes:["node-property:alpha:span","linear"]});delete a.collapsed;(function e(a){a.eachSubnode(function(a){delete a.ignore;a.setData("alpha",1,b.type=="animate"?"end":"current");e(a)})})(a);b.type=="animate"?(c.compute("end"),c.rotated&&c.rotate(c.rotated,"none",{property:"end"}),c.fx.animate(b)):b.type=="replot"&&c.refresh()}},preprocessSum:function(a){var b=this.viz;a.eachNode(function(a){b.graph.hasNode(a.id)||(b.graph.addNode(a),a=b.graph.getNode(a.id),a.setData("alpha",0),a.setData("alpha",
108
+ 0,"start"),a.setData("alpha",1,"end"))});var c=!1;a.eachNode(function(a){a.eachAdjacency(function(a){var d=b.graph.getNode(a.nodeFrom.id),h=b.graph.getNode(a.nodeTo.id);d.adjacentTo(h)||(a=b.graph.addAdjacence(d,h,a.data),d.startAlpha==d.endAlpha&&h.startAlpha==h.endAlpha&&(c=!0,a.setData("alpha",0),a.setData("alpha",0,"start"),a.setData("alpha",1,"end")))})});return c}};var A={none:{render:f.empty,contains:f.lambda(!1)},circle:{render:function(a,b,c,d){d=d.getCtx();d.beginPath();d.arc(b.x,b.y,c,
109
+ 0,Math.PI*2,!0);d.closePath();d[a]()},contains:function(a,b,c){var d=a.x-b.x,a=a.y-b.y;return d*d+a*a<=c*c}},ellipse:{render:function(a,b,c,d,e){var e=e.getCtx(),g=1,h=1,f=1,j=1,t=0;c>d?(t=c/2,h=d/c,j=c/d):(t=d/2,g=c/d,f=d/c);e.save();e.scale(g,h);e.beginPath();e.arc(b.x*f,b.y*j,t,0,Math.PI*2,!0);e.closePath();e[a]();e.restore()},contains:function(a,b,c,d){var e=0,g=1,h=1,f=0,j=0,e=0;c>d?(e=c/2,h=d/c):(e=d/2,g=c/d);f=(a.x-b.x)*(1/g);j=(a.y-b.y)*(1/h);return f*f+j*j<=e*e}},square:{render:function(a,
110
+ b,c,d){d.getCtx()[a+"Rect"](b.x-c,b.y-c,2*c,2*c)},contains:function(a,b,c){return Math.abs(b.x-a.x)<=c&&Math.abs(b.y-a.y)<=c}},rectangle:{render:function(a,b,c,d,e){e.getCtx()[a+"Rect"](b.x-c/2,b.y-d/2,c,d)},contains:function(a,b,c,d){return Math.abs(b.x-a.x)<=c/2&&Math.abs(b.y-a.y)<=d/2}},triangle:{render:function(a,b,c,d){var d=d.getCtx(),e=b.x,g=b.y-c,f=e-c,b=b.y+c,c=e+c;d.beginPath();d.moveTo(e,g);d.lineTo(f,b);d.lineTo(c,b);d.closePath();d[a]()},contains:function(a,b,c){return A.circle.contains(a,
111
+ b,c)}},star:{render:function(a,b,c,d){var d=d.getCtx(),e=Math.PI/5;d.save();d.translate(b.x,b.y);d.beginPath();d.moveTo(c,0);for(b=0;b<9;b++)d.rotate(e),b%2==0?d.lineTo(c/0.525731*0.200811,0):d.lineTo(c,0);d.closePath();d[a]();d.restore()},contains:function(a,b,c){return A.circle.contains(a,b,c)}}},D={line:{render:function(a,b,c){c=c.getCtx();c.beginPath();c.moveTo(a.x,a.y);c.lineTo(b.x,b.y);c.stroke()},contains:function(a,b,c,d){var e=Math.min,g=Math.max,f=e(a.x,b.x),l=g(a.x,b.x),e=e(a.y,b.y),g=
112
+ g(a.y,b.y);if(c.x>=f&&c.x<=l&&c.y>=e&&c.y<=g){if(Math.abs(b.x-a.x)<=d)return!0;return Math.abs((b.y-a.y)/(b.x-a.x)*(c.x-a.x)+a.y-c.y)<=d}return!1}},arrow:{render:function(a,b,c,d,e){e=e.getCtx();d&&(d=a,a=b,b=d);d=new m(b.x-a.x,b.y-a.y);d.$scale(c/d.norm());var c=new m(b.x-d.x,b.y-d.y),g=new m(-d.y/2,d.x/2),d=c.add(g),c=c.$add(g.$scale(-1));e.beginPath();e.moveTo(a.x,a.y);e.lineTo(b.x,b.y);e.stroke();e.beginPath();e.moveTo(d.x,d.y);e.lineTo(c.x,c.y);e.lineTo(b.x,b.y);e.closePath();e.fill()},contains:function(a,
113
+ b,c,d){return D.line.contains(a,b,c,d)}},hyperline:{render:function(a,b,c,d){function e(a,b){return a<b?a+Math.PI>b?!1:!0:b+Math.PI>a?!0:!1}var d=d.getCtx(),g=function(a,b){var c=a.x*b.y-a.y*b.x,d=a.squaredNorm(),e=b.squaredNorm();if(c==0)return{x:0,y:0,ratio:-1};var g=(a.y*e-b.y*d+a.y-b.y)/c,c=(b.x*d-a.x*e+b.x-a.x)/c,d=(g*g+c*c)/4-1;if(d<0)return{x:0,y:0,ratio:-1};d=Math.sqrt(d);return{x:-g/2,y:-c/2,ratio:d>1E3?-1:d,a:g,b:c}}(a,b);g.a>1E3||g.b>1E3||g.ratio<0?(d.beginPath(),d.moveTo(a.x*c,a.y*c),
114
+ d.lineTo(b.x*c,b.y*c)):(b=Math.atan2(b.y-g.y,b.x-g.x),a=Math.atan2(a.y-g.y,a.x-g.x),e=e(b,a),d.beginPath(),d.arc(g.x*c,g.y*c,g.ratio*c,b,a,e));d.stroke()},contains:f.lambda(!1)}};k.Plot={initialize:function(a,b){this.viz=a;this.config=a.config;this.node=a.config.Node;this.edge=a.config.Edge;this.animation=new B;this.nodeTypes=new b.Plot.NodeTypes;this.edgeTypes=new b.Plot.EdgeTypes;this.labels=a.labels},nodeHelper:A,edgeHelper:D,Interpolator:{map:{border:"color",color:"color",width:"number",height:"number",
115
+ dim:"number",alpha:"number",lineWidth:"number",angularWidth:"number",span:"number",valueArray:"array-number",dimArray:"array-number"},canvas:{globalAlpha:"number",fillStyle:"color",strokeStyle:"color",lineWidth:"number",shadowBlur:"number",shadowColor:"color",shadowOffsetX:"number",shadowOffsetY:"number",miterLimit:"number"},label:{size:"number",color:"color"},compute:function(a,b,c){return a+(b-a)*c},moebius:function(a,b,c,d){b=d.scale(-c);if(b.norm()<1){var c=b.x,d=b.y,e=a.startPos.getc().moebiusTransformation(b);
116
+ a.pos.setc(e.x,e.y);b.x=c;b.y=d}},linear:function(a,b,c){var b=a.startPos.getc(!0),d=a.endPos.getc(!0);a.pos.setc(this.compute(b.x,d.x,c),this.compute(b.y,d.y,c))},polar:function(a,b,c){b=a.startPos.getp(!0);c=a.endPos.getp().interpolate(b,c);a.pos.setp(c.theta,c.rho)},number:function(a,b,c,d,e){var g=a[d](b,"start"),d=a[d](b,"end");a[e](b,this.compute(g,d,c))},color:function(a,b,c,d,e){var g=f.hexToRgb(a[d](b,"start")),d=f.hexToRgb(a[d](b,"end")),h=this.compute,c=f.rgbToHex([parseInt(h(g[0],d[0],
117
+ c)),parseInt(h(g[1],d[1],c)),parseInt(h(g[2],d[2],c))]);a[e](b,c)},"array-number":function(a,b,c,d,e){for(var g=a[d](b,"start"),d=a[d](b,"end"),f=[],l=0,j=g.length;l<j;l++){var t=g[l],i=d[l];if(t.length){for(var n=0,k=t.length,u=[];n<k;n++)u.push(this.compute(t[n],i[n],c));f.push(u)}else f.push(this.compute(t,i,c))}a[e](b,f)},node:function(a,b,c,d,e,g){d=this[d];if(b)for(var f=b.length,l=0;l<f;l++){var j=b[l];this[d[j]](a,j,c,e,g)}else for(j in d)this[d[j]](a,j,c,e,g)},edge:function(a,b,c,d,e,g){var a=
118
+ a.adjacencies,f;for(f in a)this.node(a[f],b,c,d,e,g)},"node-property":function(a,b,c){this.node(a,b,c,"map","getData","setData")},"edge-property":function(a,b,c){this.edge(a,b,c,"map","getData","setData")},"label-property":function(a,b,c){this.node(a,b,c,"label","getLabelData","setLabelData")},"node-style":function(a,b,c){this.node(a,b,c,"canvas","getCanvasStyle","setCanvasStyle")},"edge-style":function(a,b,c){this.edge(a,b,c,"canvas","getCanvasStyle","setCanvasStyle")}},sequence:function(a){var b=
119
+ this,a=f.merge({condition:f.lambda(!1),step:f.empty,onComplete:f.empty,duration:200},a||{}),c=setInterval(function(){a.condition()?a.step():(clearInterval(c),a.onComplete());b.viz.refresh(!0)},a.duration)},prepare:function(a){var b=this.viz.graph,c={"node-property":{getter:"getData",setter:"setData"},"edge-property":{getter:"getData",setter:"setData"},"node-style":{getter:"getCanvasStyle",setter:"setCanvasStyle"},"edge-style":{getter:"getCanvasStyle",setter:"setCanvasStyle"}},d={};if(f.type(a)=="array")for(var e=
120
+ 0,g=a.length;e<g;e++){var h=a[e].split(":");d[h.shift()]=h}else for(e in a)e=="position"?d[a.position]=[]:d[e]=f.splat(a[e]);b.eachNode(function(a){a.startPos.set(a.pos);f.each(["node-property","node-style"],function(b){if(b in d)for(var e=d[b],g=0,f=e.length;g<f;g++)a[c[b].setter](e[g],a[c[b].getter](e[g]),"start")});f.each(["edge-property","edge-style"],function(b){if(b in d){var e=d[b];a.eachAdjacency(function(a){for(var d=0,g=e.length;d<g;d++)a[c[b].setter](e[d],a[c[b].getter](e[d]),"start")})}})});
121
+ return d},animate:function(a,b){var a=f.merge(this.viz.config,a||{}),c=this,d=this.viz.graph,e=this.Interpolator,g=a.type==="nodefx"?this.nodeFxAnimation:this.animation,h=this.prepare(a.modes);a.hideLabels&&this.labels.hideLabels(!0);g.setOptions(f.extend(a,{$animating:!1,compute:function(g){d.eachNode(function(a){for(var c in h)e[c](a,h[c],g,b)});c.plot(a,this.$animating,g);this.$animating=!0},complete:function(){a.hideLabels&&c.labels.hideLabels(!1);c.plot(a);a.onComplete()}})).start()},nodeFx:function(a){var b=
122
+ this.viz,c=b.graph,d=this.nodeFxAnimation,e=f.merge(this.viz.config,{elements:{id:!1,properties:{}},reposition:!1}),a=f.merge(e,a||{},{onBeforeCompute:f.empty,onAfterCompute:f.empty});d.stopTimer();var g=a.elements.properties;a.elements.id?(d=f.splat(a.elements.id),f.each(d,function(a){if(a=c.getNode(a))for(var b in g)a.setData(b,g[b],"end")})):c.eachNode(function(a){for(var b in g)a.setData(b,g[b],"end")});var d=[],h;for(h in g)d.push(h);h=["node-property:"+d.join(":")];a.reposition&&(h.push("linear"),
123
+ b.compute("end"));this.animate(f.merge(a,{modes:h,type:"nodefx"}))},plot:function(a,b){var c=this.viz,d=c.graph,e=c.canvas,c=c.root,g=this;e.getCtx();a=a||this.viz.controller;a.clearCanvas&&e.clear();if(c=d.getNode(c)){var f=!!c.visited;d.eachNode(function(c){var d=c.getData("alpha");c.eachAdjacency(function(d){var j=d.nodeTo;!!j.visited===f&&c.drawn&&j.drawn&&(!b&&a.onBeforePlotLine(d),g.plotLine(d,e,b),!b&&a.onAfterPlotLine(d))});c.drawn&&(!b&&a.onBeforePlotNode(c),g.plotNode(c,e,b),!b&&a.onAfterPlotNode(c));
124
+ !g.labelsHidden&&a.withLabels&&(c.drawn&&d>=0.95?g.labels.plotLabel(e,c,a):g.labels.hideLabel(c,!1));c.visited=!f})}},plotTree:function(a,b,c){var d=this,e=this.viz.canvas;e.getCtx();var g=a.getData("alpha");a.eachSubnode(function(g){if(b.plotSubtree(a,g)&&g.exist&&g.drawn){var f=a.getAdjacency(g.id);!c&&b.onBeforePlotLine(f);d.plotLine(f,e,c);!c&&b.onAfterPlotLine(f);d.plotTree(g,b,c)}});a.drawn?(!c&&b.onBeforePlotNode(a),this.plotNode(a,e,c),!c&&b.onAfterPlotNode(a),!b.hideLabels&&b.withLabels&&
125
+ g>=0.95?this.labels.plotLabel(e,a,b):this.labels.hideLabel(a,!1)):this.labels.hideLabel(a,!0)},plotNode:function(a,b,c){var d=a.getData("type"),e=this.node.CanvasStyles;if(d!="none"){var g=a.getData("lineWidth"),f=a.getData("color"),l=a.getData("alpha"),j=b.getCtx();j.save();j.lineWidth=g;j.fillStyle=j.strokeStyle=f;j.globalAlpha=l;for(var i in e)j[i]=a.getCanvasStyle(i);this.nodeTypes[d].render.call(this,a,b,c);j.restore()}},plotLine:function(a,b,c){var d=a.getData("type"),e=this.edge.CanvasStyles;
126
+ if(d!="none"){var g=a.getData("lineWidth"),f=a.getData("color"),l=b.getCtx(),j=a.nodeFrom,i=a.nodeTo;l.save();l.lineWidth=g;l.fillStyle=l.strokeStyle=f;l.globalAlpha=Math.min(j.getData("alpha"),i.getData("alpha"),a.getData("alpha"));for(var k in e)l[k]=a.getCanvasStyle(k);this.edgeTypes[d].render.call(this,a,b,c);l.restore()}}};k.Plot3D=f.merge(k.Plot,{Interpolator:{linear:function(a,b,c){var b=a.startPos.getc(!0),d=a.endPos.getc(!0);a.pos.setc(this.compute(b.x,d.x,c),this.compute(b.y,d.y,c),this.compute(b.z,
127
+ d.z,c))}},plotNode:function(a,b){a.getData("type")!="none"&&this.plotElement(a,b,{getAlpha:function(){return a.getData("alpha")}})},plotLine:function(a,b){a.getData("type")!="none"&&this.plotElement(a,b,{getAlpha:function(){return Math.min(a.nodeFrom.getData("alpha"),a.nodeTo.getData("alpha"),a.getData("alpha"))}})},plotElement:function(a,b,c){var d=b.getCtx(),e=new Matrix4,g=b.config.Scene.Lighting,h=b.canvases[0],b=h.program,h=h.camera;if(!a.geometry)a.geometry=new (O3D[a.getData("type")]);a.geometry.update(a);
128
+ if(!a.webGLVertexBuffer){for(var l=[],j=[],i=[],k=0,n=a.geometry,m=0,u=n.vertices,n=n.faces,q=n.length;m<q;m++){var p=n[m],o=u[p.a],s=u[p.b],r=u[p.c],x=p.d?u[p.d]:!1,p=p.normal;l.push(o.x,o.y,o.z);l.push(s.x,s.y,s.z);l.push(r.x,r.y,r.z);x&&l.push(x.x,x.y,x.z);i.push(p.x,p.y,p.z);i.push(p.x,p.y,p.z);i.push(p.x,p.y,p.z);x&&i.push(p.x,p.y,p.z);j.push(k,k+1,k+2);x?(j.push(k,k+2,k+3),k+=4):k+=3}a.webGLVertexBuffer=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,a.webGLVertexBuffer);d.bufferData(d.ARRAY_BUFFER,
129
+ new Float32Array(l),d.STATIC_DRAW);a.webGLFaceBuffer=d.createBuffer();d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,a.webGLFaceBuffer);d.bufferData(d.ELEMENT_ARRAY_BUFFER,new Uint16Array(j),d.STATIC_DRAW);a.webGLFaceCount=j.length;a.webGLNormalBuffer=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,a.webGLNormalBuffer);d.bufferData(d.ARRAY_BUFFER,new Float32Array(i),d.STATIC_DRAW)}e.multiply(h.matrix,a.geometry.matrix);d.uniformMatrix4fv(b.viewMatrix,!1,e.flatten());d.uniformMatrix4fv(b.projectionMatrix,!1,h.projectionMatrix.flatten());
130
+ e=Matrix4.makeInvert(e);e.$transpose();d.uniformMatrix4fv(b.normalMatrix,!1,e.flatten());e=f.hexToRgb(a.getData("color"));e.push(c.getAlpha());d.uniform4f(b.color,e[0]/255,e[1]/255,e[2]/255,e[3]);d.uniform1i(b.enableLighting,g.enable);if(g.enable){if(g.ambient)c=g.ambient,d.uniform3f(b.ambientColor,c[0],c[1],c[2]);if(g.directional)g=g.directional,e=g.color,g=g.direction,g=(new Vector3(g.x,g.y,g.z)).normalize().$scale(-1),d.uniform3f(b.lightingDirection,g.x,g.y,g.z),d.uniform3f(b.directionalColor,
131
+ e[0],e[1],e[2])}d.bindBuffer(d.ARRAY_BUFFER,a.webGLVertexBuffer);d.vertexAttribPointer(b.position,3,d.FLOAT,!1,0,0);d.bindBuffer(d.ARRAY_BUFFER,a.webGLNormalBuffer);d.vertexAttribPointer(b.normal,3,d.FLOAT,!1,0,0);d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,a.webGLFaceBuffer);d.drawElements(d.TRIANGLES,a.webGLFaceCount,d.UNSIGNED_SHORT,0)}});k.Label={};k.Label.Native=new i({initialize:function(a){this.viz=a},plotLabel:function(a,b,c){var d=a.getCtx();b.pos.getc(!0);d.font=b.getLabelData("style")+" "+b.getLabelData("size")+
132
+ "px "+b.getLabelData("family");d.textAlign=b.getLabelData("textAlign");d.fillStyle=d.strokeStyle=b.getLabelData("color");d.textBaseline=b.getLabelData("textBaseline");this.renderLabel(a,b,c)},renderLabel:function(a,b){var c=a.getCtx(),d=b.pos.getc(!0);c.fillText(b.name,d.x,d.y+b.getData("height")/2)},hideLabel:f.empty,hideLabels:f.empty});k.Label.DOM=new i({labelsHidden:!1,labelContainer:!1,labels:{},getLabelContainer:function(){return this.labelContainer?this.labelContainer:this.labelContainer=document.getElementById(this.viz.config.labelContainer)},
133
+ getLabel:function(a){return a in this.labels&&this.labels[a]!=null?this.labels[a]:this.labels[a]=document.getElementById(a)},hideLabels:function(a){this.getLabelContainer().style.display=a?"none":"";this.labelsHidden=a},clearLabels:function(a){for(var b in this.labels)if(a||!this.viz.graph.hasNode(b))this.disposeLabel(b),delete this.labels[b]},disposeLabel:function(a){(a=this.getLabel(a))&&a.parentNode&&a.parentNode.removeChild(a)},hideLabel:function(a,b){var a=f.splat(a),c=b?"":"none",d=this;f.each(a,
134
+ function(a){if(a=d.getLabel(a.id))a.style.display=c})},fitsInCanvas:function(a,b){var c=b.getSize();if(a.x>=c.width||a.x<0||a.y>=c.height||a.y<0)return!1;return!0}});k.Label.HTML=new i({Implements:k.Label.DOM,plotLabel:function(a,b,c){var a=b.id,d=this.getLabel(a);if(!d&&!(d=document.getElementById(a))){var d=document.createElement("div"),e=this.getLabelContainer();d.id=a;d.className="node";d.style.position="absolute";c.onCreateLabel(d,b);e.appendChild(d);this.labels[b.id]=d}this.placeLabel(d,b,c)}});
135
+ k.Label.SVG=new i({Implements:k.Label.DOM,plotLabel:function(a,b,c){var a=b.id,d=this.getLabel(a);if(!d&&!(d=document.getElementById(a))){var d=document.createElementNS("http://www.w3.org/2000/svg","svg:text"),e=document.createElementNS("http://www.w3.org/2000/svg","svg:tspan");d.appendChild(e);e=this.getLabelContainer();d.setAttribute("id",a);d.setAttribute("class","node");e.appendChild(d);c.onCreateLabel(d,b);this.labels[b.id]=d}this.placeLabel(d,b,c)}});var r=$jit.Layouts={},F={label:null,compute:function(a,
136
+ b,c){this.initializeLabel(c);var d=this.label,e=d.style;a.eachNode(function(a){var b=a.getData("autoWidth"),c=a.getData("autoHeight");if(b||c){delete a.data.$width;delete a.data.$height;delete a.data.$dim;var j=a.getData("width"),i=a.getData("height");e.width=b?"auto":j+"px";e.height=c?"auto":i+"px";d.innerHTML=a.name;b=d.offsetWidth;c=d.offsetHeight;j=a.getData("type");f.indexOf(["circle","square","triangle","star"],j)===-1?(a.setData("width",b),a.setData("height",c)):(b=b>c?b:c,a.setData("width",
137
+ b),a.setData("height",b),a.setData("dim",b))}})},initializeLabel:function(a){if(!this.label)this.label=document.createElement("div"),document.body.appendChild(this.label);this.setLabelStyles(a)},setLabelStyles:function(){f.extend(this.label.style,{visibility:"hidden",position:"absolute",width:"auto",height:"auto"});this.label.className="jit-autoadjust-label"}};r.Radial=new i({compute:function(a){a=f.splat(a||["current","start","end"]);F.compute(this.graph,a,this.config);this.graph.computeLevels(this.root,
138
+ 0,"ignore");var b=this.createLevelDistanceFunc();this.computeAngularWidths(a);this.computePositions(a,b)},computePositions:function(a,b){for(var c=this.graph,d=c.getNode(this.root),e=this.parent,g=0,f=a.length;g<f;g++){var i=a[g];d.setPos(new q(0,0),i);d.setData("span",Math.PI*2,i)}d.angleSpan={begin:0,end:2*Math.PI};c.eachBFS(this.root,function(c){var d=c.angleSpan.end-c.angleSpan.begin,g=c.angleSpan.begin,f=b(c),h=0,i=[],l={};c.eachSubnode(function(b){h+=b._treeAngularWidth;for(var c=0,d=a.length;c<
139
+ d;c++){var e=a[c],g=b.getData("dim",e);l[e]=e in l?g>l[e]?g:l[e]:g}i.push(b)},"ignore");e&&e.id==c.id&&i.length>0&&i[0].dist&&i.sort(function(a,b){return(a.dist>=b.dist)-(a.dist<=b.dist)});for(var c=0,k=i.length;c<k;c++){var m=i[c];if(!m._flag){for(var o=m._treeAngularWidth/h*d,s=g+o/2,r=0,w=a.length;r<w;r++){var v=a[r];m.setPos(new q(s,f),v);m.setData("span",o,v);m.setData("dim-quotient",m.getData("dim",v)/l[v],v)}m.angleSpan={begin:g,end:g+o};g+=o}}},"ignore")},setAngularWidthForNodes:function(a){this.graph.eachBFS(this.root,
140
+ function(b,c){var d=b.getData("angularWidth",a[0])||5;b._angularWidth=d/c},"ignore")},setSubtreesAngularWidth:function(){var a=this;this.graph.eachNode(function(b){a.setSubtreeAngularWidth(b)},"ignore")},setSubtreeAngularWidth:function(a){var b=this,c=a._angularWidth,d=0;a.eachSubnode(function(a){b.setSubtreeAngularWidth(a);d+=a._treeAngularWidth},"ignore");a._treeAngularWidth=Math.max(c,d)},computeAngularWidths:function(a){this.setAngularWidthForNodes(a);this.setSubtreesAngularWidth()}});$jit.RGraph=
141
+ new i({Implements:[{construct:function(a){var b=f.type(a)=="array",c=new k(this.graphOptions,this.config.Node,this.config.Edge,this.config.Label);b?function(a,b){for(var c=function(c){for(var g=0,f=b.length;g<f;g++)if(b[g].id==c)return b[g];return a.addNode({id:c,name:c})},h=0,i=b.length;h<i;h++){a.addNode(b[h]);var j=b[h].adjacencies;if(j)for(var k=0,m=j.length;k<m;k++){var n=j[k],o={};if(typeof j[k]!="string")o=f.merge(n.data,{}),n=n.nodeTo;a.addAdjacence(b[h],c(n),o)}}}(c,a):function(a,b){a.addNode(b);
142
+ if(b.children)for(var c=0,f=b.children;c<f.length;c++)a.addAdjacence(b,f[c]),arguments.callee(a,f[c])}(c,a);return c},loadJSON:function(a,b){this.json=a;this.labels&&this.labels.clearLabels&&this.labels.clearLabels(!0);this.graph=this.construct(a);this.root=f.type(a)!="array"?a.id:a[b?b:0].id},toJSON:function(a){if((a||"tree")=="tree")var b={},b=function e(a){var b={};b.id=a.id;b.name=a.name;b.data=a.data;var c=[];a.eachSubnode(function(a){c.push(e(a))});b.children=c;return b}(this.graph.getNode(this.root));
143
+ else{var b=[],c=!!this.graph.getNode(this.root).visited;this.graph.eachNode(function(a){var g={};g.id=a.id;g.name=a.name;g.data=a.data;var f=[];a.eachAdjacency(function(a){var b=a.nodeTo;if(!!b.visited===c){var e={};e.nodeTo=b.id;e.data=a.data;f.push(e)}});g.adjacencies=f;b.push(g);a.visited=!c})}return b}},w,r.Radial],initialize:function(a){var b=$jit.RGraph,a=this.controller=this.config=f.merge(o("Canvas","Node","Edge","Fx","Controller","Tips","NodeStyles","Events","Navigation","Label"),{interpolation:"linear",
144
+ levelDistance:100},a);if(a.useCanvas)this.canvas=a.useCanvas,this.config.labelContainer=this.canvas.id+"-label";else{if(a.background)a.background=f.merge({type:"Circles"},a.background);this.canvas=new s(this,a);this.config.labelContainer=(typeof a.injectInto=="string"?a.injectInto:a.injectInto.id)+"-label"}this.graphOptions={klass:q,Node:{selected:!1,exist:!0,drawn:!0}};this.graph=new k(this.graphOptions,this.config.Node,this.config.Edge);this.labels=new b.Label[a.Label.type](this);this.fx=new b.Plot(this,
145
+ b);this.op=new b.Op(this);this.root=this.json=null;this.parent=this.busy=!1;this.initializeExtras()},createLevelDistanceFunc:function(){var a=this.config.levelDistance;return function(b){return(b._depth+1)*a}},refresh:function(){this.compute();this.plot()},reposition:function(){this.compute("end")},plot:function(){this.fx.plot()},getNodeAndParentAngle:function(a){var b=!1,c=this.graph.getNode(a),a=c.getParents();if(a=a.length>0?a[0]:!1)b=a.pos.getc(),c=c.pos.getc(),b=b.add(c.scale(-1)),b=Math.atan2(b.y,
146
+ b.x),b<0&&(b+=2*Math.PI);return{parent:a,theta:b}},tagChildren:function(a,b){if(a.angleSpan){var c=[];a.eachAdjacency(function(a){c.push(a.nodeTo)},"ignore");for(var d=c.length,e=0;e<d&&b!=c[e].id;e++);for(var e=(e+1)%d,g=0;b!=c[e].id;e=(e+1)%d)c[e].dist=g++}},onClick:function(a,b){if(this.root!=a&&!this.busy){this.busy=!0;this.root=a;var c=this;this.controller.onBeforeCompute(this.graph.getNode(a));var d=this.getNodeAndParentAngle(a);this.tagChildren(d.parent,a);this.parent=d.parent;this.compute("end");
147
+ var e=d.theta-d.parent.endPos.theta;this.graph.eachNode(function(a){a.endPos.set(a.endPos.getp().add(new q(e,0)))});d=this.config.interpolation;b=f.merge({onComplete:f.empty},b||{});this.fx.animate(f.merge({hideLabels:!0,modes:[d]},b,{onComplete:function(){c.busy=!1;b.onComplete()}}))}}});$jit.RGraph.$extend=!0;(function(a){a.Op=new i({Implements:k.Op});a.Plot=new i({Implements:k.Plot});a.Label={};a.Label.Native=new i({Implements:k.Label.Native});a.Label.SVG=new i({Implements:k.Label.SVG,initialize:function(a){this.viz=
148
+ a},placeLabel:function(a,c,d){var e=c.pos.getc(!0),g=this.viz.canvas,f=g.translateOffsetX,i=g.translateOffsetY,j=g.scaleOffsetX,k=g.scaleOffsetY,g=g.getSize(),e={x:Math.round(e.x*j+f+g.width/2),y:Math.round(e.y*k+i+g.height/2)};a.setAttribute("x",e.x);a.setAttribute("y",e.y);d.onPlaceLabel(a,c)}});a.Label.HTML=new i({Implements:k.Label.HTML,initialize:function(a){this.viz=a},placeLabel:function(a,c,d){var e=c.pos.getc(!0),f=this.viz.canvas,h=f.translateOffsetX,i=f.translateOffsetY,j=f.scaleOffsetX,
149
+ k=f.scaleOffsetY,m=f.getSize(),e={x:Math.round(e.x*j+h+m.width/2),y:Math.round(e.y*k+i+m.height/2)},h=a.style;h.left=e.x+"px";h.top=e.y+"px";h.display=this.fitsInCanvas(e,f)?"":"none";d.onPlaceLabel(a,c)}});a.Plot.NodeTypes=new i({none:{render:f.empty,contains:f.lambda(!1)},circle:{render:function(a,c){var d=a.pos.getc(!0),e=a.getData("dim");this.nodeHelper.circle.render("fill",d,e,c)},contains:function(a,c){var d=a.pos.getc(!0),e=a.getData("dim");return this.nodeHelper.circle.contains(d,c,e)}},ellipse:{render:function(a,
150
+ c){var d=a.pos.getc(!0),e=a.getData("width"),f=a.getData("height");this.nodeHelper.ellipse.render("fill",d,e,f,c)},contains:function(a,c){var d=a.pos.getc(!0),e=a.getData("width"),f=a.getData("height");return this.nodeHelper.ellipse.contains(d,c,e,f)}},square:{render:function(a,c){var d=a.pos.getc(!0),e=a.getData("dim");this.nodeHelper.square.render("fill",d,e,c)},contains:function(a,c){var d=a.pos.getc(!0),e=a.getData("dim");return this.nodeHelper.square.contains(d,c,e)}},rectangle:{render:function(a,
151
+ c){var d=a.pos.getc(!0),e=a.getData("width"),f=a.getData("height");this.nodeHelper.rectangle.render("fill",d,e,f,c)},contains:function(a,c){var d=a.pos.getc(!0),e=a.getData("width"),f=a.getData("height");return this.nodeHelper.rectangle.contains(d,c,e,f)}},triangle:{render:function(a,c){var d=a.pos.getc(!0),e=a.getData("dim");this.nodeHelper.triangle.render("fill",d,e,c)},contains:function(a,c){var d=a.pos.getc(!0),e=a.getData("dim");return this.nodeHelper.triangle.contains(d,c,e)}},star:{render:function(a,
152
+ c){var d=a.pos.getc(!0),e=a.getData("dim");this.nodeHelper.star.render("fill",d,e,c)},contains:function(a,c){var d=a.pos.getc(!0),e=a.getData("dim");return this.nodeHelper.star.contains(d,c,e)}}});a.Plot.EdgeTypes=new i({none:f.empty,line:{render:function(a,c){var d=a.nodeFrom.pos.getc(!0),e=a.nodeTo.pos.getc(!0);this.edgeHelper.line.render(d,e,c)},contains:function(a,c){var d=a.nodeFrom.pos.getc(!0),e=a.nodeTo.pos.getc(!0);return this.edgeHelper.line.contains(d,e,c,this.edge.epsilon)}},arrow:{render:function(a,
153
+ c){var d=a.nodeFrom.pos.getc(!0),e=a.nodeTo.pos.getc(!0),f=a.getData("dim"),h=a.data.$direction;this.edgeHelper.arrow.render(d,e,f,h&&h.length>1&&h[0]!=a.nodeFrom.id,c)},contains:function(a,c){var d=a.nodeFrom.pos.getc(!0),e=a.nodeTo.pos.getc(!0);return this.edgeHelper.arrow.contains(d,e,c,this.edge.epsilon)}}})})($jit.RGraph)})();