wagn 1.12.10 → 1.12.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +8 -8
  2. data/Gemfile +14 -12
  3. data/VERSION +1 -1
  4. data/app/assets/javascripts/wagn.js.coffee +25 -22
  5. data/app/assets/javascripts/wagn_mod.js.coffee +0 -44
  6. data/app/controllers/card_controller.rb +0 -1
  7. data/app/controllers/wagn_controller.rb +1 -2
  8. data/config/routes.rb +0 -1
  9. data/features/hello_wagn.feature +7 -5
  10. data/lib/card/exceptions.rb +7 -2
  11. data/lib/card/format.rb +8 -3
  12. data/lib/card/query/card_spec.rb +2 -1
  13. data/lib/card/set.rb +1 -0
  14. data/lib/wagn/all.rb +4 -4
  15. data/mods/core/formats/html_format.rb +296 -284
  16. data/mods/core/formats/text_format.rb +5 -2
  17. data/mods/core/sets/all/phases.rb +13 -0
  18. data/mods/standard/formats/css_format.rb +4 -1
  19. data/mods/standard/formats/csv_format.rb +4 -1
  20. data/mods/standard/formats/js_format.rb +6 -0
  21. data/mods/standard/formats/json_format.rb +4 -1
  22. data/mods/standard/formats/kml_format.rb +4 -1
  23. data/mods/standard/formats/rss_format.rb +7 -4
  24. data/mods/standard/formats/xml_format.rb +4 -1
  25. data/mods/standard/lib/stylesheets/functional.scss +2 -1
  26. data/mods/standard/sets/all/account.rb +1 -1
  27. data/mods/standard/sets/all/all_css.rb +5 -1
  28. data/mods/standard/sets/all/json.rb +17 -21
  29. data/mods/standard/sets/all/rich_html.rb +4 -3
  30. data/mods/standard/sets/self/head.rb +6 -0
  31. data/mods/standard/sets/type/cardtype.rb +1 -1
  32. data/mods/standard/sets/type/pointer.rb +23 -11
  33. data/mods/standard/sets/type/scss.rb +1 -0
  34. data/mods/standard/sets/type/search_type.rb +0 -2
  35. data/mods/standard/sets/type/user.rb +1 -2
  36. data/public/assets/application-7cda003cf1291a165b1eac69ea3027aa.js +107 -0
  37. data/public/assets/application-7cda003cf1291a165b1eac69ea3027aa.js.gz +0 -0
  38. data/public/assets/application.js +42 -38
  39. data/public/assets/application.js.gz +0 -0
  40. data/public/assets/html5shiv-printshiv-ad36fc7219f4aeaa275f9a7fe2383413.js.gz +0 -0
  41. data/public/assets/html5shiv-printshiv.js.gz +0 -0
  42. data/public/assets/jquery.min-8b58c0fbf303b938d8e749262f7e50dd.map +1 -0
  43. data/public/assets/jquery.min.map +1 -0
  44. data/public/assets/manifest.yml +4 -2
  45. data/public/assets/tinymce-22b5a139d9ff7df7643afae9ce205508.js.gz +0 -0
  46. data/public/assets/tinymce.js.gz +0 -0
  47. data/spec/lib/card/query_spec.rb +3 -2
  48. data/spec/mods/standard/sets/all/all_css_spec.rb +1 -1
  49. data/spec/mods/standard/sets/type/pointer_spec.rb +2 -2
  50. data/wagn.gemspec +5 -4
  51. metadata +10 -80
  52. data/public/assets/application-af2bc486eb3db1c02c4dcd0e23ca25fc.js +0 -103
  53. data/public/assets/application-af2bc486eb3db1c02c4dcd0e23ca25fc.js.gz +0 -0
  54. data/public/assets2bpacked/jstree/README.txt +0 -10
  55. data/public/assets2bpacked/jstree/_demo/_dump.sql +0 -20
  56. data/public/assets2bpacked/jstree/_demo/_inc/__mysql_errors.log +0 -0
  57. data/public/assets2bpacked/jstree/_demo/_inc/class._database.php +0 -146
  58. data/public/assets2bpacked/jstree/_demo/_inc/class._database_i.php +0 -152
  59. data/public/assets2bpacked/jstree/_demo/_inc/class.tree.php +0 -602
  60. data/public/assets2bpacked/jstree/_demo/_install.txt +0 -6
  61. data/public/assets2bpacked/jstree/_demo/config.php +0 -14
  62. data/public/assets2bpacked/jstree/_demo/file.png +0 -0
  63. data/public/assets2bpacked/jstree/_demo/folder.png +0 -0
  64. data/public/assets2bpacked/jstree/_demo/index.html +0 -461
  65. data/public/assets2bpacked/jstree/_demo/root.png +0 -0
  66. data/public/assets2bpacked/jstree/_demo/server.php +0 -69
  67. data/public/assets2bpacked/jstree/_docs/!style.css +0 -48
  68. data/public/assets2bpacked/jstree/_docs/_drive.png +0 -0
  69. data/public/assets2bpacked/jstree/_docs/_html_data.html +0 -2
  70. data/public/assets2bpacked/jstree/_docs/_json_data.json +0 -4
  71. data/public/assets2bpacked/jstree/_docs/_search_data.json +0 -6
  72. data/public/assets2bpacked/jstree/_docs/_search_result.json +0 -1
  73. data/public/assets2bpacked/jstree/_docs/_xml_flat.xml +0 -12
  74. data/public/assets2bpacked/jstree/_docs/_xml_nest.xml +0 -18
  75. data/public/assets2bpacked/jstree/_docs/checkbox.html +0 -171
  76. data/public/assets2bpacked/jstree/_docs/contextmenu.html +0 -121
  77. data/public/assets2bpacked/jstree/_docs/cookies.html +0 -97
  78. data/public/assets2bpacked/jstree/_docs/core.html +0 -689
  79. data/public/assets2bpacked/jstree/_docs/crrm.html +0 -316
  80. data/public/assets2bpacked/jstree/_docs/dnd.html +0 -199
  81. data/public/assets2bpacked/jstree/_docs/hotkeys.html +0 -82
  82. data/public/assets2bpacked/jstree/_docs/html_data.html +0 -175
  83. data/public/assets2bpacked/jstree/_docs/index.html +0 -86
  84. data/public/assets2bpacked/jstree/_docs/json_data.html +0 -249
  85. data/public/assets2bpacked/jstree/_docs/languages.html +0 -152
  86. data/public/assets2bpacked/jstree/_docs/logo.png +0 -0
  87. data/public/assets2bpacked/jstree/_docs/search.html +0 -153
  88. data/public/assets2bpacked/jstree/_docs/sort.html +0 -85
  89. data/public/assets2bpacked/jstree/_docs/syntax/!script.js +0 -2232
  90. data/public/assets2bpacked/jstree/_docs/syntax/!style.css +0 -511
  91. data/public/assets2bpacked/jstree/_docs/syntax/clipboard.swf +0 -0
  92. data/public/assets2bpacked/jstree/_docs/syntax/help.png +0 -0
  93. data/public/assets2bpacked/jstree/_docs/syntax/magnifier.png +0 -0
  94. data/public/assets2bpacked/jstree/_docs/syntax/page_white_code.png +0 -0
  95. data/public/assets2bpacked/jstree/_docs/syntax/page_white_copy.png +0 -0
  96. data/public/assets2bpacked/jstree/_docs/syntax/printer.png +0 -0
  97. data/public/assets2bpacked/jstree/_docs/syntax/wrapping.png +0 -0
  98. data/public/assets2bpacked/jstree/_docs/themeroller.html +0 -107
  99. data/public/assets2bpacked/jstree/_docs/themes.html +0 -127
  100. data/public/assets2bpacked/jstree/_docs/types.html +0 -178
  101. data/public/assets2bpacked/jstree/_docs/ui.html +0 -197
  102. data/public/assets2bpacked/jstree/_docs/unique.html +0 -85
  103. data/public/assets2bpacked/jstree/_docs/xml_data.html +0 -218
  104. data/public/assets2bpacked/jstree/_lib/jquery.cookie.js +0 -96
  105. data/public/assets2bpacked/jstree/_lib/jquery.hotkeys.js +0 -99
  106. data/public/assets2bpacked/jstree/_lib/jquery.js +0 -5
  107. data/public/assets2bpacked/jstree/jquery.jstree.js +0 -4564
  108. data/public/assets2bpacked/jstree/themes/apple/bg.jpg +0 -0
  109. data/public/assets2bpacked/jstree/themes/apple/d.png +0 -0
  110. data/public/assets2bpacked/jstree/themes/apple/dot_for_ie.gif +0 -0
  111. data/public/assets2bpacked/jstree/themes/apple/style.css +0 -61
  112. data/public/assets2bpacked/jstree/themes/apple/throbber.gif +0 -0
  113. data/public/assets2bpacked/jstree/themes/classic/d.gif +0 -0
  114. data/public/assets2bpacked/jstree/themes/classic/d.png +0 -0
  115. data/public/assets2bpacked/jstree/themes/classic/dot_for_ie.gif +0 -0
  116. data/public/assets2bpacked/jstree/themes/classic/style.css +0 -77
  117. data/public/assets2bpacked/jstree/themes/classic/throbber.gif +0 -0
  118. data/public/assets2bpacked/jstree/themes/default-rtl/d.gif +0 -0
  119. data/public/assets2bpacked/jstree/themes/default-rtl/d.png +0 -0
  120. data/public/assets2bpacked/jstree/themes/default-rtl/dots.gif +0 -0
  121. data/public/assets2bpacked/jstree/themes/default-rtl/style.css +0 -84
  122. data/public/assets2bpacked/jstree/themes/default-rtl/throbber.gif +0 -0
  123. data/public/assets2bpacked/jstree/themes/default/d.gif +0 -0
  124. data/public/assets2bpacked/jstree/themes/default/d.png +0 -0
  125. data/public/assets2bpacked/jstree/themes/default/style.css +0 -74
  126. data/public/assets2bpacked/jstree/themes/default/throbber.gif +0 -0
@@ -1,5 +1,8 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
- class Card::TextFormat < Card::Format
4
- @@aliases[:txt] = :text
3
+ class Card
4
+ Format.register :text
5
+ class TextFormat < Format
6
+ @@aliases[:txt] = :text
7
+ end
5
8
  end
@@ -1,3 +1,14 @@
1
+
2
+ def save
3
+ super
4
+ rescue Card::Abort => e
5
+ e.status == :success
6
+ end
7
+
8
+ def abort status=:failure, msg='save canceled'
9
+ raise Card::Abort.new( status, msg)
10
+ end
11
+
1
12
  def approve
2
13
  #warn "approve called for #{name}!"
3
14
  @action = case
@@ -47,6 +58,8 @@ def rescue_event e
47
58
  @subcards.each { |key, card| card.expire_pieces }
48
59
  end
49
60
  raise e
61
+ #rescue Card::Cancel
62
+ # false
50
63
  end
51
64
 
52
65
  def event_applies? opts
@@ -1,3 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
- class Card::CssFormat < Card::Format
2
+ class Card
3
+ Format.register :css
4
+ class CssFormat < Card::Format
5
+ end
3
6
  end
@@ -1,3 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
- class Card::CsvFormat < Card::TextFormat
2
+ class Card
3
+ Format.register :csv
4
+ class CsvFormat < TextFormat
5
+ end
3
6
  end
@@ -0,0 +1,6 @@
1
+ # -*- encoding : utf-8 -*-
2
+ class Card
3
+ Format.register :js
4
+ class JsFormat < Format
5
+ end
6
+ end
@@ -1,3 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
- class Card::JsonFormat < Card::DataFormat
2
+ class Card
3
+ Format.register :json
4
+ class JsonFormat < DataFormat
5
+ end
3
6
  end
@@ -1,3 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
- class Card::KmlFormat < Card::Format
2
+ class Card
3
+ Format.register :kml
4
+ class KmlFormat < Format
5
+ end
3
6
  end
@@ -1,8 +1,11 @@
1
1
  # -*- encoding : utf-8 -*-
2
- class Card::RssFormat < Card::HtmlFormat
2
+ class Card
3
+ Format.register :rss
3
4
 
4
- def internal_url relative_path
5
- wagn_url relative_path
6
- end
5
+ class RssFormat < HtmlFormat
7
6
 
7
+ def internal_url relative_path
8
+ wagn_url relative_path
9
+ end
10
+ end
8
11
  end
@@ -1,3 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
- class Card::XmlFormat < Card::DataFormat
2
+ class Card
3
+ Format.register :xml
4
+ class XmlFormat < DataFormat
5
+ end
3
6
  end
@@ -169,7 +169,8 @@ fieldset {
169
169
  white-space: normal;
170
170
  }
171
171
  pre,
172
- .TYPE-plain_text.card-content {
172
+ .TYPE-plain_text.card-content,
173
+ .SELF-Xhead.card-content {
173
174
  white-space: pre-wrap; /* css-3 */
174
175
  white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
175
176
  white-space: -pre-wrap; /* Opera 4-6 */
@@ -107,7 +107,7 @@ format :html do
107
107
  }
108
108
  #{
109
109
  if !args[:setup] && Account.user.id != account.id
110
- fieldset :block, check_box_tag( 'card[account][blocked]', '1', account.blocked? ), :help=>'prevents sign-ins'
110
+ fieldset :block, check_box_tag( 'card[account_args][blocked]', '1', account.blocked? ), :help=>'prevents sign-ins'
111
111
  end
112
112
  }
113
113
  }
@@ -11,8 +11,12 @@ format :css do
11
11
  render view, args
12
12
  end
13
13
 
14
- view :content do |args|
14
+ view :titled do |args|
15
15
  major_comment( %{ Style Card: "#{ card.name }" } ) +
16
+ _render_core( args )
17
+ end
18
+
19
+ view :content do |args|
16
20
  _render_core( args )
17
21
  end
18
22
 
@@ -6,23 +6,20 @@ format :json do
6
6
  end
7
7
 
8
8
  def default_item_view
9
- if @depth == 0 && params[:item]
10
- params[:item]
11
- else
12
- :core
13
- end
9
+ params[:item] || :atom
10
+ end
11
+
12
+ def max_depth
13
+ params[:max_depth] || 1
14
14
  end
15
15
 
16
16
  def default_search_params
17
17
  { :default_limit => 0 }
18
18
  end
19
19
 
20
- def max_depth
21
- params[:max_depth] || 1
22
- end
23
20
 
24
21
  def show args
25
- view = args[:view] || :atom
22
+ view = args[:view] || :content
26
23
  raw = render view, args
27
24
  case
28
25
  when String === raw ; raw
@@ -51,24 +48,23 @@ format :json do
51
48
  hash
52
49
  end
53
50
 
51
+ view :content do |args|
52
+ {
53
+ :url => controller.request.original_url,
54
+ :timestamp => Time.now.to_s,
55
+ :card => _render_atom
56
+ }
57
+ end
58
+
54
59
  view :atom do |args|
55
60
  h = {
56
61
  :name => card.name,
57
62
  :type => card.type_name,
58
63
  :content => card.raw_content
59
64
  }
60
- unless @depth == max_depth
61
- h[:value] = _render default_item_view, args
62
- end
63
- if @depth==0
64
- {
65
- :url => controller.request.original_url,
66
- :timestamp => Time.now.to_s,
67
- :card => h
68
- }
69
- else
70
- h
71
- end
65
+ h[:codename] = card.codename if card.codename
66
+ h[:value] = _render_core args if @depth < max_depth
67
+ h
72
68
  end
73
69
 
74
70
  end
@@ -30,7 +30,7 @@ format :html do
30
30
  view :titled, :tags=>:comment do |args|
31
31
  wrap args do
32
32
  [
33
- _render_header( args.merge :optional_menu=>:hide ),
33
+ _render_header( args.reverse_merge :optional_menu=>:hide ),
34
34
  wrap_body( :content=>true ) { _render_core args },
35
35
  optional_render( :comment_box, args )
36
36
  ]
@@ -61,7 +61,8 @@ format :html do
61
61
  end
62
62
 
63
63
  view :open, :tags=>:comment do |args|
64
- frame args.merge(:content=>true, :optional_toggle=>:show) do
64
+ args[:optional_toggle] ||= main? ? :hide : :show
65
+ frame args.merge(:content=>true) do
65
66
  [
66
67
  _render_open_content( args ),
67
68
  optional_render( :comment_box, args )
@@ -420,7 +421,7 @@ format :html do
420
421
  %{<strong>Conflict!</strong><span class="new-current-revision-id">#{@revision.id}</span>
421
422
  <div>#{ link_to_page @revision.creator.name } has also been making changes.</div>
422
423
  <div>Please examine below, resolve above, and re-submit.</div>
423
- #{wrap(:conflict) { |args| _render_diff } } }
424
+ #{ wrap do |args| _render_diff end } }
424
425
  end
425
426
  end
426
427
 
@@ -15,6 +15,12 @@ format :html do
15
15
 
16
16
  view :core, :raw
17
17
 
18
+ view :content do |args|
19
+ wrap args.merge(:slot_class=>'card-content') do
20
+ CGI.escapeHTML render_raw
21
+ end
22
+ end
23
+
18
24
  def head_title
19
25
  title = root.card && root.card.name
20
26
  title = nil if title.blank?
@@ -8,7 +8,7 @@ format :html do
8
8
  end
9
9
 
10
10
  view :type_fieldset do |args|
11
- if cards.cards_of_type_exist?
11
+ if card.cards_of_type_exist?
12
12
  %{<div>Sorry, this card must remain a Cardtype so long as there are <strong>#{ card.name }</strong> cards.</div>}
13
13
  else
14
14
  _final_type_fieldset args
@@ -123,6 +123,29 @@ end
123
123
 
124
124
 
125
125
 
126
+ format :css do
127
+ view :titled do |args|
128
+ %(#{major_comment "STYLE GROUP: \"#{card.name}\"", '='}#{ _render_core })
129
+ end
130
+
131
+ view :content, :core
132
+
133
+ view :core do |args|
134
+ card.item_cards.map do |item|
135
+ process_inclusion item, :view=>(params[:item] || :content)
136
+ end.join "\n\n"
137
+ end
138
+ end
139
+
140
+ format :data do
141
+ view :core do |args|
142
+ card.item_cards.map do |c|
143
+ process_inclusion c
144
+ end
145
+ end
146
+ end
147
+
148
+
126
149
  def item_cards args={}
127
150
  if args[:complete]
128
151
  #warn "item_card[#{args.inspect}], :complete"
@@ -206,14 +229,3 @@ def options
206
229
  end
207
230
 
208
231
 
209
- format :css do
210
- view :content do |args|
211
- %(#{major_comment "STYLE GROUP: \"#{card.name}\"", '='}#{ _render_core })
212
- end
213
-
214
- view :core do |args|
215
- card.item_cards.map do |item|
216
- process_inclusion item, :view=>(params[:item] || :content)
217
- end.join "\n\n"
218
- end
219
- end
@@ -7,6 +7,7 @@ format :html do
7
7
  view :editor, :type=>:plain_text
8
8
 
9
9
  view :core do |args|
10
+ #fixme - shouldn't we just render SCSS?
10
11
  css = compile_scss _render_raw
11
12
  highlighted_css = ::CodeRay.scan( css, :css ).div
12
13
  process_content highlighted_css
@@ -125,8 +125,6 @@ end
125
125
  format :data do
126
126
 
127
127
  view :card_list do |args|
128
- inclusion_defaults[:view] = args[:view] || :atom
129
-
130
128
  search_vars[:results].map do |c|
131
129
  process_inclusion c
132
130
  end
@@ -12,10 +12,9 @@ format :html do
12
12
  :optional_help=>:show,
13
13
  :optional_menu=>:never
14
14
  )
15
-
15
+ args[:hidden].merge! :card => { :type_id => card.type_id }
16
16
  frame_and_form :create, args do
17
17
  %{
18
- #{ form.hidden_field :type_id }
19
18
  #{ _render_name_fieldset :help=>'usually first and last name' }
20
19
  #{ _render_email_fieldset }
21
20
  #{ _render_invitation_field }
@@ -0,0 +1,107 @@
1
+ /*!
2
+ * jQuery JavaScript Library v1.10.0
3
+ * http://jquery.com/
4
+ *
5
+ * Includes Sizzle.js
6
+ * http://sizzlejs.com/
7
+ *
8
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
9
+ * Released under the MIT license
10
+ * http://jquery.org/license
11
+ *
12
+ * Date: 2013-05-24T18:39Z
13
+ */
14
+ !function(e,t){function i(e){var t=e.length,i=ut.type(e);return ut.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===i||"function"!==i&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function n(e){var t=Tt[e]={};return ut.each(e.match(ht)||[],function(e,i){t[i]=!0}),t}function o(e,i,n,o){if(ut.acceptData(e)){var r,s,a=ut.expando,l=e.nodeType,c=l?ut.cache:e,u=l?e[a]:e[a]&&a;if(u&&c[u]&&(o||c[u].data)||n!==t||"string"!=typeof i)return u||(u=l?e[a]=tt.pop()||ut.guid++:a),c[u]||(c[u]=l?{}:{toJSON:ut.noop}),("object"==typeof i||"function"==typeof i)&&(o?c[u]=ut.extend(c[u],i):c[u].data=ut.extend(c[u].data,i)),s=c[u],o||(s.data||(s.data={}),s=s.data),n!==t&&(s[ut.camelCase(i)]=n),"string"==typeof i?(r=s[i],null==r&&(r=s[ut.camelCase(i)])):r=s,r}}function r(e,t,i){if(ut.acceptData(e)){var n,o,r=e.nodeType,s=r?ut.cache:e,l=r?e[ut.expando]:ut.expando;if(s[l]){if(t&&(n=i?s[l]:s[l].data)){ut.isArray(t)?t=t.concat(ut.map(t,ut.camelCase)):t in n?t=[t]:(t=ut.camelCase(t),t=t in n?[t]:t.split(" ")),o=t.length;for(;o--;)delete n[t[o]];if(i?!a(n):!ut.isEmptyObject(n))return}(i||(delete s[l].data,a(s[l])))&&(r?ut.cleanData([e],!0):ut.support.deleteExpando||s!=s.window?delete s[l]:s[l]=null)}}}function s(e,i,n){if(n===t&&1===e.nodeType){var o="data-"+i.replace(St,"-$1").toLowerCase();if(n=e.getAttribute(o),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Dt.test(n)?ut.parseJSON(n):n}catch(r){}ut.data(e,i,n)}else n=t}return n}function a(e){var t;for(t in e)if(("data"!==t||!ut.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function l(){return!0}function c(){return!1}function u(){try{return G.activeElement}catch(e){}}function d(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function h(e,t,i){if(ut.isFunction(t))return ut.grep(e,function(e,n){return!!t.call(e,n,e)!==i});if(t.nodeType)return ut.grep(e,function(e){return e===t!==i});if("string"==typeof t){if(qt.test(t))return ut.filter(t,e,i);t=ut.filter(t,e)}return ut.grep(e,function(e){return ut.inArray(e,t)>=0!==i})}function p(e){var t=Vt.split("|"),i=e.createDocumentFragment();if(i.createElement)for(;t.length;)i.createElement(t.pop());return i}function f(e,t){return ut.nodeName(e,"table")&&ut.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function m(e){return e.type=(null!==ut.find.attr(e,"type"))+"/"+e.type,e}function g(e){var t=oi.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function v(e,t){for(var i,n=0;null!=(i=e[n]);n++)ut._data(i,"globalEval",!t||ut._data(t[n],"globalEval"))}function b(e,t){if(1===t.nodeType&&ut.hasData(e)){var i,n,o,r=ut._data(e),s=ut._data(t,r),a=r.events;if(a){delete s.handle,s.events={};for(i in a)for(n=0,o=a[i].length;o>n;n++)ut.event.add(t,i,a[i][n])}s.data&&(s.data=ut.extend({},s.data))}}function y(e,t){var i,n,o;if(1===t.nodeType){if(i=t.nodeName.toLowerCase(),!ut.support.noCloneEvent&&t[ut.expando]){o=ut._data(t);for(n in o.events)ut.removeEvent(t,n,o.handle);t.removeAttribute(ut.expando)}"script"===i&&t.text!==e.text?(m(t).text=e.text,g(t)):"object"===i?(t.parentNode&&(t.outerHTML=e.outerHTML),ut.support.html5Clone&&e.innerHTML&&!ut.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===i&&ti.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===i?t.defaultSelected=t.selected=e.defaultSelected:("input"===i||"textarea"===i)&&(t.defaultValue=e.defaultValue)}}function _(e,i){var n,o,r=0,s=typeof e.getElementsByTagName!==Y?e.getElementsByTagName(i||"*"):typeof e.querySelectorAll!==Y?e.querySelectorAll(i||"*"):t;if(!s)for(s=[],n=e.childNodes||e;null!=(o=n[r]);r++)!i||ut.nodeName(o,i)?s.push(o):ut.merge(s,_(o,i));return i===t||i&&ut.nodeName(e,i)?ut.merge([e],s):s}function C(e){ti.test(e.type)&&(e.defaultChecked=e.checked)}function x(e,t){if(t in e)return t;for(var i=t.charAt(0).toUpperCase()+t.slice(1),n=t,o=ki.length;o--;)if(t=ki[o]+i,t in e)return t;return n}function w(e,t){return e=t||e,"none"===ut.css(e,"display")||!ut.contains(e.ownerDocument,e)}function k(e,t){for(var i,n,o,r=[],s=0,a=e.length;a>s;s++)n=e[s],n.style&&(r[s]=ut._data(n,"olddisplay"),i=n.style.display,t?(r[s]||"none"!==i||(n.style.display=""),""===n.style.display&&w(n)&&(r[s]=ut._data(n,"olddisplay",E(n.nodeName)))):r[s]||(o=w(n),(i&&"none"!==i||!o)&&ut._data(n,"olddisplay",o?i:ut.css(n,"display"))));for(s=0;a>s;s++)n=e[s],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[s]||"":"none"));return e}function T(e,t,i){var n=vi.exec(t);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):t}function D(e,t,i,n,o){for(var r=i===(n?"border":"content")?4:"width"===t?1:0,s=0;4>r;r+=2)"margin"===i&&(s+=ut.css(e,i+wi[r],!0,o)),n?("content"===i&&(s-=ut.css(e,"padding"+wi[r],!0,o)),"margin"!==i&&(s-=ut.css(e,"border"+wi[r]+"Width",!0,o))):(s+=ut.css(e,"padding"+wi[r],!0,o),"padding"!==i&&(s+=ut.css(e,"border"+wi[r]+"Width",!0,o)));return s}function S(e,t,i){var n=!0,o="width"===t?e.offsetWidth:e.offsetHeight,r=ui(e),s=ut.support.boxSizing&&"border-box"===ut.css(e,"boxSizing",!1,r);if(0>=o||null==o){if(o=di(e,t,r),(0>o||null==o)&&(o=e.style[t]),bi.test(o))return o;n=s&&(ut.support.boxSizingReliable||o===e.style[t]),o=parseFloat(o)||0}return o+D(e,t,i||(s?"border":"content"),n,r)+"px"}function E(e){var t=G,i=_i[e];return i||(i=N(e,t),"none"!==i&&i||(ci=(ci||ut("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(ci[0].contentWindow||ci[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),i=N(e,t),ci.detach()),_i[e]=i),i}function N(e,t){var i=ut(t.createElement(e)).appendTo(t.body),n=ut.css(i[0],"display");return i.remove(),n}function A(e,t,i,n){var o;if(ut.isArray(t))ut.each(t,function(t,o){i||Di.test(e)?n(e,o):A(e+"["+("object"==typeof o?t:"")+"]",o,i,n)});else if(i||"object"!==ut.type(t))n(e,t);else for(o in t)A(e+"["+o+"]",t[o],i,n)}function P(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,o=0,r=t.toLowerCase().match(ht)||[];if(ut.isFunction(i))for(;n=r[o++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function M(e,t,i,n){function o(a){var l;return r[a]=!0,ut.each(e[a]||[],function(e,a){var c=a(t,i,n);return"string"!=typeof c||s||r[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),l}var r={},s=e===Wi;return o(t.dataTypes[0])||!r["*"]&&o("*")}function I(e,i){var n,o,r=ut.ajaxSettings.flatOptions||{};for(o in i)i[o]!==t&&((r[o]?e:n||(n={}))[o]=i[o]);return n&&ut.extend(!0,e,n),e}function H(e,i,n){for(var o,r,s,a,l=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),r===t&&(r=e.mimeType||i.getResponseHeader("Content-Type"));if(r)for(a in l)if(l[a]&&l[a].test(r)){c.unshift(a);break}if(c[0]in n)s=c[0];else{for(a in n){if(!c[0]||e.converters[a+" "+c[0]]){s=a;break}o||(o=a)}s=s||o}return s?(s!==c[0]&&c.unshift(s),n[s]):void 0}function B(e,t,i,n){var o,r,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(r=u.shift();r;)if(e.responseFields[r]&&(i[e.responseFields[r]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(s=c[l+" "+r]||c["* "+r],!s)for(o in c)if(a=o.split(" "),a[1]===r&&(s=c[l+" "+a[0]]||c["* "+a[0]])){s===!0?s=c[o]:c[o]!==!0&&(r=a[0],u.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(d){return{state:"parsererror",error:s?d:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}function R(){try{return new e.XMLHttpRequest}catch(t){}}function O(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function L(){return setTimeout(function(){Zi=t}),Zi=ut.now()}function j(e,t,i){for(var n,o=(rn[t]||[]).concat(rn["*"]),r=0,s=o.length;s>r;r++)if(n=o[r].call(i,t,e))return n}function F(e,t,i){var n,o,r=0,s=on.length,a=ut.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=Zi||L(),i=Math.max(0,c.startTime+c.duration-t),n=i/c.duration||0,r=1-n,s=0,l=c.tweens.length;l>s;s++)c.tweens[s].run(r);return a.notifyWith(e,[c,r,i]),1>r&&l?i:(a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:ut.extend({},t),opts:ut.extend(!0,{specialEasing:{}},i),originalProperties:t,originalOptions:i,startTime:Zi||L(),duration:i.duration,tweens:[],createTween:function(t,i){var n=ut.Tween(e,c.opts,t,i,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(n),n},stop:function(t){var i=0,n=t?c.tweens.length:0;if(o)return this;for(o=!0;n>i;i++)c.tweens[i].run(1);return t?a.resolveWith(e,[c,t]):a.rejectWith(e,[c,t]),this}}),u=c.props;for(z(u,c.opts.specialEasing);s>r;r++)if(n=on[r].call(c,e,u,c.opts))return n;return ut.map(u,j,c),ut.isFunction(c.opts.start)&&c.opts.start.call(e,c),ut.fx.timer(ut.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function z(e,t){var i,n,o,r,s;for(i in e)if(n=ut.camelCase(i),o=t[n],r=e[i],ut.isArray(r)&&(o=r[1],r=e[i]=r[0]),i!==n&&(e[n]=r,delete e[i]),s=ut.cssHooks[n],s&&"expand"in s){r=s.expand(r),delete e[n];for(i in r)i in e||(e[i]=r[i],t[i]=o)}else t[n]=o}function q(e,t,i){var n,o,r,s,a,l,c=this,u={},d=e.style,h=e.nodeType&&w(e),p=ut._data(e,"fxshow");i.queue||(a=ut._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,ut.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(i.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===ut.css(e,"display")&&"none"===ut.css(e,"float")&&(ut.support.inlineBlockNeedsLayout&&"inline"!==E(e.nodeName)?d.zoom=1:d.display="inline-block")),i.overflow&&(d.overflow="hidden",ut.support.shrinkWrapBlocks||c.always(function(){d.overflow=i.overflow[0],d.overflowX=i.overflow[1],d.overflowY=i.overflow[2]}));for(n in t)if(o=t[n],en.exec(o)){if(delete t[n],r=r||"toggle"===o,o===(h?"hide":"show"))continue;u[n]=p&&p[n]||ut.style(e,n)}if(!ut.isEmptyObject(u)){p?"hidden"in p&&(h=p.hidden):p=ut._data(e,"fxshow",{}),r&&(p.hidden=!h),h?ut(e).show():c.done(function(){ut(e).hide()}),c.done(function(){var t;ut._removeData(e,"fxshow");for(t in u)ut.style(e,t,u[t])});for(n in u)s=j(h?p[n]:0,n,c),n in p||(p[n]=s.start,h&&(s.end=s.start,s.start="width"===n||"height"===n?1:0))}}function W(e,t,i,n,o){return new W.prototype.init(e,t,i,n,o)}function U(e,t){var i,n={height:e},o=0;for(t=t?1:0;4>o;o+=2-t)i=wi[o],n["margin"+i]=n["padding"+i]=e;return t&&(n.opacity=n.width=e),n}function $(e){return ut.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var V,K,Y=typeof t,X=e.location,G=e.document,Q=G.documentElement,Z=e.jQuery,J=e.$,et={},tt=[],it="1.10.0",nt=tt.concat,ot=tt.push,rt=tt.slice,st=tt.indexOf,at=et.toString,lt=et.hasOwnProperty,ct=it.trim,ut=function(e,t){return new ut.fn.init(e,t,K)},dt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ht=/\S+/g,pt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ft=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,mt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,gt=/^[\],:{}\s]*$/,vt=/(?:^|:|,)(?:\s*\[)+/g,bt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,yt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,_t=/^-ms-/,Ct=/-([\da-z])/gi,xt=function(e,t){return t.toUpperCase()},wt=function(e){(G.addEventListener||"load"===e.type||"complete"===G.readyState)&&(kt(),ut.ready())},kt=function(){G.addEventListener?(G.removeEventListener("DOMContentLoaded",wt,!1),e.removeEventListener("load",wt,!1)):(G.detachEvent("onreadystatechange",wt),e.detachEvent("onload",wt))};ut.fn=ut.prototype={jquery:it,constructor:ut,init:function(e,i,n){var o,r;if(!e)return this;if("string"==typeof e){if(o="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ft.exec(e),!o||!o[1]&&i)return!i||i.jquery?(i||n).find(e):this.constructor(i).find(e);if(o[1]){if(i=i instanceof ut?i[0]:i,ut.merge(this,ut.parseHTML(o[1],i&&i.nodeType?i.ownerDocument||i:G,!0)),mt.test(o[1])&&ut.isPlainObject(i))for(o in i)ut.isFunction(this[o])?this[o](i[o]):this.attr(o,i[o]);return this}if(r=G.getElementById(o[2]),r&&r.parentNode){if(r.id!==o[2])return n.find(e);this.length=1,this[0]=r}return this.context=G,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ut.isFunction(e)?n.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),ut.makeArray(e,this))},selector:"",length:0,toArray:function(){return rt.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=ut.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ut.each(this,e,t)},ready:function(e){return ut.ready.promise().done(e),this},slice:function(){return this.pushStack(rt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,i=+e+(0>e?t:0);return this.pushStack(i>=0&&t>i?[this[i]]:[])},map:function(e){return this.pushStack(ut.map(this,function(t,i){return e.call(t,i,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:ot,sort:[].sort,splice:[].splice},ut.fn.init.prototype=ut.fn,ut.extend=ut.fn.extend=function(){var e,i,n,o,r,s,a=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[1]||{},l=2),"object"==typeof a||ut.isFunction(a)||(a={}),c===l&&(a=this,--l);c>l;l++)if(null!=(r=arguments[l]))for(o in r)e=a[o],n=r[o],a!==n&&(u&&n&&(ut.isPlainObject(n)||(i=ut.isArray(n)))?(i?(i=!1,s=e&&ut.isArray(e)?e:[]):s=e&&ut.isPlainObject(e)?e:{},a[o]=ut.extend(u,s,n)):n!==t&&(a[o]=n));return a},ut.extend({expando:"jQuery"+(it+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===ut&&(e.$=J),t&&e.jQuery===ut&&(e.jQuery=Z),ut},isReady:!1,readyWait:1,holdReady:function(e){e?ut.readyWait++:ut.ready(!0)},ready:function(e){if(e===!0?!--ut.readyWait:!ut.isReady){if(!G.body)return setTimeout(ut.ready);ut.isReady=!0,e!==!0&&--ut.readyWait>0||(V.resolveWith(G,[ut]),ut.fn.trigger&&ut(G).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===ut.type(e)},isArray:Array.isArray||function(e){return"array"===ut.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?et[at.call(e)]||"object":typeof e},isPlainObject:function(e){var i;if(!e||"object"!==ut.type(e)||e.nodeType||ut.isWindow(e))return!1;try{if(e.constructor&&!lt.call(e,"constructor")&&!lt.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(ut.support.ownLast)for(i in e)return lt.call(e,i);for(i in e);return i===t||lt.call(e,i)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,i){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(i=t,t=!1),t=t||G;var n=mt.exec(e),o=!i&&[];return n?[t.createElement(n[1])]:(n=ut.buildFragment([e],t,o),o&&ut(o).remove(),ut.merge([],n.childNodes))},parseJSON:function(t){return e.JSON&&e.JSON.parse?e.JSON.parse(t):null===t?t:"string"==typeof t&&(t=ut.trim(t),t&&gt.test(t.replace(bt,"@").replace(yt,"]").replace(vt,"")))?new Function("return "+t)():(ut.error("Invalid JSON: "+t),void 0)},parseXML:function(i){var n,o;if(!i||"string"!=typeof i)return null;try{e.DOMParser?(o=new DOMParser,n=o.parseFromString(i,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(i))}catch(r){n=t}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ut.error("Invalid XML: "+i),n},noop:function(){},globalEval:function(t){t&&ut.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(_t,"ms-").replace(Ct,xt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var o,r=0,s=e.length,a=i(e);if(n){if(a)for(;s>r&&(o=t.apply(e[r],n),o!==!1);r++);else for(r in e)if(o=t.apply(e[r],n),o===!1)break}else if(a)for(;s>r&&(o=t.call(e[r],r,e[r]),o!==!1);r++);else for(r in e)if(o=t.call(e[r],r,e[r]),o===!1)break;return e},trim:ct&&!ct.call(" ")?function(e){return null==e?"":ct.call(e)}:function(e){return null==e?"":(e+"").replace(pt,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?ut.merge(n,"string"==typeof e?[e]:e):ot.call(n,e)),n},inArray:function(e,t,i){var n;if(t){if(st)return st.call(t,e,i);for(n=t.length,i=i?0>i?Math.max(0,n+i):i:0;n>i;i++)if(i in t&&t[i]===e)return i}return-1},merge:function(e,i){var n=i.length,o=e.length,r=0;if("number"==typeof n)for(;n>r;r++)e[o++]=i[r];else for(;i[r]!==t;)e[o++]=i[r++];return e.length=o,e},grep:function(e,t,i){var n,o=[],r=0,s=e.length;for(i=!!i;s>r;r++)n=!!t(e[r],r),i!==n&&o.push(e[r]);return o},map:function(e,t,n){var o,r=0,s=e.length,a=i(e),l=[];if(a)for(;s>r;r++)o=t(e[r],r,n),null!=o&&(l[l.length]=o);else for(r in e)o=t(e[r],r,n),null!=o&&(l[l.length]=o);return nt.apply([],l)},guid:1,proxy:function(e,i){var n,o,r;return"string"==typeof i&&(r=e[i],i=e,e=r),ut.isFunction(e)?(n=rt.call(arguments,2),o=function(){return e.apply(i||this,n.concat(rt.call(arguments)))},o.guid=e.guid=e.guid||ut.guid++,o):t},access:function(e,i,n,o,r,s,a){var l=0,c=e.length,u=null==n;if("object"===ut.type(n)){r=!0;for(l in n)ut.access(e,i,l,n[l],!0,s,a)}else if(o!==t&&(r=!0,ut.isFunction(o)||(a=!0),u&&(a?(i.call(e,o),i=null):(u=i,i=function(e,t,i){return u.call(ut(e),i)})),i))for(;c>l;l++)i(e[l],n,a?o:o.call(e[l],l,i(e[l],n)));return r?e:u?i.call(e):c?i(e[0],n):s},now:function(){return(new Date).getTime()},swap:function(e,t,i,n){var o,r,s={};for(r in t)s[r]=e.style[r],e.style[r]=t[r];o=i.apply(e,n||[]);for(r in t)e.style[r]=s[r];return o}}),ut.ready.promise=function(t){if(!V)if(V=ut.Deferred(),"complete"===G.readyState)setTimeout(ut.ready);else if(G.addEventListener)G.addEventListener("DOMContentLoaded",wt,!1),e.addEventListener("load",wt,!1);else{G.attachEvent("onreadystatechange",wt),e.attachEvent("onload",wt);var i=!1;try{i=null==e.frameElement&&G.documentElement}catch(n){}i&&i.doScroll&&!function o(){if(!ut.isReady){try{i.doScroll("left")}catch(e){return setTimeout(o,50)}kt(),ut.ready()}}()}return V.promise(t)},ut.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){et["[object "+t+"]"]=t.toLowerCase()}),K=ut(G),/*!
15
+ * Sizzle CSS Selector Engine v1.9.4-pre
16
+ * http://sizzlejs.com/
17
+ *
18
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
19
+ * Released under the MIT license
20
+ * http://jquery.org/license
21
+ *
22
+ * Date: 2013-05-15
23
+ */
24
+ function(e,t){function i(e,t,i,n){var o,r,s,a,l,c,u,d,h,p;if((t?t.ownerDocument||t:U)!==R&&B(t),t=t||R,i=i||[],!e||"string"!=typeof e)return i;if(1!==(a=t.nodeType)&&9!==a)return[];if(L&&!n){if(o=wt.exec(e))if(s=o[1]){if(9===a){if(r=t.getElementById(s),!r||!r.parentNode)return i;if(r.id===s)return i.push(r),i}else if(t.ownerDocument&&(r=t.ownerDocument.getElementById(s))&&q(t,r)&&r.id===s)return i.push(r),i}else{if(o[2])return ot.apply(i,t.getElementsByTagName(e)),i;if((s=o[3])&&S.getElementsByClassName&&t.getElementsByClassName)return ot.apply(i,t.getElementsByClassName(s)),i}if(S.qsa&&(!j||!j.test(e))){if(d=u=W,h=t,p=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(c=m(e),(u=t.getAttribute("id"))?d=u.replace(Dt,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",l=c.length;l--;)c[l]=d+g(c[l]);h=vt.test(e)&&t.parentNode||t,p=c.join(",")}if(p)try{return ot.apply(i,h.querySelectorAll(p)),i}catch(f){}finally{u||t.removeAttribute("id")}}}return k(e.replace(ft,"$1"),t,i,n)}function n(e){return xt.test(e+"")}function o(){function e(i,n){return t.push(i+=" ")>N.cacheLength&&delete e[t.shift()],e[i]=n}var t=[];return e}function r(e){return e[W]=!0,e}function s(e){var t=R.createElement("div");try{return!!e(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t,i){e=e.split("|");for(var n,o=e.length,r=i?null:t;o--;)(n=N.attrHandle[e[o]])&&n!==t||(N.attrHandle[e[o]]=r)}function l(e,t){var i=e.getAttributeNode(t);return i&&i.specified?i.value:e[t]===!0?t.toLowerCase():null}function c(e,t){return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}function u(e){return"input"===e.nodeName.toLowerCase()?e.defaultValue:void 0}function d(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||J)-(~e.sourceIndex||J);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function h(e){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===e}}function p(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function f(e){return r(function(t){return t=+t,r(function(i,n){for(var o,r=e([],i.length,t),s=r.length;s--;)i[o=r[s]]&&(i[o]=!(n[o]=i[o]))})})}function m(e,t){var n,o,r,s,a,l,c,u=Y[e+" "];if(u)return t?0:u.slice(0);for(a=e,l=[],c=N.preFilter;a;){(!n||(o=mt.exec(a)))&&(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),n=!1,(o=gt.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(ft," ")}),a=a.slice(n.length));for(s in N.filter)!(o=Ct[s].exec(a))||c[s]&&!(o=c[s](o))||(n=o.shift(),r.push({value:n,type:s,matches:o}),a=a.slice(n.length));if(!n)break}return t?a.length:a?i.error(e):Y(e,l).slice(0)}function g(e){for(var t=0,i=e.length,n="";i>t;t++)n+=e[t].value;return n}function v(e,t,i){var n=t.dir,o=i&&"parentNode"===n,r=V++;return t.first?function(t,i,r){for(;t=t[n];)if(1===t.nodeType||o)return e(t,i,r)}:function(t,i,s){var a,l,c,u=$+" "+r;if(s){for(;t=t[n];)if((1===t.nodeType||o)&&e(t,i,s))return!0}else for(;t=t[n];)if(1===t.nodeType||o)if(c=t[W]||(t[W]={}),(l=c[n])&&l[0]===u){if((a=l[1])===!0||a===E)return a===!0}else if(l=c[n]=[u],l[1]=e(t,i,s)||E,l[1]===!0)return!0}}function b(e){return e.length>1?function(t,i,n){for(var o=e.length;o--;)if(!e[o](t,i,n))return!1;return!0}:e[0]}function y(e,t,i,n,o){for(var r,s=[],a=0,l=e.length,c=null!=t;l>a;a++)(r=e[a])&&(!i||i(r,n,o))&&(s.push(r),c&&t.push(a));return s}function _(e,t,i,n,o,s){return n&&!n[W]&&(n=_(n)),o&&!o[W]&&(o=_(o,s)),r(function(r,s,a,l){var c,u,d,h=[],p=[],f=s.length,m=r||w(t||"*",a.nodeType?[a]:a,[]),g=!e||!r&&t?m:y(m,h,e,a,l),v=i?o||(r?e:f||n)?[]:s:g;if(i&&i(g,v,a,l),n)for(c=y(v,p),n(c,[],a,l),u=c.length;u--;)(d=c[u])&&(v[p[u]]=!(g[p[u]]=d));if(r){if(o||e){if(o){for(c=[],u=v.length;u--;)(d=v[u])&&c.push(g[u]=d);o(null,v=[],c,l)}for(u=v.length;u--;)(d=v[u])&&(c=o?st.call(r,d):h[u])>-1&&(r[c]=!(s[c]=d))}}else v=y(v===s?v.splice(f,v.length):v),o?o(null,s,v,l):ot.apply(s,v)})}function C(e){for(var t,i,n,o=e.length,r=N.relative[e[0].type],s=r||N.relative[" "],a=r?1:0,l=v(function(e){return e===t},s,!0),c=v(function(e){return st.call(t,e)>-1},s,!0),u=[function(e,i,n){return!r&&(n||i!==I)||((t=i).nodeType?l(e,i,n):c(e,i,n))}];o>a;a++)if(i=N.relative[e[a].type])u=[v(b(u),i)];else{if(i=N.filter[e[a].type].apply(null,e[a].matches),i[W]){for(n=++a;o>n&&!N.relative[e[n].type];n++);return _(a>1&&b(u),a>1&&g(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ft,"$1"),i,n>a&&C(e.slice(a,n)),o>n&&C(e=e.slice(n)),o>n&&g(e))}u.push(i)}return b(u)}function x(e,t){var n=0,o=t.length>0,s=e.length>0,a=function(r,a,l,c,u){var d,h,p,f=[],m=0,g="0",v=r&&[],b=null!=u,_=I,C=r||s&&N.find.TAG("*",u&&a.parentNode||a),x=$+=null==_?1:Math.random()||.1;for(b&&(I=a!==R&&a,E=n);null!=(d=C[g]);g++){if(s&&d){for(h=0;p=e[h++];)if(p(d,a,l)){c.push(d);break}b&&($=x,E=++n)}o&&((d=!p&&d)&&m--,r&&v.push(d))}if(m+=g,o&&g!==m){for(h=0;p=t[h++];)p(v,f,a,l);if(r){if(m>0)for(;g--;)v[g]||f[g]||(f[g]=it.call(c));f=y(f)}ot.apply(c,f),b&&!r&&f.length>0&&m+t.length>1&&i.uniqueSort(c)}return b&&($=x,I=_),v};return o?r(a):a}function w(e,t,n){for(var o=0,r=t.length;r>o;o++)i(e,t[o],n);return n}function k(e,t,i,n){var o,r,s,a,l,c=m(e);if(!n&&1===c.length){if(r=c[0]=c[0].slice(0),r.length>2&&"ID"===(s=r[0]).type&&S.getById&&9===t.nodeType&&L&&N.relative[r[1].type]){if(t=(N.find.ID(s.matches[0].replace(St,Et),t)||[])[0],!t)return i;e=e.slice(r.shift().value.length)}for(o=Ct.needsContext.test(e)?0:r.length;o--&&(s=r[o],!N.relative[a=s.type]);)if((l=N.find[a])&&(n=l(s.matches[0].replace(St,Et),vt.test(r[0].type)&&t.parentNode||t))){if(r.splice(o,1),e=n.length&&g(r),!e)return ot.apply(i,n),i;break}}return M(e,c)(n,t,!L,i,vt.test(e)),i}function T(){}var D,S,E,N,A,P,M,I,H,B,R,O,L,j,F,z,q,W="sizzle"+-new Date,U=e.document,$=0,V=0,K=o(),Y=o(),X=o(),G=!1,Q=function(){return 0},Z=typeof t,J=1<<31,et={}.hasOwnProperty,tt=[],it=tt.pop,nt=tt.push,ot=tt.push,rt=tt.slice,st=tt.indexOf||function(e){for(var t=0,i=this.length;i>t;t++)if(this[t]===e)return t;return-1},at="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",lt="[\\x20\\t\\r\\n\\f]",ct="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",dt=ct.replace("w","w#"),ht="\\["+lt+"*("+ct+")"+lt+"*(?:([*^$|!~]?=)"+lt+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+dt+")|)|)"+lt+"*\\]",pt=":("+ct+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+ht.replace(3,8)+")*)|.*)\\)|)",ft=new RegExp("^"+lt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+lt+"+$","g"),mt=new RegExp("^"+lt+"*,"+lt+"*"),gt=new RegExp("^"+lt+"*([>+~]|"+lt+")"+lt+"*"),vt=new RegExp(lt+"*[+~]"),bt=new RegExp("="+lt+"*([^\\]'\"]*)"+lt+"*\\]","g"),yt=new RegExp(pt),_t=new RegExp("^"+dt+"$"),Ct={ID:new RegExp("^#("+ct+")"),CLASS:new RegExp("^\\.("+ct+")"),TAG:new RegExp("^("+ct.replace("w","w*")+")"),ATTR:new RegExp("^"+ht),PSEUDO:new RegExp("^"+pt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+lt+"*(even|odd|(([+-]|)(\\d*)n|)"+lt+"*(?:([+-]|)"+lt+"*(\\d+)|))"+lt+"*\\)|)","i"),bool:new RegExp("^(?:"+at+")$","i"),needsContext:new RegExp("^"+lt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+lt+"*((?:-\\d)?\\d*)"+lt+"*\\)|)(?=[^-]|$)","i")},xt=/^[^{]+\{\s*\[native \w/,wt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,kt=/^(?:input|select|textarea|button)$/i,Tt=/^h\d$/i,Dt=/'|\\/g,St=new RegExp("\\\\([\\da-f]{1,6}"+lt+"?|("+lt+")|.)","ig"),Et=function(e,t,i){var n="0x"+t-65536;return n!==n||i?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{ot.apply(tt=rt.call(U.childNodes),U.childNodes),tt[U.childNodes.length].nodeType}catch(Nt){ot={apply:tt.length?function(e,t){nt.apply(e,rt.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}P=i.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},S=i.support={},B=i.setDocument=function(e){var t=e?e.ownerDocument||e:U;return t!==R&&9===t.nodeType&&t.documentElement?(R=t,O=t.documentElement,L=!P(t),S.attributes=s(function(e){return e.innerHTML="<a href='#'></a>",a("type|href|height|width",c,"#"===e.firstChild.getAttribute("href")),a(at,l,null==e.getAttribute("disabled")),e.className="i",!e.getAttribute("className")}),S.input=s(function(e){return e.innerHTML="<input>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}),a("value",u,S.attributes&&S.input),S.getElementsByTagName=s(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),S.getElementsByClassName=s(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),S.getById=s(function(e){return O.appendChild(e).id=W,!t.getElementsByName||!t.getElementsByName(W).length}),S.getById?(N.find.ID=function(e,t){if(typeof t.getElementById!==Z&&L){var i=t.getElementById(e);return i&&i.parentNode?[i]:[]}},N.filter.ID=function(e){var t=e.replace(St,Et);return function(e){return e.getAttribute("id")===t}}):(delete N.find.ID,N.filter.ID=function(e){var t=e.replace(St,Et);return function(e){var i=typeof e.getAttributeNode!==Z&&e.getAttributeNode("id");return i&&i.value===t}}),N.find.TAG=S.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Z?t.getElementsByTagName(e):void 0}:function(e,t){var i,n=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;i=r[o++];)1===i.nodeType&&n.push(i);return n}return r},N.find.CLASS=S.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==Z&&L?t.getElementsByClassName(e):void 0},F=[],j=[],(S.qsa=n(t.querySelectorAll))&&(s(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||j.push("\\["+lt+"*(?:value|"+at+")"),e.querySelectorAll(":checked").length||j.push(":checked")}),s(function(e){var i=t.createElement("input");i.setAttribute("type","hidden"),e.appendChild(i).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&j.push("[*^$]="+lt+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||j.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),j.push(",.*:")})),(S.matchesSelector=n(z=O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&s(function(e){S.disconnectedMatch=z.call(e,"div"),z.call(e,"[s!='']:x"),F.push("!=",pt)}),j=j.length&&new RegExp(j.join("|")),F=F.length&&new RegExp(F.join("|")),q=n(O.contains)||O.compareDocumentPosition?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S.sortDetached=s(function(e){return 1&e.compareDocumentPosition(t.createElement("div"))}),Q=O.compareDocumentPosition?function(e,i){if(e===i)return G=!0,0;var n=i.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(i);return n?1&n||!S.sortDetached&&i.compareDocumentPosition(e)===n?e===t||q(U,e)?-1:i===t||q(U,i)?1:H?st.call(H,e)-st.call(H,i):0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,i){var n,o=0,r=e.parentNode,s=i.parentNode,a=[e],l=[i];if(e===i)return G=!0,0;if(!r||!s)return e===t?-1:i===t?1:r?-1:s?1:H?st.call(H,e)-st.call(H,i):0;if(r===s)return d(e,i);for(n=e;n=n.parentNode;)a.unshift(n);for(n=i;n=n.parentNode;)l.unshift(n);for(;a[o]===l[o];)o++;return o?d(a[o],l[o]):a[o]===U?-1:l[o]===U?1:0},t):R},i.matches=function(e,t){return i(e,null,null,t)},i.matchesSelector=function(e,t){if((e.ownerDocument||e)!==R&&B(e),t=t.replace(bt,"='$1']"),!(!S.matchesSelector||!L||F&&F.test(t)||j&&j.test(t)))try{var n=z.call(e,t);if(n||S.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(o){}return i(t,R,null,[e]).length>0},i.contains=function(e,t){return(e.ownerDocument||e)!==R&&B(e),q(e,t)},i.attr=function(e,i){(e.ownerDocument||e)!==R&&B(e);var n=N.attrHandle[i.toLowerCase()],o=n&&et.call(N.attrHandle,i.toLowerCase())?n(e,i,!L):t;return o===t?S.attributes||!L?e.getAttribute(i):(o=e.getAttributeNode(i))&&o.specified?o.value:null:o},i.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},i.uniqueSort=function(e){var t,i=[],n=0,o=0;if(G=!S.detectDuplicates,H=!S.sortStable&&e.slice(0),e.sort(Q),G){for(;t=e[o++];)t===e[o]&&(n=i.push(o));for(;n--;)e.splice(i[n],1)}return e},A=i.getText=function(e){var t,i="",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=A(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n];n++)i+=A(t);return i},N=i.selectors={cacheLength:50,createPseudo:r,match:Ct,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(St,Et),e[3]=(e[4]||e[5]||"").replace(St,Et),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||i.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&i.error(e[0]),e},PSEUDO:function(e){var i,n=!e[5]&&e[2];return Ct.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:n&&yt.test(n)&&(i=m(n,!0))&&(i=n.indexOf(")",n.length-i)-n.length)&&(e[0]=e[0].slice(0,i),e[2]=n.slice(0,i)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(St,Et).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=K[e+" "];return t||(t=new RegExp("(^|"+lt+")"+e+"("+lt+"|$)"))&&K(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Z&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(o){var r=i.attr(o,e);return null==r?"!="===t:t?(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r+" ").indexOf(n)>-1:"|="===t?r===n||r.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,i,n,o){var r="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===o?function(e){return!!e.parentNode}:function(t,i,l){var c,u,d,h,p,f,m=r!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),b=!l&&!a;if(g){if(r){for(;m;){for(d=t;d=d[m];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&b){for(u=g[W]||(g[W]={}),c=u[e]||[],p=c[0]===$&&c[1],h=c[0]===$&&c[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(h=p=0)||f.pop();)if(1===d.nodeType&&++h&&d===t){u[e]=[$,p,h];break}}else if(b&&(c=(t[W]||(t[W]={}))[e])&&c[0]===$)h=c[1];else for(;(d=++p&&d&&d[m]||(h=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++h||(b&&((d[W]||(d[W]={}))[e]=[$,h]),d!==t)););return h-=o,h===n||h%n===0&&h/n>=0}}},PSEUDO:function(e,t){var n,o=N.pseudos[e]||N.setFilters[e.toLowerCase()]||i.error("unsupported pseudo: "+e);return o[W]?o(t):o.length>1?(n=[e,e,"",t],N.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,i){for(var n,r=o(e,t),s=r.length;s--;)n=st.call(e,r[s]),e[n]=!(i[n]=r[s])}):function(e){return o(e,0,n)}):o}},pseudos:{not:r(function(e){var t=[],i=[],n=M(e.replace(ft,"$1"));return n[W]?r(function(e,t,i,o){for(var r,s=n(e,null,o,[]),a=e.length;a--;)(r=s[a])&&(e[a]=!(t[a]=r))}):function(e,o,r){return t[0]=e,n(t,null,r,i),!i.pop()}}),has:r(function(e){return function(t){return i(e,t).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||A(t)).indexOf(e)>-1}}),lang:r(function(e){return _t.test(e||"")||i.error("unsupported lang: "+e),e=e.replace(St,Et).toLowerCase(),function(t){var i;do if(i=L?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===e||0===i.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===O},focus:function(e){return e===R.activeElement&&(!R.hasFocus||R.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!N.pseudos.empty(e)},header:function(e){return Tt.test(e.nodeName)},input:function(e){return kt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:f(function(){return[0]}),last:f(function(e,t){return[t-1]}),eq:f(function(e,t,i){return[0>i?i+t:i]}),even:f(function(e,t){for(var i=0;t>i;i+=2)e.push(i);return e}),odd:f(function(e,t){for(var i=1;t>i;i+=2)e.push(i);return e}),lt:f(function(e,t,i){for(var n=0>i?i+t:i;--n>=0;)e.push(n);return e}),gt:f(function(e,t,i){for(var n=0>i?i+t:i;++n<t;)e.push(n);return e})}};for(D in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})N.pseudos[D]=h(D);for(D in{submit:!0,reset:!0})N.pseudos[D]=p(D);M=i.compile=function(e,t){var i,n=[],o=[],r=X[e+" "];if(!r){for(t||(t=m(e)),i=t.length;i--;)r=C(t[i]),r[W]?n.push(r):o.push(r);r=X(e,x(o,n))}return r},N.pseudos.nth=N.pseudos.eq,T.prototype=N.filters=N.pseudos,N.setFilters=new T,S.sortStable=W.split("").sort(Q).join("")===W,B(),[0,0].sort(Q),S.detectDuplicates=G,ut.find=i,ut.expr=i.selectors,ut.expr[":"]=ut.expr.pseudos,ut.unique=i.uniqueSort,ut.text=i.getText,ut.isXMLDoc=i.isXML,ut.contains=i.contains}(e);var Tt={};ut.Callbacks=function(e){e="string"==typeof e?Tt[e]||n(e):ut.extend({},e);var i,o,r,s,a,l,c=[],u=!e.once&&[],d=function(t){for(o=e.memory&&t,r=!0,a=l||0,l=0,s=c.length,i=!0;c&&s>a;a++)if(c[a].apply(t[0],t[1])===!1&&e.stopOnFalse){o=!1;break}i=!1,c&&(u?u.length&&d(u.shift()):o?c=[]:h.disable())},h={add:function(){if(c){var t=c.length;!function n(t){ut.each(t,function(t,i){var o=ut.type(i);"function"===o?e.unique&&h.has(i)||c.push(i):i&&i.length&&"string"!==o&&n(i)})}(arguments),i?s=c.length:o&&(l=t,d(o))}return this},remove:function(){return c&&ut.each(arguments,function(e,t){for(var n;(n=ut.inArray(t,c,n))>-1;)c.splice(n,1),i&&(s>=n&&s--,a>=n&&a--)}),this},has:function(e){return e?ut.inArray(e,c)>-1:!(!c||!c.length)},empty:function(){return c=[],s=0,this},disable:function(){return c=u=o=t,this},disabled:function(){return!c},lock:function(){return u=t,o||h.disable(),this},locked:function(){return!u},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!c||r&&!u||(i?u.push(t):d(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!r}};return h},ut.extend({Deferred:function(e){var t=[["resolve","done",ut.Callbacks("once memory"),"resolved"],["reject","fail",ut.Callbacks("once memory"),"rejected"],["notify","progress",ut.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ut.Deferred(function(i){ut.each(t,function(t,r){var s=r[0],a=ut.isFunction(e[t])&&e[t];o[r[1]](function(){var e=a&&a.apply(this,arguments);e&&ut.isFunction(e.promise)?e.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[s+"With"](this===n?i.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ut.extend(e,n):n}},o={};return n.pipe=n.then,ut.each(t,function(e,r){var s=r[2],a=r[3];n[r[1]]=s.add,a&&s.add(function(){i=a},t[1^e][2].disable,t[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?n:this,arguments),this},o[r[0]+"With"]=s.fireWith}),n.promise(o),e&&e.call(o,o),o},when:function(e){var t,i,n,o=0,r=rt.call(arguments),s=r.length,a=1!==s||e&&ut.isFunction(e.promise)?s:0,l=1===a?e:ut.Deferred(),c=function(e,i,n){return function(o){i[e]=this,n[e]=arguments.length>1?rt.call(arguments):o,n===t?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(s>1)for(t=new Array(s),i=new Array(s),n=new Array(s);s>o;o++)r[o]&&ut.isFunction(r[o].promise)?r[o].promise().done(c(o,n,r)).fail(l.reject).progress(c(o,i,t)):--a;return a||l.resolveWith(n,r),l.promise()}}),ut.support=function(t){var i,n,o,r,s,a,l,c,u,d=G.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=d.getElementsByTagName("*")||[],n=d.getElementsByTagName("a")[0],!n||!n.style||!i.length)return t;r=G.createElement("select"),a=r.appendChild(G.createElement("option")),o=d.getElementsByTagName("input")[0],n.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(n.getAttribute("style")),t.hrefNormalized="/a"===n.getAttribute("href"),t.opacity=/^0.5/.test(n.style.opacity),t.cssFloat=!!n.style.cssFloat,t.checkOn=!!o.value,t.optSelected=a.selected,t.enctype=!!G.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==G.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,r.disabled=!0,t.optDisabled=!a.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=G.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),s=G.createDocumentFragment(),s.appendChild(o),t.appendChecked=o.checked,t.checkClone=s.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(u in{submit:!0,change:!0,focusin:!0})d.setAttribute(l="on"+u,"t"),t[u+"Bubbles"]=l in e||d.attributes[l].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(u in ut(t))break;return t.ownLast="0"!==u,ut(function(){var i,n,o,r="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=G.getElementsByTagName("body")[0];s&&(i=G.createElement("div"),i.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(i).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=c&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",ut.swap(s,null!=s.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,n=d.appendChild(G.createElement("div")),n.style.cssText=d.style.cssText=r,n.style.marginRight=n.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(n,null)||{}).marginRight)),typeof d.style.zoom!==Y&&(d.innerHTML="",d.style.cssText=r+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(s.style.zoom=1)),s.removeChild(i),i=d=o=n=null)}),i=r=s=a=n=o=null,t}({});var Dt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,St=/([A-Z])/g;ut.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?ut.cache[e[ut.expando]]:e[ut.expando],!!e&&!a(e)},data:function(e,t,i){return o(e,t,i)},removeData:function(e,t){return r(e,t)},_data:function(e,t,i){return o(e,t,i,!0)},_removeData:function(e,t){return r(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&ut.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),ut.fn.extend({data:function(e,i){var n,o,r=null,a=0,l=this[0];if(e===t){if(this.length&&(r=ut.data(l),1===l.nodeType&&!ut._data(l,"parsedAttrs"))){for(n=l.attributes;a<n.length;a++)o=n[a].name,0===o.indexOf("data-")&&(o=ut.camelCase(o.slice(5)),s(l,o,r[o]));ut._data(l,"parsedAttrs",!0)}return r}return"object"==typeof e?this.each(function(){ut.data(this,e)}):arguments.length>1?this.each(function(){ut.data(this,e,i)}):l?s(l,e,ut.data(l,e)):null},removeData:function(e){return this.each(function(){ut.removeData(this,e)})}}),ut.extend({queue:function(e,t,i){var n;return e?(t=(t||"fx")+"queue",n=ut._data(e,t),i&&(!n||ut.isArray(i)?n=ut._data(e,t,ut.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(e,t){t=t||"fx";var i=ut.queue(e,t),n=i.length,o=i.shift(),r=ut._queueHooks(e,t),s=function(){ut.dequeue(e,t)};"inprogress"===o&&(o=i.shift(),n--),r.cur=o,o&&("fx"===t&&i.unshift("inprogress"),delete r.stop,o.call(e,s,r)),!n&&r&&r.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return ut._data(e,i)||ut._data(e,i,{empty:ut.Callbacks("once memory").add(function(){ut._removeData(e,t+"queue"),ut._removeData(e,i)})})}}),ut.fn.extend({queue:function(e,i){var n=2;return"string"!=typeof e&&(i=e,e="fx",n--),arguments.length<n?ut.queue(this[0],e):i===t?this:this.each(function(){var t=ut.queue(this,e,i);ut._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&ut.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ut.dequeue(this,e)})},delay:function(e,t){return e=ut.fx?ut.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,i){var n=setTimeout(t,e);i.stop=function(){clearTimeout(n)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,i){var n,o=1,r=ut.Deferred(),s=this,a=this.length,l=function(){--o||r.resolveWith(s,[s])};for("string"!=typeof e&&(i=e,e=t),e=e||"fx";a--;)n=ut._data(s[a],e+"queueHooks"),n&&n.empty&&(o++,n.empty.add(l));return l(),r.promise(i)}});var Et,Nt,At=/[\t\r\n\f]/g,Pt=/\r/g,Mt=/^(?:input|select|textarea|button|object)$/i,It=/^(?:a|area)$/i,Ht=/^(?:checked|selected)$/i,Bt=ut.support.getSetAttribute,Rt=ut.support.input;ut.fn.extend({attr:function(e,t){return ut.access(this,ut.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ut.removeAttr(this,e)})},prop:function(e,t){return ut.access(this,ut.prop,e,t,arguments.length>1)},removeProp:function(e){return e=ut.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(i){}})},addClass:function(e){var t,i,n,o,r,s=0,a=this.length,l="string"==typeof e&&e;if(ut.isFunction(e))return this.each(function(t){ut(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(ht)||[];a>s;s++)if(i=this[s],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(At," "):" ")){for(r=0;o=t[r++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");i.className=ut.trim(n)}return this},removeClass:function(e){var t,i,n,o,r,s=0,a=this.length,l=0===arguments.length||"string"==typeof e&&e;if(ut.isFunction(e))return this.each(function(t){ut(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(ht)||[];a>s;s++)if(i=this[s],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(At," "):"")){for(r=0;o=t[r++];)for(;n.indexOf(" "+o+" ")>=0;)n=n.replace(" "+o+" "," ");i.className=e?ut.trim(n):""}return this},toggleClass:function(e,t){var i=typeof e,n="boolean"==typeof t;return ut.isFunction(e)?this.each(function(i){ut(this).toggleClass(e.call(this,i,this.className,t),t)}):this.each(function(){if("string"===i)for(var o,r=0,s=ut(this),a=t,l=e.match(ht)||[];o=l[r++];)a=n?a:!s.hasClass(o),s[a?"addClass":"removeClass"](o);else(i===Y||"boolean"===i)&&(this.className&&ut._data(this,"__className__",this.className),this.className=this.className||e===!1?"":ut._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",i=0,n=this.length;n>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(At," ").indexOf(t)>=0)return!0;return!1},val:function(e){var i,n,o,r=this[0];{if(arguments.length)return o=ut.isFunction(e),this.each(function(i){var r;1===this.nodeType&&(r=o?e.call(this,i,ut(this).val()):e,null==r?r="":"number"==typeof r?r+="":ut.isArray(r)&&(r=ut.map(r,function(e){return null==e?"":e+""})),n=ut.valHooks[this.type]||ut.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,r,"value")!==t||(this.value=r))});if(r)return n=ut.valHooks[r.type]||ut.valHooks[r.nodeName.toLowerCase()],n&&"get"in n&&(i=n.get(r,"value"))!==t?i:(i=r.value,"string"==typeof i?i.replace(Pt,""):null==i?"":i)}}}),ut.extend({valHooks:{option:{get:function(e){var t=ut.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){for(var t,i,n=e.options,o=e.selectedIndex,r="select-one"===e.type||0>o,s=r?null:[],a=r?o+1:n.length,l=0>o?a:r?o:0;a>l;l++)if(i=n[l],!(!i.selected&&l!==o||(ut.support.optDisabled?i.disabled:null!==i.getAttribute("disabled"))||i.parentNode.disabled&&ut.nodeName(i.parentNode,"optgroup"))){if(t=ut(i).val(),r)return t;s.push(t)}return s},set:function(e,t){for(var i,n,o=e.options,r=ut.makeArray(t),s=o.length;s--;)n=o[s],(n.selected=ut.inArray(ut(n).val(),r)>=0)&&(i=!0);return i||(e.selectedIndex=-1),r}}},attr:function(e,i,n){var o,r,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===Y?ut.prop(e,i,n):(1===s&&ut.isXMLDoc(e)||(i=i.toLowerCase(),o=ut.attrHooks[i]||(ut.expr.match.bool.test(i)?Nt:Et)),n===t?o&&"get"in o&&null!==(r=o.get(e,i))?r:(r=ut.find.attr(e,i),null==r?t:r):null!==n?o&&"set"in o&&(r=o.set(e,n,i))!==t?r:(e.setAttribute(i,n+""),n):(ut.removeAttr(e,i),void 0))},removeAttr:function(e,t){var i,n,o=0,r=t&&t.match(ht);if(r&&1===e.nodeType)for(;i=r[o++];)n=ut.propFix[i]||i,ut.expr.match.bool.test(i)?Rt&&Bt||!Ht.test(i)?e[n]=!1:e[ut.camelCase("default-"+i)]=e[n]=!1:ut.attr(e,i,""),e.removeAttribute(Bt?i:n)},attrHooks:{type:{set:function(e,t){if(!ut.support.radioValue&&"radio"===t&&ut.nodeName(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,i,n){var o,r,s,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return s=1!==a||!ut.isXMLDoc(e),s&&(i=ut.propFix[i]||i,r=ut.propHooks[i]),n!==t?r&&"set"in r&&(o=r.set(e,n,i))!==t?o:e[i]=n:r&&"get"in r&&null!==(o=r.get(e,i))?o:e[i]},propHooks:{tabIndex:{get:function(e){var t=ut.find.attr(e,"tabindex");return t?parseInt(t,10):Mt.test(e.nodeName)||It.test(e.nodeName)&&e.href?0:-1}}}}),Nt={set:function(e,t,i){return t===!1?ut.removeAttr(e,i):Rt&&Bt||!Ht.test(i)?e.setAttribute(!Bt&&ut.propFix[i]||i,i):e[ut.camelCase("default-"+i)]=e[i]=!0,i}},ut.each(ut.expr.match.bool.source.match(/\w+/g),function(e,i){var n=ut.expr.attrHandle[i]||ut.find.attr;ut.expr.attrHandle[i]=Rt&&Bt||!Ht.test(i)?function(e,i,o){var r=ut.expr.attrHandle[i],s=o?t:(ut.expr.attrHandle[i]=t)!=n(e,i,o)?i.toLowerCase():null;return ut.expr.attrHandle[i]=r,s}:function(e,i,n){return n?t:e[ut.camelCase("default-"+i)]?i.toLowerCase():null}}),Rt&&Bt||(ut.attrHooks.value={set:function(e,t,i){return ut.nodeName(e,"input")?(e.defaultValue=t,void 0):Et&&Et.set(e,t,i)}}),Bt||(Et={set:function(e,i,n){var o=e.getAttributeNode(n);return o||e.setAttributeNode(o=e.ownerDocument.createAttribute(n)),o.value=i+="","value"===n||i===e.getAttribute(n)?i:t}},ut.expr.attrHandle.id=ut.expr.attrHandle.name=ut.expr.attrHandle.coords=function(e,i,n){var o;return n?t:(o=e.getAttributeNode(i))&&""!==o.value?o.value:null},ut.valHooks.button={get:function(e,i){var n=e.getAttributeNode(i);return n&&n.specified?n.value:t},set:Et.set},ut.attrHooks.contenteditable={set:function(e,t,i){Et.set(e,""===t?!1:t,i)}},ut.each(["width","height"],function(e,t){ut.attrHooks[t]={set:function(e,i){return""===i?(e.setAttribute(t,"auto"),i):void 0}}})),ut.support.hrefNormalized||ut.each(["href","src"],function(e,t){ut.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ut.support.style||(ut.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),ut.support.optSelected||(ut.propHooks.selected={get:function(e){var t=e.parentNode;
25
+ return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),ut.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ut.propFix[this.toLowerCase()]=this}),ut.support.enctype||(ut.propFix.enctype="encoding"),ut.each(["radio","checkbox"],function(){ut.valHooks[this]={set:function(e,t){return ut.isArray(t)?e.checked=ut.inArray(ut(e).val(),t)>=0:void 0}},ut.support.checkOn||(ut.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Ot=/^(?:input|select|textarea)$/i,Lt=/^key/,jt=/^(?:mouse|contextmenu)|click/,Ft=/^(?:focusinfocus|focusoutblur)$/,zt=/^([^.]*)(?:\.(.+)|)$/;ut.event={global:{},add:function(e,i,n,o,r){var s,a,l,c,u,d,h,p,f,m,g,v=ut._data(e);if(v){for(n.handler&&(c=n,n=c.handler,r=c.selector),n.guid||(n.guid=ut.guid++),(a=v.events)||(a=v.events={}),(d=v.handle)||(d=v.handle=function(e){return typeof ut===Y||e&&ut.event.triggered===e.type?t:ut.event.dispatch.apply(d.elem,arguments)},d.elem=e),i=(i||"").match(ht)||[""],l=i.length;l--;)s=zt.exec(i[l])||[],f=g=s[1],m=(s[2]||"").split(".").sort(),f&&(u=ut.event.special[f]||{},f=(r?u.delegateType:u.bindType)||f,u=ut.event.special[f]||{},h=ut.extend({type:f,origType:g,data:o,handler:n,guid:n.guid,selector:r,needsContext:r&&ut.expr.match.needsContext.test(r),namespace:m.join(".")},c),(p=a[f])||(p=a[f]=[],p.delegateCount=0,u.setup&&u.setup.call(e,o,m,d)!==!1||(e.addEventListener?e.addEventListener(f,d,!1):e.attachEvent&&e.attachEvent("on"+f,d))),u.add&&(u.add.call(e,h),h.handler.guid||(h.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,h):p.push(h),ut.event.global[f]=!0);e=null}},remove:function(e,t,i,n,o){var r,s,a,l,c,u,d,h,p,f,m,g=ut.hasData(e)&&ut._data(e);if(g&&(u=g.events)){for(t=(t||"").match(ht)||[""],c=t.length;c--;)if(a=zt.exec(t[c])||[],p=m=a[1],f=(a[2]||"").split(".").sort(),p){for(d=ut.event.special[p]||{},p=(n?d.delegateType:d.bindType)||p,h=u[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=r=h.length;r--;)s=h[r],!o&&m!==s.origType||i&&i.guid!==s.guid||a&&!a.test(s.namespace)||n&&n!==s.selector&&("**"!==n||!s.selector)||(h.splice(r,1),s.selector&&h.delegateCount--,d.remove&&d.remove.call(e,s));l&&!h.length&&(d.teardown&&d.teardown.call(e,f,g.handle)!==!1||ut.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)ut.event.remove(e,p+t[c],i,n,!0);ut.isEmptyObject(u)&&(delete g.handle,ut._removeData(e,"events"))}},trigger:function(i,n,o,r){var s,a,l,c,u,d,h,p=[o||G],f=lt.call(i,"type")?i.type:i,m=lt.call(i,"namespace")?i.namespace.split("."):[];if(l=d=o=o||G,3!==o.nodeType&&8!==o.nodeType&&!Ft.test(f+ut.event.triggered)&&(f.indexOf(".")>=0&&(m=f.split("."),f=m.shift(),m.sort()),a=f.indexOf(":")<0&&"on"+f,i=i[ut.expando]?i:new ut.Event(f,"object"==typeof i&&i),i.isTrigger=r?2:3,i.namespace=m.join("."),i.namespace_re=i.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,i.result=t,i.target||(i.target=o),n=null==n?[i]:ut.makeArray(n,[i]),u=ut.event.special[f]||{},r||!u.trigger||u.trigger.apply(o,n)!==!1)){if(!r&&!u.noBubble&&!ut.isWindow(o)){for(c=u.delegateType||f,Ft.test(c+f)||(l=l.parentNode);l;l=l.parentNode)p.push(l),d=l;d===(o.ownerDocument||G)&&p.push(d.defaultView||d.parentWindow||e)}for(h=0;(l=p[h++])&&!i.isPropagationStopped();)i.type=h>1?c:u.bindType||f,s=(ut._data(l,"events")||{})[i.type]&&ut._data(l,"handle"),s&&s.apply(l,n),s=a&&l[a],s&&ut.acceptData(l)&&s.apply&&s.apply(l,n)===!1&&i.preventDefault();if(i.type=f,!r&&!i.isDefaultPrevented()&&(!u._default||u._default.apply(p.pop(),n)===!1)&&ut.acceptData(o)&&a&&o[f]&&!ut.isWindow(o)){d=o[a],d&&(o[a]=null),ut.event.triggered=f;try{o[f]()}catch(g){}ut.event.triggered=t,d&&(o[a]=d)}return i.result}},dispatch:function(e){e=ut.event.fix(e);var i,n,o,r,s,a=[],l=rt.call(arguments),c=(ut._data(this,"events")||{})[e.type]||[],u=ut.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(a=ut.event.handlers.call(this,e,c),i=0;(r=a[i++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,s=0;(o=r.handlers[s++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,n=((ut.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,l),n!==t&&(e.result=n)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,i){var n,o,r,s,a=[],l=i.delegateCount,c=e.target;if(l&&c.nodeType&&(!e.button||"click"!==e.type))for(;c!=this;c=c.parentNode||this)if(1===c.nodeType&&(c.disabled!==!0||"click"!==e.type)){for(r=[],s=0;l>s;s++)o=i[s],n=o.selector+" ",r[n]===t&&(r[n]=o.needsContext?ut(n,this).index(c)>=0:ut.find(n,this,null,[c]).length),r[n]&&r.push(o);r.length&&a.push({elem:c,handlers:r})}return l<i.length&&a.push({elem:this,handlers:i.slice(l)}),a},fix:function(e){if(e[ut.expando])return e;var t,i,n,o=e.type,r=e,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=jt.test(o)?this.mouseHooks:Lt.test(o)?this.keyHooks:{}),n=s.props?this.props.concat(s.props):this.props,e=new ut.Event(r),t=n.length;t--;)i=n[t],e[i]=r[i];return e.target||(e.target=r.srcElement||G),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,i){var n,o,r,s=i.button,a=i.fromElement;return null==e.pageX&&null!=i.clientX&&(o=e.target.ownerDocument||G,r=o.documentElement,n=o.body,e.pageX=i.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),e.pageY=i.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?i.toElement:a),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==u()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===u()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return ut.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return ut.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,i,n){var o=ut.extend(new ut.Event,i,{type:e,isSimulated:!0,originalEvent:{}});n?ut.event.trigger(o,null,t):ut.event.dispatch.call(t,o),o.isDefaultPrevented()&&i.preventDefault()}},ut.removeEvent=G.removeEventListener?function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i,!1)}:function(e,t,i){var n="on"+t;e.detachEvent&&(typeof e[n]===Y&&(e[n]=null),e.detachEvent(n,i))},ut.Event=function(e,t){return this instanceof ut.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?l:c):this.type=e,t&&ut.extend(this,t),this.timeStamp=e&&e.timeStamp||ut.now(),this[ut.expando]=!0,void 0):new ut.Event(e,t)},ut.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=l,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=l,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=l,this.stopPropagation()}},ut.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){ut.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,o=e.relatedTarget,r=e.handleObj;return(!o||o!==n&&!ut.contains(n,o))&&(e.type=r.origType,i=r.handler.apply(this,arguments),e.type=t),i}}}),ut.support.submitBubbles||(ut.event.special.submit={setup:function(){return ut.nodeName(this,"form")?!1:(ut.event.add(this,"click._submit keypress._submit",function(e){var i=e.target,n=ut.nodeName(i,"input")||ut.nodeName(i,"button")?i.form:t;n&&!ut._data(n,"submitBubbles")&&(ut.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),ut._data(n,"submitBubbles",!0))}),void 0)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&ut.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return ut.nodeName(this,"form")?!1:(ut.event.remove(this,"._submit"),void 0)}}),ut.support.changeBubbles||(ut.event.special.change={setup:function(){return Ot.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ut.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),ut.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),ut.event.simulate("change",this,e,!0)})),!1):(ut.event.add(this,"beforeactivate._change",function(e){var t=e.target;Ot.test(t.nodeName)&&!ut._data(t,"changeBubbles")&&(ut.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||ut.event.simulate("change",this.parentNode,e,!0)}),ut._data(t,"changeBubbles",!0))}),void 0)},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return ut.event.remove(this,"._change"),!Ot.test(this.nodeName)}}),ut.support.focusinBubbles||ut.each({focus:"focusin",blur:"focusout"},function(e,t){var i=0,n=function(e){ut.event.simulate(t,e.target,ut.event.fix(e),!0)};ut.event.special[t]={setup:function(){0===i++&&G.addEventListener(e,n,!0)},teardown:function(){0===--i&&G.removeEventListener(e,n,!0)}}}),ut.fn.extend({on:function(e,i,n,o,r){var s,a;if("object"==typeof e){"string"!=typeof i&&(n=n||i,i=t);for(s in e)this.on(s,i,n,e[s],r);return this}if(null==n&&null==o?(o=i,n=i=t):null==o&&("string"==typeof i?(o=n,n=t):(o=n,n=i,i=t)),o===!1)o=c;else if(!o)return this;return 1===r&&(a=o,o=function(e){return ut().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=ut.guid++)),this.each(function(){ut.event.add(this,e,o,n,i)})},one:function(e,t,i,n){return this.on(e,t,i,n,1)},off:function(e,i,n){var o,r;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,ut(e.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"==typeof e){for(r in e)this.off(r,i,e[r]);return this}return(i===!1||"function"==typeof i)&&(n=i,i=t),n===!1&&(n=c),this.each(function(){ut.event.remove(this,e,n,i)})},trigger:function(e,t){return this.each(function(){ut.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];return i?ut.event.trigger(e,t,i,!0):void 0}});var qt=/^.[^:#\[\.,]*$/,Wt=/^(?:parents|prev(?:Until|All))/,Ut=ut.expr.match.needsContext,$t={children:!0,contents:!0,next:!0,prev:!0};ut.fn.extend({find:function(e){var t,i=[],n=this,o=n.length;if("string"!=typeof e)return this.pushStack(ut(e).filter(function(){for(t=0;o>t;t++)if(ut.contains(n[t],this))return!0}));for(t=0;o>t;t++)ut.find(e,n[t],i);return i=this.pushStack(o>1?ut.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},has:function(e){var t,i=ut(e,this),n=i.length;return this.filter(function(){for(t=0;n>t;t++)if(ut.contains(this,i[t]))return!0})},not:function(e){return this.pushStack(h(this,e||[],!0))},filter:function(e){return this.pushStack(h(this,e||[],!1))},is:function(e){return!!h(this,"string"==typeof e&&Ut.test(e)?ut(e):e||[],!1).length},closest:function(e,t){for(var i,n=0,o=this.length,r=[],s=Ut.test(e)||"string"!=typeof e?ut(e,t||this.context):0;o>n;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&ut.find.matchesSelector(i,e))){i=r.push(i);break}return this.pushStack(r.length>1?ut.unique(r):r)},index:function(e){return e?"string"==typeof e?ut.inArray(this[0],ut(e)):ut.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var i="string"==typeof e?ut(e,t):ut.makeArray(e&&e.nodeType?[e]:e),n=ut.merge(this.get(),i);return this.pushStack(ut.unique(n))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ut.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ut.dir(e,"parentNode")},parentsUntil:function(e,t,i){return ut.dir(e,"parentNode",i)},next:function(e){return d(e,"nextSibling")},prev:function(e){return d(e,"previousSibling")},nextAll:function(e){return ut.dir(e,"nextSibling")},prevAll:function(e){return ut.dir(e,"previousSibling")},nextUntil:function(e,t,i){return ut.dir(e,"nextSibling",i)},prevUntil:function(e,t,i){return ut.dir(e,"previousSibling",i)},siblings:function(e){return ut.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ut.sibling(e.firstChild)},contents:function(e){return ut.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ut.merge([],e.childNodes)}},function(e,t){ut.fn[e]=function(i,n){var o=ut.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=ut.filter(n,o)),this.length>1&&($t[e]||(o=ut.unique(o)),Wt.test(e)&&(o=o.reverse())),this.pushStack(o)}}),ut.extend({filter:function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?ut.find.matchesSelector(n,e)?[n]:[]:ut.find.matches(e,ut.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,i,n){for(var o=[],r=e[i];r&&9!==r.nodeType&&(n===t||1!==r.nodeType||!ut(r).is(n));)1===r.nodeType&&o.push(r),r=r[i];return o},sibling:function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}});var Vt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Kt=/ jQuery\d+="(?:null|\d+)"/g,Yt=new RegExp("<(?:"+Vt+")[\\s/>]","i"),Xt=/^\s+/,Gt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Qt=/<([\w:]+)/,Zt=/<tbody/i,Jt=/<|&#?\w+;/,ei=/<(?:script|style|link)/i,ti=/^(?:checkbox|radio)$/i,ii=/checked\s*(?:[^=]|=\s*.checked.)/i,ni=/^$|\/(?:java|ecma)script/i,oi=/^true\/(.*)/,ri=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,si={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ut.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},ai=p(G),li=ai.appendChild(G.createElement("div"));si.optgroup=si.option,si.tbody=si.tfoot=si.colgroup=si.caption=si.thead,si.th=si.td,ut.fn.extend({text:function(e){return ut.access(this,function(e){return e===t?ut.text(this):this.empty().append((this[0]&&this[0].ownerDocument||G).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=f(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=f(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var i,n=e?ut.filter(e,this):this,o=0;null!=(i=n[o]);o++)t||1!==i.nodeType||ut.cleanData(_(i)),i.parentNode&&(t&&ut.contains(i.ownerDocument,i)&&v(_(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ut.cleanData(_(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ut.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ut.clone(this,e,t)})},html:function(e){return ut.access(this,function(e){var i=this[0]||{},n=0,o=this.length;if(e===t)return 1===i.nodeType?i.innerHTML.replace(Kt,""):t;if(!("string"!=typeof e||ei.test(e)||!ut.support.htmlSerialize&&Yt.test(e)||!ut.support.leadingWhitespace&&Xt.test(e)||si[(Qt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Gt,"<$1></$2>");try{for(;o>n;n++)i=this[n]||{},1===i.nodeType&&(ut.cleanData(_(i,!1)),i.innerHTML=e);i=0}catch(r){}}i&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=ut.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(i){var n=e[t++],o=e[t++];o&&(n&&n.parentNode!==o&&(n=this.nextSibling),ut(this).remove(),o.insertBefore(i,n))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,i){e=nt.apply([],e);var n,o,r,s,a,l,c=0,u=this.length,d=this,h=u-1,p=e[0],f=ut.isFunction(p);if(f||!(1>=u||"string"!=typeof p||ut.support.checkClone)&&ii.test(p))return this.each(function(n){var o=d.eq(n);f&&(e[0]=p.call(this,n,o.html())),o.domManip(e,t,i)});if(u&&(l=ut.buildFragment(e,this[0].ownerDocument,!1,!i&&this),n=l.firstChild,1===l.childNodes.length&&(l=n),n)){for(s=ut.map(_(l,"script"),m),r=s.length;u>c;c++)o=l,c!==h&&(o=ut.clone(o,!0,!0),r&&ut.merge(s,_(o,"script"))),t.call(this[c],o,c);if(r)for(a=s[s.length-1].ownerDocument,ut.map(s,g),c=0;r>c;c++)o=s[c],ni.test(o.type||"")&&!ut._data(o,"globalEval")&&ut.contains(a,o)&&(o.src?ut._evalUrl(o.src):ut.globalEval((o.text||o.textContent||o.innerHTML||"").replace(ri,"")));l=n=null}return this}}),ut.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ut.fn[e]=function(e){for(var i,n=0,o=[],r=ut(e),s=r.length-1;s>=n;n++)i=n===s?this:this.clone(!0),ut(r[n])[t](i),ot.apply(o,i.get());return this.pushStack(o)}}),ut.extend({clone:function(e,t,i){var n,o,r,s,a,l=ut.contains(e.ownerDocument,e);if(ut.support.html5Clone||ut.isXMLDoc(e)||!Yt.test("<"+e.nodeName+">")?r=e.cloneNode(!0):(li.innerHTML=e.outerHTML,li.removeChild(r=li.firstChild)),!(ut.support.noCloneEvent&&ut.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ut.isXMLDoc(e)))for(n=_(r),a=_(e),s=0;null!=(o=a[s]);++s)n[s]&&y(o,n[s]);if(t)if(i)for(a=a||_(e),n=n||_(r),s=0;null!=(o=a[s]);s++)b(o,n[s]);else b(e,r);return n=_(r,"script"),n.length>0&&v(n,!l&&_(e,"script")),n=a=o=null,r},buildFragment:function(e,t,i,n){for(var o,r,s,a,l,c,u,d=e.length,h=p(t),f=[],m=0;d>m;m++)if(r=e[m],r||0===r)if("object"===ut.type(r))ut.merge(f,r.nodeType?[r]:r);else if(Jt.test(r)){for(a=a||h.appendChild(t.createElement("div")),l=(Qt.exec(r)||["",""])[1].toLowerCase(),u=si[l]||si._default,a.innerHTML=u[1]+r.replace(Gt,"<$1></$2>")+u[2],o=u[0];o--;)a=a.lastChild;if(!ut.support.leadingWhitespace&&Xt.test(r)&&f.push(t.createTextNode(Xt.exec(r)[0])),!ut.support.tbody)for(r="table"!==l||Zt.test(r)?"<table>"!==u[1]||Zt.test(r)?0:a:a.firstChild,o=r&&r.childNodes.length;o--;)ut.nodeName(c=r.childNodes[o],"tbody")&&!c.childNodes.length&&r.removeChild(c);for(ut.merge(f,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=h.lastChild}else f.push(t.createTextNode(r));for(a&&h.removeChild(a),ut.support.appendChecked||ut.grep(_(f,"input"),C),m=0;r=f[m++];)if((!n||-1===ut.inArray(r,n))&&(s=ut.contains(r.ownerDocument,r),a=_(h.appendChild(r),"script"),s&&v(a),i))for(o=0;r=a[o++];)ni.test(r.type||"")&&i.push(r);return a=null,h},cleanData:function(e,t){for(var i,n,o,r,s=0,a=ut.expando,l=ut.cache,c=ut.support.deleteExpando,u=ut.event.special;null!=(i=e[s]);s++)if((t||ut.acceptData(i))&&(o=i[a],r=o&&l[o])){if(r.events)for(n in r.events)u[n]?ut.event.remove(i,n):ut.removeEvent(i,n,r.handle);l[o]&&(delete l[o],c?delete i[a]:typeof i.removeAttribute!==Y?i.removeAttribute(a):i[a]=null,tt.push(o))}},_evalUrl:function(e){return ut.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),ut.fn.extend({wrapAll:function(e){if(ut.isFunction(e))return this.each(function(t){ut(this).wrapAll(e.call(this,t))});if(this[0]){var t=ut(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return ut.isFunction(e)?this.each(function(t){ut(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ut(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=ut.isFunction(e);return this.each(function(i){ut(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(){return this.parent().each(function(){ut.nodeName(this,"body")||ut(this).replaceWith(this.childNodes)}).end()}});var ci,ui,di,hi=/alpha\([^)]*\)/i,pi=/opacity\s*=\s*([^)]*)/,fi=/^(top|right|bottom|left)$/,mi=/^(none|table(?!-c[ea]).+)/,gi=/^margin/,vi=new RegExp("^("+dt+")(.*)$","i"),bi=new RegExp("^("+dt+")(?!px)[a-z%]+$","i"),yi=new RegExp("^([+-])=("+dt+")","i"),_i={BODY:"block"},Ci={position:"absolute",visibility:"hidden",display:"block"},xi={letterSpacing:0,fontWeight:400},wi=["Top","Right","Bottom","Left"],ki=["Webkit","O","Moz","ms"];ut.fn.extend({css:function(e,i){return ut.access(this,function(e,i,n){var o,r,s={},a=0;if(ut.isArray(i)){for(r=ui(e),o=i.length;o>a;a++)s[i[a]]=ut.css(e,i[a],!1,r);return s}return n!==t?ut.style(e,i,n):ut.css(e,i)},e,i,arguments.length>1)},show:function(){return k(this,!0)},hide:function(){return k(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:w(this))?ut(this).show():ut(this).hide()})}}),ut.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=di(e,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ut.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,i,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,a,l=ut.camelCase(i),c=e.style;if(i=ut.cssProps[l]||(ut.cssProps[l]=x(c,l)),a=ut.cssHooks[i]||ut.cssHooks[l],n===t)return a&&"get"in a&&(r=a.get(e,!1,o))!==t?r:c[i];if(s=typeof n,"string"===s&&(r=yi.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(ut.css(e,i)),s="number"),!(null==n||"number"===s&&isNaN(n)||("number"!==s||ut.cssNumber[l]||(n+="px"),ut.support.clearCloneStyle||""!==n||0!==i.indexOf("background")||(c[i]="inherit"),a&&"set"in a&&(n=a.set(e,n,o))===t)))try{c[i]=n}catch(u){}}},css:function(e,i,n,o){var r,s,a,l=ut.camelCase(i);return i=ut.cssProps[l]||(ut.cssProps[l]=x(e.style,l)),a=ut.cssHooks[i]||ut.cssHooks[l],a&&"get"in a&&(s=a.get(e,!0,n)),s===t&&(s=di(e,i,o)),"normal"===s&&i in xi&&(s=xi[i]),""===n||n?(r=parseFloat(s),n===!0||ut.isNumeric(r)?r||0:s):s}}),e.getComputedStyle?(ui=function(t){return e.getComputedStyle(t,null)},di=function(e,i,n){var o,r,s,a=n||ui(e),l=a?a.getPropertyValue(i)||a[i]:t,c=e.style;return a&&(""!==l||ut.contains(e.ownerDocument,e)||(l=ut.style(e,i)),bi.test(l)&&gi.test(i)&&(o=c.width,r=c.minWidth,s=c.maxWidth,c.minWidth=c.maxWidth=c.width=l,l=a.width,c.width=o,c.minWidth=r,c.maxWidth=s)),l}):G.documentElement.currentStyle&&(ui=function(e){return e.currentStyle},di=function(e,i,n){var o,r,s,a=n||ui(e),l=a?a[i]:t,c=e.style;return null==l&&c&&c[i]&&(l=c[i]),bi.test(l)&&!fi.test(i)&&(o=c.left,r=e.runtimeStyle,s=r&&r.left,s&&(r.left=e.currentStyle.left),c.left="fontSize"===i?"1em":l,l=c.pixelLeft+"px",c.left=o,s&&(r.left=s)),""===l?"auto":l}),ut.each(["height","width"],function(e,t){ut.cssHooks[t]={get:function(e,i,n){return i?0===e.offsetWidth&&mi.test(ut.css(e,"display"))?ut.swap(e,Ci,function(){return S(e,t,n)}):S(e,t,n):void 0},set:function(e,i,n){var o=n&&ui(e);return T(e,i,n?D(e,t,n,ut.support.boxSizing&&"border-box"===ut.css(e,"boxSizing",!1,o),o):0)}}}),ut.support.opacity||(ut.cssHooks.opacity={get:function(e,t){return pi.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var i=e.style,n=e.currentStyle,o=ut.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=n&&n.filter||i.filter||"";i.zoom=1,(t>=1||""===t)&&""===ut.trim(r.replace(hi,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===t||n&&!n.filter)||(i.filter=hi.test(r)?r.replace(hi,o):r+" "+o)}}),ut(function(){ut.support.reliableMarginRight||(ut.cssHooks.marginRight={get:function(e,t){return t?ut.swap(e,{display:"inline-block"},di,[e,"marginRight"]):void 0}}),!ut.support.pixelPosition&&ut.fn.position&&ut.each(["top","left"],function(e,t){ut.cssHooks[t]={get:function(e,i){return i?(i=di(e,t),bi.test(i)?ut(e).position()[t]+"px":i):void 0}}})}),ut.expr&&ut.expr.filters&&(ut.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!ut.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||ut.css(e,"display"))},ut.expr.filters.visible=function(e){return!ut.expr.filters.hidden(e)}),ut.each({margin:"",padding:"",border:"Width"},function(e,t){ut.cssHooks[e+t]={expand:function(i){for(var n=0,o={},r="string"==typeof i?i.split(" "):[i];4>n;n++)o[e+wi[n]+t]=r[n]||r[n-2]||r[0];return o}},gi.test(e)||(ut.cssHooks[e+t].set=T)});var Ti=/%20/g,Di=/\[\]$/,Si=/\r?\n/g,Ei=/^(?:submit|button|image|reset|file)$/i,Ni=/^(?:input|select|textarea|keygen)/i;ut.fn.extend({serialize:function(){return ut.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ut.prop(this,"elements");return e?ut.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ut(this).is(":disabled")&&Ni.test(this.nodeName)&&!Ei.test(e)&&(this.checked||!ti.test(e))}).map(function(e,t){var i=ut(this).val();return null==i?null:ut.isArray(i)?ut.map(i,function(e){return{name:t.name,value:e.replace(Si,"\r\n")}}):{name:t.name,value:i.replace(Si,"\r\n")}}).get()}}),ut.param=function(e,i){var n,o=[],r=function(e,t){t=ut.isFunction(t)?t():null==t?"":t,o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(i===t&&(i=ut.ajaxSettings&&ut.ajaxSettings.traditional),ut.isArray(e)||e.jquery&&!ut.isPlainObject(e))ut.each(e,function(){r(this.name,this.value)});else for(n in e)A(n,e[n],i,r);return o.join("&").replace(Ti,"+")},ut.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(e,t){ut.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}),ut.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)}});var Ai,Pi,Mi=ut.now(),Ii=/\?/,Hi=/#.*$/,Bi=/([?&])_=[^&]*/,Ri=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Oi=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Li=/^(?:GET|HEAD)$/,ji=/^\/\//,Fi=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,zi=ut.fn.load,qi={},Wi={},Ui="*/".concat("*");try{Pi=X.href}catch($i){Pi=G.createElement("a"),Pi.href="",Pi=Pi.href}Ai=Fi.exec(Pi.toLowerCase())||[],ut.fn.load=function(e,i,n){if("string"!=typeof e&&zi)return zi.apply(this,arguments);var o,r,s,a=this,l=e.indexOf(" ");return l>=0&&(o=e.slice(l,e.length),e=e.slice(0,l)),ut.isFunction(i)?(n=i,i=t):i&&"object"==typeof i&&(s="POST"),a.length>0&&ut.ajax({url:e,type:s,dataType:"html",data:i}).done(function(e){r=arguments,a.html(o?ut("<div>").append(ut.parseHTML(e)).find(o):e)}).complete(n&&function(e,t){a.each(n,r||[e.responseText,t,e])}),this},ut.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ut.fn[t]=function(e){return this.on(t,e)}}),ut.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Pi,type:"GET",isLocal:Oi.test(Ai[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ui,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ut.parseJSON,"text xml":ut.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?I(I(e,ut.ajaxSettings),t):I(ut.ajaxSettings,e)},ajaxPrefilter:P(qi),ajaxTransport:P(Wi),ajax:function(e,i){function n(e,i,n,o){var r,d,b,y,C,w=i;2!==_&&(_=2,l&&clearTimeout(l),u=t,a=o||"",x.readyState=e>0?4:0,r=e>=200&&300>e||304===e,n&&(y=H(h,x,n)),y=B(h,y,x,r),r?(h.ifModified&&(C=x.getResponseHeader("Last-Modified"),C&&(ut.lastModified[s]=C),C=x.getResponseHeader("etag"),C&&(ut.etag[s]=C)),204===e||"HEAD"===h.type?w="nocontent":304===e?w="notmodified":(w=y.state,d=y.data,b=y.error,r=!b)):(b=w,(e||!w)&&(w="error",0>e&&(e=0))),x.status=e,x.statusText=(i||w)+"",r?m.resolveWith(p,[d,w,x]):m.rejectWith(p,[x,w,b]),x.statusCode(v),v=t,c&&f.trigger(r?"ajaxSuccess":"ajaxError",[x,h,r?d:b]),g.fireWith(p,[x,w]),c&&(f.trigger("ajaxComplete",[x,h]),--ut.active||ut.event.trigger("ajaxStop")))}"object"==typeof e&&(i=e,e=t),i=i||{};var o,r,s,a,l,c,u,d,h=ut.ajaxSetup({},i),p=h.context||h,f=h.context&&(p.nodeType||p.jquery)?ut(p):ut.event,m=ut.Deferred(),g=ut.Callbacks("once memory"),v=h.statusCode||{},b={},y={},_=0,C="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===_){if(!d)for(d={};t=Ri.exec(a);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===_?a:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return _||(e=y[i]=y[i]||e,b[e]=t),this},overrideMimeType:function(e){return _||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>_)for(t in e)v[t]=[v[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||C;return u&&u.abort(t),n(0,t),this}};if(m.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,h.url=((e||h.url||Pi)+"").replace(Hi,"").replace(ji,Ai[1]+"//"),h.type=i.method||i.type||h.method||h.type,h.dataTypes=ut.trim(h.dataType||"*").toLowerCase().match(ht)||[""],null==h.crossDomain&&(o=Fi.exec(h.url.toLowerCase()),h.crossDomain=!(!o||o[1]===Ai[1]&&o[2]===Ai[2]&&(o[3]||("http:"===o[1]?"80":"443"))===(Ai[3]||("http:"===Ai[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=ut.param(h.data,h.traditional)),M(qi,h,i,x),2===_)return x;c=h.global,c&&0===ut.active++&&ut.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Li.test(h.type),s=h.url,h.hasContent||(h.data&&(s=h.url+=(Ii.test(s)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=Bi.test(s)?s.replace(Bi,"$1_="+Mi++):s+(Ii.test(s)?"&":"?")+"_="+Mi++)),h.ifModified&&(ut.lastModified[s]&&x.setRequestHeader("If-Modified-Since",ut.lastModified[s]),ut.etag[s]&&x.setRequestHeader("If-None-Match",ut.etag[s])),(h.data&&h.hasContent&&h.contentType!==!1||i.contentType)&&x.setRequestHeader("Content-Type",h.contentType),x.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ui+"; q=0.01":""):h.accepts["*"]);for(r in h.headers)x.setRequestHeader(r,h.headers[r]);if(h.beforeSend&&(h.beforeSend.call(p,x,h)===!1||2===_))return x.abort();C="abort";for(r in{success:1,error:1,complete:1})x[r](h[r]);if(u=M(Wi,h,i,x)){x.readyState=1,c&&f.trigger("ajaxSend",[x,h]),h.async&&h.timeout>0&&(l=setTimeout(function(){x.abort("timeout")},h.timeout));try{_=1,u.send(b,n)}catch(w){if(!(2>_))throw w;n(-1,w)}}else n(-1,"No Transport");return x},getJSON:function(e,t,i){return ut.get(e,t,i,"json")},getScript:function(e,i){return ut.get(e,t,i,"script")}}),ut.each(["get","post"],function(e,i){ut[i]=function(e,n,o,r){return ut.isFunction(n)&&(r=r||o,o=n,n=t),ut.ajax({url:e,type:i,dataType:r,data:n,success:o})}}),ut.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ut.globalEval(e),e}}}),ut.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),ut.ajaxTransport("script",function(e){if(e.crossDomain){var i,n=G.head||ut("head")[0]||G.documentElement;
26
+ return{send:function(t,o){i=G.createElement("script"),i.async=!0,e.scriptCharset&&(i.charset=e.scriptCharset),i.src=e.url,i.onload=i.onreadystatechange=function(e,t){(t||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),i=null,t||o(200,"success"))},n.insertBefore(i,n.firstChild)},abort:function(){i&&i.onload(t,!0)}}}});var Vi=[],Ki=/(=)\?(?=&|$)|\?\?/;ut.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vi.pop()||ut.expando+"_"+Mi++;return this[e]=!0,e}}),ut.ajaxPrefilter("json jsonp",function(i,n,o){var r,s,a,l=i.jsonp!==!1&&(Ki.test(i.url)?"url":"string"==typeof i.data&&!(i.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ki.test(i.data)&&"data");return l||"jsonp"===i.dataTypes[0]?(r=i.jsonpCallback=ut.isFunction(i.jsonpCallback)?i.jsonpCallback():i.jsonpCallback,l?i[l]=i[l].replace(Ki,"$1"+r):i.jsonp!==!1&&(i.url+=(Ii.test(i.url)?"&":"?")+i.jsonp+"="+r),i.converters["script json"]=function(){return a||ut.error(r+" was not called"),a[0]},i.dataTypes[0]="json",s=e[r],e[r]=function(){a=arguments},o.always(function(){e[r]=s,i[r]&&(i.jsonpCallback=n.jsonpCallback,Vi.push(r)),a&&ut.isFunction(s)&&s(a[0]),a=s=t}),"script"):void 0});var Yi,Xi,Gi=0,Qi=e.ActiveXObject&&function(){var e;for(e in Yi)Yi[e](t,!0)};ut.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&R()||O()}:R,Xi=ut.ajaxSettings.xhr(),ut.support.cors=!!Xi&&"withCredentials"in Xi,Xi=ut.support.ajax=!!Xi,Xi&&ut.ajaxTransport(function(i){if(!i.crossDomain||ut.support.cors){var n;return{send:function(o,r){var s,a,l=i.xhr();if(i.username?l.open(i.type,i.url,i.async,i.username,i.password):l.open(i.type,i.url,i.async),i.xhrFields)for(a in i.xhrFields)l[a]=i.xhrFields[a];i.mimeType&&l.overrideMimeType&&l.overrideMimeType(i.mimeType),i.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");try{for(a in o)l.setRequestHeader(a,o[a])}catch(c){}l.send(i.hasContent&&i.data||null),n=function(e,o){var a,c,u,d;try{if(n&&(o||4===l.readyState))if(n=t,s&&(l.onreadystatechange=ut.noop,Qi&&delete Yi[s]),o)4!==l.readyState&&l.abort();else{d={},a=l.status,c=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(d.text=l.responseText);try{u=l.statusText}catch(h){u=""}a||!i.isLocal||i.crossDomain?1223===a&&(a=204):a=d.text?200:404}}catch(p){o||r(-1,p)}d&&r(a,u,d,c)},i.async?4===l.readyState?setTimeout(n):(s=++Gi,Qi&&(Yi||(Yi={},ut(e).unload(Qi)),Yi[s]=n),l.onreadystatechange=n):n()},abort:function(){n&&n(t,!0)}}}});var Zi,Ji,en=/^(?:toggle|show|hide)$/,tn=new RegExp("^(?:([+-])=|)("+dt+")([a-z%]*)$","i"),nn=/queueHooks$/,on=[q],rn={"*":[function(e,t){var i=this.createTween(e,t),n=i.cur(),o=tn.exec(t),r=o&&o[3]||(ut.cssNumber[e]?"":"px"),s=(ut.cssNumber[e]||"px"!==r&&+n)&&tn.exec(ut.css(i.elem,e)),a=1,l=20;if(s&&s[3]!==r){r=r||s[3],o=o||[],s=+n||1;do a=a||".5",s/=a,ut.style(i.elem,e,s+r);while(a!==(a=i.cur()/n)&&1!==a&&--l)}return o&&(i.unit=r,i.start=+s||+n||0,i.end=o[1]?s+(o[1]+1)*o[2]:+o[2]),i}]};ut.Animation=ut.extend(F,{tweener:function(e,t){ut.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var i,n=0,o=e.length;o>n;n++)i=e[n],rn[i]=rn[i]||[],rn[i].unshift(t)},prefilter:function(e,t){t?on.unshift(e):on.push(e)}}),ut.Tween=W,W.prototype={constructor:W,init:function(e,t,i,n,o,r){this.elem=e,this.prop=i,this.easing=o||"swing",this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=r||(ut.cssNumber[i]?"":"px")},cur:function(){var e=W.propHooks[this.prop];return e&&e.get?e.get(this):W.propHooks._default.get(this)},run:function(e){var t,i=W.propHooks[this.prop];return this.pos=t=this.options.duration?ut.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):W.propHooks._default.set(this),this}},W.prototype.init.prototype=W.prototype,W.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ut.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){ut.fx.step[e.prop]?ut.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ut.cssProps[e.prop]]||ut.cssHooks[e.prop])?ut.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},W.propHooks.scrollTop=W.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ut.each(["toggle","show","hide"],function(e,t){var i=ut.fn[t];ut.fn[t]=function(e,n,o){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(U(t,!0),e,n,o)}}),ut.fn.extend({fadeTo:function(e,t,i,n){return this.filter(w).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var o=ut.isEmptyObject(e),r=ut.speed(t,i,n),s=function(){var t=F(this,ut.extend({},e),r);s.finish=function(){t.stop(!0)},(o||ut._data(this,"finish"))&&t.stop(!0)};return s.finish=s,o||r.queue===!1?this.each(s):this.queue(r.queue,s)},stop:function(e,i,n){var o=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=i,i=e,e=t),i&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",r=ut.timers,s=ut._data(this);if(i)s[i]&&s[i].stop&&o(s[i]);else for(i in s)s[i]&&s[i].stop&&nn.test(i)&&o(s[i]);for(i=r.length;i--;)r[i].elem!==this||null!=e&&r[i].queue!==e||(r[i].anim.stop(n),t=!1,r.splice(i,1));(t||!n)&&ut.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,i=ut._data(this),n=i[e+"queue"],o=i[e+"queueHooks"],r=ut.timers,s=n?n.length:0;for(i.finish=!0,ut.queue(this,e,[]),o&&o.cur&&o.cur.finish&&o.cur.finish.call(this),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;s>t;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish})}}),ut.each({slideDown:U("show"),slideUp:U("hide"),slideToggle:U("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ut.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}}),ut.speed=function(e,t,i){var n=e&&"object"==typeof e?ut.extend({},e):{complete:i||!i&&t||ut.isFunction(e)&&e,duration:e,easing:i&&t||t&&!ut.isFunction(t)&&t};return n.duration=ut.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in ut.fx.speeds?ut.fx.speeds[n.duration]:ut.fx.speeds._default,(null==n.queue||n.queue===!0)&&(n.queue="fx"),n.old=n.complete,n.complete=function(){ut.isFunction(n.old)&&n.old.call(this),n.queue&&ut.dequeue(this,n.queue)},n},ut.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ut.timers=[],ut.fx=W.prototype.init,ut.fx.tick=function(){var e,i=ut.timers,n=0;for(Zi=ut.now();n<i.length;n++)e=i[n],e()||i[n]!==e||i.splice(n--,1);i.length||ut.fx.stop(),Zi=t},ut.fx.timer=function(e){e()&&ut.timers.push(e)&&ut.fx.start()},ut.fx.interval=13,ut.fx.start=function(){Ji||(Ji=setInterval(ut.fx.tick,ut.fx.interval))},ut.fx.stop=function(){clearInterval(Ji),Ji=null},ut.fx.speeds={slow:600,fast:200,_default:400},ut.fx.step={},ut.expr&&ut.expr.filters&&(ut.expr.filters.animated=function(e){return ut.grep(ut.timers,function(t){return e===t.elem}).length}),ut.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){ut.offset.setOffset(this,e,t)});var i,n,o={top:0,left:0},r=this[0],s=r&&r.ownerDocument;if(s)return i=s.documentElement,ut.contains(i,r)?(typeof r.getBoundingClientRect!==Y&&(o=r.getBoundingClientRect()),n=$(s),{top:o.top+(n.pageYOffset||i.scrollTop)-(i.clientTop||0),left:o.left+(n.pageXOffset||i.scrollLeft)-(i.clientLeft||0)}):o},ut.offset={setOffset:function(e,t,i){var n=ut.css(e,"position");"static"===n&&(e.style.position="relative");var o,r,s=ut(e),a=s.offset(),l=ut.css(e,"top"),c=ut.css(e,"left"),u=("absolute"===n||"fixed"===n)&&ut.inArray("auto",[l,c])>-1,d={},h={};u?(h=s.position(),o=h.top,r=h.left):(o=parseFloat(l)||0,r=parseFloat(c)||0),ut.isFunction(t)&&(t=t.call(e,i,a)),null!=t.top&&(d.top=t.top-a.top+o),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):s.css(d)}},ut.fn.extend({position:function(){if(this[0]){var e,t,i={top:0,left:0},n=this[0];return"fixed"===ut.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ut.nodeName(e[0],"html")||(i=e.offset()),i.top+=ut.css(e[0],"borderTopWidth",!0),i.left+=ut.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-ut.css(n,"marginTop",!0),left:t.left-i.left-ut.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Q;e&&!ut.nodeName(e,"html")&&"static"===ut.css(e,"position");)e=e.offsetParent;return e||Q})}}),ut.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,i){var n=/Y/.test(i);ut.fn[e]=function(o){return ut.access(this,function(e,o,r){var s=$(e);return r===t?s?i in s?s[i]:s.document.documentElement[o]:e[o]:(s?s.scrollTo(n?ut(s).scrollLeft():r,n?r:ut(s).scrollTop()):e[o]=r,void 0)},e,o,arguments.length,null)}}),ut.each({Height:"height",Width:"width"},function(e,i){ut.each({padding:"inner"+e,content:i,"":"outer"+e},function(n,o){ut.fn[o]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(o===!0||r===!0?"margin":"border");return ut.access(this,function(i,n,o){var r;return ut.isWindow(i)?i.document.documentElement["client"+e]:9===i.nodeType?(r=i.documentElement,Math.max(i.body["scroll"+e],r["scroll"+e],i.body["offset"+e],r["offset"+e],r["client"+e])):o===t?ut.css(i,n,a):ut.style(i,n,o,a)},i,s?o:t,s,null)}})}),ut.fn.size=function(){return this.length},ut.fn.andSelf=ut.fn.addBack,"object"==typeof module&&"object"==typeof module.exports?module.exports=ut:(e.jQuery=e.$=ut,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ut}))}(window),/*! jQuery UI - v1.10.3 - 2013-05-03
27
+ * http://jqueryui.com
28
+ * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
29
+ * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
30
+ function(e,t){function i(t,i){var o,r,s,a=t.nodeName.toLowerCase();return"area"===a?(o=t.parentNode,r=o.name,t.href&&r&&"map"===o.nodeName.toLowerCase()?(s=e("img[usemap=#"+r+"]")[0],!!s&&n(s)):!1):(/input|select|textarea|button|object/.test(a)?!t.disabled:"a"===a?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var o=0,r=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,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,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,o,r=e(this[0]);r.length&&r[0]!==document;){if(n=r.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(o=parseInt(r.css("zIndex"),10),!isNaN(o)&&0!==o))return o;r=r.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++o)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),o=isNaN(n);return(o||n>=0)&&i(t,!o)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function o(t,i,n,o){return e.each(r,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var r="Width"===n?["Left","Right"]:["Top","Bottom"],s=n.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?a["inner"+n].call(this):this.each(function(){e(this).css(s,o(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?a["outer"+n].call(this,t):this.each(function(){e(this).css(s,o(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var o,r=e.ui[t].prototype;for(o in n)r.plugins[o]=r.plugins[o]||[],r.plugins[o].push([i,n[o]])},call:function(e,t,i){var n,o=e.plugins[t];if(o&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;n<o.length;n++)e.options[o[n][0]]&&o[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",o=!1;return t[n]>0?!0:(t[n]=1,o=t[n]>0,t[n]=0,o)}})}(jQuery),function(e,t){var i=0,n=Array.prototype.slice,o=e.cleanData;e.cleanData=function(t){for(var i,n=0;null!=(i=t[n]);n++)try{e(i).triggerHandler("remove")}catch(r){}o(t)},e.widget=function(t,i,n){var o,r,s,a,l={},c=t.split(".")[0];t=t.split(".")[1],o=c+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][o.toLowerCase()]=function(t){return!!e.data(t,o)},e[c]=e[c]||{},r=e[c][t],s=e[c][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new s(e,t)},e.extend(s,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),a=new i,a.options=e.widget.extend({},a.options),e.each(n,function(t,n){return e.isFunction(n)?(l[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},o=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,r=this._superApply;return this._super=e,this._superApply=o,t=n.apply(this,arguments),this._super=i,this._superApply=r,t}}(),void 0):(l[t]=n,void 0)}),s.prototype=e.widget.extend(a,{widgetEventPrefix:r?a.widgetEventPrefix:t},l,{constructor:s,namespace:c,widgetName:t,widgetFullName:o}),r?(e.each(r._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,s,i._proto)}),delete r._childConstructors):i._childConstructors.push(s),e.widget.bridge(t,s)},e.widget.extend=function(i){for(var o,r,s=n.call(arguments,1),a=0,l=s.length;l>a;a++)for(o in s[a])r=s[a][o],s[a].hasOwnProperty(o)&&r!==t&&(i[o]=e.isPlainObject(r)?e.isPlainObject(i[o])?e.widget.extend({},i[o],r):e.widget.extend({},r):r);return i},e.widget.bridge=function(i,o){var r=o.prototype.widgetFullName||i;e.fn[i]=function(s){var a="string"==typeof s,l=n.call(arguments,1),c=this;return s=!a&&l.length?e.widget.extend.apply(null,[s].concat(l)):s,a?this.each(function(){var n,o=e.data(this,r);return o?e.isFunction(o[s])&&"_"!==s.charAt(0)?(n=o[s].apply(o,l),n!==o&&n!==t?(c=n&&n.jquery?c.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+s+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+s+"'")}):this.each(function(){var t=e.data(this,r);t?t.option(s||{})._init():e.data(this,r,new o(s,this))}),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,n){var o,r,s,a=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(a={},o=i.split("."),i=o.shift(),o.length){for(r=a[i]=e.widget.extend({},this.options[i]),s=0;s<o.length-1;s++)r[o[s]]=r[o[s]]||{},r=r[o[s]];if(i=o.pop(),n===t)return r[i]===t?null:r[i];r[i]=n}else{if(n===t)return this.options[i]===t?null:this.options[i];a[i]=n}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,i,n){var o,r=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=o=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,o=this.widget()),e.each(n,function(n,s){function a(){return t||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof s?r[s]:s).apply(r,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+r.eventNamespace,u=l[2];u?o.delegate(u,c,a):i.bind(c,a)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,n){var o,r,s=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],r=i.originalEvent)for(o in r)o in i||(i[o]=r[o]);return this.element.trigger(i,n),!(e.isFunction(s)&&s.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,o,r){"string"==typeof o&&(o={effect:o});var s,a=o?o===!0||"number"==typeof o?i:o.effect||i:t;o=o||{},"number"==typeof o&&(o={duration:o}),s=!e.isEmptyObject(o),o.complete=r,o.delay&&n.delay(o.delay),s&&e.effects&&e.effects.effect[a]?n[t](o):a!==t&&n[a]?n[a](o.duration,o.easing,r):n.queue(function(i){e(this)[t](),r&&r.call(n[0]),i()})}})}(jQuery),function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var n=this,o=1===i.which,r="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return o&&!r&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",t,n)===!1)return this._mouseUp({}),!1;this.position=n.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,n=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,o=this.options;return o.containment?"window"===o.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===o.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):o.containment.constructor===Array?(this.containment=o.containment,void 0):("parent"===o.containment&&(o.containment=this.helper[0].parentNode),i=e(o.containment),n=i[0],n&&(t="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"===t?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:o.scrollTop(),left:o.scrollLeft()}),{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*n}},_generatePosition:function(t){var i,n,o,r,s=this.options,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=t.pageX,c=t.pageY;return this.offset.scroll||(this.offset.scroll={top:a.scrollTop(),left:a.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(n=this.relative_container.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(c=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),s.grid&&(o=s.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,c=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-s.grid[1]:o+s.grid[1]:o,r=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=i?r-this.offset.click.left>=i[0]||r-this.offset.click.left>i[2]?r:r-this.offset.click.left>=i[0]?r-s.grid[0]:r+s.grid[0]:r)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,n){return n=n||this._uiHash(),e.ui.plugin.call(this,t,[i,n]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var n=e(this).data("ui-draggable"),o=n.options,r=e.extend({},i,{item:n.element});n.sortables=[],e(o.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(n.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,r))})},stop:function(t,i){var n=e(this).data("ui-draggable"),o=e.extend({},i,{item:n.element});e.each(n.sortables,function(){this.instance.isOver?(this.instance.isOver=0,n.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===n.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,o))})},drag:function(t,i){var n=e(this).data("ui-draggable"),o=this;e.each(n.sortables,function(){var r=!1,s=this;this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(r=!0,e.each(n.sortables,function(){return this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this!==s&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(s.instance.element[0],this.instance.element[0])&&(r=!1),r})),r?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(o).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=n.offset.click.top,this.instance.offset.click.left=n.offset.click.left,this.instance.offset.parent.left-=n.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=n.offset.parent.top-this.instance.offset.parent.top,n._trigger("toSortable",t),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),n._trigger("fromSortable",t),n.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var n=e(i.helper),o=e(this).data("ui-draggable").options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(t,i){var n=e(this).data("ui-draggable").options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),n=i.options,o=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?i.scrollParent[0].scrollTop=o=i.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-i.overflowOffset.top<n.scrollSensitivity&&(i.scrollParent[0].scrollTop=o=i.scrollParent[0].scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?i.scrollParent[0].scrollLeft=o=i.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-i.overflowOffset.left<n.scrollSensitivity&&(i.scrollParent[0].scrollLeft=o=i.scrollParent[0].scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-e(document).scrollTop()<n.scrollSensitivity?o=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(o=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-e(document).scrollLeft()<n.scrollSensitivity?o=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(o=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed)))),o!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=e(this),n=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:n.top,left:n.left})})},drag:function(t,i){var n,o,r,s,a,l,c,u,d,h,p=e(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,b=i.offset.top,y=b+p.helperProportions.height;for(d=p.snapElements.length-1;d>=0;d--)a=p.snapElements[d].left,l=a+p.snapElements[d].width,c=p.snapElements[d].top,u=c+p.snapElements[d].height,a-m>v||g>l+m||c-m>y||b>u+m||!e.contains(p.snapElements[d].item.ownerDocument,p.snapElements[d].item)?(p.snapElements[d].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[d].item})),p.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=Math.abs(c-y)<=m,o=Math.abs(u-b)<=m,r=Math.abs(a-v)<=m,s=Math.abs(l-g)<=m,n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),r&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a-p.helperProportions.width}).left-p.margins.left),s&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),h=n||o||r||s,"outer"!==f.snapMode&&(n=Math.abs(c-b)<=m,o=Math.abs(u-y)<=m,r=Math.abs(a-g)<=m,s=Math.abs(l-v)<=m,n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),r&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a}).left-p.margins.left),s&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[d].snapping&&(n||o||r||s||h)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[d].item})),p.snapElements[d].snapping=n||o||r||s||h)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,n=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});n.length&&(t=parseInt(e(n[0]).css("zIndex"),10)||0,e(n).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+n.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var n=e(i.helper),o=e(this).data("ui-draggable").options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(t,i){var n=e(this).data("ui-draggable").options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}})}(jQuery),function(e){function t(e,t,i){return e>t&&t+i>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=e.ui.ddmanager.droppables[this.options.scope];t<i.length;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))
31
+ },_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var n=i||e.ui.ddmanager.current,o=!1;return n&&(n.currentItem||n.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===n.options.scope&&t.accept.call(t.element[0],n.currentItem||n.element)&&e.ui.intersect(n,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(o=!0,!1):void 0}),o?!1:this.accept.call(this.element[0],n.currentItem||n.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(n)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,i,n){if(!i.offset)return!1;var o,r,s=(e.positionAbs||e.position.absolute).left,a=s+e.helperProportions.width,l=(e.positionAbs||e.position.absolute).top,c=l+e.helperProportions.height,u=i.offset.left,d=u+i.proportions.width,h=i.offset.top,p=h+i.proportions.height;switch(n){case"fit":return s>=u&&d>=a&&l>=h&&p>=c;case"intersect":return u<s+e.helperProportions.width/2&&a-e.helperProportions.width/2<d&&h<l+e.helperProportions.height/2&&c-e.helperProportions.height/2<p;case"pointer":return o=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,r=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(r,h,i.proportions.height)&&t(o,u,i.proportions.width);case"touch":return(l>=h&&p>=l||c>=h&&p>=c||h>l&&c>p)&&(s>=u&&d>=s||a>=u&&d>=a||u>s&&a>d);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var n,o,r=e.ui.ddmanager.droppables[t.options.scope]||[],s=i?i.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<r.length;n++)if(!(r[n].options.disabled||t&&!r[n].accept.call(r[n].element[0],t.currentItem||t.element))){for(o=0;o<a.length;o++)if(a[o]===r[n].element[0]){r[n].proportions.height=0;continue e}r[n].visible="none"!==r[n].element.css("display"),r[n].visible&&("mousedown"===s&&r[n]._activate.call(r[n],i),r[n].offset=r[n].element.offset(),r[n].proportions={width:r[n].element[0].offsetWidth,height:r[n].element[0].offsetHeight})}},drop:function(t,i){var n=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),n},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,o,r,s=e.ui.intersect(t,this,this.options.tolerance),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(o=this.options.scope,r=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===o}),r.length&&(n=e.data(r[0],"ui-droppable"),n.greedyChild="isover"===a)),n&&"isover"===a&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),n&&"isout"===a&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}}(jQuery),function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,i,n,o,r,s=this,a=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=a.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;i<t.length;i++)n=e.trim(t[i]),r="ui-resizable-"+n,o=e("<div class='ui-resizable-handle "+r+"'></div>"),o.css({zIndex:a.zIndex}),"se"===n&&o.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(o);this._renderAxis=function(t){var i,n,o,r;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(n=e(this.handles[i],this.element),r=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),o=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(o,r),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){s.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(e(this).removeClass("ui-resizable-autohide"),s._handles.show())}).mouseleave(function(){a.disabled||s.resizing||(e(this).addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,n,o=!1;for(i in this.handles)n=e(this.handles[i])[0],(n===t.target||e.contains(n,t.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(i){var n,o,r,s=this.options,a=this.element.position(),l=this.element;return this.resizing=!0,/absolute/.test(l.css("position"))?l.css({position:"absolute",top:l.css("top"),left:l.css("left")}):l.is(".ui-draggable")&&l.css({position:"absolute",top:a.top,left:a.left}),this._renderProxy(),n=t(this.helper.css("left")),o=t(this.helper.css("top")),s.containment&&(n+=e(s.containment).scrollLeft()||0,o+=e(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:o},this.size=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalSize=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalPosition={left:n,top:o},this.sizeDiff={width:l.outerWidth()-l.width(),height:l.outerHeight()-l.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===r?this.axis+"-resize":r),l.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,n=this.helper,o={},r=this.originalMousePosition,s=this.axis,a=this.position.top,l=this.position.left,c=this.size.width,u=this.size.height,d=t.pageX-r.left||0,h=t.pageY-r.top||0,p=this._change[s];return p?(i=p.apply(this,[t,d,h]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==a&&(o.top=this.position.top+"px"),this.position.left!==l&&(o.left=this.position.left+"px"),this.size.width!==c&&(o.width=this.size.width+"px"),this.size.height!==u&&(o.height=this.size.height+"px"),n.css(o),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(o)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,n,o,r,s,a,l,c=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),o=n&&e.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,r=n?0:u.sizeDiff.width,s={width:u.helper.width()-r,height:u.helper.height()-o},a=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,l=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,c.animate||this.element.css(e.extend(s,{top:l,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!c.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,n,o,r,s,a=this.options;s={minWidth:i(a.minWidth)?a.minWidth:0,maxWidth:i(a.maxWidth)?a.maxWidth:1/0,minHeight:i(a.minHeight)?a.minHeight:0,maxHeight:i(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||e)&&(t=s.minHeight*this.aspectRatio,o=s.minWidth/this.aspectRatio,n=s.maxHeight*this.aspectRatio,r=s.maxWidth/this.aspectRatio,t>s.minWidth&&(s.minWidth=t),o>s.minHeight&&(s.minHeight=o),n<s.maxWidth&&(s.maxWidth=n),r<s.maxHeight&&(s.maxHeight=r)),this._vBoundaries=s},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,n=this.size,o=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===o&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===o&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,o=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,r=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,s=i(e.width)&&t.minWidth&&t.minWidth>e.width,a=i(e.height)&&t.minHeight&&t.minHeight>e.height,l=this.originalPosition.left+this.originalSize.width,c=this.position.top+this.size.height,u=/sw|nw|w/.test(n),d=/nw|ne|n/.test(n);return s&&(e.width=t.minWidth),a&&(e.height=t.minHeight),o&&(e.width=t.maxWidth),r&&(e.height=t.maxHeight),s&&u&&(e.left=l-t.minWidth),o&&u&&(e.left=l-t.maxWidth),a&&d&&(e.top=c-t.minHeight),r&&d&&(e.top=c-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,n,o,r=this.helper||this.element;for(e=0;e<this._proportionallyResizeElements.length;e++){if(o=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[o.css("borderTopWidth"),o.css("borderRightWidth"),o.css("borderBottomWidth"),o.css("borderLeftWidth")],n=[o.css("paddingTop"),o.css("paddingRight"),o.css("paddingBottom"),o.css("paddingLeft")],t=0;t<i.length;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(n[t],10)||0);o.css({height:r.height()-this.borderDif[0]-this.borderDif[2]||0,width:r.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,n=this.originalPosition;return{left:n.left+t,width:i.width-t}},n:function(e,t,i){var n=this.originalSize,o=this.originalPosition;return{top:o.top+i,height:n.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},sw:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,n]))},ne:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},nw:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,n]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),n=i.options,o=i._proportionallyResizeElements,r=o.length&&/textarea/i.test(o[0].nodeName),s=r&&e.ui.hasScroll(o[0],"left")?0:i.sizeDiff.height,a=r?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-s},c=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(l,u&&c?{top:u,left:c}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};o&&o.length&&e(o[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,n,o,r,s,a,l,c=e(this).data("ui-resizable"),u=c.options,d=c.element,h=u.containment,p=h instanceof e?h.get(0):/parent/.test(h)?d.parent().get(0):h;p&&(c.containerElement=e(p),/document/.test(h)||h===document?(c.containerOffset={left:0,top:0},c.containerPosition={left:0,top:0},c.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),n=[],e(["Top","Right","Left","Bottom"]).each(function(e,o){n[e]=t(i.css("padding"+o))}),c.containerOffset=i.offset(),c.containerPosition=i.position(),c.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]},o=c.containerOffset,r=c.containerSize.height,s=c.containerSize.width,a=e.ui.hasScroll(p,"left")?p.scrollWidth:s,l=e.ui.hasScroll(p)?p.scrollHeight:r,c.parentData={element:p,left:o.left,top:o.top,width:a,height:l}))},resize:function(t){var i,n,o,r,s=e(this).data("ui-resizable"),a=s.options,l=s.containerOffset,c=s.position,u=s._aspectRatio||t.shiftKey,d={top:0,left:0},h=s.containerElement;h[0]!==document&&/static/.test(h.css("position"))&&(d=l),c.left<(s._helper?l.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-l.left:s.position.left-d.left),u&&(s.size.height=s.size.width/s.aspectRatio),s.position.left=a.helper?l.left:0),c.top<(s._helper?l.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-l.top:s.position.top),u&&(s.size.width=s.size.height*s.aspectRatio),s.position.top=s._helper?l.top:0),s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top,i=Math.abs((s._helper?s.offset.left-d.left:s.offset.left-d.left)+s.sizeDiff.width),n=Math.abs((s._helper?s.offset.top-d.top:s.offset.top-l.top)+s.sizeDiff.height),o=s.containerElement.get(0)===s.element.parent().get(0),r=/relative|absolute/.test(s.containerElement.css("position")),o&&r&&(i-=s.parentData.left),i+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-i,u&&(s.size.height=s.size.width/s.aspectRatio)),n+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-n,u&&(s.size.width=s.size.height*s.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,n=t.containerOffset,o=t.containerPosition,r=t.containerElement,s=e(t.helper),a=s.offset(),l=s.outerWidth()-t.sizeDiff.width,c=s.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(r.css("position"))&&e(this).css({left:a.left-o.left-n.left,width:l,height:c}),t._helper&&!i.animate&&/static/.test(r.css("position"))&&e(this).css({left:a.left-o.left-n.left,width:l,height:c})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,n=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?n(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],n(i.alsoResize)):e.each(i.alsoResize,function(e){n(e)})},resize:function(t,i){var n=e(this).data("ui-resizable"),o=n.options,r=n.originalSize,s=n.originalPosition,a={height:n.size.height-r.height||0,width:n.size.width-r.width||0,top:n.position.top-s.top||0,left:n.position.left-s.left||0},l=function(t,n){e(t).each(function(){var t=e(this),o=e(this).data("ui-resizable-alsoresize"),r={},s=n&&n.length?n:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(s,function(e,t){var i=(o[t]||0)+(a[t]||0);i&&i>=0&&(r[t]=i||null)}),t.css(r)})};"object"!=typeof o.alsoResize||o.alsoResize.nodeType?l(o.alsoResize):e.each(o.alsoResize,function(e,t){l(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,n=t.size,o=t.originalSize,r=t.originalPosition,s=t.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,c=a[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,h=o.width+u,p=o.height+d,f=i.maxWidth&&i.maxWidth<h,m=i.maxHeight&&i.maxHeight<p,g=i.minWidth&&i.minWidth>h,v=i.minHeight&&i.minHeight>p;i.grid=a,g&&(h+=l),v&&(p+=c),f&&(h-=l),m&&(p-=c),/^(se|s|e)$/.test(s)?(t.size.width=h,t.size.height=p):/^(ne)$/.test(s)?(t.size.width=h,t.size.height=p,t.position.top=r.top-d):/^(sw)$/.test(s)?(t.size.width=h,t.size.height=p,t.position.left=r.left-u):(t.size.width=h,t.size.height=p,t.position.top=r.top-d,t.position.left=r.left-u)}})}(jQuery),function(e){e.widget("ui.selectable",e.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,n=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(n.filter,this.element[0]),this._trigger("start",t),e(n.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=e.data(this,"selectable-item");n.startselected=!0,t.metaKey||t.ctrlKey||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",t,{unselecting:n.element}))}),e(t.target).parents().addBack().each(function(){var n,o=e.data(this,"selectable-item");return o?(n=!t.metaKey&&!t.ctrlKey||!o.$element.hasClass("ui-selected"),o.$element.removeClass(n?"ui-unselecting":"ui-selected").addClass(n?"ui-selecting":"ui-unselecting"),o.unselecting=!n,o.selecting=n,o.selected=n,n?i._trigger("selecting",t,{selecting:o.element}):i._trigger("unselecting",t,{unselecting:o.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,n=this,o=this.options,r=this.opos[0],s=this.opos[1],a=t.pageX,l=t.pageY;return r>a&&(i=a,a=r,r=i),s>l&&(i=l,l=s,s=i),this.helper.css({left:r,top:s,width:a-r,height:l-s}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),c=!1;i&&i.element!==n.element[0]&&("touch"===o.tolerance?c=!(i.left>a||i.right<r||i.top>l||i.bottom<s):"fit"===o.tolerance&&(c=i.left>r&&i.right<a&&i.top>s&&i.bottom<l),c?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,n._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var n=e.data(this,"selectable-item");n.$element.removeClass("ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",t,{unselected:n.element})}),e(".ui-selecting",this.element[0]).each(function(){var n=e.data(this,"selectable-item");n.$element.removeClass("ui-selecting").addClass("ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",t,{selected:n.element})}),this._trigger("stop",t),this.helper.remove(),!1}})}(jQuery),function(e){function t(e,t,i){return e>t&&t+i>e}function i(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))}e.widget("ui.sortable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,i){"disabled"===t?(this.options[t]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,i){var n=null,o=!1,r=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,r.widgetName+"-item")===r?(n=e(this),!1):void 0}),e.data(t.target,r.widgetName+"-item")===r&&(n=e(t.target)),n?!this.options.handle||i||(e(this.options.handle,n).find("*").addBack().each(function(){this===t.target&&(o=!0)}),o)?(this.currentItem=n,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,n){var o,r,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",s.cursor),this.storedStylesheet=e("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(r)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,n,o,r,s=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(t.pageY-e(document).scrollTop()<s.scrollSensitivity?a=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(a=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed)),t.pageX-e(document).scrollLeft()<s.scrollSensitivity?a=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(a=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed))),a!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],o=n.item[0],r=this._intersectsWithPointer(n),r&&n.instance===this.currentContainer&&o!==this.currentItem[0]&&this.placeholder[1===r?"next":"prev"]()[0]!==o&&!e.contains(this.placeholder[0],o)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],o):!0)){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var n=this,o=this.placeholder.offset(),r=this.options.axis,s={};r&&"x"!==r||(s.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(s.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){n._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)
32
+ }return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&n.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},i.each(function(){n.push(e(t.item||this).attr(t.attribute||"id")||"")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,r=e.left,s=r+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||n+c>a&&l>n+c,h="y"===this.options.axis||t+u>r&&s>t+u,p=d&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:r<t+this.helperProportions.width/2&&i-this.helperProportions.width/2<s&&a<n+this.helperProportions.height/2&&o-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var i="x"===this.options.axis||t(this.positionAbs.top+this.offset.click.top,e.top,e.height),n="y"===this.options.axis||t(this.positionAbs.left+this.offset.click.left,e.left,e.width),o=i&&n,r=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return o?this.floating?s&&"right"===s||"down"===r?2:1:r&&("down"===r?2:1):!1},_intersectsWithSides:function(e){var i=t(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=t(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),o=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:o&&("down"===o&&i||"up"===o&&!i)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var i,n,o,r,s=[],a=[],l=this._connectWith();if(l&&t)for(i=l.length-1;i>=0;i--)for(o=e(l[i]),n=o.length-1;n>=0;n--)r=e.data(o[n],this.widgetFullName),r&&r!==this&&!r.options.disabled&&a.push([e.isFunction(r.options.items)?r.options.items.call(r.element):e(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(a.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=a.length-1;i>=0;i--)a[i][0].each(function(){s.push(this)});return e(s)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;i<t.length;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,n,o,r,s,a,l,c,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(i=h.length-1;i>=0;i--)for(o=e(h[i]),n=o.length-1;n>=0;n--)r=e.data(o[n],this.widgetFullName),r&&r!==this&&!r.options.disabled&&(d.push([e.isFunction(r.options.items)?r.options.items.call(r.element[0],t,{item:this.currentItem}):e(r.options.items,r.element),r]),this.containers.push(r));for(i=d.length-1;i>=0;i--)for(s=d[i][1],a=d[i][0],n=0,c=a.length;c>n;n++)l=e(a[n]),l.data(this.widgetName+"-item",s),u.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,o,r;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?e(this.options.toleranceElement,n.item):n.item,t||(n.width=o.outerWidth(),n.height=o.outerHeight()),r=o.offset(),n.left=r.left,n.top=r.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)r=this.containers[i].element.offset(),this.containers[i].containerCache.left=r.left,this.containers[i].containerCache.top=r.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,n=t.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=t.currentItem[0].nodeName.toLowerCase(),o=e("<"+n+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?t.currentItem.children().each(function(){e("<td>&#160;</td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(o)}):"img"===n&&o.attr("src",t.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(e,o){(!i||n.forcePlaceholderSize)&&(o.height()||o.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(n){var o,r,s,a,l,c,u,d,h,p,f=null,m=null;for(o=this.containers.length-1;o>=0;o--)if(!e.contains(this.currentItem[0],this.containers[o].element[0]))if(this._intersectsWith(this.containers[o].containerCache)){if(f&&e.contains(this.containers[o].element[0],f.element[0]))continue;f=this.containers[o],m=o}else this.containers[o].containerCache.over&&(this.containers[o]._trigger("out",n,this._uiHash(this)),this.containers[o].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",n,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(s=1e4,a=null,p=f.floating||i(this.currentItem),l=p?"left":"top",c=p?"width":"height",u=this.positionAbs[l]+this.offset.click[l],r=this.items.length-1;r>=0;r--)e.contains(this.containers[m].element[0],this.items[r].item[0])&&this.items[r].item[0]!==this.currentItem[0]&&(!p||t(this.positionAbs.top+this.offset.click.top,this.items[r].top,this.items[r].height))&&(d=this.items[r].item.offset()[l],h=!1,Math.abs(d-u)>Math.abs(d+this.items[r][c]-u)&&(h=!0,d+=this.items[r][c]),Math.abs(d-u)<s&&(s=Math.abs(d-u),a=this.items[r],this.direction=h?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;a?this._rearrange(n,a,null,!0):this._rearrange(n,null,this.containers[m].element,!0),this._trigger("change",n,this._uiHash()),this.containers[m]._trigger("change",n,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",n,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!n[0].style.width||i.forceHelperSize)&&n.width(this.currentItem.width()),(!n[0].style.height||i.forceHelperSize)&&n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,n,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),("document"===o.containment||"window"===o.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===o.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===o.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(t=e(o.containment)[0],i=e(o.containment).offset(),n="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"===t?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:o.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:o.scrollLeft())*n}},_generatePosition:function(t){var i,n,o=this.options,r=t.pageX,s=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(r=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(r=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((s-this.originalPageY)/o.grid[1])*o.grid[1],s=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,n=this.originalPageX+Math.round((r-this.originalPageX)/o.grid[0])*o.grid[0],r=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-o.grid[0]:n+o.grid[0]:n)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!n)})},_clear:function(e,t){this.reverting=!1;var i,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||n.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger("beforeStop",e,this._uiHash()),i=0;i<n.length;i++)n[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!1}if(t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!t){for(i=0;i<n.length;i++)n[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})}(jQuery),function(e,t){var i="ui-effects-";e.effects={effect:{}},/*!
33
+ * jQuery Color Animations v2.1.2
34
+ * https://github.com/jquery/jquery-color
35
+ *
36
+ * Copyright 2013 jQuery Foundation and other contributors
37
+ * Released under the MIT license.
38
+ * http://jquery.org/license
39
+ *
40
+ * Date: Wed Jan 16 08:47:09 2013 -0600
41
+ */
42
+ function(e,t){function i(e,t,i){var n=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=n.floor?~~e:parseFloat(e),isNaN(e)?t.def:n.mod?(e+n.mod)%n.mod:0>e?0:n.max<e?n.max:e)}function n(t){var i=c(),n=i._rgba=[];return t=t.toLowerCase(),f(l,function(e,o){var r,s=o.re.exec(t),a=s&&o.parse(s),l=o.space||"rgba";return a?(r=i[l](a),i[u[l].cache]=r[u[l].cache],n=i._rgba=r._rgba,!1):void 0}),n.length?("0,0,0,0"===n.join()&&e.extend(n,r.transparent),i):r[t]}function o(e,t,i){return i=(i+1)%1,1>6*i?e+(t-e)*i*6:1>2*i?t:2>3*i?e+(t-e)*(2/3-i)*6:e}var r,s="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",a=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],c=e.Color=function(t,i,n,o){return new e.Color.fn.parse(t,i,n,o)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=c.support={},p=e("<p>")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",h.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),c.fn=e.extend(c.prototype,{parse:function(o,s,a,l){if(o===t)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=e(o).css(s),s=t);var d=this,h=e.type(o),p=this._rgba=[];return s!==t&&(o=[o,s,a,l],h="array"),"string"===h?this.parse(n(o)||r._default):"array"===h?(f(u.rgba.props,function(e,t){p[t.idx]=i(o[t.idx],t)}),this):"object"===h?(o instanceof c?f(u,function(e,t){o[t.cache]&&(d[t.cache]=o[t.cache].slice())}):f(u,function(t,n){var r=n.cache;f(n.props,function(e,t){if(!d[r]&&n.to){if("alpha"===e||null==o[e])return;d[r]=n.to(d._rgba)}d[r][t.idx]=i(o[e],t,!0)}),d[r]&&e.inArray(null,d[r].slice(0,3))<0&&(d[r][3]=1,n.from&&(d._rgba=n.from(d[r])))}),this):void 0},is:function(e){var t=c(e),i=!0,n=this;return f(u,function(e,o){var r,s=t[o.cache];return s&&(r=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(e,t){return null!=s[t.idx]?i=s[t.idx]===r[t.idx]:void 0})),i}),i},_space:function(){var e=[],t=this;return f(u,function(i,n){t[n.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var n=c(e),o=n._space(),r=u[o],s=0===this.alpha()?c("transparent"):this,a=s[r.cache]||r.to(s._rgba),l=a.slice();return n=n[r.cache],f(r.props,function(e,o){var r=o.idx,s=a[r],c=n[r],u=d[o.type]||{};null!==c&&(null===s?l[r]=c:(u.mod&&(c-s>u.mod/2?s+=u.mod:s-c>u.mod/2&&(s-=u.mod)),l[r]=i((c-s)*t+s,o)))}),this[o](l)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),o=c(t)._rgba;return c(e.map(i,function(e,t){return(1-n)*o[t]+n*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),n=i.pop();return t&&i.push(~~(255*n)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),c.fn.parse.prototype=c.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,n=e[0]/255,o=e[1]/255,r=e[2]/255,s=e[3],a=Math.max(n,o,r),l=Math.min(n,o,r),c=a-l,u=a+l,d=.5*u;return t=l===a?0:n===a?60*(o-r)/c+360:o===a?60*(r-n)/c+120:60*(n-o)/c+240,i=0===c?0:.5>=d?c/u:c/(2-u),[Math.round(t)%360,i,d,null==s?1:s]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],n=e[2],r=e[3],s=.5>=n?n*(1+i):n+i-n*i,a=2*n-s;return[Math.round(255*o(a,s,t+1/3)),Math.round(255*o(a,s,t)),Math.round(255*o(a,s,t-1/3)),r]},f(u,function(n,o){var r=o.props,s=o.cache,l=o.to,u=o.from;c.fn[n]=function(n){if(l&&!this[s]&&(this[s]=l(this._rgba)),n===t)return this[s].slice();var o,a=e.type(n),d="array"===a||"object"===a?n:arguments,h=this[s].slice();return f(r,function(e,t){var n=d["object"===a?e:t.idx];null==n&&(n=h[t.idx]),h[t.idx]=i(n,t)}),u?(o=c(u(h)),o[s]=h,o):c(h)},f(r,function(t,i){c.fn[t]||(c.fn[t]=function(o){var r,s=e.type(o),l="alpha"===t?this._hsla?"hsla":"rgba":n,c=this[l](),u=c[i.idx];return"undefined"===s?u:("function"===s&&(o=o.call(this,u),s=e.type(o)),null==o&&i.empty?this:("string"===s&&(r=a.exec(o),r&&(o=u+parseFloat(r[2])*("+"===r[1]?1:-1))),c[i.idx]=o,this[l](c)))})})}),c.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,o){var r,s,a="";if("transparent"!==o&&("string"!==e.type(o)||(r=n(o)))){if(o=c(r||o),!h.rgba&&1!==o._rgba[3]){for(s="backgroundColor"===i?t.parentNode:t;(""===a||"transparent"===a)&&s&&s.style;)try{a=e.css(s,"backgroundColor"),s=s.parentNode}catch(l){}o=o.blend(a&&"transparent"!==a?a:"_default")}o=o.toRgbaString()}try{t.style[i]=o}catch(l){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=c(t.elem,i),t.end=c(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},c.hook(s),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,n){t["border"+n+"Color"]=e}),t}},r=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(t){var i,n,o=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,r={};if(o&&o.length&&o[0]&&o[o[0]])for(n=o.length;n--;)i=o[n],"string"==typeof o[i]&&(r[e.camelCase(i)]=o[i]);else for(i in o)"string"==typeof o[i]&&(r[i]=o[i]);return r}function n(t,i){var n,o,s={};for(n in i)o=i[n],t[n]!==o&&(r[n]||(e.fx.step[n]||!isNaN(parseFloat(o)))&&(s[n]=o));return s}var o=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(jQuery.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,r,s,a){var l=e.speed(r,s,a);return this.queue(function(){var r,s=e(this),a=s.attr("class")||"",c=l.children?s.find("*").addBack():s;c=c.map(function(){var t=e(this);return{el:t,start:i(this)}}),r=function(){e.each(o,function(e,i){t[i]&&s[i+"Class"](t[i])})},r(),c=c.map(function(){return this.end=i(this.el[0]),this.diff=n(this.start,this.end),this}),s.attr("class",a),c=c.map(function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()}),e.when.apply(e,c.get()).done(function(){r(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),l.complete.call(s[0])})})},e.fn.extend({addClass:function(t){return function(i,n,o,r){return n?e.effects.animateClass.call(this,{add:i},n,o,r):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,n,o,r){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,o,r):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(i){return function(n,o,r,s,a){return"boolean"==typeof o||o===t?r?e.effects.animateClass.call(this,o?{add:n}:{remove:n},r,s,a):i.apply(this,arguments):e.effects.animateClass.call(this,{toggle:n},o,r,s)}}(e.fn.toggleClass),switchClass:function(t,i,n,o,r){return e.effects.animateClass.call(this,{add:i,remove:t},n,o,r)}})}(),function(){function n(t,i,n,o){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(o=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(o=n,n=i,i={}),e.isFunction(n)&&(o=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=o||i.complete,t}function o(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.10.3",save:function(e,t){for(var n=0;n<t.length;n++)null!==t[n]&&e.data(i+t[n],e[0].style[t[n]])},restore:function(e,n){var o,r;for(r=0;r<n.length;r++)null!==n[r]&&(o=e.data(i+n[r]),o===t&&(o=""),e.css(n[r],o))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:t.width(),height:t.height()},r=document.activeElement;try{r.id}catch(s){r=document.body}return t.wrap(n),(t[0]===r||e.contains(t[0],r))&&e(r).focus(),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(o),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,n,o){return o=o||{},e.each(i,function(e,i){var r=t.cssUnit(i);r[0]>0&&(o[i]=r[0]*n+r[1])}),o}}),e.fn.extend({effect:function(){function t(t){function n(){e.isFunction(r)&&r.call(o[0]),e.isFunction(t)&&t()}var o=e(this),r=i.complete,a=i.mode;(o.is(":hidden")?"hide"===a:"show"===a)?(o[a](),n()):s.call(o[0],i,n)}var i=n.apply(this,arguments),o=i.mode,r=i.queue,s=e.effects.effect[i.effect];return e.fx.off||!s?o?this[o](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):r===!1?this.each(t):this.queue(r||"fx",t)},show:function(e){return function(t){if(o(t))return e.apply(this,arguments);var i=n.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(e.fn.show),hide:function(e){return function(t){if(o(t))return e.apply(this,arguments);var i=n.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(e.fn.hide),toggle:function(e){return function(t){if(o(t)||"boolean"==typeof t)return e.apply(this,arguments);var i=n.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])}),n}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}()}(jQuery),function(e){var t=0,i={},n={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",n.height=n.paddingTop=n.paddingBottom=n.borderTopWidth=n.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e(),content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,n=this.headers.length,o=this.headers.index(t.target),r=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:r=this.headers[(o+1)%n];break;case i.LEFT:case i.UP:r=this.headers[(o-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:r=this.headers[0];break;case i.END:r=this.headers[n-1]}r&&(e(t.target).attr("tabIndex",-1),e(r).attr("tabIndex",0),r.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,n=this.options,o=n.heightStyle,r=this.element.parent(),s=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t);this.active=this._findActive(n.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(t){var i=e(this),n=i.attr("id"),o=i.next(),r=o.attr("id");n||(n=s+"-header-"+t,i.attr("id",n)),r||(r=s+"-panel-"+t,o.attr("id",r)),i.attr("aria-controls",r),o.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===o?(i=r.height(),this.element.siblings(":visible").each(function(){var t=e(this),n=t.css("position");"absolute"!==n&&"fixed"!==n&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===o&&(i=0,this.headers.next().each(function(){i=Math.max(i,e(this).css("height","").height())}).height(i))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,n=this.active,o=e(t.currentTarget),r=o[0]===n[0],s=r&&i.collapsible,a=s?e():o.next(),l=n.next(),c={oldHeader:n,oldPanel:l,newHeader:s?e():o,newPanel:a};t.preventDefault(),r&&!i.collapsible||this._trigger("beforeActivate",t,c)===!1||(i.active=s?!1:this.headers.index(o),this.active=r?e():o,this._toggle(c),n.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),r||(o.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&o.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),o.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,n=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,t):(n.hide(),i.show(),this._toggleComplete(t)),n.attr({"aria-expanded":"false","aria-hidden":"true"}),n.prev().attr("aria-selected","false"),i.length&&n.length?n.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(e,t,o){var r,s,a,l=this,c=0,u=e.length&&(!t.length||e.index()<t.index()),d=this.options.animate||{},h=u&&d.down||d,p=function(){l._toggleComplete(o)};return"number"==typeof h&&(a=h),"string"==typeof h&&(s=h),s=s||h.easing||d.easing,a=a||h.duration||d.duration,t.length?e.length?(r=e.show().outerHeight(),t.animate(i,{duration:a,easing:s,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(n,{duration:a,easing:s,complete:p,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?c+=i.now:"content"!==l.options.heightStyle&&(i.now=Math.round(r-t.outerHeight()-c),c=0)}}),void 0):t.animate(i,a,s,p):e.animate(n,a,s,p)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})}(jQuery),function(e){var t=0;e.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,i,n,o=this.element[0].nodeName.toLowerCase(),r="textarea"===o,s="input"===o;this.isMultiLine=r?!0:s?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[r||s?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(o){if(this.element.prop("readOnly"))return t=!0,n=!0,i=!0,void 0;t=!1,n=!1,i=!1;var r=e.ui.keyCode;switch(o.keyCode){case r.PAGE_UP:t=!0,this._move("previousPage",o);break;case r.PAGE_DOWN:t=!0,this._move("nextPage",o);break;case r.UP:t=!0,this._keyEvent("previous",o);break;case r.DOWN:t=!0,this._keyEvent("next",o);break;case r.ENTER:case r.NUMPAD_ENTER:this.menu.active&&(t=!0,o.preventDefault(),this.menu.select(o));break;case r.TAB:this.menu.active&&this.menu.select(o);break;case r.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}},keypress:function(n){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&n.preventDefault(),void 0;if(!i){var o=e.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move("previousPage",n);break;case o.PAGE_DOWN:this._move("nextPage",n);break;case o.UP:this._keyEvent("previous",n);break;case o.DOWN:this._keyEvent("next",n)}}},input:function(e){return n?(n=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(n){n.target===t.element[0]||n.target===i||e.contains(i,n.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0;var n=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:n})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,o){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){o(e)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var e=this,i=++t;return function(n){i===t&&e.__response(n),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")}},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,function(e,i){n._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(jQuery),function(e){var t,i,n,o,r="ui-button ui-widget ui-state-default ui-corner-all",s="ui-state-hover ui-state-active ",a="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",l=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},c=function(t){var i=t.name,n=t.form,o=e([]);return i&&(i=i.replace(/'/g,"\\'"),o=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),o};e.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,l),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var s=this,a=this.options,u="checkbox"===this.type||"radio"===this.type,d=u?"":"ui-state-active",h="ui-state-focus";null===a.label&&(a.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(r).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){a.disabled||this===t&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){a.disabled||e(this).removeClass(d)}).bind("click"+this.eventNamespace,function(e){a.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){s.buttonElement.addClass(h)}).bind("blur"+this.eventNamespace,function(){s.buttonElement.removeClass(h)}),u&&(this.element.bind("change"+this.eventNamespace,function(){o||s.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(e){a.disabled||(o=!1,i=e.pageX,n=e.pageY)}).bind("mouseup"+this.eventNamespace,function(e){a.disabled||(i!==e.pageX||n!==e.pageY)&&(o=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return a.disabled||o?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(a.disabled||o)return!1;e(this).addClass("ui-state-active"),s.buttonElement.attr("aria-pressed","true");var t=s.element[0];c(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return a.disabled?!1:(e(this).addClass("ui-state-active"),t=this,s.document.one("mouseup",function(){t=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return a.disabled?!1:(e(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(t){return a.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),void 0)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",a.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(r+" "+s+" "+a).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")
43
+ },_setOption:function(e,t){return this._super(e,t),"disabled"===e?(t?this.element.prop("disabled",!0):this.element.prop("disabled",!1),void 0):(this._resetButton(),void 0)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?c(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var t=this.buttonElement.removeClass(a),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),n=this.options.icons,o=n.primary&&n.secondary,r=[];n.primary||n.secondary?(this.options.text&&r.push("ui-button-text-icon"+(o?"s":n.primary?"-primary":"-secondary")),n.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(r.push(o?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):r.push("ui-button-text-only"),t.addClass(r.join(" "))}}),e.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(e,t){function i(){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},e.extend(this._defaults,this.regional[""]),this.dpDiv=n(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){e.datepicker._isDisabledDatepicker(r.inline?t.parent()[0]:r.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))})}function o(t,i){e.extend(t,i);for(var n in i)null==i[n]&&(t[n]=i[n]);return t}e.extend(e.ui,{datepicker:{version:"1.10.3"}});var r,s="datepicker";e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return o(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var n,o,r;n=t.nodeName.toLowerCase(),o="div"===n||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),r=this._newInst(e(t),o),r.settings=e.extend({},i||{}),"input"===n?this._connectDatepicker(t,r):o&&this._inlineDatepicker(t,r)},_newInst:function(t,i){var o=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:o,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,s,i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var n,o,r,s=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),s&&(i.append=e("<span class='"+this._appendClass+"'>"+s+"</span>"),t[a?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&t.focus(this._showDatepicker),("button"===n||"both"===n)&&(o=this._get(i,"buttonText"),r=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:r,alt:o,title:o}):e("<button type='button'></button>").addClass(this._triggerClass).html(r?e("<img/>").attr({src:r,alt:o,title:o}):o)),t[a?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,o,r=new Date(2009,11,20),s=this._get(e,"dateFormat");s.match(/[DM]/)&&(t=function(e){for(i=0,n=0,o=0;o<e.length;o++)e[o].length>i&&(i=e[o].length,n=o);return n},r.setMonth(t(this._get(e,s.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,s,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,n,r,a){var l,c,u,d,h,p=this._dialogInst;return p||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+l+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],s,p)),o(p.settings,r||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(c=document.documentElement.clientWidth,u=document.documentElement.clientHeight,d=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+d,u/2-150+h]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],s,p),this},_destroyDatepicker:function(t){var i,n=e(t),o=e.data(t,s);n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,s),"input"===i?(o.append.remove(),o.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,n,o=e(t),r=e.data(t,s);o.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,r.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=o.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,o=e(t),r=e.data(t,s);o.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,r.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=o.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,s)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,n,r){var s,a,l,c,u=this._getInst(i);return 2===arguments.length&&"string"==typeof n?"defaults"===n?e.extend({},e.datepicker._defaults):u?"all"===n?e.extend({},u.settings):this._get(u,n):null:(s=n||{},"string"==typeof n&&(s={},s[n]=r),u&&(this._curInst===u&&this._hideDatepicker(),a=this._getDateDatepicker(i,!0),l=this._getMinMaxDate(u,"min"),c=this._getMinMaxDate(u,"max"),o(u.settings,s),null!==l&&s.dateFormat!==t&&s.minDate===t&&(u.settings.minDate=this._formatDate(u,l)),null!==c&&s.dateFormat!==t&&s.maxDate===t&&(u.settings.maxDate=this._formatDate(u,c)),"disabled"in s&&(s.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),u),this._autoSize(u),this._setDate(u,a),this._updateAlternate(u),this._updateDatepicker(u)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,n,o,r=e.datepicker._getInst(t.target),s=!0,a=r.dpDiv.is(".ui-datepicker-rtl");if(r._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),s=!1;break;case 13:return o=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",r.dpDiv),o[0]&&e.datepicker._selectDay(t.target,r.selectedMonth,r.selectedYear,o[0]),i=e.datepicker._get(r,"onSelect"),i?(n=e.datepicker._formatDate(r),i.apply(r.input?r.input[0]:null,[n,r])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,"stepBigMonths"):-e.datepicker._get(r,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,"stepBigMonths"):+e.datepicker._get(r,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),s=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),s=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?1:-1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,"stepBigMonths"):-e.datepicker._get(r,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),s=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?-1:1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,"stepBigMonths"):+e.datepicker._get(r,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),s=t.ctrlKey||t.metaKey;break;default:s=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):s=!1;s&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,n,o=e.datepicker._getInst(t.target);return e.datepicker._get(o,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">n||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(t){var i,n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n)),i&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(o){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,r,s,a,l,c;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),r=n?n.apply(t,[t,i]):{},r!==!1&&(o(i.settings,r),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),s=!1,e(t).parents().each(function(){return s|="fixed"===e(this).css("position"),!s}),a={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),a=e.datepicker._checkOffset(i,a,s),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":s?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),c):i.dpDiv[l||"show"](l?c:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,r=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,n=this._getNumberOfMonths(t),o=n[1],s=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&t.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",s*o+"em"),t.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,n){var o=t.dpDiv.outerWidth(),r=t.dpDiv.outerHeight(),s=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?o-s:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+a?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+o>l&&l>o?Math.abs(i.left+o-l):0),i.top-=Math.min(i.top,i.top+r>c&&c>r?Math.abs(r+a):0),i},_findPos:function(t){for(var i,n=this._getInst(t),o=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[o?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,n,o,r,a=this._curInst;!a||t&&a!==e.data(t,s)||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),o=function(){e.datepicker._tidyDialog(a)},e.effects&&(e.effects.effect[i]||e.effects[i])?a.dpDiv.hide(i,e.datepicker._get(a,"showOptions"),n,o):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,o),i||o(),this._datepickerShowing=!1,r=this._get(a,"onClose"),r&&r.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==n)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var o=e(t),r=this._getInst(o[0]);this._isDisabledDatepicker(o[0])||(this._adjustInstDate(r,i+("M"===n?this._get(r,"showCurrentAtPos"):0),n),this._updateDatepicker(r))},_gotoToday:function(t){var i,n=e(t),o=this._getInst(n[0]);this._get(o,"gotoCurrent")&&o.currentDay?(o.selectedDay=o.currentDay,o.drawMonth=o.selectedMonth=o.currentMonth,o.drawYear=o.selectedYear=o.currentYear):(i=new Date,o.selectedDay=i.getDate(),o.drawMonth=o.selectedMonth=i.getMonth(),o.drawYear=o.selectedYear=i.getFullYear()),this._notifyChange(o),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var o=e(t),r=this._getInst(o[0]);r["selected"+("M"===n?"Month":"Year")]=r["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(o)},_selectDay:function(t,i,n,o){var r,s=e(t);e(o).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(r=this._getInst(s[0]),r.selectedDay=r.currentDay=e("a",o).html(),r.selectedMonth=r.currentMonth=i,r.selectedYear=r.currentYear=n,this._selectDate(t,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var n,o=e(t),r=this._getInst(o[0]);i=null!=i?i:this._formatDate(r),r.input&&r.input.val(i),this._updateAlternate(r),n=this._get(r,"onSelect"),n?n.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,n,o,r=this._get(t,"altField");r&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),o=this.formatDate(i,n,this._getFormatConfig(t)),e(r).each(function(){e(this).val(o)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,n){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var o,r,s,a,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,h=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,b=-1,y=!1,_=function(e){var i=o+1<t.length&&t.charAt(o+1)===e;return i&&o++,i},C=function(e){var t=_(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,o=new RegExp("^\\d{1,"+n+"}"),r=i.substring(l).match(o);if(!r)throw"Missing number at position "+l;return l+=r[0].length,parseInt(r[0],10)},x=function(t,n,o){var r=-1,s=e.map(_(t)?o:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(s,function(e,t){var n=t[1];return i.substr(l,n.length).toLowerCase()===n.toLowerCase()?(r=t[0],l+=n.length,!1):void 0}),-1!==r)return r+1;throw"Unknown name at position "+l},w=function(){if(i.charAt(l)!==t.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;o<t.length;o++)if(y)"'"!==t.charAt(o)||_("'")?w():y=!1;else switch(t.charAt(o)){case"d":v=C("d");break;case"D":x("D",d,h);break;case"o":b=C("o");break;case"m":g=C("m");break;case"M":g=x("M",p,f);break;case"y":m=C("y");break;case"@":a=new Date(C("@")),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((C("!")-this._ticksTo1970)/1e4),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"'":_("'")?w():y=!0;break;default:w()}if(l<i.length&&(s=i.substr(l),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),b>-1)for(g=1,v=b;;){if(r=this._getDaysInMonth(m,g-1),r>=v)break;g++,v-=r}if(a=this._daylightSavingAdjust(new Date(m,g-1,v)),a.getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw"Invalid date";return a},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:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";var n,o=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,s=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},c=function(e,t,i){var n=""+t;if(l(e))for(;n.length<i;)n="0"+n;return n},u=function(e,t,i,n){return l(e)?n[t]:i[t]},d="",h=!1;if(t)for(n=0;n<e.length;n++)if(h)"'"!==e.charAt(n)||l("'")?d+=e.charAt(n):h=!1;else switch(e.charAt(n)){case"d":d+=c("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),o,r);break;case"o":d+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=c("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),s,a);break;case"y":d+=l("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?d+="'":h=!0;break;default:d+=e.charAt(n)}return d},_possibleChars:function(e){var t,i="",n=!1,o=function(i){var n=t+1<e.length&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;t<e.length;t++)if(n)"'"!==e.charAt(t)||o("'")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":o("'")?i+="'":n=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,o=this._getDefaultDate(e),r=o,s=this._getFormatConfig(e);try{r=this.parseDate(i,n,s)||o}catch(a){n=t?"":n}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=n?r.getDate():0,e.currentMonth=n?r.getMonth():0,e.currentYear=n?r.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,n){var o=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},r=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(n){}for(var o=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,r=o.getFullYear(),s=o.getMonth(),a=o.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=l.exec(i);c;){switch(c[2]||"d"){case"d":case"D":a+=parseInt(c[1],10);break;case"w":case"W":a+=7*parseInt(c[1],10);break;case"m":case"M":s+=parseInt(c[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(r,s));break;case"y":case"Y":r+=parseInt(c[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(r,s))}c=l.exec(i)}return new Date(r,s,a)},s=null==i||""===i?n:"string"==typeof i?r(i):"number"==typeof i?isNaN(i)?n:o(i):new Date(i.getTime());return s=s&&"Invalid Date"===s.toString()?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,o=e.selectedMonth,r=e.selectedYear,s=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=s.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=s.getMonth(),e.drawYear=e.selectedYear=e.currentYear=s.getFullYear(),o===e.selectedMonth&&r===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,"M")},next:function(){e.datepicker._adjustDate(n,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,n,o,r,s,a,l,c,u,d,h,p,f,m,g,v,b,y,_,C,x,w,k,T,D,S,E,N,A,P,M,I,H,B,R,O,L,j,F=new Date,z=this._daylightSavingAdjust(new Date(F.getFullYear(),F.getMonth(),F.getDate())),q=this._get(e,"isRTL"),W=this._get(e,"showButtonPanel"),U=this._get(e,"hideIfNoPrevNext"),$=this._get(e,"navigationAsDateFormat"),V=this._getNumberOfMonths(e),K=this._get(e,"showCurrentAtPos"),Y=this._get(e,"stepMonths"),X=1!==V[0]||1!==V[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(e,"min"),Z=this._getMinMaxDate(e,"max"),J=e.drawMonth-K,et=e.drawYear;if(0>J&&(J+=12,et--),Z)for(t=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-V[0]*V[1]+1,Z.getDate())),t=Q&&Q>t?Q:t;this._daylightSavingAdjust(new Date(et,J,1))>t;)J--,0>J&&(J=11,et--);for(e.drawMonth=J,e.drawYear=et,i=this._get(e,"prevText"),i=$?this.formatDate(i,this._daylightSavingAdjust(new Date(et,J-Y,1)),this._getFormatConfig(e)):i,n=this._canAdjustMonth(e,-1,et,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"e":"w")+"'>"+i+"</span></a>":U?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"e":"w")+"'>"+i+"</span></a>",o=this._get(e,"nextText"),o=$?this.formatDate(o,this._daylightSavingAdjust(new Date(et,J+Y,1)),this._getFormatConfig(e)):o,r=this._canAdjustMonth(e,1,et,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"w":"e")+"'>"+o+"</span></a>":U?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"w":"e")+"'>"+o+"</span></a>",s=this._get(e,"currentText"),a=this._get(e,"gotoCurrent")&&e.currentDay?G:z,s=$?this.formatDate(s,a,this._getFormatConfig(e)):s,l=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",c=W?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(q?l:"")+(this._isInRange(e,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(q?"":l)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),h=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),b=this._get(e,"selectOtherMonths"),y=this._getDefaultDate(e),_="",x=0;x<V[0];x++){for(w="",this.maxRows=4,k=0;k<V[1];k++){if(T=this._daylightSavingAdjust(new Date(et,J,e.selectedDay)),D=" ui-corner-all",S="",X){if(S+="<div class='ui-datepicker-group",V[1]>1)switch(k){case 0:S+=" ui-datepicker-group-first",D=" ui-corner-"+(q?"right":"left");break;case V[1]-1:S+=" ui-datepicker-group-last",D=" ui-corner-"+(q?"left":"right");break;default:S+=" ui-datepicker-group-middle",D=""}S+="'>"}for(S+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+D+"'>"+(/all|left/.test(D)&&0===x?q?r:n:"")+(/all|right/.test(D)&&0===x?q?n:r:"")+this._generateMonthYearHeader(e,J,et,Q,Z,x>0||k>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",E=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",C=0;7>C;C++)N=(C+u)%7,E+="<th"+((C+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+h[N]+"'>"+p[N]+"</span></th>";for(S+=E+"</tr></thead><tbody>",A=this._getDaysInMonth(et,J),et===e.selectedYear&&J===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),P=(this._getFirstDayOfMonth(et,J)-u+7)%7,M=Math.ceil((P+A)/7),I=X?this.maxRows>M?this.maxRows:M:M,this.maxRows=I,H=this._daylightSavingAdjust(new Date(et,J,1-P)),B=0;I>B;B++){for(S+="<tr>",R=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(H)+"</td>":"",C=0;7>C;C++)O=g?g.apply(e.input?e.input[0]:null,[H]):[!0,""],L=H.getMonth()!==J,j=L&&!b||!O[0]||Q&&Q>H||Z&&H>Z,R+="<td class='"+((C+u+6)%7>=5?" ui-datepicker-week-end":"")+(L?" ui-datepicker-other-month":"")+(H.getTime()===T.getTime()&&J===e.selectedMonth&&e._keyEvent||y.getTime()===H.getTime()&&y.getTime()===T.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(L&&!v?"":" "+O[1]+(H.getTime()===G.getTime()?" "+this._currentClass:"")+(H.getTime()===z.getTime()?" ui-datepicker-today":""))+"'"+(L&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(L&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+H.getDate()+"</span>":"<a class='ui-state-default"+(H.getTime()===z.getTime()?" ui-state-highlight":"")+(H.getTime()===G.getTime()?" ui-state-active":"")+(L?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);
44
+ S+=R+"</tr>"}J++,J>11&&(J=0,et++),S+="</tbody></table>"+(X?"</div>"+(V[0]>0&&k===V[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=S}_+=w}return _+=c,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,n,o,r,s,a){var l,c,u,d,h,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),b=this._get(e,"showMonthAfterYear"),y="<div class='ui-datepicker-title'>",_="";if(r||!g)_+="<span class='ui-datepicker-month'>"+s[t]+"</span>";else{for(l=n&&n.getFullYear()===i,c=o&&o.getFullYear()===i,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!l||u>=n.getMonth())&&(!c||u<=o.getMonth())&&(_+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+a[u]+"</option>");_+="</select>"}if(b||(y+=_+(!r&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",r||!v)y+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(d=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=n?Math.max(f,n.getFullYear()):f,m=o?Math.min(m,o.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",y+=e.yearshtml,e.yearshtml=null}return y+=this._get(e,"yearSuffix"),b&&(y+=(!r&&g&&v?"":"&#xa0;")+_),y+="</div>"},_adjustInstDate:function(e,t,i){var n=e.drawYear+("Y"===i?t:0),o=e.drawMonth+("M"===i?t:0),r=Math.min(e.selectedDay,this._getDaysInMonth(n,o))+("D"===i?t:0),s=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,o,r)));e.selectedDay=s.getDate(),e.drawMonth=e.selectedMonth=s.getMonth(),e.drawYear=e.selectedYear=s.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),o=i&&i>t?i:t;return n&&o>n?n:o},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var o=this._getNumberOfMonths(e),r=this._daylightSavingAdjust(new Date(i,n+(0>t?t:o[0]*o[1]),1));return 0>t&&r.setDate(this._getDaysInMonth(r.getFullYear(),r.getMonth())),this._isInRange(e,r)},_isInRange:function(e,t){var i,n,o=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),s=null,a=null,l=this._get(e,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),s=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(s+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!o||t.getTime()>=o.getTime())&&(!r||t.getTime()<=r.getTime())&&(!s||t.getFullYear()>=s)&&(!a||t.getFullYear()<=a)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var o=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),o,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.3"}(jQuery),function(e){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i=this;this._isOpen&&this._trigger("beforeClose",t)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||e(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",e),i},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._trigger("open"),void 0)},_focusTabbable:function(){var e=this.element.find("[autofocus]");e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0;if(t.keyCode===e.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),o=i.filter(":last");t.target!==o[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==n[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(o.focus(1),t.preventDefault()):(n.focus(1),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(e.each(i,function(i,n){var o,r;n=e.isFunction(n)?{click:n,text:i}:n,n=e.extend({type:"button"},n),o=n.click,n.click=function(){o.apply(t.element[0],arguments)},r={icons:n.icons,text:n.showText},delete n.icons,delete n.showText,e("<button></button>",n).button(r).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,o){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,t(o))},drag:function(e,n){i._trigger("drag",e,t(n))},stop:function(o,r){n.position=[r.position.left-i.document.scrollLeft(),r.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",o,t(r))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,n=this.options,o=n.resizable,r=this.uiDialog.css("position"),s="string"==typeof o?o:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:s,start:function(n,o){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,t(o))},resize:function(e,n){i._trigger("resize",e,t(n))},stop:function(o,r){n.height=e(this).height(),n.width=e(this).width(),e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",o,t(r))}}).css("position",r)},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(n){var o=this,r=!1,s={};e.each(n,function(e,n){o._setOption(e,n),e in t&&(r=!0),e in i&&(s[e]=n)}),r&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(e,t){var i,n,o=this.uiDialog;"dialogClass"===e&&o.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=o.is(":data(ui-draggable)"),i&&!t&&o.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!t&&o.resizable("destroy"),n&&"string"==typeof t&&o.resizable("option","handles",t),n||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),e=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),t=Math.max(0,n.minHeight-e),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-e):"none","auto"===n.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;e.ui.dialog.overlayInstances||this._delay(function(){e.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(n){t._allowInteraction(n)||(n.preventDefault(),e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),e.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(e.ui.dialog.overlayInstances--,e.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayInstances=0,e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t,i=this.options.position,n=[],o=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(n=i.split?i.split(" "):[i[0],i[1]],1===n.length&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(o[e]=n[e],n[e]=t)}),i={my:n[0]+(o[0]<0?o[0]:"+"+o[0])+" "+n[1]+(o[1]<0?o[1]:"+"+o[1]),at:n.join(" ")}),i=e.extend({},e.ui.dialog.prototype.options.position,i)):i=e.ui.dialog.prototype.options.position,t=this.uiDialog.is(":visible"),t||this.uiDialog.show(),this.uiDialog.position(i),t||this.uiDialog.hide()}})}(jQuery),function(e){var t=/up|down|vertical/,i=/up|left|vertical|horizontal/;e.effects.effect.blind=function(n,o){var r,s,a,l=e(this),c=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(l,n.mode||"hide"),d=n.direction||"up",h=t.test(d),p=h?"height":"width",f=h?"top":"left",m=i.test(d),g={},v="show"===u;l.parent().is(".ui-effects-wrapper")?e.effects.save(l.parent(),c):e.effects.save(l,c),l.show(),r=e.effects.createWrapper(l).css({overflow:"hidden"}),s=r[p](),a=parseFloat(r.css(f))||0,g[p]=v?s:0,m||(l.css(h?"bottom":"right",0).css(h?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:s+a),v&&(r.css(p,0),m||r.css(f,a+s)),r.animate(g,{duration:n.duration,easing:n.easing,queue:!1,complete:function(){"hide"===u&&l.hide(),e.effects.restore(l,c),e.effects.removeWrapper(l),o()}})}}(jQuery),function(e){e.effects.effect.bounce=function(t,i){var n,o,r,s=e(this),a=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(s,t.mode||"effect"),c="hide"===l,u="show"===l,d=t.direction||"up",h=t.distance,p=t.times||5,f=2*p+(u||c?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",b="up"===d||"left"===d,y=s.queue(),_=y.length;for((u||c)&&a.push("opacity"),e.effects.save(s,a),s.show(),e.effects.createWrapper(s),h||(h=s["top"===v?"outerHeight":"outerWidth"]()/3),u&&(r={opacity:1},r[v]=0,s.css("opacity",0).css(v,b?2*-h:2*h).animate(r,m,g)),c&&(h/=Math.pow(2,p-1)),r={},r[v]=0,n=0;p>n;n++)o={},o[v]=(b?"-=":"+=")+h,s.animate(o,m,g).animate(r,m,g),h=c?2*h:h/2;c&&(o={opacity:0},o[v]=(b?"-=":"+=")+h,s.animate(o,m,g)),s.queue(function(){c&&s.hide(),e.effects.restore(s,a),e.effects.removeWrapper(s),i()}),_>1&&y.splice.apply(y,[1,0].concat(y.splice(_,f+1))),s.dequeue()}}(jQuery),function(e){e.effects.effect.clip=function(t,i){var n,o,r,s=e(this),a=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(s,t.mode||"hide"),c="show"===l,u=t.direction||"vertical",d="vertical"===u,h=d?"height":"width",p=d?"top":"left",f={};e.effects.save(s,a),s.show(),n=e.effects.createWrapper(s).css({overflow:"hidden"}),o="IMG"===s[0].tagName?n:s,r=o[h](),c&&(o.css(h,0),o.css(p,r/2)),f[h]=c?r:0,f[p]=c?0:r/2,o.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){c||s.hide(),e.effects.restore(s,a),e.effects.removeWrapper(s),i()}})}}(jQuery),function(e){e.effects.effect.drop=function(t,i){var n,o=e(this),r=["position","top","bottom","left","right","opacity","height","width"],s=e.effects.setMode(o,t.mode||"hide"),a="show"===s,l=t.direction||"left",c="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l?"pos":"neg",d={opacity:a?1:0};e.effects.save(o,r),o.show(),e.effects.createWrapper(o),n=t.distance||o["top"===c?"outerHeight":"outerWidth"](!0)/2,a&&o.css("opacity",0).css(c,"pos"===u?-n:n),d[c]=(a?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+n,o.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===s&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})}}(jQuery),function(e){e.effects.effect.explode=function(t,i){function n(){y.push(this),y.length===d*h&&o()}function o(){p.css({visibility:"visible"}),e(y).remove(),m||p.hide(),i()}var r,s,a,l,c,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/h),b=Math.ceil(p.outerHeight()/d),y=[];for(r=0;d>r;r++)for(l=g.top+r*b,u=r-(d-1)/2,s=0;h>s;s++)a=g.left+s*v,c=s-(h-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*v,top:-r*b}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:b,left:a+(m?c*v:0),top:l+(m?u*b:0),opacity:m?0:1}).animate({left:a+(m?0:c*v),top:l+(m?0:u*b),opacity:m?1:0},t.duration||500,t.easing,n)}}(jQuery),function(e){e.effects.effect.fade=function(t,i){var n=e(this),o=e.effects.setMode(n,t.mode||"toggle");n.animate({opacity:o},{queue:!1,duration:t.duration,easing:t.easing,complete:i})}}(jQuery),function(e){e.effects.effect.fold=function(t,i){var n,o,r=e(this),s=["position","top","bottom","left","right","height","width"],a=e.effects.setMode(r,t.mode||"hide"),l="show"===a,c="hide"===a,u=t.size||15,d=/([0-9]+)%/.exec(u),h=!!t.horizFirst,p=l!==h,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(r,s),r.show(),n=e.effects.createWrapper(r).css({overflow:"hidden"}),o=p?[n.width(),n.height()]:[n.height(),n.width()],d&&(u=parseInt(d[1],10)/100*o[c?0:1]),l&&n.css(h?{height:0,width:u}:{height:u,width:0}),g[f[0]]=l?o[0]:u,v[f[1]]=l?o[1]:0,n.animate(g,m,t.easing).animate(v,m,t.easing,function(){c&&r.hide(),e.effects.restore(r,s),e.effects.removeWrapper(r),i()})}}(jQuery),function(e){e.effects.effect.highlight=function(t,i){var n=e(this),o=["backgroundImage","backgroundColor","opacity"],r=e.effects.setMode(n,t.mode||"show"),s={backgroundColor:n.css("backgroundColor")};"hide"===r&&(s.opacity=0),e.effects.save(n,o),n.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&n.hide(),e.effects.restore(n,o),i()}})}}(jQuery),function(e){e.effects.effect.pulsate=function(t,i){var n,o=e(this),r=e.effects.setMode(o,t.mode||"show"),s="show"===r,a="hide"===r,l=s||"hide"===r,c=2*(t.times||5)+(l?1:0),u=t.duration/c,d=0,h=o.queue(),p=h.length;for((s||!o.is(":visible"))&&(o.css("opacity",0).show(),d=1),n=1;c>n;n++)o.animate({opacity:d},u,t.easing),d=1-d;o.animate({opacity:d},u,t.easing),o.queue(function(){a&&o.hide(),i()}),p>1&&h.splice.apply(h,[1,0].concat(h.splice(p,c+1))),o.dequeue()}}(jQuery),function(e){e.effects.effect.puff=function(t,i){var n=e(this),o=e.effects.setMode(n,t.mode||"hide"),r="hide"===o,s=parseInt(t.percent,10)||150,a=s/100,l={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:o,complete:i,percent:r?s:100,from:r?l:{height:l.height*a,width:l.width*a,outerHeight:l.outerHeight*a,outerWidth:l.outerWidth*a}}),n.effect(t)},e.effects.effect.scale=function(t,i){var n=e(this),o=e.extend(!0,{},t),r=e.effects.setMode(n,t.mode||"effect"),s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===r?0:100),a=t.direction||"both",l=t.origin,c={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()},u={y:"horizontal"!==a?s/100:1,x:"vertical"!==a?s/100:1};o.effect="size",o.queue=!1,o.complete=i,"effect"!==r&&(o.origin=l||["middle","center"],o.restore=!0),o.from=t.from||("show"===r?{height:0,width:0,outerHeight:0,outerWidth:0}:c),o.to={height:c.height*u.y,width:c.width*u.x,outerHeight:c.outerHeight*u.y,outerWidth:c.outerWidth*u.x},o.fade&&("show"===r&&(o.from.opacity=0,o.to.opacity=1),"hide"===r&&(o.from.opacity=1,o.to.opacity=0)),n.effect(o)},e.effects.effect.size=function(t,i){var n,o,r,s=e(this),a=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],c=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(s,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=s.css("position"),b=f?a:l,y={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&s.show(),n={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},"toggle"===t.mode&&"show"===p?(s.from=t.to||y,s.to=t.from||n):(s.from=t.from||("show"===p?y:n),s.to=t.to||("hide"===p?y:n)),r={from:{y:s.from.height/n.height,x:s.from.width/n.width},to:{y:s.to.height/n.height,x:s.to.width/n.width}},("box"===m||"both"===m)&&(r.from.y!==r.to.y&&(b=b.concat(d),s.from=e.effects.setTransition(s,d,r.from.y,s.from),s.to=e.effects.setTransition(s,d,r.to.y,s.to)),r.from.x!==r.to.x&&(b=b.concat(h),s.from=e.effects.setTransition(s,h,r.from.x,s.from),s.to=e.effects.setTransition(s,h,r.to.x,s.to))),("content"===m||"both"===m)&&r.from.y!==r.to.y&&(b=b.concat(u).concat(c),s.from=e.effects.setTransition(s,u,r.from.y,s.from),s.to=e.effects.setTransition(s,u,r.to.y,s.to)),e.effects.save(s,b),s.show(),e.effects.createWrapper(s),s.css("overflow","hidden").css(s.from),g&&(o=e.effects.getBaseline(g,n),s.from.top=(n.outerHeight-s.outerHeight())*o.y,s.from.left=(n.outerWidth-s.outerWidth())*o.x,s.to.top=(n.outerHeight-s.to.outerHeight)*o.y,s.to.left=(n.outerWidth-s.to.outerWidth)*o.x),s.css(s.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),h=h.concat(["marginLeft","marginRight"]),c=a.concat(d).concat(h),s.find("*[width]").each(function(){var i=e(this),n={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&e.effects.save(i,c),i.from={height:n.height*r.from.y,width:n.width*r.from.x,outerHeight:n.outerHeight*r.from.y,outerWidth:n.outerWidth*r.from.x},i.to={height:n.height*r.to.y,width:n.width*r.to.x,outerHeight:n.height*r.to.y,outerWidth:n.width*r.to.x},r.from.y!==r.to.y&&(i.from=e.effects.setTransition(i,d,r.from.y,i.from),i.to=e.effects.setTransition(i,d,r.to.y,i.to)),r.from.x!==r.to.x&&(i.from=e.effects.setTransition(i,h,r.from.x,i.from),i.to=e.effects.setTransition(i,h,r.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,c)})})),s.animate(s.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===s.to.opacity&&s.css("opacity",s.from.opacity),"hide"===p&&s.hide(),e.effects.restore(s,b),f||("static"===v?s.css({position:"relative",top:s.to.top,left:s.to.left}):e.each(["top","left"],function(e,t){s.css(t,function(t,i){var n=parseInt(i,10),o=e?s.to.left:s.to.top;return"auto"===i?o+"px":n+o+"px"})})),e.effects.removeWrapper(s),i()}})}}(jQuery),function(e){e.effects.effect.shake=function(t,i){var n,o=e(this),r=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(o,t.mode||"effect"),a=t.direction||"left",l=t.distance||20,c=t.times||3,u=2*c+1,d=Math.round(t.duration/u),h="up"===a||"down"===a?"top":"left",p="up"===a||"left"===a,f={},m={},g={},v=o.queue(),b=v.length;for(e.effects.save(o,r),o.show(),e.effects.createWrapper(o),f[h]=(p?"-=":"+=")+l,m[h]=(p?"+=":"-=")+2*l,g[h]=(p?"-=":"+=")+2*l,o.animate(f,d,t.easing),n=1;c>n;n++)o.animate(m,d,t.easing).animate(g,d,t.easing);o.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===s&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}),b>1&&v.splice.apply(v,[1,0].concat(v.splice(b,u+1))),o.dequeue()}}(jQuery),function(e){e.effects.effect.slide=function(t,i){var n,o=e(this),r=["position","top","bottom","left","right","width","height"],s=e.effects.setMode(o,t.mode||"show"),a="show"===s,l=t.direction||"left",c="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l,d={};e.effects.save(o,r),o.show(),n=t.distance||o["top"===c?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(o).css({overflow:"hidden"}),a&&o.css(c,u?isNaN(n)?"-"+n:-n:n),d[c]=(a?u?"+=":"-=":u?"-=":"+=")+n,o.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===s&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})}}(jQuery),function(e){e.effects.effect.transfer=function(t,i){var n=e(this),o=e(t.to),r="fixed"===o.css("position"),s=e("body"),a=r?s.scrollTop():0,l=r?s.scrollLeft():0,c=o.offset(),u={top:c.top-a,left:c.left-l,height:o.innerHeight(),width:o.innerWidth()},d=n.offset(),h=e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:d.top-a,left:d.left-l,height:n.innerHeight(),width:n.innerWidth(),position:r?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){h.remove(),i()})}}(jQuery),function(e){e.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var i=e(t.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(t),i.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=e(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,o,r,s,a,l=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:l=!1,o=this.previousFilter||"",r=String.fromCharCode(t.keyCode),s=!1,clearTimeout(this.filterTimer),r===o?s=!0:r=o+r,a=new RegExp("^"+i(r),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(e(this).children("a").text())}),n=s&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(r=String.fromCharCode(t.keyCode),a=new RegExp("^"+i(r),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(e(this).children("a").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,i=this.options.icons.submenu,n=this.element.find(this.options.menus);n.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),n=t.prev("a"),o=e("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(o),t.attr("aria-labelledby",n.attr("id"))}),t=n.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]
45
+ },_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),this._super(e,t)},focus:function(e,t){var i,n;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,n,o,r,s,a;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,o=t.offset().top-this.activeMenu.offset().top-i-n,r=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=t.height(),0>o?this.activeMenu.scrollTop(r+o):o+a>s&&this.activeMenu.scrollTop(r+o-s+a))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(t),this.activeMenu=n},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var n;this.active&&(n="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(i,n)},nextPage:function(t){var i,n,o;return this.active?(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n-o<0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,n,o;return this.active?(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n+o>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)}})}(jQuery),function(e,t){function i(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function n(t,i){return parseInt(e.css(t,i),10)||0}function o(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var r,s=Math.max,a=Math.abs,l=Math.round,c=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(r!==t)return r;var i,n,o=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=o.children()[0];return e("body").append(o),i=s.offsetWidth,o.css("overflow","scroll"),n=s.offsetWidth,i===n&&(n=o[0].clientWidth),o.remove(),r=i-n},getScrollInfo:function(t){var i=t.isWindow?"":t.element.css("overflow-x"),n=t.isWindow?"":t.element.css("overflow-y"),o="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,r="scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight;return{width:r?e.position.scrollbarWidth():0,height:o?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]);return{element:i,isWindow:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return f.apply(this,arguments);t=e.extend({},t);var r,p,m,g,v,b,y=e(t.of),_=e.position.getWithinInfo(t.within),C=e.position.getScrollInfo(_),x=(t.collision||"flip").split(" "),w={};return b=o(y),y[0].preventDefault&&(t.at="left top"),p=b.width,m=b.height,g=b.offset,v=e.extend({},g),e.each(["my","at"],function(){var e,i,n=(t[this]||"").split(" ");1===n.length&&(n=c.test(n[0])?n.concat(["center"]):u.test(n[0])?["center"].concat(n):["center","center"]),n[0]=c.test(n[0])?n[0]:"center",n[1]=u.test(n[1])?n[1]:"center",e=d.exec(n[0]),i=d.exec(n[1]),w[this]=[e?e[0]:0,i?i[0]:0],t[this]=[h.exec(n[0])[0],h.exec(n[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===t.at[0]?v.left+=p:"center"===t.at[0]&&(v.left+=p/2),"bottom"===t.at[1]?v.top+=m:"center"===t.at[1]&&(v.top+=m/2),r=i(w.at,p,m),v.left+=r[0],v.top+=r[1],this.each(function(){var o,c,u=e(this),d=u.outerWidth(),h=u.outerHeight(),f=n(this,"marginLeft"),b=n(this,"marginTop"),k=d+f+n(this,"marginRight")+C.width,T=h+b+n(this,"marginBottom")+C.height,D=e.extend({},v),S=i(w.my,u.outerWidth(),u.outerHeight());"right"===t.my[0]?D.left-=d:"center"===t.my[0]&&(D.left-=d/2),"bottom"===t.my[1]?D.top-=h:"center"===t.my[1]&&(D.top-=h/2),D.left+=S[0],D.top+=S[1],e.support.offsetFractions||(D.left=l(D.left),D.top=l(D.top)),o={marginLeft:f,marginTop:b},e.each(["left","top"],function(i,n){e.ui.position[x[i]]&&e.ui.position[x[i]][n](D,{targetWidth:p,targetHeight:m,elemWidth:d,elemHeight:h,collisionPosition:o,collisionWidth:k,collisionHeight:T,offset:[r[0]+S[0],r[1]+S[1]],my:t.my,at:t.at,within:_,elem:u})}),t.using&&(c=function(e){var i=g.left-D.left,n=i+p-d,o=g.top-D.top,r=o+m-h,l={target:{element:y,left:g.left,top:g.top,width:p,height:m},element:{element:u,left:D.left,top:D.top,width:d,height:h},horizontal:0>n?"left":i>0?"right":"center",vertical:0>r?"top":o>0?"bottom":"middle"};d>p&&a(i+n)<p&&(l.horizontal="center"),h>m&&a(o+r)<m&&(l.vertical="middle"),l.important=s(a(i),a(n))>s(a(o),a(r))?"horizontal":"vertical",t.using.call(this,e,l)}),u.offset(e.extend(D,{using:c}))})},e.ui.position={fit:{left:function(e,t){var i,n=t.within,o=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,a=e.left-t.collisionPosition.marginLeft,l=o-a,c=a+t.collisionWidth-r-o;t.collisionWidth>r?l>0&&0>=c?(i=e.left+l+t.collisionWidth-r-o,e.left+=l-i):e.left=c>0&&0>=l?o:l>c?o+r-t.collisionWidth:o:l>0?e.left+=l:c>0?e.left-=c:e.left=s(e.left-a,e.left)},top:function(e,t){var i,n=t.within,o=n.isWindow?n.scrollTop:n.offset.top,r=t.within.height,a=e.top-t.collisionPosition.marginTop,l=o-a,c=a+t.collisionHeight-r-o;t.collisionHeight>r?l>0&&0>=c?(i=e.top+l+t.collisionHeight-r-o,e.top+=l-i):e.top=c>0&&0>=l?o:l>c?o+r-t.collisionHeight:o:l>0?e.top+=l:c>0?e.top-=c:e.top=s(e.top-a,e.top)}},flip:{left:function(e,t){var i,n,o=t.within,r=o.offset.left+o.scrollLeft,s=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,c=e.left-t.collisionPosition.marginLeft,u=c-l,d=c+t.collisionWidth-s-l,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+h+p+f+t.collisionWidth-s-r,(0>i||i<a(u))&&(e.left+=h+p+f)):d>0&&(n=e.left-t.collisionPosition.marginLeft+h+p+f-l,(n>0||a(n)<d)&&(e.left+=h+p+f))},top:function(e,t){var i,n,o=t.within,r=o.offset.top+o.scrollTop,s=o.height,l=o.isWindow?o.scrollTop:o.offset.top,c=e.top-t.collisionPosition.marginTop,u=c-l,d=c+t.collisionHeight-s-l,h="top"===t.my[1],p=h?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(n=e.top+p+f+m+t.collisionHeight-s-r,e.top+p+f+m>u&&(0>n||n<a(u))&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-l,e.top+p+f+m>d&&(i>0||a(i)<d)&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,n,o,r,s=document.getElementsByTagName("body")[0],a=document.createElement("div");t=document.createElement(s?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},s&&e.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(r in n)t.style[r]=n[r];t.appendChild(a),i=s||document.documentElement,i.insertBefore(t,i.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",o=e(a).offset().left,e.support.offsetFractions=o>10&&11>o,t.innerHTML="",i.removeChild(t)}()}(jQuery),function(e,t){e.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return e===t?this.options.value:(this.options.value=this._constrainedValue(e),this._refreshValue(),void 0)},_constrainedValue:function(e){return e===t&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}})}(jQuery),function(e){var t=5;e.widget("ui.slider",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,n=this.options,o=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),r="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",s=[];for(i=n.values&&n.values.length||1,o.length>i&&(o.slice(i).remove(),o=o.slice(0,i)),t=o.length;i>t;t++)s.push(r);this.handles=o.add(e(s.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):this.range=e([])},_setupEvents:function(){var e=this.handles.add(this.range).filter("a");this._off(e),this._on(e,this._handleEvents),this._hoverable(e),this._focusable(e)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,n,o,r,s,a,l,c,u=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(i),o=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(n-u.values(t));(o>i||o===i&&(t===u._lastChangedValue||u.values(t)===d.min))&&(o=i,r=e(this),s=t)}),a=this._start(t,s),a===!1?!1:(this._mouseSliding=!0,this._handleIndex=s,r.addClass("ui-state-active").focus(),l=r.offset(),c=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=c?{left:0,top:0}:{left:t.pageX-l.left-r.width()/2,top:t.pageY-l.top-r.height()/2-(parseInt(r.css("borderTopWidth"),10)||0)-(parseInt(r.css("borderBottomWidth"),10)||0)+(parseInt(r.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,s,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,n,o,r;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/t,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),o=this._valueMax()-this._valueMin(),r=this._valueMin()+n*o,this._trimAlignValue(r)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var n,o,r;this.options.values&&this.options.values.length?(n=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>n||1===t&&n>i)&&(i=n),i!==this.values(t)&&(o=this.values(),o[t]=i,r=this._trigger("slide",e,{handle:this.handles[t],value:i,values:o}),n=this.values(t?0:1),r!==!1&&this.values(t,i,!0))):i!==this.value()&&(r=this._trigger("slide",e,{handle:this.handles[t],value:i}),r!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(t,i){var n,o,r;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(n=this.options.values,o=arguments[0],r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(o[r]),this._change(null,r);this._refreshValue()},_setOption:function(t,i){var n,o=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(o=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;o>n;n+=1)this._change(null,n);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,n;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,n=e-i;return 2*Math.abs(i)>=t&&(n+=i>0?t:-t),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,n,o,r,s=this.options.range,a=this.options,l=this,c=this._animateOff?!1:a.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[c?"animate":"css"](u,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[c?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[c?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[c?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[c?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:a.animate}))),t=i}):(n=this.value(),o=this._valueMin(),r=this._valueMax(),i=r!==o?(n-o)/(r-o)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[c?"animate":"css"](u,a.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:i+"%"},a.animate),"max"===s&&"horizontal"===this.orientation&&this.range[c?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:i+"%"},a.animate),"max"===s&&"vertical"===this.orientation&&this.range[c?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(i){var n,o,r,s,a=e(i.target).data("ui-slider-handle-index");switch(i.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(i.target).addClass("ui-state-active"),n=this._start(i,a),n===!1))return}switch(s=this.options.step,o=r=this.options.values&&this.options.values.length?this.values(a):this.value(),i.keyCode){case e.ui.keyCode.HOME:r=this._valueMin();break;case e.ui.keyCode.END:r=this._valueMax();break;case e.ui.keyCode.PAGE_UP:r=this._trimAlignValue(o+(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(o-(this._valueMax()-this._valueMin())/t);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(o===this._valueMax())return;r=this._trimAlignValue(o+s);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(o===this._valueMin())return;r=this._trimAlignValue(o-s)}this._slide(i,a,r)},click:function(e){e.preventDefault()},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}})}(jQuery),function(e){function t(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,n){var o=i.attr(n);void 0!==o&&o.length&&(t[n]=o)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,n=e.ui.keyCode;switch(t.keyCode){case n.UP:return this._repeat(null,1,t),!0;case n.DOWN:return this._repeat(null,-1,t),!0;case n.PAGE_UP:return this._repeat(null,i.page,t),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,n=this.options;return t=null!==n.min?n.min:0,i=e-t,i=Math.round(i/n.step)*n.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==n.max&&e>n.max?n.max:null!==n.min&&e<n.min?n.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(t?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:t(function(e){this._super(e),this._value(this.element.val())}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:t(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:t(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:t(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:t(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(t(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(e,t){function i(){return++o}function n(e){return e.hash.length>1&&decodeURIComponent(e.href.replace(r,""))===decodeURIComponent(location.href.replace(r,""))}var o=0,r=/#.*$/;e.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===t&&(n&&this.tabs.each(function(i,o){return e(o).attr("aria-controls")===n?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),n=this.tabs.index(i),o=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:n++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:o=!1,n--;break;case e.ui.keyCode.END:n=this.anchors.length-1;break;case e.ui.keyCode.HOME:n=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(n),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,o),t.ctrlKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function n(){return t>o&&(t=0),0>t&&(t=o),t}for(var o=this.tabs.length-1;-1!==e.inArray(n(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_tabId:function(e){return e.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");
46
+ t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,o){var r,s,a,l=e(o).uniqueId().attr("id"),c=e(o).closest("li"),u=c.attr("aria-controls");n(o)?(r=o.hash,s=t.element.find(t._sanitizeSelector(r))):(a=t._tabId(c),r="#"+a,s=t.element.find(r),s.length||(s=t._createPanel(a),s.insertAfter(t.panels[i-1]||t.tablist)),s.attr("aria-live","polite")),s.length&&(t.panels=t.panels.add(s)),u&&c.data("ui-tabs-aria-controls",u),c.attr({"aria-controls":r.substring(1),"aria-labelledby":l}),s.attr("aria-labelledby",l)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,n=0;i=this.tabs[n];n++)t===!0||-1!==e.inArray(n,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,n=this.element.parent();"fill"===t?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),n=t.css("position");"absolute"!==n&&"fixed"!==n&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,n=this.active,o=e(t.currentTarget),r=o.closest("li"),s=r[0]===n[0],a=s&&i.collapsible,l=a?e():this._getPanelForTab(r),c=n.length?this._getPanelForTab(n):e(),u={oldTab:n,oldPanel:c,newTab:a?e():r,newPanel:l};t.preventDefault(),r.hasClass("ui-state-disabled")||r.hasClass("ui-tabs-loading")||this.running||s&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=a?!1:this.tabs.index(r),this.active=s?e():r,this.xhr&&this.xhr.abort(),c.length||l.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(r),t),this._toggle(t,u))},_toggle:function(t,i){function n(){r.running=!1,r._trigger("activate",t,i)}function o(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),s.length&&r.options.show?r._show(s,r.options.show,n):(s.show(),n())}var r=this,s=i.newPanel,a=i.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),o()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),o()),a.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),s.length&&a.length?i.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var i,n=this._findActive(t);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var n=this.options.disabled;n!==!1&&(i===t?n=!1:(i=this._getIndex(i),n=e.isArray(n)?e.map(n,function(e){return e!==i?e:null}):e.map(this.tabs,function(e,t){return t!==i?t:null})),this._setupDisabled(n))},disable:function(i){var n=this.options.disabled;if(n!==!0){if(i===t)n=!0;else{if(i=this._getIndex(i),-1!==e.inArray(i,n))return;n=e.isArray(n)?e.merge([i],n).sort():[i]}this._setupDisabled(n)}},load:function(t,i){t=this._getIndex(t);var o=this,r=this.tabs.eq(t),s=r.find(".ui-tabs-anchor"),a=this._getPanelForTab(r),l={tab:r,panel:a};n(s[0])||(this.xhr=e.ajax(this._ajaxSettings(s,i,l)),this.xhr&&"canceled"!==this.xhr.statusText&&(r.addClass("ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){a.html(e),o._trigger("load",i,l)},1)}).complete(function(e,t){setTimeout(function(){"abort"===t&&o.panels.stop(!1,!0),r.removeClass("ui-tabs-loading"),a.removeAttr("aria-busy"),e===o.xhr&&delete o.xhr},1)})))},_ajaxSettings:function(t,i,n){var o=this;return{url:t.attr("href"),beforeSend:function(t,r){return o._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:r},n))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(e){function t(t,i){var n=(t.attr("aria-describedby")||"").split(/\s+/);n.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(n.join(" ")))}function i(t){var i=t.data("ui-tooltip-id"),n=(t.attr("aria-describedby")||"").split(/\s+/),o=e.inArray(i,n);-1!==o&&n.splice(o,1),t.removeData("ui-tooltip-id"),n=e.trim(n.join(" ")),n?t.attr("aria-describedby",n):t.removeAttr("aria-describedby")}var n=0;e.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,i){var n=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){n._updateContent(t)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,n){var o=e.Event("blur");o.target=o.currentTarget=n[0],t.close(o,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,n=e(t?t.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&n.parents().each(function(){var t,n=e(this);n.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._updateContent(n,t))},_updateContent:function(e,t){var i,n=this.options.content,o=this,r=t?t.type:null;return"string"==typeof n?this._open(t,e,n):(i=n.call(e[0],function(i){e.data("ui-tooltip-open")&&o._delay(function(){t&&(t.type=r),this._open(t,e,i)})}),i&&this._open(t,e,i),void 0)},_open:function(i,n,o){function r(e){c.of=e,s.is(":hidden")||s.position(c)}var s,a,l,c=e.extend({},this.options.position);if(o){if(s=this._find(n),s.length)return s.find(".ui-tooltip-content").html(o),void 0;n.is("[title]")&&(i&&"mouseover"===i.type?n.attr("title",""):n.removeAttr("title")),s=this._tooltip(n),t(n,s.attr("id")),s.find(".ui-tooltip-content").html(o),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:r}),r(i)):s.position(e.extend({of:n},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(l=this.delayedShow=setInterval(function(){s.is(":visible")&&(r(c.of),clearInterval(l))},e.fx.interval)),this._trigger("open",i,{tooltip:s}),a={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var i=e.Event(t);i.currentTarget=n[0],this.close(i,!0)}},remove:function(){this._removeTooltip(s)}},i&&"mouseover"!==i.type||(a.mouseleave="close"),i&&"focusin"!==i.type||(a.focusout="close"),this._on(!0,n,a)}},close:function(t){var n=this,o=e(t?t.currentTarget:this.element),r=this._find(o);this.closing||(clearInterval(this.delayedShow),o.data("ui-tooltip-title")&&o.attr("title",o.data("ui-tooltip-title")),i(o),r.stop(!0),this._hide(r,this.options.hide,function(){n._removeTooltip(e(this))}),o.removeData("ui-tooltip-open"),this._off(o,"mouseleave focusout keyup"),o[0]!==this.element[0]&&this._off(o,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete n.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:r}),this.closing=!1)},_tooltip:function(t){var i="ui-tooltip-"+n++,o=e("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("<div>").addClass("ui-tooltip-content").appendTo(o),o.appendTo(this.document[0].body),this.tooltips[i]=t,o},_find:function(t){var i=t.data("ui-tooltip-id");return i?e("#"+i):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,n){var o=e.Event("blur");o.target=o.currentTarget=n[0],t.close(o,!0),e("#"+i).remove(),n.data("ui-tooltip-title")&&(n.attr("title",n.data("ui-tooltip-title")),n.removeData("ui-tooltip-title"))})}})}(jQuery),/*
47
+ * jQuery File Upload Plugin 5.19.4
48
+ * https://github.com/blueimp/jQuery-File-Upload
49
+ *
50
+ * Copyright 2010, Sebastian Tschan
51
+ * https://blueimp.net
52
+ *
53
+ * Licensed under the MIT license:
54
+ * http://www.opensource.org/licenses/MIT
55
+ */
56
+ function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery.ui.widget"],e):e(window.jQuery)}(function(e){"use strict";e.support.xhrFileUpload=!(!window.XMLHttpRequestUpload||!window.FileReader),e.support.xhrFormDataFileUpload=!!window.FormData,e.widget("blueimp.fileupload",{options:{dropZone:e(document),pasteZone:e(document),fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,formData:function(e){return e.serializeArray()},add:function(e,t){t.submit()},processData:!1,contentType:!1,cache:!1},_refreshOptionsList:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_BitrateTimer:function(){this.timestamp=+new Date,this.loaded=0,this.bitrate=0,this.getBitrate=function(e,t,i){var n=e-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(t-this.loaded)*(1e3/n)*8,this.loaded=t,this.timestamp=e),this.bitrate}},_isXHRUpload:function(t){return!t.forceIframeTransport&&(!t.multipart&&e.support.xhrFileUpload||e.support.xhrFormDataFileUpload)},_getFormData:function(t){var i;return"function"==typeof t.formData?t.formData(t.form):e.isArray(t.formData)?t.formData:t.formData?(i=[],e.each(t.formData,function(e,t){i.push({name:e,value:t})}),i):[]},_getTotal:function(t){var i=0;return e.each(t,function(e,t){i+=t.size||1}),i},_onProgress:function(e,t){if(e.lengthComputable){var i,n,o=+new Date;if(t._time&&t.progressInterval&&o-t._time<t.progressInterval&&e.loaded!==e.total)return;t._time=o,i=t.total||this._getTotal(t.files),n=parseInt(e.loaded/e.total*(t.chunkSize||i),10)+(t.uploadedBytes||0),this._loaded+=n-(t.loaded||t.uploadedBytes||0),t.lengthComputable=!0,t.loaded=n,t.total=i,t.bitrate=t._bitrateTimer.getBitrate(o,n,t.bitrateInterval),this._trigger("progress",e,t),this._trigger("progressall",e,{lengthComputable:!0,loaded:this._loaded,total:this._total,bitrate:this._bitrateTimer.getBitrate(o,this._loaded,t.bitrateInterval)})}},_initProgressListener:function(t){var i=this,n=t.xhr?t.xhr():e.ajaxSettings.xhr();n.upload&&(e(n.upload).bind("progress",function(e){var n=e.originalEvent;e.lengthComputable=n.lengthComputable,e.loaded=n.loaded,e.total=n.total,i._onProgress(e,t)}),t.xhr=function(){return n})},_initXHRData:function(t){var i,n=t.files[0],o=t.multipart||!e.support.xhrFileUpload,r=t.paramName[0];t.headers=t.headers||{},t.contentRange&&(t.headers["Content-Range"]=t.contentRange),o?e.support.xhrFormDataFileUpload&&(t.postMessage?(i=this._getFormData(t),t.blob?i.push({name:r,value:t.blob}):e.each(t.files,function(e,n){i.push({name:t.paramName[e]||r,value:n})})):(t.formData instanceof FormData?i=t.formData:(i=new FormData,e.each(this._getFormData(t),function(e,t){i.append(t.name,t.value)})),t.blob?(t.headers["Content-Disposition"]='attachment; filename="'+encodeURI(n.name)+'"',t.headers["Content-Description"]=encodeURI(n.type),i.append(r,t.blob,n.name)):e.each(t.files,function(e,n){(window.Blob&&n instanceof Blob||window.File&&n instanceof File)&&i.append(t.paramName[e]||r,n,n.name)})),t.data=i):(t.headers["Content-Disposition"]='attachment; filename="'+encodeURI(n.name)+'"',t.contentType=n.type,t.data=t.blob||n),t.blob=null},_initIframeSettings:function(t){t.dataType="iframe "+(t.dataType||""),t.formData=this._getFormData(t),t.redirect&&e("<a></a>").prop("href",t.url).prop("host")!==location.host&&t.formData.push({name:t.redirectParamName||"redirect",value:t.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e,"iframe")},_getParamName:function(t){var i=e(t.fileInput),n=t.paramName;return n?e.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var t=e(this),i=t.prop("name")||"files[]",o=(t.prop("files")||[1]).length;o;)n.push(i),o-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(t){t.form&&t.form.length||(t.form=e(t.fileInput.prop("form")),t.form.length||(t.form=e(this.options.fileInput.prop("form")))),t.paramName=this._getParamName(t),t.url||(t.url=t.form.prop("action")||location.href),t.type=(t.type||t.form.prop("method")||"").toUpperCase(),"POST"!==t.type&&"PUT"!==t.type&&(t.type="POST"),t.formAcceptCharset||(t.formAcceptCharset=t.form.attr("accept-charset"))},_getAJAXSettings:function(t){var i=e.extend({},this.options,t);return this._initFormSettings(i),this._initDataSettings(i),i},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(t,i,n){var o=e.Deferred(),r=o.promise();return i=i||this.options.context||r,t===!0?o.resolveWith(i,n):t===!1&&o.rejectWith(i,n),r.abort=o.promise,this._enhancePromise(r)},_getUploadedBytes:function(e){var t=e.getResponseHeader("Range"),i=t&&t.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(t,i){var n,o,r=this,s=t.files[0],a=s.size,l=t.uploadedBytes=t.uploadedBytes||0,c=t.maxChunkSize||a,u=s.slice||s.webkitSlice||s.mozSlice,d=e.Deferred(),h=d.promise();return this._isXHRUpload(t)&&u&&(l||a>c)&&!t.data?i?!0:l>=a?(s.error="Uploaded bytes exceed file size",this._getXHRPromise(!1,t.context,[null,"error",s.error])):(o=function(){var i=e.extend({},t);i.blob=u.call(s,l,l+c),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+a,r._initXHRData(i),r._initProgressListener(i),n=(e.ajax(i)||r._getXHRPromise(!1,i.context)).done(function(n,s,c){l=r._getUploadedBytes(c)||l+i.chunkSize,i.loaded||r._onProgress(e.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),t.uploadedBytes=i.uploadedBytes=l,a>l?o():d.resolveWith(i.context,[n,s,c])}).fail(function(e,t,n){d.rejectWith(i.context,[e,t,n])})},this._enhancePromise(h),h.abort=function(){return n.abort()},o(),h):!1},_beforeSend:function(e,t){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer),this._active+=1,this._loaded+=t.uploadedBytes||0,this._total+=this._getTotal(t.files)},_onDone:function(t,i,n,o){this._isXHRUpload(o)||this._onProgress(e.Event("progress",{lengthComputable:!0,loaded:1,total:1}),o),o.result=t,o.textStatus=i,o.jqXHR=n,this._trigger("done",null,o)},_onFail:function(e,t,i,n){n.jqXHR=e,n.textStatus=t,n.errorThrown=i,this._trigger("fail",null,n),n.recalculateProgress&&(this._loaded-=n.loaded||n.uploadedBytes||0,this._total-=n.total||this._getTotal(n.files))},_onAlways:function(e,t,i,n){this._active-=1,n.textStatus=t,i&&i.always?(n.jqXHR=i,n.result=e):(n.jqXHR=e,n.errorThrown=i),this._trigger("always",null,n),0===this._active&&(this._trigger("stop"),this._loaded=this._total=0,this._bitrateTimer=null)},_onSend:function(t,i){var n,o,r,s,a=this,l=a._getAJAXSettings(i),c=function(){return a._sending+=1,l._bitrateTimer=new a._BitrateTimer,n=n||((o||a._trigger("send",t,l)===!1)&&a._getXHRPromise(!1,l.context,o)||a._chunkedUpload(l)||e.ajax(l)).done(function(e,t,i){a._onDone(e,t,i,l)}).fail(function(e,t,i){a._onFail(e,t,i,l)}).always(function(e,t,i){if(a._sending-=1,a._onAlways(e,t,i,l),l.limitConcurrentUploads&&l.limitConcurrentUploads>a._sending)for(var n,o=a._slots.shift();o;){if(n=o.state?"pending"===o.state():!o.isRejected()){o.resolve();break}o=a._slots.shift()}})};return this._beforeSend(t,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(r=e.Deferred(),this._slots.push(r),s=r.pipe(c)):s=this._sequence=this._sequence.pipe(c,c),s.abort=function(){return o=[void 0,"abort","abort"],n?n.abort():(r&&r.rejectWith(l.context,o),c())},this._enhancePromise(s)):c()},_onAdd:function(t,i){var n,o,r,s,a=this,l=!0,c=e.extend({},this.options,i),u=c.limitMultiFileUploads,d=this._getParamName(c);if((c.singleFileUploads||u)&&this._isXHRUpload(c))if(!c.singleFileUploads&&u)for(r=[],n=[],s=0;s<i.files.length;s+=u)r.push(i.files.slice(s,s+u)),o=d.slice(s,s+u),o.length||(o=d),n.push(o);else n=d;else r=[i.files],n=[d];return i.originalFiles=i.files,e.each(r||i.files,function(o,s){var c=e.extend({},i);return c.files=r?s:[s],c.paramName=n[o],c.submit=function(){return c.jqXHR=this.jqXHR=a._trigger("submit",t,this)!==!1&&a._onSend(t,this),this.jqXHR},l=a._trigger("add",t,c)}),l},_replaceFileInput:function(t){var i=t.clone(!0);e("<form></form>").append(i)[0].reset(),t.after(i).detach(),e.cleanData(t.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(e,n){return n===t[0]?i[0]:n}),t[0]===this.element[0]&&(this.element=i)},_handleFileTreeEntry:function(t,i){var n,o=this,r=e.Deferred(),s=function(e){e&&!e.entry&&(e.entry=t),r.resolve([e])};return i=i||"",t.isFile?t._file?(t._file.relativePath=i,r.resolve(t._file)):t.file(function(e){e.relativePath=i,r.resolve(e)},s):t.isDirectory?(n=t.createReader(),n.readEntries(function(e){o._handleFileTreeEntries(e,i+t.name+"/").done(function(e){r.resolve(e)}).fail(s)},s)):r.resolve([]),r.promise()},_handleFileTreeEntries:function(t,i){var n=this;return e.when.apply(e,e.map(t,function(e){return n._handleFileTreeEntry(e,i)})).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(t){t=t||{};var i=t.items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(e.map(i,function(e){var t;return e.webkitGetAsEntry?(t=e.webkitGetAsEntry(),t&&(t._file=e.getAsFile()),t):e.getAsEntry()})):e.Deferred().resolve(e.makeArray(t.files)).promise()},_getSingleFileInputFiles:function(t){t=e(t);var i,n,o=t.prop("webkitEntries")||t.prop("entries");if(o&&o.length)return this._handleFileTreeEntries(o);if(i=e.makeArray(t.prop("files")),i.length)void 0===i[0].name&&i[0].fileName&&e.each(i,function(e,t){t.name=t.fileName,t.size=t.fileSize});else{if(n=t.prop("value"),!n)return e.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return e.Deferred().resolve(i).promise()},_getFileInputFiles:function(t){return t instanceof e&&1!==t.length?e.when.apply(e,e.map(t,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(t)},_onChange:function(t){var i=this,n={fileInput:e(t.target),form:e(t.target.form)};this._getFileInputFiles(n.fileInput).always(function(e){n.files=e,i.options.replaceFileInput&&i._replaceFileInput(n.fileInput),i._trigger("change",t,n)!==!1&&i._onAdd(t,n)})},_onPaste:function(t){var i=t.originalEvent.clipboardData,n=i&&i.items||[],o={files:[]};return e.each(n,function(e,t){var i=t.getAsFile&&t.getAsFile();i&&o.files.push(i)}),this._trigger("paste",t,o)===!1||this._onAdd(t,o)===!1?!1:void 0},_onDrop:function(e){e.preventDefault();var t=this,i=e.dataTransfer=e.originalEvent.dataTransfer,n={};this._getDroppedFiles(i).always(function(i){n.files=i,t._trigger("drop",e,n)!==!1&&t._onAdd(e,n)})},_onDragOver:function(e){var t=e.dataTransfer=e.originalEvent.dataTransfer;return this._trigger("dragover",e)===!1?!1:(t&&(t.dropEffect="copy"),e.preventDefault(),void 0)},_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop}),this._on(this.options.pasteZone,{paste:this._onPaste})),this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_setOption:function(t,i){var n=-1!==e.inArray(t,this._refreshOptionsList);n&&this._destroyEventHandlers(),this._super(t,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var t=this.options;void 0===t.fileInput?t.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):t.fileInput instanceof e||(t.fileInput=e(t.fileInput)),t.dropZone instanceof e||(t.dropZone=e(t.dropZone)),t.pasteZone instanceof e||(t.pasteZone=e(t.pasteZone))},_create:function(){var t=this.options;e.extend(t,e(this.element[0].cloneNode(!1)).data()),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=this._loaded=this._total=0,this._initEventHandlers()},_destroy:function(){this._destroyEventHandlers()},add:function(t){var i=this;t&&!this.options.disabled&&(t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always(function(e){t.files=e,i._onAdd(null,t)}):(t.files=e.makeArray(t.files),this._onAdd(null,t)))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var i,n,o=this,r=e.Deferred(),s=r.promise();return s.abort=function(){return n=!0,i?i.abort():(r.reject(null,"abort","abort"),s)},this._getFileInputFiles(t.fileInput).always(function(e){n||(t.files=e,i=o._onSend(null,t).then(function(e,t,i){r.resolve(e,t,i)},function(e,t,i){r.reject(e,t,i)}))}),this._enhancePromise(s)}if(t.files=e.makeArray(t.files),t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})}),/*
57
+ * jQuery Iframe Transport Plugin 1.2.5
58
+ * https://github.com/blueimp/jQuery-File-Upload
59
+ *
60
+ * Copyright 2011, Sebastian Tschan
61
+ * https://blueimp.net
62
+ *
63
+ * Licensed under the MIT license:
64
+ * http://creativecommons.org/licenses/MIT/
65
+ */
66
+ function(e){"use strict";var t=0;e.ajaxTransport("iframe",function(i){if(i.async&&("POST"===i.type||"GET"===i.type)){var n,o;return{send:function(r,s){n=e('<form style="display:none;"></form>'),o=e('<iframe src="javascript:false;" name="iframe-transport-'+(t+=1)+'"></iframe>').bind("load",function(){var t;o.unbind("load").bind("load",function(){var t;try{if(t=o.contents(),!t.length||!t[0].firstChild)throw new Error}catch(i){t=void 0}s(200,"success",{iframe:t}),e('<iframe src="javascript:false;"></iframe>').appendTo(n),n.remove()}),n.prop("target",o.prop("name")).prop("action",i.url).prop("method",i.type),i.formData&&e.each(i.formData,function(t,i){e('<input type="hidden"/>').prop("name",i.name).val(i.value).appendTo(n)}),i.fileInput&&i.fileInput.length&&"POST"===i.type&&(t=i.fileInput.clone(),i.fileInput.after(function(e){return t[e]}),i.paramName&&i.fileInput.each(function(){e(this).prop("name",i.paramName)}),n.append(i.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data")),n.submit(),t&&t.length&&i.fileInput.each(function(i,n){var o=e(t[i]);e(n).prop("name",o.prop("name")),o.replaceWith(n)})}),n.append(o).appendTo(document.body)},abort:function(){o&&o.unbind("load").prop("src","javascript".concat(":false;")),n&&n.remove()}}}}),e.ajaxSetup({converters:{"iframe text":function(t){return e(t[0].body).text()},"iframe json":function(t){return e.parseJSON(e(t[0].body).text())},"iframe html":function(t){return e(t[0].body).html()},"iframe script":function(t){return e.globalEval(e(t[0].body).text())}}})}(jQuery),/*
67
+ * jQuery UI Autocomplete HTML Extension
68
+ *
69
+ * Copyright 2010, Scott González (http://scottgonzalez.com)
70
+ * Dual licensed under the MIT or GPL Version 2 licenses.
71
+ *
72
+ * http://github.com/scottgonzalez/jquery-ui-extensions
73
+ */
74
+ function(e){function t(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(t){return n.test(e("<div>").html(t.label||t.value||t).text())})}var i=e.ui.autocomplete.prototype,n=i._initSource;e.extend(i,{_initSource:function(){this.options.html&&e.isArray(this.options.source)?this.source=function(e,i){i(t(this.options.source,e.term))}:n.call(this)},_renderItem:function(t,i){return e("<li></li>").data("item.autocomplete",i).append(e("<a></a>")[this.options.html?"html":"text"](i.label)).appendTo(t)}})}(jQuery),function(e,t){e.rails!==t&&e.error("jquery-ujs has already been loaded!");var i;e.rails=i={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",buttonClickSelector:"button[data-remote]",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([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[type=file]",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(t){var i=e('meta[name="csrf-token"]').attr("content");i&&t.setRequestHeader("X-CSRF-Token",i)},fire:function(t,i,n){var o=e.Event(i);return t.trigger(o,n),o.result!==!1},confirm:function(e){return confirm(e)},ajax:function(t){return e.ajax(t)},href:function(e){return e.attr("href")},handleRemote:function(n){var o,r,s,a,l,c,u,d;if(i.fire(n,"ajax:before")){if(a=n.data("cross-domain"),l=a===t?null:a,c=n.data("with-credentials")||null,u=n.data("type")||e.ajaxSettings&&e.ajaxSettings.dataType,n.is("form")){o=n.attr("method"),r=n.attr("action"),s=n.serializeArray();var h=n.data("ujs:submit-button");h&&(s.push(h),n.data("ujs:submit-button",null))}else n.is(i.inputChangeSelector)?(o=n.data("method"),r=n.data("url"),s=n.serialize(),n.data("params")&&(s=s+"&"+n.data("params"))):n.is(i.buttonClickSelector)?(o=n.data("method")||"get",r=n.data("url"),s=n.serialize(),n.data("params")&&(s=s+"&"+n.data("params"))):(o=n.data("method"),r=i.href(n),s=n.data("params")||null);d={type:o||"GET",data:s,dataType:u,beforeSend:function(e,o){return o.dataType===t&&e.setRequestHeader("accept","*/*;q=0.5, "+o.accepts.script),i.fire(n,"ajax:beforeSend",[e,o])},success:function(e,t,i){n.trigger("ajax:success",[e,t,i])},complete:function(e,t){n.trigger("ajax:complete",[e,t])},error:function(e,t,i){n.trigger("ajax:error",[e,t,i])},crossDomain:l},c&&(d.xhrFields={withCredentials:c}),r&&(d.url=r);var p=i.ajax(d);return n.trigger("ajax:send",p),p}return!1},handleMethod:function(n){var o=i.href(n),r=n.data("method"),s=n.attr("target"),a=e("meta[name=csrf-token]").attr("content"),l=e("meta[name=csrf-param]").attr("content"),c=e('<form method="post" action="'+o+'"></form>'),u='<input name="_method" value="'+r+'" type="hidden" />';l!==t&&a!==t&&(u+='<input name="'+l+'" value="'+a+'" type="hidden" />'),s&&c.attr("target",s),c.hide().append(u).appendTo("body"),c.submit()},disableFormElements:function(t){t.find(i.disableSelector).each(function(){var t=e(this),i=t.is("button")?"html":"val";t.data("ujs:enable-with",t[i]()),t[i](t.data("disable-with")),t.prop("disabled",!0)})},enableFormElements:function(t){t.find(i.enableSelector).each(function(){var t=e(this),i=t.is("button")?"html":"val";t.data("ujs:enable-with")&&t[i](t.data("ujs:enable-with")),t.prop("disabled",!1)})},allowAction:function(e){var t,n=e.data("confirm"),o=!1;return n?(i.fire(e,"confirm")&&(o=i.confirm(n),t=i.fire(e,"confirm:complete",[o])),o&&t):!0},blankInputs:function(t,i,n){var o,r,s=e(),a=i||"input,textarea",l=t.find(a);return l.each(function(){if(o=e(this),r=o.is("input[type=checkbox],input[type=radio]")?o.is(":checked"):o.val(),!r==!n){if(o.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+o.attr("name")+'"]').length)return!0;s=s.add(o)}}),s.length?s:!1},nonBlankInputs:function(e,t){return i.blankInputs(e,t,!0)},stopEverything:function(t){return e(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},disableElement:function(e){e.data("ujs:enable-with",e.html()),e.html(e.data("disable-with")),e.bind("click.railsDisable",function(e){return i.stopEverything(e)})},enableElement:function(e){e.data("ujs:enable-with")!==t&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.unbind("click.railsDisable")}},i.fire(e(document),"rails:attachBindings")&&(e.ajaxPrefilter(function(e,t,n){e.crossDomain||i.CSRFProtection(n)}),e(document).delegate(i.linkDisableSelector,"ajax:complete",function(){i.enableElement(e(this))}),e(document).delegate(i.linkClickSelector,"click.rails",function(n){var o=e(this),r=o.data("method"),s=o.data("params");if(!i.allowAction(o))return i.stopEverything(n);if(o.is(i.linkDisableSelector)&&i.disableElement(o),o.data("remote")!==t){if(!(!n.metaKey&&!n.ctrlKey||r&&"GET"!==r||s))return!0;var a=i.handleRemote(o);return a===!1?i.enableElement(o):a.error(function(){i.enableElement(o)}),!1}return o.data("method")?(i.handleMethod(o),!1):void 0}),e(document).delegate(i.buttonClickSelector,"click.rails",function(t){var n=e(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(t)}),e(document).delegate(i.inputChangeSelector,"change.rails",function(t){var n=e(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(t)}),e(document).delegate(i.formSubmitSelector,"submit.rails",function(n){var o=e(this),r=o.data("remote")!==t,s=i.blankInputs(o,i.requiredInputSelector),a=i.nonBlankInputs(o,i.fileInputSelector);if(!i.allowAction(o))return i.stopEverything(n);if(s&&o.attr("novalidate")==t&&i.fire(o,"ajax:aborted:required",[s]))return i.stopEverything(n);if(r){if(a){setTimeout(function(){i.disableFormElements(o)},13);var l=i.fire(o,"ajax:aborted:file",[a]);return l||setTimeout(function(){i.enableFormElements(o)},13),l}return i.handleRemote(o),!1}setTimeout(function(){i.disableFormElements(o)},13)}),e(document).delegate(i.formInputClickSelector,"click.rails",function(t){var n=e(this);if(!i.allowAction(n))return i.stopEverything(t);var o=n.attr("name"),r=o?{name:o,value:n.val()}:null;n.closest("form").data("ujs:submit-button",r)}),e(document).delegate(i.formSubmitSelector,"ajax:beforeSend.rails",function(t){this==t.target&&i.disableFormElements(e(this))}),e(document).delegate(i.formSubmitSelector,"ajax:complete.rails",function(t){this==t.target&&i.enableFormElements(e(this))}),e(function(){var t=e("meta[name=csrf-token]").attr("content"),i=e("meta[name=csrf-param]").attr("content");e('form input[name="'+i+'"]').val(t)}))}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(window.jQuery||window.$)}(function(e){var t,i={className:"autosizejs",append:"",callback:!1,resizeDelay:10},n='<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>',o=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent"],r=e(n).data("autosize",!0)[0];r.style.lineHeight="99px","99px"===e(r).css("lineHeight")&&o.push("lineHeight"),r.style.lineHeight="",e.fn.autosize=function(n){return n=e.extend({},i,n||{}),r.parentNode!==document.body&&e(document.body).append(r),this.each(function(){function i(){var t,i;"getComputedStyle"in window?(t=window.getComputedStyle(h),i=h.getBoundingClientRect().width,e.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(e,n){i-=parseInt(t[n],10)}),r.style.width=i+"px"):r.style.width=Math.max(p.width(),0)+"px"}function s(){var s={};if(t=h,r.className=n.className,c=parseInt(p.css("maxHeight"),10),e.each(o,function(e,t){s[t]=p.css(t)}),e(r).css(s),i(),window.chrome){var a=h.style.width;h.style.width="0px";{h.offsetWidth}h.style.width=a}}function a(){var e,o;t!==h?s():i(),r.value=h.value+n.append,r.style.overflowY=h.style.overflowY,o=parseInt(h.style.height,10),r.scrollTop=0,r.scrollTop=9e4,e=r.scrollTop,c&&e>c?(h.style.overflowY="scroll",e=c):(h.style.overflowY="hidden",u>e&&(e=u)),e+=f,o!==e&&(h.style.height=e+"px",m&&n.callback.call(h,h))}function l(){clearTimeout(d),d=setTimeout(function(){var e=p.width();e!==v&&(v=e,a())},parseInt(n.resizeDelay,10))}var c,u,d,h=this,p=e(h),f=0,m=e.isFunction(n.callback),g={height:h.style.height,overflow:h.style.overflow,overflowY:h.style.overflowY,wordWrap:h.style.wordWrap,resize:h.style.resize},v=p.width();p.data("autosize")||(p.data("autosize",!0),("border-box"===p.css("box-sizing")||"border-box"===p.css("-moz-box-sizing")||"border-box"===p.css("-webkit-box-sizing"))&&(f=p.outerHeight()-p.height()),u=Math.max(parseInt(p.css("minHeight"),10)-f||0,p.height()),p.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word",resize:"none"===p.css("resize")||"vertical"===p.css("resize")?"none":"horizontal"}),"onpropertychange"in h?"oninput"in h?p.on("input.autosize keyup.autosize",a):p.on("propertychange.autosize",function(){"value"===event.propertyName&&a()}):p.on("input.autosize",a),n.resizeDelay!==!1&&e(window).on("resize.autosize",l),p.on("autosize.resize",a),p.on("autosize.resizeIncludeStyle",function(){t=null,a()}),p.on("autosize.destroy",function(){t=null,clearTimeout(d),e(window).off("resize",l),p.off("autosize").off(".autosize").css(g).removeData("autosize")}),a())})}}),window.tinyMCEPreInit=window.tinyMCEPreInit||{base:"/assets/tinymce",query:"3.5.9",suffix:""},function(e){var t,i=/^\s*|\s*$/g,n="$1"==="B".replace(/A(.)|B/,"$1"),o={majorVersion:"3",minorVersion:"5.9",releaseDate:"2013-10-10",_init:function(){function t(e){return e.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(e.src)?(/_(src|dev)\.js/g.test(e.src)&&(l.suffix="_src"),-1!=(s=e.src.indexOf("?"))&&(l.query=e.src.substring(s+1)),l.baseURL=e.src.substring(0,e.src.lastIndexOf("/")),r&&-1==l.baseURL.indexOf("://")&&0!==l.baseURL.indexOf("/")&&(l.baseURL=r+l.baseURL),l.baseURL):null}var i,n,o,r,s,a,l=this,c=document,u=navigator,d=u.userAgent;if(l.isIE11=-1!=d.indexOf("Trident/")&&-1!=d.indexOf("rv:"),l.isOpera=e.opera&&opera.buildNumber,l.isWebKit=/WebKit/.test(d),l.isIE=!l.isWebKit&&!l.isOpera&&/MSIE/gi.test(d)&&/Explorer/gi.test(u.appName)||l.isIE11,l.isIE6=l.isIE&&/MSIE [56]/.test(d),l.isIE7=l.isIE&&/MSIE [7]/.test(d),l.isIE8=l.isIE&&/MSIE [8]/.test(d),l.isIE9=l.isIE&&/MSIE [9]/.test(d),l.isGecko=!l.isWebKit&&!l.isIE11&&/Gecko/.test(d),l.isMac=-1!=d.indexOf("Mac"),l.isAir=/adobeair/i.test(d),l.isIDevice=/(iPad|iPhone)/.test(d),l.isIOS5=l.isIDevice&&d.match(/AppleWebKit\/(\d*)/)[1]>=534,e.tinyMCEPreInit)return l.suffix=tinyMCEPreInit.suffix,l.baseURL=tinyMCEPreInit.base,l.query=tinyMCEPreInit.query,void 0;for(l.suffix="",n=c.getElementsByTagName("base"),i=0;i<n.length;i++)a=n[i].href,a&&(/^https?:\/\/[^\/]+$/.test(a)&&(a+="/"),r=a?a.match(/.*\//)[0]:"");for(n=c.getElementsByTagName("script"),i=0;i<n.length;i++)if(t(n[i]))return;if(o=c.getElementsByTagName("head")[0])for(n=o.getElementsByTagName("script"),i=0;i<n.length;i++)if(t(n[i]))return},is:function(e,i){return i?"array"==i&&o.isArray(e)?!0:typeof e==i:e!==t},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},makeMap:function(e,t,i){var n;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),i=i||{},n=e.length;n--;)i[e[n]]={};return i},each:function(e,i,n){var o,r;if(!e)return 0;if(n=n||e,e.length!==t){for(o=0,r=e.length;r>o;o++)if(i.call(n,e[o],o,e)===!1)return 0}else for(o in e)if(e.hasOwnProperty(o)&&i.call(n,e[o],o,e)===!1)return 0;return 1},map:function(e,t){var i=[];return o.each(e,function(e){i.push(t(e))}),i},grep:function(e,t){var i=[];return o.each(e,function(e){(!t||t(e))&&i.push(e)}),i},inArray:function(e,t){var i,n;if(e)for(i=0,n=e.length;n>i;i++)if(e[i]===t)return i;return-1},extend:function(e,i){var n,o,r,s,a=arguments;for(n=1,o=a.length;o>n;n++){i=a[n];for(r in i)i.hasOwnProperty(r)&&(s=i[r],s!==t&&(e[r]=s))}return e},trim:function(e){return(e?""+e:"").replace(i,"")},create:function(e,t,i){var n,o,r,s,a,l=this,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),r=e[3].match(/(^|\.)(\w+)$/i)[2],o=l.createNS(e[3].replace(/\.\w+$/,""),i),!o[r]){if("static"==e[2])return o[r]=t,this.onCreate&&this.onCreate(e[2],e[3],o[r]),void 0;t[r]||(t[r]=function(){},c=1),o[r]=t[r],l.extend(o[r].prototype,t),e[5]&&(n=l.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],a=o[r],o[r]=c?function(){return n[s].apply(this,arguments)}:function(){return this.parent=n[s],a.apply(this,arguments)},o[r].prototype[r]=o[r],l.each(n,function(e,t){o[r].prototype[t]=n[t]}),l.each(t,function(e,t){n[t]?o[r].prototype[t]=function(){return this.parent=n[t],e.apply(this,arguments)}:t!=r&&(o[r].prototype[t]=e)})),l.each(t["static"],function(e,t){o[r][t]=e}),this.onCreate&&this.onCreate(e[2],e[3],o[r].prototype)}},walk:function(e,t,i,n){n=n||this,e&&(i&&(e=e[i]),o.each(e,function(e,r){return t.call(n,e,r,i)===!1?!1:(o.walk(e,t,i,n),void 0)}))},createNS:function(t,i){var n,o;for(i=i||e,t=t.split("."),n=0;n<t.length;n++)o=t[n],i[o]||(i[o]={}),i=i[o];return i},resolve:function(t,i){var n,o;for(i=i||e,t=t.split("."),n=0,o=t.length;o>n&&(i=i[t[n]],i);n++);return i},addUnload:function(t,i){function n(){function t(){i.detachEvent("onstop",t),o&&o(),i=0}var i=document;"interactive"==i.readyState&&(i&&i.attachEvent("onstop",t),e.setTimeout(function(){i&&i.detachEvent("onstop",t)},0))}var o,r=this;return o=function(){var t,i,s=r.unloads;if(s){for(i in s)t=s[i],t&&t.func&&t.func.call(t.scope,1);e.detachEvent?(e.detachEvent("onbeforeunload",n),e.detachEvent("onunload",o)):e.removeEventListener&&e.removeEventListener("unload",o,!1),r.unloads=t=s=w=o=0,e.CollectGarbage&&CollectGarbage()}},t={func:t,scope:i||this},r.unloads?r.unloads.push(t):(e.attachEvent?(e.attachEvent("onunload",o),e.attachEvent("onbeforeunload",n)):e.addEventListener&&e.addEventListener("unload",o,!1),r.unloads=[t]),t},removeUnload:function(e){var t=this.unloads,i=null;return o.each(t,function(n,o){return n&&n.func==e?(t.splice(o,1),i=e,!1):void 0}),i},explode:function(e,t){return!e||o.is(e,"array")?e:o.map(e.split(t||","),o.trim)},_addVer:function(e){var t;return this.query?(t=(-1==e.indexOf("?")?"?":"&")+this.query,-1==e.indexOf("#")?e+t:e.replace("#",t+"#")):e},_replace:function(e,i,o){return n?o.replace(e,function(){var e,n=i,o=arguments;for(e=0;e<o.length-2;e++)n=o[e]===t?n.replace(new RegExp("\\$"+e,"g"),""):n.replace(new RegExp("\\$"+e,"g"),o[e]);return n}):o.replace(e,i)}};o._init(),e.tinymce=e.tinyMCE=o}(window),tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:!1,Dispatcher:function(e){this.scope=e||this,this.listeners=[]},add:function(e,t){return this.listeners.push({cb:e,scope:t||this.scope}),e},addToTop:function(e,t){var i=this,n={cb:e,scope:t||i.scope};return i.inDispatch?i.listeners=[n].concat(i.listeners):i.listeners.unshift(n),e},remove:function(e){var t=this.listeners,i=null;return tinymce.each(t,function(n,o){return e==n.cb?(i=n,t.splice(o,1),!1):void 0}),i},dispatch:function(){var e,t,i,n=this,o=arguments,r=n.listeners;for(n.inDispatch=!0,t=0;t<r.length&&(i=r[t],e=i.cb.apply(i.scope,o.length>0?o:[i.scope]),e!==!1);t++);return n.inDispatch=!1,e}}),function(){var e=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(t,i){var n,o,r=this;return t=tinymce.trim(t),i=r.settings=i||{},/^([\w\-]+):([^\/]{2})/i.test(t)||/^\s*#/.test(t)?(r.source=t,void 0):(0===t.indexOf("/")&&0!==t.indexOf("//")&&(t=(i.base_uri?i.base_uri.protocol||"http":"http")+"://mce_host"+t),/^[\w\-]*:?\/\//.test(t)||(o=i.base_uri?i.base_uri.path:new tinymce.util.URI(location.href).directory,t=(i.base_uri&&i.base_uri.protocol||"http")+"://mce_host"+r.toAbsPath(o,t)),t=t.replace(/@@/g,"(mce_at)"),t=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(t),e(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(e,i){var n=t[i];n&&(n=n.replace(/\(mce_at\)/g,"@@")),r[e]=n}),n=i.base_uri,n&&(r.protocol||(r.protocol=n.protocol),r.userInfo||(r.userInfo=n.userInfo),r.port||"mce_host"!==r.host||(r.port=n.port),r.host&&"mce_host"!==r.host||(r.host=n.host),r.source=""),void 0)},setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var t,i=this;if("./"===e)return e;if(e=new tinymce.util.URI(e,{base_uri:i}),"mce_host"!=e.host&&i.host!=e.host&&e.host||i.port!=e.port||i.protocol!=e.protocol)return e.getURI();var n=i.getURI(),o=e.getURI();return n==o||"/"==n.charAt(n.length-1)&&n.substr(0,n.length-1)==o?n:(t=i.toRelPath(i.path,e.path),e.query&&(t+="?"+e.query),e.anchor&&(t+="#"+e.anchor),t)},toAbsolute:function(e,t){return e=new tinymce.util.URI(e,{base_uri:this}),e.getURI(this.host==e.host&&this.protocol==e.protocol?t:0)},toRelPath:function(e,t){var i,n,o,r=0,s="";if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),i=t.split("/"),e.length>=i.length)for(n=0,o=e.length;o>n;n++)if(n>=i.length||e[n]!=i[n]){r=n+1;break}if(e.length<i.length)for(n=0,o=i.length;o>n;n++)if(n>=e.length||e[n]!=i[n]){r=n+1;break}if(1===r)return t;for(n=0,o=e.length-(r-1);o>n;n++)s+="../";for(n=r-1,o=i.length;o>n;n++)s+=n!=r-1?"/"+i[n]:i[n];return s},toAbsPath:function(t,i){var n,o,r,s=0,a=[];for(o=/\/$/.test(i)?"/":"",t=t.split("/"),i=i.split("/"),e(t,function(e){e&&a.push(e)}),t=a,n=i.length-1,a=[];n>=0;n--)0!==i[n].length&&"."!==i[n]&&(".."!==i[n]?s>0?s--:a.push(i[n]):s++);return n=t.length-s,r=0>=n?a.reverse().join("/"):t.slice(0,n).join("/")+"/"+a.reverse().join("/"),0!==r.indexOf("/")&&(r="/"+r),o&&r.lastIndexOf("/")!==r.length-1&&(r+=o),r},getURI:function(e){var t,i=this;return(!i.source||e)&&(t="",e||(i.protocol&&(t+=i.protocol+"://"),i.userInfo&&(t+=i.userInfo+"@"),i.host&&(t+=i.host),i.port&&(t+=":"+i.port)),i.path&&(t+=i.path),i.query&&(t+="?"+i.query),i.anchor&&(t+="#"+i.anchor),i.source=t),i.source}})}(),function(){var e=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(t){var i,n=this.get(t);return n&&e(n.split("&"),function(e){e=e.split("="),i=i||{},i[unescape(e[0])]=unescape(e[1])}),i},setHash:function(t,i,n,o,r,s){var a="";e(i,function(e,t){a+=(a?"&":"")+escape(t)+"="+escape(e)}),this.set(t,a,n,o,r,s)},get:function(e){var t,i,n=document.cookie,o=e+"=";if(n){if(i=n.indexOf("; "+o),-1==i){if(i=n.indexOf(o),0!==i)return null}else i+=2;return t=n.indexOf(";",i),-1==t&&(t=n.length),unescape(n.substring(i+o.length,t))}},set:function(e,t,i,n,o,r){document.cookie=e+"="+escape(t)+(i?"; expires="+i.toGMTString():"")+(n?"; path="+escape(n):"")+(o?"; domain="+o:"")+(r?"; secure":"")},remove:function(e,t,i){var n=new Date;n.setTime(n.getTime()-1e3),this.set(e,"",n,t,i)}})}(),function(){function serialize(e,t){var i,n,o,r;if(t=t||'"',null==e)return"null";if(o=typeof e,"string"==o)return n="\bb t\nn\ff\rr\"\"''\\\\",t+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,o){return'"'===t&&"'"===e?e:(i=n.indexOf(o),i+1?"\\"+n.charAt(i+1):(e=o.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+t;if("object"==o){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(i=0,n="[";i<e.length;i++)n+=(i>0?",":"")+serialize(e[i],t);return n+"]"}n="{";for(r in e)e.hasOwnProperty(r)&&(n+="function"!=typeof e[r]?(n.length>1?","+t:t)+r+t+":"+serialize(e[r],t):"");return n+"}"}return""+e}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}}(),tinymce.create("static tinymce.util.XHR",{send:function(e){function t(){!e.async||4==n.readyState||s++>1e4?(e.success&&1e4>s&&200==n.status?e.success.call(e.success_scope,""+n.responseText,n,e):e.error&&e.error.call(e.error_scope,s>1e4?"TIMED_OUT":"GENERAL",n,e),n=null):r.setTimeout(t,10)}function i(e){n=0;try{n=new ActiveXObject(e)}catch(t){}return n}var n,o,r=window,s=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async===!1?!1:!0,e.data=e.data||"",n=r.XMLHttpRequest?new XMLHttpRequest:i("Microsoft.XMLHTTP")||i("Msxml2.XMLHTTP")){if(n.overrideMimeType&&n.overrideMimeType(e.content_type),n.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.content_type&&n.setRequestHeader("Content-Type",e.content_type),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(e.data),!e.async)return t();o=r.setTimeout(t,10)}}}),function(){var e=tinymce.extend,t=tinymce.util.JSON,i=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(t){this.settings=e({},t),this.count=0},send:function(n){var o=n.error,r=n.success;n=e(this.settings,n),n.success=function(e,i){e=t.parse(e),"undefined"==typeof e&&(e={error:"JSON Parse error."}),e.error?o.call(n.error_scope||n.scope,e.error,i):r.call(n.success_scope||n.scope,e.result)},n.error=function(e,t){o&&o.call(n.error_scope||n.scope,e,t)},n.data=t.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",i.send(n)},"static":{sendRPC:function(e){return(new tinymce.util.JSONRequest).send(e)}}})}(),function(e){e.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey},metaKeyPressed:function(t){return e.isMac?t.metaKey:t.ctrlKey&&!t.altKey}}}(tinymce),tinymce.util.Quirks=function(e){function t(t,i){try{e.getDoc().execCommand(t,!1,i)}catch(n){}}function i(){var t=e.getDoc().documentMode;return t?t:6}function n(e){return e.isDefaultPrevented()}function o(){function t(t){function i(){if(3==a.nodeType){if(t&&l==a.length)return!0;if(!t&&0===l)return!0}}var n,o,r,s,a,l,c;n=M.getRng();var u=[n.startContainer,n.startOffset,n.endContainer,n.endOffset];if(n.collapsed||(t=!0),a=n[(t?"start":"end")+"Container"],l=n[(t?"start":"end")+"Offset"],3==a.nodeType&&(o=P.getParent(n.startContainer,P.isBlock),t&&(o=P.getNext(o,P.isBlock)),!o||!i()&&n.collapsed||(r=P.create("em",{id:"__mceDel"}),R(tinymce.grep(o.childNodes),function(e){r.appendChild(e)}),o.appendChild(r))),n=P.createRng(),n.setStart(u[0],u[1]),n.setEnd(u[2],u[3]),M.setRng(n),e.getDoc().execCommand(t?"ForwardDelete":"Delete",!1,null),r){for(s=M.getBookmark();c=P.get("__mceDel");)P.remove(c,!0);M.moveToBookmark(s)}}e.onKeyDown.add(function(e,i){var o;o=i.keyCode==A,n(i)||!o&&i.keyCode!=N||E.modifierPressed(i)||(i.preventDefault(),t(o))}),e.addCommand("Delete",function(){t()})}function r(){function t(e){var t=P.create("body"),i=e.cloneContents();return t.appendChild(i),M.serializer.serialize(t,{format:"html"})}function i(i){var n=t(i),o=P.createRng();o.selectNode(e.getBody());var r=t(o);return n===r}e.onKeyDown.add(function(e,t){var o,r=t.keyCode;if(!n(t)&&(r==A||r==N)){if(o=e.selection.isCollapsed(),o&&!P.isEmpty(e.getBody()))return;if(tinymce.isIE&&!o)return;if(!o&&!i(e.selection.getRng()))return;e.setContent(""),e.selection.setCursorLocation(e.getBody(),0),e.nodeChanged()}})}function s(){e.onKeyDown.add(function(e,t){!n(t)&&65==t.keyCode&&E.metaKeyPressed(t)&&(t.preventDefault(),e.execCommand("SelectAll"))})}function a(){e.settings.content_editable||(P.bind(e.getDoc(),"focusin",function(){M.setRng(M.getRng())}),P.bind(e.getDoc(),"mousedown",function(t){t.target==e.getDoc().documentElement&&(e.getWin().focus(),M.setRng(M.getRng()))}))}function l(){e.onKeyDown.add(function(e,t){if(!n(t)&&t.keyCode===N&&M.isCollapsed()&&0===M.getRng(!0).startOffset){var i=M.getNode(),o=i.previousSibling;o&&o.nodeName&&"hr"===o.nodeName.toLowerCase()&&(P.remove(o),tinymce.dom.Event.cancel(t))}})}function c(){Range.prototype.getClientRects||e.onMouseDown.add(function(e,t){if(!n(t)&&"HTML"===t.target.nodeName){var i=e.getBody();i.blur(),setTimeout(function(){i.focus()},0)}})}function u(){e.onClick.add(function(e,t){t=t.target,/^(IMG|HR)$/.test(t.nodeName)&&M.getSel().setBaseAndExtent(t,0,t,1),"A"==t.nodeName&&P.hasClass(t,"mceItemAnchor")&&M.select(t),e.nodeChanged()})}function d(){function t(){var t=P.getAttribs(M.getStart().cloneNode(!1));return function(){var i=M.getStart();i!==e.getBody()&&(P.setAttrib(i,"style",null),R(t,function(e){i.setAttributeNode(e.cloneNode(!0))}))}}function i(){return!M.isCollapsed()&&P.getParent(M.getStart(),P.isBlock)!=P.getParent(M.getEnd(),P.isBlock)}function o(e,t){return t.preventDefault(),!1}e.onKeyPress.add(function(e,o){var r;return n(o)||8!=o.keyCode&&46!=o.keyCode||!i()?void 0:(r=t(),e.getDoc().execCommand("delete",!1,null),r(),o.preventDefault(),!1)}),P.bind(e.getDoc(),"cut",function(r){var s;!n(r)&&i()&&(s=t(),e.onKeyUp.addToTop(o),setTimeout(function(){s(),e.onKeyUp.remove(o)},0))})}function h(){var t,i;P.bind(e.getDoc(),"selectionchange",function(){i&&(clearTimeout(i),i=0),i=window.setTimeout(function(){var i=M.getRng();t&&tinymce.dom.RangeUtils.compareRanges(i,t)||(e.nodeChanged(),t=i)},50)})}function p(){document.body.setAttribute("role","application")}function f(){e.onKeyDown.add(function(e,t){if(!n(t)&&t.keyCode===N&&M.isCollapsed()&&0===M.getRng(!0).startOffset){var i=M.getNode().previousSibling;if(i&&i.nodeName&&"table"===i.nodeName.toLowerCase())return tinymce.dom.Event.cancel(t)}})}function m(){i()>7||(t("RespectVisibilityInDesign",!0),e.contentStyles.push(".mceHideBrInPre pre br {display: none}"),P.addClass(e.getBody(),"mceHideBrInPre"),H.addNodeFilter("pre",function(e){for(var t,i,n,o,r=e.length;r--;)for(t=e[r].getAll("br"),i=t.length;i--;)n=t[i],o=n.prev,o&&3===o.type&&"\n"!=o.value.charAt(o.value-1)?o.value+="\n":n.parent.insert(new tinymce.html.Node("#text",3),n,!0).value="\n"}),B.addNodeFilter("pre",function(e){for(var t,i,n,o,r=e.length;r--;)for(t=e[r].getAll("br"),i=t.length;i--;)n=t[i],o=n.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function g(){P.bind(e.getBody(),"mouseup",function(){var e,t=M.getNode();"IMG"==t.nodeName&&((e=P.getStyle(t,"width"))&&(P.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),P.setStyle(t,"width","")),(e=P.getStyle(t,"height"))&&(P.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),P.setStyle(t,"height","")))})}function v(){e.onKeyDown.add(function(e,t){var i,o,r,s,a,l,c;if(i=t.keyCode==A,!n(t)&&(i||t.keyCode==N)&&!E.modifierPressed(t)&&(o=M.getRng(),r=o.startContainer,s=o.startOffset,c=o.collapsed,3==r.nodeType&&r.nodeValue.length>0&&(0===s&&!c||c&&s===(i?0:1)))){if(l=r.previousSibling,l&&"IMG"==l.nodeName)return;nonEmptyElements=e.schema.getNonEmptyElements(),t.preventDefault(),a=P.create("br",{id:"__tmp"}),r.parentNode.insertBefore(a,r),e.getDoc().execCommand(i?"ForwardDelete":"Delete",!1,null),r=M.getRng().startContainer,l=r.previousSibling,l&&1==l.nodeType&&!P.isBlock(l)&&P.isEmpty(l)&&!nonEmptyElements[l.nodeName.toLowerCase()]&&P.remove(l),P.remove("__tmp")}})}function b(){e.onKeyDown.add(function(e,t){var i,o,r,s,a;if(!n(t)&&t.keyCode==E.BACKSPACE&&(i=M.getRng(),o=i.startContainer,r=i.startOffset,s=P.getRoot(),a=o,i.collapsed&&0===r)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=s;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(e.formatter.toggle("blockquote",null,a),i=P.createRng(),i.setStart(o,0),i.setEnd(o,0),M.setRng(i))}})}function y(){function i(){e._refreshContentEditable(),t("StyleWithCSS",!1),t("enableInlineTableEditing",!1),I.object_resizing||t("enableObjectResizing",!1)}I.readonly||(e.onBeforeExecCommand.add(i),e.onMouseDown.add(i))}function _(){function t(){R(P.select("a"),function(e){var t=e.parentNode,i=P.getRoot();if(t.lastChild===e){for(;t&&!P.isBlock(t);){if(t.parentNode.lastChild!==t||t===i)return;t=t.parentNode}P.add(t,"br",{"data-mce-bogus":1})}})}e.onExecCommand.add(function(e,i){"CreateLink"===i&&t(e)}),e.onSetContent.add(M.onSetContent.add(t))}function C(){I.forced_root_block&&e.onInit.add(function(){t("DefaultParagraphSeparator",I.forced_root_block)})}function x(){function t(t,i){t&&i.initial||e.execCommand("mceRepaint")}e.onUndo.add(t),e.onRedo.add(t),e.onSetContent.add(t)}function w(){e.onKeyDown.add(function(e,t){var i;n(t)||t.keyCode!=N||(i=e.getDoc().selection.createRange(),i&&i.item&&(t.preventDefault(),e.undoManager.beforeChange(),P.remove(i.item(0)),e.undoManager.add()))})}function k(){var t;i()>=10&&(t="",R("p div h1 h2 h3 h4 h5 h6".split(" "),function(e,i){t+=(i>0?",":"")+e+":empty"}),e.contentStyles.push(t+"{padding-right: 1px !important}"))}function T(){function i(e){var t,i;t=e.screenX-h,i=e.screenY-p,b=t*d[2]+f,y=i*d[3]+m,b=5>b?5:b,y=5>y?5:y,(E.modifierPressed(e)||"IMG"==c.nodeName&&d[2]*d[3]!==0)&&(b=Math.round(y/g),y=Math.round(b*g)),P.setStyles(u,{width:b,height:y}),d[2]<0&&u.clientWidth<=b&&P.setStyle(u,"left",a+(f-b)),d[3]<0&&u.clientHeight<=y&&P.setStyle(u,"top",l+(m-y))}function n(){function t(t,i){i&&(c.style[t]||!e.schema.isValid(c.nodeName.toLowerCase(),t)?P.setStyle(c,t,i):P.setAttrib(c,t,i))}t("width",b),t("height",y),P.unbind(C,"mousemove",i),P.unbind(C,"mouseup",n),_!=C&&(P.unbind(_,"mousemove",i),P.unbind(_,"mouseup",n)),P.remove(u),o(c)}function o(e){var t,o,s;r(),t=P.getPos(e),a=t.x,l=t.y,o=e.offsetWidth,s=e.offsetHeight,c!=e&&(c=e,b=y=0),R(v,function(e,t){var r;r=P.get("mceResizeHandle"+t),r?P.show(r):(r=P.add(C.documentElement,"div",{id:"mceResizeHandle"+t,"class":"mceResizeHandle",style:"cursor:"+t+"-resize; margin:0; padding:0"}),P.bind(r,"mousedown",function(t){t.preventDefault(),n(),h=t.screenX,p=t.screenY,f=c.clientWidth,m=c.clientHeight,g=m/f,d=e,u=c.cloneNode(!0),P.addClass(u,"mceClonedResizable"),P.setStyles(u,{left:a,top:l,margin:0}),C.documentElement.appendChild(u),P.bind(C,"mousemove",i),P.bind(C,"mouseup",n),_!=C&&(P.bind(_,"mousemove",i),P.bind(_,"mouseup",n))})),P.setStyles(r,{left:o*e[0]+a-r.offsetWidth/2,top:s*e[1]+l-r.offsetHeight/2})}),tinymce.isOpera||"IMG"!=c.nodeName||c.setAttribute("data-mce-selected","1")}function r(){c&&c.removeAttribute("data-mce-selected");for(var e in v)P.hide("mceResizeHandle"+e)}function s(){var e=P.getParent(M.getNode(),"table,img");R(P.select("img[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),e?o(e):r()}var a,l,c,u,d,h,p,f,m,g,v,b,y,_=document,C=e.getDoc();I.object_resizing&&I.webkit_fake_resize!==!1&&(t("enableObjectResizing",!1),v={n:[.5,0,0,-1],e:[1,.5,1,0],s:[.5,1,0,1],w:[0,.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},e.contentStyles.push(".mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}"),e.onNodeChange.add(s),P.bind(C,"selectionchange",s),e.serializer.addAttributeFilter("data-mce-selected",function(e,t){for(var i=e.length;i--;)e[i].attr(t,null)}))}function D(){i()<9&&(H.addNodeFilter("noscript",function(e){for(var t,i,n=e.length;n--;)t=e[n],i=t.firstChild,i&&t.attr("data-mce-innertext",i.value)}),B.addNodeFilter("noscript",function(e){for(var t,i,n,o=e.length;o--;)t=e[o],i=e[o].firstChild,i?i.value=tinymce.html.Entities.decode(i.value):(n=t.attributes.map["data-mce-innertext"],n&&(t.attr("data-mce-innertext",null),i=new tinymce.html.Node("#text",3),i.value=n,i.raw=!0,t.append(i)))}))}function S(){e.contentStyles.push("body {min-height: 100px}"),e.onClick.add(function(t,i){"HTML"==i.target.nodeName&&(e.execCommand("SelectAll"),e.selection.collapse(!0),e.nodeChanged())})}var E=tinymce.VK,N=E.BACKSPACE,A=E.DELETE,P=e.dom,M=e.selection,I=e.settings,H=e.parser,B=e.serializer,R=tinymce.each;f(),b(),r(),tinymce.isWebKit&&(v(),o(),a(),u(),C(),tinymce.isIDevice?h():(T(),s())),tinymce.isIE&&!tinymce.isIE11&&(l(),p(),m(),g(),w(),k(),D()),tinymce.isIE11&&S(),tinymce.isGecko&&!tinymce.isIE11&&(l(),c(),d(),y(),_(),x()),tinymce.isOpera&&T()},function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function i(e,t){var i,n,r,s={};if(e){for(e=e.split(","),t=t||10,i=0;i<e.length;i+=2)n=String.fromCharCode(parseInt(e[i],t)),o[n]||(r="&"+e[i+1]+";",s[n]=r,s[r]=n);return s}}var n,o,r,s=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,a=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,u={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};
75
+ o={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"},r={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},n=i("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),e.html=e.html||{},e.html.Entities={encodeRaw:function(e,t){return e.replace(t?s:a,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(l,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:a,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,i){return i=i||n,e.replace(t?s:a,function(e){return o[e]||i[e]||e})},getEncodeFunc:function(t,r){function l(e,t){return e.replace(t?s:a,function(e){return o[e]||r[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,t){return u.encodeNamed(e,t,r)}var u=e.html.Entities;return r=i(r)||n,t=e.makeMap(t.replace(/\+/g,",")),t.named&&t.numeric?l:t.named?r?c:u.encodeNamed:t.numeric?u.encodeNumeric:u.encodeRaw},decode:function(e){return e.replace(c,function(e,i,o){return i?(o=parseInt(o,2===i.length?16:10),o>65535?(o-=65536,String.fromCharCode(55296+(o>>10),56320+(1023&o))):u[o]||String.fromCharCode(o)):r[e]||n[e]||t(e)})}}}(tinymce),tinymce.html.Styles=function(e,t){function i(e,t,i,n){function o(e){return e=parseInt(e).toString(16),e.length>1?e:"0"+e}return"#"+o(t)+o(i)+o(n)}var n,o,r,s=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,a=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,l=/\s*([^:]+):\s*([^;]+);?/g,c=/\s+$/,u={};for(e=e||{},r="\\\" \\' \\; \\: ; : ".split(" "),o=0;o<r.length;o++)u[r[o]]=""+o,u[""+o]=r[o];return{toHex:function(e){return e.replace(s,i)},parse:function(t){function n(e,t){var i,n,o,r;"none"===b["border-image"]&&delete b["border-image"],i=b[e+"-top"+t],i&&(n=b[e+"-right"+t],i==n&&(o=b[e+"-bottom"+t],n==o&&(r=b[e+"-left"+t],o==r&&(b[e+t]=r,delete b[e+"-top"+t],delete b[e+"-right"+t],delete b[e+"-bottom"+t],delete b[e+"-left"+t]))))}function o(e){var t,i=b[e];if(i&&!(i.indexOf(" ")<0)){for(i=i.split(" "),t=i.length;t--;)if(i[t]!==i[0])return!1;return b[e]=i[0],!0}}function r(e,t,i,n){o(t)&&o(i)&&o(n)&&(b[e]=b[t]+" "+b[i]+" "+b[n],delete b[t],delete b[i],delete b[n])}function d(e){return v=!0,u[e]}function h(e,t){return v&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return u[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(e,t,i,n,o,r){return(o=o||r)?(o=h(o),"'"+o.replace(/\'/g,"\\'")+"'"):(t=h(t||i||n),y&&(t=y.call(_,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')")}var f,m,g,v,b={},y=e.url_converter,_=e.url_converter_scope||this;if(t){for(t=t.replace(/\\[\"\';:\uFEFF]/g,d).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,d)});f=l.exec(t);)m=f[1].replace(c,"").toLowerCase(),g=f[2].replace(c,""),m&&g.length>0&&("font-weight"===m&&"700"===g?g="bold":("color"===m||"background-color"===m)&&(g=g.toLowerCase()),g=g.replace(s,i),g=g.replace(a,p),b[m]=v?h(g,!0):g),l.lastIndex=f.index+f[0].length;n("border",""),n("border","-width"),n("border","-color"),n("border","-style"),n("padding",""),n("margin",""),r("border","border-width","border-style","border-color"),"medium none"===b.border&&delete b.border}return b},serialize:function(e,i){function o(i){var o,r,s,l;if(o=t.styles[i])for(r=0,s=o.length;s>r;r++)i=o[r],l=e[i],l!==n&&l.length>0&&(a+=(a.length>0?" ":"")+i+": "+l+";")}var r,s,a="";if(i&&t&&t.styles)o("*"),o(i);else for(r in e)s=e[r],s!==n&&s.length>0&&(a+=(a.length>0?" ":"")+r+": "+s+";");return a}}},function(e){function t(e,t){return e.split(t||",")}function i(e,i){function n(t){return t.replace(/[A-Z]+/g,function(t){return n(e[t])})}var o,r={};for(o in e)e.hasOwnProperty(o)&&(e[o]=n(e[o]));return n(i).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(e,i,n,o){n=t(n,"|"),r[i]={attributes:s(n),attributesOrder:n,children:s(o,"|",{"#comment":{}})}}),r}function n(){var e=r.html5;return e||(e=r.html5=i({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")),e}function o(){var e=r.html4;return e||(e=r.html4=i({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")),e}var r={},s=e.makeMap,a=e.each;e.html.Schema=function(i){function l(t,n,o){var a=i[t];return a?a=s(a,",",s(a.toUpperCase()," ")):(a=r[t],a||(a=s(n," ",s(n.toUpperCase()," ")),a=e.extend(a,o),r[t]=a)),a}function c(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function u(i){var n,o,r,a,l,u,d,h,p,f,m,g,v,b,y,_,C,x,w,T=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,S=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,E=/[*?+]/;if(i)for(i=t(i),k["@"]&&(_=k["@"].attributes,C=k["@"].attributesOrder),n=0,o=i.length;o>n;n++)if(l=T.exec(i[n])){if(b=l[1],p=l[2],y=l[3],h=l[4],g={},v=[],u={attributes:g,attributesOrder:v},"#"===b&&(u.paddEmpty=!0),"-"===b&&(u.removeEmpty=!0),_){for(x in _)g[x]=_[x];v.push.apply(v,C)}if(h)for(h=t(h,"|"),r=0,a=h.length;a>r;r++)if(l=S.exec(h[r])){if(d={},m=l[1],f=l[2].replace(/::/g,":"),b=l[3],w=l[4],"!"===m&&(u.attributesRequired=u.attributesRequired||[],u.attributesRequired.push(f),d.required=!0),"-"===m){delete g[f],v.splice(e.inArray(v,f),1);continue}b&&("="===b&&(u.attributesDefault=u.attributesDefault||[],u.attributesDefault.push({name:f,value:w}),d.defaultValue=w),":"===b&&(u.attributesForced=u.attributesForced||[],u.attributesForced.push({name:f,value:w}),d.forcedValue=w),"<"===b&&(d.validValues=s(w,"?"))),E.test(f)?(u.attributePatterns=u.attributePatterns||[],d.pattern=c(f),u.attributePatterns.push(d)):(g[f]||v.push(f),g[f]=d)}_||"@"!=p||(_=g,C=v),y&&(u.outputName=p,k[y]=u),E.test(p)?(u.pattern=c(p),D.push(u)):k[p]=u}}function d(e){k={},D=[],u(e),a(g,function(e,t){T[t]=e.children})}function h(e){var i=/^(~)?(.+)$/;e&&a(t(e),function(e){var t=i.exec(e),n="~"===t[1],o=n?"span":"div",r=t[2];T[r]=T[o],S[r]=o,n||(C[r.toUpperCase()]={},C[r]={}),k[r]||(k[r]=k[o]),a(T,function(e){e[o]&&(e[r]=e[o])})})}function p(e){var i=/^([+\-]?)(\w+)\[([^\]]+)\]$/;e&&a(t(e),function(e){var n,o,r=i.exec(e);r&&(o=r[1],n=o?T[r[2]]:T[r[2]]={"#comment":{}},n=T[r[2]],a(t(r[3],"|"),function(e){"-"===o?delete n[e]:n[e]={}}))})}function f(e){var t,i=k[e];if(i)return i;for(t=D.length;t--;)if(i=D[t],i.pattern.test(e))return i}var m,g,v,b,y,_,C,x,w=this,k={},T={},D=[],S={};i=i||{},g="html5"==i.schema?n():o(),i.verify_html===!1&&(i.valid_elements="*[*]"),i.valid_styles&&(m={},a(i.valid_styles,function(t,i){m[i]=e.explode(t)})),v=l("whitespace_elements","pre script noscript style textarea"),b=l("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),y=l("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr"),_=l("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),x=l("non_empty_elements","td th iframe video audio object script",y),textBlockElementsMap=l("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),C=l("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup",textBlockElementsMap),i.valid_elements?d(i.valid_elements):(a(g,function(e,t){k[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},T[t]=e.children}),"html5"!=i.schema&&a(t("strong/b,em/i"),function(e){e=t(e,"/"),k[e[1]].outputName=e[0]}),k.img.attributesDefault=[{name:"alt",value:""}],a(t("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(e){k[e]&&(k[e].removeEmpty=!0)}),a(t("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(e){k[e].paddEmpty=!0})),h(i.custom_elements),p(i.valid_children),u(i.extended_valid_elements),p("+ol[ul|ol],+ul[ul|ol]"),i.invalid_elements&&e.each(e.explode(i.invalid_elements),function(e){k[e]&&delete k[e]}),f("span")||u("span[!data-mce-type|*]"),w.children=T,w.styles=m,w.getBoolAttrs=function(){return _},w.getBlockElements=function(){return C},w.getTextBlockElements=function(){return textBlockElementsMap},w.getShortEndedElements=function(){return y},w.getSelfClosingElements=function(){return b},w.getNonEmptyElements=function(){return x},w.getWhiteSpaceElements=function(){return v},w.isValidChild=function(e,t){var i=T[e];return!(!i||!i[t])},w.isValid=function(e,t){var i,n,o=f(e);if(o){if(!t)return!0;if(o.attributes[t])return!0;if(i=o.attributePatterns)for(n=i.length;n--;)if(i[n].pattern.test(e))return!0}return!1},w.getElementRule=f,w.getCustomElements=function(){return S},w.addValidElements=u,w.setValidElements=d,w.addCustomElements=h,w.addValidChildren=p,w.elements=k}}(tinymce),function(e){e.html.SaxParser=function(t,i){var n=this,o=function(){};t=t||{},n.schema=i=i||new e.html.Schema,t.fix_self_closing!==!1&&(t.fix_self_closing=!0),e.each("comment cdata text start end pi doctype".split(" "),function(e){e&&(n[e]=t[e]||o)}),n.parse=function(n){function o(e){var t,i;for(t=L.length;t--&&L[t].name!==e;);if(t>=0){for(i=L.length-1;i>=t;i--)e=L[i],e.valid&&R.end(e.name);L.length=t}}function r(e,t,i,n,o){var r,s;if(t=t.toLowerCase(),i=t in g?t:F(i||n||o||""),b&&!p&&0!==t.indexOf("data-")){if(r=k[t],!r&&T){for(s=T.length;s--&&(r=T[s],!r.pattern.test(t)););-1===s&&(r=null)}if(!r)return;if(r.validValues&&!(i in r.validValues))return}c.map[t]=i,c.push({name:t,value:i})}var s,a,l,c,u,d,h,p,f,m,g,v,b,y,_,C,x,w,k,T,D,S,E,N,A,P,M,I,H,B,R=this,O=0,L=[],j=0,F=e.html.Entities.decode;for(A=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),P=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,M={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi},m=i.getShortEndedElements(),N=t.self_closing_elements||i.getSelfClosingElements(),g=i.getBoolAttrs(),b=t.validate,f=t.remove_internals,H=t.fix_self_closing,B=e.isIE,w=/^:/;s=A.exec(n);){if(O<s.index&&R.text(F(n.substr(O,s.index-O))),a=s[6])a=a.toLowerCase(),B&&w.test(a)&&(a=a.substr(1)),o(a);else if(a=s[7]){if(a=a.toLowerCase(),B&&w.test(a)&&(a=a.substr(1)),v=a in m,H&&N[a]&&L.length>0&&L[L.length-1].name===a&&o(a),!b||(y=i.getElementRule(a))){if(_=!0,b&&(k=y.attributes,T=y.attributePatterns),(x=s[8])?(p=-1!==x.indexOf("data-mce-type"),p&&f&&(_=!1),c=[],c.map={},x.replace(P,r)):(c=[],c.map={}),b&&!p){if(D=y.attributesRequired,S=y.attributesDefault,E=y.attributesForced)for(u=E.length;u--;)C=E[u],h=C.name,I=C.value,"{$uid}"===I&&(I="mce_"+j++),c.map[h]=I,c.push({name:h,value:I});if(S)for(u=S.length;u--;)C=S[u],h=C.name,h in c.map||(I=C.value,"{$uid}"===I&&(I="mce_"+j++),c.map[h]=I,c.push({name:h,value:I}));if(D){for(u=D.length;u--&&!(D[u]in c.map););-1===u&&(_=!1)}c.map["data-mce-bogus"]&&(_=!1)}_&&R.start(a,c,v)}else _=!1;if(l=M[a]){l.lastIndex=O=s.index+s[0].length,(s=l.exec(n))?(_&&(d=n.substr(O,s.index-O)),O=s.index+s[0].length):(d=n.substr(O),O=n.length),_&&d.length>0&&R.text(d,!0),_&&R.end(a),A.lastIndex=O;continue}v||(x&&x.indexOf("/")==x.length-1?_&&R.end(a):L.push({name:a,valid:_}))}else(a=s[1])?R.comment(a):(a=s[2])?R.cdata(a):(a=s[3])?R.doctype(a):(a=s[4])&&R.pi(a,s[5]);O=s.index+s[0].length}for(O<n.length&&R.text(F(n.substr(O))),u=L.length-1;u>=0;u--)a=L[u],a.valid&&R.end(a.name)}}}(tinymce),function(e){function t(e,t,i){var n,o,r=i?"lastChild":"firstChild",s=i?"prev":"next";if(e[r])return e[r];if(e!==t){if(n=e[s])return n;for(o=e.parent;o&&o!==t;o=o.parent)if(n=o[s])return n}}function i(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,o={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};e.extend(i.prototype,{replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var i,n,o,r=this;if("string"!=typeof e){for(n in e)r.attr(n,e[n]);return r}if(i=r.attributes){if(t!==o){if(null===t){if(e in i.map)for(delete i.map[e],n=i.length;n--;)if(i[n].name===e)return i=i.splice(n,1),r;return r}if(e in i.map){for(n=i.length;n--;)if(i[n].name===e){i[n].value=t;break}}else i.push({name:e,value:t});return i.map[e]=t,r}return i.map[e]}},clone:function(){var e,t,n,o,r,s=this,a=new i(s.name,s.type);if(n=s.attributes){for(r=[],r.map={},e=0,t=n.length;t>e;e++)o=n[e],"id"!==o.name&&(r[r.length]={name:o.name,value:o.value},r.map[o.name]=o.value);a.attributes=r}return a.value=s.value,a.shortEnded=s.shortEnded,a},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e,t,i=this;for(e=i.firstChild;e;)t=e.next,i.insert(e,i,!0),e=t;i.remove()},remove:function(){var e=this,t=e.parent,i=e.next,n=e.prev;return t&&(t.firstChild===e?(t.firstChild=i,i&&(i.prev=null)):n.next=i,t.lastChild===e?(t.lastChild=n,n&&(n.next=null)):i.prev=n,e.parent=e.next=e.prev=null),e},append:function(e){var t,i=this;return e.parent&&e.remove(),t=i.lastChild,t?(t.next=e,e.prev=t,i.lastChild=e):i.lastChild=i.firstChild=e,e.parent=i,e},insert:function(e,t,i){var n;return e.parent&&e.remove(),n=t.parent||this,i?(t===n.firstChild?n.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===n.lastChild?n.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=n,e},getAll:function(e){var i,n=this,o=[];for(i=n.firstChild;i;i=t(i,n))i.name===e&&o.push(i);return o},empty:function(){var e,i,n,o=this;if(o.firstChild){for(e=[],n=o.firstChild;n;n=t(n,o))e.push(n);for(i=e.length;i--;)n=e[i],n.parent=n.firstChild=n.lastChild=n.next=n.prev=null}return o.firstChild=o.lastChild=null,o},isEmpty:function(e){var i,o,r=this,s=r.firstChild;if(s)do{if(1===s.type){if(s.attributes.map["data-mce-bogus"])continue;if(e[s.name])return!1;for(i=s.attributes.length;i--;)if(o=s.attributes[i].name,"name"===o||0===o.indexOf("data-mce-"))return!1}if(8===s.type)return!1;if(3===s.type&&!n.test(s.value))return!1}while(s=t(s,r));return!0},walk:function(e){return t(this,null,e)}}),e.extend(i,{create:function(e,t){var n,r;if(n=new i(e,o[e]||1),t)for(r in t)n.attr(r,t[r]);return n}}),e.html.Node=i}(tinymce),function(e){var t=e.html.Node;e.html.DomParser=function(i,n){function o(i){var o,s,a,l,c,u,d,h,p,f,m,g,v,b;for(m=e.makeMap("tr,td,th,tbody,thead,tfoot,table"),f=n.getNonEmptyElements(),g=n.getTextBlockElements(),o=0;o<i.length;o++)if(s=i[o],s.parent&&!s.fixed)if(g[s.name]&&"li"==s.parent.name){for(v=s.next;v&&g[v.name];)v.name="li",v.fixed=!0,s.parent.insert(v,s.parent),v=v.next;s.unwrap(s)}else{for(l=[s],a=s.parent;a&&!n.isValidChild(a.name,s.name)&&!m[a.name];a=a.parent)l.push(a);if(a&&l.length>1){for(l.reverse(),c=u=r.filterNode(l[0].clone()),p=0;p<l.length-1;p++){for(n.isValidChild(u.name,l[p].name)?(d=r.filterNode(l[p].clone()),u.append(d)):d=u,h=l[p].firstChild;h&&h!=l[p+1];)b=h.next,d.append(h),h=b;u=d}c.isEmpty(f)?a.insert(s,l[0],!0):(a.insert(c,l[0],!0),a.insert(s,c)),a=l[0],(a.isEmpty(f)||a.firstChild===a.lastChild&&"br"===a.firstChild.name)&&a.empty().remove()}else if(s.parent){if("li"===s.name){if(v=s.prev,v&&("ul"===v.name||"ul"===v.name)){v.append(s);continue}if(v=s.next,v&&("ul"===v.name||"ul"===v.name)){v.insert(s,v.firstChild,!0);continue}s.wrap(r.filterNode(new t("ul",1)));continue}n.isValidChild(s.parent.name,"div")&&n.isValidChild("div",s.name)?s.wrap(r.filterNode(new t("div",1))):"style"===s.name||"script"===s.name?s.empty().remove():s.unwrap()}}}var r=this,s={},a=[],l={},c={};i=i||{},i.validate="validate"in i?i.validate:!0,i.root_name=i.root_name||"body",r.schema=n=n||new e.html.Schema,r.filterNode=function(e){var t,i,n;i in s&&(n=l[i],n?n.push(e):l[i]=[e]),t=a.length;for(;t--;)i=a[t].name,i in e.attributes.map&&(n=c[i],n?n.push(e):c[i]=[e]);return e},r.addNodeFilter=function(t,i){e.each(e.explode(t),function(e){var t=s[e];t||(s[e]=t=[]),t.push(i)})},r.addAttributeFilter=function(t,i){e.each(e.explode(t),function(e){var t;for(t=0;t<a.length;t++)if(a[t].name===e)return a[t].callbacks.push(i),void 0;a.push({name:e,callbacks:[i]})})},r.parse=function(r,u){function d(){for(var e,t,i=g.firstChild;i;)e=i.next,3==i.type||1==i.type&&"p"!==i.name&&!D[i.name]&&!i.attr("data-mce-type")?t?t.append(i):(t=h(B,1),g.insert(t,i),t.append(i)):t=null,i=e}function h(e,i){var n,o=new t(e,i);return e in s&&(n=l[e],n?n.push(o):l[e]=[o]),o}function p(e){var t,i,n;for(t=e.prev;t&&3===t.type;)i=t.value.replace(N,""),i.length>0?(t.value=i,t=t.prev):(n=t.prev,t.remove(),t=n)}function f(e){var t,i={};for(t in e)"li"!==t&&"p"!=t&&(i[t]=e[t]);return i}var m,g,v,b,y,_,C,x,w,k,T,D,S,E,N,A,P,M,I,H,B,R=[];if(u=u||{},l={},c={},D=e.extend(e.makeMap("script,style,head,html,body,title,meta,param"),n.getBlockElements()),H=n.getNonEmptyElements(),I=n.children,T=i.validate,B="forced_root_block"in u?u.forced_root_block:i.forced_root_block,M=n.getWhiteSpaceElements(),S=/^[ \t\r\n]+/,N=/[ \t\r\n]+$/,A=/[ \t\r\n]+/g,P=/^[ \t\r\n]+$/,m=new e.html.SaxParser({validate:T,self_closing_elements:f(n.getSelfClosingElements()),cdata:function(e){v.append(h("#cdata",4)).value=e},text:function(e,t){var i;E||(e=e.replace(A," "),v.lastChild&&D[v.lastChild.name]&&(e=e.replace(S,""))),0!==e.length&&(i=h("#text",3),i.raw=!!t,v.append(i).value=e)},comment:function(e){v.append(h("#comment",8)).value=e},pi:function(e,t){v.append(h(e,7)).value=t,p(v)},doctype:function(e){var t;t=v.append(h("#doctype",10)),t.value=e,p(v)},start:function(e,t,i){var o,r,s,l,u;if(s=T?n.getElementRule(e):{}){for(o=h(s.outputName||e,1),o.attributes=t,o.shortEnded=i,v.append(o),u=I[v.name],u&&I[o.name]&&!u[o.name]&&R.push(o),r=a.length;r--;)l=a[r].name,l in t.map&&(w=c[l],w?w.push(o):c[l]=[o]);D[e]&&p(o),i||(v=o),!E&&M[e]&&(E=!0)}},end:function(e){var i,o,r,s,a;if(o=T?n.getElementRule(e):{}){if(D[e]&&!E){if(i=v.firstChild,i&&3===i.type)for(r=i.value.replace(S,""),r.length>0?(i.value=r,i=i.next):(s=i.next,i.remove(),i=s);i&&3===i.type;)r=i.value,s=i.next,(0===r.length||P.test(r))&&(i.remove(),i=s),i=s;if(i=v.lastChild,i&&3===i.type)for(r=i.value.replace(N,""),r.length>0?(i.value=r,i=i.prev):(s=i.prev,i.remove(),i=s);i&&3===i.type;)r=i.value,s=i.prev,(0===r.length||P.test(r))&&(i.remove(),i=s),i=s}if(E&&M[e]&&(E=!1),(o.removeEmpty||o.paddEmpty)&&v.isEmpty(H))if(o.paddEmpty)v.empty().append(new t("#text","3")).value=" ";else if(!v.attributes.map.name&&!v.attributes.map.id)return a=v.parent,v.empty().remove(),v=a,void 0;v=v.parent}}},n),g=v=new t(u.context||i.root_name,11),m.parse(r),T&&R.length&&(u.context?u.invalid=!0:o(R)),B&&"body"==g.name&&d(),!u.invalid){for(k in l){for(w=s[k],b=l[k],C=b.length;C--;)b[C].parent||b.splice(C,1);for(y=0,_=w.length;_>y;y++)w[y](b,k,u)}for(y=0,_=a.length;_>y;y++)if(w=a[y],w.name in c){for(b=c[w.name],C=b.length;C--;)b[C].parent||b.splice(C,1);for(C=0,x=w.callbacks.length;x>C;C++)w.callbacks[C](b,w.name,u)}}return g},i.remove_trailing_brs&&r.addNodeFilter("br",function(t){var i,o,r,s,a,l,c=t.length,u=e.extend({},n.getBlockElements()),d=n.getNonEmptyElements();for(u.body=1,i=0;c>i;i++)if(o=t[i],r=o.parent,u[o.parent.name]&&o===r.lastChild){for(a=o.prev;a;){if(l=a.name,"span"!==l||"bookmark"!==a.attr("data-mce-type")){if("br"!==l)break;if("br"===l){o=null;break}}a=a.prev}o&&(o.remove(),r.isEmpty(d)&&(elementRule=n.getElementRule(r.name),elementRule&&(elementRule.removeEmpty?r.remove():elementRule.paddEmpty&&(r.empty().append(new e.html.Node("#text",3)).value=" "))))}else{for(s=o;r.firstChild===s&&r.lastChild===s&&(s=r,!u[r.name]);)r=r.parent;s===r&&(textNode=new e.html.Node("#text",3),textNode.value=" ",o.replace(textNode))}}),i.allow_html_in_named_anchor||r.addAttributeFilter("id,name",function(e){for(var t,i,n,o,r=e.length;r--;)if(o=e[r],"a"===o.name&&o.firstChild&&!o.attr("href")){n=o.parent,t=o.lastChild;do i=t.prev,n.insert(t,o),t=i;while(t)}})}}(tinymce),tinymce.html.Writer=function(e){var t,i,n,o,r,s=[];return e=e||{},t=e.indent,i=tinymce.makeMap(e.indent_before||""),n=tinymce.makeMap(e.indent_after||""),o=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities),r="html"==e.element_format,{start:function(e,a,l){var c,u,d,h;if(t&&i[e]&&s.length>0&&(h=s[s.length-1],h.length>0&&"\n"!==h&&s.push("\n")),s.push("<",e),a)for(c=0,u=a.length;u>c;c++)d=a[c],s.push(" ",d.name,'="',o(d.value,!0),'"');s[s.length]=!l||r?">":" />",l&&t&&n[e]&&s.length>0&&(h=s[s.length-1],h.length>0&&"\n"!==h&&s.push("\n"))},end:function(e){var i;s.push("</",e,">"),t&&n[e]&&s.length>0&&(i=s[s.length-1],i.length>0&&"\n"!==i&&s.push("\n"))},text:function(e,t){e.length>0&&(s[s.length]=t?e:o(e))},cdata:function(e){s.push("<![CDATA[",e,"]]>")},comment:function(e){s.push("<!--",e,"-->")},pi:function(e,i){i?s.push("<?",e," ",i,"?>"):s.push("<?",e,"?>"),t&&s.push("\n")},doctype:function(e){s.push("<!DOCTYPE",e,">",t?"\n":"")},reset:function(){s.length=0},getContent:function(){return s.join("").replace(/\n$/,"")}}},function(e){e.html.Serializer=function(t,i){var n=this,o=new e.html.Writer(t);t=t||{},t.validate="validate"in t?t.validate:!0,n.schema=i=i||new e.html.Schema,n.writer=o,n.serialize=function(e){function n(e){var t,a,l,c,u,d,h,p,f,m=r[e.type];if(m)m(e);else{if(t=e.name,a=e.shortEnded,l=e.attributes,s&&l&&l.length>1){for(d=[],d.map={},f=i.getElementRule(e.name),h=0,p=f.attributesOrder.length;p>h;h++)c=f.attributesOrder[h],c in l.map&&(u=l.map[c],d.map[c]=u,d.push({name:c,value:u}));for(h=0,p=l.length;p>h;h++)c=l[h].name,c in d.map||(u=l.map[c],d.map[c]=u,d.push({name:c,value:u}));l=d}if(o.start(e.name,l,a),!a){if(e=e.firstChild)do n(e);while(e=e.next);o.end(t)}}}var r,s;return s=t.validate,r={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do n(e);while(e=e.next)}},o.reset(),1!=e.type||t.inner?r[11](e):n(e),o.getContent()}}}(tinymce),tinymce.dom={},function(e,t){function i(e,t,i,n){e.addEventListener?e.addEventListener(t,i,n||!1):e.attachEvent&&e.attachEvent("on"+t,i)}function n(e,t,i,n){e.removeEventListener?e.removeEventListener(t,i,n||!1):e.detachEvent&&e.detachEvent("on"+t,i)}function o(e,t){function i(){return!1}function n(){return!0}var o,r=t||{};for(o in e)"layerX"!==o&&"layerY"!==o&&(r[o]=e[o]);return r.target||(r.target=r.srcElement||document),r.preventDefault=function(){r.isDefaultPrevented=n,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},r.stopPropagation=function(){r.isPropagationStopped=n,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=n,r.stopPropagation()},r.isDefaultPrevented||(r.isDefaultPrevented=i,r.isPropagationStopped=i,r.isImmediatePropagationStopped=i),r}function r(e,t,o){function r(){o.domLoaded||(o.domLoaded=!0,t(l))}var s=e.document,l={type:"ready"};return"complete"==s.readyState?(r(),void 0):(a?i(e,"DOMContentLoaded",r):(i(s,"readystatechange",function(){"complete"===s.readyState&&(n(s,"readystatechange",arguments.callee),r())}),s.documentElement.doScroll&&e===e.top&&!function(){try{s.documentElement.doScroll("left")}catch(e){return setTimeout(arguments.callee,0),void 0}r()}()),i(e,"load",r),void 0)}function s(e){function s(e,t){var i,n,o,r;if(i=p[t][e.type])for(n=0,o=i.length;o>n;n++)if(r=i[n],r&&r.func.call(r.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var l,c,u,d,h=this,p={};u="onmouseenter"in document.documentElement,c="onfocusin"in document.documentElement,d={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,h.domLoaded=!1,h.events=p,h.bind=function(n,f,m,g){function v(e){s(o(e||T.event),b)}var b,y,_,C,x,w,k,T=window;
76
+ if(n&&3!==n.nodeType&&8!==n.nodeType){for(n[t]?(b=n[t],p[b]||(p[b]={})):(b=l++,n[t]=b,p[b]={}),g=g||n,f=f.split(" "),_=f.length;_--;)C=f[_],w=v,x=k=!1,"DOMContentLoaded"===C&&(C="ready"),!h.domLoaded&&"complete"!=n.readyState||"ready"!==C?(u||(x=d[C],x&&(w=function(e){var t,i;if(t=e.currentTarget,i=e.relatedTarget,i&&t.contains)i=t.contains(i);else for(;i&&i!==t;)i=i.parentNode;i||(e=o(e||T.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,s(e,b))})),c||"focusin"!==C&&"focusout"!==C||(k=!0,x="focusin"===C?"focus":"blur",w=function(e){e=o(e||T.event),e.type="focus"===e.type?"focusin":"focusout",s(e,b)}),y=p[b][C],y?y.push({func:m,scope:g}):(p[b][C]=y=[{func:m,scope:g}],y.fakeName=x,y.capture=k,y.nativeHandler=w,a||(y.proxyHandler=e(b)),"ready"===C?r(n,w,h):i(n,x||C,a?w:y.proxyHandler,k))):(h.domLoaded=!0,m.call(g,o({type:C})));return n=y=0,m}},h.unbind=function(e,i,o){var r,s,l,c,u,d;if(!e||3===e.nodeType||8===e.nodeType)return h;if(r=e[t]){if(d=p[r],i){for(i=i.split(" "),l=i.length;l--;)if(u=i[l],s=d[u]){if(o)for(c=s.length;c--;)s[c].func===o&&s.splice(c,1);o&&0!==s.length||(delete d[u],n(e,s.fakeName||u,a?s.nativeHandler:s.proxyHandler,s.capture))}}else{for(u in d)s=d[u],n(e,s.fakeName||u,a?s.nativeHandler:s.proxyHandler,s.capture);d={}}for(u in d)return h;delete p[r];try{delete e[t]}catch(f){e[t]=null}}return h},h.fire=function(e,i,n){var r,a;if(!e||3===e.nodeType||8===e.nodeType)return h;a=o(null,n),a.type=i;do r=e[t],r&&s(a,r),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow;while(e&&!a.isPropagationStopped());return h},h.clean=function(e){var i,n,o=h.unbind;if(!e||3===e.nodeType||8===e.nodeType)return h;if(e[t]&&o(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(o(e),n=e.getElementsByTagName("*"),i=n.length;i--;)e=n[i],e[t]&&o(e);return h},h.callNativeHandler=function(e,t){p&&p[e][t.type].nativeHandler(t)},h.destory=function(){p={}},h.add=function(e,t,i,n){"string"==typeof e&&(e=document.getElementById(e));{if(!(e&&e instanceof Array))return"init"===t&&(t="ready"),h.bind(e,t instanceof Array?t.join(" "):t,i,n);for(var o=e.length;o--;)h.add(e[o],t,i,n)}},h.remove=function(e,t,i,n){if(!e)return h;if("string"==typeof e&&(e=document.getElementById(e)),e instanceof Array){for(var o=e.length;o--;)h.remove(e[o],t,i,n);return h}return h.unbind(e,t instanceof Array?t.join(" "):t,i)},h.clear=function(e){return"string"==typeof e&&(e=document.getElementById(e)),h.clean(e)},h.cancel=function(e){return e&&(h.prevent(e),h.stop(e)),!1},h.prevent=function(e){return e.preventDefault||(e=o(e)),e.preventDefault(),!1},h.stop=function(e){return e.stopPropagation||(e=o(e)),e.stopPropagation(),!1}}var a=!!document.addEventListener;e.EventUtils=s,e.Event=new s(function(e){return function(t){tinymce.dom.Event.callNativeHandler(e,t)}}),e.Event.bind(window,"ready",function(){}),e=0}(tinymce.dom,"data-mce-expando"),tinymce.dom.TreeWalker=function(e,t){function i(e,i,n,o){var r,s;if(e){if(!o&&e[i])return e[i];if(e!=t){if(r=e[n])return r;for(s=e.parentNode;s&&s!=t;s=s.parentNode)if(r=s[n])return r}}}var n=e;this.current=function(){return n},this.next=function(e){return n=i(n,"firstChild","nextSibling",e)},this.prev=function(e){return n=i(n,"lastChild","previousSibling",e)}},function(e){var t=e.each,i=e.is,n=e.isWebKit,o=e.isIE,r=e.html.Entities,s=/^([a-z0-9],?)+$/i,a=/^[ \t\r\n]*$/;e.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(t,i){var n,o=this;if(o.doc=t,o.win=window,o.files={},o.cssFlicker=!1,o.counter=0,o.stdMode=!e.isIE||t.documentMode>=8,o.boxModel=!e.isIE||"CSS1Compat"==t.compatMode||o.stdMode,o.hasOuterHTML="outerHTML"in t.createElement("a"),o.settings=i=e.extend({keep_values:!1,hex_colors:1},i),o.schema=i.schema,o.styles=new e.html.Styles({url_converter:i.url_converter,url_converter_scope:i.url_converter_scope},i.schema),e.isIE6)try{t.execCommand("BackgroundImageCache",!1,!0)}catch(r){o.cssFlicker=!0}o.fixDoc(t),o.events=i.ownEvents?new e.dom.EventUtils(i.proxy):e.dom.Event,e.addUnload(o.destroy,o),n=i.schema?i.schema.getBlockElements():{},o.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!n[e.nodeName]):!!n[e]}},fixDoc:function(t){var i,n=this.settings;if(o&&!e.isIE11&&n.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(e){t.createElement(e)});for(i in n.schema.getCustomElements())t.createElement(i)}},clone:function(i,n){var r,s,a=this;return!o||e.isIE11||1!==i.nodeType||n?i.cloneNode(n):(s=a.doc,n?r.firstChild:(r=s.createElement(i.nodeName),t(a.getAttribs(i),function(e){a.setAttrib(r,e.nodeName,a.getAttrib(i,e.nodeName))}),r))},getRoot:function(){var e=this,t=e.settings;return t&&e.get(t.root_element)||e.doc.body},getViewPort:function(e){var t,i;return e=e?e:this.win,t=e.document,i=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||i.scrollLeft,y:e.pageYOffset||i.scrollTop,w:e.innerWidth||i.clientWidth,h:e.innerHeight||i.clientHeight}},getRect:function(e){var t,i,n=this;return e=n.get(e),t=n.getPos(e),i=n.getSize(e),{x:t.x,y:t.y,w:i.w,h:i.h}},getSize:function(e){var t,i,n=this;return e=n.get(e),t=n.getStyle(e,"width"),i=n.getStyle(e,"height"),-1===t.indexOf("px")&&(t=0),-1===i.indexOf("px")&&(i=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(i,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,i){return this.getParents(e,t,i,!1)},getParents:function(e,t,n,o){var r,s=this,a=s.settings,l=[];for(e=s.get(e),o=void 0===o,a.strict_root&&(n=n||s.getRoot()),i(t,"string")&&(r=t,t="*"===t?function(e){return 1==e.nodeType}:function(e){return s.is(e,r)});e&&e!=n&&e.nodeType&&9!==e.nodeType;){if(!t||t(e)){if(!o)return e;l.push(e)}e=e.parentNode}return o?l:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,i){var n=this;return e.dom.Sizzle(t,n.get(i)||n.get(n.settings.root_element)||n.doc,[])},is:function(t,i){var n;if(void 0===t.length){if("*"===i)return 1==t.nodeType;if(s.test(i)){for(i=i.toLowerCase().split(/,/),t=t.nodeName.toLowerCase(),n=i.length-1;n>=0;n--)if(i[n]==t)return!0;return!1}}return e.dom.Sizzle.matches(i,t.nodeType?[t]:t).length>0},add:function(e,t,n,o,r){var s=this;return this.run(e,function(e){var a;return a=i(t,"string")?s.doc.createElement(t):t,s.setAttribs(a,n),o&&(o.nodeType?a.appendChild(o):s.setHTML(a,o)),r?a:e.appendChild(a)})},create:function(e,t,i){return this.add(this.doc.createElement(e),e,t,i,1)},createHTML:function(e,t,i){var n,o="",r=this;o+="<"+e;for(n in t)t.hasOwnProperty(n)&&(o+=" "+n+'="'+r.encode(t[n])+'"');return"undefined"!=typeof i?o+">"+i+"</"+e+">":o+" />"},remove:function(t,i){return this.run(t,function(t){var n,o=t.parentNode;if(!o)return null;if(i)for(;n=t.firstChild;)!e.isIE||3!==n.nodeType||n.nodeValue?o.insertBefore(n,t):t.removeChild(n);return o.removeChild(t)})},setStyle:function(t,i,n){var r=this;return r.run(t,function(s){var a;switch(a=s.style,i=i.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),r.pixelStyles.test(i)&&(e.is(n,"number")||/^[\-0-9\.]+$/.test(n))&&(n+="px"),i){case"opacity":o&&!e.isIE11&&(a.filter=""===n?"":"alpha(opacity="+100*n+")",t.currentStyle&&t.currentStyle.hasLayout||(a.display="inline-block")),a[i]=a["-moz-opacity"]=a["-khtml-opacity"]=n||"";break;case"float":o&&!e.isIE11?a.styleFloat=n:a.cssFloat=n;break;default:a[i]=n||""}r.settings.update_styles&&r.setAttrib(s,"data-mce-style")})},getStyle:function(e,t,i){if(e=this.get(e)){if(this.doc.defaultView&&i){t=t.replace(/[A-Z]/g,function(e){return"-"+e});try{return this.doc.defaultView.getComputedStyle(e,null).getPropertyValue(t)}catch(n){return null}}return t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==t&&(t=o?"styleFloat":"cssFloat"),e.currentStyle&&i?e.currentStyle[t]:e.style?e.style[t]:void 0}},setStyles:function(e,i){var n,o=this,r=o.settings;n=r.update_styles,r.update_styles=0,t(i,function(t,i){o.setStyle(e,i,t)}),r.update_styles=n,r.update_styles&&o.setAttrib(e,r.cssText)},removeAllAttribs:function(e){return this.run(e,function(e){var t,i=e.attributes;for(t=i.length-1;t>=0;t--)e.removeAttributeNode(i.item(t))})},setAttrib:function(e,n,o){var r=this;if(e&&n)return r.settings.strict&&(n=n.toLowerCase()),this.run(e,function(e){var s=r.settings,a=e.getAttribute(n);if(null!==o)switch(n){case"style":if(!i(o,"string"))return t(o,function(t,i){r.setStyle(e,i,t)}),void 0;s.keep_values&&(o&&!r._isRes(o)?e.setAttribute("data-mce-style",o,2):e.removeAttribute("data-mce-style",2)),e.style.cssText=o;break;case"class":e.className=o||"";break;case"src":case"href":s.keep_values&&(s.url_converter&&(o=s.url_converter.call(s.url_converter_scope||r,o,n,e)),r.setAttrib(e,"data-mce-"+n,o,2));break;case"shape":e.setAttribute("data-mce-style",o)}if(i(o)&&null!==o&&0!==o.length?e.setAttribute(n,""+o,2):e.removeAttribute(n,2),tinyMCE.activeEditor&&a!=o){var l=tinyMCE.activeEditor;l.onSetAttrib.dispatch(l,e,n,o)}})},setAttribs:function(e,i){var n=this;return this.run(e,function(e){t(i,function(t,i){n.setAttrib(e,i,t)})})},getAttrib:function(t,r,s){var a,l,c=this;if(t=c.get(t),!t||1!==t.nodeType)return s===l?!1:s;if(i(s)||(s=""),/^(src|href|style|coords|shape)$/.test(r)&&(a=t.getAttribute("data-mce-"+r)))return a;if(o&&c.props[r]&&(a=t[c.props[r]],a=a&&a.nodeValue?a.nodeValue:a),a||(a=t.getAttribute(r,2)),/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(r))return t[c.props[r]]===!0&&""===a?r:a?r:"";if("FORM"===t.nodeName&&t.getAttributeNode(r))return t.getAttributeNode(r).nodeValue;if("style"===r&&(a=a||t.style.cssText,a&&(a=c.serializeStyle(c.parseStyle(a),t.nodeName),c.settings.keep_values&&!c._isRes(a)&&t.setAttribute("data-mce-style",a))),n&&"class"===r&&a&&(a=a.replace(/(apple|webkit)\-[a-z\-]+/gi,"")),o)switch(r){case"rowspan":case"colspan":1===a&&(a="");break;case"size":("+0"===a||20===a||0===a)&&(a="");break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":0===a&&(a="");break;case"hspace":-1===a&&(a="");break;case"maxlength":case"tabindex":(32768===a||2147483647===a||"32768"===a)&&(a="");break;case"multiple":case"compact":case"noshade":case"nowrap":return 65535===a?r:s;case"shape":a=a.toLowerCase();break;default:0===r.indexOf("on")&&a&&(a=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+a))}return a!==l&&null!==a&&""!==a?""+a:s},getPos:function(e,t){var i,n,o=this,r=0,s=0,a=o.doc;if(e=o.get(e),t=t||a.body,e){if(e.getBoundingClientRect)return e=e.getBoundingClientRect(),i=o.boxModel?a.documentElement:a.body,r=e.left+(a.documentElement.scrollLeft||a.body.scrollLeft)-i.clientTop,s=e.top+(a.documentElement.scrollTop||a.body.scrollTop)-i.clientLeft,{x:r,y:s};for(n=e;n&&n!=t&&n.nodeType;)r+=n.offsetLeft||0,s+=n.offsetTop||0,n=n.offsetParent;for(n=e.parentNode;n&&n!=t&&n.nodeType;)r-=n.scrollLeft||0,s-=n.scrollTop||0,n=n.parentNode}return{x:r,y:s}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t,i=this.doc;styleElm=i.getElementById("mceDefaultStyles"),styleElm||(styleElm=i.createElement("style"),styleElm.id="mceDefaultStyles",styleElm.type="text/css",t=i.getElementsByTagName("head")[0],t.firstChild?t.insertBefore(styleElm,t.firstChild):t.appendChild(styleElm)),styleElm.styleSheet?styleElm.styleSheet.cssText+=e:styleElm.appendChild(i.createTextNode(e))},loadCSS:function(i){var n,r=this,s=r.doc;i||(i=""),n=s.getElementsByTagName("head")[0],t(i.split(","),function(t){var i;r.files[t]||(r.files[t]=!0,i=r.create("link",{rel:"stylesheet",href:e._addVer(t)}),o&&!e.isIE11&&s.documentMode&&s.recalc&&(i.onload=function(){s.recalc&&s.recalc(),i.onload=null}),n.appendChild(i))})},addClass:function(e,t){return this.run(e,function(e){var i;return t?this.hasClass(e,t)?e.className:(i=this.removeClass(e,t),e.className=(""!=i?i+" ":"")+t):0})},removeClass:function(t,i){var n,o=this;return o.run(t,function(t){var r;return o.hasClass(t,i)?(n||(n=new RegExp("(^|\\s+)"+i+"(\\s+|$)","g")),r=t.className.replace(n," "),r=e.trim(" "!=r?r:""),t.className=r,r||(t.removeAttribute("class"),t.removeAttribute("className")),r):t.className})},hasClass:function(e,t){return e=this.get(e),e&&t?-1!==(" "+e.className+" ").indexOf(" "+t+" "):!1},show:function(e){return this.setStyle(e,"display","block")},hide:function(e){return this.setStyle(e,"display","none")},isHidden:function(e){return e=this.get(e),!e||"none"==e.style.display||"none"==this.getStyle(e,"display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(i,n){var r=this;return r.run(i,function(i){if(o){for(;i.firstChild;)i.removeChild(i.firstChild);try{i.innerHTML="<br />"+n,i.removeChild(i.firstChild)}catch(s){var a=r.create("div");a.innerHTML="<br />"+n,t(e.grep(a.childNodes),function(e,t){t&&i.canHaveHTML&&i.appendChild(e)})}}else i.innerHTML=n;return n})},getOuterHTML:function(e){var t,i=this;return(e=i.get(e))?1===e.nodeType&&i.hasOuterHTML?e.outerHTML:(t=(e.ownerDocument||i.doc).createElement("body"),t.appendChild(e.cloneNode(!0)),t.innerHTML):null},setOuterHTML:function(e,t,i){function n(e,t,i){var n,o;for(o=i.createElement("body"),o.innerHTML=t,n=o.lastChild;n;)r.insertAfter(n.cloneNode(!0),e),n=n.previousSibling;r.remove(e)}var r=this;return this.run(e,function(e){if(e=r.get(e),1==e.nodeType)if(i=i||e.ownerDocument||r.doc,o)try{o&&1==e.nodeType?e.outerHTML=t:n(e,t,i)}catch(s){n(e,t,i)}else n(e,t,i)})},decode:r.decode,encode:r.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var i,n;return i=t.parentNode,n=t.nextSibling,n?i.insertBefore(e,n):i.appendChild(e),e})},replace:function(n,o,r){var s=this;return i(o,"array")&&(n=n.cloneNode(!0)),s.run(o,function(i){return r&&t(e.grep(i.childNodes),function(e){n.appendChild(e)}),i.parentNode.replaceChild(n,i)})},rename:function(e,i){var n,o=this;return e.nodeName!=i.toUpperCase()&&(n=o.create(i),t(o.getAttribs(e),function(t){o.setAttrib(n,t.nodeName,o.getAttrib(e,t.nodeName))}),o.replace(n,e,1)),n||e},findCommonAncestor:function(e,t){for(var i,n=e;n;){for(i=t;i&&n!=i;)i=i.parentNode;if(n==i)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){function t(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}var i=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(e);return i?e="#"+t(i[1])+t(i[2])+t(i[3]):e},getClasses:function(){function i(o){t(o.imports,function(e){i(e)}),t(o.cssRules||o.rules,function(o){switch(o.type||1){case 1:o.selectorText&&t(o.selectorText.split(","),function(t){t=t.replace(/^\s*|\s*$|^\s\./g,""),!/\.mce/.test(t)&&/\.[\w\-]+$/.test(t)&&(n=t,t=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t),(!a||(t=a(t,n)))&&(s[t]||(r.push({"class":t}),s[t]=1)))});break;case 3:try{i(o.styleSheet)}catch(l){}}})}var n,o=this,r=[],s={},a=o.settings.class_filter;if(o.classes)return o.classes;try{t(o.doc.styleSheets,i)}catch(l){}return r.length>0&&(o.classes=r),r},run:function(e,i,n){var o,r=this;return r.doc&&"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?i.call(n,e):(o=[],t(e,function(e,t){e&&("string"==typeof e&&(e=r.doc.getElementById(e)),o.push(i.call(n,e,t)))}),o)):!1},getAttribs:function(e){var t;return e=this.get(e),e?o?(t=[],"OBJECT"==e.nodeName?e.attributes:("OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"}),e.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t)):e.attributes:[]},isEmpty:function(t,i){var n,o,r,s,l,c=this,u=0;if(t=t.firstChild){s=new e.dom.TreeWalker(t,t.parentNode),i=i||c.schema?c.schema.getNonEmptyElements():null;do{if(r=t.nodeType,1===r){if(t.getAttribute("data-mce-bogus"))continue;if(l=t.nodeName.toLowerCase(),i&&i[l]){if("br"===l){u++;continue}return!1}for(o=c.getAttribs(t),n=t.attributes.length;n--;)if(l=t.attributes[n].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==r)return!1;if(3===r&&!a.test(t.nodeValue))return!1}while(t=s.next())}return 1>=u},destroy:function(t){var i=this;i.win=i.doc=i.root=i.events=i.frag=null,t||e.removeUnload(i.destroy)},createRng:function(){var t=this.doc;return t.createRange?t.createRange():new e.dom.Range(this)},nodeIndex:function(e,t){var i,n,o,r=0;if(e)for(i=e.nodeType,e=e.previousSibling,n=e;e;e=e.previousSibling)o=e.nodeType,(!t||3!=o||o!=i&&e.nodeValue.length)&&(r++,i=o);return r},split:function(t,i,n){function o(t){function i(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,i=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&i}var n,r=t.childNodes,s=t.nodeType;if(1!=s||"bookmark"!=t.getAttribute("data-mce-type")){for(n=r.length-1;n>=0;n--)o(r[n]);if(9!=s){if(3==s&&t.nodeValue.length>0){var a=e.trim(t.nodeValue).length;if(!l.isBlock(t.parentNode)||a>0||0===a&&i(t))return}else if(1==s&&(r=t.childNodes,1==r.length&&r[0]&&1==r[0].nodeType&&"bookmark"==r[0].getAttribute("data-mce-type")&&t.parentNode.insertBefore(r[0],t),r.length||/^(br|hr|input|img)$/i.test(t.nodeName)))return;l.remove(t)}return t}}var r,s,a,l=this,c=l.createRng();return t&&i?(c.setStart(t.parentNode,l.nodeIndex(t)),c.setEnd(i.parentNode,l.nodeIndex(i)),r=c.extractContents(),c=l.createRng(),c.setStart(i.parentNode,l.nodeIndex(i)+1),c.setEnd(t.parentNode,l.nodeIndex(t)+1),s=c.extractContents(),a=t.parentNode,a.insertBefore(o(r),t),n?a.replaceChild(n,i):a.insertBefore(i,t),a.insertBefore(o(s),t),l.remove(t),n||i):void 0},bind:function(e,t,i,n){return this.events.add(e,t,i,n||this)},unbind:function(e,t,i){return this.events.remove(e,t,i)},fire:function(e,t,i){return this.events.fire(e,t,i)},getContentEditable:function(e){var t;return 1!=e.nodeType?null:(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null)},_findSib:function(e,t,n){var o=this,r=t;if(e)for(i(r,"string")&&(r=function(e){return o.is(e,t)}),e=e[n];e;e=e[n])if(r(e))return e;return null},_isRes:function(e){return/^(top|left|bottom|right|width|height)/i.test(e)||/;\s*(top|left|bottom|right|width|height)/i.test(e)}}),e.DOM=new e.dom.DOMUtils(document,{process_html:0})}(tinymce),function(e){function t(e){function i(){return H.createDocumentFragment()}function n(e,t){x(L,e,t)}function o(e,t){x(j,e,t)}function r(e){n(e.parentNode,$(e))}function s(e){n(e.parentNode,$(e)+1)}function a(e){o(e.parentNode,$(e))}function l(e){o(e.parentNode,$(e)+1)}function c(e){e?(I[q]=I[z],I[W]=I[F]):(I[z]=I[q],I[F]=I[W]),I.collapsed=L}function u(e){r(e),l(e)}function d(e){n(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function h(e,t){var i=I[z],n=I[F],o=I[q],r=I[W],s=t.startContainer,a=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?C(i,n,s,a):1===e?C(o,r,s,a):2===e?C(o,r,l,c):3===e?C(i,n,l,c):void 0}function p(){w(O)}function f(){return w(B)}function m(){return w(R)}function g(t){var i,n,o=this[z],r=this[F];3!==o.nodeType&&4!==o.nodeType||!o.nodeValue?(o.childNodes.length>0&&(n=o.childNodes[r]),n?o.insertBefore(t,n):o.appendChild(t)):r?r>=o.nodeValue.length?e.insertAfter(t,o):(i=o.splitText(r),o.parentNode.insertBefore(t,i)):o.parentNode.insertBefore(t,o)}function v(e){var t=I.extractContents();I.insertNode(e),e.appendChild(t),I.selectNode(e)}function b(){return U(new t(e),{startContainer:I[z],startOffset:I[F],endContainer:I[q],endOffset:I[W],collapsed:I.collapsed,commonAncestorContainer:I.commonAncestorContainer})}function y(e,t){var i;if(3==e.nodeType)return e;if(0>t)return e;for(i=e.firstChild;i&&t>0;)--t,i=i.nextSibling;return i?i:e}function _(){return I[z]==I[q]&&I[F]==I[W]}function C(t,i,n,o){var r,s,a,l,c,u;if(t==n)return i==o?0:o>i?-1:1;for(r=n;r&&r.parentNode!=t;)r=r.parentNode;if(r){for(s=0,a=t.firstChild;a!=r&&i>s;)s++,a=a.nextSibling;return s>=i?-1:1}for(r=t;r&&r.parentNode!=n;)r=r.parentNode;if(r){for(s=0,a=n.firstChild;a!=r&&o>s;)s++,a=a.nextSibling;return o>s?-1:1}for(l=e.findCommonAncestor(t,n),c=t;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=n;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(a=l.firstChild;a;){if(a==c)return-1;if(a==u)return 1;a=a.nextSibling}}function x(t,i,n){var o,r;for(t?(I[z]=i,I[F]=n):(I[q]=i,I[W]=n),o=I[q];o.parentNode;)o=o.parentNode;for(r=I[z];r.parentNode;)r=r.parentNode;r==o?C(I[z],I[F],I[q],I[W])>0&&I.collapse(t):I.collapse(t),I.collapsed=_(),I.commonAncestorContainer=e.findCommonAncestor(I[z],I[q])}function w(e){var t,i,n,o,r,s,a,l=0,c=0;if(I[z]==I[q])return k(e);for(t=I[q],i=t.parentNode;i;t=i,i=i.parentNode){if(i==I[z])return T(t,e);++l}for(t=I[z],i=t.parentNode;i;t=i,i=i.parentNode){if(i==I[q])return D(t,e);++c}for(n=c-l,o=I[z];n>0;)o=o.parentNode,n--;for(r=I[q];0>n;)r=r.parentNode,n++;for(s=o.parentNode,a=r.parentNode;s!=a;s=s.parentNode,a=a.parentNode)o=s,r=a;return S(o,r,e)}function k(e){var t,n,o,r,s,a,l,c,u;if(e!=O&&(t=i()),I[F]==I[W])return t;if(3==I[z].nodeType){if(n=I[z].nodeValue,o=n.substring(I[F],I[W]),e!=R&&(r=I[z],c=I[F],u=I[W]-I[F],0===c&&u>=r.nodeValue.length-1?r.parentNode.removeChild(r):r.deleteData(c,u),I.collapse(L)),e==O)return;return o.length>0&&t.appendChild(H.createTextNode(o)),t}for(r=y(I[z],I[F]),s=I[W]-I[F];r&&s>0;)a=r.nextSibling,l=P(r,e),t&&t.appendChild(l),--s,r=a;return e!=R&&I.collapse(L),t}function T(e,t){var n,o,r,s,a,l;if(t!=O&&(n=i()),o=E(e,t),n&&n.appendChild(o),r=$(e),s=r-I[F],0>=s)return t!=R&&(I.setEndBefore(e),I.collapse(j)),n;for(o=e.previousSibling;s>0;)a=o.previousSibling,l=P(o,t),n&&n.insertBefore(l,n.firstChild),--s,o=a;return t!=R&&(I.setEndBefore(e),I.collapse(j)),n}function D(e,t){var n,o,r,s,a,l;for(t!=O&&(n=i()),r=N(e,t),n&&n.appendChild(r),o=$(e),++o,s=I[W]-o,r=e.nextSibling;r&&s>0;)a=r.nextSibling,l=P(r,t),n&&n.appendChild(l),--s,r=a;return t!=R&&(I.setStartAfter(e),I.collapse(L)),n}function S(e,t,n){var o,r,s,a,l,c,u,d;for(n!=O&&(r=i()),o=N(e,n),r&&r.appendChild(o),s=e.parentNode,a=$(e),l=$(t),++a,c=l-a,u=e.nextSibling;c>0;)d=u.nextSibling,o=P(u,n),r&&r.appendChild(o),u=d,--c;return o=E(t,n),r&&r.appendChild(o),n!=R&&(I.setStartAfter(e),I.collapse(L)),r}function E(e,t){var i,n,o,r,s,a=y(I[q],I[W]-1),l=a!=I[q];if(a==e)return A(a,l,j,t);for(i=a.parentNode,n=A(i,j,j,t);i;){for(;a;)o=a.previousSibling,r=A(a,l,j,t),t!=O&&n.insertBefore(r,n.firstChild),l=L,a=o;if(i==e)return n;a=i.previousSibling,i=i.parentNode,s=A(i,j,j,t),t!=O&&s.appendChild(n),n=s}}function N(e,t){var i,n,o,r,s,a=y(I[z],I[F]),l=a!=I[z];if(a==e)return A(a,l,L,t);for(i=a.parentNode,n=A(i,j,L,t);i;){for(;a;)o=a.nextSibling,r=A(a,l,L,t),t!=O&&n.appendChild(r),l=L,a=o;if(i==e)return n;a=i.nextSibling,i=i.parentNode,s=A(i,j,L,t),t!=O&&s.appendChild(n),n=s}}function A(t,i,n,o){var r,s,a,l,c;if(i)return P(t,o);if(3==t.nodeType){if(r=t.nodeValue,n?(l=I[F],s=r.substring(l),a=r.substring(0,l)):(l=I[W],s=r.substring(0,l),a=r.substring(l)),o!=R&&(t.nodeValue=a),o==O)return;return c=e.clone(t,j),c.nodeValue=s,c}if(o!=O)return e.clone(t,j)}function P(t,i){return i!=O?i==R?e.clone(t,L):t:(t.parentNode.removeChild(t),void 0)}function M(){return e.create("body",null,m()).outerText}var I=this,H=e.doc,B=0,R=1,O=2,L=!0,j=!1,F="startOffset",z="startContainer",q="endContainer",W="endOffset",U=tinymce.extend,$=e.nodeIndex;return U(I,{startContainer:H,startOffset:0,endContainer:H,endOffset:0,collapsed:L,commonAncestorContainer:H,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:n,setEnd:o,setStartBefore:r,setStartAfter:s,setEndBefore:a,setEndAfter:l,collapse:c,selectNode:u,selectNodeContents:d,compareBoundaryPoints:h,deleteContents:p,extractContents:f,cloneContents:m,insertNode:g,surroundContents:v,cloneRange:b,toStringIE:M}),I}e.Range=t,t.prototype.toString=function(){return this.toStringIE()}}(tinymce.dom),function(){function e(e){function t(t,i){var n,o,r,s,a,l,c,u,d=0,h=-1;if(n=t.duplicate(),n.collapse(i),u=n.parentElement(),u.ownerDocument===e.dom.doc){for(;"false"===u.contentEditable;)u=u.parentNode;if(!u.hasChildNodes())return{node:u,inside:1};for(s=u.children,o=s.length-1;o>=d;)if(c=Math.floor((d+o)/2),a=s[c],n.moveToElementText(a),h=n.compareEndPoints(i?"StartToStart":"EndToEnd",t),h>0)o=c-1;else{if(!(0>h))return{node:a};d=c+1}if(0>h)for(a?n.collapse(!1):(n.moveToElementText(u),n.collapse(!0),a=u,r=!0),l=0;0!==n.compareEndPoints(i?"StartToStart":"StartToEnd",t)&&0!==n.move("character",1)&&u==n.parentElement();)l++;else for(n.collapse(!0),l=0;0!==n.compareEndPoints(i?"StartToStart":"StartToEnd",t)&&0!==n.move("character",-1)&&u==n.parentElement();)l++;return{node:a,position:h,offset:l,inside:r}}}function i(){function i(e){var i,n,o,r,s,a=t(u,e),l=0;if(i=a.node,n=a.offset,a.inside&&!i.hasChildNodes())return d[e?"setStart":"setEnd"](i,0),void 0;if(n===r)return d[e?"setStartBefore":"setEndAfter"](i),void 0;if(a.position<0){if(o=a.inside?i.firstChild:i.nextSibling,!o)return d[e?"setStartAfter":"setEndAfter"](i),void 0;if(!n)return 3==o.nodeType?d[e?"setStart":"setEnd"](o,0):d[e?"setStartBefore":"setEndBefore"](o),void 0;for(;o;){if(s=o.nodeValue,l+=s.length,l>=n){i=o,l-=n,l=s.length-l;break}o=o.nextSibling}}else{if(o=i.previousSibling,!o)return d[e?"setStartBefore":"setEndBefore"](i);if(!n)return 3==i.nodeType?d[e?"setStart":"setEnd"](o,i.nodeValue.length):d[e?"setStartAfter":"setEndAfter"](o),void 0;for(;o;){if(l+=o.nodeValue.length,l>=n){i=o,l-=n;break}o=o.previousSibling}}d[e?"setStart":"setEnd"](i,l)}var r,s,a,l,c,u=e.getRng(),d=o.createRng();if(r=u.item?u.item(0):u.parentElement(),r.ownerDocument!=o.doc)return d;if(s=e.isCollapsed(),u.item)return d.setStart(r.parentNode,o.nodeIndex(r)),d.setEnd(d.startContainer,d.startOffset+1),d;try{i(!0),s||i()}catch(h){if(-2147024809!=h.number)throw h;c=n.getBookmark(2),a=u.duplicate(),a.collapse(!0),r=a.parentElement(),s||(a=u.duplicate(),a.collapse(!1),l=a.parentElement(),l.innerHTML=l.innerHTML),r.innerHTML=r.innerHTML,n.moveToBookmark(c),u=e.getRng(),i(!0),s||i()}return d}var n=this,o=e.dom,r=!1;this.getBookmark=function(i){function n(e){var t,i,n,r,s=[];for(t=e.parentNode,i=o.getRoot().parentNode;t!=i&&9!==t.nodeType;){for(n=t.children,r=n.length;r--;)if(e===n[r]){s.push(r);break}e=t,t=t.parentNode}return s}function r(e){var i;return i=t(s,e),i?{position:i.position,offset:i.offset,indexes:n(i.node),inside:i.inside}:void 0}var s=e.getRng(),a={};return 2===i&&(s.item?a.start={ctrl:!0,indexes:n(s.item(0))}:(a.start=r(!0),e.isCollapsed()||(a.end=r()))),a},this.moveToBookmark=function(e){function t(e){var t,i,n,r;for(t=o.getRoot(),i=e.length-1;i>=0;i--)r=t.children,n=e[i],n<=r.length-1&&(t=r[n]);return t}function i(i){var o,s,a,l=e[i?"start":"end"];l&&(o=l.position>0,s=r.createTextRange(),s.moveToElementText(t(l.indexes)),offset=l.offset,offset!==a?(s.collapse(l.inside||o),s.moveStart("character",o?-offset:offset)):s.collapse(i),n.setEndPoint(i?"StartToStart":"EndToStart",s),i&&n.collapse(!0))}var n,r=o.doc.body;e.start&&(e.start.ctrl?(n=r.createControlRange(),n.addElement(t(e.start.indexes)),n.select()):(n=r.createTextRange(),i(!0),i(),n.select()))},this.addRange=function(t){function i(e){var t,i,s,d,h;s=o.create("a"),t=e?a:c,i=e?l:u,d=n.duplicate(),(t==f||t==f.documentElement)&&(t=m,i=0),3==t.nodeType?(t.parentNode.insertBefore(s,t),d.moveToElementText(s),d.moveStart("character",i),o.remove(s),n.setEndPoint(e?"StartToStart":"EndToEnd",d)):(h=t.childNodes,h.length?(i>=h.length?o.insertAfter(s,h[h.length-1]):t.insertBefore(s,h[i]),d.moveToElementText(s)):t.canHaveHTML&&(t.innerHTML="<span></span>",s=t.firstChild,d.moveToElementText(s),d.collapse(r)),n.setEndPoint(e?"StartToStart":"EndToEnd",d),o.remove(s))}var n,s,a,l,c,u,d,h,p,f=e.dom.doc,m=f.body;if(a=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,n=m.createTextRange(),a==c&&1==a.nodeType){if(l==u&&!a.hasChildNodes()){if(a.canHaveHTML)return d=a.previousSibling,d&&!d.hasChildNodes()&&o.isBlock(d)?d.innerHTML="":d=null,a.innerHTML="<span></span><span></span>",n.moveToElementText(a.lastChild),n.select(),o.doc.selection.clear(),a.innerHTML="",d&&(d.innerHTML=""),void 0;l=o.nodeIndex(a),a=a.parentNode}if(l==u-1)try{if(p=a.childNodes[l],s=m.createControlRange(),s.addElement(p),s.select(),h=e.getRng(),h.item&&p===h.item(0))return}catch(g){}}i(!0),i(),n.select()},this.getRangeAt=i}tinymce.dom.TridentSelection=e}(),/*
77
+ * Sizzle CSS Selector Engine
78
+ * Copyright, The Dojo Foundation
79
+ * Released under the MIT, BSD, and GPL Licenses.
80
+ * More information: http://sizzlejs.com/
81
+ */
82
+ function(){function e(e,t,i,o,r,s){for(var a=0,l=o.length;l>a;a++){var c=o[a];if(c){var u=!1;for(c=c[e];c;){if(c[n]===i){u=o[c.sizset];break}if(1!==c.nodeType||s||(c[n]=i,c.sizset=a),c.nodeName.toLowerCase()===t){u=c;break}c=c[e]}o[a]=u}}}function t(e,t,i,o,r,s){for(var a=0,l=o.length;l>a;a++){var c=o[a];if(c){var u=!1;for(c=c[e];c;){if(c[n]===i){u=o[c.sizset];break}if(1===c.nodeType)if(s||(c[n]=i,c.sizset=a),"string"!=typeof t){if(c===t){u=!0;break}}else if(d.filter(t,[c]).length>0){u=c;break}c=c[e]}o[a]=u}}}var i=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,n="sizcache",o=0,r=Object.prototype.toString,s=!1,a=!0,l=/\\/g,c=/\r\n/g,u=/\W/;[0,0].sort(function(){return a=!1,0});var d=function(e,t,n,o){n=n||[],t=t||document;var s=t;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return n;var a,l,c,u,h,m,g,b,y=!0,_=d.isXML(t),x=[],w=e;do if(i.exec(""),a=i.exec(w),a&&(w=a[3],x.push(a[1]),a[2])){u=a[3];break}while(a);if(x.length>1&&f.exec(e))if(2===x.length&&p.relative[x[0]])l=C(x[0]+x[1],t,o);else for(l=p.relative[x[0]]?[t]:d(x.shift(),t);x.length;)e=x.shift(),p.relative[e]&&(e+=x.shift()),l=C(e,l,o);else if(!o&&x.length>1&&9===t.nodeType&&!_&&p.match.ID.test(x[0])&&!p.match.ID.test(x[x.length-1])&&(h=d.find(x.shift(),t,_),t=h.expr?d.filter(h.expr,h.set)[0]:h.set[0]),t)for(h=o?{expr:x.pop(),set:v(o)}:d.find(x.pop(),1!==x.length||"~"!==x[0]&&"+"!==x[0]||!t.parentNode?t:t.parentNode,_),l=h.expr?d.filter(h.expr,h.set):h.set,x.length>0?c=v(l):y=!1;x.length;)m=x.pop(),g=m,p.relative[m]?g=x.pop():m="",null==g&&(g=t),p.relative[m](c,g,_);else c=x=[];if(c||(c=l),c||d.error(m||e),"[object Array]"===r.call(c))if(y)if(t&&1===t.nodeType)for(b=0;null!=c[b];b++)c[b]&&(c[b]===!0||1===c[b].nodeType&&d.contains(t,c[b]))&&n.push(l[b]);else for(b=0;null!=c[b];b++)c[b]&&1===c[b].nodeType&&n.push(l[b]);else n.push.apply(n,c);else v(c,n);return u&&(d(u,s,n,o),d.uniqueSort(n)),n};d.uniqueSort=function(e){if(y&&(s=a,e.sort(y),s))for(var t=1;t<e.length;t++)e[t]===e[t-1]&&e.splice(t--,1);return e},d.matches=function(e,t){return d(e,null,null,t)},d.matchesSelector=function(e,t){return d(t,null,null,[e]).length>0},d.find=function(e,t,i){var n,o,r,s,a,c;if(!e)return[];for(o=0,r=p.order.length;r>o;o++)if(a=p.order[o],(s=p.leftMatch[a].exec(e))&&(c=s[1],s.splice(1,1),"\\"!==c.substr(c.length-1)&&(s[1]=(s[1]||"").replace(l,""),n=p.find[a](s,t,i),null!=n))){e=e.replace(p.match[a],"");break}return n||(n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName("*"):[]),{set:n,expr:e}},d.filter=function(e,t,i,n){for(var o,r,s,a,l,c,u,h,f,m=e,g=[],v=t,b=t&&t[0]&&d.isXML(t[0]);e&&t.length;){for(s in p.filter)if(null!=(o=p.leftMatch[s].exec(e))&&o[2]){if(c=p.filter[s],u=o[1],r=!1,o.splice(1,1),"\\"===u.substr(u.length-1))continue;if(v===g&&(g=[]),p.preFilter[s])if(o=p.preFilter[s](o,v,i,g,n,b)){if(o===!0)continue}else r=a=!0;if(o)for(h=0;null!=(l=v[h]);h++)l&&(a=c(l,o,h,v),f=n^a,i&&null!=a?f?r=!0:v[h]=!1:f&&(g.push(l),r=!0));if(void 0!==a){if(i||(v=g),e=e.replace(p.match[s],""),!r)return[];break}}if(e===m){if(null!=r)break;d.error(e)}m=e}return v},d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var h=d.getText=function(e){var t,i,n=e.nodeType,o="";if(n){if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;if("string"==typeof e.innerText)return e.innerText.replace(c,"");for(e=e.firstChild;e;e=e.nextSibling)o+=h(e)}else if(3===n||4===n)return e.nodeValue}else for(t=0;i=e[t];t++)8!==i.nodeType&&(o+=h(i));return o},p=d.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(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(e,t){var i="string"==typeof t,n=i&&!u.test(t),o=i&&!n;n&&(t=t.toLowerCase());for(var r,s=0,a=e.length;a>s;s++)if(r=e[s]){for(;(r=r.previousSibling)&&1!==r.nodeType;);e[s]=o||r&&r.nodeName.toLowerCase()===t?r||!1:r===t}o&&d.filter(t,e,!0)},">":function(e,t){var i,n="string"==typeof t,o=0,r=e.length;if(n&&!u.test(t)){for(t=t.toLowerCase();r>o;o++)if(i=e[o]){var s=i.parentNode;e[o]=s.nodeName.toLowerCase()===t?s:!1}}else{for(;r>o;o++)i=e[o],i&&(e[o]=n?i.parentNode:i.parentNode===t);n&&d.filter(t,e,!0)}},"":function(i,n,r){var s,a=o++,l=t;"string"!=typeof n||u.test(n)||(n=n.toLowerCase(),s=n,l=e),l("parentNode",n,a,i,s,r)},"~":function(i,n,r){var s,a=o++,l=t;"string"!=typeof n||u.test(n)||(n=n.toLowerCase(),s=n,l=e),l("previousSibling",n,a,i,s,r)}},find:{ID:function(e,t,i){if("undefined"!=typeof t.getElementById&&!i){var n=t.getElementById(e[1]);return n&&n.parentNode?[n]:[]}},NAME:function(e,t){if("undefined"!=typeof t.getElementsByName){for(var i=[],n=t.getElementsByName(e[1]),o=0,r=n.length;r>o;o++)n[o].getAttribute("name")===e[1]&&i.push(n[o]);return 0===i.length?null:i}},TAG:function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e[1]):void 0}},preFilter:{CLASS:function(e,t,i,n,o,r){if(e=" "+e[1].replace(l,"")+" ",r)return e;for(var s,a=0;null!=(s=t[a]);a++)s&&(o^(s.className&&(" "+s.className+" ").replace(/[\t\n\r]/g," ").indexOf(e)>=0)?i||n.push(s):i&&(t[a]=!1));return!1},ID:function(e){return e[1].replace(l,"")},TAG:function(e){return e[1].replace(l,"").toLowerCase()},CHILD:function(e){if("nth"===e[1]){e[2]||d.error(e[0]),e[2]=e[2].replace(/^\+|\s*/g,"");var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===e[2]&&"2n"||"odd"===e[2]&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&d.error(e[0]);return e[0]=o++,e},ATTR:function(e,t,i,n,o,r){var s=e[1]=e[1].replace(l,"");return!r&&p.attrMap[s]&&(e[1]=p.attrMap[s]),e[4]=(e[4]||e[5]||"").replace(l,""),"~="===e[2]&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(e,t,n,o,r){if("not"===e[1]){if(!((i.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var s=d.filter(e[3],t,n,!0^r);return n||o.push.apply(o,s),!1}e[3]=d(e[3],null,null,t)}else if(p.match.POS.test(e[0])||p.match.CHILD.test(e[0]))return!0;return e},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return e.disabled===!1&&"hidden"!==e.type},disabled:function(e){return e.disabled===!0},checked:function(e){return e.checked===!0},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,i){return!!d(i[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var t=e.getAttribute("type"),i=e.type;return"input"===e.nodeName.toLowerCase()&&"text"===i&&(t===i||null===t)},radio:function(e){return"input"===e.nodeName.toLowerCase()&&"radio"===e.type},checkbox:function(e){return"input"===e.nodeName.toLowerCase()&&"checkbox"===e.type},file:function(e){return"input"===e.nodeName.toLowerCase()&&"file"===e.type},password:function(e){return"input"===e.nodeName.toLowerCase()&&"password"===e.type},submit:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"submit"===e.type},image:function(e){return"input"===e.nodeName.toLowerCase()&&"image"===e.type},reset:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"reset"===e.type},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t){return 0===t},last:function(e,t,i,n){return t===n.length-1},even:function(e,t){return t%2===0},odd:function(e,t){return t%2===1},lt:function(e,t,i){return t<i[3]-0},gt:function(e,t,i){return t>i[3]-0},nth:function(e,t,i){return i[3]-0===t},eq:function(e,t,i){return i[3]-0===t}},filter:{PSEUDO:function(e,t,i,n){var o=t[1],r=p.filters[o];if(r)return r(e,i,t,n);if("contains"===o)return(e.textContent||e.innerText||h([e])||"").indexOf(t[3])>=0;if("not"===o){for(var s=t[3],a=0,l=s.length;l>a;a++)if(s[a]===e)return!1;return!0}d.error(o)},CHILD:function(e,t){var i,o,r,s,a,l,c=t[1],u=e;switch(c){case"only":case"first":for(;u=u.previousSibling;)if(1===u.nodeType)return!1;if("first"===c)return!0;u=e;case"last":for(;u=u.nextSibling;)if(1===u.nodeType)return!1;return!0;case"nth":if(i=t[2],o=t[3],1===i&&0===o)return!0;if(r=t[0],s=e.parentNode,s&&(s[n]!==r||!e.nodeIndex)){for(a=0,u=s.firstChild;u;u=u.nextSibling)1===u.nodeType&&(u.nodeIndex=++a);s[n]=r}return l=e.nodeIndex-o,0===i?0===l:l%i===0&&l/i>=0}},ID:function(e,t){return 1===e.nodeType&&e.getAttribute("id")===t},TAG:function(e,t){return"*"===t&&1===e.nodeType||!!e.nodeName&&e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var i=t[1],n=d.attr?d.attr(e,i):p.attrHandle[i]?p.attrHandle[i](e):null!=e[i]?e[i]:e.getAttribute(i),o=n+"",r=t[2],s=t[4];return null==n?"!="===r:!r&&d.attr?null!=n:"="===r?o===s:"*="===r?o.indexOf(s)>=0:"~="===r?(" "+o+" ").indexOf(s)>=0:s?"!="===r?o!==s:"^="===r?0===o.indexOf(s):"$="===r?o.substr(o.length-s.length)===s:"|="===r?o===s||o.substr(0,s.length+1)===s+"-":!1:o&&n!==!1},POS:function(e,t,i,n){var o=t[2],r=p.setFilters[o];return r?r(e,i,t,n):void 0}}},f=p.match.POS,m=function(e,t){return"\\"+(t-0+1)};for(var g in p.match)p.match[g]=new RegExp(p.match[g].source+/(?![^\[]*\])(?![^\(]*\))/.source),p.leftMatch[g]=new RegExp(/(^(?:.|\r|\n)*?)/.source+p.match[g].source.replace(/\\(\d+)/g,m));p.match.globalPOS=f;var v=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(b){v=function(e,t){var i=0,n=t||[];if("[object Array]"===r.call(e))Array.prototype.push.apply(n,e);else if("number"==typeof e.length)for(var o=e.length;o>i;i++)n.push(e[i]);else for(;e[i];i++)n.push(e[i]);return n}}var y,_;document.documentElement.compareDocumentPosition?y=function(e,t){return e===t?(s=!0,0):e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t)?-1:1:e.compareDocumentPosition?-1:1}:(y=function(e,t){if(e===t)return s=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var i,n,o=[],r=[],a=e.parentNode,l=t.parentNode,c=a;if(a===l)return _(e,t);if(!a)return-1;if(!l)return 1;for(;c;)o.unshift(c),c=c.parentNode;for(c=l;c;)r.unshift(c),c=c.parentNode;i=o.length,n=r.length;for(var u=0;i>u&&n>u;u++)if(o[u]!==r[u])return _(o[u],r[u]);return u===i?_(e,r[u],-1):_(o[u],t,1)},_=function(e,t,i){if(e===t)return i;for(var n=e.nextSibling;n;){if(n===t)return-1;n=n.nextSibling}return 1}),function(){var e=document.createElement("div"),t="script"+(new Date).getTime(),i=document.documentElement;e.innerHTML="<a name='"+t+"'/>",i.insertBefore(e,i.firstChild),document.getElementById(t)&&(p.find.ID=function(e,t,i){if("undefined"!=typeof t.getElementById&&!i){var n=t.getElementById(e[1]);return n?n.id===e[1]||"undefined"!=typeof n.getAttributeNode&&n.getAttributeNode("id").nodeValue===e[1]?[n]:void 0:[]}},p.filter.ID=function(e,t){var i="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&i&&i.nodeValue===t}),i.removeChild(e),i=e=null}(),function(){var e=document.createElement("div");e.appendChild(document.createComment("")),e.getElementsByTagName("*").length>0&&(p.find.TAG=function(e,t){var i=t.getElementsByTagName(e[1]);if("*"===e[1]){for(var n=[],o=0;i[o];o++)1===i[o].nodeType&&n.push(i[o]);i=n}return i}),e.innerHTML="<a href='#'></a>",e.firstChild&&"undefined"!=typeof e.firstChild.getAttribute&&"#"!==e.firstChild.getAttribute("href")&&(p.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),document.querySelectorAll&&!function(){var e=d,t=document.createElement("div"),i="__sizzle__";if(t.innerHTML="<p class='TEST'></p>",!t.querySelectorAll||0!==t.querySelectorAll(".TEST").length){d=function(t,n,o,r){if(n=n||document,!r&&!d.isXML(n)){var s=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(s&&(1===n.nodeType||9===n.nodeType)){if(s[1])return v(n.getElementsByTagName(t),o);if(s[2]&&p.find.CLASS&&n.getElementsByClassName)return v(n.getElementsByClassName(s[2]),o)}if(9===n.nodeType){if("body"===t&&n.body)return v([n.body],o);if(s&&s[3]){var a=n.getElementById(s[3]);if(!a||!a.parentNode)return v([],o);if(a.id===s[3])return v([a],o)}try{return v(n.querySelectorAll(t),o)}catch(l){}}else if(1===n.nodeType&&"object"!==n.nodeName.toLowerCase()){var c=n,u=n.getAttribute("id"),h=u||i,f=n.parentNode,m=/^\s*[+~]/.test(t);u?h=h.replace(/'/g,"\\$&"):n.setAttribute("id",h),m&&f&&(n=n.parentNode);try{if(!m||f)return v(n.querySelectorAll("[id='"+h+"'] "+t),o)}catch(g){}finally{u||c.removeAttribute("id")}}}return e(t,n,o,r)};for(var n in e)d[n]=e[n];t=null}}(),function(){var e=document.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var i=!t.call(document.createElement("div"),"div"),n=!1;try{t.call(document.documentElement,"[test!='']:sizzle")}catch(o){n=!0}d.matchesSelector=function(e,o){if(o=o.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!d.isXML(e))try{if(n||!p.match.PSEUDO.test(o)&&!/!=/.test(o)){var r=t.call(e,o);if(r||!i||e.document&&11!==e.document.nodeType)return r}}catch(s){}return d(o,null,null,[e]).length>0}}}(),function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>",e.getElementsByClassName&&0!==e.getElementsByClassName("e").length&&(e.lastChild.className="e",1!==e.getElementsByClassName("e").length&&(p.order.splice(1,0,"CLASS"),p.find.CLASS=function(e,t,i){return"undefined"==typeof t.getElementsByClassName||i?void 0:t.getElementsByClassName(e[1])},e=null))}(),d.contains=document.documentElement.contains?function(e,t){return e!==t&&(e.contains?e.contains(t):!0)}:document.documentElement.compareDocumentPosition?function(e,t){return!!(16&e.compareDocumentPosition(t))}:function(){return!1},d.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return t?"HTML"!==t.nodeName:!1};var C=function(e,t,i){for(var n,o=[],r="",s=t.nodeType?[t]:t;n=p.match.PSEUDO.exec(e);)r+=n[0],e=e.replace(p.match.PSEUDO,"");e=p.relative[e]?e+"*":e;for(var a=0,l=s.length;l>a;a++)d(e,s[a],o,i);return d.filter(r,o)};window.tinymce.dom.Sizzle=d}(),function(e){e.dom.Element=function(t,i){var n,o,r=this;r.settings=i=i||{},r.id=t,r.dom=n=i.dom||e.DOM,e.isIE||(o=n.get(r.id)),e.each("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get".split(/,/),function(e){r[e]=function(){var i,o=[t];for(i=0;i<arguments.length;i++)o.push(arguments[i]);return o=n[e].apply(n,o),r.update(e),o}}),e.extend(r,{on:function(t,i,n){return e.dom.Event.add(r.id,t,i,n)},getXY:function(){return{x:parseInt(r.getStyle("left")),y:parseInt(r.getStyle("top"))}},getSize:function(){var e=n.get(r.id);return{w:parseInt(r.getStyle("width")||e.clientWidth),h:parseInt(r.getStyle("height")||e.clientHeight)}},moveTo:function(e,t){r.setStyles({left:e,top:t})},moveBy:function(e,t){var i=r.getXY();r.moveTo(i.x+e,i.y+t)},resizeTo:function(e,t){r.setStyles({width:e,height:t})},resizeBy:function(e,t){var i=r.getSize();r.resizeTo(i.w+e,i.h+t)},update:function(t){var o;if(e.isIE6&&i.blocker){if(t=t||"",0===t.indexOf("get")||0===t.indexOf("has")||0===t.indexOf("is"))return;if("remove"==t)return n.remove(r.blocker),void 0;r.blocker?o=n.get(r.blocker):(r.blocker=n.uniqueId(),o=n.add(i.container||n.getRoot(),"iframe",{id:r.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'}),n.setStyle(o,"opacity",0)),n.setStyles(o,{left:r.getStyle("left",1),top:r.getStyle("top",1),width:r.getStyle("width",1),height:r.getStyle("height",1),display:r.getStyle("display",1),zIndex:parseInt(r.getStyle("zIndex",1)||0)-1})}}})}}(tinymce),function(e){var t=e.is,i=e.isIE,n=e.each,o=e.dom.TreeWalker;e.create("tinymce.dom.Selection",{Selection:function(t,i,o,r){var s=this;s.dom=t,s.win=i,s.serializer=o,s.editor=r,n(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(t){s[t]=new e.util.Dispatcher(s)}),s.win.getSelection||(s.tridentSel=new e.dom.TridentSelection(s)),e.isIE&&!e.isIE11&&t.boxModel&&this._fixIESelection(),e.addUnload(s.destroy,s)},setCursorLocation:function(e,t){var i=this,n=i.dom.createRng();n.setStart(e,t),n.setEnd(e,t),i.setRng(n),i.collapse(!1)},getContent:function(e){var i,n,o,r=this,s=r.getRng(),a=r.dom.create("body"),l=r.getSel();return e=e||{},i=n="",e.get=!0,e.format=e.format||"html",e.forced_root_block="",r.onBeforeGetContent.dispatch(r,e),"text"==e.format?r.isCollapsed()?"":s.text||(l.toString?l.toString():""):(s.cloneContents?(o=s.cloneContents(),o&&a.appendChild(o)):t(s.item)||t(s.htmlText)?(a.innerHTML="<br>"+(s.item?s.item(0).outerHTML:s.htmlText),a.removeChild(a.firstChild)):a.innerHTML=s.toString(),/^\s/.test(a.innerHTML)&&(i=" "),/\s+$/.test(a.innerHTML)&&(n=" "),e.getInner=!0,e.content=r.isCollapsed()?"":i+r.serializer.serialize(a,e)+n,r.onGetContent.dispatch(r,e),e.content)},setContent:function(e,t){var i,n,o,r=this,s=r.getRng(),a=r.win.document;if(t=t||{format:"html"},t.set=!0,e=t.content=e,t.no_events||r.onBeforeSetContent.dispatch(r,t),e=t.content,s.insertNode){e+='<span id="__caret">_</span>',s.startContainer==a&&s.endContainer==a?a.body.innerHTML=e:(s.deleteContents(),0===a.body.childNodes.length?a.body.innerHTML=e:s.createContextualFragment?s.insertNode(s.createContextualFragment(e)):(n=a.createDocumentFragment(),o=a.createElement("div"),n.appendChild(o),o.outerHTML=e,s.insertNode(n))),i=r.dom.get("__caret"),s=a.createRange(),s.setStartBefore(i),s.setEndBefore(i),r.setRng(s),r.dom.remove("__caret");try{r.setRng(s)}catch(l){}}else s.item&&(a.execCommand("Delete",!1,null),s=r.getRng()),/^\s+/.test(e)?(s.pasteHTML('<span id="__mce_tmp">_</span>'+e),r.dom.remove("__mce_tmp")):s.pasteHTML(e);t.no_events||r.onSetContent.dispatch(r,t)},getStart:function(){var e,t,i,n,o=this,r=o.getRng();if(r.duplicate||r.item){if(r.item)return r.item(0);for(i=r.duplicate(),i.collapse(1),e=i.parentElement(),e.ownerDocument!==o.dom.doc&&(e=o.dom.getRoot()),t=n=r.parentElement();n=n.parentNode;)if(n==e){e=t;break}return e}return e=r.startContainer,1==e.nodeType&&e.hasChildNodes()&&(e=e.childNodes[Math.min(e.childNodes.length-1,r.startOffset)]),e&&3==e.nodeType?e.parentNode:e},getEnd:function(){var e,t,i=this,n=i.getRng();return n.duplicate||n.item?n.item?n.item(0):(n=n.duplicate(),n.collapse(0),e=n.parentElement(),e.ownerDocument!==i.dom.doc&&(e=i.dom.getRoot()),e&&"BODY"==e.nodeName?e.lastChild||e:e):(e=n.endContainer,t=n.endOffset,1==e.nodeType&&e.hasChildNodes()&&(e=e.childNodes[t>0?t-1:t]),e&&3==e.nodeType?e.parentNode:e)},getBookmark:function(e,t){function i(e,t){var i=0;return n(f.select(e),function(e,n){e==t&&(i=n)}),i}function o(e){function t(t){var i,n,o,r=t?"start":"end";i=e[r+"Container"],n=e[r+"Offset"],1==i.nodeType&&"TR"==i.nodeName&&(o=i.childNodes,i=o[Math.min(t?n:n-1,o.length-1)],i&&(n=t?0:i.childNodes.length,e["set"+(t?"Start":"End")](i,n)))}return t(!0),t(),e}function r(){function e(e,i){var o,r,s=e[i?"startContainer":"endContainer"],a=e[i?"startOffset":"endOffset"],l=[],c=0;if(3==s.nodeType){if(t)for(o=s.previousSibling;o&&3==o.nodeType;o=o.previousSibling)a+=o.nodeValue.length;l.push(a)}else r=s.childNodes,a>=r.length&&r.length&&(c=1,a=Math.max(0,r.length-1)),l.push(p.dom.nodeIndex(r[a],t)+c);for(;s&&s!=n;s=s.parentNode)l.push(p.dom.nodeIndex(s,t));return l}var i=p.getRng(!0),n=f.getRoot(),o={};return o.start=e(i,!0),p.isCollapsed()||(o.end=e(i)),o}var s,a,l,c,u,d,h,p=this,f=p.dom,m="";if(2==e)return p.tridentSel?p.tridentSel.getBookmark(e):r();if(e)return s=p.getRng(),s.setStart&&(s={startContainer:s.startContainer,startOffset:s.startOffset,endContainer:s.endContainer,endOffset:s.endOffset}),{rng:s};if(s=p.getRng(),l=f.uniqueId(),c=tinyMCE.activeEditor.selection.isCollapsed(),h="overflow:hidden;line-height:0px",s.duplicate||s.item){if(s.item)return d=s.item(0),u=d.nodeName,{name:u,index:i(u,d)};a=s.duplicate();try{s.collapse(),s.pasteHTML('<span data-mce-type="bookmark" id="'+l+'_start" style="'+h+'">'+m+"</span>"),c||(a.collapse(!1),s.moveToElementText(a.parentElement()),0===s.compareEndPoints("StartToEnd",a)&&a.move("character",-1),a.pasteHTML('<span data-mce-type="bookmark" id="'+l+'_end" style="'+h+'">'+m+"</span>"))}catch(g){return null}}else{if(d=p.getNode(),u=d.nodeName,"IMG"==u)return{name:u,index:i(u,d)};a=o(s.cloneRange()),c||(a.collapse(!1),a.insertNode(f.create("span",{"data-mce-type":"bookmark",id:l+"_end",style:h},m))),s=o(s),s.collapse(!0),s.insertNode(f.create("span",{"data-mce-type":"bookmark",id:l+"_start",style:h},m))}return p.moveToBookmark({id:l,keep:1}),{id:l}},moveToBookmark:function(t){function o(e){var i,n,o,r,s=t[e?"start":"end"];if(s){for(o=s[0],n=c,i=s.length-1;i>=1;i--){if(r=n.childNodes,s[i]>r.length-1)return;n=r[s[i]]}3===n.nodeType&&(o=Math.min(s[0],n.nodeValue.length)),1===n.nodeType&&(o=Math.min(s[0],n.childNodes.length)),e?a.setStart(n,o):a.setEnd(n,o)}return!0}function r(i){var o,r,s,a,l=m.get(t.id+"_"+i),c=t.keep;if(l&&(o=l.parentNode,"start"==i?(c?(o=l.firstChild,r=1):r=m.nodeIndex(l),u=d=o,h=p=r):(c?(o=l.firstChild,r=1):r=m.nodeIndex(l),d=o,p=r),!c)){for(a=l.previousSibling,s=l.nextSibling,n(e.grep(l.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});l=m.get(t.id+"_"+i);)m.remove(l,1);a&&s&&a.nodeType==s.nodeType&&3==a.nodeType&&!e.isOpera&&(r=a.nodeValue.length,a.appendData(s.nodeValue),m.remove(s),"start"==i?(u=d=a,h=p=r):(d=a,p=r))}}function s(e){return!m.isBlock(e)||e.innerHTML||i||(e.innerHTML='<br data-mce-bogus="1" />'),e}var a,l,c,u,d,h,p,f=this,m=f.dom;if(t)if(t.start){if(a=m.createRng(),c=m.getRoot(),f.tridentSel)return f.tridentSel.moveToBookmark(t);o(!0)&&o()&&f.setRng(a)}else if(t.id)r("start"),r("end"),u&&(a=m.createRng(),a.setStart(s(u),h),a.setEnd(s(d),p),f.setRng(a));else if(t.name)f.select(m.select(t.name)[t.index]);else if(t.rng){if(a=t.rng,a.startContainer){l=f.dom.createRng();try{l.setStart(a.startContainer,a.startOffset),l.setEnd(a.endContainer,a.endOffset)}catch(g){}a=l}f.setRng(a)}},select:function(t,i){function n(t,i){var n=new o(t,t);do{if(3==t.nodeType&&0!==e.trim(t.nodeValue).length)return i?l.setStart(t,0):l.setEnd(t,t.nodeValue.length),void 0;if("BR"==t.nodeName)return i?l.setStartBefore(t):l.setEndBefore(t),void 0}while(t=i?n.next():n.prev())}var r,s=this,a=s.dom,l=a.createRng();return t&&(r=a.nodeIndex(t),l.setStart(t.parentNode,r),l.setEnd(t.parentNode,r+1),i&&(n(t,1),n(t)),s.setRng(l)),t},isCollapsed:function(){var e=this,t=e.getRng(),i=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!i||t.collapsed},collapse:function(e){var t,i=this,n=i.getRng();n.item&&(t=n.item(0),n=i.win.document.body.createTextRange(),n.moveToElementText(t)),n.collapse(!!e),i.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(t){var i,n,o,r=this,s=r.win.document;if(t&&r.tridentSel)return r.tridentSel.getRangeAt(0);try{(i=r.getSel())&&(n=i.rangeCount>0?i.getRangeAt(0):i.createRange?i.createRange():s.createRange())}catch(a){}return e.isIE&&!e.isIE11&&n&&n.setStart&&s.selection.createRange().item&&(o=s.selection.createRange().item(0),n=s.createRange(),n.setStartBefore(o),n.setEndAfter(o)),n||(n=s.createRange?s.createRange():s.body.createTextRange()),n.setStart&&9===n.startContainer.nodeType&&n.collapsed&&(o=r.dom.getRoot(),n.setStart(o,0),n.setEnd(o,0)),r.selectedRange&&r.explicitRange&&(0===n.compareBoundaryPoints(n.START_TO_START,r.selectedRange)&&0===n.compareBoundaryPoints(n.END_TO_END,r.selectedRange)?n=r.explicitRange:(r.selectedRange=null,r.explicitRange=null)),n},setRng:function(e,t){var i,n=this;if(n.tridentSel){if(e.cloneRange)try{return n.tridentSel.addRange(e),void 0}catch(o){}try{e.select()}catch(o){}}else if(i=n.getSel()){n.explicitRange=e;try{i.removeAllRanges()}catch(o){}i.addRange(e),t===!1&&i.extend&&(i.collapse(e.endContainer,e.endOffset),i.extend(e.startContainer,e.startOffset)),n.selectedRange=i.rangeCount>0?i.getRangeAt(0):null}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var i=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||i}var t,i=this,n=i.getRng(),o=(i.getSel(),n.startContainer),r=n.endContainer;return n?n.setStart?(t=n.commonAncestorContainer,!n.collapsed&&(n.startContainer==n.endContainer&&n.endOffset-n.startOffset<2&&n.startContainer.hasChildNodes()&&(t=n.startContainer.childNodes[n.startOffset]),3===o.nodeType&&3===r.nodeType&&(o=o.length===n.startOffset?e(o.nextSibling,!0):o.parentNode,r=0===n.endOffset?e(r.previousSibling,!1):r.parentNode,o&&o===r))?o:t&&3==t.nodeType?t.parentNode:t):n.item?n.item(0):n.parentElement():i.dom.getRoot()},getSelectedBlocks:function(e,t){var i,n,r,s=this,a=s.dom,l=[];if(i=a.getParent(e||s.getStart(),a.isBlock),n=a.getParent(t||s.getEnd(),a.isBlock),i&&l.push(i),i&&n&&i!=n){r=i;for(var c=new o(i,a.getRoot());(r=c.next())&&r!=n;)a.isBlock(r)&&l.push(r)}return n&&i!=n&&l.push(n),l},isForward:function(){var e,t,i=this.dom,n=this.getSel();return n&&null!=n.anchorNode&&null!=n.focusNode?(e=i.createRng(),e.setStart(n.anchorNode,n.anchorOffset),e.collapse(!0),t=i.createRng(),t.setStart(n.focusNode,n.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0):!0},normalize:function(){function t(e){function t(e,t){for(var i=new o(e,f.getParent(e.parentNode,f.isBlock)||m);e=i[t?"prev":"next"]();)if("BR"===e.nodeName)return!0}function a(e,t){var i,s;for(t=t||l,i=new o(t,f.getParent(t.parentNode,f.isBlock)||m);d=i[e?"prev":"next"]();){if(3===d.nodeType&&d.nodeValue.length>0)return l=d,c=e?d.nodeValue.length:0,n=!0,void 0;if(f.isBlock(d)||h[d.nodeName.toLowerCase()])return;s=d}r&&s&&(l=s,n=!0,c=0)}var l,c,u,d,h,p,f=s.dom,m=f.getRoot();if(l=i[(e?"start":"end")+"Container"],c=i[(e?"start":"end")+"Offset"],h=f.schema.getNonEmptyElements(),9===l.nodeType&&(l=f.getRoot(),c=0),l===m){if(e&&(d=l.childNodes[c>0?c-1:0],d&&(p=d.nodeName.toLowerCase(),h[d.nodeName]||"TABLE"==d.nodeName)))return;if(l.hasChildNodes()&&(l=l.childNodes[Math.min(!e&&c>0?c-1:c,l.childNodes.length-1)],c=0,l.hasChildNodes()&&!/TABLE/.test(l.nodeName))){d=l,u=new o(l,m);do{if(3===d.nodeType&&d.nodeValue.length>0){c=e?0:d.nodeValue.length,l=d,n=!0;break}if(h[d.nodeName.toLowerCase()]){c=f.nodeIndex(d),l=d.parentNode,"IMG"!=d.nodeName||e||c++,n=!0;break}}while(d=e?u.next():u.prev())}}r&&(3===l.nodeType&&0===c&&a(!0),1===l.nodeType&&(d=l.childNodes[c],!d||"BR"!==d.nodeName||t(d)||t(d,!0)||a(!0,l.childNodes[c]))),e&&!r&&3===l.nodeType&&c===l.nodeValue.length&&a(!1),n&&i["set"+(e?"Start":"End")](l,c)}var i,n,r,s=this;e.isIE||(i=s.getRng(),r=i.collapsed,t(!0),r||t(),n&&(r&&i.collapse(!0),s.setRng(i,s.isForward())))},selectorChanged:function(e,t){var i,o=this;return o.selectorChangedData||(o.selectorChangedData={},i={},o.editor.onNodeChange.addToTop(function(e,t,r){var s=o.dom,a=s.getParents(r,null,s.getRoot()),l={};n(o.selectorChangedData,function(e,t){n(a,function(o){return s.is(o,t)?(i[t]||(n(e,function(e){e(!0,{node:o,selector:t,parents:a})}),i[t]=e),l[t]=e,!1):void 0})}),n(i,function(e,t){l[t]||(delete i[t],n(e,function(e){e(!1,{node:r,selector:t,parents:a})}))})})),o.selectorChangedData[e]||(o.selectorChangedData[e]=[]),o.selectorChangedData[e].push(t),o},scrollIntoView:function(e){var t,i,n=this,o=n.dom;i=o.getViewPort(n.editor.getWin()),t=o.getPos(e).y,(t<i.y||t+25>i.y+i.h)&&n.editor.getWin().scrollTo(0,t<i.y?t:t-i.h+25)},destroy:function(t){var i=this;i.win=null,t||e.removeUnload(i.destroy)},_fixIESelection:function(){function e(e,t){var i=l.createTextRange();try{i.moveToPoint(e,t)}catch(n){i=null}return i}function t(t){var n;t.button?(n=e(t.x,t.y),n&&(n.compareEndPoints("StartToStart",o)>0?n.setEndPoint("StartToStart",o):n.setEndPoint("EndToEnd",o),n.select())):i()}function i(){var e=a.selection.createRange();o&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&o.select(),s.unbind(a,"mouseup",i),s.unbind(a,"mousemove",t),o=n=0}var n,o,r,s=this.dom,a=s.doc,l=a.body;a.documentElement.unselectable=!0,s.bind(a,["mousedown","contextmenu"],function(l){if("HTML"===l.target.nodeName){if(n&&i(),r=a.documentElement,r.scrollHeight>r.clientHeight)return;n=1,o=e(l.x,l.y),o&&(s.bind(a,"mouseup",i),s.bind(a,"mousemove",t),s.win.focus(),o.select())}})}})}(tinymce),function(e){e.dom.Serializer=function(t,i,n){var o,r,s,a=e.isIE,l=e.each;return t.apply_source_formatting||(t.indent=!1),i=i||e.DOM,n=n||new e.html.Schema(t),t.entity_encoding=t.entity_encoding||"named",t.remove_trailing_brs="remove_trailing_brs"in t?t.remove_trailing_brs:!0,o=new e.util.Dispatcher(self),r=new e.util.Dispatcher(self),s=new e.html.DomParser(t,n),s.addAttributeFilter("src,href,style",function(e,n){for(var o,r,s,a=e.length,l="data-mce-"+n,c=t.url_converter,u=t.url_converter_scope;a--;)o=e[a],r=o.attributes.map[l],r!==s?(o.attr(n,r.length>0?r:null),o.attr(l,null)):(r=o.attributes.map[n],"style"===n?r=i.serializeStyle(i.parseStyle(r),o.name):c&&(r=c.call(u,r,n,o.name)),o.attr(n,r.length>0?r:null))}),s.addAttributeFilter("class",function(e){for(var t,i,n=e.length;n--;)t=e[n],i=t.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,""),t.attr("class",i.length>0?i:null)}),s.addAttributeFilter("data-mce-type",function(e,t,i){for(var n,o=e.length;o--;)n=e[o],"bookmark"!==n.attributes.map["data-mce-type"]||i.cleanup||n.remove()}),s.addAttributeFilter("data-mce-expando",function(e,t){for(var i=e.length;i--;)e[i].attr(t,null)}),s.addNodeFilter("noscript",function(t){for(var i,n=t.length;n--;)i=t[n].firstChild,i&&(i.value=e.html.Entities.decode(i.value))}),s.addNodeFilter("script,style",function(e,t){function i(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var n,o,r=e.length;r--;)n=e[r],o=n.firstChild?n.firstChild.value:"","script"===t?(n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,"")),o.length>0&&(n.firstChild.value="// <![CDATA[\n"+i(o)+"\n// ]]>")):o.length>0&&(n.firstChild.value="<!--\n"+i(o)+"\n-->")}),s.addNodeFilter("#comment",function(e){for(var t,i=e.length;i--;)t=e[i],0===t.value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),s.addNodeFilter("xml:namespace,input",function(e,t){for(var i,n=e.length;n--;)i=e[n],7===i.type?i.remove():1===i.type&&("input"!==t||"type"in i.attributes.map||i.attr("type","text"))}),t.fix_list_elements&&s.addNodeFilter("ul,ol",function(e){for(var t,i,n=e.length;n--;)t=e[n],i=t.parent,("ul"===i.name||"ol"===i.name)&&t.prev&&"li"===t.prev.name&&t.prev.append(t)}),s.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(e,t){for(var i=e.length;i--;)e[i].attr(t,null)}),{schema:n,addNodeFilter:s.addNodeFilter,addAttributeFilter:s.addAttributeFilter,onPreProcess:o,onPostProcess:r,serialize:function(c,u){var d,h,p,f,m;return a&&i.select("script,style,select,map").length>0?(m=c.innerHTML,c=c.cloneNode(!1),i.setHTML(c,m)):c=c.cloneNode(!0),d=c.ownerDocument.implementation,d.createHTMLDocument&&(h=d.createHTMLDocument(""),l("BODY"==c.nodeName?c.childNodes:[c],function(e){h.body.appendChild(h.importNode(e,!0))}),c="BODY"!=c.nodeName?h.body.firstChild:h.body,p=i.doc,i.doc=h),u=u||{},u.format=u.format||"html",u.no_events||(u.node=c,o.dispatch(self,u)),f=new e.html.Serializer(t,n),u.content=f.serialize(s.parse(e.trim(u.getInner?c.innerHTML:i.getOuterHTML(c)),u)),u.cleanup||(u.content=u.content.replace(/\uFEFF/g,"")),u.no_events||r.dispatch(self,u),p&&(i.doc=p),u.node=null,u.content},addRules:function(e){n.addValidElements(e)},setRules:function(e){n.setValidElements(e)
83
+ }}}}(tinymce),function(e){e.dom.ScriptLoader=function(){function t(t,i){function n(){c.remove(l),r&&(r.onreadystatechange=r.onload=r=null),i()}function o(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+t)}var r,s,a,l,c=e.DOM;return l=c.uniqueId(),e.isIE6&&(s=new e.util.URI(t),a=location,s.host==a.hostname&&s.port==a.port&&s.protocol+":"==a.protocol&&"file"!=s.protocol.toLowerCase())?(e.util.XHR.send({url:e._addVer(s.getURI()),success:function(e){var t=c.create("script",{type:"text/javascript"});t.text=e,document.getElementsByTagName("head")[0].appendChild(t),c.remove(t),n()},error:o}),void 0):(r=document.createElement("script"),r.id=l,r.type="text/javascript",r.src=e._addVer(t),(!e.isIE||e.isIE11)&&(r.onload=n),r.onerror=o,e.isOpera||(r.onreadystatechange=function(){var e=r.readyState;("complete"==e||"loaded"==e)&&n()}),(document.getElementsByTagName("head")[0]||document.body).appendChild(r),void 0)}var i,n=0,o=1,r=2,s={},a=[],l={},c=[],u=0;this.isDone=function(e){return s[e]==r},this.markDone=function(e){s[e]=r},this.add=this.load=function(e,t,o){var r=s[e];r==i&&(a.push(e),s[e]=n),t&&(l[e]||(l[e]=[]),l[e].push({func:t,scope:o||this}))},this.loadQueue=function(e,t){this.loadScripts(a,e,t)},this.loadScripts=function(n,a,d){function h(t){e.each(l[t],function(e){e.func.call(e.scope)}),l[t]=i}var p;c.push({func:a,scope:d||this}),(p=function(){var i=e.grep(n);n.length=0,e.each(i,function(e){return s[e]==r?(h(e),void 0):(s[e]!=o&&(s[e]=o,u++,t(e,function(){s[e]=r,u--,h(e),p()})),void 0)}),u||(e.each(c,function(e){e.func.call(e.scope)}),c.length=0)})()}},e.ScriptLoader=new e.dom.ScriptLoader}(tinymce),function(e){e.dom.RangeUtils=function(t){this.walk=function(i,n){function o(e){var t;return t=e[0],3===t.nodeType&&t===m&&g>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===b&&e.length>0&&t===v&&3===t.nodeType&&e.splice(e.length-1,1),e}function r(e,t,i){for(var n=[];e&&e!=i;e=e[t])n.push(e);return n}function s(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function a(e,t,i){var s=i?"nextSibling":"previousSibling";for(d=e,h=d.parentNode;d&&d!=t;d=h)h=d.parentNode,p=r(d==e?d:d[s],s),p.length&&(i||p.reverse(),n(o(p)))}var l,c,u,d,h,p,f,m=i.startContainer,g=i.startOffset,v=i.endContainer,b=i.endOffset;if(f=t.select("td.mceSelected,th.mceSelected"),f.length>0)return e.each(f,function(e){n([e])}),void 0;if(1==m.nodeType&&m.hasChildNodes()&&(m=m.childNodes[g]),1==v.nodeType&&v.hasChildNodes()&&(v=v.childNodes[Math.min(b-1,v.childNodes.length-1)]),m==v)return n(o([m]));for(l=t.findCommonAncestor(m,v),d=m;d;d=d.parentNode){if(d===v)return a(m,l,!0);if(d===l)break}for(d=v;d;d=d.parentNode){if(d===m)return a(v,l);if(d===l)break}c=s(m,l)||m,u=s(v,l)||v,a(m,c,!0),p=r(c==m?c:c.nextSibling,"nextSibling",u==v?u.nextSibling:u),p.length&&n(o(p)),a(v,u)},this.split=function(e){function t(e,t){return e.splitText(t)}var i=e.startContainer,n=e.startOffset,o=e.endContainer,r=e.endOffset;return i==o&&3==i.nodeType?n>0&&n<i.nodeValue.length&&(o=t(i,n),i=o.previousSibling,r>n?(r-=n,i=o=t(o,r).previousSibling,r=o.nodeValue.length,n=0):r=0):(3==i.nodeType&&n>0&&n<i.nodeValue.length&&(i=t(i,n),n=0),3==o.nodeType&&r>0&&r<o.nodeValue.length&&(o=t(o,r).previousSibling,r=o.nodeValue.length)),{startContainer:i,startOffset:n,endContainer:o,endOffset:r}}},e.dom.RangeUtils.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1}}(tinymce),function(e){var t=e.dom.Event,i=e.each;e.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(n,o){var r,s,a,l,c,u=this,d=n.root,h=n.items,p=n.enableUpDown,f=n.enableLeftRight||!n.enableUpDown,m=n.excludeFromTabOrder;o=o||e.DOM,r=function(e){c=e.target.id},s=function(e){o.setAttrib(e.target.id,"tabindex","-1")},l=function(){var e=o.get(c);o.setAttrib(e,"tabindex","0"),e.focus()},u.focus=function(){o.get(c).focus()},u.destroy=function(){i(h,function(e){var t=o.get(e.id);o.unbind(t,"focus",r),o.unbind(t,"blur",s)});var e=o.get(d);o.unbind(e,"focus",l),o.unbind(e,"keydown",a),h=o=d=u.focus=r=s=a=l=null,u.destroy=function(){}},u.moveFocus=function(e,r){{var s,a=-1;u.controls}c&&(i(h,function(e,t){return e.id===c?(a=t,!1):void 0}),a+=e,0>a?a=h.length-1:a>=h.length&&(a=0),s=h[a],o.setAttrib(c,"tabindex","-1"),o.setAttrib(s.id,"tabindex","0"),o.get(s.id).focus(),n.actOnFocus&&n.onAction(s.id),r&&t.cancel(r))},a=function(e){var i=37,o=39,r=38,s=40,a=27,l=14,d=13,h=32;switch(e.keyCode){case i:f&&u.moveFocus(-1),t.cancel(e);break;case o:f&&u.moveFocus(1),t.cancel(e);break;case r:p&&u.moveFocus(-1),t.cancel(e);break;case s:p&&u.moveFocus(1),t.cancel(e);break;case a:n.onCancel&&(n.onCancel(),t.cancel(e));break;case l:case d:case h:n.onAction&&(n.onAction(c),t.cancel(e))}},i(h,function(e,t){var i,n;e.id||(e.id=o.uniqueId("_mce_item_")),n=o.get(e.id),m?(o.bind(n,"blur",s),i="-1"):i=0===t?"0":"-1",n.setAttribute("tabindex",i),o.bind(n,"focus",r)}),h[0]&&(c=h[0].id),o.setAttrib(d,"tabindex","-1");var g=o.get(d);o.bind(g,"focus",l),o.bind(g,"keydown",a)}})}(tinymce),function(e){var t=e.DOM,i=e.is;e.create("tinymce.ui.Control",{Control:function(t,i,n){this.id=t,this.settings=i=i||{},this.rendered=!1,this.onRender=new e.util.Dispatcher(this),this.classPrefix="",this.scope=i.scope||this,this.disabled=0,this.active=0,this.editor=n},setAriaProperty:function(e,i){var n=t.get(this.id+"_aria")||t.get(this.id);n&&t.setAttrib(n,"aria-"+e,!!i)},focus:function(){t.get(this.id).focus()},setDisabled:function(e){e!=this.disabled&&(this.setAriaProperty("disabled",e),this.setState("Disabled",e),this.setState("Enabled",!e),this.disabled=e)},isDisabled:function(){return this.disabled},setActive:function(e){e!=this.active&&(this.setState("Active",e),this.active=e,this.setAriaProperty("pressed",e))},isActive:function(){return this.active},setState:function(e,i){var n=t.get(this.id);e=this.classPrefix+e,i?t.addClass(n,e):t.removeClass(n,e)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(e){t.setHTML(e,this.renderHTML())},postRender:function(){var e,t=this;i(t.disabled)&&(e=t.disabled,t.disabled=-1,t.setDisabled(e)),i(t.active)&&(e=t.active,t.active=-1,t.setActive(e))},remove:function(){t.remove(this.id),this.destroy()},destroy:function(){e.dom.Event.clear(this.id)}})}(tinymce),tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(e,t,i){this.parent(e,t,i),this.controls=[],this.lookup={}},add:function(e){return this.lookup[e.id]=e,this.controls.push(e),e},get:function(e){return this.lookup[e]}}),tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(e,t){this.parent(e,t),this.classPrefix="mceSeparator",this.setDisabled(!0)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}}),function(e){{var t=e.is;e.DOM,e.each,e.walk}e.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(e,t){this.parent(e,t),this.classPrefix="mceMenuItem"},setSelected:function(e){this.setState("Selected",e),this.setAriaProperty("checked",!!e),this.selected=e},isSelected:function(){return this.selected},postRender:function(){var e=this;e.parent(),t(e.selected)&&e.setSelected(e.selected)}})}(tinymce),function(e){var t=(e.is,e.DOM),i=(e.each,e.walk);e.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(t,i){var n=this;n.parent(t,i),n.items={},n.collapsed=!1,n.menuCount=0,n.onAddItem=new e.util.Dispatcher(this)},expand:function(e){var t=this;e&&i(t,function(e){e.expand&&e.expand()},"items",t),t.collapsed=!1},collapse:function(e){var t=this;e&&i(t,function(e){e.collapse&&e.collapse()},"items",t),t.collapsed=!0},isCollapsed:function(){return this.collapsed},add:function(i){return i.settings||(i=new e.ui.MenuItem(i.id||t.uniqueId(),i)),this.onAddItem.dispatch(this,i),this.items[i.id]=i},addSeparator:function(){return this.add({separator:!0})},addMenu:function(e){return e.collapse||(e=this.createMenu(e)),this.menuCount++,this.add(e)},hasMenus:function(){return 0!==this.menuCount},remove:function(e){delete this.items[e.id]},removeAll:function(){var e=this;i(e,function(e){e.removeAll?e.removeAll():e.remove(),e.destroy()},"items",e),e.items={}},createMenu:function(i){var n=new e.ui.Menu(i.id||t.uniqueId(),i);return n.onAddItem.add(this.onAddItem.dispatch,this.onAddItem),n}})}(tinymce),function(e){var t=e.is,i=e.DOM,n=e.each,o=e.dom.Event,r=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(n,o){o=o||{},o.container=o.container||i.doc.body,o.offset_x=o.offset_x||0,o.offset_y=o.offset_y||0,o.vp_offset_x=o.vp_offset_x||0,o.vp_offset_y=o.vp_offset_y||0,t(o.icons)&&!o.icons&&(o["class"]+=" mceNoIcons"),this.parent(n,o),this.onShowMenu=new e.util.Dispatcher(this),this.onHideMenu=new e.util.Dispatcher(this),this.classPrefix="mceMenu"},createMenu:function(t){var n,o=this,r=o.settings;return t.container=t.container||r.container,t.parent=o,t.constrain=t.constrain||r.constrain,t["class"]=t["class"]||r["class"],t.vp_offset_x=t.vp_offset_x||r.vp_offset_x,t.vp_offset_y=t.vp_offset_y||r.vp_offset_y,t.keyboard_focus=r.keyboard_focus,n=new e.ui.DropMenu(t.id||i.uniqueId(),t),n.onAddItem.add(o.onAddItem.dispatch,o.onAddItem),n},focus:function(){var e=this;e.keyboardNav&&e.keyboardNav.focus()},update:function(){var e,t,n=this,o=n.settings,r=i.get("menu_"+n.id+"_tbl"),s=i.get("menu_"+n.id+"_co");e=o.max_width?Math.min(r.offsetWidth,o.max_width):r.offsetWidth,t=o.max_height?Math.min(r.offsetHeight,o.max_height):r.offsetHeight,i.boxModel?n.element.setStyles({width:e,height:t}):n.element.setStyles({width:e+2,height:t+2}),o.max_width&&i.setStyle(s,"width",e),o.max_height&&(i.setStyle(s,"height",t),r.clientHeight<o.max_height&&i.setStyle(s,"overflow","hidden"))},showMenu:function(t,s,a){var l,c,u,d,h,p,f=this,m=f.settings,g=i.getViewPort(),v=2,b=f.classPrefix;f.collapse(1),f.isMenuVisible||(f.rendered?l=i.get("menu_"+f.id):(l=i.add(f.settings.container,f.renderNode()),n(f.items,function(e){e.postRender()}),f.element=new r("menu_"+f.id,{blocker:1,container:m.container})),e.isOpera||i.setStyles(l,{left:-65535,top:-65535}),i.show(l),f.update(),t+=m.offset_x||0,s+=m.offset_y||0,g.w-=4,g.h-=4,m.constrain&&(c=l.clientWidth-v,u=l.clientHeight-v,d=g.x+g.w,h=g.y+g.h,t+m.vp_offset_x+c>d&&(t=a?a-c:Math.max(0,d-m.vp_offset_x-c)),s+m.vp_offset_y+u>h&&(s=Math.max(0,h-m.vp_offset_y-u))),i.setStyles(l,{left:t,top:s}),f.element.update(),f.isMenuVisible=1,f.mouseClickFunc=o.add(l,"click",function(e){var t;if(e=e.target,e&&(e=i.getParent(e,"tr"))&&!i.hasClass(e,b+"ItemSub")){if(t=f.items[e.id],t.isDisabled())return;for(p=f;p;)p.hideMenu&&p.hideMenu(),p=p.settings.parent;return t.settings.onclick&&t.settings.onclick(e),!1}}),f.hasMenus()&&(f.mouseOverFunc=o.add(l,"mouseover",function(e){var t,n;if(e=e.target,e&&(e=i.getParent(e,"tr"))){if(t=f.items[e.id],f.lastMenu&&f.lastMenu.collapse(1),t.isDisabled())return;e&&i.hasClass(e,b+"ItemSub")&&(n=i.getRect(e),t.showMenu(n.x+n.w-v,n.y-v,n.x),f.lastMenu=t,i.addClass(i.get(t.id).firstChild,b+"ItemActive"))}})),o.add(l,"keydown",f._keyHandler,f),f.onShowMenu.dispatch(f),m.keyboard_focus&&f._setupKeyboardNav())},hideMenu:function(e){var t,n=this,r=i.get("menu_"+n.id);n.isMenuVisible&&(n.keyboardNav&&n.keyboardNav.destroy(),o.remove(r,"mouseover",n.mouseOverFunc),o.remove(r,"click",n.mouseClickFunc),o.remove(r,"keydown",n._keyHandler),i.hide(r),n.isMenuVisible=0,e||n.collapse(1),n.element&&n.element.hide(),(t=i.get(n.id))&&i.removeClass(t.firstChild,n.classPrefix+"ItemActive"),n.onHideMenu.dispatch(n))},add:function(e){var t,n=this;return e=n.parent(e),n.isRendered&&(t=i.get("menu_"+n.id))&&n._add(i.select("tbody",t)[0],e),e},collapse:function(e){this.parent(e),this.hideMenu(1)},remove:function(e){return i.remove(e.id),this.destroy(),this.parent(e)},destroy:function(){var e=this,t=i.get("menu_"+e.id);e.keyboardNav&&e.keyboardNav.destroy(),o.remove(t,"mouseover",e.mouseOverFunc),o.remove(i.select("a",t),"focus",e.mouseOverFunc),o.remove(t,"click",e.mouseClickFunc),o.remove(t,"keydown",e._keyHandler),e.element&&e.element.remove(),i.remove(t)},renderNode:function(){var e,t,o,s,a=this,l=a.settings;return s=i.create("div",{role:"listbox",id:"menu_"+a.id,"class":l["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"}),a.settings.parent&&i.setAttrib(s,"aria-parent","menu_"+a.settings.parent.id),o=i.add(s,"div",{role:"presentation",id:"menu_"+a.id+"_co","class":a.classPrefix+(l["class"]?" "+l["class"]:"")}),a.element=new r("menu_"+a.id,{blocker:1,container:l.container}),l.menu_line&&i.add(o,"span",{"class":a.classPrefix+"Line"}),e=i.add(o,"table",{role:"presentation",id:"menu_"+a.id+"_tbl",border:0,cellPadding:0,cellSpacing:0}),t=i.add(e,"tbody"),n(a.items,function(e){a._add(t,e)}),a.rendered=!0,s},_setupKeyboardNav:function(){var t,n,o=this;t=i.get("menu_"+o.id),n=i.select("a[role=option]","menu_"+o.id),n.splice(0,0,t),o.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+o.id,items:n,onCancel:function(){o.hideMenu()},enableUpDown:!0}),t.focus()},_keyHandler:function(e){var t=this;switch(e.keyCode){case 37:t.settings.parent&&(t.hideMenu(),t.settings.parent.focus(),o.cancel(e));break;case 39:t.mouseOverFunc&&t.mouseOverFunc(e)}},_add:function(e,t){var n,o,r,s,a,l=t.settings,c=this.classPrefix;return l.separator?(r=i.add(e,"tr",{id:t.id,"class":c+"ItemSeparator"}),i.add(r,"td",{"class":c+"ItemSeparator"}),(n=r.previousSibling)&&i.addClass(n,"mceLast"),void 0):(n=r=i.add(e,"tr",{id:t.id,"class":c+"Item "+c+"ItemEnabled"}),n=s=i.add(n,l.titleItem?"th":"td"),n=o=i.add(n,"a",{id:t.id+"_aria",role:l.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"}),l.parent&&(i.setAttrib(o,"aria-haspopup","true"),i.setAttrib(o,"aria-owns","menu_"+t.id)),i.addClass(s,l["class"]),a=i.add(n,"span",{"class":"mceIcon"+(l.icon?" mce_"+l.icon:"")}),l.icon_src&&i.add(a,"img",{src:l.icon_src}),n=i.add(n,l.element||"span",{"class":"mceText",title:t.settings.title},t.settings.title),t.settings.style&&("function"==typeof t.settings.style&&(t.settings.style=t.settings.style()),i.setAttrib(n,"style",t.settings.style)),1==e.childNodes.length&&i.addClass(r,"mceFirst"),(n=r.previousSibling)&&i.hasClass(n,c+"ItemSeparator")&&i.addClass(r,"mceFirst"),t.collapse&&i.addClass(r,c+"ItemSub"),(n=r.previousSibling)&&i.removeClass(n,"mceLast"),i.addClass(r,"mceLast"),void 0)}})}(tinymce),function(e){var t=e.DOM;e.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,t,i){this.parent(e,t,i),this.classPrefix="mceButton"},renderHTML:function(){var e,i,n=this.classPrefix,o=this.settings;return i=t.encode(o.label||""),e='<a role="button" id="'+this.id+'" href="javascript:;" class="'+n+" "+n+"Enabled "+o["class"]+(i?" "+n+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+t.encode(o.title)+'">',e+=!o.image||this.editor&&this.editor.forcedHighContrastMode?'<span class="mceIcon '+o["class"]+'"></span>'+(i?'<span class="'+n+'Label">'+i+"</span>":""):'<span class="mceIcon '+o["class"]+'"><img class="mceIcon" src="'+o.image+'" alt="'+t.encode(o.title)+'" /></span>'+(i?'<span class="'+n+'Label">'+i+"</span>":""),e+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+o.title+"</span>",e+="</a>"},postRender:function(){var t,i=this,n=i.settings;e.isIE&&i.editor&&e.dom.Event.add(i.id,"mousedown",function(){var e=i.editor.selection.getNode().nodeName;t="IMG"===e?i.editor.selection.getBookmark():null}),e.dom.Event.add(i.id,"click",function(o){return i.isDisabled()?void 0:(e.isIE&&i.editor&&null!==t&&i.editor.selection.moveToBookmark(t),n.onclick.call(n.scope,o))}),e.dom.Event.add(i.id,"keydown",function(t){return i.isDisabled()||t.keyCode!=e.VK.SPACEBAR?void 0:(e.dom.Event.cancel(t),n.onclick.call(n.scope,t))})}})}(tinymce),function(e){var t,i=e.DOM,n=e.dom.Event,o=e.each,r=e.util.Dispatcher;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(t,i,n){var o=this;o.parent(t,i,n),o.items=[],o.onChange=new r(o),o.onPostRender=new r(o),o.onAdd=new r(o),o.onRenderMenu=new e.util.Dispatcher(this),o.classPrefix="mceListBox",o.marked={}},select:function(e){var i,n,r=this;return r.marked={},e==t?r.selectByIndex(-1):(n=e&&"function"==typeof e?e:function(t){return t==e},e!=r.selectedValue&&(o(r.items,function(e,t){return n(e.value)?(i=1,r.selectByIndex(t),!1):void 0}),i||r.selectByIndex(-1)),void 0)},selectByIndex:function(e){var t,n,o,r=this;r.marked={},e!=r.selectedIndex&&(t=i.get(r.id+"_text"),o=i.get(r.id+"_voiceDesc"),n=r.items[e],n?(r.selectedValue=n.value,r.selectedIndex=e,i.setHTML(t,i.encode(n.title)),i.setHTML(o,r.settings.title+" - "+n.title),i.removeClass(t,"mceTitle"),i.setAttrib(r.id,"aria-valuenow",n.title)):(i.setHTML(t,i.encode(r.settings.title)),i.setHTML(o,i.encode(r.settings.title)),i.addClass(t,"mceTitle"),r.selectedValue=r.selectedIndex=null,i.setAttrib(r.id,"aria-valuenow",r.settings.title)),t=0)},mark:function(e){this.marked[e]=!0},add:function(t,i,n){var o=this;n=n||{},n=e.extend(n,{title:t,value:i}),o.items.push(n),o.onAdd.dispatch(o,n)},getLength:function(){return this.items.length},renderHTML:function(){var e="",t=this,n=t.settings,o=t.classPrefix;return e='<span role="listbox" aria-haspopup="true" aria-labelledby="'+t.id+'_voiceDesc" aria-describedby="'+t.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+t.id+'" cellpadding="0" cellspacing="0" class="'+o+" "+o+"Enabled"+(n["class"]?" "+n["class"]:"")+'"><tbody><tr>',e+="<td>"+i.createHTML("span",{id:t.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},t.settings.title),e+=i.createHTML("a",{id:t.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},i.encode(t.settings.title))+"</td>",e+="<td>"+i.createHTML("a",{id:t.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">▼</span></span>')+"</td>",e+="</tr></tbody></table></span>"},showMenu:function(){var t,r,s=this,a=i.get(this.id);if(!s.isDisabled()&&0!==s.items.length){if(s.menu&&s.menu.isMenuVisible)return s.hideMenu();s.isMenuRendered||(s.renderMenu(),s.isMenuRendered=!0),t=i.getPos(a),r=s.menu,r.settings.offset_x=t.x,r.settings.offset_y=t.y,r.settings.keyboard_focus=!e.isOpera,o(s.items,function(e){r.items[e.id]&&r.items[e.id].setSelected(0)}),o(s.items,function(e){r.items[e.id]&&s.marked[e.value]&&r.items[e.id].setSelected(1),e.value===s.selectedValue&&r.items[e.id].setSelected(1)}),r.showMenu(0,a.clientHeight),n.add(i.doc,"mousedown",s.hideMenu,s),i.addClass(s.id,s.classPrefix+"Selected")}},hideMenu:function(e){var t=this;if(t.menu&&t.menu.isMenuVisible){if(i.removeClass(t.id,t.classPrefix+"Selected"),e&&"mousedown"==e.type&&(e.target.id==t.id+"_text"||e.target.id==t.id+"_open"))return;e&&i.getParent(e.target,".mceMenu")||(i.removeClass(t.id,t.classPrefix+"Selected"),n.remove(i.doc,"mousedown",t.hideMenu,t),t.menu.hideMenu())}},renderMenu:function(){var e,n=this;e=n.settings.control_manager.createDropMenu(n.id+"_menu",{menu_line:1,"class":n.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150}),e.onHideMenu.add(function(){n.hideMenu(),n.focus()}),e.add({title:n.settings.title,"class":"mceMenuItemTitle",onclick:function(){n.settings.onselect("")!==!1&&n.select("")}}),o(n.items,function(o){o.value===t?e.add({title:o.title,role:"option","class":"mceMenuItemTitle",onclick:function(){n.settings.onselect("")!==!1&&n.select("")}}):(o.id=i.uniqueId(),o.role="option",o.onclick=function(){n.settings.onselect(o.value)!==!1&&n.select(o.value)},e.add(o))}),n.onRenderMenu.dispatch(n,e),n.menu=e},postRender:function(){var t=this,o=t.classPrefix;n.add(t.id,"click",t.showMenu,t),n.add(t.id,"keydown",function(e){32==e.keyCode&&(t.showMenu(e),n.cancel(e))}),n.add(t.id,"focus",function(){t._focused||(t.keyDownHandler=n.add(t.id,"keydown",function(e){40==e.keyCode&&(t.showMenu(),n.cancel(e))}),t.keyPressHandler=n.add(t.id,"keypress",function(e){var i;13==e.keyCode&&(i=t.selectedValue,t.selectedValue=null,n.cancel(e),t.settings.onselect(i))})),t._focused=1}),n.add(t.id,"blur",function(){n.remove(t.id,"keydown",t.keyDownHandler),n.remove(t.id,"keypress",t.keyPressHandler),t._focused=0}),(e.isIE6||!i.boxModel)&&(n.add(t.id,"mouseover",function(){i.hasClass(t.id,o+"Disabled")||i.addClass(t.id,o+"Hover")}),n.add(t.id,"mouseout",function(){i.hasClass(t.id,o+"Disabled")||i.removeClass(t.id,o+"Hover")})),t.onPostRender.dispatch(t,i.get(t.id))},destroy:function(){this.parent(),n.clear(this.id+"_text"),n.clear(this.id+"_open")}})}(tinymce),function(e){{var t,i=e.DOM,n=e.dom.Event,o=e.each;e.util.Dispatcher}e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(e,t){this.parent(e,t),this.classPrefix="mceNativeListBox"},setDisabled:function(e){i.get(this.id).disabled=e,this.setAriaProperty("disabled",e)},isDisabled:function(){return i.get(this.id).disabled},select:function(e){var i,n,r=this;return e==t?r.selectByIndex(-1):(n=e&&"function"==typeof e?e:function(t){return t==e},e!=r.selectedValue&&(o(r.items,function(e,t){return n(e.value)?(i=1,r.selectByIndex(t),!1):void 0}),i||r.selectByIndex(-1)),void 0)},selectByIndex:function(e){i.get(this.id).selectedIndex=e+1,this.selectedValue=this.items[e]?this.items[e].value:null},add:function(e,t,n){var o,r=this;n=n||{},n.value=t,r.isRendered()&&i.add(i.get(this.id),"option",n,e),o={title:e,value:t,attribs:n},r.items.push(o),r.onAdd.dispatch(r,o)},getLength:function(){return this.items.length},renderHTML:function(){var e,t=this;return e=i.createHTML("option",{value:""},"-- "+t.settings.title+" --"),o(t.items,function(t){e+=i.createHTML("option",{value:t.value},t.title)}),e=i.createHTML("select",{id:t.id,"class":"mceNativeListBox","aria-labelledby":t.id+"_aria"},e),e+=i.createHTML("span",{id:t.id+"_aria",style:"display: none"},t.settings.title)},postRender:function(){function e(e){var t=o.items[e.target.selectedIndex-1];t&&(t=t.value)&&(o.onChange.dispatch(o,t),o.settings.onselect&&o.settings.onselect(t))}var t,o=this,r=!0;o.rendered=!0,n.add(o.id,"change",e),n.add(o.id,"keydown",function(i){var s,a=38,l=40,c=13,u=32;return n.remove(o.id,"change",t),r=!1,s=n.add(o.id,"blur",function(){r||(r=!0,n.add(o.id,"change",e),n.remove(o.id,"blur",s))}),i.keyCode==c||i.keyCode==u?(e(i),n.cancel(i)):((i.keyCode==l||i.keyCode==a)&&i.stopImmediatePropagation(),void 0)}),o.onPostRender.dispatch(o,i.get(o.id))}})}(tinymce),function(e){{var t=e.DOM,i=e.dom.Event;e.each}e.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(i,n,o){this.parent(i,n,o),this.onRenderMenu=new e.util.Dispatcher(this),n.menu_container=n.menu_container||t.doc.body},showMenu:function(){var e,n,o,r=this,s=t.get(r.id);if(!r.isDisabled()){if(r.isMenuRendered||(r.renderMenu(),r.isMenuRendered=!0),r.isMenuVisible)return r.hideMenu();e=t.getPos(r.settings.menu_container),n=t.getPos(s),o=r.menu,o.settings.offset_x=n.x,o.settings.offset_y=n.y,o.settings.vp_offset_x=n.x,o.settings.vp_offset_y=n.y,o.settings.keyboard_focus=r._focused,o.showMenu(0,s.firstChild.clientHeight),i.add(t.doc,"mousedown",r.hideMenu,r),r.setState("Selected",1),r.isMenuVisible=1}},renderMenu:function(){var e,t=this;e=t.settings.control_manager.createDropMenu(t.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:t.settings.icons}),e.onHideMenu.add(function(){t.hideMenu(),t.focus()}),t.onRenderMenu.dispatch(t,e),t.menu=e},hideMenu:function(e){var n=this;e&&"mousedown"==e.type&&t.getParent(e.target,function(e){return e.id===n.id||e.id===n.id+"_open"})||(e&&t.getParent(e.target,".mceMenu")||(n.setState("Selected",0),i.remove(t.doc,"mousedown",n.hideMenu,n),n.menu&&n.menu.hideMenu()),n.isMenuVisible=0)},postRender:function(){var e=this,t=e.settings;i.add(e.id,"click",function(){e.isDisabled()||(t.onclick&&t.onclick(e.value),e.showMenu())})}})}(tinymce),function(e){{var t=e.DOM,i=e.dom.Event;e.each}e.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(e,t,i){this.parent(e,t,i),this.classPrefix="mceSplitButton"},renderHTML:function(){var e,i,n=this,o=n.settings;return e="<tbody><tr>",i=o.image?t.createHTML("img ",{src:o.image,role:"presentation","class":"mceAction "+o["class"]}):t.createHTML("span",{"class":"mceAction "+o["class"]},""),i+=t.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:n.id+"_voice",style:"display:none;"},o.title),e+="<td >"+t.createHTML("a",{role:"button",id:n.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+o["class"],onclick:"return false;",onmousedown:"return false;",title:o.title},i)+"</td>",i=t.createHTML("span",{"class":"mceOpen "+o["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">▼</span>'),e+="<td >"+t.createHTML("a",{role:"button",id:n.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+o["class"],onclick:"return false;",onmousedown:"return false;",title:o.title},i)+"</td>",e+="</tr></tbody>",e=t.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+o["class"],cellpadding:"0",cellspacing:"0",title:o.title},e),t.createHTML("div",{id:n.id,role:"button",tabindex:"0","aria-labelledby":n.id+"_voice","aria-haspopup":"true"},e)},postRender:function(){var n,o=this,r=o.settings;r.onclick&&(n=function(e){o.isDisabled()||(r.onclick(o.value),i.cancel(e))},i.add(o.id+"_action","click",n),i.add(o.id,["click","keydown"],function(e){var t=40;32!==e.keyCode&&13!==e.keyCode&&14!==e.keyCode||e.altKey||e.ctrlKey||e.metaKey?("click"===e.type||e.keyCode===t)&&(o.showMenu(),i.cancel(e)):(n(),i.cancel(e))})),i.add(o.id+"_open","click",function(e){o.showMenu(),i.cancel(e)}),i.add([o.id,o.id+"_open"],"focus",function(){o._focused=1}),i.add([o.id,o.id+"_open"],"blur",function(){o._focused=0}),(e.isIE6||!t.boxModel)&&(i.add(o.id,"mouseover",function(){t.hasClass(o.id,"mceSplitButtonDisabled")||t.addClass(o.id,"mceSplitButtonHover")}),i.add(o.id,"mouseout",function(){t.hasClass(o.id,"mceSplitButtonDisabled")||t.removeClass(o.id,"mceSplitButtonHover")}))},destroy:function(){this.parent(),i.clear(this.id+"_action"),i.clear(this.id+"_open"),i.clear(this.id)}})}(tinymce),function(e){var t=e.DOM,i=e.dom.Event,n=e.is,o=e.each;e.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(t,i,n){var o=this;o.parent(t,i,n),o.settings=i=e.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},o.settings),o.onShowMenu=new e.util.Dispatcher(o),o.onHideMenu=new e.util.Dispatcher(o),o.value=i.default_color},showMenu:function(){var n,o,r=this;if(!r.isDisabled()){if(r.isMenuRendered||(r.renderMenu(),r.isMenuRendered=!0),r.isMenuVisible)return r.hideMenu();n=t.get(r.id),t.show(r.id+"_menu"),t.addClass(n,"mceSplitButtonSelected"),o=t.getPos(n),t.setStyles(r.id+"_menu",{left:o.x,top:o.y+n.firstChild.clientHeight,zIndex:2e5}),n=0,i.add(t.doc,"mousedown",r.hideMenu,r),r.onShowMenu.dispatch(r),r._focused&&(r._keyHandler=i.add(r.id+"_menu","keydown",function(e){27==e.keyCode&&r.hideMenu()}),t.select("a",r.id+"_menu")[0].focus()),r.keyboardNav=new e.ui.KeyboardNavigation({root:r.id+"_menu",items:t.select("a",r.id+"_menu"),onCancel:function(){r.hideMenu(),r.focus()}}),r.keyboardNav.focus(),r.isMenuVisible=1}},hideMenu:function(e){var n=this;if(n.isMenuVisible){if(e&&"mousedown"==e.type&&t.getParent(e.target,function(e){return e.id===n.id+"_open"}))return;e&&t.getParent(e.target,".mceSplitButtonMenu")||(t.removeClass(n.id,"mceSplitButtonSelected"),i.remove(t.doc,"mousedown",n.hideMenu,n),i.remove(n.id+"_menu","keydown",n._keyHandler),t.hide(n.id+"_menu")),n.isMenuVisible=0,n.onHideMenu.dispatch(),n.keyboardNav.destroy()}},renderMenu:function(){var r,s,a,l,c,u,d=this,h=0,p=d.settings;return c=t.add(p.menu_container,"div",{role:"listbox",id:d.id+"_menu","class":p.menu_class+" "+p["class"],style:"position:absolute;left:0;top:-1000px;"}),r=t.add(c,"div",{"class":p["class"]+" mceSplitButtonMenu"}),t.add(r,"span",{"class":"mceMenuLine"}),s=t.add(r,"table",{role:"presentation","class":"mceColorSplitMenu"}),a=t.add(s,"tbody"),h=0,o(n(p.colors,"array")?p.colors:p.colors.split(","),function(i){i=i.replace(/^#/,""),h--||(l=t.add(a,"tr"),h=p.grid_width-1),s=t.add(l,"td");var n={href:"javascript:;",style:{backgroundColor:"#"+i},title:d.editor.getLang("colors."+i,i),"data-mce-color":"#"+i};e.isIE||(n.role="option"),s=t.add(s,"a",n),d.editor.forcedHighContrastMode&&(s=t.add(s,"canvas",{width:16,height:16,"aria-hidden":"true"}),s.getContext&&(u=s.getContext("2d"))?(u.fillStyle="#"+i,u.fillRect(0,0,16,16)):t.remove(s))}),p.more_colors_func&&(s=t.add(a,"tr"),s=t.add(s,"td",{colspan:p.grid_width,"class":"mceMoreColors"}),s=t.add(s,"a",{role:"option",id:d.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},p.more_colors_title),i.add(s,"click",function(e){return p.more_colors_func.call(p.more_colors_scope||this),i.cancel(e)})),t.addClass(r,"mceColorSplitMenu"),i.add(d.id+"_menu","mousedown",function(e){return i.cancel(e)}),i.add(d.id+"_menu","click",function(e){var i;return e=t.getParent(e.target,"a",a),e&&"a"==e.nodeName.toLowerCase()&&(i=e.getAttribute("data-mce-color"))&&d.setColor(i),!1}),c},setColor:function(e){this.displayColor(e),this.hideMenu(),this.settings.onselect(e)},displayColor:function(e){var i=this;t.setStyle(i.id+"_preview","backgroundColor",e),i.value=e},postRender:function(){var e=this,i=e.id;e.parent(),t.add(i+"_action","div",{id:i+"_preview","class":"mceColorPreview"}),t.setStyle(e.id+"_preview","backgroundColor",e.value)},destroy:function(){var e=this;e.parent(),i.clear(e.id+"_menu"),i.clear(e.id+"_more"),t.remove(e.id+"_menu"),e.keyboardNav&&e.keyboardNav.destroy()}})}(tinymce),function(e){var t=e.DOM,i=e.each,n=e.dom.Event;e.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var i=this,n=[],o=i.controls,r=e.each,s=i.settings;return n.push('<div id="'+i.id+'" role="group" aria-labelledby="'+i.id+'_voice">'),n.push("<span role='application'>"),n.push('<span id="'+i.id+'_voice" class="mceVoiceLabel" style="display:none;">'+t.encode(s.name)+"</span>"),r(o,function(e){n.push(e.renderHTML())}),n.push("</span>"),n.push("</div>"),n.join("")},focus:function(){var e=this;t.get(e.id).focus()},postRender:function(){var n=this,o=[];i(n.controls,function(e){i(e.controls,function(e){e.id&&o.push(e)})}),n.keyNav=new e.ui.KeyboardNavigation({root:n.id,items:o,onCancel:function(){e.isWebKit&&t.get(n.editor.id+"_ifr").focus(),n.editor.focus()},excludeFromTabOrder:!n.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent(),e.keyNav.destroy(),n.clear(e.id)}})}(tinymce),function(e){{var t=e.DOM;e.each}e.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var e,i,n,o,r,s,a=this,l="",c=a.settings;for(s=a.controls,n=0;n<s.length;n++)i=s[n],o=s[n-1],r=s[n+1],0===n&&(e="mceToolbarStart",i.Button?e+=" mceToolbarStartButton":i.SplitButton?e+=" mceToolbarStartSplitButton":i.ListBox&&(e+=" mceToolbarStartListBox"),l+=t.createHTML("td",{"class":e},t.createHTML("span",null,"<!-- IE -->"))),o&&i.ListBox&&(o.Button||o.SplitButton)&&(l+=t.createHTML("td",{"class":"mceToolbarEnd"},t.createHTML("span",null,"<!-- IE -->"))),l+=t.stdMode?'<td style="position: relative">'+i.renderHTML()+"</td>":"<td>"+i.renderHTML()+"</td>",r&&i.ListBox&&(r.Button||r.SplitButton)&&(l+=t.createHTML("td",{"class":"mceToolbarStart"},t.createHTML("span",null,"<!-- IE -->")));return e="mceToolbarEnd",i.Button?e+=" mceToolbarEndButton":i.SplitButton?e+=" mceToolbarEndSplitButton":i.ListBox&&(e+=" mceToolbarEndListBox"),l+=t.createHTML("td",{"class":e},t.createHTML("span",null,"<!-- IE -->")),t.createHTML("table",{id:a.id,"class":"mceToolbar"+(c["class"]?" "+c["class"]:""),cellpadding:"0",cellspacing:"0",align:a.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+l+"</tr></tbody>")}})}(tinymce),function(e){{var t=e.util.Dispatcher;e.each}e.create("tinymce.AddOnManager",{AddOnManager:function(){var e=this;e.items=[],e.urls={},e.lookup={},e.onAdd=new t(e)},get:function(e){return this.lookup[e]?this.lookup[e].instance:void 0},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t){var i=e.settings;i&&i.language&&i.language_load!==!1&&e.ScriptLoader.add(this.urls[t]+"/langs/"+i.language+".js")
84
+ },add:function(e,t,i){return this.items.push(t),this.lookup[e]={instance:t,dependencies:i},this.onAdd.dispatch(this,e,t),t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,i){var n=this.urls[t];e.each(i,function(t){e.ScriptLoader.add(n+"/"+t)})},load:function(t,i,n,o){function r(){var r=s.dependencies(t);e.each(r,function(e){var t=s.createUrl(i,e);s.load(t.resource,t,void 0,void 0)}),n&&(o?n.call(o):n.call(e.ScriptLoader))}var s=this,a=i;s.urls[t]||("object"==typeof i&&(a=i.prefix+i.resource+i.suffix),0!==a.indexOf("/")&&-1==a.indexOf("://")&&(a=e.baseURL+"/"+a),s.urls[t]=a.substring(0,a.lastIndexOf("/")),s.lookup[t]?r():e.ScriptLoader.add(a,r,o))}}),e.PluginManager=new e.AddOnManager,e.ThemeManager=new e.AddOnManager}(tinymce),function(e){var t,i=e.each,n=e.extend,o=e.DOM,r=e.dom.Event,s=(e.ThemeManager,e.PluginManager,e.explode),a=e.util.Dispatcher,l=0;e.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e.documentBaseURL)||(e.documentBaseURL+="/"),e.baseURL=new e.util.URI(e.documentBaseURL).toAbsolute(e.baseURL),e.baseURI=new e.util.URI(e.baseURL),e.onBeforeUnload=new a(e),r.add(window,"beforeunload",function(t){e.onBeforeUnload.dispatch(e,t)}),e.onAddEditor=new a(e),e.onRemoveEditor=new a(e),e.EditorManager=n(e,{editors:[],i18n:{},activeEditor:null,init:function(t){function n(e){var t=e.id;return t||(t=e.name,t=t&&!o.get(t)?e.name:o.uniqueId(),e.setAttribute("id",t)),t}function a(t,i,n){var o=t[i];if(o)return e.is(o,"string")&&(n=o.replace(/\.\w+$/,""),n=n?e.resolve(n):0,o=e.resolve(o)),o.apply(n||this,Array.prototype.slice.call(arguments,2))}function c(e,t){return t.constructor===RegExp?t.test(e.className):o.hasClass(e,t)}var u,d=this,h=(e.ScriptLoader,[]);d.settings=t,r.bind(window,"ready",function(){var r,d;switch(a(t,"onpageload"),t.mode){case"exact":r=t.elements||"",r.length>0&&i(s(r),function(n){o.get(n)?(u=new e.Editor(n,t),h.push(u),u.render(1)):i(document.forms,function(r){i(r.elements,function(i){i.name===n&&(n="mce_editor_"+l++,o.setAttrib(i,"id",n),u=new e.Editor(n,t),h.push(u),u.render(1))})})});break;case"textareas":case"specific_textareas":i(o.select("textarea"),function(i){t.editor_deselector&&c(i,t.editor_deselector)||(!t.editor_selector||c(i,t.editor_selector))&&(u=new e.Editor(n(i),t),h.push(u),u.render(1))});break;default:t.types?i(t.types,function(r){i(o.select(r.selector),function(i){var o=new e.Editor(n(i),e.extend({},t,r));h.push(o),o.render(1)})}):t.selector&&i(o.select(t.selector),function(i){var o=new e.Editor(n(i),t);h.push(o),o.render(1)})}t.oninit&&(r=d=0,i(h,function(e){d++,e.initialized?r++:e.onInit.add(function(){r++,r==d&&a(t,"oninit")}),r==d&&a(t,"oninit")}))})},get:function(e){return e===t?this.editors:this.editors.hasOwnProperty(e)?this.editors[e]:t},getInstanceById:function(e){return this.get(e)},add:function(e){var t=this,i=t.editors;return i[e.id]=e,i.push(e),t._setActive(e),t.onAddEditor.dispatch(t,e),e},remove:function(e){var t,i=this,n=i.editors;if(!n[e.id])return null;for(delete n[e.id],t=0;t<n.length;t++)if(n[t]==e){n.splice(t,1);break}return i.activeEditor==e&&i._setActive(n[0]),e.destroy(),i.onRemoveEditor.dispatch(i,e),e},execCommand:function(t,i,n){function o(){a.destroy(),r.detachEvent("onunload",o),r=r.tinyMCE=r.tinymce=null}var r,s=this,a=s.get(n);switch(t){case"mceFocus":return a.focus(),!0;case"mceAddEditor":case"mceAddControl":return s.get(n)||new e.Editor(n,s.settings).render(),!0;case"mceAddFrameControl":return r=n.window,r.tinyMCE=tinyMCE,r.tinymce=e,e.DOM.doc=r.document,e.DOM.win=r,a=new e.Editor(n.element_id,n),a.render(),e.isIE&&!e.isIE11&&r.attachEvent("onunload",o),n.page_window=null,!0;case"mceRemoveEditor":case"mceRemoveControl":return a&&a.remove(),!0;case"mceToggleEditor":return a?(a.isHidden()?a.show():a.hide(),!0):(s.execCommand("mceAddControl",0,n),!0)}return s.activeEditor?s.activeEditor.execCommand(t,i,n):!1},execInstanceCommand:function(e,t,i,n){var o=this.get(e);return o?o.execCommand(t,i,n):!1},triggerSave:function(){i(this.editors,function(e){e.save()})},addI18n:function(t,n){var o=this.i18n;e.is(t,"string")?i(n,function(e,i){o[t+"."+i]=e}):i(t,function(e,t){i(e,function(e,n){i(e,function(e,i){"common"===n?o[t+"."+i]=e:o[t+"."+n+"."+i]=e})})})},_setActive:function(e){this.selectedInstance=this.activeEditor=e}})}(tinymce),function(e){var t=e.DOM,i=e.dom.Event,n=e.extend,o=e.each,r=e.isGecko,s=e.isIE,a=(e.isWebKit,e.is),l=e.ThemeManager,c=e.PluginManager,u=e.explode;e.create("tinymce.Editor",{Editor:function(t,i){var o=this,r=!0;o.settings=i=n({id:t,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:e.documentBaseURL,add_form_submit_trigger:r,submit_patch:r,add_unload_trigger:r,convert_urls:r,relative_urls:r,remove_script_host:r,table_inline_editing:!1,object_resizing:r,accessibility_focus:r,doctype:e.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:r,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:r,directionality:"ltr",forced_root_block:"p",hidden_input:r,padd_empty_editor:r,render_ui:r,indentation:"30px",fix_table_elements:r,inline_styles:r,convert_fonts_to_spans:r,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:r,entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o,ie7_compat:r},i),o.id=o.editorId=t,o.isNotDirty=!1,o.plugins={},o.documentBaseURI=new e.util.URI(i.document_base_url||e.documentBaseURL,{base_uri:tinyMCE.baseURI}),o.baseURI=e.baseURI,o.contentCSS=[],o.contentStyles=[],o.setupEvents(),o.execCommands={},o.queryStateCommands={},o.queryValueCommands={},o.execCallback("setup",o)},render:function(){function n(){s.language&&s.language_load!==!1&&d.add(e.baseURL+"/langs/"+s.language+".js"),s.theme&&"function"!=typeof s.theme&&"-"!=s.theme.charAt(0)&&!l.urls[s.theme]&&l.load(s.theme,"themes/"+s.theme+"/editor_template"+e.suffix+".js"),o(u(s.plugins),function(t){if(t&&!c.urls[t])if("-"==t.charAt(0)){t=t.substr(1,t.length);var i=c.dependencies(t);o(i,function(t){var i={prefix:"plugins/",resource:t,suffix:"/editor_plugin"+e.suffix+".js"};t=c.createUrl(i,t),c.load(t.resource,t)})}else{if("safari"==t)return;c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+e.suffix+".js"})}}),d.loadQueue(function(){r.removed||r.init()})}var r=this,s=r.settings,a=r.id,d=e.ScriptLoader;return i.domLoaded?(tinyMCE.settings=s,r.getElement()&&(!e.isIDevice||e.isIOS5)&&(!/TEXTAREA|INPUT/i.test(r.getElement().nodeName)&&s.hidden_input&&t.getParent(a,"form")&&t.insertAfter(t.create("input",{type:"hidden",name:a}),a),s.content_editable||(r.orgVisibility=r.getElement().style.visibility,r.getElement().style.visibility="hidden"),e.WindowManager&&(r.windowManager=new e.WindowManager(r)),"xml"==s.encoding&&r.onGetContent.add(function(e,i){i.save&&(i.content=t.encode(i.content))}),s.add_form_submit_trigger&&r.onSubmit.addToTop(function(){r.initialized&&(r.save(),r.isNotDirty=1)}),s.add_unload_trigger&&(r._beforeUnload=tinyMCE.onBeforeUnload.add(function(){!r.initialized||r.destroyed||r.isHidden()||r.save({format:"raw",no_events:!0})})),e.addUnload(r.destroy,r),s.submit_patch&&r.onBeforeRenderUI.add(function(){var t=r.getElement().form;t&&(t._mceOldSubmit||(t.submit.nodeType||t.submit.length||(r.formElement=t,t._mceOldSubmit=t.submit,t.submit=function(){return e.triggerSave(),r.isNotDirty=1,r.formElement._mceOldSubmit(r.formElement)}),t=null))}),n()),void 0):(i.add(window,"ready",function(){r.render()}),void 0)},init:function(){function i(t){var n,r=c.get(t),s=c.urls[t]||e.documentBaseURL.replace(/\/$/,"");r&&-1===e.inArray(C,t)&&(o(c.dependencies(t),function(e){i(e)}),n=new r(b,s),b.plugins[t]=n,n.init&&(n.init(b,s),C.push(t)))}var n,r,a,d,h,p,f,m,g,v,b=this,y=b.settings,_=b.getElement(),C=[];if(e.add(b),y.aria_label=y.aria_label||t.getAttrib(_,"aria-label",b.getLang("aria.rich_text_area")),y.theme&&("function"!=typeof y.theme?(y.theme=y.theme.replace(/-/,""),h=l.get(y.theme),b.theme=new h,b.theme.init&&b.theme.init(b,l.urls[y.theme]||e.documentBaseURL.replace(/\/$/,""))):b.theme=y.theme),o(u(y.plugins.replace(/\-/g,"")),i),y.popup_css!==!1&&(y.popup_css=y.popup_css?b.documentBaseURI.toAbsolute(y.popup_css):b.baseURI.toAbsolute("themes/"+y.theme+"/skins/"+y.skin+"/dialog.css")),y.popup_css_add&&(y.popup_css+=","+b.documentBaseURI.toAbsolute(y.popup_css_add)),b.controlManager=new e.ControlManager(b),b.onBeforeRenderUI.dispatch(b,b.controlManager),y.render_ui&&b.theme&&(b.orgDisplay=_.style.display,"function"!=typeof y.theme?(r=y.width||_.style.width||_.offsetWidth,a=y.height||_.style.height||_.offsetHeight,d=y.min_height||100,g=/^[0-9\.]+(|px)$/i,g.test(""+r)&&(r=Math.max(parseInt(r,10)+(h.deltaWidth||0),100)),g.test(""+a)&&(a=Math.max(parseInt(a,10)+(h.deltaHeight||0),d)),h=b.theme.renderUI({targetNode:_,width:r,height:a,deltaWidth:y.delta_width,deltaHeight:y.delta_height}),t.setStyles(h.sizeContainer||h.editorContainer,{width:r,height:a}),a=(h.iframeHeight||a)+("number"==typeof a?h.deltaHeight||0:""),d>a&&(a=d)):(h=y.theme(b,_),h.editorContainer.nodeType&&(h.editorContainer=h.editorContainer.id=h.editorContainer.id||b.id+"_parent"),h.iframeContainer.nodeType&&(h.iframeContainer=h.iframeContainer.id=h.iframeContainer.id||b.id+"_iframecontainer"),a=h.iframeHeight||_.offsetHeight,s&&(b.onInit.add(function(e){e.dom.bind(e.getBody(),"beforedeactivate keydown keyup",function(){e.bookmark=e.selection.getBookmark(1)})}),b.onNodeChange.add(function(e){document.activeElement.id==e.id+"_ifr"&&(e.bookmark=e.selection.getBookmark(1))}))),b.editorContainer=h.editorContainer),y.content_css&&o(u(y.content_css),function(e){b.contentCSS.push(b.documentBaseURI.toAbsolute(e))}),y.content_style&&b.contentStyles.push(y.content_style),y.content_editable)return _=n=h=null,b.initContentBody();for(document.domain&&location.hostname!=document.domain&&(e.relaxedDomain=document.domain),b.iframeHTML=y.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">',y.document_base_url!=e.documentBaseURL&&(b.iframeHTML+='<base href="'+b.documentBaseURI.getURI()+'" />'),e.isIE8&&(b.iframeHTML+=y.ie7_compat?'<meta http-equiv="X-UA-Compatible" content="IE=7" />':'<meta http-equiv="X-UA-Compatible" content="IE=edge" />'),b.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',v=0;v<b.contentCSS.length;v++)b.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+b.contentCSS[v]+'" />';b.contentCSS=[],f=y.body_id||"tinymce",-1!=f.indexOf("=")&&(f=b.getParam("body_id","","hash"),f=f[b.id]||f),m=y.body_class||"",-1!=m.indexOf("=")&&(m=b.getParam("body_class","","hash"),m=m[b.id]||""),b.iframeHTML+='</head><body id="'+f+'" class="mceContentBody '+m+'" onload="window.parent.tinyMCE.get(\''+b.id+"').onLoad.dispatch();\"><br></body></html>",e.relaxedDomain&&(s||e.isOpera&&parseFloat(opera.version())<11)&&(p='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+b.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'),n=t.add(h.iframeContainer,"iframe",{id:b.id+"_ifr",src:p||'javascript:""',frameBorder:"0",allowTransparency:"true",title:y.aria_label,style:{width:"100%",height:a,display:"block"}}),b.contentAreaContainer=h.iframeContainer,h.editorContainer&&(t.get(h.editorContainer).style.display=b.orgDisplay),_.style.visibility=b.orgVisibility,t.get(b.id).style.display="none",t.setAttrib(b.id,"aria-hidden",!0),e.relaxedDomain&&p||b.initContentBody(),_=n=h=null},initContentBody:function(){var i,n,r=this,a=r.settings,l=t.get(r.id),c=r.getDoc();s&&e.relaxedDomain||a.content_editable||(c.open(),c.write(r.iframeHTML),c.close(),e.relaxedDomain&&(c.domain=e.relaxedDomain)),a.content_editable&&(t.addClass(l,"mceContentBody"),r.contentDocument=c=a.content_document||document,r.contentWindow=a.content_window||window,r.bodyElement=l,a.content_document=a.content_window=null),i=r.getBody(),i.disabled=!0,a.readonly||(i.contentEditable=r.getParam("content_editable_state",!0)),i.disabled=!1,r.schema=new e.html.Schema(a),r.dom=new e.dom.DOMUtils(c,{keep_values:!0,url_converter:r.convertURL,url_converter_scope:r,hex_colors:a.force_hex_style_colors,class_filter:a.class_filter,update_styles:!0,root_element:a.content_editable?r.id:null,schema:r.schema}),r.parser=new e.html.DomParser(a,r.schema),r.parser.addAttributeFilter("src,href,style",function(e,t){for(var i,n,o,s=e.length,a=r.dom;s--;)i=e[s],n=i.attr(t),o="data-mce-"+t,i.attributes.map[o]||("style"===t?i.attr(o,a.serializeStyle(a.parseStyle(n),i.name)):i.attr(o,r.convertURL(n,t,i.name)))}),r.parser.addNodeFilter("script",function(e){for(var t,i=e.length;i--;)t=e[i],t.attr("type","mce-"+(t.attr("type")||"text/javascript"))}),r.parser.addNodeFilter("#cdata",function(e){for(var t,i=e.length;i--;)t=e[i],t.type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),r.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t){for(var i,n=t.length,o=r.schema.getNonEmptyElements();n--;)i=t[n],i.isEmpty(o)&&(i.empty().append(new e.html.Node("br",1)).shortEnded=!0)}),r.serializer=new e.dom.Serializer(a,r.dom,r.schema),r.selection=new e.dom.Selection(r.dom,r.getWin(),r.serializer,r),r.formatter=new e.Formatter(r),r.undoManager=new e.UndoManager(r),r.forceBlocks=new e.ForceBlocks(r),r.enterKey=new e.EnterKey(r),r.editorCommands=new e.EditorCommands(r),r.onExecCommand.add(function(e,t){/^(FontName|FontSize)$/.test(t)||r.nodeChanged()}),r.serializer.onPreProcess.add(function(e,t){return r.onPreProcess.dispatch(r,t,e)}),r.serializer.onPostProcess.add(function(e,t){return r.onPostProcess.dispatch(r,t,e)}),r.onPreInit.dispatch(r),a.browser_spellcheck||a.gecko_spellcheck||(c.body.spellcheck=!1),a.readonly||r.bindNativeEvents(),r.controlManager.onPostRender.dispatch(r,r.controlManager),r.onPostRender.dispatch(r),r.quirks=e.util.Quirks(r),a.directionality&&(i.dir=a.directionality),a.nowrap&&(i.style.whiteSpace="nowrap"),a.protect&&r.onBeforeSetContent.add(function(e,t){o(a.protect,function(e){t.content=t.content.replace(e,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),r.onSetContent.add(function(){r.addVisual(r.getBody())}),a.padd_empty_editor&&r.onPostProcess.add(function(e,t){t.content=t.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),r.load({initial:!0,format:"html"}),r.startContent=r.getContent({format:"raw"}),r.initialized=!0,r.onInit.dispatch(r),r.execCallback("setupcontent_callback",r.id,i,c),r.execCallback("init_instance_callback",r),r.focus(!0),r.nodeChanged({initial:!0}),r.contentStyles.length>0&&(n="",o(r.contentStyles,function(e){n+=e+"\r\n"}),r.dom.addStyle(n)),o(r.contentCSS,function(e){r.dom.loadCSS(e)}),a.auto_focus&&setTimeout(function(){var t=e.get(a.auto_focus);t.selection.select(t.getBody(),1),t.selection.collapse(1),t.getBody().focus(),t.getWin().focus()},100),l=c=i=null},focus:function(t){var i,n,o,r,s=this,a=s.selection,l=s.settings.content_editable,c=s.getDoc();t||(s.bookmark&&(a.moveToBookmark(s.bookmark),s.bookmark=null),n=a.getRng(),n.item&&(o=n.item(0)),s._refreshContentEditable(),l||s.getWin().focus(),(e.isGecko||l)&&(r=s.getBody(),r.setActive&&!e.isIE11?r.setActive():r.focus(),l&&a.normalize()),o&&o.ownerDocument==c&&(n=c.body.createControlRange(),n.addElement(o),n.select())),e.activeEditor!=s&&(null!=(i=e.activeEditor)&&i.onDeactivate.dispatch(i,s),s.onActivate.dispatch(s,i)),e._setActive(s)},execCallback:function(t){var i,n=this,o=n.settings[t];if(o)return n.callbackLookup&&(i=n.callbackLookup[t])&&(o=i.func,i=i.scope),a(o,"string")&&(i=o.replace(/\.\w+$/,""),i=i?e.resolve(i):0,o=e.resolve(o),n.callbackLookup=n.callbackLookup||{},n.callbackLookup[t]={func:o,scope:i}),o.apply(i||n,Array.prototype.slice.call(arguments,1))},translate:function(t){var i=this.settings.language||"en",n=e.i18n;return t?n[i+"."+t]||t.replace(/\{\#([^\}]+)\}/g,function(e,t){return n[i+"."+t]||"{#"+t+"}"}):""},getLang:function(t,i){return e.i18n[(this.settings.language||"en")+"."+t]||(a(i)?i:"{#"+t+"}")},getParam:function(t,i,n){var r,s=e.trim,l=a(this.settings[t])?this.settings[t]:i;return"hash"===n?(r={},a(l,"string")?o(l.indexOf("=")>0?l.split(/[;,](?![^=;,]*(?:[;,]|$))/):l.split(","),function(e){e=e.split("="),r[s(e[0])]=e.length>1?s(e[1]):s(e)}):r=l,r):l},nodeChanged:function(e){var t,i=this,n=i.selection;i.initialized&&(e=e||{},t=n.getStart()||i.getBody(),t=s&&t.ownerDocument!=i.getDoc()?i.getBody():t,e.parents=[],i.dom.getParent(t,function(t){return"BODY"==t.nodeName?!0:(e.parents.push(t),void 0)}),i.onNodeChange.dispatch(i,e?e.controlManager||i.controlManager:i.controlManager,t,n.isCollapsed(),e))},addButton:function(e,t){var i=this;i.buttons=i.buttons||{},i.buttons[e]=t},addCommand:function(e,t,i){this.execCommands[e]={func:t,scope:i||this}},addQueryStateHandler:function(e,t,i){this.queryStateCommands[e]={func:t,scope:i||this}},addQueryValueHandler:function(e,t,i){this.queryValueCommands[e]={func:t,scope:i||this}},addShortcut:function(e,t,i,n){var r,s=this;return s.settings.custom_shortcuts===!1?!1:(s.shortcuts=s.shortcuts||{},a(i,"string")&&(r=i,i=function(){s.execCommand(r,!1,null)}),a(i,"object")&&(r=i,i=function(){s.execCommand(r[0],r[1],r[2])}),o(u(e),function(e){var r={func:i,scope:n||this,desc:s.translate(t),alt:!1,ctrl:!1,shift:!1};o(u(e,"+"),function(e){switch(e){case"alt":case"ctrl":case"shift":r[e]=!0;break;default:r.charCode=e.charCodeAt(0),r.keyCode=e.toUpperCase().charCodeAt(0)}}),s.shortcuts[(r.ctrl?"ctrl":"")+","+(r.alt?"alt":"")+","+(r.shift?"shift":"")+","+r.keyCode]=r}),!0)},execCommand:function(e,t,i,r){var s,a,l=this,c=0;return/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(e)||r&&r.skip_focus||l.focus(),r=n({},r),l.onBeforeExecCommand.dispatch(l,e,t,i,r),r.terminate?!1:l.execCallback("execcommand_callback",l.id,l.selection.getNode(),e,t,i)?(l.onExecCommand.dispatch(l,e,t,i,r),!0):(s=l.execCommands[e])&&(a=s.func.call(s.scope,t,i),a!==!0)?(l.onExecCommand.dispatch(l,e,t,i,r),a):(o(l.plugins,function(n){return n.execCommand&&n.execCommand(e,t,i)?(l.onExecCommand.dispatch(l,e,t,i,r),c=1,!1):void 0}),c?!0:l.theme&&l.theme.execCommand&&l.theme.execCommand(e,t,i)?(l.onExecCommand.dispatch(l,e,t,i,r),!0):l.editorCommands.execCommand(e,t,i)?(l.onExecCommand.dispatch(l,e,t,i,r),!0):(l.getDoc().execCommand(e,t,i),l.onExecCommand.dispatch(l,e,t,i,r),void 0))},queryCommandState:function(e){var t,i,n=this;if(!n._isHidden()){if((t=n.queryStateCommands[e])&&(i=t.func.call(t.scope),i!==!0))return i;if(t=n.editorCommands.queryCommandState(e),-1!==t)return t;try{return this.getDoc().queryCommandState(e)}catch(o){}}},queryCommandValue:function(e){var t,i,n=this;if(!n._isHidden()){if((t=n.queryValueCommands[e])&&(i=t.func.call(t.scope),i!==!0))return i;if(t=n.editorCommands.queryCommandValue(e),a(t))return t;try{return this.getDoc().queryCommandValue(e)}catch(o){}}},show:function(){var e=this;t.show(e.getContainer()),t.hide(e.id),e.load()},hide:function(){var e=this,i=e.getDoc();s&&i&&i.execCommand("SelectAll"),e.save(),t.hide(e.getContainer()),t.setStyle(e.id,"display",e.orgDisplay)},isHidden:function(){return!t.isHidden(this.id)},setProgressState:function(e,t,i){return this.onSetProgressState.dispatch(this,e,t,i),e},load:function(e){var t,i=this,n=i.getElement();return n?(e=e||{},e.load=!0,t=i.setContent(a(n.value)?n.value:n.innerHTML,e),e.element=n,e.no_events||i.onLoadContent.dispatch(i,e),e.element=n=null,t):void 0},save:function(e){var i,n,r=this,s=r.getElement();if(s&&r.initialized)return e=e||{},e.save=!0,e.element=s,i=e.content=r.getContent(e),e.no_events||r.onSaveContent.dispatch(r,e),i=e.content,/TEXTAREA|INPUT/i.test(s.nodeName)?s.value=i:(s.innerHTML=i,(n=t.getParent(r.id,"form"))&&o(n.elements,function(e){return e.name==r.id?(e.value=i,!1):void 0})),e.element=s=null,i},setContent:function(t,i){var n,o=this,r=o.getBody();return i=i||{},i.format=i.format||"html",i.set=!0,i.content=t,i.no_events||o.onBeforeSetContent.dispatch(o,i),t=i.content,e.isIE||0!==t.length&&!/^\s+$/.test(t)?("raw"!==i.format&&(t=new e.html.Serializer({},o.schema).serialize(o.parser.parse(t))),i.content=e.trim(t),o.dom.setHTML(r,i.content),i.no_events||o.onSetContent.dispatch(o,i),o.settings.content_editable&&document.activeElement!==o.getBody()||o.selection.normalize(),i.content):(n=o.settings.forced_root_block,t=n?"<"+n+'><br data-mce-bogus="1"></'+n+">":'<br data-mce-bogus="1">',r.innerHTML=t,o.selection.select(r,!0),o.selection.collapse(!0),void 0)},getContent:function(t){var i,n=this,o=n.getBody();return t=t||{},t.format=t.format||"html",t.get=!0,t.getInner=!0,t.no_events||n.onBeforeGetContent.dispatch(n,t),i="raw"==t.format?o.innerHTML:"text"==t.format?o.innerText||o.textContent:n.serializer.serialize(o,t),t.content="text"!=t.format?e.trim(i):i,t.no_events||n.onGetContent.dispatch(n,t),t.content},isDirty:function(){var t=this;return e.trim(t.startContent)!=e.trim(t.getContent({format:"raw",no_events:1}))&&!t.isNotDirty},getContainer:function(){var e=this;return e.container||(e.container=t.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return t.get(this.settings.content_element||this.id)},getWin:function(){var e,i=this;return i.contentWindow||(e=t.get(i.id+"_ifr"),e&&(i.contentWindow=e.contentWindow)),i.contentWindow},getDoc:function(){var e,t=this;return t.contentDocument||(e=t.getWin(),e&&(t.contentDocument=e.document)),t.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,i){var n=this,o=n.settings;return o.urlconverter_callback?n.execCallback("urlconverter_callback",e,i,!0,t):!o.convert_urls||i&&"LINK"==i.nodeName||0===e.indexOf("file:")?e:o.relative_urls?n.documentBaseURI.toRelative(e):e=n.documentBaseURI.toAbsolute(e,o.remove_script_host)},addVisual:function(e){var t,i=this,n=i.settings,r=i.dom;e=e||i.getBody(),a(i.hasVisual)||(i.hasVisual=n.visual),o(r.select("table,a",e),function(e){var o;switch(e.nodeName){case"TABLE":return t=n.visual_table_class||"mceItemTable",o=r.getAttrib(e,"border"),o&&"0"!=o||(i.hasVisual?r.addClass(e,t):r.removeClass(e,t)),void 0;case"A":return r.getAttrib(e,"href",!1)||(o=r.getAttrib(e,"name")||e.id,t="mceItemAnchor",o&&(i.hasVisual?r.addClass(e,t):r.removeClass(e,t))),void 0}}),i.onVisualAid.dispatch(i,e,i.hasVisual)},remove:function(){var n=this,o=n.getContainer(),r=n.getDoc();n.removed||(n.removed=1,s&&r&&r.execCommand("SelectAll"),n.save(),t.setStyle(n.id,"display",n.orgDisplay),n.settings.content_editable||(i.unbind(n.getWin()),i.unbind(n.getDoc())),i.unbind(n.getBody()),i.clear(o),n.execCallback("remove_instance_callback",n),n.onRemove.dispatch(n),n.onExecCommand.listeners=[],e.remove(n),t.remove(o))},destroy:function(t){var n=this;n.destroyed||(r&&(i.unbind(n.getDoc()),i.unbind(n.getWin()),i.unbind(n.getBody())),t||(e.removeUnload(n.destroy),tinyMCE.onBeforeUnload.remove(n._beforeUnload),n.theme&&n.theme.destroy&&n.theme.destroy(),n.controlManager.destroy(),n.selection.destroy(),n.dom.destroy()),n.formElement&&(n.formElement.submit=n.formElement._mceOldSubmit,n.formElement._mceOldSubmit=null),n.contentAreaContainer=n.formElement=n.container=n.settings.content_element=n.bodyElement=n.contentDocument=n.contentWindow=null,n.selection&&(n.selection=n.selection.win=n.selection.dom=n.selection.dom.doc=null),n.destroyed=1)},_refreshContentEditable:function(){var e,t,i=this;i._isHidden()&&(e=i.getBody(),t=e.parentNode,t.removeChild(e),t.appendChild(e),e.focus())},_isHidden:function(){var e;return r?(e=this.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}})}(tinymce),function(e){var t=e.each;e.Editor.prototype.setupEvents=function(){var i=this,n=i.settings;t(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(t){i[t]=new e.util.Dispatcher(i)}),n.cleanup_callback&&(i.onBeforeSetContent.add(function(e,t){t.content=e.execCallback("cleanup_callback","insert_to_editor",t.content,t)}),i.onPreProcess.add(function(e,t){t.set&&e.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t),t.get&&e.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}),i.onPostProcess.add(function(e,t){t.set&&(t.content=e.execCallback("cleanup_callback","insert_to_editor",t.content,t)),t.get&&(t.content=e.execCallback("cleanup_callback","get_from_editor",t.content,t))})),n.save_callback&&i.onGetContent.add(function(e,t){t.save&&(t.content=e.execCallback("save_callback",e.id,t.content,e.getBody()))}),n.handle_event_callback&&i.onEvent.add(function(e,t,n){i.execCallback("handle_event_callback",t,e,n)===!1&&(t.preventDefault(),t.stopPropagation())}),n.handle_node_change_callback&&i.onNodeChange.add(function(e,t,i){e.execCallback("handle_node_change_callback",e.id,i,-1,-1,!0,e.selection.isCollapsed())}),n.save_callback&&i.onSaveContent.add(function(e,t){var i=e.execCallback("save_callback",e.id,t.content,e.getBody());i&&(t.content=i)}),n.onchange_callback&&i.onChange.add(function(e,t){e.execCallback("onchange_callback",e,t)})},e.Editor.prototype.bindNativeEvents=function(){function i(e,t){e.type;a.removed||a.onEvent.dispatch(a,e,t)!==!1&&a[s[e.fakeType||e.type]].dispatch(a,e,t)}function n(){a.focus(!0)}function o(t,i){65==i.keyCode&&e.VK.metaKeyPressed(i)||a.selection.normalize(),a.nodeChanged()}function r(i,n){(i.altKey||i.ctrlKey||i.metaKey)&&t(a.shortcuts,function(t){var o=e.isMac?i.metaKey:i.ctrlKey;if(t.ctrl==o&&t.alt==i.altKey&&t.shift==i.shiftKey)return i.keyCode==t.keyCode||i.charCode&&i.charCode==t.charCode?(i.preventDefault(),n&&t.func.call(t.scope),!0):void 0})}var s,a=this,l=a.settings,c=a.dom;s={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"},t(s,function(t,n){var o=l.content_editable?a.getBody():a.getDoc();switch(n){case"contextmenu":c.bind(o,n,i);break;case"paste":c.bind(a.getBody(),n,i);break;case"submit":case"reset":c.bind(a.getElement().form||e.DOM.getParent(a.id,"form"),n,i);break;default:c.bind(o,n,i)}}),c.bind(l.content_editable?a.getBody():e.isGecko?a.getDoc():a.getWin(),"focus",function(){a.focus(!0)}),l.content_editable&&e.isOpera&&(c.bind(a.getBody(),"click",n),c.bind(a.getBody(),"keydown",n)),a.onMouseUp.add(o),a.onKeyUp.add(function(t,i){var n=i.keyCode;(n>=33&&36>=n||n>=37&&40>=n||13==n||45==n||46==n||8==n||e.isMac&&(91==n||93==n)||i.ctrlKey)&&o(t,i)}),a.onReset.add(function(){a.setContent(a.startContent,{format:"raw"})}),a.onKeyUp.add(function(e,t){r(t)}),a.onKeyPress.add(function(e,t){r(t)}),a.onKeyDown.add(function(e,t){r(t,!0)}),e.isOpera&&a.onClick.add(function(e,t){t.preventDefault()})}}(tinymce),function(e){var t,i=e.each,n=!0,o=!1;e.EditorCommands=function(r){function s(e,t,i){var r;return e=e.toLowerCase(),(r=b.exec[e])?(r(e,t,i),n):o}function a(e){var t;return e=e.toLowerCase(),(t=b.state[e])?t(e):-1}function l(e){var t;return e=e.toLowerCase(),(t=b.value[e])?t(e):o}function c(e,t){t=t||"exec",i(e,function(e,n){i(n.toLowerCase().split(","),function(i){b[t][i]=e})})}function u(e,i,n){return i===t&&(i=o),n===t&&(n=null),r.getDoc().execCommand(e,i,n)}function d(e){return _.match(e)}function h(e,i){_.toggle(e,i?{value:i}:t)}function p(e){m=v.getBookmark(e)}function f(){v.moveToBookmark(m)}var m,g=r.dom,v=r.selection,b={state:{},exec:{},value:{}},y=r.settings,_=r.formatter;e.extend(this,{execCommand:s,queryCommandState:a,queryCommandValue:l,addCommands:c}),c({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){r.undoManager.add()},"Cut,Copy,Paste":function(t){var i,o=r.getDoc();try{u(t)}catch(s){i=n}(i||!o.queryCommandSupported(t))&&(e.isGecko?r.windowManager.confirm(r.getLang("clipboard_msg"),function(e){e&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):r.windowManager.alert(r.getLang("clipboard_no_support")))},unlink:function(e){v.isCollapsed()&&v.select(v.getNode()),u(e),v.collapse(o)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t=e.substring(7);i("left,center,right,full".split(","),function(e){t!=e&&_.remove("align"+e)}),h("align"+t),s("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(e){var t,i;u(e),t=g.getParent(v.getNode(),"ol,ul"),t&&(i=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(i.nodeName)&&(p(),g.split(i,t),f()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){h(e)},"ForeColor,HiliteColor,FontName":function(e,t,i){h(e,i)},FontSize:function(t,i,n){var o,r;n>=1&&7>=n&&(r=e.explode(y.font_size_style_values),o=e.explode(y.font_size_classes),n=o?o[n-1]||n:r[n-1]||n),h(t,n)},RemoveFormat:function(e){_.remove(e)},mceBlockQuote:function(){h("blockquote")},FormatBlock:function(e,t,i){return h(i||"p")},mceCleanup:function(){var e=v.getBookmark();r.setContent(r.getContent({cleanup:n}),{cleanup:n}),v.moveToBookmark(e)},mceRemoveNode:function(e,t,i){var o=i||v.getNode();o!=r.getBody()&&(p(),r.dom.remove(o,n),f())},mceSelectNodeDepth:function(e,t,i){var n=0;g.getParent(v.getNode(),function(e){return 1==e.nodeType&&n++==i?(v.select(e),o):void 0},r.getBody())},mceSelectNode:function(e,t,i){v.select(i)},mceInsertContent:function(t,i,n){var o,s,a,l,c,u,d,h,p,f,m,b,y,_;if(o=r.parser,s=new e.html.Serializer({},r.schema),y='<span id="mce_marker" data-mce-type="bookmark"></span>',u={content:n,format:"html"},v.onBeforeSetContent.dispatch(v,u),n=u.content,-1==n.indexOf("{$caret}")&&(n+="{$caret}"),n=n.replace(/\{\$caret\}/,y),v.isCollapsed()||r.getDoc().execCommand("Delete",!1,null),a=v.getNode(),u={context:a.nodeName.toLowerCase()},c=o.parse(n,u),m=c.lastChild,"mce_marker"==m.attr("id"))for(d=m,m=m.prev;m;m=m.walk(!0))if(3==m.type||!g.isBlock(m.name)){m.parent.insert(d,m,"br"===m.name);break}if(u.invalid){for(v.setContent(y),a=v.getNode(),l=r.getBody(),9==a.nodeType?a=m=l:m=a;m!==l;)a=m,m=m.parentNode;n=a==l?l.innerHTML:g.getOuterHTML(a),n=s.serialize(o.parse(n.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return s.serialize(c)}))),a==l?g.setHTML(l,n):g.setOuterHTML(a,n)}else n=s.serialize(c),m=a.firstChild,b=a.lastChild,!m||m===b&&"BR"===m.nodeName?g.setHTML(a,n):v.setContent(n);d=g.get("mce_marker"),h=g.getRect(d),p=g.getViewPort(r.getWin()),(h.y+h.h>p.y+p.h||h.y<p.y||h.x>p.x+p.w||h.x<p.x)&&(_=e.isIE?r.getDoc().documentElement:r.getBody(),_.scrollLeft=h.x,_.scrollTop=h.y-p.h+25),f=g.createRng(),m=d.previousSibling,m&&3==m.nodeType?f.setStart(m,m.nodeValue.length):(f.setStartBefore(d),f.setEndBefore(d)),g.remove(d),v.setRng(f),v.onSetContent.dispatch(v,u),r.addVisual()},mceInsertRawHTML:function(e,t,i){v.setContent("tiny_mce_marker"),r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return i}))},mceToggleFormat:function(e,t,i){h(i)},mceSetContent:function(e,t,i){r.setContent(i)},"Indent,Outdent":function(e){var t,n,o;t=y.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t),a("InsertUnorderedList")||a("InsertOrderedList")?u(e):(y.forced_root_block||g.getParent(v.getNode(),g.isBlock)||_.apply("div"),i(v.getSelectedBlocks(),function(i){"outdent"==e?(o=Math.max(0,parseInt(i.style.paddingLeft||0)-t),g.setStyle(i,"paddingLeft",o?o+n:"")):g.setStyle(i,"paddingLeft",parseInt(i.style.paddingLeft||0)+t+n)}))},mceRepaint:function(){if(e.isGecko)try{p(n),v.getSel()&&v.getSel().selectAllChildren(r.getBody()),v.collapse(n),f()}catch(t){}},mceToggleFormat:function(e,t,i){_.toggle(i)},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual,r.addVisual()},mceReplaceContent:function(e,t,i){r.execCommand("mceInsertContent",!1,i.replace(/\{\$selection\}/g,v.getContent({format:"text"})))},mceInsertLink:function(e,t,i){var n;"string"==typeof i&&(i={href:i}),n=g.getParent(v.getNode(),"a"),i.href=i.href.replace(" ","%20"),n&&i.href||_.remove("link"),i.href&&_.apply("link",i,n)
85
+ },selectAll:function(){var e=g.getRoot(),t=g.createRng();v.getRng().setStart?(t.setStart(e,0),t.setEnd(e,e.childNodes.length),v.setRng(t)):u("SelectAll")}}),c({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(t){var i="align"+t.substring(7),o=v.isCollapsed()?[g.getParent(v.getNode(),g.isBlock)]:v.getSelectedBlocks(),r=e.map(o,function(e){return!!_.matchNode(e,i)});return-1!==e.inArray(r,n)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return d(e)},mceBlockQuote:function(){return d("blockquote")},Outdent:function(){var e;if(y.inline_styles){if((e=g.getParent(v.getStart(),g.isBlock))&&parseInt(e.style.paddingLeft)>0)return n;if((e=g.getParent(v.getEnd(),g.isBlock))&&parseInt(e.style.paddingLeft)>0)return n}return a("InsertUnorderedList")||a("InsertOrderedList")||!y.inline_styles&&!!g.getParent(v.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=g.getParent(v.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),c({"FontSize,FontName":function(e){var t,i=0;return(t=g.getParent(v.getNode(),"span"))&&(i="fontsize"==e?t.style.fontSize:t.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),i}},"value"),c({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}}(tinymce),function(e){var t=e.util.Dispatcher;e.UndoManager=function(i){function n(){return e.trim(i.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function o(){r.typing=!1,r.add()}var r,s,a,l,c,u=0,d=[];return onBeforeAdd=new t(r),a=new t(r),l=new t(r),c=new t(r),a.add(function(e,t){return e.hasUndo()?i.onChange.dispatch(i,t,e):void 0}),l.add(function(e,t){return i.onUndo.dispatch(i,t,e)}),c.add(function(e,t){return i.onRedo.dispatch(i,t,e)}),i.onInit.add(function(){r.add()}),i.onBeforeExecCommand.add(function(e,t,i,n,o){"Undo"==t||"Redo"==t||"mceRepaint"==t||o&&o.skip_undo||r.beforeChange()}),i.onExecCommand.add(function(e,t,i,n,o){"Undo"==t||"Redo"==t||"mceRepaint"==t||o&&o.skip_undo||r.add()}),i.onSaveContent.add(o),i.dom.bind(i.dom.getRoot(),"dragend",o),i.dom.bind(i.getBody(),"focusout",function(){!i.removed&&r.typing&&o()}),i.onKeyUp.add(function(e,t){var i=t.keyCode;(i>=33&&36>=i||i>=37&&40>=i||45==i||13==i||t.ctrlKey)&&o()}),i.onKeyDown.add(function(e,t){var i=t.keyCode;return i>=33&&36>=i||i>=37&&40>=i||45==i?(r.typing&&o(),void 0):((16>i||i>20)&&224!=i&&91!=i&&!r.typing&&(r.beforeChange(),r.typing=!0,r.add()),void 0)}),i.onMouseDown.add(function(){r.typing&&o()}),i.addShortcut("ctrl+z","undo_desc","Undo"),i.addShortcut("ctrl+y","redo_desc","Redo"),r={data:d,typing:!1,onBeforeAdd:onBeforeAdd,onAdd:a,onUndo:l,onRedo:c,beforeChange:function(){s=i.selection.getBookmark(2,!0)},add:function(e){var t,o,a=i.settings;if(e=e||{},e.content=n(),r.onBeforeAdd.dispatch(r,e),o=d[u],o&&o.content==e.content)return null;if(d[u]&&(d[u].beforeBookmark=s),a.custom_undo_redo_levels&&d.length>a.custom_undo_redo_levels){for(t=0;t<d.length-1;t++)d[t]=d[t+1];d.length--,u=d.length}return e.bookmark=i.selection.getBookmark(2,!0),u<d.length-1&&(d.length=u+1),d.push(e),u=d.length-1,r.onAdd.dispatch(r,e),i.isNotDirty=0,e},undo:function(){var e;return r.typing&&(r.add(),r.typing=!1),u>0&&(e=d[--u],i.setContent(e.content,{format:"raw"}),i.selection.moveToBookmark(e.beforeBookmark),r.onUndo.dispatch(r,e)),e},redo:function(){var e;return u<d.length-1&&(e=d[++u],i.setContent(e.content,{format:"raw"}),i.selection.moveToBookmark(e.bookmark),r.onRedo.dispatch(r,e)),e},clear:function(){d=[],u=0,r.typing=!1},hasUndo:function(){return u>0||this.typing},hasRedo:function(){return u<d.length-1&&!this.typing}}}}(tinymce),tinymce.ForceBlocks=function(e){function t(){var t,s,a,l,c,u,d,h,p,f=o.getStart(),m=e.getBody(),g=-16777215;if(f&&1===f.nodeType&&i.forced_root_block){for(;f&&f!=m;){if(r[f.nodeName])return;f=f.parentNode}for(t=o.getRng(),t.setStart?(s=t.startContainer,a=t.startOffset,l=t.endContainer,c=t.endOffset):(t.item&&(f=t.item(0),t=e.getDoc().body.createTextRange(),t.moveToElementText(f)),p=t.parentElement().ownerDocument===e.getDoc(),tmpRng=t.duplicate(),tmpRng.collapse(!0),a=-1*tmpRng.move("character",g),tmpRng.collapsed||(tmpRng=t.duplicate(),tmpRng.collapse(!1),c=-1*tmpRng.move("character",g)-a)),f=m.firstChild;f;)if(3===f.nodeType||1==f.nodeType&&!r[f.nodeName]){if(3===f.nodeType&&0==f.nodeValue.length){d=f,f=f.nextSibling,n.remove(d);continue}u||(u=n.create(i.forced_root_block),f.parentNode.insertBefore(u,f),h=!0),d=f,f=f.nextSibling,u.appendChild(d)}else u=null,f=f.nextSibling;if(h){if(t.setStart)t.setStart(s,a),t.setEnd(l,c),o.setRng(t);else if(p)try{t=e.getDoc().body.createTextRange(),t.moveToElementText(m),t.collapse(!0),t.moveStart("character",a),c>0&&t.moveEnd("character",c),t.select()}catch(v){}e.nodeChanged()}}}var i=e.settings,n=e.dom,o=e.selection,r=e.schema.getBlockElements();i.forced_root_block&&(e.onKeyUp.add(t),e.onNodeChange.add(t))},function(e){var t=(e.DOM,e.dom.Event),i=e.each,n=e.extend;e.create("tinymce.ControlManager",{ControlManager:function(t,n){var o=this;n=n||{},o.editor=t,o.controls={},o.onAdd=new e.util.Dispatcher(o),o.onPostRender=new e.util.Dispatcher(o),o.prefix=n.prefix||t.id+"_",o._cls={},o.onPostRender.add(function(){i(o.controls,function(e){e.postRender()})})},get:function(e){return this.controls[this.prefix+e]||this.controls[e]},setActive:function(e,t){var i=null;return(i=this.get(e))&&i.setActive(t),i},setDisabled:function(e,t){var i=null;return(i=this.get(e))&&i.setDisabled(t),i},add:function(e){var t=this;return e&&(t.controls[e.id]=e,t.onAdd.dispatch(e,t)),e},createControl:function(e){var t,n,o,r,s=this,a=s.editor;for(s.controlFactories||(s.controlFactories=[],i(a.plugins,function(e){e.createControl&&s.controlFactories.push(e)})),r=s.controlFactories,n=0,o=r.length;o>n;n++)if(t=r[n].createControl(e,s))return s.add(t);return"|"===e||"separator"===e?s.createSeparator():a.buttons&&(t=a.buttons[e])?s.createButton(e,t):s.add(t)},createDropMenu:function(t,i,o){var r,s,a,l,c=this,u=c.editor;return i=n({"class":"mceDropDown",constrain:u.settings.constrain_menus},i),i["class"]=i["class"]+" "+u.getParam("skin")+"Skin",(a=u.getParam("skin_variant"))&&(i["class"]+=" "+u.getParam("skin")+"Skin"+a.substring(0,1).toUpperCase()+a.substring(1)),i["class"]+="rtl"==u.settings.directionality?" mceRtl":"",t=c.prefix+t,l=o||c._cls.dropmenu||e.ui.DropMenu,r=c.controls[t]=new l(t,i),r.onAddItem.add(function(e,t){var i=t.settings;i.title=u.getLang(i.title,i.title),i.onclick||(i.onclick=function(){i.cmd&&u.execCommand(i.cmd,i.ui||!1,i.value)})}),u.onRemove.add(function(){r.destroy()}),e.isIE&&(r.onShowMenu.add(function(){u.focus(),s=u.selection.getBookmark(1)}),r.onHideMenu.add(function(){s&&(u.selection.moveToBookmark(s),s=0)})),c.add(r)},createListBox:function(i,o,r){function s(t){return t.settings.use_accessible_selects&&!e.isGecko}var a,l,c=this,u=c.editor;return c.get(i)?null:(o.title=u.translate(o.title),o.scope=o.scope||u,o.onselect||(o.onselect=function(e){u.execCommand(o.cmd,o.ui||!1,e||o.value)}),o=n({title:o.title,"class":"mce_"+i,scope:o.scope,control_manager:c},o),i=c.prefix+i,u.settings.use_native_selects||s(u)?a=new e.ui.NativeListBox(i,o):(l=r||c._cls.listbox||e.ui.ListBox,a=new l(i,o,u)),c.controls[i]=a,e.isWebKit&&a.onPostRender.add(function(e,i){t.add(i,"mousedown",function(){u.bookmark=u.selection.getBookmark(1)}),t.add(i,"focus",function(){u.selection.moveToBookmark(u.bookmark),u.bookmark=null})}),a.hideMenu&&u.onMouseDown.add(a.hideMenu,a),c.add(a))},createButton:function(t,i,o){var r,s,a=this,l=a.editor;return a.get(t)?null:(i.title=l.translate(i.title),i.label=l.translate(i.label),i.scope=i.scope||l,i.onclick||i.menu_button||(i.onclick=function(){l.execCommand(i.cmd,i.ui||!1,i.value)}),i=n({title:i.title,"class":"mce_"+t,unavailable_prefix:l.getLang("unavailable",""),scope:i.scope,control_manager:a},i),t=a.prefix+t,i.menu_button?(s=o||a._cls.menubutton||e.ui.MenuButton,r=new s(t,i,l),l.onMouseDown.add(r.hideMenu,r)):(s=a._cls.button||e.ui.Button,r=new s(t,i,l)),a.add(r))},createMenuButton:function(e,t,i){return t=t||{},t.menu_button=1,this.createButton(e,t,i)},createSplitButton:function(t,i,o){var r,s,a=this,l=a.editor;return a.get(t)?null:(i.title=l.translate(i.title),i.scope=i.scope||l,i.onclick||(i.onclick=function(e){l.execCommand(i.cmd,i.ui||!1,e||i.value)}),i.onselect||(i.onselect=function(e){l.execCommand(i.cmd,i.ui||!1,e||i.value)}),i=n({title:i.title,"class":"mce_"+t,scope:i.scope,control_manager:a},i),t=a.prefix+t,s=o||a._cls.splitbutton||e.ui.SplitButton,r=a.add(new s(t,i,l)),l.onMouseDown.add(r.hideMenu,r),r)},createColorSplitButton:function(t,i,o){var r,s,a,l=this,c=l.editor;return l.get(t)?null:(i.title=c.translate(i.title),i.scope=i.scope||c,i.onclick||(i.onclick=function(t){e.isIE&&(a=c.selection.getBookmark(1)),c.execCommand(i.cmd,i.ui||!1,t||i.value)}),i.onselect||(i.onselect=function(e){c.execCommand(i.cmd,i.ui||!1,e||i.value)}),i=n({title:i.title,"class":"mce_"+t,menu_class:c.getParam("skin")+"Skin",scope:i.scope,more_colors_title:c.getLang("more_colors")},i),t=l.prefix+t,s=o||l._cls.colorsplitbutton||e.ui.ColorSplitButton,r=new s(t,i,c),c.onMouseDown.add(r.hideMenu,r),c.onRemove.add(function(){r.destroy()}),e.isIE&&(r.onShowMenu.add(function(){c.focus(),a=c.selection.getBookmark(1)}),r.onHideMenu.add(function(){a&&(c.selection.moveToBookmark(a),a=0)})),l.add(r))},createToolbar:function(t,i,n){var o,r,s=this;return t=s.prefix+t,r=n||s._cls.toolbar||e.ui.Toolbar,o=new r(t,i,s.editor),s.get(t)?null:s.add(o)},createToolbarGroup:function(t,i,n){var o,r,s=this;return t=s.prefix+t,r=n||this._cls.toolbarGroup||e.ui.ToolbarGroup,o=new r(t,i,s.editor),s.get(t)?null:s.add(o)},createSeparator:function(t){var i=t||this._cls.separator||e.ui.Separator;return new i},setControlType:function(e,t){return this._cls[e.toLowerCase()]=t},destroy:function(){i(this.controls,function(e){e.destroy()}),this.controls=null}})}(tinymce),function(e){var t=e.util.Dispatcher,i=e.each,n=e.isIE,o=e.isOpera;e.create("tinymce.WindowManager",{WindowManager:function(e){var i=this;i.editor=e,i.onOpen=new t(i),i.onClose=new t(i),i.params={},i.features={}},open:function(t,r){var s,a,l,c,u=this,d="",h="modal"==u.editor.settings.dialog_type,p=e.DOM.getViewPort();t=t||{},r=r||{},a=o?p.w:screen.width,l=o?p.h:screen.height,t.name=t.name||"mc_"+(new Date).getTime(),t.width=parseInt(t.width||320),t.height=parseInt(t.height||240),t.resizable=!0,t.left=t.left||parseInt(a/2)-t.width/2,t.top=t.top||parseInt(l/2)-t.height/2,r.inline=!1,r.mce_width=t.width,r.mce_height=t.height,r.mce_auto_focus=t.auto_focus,h&&n&&(t.center=!0,t.help=!1,t.dialogWidth=t.width+"px",t.dialogHeight=t.height+"px",t.scroll=t.scrollbars||!1),i(t,function(t,i){e.is(t,"boolean")&&(t=t?"yes":"no"),/^(name|url)$/.test(i)||(d+=n&&h?(d?";":"")+i+":"+t:(d?",":"")+i+"="+t)}),u.features=t,u.params=r,u.onOpen.dispatch(u,t,r),c=t.url||t.file,c=e._addVer(c);try{n&&h?(s=1,window.showModalDialog(c,window,d)):s=window.open(c,t.name,d)}catch(f){}s||alert(u.editor.getLang("popup_blocked"))},close:function(e){e.close(),this.onClose.dispatch(this)},createInstance:function(t,i,n,o,r,s){var a=e.resolve(t);return new a(i,n,o,r,s)},confirm:function(e,t,i,n){n=n||window,t.call(i||this,n.confirm(this._decode(this.editor.getLang(e,e))))},alert:function(e,t,i,n){var o=this;n=n||window,n.alert(o._decode(o.editor.getLang(e,e))),t&&t.call(i||o)},resizeBy:function(e,t,i){i.resizeBy(e,t)},_decode:function(t){return e.DOM.decode(t).replace(/\\n/g,"\n")}})}(tinymce),function(e){e.Formatter=function(t){function i(e){return e.nodeType&&(e=e.nodeName),!!t.schema.getTextBlockElements()[e.toLowerCase()]}function n(e,t){return R.getParents(e,t,R.getRoot())}function o(e){return 1===e.nodeType&&"_mce_caret"===e.id}function r(){l({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:!1},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:!1},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,i){B(i,function(t,i){R.setAttrib(e,i,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),B("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(e){l(e,{block:e,remove:"all"})}),l(t.settings.formats)}function s(){t.addShortcut("ctrl+b","bold_desc","Bold"),t.addShortcut("ctrl+i","italic_desc","Italic"),t.addShortcut("ctrl+u","underline_desc","Underline");for(var e=1;6>=e;e++)t.addShortcut("ctrl+"+e,"",["FormatBlock",!1,"h"+e]);t.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]),t.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),t.addShortcut("ctrl+9","",["FormatBlock",!1,"address"])}function a(e){return e?H[e]:H}function l(e,t){e&&("string"!=typeof e?B(e,function(e,t){l(t,e)}):(t=t.length?t:[t],B(t,function(e){e.deep===I&&(e.deep=!e.selector),e.split===I&&(e.split=!e.selector||e.inline),e.remove===I&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),H[e]=t))}function c(n,r,s){function l(e,t){t=t||y,e&&(t.onformat&&t.onformat(e,t,r,s),B(t.styles,function(t,i){R.setStyle(e,i,_(t,r))}),B(t.attributes,function(t,i){R.setAttrib(e,i,_(t,r))}),B(t.classes,function(t){t=_(t,r),R.hasClass(e,t)||R.addClass(e,t)}))}function u(){function e(e,t){var i=new L(t);for(s=i.current();s;s=i.prev())if(s.childNodes.length>1||s==e||"BR"==s.tagName)return s}var i=t.selection.getRng(),n=i.startContainer,o=i.endContainer;if(n!=o&&0===i.endOffset){var r=e(n,o),a=3==r.nodeType?r.length:r.childNodes.length;i.setEnd(r,a)}return i}function d(t,i,n,o,r){var s,a,l=[],c=-1,u=-1,d=-1;return B(t.childNodes,function(e,t){return"UL"===e.nodeName||"OL"===e.nodeName?(c=t,s=e,!1):void 0}),B(t.childNodes,function(e,t){"SPAN"===e.nodeName&&"bookmark"==R.getAttrib(e,"data-mce-type")&&(e.id==i.id+"_start"?u=t:e.id==i.id+"_end"&&(d=t))}),0>=c||c>u&&d>c?(B(e.grep(t.childNodes),r),0):(a=R.clone(n,V),B(e.grep(t.childNodes),function(e,t){(c>u&&c>t||u>c&&t>c)&&(l.push(e),e.parentNode.removeChild(e))}),c>u?t.insertBefore(a,s):u>c&&t.insertBefore(a,s.nextSibling),o.push(a),B(l,function(e){a.appendChild(e)}),a)}function p(t,s,a){var c,u,p=[],f=!0;c=y.inline||y.block,u=R.create(c),l(u),j.walk(t,function(t){function m(t){var _,C,w,k,T;return T=f,_=t.nodeName.toLowerCase(),C=t.parentNode.nodeName.toLowerCase(),1===t.nodeType&&Y(t)&&(T=f,f="true"===Y(t),k=!0),b(_,"br")?(v=0,y.block&&R.remove(t),void 0):y.wrapper&&h(t,n,r)?(v=0,void 0):f&&!k&&y.block&&!y.wrapper&&i(_)?(t=R.rename(t,c),l(t),p.push(t),v=0,void 0):y.selector&&(B(g,function(e){"collapsed"in e&&e.collapsed!==x||R.is(t,e.selector)&&!o(t)&&(l(t,e),w=!0)}),!y.inline||w)?(v=0,void 0):(!f||k||!F(c,_)||!F(C,c)||!a&&3===t.nodeType&&1===t.nodeValue.length&&65279===t.nodeValue.charCodeAt(0)||o(t)||y.inline&&z(t)?"li"==_&&s?v=d(t,s,u,p,m):(v=0,B(e.grep(t.childNodes),m),k&&(f=T),v=0):(v||(v=R.clone(u,V),t.parentNode.insertBefore(v,t),p.push(v)),v.appendChild(t)),void 0)}var v;B(t,m)}),y.wrap_links===!1&&B(p,function(t){function i(t){var n,o,r;if("A"===t.nodeName){for(o=R.clone(u,V),p.push(o),r=e.grep(t.childNodes),n=0;n<r.length;n++)o.appendChild(r[n]);t.appendChild(o)}B(e.grep(t.childNodes),i)}i(t)}),B(p,function(e){function t(e){var t=0;return B(e.childNodes,function(e){C(e)||S(e)||t++}),t}function i(e){var t,i;return B(e.childNodes,function(e){return 1!=e.nodeType||S(e)||o(e)?void 0:(t=e,V)}),t&&v(t,y)&&(i=R.clone(t,V),l(i),R.replace(i,e,K),R.remove(t,1)),i||e}var s;if(s=t(e),(p.length>1||!z(e))&&0===s)return R.remove(e,1),void 0;if(y.inline||y.wrapper){if(y.exact||1!==s||(e=i(e)),B(g,function(t){B(R.select(t.inline,e),function(e){var i;if(t.wrap_links===!1){i=e.parentNode;do if("A"===i.nodeName)return;while(i=i.parentNode)}k(t,r,e,t.exact?e:null)})}),h(e.parentNode,n,r))return R.remove(e,1),e=0,K;y.merge_with_parents&&R.getParent(e.parentNode,function(t){return h(t,n,r)?(R.remove(e,1),e=0,K):void 0}),e&&y.merge_siblings!==!1&&(e=E(D(e),e),e=E(e,D(e,K)))}})}var f,m,g=a(n),y=g[0],x=O.isCollapsed();if(y)if(s)s.nodeType?(m=R.createRng(),m.setStartBefore(s),m.setEndAfter(s),p(w(m,g),null,!0)):p(s,null,!0);else if(x&&y.inline&&!R.select("td.mceSelected,th.mceSelected").length)A("apply",n,r);else{var T=t.selection.getNode();q||!g[0].defaultBlock||R.getParent(T,R.isBlock)||c(g[0].defaultBlock),t.selection.setRng(u()),f=O.getBookmark(),p(w(O.getRng(K),g),f),y.styles&&(y.styles.color||y.styles.textDecoration)&&(e.walk(T,G,"childNodes"),G(T)),O.moveToBookmark(f),P(O.getRng(K)),t.nodeChanged()}}function u(i,o,r){function s(t){var i,n,r,a,l;if(3!==t.nodeType){if(1===t.nodeType&&Y(t)&&(a=y,y="true"===Y(t),l=!0),i=e.grep(t.childNodes),y&&!l)for(n=0,r=v.length;r>n&&!k(v[n],o,t,t);n++);if(b.deep&&i.length){for(n=0,r=i.length;r>n;n++)s(i[n]);l&&(y=a)}}}function l(e){var t;return B(n(e.parentNode).reverse(),function(e){var n;t||"_start"==e.id||"_end"==e.id||(n=h(e,i,o),n&&n.split!==!1&&(t=e))}),t}function c(e,t,i,n){var r,s,a,l,c,u;if(e){for(u=e.parentNode,r=t.parentNode;r&&r!=u;r=r.parentNode){for(s=R.clone(r,V),c=0;c<v.length;c++)if(k(v[c],o,s,s)){s=0;break}s&&(a&&s.appendChild(a),l||(l=s),a=s)}!n||b.mixed&&z(e)||(t=R.split(e,t)),a&&(i.parentNode.insertBefore(a,i),l.appendChild(i))}return t}function u(e){return c(l(e),e,e,!0)}function d(e){var t=R.get(e?"_start":"_end"),i=t[e?"firstChild":"lastChild"];return S(i)&&(i=i[e?"firstChild":"lastChild"]),R.remove(t,!0),i}function f(e){var i,n;e=w(e,v,K),b.split&&(i=N(e,K),n=N(e),i!=n?(/^(TR|TD)$/.test(i.nodeName)&&i.firstChild&&(i=("TD"==i.nodeName?i.firstChild:i.firstChild.firstChild)||i),i=x(i,"span",{id:"_start","data-mce-type":"bookmark"}),n=x(n,"span",{id:"_end","data-mce-type":"bookmark"}),u(i),u(n),i=d(K),n=d()):i=n=u(i),e.startContainer=i.parentNode,e.startOffset=W(i),e.endContainer=n.parentNode,e.endOffset=W(n)+1),j.walk(e,function(e){B(e,function(e){s(e),1===e.nodeType&&"underline"===t.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===X(e.parentNode)&&k({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var m,g,v=a(i),b=v[0],y=!0;return r?(r.nodeType?(g=R.createRng(),g.setStartBefore(r),g.setEndAfter(r),f(g)):f(r),void 0):(O.isCollapsed()&&b.inline&&!R.select("td.mceSelected,th.mceSelected").length?A("remove",i,o):(m=O.getBookmark(),f(O.getRng(K)),O.moveToBookmark(m),b.inline&&p(i,o,O.getStart())&&P(O.getRng(!0)),t.nodeChanged()),void 0)}function d(e,t,i){var n=a(e);!p(e,t,i)||"toggle"in n[0]&&!n[0].toggle?c(e,t,i):u(e,t,i)}function h(e,t,i,n){function o(e,t,o){var r,s,a,l=t[o];if(t.onmatch)return t.onmatch(e,t,o);if(l)if(l.length===I){for(r in l)if(l.hasOwnProperty(r)){if(s="attributes"===o?R.getAttrib(e,r):y(e,r),n&&!s&&!t.exact)return;if((!n||t.exact)&&!b(s,_(l[r],i)))return}}else for(a=0;a<l.length;a++)if("attributes"===o?R.getAttrib(e,l[a]):y(e,l[a]))return t;return t}var r,s,l,c=a(t);if(c&&e)for(s=0;s<c.length;s++)if(r=c[s],v(e,r)&&o(e,r,"attributes")&&o(e,r,"styles")){if(l=r.classes)for(s=0;s<l.length;s++)if(!R.hasClass(e,l[s]))return;return r}}function p(e,t,i){function n(i){return i=R.getParent(i,function(i){return!!h(i,e,t,!0)}),h(i,e,t)}var o;return i?n(i):(i=O.getNode(),n(i)?K:(o=O.getStart(),o!=i&&n(o)?K:V))}function f(e,t){var i,n=[],o={};return i=O.getStart(),R.getParent(i,function(i){var r,s;for(r=0;r<e.length;r++)s=e[r],!o[s]&&h(i,s,t)&&(o[s]=!0,n.push(s))},R.getRoot()),n}function m(e){var t,i,o,r,s,l=a(e);if(l)for(t=O.getStart(),i=n(t),r=l.length-1;r>=0;r--){if(s=l[r].selector,!s)return K;for(o=i.length-1;o>=0;o--)if(R.is(i[o],s))return K}return V}function g(e,i,o){var r;return M||(M={},r={},t.onNodeChange.addToTop(function(e,t,i){var o=n(i),s={};B(M,function(e,t){B(o,function(i){return h(i,t,{},e.similar)?(r[t]||(B(e,function(e){e(!0,{node:i,format:t,parents:o})}),r[t]=e),s[t]=e,!1):void 0})}),B(r,function(e,t){s[t]||(delete r[t],B(e,function(e){e(!1,{node:i,format:t,parents:o})}))})})),B(e.split(","),function(e){M[e]||(M[e]=[],M[e].similar=o),M[e].push(i)}),this}function v(e,t){return b(e,t.inline)?K:b(e,t.block)?K:t.selector?R.is(e,t.selector):void 0}function b(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function y(e,t){var i=R.getStyle(e,t);return("color"==t||"backgroundColor"==t)&&(i=R.toHex(i)),"fontWeight"==t&&700==i&&(i="bold"),""+i}function _(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,i){return t[i]||e})),e}function C(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function x(e,t,i){var n=R.create(t,i);return e.parentNode.insertBefore(n,e),n.appendChild(e),n}function w(e,o,r){function s(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var i,n,r,s,a;if(i=n=e?m:v,s=e?"previousSibling":"nextSibling",a=R.getRoot(),3==i.nodeType&&!C(i)&&(e?g>0:y<i.nodeValue.length))return i;for(;;){if(!o[0].block_expand&&z(n))return n;for(r=n[s];r;r=r[s])if(!S(r)&&!C(r)&&!t(r))return n;if(n.parentNode==a){i=n;break}n=n.parentNode}return i}function a(e,t){for(t===I&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)e=e.childNodes[t],e&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function l(e){for(var t=e;t;){if(1===t.nodeType&&Y(t))return"false"===Y(t)?t:e;t=t.parentNode}return e}function c(e,i,n){function o(e,t){var i,o,s=e.nodeValue;return"undefined"==typeof t&&(t=n?s.length:0),n?(i=s.lastIndexOf(" ",t),o=s.lastIndexOf(" ",t),i=i>o?i:o,-1===i||r||i++):(i=s.indexOf(" ",t),o=s.indexOf(" ",t),i=-1!==i&&(-1===o||o>i)?i:o),i}var s,a,l,c;if(3===e.nodeType){if(l=o(e,i),-1!==l)return{container:e,offset:l};c=e}for(s=new L(e,R.getParent(e,z)||t.getBody());a=s[n?"prev":"next"]();)if(3===a.nodeType){if(c=a,l=o(a),-1!==l)return{container:a,offset:l}}else if(z(a))break;return c?(i=n?0:c.length,{container:c,offset:i}):void 0}function u(t,i){var r,s,a,l;for(3==t.nodeType&&0===t.nodeValue.length&&t[i]&&(t=t[i]),r=n(t),s=0;s<r.length;s++)for(a=0;a<o.length;a++)if(l=o[a],!("collapsed"in l&&l.collapsed!==e.collapsed)&&R.is(r[s],l.selector))return r[s];return t}function d(e,t){var r;if(o[0].wrapper||(r=R.getParent(e,o[0].block)),r||(r=R.getParent(3==e.nodeType?e.parentNode:e,i)),r&&o[0].wrapper&&(r=n(r,"ul,ol").reverse()[0]||r),!r)for(r=e;r[t]&&!z(r[t])&&(r=r[t],!b(r,"br")););return r||e}var h,p,f,m=e.startContainer,g=e.startOffset,v=e.endContainer,y=e.endOffset;if(1==m.nodeType&&m.hasChildNodes()&&(h=m.childNodes.length-1,m=m.childNodes[g>h?h:g],3==m.nodeType&&(g=0)),1==v.nodeType&&v.hasChildNodes()&&(h=v.childNodes.length-1,v=v.childNodes[y>h?h:y-1],3==v.nodeType&&(y=v.nodeValue.length)),m=l(m),v=l(v),(S(m.parentNode)||S(m))&&(m=S(m)?m:m.parentNode,m=m.nextSibling||m,3==m.nodeType&&(g=0)),(S(v.parentNode)||S(v))&&(v=S(v)?v:v.parentNode,v=v.previousSibling||v,3==v.nodeType&&(y=v.length)),o[0].inline&&(e.collapsed&&(f=c(m,g,!0),f&&(m=f.container,g=f.offset),f=c(v,y),f&&(v=f.container,y=f.offset)),p=a(v,y),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=a(p.node.previousSibling);p.node&&p.offset>0&&3===p.node.nodeType&&" "===p.node.nodeValue.charAt(p.offset-1)&&p.offset>1&&(v=p.node,v.splitText(p.offset-1))}return(o[0].inline||o[0].block_expand)&&(o[0].inline&&3==m.nodeType&&0!==g||(m=s(!0)),o[0].inline&&3==v.nodeType&&y!==v.nodeValue.length||(v=s())),o[0].selector&&o[0].expand!==V&&!o[0].inline&&(m=u(m,"previousSibling"),v=u(v,"nextSibling")),(o[0].block||o[0].selector)&&(m=d(m,"previousSibling"),v=d(v,"nextSibling"),o[0].block&&(z(m)||(m=s(!0)),z(v)||(v=s()))),1==m.nodeType&&(g=W(m),m=m.parentNode),1==v.nodeType&&(y=W(v)+1,v=v.parentNode),{startContainer:m,startOffset:g,endContainer:v,endOffset:y}}function k(e,t,i,n){var o,r,s;if(!v(i,e))return V;if("all"!=e.remove)for(B(e.styles,function(e,o){e=_(e,t),"number"==typeof o&&(o=e,n=0),(!n||b(y(n,o),e))&&R.setStyle(i,o,""),s=1}),s&&""==R.getAttrib(i,"style")&&(i.removeAttribute("style"),i.removeAttribute("data-mce-style")),B(e.attributes,function(e,o){var r;if(e=_(e,t),"number"==typeof o&&(o=e,n=0),!n||b(R.getAttrib(n,o),e)){if("class"==o&&(e=R.getAttrib(i,o),e&&(r="",B(e.split(/\s+/),function(e){/mce\w+/.test(e)&&(r+=(r?" ":"")+e)}),r)))return R.setAttrib(i,o,r),void 0;"class"==o&&i.removeAttribute("className"),$.test(o)&&i.removeAttribute("data-mce-"+o),i.removeAttribute(o)}}),B(e.classes,function(e){e=_(e,t),(!n||R.hasClass(n,e))&&R.removeClass(i,e)}),r=R.getAttribs(i),o=0;o<r.length;o++)if(0!==r[o].nodeName.indexOf("_"))return V;return"none"!=e.remove?(T(i,e),K):void 0}function T(t,i){function n(e,t,i){return e=D(e,t,i),!e||"BR"==e.nodeName||z(e)}var o,r=t.parentNode;i.block&&(q?r==R.getRoot()&&(i.list_block&&b(t,i.list_block)||B(e.grep(t.childNodes),function(e){F(q,e.nodeName.toLowerCase())?o?o.appendChild(e):o=x(e,q):o=0})):z(t)&&!z(r)&&(n(t,V)||n(t.firstChild,K,1)||t.insertBefore(R.create("br"),t.firstChild),n(t,K)||n(t.lastChild,V,1)||t.appendChild(R.create("br")))),i.selector&&i.inline&&!b(i.inline,t)||R.remove(t,1)}function D(e,t,i){if(e)for(t=t?"nextSibling":"previousSibling",e=i?e:e[t];e;e=e[t])if(1==e.nodeType||!C(e))return e}function S(e){return e&&1==e.nodeType&&"bookmark"==e.getAttribute("data-mce-type")}function E(t,i){function n(e,t){function i(e){var t={};return B(R.getAttribs(e),function(i){var n=i.nodeName.toLowerCase();0!==n.indexOf("_")&&"style"!==n&&(t[n]=R.getAttrib(e,n))}),t}function n(e,t){var i,n;for(n in e)if(e.hasOwnProperty(n)){if(i=t[n],i===I)return V;if(e[n]!=i)return V;delete t[n]}for(n in t)if(t.hasOwnProperty(n))return V;return K}return e.nodeName!=t.nodeName?V:n(i(e),i(t))?n(R.parseStyle(R.getAttrib(e,"style")),R.parseStyle(R.getAttrib(t,"style")))?K:V:V}function o(e,t){for(r=e;r;r=r[t]){if(3==r.nodeType&&0!==r.nodeValue.length)return e;if(1==r.nodeType&&!S(r))return r}return e}var r,s;if(t&&i&&(t=o(t,"previousSibling"),i=o(i,"nextSibling"),n(t,i))){for(r=t.nextSibling;r&&r!=i;)s=r,r=r.nextSibling,t.appendChild(s);return R.remove(i),B(e.grep(i.childNodes),function(e){t.appendChild(e)}),t}return i}function N(e,i){var n,o,r;return n=e[i?"startContainer":"endContainer"],o=e[i?"startOffset":"endOffset"],1==n.nodeType&&(r=n.childNodes.length-1,!i&&o&&o--,n=n.childNodes[o>r?r:o]),3===n.nodeType&&i&&o>=n.nodeValue.length&&(n=new L(n,t.getBody()).next()||n),3!==n.nodeType||i||0!==o||(n=new L(n,t.getBody()).prev()||n),n}function A(n,o,r){function s(e){var i=R.create("span",{id:b,"data-mce-bogus":!0,style:y?"color:red":""});return e&&i.appendChild(t.getDoc().createTextNode(U)),i}function l(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==U||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function d(e){for(;e;){if(e.id===b)return e;e=e.parentNode}}function p(e){var t;if(e)for(t=new L(e,e),e=t.current();e;e=t.next())if(3===e.nodeType)return e}function f(e,t){var i,n;if(e)n=O.getRng(!0),l(e)?(t!==!1&&(n.setStartBefore(e),n.setEndBefore(e)),R.remove(e)):(i=p(e),i.nodeValue.charAt(0)===U&&(i=i.deleteData(0,1)),R.remove(e,1)),O.setRng(n);else if(e=d(O.getStart()),!e)for(;e=R.get(b);)f(e,!1)}function m(){var e,t,i,n,l,u,h;e=O.getRng(!0),n=e.startOffset,u=e.startContainer,h=u.nodeValue,t=d(O.getStart()),t&&(i=p(t)),h&&n>0&&n<h.length&&/\w/.test(h.charAt(n))&&/\w/.test(h.charAt(n-1))?(l=O.getBookmark(),e.collapse(!0),e=w(e,a(o)),e=j.split(e),c(o,r,e),O.moveToBookmark(l)):(t&&i.nodeValue===U?c(o,r,t):(t=s(!0),i=t.firstChild,e.insertNode(t),n=1,c(o,r,t)),O.setCursorLocation(i,n))}function g(){var e,t,n,l,c,d,p,f,m=O.getRng(!0),g=[];for(e=m.startContainer,t=m.startOffset,c=e,3==e.nodeType&&((t!=e.nodeValue.length||e.nodeValue===U)&&(l=!0),c=c.parentNode);c;){if(h(c,o,r)){d=c;break}c.nextSibling&&(l=!0),g.push(c),c=c.parentNode}if(d)if(l)n=O.getBookmark(),m.collapse(!0),m=w(m,a(o),!0),m=j.split(m),u(o,r,m),O.moveToBookmark(n);else{for(f=s(),c=f,p=g.length-1;p>=0;p--)c.appendChild(R.clone(g[p],!1)),c=c.firstChild;c.appendChild(R.doc.createTextNode(U)),c=c.firstChild;var v=R.getParent(d,i);v&&R.isEmpty(v)?d.parentNode.replaceChild(f,d):R.insertAfter(f,d),O.setCursorLocation(c,1),R.isEmpty(d)&&R.remove(d)}}function v(){var t;t=d(O.getStart()),t&&!R.isEmpty(t)&&e.walk(t,function(e){1!=e.nodeType||e.id===b||R.isEmpty(e)||R.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var b="_mce_caret",y=t.settings.caret_debug;self._hasCaretEvents||(t.onBeforeGetContent.addToTop(function(){var e,t=[];if(l(d(O.getStart()),t))for(e=t.length;e--;)R.setAttrib(t[e],"data-mce-bogus","1")}),e.each("onMouseUp onKeyUp".split(" "),function(e){t[e].addToTop(function(){f(),v()})}),t.onKeyDown.addToTop(function(e,t){var i=t.keyCode;(8==i||37==i||39==i)&&f(d(O.getStart())),v()}),O.onSetContent.add(v),self._hasCaretEvents=!0),"apply"==n?m():g()}function P(e){var t,i,n,o,r,s=e.startContainer,a=e.startOffset;if(3==s.nodeType&&a>=s.nodeValue.length&&(a=W(s),s=s.parentNode,t=!0),1==s.nodeType)for(o=s.childNodes,s=o[Math.min(a,o.length-1)],i=new L(s,R.getParent(s,R.isBlock)),(a>o.length-1||t)&&i.next(),n=i.current();n;n=i.next())if(3==n.nodeType&&!C(n))return r=R.create("a",null,U),n.parentNode.insertBefore(r,n),e.setStart(n,0),O.setRng(e),R.remove(r),void 0}var M,I,H={},B=e.each,R=t.dom,O=t.selection,L=e.dom.TreeWalker,j=new e.dom.RangeUtils(R),F=t.schema.isValidChild,z=(e.isArray,R.isBlock),q=t.settings.forced_root_block,W=R.nodeIndex,U="",$=/^(src|href|style)$/,V=!1,K=!0,Y=R.getContentEditable,X=function(e){var i;return t.dom.getParent(e,function(e){return i=t.dom.getStyle(e,"text-decoration"),i&&"none"!==i}),i},G=function(e){var i;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(i=X(e.parentNode),t.dom.getStyle(e,"color")&&i?t.dom.setStyle(e,"text-decoration",i):t.dom.getStyle(e,"textdecoration")===i&&t.dom.setStyle(e,"text-decoration",null))};e.extend(this,{get:a,register:l,apply:c,remove:u,toggle:d,match:p,matchAll:f,matchNode:h,canApply:m,formatChanged:g}),r(),s()}}(tinymce),tinymce.onAddEditor.add(function(e,t){function i(t,i){e.each(i,function(e,i){e&&s.setStyle(t,i,e)}),s.rename(t,"span")}function n(i,n){s=i.dom,a.convert_fonts_to_spans&&e.each(s.select("font,u,strike",n.node),function(e){o[e.nodeName.toLowerCase()](t.dom,e)})}var o,r,s,a=t.settings;a.inline_styles&&(r=e.explode(a.font_size_legacy_values),o={font:function(e,t){i(t,{backgroundColor:t.style.backgroundColor,color:t.color,fontFamily:t.face,fontSize:r[parseInt(t.size,10)-1]})},u:function(e,t){i(t,{textDecoration:"underline"})},strike:function(e,t){i(t,{textDecoration:"line-through"})}},t.onPreProcess.add(n),t.onSetContent.add(n),t.onInit.add(function(){t.selection.onSetContent.add(n)}))}),function(e){var t=e.dom.TreeWalker;e.EnterKey=function(i){function n(n){function c(e){return e&&o.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==o.getContentEditable(e)}function u(t){var i;e.isIE&&!e.isIE11&&o.isBlock(t)&&(i=r.getRng(),t.appendChild(o.create("span",null," ")),r.select(t),t.lastChild.outerHTML="",r.setRng(i))}function d(e){for(var t,i=e,n=[];i=i.firstChild;){if(o.isBlock(i))return;1!=i.nodeType||l[i.nodeName.toLowerCase()]||n.push(i)
86
+ }for(t=n.length;t--;)i=n[t],!i.hasChildNodes()||i.firstChild==i.lastChild&&""===i.firstChild.nodeValue?o.remove(i):"A"==i.nodeName&&" "===(i.innerText||i.textContent)&&o.remove(i)}function h(e){var n,s,a,c,u,d,h=e;if(a=o.createRng(),e.hasChildNodes()){for(n=new t(e,e);s=n.current();){if(3==s.nodeType){a.setStart(s,0),a.setEnd(s,0);break}if(l[s.nodeName.toLowerCase()]){a.setStartBefore(s),a.setEndBefore(s);break}h=s,s=n.next()}s||(a.setStart(h,0),a.setEnd(h,0))}else"BR"==e.nodeName?e.nextSibling&&o.isBlock(e.nextSibling)?((!S||9>S)&&(d=o.create("br"),e.parentNode.insertBefore(d,e)),a.setStartBefore(e),a.setEndBefore(e)):(a.setStartAfter(e),a.setEndAfter(e)):(a.setStart(e,0),a.setEnd(e,0));r.setRng(a),o.remove(d),u=o.getViewPort(i.getWin()),c=o.getPos(e).y,(c<u.y||c+25>u.y+u.h)&&i.getWin().scrollTo(0,c<u.y?c:c-u.h+25)}function p(t){var i,n,r,a=k;if(i=t||"TABLE"==M?o.create(t||H):D.cloneNode(!1),r=i,s.keep_styles!==!1)do if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(a.nodeName)){if("_mce_caret"==a.id)continue;n=a.cloneNode(!1),o.setAttrib(n,"id",""),i.hasChildNodes()?(n.appendChild(i.firstChild),i.appendChild(n)):(r=n,i.appendChild(n))}while(a=a.parentNode);return(!e.isIE||e.isIE11)&&(r.innerHTML='<br data-mce-bogus="1">'),i}function f(e){var i,n,o;if(3==k.nodeType&&(e?T>0:T<k.nodeValue.length))return!1;if(k.parentNode==D&&B&&!e)return!0;if(e&&1==k.nodeType&&k==D.firstChild)return!0;if("TABLE"===k.nodeName||k.previousSibling&&"TABLE"==k.previousSibling.nodeName)return B&&!e||!B&&e;for(i=new t(k,D),3==k.nodeType&&(e&&0==T?i.prev():e||T!=k.nodeValue.length||i.next());n=i.current();){if(1===n.nodeType){if(!n.getAttribute("data-mce-bogus")&&(o=n.nodeName.toLowerCase(),l[o]&&"br"!==o))return!1}else if(3===n.nodeType&&!/^[ \t\r\n]*$/.test(n.nodeValue))return!1;e?i.prev():i.next()}return!0}function m(e,t){var i,n,r,s,a,l=H||"P";if(n=o.getParent(e,o.isBlock),!n||!c(n)){if(n=n||w,!n.hasChildNodes())return i=o.create(l),n.appendChild(i),R.setStart(i,0),R.setEnd(i,0),i;for(s=e;s.parentNode!=n;)s=s.parentNode;for(;s&&!o.isBlock(s);)r=s,s=s.previousSibling;if(r){for(i=o.create(l),r.parentNode.insertBefore(i,r),s=r;s&&!o.isBlock(s);)a=s.nextSibling,i.appendChild(s),s=a;R.setStart(e,t),R.setEnd(e,t)}}return e}function g(){function e(e){for(var t=P[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===D}N=H?p(H):o.create("BR"),e(!0)&&e()?o.replace(N,P):e(!0)?P.parentNode.insertBefore(N,P):e()?(o.insertAfter(N,P),u(N)):(x=R.cloneRange(),x.setStartAfter(D),x.setEndAfter(P),A=x.extractContents(),o.insertAfter(A,P),o.insertAfter(N,P)),o.remove(D),h(N),a.add()}function v(){for(var e,i=new t(k,D);e=i.next();)if(l[e.nodeName.toLowerCase()]||e.length>0)return!0}function b(){var t,i,n;k&&3==k.nodeType&&T>=k.nodeValue.length&&(e.isIE&&!e.isIE11||v()||(t=o.create("br"),R.insertNode(t),R.setStartAfter(t),R.setEndAfter(t),i=!0)),t=o.create("br"),R.insertNode(t),e.isIE&&!e.isIE11&&"PRE"==M&&(!S||8>S)&&t.parentNode.insertBefore(o.doc.createTextNode("\r"),t),n=o.create("span",{},"&nbsp;"),t.parentNode.insertBefore(n,t),r.scrollIntoView(n),o.remove(n),i?(R.setStartBefore(t),R.setEndBefore(t)):(R.setStartAfter(t),R.setEndAfter(t)),r.setRng(R),a.add()}function y(e){do 3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)}function _(e){var t,i,n=o.getRoot();for(t=e;t!==n&&"false"!==o.getContentEditable(t);)"true"===o.getContentEditable(t)&&(i=t),t=t.parentNode;return t!==n?i:n}function C(t){var i;(!e.isIE||e.isIE11)&&(t.normalize(),i=t.lastChild,(!i||/^(left|right)$/gi.test(o.getStyle(i,"float",!0)))&&o.add(t,"br"))}var x,w,k,T,D,S,E,N,A,P,M,I,H,B,R=r.getRng(!0);if(!R.collapsed)return i.execCommand("Delete"),void 0;if(!n.isDefaultPrevented()&&(k=R.startContainer,T=R.startOffset,H=(s.force_p_newlines?"p":"")||s.forced_root_block,H=H?H.toUpperCase():"",S=o.doc.documentMode,E=n.shiftKey,1==k.nodeType&&k.hasChildNodes()&&(B=T>k.childNodes.length-1,k=k.childNodes[Math.min(T,k.childNodes.length-1)]||k,T=B&&3==k.nodeType?k.nodeValue.length:0),w=_(k))){if(a.beforeChange(),!o.isBlock(w)&&w!=o.getRoot())return(!H||E)&&b(),void 0;if((H&&!E||!H&&E)&&(k=m(k,T)),D=o.getParent(k,o.isBlock),P=D?o.getParent(D.parentNode,o.isBlock):null,M=D?D.nodeName.toUpperCase():"",I=P?P.nodeName.toUpperCase():"","LI"!=I||n.ctrlKey||(D=P,M=I),"LI"==M){if(!H&&E)return b(),void 0;if(o.isEmpty(D))return/^(UL|OL|LI)$/.test(P.parentNode.nodeName)?!1:(g(),void 0)}if("PRE"==M&&s.br_in_pre!==!1){if(!E)return b(),void 0}else if(!H&&!E&&"LI"!=M||H&&E)return b(),void 0;H=H||"P",f()?(N=/^(H[1-6]|PRE)$/.test(M)&&"HGROUP"!=I?p(H):p(),s.end_container_on_empty_block&&c(P)&&o.isEmpty(D)?N=o.split(P,D):o.insertAfter(N,D),h(N)):f(!0)?(N=D.parentNode.insertBefore(p(),D),u(N)):(x=R.cloneRange(),x.setEndAfter(D),A=x.extractContents(),y(A),N=A.firstChild,o.insertAfter(A,D),d(N),C(D),h(N)),o.setAttrib(N,"id",""),a.add()}}var o=i.dom,r=i.selection,s=i.settings,a=i.undoManager,l=i.schema.getNonEmptyElements();i.onKeyDown.add(function(e,t){13==t.keyCode&&n(t)!==!1&&t.preventDefault()})}}(tinymce),function(){var e,t,i,n,o,r,s;window.wagn||(window.wagn={}),$.extend(wagn,{editorContentFunctionMap:{".tinymce-textarea":function(){return tinyMCE.get(this[0].id).getContent()},".pointer-select":function(){return o(this.val())},".pointer-multiselect":function(){return o(this.val())},".pointer-radio-list":function(){return o(this.find("input:checked").val())},".pointer-list-ul":function(){return o(this.find("input").map(function(){return $(this).val()}))},".pointer-checkbox-list":function(){return o(this.find("input:checked").map(function(){return $(this).val()}))},".perm-editor":function(){return n(this)}},editorInitFunctionMap:{".date-editor":function(){return this.datepicker({dateFormat:"yy-mm-dd"})},textarea:function(){return $(this).autosize()},".tinymce-textarea":function(){return wagn.initTinyMCE(this[0].id)},".pointer-list-editor":function(){return this.sortable(),wagn.initPointerList(this.find("input"))},".file-upload":function(){return this.fileupload({add:wagn.chooseFile})},".etherpad-textarea":function(){return $(this).closest("form").find(".edit-submit-button").attr("class","etherpad-submit-button")}},initPointerList:function(e){var t;return t=e.closest("ul").attr("options-card"),e.autocomplete({source:wagn.prepUrl(wagn.rootPath+"/"+t+".json?view=name_complete")})},setTinyMCEConfig:function(e){var t;return t=function(){try{return $.parseJSON(e)}catch(t){return{}}},wagn.tinyMCEConfig=t()},initTinyMCE:function(e){var t,i,n;return t={plugins:"autoresize",autoresize_max_height:500},n=null!=wagn.tinyMCEConfig?wagn.tinyMCEConfig:{},i={mode:"exact",elements:e,content_css:wagn.cssPath,entity_encoding:"raw"},$.extend(t,n,i),tinyMCE.init(t)},chooseFile:function(e,t){var i,n,o,r;return o=t.files[0],$(this).closest("form").data("file-data",t),(r=$(this).slot().find(".name-editor input"))&&r[0]&&""===r.val()&&r.val(o.name.replace(/\..*$/,"").replace(/_/g," ")),n=$(this).closest(".card-editor"),n.find(".choose-file").hide(),n.find(".chosen-filename").text(o.name),n.find(".chosen-file").show(),i=this.name.replace(/attach\]$/,"content]"),n.append('<input type="hidden" value="CHOSEN" class="upload-card-content" name="'+i+'">')},openMenu:function(e,t){var i,n;return n=$(e),i=n.data("menu"),null==i&&(i=wagn.generateMenu(n.slot(),n.data("menu-vars")),n.data("menu",i),i.menu({position:{my:"right top",at:"left-2 top-3"},icons:{submenu:"ui-icon-carat-1-w"}})),t&&i.addClass("card-menu-tappable"),i.show(),i.position({my:"right top",at:"right+2 top+2",of:e})},closeMenu:function(e){return $(e).hide(),$(e).menu("collapseAll",null,!0)},generateMenu:function(e,t){var i,n,o;return o=$.extend(!0,{},wagn.menu_template),i=wagn.generateMenuItems(o,t),n=$('<ul class="card-menu">'+i.join("\n")+"</ul>"),e.append(n),n},generateMenuItems:function(e,t){var i;return i=[],$.each(e,function(e,n){var o,r,s,a;return n["if"]&&!t[n["if"]]?!0:(n.text&&(n.text=n.text.replace(/\%\{([^}]*)\}/,function(e,i){return t[i]}),n.text=$("<div/>").text(n.text).html()),o=n.link?t[n.link]:n.plain?"<a>"+n.plain+"</a>":n.page?(s=t[n.page]||n.page,a=n.text||s,'<a href="'+wagn.rootPath+"/"+wagn.linkname(s)+'">'+a+" &crarr;</a>"):wagn.generateStandardMenuItem(n,t),o?(n.list&&(r=wagn.generateListTemplate(n.list,t))&&r.length>0&&(n.sub=r),n.sub&&(o+="<ul>"+wagn.generateMenuItems(n.sub,t).join("\n")+"</ul>"),i.push("<li>"+o+"</li>")):void 0)}),i},linkname:function(e){return e.replace(/[^\w\*\+]/g," ").replace(/\s+/g,"_")},generateListTemplate:function(e,t){var i,n;return i=[],(n=t[e.name])&&$.each(n,function(t,n){var o;return o=$.extend({},e.template),$.map(o,function(e,t){return o[t]=n[o[t]]||o[t]}),i.push(o)}),e.append&&(i=i.concat(e.append)),i},generateStandardMenuItem:function(e,t){var i,n,o,r;return i=wagn.linkname(t.self),n=e.path_opts||{},e.related&&(e.view="related",n.related="object"==typeof e.related?$.extend({},e.related,{name:t[e.related.name]}):(e.text||(e.text=e.related),{name:"+*"+e.related})),e.view?("home"!==e.view&&(n.view=e.view),o=wagn.rootPath+"/"+i,$.isEmptyObject(n)||(o+="?"+$.param(n)),r=e.text||e.view,'<a href="'+o+'" data-remote="true" class="slotter">'+r+"</a>"):void 0}}),$(window).ready(function(){var i;return $("body").on("click",".cancel-upload",function(){var e,t;return t=$(this).closest(".card-editor"),t.find(".chosen-file").hide(),t.find(".choose-file").show(),$(this).closest("form").data("file-data",null),e=t.find(".upload-card-content").remove()}),$(".navbox").autocomplete({html:"html",source:e,select:t}),$("body").on("mouseenter",".card-menu-link",function(){return wagn.openMenu(this,!1)}),$("body").on("mouseleave",".card-menu",function(){return wagn.closeMenu(this)}),$(document).on("tap",".card-header",function(e){var t;return t=$(this).find(".card-menu-link"),!t[0]||t.data("menu")||e.pageX-$(this).offset().left<$(this).width()/2?void 0:(wagn.openMenu(t,!0),e.preventDefault())}),$(document).on("tap","body",function(e){return $(e.target).closest(".card-header")[0]||$(e.target).closest(".card-menu-link")[0]?void 0:$(".card-menu").hide()}),$(document).on("tap",".ui-menu-icon",function(e){return $(this).closest("li").trigger("mouseenter"),e.preventDefault()}),$("body").on("click",".pointer-item-add",function(e){var t,i,n;return i=$(this).closest(".content-editor").find(".pointer-li:last"),n=i.clone(),t=n.find("input"),t.val(""),i.after(n),wagn.initPointerList(t),e.preventDefault()}),$("body").on("click",".pointer-item-delete",function(){var e;return e=$(this).closest("li"),e.closest("ul").find(".pointer-li").length>1?e.remove():e.find("input").val(""),event.preventDefault()}),$("body").on("click",".perm-vals input",function(){return $(this).slot().find("#inherit").attr("checked",!1)}),$("body").on("click",".perm-editor #inherit",function(){var e;return e=$(this).slot(),e.find(".perm-group input:checked").attr("checked",!1),e.find(".perm-indiv input").val("")}),$("body").on("click",".rule-submit-button",function(){var e;return e=$(this).closest("form"),e.find(".set-editor input:checked").val()?!0:(e.find(".set-editor").addClass("attention"),$(this).notify("To what Set of cards does this Rule apply?"),!1)}),$("body").on("click",".shade-view h1",function(){var e;return e=$(this).slot().find(".shade-content").is(":hidden"),s($(this).closest(".pointer-list").find(".shade-content:visible").parent()),e?s($(this).slot()):void 0}),(i=$(".shade-view h1")[0])&&$(i).trigger("click"),$("body").on("change",".go-to-selected select",function(){var e;return e=$(this).val(),""!==e?window.location=wagn.rootPath+escape(e):void 0})}),$(document).bind("mobileinit",function(){return $.mobile.autoInitializePage=!1,$.mobile.ajaxEnabled=!1}),s=function(e){return e.find(".shade-content").slideToggle(1e3),e.find(".ui-icon").toggleClass("ui-icon-triangle-1-e ui-icon-triangle-1-s")},n=function(e){var t,i;return e.find("#inherit").attr("checked")?"_left":(t=e.find(".perm-group input:checked").map(function(){return $(this).val()}),i=e.find(".perm-indiv input").map(function(){return $(this).val()}),o($.makeArray(t).concat($.makeArray(i))))},o=function(e){var t;return t=$.map($.makeArray(e),function(e){return e?"[["+e+"]]":void 0}),$.makeArray(t).join("\n")},r=0,e=function(e,t){var n,o;return n=this.element.closest("form"),o=n.serialize()+"&view=complete",this.xhr=$.ajax({url:wagn.prepUrl(wagn.rootPath+"/:search.json"),data:o,dataType:"json",wagReq:++r,success:function(n){return this.wagReq===r?t(i(e.term,n)):void 0},error:function(){return this.wagReq===r?t([]):void 0}})},i=function(e,t){var i;return i=[],$.each(["search","add","new"],function(n,o){var r,s;return(s=t[o])?(r={value:e,prefix:o,icon:"plus",label:'<strong class="highlight">'+e+"</strong>"},"search"===o?(r.icon=o,r.term=e):"add"===o?r.href="/card/new?card[name]="+encodeURIComponent(s):"new"===o&&(r.type="add",r.href="/new/"+s[1]),i.push(r)):void 0}),$.each(t["goto"],function(e,t){return i.push({icon:"arrowreturnthick-1-e",prefix:"go to",value:t[0],label:t[1],href:"/"+t[2]})}),$.each(i,function(e,t){return t.label='<span class="navbox-item-label"><a class="ui-icon ui-icon-'+t.icon+'"></a>'+t.prefix+':</span> <span class="navbox-item-value">'+t.label+"</span>"}),i},t=function(e,t){return t.item.term?$(this).closest("form").submit():window.location=wagn.rootPath+t.item.href,$(this).attr("disabled","disabled")}}.call(this),function(){var e,t,i;$.extend(wagn,{initializeEditors:function(e,t){return null==t&&(t=wagn.editorInitFunctionMap),$.each(t,function(t,i){return $.each(e.find(t),function(){return i.call($(this))})})},prepUrl:function(e,t){var i,n,o;return o={},i=$("#main").children(".card-slot").data("cardName"),null!=i&&(o.main=i),t&&(t.isMain()&&(o.is_main=!0),n=t.data("slot"),null!=n&&wagn.slotParams(n,o,"slot")),e+((e.match(/\?/)?"&":"?")+$.param(o))},slotParams:function(e,i,n){return $.each(e,function(e,o){var r;return r=n+"["+t(e)+"]","items"===e?wagn.slotParams(o,i,r):i[r]=o})},pingName:function(e,t){return $.getJSON(wagn.rootPath+"/",{format:"json",view:"status","card[name]":e},t)}}),jQuery.fn.extend({slot:function(){return this.closest(".card-slot")},setSlotContent:function(e){var t,i,n;return t=this.slot(),n=$(e),n[0]?(i=t.attr("data-slot"))&&null!=i&&n.attr("data-slot",i):n=e,t.replaceWith(n),n},slotSuccess:function(e){var t,i;return e.redirect?window.location=e.redirect:(i=this.attr("notify-success"),t=this.setSlotContent(e),t.jquery&&(wagn.initializeEditors(t),null!=i)?t.notify(i):void 0)},slotError:function(e,t){return 403===e?this.setSlotContent(t):(this.notify(t),409===e?this.slot().find(".current_revision_id").val(this.slot().find(".new-current-revision-id").text()):449===e?this.slot().find(".recaptcha-box").loadCaptcha():void 0)},notify:function(e){var t,i,n;return n=this.slot(),i=n.find(".card-notice"),i[0]||(i=$('<div class="card-notice"></div>'),t=n.find(".card-form"),t[0]?$(t[0]).append(i):n.append(i)),i.html(e),i.show("blind")},report:function(e){var t;return t=this.slot().find(".card-report"),t[0]?(t.hide(),t.html(e),t.show("drop",750),setTimeout(function(){return t.hide("drop",750)},3e3)):!1},isMain:function(){return this.slot().parent("#main")[0]},loadCaptcha:function(){return Recaptcha.create(wagn.recaptchaKey,this[0])},autosave:function(){var e,t,i,n;if(n=this.slot(),!this.attr("no-autosave")){if(t=this.closest("fieldset"),t[0]){if(!(e=t.data("cardId")))return;i=": "+t.data("cardName")}else e=n.data("cardId"),i="";return $.ajax(wagn.rootPath+"/card/save_draft/~"+e,{data:{"card[content]":this.val()},type:"POST",success:function(){return n.report("draft saved"+i)}})}},setContentFieldsFromMap:function(e){var t;return null==e&&(e=wagn.editorContentFunctionMap),t=$(this),$.each(e,function(e,i){return t.setContentFields(e,i)})},setContentFields:function(e,t){return $.each(this.find(e),function(){return $(this).setContentField(t)})},setContentField:function(e){var t,i,n;return t=this.closest(".card-editor").find(".card-content"),i=t.val(),n=e.call(this),t.val(n),i!==n?t.change():void 0}}),setInterval(function(){return $(".card-form").setContentFieldsFromMap()},2e4),$(window).ready(function(){return $.ajaxSetup({cache:!1}),setTimeout(function(){return wagn.initializeEditors($("body"))},10),$("body").on("ajax:success",".slotter",function(e,t){return $(this).slotSuccess(t)}),$("body").on("ajax:error",".slotter",function(e,t){return $(this).slotError(t.status,t.responseText)}),$("body").on("click","button.slotter",function(){return $.rails.allowAction($(this))?$.rails.handleRemote($(this)):!1}),$("body").on("ajax:beforeSend",".slotter",function(t,i,n){var o,r,s,a,l;if(!n.skip_before_send&&(n.url.match(/home_view/)||(n.url=wagn.prepUrl(n.url,$(this).slot())),$(this).is("form"))){if(wagn.recaptchaKey&&"on"===$(this).attr("recaptcha")&&!$(this).find(".recaptcha-box")[0])return e(this),!1;if(r=$(this).data("file-data"))return a=$(this).find(".file-upload"),a[1]?($(this).notify("Wagn does not yet support multiple files in a single form."),!1):(l=a.data("fileupload"),l._isXHRUpload(l.options)||($(this).find("[name=success]").val("_self"),n.url+="&simulate_xhr=true",s=function(e){return e.find("body").html()},n.dataFilter=s),o=$.extend(n,l._getAJAXSettings(r),{url:n.url}),o.skip_before_send=!0,$.ajax(o),!1)}}),$("body").on("submit",".card-form",function(){return $(this).setContentFieldsFromMap(),$(this).find(".card-content").attr("no-autosave","true"),!0}),$("body").on("click",".submitter",function(){return $(this).closest("form").submit()}),$("body").on("click",".renamer-updater",function(){return $(this).closest("form").find("#card_update_referencers").val("true")}),$("body").on("submit",".edit_name-view .card-form",function(){var e;return e=$(this).find(".confirm_rename-view"),e.is(":hidden")?($(this).find("#referers").val()>0&&$(this).find(".renamer-updater").show(),e.show("blind"),!1):void 0}),$("body").on("click","button.redirecter",function(){return window.location=$(this).attr("href")}),wagn.noDoubleClick||$("body").on("dblclick",".card-slot",function(){var e;return e=$(this),e.find(".card-editor")[0]?!1:e.closest(".card-header")[0]?!1:e.data("cardId")?(e.addClass("slotter"),e.attr("href",wagn.rootPath+"/card/edit/~"+e.data("cardId")),$.rails.handleRemote(e),!1):!1}),$("body").on("dblclick",".nodblclick",function(){return!1}),$("body").on("submit","form.slotter",function(){var e,t;return(t=$(this).attr("main-success"))&&$(this).isMain()&&(e=$(this).find("[name=success]"),e&&!e.val().match(/^REDIRECT/))?e.val("REDIRECT"===t?t+": "+e.val():t):void 0}),$(".card-slot").on("click",".standard-delete",function(){var e;if("true"!==$(this).attr("success-ready"))return e=$(this).isMain()?"REDIRECT: *previous":"TEXT:"+$(this).slot().data("cardName")+" removed",$(this).attr("href",$(this).attr("href")+"?success="+encodeURIComponent(e)),$(this).attr("success-ready","true")}),$("body").on("change",".live-type-field",function(){return $(this).data("params",$(this).closest("form").serialize()),$(this).data("url",$(this).attr("href"))}),$("body").on("change",".edit-type-field",function(){return $(this).closest("form").submit()}),$("body").on("change",".autosave .card-content",function(){var e;return e=$(this),setTimeout(function(){return e.autosave()},500)}),$("body").on("mouseenter","[hover_content]",function(){return $(this).attr("hover_restore",$(this).html()),$(this).html($(this).attr("hover_content"))}),$("body").on("mouseleave","[hover_content]",function(){return $(this).html($(this).attr("hover_restore"))}),$("body").on("keyup",".name-editor input",function(){var e,t;return e=$(this),t=e.val(),wagn.pingName(t,function(i){var n,o,r,s,a,l,c;return e.val()!==t?null:(c=i.status,c?(n=e.parent(),o=e.closest("fieldset").find("legend"),s=o.find(".name-messages"),s[0]||(s=$('<span class="name-messages"></span>'),o.append(s)),n.removeClass("real-name virtual-name known-name"),l=e.slot().data("cardId"),"unknown"===c||l&&parseInt(l)===i.id?s.html(""):(n.addClass(c+"-name known-name"),r=a="virtual"===c?"in virtual":"already in",s.html('"<a href="'+wagn.rootPath+"/"+i.url_key+'">'+t+'</a>" '+a+" use"))):void 0)})}),$("body").on("click",".render-error-link",function(e){var t;return t=$(this).closest(".render-error").find(".render-error-message"),t.show(),e.preventDefault()})}),e=function(e){var t,i;return i="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js",t=$('<div class="recaptcha-box"></div>'),$(e).children().last().after(t),$.getScript(i,function(){return t.loadCaptcha()})},t=function(e){return e.replace(/([a-z])([A-Z])/g,function(e){return e[0]+"_"+e[1].toLowerCase()})},i=function(e){return"undefined"!=typeof console&&null!==console?console.log(e):void 0}}.call(this),wagn.menu_template=[{text:"edit",view:"edit","if":"edit",sub:[{text:"content",view:"edit"},{text:"name",view:"edit_name"},{text:"type: %{type}",view:"edit_type"},{text:"structure",related:{name:"structure",view:"edit"},"if":"structure"},{link:"delete","if":"delete"}]},{text:"view",view:"home",sub:[{text:"refresh",view:"home"},{text:"page",page:"self"},{text:"type: %{type}",page:"type"},{text:"history",view:"history","if":"edit"},{text:"structure",related:{name:"structure"},"if":"structure"}]},{text:"discuss",related:{name:"+discussion"},"if":"discuss"},{text:"advanced",view:"options",sub:[{text:"rules",view:"options",list:{name:"related_sets",template:{view:"options",text:"text",path_opts:"path_opts"}}},{plain:"related",list:{name:"piecenames",template:{page:"item"},append:[{related:"children","if":"creator"},{related:"mates"}]}},{related:"referred to by","if":"creator",sub:[{text:"all",related:"referred to by"},{text:"links",related:"linked to by"},{text:"inclusions",related:"included by"}]},{related:"refers to","if":"creator",sub:[{text:"all",related:"refers to"},{text:"links",related:"links to"},{text:"inclusions",related:"includes"}]},{related:"editors","if":"creator",sub:[{text:"all editors",related:"editors"},{text:"creator: %{creator}",page:"creator"},{text:"last editor: %{updater}",page:"updater"}]}]},{link:"watch","if":"watch"},{view:"account","if":"account",sub:[{view:"account",text:"details"},{related:"roles"},{related:"created"},{related:"edited"}]}],/*
87
+ * jQuery Mobile Framework Git Build: SHA1: 07a30fb0138f34a880ca7c9c9427319d1f976eda <> Date: Mon Jul 16 01:56:11 2012 +0200
88
+ * http://jquerymobile.com
89
+ *
90
+ * Copyright 2012 jQuery Foundation and other contributors
91
+ * Dual licensed under the MIT or GPL Version 2 licenses.
92
+ * http://jquery.org/license
93
+ *
94
+ */
95
+ function(e,t,i){"function"==typeof define&&define.amd?define(["jquery"],function(n){return i(n,e,t),n.mobile}):i(e.jQuery,e,t)}(this,document,function(e,t,i,n){!function(e,t){var n={};e.mobile=e.extend({},{version:"1.2.0-pre",ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:250,touchOverflowEnabled:!1,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"e",autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,orientationChangeEnabled:!0,buttonMarkup:{hoverDelay:200},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},silentScroll:function(n){"number"!==e.type(n)&&(n=e.mobile.defaultHomeScroll),e.event.special.scrollstart.enabled=!1,setTimeout(function(){t.scrollTo(0,n),e(i).trigger("silentscroll",{x:0,y:n})},20),setTimeout(function(){e.event.special.scrollstart.enabled=!0},150)},nsNormalizeDict:n,nsNormalize:function(t){return t?n[t]||(n[t]=e.camelCase(e.mobile.ns+t)):void 0},getInheritedTheme:function(e,t){for(var i,n,o=e[0],r="",s=/ui-(bar|body|overlay)-([a-z])\b/;o&&(i=o.className||"",!(i&&(n=s.exec(i))&&(r=n[2])));)o=o.parentNode;return r||t||"a"},closestPageData:function(e){return e.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("page")},enhanceable:function(e){return this.haveParents(e,"enhance")},hijackable:function(e){return this.haveParents(e,"ajax")},haveParents:function(t,i){if(!e.mobile.ignoreContentEnabled)return t;for(var n,o,r,s=t.length,a=e(),l=0;s>l;l++){for(o=t.eq(l),r=!1,n=t[l];n;){var c=n.getAttribute?n.getAttribute("data-"+e.mobile.ns+i):"";if("false"===c){r=!0;break}n=n.parentNode}r||(a=a.add(o))}return a},getScreenHeight:function(){return t.innerHeight||e(t).height()}},e.mobile),e.fn.jqmData=function(t,i){var n;return"undefined"!=typeof t&&(t&&(t=e.mobile.nsNormalize(t)),n=this.data.apply(this,arguments.length<2?[t]:[t,i])),n},e.jqmData=function(t,i,n){var o;return"undefined"!=typeof i&&(o=e.data(t,i?e.mobile.nsNormalize(i):i,n)),o},e.fn.jqmRemoveData=function(t){return this.removeData(e.mobile.nsNormalize(t))},e.jqmRemoveData=function(t,i){return e.removeData(t,e.mobile.nsNormalize(i))},e.fn.removeWithDependents=function(){e.removeWithDependents(this)},e.removeWithDependents=function(t){var i=e(t);(i.jqmData("dependents")||e()).remove(),i.remove()},e.fn.addDependents=function(t){e.addDependents(e(this),t)},e.addDependents=function(t,i){var n=e(t).jqmData("dependents")||e();e(t).jqmData("dependents",e.merge(n,i))},e.fn.getEncodedText=function(){return e("<div/>").text(e(this).text()).html()},e.fn.jqmEnhanceable=function(){return e.mobile.enhanceable(this)},e.fn.jqmHijackable=function(){return e.mobile.hijackable(this)};var o=e.find,r=/:jqmData\(([^)]*)\)/g;e.find=function(t,i,n,s){return t=t.replace(r,"[data-"+(e.mobile.ns||"")+"$1]"),o.call(this,t,i,n,s)},e.extend(e.find,o),e.find.matches=function(t,i){return e.find(t,null,null,i)},e.find.matchesSelector=function(t,i){return e.find(i,null,null,[t]).length>0}}(e,this),/*!
96
+ * jQuery UI Widget @VERSION
97
+ *
98
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
99
+ * Dual licensed under the MIT or GPL Version 2 licenses.
100
+ * http://jquery.org/license
101
+ *
102
+ * http://docs.jquery.com/UI/Widget
103
+ */
104
+ function(t,i){var n=Array.prototype.slice,o=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(r){}o(e)},t.widget=function(e,i,n){var o,r,s,a,l=e.split(".")[0];e=e.split(".")[1],o=l+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][o]=function(e){return!!t.data(e,o)},t[l]=t[l]||{},r=t[l][e],s=t[l][e]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new s(e,t)},t.extend(s,r,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,o){t.isFunction(o)&&(n[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},n=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,r=this._superApply;return this._super=t,this._superApply=n,e=o.apply(this,arguments),this._super=i,this._superApply=r,e}}())}),s.prototype=t.widget.extend(a,{widgetEventPrefix:e},n,{constructor:s,namespace:l,widgetName:e,widgetBaseClass:o,widgetFullName:o}),r?(t.each(r._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,s,i._proto)}),delete r._childConstructors):i._childConstructors.push(s),t.widget.bridge(e,s)},t.widget.extend=function(e){for(var o,r,s=n.call(arguments,1),a=0,l=s.length;l>a;a++)for(o in s[a])r=s[a][o],s[a].hasOwnProperty(o)&&r!==i&&(e[o]=t.isPlainObject(r)?t.widget.extend({},e[o],r):r);return e},t.widget.bridge=function(e,o){var r=o.prototype.widgetFullName;t.fn[e]=function(s){var a="string"==typeof s,l=n.call(arguments,1),c=this;return s=!a&&l.length?t.widget.extend.apply(null,[s].concat(l)):s,a?this.each(function(){var n=t.data(this,r);if(!n)return t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+s+"'");if(!t.isFunction(n[s])||"_"===s.charAt(0))return t.error("no such method '"+s+"' for "+e+" widget instance");var o=n[s].apply(n,l);return o!==n&&o!==i?(c=o&&o.jquery?c.pushStack(o.get()):o,!1):void 0}):this.each(function(){var e=t.data(this,r);e?e.option(s||{})._init():new o(s,this)}),c}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetName,this),t.data(i,this.widgetFullName,this),this._bind({remove:"destroy"}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind("."+this.widgetName).removeData(this.widgetName).removeData(this.widgetFullName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind("."+this.widgetName),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var o,r,s,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},o=e.split("."),e=o.shift(),o.length){for(r=a[e]=t.widget.extend({},this.options[e]),s=0;s<o.length-1;s++)r[o[s]]=r[o[s]]||{},r=r[o[s]];if(e=o.pop(),n===i)return r[e]===i?null:r[e];r[e]=n}else{if(n===i)return this.options[e]===i?null:this.options[e];a[e]=n}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_bind:function(i,n){n?(i=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element);var o=this;t.each(n,function(n,r){function s(){return o.options.disabled===!0||t(this).hasClass("ui-state-disabled")?void 0:("string"==typeof r?o[r]:r).apply(o,arguments)}"string"!=typeof r&&(s.guid=r.guid=r.guid||s.guid||e.guid++);var a=n.match(/^(\w+)\s*(.*)$/),l=a[1]+"."+o.widgetName,c=a[2];c?o.widget().delegate(c,l,s):i.bind(l,s)})},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._bind(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._bind(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,n){var o,r,s=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],r=i.originalEvent)for(o in r)o in i||(i[o]=r[o]);return this.element.trigger(i,n),!(t.isFunction(s)&&s.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,o,r){"string"==typeof o&&(o={effect:o});var s,a=o?o===!0||"number"==typeof o?i:o.effect||i:e;o=o||{},"number"==typeof o&&(o={duration:o}),s=!t.isEmptyObject(o),o.complete=r,o.delay&&n.delay(o.delay),s&&t.effects&&(t.effects.effect[a]||t.uiBackCompat!==!1&&t.effects[a])?n[e](o):a!==e&&n[a]?n[a](o.duration,o.easing,r):n.queue(function(i){t(this)[e](),r&&r.call(n[0]),i()})}}),t.uiBackCompat!==!1&&(t.Widget.prototype._getCreateOptions=function(){return t.metadata&&t.metadata.get(this.element[0])[this.widgetName]})}(e),function(e,t){e.widget("mobile.widget",{_createWidget:function(){e.Widget.prototype._createWidget.apply(this,arguments),this._trigger("init")},_getCreateOptions:function(){var i=this.element,n={};return e.each(this.options,function(e){var o=i.jqmData(e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}));o!==t&&(n[e]=o)}),n},enhanceWithin:function(t,i){this.enhance(e(this.options.initSelector,e(t)),i)},enhance:function(t,i){var n,o,r=e(t);r=e.mobile.enhanceable(r),i&&r.length&&(n=e.mobile.closestPageData(r),o=n&&n.keepNativeSelector()||"",r=r.not(o)),r[this.widgetName]()},raise:function(e){throw"Widget ["+this.widgetName+"]: "+e}})}(e),function(e,t){e.extend(e.mobile,{loadingMessageTextVisible:n,loadingMessageTheme:n,loadingMessage:n,showPageLoadingMsg:function(t,i,n){e.mobile.loading("show",t,i,n)},hidePageLoadingMsg:function(){e.mobile.loading("hide")},loading:function(){this.loaderWidget.loader.apply(this.loaderWidget,arguments)}});var i="ui-loader",o=e("html"),r=e(t);e.widget("mobile.loader",{options:{theme:"a",textVisible:!1,html:"",text:"loading"},defaultHtml:"<div class='"+i+"'><span class='ui-icon ui-icon-loading'></span><h1></h1></div>",fakeFixLoader:function(){var t=e("."+e.mobile.activeBtnClass).first();this.element.css({top:e.support.scrollTop&&r.scrollTop()+r.height()/2||t.length&&t.offset().top||100})},checkLoaderPosition:function(){var t=this.element.offset(),i=r.scrollTop(),n=e.mobile.getScreenHeight();(t.top<i||t.top-i>n)&&(this.element.addClass("ui-loader-fakefix"),this.fakeFixLoader(),r.unbind("scroll",this.checkLoaderPosition).bind("scroll",this.fakeFixLoader))},resetHtml:function(){this.element.html(e(this.defaultHtml).html())},show:function(t,s,a){var l,c,u;this.resetHtml(),"object"===e.type(t)?(u=e.extend({},this.options,t),t=u.theme||e.mobile.loadingMessageTheme):(u=this.options,t=t||e.mobile.loadingMessageTheme||u.theme),c=s||e.mobile.loadingMessage||u.text,o.addClass("ui-loading"),(e.mobile.loadingMessage!==!1||u.html)&&(l=e.mobile.loadingMessageTextVisible!==n?e.mobile.loadingMessageTextVisible:u.textVisible,this.element.attr("class",i+" ui-corner-all ui-body-"+t+" ui-loader-"+(l||s||t.text?"verbose":"default")+(u.textonly||a?" ui-loader-textonly":"")),u.html?this.element.html(u.html):this.element.find("h1").text(c),this.element.appendTo(e.mobile.pageContainer),this.checkLoaderPosition(),r.bind("scroll",e.proxy(this.checkLoaderPosition,this)))},hide:function(){o.removeClass("ui-loading"),e.mobile.loadingMessage&&this.element.removeClass("ui-loader-fakefix"),e(t).unbind("scroll",e.proxy(this.fakeFixLoader,this)),e(t).unbind("scroll",e.proxy(this.checkLoaderPosition,this))}}),r.bind("pagecontainercreate",function(){e.mobile.loaderWidget=e.mobile.loaderWidget||e(e.mobile.loader.prototype.defaultHtml).loader()})}(e,this),function(e,t,i,n){function o(e){for(;e&&"undefined"!=typeof e.originalEvent;)e=e.originalEvent;return e}function r(t,i){var r,s,a,l,c,u,d,h,p,f=t.type;if(t=e.Event(t),t.type=i,r=t.originalEvent,s=e.event.props,f.search(/^(mouse|click)/)>-1&&(s=N),r)for(d=s.length,l;d;)l=s[--d],t[l]=r[l];if(f.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1),-1!==f.search(/^touch/)&&(a=o(r),f=a.touches,c=a.changedTouches,u=f&&f.length?f[0]:c&&c.length?c[0]:n))for(h=0,p=S.length;p>h;h++)l=S[h],t[l]=u[l];return t}function s(t){for(var i,n,o={};t;){i=e.data(t,k);for(n in i)i[n]&&(o[n]=o.hasVirtualBinding=!0);t=t.parentNode}return o}function a(t,i){for(var n;t;){if(n=e.data(t,k),n&&(!i||n[i]))return t;t=t.parentNode}return null}function l(){O=!1}function c(){O=!0}function u(){z=0,B.length=0,R=!1,c()}function d(){l()}function h(){p(),P=setTimeout(function(){P=0,u()},e.vmouse.resetTimerDuration)}function p(){P&&(clearTimeout(P),P=0)}function f(t,i,n){var o;return(n&&n[t]||!n&&a(i.target,t))&&(o=r(i,t),e(i.target).trigger(o)),o}function m(t){var i=e.data(t.target,T);if(!(R||z&&z===i)){var n=f("v"+t.type,t);n&&(n.isDefaultPrevented()&&t.preventDefault(),n.isPropagationStopped()&&t.stopPropagation(),n.isImmediatePropagationStopped()&&t.stopImmediatePropagation())}}function g(t){var i,n,r=o(t).touches;if(r&&1===r.length&&(i=t.target,n=s(i),n.hasVirtualBinding)){z=F++,e.data(i,T,z),p(),d(),H=!1;var a=o(t).touches[0];M=a.pageX,I=a.pageY,f("vmouseover",t,n),f("vmousedown",t,n)}}function v(e){O||(H||f("vmousecancel",e,s(e.target)),H=!0,h())}function b(t){if(!O){var i=o(t).touches[0],n=H,r=e.vmouse.moveDistanceThreshold,a=s(t.target);H=H||Math.abs(i.pageX-M)>r||Math.abs(i.pageY-I)>r,H&&!n&&f("vmousecancel",t,a),f("vmousemove",t,a),h()}}function y(e){if(!O){c();var t,i=s(e.target);if(f("vmouseup",e,i),!H){var n=f("vclick",e,i);n&&n.isDefaultPrevented()&&(t=o(e).changedTouches[0],B.push({touchID:z,x:t.clientX,y:t.clientY}),R=!0)}f("vmouseout",e,i),H=!1,h()}}function _(t){var i,n=e.data(t,k);if(n)for(i in n)if(n[i])return!0;return!1}function C(){}function x(t){var i=t.substr(1);return{setup:function(){_(this)||e.data(this,k,{});var n=e.data(this,k);n[t]=!0,A[t]=(A[t]||0)+1,1===A[t]&&j.bind(i,m),e(this).bind(i,C),L&&(A.touchstart=(A.touchstart||0)+1,1===A.touchstart&&j.bind("touchstart",g).bind("touchend",y).bind("touchmove",b).bind("scroll",v))},teardown:function(){--A[t],A[t]||j.unbind(i,m),L&&(--A.touchstart,A.touchstart||j.unbind("touchstart",g).unbind("touchmove",b).unbind("touchend",y).unbind("scroll",v));var n=e(this),o=e.data(this,k);o&&(o[t]=!1),n.unbind(i,C),_(this)||n.removeData(k)}}}var w,k="virtualMouseBindings",T="virtualTouchID",D="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),S="clientX clientY pageX pageY screenX screenY".split(" "),E=e.event.mouseHooks?e.event.mouseHooks.props:[],N=e.event.props.concat(E),A={},P=0,M=0,I=0,H=!1,B=[],R=!1,O=!1,L="addEventListener"in i,j=e(i),F=1,z=0;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var q=0;q<D.length;q++)e.event.special[D[q]]=x(D[q]);L&&i.addEventListener("click",function(t){var i,n,o,r,s,a,l=B.length,c=t.target;if(l)for(i=t.clientX,n=t.clientY,w=e.vmouse.clickDistanceThreshold,o=c;o;){for(r=0;l>r;r++)if(s=B[r],a=0,o===c&&Math.abs(s.x-i)<w&&Math.abs(s.y-n)<w||e.data(o,T)===s.touchID)return t.preventDefault(),t.stopPropagation(),void 0;o=o.parentNode}},!0)}(e,t,i),function(e,t,n){function o(t,i,n){var o=n.type;n.type=i,e.event.handle.call(t,n),n.type=o}e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,i){e.fn[i]=function(e){return e?this.bind(i,e):this.trigger(i)},e.attrFn[i]=!0});var r="ontouchend"in i,s="touchmove scroll",a=r?"touchstart":"mousedown",l=r?"touchend":"mouseup",c=r?"touchmove":"mousemove";e.event.special.scrollstart={enabled:!0,setup:function(){function t(e,t){i=t,o(r,i?"scrollstart":"scrollstop",e)}var i,n,r=this,a=e(r);a.bind(s,function(o){e.event.special.scrollstart.enabled&&(i||t(o,!0),clearTimeout(n),n=setTimeout(function(){t(o,!1)},50))})}},e.event.special.tap={tapholdThreshold:750,setup:function(){var t=this,n=e(t);n.bind("vmousedown",function(r){function s(){clearTimeout(c)}function a(){s(),n.unbind("vclick",l).unbind("vmouseup",s),e(i).unbind("vmousecancel",a)}function l(e){a(),u===e.target&&o(t,"tap",e)}if(r.which&&1!==r.which)return!1;{var c,u=r.target;r.originalEvent}n.bind("vmouseup",s).bind("vclick",l),e(i).bind("vmousecancel",a),c=setTimeout(function(){o(t,"taphold",e.Event("taphold",{target:u}))},e.event.special.tap.tapholdThreshold)})}},e.event.special.swipe={scrollSupressionThreshold:10,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var t=this,i=e(t);i.bind(a,function(t){function o(t){if(a){var i=t.originalEvent.touches?t.originalEvent.touches[0]:t;r={time:(new Date).getTime(),coords:[i.pageX,i.pageY]},Math.abs(a.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()}}var r,s=t.originalEvent.touches?t.originalEvent.touches[0]:t,a={time:(new Date).getTime(),coords:[s.pageX,s.pageY],origin:e(t.target)};i.bind(c,o).one(l,function(){i.unbind(c,o),a&&r&&r.time-a.time<e.event.special.swipe.durationThreshold&&Math.abs(a.coords[0]-r.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(a.coords[1]-r.coords[1])<e.event.special.swipe.verticalDistanceThreshold&&a.origin.trigger("swipe").trigger(a.coords[0]>r.coords[0]?"swipeleft":"swiperight"),a=r=n})})}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(t,i){e.event.special[t]={setup:function(){e(this).bind(i,e.noop)}}})}(e,this),function(e){e.extend(e.support,{orientation:"orientation"in t&&"onorientationchange"in t})}(e),function(e){e.event.special.throttledresize={setup:function(){e(this).bind("resize",r)},teardown:function(){e(this).unbind("resize",r)}};var t,i,n,o=250,r=function(){i=(new Date).getTime(),n=i-s,n>=o?(s=i,e(this).trigger("throttledresize")):(t&&clearTimeout(t),t=setTimeout(r,o-n))},s=0}(e),function(e,t){function n(){var e=o();e!==r&&(r=e,l.trigger(c))}var o,r,s,a,l=e(t),c="orientationchange",u={0:!0,180:!0};if(e.support.orientation){var d=t.innerWidth||e(t).width(),h=t.innerHeight||e(t).height(),p=50;s=d>h&&d-h>p,a=u[t.orientation],(s&&a||!s&&!a)&&(u={"-90":!0,90:!0})}e.event.special.orientationchange=e.extend({},e.event.special.orientationchange,{setup:function(){return e.support.orientation&&!e.event.special.orientationchange.disabled?!1:(r=o(),l.bind("throttledresize",n),void 0)},teardown:function(){return e.support.orientation&&!e.event.special.orientationchange.disabled?!1:(l.unbind("throttledresize",n),void 0)},add:function(e){var t=e.handler;e.handler=function(e){return e.orientation=o(),t.apply(this,arguments)}}}),e.event.special.orientationchange.orientation=o=function(){var n=!0,o=i.documentElement;return n=e.support.orientation?u[t.orientation]:o&&o.clientWidth/o.clientHeight<1.1,n?"portrait":"landscape"},e.fn[c]=function(e){return e?this.bind(c,e):this.trigger(c)},e.attrFn[c]=!0}(e,this),function(e){var n=(e(t),e("html"));e.mobile.media=function(){var t={},o=e("<div id='jquery-mediatest'></div>"),r=e("<body>").append(o);return function(e){if(!(e in t)){var s=i.createElement("style"),a="@media "+e+" { #jquery-mediatest { position:absolute; } }";s.type="text/css",s.styleSheet?s.styleSheet.cssText=a:s.appendChild(i.createTextNode(a)),n.prepend(r).prepend(s),t[e]="absolute"===o.css("position"),r.add(s).remove()}return t[e]}}()}(e),function(e,n){function o(e){var t=e.charAt(0).toUpperCase()+e.substr(1),i=(e+" "+d.join(t+" ")+t).split(" ");for(var o in i)if(u[i[o]]!==n)return!0}function r(e,t,n){for(var o,r=i.createElement("div"),s=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},a=function(e){return"-"+e.charAt(0).toLowerCase()+e.substr(1)+"-"},l=function(i){var n=a(i)+e+": "+t+";",l=s(i),c=l+s(e);r.setAttribute("style",n),r.style[c]&&(o=!0)},c=n?[n]:d,u=0;u<c.length;u++)l(c[u]);return!!o}function s(){var t="transform-3d";return r("perspective","10px","moz")||e.mobile.media("(-"+d.join("-"+t+"),(-")+"-"+t+"),("+t+")")}function a(){var t,i,n=location.protocol+"//"+location.host+location.pathname+"ui-dir/",o=e("head base"),r=null,s="";return o.length?s=o.attr("href"):o=r=e("<base>",{href:n}).appendTo("head"),t=e("<a href='testurl' />").prependTo(c),i=t[0].href,o[0].href=s||location.pathname,r&&r.remove(),0===i.indexOf(n)}function l(){var e,n=i.createElement("x"),o=i.documentElement,r=t.getComputedStyle;return"pointerEvents"in n.style?(n.style.pointerEvents="auto",n.style.pointerEvents="x",o.appendChild(n),e=r&&"auto"===r(n,"").pointerEvents,o.removeChild(n),!!e):!1}var c=e("<body>").prependTo("html"),u=c[0].style,d=["Webkit","Moz","O"],h="palmGetResource"in t,p=t.opera,f=t.operamini&&"[object OperaMini]"==={}.toString.call(t.operamini),m=t.blackberry;e.extend(e.mobile,{browser:{}}),e.mobile.browser.ie=function(){var e=3,t=i.createElement("div"),n=t.all||[];do t.innerHTML="<!--[if gt IE "+ ++e+"]><br><![endif]-->";while(n[0]);return e>4?e:!e}(),e.extend(e.support,{cssTransitions:"WebKitTransitionEvent"in t||r("transition","height 100ms linear")&&!p,pushState:"pushState"in history&&"replaceState"in history,mediaquery:e.mobile.media("only all"),cssPseudoElement:!!o("content"),touchOverflow:!!o("overflowScrolling"),cssTransform3d:s(),boxShadow:!!o("boxShadow")&&!m,scrollTop:("pageXOffset"in t||"scrollTop"in i.documentElement||"scrollTop"in c[0])&&!h&&!f,dynamicBaseTag:a(),cssPointerEvents:l()}),c.remove();var g=function(){var e=t.navigator.userAgent;return e.indexOf("Nokia")>-1&&(e.indexOf("Symbian/3")>-1||e.indexOf("Series60/5")>-1)&&e.indexOf("AppleWebKit")>-1&&e.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}();e.mobile.gradeA=function(){return e.support.mediaquery||e.mobile.browser.ie&&e.mobile.browser.ie>=7},e.mobile.ajaxBlacklist=t.blackberry&&!t.WebKitPoint||f||g,g&&e(function(){e("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")}),e.support.boxShadow||e("html").addClass("ui-mobile-nosupport-boxshadow")}(e),function(e){e.widget("mobile.page",e.mobile.widget,{options:{theme:"c",domCache:!1,keepNativeDefault:":jqmData(role='none'), :jqmData(role='nojs')"},_create:function(){var e=this;return e._trigger("beforecreate")===!1?!1:(e.element.attr("tabindex","0").addClass("ui-page ui-body-"+e.options.theme).bind("pagebeforehide",function(){e.removeContainerBackground()}).bind("pagebeforeshow",function(){e.setContainerBackground()}),void 0)},removeContainerBackground:function(){e.mobile.pageContainer.removeClass("ui-overlay-"+e.mobile.getInheritedTheme(this.element.parent()))},setContainerBackground:function(t){this.options.theme&&e.mobile.pageContainer.addClass("ui-overlay-"+(t||this.options.theme))},keepNativeSelector:function(){var t=this.options,i=t.keepNative&&e.trim(t.keepNative);return i&&t.keepNative!==t.keepNativeDefault?[t.keepNative,t.keepNativeDefault].join(", "):t.keepNativeDefault}})}(e),// Copyright (c) 2010 "Cowboy" Ben Alman,
105
+ function(e,t,n){function o(e){return e=e||location.href,"#"+e.replace(/^[^#]*#?(.*)$/,"$1")}var r,s="hashchange",a=i,l=e.event.special,c=a.documentMode,u="on"+s in t&&(c===n||c>7);e.fn[s]=function(e){return e?this.bind(s,e):this.trigger(s)},e.fn[s].delay=50,l[s]=e.extend(l[s],{setup:function(){return u?!1:(e(r.start),void 0)},teardown:function(){return u?!1:(e(r.stop),void 0)}}),r=function(){function i(){var n=o(),a=p(c);n!==c?(h(c=n,a),e(t).trigger(s)):a!==c&&(location.href=location.href.replace(/#.*/,"")+a),r=setTimeout(i,e.fn[s].delay)}var r,l={},c=o(),d=function(e){return e},h=d,p=d;return l.start=function(){r||i()},l.stop=function(){r&&clearTimeout(r),r=n},e.browser.msie&&!u&&function(){var t,n;l.start=function(){t||(n=e.fn[s].src,n=n&&n+o(),t=e('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){n||h(o()),i()}).attr("src",n||"javascript:0").insertAfter("body")[0].contentWindow,a.onpropertychange=function(){try{"title"===event.propertyName&&(t.document.title=a.title)}catch(e){}})},l.stop=d,p=function(){return o(t.location.href)},h=function(i,n){var o=t.document,r=e.fn[s].domain;i!==n&&(o.title=a.title,o.open(),r&&o.write('<script>document.domain="'+r+'"</script>'),o.close(),t.location.hash=i)}}(),l}()}(e,this),function(e,t,i){var n=function(n){return n===i&&(n=!0),function(i,o,r,s){var a=new e.Deferred,l=o?" reverse":"",c=e.mobile.urlHistory.getActive(),u=c.lastScroll||e.mobile.defaultHomeScroll,d=e.mobile.getScreenHeight(),h=e.mobile.maxTransitionWidth!==!1&&e(t).width()>e.mobile.maxTransitionWidth,p=!e.support.cssTransitions||h||!i||"none"===i||Math.max(e(t).scrollTop(),u)>e.mobile.getMaxScrollForTransition(),f=" ui-page-pre-in",m=function(){e.mobile.pageContainer.toggleClass("ui-mobile-viewport-transitioning viewport-"+i)},g=function(){e.event.special.scrollstart.enabled=!1,t.scrollTo(0,u),setTimeout(function(){e.event.special.scrollstart.enabled=!0},150)},v=function(){s.removeClass(e.mobile.activePageClass+" out in reverse "+i).height("")},b=function(){n?s.animationComplete(y):y(),s.height(d+e(t).scrollTop()).addClass(i+" out"+l)},y=function(){s&&n&&v(),_()},_=function(){r.css("z-index",-10),r.addClass(e.mobile.activePageClass+f),e.mobile.focusPage(r),r.height(d+u),g(),r.css("z-index",""),p||r.animationComplete(C),r.removeClass(f).addClass(i+" in"+l),p&&C()},C=function(){n||s&&v(),r.removeClass("out in reverse "+i).height(""),m(),e(t).scrollTop()!==u&&g(),a.resolve(i,o,r,s,!0)};return m(),s&&!p?b():y(),a.promise()}},o=n(),r=n(!1),s=function(){return 3*e.mobile.getScreenHeight()};e.mobile.defaultTransitionHandler=o,e.mobile.transitionHandlers={"default":e.mobile.defaultTransitionHandler,sequential:o,simultaneous:r},e.mobile.transitionFallbacks={},e.mobile._maybeDegradeTransition=function(t){return t&&!e.support.cssTransform3d&&e.mobile.transitionFallbacks[t]&&(t=e.mobile.transitionFallbacks[t]),t},e.mobile.getMaxScrollForTransition=e.mobile.getMaxScrollForTransition||s}(e,this),function(e,n){function o(t){!f||f.closest("."+e.mobile.activePageClass).length&&!t||f.removeClass(e.mobile.activeBtnClass),f=null}function r(){v=!1,g.length>0&&e.mobile.changePage.apply(null,g.pop())}function s(t,i,n,o){i&&i.data("page")._trigger("beforehide",null,{nextPage:t}),t.data("page")._trigger("beforeshow",null,{prevPage:i||e("")}),e.mobile.hidePageLoadingMsg(),n=e.mobile._maybeDegradeTransition(n);var r=e.mobile.transitionHandlers[n||"default"]||e.mobile.defaultTransitionHandler,s=r(n,o,t,i);return s.done(function(){i&&i.data("page")._trigger("hide",null,{nextPage:t}),t.data("page")._trigger("show",null,{prevPage:i||e("")})}),s}function a(){var t=e("."+e.mobile.activePageClass),i=parseFloat(t.css("padding-top")),n=parseFloat(t.css("padding-bottom")),o=parseFloat(t.css("border-top-width")),r=parseFloat(t.css("border-bottom-width"));t.css("min-height",w()-i-n-o-r)}function l(t,i){i&&t.attr("data-"+e.mobile.ns+"role",i),t.page()}function c(e){for(;e&&("string"!=typeof e.nodeName||"a"!==e.nodeName.toLowerCase());)e=e.parentNode;return e}function u(t){var i=e(t).closest(".ui-page").jqmData("url"),n=C.hrefNoHash;return i&&p.isPath(i)||(i=n),p.makeUrlAbsolute(i,n)}var d=e(t),h=(e("html"),e("head")),p={urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(t){if("object"===e.type(t))return t;var i=p.urlParseRE.exec(t||"")||[];return{href:i[0]||"",hrefNoHash:i[1]||"",hrefNoSearch:i[2]||"",domain:i[3]||"",protocol:i[4]||"",doubleSlash:i[5]||"",authority:i[6]||"",username:i[8]||"",password:i[9]||"",host:i[10]||"",hostname:i[11]||"",port:i[12]||"",pathname:i[13]||"",directory:i[14]||"",filename:i[15]||"",search:i[16]||"",hash:i[17]||""}},makePathAbsolute:function(e,t){if(e&&"/"===e.charAt(0))return e;e=e||"",t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"";for(var i=t?t.split("/"):[],n=e.split("/"),o=0;o<n.length;o++){var r=n[o];switch(r){case".":break;case"..":i.length&&i.pop();break;default:i.push(r)}}return"/"+i.join("/")},isSameDomain:function(e,t){return p.parseUrl(e).domain===p.parseUrl(t).domain},isRelativeUrl:function(e){return""===p.parseUrl(e).protocol},isAbsoluteUrl:function(e){return""!==p.parseUrl(e).protocol},makeUrlAbsolute:function(e,t){if(!p.isRelativeUrl(e))return e;t===n&&(t=C);var i=p.parseUrl(e),o=p.parseUrl(t),r=i.protocol||o.protocol,s=i.protocol?i.doubleSlash:i.doubleSlash||o.doubleSlash,a=i.authority||o.authority,l=""!==i.pathname,c=p.makePathAbsolute(i.pathname||o.filename,o.pathname),u=i.search||!l&&o.search||"",d=i.hash;return r+s+a+c+u+d},addSearchParams:function(t,i){var n=p.parseUrl(t),o="object"==typeof i?e.param(i):i,r=n.search||"?";return n.hrefNoSearch+r+("?"!==r.charAt(r.length-1)?"&":"")+o+(n.hash||"")},convertUrlToDataUrl:function(e){var i=p.parseUrl(e);return p.isEmbeddedPage(i)?i.hash.split(b)[0].replace(/^#/,""):p.isSameDomain(i,C)?i.hrefNoHash.replace(C.domain,"").split(b)[0]:t.decodeURIComponent(e)},get:function(e){return e===n&&(e=location.hash),p.stripHash(e).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(t){var i="&"+e.mobile.subPageUrlKey;return t&&t.split(i)[0].split(b)[0]},set:function(e){location.hash=e},isPath:function(e){return/\//.test(e)},clean:function(e){return e.replace(C.domain,"")},stripHash:function(e){return e.replace(/^#/,"")},cleanHash:function(e){return p.stripHash(e.replace(/\?.*$/,"").replace(b,""))},isHashValid:function(e){return/^#[^#]+$/.test(e)},isExternal:function(e){var t=p.parseUrl(e);return t.protocol&&t.domain!==_.domain?!0:!1},hasProtocol:function(e){return/^(:?\w+:)/.test(e)},isFirstPageUrl:function(t){var i=p.parseUrl(p.makeUrlAbsolute(t,C)),o=i.hrefNoHash===_.hrefNoHash||x&&i.hrefNoHash===C.hrefNoHash,r=e.mobile.firstPage,s=r&&r[0]?r[0].id:n;return o&&(!i.hash||"#"===i.hash||s&&i.hash.replace(/^#/,"")===s)},isEmbeddedPage:function(e){var t=p.parseUrl(e);return""!==t.protocol?t.hash&&(t.hrefNoHash===_.hrefNoHash||x&&t.hrefNoHash===C.hrefNoHash):/^#/.test(t.href)},isPermittedCrossDomainRequest:function(t,i){return e.mobile.allowCrossDomainPages&&"file:"===t.protocol&&-1!==i.search(/^https?:/)}},f=null,m={stack:[],activeIndex:0,getActive:function(){return m.stack[m.activeIndex]},getPrev:function(){return m.stack[m.activeIndex-1]},getNext:function(){return m.stack[m.activeIndex+1]},addNew:function(e,t,i,n,o){m.getNext()&&m.clearForward(),m.stack.push({url:e,transition:t,title:i,pageUrl:n,role:o}),m.activeIndex=m.stack.length-1},clearForward:function(){m.stack=m.stack.slice(0,m.activeIndex+1)},directHashChange:function(t){{var i,o,r;this.getActive()}e.each(m.stack,function(e,n){decodeURIComponent(t.currentUrl)===decodeURIComponent(n.url)&&(i=e<m.activeIndex,o=!i,r=e)}),this.activeIndex=r!==n?r:this.activeIndex,i?(t.either||t.isBack)(!0):o&&(t.either||t.isForward)(!1)},ignoreNextHashChange:!1},g=[],v=!1,b="&ui-state=dialog",y=h.children("base"),_=p.parseUrl(location.href),C=y.length?p.parseUrl(p.makeUrlAbsolute(y.attr("href"),_.href)):_,x=_.hrefNoHash!==C.hrefNoHash,w=e.mobile.getScreenHeight,k=e.support.dynamicBaseTag?{element:y.length?y:e("<base>",{href:C.hrefNoHash}).prependTo(h),set:function(e){k.element.attr("href",p.makeUrlAbsolute(e,C))},reset:function(){k.element.attr("href",C.hrefNoHash)}}:n;e.mobile.focusPage=function(e){var t=e.find("[autofocus]"),i=e.find(".ui-title:eq(0)");return t.length?(t.focus(),void 0):(i.length?i.focus():e.focus(),void 0)};var T,D,S=!0;T=function(){if(S){var t=e.mobile.urlHistory.getActive();if(t){var i=d.scrollTop();t.lastScroll=i<e.mobile.minScrollBack?e.mobile.defaultHomeScroll:i}}},D=function(){setTimeout(T,100)},d.bind(e.support.pushState?"popstate":"hashchange",function(){S=!1}),d.one(e.support.pushState?"popstate":"hashchange",function(){S=!0}),d.one("pagecontainercreate",function(){e.mobile.pageContainer.bind("pagechange",function(){S=!0,d.unbind("scrollstop",D),d.bind("scrollstop",D)})}),d.bind("scrollstop",D),e.mobile._maybeDegradeTransition=e.mobile._maybeDegradeTransition||function(e){return e},e.fn.animationComplete=function(t){return e.support.cssTransitions?e(this).one("webkitAnimationEnd animationend",t):(setTimeout(t,0),e(this))},e.mobile.path=p,e.mobile.base=k,e.mobile.urlHistory=m,e.mobile.dialogHashKey=b,e.mobile.allowCrossDomainPages=!1,e.mobile.getDocumentUrl=function(t){return t?e.extend({},_):_.href},e.mobile.getDocumentBase=function(t){return t?e.extend({},C):C.href},e.mobile._bindPageRemove=function(){var t=e(this);!t.data("page").options.domCache&&t.is(":jqmData(external-page='true')")&&t.bind("pagehide.remove",function(){var t=e(this),i=new e.Event("pageremove");t.trigger(i),i.isDefaultPrevented()||t.removeWithDependents()})},e.mobile.loadPage=function(t,i){var o=e.Deferred(),r=e.extend({},e.mobile.loadPage.defaults,i),s=null,a=null,c=function(){var t=e.mobile.activePage&&u(e.mobile.activePage);return t||C.hrefNoHash},d=p.makeUrlAbsolute(t,c());r.data&&"get"===r.type&&(d=p.addSearchParams(d,r.data),r.data=n),r.data&&"post"===r.type&&(r.reloadPage=!0);var h=p.getFilePath(d),f=p.convertUrlToDataUrl(d);if(r.pageContainer=r.pageContainer||e.mobile.pageContainer,s=r.pageContainer.children(":jqmData(url='"+f+"')"),0===s.length&&f&&!p.isPath(f)&&(s=r.pageContainer.children("#"+f).attr("data-"+e.mobile.ns+"url",f).jqmData("url",f)),0===s.length)if(e.mobile.firstPage&&p.isFirstPageUrl(h))e.mobile.firstPage.parent().length&&(s=e(e.mobile.firstPage));else if(p.isEmbeddedPage(h))return o.reject(d,i),o.promise();if(k&&k.reset(),s.length){if(!r.reloadPage)return l(s,r.role),o.resolve(d,i,s),o.promise();a=s}var m=r.pageContainer,g=new e.Event("pagebeforeload"),v={url:t,absUrl:d,dataUrl:f,deferred:o,options:r};if(m.trigger(g,v),g.isDefaultPrevented())return o.promise();if(r.showLoadMsg)var b=setTimeout(function(){e.mobile.showPageLoadingMsg()},r.loadMsgDelay),y=function(){clearTimeout(b),e.mobile.hidePageLoadingMsg()};return e.mobile.allowCrossDomainPages||p.isSameDomain(_,d)?e.ajax({url:h,type:r.type,data:r.data,dataType:"html",success:function(n,c,u){var m=e("<div></div>"),g=n.match(/<title[^>]*>([^<]*)/)&&RegExp.$1,b=new RegExp("(<[^>]+\\bdata-"+e.mobile.ns+"role=[\"']?page[\"']?[^>]*>)"),_=new RegExp("\\bdata-"+e.mobile.ns+"url=[\"']?([^\"'>]*)[\"']?");if(b.test(n)&&RegExp.$1&&_.test(RegExp.$1)&&RegExp.$1&&(t=h=p.getFilePath(e("<div>"+RegExp.$1+"</div>").text())),k&&k.set(h),m.get(0).innerHTML=n,s=m.find(":jqmData(role='page'), :jqmData(role='dialog')").first(),s.length||(s=e("<div data-"+e.mobile.ns+"role='page'>"+n.split(/<\/?body[^>]*>/gim)[1]+"</div>")),g&&!s.jqmData("title")&&(~g.indexOf("&")&&(g=e("<div>"+g+"</div>").text()),s.jqmData("title",g)),!e.support.dynamicBaseTag){var C=p.get(h);s.find("[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]").each(function(){var t=e(this).is("[href]")?"href":e(this).is("[src]")?"src":"action",i=e(this).attr(t);i=i.replace(location.protocol+"//"+location.host+location.pathname,""),/^(\w+:|#|\/)/.test(i)||e(this).attr(t,C+i)})}s.attr("data-"+e.mobile.ns+"url",p.convertUrlToDataUrl(h)).attr("data-"+e.mobile.ns+"external-page",!0).appendTo(r.pageContainer),s.one("pagecreate",e.mobile._bindPageRemove),l(s,r.role),d.indexOf("&"+e.mobile.subPageUrlKey)>-1&&(s=r.pageContainer.children(":jqmData(url='"+f+"')")),r.showLoadMsg&&y(),v.xhr=u,v.textStatus=c,v.page=s,r.pageContainer.trigger("pageload",v),o.resolve(d,i,s,a)},error:function(t,n,s){k&&k.set(p.get()),v.xhr=t,v.textStatus=n,v.errorThrown=s;var a=new e.Event("pageloadfailed");r.pageContainer.trigger(a,v),a.isDefaultPrevented()||(r.showLoadMsg&&(y(),e.mobile.showPageLoadingMsg(e.mobile.pageLoadErrorMessageTheme,e.mobile.pageLoadErrorMessage,!0),setTimeout(e.mobile.hidePageLoadingMsg,1500)),o.reject(d,i))}}):o.reject(d,i),o.promise()},e.mobile.loadPage.defaults={type:"get",data:n,reloadPage:!1,role:n,showLoadMsg:!1,pageContainer:n,loadMsgDelay:50},e.mobile.changePage=function(t,a){if(v)return g.unshift(arguments),void 0;var c=e.extend({},e.mobile.changePage.defaults,a);c.pageContainer=c.pageContainer||e.mobile.pageContainer,c.fromPage=c.fromPage||e.mobile.activePage;var u=c.pageContainer,d=new e.Event("pagebeforechange"),h={toPage:t,options:c};if(u.trigger(d,h),!d.isDefaultPrevented()){if(t=h.toPage,v=!0,"string"==typeof t)return e.mobile.loadPage(t,c).done(function(t,i,n,o){v=!1,i.duplicateCachedPage=o,e.mobile.changePage(n,i)}).fail(function(){v=!1,o(!0),r(),c.pageContainer.trigger("pagechangefailed",h)}),void 0;t[0]!==e.mobile.firstPage[0]||c.dataUrl||(c.dataUrl=_.hrefNoHash);var f=c.fromPage,y=c.dataUrl&&p.convertUrlToDataUrl(c.dataUrl)||t.jqmData("url"),C=y,x=(p.getFilePath(y),m.getActive()),w=0===m.activeIndex,k=0,T=i.title,D="dialog"===c.role||"dialog"===t.jqmData("role");if(f&&f[0]===t[0]&&!c.allowSamePageTransition)return v=!1,u.trigger("pagechange",h),c.fromHashChange&&m.directHashChange({currentUrl:y,isBack:function(){},isForward:function(){}}),void 0;l(t,c.role),c.fromHashChange&&m.directHashChange({currentUrl:y,isBack:function(){k=-1},isForward:function(){k=1}});try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()?e(i.activeElement).blur():e("input:focus, textarea:focus, select:focus").blur()}catch(S){}var E=!1;D&&x&&(x.url.indexOf(b)>-1&&!e.mobile.activePage.is(".ui-dialog")&&(c.changeHash=!1,E=!0),y=(x.url||"")+b,0===m.activeIndex&&y===m.initialDst&&(y+=b)),c.changeHash!==!1&&y&&(m.ignoreNextHashChange=!0,p.set(y));var N=x?t.jqmData("title")||t.children(":jqmData(role='header')").find(".ui-title").getEncodedText():T;N&&T===i.title&&(T=N),t.jqmData("title")||t.jqmData("title",T),c.transition=c.transition||(k&&!w?x.transition:n)||(D?e.mobile.defaultDialogTransition:e.mobile.defaultPageTransition),k||E||m.addNew(y,c.transition,T,C,c.role),i.title=m.getActive().title,e.mobile.activePage=t,c.reverse=c.reverse||0>k,s(t,f,c.transition,c.reverse).done(function(i,n,s,a,l){o(),c.duplicateCachedPage&&c.duplicateCachedPage.remove(),l||e.mobile.focusPage(t),r(),u.trigger("pagechange",h)})}},e.mobile.changePage.defaults={transition:n,reverse:!1,changeHash:!0,fromHashChange:!1,role:n,duplicateCachedPage:n,pageContainer:n,showLoadMsg:!0,dataUrl:n,fromPage:n,allowSamePageTransition:!1},e.mobile.navreadyDeferred=e.Deferred(),e.mobile.navreadyDeferred.done(function(){e(i).delegate("form","submit",function(t){var i=e(this);if(e.mobile.ajaxEnabled&&!i.is(":jqmData(ajax='false')")&&i.jqmHijackable().length){var n=i.attr("method"),o=i.attr("target"),r=i.attr("action");r||(r=u(i),r===C.hrefNoHash&&(r=_.hrefNoSearch)),r=p.makeUrlAbsolute(r,u(i)),p.isExternal(r)&&!p.isPermittedCrossDomainRequest(_,r)||o||(e.mobile.changePage(r,{type:n&&n.length&&n.toLowerCase()||"get",data:i.serialize(),transition:i.jqmData("transition"),reverse:"reverse"===i.jqmData("direction"),reloadPage:!0}),t.preventDefault())}}),e(i).bind("vclick",function(t){if(!(t.which>1)&&e.mobile.linkBindingEnabled){var i=c(t.target);e(i).jqmHijackable().length&&i&&"#"!==p.parseUrl(i.getAttribute("href")||"#").hash&&(o(!0),f=e(i).closest(".ui-btn").not(".ui-disabled"),f.addClass(e.mobile.activeBtnClass))}}),e(i).bind("click",function(i){if(e.mobile.linkBindingEnabled){var r,s=c(i.target),a=e(s);if(s&&!(i.which>1)&&a.jqmHijackable().length){if(r=function(){t.setTimeout(function(){o(!0)},200)},a.is(":jqmData(rel='back')"))return t.history.back(),!1;var l=u(a),d=p.makeUrlAbsolute(a.attr("href")||"#",l);if(!e.mobile.ajaxEnabled&&!p.isEmbeddedPage(d))return r(),void 0;if(-1!==d.search("#")){if(d=d.replace(/[^#]*#/,""),!d)return i.preventDefault(),void 0;d=p.isPath(d)?p.makeUrlAbsolute(d,l):p.makeUrlAbsolute("#"+d,_.hrefNoHash)}var h=a.is("[rel='external']")||a.is(":jqmData(ajax='false')")||a.is("[target]"),f=h||p.isExternal(d)&&!p.isPermittedCrossDomainRequest(_,d);if(f)return r(),void 0;var m=a.jqmData("transition"),g="reverse"===a.jqmData("direction")||a.jqmData("back"),v=a.attr("data-"+e.mobile.ns+"rel")||n;e.mobile.changePage(d,{transition:m,reverse:g,role:v,link:a}),i.preventDefault()}}}),e(i).delegate(".ui-page","pageshow.prefetch",function(){var t=[];e(this).find("a:jqmData(prefetch)").each(function(){var i=e(this),n=i.attr("href");n&&-1===e.inArray(n,t)&&(t.push(n),e.mobile.loadPage(n,{role:i.attr("data-"+e.mobile.ns+"rel")}))})}),e.mobile._handleHashChange=function(i){var o=p.stripHash(i),r=0===e.mobile.urlHistory.stack.length?"none":n,s=new e.Event("navigate"),a={transition:r,changeHash:!1,fromHashChange:!0};if(0===m.stack.length&&(m.initialDst=o),e.mobile.pageContainer.trigger(s),!s.isDefaultPrevented()){if(!e.mobile.hashListeningEnabled||m.ignoreNextHashChange)return m.ignoreNextHashChange=!1,void 0;if(m.stack.length>1&&o.indexOf(b)>-1&&m.initialDst!==o){if(!e.mobile.activePage.is(".ui-dialog"))return m.directHashChange({currentUrl:o,isBack:function(){t.history.back()},isForward:function(){t.history.forward()}}),void 0;m.directHashChange({currentUrl:o,either:function(t){var i=e.mobile.urlHistory.getActive();o=i.pageUrl,e.extend(a,{role:i.role,transition:i.transition,reverse:t})}})}o?(o="string"!=typeof o||p.isPath(o)?o:p.makeUrlAbsolute("#"+o,C),e.mobile.changePage(o,a)):e.mobile.changePage(e.mobile.firstPage,a)}},d.bind("hashchange",function(){e.mobile._handleHashChange(location.hash)}),e(i).bind("pageshow",a),e(t).bind("throttledresize",a)})}(e),function(e,t){var o={},r=o,s=e(t),a=e.mobile.path.parseUrl(location.href),l=e.Deferred(),c=e.Deferred();e(i).ready(e.proxy(c,"resolve")),e(i).one("mobileinit",e.proxy(l,"resolve")),e.extend(o,{initialFilePath:function(){return a.pathname+a.search}(),hashChangeTimeout:200,hashChangeEnableTimer:n,initialHref:a.hrefNoHash,state:function(){return{hash:location.hash||"#"+r.initialFilePath,title:i.title,initialHref:r.initialHref}},resetUIKeys:function(t){var i=e.mobile.dialogHashKey,n="&"+e.mobile.subPageUrlKey,o=t.indexOf(i);return o>-1?t=t.slice(0,o)+"#"+t.slice(o):t.indexOf(n)>-1&&(t=t.split(n).join("#"+n)),t},nextHashChangePrevented:function(t){e.mobile.urlHistory.ignoreNextHashChange=t,r.onHashChangeDisabled=t},onHashChange:function(){if(!r.onHashChangeDisabled){var t,n,o=location.hash,s=e.mobile.path.isPath(o),a=s?location.href:e.mobile.getDocumentUrl();o=s?o.replace("#",""):o,n=r.state(),t=e.mobile.path.makeUrlAbsolute(o,a),s&&(t=r.resetUIKeys(t)),history.replaceState(n,i.title,t)}},onPopState:function(t){var i=t.originalEvent.state;i&&(clearTimeout(r.hashChangeEnableTimer),r.nextHashChangePrevented(!1),e.mobile._handleHashChange(i.hash),r.nextHashChangePrevented(!0),r.hashChangeEnableTimer=setTimeout(function(){r.nextHashChangePrevented(!1)},r.hashChangeTimeout))},init:function(){s.bind("hashchange",r.onHashChange),s.bind("popstate",r.onPopState),""===location.hash&&history.replaceState(r.state(),i.title,location.href)}}),e.when(c,l,e.mobile.navreadyDeferred).done(function(){e.mobile.pushStateEnabled&&e.support.pushState&&o.init()})}(e,this),function(e){e.mobile.transitionFallbacks.flip="fade"}(e,this),function(e){e.mobile.transitionFallbacks.flow="fade"}(e,this),function(e){e.mobile.transitionFallbacks.pop="fade"}(e,this),function(e){e.mobile.transitionHandlers.slide=e.mobile.transitionHandlers.simultaneous,e.mobile.transitionFallbacks.slide="fade"}(e,this),function(e){e.mobile.transitionFallbacks.slidedown="fade"}(e,this),function(e){e.mobile.transitionFallbacks.slidefade="fade"}(e,this),function(e){e.mobile.transitionFallbacks.slideup="fade"}(e,this),function(e){e.mobile.transitionFallbacks.turn="fade"}(e,this),function(e){e.mobile.page.prototype.options.degradeInputs={color:!1,date:!1,datetime:!1,"datetime-local":!1,email:!1,month:!1,number:!1,range:"number",search:"text",tel:!1,time:!1,url:!1,week:!1},e(i).bind("pagecreate create",function(t){var i,n=e.mobile.closestPageData(e(t.target));n&&(i=n.options,e(t.target).find("input").not(n.keepNativeSelector()).each(function(){var t=e(this),n=this.getAttribute("type"),o=i.degradeInputs[n]||"text";if(i.degradeInputs[n]){var r=e("<div>").html(t.clone()).html(),s=r.indexOf(" type=")>-1,a=s?/\s+type=["']?\w+['"]?/:/\/?>/,l=' type="'+o+'" data-'+e.mobile.ns+'type="'+n+'"'+(s?"":">");t.replaceWith(r.replace(a,l))}}))})}(e),function(e,t){e.widget("mobile.dialog",e.mobile.widget,{options:{closeBtnText:"Close",overlayTheme:"a",initSelector:":jqmData(role='dialog')"},_create:function(){var t=this,i=this.element,n=e("<a href='#' data-"+e.mobile.ns+"icon='delete' data-"+e.mobile.ns+"iconpos='notext'>"+this.options.closeBtnText+"</a>"),o=e("<div/>",{role:"dialog","class":"ui-dialog-contain ui-corner-all ui-overlay-shadow"});i.addClass("ui-dialog ui-overlay-"+this.options.overlayTheme),i.wrapInner(o).children().find(":jqmData(role='header')").prepend(n).end().children(":first-child").addClass("ui-corner-top").end().children(":last-child").addClass("ui-corner-bottom"),n.bind("click",function(){t.close()}),i.bind("vclick submit",function(t){var i,n=e(t.target).closest("vclick"===t.type?"a":"form");n.length&&!n.jqmData("transition")&&(i=e.mobile.urlHistory.getActive()||{},n.attr("data-"+e.mobile.ns+"transition",i.transition||e.mobile.defaultDialogTransition).attr("data-"+e.mobile.ns+"direction","reverse"))}).bind("pagehide",function(){t._isClosed=!1,e(this).find("."+e.mobile.activeBtnClass).not(".ui-slider-bg").removeClass(e.mobile.activeBtnClass)}).bind("pagebeforeshow",function(){t.options.overlayTheme&&t.element.page("removeContainerBackground").page("setContainerBackground",t.options.overlayTheme)})},close:function(){var i;this._isClosed||(this._isClosed=!0,e.mobile.hashListeningEnabled?t.history.back():(i=e.mobile.urlHistory.getPrev().url,e.mobile.path.isPath(i)||(i=e.mobile.path.makeUrlAbsolute("#"+i)),e.mobile.changePage(i,{changeHash:!1,fromHashChange:!0})))}}),e(i).delegate(e.mobile.dialog.prototype.options.initSelector,"pagecreate",function(){e.mobile.dialog.prototype.enhance(this)})}(e,this),function(e){e.mobile.page.prototype.options.backBtnText="Back",e.mobile.page.prototype.options.addBackBtn=!1,e.mobile.page.prototype.options.backBtnTheme=null,e.mobile.page.prototype.options.headerTheme="a",e.mobile.page.prototype.options.footerTheme="a",e.mobile.page.prototype.options.contentTheme=null,e(i).bind("pagecreate",function(t){var i=e(t.target),n=i.data("page").options,o=i.jqmData("role"),r=n.theme;e(":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')",i).jqmEnhanceable().each(function(){var t,s,a,l,c=e(this),u=c.jqmData("role"),d=c.jqmData("theme"),h=d||n.contentTheme||"dialog"===o&&r;if(c.addClass("ui-"+u),"header"===u||"footer"===u){var p=d||("header"===u?n.headerTheme:n.footerTheme)||r;c.addClass("ui-bar-"+p).attr("role","header"===u?"banner":"contentinfo"),"header"===u&&(t=c.children("a, button"),s=t.hasClass("ui-btn-left"),a=t.hasClass("ui-btn-right"),s=s||t.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length,a=a||t.eq(1).addClass("ui-btn-right").length),n.addBackBtn&&"header"===u&&e(".ui-page").length>1&&i.jqmData("url")!==e.mobile.path.stripHash(location.hash)&&!s&&(l=e("<a href='javascript:void(0);' class='ui-btn-left' data-"+e.mobile.ns+"rel='back' data-"+e.mobile.ns+"icon='arrow-l'>"+n.backBtnText+"</a>").attr("data-"+e.mobile.ns+"theme",n.backBtnTheme||p).prependTo(c)),c.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({role:"heading","aria-level":"1"})}else"content"===u&&(h&&c.addClass("ui-body-"+h),c.attr("role","main"))})})}(e),function(e){e.fn.fieldcontain=function(){return this.addClass("ui-field-contain ui-body ui-br").contents().filter(function(){return 3===this.nodeType&&!/\S/.test(this.nodeValue)}).remove()},e(i).bind("pagecreate create",function(t){e(":jqmData(role='fieldcontain')",t.target).jqmEnhanceable().fieldcontain()})}(e),function(e){e.fn.grid=function(t){return this.each(function(){var i,n=e(this),o=e.extend({grid:null},t),r=n.children(),s={solo:1,a:2,b:3,c:4,d:5},a=o.grid;if(!a)if(r.length<=5)for(var l in s)s[l]===r.length&&(a=l);else a="a",n.addClass("ui-grid-duo");i=s[a],n.addClass("ui-grid-"+a),r.filter(":nth-child("+i+"n+1)").addClass("ui-block-a"),i>1&&r.filter(":nth-child("+i+"n+2)").addClass("ui-block-b"),i>2&&r.filter(":nth-child(3n+3)").addClass("ui-block-c"),i>3&&r.filter(":nth-child(4n+4)").addClass("ui-block-d"),i>4&&r.filter(":nth-child(5n+5)").addClass("ui-block-e")})}}(e),function(e){e(i).bind("pagecreate create",function(t){e(":jqmData(role='nojs')",t.target).addClass("ui-nojs")})}(e),function(e,t){function n(e){for(var t;e&&(t="string"==typeof e.className&&e.className+" ",!(t&&t.indexOf("ui-btn ")>-1&&t.indexOf("ui-disabled ")<0));)e=e.parentNode;return e}e.fn.buttonMarkup=function(n){var r=this,s=function(t,i){m.setAttribute("data-"+e.mobile.ns+t,i),f.jqmData(t,i)};n=n&&"object"===e.type(n)?n:{};for(var a=0;a<r.length;a++){var l,c,u,d,h,p,f=r.eq(a),m=f[0],g=e.extend({},e.fn.buttonMarkup.defaults,{icon:n.icon!==t?n.icon:f.jqmData("icon"),iconpos:n.iconpos!==t?n.iconpos:f.jqmData("iconpos"),theme:n.theme!==t?n.theme:f.jqmData("theme")||e.mobile.getInheritedTheme(f,"c"),inline:n.inline!==t?n.inline:f.jqmData("inline"),shadow:n.shadow!==t?n.shadow:f.jqmData("shadow"),corners:n.corners!==t?n.corners:f.jqmData("corners"),iconshadow:n.iconshadow!==t?n.iconshadow:f.jqmData("iconshadow"),mini:n.mini!==t?n.mini:f.jqmData("mini")},n),v="ui-btn-inner",b="ui-btn-text";for(e.each(g,s),"popup"===f.jqmData("rel")&&f.attr("href")&&(m.setAttribute("aria-haspopup",!0),m.setAttribute("aria-owns",m.getAttribute("href"))),p=e.data("INPUT"===m.tagName||"BUTTON"===m.tagName?m.parentNode:m,"buttonElements"),p?(m=p.outer,f=e(m),u=p.inner,d=p.text,e(p.icon).remove(),p.icon=null):(u=i.createElement(g.wrapperEls),d=i.createElement(g.wrapperEls)),h=g.icon?i.createElement("span"):null,o&&!p&&o(),g.theme||(g.theme=e.mobile.getInheritedTheme(f,"c")),l="ui-btn ui-btn-up-"+g.theme,l+=g.shadow?" ui-shadow":"",l+=g.corners?" ui-btn-corner-all":"",g.mini!==t&&(l+=g.mini===!0?" ui-mini":" ui-fullsize"),g.inline!==t&&(l+=g.inline===!0?" ui-btn-inline":" ui-btn-block"),g.icon&&(g.icon="ui-icon-"+g.icon,g.iconpos=g.iconpos||"left",c="ui-icon "+g.icon,g.iconshadow&&(c+=" ui-icon-shadow")),g.iconpos&&(l+=" ui-btn-icon-"+g.iconpos,"notext"!==g.iconpos||f.attr("title")||f.attr("title",f.getEncodedText())),v+=g.corners?" ui-btn-corner-all":"",g.iconpos&&"notext"===g.iconpos&&!f.attr("title")&&f.attr("title",f.getEncodedText()),p&&f.removeClass(p.bcls||""),f.removeClass("ui-link").addClass(l),u.className=v,d.className=b,p||u.appendChild(d),h&&(h.className=c,p&&p.icon||(h.appendChild(i.createTextNode(" ")),u.appendChild(h)));m.firstChild&&!p;)d.appendChild(m.firstChild);p||m.appendChild(u),p={bcls:l,outer:m,inner:u,text:d,icon:h},e.data(m,"buttonElements",p),e.data(u,"buttonElements",p),e.data(d,"buttonElements",p),h&&e.data(h,"buttonElements",p)}return this},e.fn.buttonMarkup.defaults={corners:!0,shadow:!0,iconshadow:!0,wrapperEls:"span"};var o=function(){var t,r,s=e.mobile.buttonMarkup.hoverDelay;e(i).bind({"vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart":function(i){var o,a=e(n(i.target)),l=i.originalEvent&&/^touch/.test(i.originalEvent.type),c=i.type;a.length&&(o=a.attr("data-"+e.mobile.ns+"theme"),"vmousedown"===c?l?t=setTimeout(function(){a.removeClass("ui-btn-up-"+o).addClass("ui-btn-down-"+o)},s):a.removeClass("ui-btn-up-"+o).addClass("ui-btn-down-"+o):"vmousecancel"===c||"vmouseup"===c?a.removeClass("ui-btn-down-"+o).addClass("ui-btn-up-"+o):"vmouseover"===c||"focus"===c?l?r=setTimeout(function(){a.removeClass("ui-btn-up-"+o).addClass("ui-btn-hover-"+o)},s):a.removeClass("ui-btn-up-"+o).addClass("ui-btn-hover-"+o):("vmouseout"===c||"blur"===c||"scrollstart"===c)&&(a.removeClass("ui-btn-hover-"+o+" ui-btn-down-"+o).addClass("ui-btn-up-"+o),t&&clearTimeout(t),r&&clearTimeout(r)))},"focusin focus":function(t){e(n(t.target)).addClass(e.mobile.focusClass)},"focusout blur":function(t){e(n(t.target)).removeClass(e.mobile.focusClass)}}),o=null};e(i).bind("pagecreate create",function(t){e(":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a",t.target).jqmEnhanceable().not("button, input, .ui-btn, :jqmData(role='none'), :jqmData(role='nojs')").buttonMarkup()})}(e),function(e){e.widget("mobile.collapsible",e.mobile.widget,{options:{expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsed:!0,heading:"h1,h2,h3,h4,h5,h6,legend",theme:null,contentTheme:null,mini:!1,initSelector:":jqmData(role='collapsible')"},_create:function(){var t=this.element,i=this.options,n=t.addClass("ui-collapsible"),o=t.children(i.heading).first(),r=t.jqmData("collapsed-icon")||i.collapsedIcon,s=t.jqmData("expanded-icon")||i.expandedIcon,a=n.wrapInner("<div class='ui-collapsible-content'></div>").children(".ui-collapsible-content"),l=t.closest(":jqmData(role='collapsible-set')").addClass("ui-collapsible-set");o.is("legend")&&(o=e("<div role='heading'>"+o.html()+"</div>").insertBefore(o),o.next().remove()),l.length&&(i.theme||(i.theme=l.jqmData("theme")||e.mobile.getInheritedTheme(l,"c")),i.contentTheme||(i.contentTheme=l.jqmData("content-theme")),i.collapsedIcon||(i.collapsedIcon=l.jqmData("collapsed-icon")),i.expandedIcon||(i.expandedIcon=l.jqmData("expanded-icon")),i.iconPos||(i.iconPos=l.jqmData("iconpos")),i.mini||(i.mini=l.jqmData("mini"))),a.addClass(i.contentTheme?"ui-body-"+i.contentTheme:""),r=t.jqmData("collapsed-icon")||i.collapsedIcon||"plus",s=t.jqmData("expanded-icon")||i.expandedIcon||"minus",o.insertBefore(a).addClass("ui-collapsible-heading").append("<span class='ui-collapsible-heading-status'></span>").wrapInner("<a href='#' class='ui-collapsible-heading-toggle'></a>").find("a").first().buttonMarkup({shadow:!1,corners:!1,iconpos:t.jqmData("iconpos")||i.iconPos||"left",icon:r,mini:i.mini,theme:i.theme}).add(".ui-btn-inner",t).addClass("ui-corner-top ui-corner-bottom"),n.bind("expand collapse",function(t){if(!t.isDefaultPrevented()){var c=e(this),u="collapse"===t.type,d=i.contentTheme;t.preventDefault(),o.toggleClass("ui-collapsible-heading-collapsed",u).find(".ui-collapsible-heading-status").text(u?i.expandCueText:i.collapseCueText).end().find(".ui-icon").toggleClass("ui-icon-"+s,!u).toggleClass("ui-icon-"+r,u).end().find("a").first().removeClass(e.mobile.activeBtnClass),c.toggleClass("ui-collapsible-collapsed",u),a.toggleClass("ui-collapsible-content-collapsed",u).attr("aria-hidden",u),!d||l.length&&!n.jqmData("collapsible-last")||(o.find("a").first().add(o.find(".ui-btn-inner")).toggleClass("ui-corner-bottom",u),a.toggleClass("ui-corner-bottom",!u)),a.trigger("updatelayout")}}).trigger(i.collapsed?"collapse":"expand"),o.bind("tap",function(){o.find("a").first().addClass(e.mobile.activeBtnClass)}).bind("click",function(e){var t=o.is(".ui-collapsible-heading-collapsed")?"expand":"collapse";n.trigger(t),e.preventDefault(),e.stopPropagation()})}}),e(i).bind("pagecreate create",function(t){e.mobile.collapsible.prototype.enhanceWithin(t.target)})}(e),function(e,t){e.widget("mobile.collapsibleset",e.mobile.widget,{options:{initSelector:":jqmData(role='collapsible-set')"},_create:function(){var i=this.element.addClass("ui-collapsible-set"),n=this.options;n.theme||(n.theme=e.mobile.getInheritedTheme(i,"c")),n.contentTheme||(n.contentTheme=i.jqmData("content-theme")),n.corners||(n.corners=i.jqmData("corners")===t?!0:!1),i.jqmData("collapsiblebound")||i.jqmData("collapsiblebound",!0).bind("expand collapse",function(t){var i="collapse"===t.type,n=e(t.target).closest(".ui-collapsible"),o=n.data("collapsible");n.jqmData("collapsible-last")&&(n.find(o.options.heading).first().find("a").first().toggleClass("ui-corner-bottom",i).find(".ui-btn-inner").toggleClass("ui-corner-bottom",i),n.find(".ui-collapsible-content").toggleClass("ui-corner-bottom",!i))}).bind("expand",function(t){var i=e(t.target).closest(".ui-collapsible");i.parent().is(":jqmData(role='collapsible-set')")&&i.siblings(".ui-collapsible").trigger("collapse")
106
+ })},_init:function(){var e=this.element,t=e.children(":jqmData(role='collapsible')"),i=t.filter(":jqmData(collapsed='false')");this.refresh(),i.trigger("expand")},refresh:function(){var t=this.element,i=this.options,n=t.children(":jqmData(role='collapsible')");e.mobile.collapsible.prototype.enhance(n.not(".ui-collapsible")),n.each(function(){e(this).jqmRemoveData("collapsible-last").find(e.mobile.collapsible.prototype.options.heading).find("a").first().removeClass("ui-corner-top ui-corner-bottom").find(".ui-btn-inner").removeClass("ui-corner-top ui-corner-bottom")}),n.first().find("a").first().addClass(i.corners?"ui-corner-top":"").find(".ui-btn-inner").addClass("ui-corner-top"),n.last().jqmData("collapsible-last",!0).find("a").first().addClass(i.corners?"ui-corner-bottom":"").find(".ui-btn-inner").addClass("ui-corner-bottom")}}),e(i).bind("pagecreate create",function(t){e.mobile.collapsibleset.prototype.enhanceWithin(t.target)})}(e),function(e,t){e.widget("mobile.navbar",e.mobile.widget,{options:{iconpos:"top",grid:null,initSelector:":jqmData(role='navbar')"},_create:function(){var i=this.element,n=i.find("a"),o=n.filter(":jqmData(icon)").length?this.options.iconpos:t;i.addClass("ui-navbar ui-mini").attr("role","navigation").find("ul").jqmEnhanceable().grid({grid:this.options.grid}),n.buttonMarkup({corners:!1,shadow:!1,inline:!0,iconpos:o}),i.delegate("a","vclick",function(t){e(t.target).hasClass("ui-disabled")||(n.removeClass(e.mobile.activeBtnClass),e(this).addClass(e.mobile.activeBtnClass))}),i.closest(".ui-page").bind("pagebeforeshow",function(){n.filter(".ui-state-persist").addClass(e.mobile.activeBtnClass)})}}),e(i).bind("pagecreate create",function(t){e.mobile.navbar.prototype.enhanceWithin(t.target)})}(e),function(e){var t={};e.widget("mobile.listview",e.mobile.widget,{options:{theme:null,countTheme:"c",headerTheme:"b",dividerTheme:"b",splitIcon:"arrow-r",splitTheme:"b",inset:!1,initSelector:":jqmData(role='listview')"},_create:function(){var e=this,t="";t+=e.options.inset?" ui-listview-inset ui-corner-all ui-shadow ":"",e.element.addClass(function(e,i){return i+" ui-listview "+t}),e.refresh(!0)},_removeCorners:function(e,t){var i="ui-corner-top ui-corner-tr ui-corner-tl",n="ui-corner-bottom ui-corner-br ui-corner-bl";e=e.add(e.find(".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb")),"top"===t?e.removeClass(i):"bottom"===t?e.removeClass(n):e.removeClass(i+" "+n)},_refreshCorners:function(e){var t,i,n,o;t=this.element.children("li"),i=e||0===t.filter(":visible").length?t.not(".ui-screen-hidden"):t.filter(":visible"),t.filter(".ui-li-last").removeClass("ui-li-last"),this.options.inset?(this._removeCorners(t),n=i.first().addClass("ui-corner-top"),n.add(n.find(".ui-btn-inner").not(".ui-li-link-alt span:first-child")).addClass("ui-corner-top").end().find(".ui-li-link-alt, .ui-li-link-alt span:first-child").addClass("ui-corner-tr").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-tl"),o=i.last().addClass("ui-corner-bottom ui-li-last"),o.add(o.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-bl")):i.last().addClass("ui-li-last"),e||this.element.trigger("updatelayout")},_findFirstElementByTagName:function(e,t,i,n){var o={};for(o[i]=o[n]=!0;e;){if(o[e.nodeName])return e;e=e[t]}return null},_getChildrenByTagName:function(t,i,n){var o=[],r={};for(r[i]=r[n]=!0,t=t.firstChild;t;)r[t.nodeName]&&o.push(t),t=t.nextSibling;return e(o)},_addThumbClasses:function(t){var i,n,o=t.length;for(i=0;o>i;i++)n=e(this._findFirstElementByTagName(t[i].firstChild,"nextSibling","img","IMG")),n.length&&(n.addClass("ui-li-thumb"),e(this._findFirstElementByTagName(n[0].parentNode,"parentNode","li","LI")).addClass(n.is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb"))},refresh:function(t){this.parentPage=this.element.closest(".ui-page"),this._createSubPages();var n,o,r,s,a,l,c,u,d,h,p,f,m=this.options,g=this.element,v=(g.jqmData("icon")||m.icon,g.jqmData("dividertheme")||m.dividerTheme),b=g.jqmData("splittheme"),y=g.jqmData("spliticon"),_=this._getChildrenByTagName(g[0],"li","LI"),C=!!e.nodeName(g[0],"ol"),x=!e.support.cssPseudoElement,w=g.attr("start"),k={};C&&x&&g.find(".ui-li-dec").remove(),C&&(w||0===w?x?c=parseFloat(w):(u=parseFloat(w)-1,g.css("counter-reset","listnumbering "+u)):x&&(c=1)),m.theme||(m.theme=e.mobile.getInheritedTheme(this.element,"c"));for(var T=0,D=_.length;D>T;T++){if(n=_.eq(T),o="ui-li",t||!n.hasClass("ui-li")){r=n.jqmData("theme")||m.theme,s=this._getChildrenByTagName(n[0],"a","A");var S="list-divider"===n.jqmData("role");s.length&&!S?(p=n.jqmData("icon"),n.buttonMarkup({wrapperEls:"div",shadow:!1,corners:!1,iconpos:"right",icon:s.length>1||p===!1?!1:p||"arrow-r",theme:r}),p!==!1&&1===s.length&&n.addClass("ui-li-has-arrow"),s.first().removeClass("ui-link").addClass("ui-link-inherit"),s.length>1&&(o+=" ui-li-has-alt",a=s.last(),l=b||a.jqmData("theme")||m.splitTheme,f=a.jqmData("icon"),a.appendTo(n).attr("title",a.getEncodedText()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:!1,corners:!1,theme:r,icon:!1,iconpos:"notext"}).find(".ui-btn-inner").append(e(i.createElement("span")).buttonMarkup({shadow:!0,corners:!0,theme:l,iconpos:"notext",icon:f||p||y||m.splitIcon})))):S?(o+=" ui-li-divider ui-bar-"+v,n.attr("role","heading"),C&&(w||0===w?x?c=parseFloat(w):(d=parseFloat(w)-1,n.css("counter-reset","listnumbering "+d)):x&&(c=1))):o+=" ui-li-static ui-btn-up-"+r}C&&x&&o.indexOf("ui-li-divider")<0&&(h=o.indexOf("ui-li-static")>0?n:n.find(".ui-link-inherit"),h.addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+c++ +". </span>")),k[o]||(k[o]=[]),k[o].push(n[0])}for(o in k)e(k[o]).addClass(o).children(".ui-btn-inner").addClass(o);g.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading").end().find("p, dl").addClass("ui-li-desc").end().find(".ui-li-aside").each(function(){var t=e(this);t.prependTo(t.parent())}).end().find(".ui-li-count").each(function(){e(this).closest("li").addClass("ui-li-has-count")}).addClass("ui-btn-up-"+(g.jqmData("counttheme")||this.options.countTheme)+" ui-btn-corner-all"),this._addThumbClasses(_),this._addThumbClasses(g.find(".ui-link-inherit")),this._refreshCorners(t),this._trigger("afterrefresh")},_idStringEscape:function(e){return e.replace(/[^a-zA-Z0-9]/g,"-")},_createSubPages:function(){var i,n=this.element,o=n.closest(".ui-page"),r=o.jqmData("url"),s=r||o[0][e.expando],a=n.attr("id"),l=this.options,c="data-"+e.mobile.ns,u=this,d=o.find(":jqmData(role='footer')").jqmData("id");if("undefined"==typeof t[s]&&(t[s]=-1),a=a||++t[s],e(n.find("li>ul, li>ol").toArray().reverse()).each(function(t){var o,s,u=e(this),h=u.attr("id")||a+"-"+t,p=u.parent(),f=e(u.prevAll().toArray().reverse()),m=f.length?f:e("<span>"+e.trim(p.contents()[0].nodeValue)+"</span>"),g=m.first().getEncodedText(),v=(r||"")+"&"+e.mobile.subPageUrlKey+"="+h,b=u.jqmData("theme")||l.theme,y=u.jqmData("counttheme")||n.jqmData("counttheme")||l.countTheme;i=!0,o=u.detach().wrap("<div "+c+"role='page' "+c+"url='"+v+"' "+c+"theme='"+b+"' "+c+"count-theme='"+y+"'><div "+c+"role='content'></div></div>").parent().before("<div "+c+"role='header' "+c+"theme='"+l.headerTheme+"'><div class='ui-title'>"+g+"</div></div>").after(d?e("<div "+c+"role='footer' "+c+"id='"+d+"'>"):"").parent().appendTo(e.mobile.pageContainer),o.page(),s=p.find("a:first"),s.length||(s=e("<a/>").html(m||g).prependTo(p.empty())),s.attr("href","#"+v)}).listview(),i&&o.is(":jqmData(external-page='true')")&&o.data("page").options.domCache===!1){var h=function(t,i){var n,s=i.nextPage,a=new e.Event("pageremove");i.nextPage&&(n=s.jqmData("url"),0!==n.indexOf(r+"&"+e.mobile.subPageUrlKey)&&(u.childPages().remove(),o.trigger(a),a.isDefaultPrevented()||o.removeWithDependents()))};o.unbind("pagehide.remove").bind("pagehide.remove",h)}},childPages:function(){var t=this.parentPage.jqmData("url");return e(":jqmData(url^='"+t+"&"+e.mobile.subPageUrlKey+"')")}}),e(i).bind("pagecreate create",function(t){e.mobile.listview.prototype.enhanceWithin(t.target)})}(e),function(e){e.mobile.listview.prototype.options.autodividers=!1,e.mobile.listview.prototype.options.autodividersSelector=function(e){var t=e.find("a").text()||e.text()||null;return t?t=t.slice(0,1).toUpperCase():null},e(i).delegate("ul,ol","listviewcreate",function(){var t=e(this),n=t.data("listview");if(n.options.autodividers){var o=function(){t.find("li:jqmData(role='list-divider')").remove();for(var o,r,s=t.find("li"),a=null,l=0;l<s.length;l++){if(o=s[l],r=n.options.autodividersSelector(e(o)),r&&a!==r){var c=i.createElement("li");c.appendChild(i.createTextNode(r)),c.setAttribute("data-"+e.mobile.ns+"role","list-divider"),o.parentNode.insertBefore(c,o)}a=r}},r=function(){t.unbind("listviewafterrefresh",r),o(),n.refresh(),t.bind("listviewafterrefresh",r)};r()}})}(e),function(e,t){e.widget("mobile.checkboxradio",e.mobile.widget,{options:{theme:null,initSelector:"input[type='checkbox'],input[type='radio']"},_create:function(){var n=this,o=this.element,r=function(e,t){return e.jqmData(t)||e.closest("form,fieldset").jqmData(t)},s=e(o).closest("label"),a=s.length?s:e(o).closest("form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')").find("label").filter("[for='"+o[0].id+"']"),l=o[0].type,c=r(o,"mini"),u=l+"-on",d=l+"-off",h=o.parents(":jqmData(type='horizontal')").length?t:d,p=r(o,"iconpos"),f=h?"":" "+e.mobile.activeBtnClass,m="ui-"+u+f,g="ui-"+d,v="ui-icon-"+u,b="ui-icon-"+d;if("checkbox"===l||"radio"===l){e.extend(this,{label:a,inputtype:l,checkedClass:m,uncheckedClass:g,checkedicon:v,uncheckedicon:b}),this.options.theme||(this.options.theme=e.mobile.getInheritedTheme(this.element,"c")),a.buttonMarkup({theme:this.options.theme,icon:h,shadow:!1,mini:c,iconpos:p});var y=i.createElement("div");y.className="ui-"+l,o.add(a).wrapAll(y),a.bind({vmouseover:function(t){e(this).parent().is(".ui-disabled")&&t.stopPropagation()},vclick:function(e){return o.is(":disabled")?(e.preventDefault(),void 0):(n._cacheVals(),o.prop("checked","radio"===l&&!0||!o.prop("checked")),o.triggerHandler("click"),n._getInputSet().not(o).prop("checked",!1),n._updateAll(),!1)}}),o.bind({vmousedown:function(){n._cacheVals()},vclick:function(){var t=e(this);t.is(":checked")?(t.prop("checked",!0),n._getInputSet().not(t).prop("checked",!1)):t.prop("checked",!1),n._updateAll()},focus:function(){a.addClass(e.mobile.focusClass)},blur:function(){a.removeClass(e.mobile.focusClass)}}),this.refresh()}},_cacheVals:function(){this._getInputSet().each(function(){e(this).jqmData("cacheVal",this.checked)})},_getInputSet:function(){return"checkbox"===this.inputtype?this.element:this.element.closest("form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')").find("input[name='"+this.element[0].name+"'][type='"+this.inputtype+"']")},_updateAll:function(){var t=this;this._getInputSet().each(function(){var i=e(this);(this.checked||"checkbox"===t.inputtype)&&i.trigger("change")}).checkboxradio("refresh")},refresh:function(){var e=this.element[0],t=this.label,i=t.find(".ui-icon");e.checked?(t.addClass(this.checkedClass).removeClass(this.uncheckedClass),i.addClass(this.checkedicon).removeClass(this.uncheckedicon)):(t.removeClass(this.checkedClass).addClass(this.uncheckedClass),i.removeClass(this.checkedicon).addClass(this.uncheckedicon)),e.disabled?this.disable():this.enable()},disable:function(){this.element.prop("disabled",!0).parent().addClass("ui-disabled")},enable:function(){this.element.prop("disabled",!1).parent().removeClass("ui-disabled")}}),e(i).bind("pagecreate create",function(t){e.mobile.checkboxradio.prototype.enhanceWithin(t.target,!0)})}(e),function(e,t){e.widget("mobile.button",e.mobile.widget,{options:{theme:null,icon:null,iconpos:null,corners:!0,shadow:!0,iconshadow:!0,initSelector:"button, [type='button'], [type='submit'], [type='reset']"},_create:function(){var n,o,r,s,a=this.element,l=this.options,c=l.inline||a.jqmData("inline"),u=l.mini||a.jqmData("mini"),d="";return"A"===a[0].tagName?(a.hasClass("ui-btn")||a.buttonMarkup(),void 0):(this.options.theme||(this.options.theme=e.mobile.getInheritedTheme(this.element,"c")),~a[0].className.indexOf("ui-btn-left")&&(d="ui-btn-left"),~a[0].className.indexOf("ui-btn-right")&&(d="ui-btn-right"),("submit"===a.attr("type")||"reset"===a.attr("type"))&&(d?d+=" ui-submit":d="ui-submit"),e("label[for='"+a.attr("id")+"']").addClass("ui-submit"),this.button=e("<div></div>")[a.html()?"html":"text"](a.html()||a.val()).insertBefore(a).buttonMarkup({theme:l.theme,icon:l.icon,iconpos:l.iconpos,inline:c,corners:l.corners,shadow:l.shadow,iconshadow:l.iconshadow,mini:u}).addClass(d).append(a.addClass("ui-btn-hidden")),n=this.button,o=a.attr("type"),r=a.attr("name"),"button"!==o&&"reset"!==o&&r&&a.bind("vclick",function(){s===t&&(s=e("<input>",{type:"hidden",name:a.attr("name"),value:a.attr("value")}).insertBefore(a),e(i).one("submit",function(){s.remove(),s=t}))}),a.bind({focus:function(){n.addClass(e.mobile.focusClass)},blur:function(){n.removeClass(e.mobile.focusClass)}}),this.refresh(),void 0)},enable:function(){return this.element.attr("disabled",!1),this.button.removeClass("ui-disabled").attr("aria-disabled",!1),this._setOption("disabled",!1)},disable:function(){return this.element.attr("disabled",!0),this.button.addClass("ui-disabled").attr("aria-disabled",!0),this._setOption("disabled",!0)},refresh:function(){var t=this.element;t.prop("disabled")?this.disable():this.enable(),e(this.button.data("buttonElements").text)[t.html()?"html":"text"](t.html()||t.val())}}),e(i).bind("pagecreate create",function(t){e.mobile.button.prototype.enhanceWithin(t.target,!0)})}(e),function(e){e.fn.controlgroup=function(t){function i(e,t){e.removeClass("ui-btn-corner-all ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-controlgroup-last ui-shadow").eq(0).addClass(t[0]).end().last().addClass(t[1]).addClass("ui-controlgroup-last")}return this.each(function(){{var n=e(this),o=e.extend({direction:n.jqmData("type")||"vertical",shadow:!1,excludeInvisible:!0,mini:n.jqmData("mini")},t),r=n.children("legend"),s="horizontal"===o.direction?["ui-corner-left","ui-corner-right"]:["ui-corner-top","ui-corner-bottom"];n.find("input").first().attr("type")}n.wrapInner("<div class='ui-controlgroup-controls'></div>"),r.length&&(e("<div role='heading' class='ui-controlgroup-label'>"+r.html()+"</div>").insertBefore(n.children(0)),r.remove()),n.addClass("ui-corner-all ui-controlgroup ui-controlgroup-"+o.direction),i(n.find(".ui-btn"+(o.excludeInvisible?":visible":"")).not(".ui-slider-handle"),s),i(n.find(".ui-btn-inner"),s),o.shadow&&n.addClass("ui-shadow"),o.mini&&n.addClass("ui-mini")})}}(e),function(e){e(i).bind("pagecreate create",function(t){e(t.target).find("a").jqmEnhanceable().not(".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')").addClass("ui-link")})}(e),function(e,n){function o(e,t,i,n){var o=n;return o=t>e?i+(e-t)/2:Math.min(Math.max(i,n-t/2),i+e-t)}e.widget("mobile.popup",e.mobile.widget,{options:{theme:null,overlayTheme:null,shadow:!0,corners:!0,transition:"none",positionTo:"origin",initSelector:":jqmData(role='popup')"},_create:function(){var i={screen:e("<div class='ui-screen-hidden ui-popup-screen fade'></div>"),placeholder:e("<div style='display: none;'><!-- placeholder --></div>"),container:e("<div class='ui-popup-container ui-selectmenu-hidden'></div>")},o=function(e){e.preventDefault(),e.stopImmediatePropagation(),a.close()},r=this.element.closest(".ui-page"),s=this.element.attr("id"),a=this;0===r.length&&(r=e("body")),r.append(i.screen),i.container.insertAfter(i.screen),i.placeholder.insertAfter(this.element),s&&i.placeholder.html("<!-- placeholder for "+s+" -->"),i.container.append(this.element),this.element.addClass("ui-popup"),e.extend(this,{_page:r,_ui:i,_fallbackTransition:"",_currentTransition:!1,_prereqs:null,_isOpen:!1,_globalHandlers:[{src:e(t),handler:{resize:function(){a._isOpen&&a._resizeScreen()},keyup:function(t){a._isOpen&&t.keyCode===e.mobile.keyCode.ESCAPE&&o(t)}}}]}),e.each(this.options,function(e,t){a.options[e]=n,a._setOption(e,t,!0)}),i.screen.bind("vclick",function(e){o(e)}),e.each(this._globalHandlers,function(e,t){t.src.bind(t.handler)})},_resizeScreen:function(){this._ui.screen.height(Math.max(e(t).height(),e(i).height()))},_applyTheme:function(e,t){for(var i,n=(e.attr("class")||"").split(" "),o=null,r=String(t);n.length>0;){if(o=n.pop(),i=o.match(/^ui-body-([a-z])$/),i&&i.length>1){o=i[1];break}o=null}t!==o&&(e.removeClass("ui-body-"+o),null!==t&&"none"!==t&&e.addClass("ui-body-"+r))},_setTheme:function(e){this._applyTheme(this._ui.container,e)},_setOverlayTheme:function(t){this._applyTheme(this._ui.screen,t),e.mobile.browser.ie&&this._ui.screen.toggleClass("ui-popup-screen-background-hack","transparent"===this._ui.screen.css("background-color")&&"none"===this._ui.screen.css("background-image")&&this._ui.screen.css("background")===n)},_setShadow:function(e){this._ui.container.toggleClass("ui-overlay-shadow",e)},_setCorners:function(e){this._ui.container.toggleClass("ui-corner-all",e)},_applyTransition:function(t){this._ui.container.removeClass(this._fallbackTransition),t&&"none"!==t&&(this._fallbackTransition=e.mobile._maybeDegradeTransition(t),this._ui.container.addClass(this._fallbackTransition))},_setTransition:function(e){this._currentTransition||this._applyTransition(e)},_setOption:function(t,i){var o="_set"+t.replace(/^[a-z]/,function(e){return e.toUpperCase()});this[o]!==n&&this[o](i),"initSelector"!==t&&(e.mobile.widget.prototype._setOption.apply(this,arguments),this.element.attr("data-"+(e.mobile.ns||"")+t.replace(/([A-Z])/,"-$1").toLowerCase(),i))},_placementCoords:function(n){var r,s,a={l:15,t:30,r:15,b:30},l={l:a.l,t:e(t).scrollTop()+a.t,cx:e(t).width()-a.l-a.r,cy:e(t).height()-a.t-a.b};return this._ui.container.css("max-width",l.cx),r={cx:this._ui.container.outerWidth(!0),cy:this._ui.container.outerHeight(!0)},s={x:o(l.cx,r.cx,l.l,n.x),y:o(l.cy,r.cy,l.t,n.y)},s.y=Math.max(0,s.y),s.y-=Math.min(s.y,Math.max(0,s.y+r.cy-e(i).height())),s},_immediate:function(){this._prereqs&&e.each(this._prereqs,function(e,t){t.resolve()})},_createPrereqs:function(t,i,n){var o,r=this;o={screen:e.Deferred(function(e){e.then(function(){o===r._prereqs&&t()})}),container:e.Deferred(function(e){e.then(function(){o===r._prereqs&&i()})})},e.when(o.screen,o.container).done(function(){o===r._prereqs&&(r._prereqs=null,n())}),r._prereqs=o},_animate:function(e){var t=this;t.options.overlayTheme&&e.additionalCondition?t._ui.screen.removeClass(e.classToRemove).addClass(e.screenClassToAdd).animationComplete(function(){e.prereqs.screen.resolve()}):e.prereqs.screen.resolve(),e.transition&&"none"!==e.transition?(e.applyTransition&&t._applyTransition(e.transition),t._ui.container.addClass(e.containerClassToAdd).removeClass(e.classToRemove).animationComplete(function(){e.prereqs.container.resolve()})):e.prereqs.container.resolve()},_desiredCoords:function(i){var n,o=null,r=e(t);if(this.options.positionTo&&"origin"!==this.options.positionTo)if("window"===this.options.positionTo)i={x:r.width()/2+r.scrollLeft(),y:r.height()/2+r.scrollTop()};else{try{o=e(this.options.positionTo)}catch(s){o=null}o&&(o.filter(":visible"),0===o.length&&(o=null))}return o&&(n=o.offset(),i={x:n.left+o.outerWidth()/2,y:n.top+o.outerHeight()/2}),"number"!==e.type(i.x)&&(i.x=r.width()/2+r.scrollLeft()),"number"!==e.type(i.y)&&(i.y=r.height()/2+r.scrollTop()),i},_open:function(t,i,n){var o,r=this;this.element.trigger("popupbeforeopen"),o=r._placementCoords(r._desiredCoords({x:t,y:i})),r._createPrereqs(e.noop,function(){r._applyTransition("none"),r._ui.container.removeClass("in"),r._resizeScreen()},function(){r._isOpen=!0,r._ui.container.attr("tabindex","0").focus(),r.element.trigger("popupafteropen")}),n?(r._currentTransition=n,r._applyTransition(n)):n=r.options.transition,r.options.theme||r._setTheme(r._page.jqmData("theme")||e.mobile.getInheritedTheme(r._page,"c")),r._resizeScreen(),r._ui.screen.removeClass("ui-screen-hidden"),r._ui.container.removeClass("ui-selectmenu-hidden").offset({left:o.x,top:o.y}),r._animate({additionalCondition:!0,transition:n,classToRemove:"",screenClassToAdd:"in",containerClassToAdd:"in",applyTransition:!1,prereqs:r._prereqs})},_close:function(){var e=this,t=e._currentTransition?e._currentTransition:e.options.transition;this._isOpen=!1,e._createPrereqs(function(){e._ui.screen.removeClass("out").addClass("ui-screen-hidden")},function(){e._ui.container.removeClass("reverse out").addClass("ui-selectmenu-hidden").removeAttr("style")},function(){e._ui.container.removeAttr("tabindex"),e.element.trigger("popupafterclose")}),e._animate({additionalCondition:e._ui.screen.hasClass("in"),transition:t,classToRemove:"in",screenClassToAdd:"out",containerClassToAdd:"reverse out",applyTransition:!0,prereqs:e._prereqs})},_destroy:function(){this.element.insertAfter(this._ui.placeholder).removeClass("ui-popup"),this._ui.screen.remove(),this._ui.container.remove(),this._ui.placeholder.remove(),e.each(this._globalHandlers,function(t,i){e.each(i.handler,function(e,t){i.src.unbind(e,t)})})},open:function(){e.mobile.popup.popupManager.push(this,arguments)},close:function(){e.mobile.popup.popupManager.pop(this)}}),e.mobile.popup.popupManager={_currentlyOpenPopup:null,_popupIsOpening:!1,_popupIsClosing:!1,_abort:!1,_navHook:function(i){function n(){e(t).one("navigate.popup",function(){r._onHashChange()}),i()}var o,r=this;if(r._myUrl=e.mobile.activePage.jqmData("url"),e.mobile.pageContainer.one("pagebeforechange.popup",function(t,i){var n,o;n="string"==typeof i.toPage?i.toPage:i.toPage.jqmData("url"),n=e.mobile.path.parseUrl(n),o=n.pathname+n.search+n.hash,r._myUrl!==o&&r._onHashChange(!0)}),e.mobile.hashListeningEnabled){var s,a=e.mobile.urlHistory.getActive(),l=e.mobile.activePage.is(".ui-dialog"),c=a.url.indexOf(e.mobile.dialogHashKey)>-1&&!l;s=0===e.mobile.urlHistory.activeIndex?e.mobile.defaultDialogTransition:a.transition,c?n():(e(t).one("navigate.popupBinder",function(){n()}),o=a.url+e.mobile.dialogHashKey,0===e.mobile.urlHistory.activeIndex&&o===e.mobile.urlHistory.initialDst&&(o+=e.mobile.dialogHashKey),e.mobile.urlHistory.ignoreNextHashChange=l,e.mobile.path.set(o),e.mobile.urlHistory.addNew(o,s,a.title,a.pageUrl,a.role))}else i()},_navUnhook:function(i){i&&e(t).unbind("navigate.popupBinder navigate.popup"),e.mobile.hashListeningEnabled&&!i?t.history.back():this._onHashChange(),e.mobile.activePage.unbind("pagebeforechange.popup")},push:function(e,t){var i=this;i._currentlyOpenPopup||(i._currentlyOpenPopup=e,i._navHook(function(){i._popupIsOpening=!0,i._currentlyOpenPopup.element.one("popupafteropen",function(){i._popupIsOpening=!1}),i._currentlyOpenPopup._open.apply(i._currentlyOpenPopup,t),!i._popupIsOpening&&i._abort&&i._currentlyOpenPopup._immediate()}))},pop:function(t){var i=this;t!==i._currentlyOpenPopup||i._popupIsClosing||(i._popupIsClosing=!0,i._popupIsOpening?i._currentlyOpenPopup.element.one("popupafteropen",e.proxy(i,"_navUnhook")):i._navUnhook())},_onHashChange:function(t){var i=this;i._abort=t,i._currentlyOpenPopup&&(t&&i._popupIsOpening&&i._currentlyOpenPopup._immediate(),i._popupIsClosing=!0,i._currentlyOpenPopup.element.one("popupafterclose",function(){i._popupIsClosing=!1,i._currentlyOpenPopup=null,e(i).trigger("done")}),i._currentlyOpenPopup._close(),t&&i._currentlyOpenPopup&&i._currentlyOpenPopup._immediate())}},e.mobile.popup.handleLink=function(t){var i,n=t.closest(":jqmData(role='page')"),o=0===n.length?e("body"):n,r=e(t.attr("href"),o[0]);r.data("popup")&&(i=t.offset(),r.popup("open",i.left+t.outerWidth()/2,i.top+t.outerHeight()/2,t.jqmData("transition")),0===t.parents(".ui-popup-container").length&&e(e.mobile.popup.popupManager).one("done",function(){t.focus()})),setTimeout(function(){t.removeClass(e.mobile.activeBtnClass)},300)},e(i).bind("pagebeforechange",function(t,i){"popup"===i.options.role&&(e.mobile.popup.handleLink(i.options.link),t.preventDefault())}),e(i).bind("pagecreate create",function(t){e.mobile.popup.prototype.enhanceWithin(t.target,!0)})}(e),function(e){var t=e("meta[name=viewport]"),i=t.attr("content"),n=i+",maximum-scale=1, user-scalable=no",o=i+",maximum-scale=10, user-scalable=yes",r=/(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test(i);e.mobile.zoom=e.extend({},{enabled:!r,locked:!1,disable:function(i){r||e.mobile.zoom.locked||(t.attr("content",n),e.mobile.zoom.enabled=!1,e.mobile.zoom.locked=i||!1)},enable:function(i){r||e.mobile.zoom.locked&&i!==!0||(t.attr("content",o),e.mobile.zoom.enabled=!0,e.mobile.zoom.locked=!1)},restore:function(){r||(t.attr("content",i),e.mobile.zoom.enabled=!0)}})}(e),function(e){e.widget("mobile.textinput",e.mobile.widget,{options:{theme:null,preventFocusZoom:/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1,initSelector:"input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type])",clearSearchButtonText:"clear text",disabled:!1},_create:function(){function n(){setTimeout(function(){r.toggleClass("ui-input-clear-hidden",!s.val())},0)}var o,r,s=this.element,a=this.options,l=a.theme||e.mobile.getInheritedTheme(this.element,"c"),c=" ui-body-"+l,u=s.jqmData("mini")===!0,d=u?" ui-mini":"";if(e("label[for='"+s.attr("id")+"']").addClass("ui-input-text"),o=s.addClass("ui-input-text ui-body-"+l),"undefined"==typeof s[0].autocorrect||e.support.touchOverflow||(s[0].setAttribute("autocorrect","off"),s[0].setAttribute("autocomplete","off")),s.is("[type='search'],:jqmData(type='search')")?(o=s.wrap("<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield"+c+d+"'></div>").parent(),r=e("<a href='#' class='ui-input-clear' title='"+a.clearSearchButtonText+"'>"+a.clearSearchButtonText+"</a>").bind("click",function(e){s.val("").focus().trigger("change"),r.addClass("ui-input-clear-hidden"),e.preventDefault()}).appendTo(o).buttonMarkup({icon:"delete",iconpos:"notext",corners:!0,shadow:!0,mini:u}),n(),s.bind("paste cut keyup focus change blur",n)):s.addClass("ui-corner-all ui-shadow-inset"+c+d),s.focus(function(){o.addClass(e.mobile.focusClass)}).blur(function(){o.removeClass(e.mobile.focusClass)}).bind("focus",function(){a.preventFocusZoom&&e.mobile.zoom.disable(!0)}).bind("blur",function(){a.preventFocusZoom&&e.mobile.zoom.enable(!0)}),s.is("textarea")){var h,p=15,f=100,m=function(){var e=s[0].scrollHeight,t=s[0].clientHeight;e>t&&s.height(e+p)};s.keyup(function(){clearTimeout(h),h=setTimeout(m,f)}),e(i).one("pagechange",m),e.trim(s.val())&&e(t).load(m)}s.attr("disabled")&&this.disable()},disable:function(){var e;return e=this.element.attr("disabled",!0).is("[type='search'], :jqmData(type='search')")?this.element.parent():this.element,e.addClass("ui-disabled"),this._setOption("disabled",!0)},enable:function(){var e;return e=this.element.attr("disabled",!1).is("[type='search'], :jqmData(type='search')")?this.element.parent():this.element,e.removeClass("ui-disabled"),this._setOption("disabled",!1)}}),e(i).bind("pagecreate create",function(t){e.mobile.textinput.prototype.enhanceWithin(t.target,!0)})}(e),function(e){e.mobile.listview.prototype.options.filter=!1,e.mobile.listview.prototype.options.filterPlaceholder="Filter items...",e.mobile.listview.prototype.options.filterTheme="c",e.mobile.listview.prototype.options.filterCallback=function(e,t){return-1===e.toString().toLowerCase().indexOf(t)},e(i).delegate(":jqmData(role='listview')","listviewcreate",function(){var t=e(this),i=t.data("listview");if(i.options.filter){{var n=e("<form>",{"class":"ui-listview-filter ui-bar-"+i.options.filterTheme,role:"search"});e("<input>",{placeholder:i.options.filterPlaceholder}).attr("data-"+e.mobile.ns+"type","search").jqmData("lastval","").bind("keyup change",function(){var n,o=e(this),r=this.value.toLowerCase(),s=null,a=o.jqmData("lastval")+"",l=!1,c="";if(o.jqmData("lastval",r),s=r.length<a.length||0!==r.indexOf(a)?t.children():t.children(":not(.ui-screen-hidden)"),r){for(var u=s.length-1;u>=0;u--)n=e(s[u]),c=n.jqmData("filtertext")||n.text(),n.is("li:jqmData(role=list-divider)")?(n.toggleClass("ui-filter-hidequeue",!l),l=!1):i.options.filterCallback(c,r,n)?n.toggleClass("ui-filter-hidequeue",!0):l=!0;s.filter(":not(.ui-filter-hidequeue)").toggleClass("ui-screen-hidden",!1),s.filter(".ui-filter-hidequeue").toggleClass("ui-screen-hidden",!0).toggleClass("ui-filter-hidequeue",!1)}else s.toggleClass("ui-screen-hidden",!1);i._refreshCorners()}).appendTo(n).textinput()}i.options.inset&&n.addClass("ui-listview-filter-inset"),n.bind("submit",function(){return!1}).insertBefore(t)}})}(e),function(e,n){e.widget("mobile.slider",e.mobile.widget,{options:{theme:null,trackTheme:null,disabled:!1,initSelector:"input[type='range'], :jqmData(type='range'), :jqmData(role='slider')",mini:!1},_create:function(){var o,r=this,s=this.element,a=e.mobile.getInheritedTheme(s,"c"),l=this.options.theme||a,c=this.options.trackTheme||a,u=s[0].nodeName.toLowerCase(),d="select"===u?"ui-slider-switch":"",h=s.attr("id"),p=e("[for='"+h+"']"),f=p.attr("id")||h+"-label",m=p.attr("id",f),g=function(){return"input"===u?parseFloat(s.val()):s[0].selectedIndex},v="input"===u?parseFloat(s.attr("min")):0,b="input"===u?parseFloat(s.attr("max")):s.find("option").length-1,y=t.parseFloat(s.attr("step")||1),_=this.options.inline||s.jqmData("inline")===!0?" ui-slider-inline":"",C=this.options.mini||s.jqmData("mini")?" ui-slider-mini":"",x=i.createElement("a"),w=e(x),k=i.createElement("div"),T=e(k),D=s.jqmData("highlight")&&"select"!==u?function(){var t=i.createElement("div");return t.className="ui-slider-bg "+e.mobile.activeBtnClass+" ui-btn-corner-all",e(t).prependTo(T)}():!1;if(x.setAttribute("href","#"),k.setAttribute("role","application"),k.className=["ui-slider ",d," ui-btn-down-",c," ui-btn-corner-all",_,C].join(""),x.className="ui-slider-handle",k.appendChild(x),w.buttonMarkup({corners:!0,theme:l,shadow:!0}).attr({role:"slider","aria-valuemin":v,"aria-valuemax":b,"aria-valuenow":g(),"aria-valuetext":g(),title:g(),"aria-labelledby":f}),e.extend(this,{slider:T,handle:w,valuebg:D,dragging:!1,beforeStart:null,userModified:!1,mouseMoved:!1}),"select"===u){var S=i.createElement("div");S.className="ui-slider-inneroffset";for(var E=0,N=k.childNodes.length;N>E;E++)S.appendChild(k.childNodes[E]);k.appendChild(S),w.addClass("ui-slider-handle-snapping"),o=s.find("option");for(var A=0,P=o.length;P>A;A++){var M=A?"a":"b",I=A?" "+e.mobile.activeBtnClass:" ui-btn-down-"+c,H=(i.createElement("div"),i.createElement("span"));H.className=["ui-slider-label ui-slider-label-",M,I," ui-btn-corner-all"].join(""),H.setAttribute("role","img"),H.appendChild(i.createTextNode(o[A].innerHTML)),e(H).prependTo(T)}r._labels=e(".ui-slider-label",T)}m.addClass("ui-slider"),s.addClass("input"===u?"ui-slider-input":"ui-slider-switch").change(function(){r.mouseMoved||r.refresh(g(),!0)}).keyup(function(){r.refresh(g(),!0,!0)}).blur(function(){r.refresh(g(),!0)}),e(i).bind("vmousemove",function(e){return r.dragging?(r.mouseMoved=!0,"select"===u&&w.removeClass("ui-slider-handle-snapping"),r.refresh(e),r.userModified=r.beforeStart!==s[0].selectedIndex,!1):void 0}),T.bind("vmousedown",function(e){return r.dragging=!0,r.userModified=!1,r.mouseMoved=!1,"select"===u&&(r.beforeStart=s[0].selectedIndex),r.refresh(e),!1}).bind("vclick",!1),T.add(i).bind("vmouseup",function(){return r.dragging?(r.dragging=!1,"select"===u&&(w.addClass("ui-slider-handle-snapping"),r.mouseMoved?r.userModified?r.refresh(0===r.beforeStart?1:0):r.refresh(r.beforeStart):r.refresh(0===r.beforeStart?1:0)),r.mouseMoved=!1,!1):void 0}),T.insertAfter(s),"select"===u&&this.handle.bind({focus:function(){T.addClass(e.mobile.focusClass)},blur:function(){T.removeClass(e.mobile.focusClass)}}),this.handle.bind({vmousedown:function(){e(this).focus()},vclick:!1,keydown:function(t){var i=g();if(!r.options.disabled){switch(t.keyCode){case e.mobile.keyCode.HOME:case e.mobile.keyCode.END:case e.mobile.keyCode.PAGE_UP:case e.mobile.keyCode.PAGE_DOWN:case e.mobile.keyCode.UP:case e.mobile.keyCode.RIGHT:case e.mobile.keyCode.DOWN:case e.mobile.keyCode.LEFT:t.preventDefault(),r._keySliding||(r._keySliding=!0,e(this).addClass("ui-state-active"))}switch(t.keyCode){case e.mobile.keyCode.HOME:r.refresh(v);break;case e.mobile.keyCode.END:r.refresh(b);break;case e.mobile.keyCode.PAGE_UP:case e.mobile.keyCode.UP:case e.mobile.keyCode.RIGHT:r.refresh(i+y);break;case e.mobile.keyCode.PAGE_DOWN:case e.mobile.keyCode.DOWN:case e.mobile.keyCode.LEFT:r.refresh(i-y)
107
+ }}},keyup:function(){r._keySliding&&(r._keySliding=!1,e(this).removeClass("ui-state-active"))}}),this.refresh(n,n,!0)},refresh:function(t,i,n){(this.options.disabled||this.element.attr("disabled"))&&this.disable();var o,r=this.element,s=r[0].nodeName.toLowerCase(),a="input"===s?parseFloat(r.attr("min")):0,l="input"===s?parseFloat(r.attr("max")):r.find("option").length-1,c="input"===s&&parseFloat(r.attr("step"))>0?parseFloat(r.attr("step")):1;if("object"==typeof t){var u=t,d=8;if(!this.dragging||u.pageX<this.slider.offset().left-d||u.pageX>this.slider.offset().left+this.slider.width()+d)return;o=Math.round((u.pageX-this.slider.offset().left)/this.slider.width()*100)}else null==t&&(t="input"===s?parseFloat(r.val()||0):r[0].selectedIndex),o=(parseFloat(t)-a)/(l-a)*100;if(!isNaN(o)){0>o&&(o=0),o>100&&(o=100);var h=o/100*(l-a)+a,p=(h-a)%c,f=h-p;if(2*Math.abs(p)>=c&&(f+=p>0?c:-c),h=parseFloat(f.toFixed(5)),a>h&&(h=a),h>l&&(h=l),this.handle.css("left",o+"%"),this.handle.attr({"aria-valuenow":"input"===s?h:r.find("option").eq(h).attr("value"),"aria-valuetext":"input"===s?h:r.find("option").eq(h).getEncodedText(),title:"input"===s?h:r.find("option").eq(h).getEncodedText()}),this.valuebg&&this.valuebg.css("width",o+"%"),this._labels){var m=this.handle.width()/this.slider.width()*100,g=o&&m+(100-m)*o/100,v=100===o?0:Math.min(m+100-g,100);this._labels.each(function(){var t=e(this).is(".ui-slider-label-a");e(this).width((t?g:v)+"%")})}if(!n){var b=!1;"input"===s?(b=r.val()!==h,r.val(h)):(b=r[0].selectedIndex!==h,r[0].selectedIndex=h),!i&&b&&r.trigger("change")}}},enable:function(){return this.element.attr("disabled",!1),this.slider.removeClass("ui-disabled").attr("aria-disabled",!1),this._setOption("disabled",!1)},disable:function(){return this.element.attr("disabled",!0),this.slider.addClass("ui-disabled").attr("aria-disabled",!0),this._setOption("disabled",!0)}}),e(i).bind("pagecreate create",function(t){e.mobile.slider.prototype.enhanceWithin(t.target,!0)})}(e),function(e){e.widget("mobile.selectmenu",e.mobile.widget,{options:{theme:null,disabled:!1,icon:"arrow-d",iconpos:"right",inline:!1,corners:!0,shadow:!0,iconshadow:!0,overlayTheme:"a",hidePlaceholderMenuItems:!0,closeText:"Close",nativeMenu:!0,preventFocusZoom:/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1,initSelector:"select:not( :jqmData(role='slider') )",mini:!1},_button:function(){return e("<div/>")},_setDisabled:function(e){return this.element.attr("disabled",e),this.button.attr("aria-disabled",e),this._setOption("disabled",e)},_focusButton:function(){var e=this;setTimeout(function(){e.button.focus()},40)},_selectOptions:function(){return this.select.find("option")},_preExtension:function(){var t="";~this.element[0].className.indexOf("ui-btn-left")&&(t=" ui-btn-left"),~this.element[0].className.indexOf("ui-btn-right")&&(t=" ui-btn-right"),this.select=this.element.wrap("<div class='ui-select"+t+"'>"),this.selectID=this.select.attr("id"),this.label=e("label[for='"+this.selectID+"']").addClass("ui-select"),this.isMultiple=this.select[0].multiple,this.options.theme||(this.options.theme=e.mobile.getInheritedTheme(this.select,"c"))},_create:function(){this._preExtension(),this._trigger("beforeCreate"),this.button=this._button();var i=this,n=this.options,o=n.inline||this.select.jqmData("inline"),r=n.mini||this.select.jqmData("mini"),s=n.icon?n.iconpos||this.select.jqmData("iconpos"):!1,a=(-1===this.select[0].selectedIndex?0:this.select[0].selectedIndex,this.button.insertBefore(this.select).buttonMarkup({theme:n.theme,icon:n.icon,iconpos:s,inline:o,corners:n.corners,shadow:n.shadow,iconshadow:n.iconshadow,mini:r}));this.setButtonText(),n.nativeMenu&&t.opera&&t.opera.version&&a.addClass("ui-select-nativeonly"),this.isMultiple&&(this.buttonCount=e("<span>").addClass("ui-li-count ui-btn-up-c ui-btn-corner-all").hide().appendTo(a.addClass("ui-li-has-count"))),(n.disabled||this.element.attr("disabled"))&&this.disable(),this.select.change(function(){i.refresh()}),this.build()},build:function(){var t=this;this.select.appendTo(t.button).bind("vmousedown",function(){t.button.addClass(e.mobile.activeBtnClass)}).bind("focus",function(){t.button.addClass(e.mobile.focusClass)}).bind("blur",function(){t.button.removeClass(e.mobile.focusClass)}).bind("focus vmouseover",function(){t.button.trigger("vmouseover")}).bind("vmousemove",function(){t.button.removeClass(e.mobile.activeBtnClass)}).bind("change blur vmouseout",function(){t.button.trigger("vmouseout").removeClass(e.mobile.activeBtnClass)}).bind("change blur",function(){t.button.removeClass("ui-btn-down-"+t.options.theme)}),t.button.bind("vmousedown",function(){t.options.preventFocusZoom&&e.mobile.zoom.disable(!0)}).bind("mouseup",function(){t.options.preventFocusZoom&&e.mobile.zoom.enable(!0)})},selected:function(){return this._selectOptions().filter(":selected")},selectedIndices:function(){var e=this;return this.selected().map(function(){return e._selectOptions().index(this)}).get()},setButtonText:function(){var t=this,n=this.selected(),o=this.placeholder,r=e(i.createElement("span"));this.button.find(".ui-btn-text").html(function(){return o=n.length?n.map(function(){return e(this).text()}).get().join(", "):t.placeholder,r.text(o).addClass(t.select.attr("class")).addClass(n.attr("class"))})},setButtonCount:function(){var e=this.selected();this.isMultiple&&this.buttonCount[e.length>1?"show":"hide"]().text(e.length)},refresh:function(){this.setButtonText(),this.setButtonCount()},open:e.noop,close:e.noop,disable:function(){this._setDisabled(!0),this.button.addClass("ui-disabled")},enable:function(){this._setDisabled(!1),this.button.removeClass("ui-disabled")}}),e(i).bind("pagecreate create",function(t){e.mobile.selectmenu.prototype.enhanceWithin(t.target,!0)})}(e),function(e){var n=function(n){var o,r,s,a=(n.select,n.selectID),l=n.label,c=n.select.closest(".ui-page"),u=n._selectOptions(),d=n.isMultiple=n.select[0].multiple,h=a+"-button",p=a+"-menu",f=e("<div data-"+e.mobile.ns+"role='dialog' data-"+e.mobile.ns+"theme='"+n.options.theme+"' data-"+e.mobile.ns+"overlay-theme='"+n.options.overlayTheme+"'><div data-"+e.mobile.ns+"role='header'><div class='ui-title'>"+l.getEncodedText()+"</div></div><div data-"+e.mobile.ns+"role='content'></div></div>"),m=e("<div>",{"class":"ui-selectmenu"}).insertAfter(n.select).popup({theme:"a"}),g=e("<ul>",{"class":"ui-selectmenu-list",id:p,role:"listbox","aria-labelledby":h}).attr("data-"+e.mobile.ns+"theme",n.options.theme).appendTo(m),v=e("<div>",{"class":"ui-header ui-bar-"+n.options.theme}).prependTo(m),b=e("<h1>",{"class":"ui-title"}).appendTo(v);n.isMultiple&&(s=e("<a>",{text:n.options.closeText,href:"#","class":"ui-btn-left"}).attr("data-"+e.mobile.ns+"iconpos","notext").attr("data-"+e.mobile.ns+"icon","delete").appendTo(v).buttonMarkup()),e.extend(n,{select:n.select,selectID:a,buttonId:h,menuId:p,thisPage:c,menuPage:f,label:l,selectOptions:u,isMultiple:d,theme:n.options.theme,listbox:m,list:g,header:v,headerTitle:b,headerClose:s,menuPageContent:o,menuPageClose:r,placeholder:"",build:function(){var t=this;t.refresh(),t.select.attr("tabindex","-1").focus(function(){e(this).blur(),t.button.focus()}),t.button.bind("vclick keydown",function(i){("vclick"===i.type||i.keyCode&&(i.keyCode===e.mobile.keyCode.ENTER||i.keyCode===e.mobile.keyCode.SPACE))&&(t.open(),i.preventDefault())}),t.list.attr("role","listbox").bind("focusin",function(t){e(t.target).attr("tabindex","0").trigger("vmouseover")}).bind("focusout",function(t){e(t.target).attr("tabindex","-1").trigger("vmouseout")}).delegate("li:not(.ui-disabled, .ui-li-divider)","click",function(i){var o=t.select[0].selectedIndex,r=t.list.find("li:not(.ui-li-divider)").index(this),s=t._selectOptions().eq(r)[0];s.selected=t.isMultiple?!s.selected:!0,t.isMultiple&&e(this).find(".ui-icon").toggleClass("ui-icon-checkbox-on",s.selected).toggleClass("ui-icon-checkbox-off",!s.selected),(t.isMultiple||o!==r)&&t.select.trigger("change"),t.isMultiple?t.list.find("li:not(.ui-li-divider)").eq(r).addClass("ui-btn-down-"+n.options.theme).find("a").first().focus():t.close(),i.preventDefault()}).keydown(function(t){var i,o,r=e(t.target),s=r.closest("li");switch(t.keyCode){case 38:return i=s.prev().not(".ui-selectmenu-placeholder"),i.is(".ui-li-divider")&&(i=i.prev()),i.length&&(r.blur().attr("tabindex","-1"),i.addClass("ui-btn-down-"+n.options.theme).find("a").first().focus()),!1;case 40:return o=s.next(),o.is(".ui-li-divider")&&(o=o.next()),o.length&&(r.blur().attr("tabindex","-1"),o.addClass("ui-btn-down-"+n.options.theme).find("a").first().focus()),!1;case 13:case 32:return r.trigger("click"),!1}}),t.menuPage.bind("pagehide",function(){t.list.appendTo(t.listbox),t._focusButton(),e.mobile._bindPageRemove.call(t.thisPage)}),t.listbox.bind("popupafterclose",function(){t.close()}),t.isMultiple&&t.headerClose.click(function(){return"overlay"===t.menuType?(t.close(),!1):void 0}),t.thisPage.addDependents(this.menuPage)},_isRebuildRequired:function(){var e=this.list.find("li"),t=this._selectOptions();return t.text()!==e.text()},selected:function(){return this._selectOptions().filter(":selected:not( :jqmData(placeholder='true') )")},refresh:function(t){{var i,n=this;this.element,this.isMultiple}(t||this._isRebuildRequired())&&n._buildList(),i=this.selectedIndices(),n.setButtonText(),n.setButtonCount(),n.list.find("li:not(.ui-li-divider)").removeClass(e.mobile.activeBtnClass).attr("aria-selected",!1).each(function(t){if(e.inArray(t,i)>-1){var o=e(this);o.attr("aria-selected",!0),n.isMultiple?o.find(".ui-icon").removeClass("ui-icon-checkbox-off").addClass("ui-icon-checkbox-on"):o.is(".ui-selectmenu-placeholder")?o.next().addClass(e.mobile.activeBtnClass):o.addClass(e.mobile.activeBtnClass)}})},close:function(){if(!this.options.disabled&&this.isOpen){var e=this;"page"===e.menuType?t.history.back():(e.listbox.popup("close"),e.list.appendTo(e.listbox),e._focusButton()),e.isOpen=!1}},open:function(){function i(){var t=o.list.find("."+e.mobile.activeBtnClass+" a");0===t.length&&(t=o.list.find("li.ui-btn:not( :jqmData(placeholder='true') ) a")),t.first().focus().closest("li").addClass("ui-btn-down-"+n.options.theme)}if(!this.options.disabled){{var o=this,r=e(t),s=o.list.parent(),a=s.outerHeight(),l=(s.outerWidth(),e("."+e.mobile.activePageClass),r.scrollTop()),c=o.button.offset().top,u=r.height();r.width()}o.button.addClass(e.mobile.activeBtnClass),setTimeout(function(){o.button.removeClass(e.mobile.activeBtnClass)},300),a>u-80||!e.support.scrollTop?(o.menuPage.appendTo(e.mobile.pageContainer).page(),o.menuPageContent=f.find(".ui-content"),o.menuPageClose=f.find(".ui-header a"),o.thisPage.unbind("pagehide.remove"),0===l&&c>u&&o.thisPage.one("pagehide",function(){e(this).jqmData("lastScroll",c)}),o.menuPage.one("pageshow",function(){i(),o.isOpen=!0}),o.menuType="page",o.menuPageContent.append(o.list),o.menuPage.find("div .ui-title").text(o.label.text()),e.mobile.changePage(o.menuPage,{transition:e.mobile.defaultDialogTransition})):(o.menuType="overlay",o.listbox.one("popupafteropen",i).popup("open",o.button.offset().left+o.button.outerWidth()/2,o.button.offset().top+o.button.outerHeight()/2),o.isOpen=!0)}},_buildList:function(){var t=this,n=this.options,o=this.placeholder,r=!0,s=t.isMultiple?"checkbox-off":"false";t.list.empty().filter(".ui-listview").listview("destroy");for(var a,l=t.select.find("option"),c=l.length,u=this.select[0],d="data-"+e.mobile.ns,h=d+"option-index",p=d+"icon",f=d+"role",m=d+"placeholder",g=i.createDocumentFragment(),v=!1,b=0;c>b;b++,v=!1){var y=l[b],_=e(y),C=y.parentNode,x=_.text(),w=i.createElement("a"),k=[];if(w.setAttribute("href","#"),w.appendChild(i.createTextNode(x)),C!==u&&"optgroup"===C.nodeName.toLowerCase()){var T=C.getAttribute("label");if(T!==a){var D=i.createElement("li");D.setAttribute(f,"list-divider"),D.setAttribute("role","option"),D.setAttribute("tabindex","-1"),D.appendChild(i.createTextNode(T)),g.appendChild(D),a=T}}!r||y.getAttribute("value")&&0!==x.length&&!_.jqmData("placeholder")||(r=!1,v=!0,y.setAttribute(m,!0),n.hidePlaceholderMenuItems&&k.push("ui-selectmenu-placeholder"),o||(o=t.placeholder=x));var S=i.createElement("li");y.disabled&&(k.push("ui-disabled"),S.setAttribute("aria-disabled",!0)),S.setAttribute(h,b),S.setAttribute(p,s),v&&S.setAttribute(m,!0),S.className=k.join(" "),S.setAttribute("role","option"),w.setAttribute("tabindex","-1"),S.appendChild(w),g.appendChild(S)}t.list[0].appendChild(g),this.isMultiple||o.length?this.headerTitle.text(this.placeholder):this.header.hide(),t.list.listview()},_button:function(){return e("<a>",{href:"#",role:"button",id:this.buttonId,"aria-haspopup":"true","aria-owns":this.menuId})}})};e(i).bind("selectmenubeforecreate",function(t){var i=e(t.target).data("selectmenu");i.options.nativeMenu||0!==i.element.parents(":jqmData(role='popup')").length||n(i)})}(e),function(e){e.widget("mobile.fixedtoolbar",e.mobile.widget,{options:{visibleOnPageShow:!0,disablePageZoom:!0,transition:"slide",fullscreen:!1,tapToggle:!0,tapToggleBlacklist:"a, button, input, select, textarea, .ui-header-fixed, .ui-footer-fixed",hideDuringFocus:"input, textarea, select",updatePagePadding:!0,trackPersistentToolbars:!0,supportBlacklist:function(){var e=t,i=navigator.userAgent,n=navigator.platform,o=i.match(/AppleWebKit\/([0-9]+)/),r=!!o&&o[1],s=i.match(/Fennec\/([0-9]+)/),a=!!s&&s[1],l=i.match(/Opera Mobi\/([0-9]+)/),c=!!l&&l[1];return(n.indexOf("iPhone")>-1||n.indexOf("iPad")>-1||n.indexOf("iPod")>-1)&&r&&534>r||e.operamini&&"[object OperaMini]"==={}.toString.call(e.operamini)||l&&7458>c||i.indexOf("Android")>-1&&r&&533>r||a&&6>a||"palmGetResource"in t&&r&&534>r||i.indexOf("MeeGo")>-1&&i.indexOf("NokiaBrowser/8.5.0")>-1?!0:!1},initSelector:":jqmData(position='fixed')"},_create:function(){var e=this,t=e.options,i=e.element,n=i.is(":jqmData(role='header')")?"header":"footer",o=i.closest(".ui-page");return t.supportBlacklist()?(e.destroy(),void 0):(i.addClass("ui-"+n+"-fixed"),t.fullscreen?(i.addClass("ui-"+n+"-fullscreen"),o.addClass("ui-page-"+n+"-fullscreen")):o.addClass("ui-page-"+n+"-fixed"),e._addTransitionClass(),e._bindPageEvents(),e._bindToggleHandlers(),void 0)},_addTransitionClass:function(){var e=this.options.transition;e&&"none"!==e&&("slide"===e&&(e=this.element.is(".ui-header")?"slidedown":"slideup"),this.element.addClass(e))},_bindPageEvents:function(){var i=this,n=i.options,o=i.element;o.closest(".ui-page").bind("pagebeforeshow",function(){n.disablePageZoom&&e.mobile.zoom.disable(!0),n.visibleOnPageShow||i.hide(!0)}).bind("webkitAnimationStart animationstart updatelayout",function(){var e=this;n.updatePagePadding&&i.updatePagePadding(e)}).bind("pageshow",function(){var o=this;i.updatePagePadding(o),n.updatePagePadding&&e(t).bind("throttledresize."+i.widgetName,function(){i.updatePagePadding(o)})}).bind("pagebeforehide",function(o,r){if(n.disablePageZoom&&e.mobile.zoom.enable(!0),n.updatePagePadding&&e(t).unbind("throttledresize."+i.widgetName),n.trackPersistentToolbars){var s=e(".ui-footer-fixed:jqmData(id)",this),a=e(".ui-header-fixed:jqmData(id)",this),l=s.length&&r.nextPage&&e(".ui-footer-fixed:jqmData(id='"+s.jqmData("id")+"')",r.nextPage),c=a.length&&r.nextPage&&e(".ui-header-fixed:jqmData(id='"+a.jqmData("id")+"')",r.nextPage);l=l||e(),(l.length||c.length)&&(l.add(c).appendTo(e.mobile.pageContainer),r.nextPage.one("pageshow",function(){l.add(c).appendTo(this)}))}})},_visible:!0,updatePagePadding:function(t){var i=this.element,n=i.is(".ui-header");this.options.fullscreen||(t=t||i.closest(".ui-page"),e(t).css("padding-"+(n?"top":"bottom"),i.outerHeight()))},_useTransition:function(i){var n=e(t),o=this.element,r=n.scrollTop(),s=o.height(),a=o.closest(".ui-page").height(),l=e.mobile.getScreenHeight(),c=o.is(":jqmData(role='header')")?"header":"footer";return!i&&(this.options.transition&&"none"!==this.options.transition&&("header"===c&&!this.options.fullscreen&&r>s||"footer"===c&&!this.options.fullscreen&&a-s>r+l)||this.options.fullscreen)},show:function(e){var t="ui-fixed-hidden",i=this.element;this._useTransition(e)?i.removeClass("out "+t).addClass("in"):i.removeClass(t),this._visible=!0},hide:function(e){var t="ui-fixed-hidden",i=this.element,n="out"+("slide"===this.options.transition?" reverse":"");this._useTransition(e)?i.addClass(n).removeClass("in").animationComplete(function(){i.addClass(t).removeClass(n)}):i.addClass(t).removeClass(n),this._visible=!1},toggle:function(){this[this._visible?"hide":"show"]()},_bindToggleHandlers:function(){var t=this,i=t.options,n=t.element;n.closest(".ui-page").bind("vclick",function(n){i.tapToggle&&!e(n.target).closest(i.tapToggleBlacklist).length&&t.toggle()}).bind("focusin focusout",function(n){screen.width<500&&e(n.target).is(i.hideDuringFocus)&&!e(n.target).closest(".ui-header-fixed, .ui-footer-fixed").length&&t["focusin"===n.type&&t._visible?"hide":"show"]()})},destroy:function(){this.element.removeClass("ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden"),this.element.closest(".ui-page").removeClass("ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen")}}),e(i).bind("pagecreate create",function(t){e(t.target).jqmData("fullscreen")&&e(e.mobile.fixedtoolbar.prototype.options.initSelector,t.target).not(":jqmData(fullscreen)").jqmData("fullscreen",!0),e.mobile.fixedtoolbar.prototype.enhanceWithin(t.target)})}(e),function(e,t){function i(e){n=e.originalEvent,a=n.accelerationIncludingGravity,o=Math.abs(a.x),r=Math.abs(a.y),s=Math.abs(a.z),!t.orientation&&(o>7||(s>6&&8>r||8>s&&r>6)&&o>5)?l.enabled&&l.disable():l.enabled||l.enable()}if(/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1){var n,o,r,s,a,l=e.mobile.zoom;e(t).bind("orientationchange.iosorientationfix",l.enable).bind("devicemotion.iosorientationfix",i)}}(e,this),function(e,t){function n(){o.removeClass("ui-mobile-rendering")}var o=e("html"),r=(e("head"),e(t));e(t.document).trigger("mobileinit"),e.mobile.gradeA()&&(e.mobile.ajaxBlacklist&&(e.mobile.ajaxEnabled=!1),o.addClass("ui-mobile ui-mobile-rendering"),setTimeout(n,5e3),e.extend(e.mobile,{initializePage:function(){var t=e(":jqmData(role='page'), :jqmData(role='dialog')");t.length||(t=e("body").wrapInner("<div data-"+e.mobile.ns+"role='page'></div>").children(0)),t.each(function(){var t=e(this);t.jqmData("url")||t.attr("data-"+e.mobile.ns+"url",t.attr("id")||location.pathname+location.search)}),e.mobile.firstPage=t.first(),e.mobile.pageContainer=t.first().parent().addClass("ui-mobile-viewport"),r.trigger("pagecontainercreate"),e.mobile.showPageLoadingMsg(),n(),e.mobile.hashListeningEnabled&&e.mobile.path.isHashValid(location.hash)&&(e(location.hash+':jqmData(role="page")').length||e.mobile.path.isPath(location.hash))?r.trigger("hashchange",[!0]):e.mobile.changePage(e.mobile.firstPage,{transition:"none",reverse:!0,changeHash:!1,fromHashChange:!0})}}),e.mobile.navreadyDeferred.resolve(),e(function(){t.scrollTo(0,1),e.mobile.defaultHomeScroll=e.support.scrollTop&&1!==e(t).scrollTop()?1:0,e.fn.controlgroup&&e(i).bind("pagecreate create",function(t){e(":jqmData(role='controlgroup')",t.target).jqmEnhanceable().controlgroup({excludeInvisible:!1})}),e.mobile.autoInitializePage&&e.mobile.initializePage(),r.load(e.mobile.silentScroll),e.support.cssPointerEvents||e(i).delegate(".ui-disabled","vclick",function(e){e.preventDefault(),e.stopImmediatePropagation()})}))}(e,this)});