wagn 1.14.9 → 1.15.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1060) hide show
  1. checksums.yaml +4 -4
  2. data/features/conflict.feature +4 -2
  3. data/features/follow.feature +21 -20
  4. data/features/notifications.feature +16 -17
  5. data/features/step_definitions/email_steps.rb +9 -5
  6. data/features/step_definitions/wagn_steps.rb +25 -9
  7. data/features/support/scopes.rb +4 -1
  8. data/features/support/wagn_env.rb +1 -1
  9. data/features/update_includers.feature +6 -6
  10. data/lib/decko/engine.rb +58 -0
  11. data/lib/wagn.rb +0 -17
  12. data/lib/wagn/all.rb +0 -13
  13. data/lib/wagn/application.rb +37 -75
  14. data/lib/wagn/commands.rb +44 -26
  15. data/lib/wagn/config/environments/development.rb +9 -3
  16. data/lib/wagn/config/environments/profile.rb +5 -2
  17. data/lib/wagn/config/initializers/session_store.rb +1 -1
  18. data/lib/wagn/exceptions.rb +1 -6
  19. data/lib/wagn/generators/wagn/templates/Gemfile +15 -12
  20. data/lib/wagn/generators/wagn/templates/config.ru +6 -0
  21. data/lib/wagn/generators/wagn/templates/config/application.rb +12 -11
  22. data/lib/wagn/generators/wagn/templates/config/cucumber.yml +1 -1
  23. data/lib/wagn/generators/wagn/templates/config/databases/mysql.yml +19 -11
  24. data/lib/wagn/generators/wagn/templates/config/routes.erb +10 -0
  25. data/lib/wagn/generators/wagn/templates/spec/javascripts/support/deck_jasmine.yml +1 -1
  26. data/lib/wagn/generators/wagn/templates/spec/javascripts/support/wagn_jasmine.yml +4 -4
  27. data/lib/wagn/generators/wagn/wagn_generator.rb +23 -22
  28. data/lib/wagn/mods_spec_helper.rb +8 -7
  29. data/lib/wagn/simplecov_helper.rb +5 -5
  30. data/lib/wagn/tasks/db.rake +2 -2
  31. data/lib/wagn/tasks/test.rake +4 -2
  32. data/lib/wagn/tasks/wagn.rake +117 -69
  33. data/rails/application-routes.rb +6 -0
  34. data/{public → rails}/assets/ace/ext-searchbox.js +0 -0
  35. data/{public → rails}/assets/ace/mode-coffee.js +0 -0
  36. data/{public → rails}/assets/ace/mode-css.js +0 -0
  37. data/{public → rails}/assets/ace/mode-html.js +0 -0
  38. data/{public → rails}/assets/ace/mode-javascript.js +0 -0
  39. data/{public → rails}/assets/ace/mode-json.js +0 -0
  40. data/{public → rails}/assets/ace/mode-scss.js +0 -0
  41. data/{public → rails}/assets/ace/theme-github.js +0 -0
  42. data/{public → rails}/assets/ace/theme-textmate.js +0 -0
  43. data/{public → rails}/assets/ace/worker-coffee.js +0 -0
  44. data/{public → rails}/assets/ace/worker-css.js +0 -0
  45. data/{public → rails}/assets/ace/worker-html.js +0 -0
  46. data/{public → rails}/assets/ace/worker-javascript.js +0 -0
  47. data/{public → rails}/assets/ace/worker-json.js +0 -0
  48. data/{public → rails}/assets/body-bg-660b752b44b87594071f3d0851ac5360.png +0 -0
  49. data/{public → rails}/assets/body-bg-d031f29b6ba7399a6862382c3552f44c.bmp +0 -0
  50. data/{public → rails}/assets/body-bg.bmp +0 -0
  51. data/{public → rails}/assets/body-bg.png +0 -0
  52. data/{public → rails}/assets/external_link-b15ab5051b4ec6f32892ed80019405b5.png +0 -0
  53. data/{public → rails}/assets/external_link.png +0 -0
  54. data/rails/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  55. data/rails/assets/fonts/glyphicons-halflings-regular.svg +288 -0
  56. data/rails/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  57. data/rails/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  58. data/rails/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  59. data/{public → rails}/assets/jasmine/404.html +0 -0
  60. data/{public → rails}/assets/jasmine/500.html +0 -0
  61. data/{public → rails}/assets/jasmine/card_form.html +0 -0
  62. data/{public → rails}/assets/jquery-mobile/ajax-loader-d2b731d3e844ea99b7e7cbf7867f11e9.gif +0 -0
  63. data/{public → rails}/assets/jquery-mobile/ajax-loader.gif +0 -0
  64. data/{public → rails}/assets/jquery-mobile/icons-png/action-black-cbdf206f5fcd70925baa44543a4daa00.png +0 -0
  65. data/{public → rails}/assets/jquery-mobile/icons-png/action-black.png +0 -0
  66. data/{public → rails}/assets/jquery-mobile/icons-png/action-white-d84f0b6801d648581a4e11929f5a2d32.png +0 -0
  67. data/{public → rails}/assets/jquery-mobile/icons-png/action-white.png +0 -0
  68. data/{public → rails}/assets/jquery-mobile/icons-png/alert-black-59ac7785761e066e1f2ea252de9b0e21.png +0 -0
  69. data/{public → rails}/assets/jquery-mobile/icons-png/alert-black.png +0 -0
  70. data/{public → rails}/assets/jquery-mobile/icons-png/alert-white-182c69a7ce9148899f4f190148424120.png +0 -0
  71. data/{public → rails}/assets/jquery-mobile/icons-png/alert-white.png +0 -0
  72. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-black-21860d405538900f6b795516df64a9d4.png +0 -0
  73. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-black.png +0 -0
  74. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-l-black-165afd2c432e27080fec5396c3d80473.png +0 -0
  75. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-l-black.png +0 -0
  76. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-l-white-6805a8d98143bf7b7a6a4e247bf012ab.png +0 -0
  77. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-l-white.png +0 -0
  78. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-r-black-fa7122e338a54119ab23bccbc506cfd8.png +0 -0
  79. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-r-black.png +0 -0
  80. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-r-white-216684b9bdb31f38a531e117aa954f3a.png +0 -0
  81. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-r-white.png +0 -0
  82. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-white-9580e3163441b122078518da2434ca17.png +0 -0
  83. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-d-white.png +0 -0
  84. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-l-black-084aec255becaf2fb316bfefa279a947.png +0 -0
  85. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-l-black.png +0 -0
  86. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-l-white-539e8b951594754da95bd2aa435f454b.png +0 -0
  87. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-l-white.png +0 -0
  88. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-r-black-7eaef732d6e7ac1c9b4ca7a691882aa7.png +0 -0
  89. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-r-black.png +0 -0
  90. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-r-white-ccb86d75bba053287e324429888a1654.png +0 -0
  91. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-r-white.png +0 -0
  92. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-black-0a58aa2208f8e48713d73fb9578ee4f9.png +0 -0
  93. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-black.png +0 -0
  94. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-l-black-2ff102393d9aad184f9e416295acd33e.png +0 -0
  95. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-l-black.png +0 -0
  96. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-l-white-dbf5a3a640d401e8549a904119b8de7a.png +0 -0
  97. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-l-white.png +0 -0
  98. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-r-black-ec45c6f55a7c5d324b7798c668287023.png +0 -0
  99. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-r-black.png +0 -0
  100. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-r-white-f73692b173855dbb37cab8ede059c3fc.png +0 -0
  101. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-r-white.png +0 -0
  102. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-white-bd0f3e8031d8240f3aacf669ab80df78.png +0 -0
  103. data/{public → rails}/assets/jquery-mobile/icons-png/arrow-u-white.png +0 -0
  104. data/{public → rails}/assets/jquery-mobile/icons-png/audio-black-7a7cbfa21ae335c963973a7cd3b17ffe.png +0 -0
  105. data/{public → rails}/assets/jquery-mobile/icons-png/audio-black.png +0 -0
  106. data/{public → rails}/assets/jquery-mobile/icons-png/audio-white-093dc38ea1777aca99344c6d2ebfcc8f.png +0 -0
  107. data/{public → rails}/assets/jquery-mobile/icons-png/audio-white.png +0 -0
  108. data/{public → rails}/assets/jquery-mobile/icons-png/back-black-1bc687d2f194acdf79d2728fcdd2a50f.png +0 -0
  109. data/{public → rails}/assets/jquery-mobile/icons-png/back-black.png +0 -0
  110. data/{public → rails}/assets/jquery-mobile/icons-png/back-white-f4b428a3127c9ecb6e6021c17cd5b588.png +0 -0
  111. data/{public → rails}/assets/jquery-mobile/icons-png/back-white.png +0 -0
  112. data/{public → rails}/assets/jquery-mobile/icons-png/bars-black-fe901336c248a7bba95265784f27b709.png +0 -0
  113. data/{public → rails}/assets/jquery-mobile/icons-png/bars-black.png +0 -0
  114. data/{public → rails}/assets/jquery-mobile/icons-png/bars-white-c983e57c6abd28719a312521d1f3370b.png +0 -0
  115. data/{public → rails}/assets/jquery-mobile/icons-png/bars-white.png +0 -0
  116. data/{public → rails}/assets/jquery-mobile/icons-png/bullets-black-c1de1001de576e283b57da525054a4b2.png +0 -0
  117. data/{public → rails}/assets/jquery-mobile/icons-png/bullets-black.png +0 -0
  118. data/{public → rails}/assets/jquery-mobile/icons-png/bullets-white-4f2871e980101e2bd0d661aac55cd623.png +0 -0
  119. data/{public → rails}/assets/jquery-mobile/icons-png/bullets-white.png +0 -0
  120. data/{public → rails}/assets/jquery-mobile/icons-png/calendar-black-67e5eabe68665b45263c10fd17ad17ba.png +0 -0
  121. data/{public → rails}/assets/jquery-mobile/icons-png/calendar-black.png +0 -0
  122. data/{public → rails}/assets/jquery-mobile/icons-png/calendar-white-e648512a4f976466c0df237484fcc9c4.png +0 -0
  123. data/{public → rails}/assets/jquery-mobile/icons-png/calendar-white.png +0 -0
  124. data/{public → rails}/assets/jquery-mobile/icons-png/camera-black-c5c8b5e08b68d612387428f82bd8e7b9.png +0 -0
  125. data/{public → rails}/assets/jquery-mobile/icons-png/camera-black.png +0 -0
  126. data/{public → rails}/assets/jquery-mobile/icons-png/camera-white-147393e77b3631d9ad5220cd23c54863.png +0 -0
  127. data/{public → rails}/assets/jquery-mobile/icons-png/camera-white.png +0 -0
  128. data/{public → rails}/assets/jquery-mobile/icons-png/carat-d-black-291da5f63efc80c062765bca7d939dc9.png +0 -0
  129. data/{public → rails}/assets/jquery-mobile/icons-png/carat-d-black.png +0 -0
  130. data/{public → rails}/assets/jquery-mobile/icons-png/carat-d-white-891a11602af9a5ffecb4036c42671b32.png +0 -0
  131. data/{public → rails}/assets/jquery-mobile/icons-png/carat-d-white.png +0 -0
  132. data/{public → rails}/assets/jquery-mobile/icons-png/carat-l-black-8d842b168e8722758ebb9e0e20367dc2.png +0 -0
  133. data/{public → rails}/assets/jquery-mobile/icons-png/carat-l-black.png +0 -0
  134. data/{public → rails}/assets/jquery-mobile/icons-png/carat-l-white-3c757452f0f441b544023f5ff8087f25.png +0 -0
  135. data/{public → rails}/assets/jquery-mobile/icons-png/carat-l-white.png +0 -0
  136. data/{public → rails}/assets/jquery-mobile/icons-png/carat-r-black-2ded93b56fcb5b25c7a5b3776e5e65d6.png +0 -0
  137. data/{public → rails}/assets/jquery-mobile/icons-png/carat-r-black.png +0 -0
  138. data/{public → rails}/assets/jquery-mobile/icons-png/carat-r-white-b176f8f6a2b1cc081ffd10c5b1fa596f.png +0 -0
  139. data/{public → rails}/assets/jquery-mobile/icons-png/carat-r-white.png +0 -0
  140. data/{public → rails}/assets/jquery-mobile/icons-png/carat-u-black-23e097594ad948f851e4db090aa4136d.png +0 -0
  141. data/{public → rails}/assets/jquery-mobile/icons-png/carat-u-black.png +0 -0
  142. data/{public → rails}/assets/jquery-mobile/icons-png/carat-u-white-c056d77e74680adf24684602bf581e90.png +0 -0
  143. data/{public → rails}/assets/jquery-mobile/icons-png/carat-u-white.png +0 -0
  144. data/{public → rails}/assets/jquery-mobile/icons-png/check-black-c30e2bdff08c3250d5d9a5016c3a373c.png +0 -0
  145. data/{public → rails}/assets/jquery-mobile/icons-png/check-black.png +0 -0
  146. data/{public → rails}/assets/jquery-mobile/icons-png/check-white-6bef746213ce5d01ec057a2e57eba03e.png +0 -0
  147. data/{public → rails}/assets/jquery-mobile/icons-png/check-white.png +0 -0
  148. data/{public → rails}/assets/jquery-mobile/icons-png/clock-black-426a75bcd9a7fcb19767bdbac8d81e93.png +0 -0
  149. data/{public → rails}/assets/jquery-mobile/icons-png/clock-black.png +0 -0
  150. data/{public → rails}/assets/jquery-mobile/icons-png/clock-white-eb0b22357bf8f45b9b28b2998f6683ac.png +0 -0
  151. data/{public → rails}/assets/jquery-mobile/icons-png/clock-white.png +0 -0
  152. data/{public → rails}/assets/jquery-mobile/icons-png/cloud-black-dd4382e46e8039c6eb410c90b34a7a7d.png +0 -0
  153. data/{public → rails}/assets/jquery-mobile/icons-png/cloud-black.png +0 -0
  154. data/{public → rails}/assets/jquery-mobile/icons-png/cloud-white-b88a47dc043a97a4eac74b1efc62a656.png +0 -0
  155. data/{public → rails}/assets/jquery-mobile/icons-png/cloud-white.png +0 -0
  156. data/{public → rails}/assets/jquery-mobile/icons-png/comment-black-f4168860db0754ff9cf03fc9946b3379.png +0 -0
  157. data/{public → rails}/assets/jquery-mobile/icons-png/comment-black.png +0 -0
  158. data/{public → rails}/assets/jquery-mobile/icons-png/comment-white-6b999cb86d6aca17084e27a9f67c8c24.png +0 -0
  159. data/{public → rails}/assets/jquery-mobile/icons-png/comment-white.png +0 -0
  160. data/{public → rails}/assets/jquery-mobile/icons-png/delete-black-7d8d7896c8845c89d000fa8e97523701.png +0 -0
  161. data/{public → rails}/assets/jquery-mobile/icons-png/delete-black.png +0 -0
  162. data/{public → rails}/assets/jquery-mobile/icons-png/delete-white-bc789fa534e359f9fee233213eb468de.png +0 -0
  163. data/{public → rails}/assets/jquery-mobile/icons-png/delete-white.png +0 -0
  164. data/{public → rails}/assets/jquery-mobile/icons-png/edit-black-ec5837b59ac116c6716cd7f1c63e9fca.png +0 -0
  165. data/{public → rails}/assets/jquery-mobile/icons-png/edit-black.png +0 -0
  166. data/{public → rails}/assets/jquery-mobile/icons-png/edit-white-bdfa858ef0dec5b5ea2297c52c0bea03.png +0 -0
  167. data/{public → rails}/assets/jquery-mobile/icons-png/edit-white.png +0 -0
  168. data/{public → rails}/assets/jquery-mobile/icons-png/eye-black-6530b6b67ce6f3165d194e79beb9755e.png +0 -0
  169. data/{public → rails}/assets/jquery-mobile/icons-png/eye-black.png +0 -0
  170. data/{public → rails}/assets/jquery-mobile/icons-png/eye-white-e44323bf6b85c5b1b1fdf66df97a4b8c.png +0 -0
  171. data/{public → rails}/assets/jquery-mobile/icons-png/eye-white.png +0 -0
  172. data/{public → rails}/assets/jquery-mobile/icons-png/forbidden-black-4cb718a887e88dbaabf04eef0f2312fe.png +0 -0
  173. data/{public → rails}/assets/jquery-mobile/icons-png/forbidden-black.png +0 -0
  174. data/{public → rails}/assets/jquery-mobile/icons-png/forbidden-white-9138b0037c40f353bc794285384cb1e6.png +0 -0
  175. data/{public → rails}/assets/jquery-mobile/icons-png/forbidden-white.png +0 -0
  176. data/{public → rails}/assets/jquery-mobile/icons-png/forward-black-dc3302f286f5edebdd8de5953ba0f4be.png +0 -0
  177. data/{public → rails}/assets/jquery-mobile/icons-png/forward-black.png +0 -0
  178. data/{public → rails}/assets/jquery-mobile/icons-png/forward-white-3c71ad481331c6cd2e55678de52e321b.png +0 -0
  179. data/{public → rails}/assets/jquery-mobile/icons-png/forward-white.png +0 -0
  180. data/{public → rails}/assets/jquery-mobile/icons-png/gear-black-1877187237f71b7ba7fad9dae2afbff8.png +0 -0
  181. data/{public → rails}/assets/jquery-mobile/icons-png/gear-black.png +0 -0
  182. data/{public → rails}/assets/jquery-mobile/icons-png/gear-white-3760f8925907885b77332c927c6f69f1.png +0 -0
  183. data/{public → rails}/assets/jquery-mobile/icons-png/gear-white.png +0 -0
  184. data/{public → rails}/assets/jquery-mobile/icons-png/grid-black-ef43287886d17dad1edfd42d61e77bf9.png +0 -0
  185. data/{public → rails}/assets/jquery-mobile/icons-png/grid-black.png +0 -0
  186. data/{public → rails}/assets/jquery-mobile/icons-png/grid-white-a90cad859111e48260bb7dd58e089421.png +0 -0
  187. data/{public → rails}/assets/jquery-mobile/icons-png/grid-white.png +0 -0
  188. data/{public → rails}/assets/jquery-mobile/icons-png/heart-black-1d83e64216d8604f7e140e496585dc2d.png +0 -0
  189. data/{public → rails}/assets/jquery-mobile/icons-png/heart-black.png +0 -0
  190. data/{public → rails}/assets/jquery-mobile/icons-png/heart-white-70fb68f6f14d6eed8bcb51b9bffb7a1e.png +0 -0
  191. data/{public → rails}/assets/jquery-mobile/icons-png/heart-white.png +0 -0
  192. data/{public → rails}/assets/jquery-mobile/icons-png/home-black-8839e5c9a8e11a4820f29e49d9a940e1.png +0 -0
  193. data/{public → rails}/assets/jquery-mobile/icons-png/home-black.png +0 -0
  194. data/{public → rails}/assets/jquery-mobile/icons-png/home-white-7bb7a707d7fec69a6e87aa15cc81a6df.png +0 -0
  195. data/{public → rails}/assets/jquery-mobile/icons-png/home-white.png +0 -0
  196. data/{public → rails}/assets/jquery-mobile/icons-png/info-black-9b6531eabb8ca3757fa8d7ed9b2a9c61.png +0 -0
  197. data/{public → rails}/assets/jquery-mobile/icons-png/info-black.png +0 -0
  198. data/{public → rails}/assets/jquery-mobile/icons-png/info-white-8f0b3be835d9c4dc7ef68aaa14360475.png +0 -0
  199. data/{public → rails}/assets/jquery-mobile/icons-png/info-white.png +0 -0
  200. data/{public → rails}/assets/jquery-mobile/icons-png/location-black-2d64ab16b9762a79da26b57026a8c013.png +0 -0
  201. data/{public → rails}/assets/jquery-mobile/icons-png/location-black.png +0 -0
  202. data/{public → rails}/assets/jquery-mobile/icons-png/location-white-f20a8601e6921cb9e06551da88746269.png +0 -0
  203. data/{public → rails}/assets/jquery-mobile/icons-png/location-white.png +0 -0
  204. data/{public → rails}/assets/jquery-mobile/icons-png/lock-black-80468c8080ca8728335411fc2e946bc3.png +0 -0
  205. data/{public → rails}/assets/jquery-mobile/icons-png/lock-black.png +0 -0
  206. data/{public → rails}/assets/jquery-mobile/icons-png/lock-white-6a9da31e3af79379b9c74a0b299e498b.png +0 -0
  207. data/{public → rails}/assets/jquery-mobile/icons-png/lock-white.png +0 -0
  208. data/{public → rails}/assets/jquery-mobile/icons-png/mail-black-1ac12d4f1561c196c5b976e3b0271a47.png +0 -0
  209. data/{public → rails}/assets/jquery-mobile/icons-png/mail-black.png +0 -0
  210. data/{public → rails}/assets/jquery-mobile/icons-png/mail-white-cf3c78ddf8627b915455815d00f4c813.png +0 -0
  211. data/{public → rails}/assets/jquery-mobile/icons-png/mail-white.png +0 -0
  212. data/{public → rails}/assets/jquery-mobile/icons-png/minus-black-528a578f797a7476ef7e553c4f319724.png +0 -0
  213. data/{public → rails}/assets/jquery-mobile/icons-png/minus-black.png +0 -0
  214. data/{public → rails}/assets/jquery-mobile/icons-png/minus-white-0a992b9039a4fc5eb017cd32aea41f00.png +0 -0
  215. data/{public → rails}/assets/jquery-mobile/icons-png/minus-white.png +0 -0
  216. data/{public → rails}/assets/jquery-mobile/icons-png/navigation-black-f290da883ab1408425ac13b0c9d55362.png +0 -0
  217. data/{public → rails}/assets/jquery-mobile/icons-png/navigation-black.png +0 -0
  218. data/{public → rails}/assets/jquery-mobile/icons-png/navigation-white-c38219949e27a10f27fb1dfe3f101e2b.png +0 -0
  219. data/{public → rails}/assets/jquery-mobile/icons-png/navigation-white.png +0 -0
  220. data/{public → rails}/assets/jquery-mobile/icons-png/phone-black-8edd665a30189221a6ff370a5913f9c8.png +0 -0
  221. data/{public → rails}/assets/jquery-mobile/icons-png/phone-black.png +0 -0
  222. data/{public → rails}/assets/jquery-mobile/icons-png/phone-white-30cc61da132a3801c8441353f63dd174.png +0 -0
  223. data/{public → rails}/assets/jquery-mobile/icons-png/phone-white.png +0 -0
  224. data/{public → rails}/assets/jquery-mobile/icons-png/plus-black-ee8694a3f99b71fa84279d6f47bc69aa.png +0 -0
  225. data/{public → rails}/assets/jquery-mobile/icons-png/plus-black.png +0 -0
  226. data/{public → rails}/assets/jquery-mobile/icons-png/plus-white-594f2cf43798441607dd1a7a9b9bb68e.png +0 -0
  227. data/{public → rails}/assets/jquery-mobile/icons-png/plus-white.png +0 -0
  228. data/{public → rails}/assets/jquery-mobile/icons-png/power-black-c31a9b9ca22ce18710d4342c897f7a60.png +0 -0
  229. data/{public → rails}/assets/jquery-mobile/icons-png/power-black.png +0 -0
  230. data/{public → rails}/assets/jquery-mobile/icons-png/power-white-e3d0f6f4e1b54675c702dd0ef9dd2819.png +0 -0
  231. data/{public → rails}/assets/jquery-mobile/icons-png/power-white.png +0 -0
  232. data/{public → rails}/assets/jquery-mobile/icons-png/recycle-black-0649d7916693bcabe5b2bee1a26678df.png +0 -0
  233. data/{public → rails}/assets/jquery-mobile/icons-png/recycle-black.png +0 -0
  234. data/{public → rails}/assets/jquery-mobile/icons-png/recycle-white-f63febb141a2739223217f839c5592a2.png +0 -0
  235. data/{public → rails}/assets/jquery-mobile/icons-png/recycle-white.png +0 -0
  236. data/{public → rails}/assets/jquery-mobile/icons-png/refresh-black-b9c418000249bc0b23fa20ef2a73dcce.png +0 -0
  237. data/{public → rails}/assets/jquery-mobile/icons-png/refresh-black.png +0 -0
  238. data/{public → rails}/assets/jquery-mobile/icons-png/refresh-white-741c1f6cc39d51c32a142dfab708ca8c.png +0 -0
  239. data/{public → rails}/assets/jquery-mobile/icons-png/refresh-white.png +0 -0
  240. data/{public → rails}/assets/jquery-mobile/icons-png/search-black-e67608c6619a436c16bd49df4a00f7a6.png +0 -0
  241. data/{public → rails}/assets/jquery-mobile/icons-png/search-black.png +0 -0
  242. data/{public → rails}/assets/jquery-mobile/icons-png/search-white-49687883de84b391661162fb73604434.png +0 -0
  243. data/{public → rails}/assets/jquery-mobile/icons-png/search-white.png +0 -0
  244. data/{public → rails}/assets/jquery-mobile/icons-png/shop-black-c20b263467ce2a8de1b386e775be1d5e.png +0 -0
  245. data/{public → rails}/assets/jquery-mobile/icons-png/shop-black.png +0 -0
  246. data/{public → rails}/assets/jquery-mobile/icons-png/shop-white-80a8c9c4d2e838919941423dffe0801c.png +0 -0
  247. data/{public → rails}/assets/jquery-mobile/icons-png/shop-white.png +0 -0
  248. data/{public → rails}/assets/jquery-mobile/icons-png/star-black-a6bc8b485ff200c1deab9e9e77f52b32.png +0 -0
  249. data/{public → rails}/assets/jquery-mobile/icons-png/star-black.png +0 -0
  250. data/{public → rails}/assets/jquery-mobile/icons-png/star-white-8b620c1dced3da828d9edde9f6022249.png +0 -0
  251. data/{public → rails}/assets/jquery-mobile/icons-png/star-white.png +0 -0
  252. data/{public → rails}/assets/jquery-mobile/icons-png/tag-black-4fdb325b352b565f422193a80c1e4bfd.png +0 -0
  253. data/{public → rails}/assets/jquery-mobile/icons-png/tag-black.png +0 -0
  254. data/{public → rails}/assets/jquery-mobile/icons-png/tag-white-a35a79ed983ce834a8ddccefeaebce15.png +0 -0
  255. data/{public → rails}/assets/jquery-mobile/icons-png/tag-white.png +0 -0
  256. data/{public → rails}/assets/jquery-mobile/icons-png/user-black-85accf54554aa97069b5939b16b5e681.png +0 -0
  257. data/{public → rails}/assets/jquery-mobile/icons-png/user-black.png +0 -0
  258. data/{public → rails}/assets/jquery-mobile/icons-png/user-white-9abd9f6162d36152c841e475c4aaf118.png +0 -0
  259. data/{public → rails}/assets/jquery-mobile/icons-png/user-white.png +0 -0
  260. data/{public → rails}/assets/jquery-mobile/icons-png/video-black-1d5a483c5ce892d0012c60010286396b.png +0 -0
  261. data/{public → rails}/assets/jquery-mobile/icons-png/video-black.png +0 -0
  262. data/{public → rails}/assets/jquery-mobile/icons-png/video-white-80a2ae6a9b790e6ee05680fcdee8905a.png +0 -0
  263. data/{public → rails}/assets/jquery-mobile/icons-png/video-white.png +0 -0
  264. data/{public → rails}/assets/jquery-ui/animated-overlay-602eee4c79a4796b02bb6442948c9e28.gif +0 -0
  265. data/{public → rails}/assets/jquery-ui/animated-overlay.gif +0 -0
  266. data/{public → rails}/assets/jquery-ui/ui-bg_flat_0_aaaaaa_40x100-7d1197a52442bc56fcad60d0390f4b32.png +0 -0
  267. data/{public → rails}/assets/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  268. data/{public → rails}/assets/jquery-ui/ui-bg_flat_75_ffffff_40x100-3c4b974defa5e8bdaf8a603034c4435e.png +0 -0
  269. data/{public → rails}/assets/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  270. data/{public → rails}/assets/jquery-ui/ui-bg_glass_55_fbf9ee_1x400-38c2dea4d046fd3f56cc3996e2e6018b.png +0 -0
  271. data/{public → rails}/assets/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  272. data/{public → rails}/assets/jquery-ui/ui-bg_glass_65_ffffff_1x400-ddb7ee7527bff283054406c50e597e1e.png +0 -0
  273. data/{public → rails}/assets/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  274. data/{public → rails}/assets/jquery-ui/ui-bg_glass_75_dadada_1x400-d618461418b1ebc6b7996979f4c3dc92.png +0 -0
  275. data/{public → rails}/assets/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  276. data/{public → rails}/assets/jquery-ui/ui-bg_glass_75_e6e6e6_1x400-48d8d545f708e5870a965ce9df8b0e38.png +0 -0
  277. data/{public → rails}/assets/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  278. data/{public → rails}/assets/jquery-ui/ui-bg_glass_95_fef1ec_1x400-f3526b8f82249928f0a6baf044204b15.png +0 -0
  279. data/{public → rails}/assets/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  280. data/{public → rails}/assets/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100-cec5c56503b8480f834c3fce35dae8df.png +0 -0
  281. data/{public → rails}/assets/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  282. data/{public → rails}/assets/jquery-ui/ui-icons_222222_256x240-b1eb177a51ea7925448318a26d988842.png +0 -0
  283. data/{public → rails}/assets/jquery-ui/ui-icons_222222_256x240.png +0 -0
  284. data/{public → rails}/assets/jquery-ui/ui-icons_2e83ff_256x240-49c2da9cac2dc565265586f716491298.png +0 -0
  285. data/{public → rails}/assets/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  286. data/{public → rails}/assets/jquery-ui/ui-icons_454545_256x240-68b2fe3268f7604fb0767a0372e2db85.png +0 -0
  287. data/{public → rails}/assets/jquery-ui/ui-icons_454545_256x240.png +0 -0
  288. data/{public → rails}/assets/jquery-ui/ui-icons_888888_256x240-8040cfcc88792375b7788feb59189eef.png +0 -0
  289. data/{public → rails}/assets/jquery-ui/ui-icons_888888_256x240.png +0 -0
  290. data/{public → rails}/assets/jquery-ui/ui-icons_cd0a0a_256x240-d4a62216bf6f0cd0071149890763a5ff.png +0 -0
  291. data/{public → rails}/assets/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  292. data/{public → rails}/assets/jquery.min-388372ef65cc311f6a3df4a6ceac8d22.map +0 -0
  293. data/{public → rails}/assets/jquery.min.map +0 -0
  294. data/{public → rails}/assets/manifest.yml +0 -0
  295. data/{public → rails}/assets/smoothness/animated-overlay-602eee4c79a4796b02bb6442948c9e28.gif +0 -0
  296. data/{public → rails}/assets/smoothness/animated-overlay.gif +0 -0
  297. data/{public → rails}/assets/smoothness/ui-bg_flat_0_aaaaaa_40x100-31613497e63975a54520b7065b125dea.png +0 -0
  298. data/{public → rails}/assets/smoothness/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  299. data/{public → rails}/assets/smoothness/ui-bg_flat_75_ffffff_40x100-f4b0e20e6f4c83b9f52cf062ed0f5284.png +0 -0
  300. data/{public → rails}/assets/smoothness/ui-bg_flat_75_ffffff_40x100.png +0 -0
  301. data/{public → rails}/assets/smoothness/ui-bg_glass_55_fbf9ee_1x400-e3606d6e7ad67486ffdc83edca64d4c5.png +0 -0
  302. data/{public → rails}/assets/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  303. data/{public → rails}/assets/smoothness/ui-bg_glass_65_ffffff_1x400-dcec96932b90ff4cd4fea91284a6e9a3.png +0 -0
  304. data/{public → rails}/assets/smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
  305. data/{public → rails}/assets/smoothness/ui-bg_glass_75_dadada_1x400-a2310f533684ede4f1216d7299b5cd58.png +0 -0
  306. data/{public → rails}/assets/smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
  307. data/{public → rails}/assets/smoothness/ui-bg_glass_75_e6e6e6_1x400-d872f3a0a02dea609e4b0321520236d9.png +0 -0
  308. data/{public → rails}/assets/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  309. data/{public → rails}/assets/smoothness/ui-bg_glass_95_fef1ec_1x400-9ccaed8a65a3c285c16a73bdf03a69b3.png +0 -0
  310. data/{public → rails}/assets/smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  311. data/{public → rails}/assets/smoothness/ui-bg_highlight-soft_75_cccccc_1x100-2ef1d227b5c0f33ce3c5e45afa953991.png +0 -0
  312. data/{public → rails}/assets/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  313. data/{public → rails}/assets/smoothness/ui-icons_222222_256x240-0675a996f0bdc78890f7b312c543b06a.png +0 -0
  314. data/{public → rails}/assets/smoothness/ui-icons_222222_256x240.png +0 -0
  315. data/{public → rails}/assets/smoothness/ui-icons_2e83ff_256x240-6aea736f81a417977efd77f183519a54.png +0 -0
  316. data/{public → rails}/assets/smoothness/ui-icons_2e83ff_256x240.png +0 -0
  317. data/{public → rails}/assets/smoothness/ui-icons_454545_256x240-6f4361f45745fb0cd7b0cc2851dc1cc3.png +0 -0
  318. data/{public → rails}/assets/smoothness/ui-icons_454545_256x240.png +0 -0
  319. data/{public → rails}/assets/smoothness/ui-icons_888888_256x240-8f6818bd8631ba3489de718e26c7e6cf.png +0 -0
  320. data/{public → rails}/assets/smoothness/ui-icons_888888_256x240.png +0 -0
  321. data/{public → rails}/assets/smoothness/ui-icons_cd0a0a_256x240-2969ddba6d0a9c62603a4aa85a363cda.png +0 -0
  322. data/{public → rails}/assets/smoothness/ui-icons_cd0a0a_256x240.png +0 -0
  323. data/{public → rails}/assets/tinymce/jquery.tinymce.js +0 -0
  324. data/{public → rails}/assets/tinymce/langs/en.js +0 -0
  325. data/{public → rails}/assets/tinymce/license.txt +0 -0
  326. data/{public → rails}/assets/tinymce/plugins/advhr/css/advhr.css +0 -0
  327. data/{public → rails}/assets/tinymce/plugins/advhr/editor_plugin.js +0 -0
  328. data/{public → rails}/assets/tinymce/plugins/advhr/editor_plugin_src.js +0 -0
  329. data/{public → rails}/assets/tinymce/plugins/advhr/js/rule.js +0 -0
  330. data/{public → rails}/assets/tinymce/plugins/advhr/langs/en_dlg.js +0 -0
  331. data/{public → rails}/assets/tinymce/plugins/advhr/rule.htm +0 -0
  332. data/{public → rails}/assets/tinymce/plugins/advimage/css/advimage.css +0 -0
  333. data/{public → rails}/assets/tinymce/plugins/advimage/editor_plugin.js +0 -0
  334. data/{public → rails}/assets/tinymce/plugins/advimage/editor_plugin_src.js +0 -0
  335. data/{public → rails}/assets/tinymce/plugins/advimage/image.htm +0 -0
  336. data/{public → rails}/assets/tinymce/plugins/advimage/img/sample.gif +0 -0
  337. data/{public → rails}/assets/tinymce/plugins/advimage/js/image.js +0 -0
  338. data/{public → rails}/assets/tinymce/plugins/advimage/langs/en_dlg.js +0 -0
  339. data/{public → rails}/assets/tinymce/plugins/advlink/css/advlink.css +0 -0
  340. data/{public → rails}/assets/tinymce/plugins/advlink/editor_plugin.js +0 -0
  341. data/{public → rails}/assets/tinymce/plugins/advlink/editor_plugin_src.js +0 -0
  342. data/{public → rails}/assets/tinymce/plugins/advlink/js/advlink.js +0 -0
  343. data/{public → rails}/assets/tinymce/plugins/advlink/langs/en_dlg.js +0 -0
  344. data/{public → rails}/assets/tinymce/plugins/advlink/link.htm +0 -0
  345. data/{public → rails}/assets/tinymce/plugins/advlist/editor_plugin.js +0 -0
  346. data/{public → rails}/assets/tinymce/plugins/advlist/editor_plugin_src.js +0 -0
  347. data/{public → rails}/assets/tinymce/plugins/autolink/editor_plugin.js +0 -0
  348. data/{public → rails}/assets/tinymce/plugins/autolink/editor_plugin_src.js +0 -0
  349. data/{public → rails}/assets/tinymce/plugins/autoresize/editor_plugin.js +0 -0
  350. data/{public → rails}/assets/tinymce/plugins/autoresize/editor_plugin_src.js +0 -0
  351. data/{public → rails}/assets/tinymce/plugins/autosave/editor_plugin.js +0 -0
  352. data/{public → rails}/assets/tinymce/plugins/autosave/editor_plugin_src.js +0 -0
  353. data/{public → rails}/assets/tinymce/plugins/bbcode/editor_plugin.js +0 -0
  354. data/{public → rails}/assets/tinymce/plugins/bbcode/editor_plugin_src.js +0 -0
  355. data/{public → rails}/assets/tinymce/plugins/contextmenu/editor_plugin.js +0 -0
  356. data/{public → rails}/assets/tinymce/plugins/contextmenu/editor_plugin_src.js +0 -0
  357. data/{public → rails}/assets/tinymce/plugins/directionality/editor_plugin.js +0 -0
  358. data/{public → rails}/assets/tinymce/plugins/directionality/editor_plugin_src.js +0 -0
  359. data/{public → rails}/assets/tinymce/plugins/emotions/editor_plugin.js +0 -0
  360. data/{public → rails}/assets/tinymce/plugins/emotions/editor_plugin_src.js +0 -0
  361. data/{public → rails}/assets/tinymce/plugins/emotions/emotions.htm +0 -0
  362. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-cool.gif +0 -0
  363. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-cry.gif +0 -0
  364. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  365. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  366. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-frown.gif +0 -0
  367. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-innocent.gif +0 -0
  368. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-kiss.gif +0 -0
  369. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-laughing.gif +0 -0
  370. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  371. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-sealed.gif +0 -0
  372. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-smile.gif +0 -0
  373. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-surprised.gif +0 -0
  374. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  375. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-undecided.gif +0 -0
  376. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-wink.gif +0 -0
  377. data/{public → rails}/assets/tinymce/plugins/emotions/img/smiley-yell.gif +0 -0
  378. data/{public → rails}/assets/tinymce/plugins/emotions/js/emotions.js +0 -0
  379. data/{public → rails}/assets/tinymce/plugins/emotions/langs/en_dlg.js +0 -0
  380. data/{public → rails}/assets/tinymce/plugins/example/dialog.htm +0 -0
  381. data/{public → rails}/assets/tinymce/plugins/example/editor_plugin.js +0 -0
  382. data/{public → rails}/assets/tinymce/plugins/example/editor_plugin_src.js +0 -0
  383. data/{public → rails}/assets/tinymce/plugins/example/img/example.gif +0 -0
  384. data/{public → rails}/assets/tinymce/plugins/example/js/dialog.js +0 -0
  385. data/{public → rails}/assets/tinymce/plugins/example/langs/en.js +0 -0
  386. data/{public → rails}/assets/tinymce/plugins/example/langs/en_dlg.js +0 -0
  387. data/{public → rails}/assets/tinymce/plugins/example_dependency/editor_plugin.js +0 -0
  388. data/{public → rails}/assets/tinymce/plugins/example_dependency/editor_plugin_src.js +0 -0
  389. data/{public → rails}/assets/tinymce/plugins/fullpage/css/fullpage.css +0 -0
  390. data/{public → rails}/assets/tinymce/plugins/fullpage/editor_plugin.js +0 -0
  391. data/{public → rails}/assets/tinymce/plugins/fullpage/editor_plugin_src.js +0 -0
  392. data/{public → rails}/assets/tinymce/plugins/fullpage/fullpage.htm +0 -0
  393. data/{public → rails}/assets/tinymce/plugins/fullpage/js/fullpage.js +0 -0
  394. data/{public → rails}/assets/tinymce/plugins/fullpage/langs/en_dlg.js +0 -0
  395. data/{public → rails}/assets/tinymce/plugins/fullscreen/editor_plugin.js +0 -0
  396. data/{public → rails}/assets/tinymce/plugins/fullscreen/editor_plugin_src.js +0 -0
  397. data/{public → rails}/assets/tinymce/plugins/fullscreen/fullscreen.htm +0 -0
  398. data/{public → rails}/assets/tinymce/plugins/iespell/editor_plugin.js +0 -0
  399. data/{public → rails}/assets/tinymce/plugins/iespell/editor_plugin_src.js +0 -0
  400. data/{public → rails}/assets/tinymce/plugins/inlinepopups/editor_plugin.js +0 -0
  401. data/{public → rails}/assets/tinymce/plugins/inlinepopups/editor_plugin_src.js +0 -0
  402. data/{public → rails}/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  403. data/{public → rails}/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  404. data/{public → rails}/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  405. data/{public → rails}/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  406. data/{public → rails}/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  407. data/{public → rails}/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  408. data/{public → rails}/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  409. data/{public → rails}/assets/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -0
  410. data/{public → rails}/assets/tinymce/plugins/inlinepopups/template.htm +0 -0
  411. data/{public → rails}/assets/tinymce/plugins/insertdatetime/editor_plugin.js +0 -0
  412. data/{public → rails}/assets/tinymce/plugins/insertdatetime/editor_plugin_src.js +0 -0
  413. data/{public → rails}/assets/tinymce/plugins/layer/editor_plugin.js +0 -0
  414. data/{public → rails}/assets/tinymce/plugins/layer/editor_plugin_src.js +0 -0
  415. data/{public → rails}/assets/tinymce/plugins/legacyoutput/editor_plugin.js +0 -0
  416. data/{public → rails}/assets/tinymce/plugins/legacyoutput/editor_plugin_src.js +0 -0
  417. data/{public → rails}/assets/tinymce/plugins/lists/editor_plugin.js +0 -0
  418. data/{public → rails}/assets/tinymce/plugins/lists/editor_plugin_src.js +0 -0
  419. data/{public → rails}/assets/tinymce/plugins/media/css/media.css +0 -0
  420. data/{public → rails}/assets/tinymce/plugins/media/editor_plugin.js +0 -0
  421. data/{public → rails}/assets/tinymce/plugins/media/editor_plugin_src.js +0 -0
  422. data/{public → rails}/assets/tinymce/plugins/media/js/embed.js +0 -0
  423. data/{public → rails}/assets/tinymce/plugins/media/js/media.js +0 -0
  424. data/{public → rails}/assets/tinymce/plugins/media/langs/en_dlg.js +0 -0
  425. data/{public → rails}/assets/tinymce/plugins/media/media.htm +0 -0
  426. data/{public → rails}/assets/tinymce/plugins/media/moxieplayer.swf +0 -0
  427. data/{public → rails}/assets/tinymce/plugins/nonbreaking/editor_plugin.js +0 -0
  428. data/{public → rails}/assets/tinymce/plugins/nonbreaking/editor_plugin_src.js +0 -0
  429. data/{public → rails}/assets/tinymce/plugins/noneditable/editor_plugin.js +0 -0
  430. data/{public → rails}/assets/tinymce/plugins/noneditable/editor_plugin_src.js +0 -0
  431. data/{public → rails}/assets/tinymce/plugins/pagebreak/editor_plugin.js +0 -0
  432. data/{public → rails}/assets/tinymce/plugins/pagebreak/editor_plugin_src.js +0 -0
  433. data/{public → rails}/assets/tinymce/plugins/paste/editor_plugin.js +0 -0
  434. data/{public → rails}/assets/tinymce/plugins/paste/editor_plugin_src.js +0 -0
  435. data/{public → rails}/assets/tinymce/plugins/paste/js/pastetext.js +0 -0
  436. data/{public → rails}/assets/tinymce/plugins/paste/js/pasteword.js +0 -0
  437. data/{public → rails}/assets/tinymce/plugins/paste/langs/en_dlg.js +0 -0
  438. data/{public → rails}/assets/tinymce/plugins/paste/pastetext.htm +0 -0
  439. data/{public → rails}/assets/tinymce/plugins/paste/pasteword.htm +0 -0
  440. data/{public → rails}/assets/tinymce/plugins/preview/editor_plugin.js +0 -0
  441. data/{public → rails}/assets/tinymce/plugins/preview/editor_plugin_src.js +0 -0
  442. data/{public → rails}/assets/tinymce/plugins/preview/example.html +0 -0
  443. data/{public → rails}/assets/tinymce/plugins/preview/jscripts/embed.js +0 -0
  444. data/{public → rails}/assets/tinymce/plugins/preview/preview.html +0 -0
  445. data/{public → rails}/assets/tinymce/plugins/print/editor_plugin.js +0 -0
  446. data/{public → rails}/assets/tinymce/plugins/print/editor_plugin_src.js +0 -0
  447. data/{public → rails}/assets/tinymce/plugins/save/editor_plugin.js +0 -0
  448. data/{public → rails}/assets/tinymce/plugins/save/editor_plugin_src.js +0 -0
  449. data/{public → rails}/assets/tinymce/plugins/searchreplace/css/searchreplace.css +0 -0
  450. data/{public → rails}/assets/tinymce/plugins/searchreplace/editor_plugin.js +0 -0
  451. data/{public → rails}/assets/tinymce/plugins/searchreplace/editor_plugin_src.js +0 -0
  452. data/{public → rails}/assets/tinymce/plugins/searchreplace/js/searchreplace.js +0 -0
  453. data/{public → rails}/assets/tinymce/plugins/searchreplace/langs/en_dlg.js +0 -0
  454. data/{public → rails}/assets/tinymce/plugins/searchreplace/searchreplace.htm +0 -0
  455. data/{public → rails}/assets/tinymce/plugins/spellchecker/css/content.css +0 -0
  456. data/{public → rails}/assets/tinymce/plugins/spellchecker/editor_plugin.js +0 -0
  457. data/{public → rails}/assets/tinymce/plugins/spellchecker/editor_plugin_src.js +0 -0
  458. data/{public → rails}/assets/tinymce/plugins/spellchecker/img/wline.gif +0 -0
  459. data/{public → rails}/assets/tinymce/plugins/style/css/props.css +0 -0
  460. data/{public → rails}/assets/tinymce/plugins/style/editor_plugin.js +0 -0
  461. data/{public → rails}/assets/tinymce/plugins/style/editor_plugin_src.js +0 -0
  462. data/{public → rails}/assets/tinymce/plugins/style/js/props.js +0 -0
  463. data/{public → rails}/assets/tinymce/plugins/style/langs/en_dlg.js +0 -0
  464. data/{public → rails}/assets/tinymce/plugins/style/props.htm +0 -0
  465. data/{public → rails}/assets/tinymce/plugins/style/readme.txt +0 -0
  466. data/{public → rails}/assets/tinymce/plugins/tabfocus/editor_plugin.js +0 -0
  467. data/{public → rails}/assets/tinymce/plugins/tabfocus/editor_plugin_src.js +0 -0
  468. data/{public → rails}/assets/tinymce/plugins/table/cell.htm +0 -0
  469. data/{public → rails}/assets/tinymce/plugins/table/css/cell.css +0 -0
  470. data/{public → rails}/assets/tinymce/plugins/table/css/row.css +0 -0
  471. data/{public → rails}/assets/tinymce/plugins/table/css/table.css +0 -0
  472. data/{public → rails}/assets/tinymce/plugins/table/editor_plugin.js +0 -0
  473. data/{public → rails}/assets/tinymce/plugins/table/editor_plugin_src.js +0 -0
  474. data/{public → rails}/assets/tinymce/plugins/table/js/cell.js +0 -0
  475. data/{public → rails}/assets/tinymce/plugins/table/js/merge_cells.js +0 -0
  476. data/{public → rails}/assets/tinymce/plugins/table/js/row.js +0 -0
  477. data/{public → rails}/assets/tinymce/plugins/table/js/table.js +0 -0
  478. data/{public → rails}/assets/tinymce/plugins/table/langs/en_dlg.js +0 -0
  479. data/{public → rails}/assets/tinymce/plugins/table/merge_cells.htm +0 -0
  480. data/{public → rails}/assets/tinymce/plugins/table/row.htm +0 -0
  481. data/{public → rails}/assets/tinymce/plugins/table/table.htm +0 -0
  482. data/{public → rails}/assets/tinymce/plugins/template/blank.htm +0 -0
  483. data/{public → rails}/assets/tinymce/plugins/template/css/template.css +0 -0
  484. data/{public → rails}/assets/tinymce/plugins/template/editor_plugin.js +0 -0
  485. data/{public → rails}/assets/tinymce/plugins/template/editor_plugin_src.js +0 -0
  486. data/{public → rails}/assets/tinymce/plugins/template/js/template.js +0 -0
  487. data/{public → rails}/assets/tinymce/plugins/template/langs/en_dlg.js +0 -0
  488. data/{public → rails}/assets/tinymce/plugins/template/template.htm +0 -0
  489. data/{public → rails}/assets/tinymce/plugins/visualblocks/css/visualblocks.css +0 -0
  490. data/{public → rails}/assets/tinymce/plugins/visualblocks/editor_plugin.js +0 -0
  491. data/{public → rails}/assets/tinymce/plugins/visualblocks/editor_plugin_src.js +0 -0
  492. data/{public → rails}/assets/tinymce/plugins/visualchars/editor_plugin.js +0 -0
  493. data/{public → rails}/assets/tinymce/plugins/visualchars/editor_plugin_src.js +0 -0
  494. data/{public → rails}/assets/tinymce/plugins/wordcount/editor_plugin.js +0 -0
  495. data/{public → rails}/assets/tinymce/plugins/wordcount/editor_plugin_src.js +0 -0
  496. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/abbr.htm +0 -0
  497. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/acronym.htm +0 -0
  498. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/attributes.htm +0 -0
  499. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/cite.htm +0 -0
  500. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/css/attributes.css +0 -0
  501. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/css/popup.css +0 -0
  502. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/del.htm +0 -0
  503. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/editor_plugin.js +0 -0
  504. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +0 -0
  505. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/ins.htm +0 -0
  506. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/js/abbr.js +0 -0
  507. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/js/acronym.js +0 -0
  508. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -0
  509. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/js/cite.js +0 -0
  510. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/js/del.js +0 -0
  511. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/js/element_common.js +0 -0
  512. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/js/ins.js +0 -0
  513. data/{public → rails}/assets/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +0 -0
  514. data/{public → rails}/assets/tinymce/themes/advanced/about.htm +0 -0
  515. data/{public → rails}/assets/tinymce/themes/advanced/anchor.htm +0 -0
  516. data/{public → rails}/assets/tinymce/themes/advanced/charmap.htm +0 -0
  517. data/{public → rails}/assets/tinymce/themes/advanced/color_picker.htm +0 -0
  518. data/{public → rails}/assets/tinymce/themes/advanced/editor_template.js +0 -0
  519. data/{public → rails}/assets/tinymce/themes/advanced/editor_template_src.js +0 -0
  520. data/{public → rails}/assets/tinymce/themes/advanced/image.htm +0 -0
  521. data/{public → rails}/assets/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
  522. data/{public → rails}/assets/tinymce/themes/advanced/img/flash.gif +0 -0
  523. data/{public → rails}/assets/tinymce/themes/advanced/img/icons.gif +0 -0
  524. data/{public → rails}/assets/tinymce/themes/advanced/img/iframe.gif +0 -0
  525. data/{public → rails}/assets/tinymce/themes/advanced/img/pagebreak.gif +0 -0
  526. data/{public → rails}/assets/tinymce/themes/advanced/img/quicktime.gif +0 -0
  527. data/{public → rails}/assets/tinymce/themes/advanced/img/realmedia.gif +0 -0
  528. data/{public → rails}/assets/tinymce/themes/advanced/img/shockwave.gif +0 -0
  529. data/{public → rails}/assets/tinymce/themes/advanced/img/trans.gif +0 -0
  530. data/{public → rails}/assets/tinymce/themes/advanced/img/video.gif +0 -0
  531. data/{public → rails}/assets/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
  532. data/{public → rails}/assets/tinymce/themes/advanced/js/about.js +0 -0
  533. data/{public → rails}/assets/tinymce/themes/advanced/js/anchor.js +0 -0
  534. data/{public → rails}/assets/tinymce/themes/advanced/js/charmap.js +0 -0
  535. data/{public → rails}/assets/tinymce/themes/advanced/js/color_picker.js +0 -0
  536. data/{public → rails}/assets/tinymce/themes/advanced/js/image.js +0 -0
  537. data/{public → rails}/assets/tinymce/themes/advanced/js/link.js +0 -0
  538. data/{public → rails}/assets/tinymce/themes/advanced/js/source_editor.js +0 -0
  539. data/{public → rails}/assets/tinymce/themes/advanced/langs/en.js +0 -0
  540. data/{public → rails}/assets/tinymce/themes/advanced/langs/en_dlg.js +0 -0
  541. data/{public → rails}/assets/tinymce/themes/advanced/link.htm +0 -0
  542. data/{public → rails}/assets/tinymce/themes/advanced/shortcuts.htm +0 -0
  543. data/{public → rails}/assets/tinymce/themes/advanced/skins/default/content.css +0 -0
  544. data/{public → rails}/assets/tinymce/themes/advanced/skins/default/dialog.css +0 -0
  545. data/{public → rails}/assets/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
  546. data/{public → rails}/assets/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
  547. data/{public → rails}/assets/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  548. data/{public → rails}/assets/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  549. data/{public → rails}/assets/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
  550. data/{public → rails}/assets/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
  551. data/{public → rails}/assets/tinymce/themes/advanced/skins/default/ui.css +0 -0
  552. data/{public → rails}/assets/tinymce/themes/advanced/skins/highcontrast/content.css +0 -0
  553. data/{public → rails}/assets/tinymce/themes/advanced/skins/highcontrast/dialog.css +0 -0
  554. data/{public → rails}/assets/tinymce/themes/advanced/skins/highcontrast/ui.css +0 -0
  555. data/{public → rails}/assets/tinymce/themes/advanced/skins/o2k7/content.css +0 -0
  556. data/{public → rails}/assets/tinymce/themes/advanced/skins/o2k7/dialog.css +0 -0
  557. data/{public → rails}/assets/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  558. data/{public → rails}/assets/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  559. data/{public → rails}/assets/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  560. data/{public → rails}/assets/tinymce/themes/advanced/skins/o2k7/ui.css +0 -0
  561. data/{public → rails}/assets/tinymce/themes/advanced/skins/o2k7/ui_black.css +0 -0
  562. data/{public → rails}/assets/tinymce/themes/advanced/skins/o2k7/ui_silver.css +0 -0
  563. data/{public → rails}/assets/tinymce/themes/advanced/source_editor.htm +0 -0
  564. data/{public → rails}/assets/tinymce/themes/simple/editor_template.js +0 -0
  565. data/{public → rails}/assets/tinymce/themes/simple/editor_template_src.js +0 -0
  566. data/{public → rails}/assets/tinymce/themes/simple/img/icons.gif +0 -0
  567. data/{public → rails}/assets/tinymce/themes/simple/langs/en.js +0 -0
  568. data/{public → rails}/assets/tinymce/themes/simple/skins/default/content.css +0 -0
  569. data/{public → rails}/assets/tinymce/themes/simple/skins/default/ui.css +0 -0
  570. data/{public → rails}/assets/tinymce/themes/simple/skins/o2k7/content.css +0 -0
  571. data/{public → rails}/assets/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  572. data/{public → rails}/assets/tinymce/themes/simple/skins/o2k7/ui.css +0 -0
  573. data/{public → rails}/assets/tinymce/tiny_mce.js +0 -0
  574. data/{public → rails}/assets/tinymce/tiny_mce_jquery.js +0 -0
  575. data/{public → rails}/assets/tinymce/tiny_mce_jquery_src.js +0 -0
  576. data/{public → rails}/assets/tinymce/tiny_mce_popup.js +0 -0
  577. data/{public → rails}/assets/tinymce/tiny_mce_src.js +0 -0
  578. data/{public → rails}/assets/tinymce/utils/editable_selects.js +0 -0
  579. data/{public → rails}/assets/tinymce/utils/form_utils.js +0 -0
  580. data/{public → rails}/assets/tinymce/utils/mctabs.js +0 -0
  581. data/{public → rails}/assets/tinymce/utils/validate.js +0 -0
  582. data/{app → rails}/controllers/card_controller.rb +23 -21
  583. data/{lib/wagn/config/routes.rb → rails/engine-routes.rb} +2 -6
  584. data/spec/controllers/card_controller_spec.rb +8 -3
  585. data/spec/controllers/location_spec.rb +3 -0
  586. data/test/script/run_engine_deck.sh +47 -0
  587. data/test/script/run_mig.sh +29 -0
  588. data/test/test_helper.rb +1 -1
  589. data/wagn.gemspec +4 -26
  590. metadata +564 -1250
  591. data/.gitignore +0 -23
  592. data/.simplecov +0 -28
  593. data/.tm_properties +0 -3
  594. data/CONTRIBUTING.rdoc +0 -24
  595. data/JASMINE_RAILS_TEST.md +0 -16
  596. data/README.rdoc +0 -95
  597. data/VERSION +0 -1
  598. data/db/bootstrap/card_actions.yml +0 -3613
  599. data/db/bootstrap/card_acts.yml +0 -7
  600. data/db/bootstrap/card_changes.yml +0 -10906
  601. data/db/bootstrap/card_references.yml +0 -3830
  602. data/db/bootstrap/cards.yml +0 -9876
  603. data/db/migrate/20110511221913_require_earlier_migrations.rb +0 -17
  604. data/db/migrate/20120105203350_require_1_8_migrations.rb +0 -15
  605. data/db/migrate/20121111025347_require_1_10_migrations.rb +0 -15
  606. data/db/migrate/20121118114000_split_link_type.rb +0 -16
  607. data/db/migrate/20121118115000_update_link_type.rb +0 -19
  608. data/db/migrate/20130106052640_table_cleanup.rb +0 -25
  609. data/db/migrate/20130109015336_trunk_left.rb +0 -14
  610. data/db/migrate/20130411210957_update_codenames.rb +0 -14
  611. data/db/migrate/20140822073704_create_new_revision_tables.rb +0 -43
  612. data/db/migrate/20141001105348_move_revisions_to_actions.rb +0 -62
  613. data/db/migrate/20141121172918_rename_card_migration_table.rb +0 -15
  614. data/db/migrate/20141216053032_better_index_names.rb +0 -24
  615. data/db/migrate_core_cards/20130411191151_renaming_for_menu.rb +0 -49
  616. data/db/migrate_core_cards/20130411211600_delete_old_related_tab_cards.rb +0 -18
  617. data/db/migrate_core_cards/20130419215612_import_help_text.rb +0 -13
  618. data/db/migrate_core_cards/20130823192433_add_style_cards.rb +0 -87
  619. data/db/migrate_core_cards/20130910183318_move_styles_to_content.rb +0 -11
  620. data/db/migrate_core_cards/20130920214038_jsonize_tinymce.rb +0 -15
  621. data/db/migrate_core_cards/20130920291703_update_stylesheets.rb +0 -18
  622. data/db/migrate_core_cards/20130927191728_account_events.rb +0 -21
  623. data/db/migrate_core_cards/20131016172445_common_css_patch.rb +0 -12
  624. data/db/migrate_core_cards/20140110193325_reset_account_request_type.rb +0 -11
  625. data/db/migrate_core_cards/20140307231621_user_data_to_cards.rb +0 -73
  626. data/db/migrate_core_cards/20140317035504_account_requests_to_signups.rb +0 -51
  627. data/db/migrate_core_cards/20140512155840_add_script_cards.rb +0 -83
  628. data/db/migrate_core_cards/20140629222005_add_email_cards.rb +0 -137
  629. data/db/migrate_core_cards/20140725180118_config_card_updates.rb +0 -9
  630. data/db/migrate_core_cards/20141111083921_delete_machine_output.rb +0 -9
  631. data/db/migrate_core_cards/20141115034214_config_descriptions_etc.rb +0 -14
  632. data/db/migrate_core_cards/20141119001955_make_symlinks_relative.rb +0 -15
  633. data/db/migrate_core_cards/20141120120605_fix_notification_html_message.rb +0 -10
  634. data/db/migrate_core_cards/20141204061304_watchers_to_following.rb +0 -38
  635. data/db/migrate_core_cards/20141208132416_partial_reference_type.rb +0 -7
  636. data/db/migrate_core_cards/20141208162106_add_ace_script.rb +0 -12
  637. data/db/migrate_core_cards/20141230204340_uri_codename.rb +0 -13
  638. data/db/migrate_core_cards/data/1.11_help_text.json +0 -410
  639. data/db/migrate_core_cards/data/1.12_stylesheets/classic_cards.scss +0 -101
  640. data/db/migrate_core_cards/data/1.12_stylesheets/common.scss +0 -226
  641. data/db/migrate_core_cards/data/1.12_stylesheets/right_sidebar.scss +0 -27
  642. data/db/migrate_core_cards/data/1.12_stylesheets/traditional.scss +0 -152
  643. data/db/migrate_core_cards/data/1.13_config_text.json +0 -32
  644. data/db/migrate_core_cards/data/1.14_config_descriptions_etc.json +0 -77
  645. data/db/migrate_core_cards/data/mailer/follower_notification_email.html +0 -9
  646. data/db/migrate_core_cards/data/mailer/follower_notification_email.txt +0 -11
  647. data/db/migrate_core_cards/data/mailer/mail_config.json +0 -22
  648. data/db/migrate_core_cards/data/mailer/password_reset_email.html +0 -10
  649. data/db/migrate_core_cards/data/mailer/password_reset_email.txt +0 -11
  650. data/db/migrate_core_cards/data/mailer/signup_alert_email.html +0 -7
  651. data/db/migrate_core_cards/data/mailer/signup_alert_email.txt +0 -5
  652. data/db/migrate_core_cards/data/mailer/verification_email.html +0 -9
  653. data/db/migrate_core_cards/data/mailer/verification_email.txt +0 -8
  654. data/db/schema.rb +0 -128
  655. data/db/seeds.rb +0 -8
  656. data/db/version.txt +0 -1
  657. data/db/version_core_cards.txt +0 -1
  658. data/lib/card.rb +0 -41
  659. data/lib/card/act.rb +0 -60
  660. data/lib/card/action.rb +0 -195
  661. data/lib/card/active_record_ext.rb +0 -77
  662. data/lib/card/auth.rb +0 -181
  663. data/lib/card/change.rb +0 -29
  664. data/lib/card/chunk.rb +0 -104
  665. data/lib/card/codename.rb +0 -70
  666. data/lib/card/content.rb +0 -211
  667. data/lib/card/core_ext.rb +0 -74
  668. data/lib/card/diff.rb +0 -429
  669. data/lib/card/env.rb +0 -54
  670. data/lib/card/exceptions.rb +0 -41
  671. data/lib/card/format.rb +0 -549
  672. data/lib/card/generators/card_migration/USAGE +0 -24
  673. data/lib/card/generators/card_migration/card_migration_generator.rb +0 -31
  674. data/lib/card/generators/card_migration/templates/card_migration.erb +0 -10
  675. data/lib/card/generators/format/USAGE +0 -9
  676. data/lib/card/generators/format/format_generator.rb +0 -8
  677. data/lib/card/generators/format/templates/format_spec_template.erb +0 -5
  678. data/lib/card/generators/format/templates/format_template.erb +0 -3
  679. data/lib/card/generators/set/USAGE +0 -16
  680. data/lib/card/generators/set/set_generator.rb +0 -22
  681. data/lib/card/generators/set/templates/set_spec_template.erb +0 -5
  682. data/lib/card/generators/set/templates/set_template.erb +0 -1
  683. data/lib/card/loader.rb +0 -149
  684. data/lib/card/mailer.rb +0 -37
  685. data/lib/card/name.rb +0 -39
  686. data/lib/card/query.rb +0 -78
  687. data/lib/card/query/card_clause.rb +0 -525
  688. data/lib/card/query/clause.rb +0 -21
  689. data/lib/card/query/ref_clause.rb +0 -47
  690. data/lib/card/query/value_clause.rb +0 -65
  691. data/lib/card/reference.rb +0 -62
  692. data/lib/card/set.rb +0 -367
  693. data/lib/card/set_pattern.rb +0 -168
  694. data/lib/wagn/cache.rb +0 -185
  695. data/lib/wagn/config/initializers/01_init_ruby_extensions.rb +0 -7
  696. data/lib/wagn/config/initializers/inflections.rb +0 -13
  697. data/lib/wagn/config/initializers/mime_types.rb +0 -13
  698. data/lib/wagn/config/initializers/notification.rb +0 -4
  699. data/lib/wagn/config/initializers/paperclip.rb +0 -1
  700. data/lib/wagn/config/initializers/recaptcha.rb +0 -6
  701. data/lib/wagn/config/initializers/uuid_state_file.rb +0 -3
  702. data/lib/wagn/core_migration.rb +0 -5
  703. data/lib/wagn/log.rb +0 -441
  704. data/lib/wagn/migration.rb +0 -151
  705. data/lib/wagn/spec_helper.rb +0 -59
  706. data/lib/wagn/version.rb +0 -33
  707. data/mod/01_core/chunk/include.rb +0 -85
  708. data/mod/01_core/chunk/link.rb +0 -87
  709. data/mod/01_core/chunk/literal.rb +0 -24
  710. data/mod/01_core/chunk/reference.rb +0 -53
  711. data/mod/01_core/chunk/uri.rb +0 -135
  712. data/mod/01_core/format/data_format.rb +0 -2
  713. data/mod/01_core/format/html_format.rb +0 -130
  714. data/mod/01_core/format/text_format.rb +0 -10
  715. data/mod/01_core/layout/blank.html +0 -5
  716. data/mod/01_core/layout/default.html +0 -20
  717. data/mod/01_core/layout/noside.html +0 -16
  718. data/mod/01_core/layout/pre.html +0 -2
  719. data/mod/01_core/layout/simple.html +0 -5
  720. data/mod/01_core/set/all/active_card.rb +0 -35
  721. data/mod/01_core/set/all/collection.rb +0 -136
  722. data/mod/01_core/set/all/content.rb +0 -168
  723. data/mod/01_core/set/all/erb.rb +0 -11
  724. data/mod/01_core/set/all/fetch.rb +0 -228
  725. data/mod/01_core/set/all/haml.rb +0 -7
  726. data/mod/01_core/set/all/initialize.rb +0 -49
  727. data/mod/01_core/set/all/name.rb +0 -267
  728. data/mod/01_core/set/all/notify.rb +0 -215
  729. data/mod/01_core/set/all/pattern.rb +0 -56
  730. data/mod/01_core/set/all/permissions.rb +0 -260
  731. data/mod/01_core/set/all/phases.rb +0 -186
  732. data/mod/01_core/set/all/references.rb +0 -118
  733. data/mod/01_core/set/all/rules.rb +0 -124
  734. data/mod/01_core/set/all/states.rb +0 -16
  735. data/mod/01_core/set/all/templating.rb +0 -120
  736. data/mod/01_core/set/all/tracked_attributes.rb +0 -114
  737. data/mod/01_core/set/all/trash.rb +0 -50
  738. data/mod/01_core/set/all/type.rb +0 -85
  739. data/mod/01_core/set/all/utils.rb +0 -94
  740. data/mod/01_core/set_pattern/01_all.rb +0 -7
  741. data/mod/01_core/set_pattern/02_all_plus.rb +0 -9
  742. data/mod/01_core/set_pattern/03_type.rb +0 -19
  743. data/mod/01_core/set_pattern/04_star.rb +0 -11
  744. data/mod/01_core/set_pattern/05_rstar.rb +0 -13
  745. data/mod/01_core/set_pattern/06_right.rb +0 -16
  746. data/mod/01_core/set_pattern/07_type_plus_right.rb +0 -19
  747. data/mod/01_core/set_pattern/08_self.rb +0 -15
  748. data/mod/01_core/spec/chunk/literal_spec.rb +0 -14
  749. data/mod/01_core/spec/chunk/uri_spec.rb +0 -292
  750. data/mod/01_core/spec/format/data_format_spec.rb +0 -5
  751. data/mod/01_core/spec/format/html_format_spec.rb +0 -140
  752. data/mod/01_core/spec/format/text_format_spec.rb +0 -5
  753. data/mod/01_core/spec/set/all/active_card_spec.rb +0 -5
  754. data/mod/01_core/spec/set/all/attribute_tracking_spec.rb +0 -21
  755. data/mod/01_core/spec/set/all/collection_spec.rb +0 -65
  756. data/mod/01_core/spec/set/all/content_spec.rb +0 -15
  757. data/mod/01_core/spec/set/all/fetch_spec.rb +0 -205
  758. data/mod/01_core/spec/set/all/initialize_spec.rb +0 -58
  759. data/mod/01_core/spec/set/all/name_spec.rb +0 -61
  760. data/mod/01_core/spec/set/all/notify_spec.rb +0 -199
  761. data/mod/01_core/spec/set/all/pattern_spec.rb +0 -81
  762. data/mod/01_core/spec/set/all/permissions_spec.rb +0 -505
  763. data/mod/01_core/spec/set/all/phases_spec.rb +0 -6
  764. data/mod/01_core/spec/set/all/references_spec.rb +0 -8
  765. data/mod/01_core/spec/set/all/rules2_spec.rb +0 -250
  766. data/mod/01_core/spec/set/all/rules_spec.rb +0 -81
  767. data/mod/01_core/spec/set/all/states_spec.rb +0 -5
  768. data/mod/01_core/spec/set/all/templating_spec.rb +0 -111
  769. data/mod/01_core/spec/set/all/tracked_attributes_spec.rb +0 -328
  770. data/mod/01_core/spec/set/all/trash_spec.rb +0 -34
  771. data/mod/01_core/spec/set/all/type_spec.rb +0 -71
  772. data/mod/01_core/spec/set/all/utils_spec.rb +0 -5
  773. data/mod/02_basic_types/format/css_format.rb +0 -6
  774. data/mod/02_basic_types/format/csv_format.rb +0 -6
  775. data/mod/02_basic_types/format/file_format.rb +0 -3
  776. data/mod/02_basic_types/format/js_format.rb +0 -6
  777. data/mod/02_basic_types/format/json_format.rb +0 -6
  778. data/mod/02_basic_types/format/rss_format.rb +0 -11
  779. data/mod/02_basic_types/format/xml_format.rb +0 -6
  780. data/mod/02_basic_types/set/all/all_css.rb +0 -42
  781. data/mod/02_basic_types/set/all/all_csv.rb +0 -52
  782. data/mod/02_basic_types/set/all/all_js.rb +0 -7
  783. data/mod/02_basic_types/set/all/base.rb +0 -122
  784. data/mod/02_basic_types/set/all/file.rb +0 -13
  785. data/mod/02_basic_types/set/all/json.rb +0 -66
  786. data/mod/02_basic_types/set/all/rss.rb +0 -72
  787. data/mod/02_basic_types/set/all/text.rb +0 -8
  788. data/mod/02_basic_types/set/type/plain_text.rb +0 -10
  789. data/mod/02_basic_types/set/type/pointer.rb +0 -281
  790. data/mod/02_basic_types/spec/set/all/all_css_spec.rb +0 -10
  791. data/mod/02_basic_types/spec/set/all/all_csv_spec.rb +0 -9
  792. data/mod/02_basic_types/spec/set/all/base_spec.rb +0 -57
  793. data/mod/02_basic_types/spec/set/all/file_spec.rb +0 -5
  794. data/mod/02_basic_types/spec/set/all/json_spec.rb +0 -26
  795. data/mod/02_basic_types/spec/set/all/rss_spec.rb +0 -8
  796. data/mod/02_basic_types/spec/set/all/text_spec.rb +0 -5
  797. data/mod/02_basic_types/spec/set/type/plain_text_spec.rb +0 -11
  798. data/mod/02_basic_types/spec/set/type/pointer_spec.rb +0 -103
  799. data/mod/03_machines/lib/card/machine.rb +0 -185
  800. data/mod/03_machines/lib/card/machine_input.rb +0 -40
  801. data/mod/03_machines/lib/javascript/ace.js +0 -18204
  802. data/mod/03_machines/lib/javascript/html5shiv-printshiv.js +0 -1
  803. data/mod/03_machines/lib/javascript/jquery-ui.js +0 -14913
  804. data/mod/03_machines/lib/javascript/jquery.autosize.js +0 -274
  805. data/mod/03_machines/lib/javascript/jquery.fileupload.js +0 -1114
  806. data/mod/03_machines/lib/javascript/jquery.iframe-transport.js +0 -185
  807. data/mod/03_machines/lib/javascript/jquery.js +0 -4
  808. data/mod/03_machines/lib/javascript/jquery.ui.autocomplete.html.js +0 -41
  809. data/mod/03_machines/lib/javascript/jquery_ujs.js +0 -469
  810. data/mod/03_machines/lib/javascript/jquerymobile.js +0 -15454
  811. data/mod/03_machines/lib/javascript/theme-textmate.js +0 -130
  812. data/mod/03_machines/lib/javascript/tinymce.js +0 -13
  813. data/mod/03_machines/lib/javascript/wagn.js.coffee +0 -318
  814. data/mod/03_machines/lib/javascript/wagn_menu.js +0 -67
  815. data/mod/03_machines/lib/javascript/wagn_mod.js.coffee +0 -404
  816. data/mod/03_machines/lib/stylesheets/functional.scss +0 -188
  817. data/mod/03_machines/lib/stylesheets/jquery-ui-smoothness.css +0 -1178
  818. data/mod/03_machines/lib/stylesheets/standard.scss +0 -719
  819. data/mod/03_machines/set/right/machine_output.rb +0 -20
  820. data/mod/03_machines/set/self/script_ace.rb +0 -8
  821. data/mod/03_machines/set/self/script_card_menu.rb +0 -8
  822. data/mod/03_machines/set/self/script_html5shiv_printshiv.rb +0 -7
  823. data/mod/03_machines/set/self/script_jquery.rb +0 -8
  824. data/mod/03_machines/set/self/script_jquery_helper.rb +0 -14
  825. data/mod/03_machines/set/self/script_slot.rb +0 -9
  826. data/mod/03_machines/set/self/script_tinymce.rb +0 -8
  827. data/mod/03_machines/set/self/style_functional.rb +0 -8
  828. data/mod/03_machines/set/self/style_jquery_ui_smoothness.rb +0 -8
  829. data/mod/03_machines/set/self/style_standard.rb +0 -8
  830. data/mod/03_machines/set/type/coffee_script.rb +0 -58
  831. data/mod/03_machines/set/type/css.rb +0 -45
  832. data/mod/03_machines/set/type/java_script.rb +0 -38
  833. data/mod/03_machines/set/type/scss.rb +0 -23
  834. data/mod/03_machines/set/type/skin.rb +0 -12
  835. data/mod/03_machines/spec/lib/shared_machine_examples.rb +0 -174
  836. data/mod/03_machines/spec/lib/shared_machine_input_examples.rb +0 -64
  837. data/mod/03_machines/spec/set/right/machine_output_spec.rb +0 -5
  838. data/mod/03_machines/spec/set/self/style_functional_spec.rb +0 -5
  839. data/mod/03_machines/spec/set/self/style_jquery_ui_smoothness_spec.rb +0 -5
  840. data/mod/03_machines/spec/set/self/style_standard_spec.rb +0 -5
  841. data/mod/03_machines/spec/set/type/coffeescript_spec.rb +0 -26
  842. data/mod/03_machines/spec/set/type/css_spec.rb +0 -33
  843. data/mod/03_machines/spec/set/type/javascript_spec.rb +0 -26
  844. data/mod/03_machines/spec/set/type/scss_spec.rb +0 -56
  845. data/mod/03_machines/spec/set/type/skin_spec.rb +0 -70
  846. data/mod/04_settings/lib/card/setting.rb +0 -57
  847. data/mod/04_settings/set/right/add_help.rb +0 -11
  848. data/mod/04_settings/set/right/comment.rb +0 -91
  849. data/mod/04_settings/set/right/create.rb +0 -2
  850. data/mod/04_settings/set/right/default.rb +0 -3
  851. data/mod/04_settings/set/right/delete.rb +0 -4
  852. data/mod/04_settings/set/right/help.rb +0 -3
  853. data/mod/04_settings/set/right/read.rb +0 -2
  854. data/mod/04_settings/set/right/script.rb +0 -10
  855. data/mod/04_settings/set/right/structure.rb +0 -4
  856. data/mod/04_settings/set/right/style.rb +0 -10
  857. data/mod/04_settings/set/right/update.rb +0 -2
  858. data/mod/04_settings/set/self/accountable.rb +0 -2
  859. data/mod/04_settings/set/self/add_help.rb +0 -2
  860. data/mod/04_settings/set/self/autoname.rb +0 -2
  861. data/mod/04_settings/set/self/captcha.rb +0 -2
  862. data/mod/04_settings/set/self/comment.rb +0 -2
  863. data/mod/04_settings/set/self/create.rb +0 -2
  864. data/mod/04_settings/set/self/default.rb +0 -2
  865. data/mod/04_settings/set/self/delete.rb +0 -2
  866. data/mod/04_settings/set/self/help.rb +0 -2
  867. data/mod/04_settings/set/self/input.rb +0 -2
  868. data/mod/04_settings/set/self/layout.rb +0 -2
  869. data/mod/04_settings/set/self/on_create.rb +0 -2
  870. data/mod/04_settings/set/self/on_delete.rb +0 -2
  871. data/mod/04_settings/set/self/on_update.rb +0 -2
  872. data/mod/04_settings/set/self/options.rb +0 -2
  873. data/mod/04_settings/set/self/options_label.rb +0 -2
  874. data/mod/04_settings/set/self/read.rb +0 -2
  875. data/mod/04_settings/set/self/script.rb +0 -2
  876. data/mod/04_settings/set/self/structure.rb +0 -2
  877. data/mod/04_settings/set/self/style.rb +0 -2
  878. data/mod/04_settings/set/self/table_of_contents.rb +0 -2
  879. data/mod/04_settings/set/self/thanks.rb +0 -2
  880. data/mod/04_settings/set/self/update.rb +0 -2
  881. data/mod/04_settings/set/type/setting.rb +0 -81
  882. data/mod/04_settings/spec/set/right/add_help_spec.rb +0 -5
  883. data/mod/04_settings/spec/set/right/comment_spec.rb +0 -41
  884. data/mod/04_settings/spec/set/right/create_spec.rb +0 -10
  885. data/mod/04_settings/spec/set/right/default_spec.rb +0 -5
  886. data/mod/04_settings/spec/set/right/delete_spec.rb +0 -5
  887. data/mod/04_settings/spec/set/right/help_spec.rb +0 -5
  888. data/mod/04_settings/spec/set/right/read_spec.rb +0 -5
  889. data/mod/04_settings/spec/set/right/script_spec.rb +0 -24
  890. data/mod/04_settings/spec/set/right/structure_spec.rb +0 -17
  891. data/mod/04_settings/spec/set/right/style_spec.rb +0 -29
  892. data/mod/04_settings/spec/set/right/update_spec.rb +0 -5
  893. data/mod/04_settings/spec/set/type/setting_spec.rb +0 -10
  894. data/mod/05_email/format/email_html_format.rb +0 -9
  895. data/mod/05_email/format/email_text_format.rb +0 -11
  896. data/mod/05_email/set/all/email_html.rb +0 -5
  897. data/mod/05_email/set/all/email_text.rb +0 -5
  898. data/mod/05_email/set/right/bcc.rb +0 -45
  899. data/mod/05_email/set/right/cc.rb +0 -3
  900. data/mod/05_email/set/right/from.rb +0 -3
  901. data/mod/05_email/set/right/html_message.rb +0 -3
  902. data/mod/05_email/set/right/to.rb +0 -3
  903. data/mod/05_email/set/type/email_template.rb +0 -113
  904. data/mod/05_standard/file/103/icon-6566.ico +0 -0
  905. data/mod/05_standard/file/103/large-6566.ico +0 -0
  906. data/mod/05_standard/file/103/medium-6566.ico +0 -0
  907. data/mod/05_standard/file/103/original-6566.ico +0 -0
  908. data/mod/05_standard/file/103/small-6566.ico +0 -0
  909. data/mod/05_standard/file/79/icon-6556.png +0 -0
  910. data/mod/05_standard/file/79/large-6556.png +0 -0
  911. data/mod/05_standard/file/79/medium-6556.png +0 -0
  912. data/mod/05_standard/file/79/original-6556.png +0 -0
  913. data/mod/05_standard/file/79/small-6556.png +0 -0
  914. data/mod/05_standard/file/790/icon-6419.png +0 -0
  915. data/mod/05_standard/file/790/large-6419.png +0 -0
  916. data/mod/05_standard/file/790/medium-6419.png +0 -0
  917. data/mod/05_standard/file/790/original-6419.png +0 -0
  918. data/mod/05_standard/file/790/small-6419.png +0 -0
  919. data/mod/05_standard/set/all/account.rb +0 -67
  920. data/mod/05_standard/set/all/attach.rb +0 -142
  921. data/mod/05_standard/set/all/comment.rb +0 -39
  922. data/mod/05_standard/set/all/error.rb +0 -210
  923. data/mod/05_standard/set/all/event_viz.rb +0 -62
  924. data/mod/05_standard/set/all/follow.rb +0 -51
  925. data/mod/05_standard/set/all/history.rb +0 -303
  926. data/mod/05_standard/set/all/links.rb +0 -102
  927. data/mod/05_standard/set/all/observer.rb +0 -27
  928. data/mod/05_standard/set/all/rich_html/content.rb +0 -175
  929. data/mod/05_standard/set/all/rich_html/editing.rb +0 -145
  930. data/mod/05_standard/set/all/rich_html/form.rb +0 -211
  931. data/mod/05_standard/set/all/rich_html/header.rb +0 -58
  932. data/mod/05_standard/set/all/rich_html/wrapper.rb +0 -74
  933. data/mod/05_standard/set/right/account.rb +0 -177
  934. data/mod/05_standard/set/right/email.rb +0 -52
  935. data/mod/05_standard/set/right/password.rb +0 -39
  936. data/mod/05_standard/set/right/salt.rb +0 -5
  937. data/mod/05_standard/set/right/stats.rb +0 -35
  938. data/mod/05_standard/set/right/status.rb +0 -9
  939. data/mod/05_standard/set/right/token.rb +0 -5
  940. data/mod/05_standard/set/right/when_created.rb +0 -5
  941. data/mod/05_standard/set/right/when_last_edited.rb +0 -5
  942. data/mod/05_standard/set/rstar/rules.rb +0 -251
  943. data/mod/05_standard/set/self/account_links.rb +0 -27
  944. data/mod/05_standard/set/self/alerts.rb +0 -5
  945. data/mod/05_standard/set/self/all.rb +0 -21
  946. data/mod/05_standard/set/self/foot.rb +0 -8
  947. data/mod/05_standard/set/self/head.rb +0 -122
  948. data/mod/05_standard/set/self/navbox.rb +0 -20
  949. data/mod/05_standard/set/self/now.rb +0 -6
  950. data/mod/05_standard/set/self/recent.rb +0 -48
  951. data/mod/05_standard/set/self/search.rb +0 -43
  952. data/mod/05_standard/set/self/signin.rb +0 -121
  953. data/mod/05_standard/set/self/stats.rb +0 -91
  954. data/mod/05_standard/set/self/version.rb +0 -8
  955. data/mod/05_standard/set/type/basic.rb +0 -46
  956. data/mod/05_standard/set/type/cardtype.rb +0 -42
  957. data/mod/05_standard/set/type/date.rb +0 -8
  958. data/mod/05_standard/set/type/file.rb +0 -85
  959. data/mod/05_standard/set/type/html.rb +0 -22
  960. data/mod/05_standard/set/type/image.rb +0 -67
  961. data/mod/05_standard/set/type/layout_type.rb +0 -14
  962. data/mod/05_standard/set/type/number.rb +0 -19
  963. data/mod/05_standard/set/type/phrase.rb +0 -3
  964. data/mod/05_standard/set/type/search_type.rb +0 -243
  965. data/mod/05_standard/set/type/set.rb +0 -118
  966. data/mod/05_standard/set/type/signup.rb +0 -144
  967. data/mod/05_standard/set/type/toggle.rb +0 -12
  968. data/mod/05_standard/set/type/uri.rb +0 -11
  969. data/mod/05_standard/set/type/user.rb +0 -62
  970. data/mod/05_standard/spec/chunk/include_spec.rb +0 -186
  971. data/mod/05_standard/spec/chunk/link_spec.rb +0 -61
  972. data/mod/05_standard/spec/format/css_format_spec.rb +0 -5
  973. data/mod/05_standard/spec/format/csv_format_spec.rb +0 -5
  974. data/mod/05_standard/spec/format/email_html_format_spec.rb +0 -5
  975. data/mod/05_standard/spec/format/file_format_spec.rb +0 -5
  976. data/mod/05_standard/spec/format/js_format_spec.rb +0 -3
  977. data/mod/05_standard/spec/format/json_format_spec.rb +0 -5
  978. data/mod/05_standard/spec/format/rss_format_spec.rb +0 -5
  979. data/mod/05_standard/spec/format/xml_format_spec.rb +0 -5
  980. data/mod/05_standard/spec/set/all/account_spec.rb +0 -137
  981. data/mod/05_standard/spec/set/all/attach_spec.rb +0 -9
  982. data/mod/05_standard/spec/set/all/comment_spec.rb +0 -5
  983. data/mod/05_standard/spec/set/all/email_html_spec.rb +0 -15
  984. data/mod/05_standard/spec/set/all/error_spec.rb +0 -7
  985. data/mod/05_standard/spec/set/all/event_viz_spec.rb +0 -9
  986. data/mod/05_standard/spec/set/all/follow_spec.rb +0 -83
  987. data/mod/05_standard/spec/set/all/history_spec.rb +0 -173
  988. data/mod/05_standard/spec/set/all/observer_spec.rb +0 -74
  989. data/mod/05_standard/spec/set/all/rich_html/form_spec.rb +0 -41
  990. data/mod/05_standard/spec/set/all/rich_html/wrapper_spec.rb +0 -26
  991. data/mod/05_standard/spec/set/right/account_spec.rb +0 -162
  992. data/mod/05_standard/spec/set/right/email_spec.rb +0 -55
  993. data/mod/05_standard/spec/set/right/password_spec.rb +0 -45
  994. data/mod/05_standard/spec/set/right/salt_spec.rb +0 -5
  995. data/mod/05_standard/spec/set/right/stats_spec.rb +0 -13
  996. data/mod/05_standard/spec/set/right/status_spec.rb +0 -5
  997. data/mod/05_standard/spec/set/right/token_spec.rb +0 -5
  998. data/mod/05_standard/spec/set/right/when_created_spec.rb +0 -7
  999. data/mod/05_standard/spec/set/right/when_last_edited_spec.rb +0 -7
  1000. data/mod/05_standard/spec/set/rstar/rules_spec.rb +0 -25
  1001. data/mod/05_standard/spec/set/self/account_links_spec.rb +0 -9
  1002. data/mod/05_standard/spec/set/self/alerts_spec.rb +0 -5
  1003. data/mod/05_standard/spec/set/self/all_spec.rb +0 -48
  1004. data/mod/05_standard/spec/set/self/foot_spec.rb +0 -5
  1005. data/mod/05_standard/spec/set/self/head_spec.rb +0 -17
  1006. data/mod/05_standard/spec/set/self/navbox_spec.rb +0 -7
  1007. data/mod/05_standard/spec/set/self/now_spec.rb +0 -7
  1008. data/mod/05_standard/spec/set/self/recent_spec.rb +0 -5
  1009. data/mod/05_standard/spec/set/self/search_spec.rb +0 -5
  1010. data/mod/05_standard/spec/set/self/signin_spec.rb +0 -73
  1011. data/mod/05_standard/spec/set/self/stats_spec.rb +0 -12
  1012. data/mod/05_standard/spec/set/self/version_spec.rb +0 -7
  1013. data/mod/05_standard/spec/set/type/basic_spec.rb +0 -5
  1014. data/mod/05_standard/spec/set/type/cardtype_spec.rb +0 -5
  1015. data/mod/05_standard/spec/set/type/date_spec.rb +0 -7
  1016. data/mod/05_standard/spec/set/type/email_template_spec.rb +0 -199
  1017. data/mod/05_standard/spec/set/type/file_spec.rb +0 -5
  1018. data/mod/05_standard/spec/set/type/html_spec.rb +0 -23
  1019. data/mod/05_standard/spec/set/type/image_spec.rb +0 -16
  1020. data/mod/05_standard/spec/set/type/layout_type_spec.rb +0 -7
  1021. data/mod/05_standard/spec/set/type/number_spec.rb +0 -7
  1022. data/mod/05_standard/spec/set/type/phrase_spec.rb +0 -7
  1023. data/mod/05_standard/spec/set/type/search_type_spec.rb +0 -27
  1024. data/mod/05_standard/spec/set/type/set_spec.rb +0 -26
  1025. data/mod/05_standard/spec/set/type/signup_spec.rb +0 -227
  1026. data/mod/05_standard/spec/set/type/toggle_spec.rb +0 -12
  1027. data/mod/05_standard/spec/set/type/uri_spec.rb +0 -41
  1028. data/mod/05_standard/spec/set/type/user_spec.rb +0 -5
  1029. data/spec/lib/card/action_spec.rb +0 -14
  1030. data/spec/lib/card/auth_spec.rb +0 -17
  1031. data/spec/lib/card/chunk_spec.rb +0 -17
  1032. data/spec/lib/card/codename_spec.rb +0 -25
  1033. data/spec/lib/card/content_spec.rb +0 -314
  1034. data/spec/lib/card/diff_spec.rb +0 -210
  1035. data/spec/lib/card/format_spec.rb +0 -82
  1036. data/spec/lib/card/loader_spec.rb +0 -37
  1037. data/spec/lib/card/name_spec.rb +0 -279
  1038. data/spec/lib/card/query_spec.rb +0 -459
  1039. data/spec/lib/card/reference_spec.rb +0 -213
  1040. data/spec/lib/card/set_pattern_spec.rb +0 -56
  1041. data/spec/lib/card/set_spec.rb +0 -88
  1042. data/spec/lib/wagn/cache_spec.rb +0 -122
  1043. data/spec/lib/wagn/log_spec.rb +0 -262
  1044. data/spec/mailers/mailer_spec.rb +0 -63
  1045. data/spec/models/card/cardtype_spec.rb +0 -216
  1046. data/spec/models/card/create_spec.rb +0 -82
  1047. data/spec/models/card/trash_spec.rb +0 -260
  1048. data/spec/models/card/type_transition_spec.rb +0 -161
  1049. data/spec/models/card/validation_spec.rb +0 -36
  1050. data/spec/models/card_spec.rb +0 -177
  1051. data/spec/spec_helper.rb +0 -129
  1052. data/test/fixtures/.gitkeep +0 -0
  1053. data/test/fixtures/card_actions.yml +0 -4908
  1054. data/test/fixtures/card_acts.yml +0 -685
  1055. data/test/fixtures/card_changes.yml +0 -14683
  1056. data/test/fixtures/card_references.yml +0 -5069
  1057. data/test/fixtures/cards.yml +0 -13271
  1058. data/test/fixtures/mao2.jpg +0 -0
  1059. data/test/fixtures/rails.gif +0 -0
  1060. data/test/seed.rb +0 -170
@@ -1,130 +0,0 @@
1
- define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
2
- "use strict";
3
-
4
- exports.isDark = false;
5
- exports.cssClass = "ace-tm";
6
- exports.cssText = ".ace-tm .ace_gutter {\
7
- background: #f0f0f0;\
8
- color: #333;\
9
- }\
10
- .ace-tm .ace_print-margin {\
11
- width: 1px;\
12
- background: #e8e8e8;\
13
- }\
14
- .ace-tm .ace_fold {\
15
- background-color: #6B72E6;\
16
- }\
17
- .ace-tm {\
18
- background-color: #FFFFFF;\
19
- color: black;\
20
- }\
21
- .ace-tm .ace_cursor {\
22
- color: black;\
23
- }\
24
- .ace-tm .ace_invisible {\
25
- color: rgb(191, 191, 191);\
26
- }\
27
- .ace-tm .ace_storage,\
28
- .ace-tm .ace_keyword {\
29
- color: blue;\
30
- }\
31
- .ace-tm .ace_constant {\
32
- color: rgb(197, 6, 11);\
33
- }\
34
- .ace-tm .ace_constant.ace_buildin {\
35
- color: rgb(88, 72, 246);\
36
- }\
37
- .ace-tm .ace_constant.ace_language {\
38
- color: rgb(88, 92, 246);\
39
- }\
40
- .ace-tm .ace_constant.ace_library {\
41
- color: rgb(6, 150, 14);\
42
- }\
43
- .ace-tm .ace_invalid {\
44
- background-color: rgba(255, 0, 0, 0.1);\
45
- color: red;\
46
- }\
47
- .ace-tm .ace_support.ace_function {\
48
- color: rgb(60, 76, 114);\
49
- }\
50
- .ace-tm .ace_support.ace_constant {\
51
- color: rgb(6, 150, 14);\
52
- }\
53
- .ace-tm .ace_support.ace_type,\
54
- .ace-tm .ace_support.ace_class {\
55
- color: rgb(109, 121, 222);\
56
- }\
57
- .ace-tm .ace_keyword.ace_operator {\
58
- color: rgb(104, 118, 135);\
59
- }\
60
- .ace-tm .ace_string {\
61
- color: rgb(3, 106, 7);\
62
- }\
63
- .ace-tm .ace_comment {\
64
- color: rgb(76, 136, 107);\
65
- }\
66
- .ace-tm .ace_comment.ace_doc {\
67
- color: rgb(0, 102, 255);\
68
- }\
69
- .ace-tm .ace_comment.ace_doc.ace_tag {\
70
- color: rgb(128, 159, 191);\
71
- }\
72
- .ace-tm .ace_constant.ace_numeric {\
73
- color: rgb(0, 0, 205);\
74
- }\
75
- .ace-tm .ace_variable {\
76
- color: rgb(49, 132, 149);\
77
- }\
78
- .ace-tm .ace_xml-pe {\
79
- color: rgb(104, 104, 91);\
80
- }\
81
- .ace-tm .ace_entity.ace_name.ace_function {\
82
- color: #0000A2;\
83
- }\
84
- .ace-tm .ace_heading {\
85
- color: rgb(12, 7, 255);\
86
- }\
87
- .ace-tm .ace_list {\
88
- color:rgb(185, 6, 144);\
89
- }\
90
- .ace-tm .ace_meta.ace_tag {\
91
- color:rgb(0, 22, 142);\
92
- }\
93
- .ace-tm .ace_string.ace_regex {\
94
- color: rgb(255, 0, 0)\
95
- }\
96
- .ace-tm .ace_marker-layer .ace_selection {\
97
- background: rgb(181, 213, 255);\
98
- }\
99
- .ace-tm.ace_multiselect .ace_selection.ace_start {\
100
- box-shadow: 0 0 3px 0px white;\
101
- border-radius: 2px;\
102
- }\
103
- .ace-tm .ace_marker-layer .ace_step {\
104
- background: rgb(252, 255, 0);\
105
- }\
106
- .ace-tm .ace_marker-layer .ace_stack {\
107
- background: rgb(164, 229, 101);\
108
- }\
109
- .ace-tm .ace_marker-layer .ace_bracket {\
110
- margin: -1px 0 0 -1px;\
111
- border: 1px solid rgb(192, 192, 192);\
112
- }\
113
- .ace-tm .ace_marker-layer .ace_active-line {\
114
- background: rgba(0, 0, 0, 0.07);\
115
- }\
116
- .ace-tm .ace_gutter-active-line {\
117
- background-color : #dcdcdc;\
118
- }\
119
- .ace-tm .ace_marker-layer .ace_selected-word {\
120
- background: rgb(250, 250, 255);\
121
- border: 1px solid rgb(200, 200, 250);\
122
- }\
123
- .ace-tm .ace_indent-guide {\
124
- background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
125
- }\
126
- ";
127
-
128
- var dom = require("../lib/dom");
129
- dom.importCssString(exports.cssText, exports.cssClass);
130
- });
@@ -1,13 +0,0 @@
1
- window.tinyMCEPreInit=window.tinyMCEPreInit||{base:"/assets/tinymce",query:"3.5.9",suffix:""},function(e){var t,n=/^\s*|\s*$/g,o="$1"==="B".replace(/A(.)|B/,"$1"),r={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)&&(c.suffix="_src"),-1!=(a=e.src.indexOf("?"))&&(c.query=e.src.substring(a+1)),c.baseURL=e.src.substring(0,e.src.lastIndexOf("/")),i&&-1==c.baseURL.indexOf("://")&&0!==c.baseURL.indexOf("/")&&(c.baseURL=i+c.baseURL),c.baseURL):null}var n,o,r,i,a,s,c=this,d=document,l=navigator,u=l.userAgent;if(c.isIE11=-1!=u.indexOf("Trident/")&&-1!=u.indexOf("rv:"),c.isOpera=e.opera&&opera.buildNumber,c.isWebKit=/WebKit/.test(u),c.isIE=!c.isWebKit&&!c.isOpera&&/MSIE/gi.test(u)&&/Explorer/gi.test(l.appName)||c.isIE11,c.isIE6=c.isIE&&/MSIE [56]/.test(u),c.isIE7=c.isIE&&/MSIE [7]/.test(u),c.isIE8=c.isIE&&/MSIE [8]/.test(u),c.isIE9=c.isIE&&/MSIE [9]/.test(u),c.isGecko=!c.isWebKit&&!c.isIE11&&/Gecko/.test(u),c.isMac=-1!=u.indexOf("Mac"),c.isAir=/adobeair/i.test(u),c.isIDevice=/(iPad|iPhone)/.test(u),c.isIOS5=c.isIDevice&&u.match(/AppleWebKit\/(\d*)/)[1]>=534,e.tinyMCEPreInit)return c.suffix=tinyMCEPreInit.suffix,c.baseURL=tinyMCEPreInit.base,void(c.query=tinyMCEPreInit.query);for(c.suffix="",o=d.getElementsByTagName("base"),n=0;n<o.length;n++)s=o[n].href,s&&(/^https?:\/\/[^\/]+$/.test(s)&&(s+="/"),i=s?s.match(/.*\//)[0]:"");for(o=d.getElementsByTagName("script"),n=0;n<o.length;n++)if(t(o[n]))return;if(r=d.getElementsByTagName("head")[0])for(o=r.getElementsByTagName("script"),n=0;n<o.length;n++)if(t(o[n]))return},is:function(e,n){return n?"array"==n&&r.isArray(e)?!0:typeof e==n:e!==t},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},makeMap:function(e,t,n){var o;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},o=e.length;o--;)n[e[o]]={};return n},each:function(e,n,o){var r,i;if(!e)return 0;if(o=o||e,e.length!==t){for(r=0,i=e.length;i>r;r++)if(n.call(o,e[r],r,e)===!1)return 0}else for(r in e)if(e.hasOwnProperty(r)&&n.call(o,e[r],r,e)===!1)return 0;return 1},map:function(e,t){var n=[];return r.each(e,function(e){n.push(t(e))}),n},grep:function(e,t){var n=[];return r.each(e,function(e){(!t||t(e))&&n.push(e)}),n},inArray:function(e,t){var n,o;if(e)for(n=0,o=e.length;o>n;n++)if(e[n]===t)return n;return-1},extend:function(e,n){var o,r,i,a,s=arguments;for(o=1,r=s.length;r>o;o++){n=s[o];for(i in n)n.hasOwnProperty(i)&&(a=n[i],a!==t&&(e[i]=a))}return e},trim:function(e){return(e?""+e:"").replace(n,"")},create:function(e,t,n){var o,r,i,a,s,c=this,d=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],r=c.createNS(e[3].replace(/\.\w+$/,""),n),!r[i]){if("static"==e[2])return r[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],r[i]));t[i]||(t[i]=function(){},d=1),r[i]=t[i],c.extend(r[i].prototype,t),e[5]&&(o=c.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],s=r[i],r[i]=d?function(){return o[a].apply(this,arguments)}:function(){return this.parent=o[a],s.apply(this,arguments)},r[i].prototype[i]=r[i],c.each(o,function(e,t){r[i].prototype[t]=o[t]}),c.each(t,function(e,t){o[t]?r[i].prototype[t]=function(){return this.parent=o[t],e.apply(this,arguments)}:t!=i&&(r[i].prototype[t]=e)})),c.each(t["static"],function(e,t){r[i][t]=e}),this.onCreate&&this.onCreate(e[2],e[3],r[i].prototype)}},walk:function(e,t,n,o){o=o||this,e&&(n&&(e=e[n]),r.each(e,function(e,i){return t.call(o,e,i,n)===!1?!1:void r.walk(e,t,n,o)}))},createNS:function(t,n){var o,r;for(n=n||e,t=t.split("."),o=0;o<t.length;o++)r=t[o],n[r]||(n[r]={}),n=n[r];return n},resolve:function(t,n){var o,r;for(n=n||e,t=t.split("."),o=0,r=t.length;r>o&&(n=n[t[o]],n);o++);return n},addUnload:function(t,n){function o(){function t(){n.detachEvent("onstop",t),r&&r(),n=0}var n=document;"interactive"==n.readyState&&(n&&n.attachEvent("onstop",t),e.setTimeout(function(){n&&n.detachEvent("onstop",t)},0))}var r,i=this;return r=function(){var t,n,a=i.unloads;if(a){for(n in a)t=a[n],t&&t.func&&t.func.call(t.scope,1);e.detachEvent?(e.detachEvent("onbeforeunload",o),e.detachEvent("onunload",r)):e.removeEventListener&&e.removeEventListener("unload",r,!1),i.unloads=t=a=w=r=0,e.CollectGarbage&&CollectGarbage()}},t={func:t,scope:n||this},i.unloads?i.unloads.push(t):(e.attachEvent?(e.attachEvent("onunload",r),e.attachEvent("onbeforeunload",o)):e.addEventListener&&e.addEventListener("unload",r,!1),i.unloads=[t]),t},removeUnload:function(e){var t=this.unloads,n=null;return r.each(t,function(o,r){return o&&o.func==e?(t.splice(r,1),n=e,!1):void 0}),n},explode:function(e,t){return!e||r.is(e,"array")?e:r.map(e.split(t||","),r.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,n,r){return o?r.replace(e,function(){var e,o=n,r=arguments;for(e=0;e<r.length-2;e++)o=r[e]===t?o.replace(new RegExp("\\$"+e,"g"),""):o.replace(new RegExp("\\$"+e,"g"),r[e]);return o}):r.replace(e,n)}};r._init(),e.tinymce=e.tinyMCE=r}(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 n=this,o={cb:e,scope:t||n.scope};return n.inDispatch?n.listeners=[o].concat(n.listeners):n.listeners.unshift(o),e},remove:function(e){var t=this.listeners,n=null;return tinymce.each(t,function(o,r){return e==o.cb?(n=o,t.splice(r,1),!1):void 0}),n},dispatch:function(){var e,t,n,o=this,r=arguments,i=o.listeners;for(o.inDispatch=!0,t=0;t<i.length&&(n=i[t],e=n.cb.apply(n.scope,r.length>0?r:[n.scope]),e!==!1);t++);return o.inDispatch=!1,e}}),function(){var e=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(t,n){var o,r,i=this;return t=tinymce.trim(t),n=i.settings=n||{},/^([\w\-]+):([^\/]{2})/i.test(t)||/^\s*#/.test(t)?void(i.source=t):(0===t.indexOf("/")&&0!==t.indexOf("//")&&(t=(n.base_uri?n.base_uri.protocol||"http":"http")+"://mce_host"+t),/^[\w\-]*:?\/\//.test(t)||(r=n.base_uri?n.base_uri.path:new tinymce.util.URI(location.href).directory,t=(n.base_uri&&n.base_uri.protocol||"http")+"://mce_host"+i.toAbsPath(r,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,n){var o=t[n];o&&(o=o.replace(/\(mce_at\)/g,"@@")),i[e]=o}),o=n.base_uri,void(o&&(i.protocol||(i.protocol=o.protocol),i.userInfo||(i.userInfo=o.userInfo),i.port||"mce_host"!==i.host||(i.port=o.port),i.host&&"mce_host"!==i.host||(i.host=o.host),i.source="")))},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,n=this;if("./"===e)return e;if(e=new tinymce.util.URI(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol)return e.getURI();var o=n.getURI(),r=e.getURI();return o==r||"/"==o.charAt(o.length-1)&&o.substr(0,o.length-1)==r?o:(t=n.toRelPath(n.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 n,o,r,i=0,a="";if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,r=e.length;r>o;o++)if(o>=n.length||e[o]!=n[o]){i=o+1;break}if(e.length<n.length)for(o=0,r=n.length;r>o;o++)if(o>=e.length||e[o]!=n[o]){i=o+1;break}if(1===i)return t;for(o=0,r=e.length-(i-1);r>o;o++)a+="../";for(o=i-1,r=n.length;r>o;o++)a+=o!=i-1?"/"+n[o]:n[o];return a},toAbsPath:function(t,n){var o,r,i,a=0,s=[];for(r=/\/$/.test(n)?"/":"",t=t.split("/"),n=n.split("/"),e(t,function(e){e&&s.push(e)}),t=s,o=n.length-1,s=[];o>=0;o--)0!==n[o].length&&"."!==n[o]&&(".."!==n[o]?a>0?a--:s.push(n[o]):a++);return o=t.length-a,i=0>=o?s.reverse().join("/"):t.slice(0,o).join("/")+"/"+s.reverse().join("/"),0!==i.indexOf("/")&&(i="/"+i),r&&i.lastIndexOf("/")!==i.length-1&&(i+=r),i},getURI:function(e){var t,n=this;return(!n.source||e)&&(t="",e||(n.protocol&&(t+=n.protocol+"://"),n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}})}(),function(){var e=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(t){var n,o=this.get(t);return o&&e(o.split("&"),function(e){e=e.split("="),n=n||{},n[unescape(e[0])]=unescape(e[1])}),n},setHash:function(t,n,o,r,i,a){var s="";e(n,function(e,t){s+=(s?"&":"")+escape(t)+"="+escape(e)}),this.set(t,s,o,r,i,a)},get:function(e){var t,n,o=document.cookie,r=e+"=";if(o){if(n=o.indexOf("; "+r),-1==n){if(n=o.indexOf(r),0!==n)return null}else n+=2;return t=o.indexOf(";",n),-1==t&&(t=o.length),unescape(o.substring(n+r.length,t))}},set:function(e,t,n,o,r,i){document.cookie=e+"="+escape(t)+(n?"; expires="+n.toGMTString():"")+(o?"; path="+escape(o):"")+(r?"; domain="+r:"")+(i?"; secure":"")},remove:function(e,t,n){var o=new Date;o.setTime(o.getTime()-1e3),this.set(e,"",o,t,n)}})}(),function(){function serialize(e,t){var n,o,r,i;if(t=t||'"',null==e)return"null";if(r=typeof e,"string"==r)return o="\bb t\nn\ff\rr\"\"''\\\\",t+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,r){return'"'===t&&"'"===e?e:(n=o.indexOf(r),n+1?"\\"+o.charAt(n+1):(e=r.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+t;if("object"==r){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(n=0,o="[";n<e.length;n++)o+=(n>0?",":"")+serialize(e[n],t);return o+"]"}o="{";for(i in e)e.hasOwnProperty(i)&&(o+="function"!=typeof e[i]?(o.length>1?","+t:t)+i+t+":"+serialize(e[i],t):"");return o+"}"}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==o.readyState||a++>1e4?(e.success&&1e4>a&&200==o.status?e.success.call(e.success_scope,""+o.responseText,o,e):e.error&&e.error.call(e.error_scope,a>1e4?"TIMED_OUT":"GENERAL",o,e),o=null):i.setTimeout(t,10)}function n(e){o=0;try{o=new ActiveXObject(e)}catch(t){}return o}var o,r,i=window,a=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||"",o=i.XMLHttpRequest?new XMLHttpRequest:n("Microsoft.XMLHTTP")||n("Msxml2.XMLHTTP")){if(o.overrideMimeType&&o.overrideMimeType(e.content_type),o.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.content_type&&o.setRequestHeader("Content-Type",e.content_type),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.send(e.data),!e.async)return t();r=i.setTimeout(t,10)}}}),function(){var e=tinymce.extend,t=tinymce.util.JSON,n=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(t){this.settings=e({},t),this.count=0},send:function(o){var r=o.error,i=o.success;o=e(this.settings,o),o.success=function(e,n){e=t.parse(e),"undefined"==typeof e&&(e={error:"JSON Parse error."}),e.error?r.call(o.error_scope||o.scope,e.error,n):i.call(o.success_scope||o.scope,e.result)},o.error=function(e,t){r&&r.call(o.error_scope||o.scope,e,t)},o.data=t.serialize({id:o.id||"c"+this.count++,method:o.method,params:o.params}),o.content_type="application/json",n.send(o)},"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,n){try{e.getDoc().execCommand(t,!1,n)}catch(o){}}function n(){var t=e.getDoc().documentMode;return t?t:6}function o(e){return e.isDefaultPrevented()}function r(){function t(t){function n(){if(3==s.nodeType){if(t&&c==s.length)return!0;if(!t&&0===c)return!0}}var o,r,i,a,s,c,d;o=R.getRng();var l=[o.startContainer,o.startOffset,o.endContainer,o.endOffset];if(o.collapsed||(t=!0),s=o[(t?"start":"end")+"Container"],c=o[(t?"start":"end")+"Offset"],3==s.nodeType&&(r=M.getParent(o.startContainer,M.isBlock),t&&(r=M.getNext(r,M.isBlock)),!r||!n()&&o.collapsed||(i=M.create("em",{id:"__mceDel"}),P(tinymce.grep(r.childNodes),function(e){i.appendChild(e)}),r.appendChild(i))),o=M.createRng(),o.setStart(l[0],l[1]),o.setEnd(l[2],l[3]),R.setRng(o),e.getDoc().execCommand(t?"ForwardDelete":"Delete",!1,null),i){for(a=R.getBookmark();d=M.get("__mceDel");)M.remove(d,!0);R.moveToBookmark(a)}}e.onKeyDown.add(function(e,n){var r;r=n.keyCode==B,o(n)||!r&&n.keyCode!=A||T.modifierPressed(n)||(n.preventDefault(),t(r))}),e.addCommand("Delete",function(){t()})}function i(){function t(e){var t=M.create("body"),n=e.cloneContents();return t.appendChild(n),R.serializer.serialize(t,{format:"html"})}function n(n){var o=t(n),r=M.createRng();r.selectNode(e.getBody());var i=t(r);return o===i}e.onKeyDown.add(function(e,t){var r,i=t.keyCode;if(!o(t)&&(i==B||i==A)){if(r=e.selection.isCollapsed(),r&&!M.isEmpty(e.getBody()))return;if(tinymce.isIE&&!r)return;if(!r&&!n(e.selection.getRng()))return;e.setContent(""),e.selection.setCursorLocation(e.getBody(),0),e.nodeChanged()}})}function a(){e.onKeyDown.add(function(e,t){!o(t)&&65==t.keyCode&&T.metaKeyPressed(t)&&(t.preventDefault(),e.execCommand("SelectAll"))})}function s(){e.settings.content_editable||(M.bind(e.getDoc(),"focusin",function(){R.setRng(R.getRng())}),M.bind(e.getDoc(),"mousedown",function(t){t.target==e.getDoc().documentElement&&(e.getWin().focus(),R.setRng(R.getRng()))}))}function c(){e.onKeyDown.add(function(e,t){if(!o(t)&&t.keyCode===A&&R.isCollapsed()&&0===R.getRng(!0).startOffset){var n=R.getNode(),r=n.previousSibling;r&&r.nodeName&&"hr"===r.nodeName.toLowerCase()&&(M.remove(r),tinymce.dom.Event.cancel(t))}})}function d(){Range.prototype.getClientRects||e.onMouseDown.add(function(e,t){if(!o(t)&&"HTML"===t.target.nodeName){var n=e.getBody();n.blur(),setTimeout(function(){n.focus()},0)}})}function l(){e.onClick.add(function(e,t){t=t.target,/^(IMG|HR)$/.test(t.nodeName)&&R.getSel().setBaseAndExtent(t,0,t,1),"A"==t.nodeName&&M.hasClass(t,"mceItemAnchor")&&R.select(t),e.nodeChanged()})}function u(){function t(){var t=M.getAttribs(R.getStart().cloneNode(!1));return function(){var n=R.getStart();n!==e.getBody()&&(M.setAttrib(n,"style",null),P(t,function(e){n.setAttributeNode(e.cloneNode(!0))}))}}function n(){return!R.isCollapsed()&&M.getParent(R.getStart(),M.isBlock)!=M.getParent(R.getEnd(),M.isBlock)}function r(e,t){return t.preventDefault(),!1}e.onKeyPress.add(function(e,r){var i;return o(r)||8!=r.keyCode&&46!=r.keyCode||!n()?void 0:(i=t(),e.getDoc().execCommand("delete",!1,null),i(),r.preventDefault(),!1)}),M.bind(e.getDoc(),"cut",function(i){var a;!o(i)&&n()&&(a=t(),e.onKeyUp.addToTop(r),setTimeout(function(){a(),e.onKeyUp.remove(r)},0))})}function f(){var t,n;M.bind(e.getDoc(),"selectionchange",function(){n&&(clearTimeout(n),n=0),n=window.setTimeout(function(){var n=R.getRng();t&&tinymce.dom.RangeUtils.compareRanges(n,t)||(e.nodeChanged(),t=n)},50)})}function p(){document.body.setAttribute("role","application")}function m(){e.onKeyDown.add(function(e,t){if(!o(t)&&t.keyCode===A&&R.isCollapsed()&&0===R.getRng(!0).startOffset){var n=R.getNode().previousSibling;if(n&&n.nodeName&&"table"===n.nodeName.toLowerCase())return tinymce.dom.Event.cancel(t)}})}function h(){n()>7||(t("RespectVisibilityInDesign",!0),e.contentStyles.push(".mceHideBrInPre pre br {display: none}"),M.addClass(e.getBody(),"mceHideBrInPre"),I.addNodeFilter("pre",function(e){for(var t,n,o,r,i=e.length;i--;)for(t=e[i].getAll("br"),n=t.length;n--;)o=t[n],r=o.prev,r&&3===r.type&&"\n"!=r.value.charAt(r.value-1)?r.value+="\n":o.parent.insert(new tinymce.html.Node("#text",3),o,!0).value="\n"}),D.addNodeFilter("pre",function(e){for(var t,n,o,r,i=e.length;i--;)for(t=e[i].getAll("br"),n=t.length;n--;)o=t[n],r=o.prev,r&&3==r.type&&(r.value=r.value.replace(/\r?\n$/,""))}))}function g(){M.bind(e.getBody(),"mouseup",function(){var e,t=R.getNode();"IMG"==t.nodeName&&((e=M.getStyle(t,"width"))&&(M.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),M.setStyle(t,"width","")),(e=M.getStyle(t,"height"))&&(M.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),M.setStyle(t,"height","")))})}function v(){e.onKeyDown.add(function(e,t){var n,r,i,a,s,c,d;if(n=t.keyCode==B,!o(t)&&(n||t.keyCode==A)&&!T.modifierPressed(t)&&(r=R.getRng(),i=r.startContainer,a=r.startOffset,d=r.collapsed,3==i.nodeType&&i.nodeValue.length>0&&(0===a&&!d||d&&a===(n?0:1)))){if(c=i.previousSibling,c&&"IMG"==c.nodeName)return;nonEmptyElements=e.schema.getNonEmptyElements(),t.preventDefault(),s=M.create("br",{id:"__tmp"}),i.parentNode.insertBefore(s,i),e.getDoc().execCommand(n?"ForwardDelete":"Delete",!1,null),i=R.getRng().startContainer,c=i.previousSibling,c&&1==c.nodeType&&!M.isBlock(c)&&M.isEmpty(c)&&!nonEmptyElements[c.nodeName.toLowerCase()]&&M.remove(c),M.remove("__tmp")}})}function y(){e.onKeyDown.add(function(e,t){var n,r,i,a,s;if(!o(t)&&t.keyCode==T.BACKSPACE&&(n=R.getRng(),r=n.startContainer,i=n.startOffset,a=M.getRoot(),s=r,n.collapsed&&0===i)){for(;s&&s.parentNode&&s.parentNode.firstChild==s&&s.parentNode!=a;)s=s.parentNode;"BLOCKQUOTE"===s.tagName&&(e.formatter.toggle("blockquote",null,s),n=M.createRng(),n.setStart(r,0),n.setEnd(r,0),R.setRng(n))}})}function b(){function n(){e._refreshContentEditable(),t("StyleWithCSS",!1),t("enableInlineTableEditing",!1),L.object_resizing||t("enableObjectResizing",!1)}L.readonly||(e.onBeforeExecCommand.add(n),e.onMouseDown.add(n))}function C(){function t(){P(M.select("a"),function(e){var t=e.parentNode,n=M.getRoot();if(t.lastChild===e){for(;t&&!M.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}M.add(t,"br",{"data-mce-bogus":1})}})}e.onExecCommand.add(function(e,n){"CreateLink"===n&&t(e)}),e.onSetContent.add(R.onSetContent.add(t))}function x(){L.forced_root_block&&e.onInit.add(function(){t("DefaultParagraphSeparator",L.forced_root_block)})}function _(){function t(t,n){t&&n.initial||e.execCommand("mceRepaint")}e.onUndo.add(t),e.onRedo.add(t),e.onSetContent.add(t)}function E(){e.onKeyDown.add(function(e,t){var n;o(t)||t.keyCode!=A||(n=e.getDoc().selection.createRange(),n&&n.item&&(t.preventDefault(),e.undoManager.beforeChange(),M.remove(n.item(0)),e.undoManager.add()))})}function S(){var t;n()>=10&&(t="",P("p div h1 h2 h3 h4 h5 h6".split(" "),function(e,n){t+=(n>0?",":"")+e+":empty"}),e.contentStyles.push(t+"{padding-right: 1px !important}"))}function k(){function n(e){var t,n;t=e.screenX-f,n=e.screenY-p,y=t*u[2]+m,b=n*u[3]+h,y=5>y?5:y,b=5>b?5:b,(T.modifierPressed(e)||"IMG"==d.nodeName&&u[2]*u[3]!==0)&&(y=Math.round(b/g),b=Math.round(y*g)),M.setStyles(l,{width:y,height:b}),u[2]<0&&l.clientWidth<=y&&M.setStyle(l,"left",s+(m-y)),u[3]<0&&l.clientHeight<=b&&M.setStyle(l,"top",c+(h-b))}function o(){function t(t,n){n&&(d.style[t]||!e.schema.isValid(d.nodeName.toLowerCase(),t)?M.setStyle(d,t,n):M.setAttrib(d,t,n))}t("width",y),t("height",b),M.unbind(x,"mousemove",n),M.unbind(x,"mouseup",o),C!=x&&(M.unbind(C,"mousemove",n),M.unbind(C,"mouseup",o)),M.remove(l),r(d)}function r(e){var t,r,a;i(),t=M.getPos(e),s=t.x,c=t.y,r=e.offsetWidth,a=e.offsetHeight,d!=e&&(d=e,y=b=0),P(v,function(e,t){var i;i=M.get("mceResizeHandle"+t),i?M.show(i):(i=M.add(x.documentElement,"div",{id:"mceResizeHandle"+t,"class":"mceResizeHandle",style:"cursor:"+t+"-resize; margin:0; padding:0"}),M.bind(i,"mousedown",function(t){t.preventDefault(),o(),f=t.screenX,p=t.screenY,m=d.clientWidth,h=d.clientHeight,g=h/m,u=e,l=d.cloneNode(!0),M.addClass(l,"mceClonedResizable"),M.setStyles(l,{left:s,top:c,margin:0}),x.documentElement.appendChild(l),M.bind(x,"mousemove",n),M.bind(x,"mouseup",o),C!=x&&(M.bind(C,"mousemove",n),M.bind(C,"mouseup",o))})),M.setStyles(i,{left:r*e[0]+s-i.offsetWidth/2,top:a*e[1]+c-i.offsetHeight/2})}),tinymce.isOpera||"IMG"!=d.nodeName||d.setAttribute("data-mce-selected","1")}function i(){d&&d.removeAttribute("data-mce-selected");for(var e in v)M.hide("mceResizeHandle"+e)}function a(){var e=M.getParent(R.getNode(),"table,img");P(M.select("img[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),e?r(e):i()}var s,c,d,l,u,f,p,m,h,g,v,y,b,C=document,x=e.getDoc();L.object_resizing&&L.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(a),M.bind(x,"selectionchange",a),e.serializer.addAttributeFilter("data-mce-selected",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}))}function w(){n()<9&&(I.addNodeFilter("noscript",function(e){for(var t,n,o=e.length;o--;)t=e[o],n=t.firstChild,n&&t.attr("data-mce-innertext",n.value)}),D.addNodeFilter("noscript",function(e){for(var t,n,o,r=e.length;r--;)t=e[r],n=e[r].firstChild,n?n.value=tinymce.html.Entities.decode(n.value):(o=t.attributes.map["data-mce-innertext"],o&&(t.attr("data-mce-innertext",null),n=new tinymce.html.Node("#text",3),n.value=o,n.raw=!0,t.append(n)))}))}function N(){e.contentStyles.push("body {min-height: 100px}"),e.onClick.add(function(t,n){"HTML"==n.target.nodeName&&(e.execCommand("SelectAll"),e.selection.collapse(!0),e.nodeChanged())})}var T=tinymce.VK,A=T.BACKSPACE,B=T.DELETE,M=e.dom,R=e.selection,L=e.settings,I=e.parser,D=e.serializer,P=tinymce.each;m(),y(),i(),tinymce.isWebKit&&(v(),r(),s(),l(),x(),tinymce.isIDevice?f():(k(),a())),tinymce.isIE&&!tinymce.isIE11&&(c(),p(),h(),g(),E(),S(),w()),tinymce.isIE11&&N(),tinymce.isGecko&&!tinymce.isIE11&&(c(),d(),u(),b(),C(),_()),tinymce.isOpera&&k()},function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,o,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)o=String.fromCharCode(parseInt(e[n],t)),r[o]||(i="&"+e[n+1]+";",a[o]=i,a[i]=o);return a}}var o,r,i,a=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,d=/&(#x|#)?([\w]+);/g,l={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};r={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"},i={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},o=n("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?a:s,function(e){return r[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return r[e]||e})},encodeNumeric:function(e,t){return e.replace(t?a:s,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":r[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||o,e.replace(t?a:s,function(e){return r[e]||n[e]||e})},getEncodeFunc:function(t,i){function c(e,t){return e.replace(t?a:s,function(e){return r[e]||i[e]||"&#"+e.charCodeAt(0)+";"||e})}function d(e,t){return l.encodeNamed(e,t,i)}var l=e.html.Entities;return i=n(i)||o,t=e.makeMap(t.replace(/\+/g,",")),t.named&&t.numeric?c:t.named?i?d:l.encodeNamed:t.numeric?l.encodeNumeric:l.encodeRaw},decode:function(e){return e.replace(d,function(e,n,r){return n?(r=parseInt(r,2===n.length?16:10),r>65535?(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r))):l[r]||String.fromCharCode(r)):i[e]||o[e]||t(e)})}}}(tinymce),tinymce.html.Styles=function(e,t){function n(e,t,n,o){function r(e){return e=parseInt(e).toString(16),e.length>1?e:"0"+e}return"#"+r(t)+r(n)+r(o)}var o,r,i,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,s=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,d=/\s+$/,l={};for(e=e||{},i="\\\" \\' \\; \\: ; : \ufeff".split(" "),r=0;r<i.length;r++)l[i[r]]="\ufeff"+r,l["\ufeff"+r]=i[r];return{toHex:function(e){return e.replace(a,n)},parse:function(t){function o(e,t){var n,o,r,i;"none"===y["border-image"]&&delete y["border-image"],n=y[e+"-top"+t],n&&(o=y[e+"-right"+t],n==o&&(r=y[e+"-bottom"+t],o==r&&(i=y[e+"-left"+t],r==i&&(y[e+t]=i,delete y[e+"-top"+t],delete y[e+"-right"+t],delete y[e+"-bottom"+t],delete y[e+"-left"+t]))))}function r(e){var t,n=y[e];if(n&&!(n.indexOf(" ")<0)){for(n=n.split(" "),t=n.length;t--;)if(n[t]!==n[0])return!1;return y[e]=n[0],!0}}function i(e,t,n,o){r(t)&&r(n)&&r(o)&&(y[e]=y[t]+" "+y[n]+" "+y[o],delete y[t],delete y[n],delete y[o])}function u(e){return v=!0,l[e]}function f(e,t){return v&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return l[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(e,t,n,o,r,i){return(r=r||i)?(r=f(r),"'"+r.replace(/\'/g,"\\'")+"'"):(t=f(t||n||o),b&&(t=b.call(C,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')")}var m,h,g,v,y={},b=e.url_converter,C=e.url_converter_scope||this;if(t){for(t=t.replace(/\\[\"\';:\uFEFF]/g,u).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,u)});m=c.exec(t);)h=m[1].replace(d,"").toLowerCase(),g=m[2].replace(d,""),h&&g.length>0&&("font-weight"===h&&"700"===g?g="bold":("color"===h||"background-color"===h)&&(g=g.toLowerCase()),g=g.replace(a,n),g=g.replace(s,p),y[h]=v?f(g,!0):g),c.lastIndex=m.index+m[0].length;o("border",""),o("border","-width"),o("border","-color"),o("border","-style"),o("padding",""),o("margin",""),i("border","border-width","border-style","border-color"),"medium none"===y.border&&delete y.border}return y},serialize:function(e,n){function r(n){var r,i,a,c;if(r=t.styles[n])for(i=0,a=r.length;a>i;i++)n=r[i],c=e[n],c!==o&&c.length>0&&(s+=(s.length>0?" ":"")+n+": "+c+";")}var i,a,s="";if(n&&t&&t.styles)r("*"),r(n);else for(i in e)a=e[i],a!==o&&a.length>0&&(s+=(s.length>0?" ":"")+i+": "+a+";");return s}}},function(e){function t(e,t){return e.split(t||",")}function n(e,n){function o(t){return t.replace(/[A-Z]+/g,function(t){return o(e[t])})}var r,i={};for(r in e)e.hasOwnProperty(r)&&(e[r]=o(e[r]));return o(n).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(e,n,o,r){o=t(o,"|"),i[n]={attributes:a(o),attributesOrder:o,children:a(r,"|",{"#comment":{}})}}),i}function o(){var e=i.html5;return e||(e=i.html5=n({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
2
- }function r(){var e=i.html4;return e||(e=i.html4=n({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 i={},a=e.makeMap,s=e.each;e.html.Schema=function(n){function c(t,o,r){var s=n[t];return s?s=a(s,",",a(s.toUpperCase()," ")):(s=i[t],s||(s=a(o," ",a(o.toUpperCase()," ")),s=e.extend(s,r),i[t]=s)),s}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function l(n){var o,r,i,s,c,l,u,f,p,m,h,g,v,y,b,C,x,_,E,k=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,N=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(n)for(n=t(n),S["@"]&&(C=S["@"].attributes,x=S["@"].attributesOrder),o=0,r=n.length;r>o;o++)if(c=k.exec(n[o])){if(y=c[1],p=c[2],b=c[3],f=c[4],g={},v=[],l={attributes:g,attributesOrder:v},"#"===y&&(l.paddEmpty=!0),"-"===y&&(l.removeEmpty=!0),C){for(_ in C)g[_]=C[_];v.push.apply(v,x)}if(f)for(f=t(f,"|"),i=0,s=f.length;s>i;i++)if(c=N.exec(f[i])){if(u={},h=c[1],m=c[2].replace(/::/g,":"),y=c[3],E=c[4],"!"===h&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(m),u.required=!0),"-"===h){delete g[m],v.splice(e.inArray(v,m),1);continue}y&&("="===y&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:m,value:E}),u.defaultValue=E),":"===y&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:m,value:E}),u.forcedValue=E),"<"===y&&(u.validValues=a(E,"?"))),T.test(m)?(l.attributePatterns=l.attributePatterns||[],u.pattern=d(m),l.attributePatterns.push(u)):(g[m]||v.push(m),g[m]=u)}C||"@"!=p||(C=g,x=v),b&&(l.outputName=p,S[b]=l),T.test(p)?(l.pattern=d(p),w.push(l)):S[p]=l}}function u(e){S={},w=[],l(e),s(g,function(e,t){k[t]=e.children})}function f(e){var n=/^(~)?(.+)$/;e&&s(t(e),function(e){var t=n.exec(e),o="~"===t[1],r=o?"span":"div",i=t[2];k[i]=k[r],N[i]=r,o||(x[i.toUpperCase()]={},x[i]={}),S[i]||(S[i]=S[r]),s(k,function(e){e[r]&&(e[i]=e[r])})})}function p(e){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;e&&s(t(e),function(e){var o,r,i=n.exec(e);i&&(r=i[1],o=r?k[i[2]]:k[i[2]]={"#comment":{}},o=k[i[2]],s(t(i[3],"|"),function(e){"-"===r?delete o[e]:o[e]={}}))})}function m(e){var t,n=S[e];if(n)return n;for(t=w.length;t--;)if(n=w[t],n.pattern.test(e))return n}var h,g,v,y,b,C,x,_,E=this,S={},k={},w=[],N={};n=n||{},g="html5"==n.schema?o():r(),n.verify_html===!1&&(n.valid_elements="*[*]"),n.valid_styles&&(h={},s(n.valid_styles,function(t,n){h[n]=e.explode(t)})),v=c("whitespace_elements","pre script noscript style textarea"),y=c("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),b=c("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr"),C=c("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),_=c("non_empty_elements","td th iframe video audio object script",b),textBlockElementsMap=c("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"),x=c("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),n.valid_elements?u(n.valid_elements):(s(g,function(e,t){S[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},k[t]=e.children}),"html5"!=n.schema&&s(t("strong/b,em/i"),function(e){e=t(e,"/"),S[e[1]].outputName=e[0]}),S.img.attributesDefault=[{name:"alt",value:""}],s(t("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(e){S[e]&&(S[e].removeEmpty=!0)}),s(t("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(e){S[e].paddEmpty=!0})),f(n.custom_elements),p(n.valid_children),l(n.extended_valid_elements),p("+ol[ul|ol],+ul[ul|ol]"),n.invalid_elements&&e.each(e.explode(n.invalid_elements),function(e){S[e]&&delete S[e]}),m("span")||l("span[!data-mce-type|*]"),E.children=k,E.styles=h,E.getBoolAttrs=function(){return C},E.getBlockElements=function(){return x},E.getTextBlockElements=function(){return textBlockElementsMap},E.getShortEndedElements=function(){return b},E.getSelfClosingElements=function(){return y},E.getNonEmptyElements=function(){return _},E.getWhiteSpaceElements=function(){return v},E.isValidChild=function(e,t){var n=k[e];return!(!n||!n[t])},E.isValid=function(e,t){var n,o,r=m(e);if(r){if(!t)return!0;if(r.attributes[t])return!0;if(n=r.attributePatterns)for(o=n.length;o--;)if(n[o].pattern.test(e))return!0}return!1},E.getElementRule=m,E.getCustomElements=function(){return N},E.addValidElements=l,E.setValidElements=u,E.addCustomElements=f,E.addValidChildren=p,E.elements=S}}(tinymce),function(e){e.html.SaxParser=function(t,n){var o=this,r=function(){};t=t||{},o.schema=n=n||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&&(o[e]=t[e]||r)}),o.parse=function(o){function r(e){var t,n;for(t=H.length;t--&&H[t].name!==e;);if(t>=0){for(n=H.length-1;n>=t;n--)e=H[n],e.valid&&P.end(e.name);H.length=t}}function i(e,t,n,o,r){var i,a;if(t=t.toLowerCase(),n=t in g?t:U(n||o||r||""),y&&!p&&0!==t.indexOf("data-")){if(i=S[t],!i&&k){for(a=k.length;a--&&(i=k[a],!i.pattern.test(t)););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}d.map[t]=n,d.push({name:t,value:n})}var a,s,c,d,l,u,f,p,m,h,g,v,y,b,C,x,_,E,S,k,w,N,T,A,B,M,R,L,I,D,P=this,O=0,H=[],F=0,U=e.html.Entities.decode;for(B=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),M=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,R={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi},h=n.getShortEndedElements(),A=t.self_closing_elements||n.getSelfClosingElements(),g=n.getBoolAttrs(),y=t.validate,m=t.remove_internals,I=t.fix_self_closing,D=e.isIE,E=/^:/;a=B.exec(o);){if(O<a.index&&P.text(U(o.substr(O,a.index-O))),s=a[6])s=s.toLowerCase(),D&&E.test(s)&&(s=s.substr(1)),r(s);else if(s=a[7]){if(s=s.toLowerCase(),D&&E.test(s)&&(s=s.substr(1)),v=s in h,I&&A[s]&&H.length>0&&H[H.length-1].name===s&&r(s),!y||(b=n.getElementRule(s))){if(C=!0,y&&(S=b.attributes,k=b.attributePatterns),(_=a[8])?(p=-1!==_.indexOf("data-mce-type"),p&&m&&(C=!1),d=[],d.map={},_.replace(M,i)):(d=[],d.map={}),y&&!p){if(w=b.attributesRequired,N=b.attributesDefault,T=b.attributesForced)for(l=T.length;l--;)x=T[l],f=x.name,L=x.value,"{$uid}"===L&&(L="mce_"+F++),d.map[f]=L,d.push({name:f,value:L});if(N)for(l=N.length;l--;)x=N[l],f=x.name,f in d.map||(L=x.value,"{$uid}"===L&&(L="mce_"+F++),d.map[f]=L,d.push({name:f,value:L}));if(w){for(l=w.length;l--&&!(w[l]in d.map););-1===l&&(C=!1)}d.map["data-mce-bogus"]&&(C=!1)}C&&P.start(s,d,v)}else C=!1;if(c=R[s]){c.lastIndex=O=a.index+a[0].length,(a=c.exec(o))?(C&&(u=o.substr(O,a.index-O)),O=a.index+a[0].length):(u=o.substr(O),O=o.length),C&&u.length>0&&P.text(u,!0),C&&P.end(s),B.lastIndex=O;continue}v||(_&&_.indexOf("/")==_.length-1?C&&P.end(s):H.push({name:s,valid:C}))}else(s=a[1])?P.comment(s):(s=a[2])?P.cdata(s):(s=a[3])?P.doctype(s):(s=a[4])&&P.pi(s,a[5]);O=a.index+a[0].length}for(O<o.length&&P.text(U(o.substr(O))),l=H.length-1;l>=0;l--)s=H[l],s.valid&&P.end(s.name)}}}(tinymce),function(e){function t(e,t,n){var o,r,i=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[i])return e[i];if(e!==t){if(o=e[a])return o;for(r=e.parent;r&&r!==t;r=r.parent)if(o=r[a])return o}}function n(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var o=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};e.extend(n.prototype,{replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n,o,r,i=this;if("string"!=typeof e){for(o in e)i.attr(o,e[o]);return i}if(n=i.attributes){if(t!==r){if(null===t){if(e in n.map)for(delete n.map[e],o=n.length;o--;)if(n[o].name===e)return n=n.splice(o,1),i;return i}if(e in n.map){for(o=n.length;o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,i}return n.map[e]}},clone:function(){var e,t,o,r,i,a=this,s=new n(a.name,a.type);if(o=a.attributes){for(i=[],i.map={},e=0,t=o.length;t>e;e++)r=o[e],"id"!==r.name&&(i[i.length]={name:r.name,value:r.value},i.map[r.name]=r.value);s.attributes=i}return s.value=a.value,s.shortEnded=a.shortEnded,s},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e,t,n=this;for(e=n.firstChild;e;)t=e.next,n.insert(e,n,!0),e=t;n.remove()},remove:function(){var e=this,t=e.parent,n=e.next,o=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):o.next=n,t.lastChild===e?(t.lastChild=o,o&&(o.next=null)):n.prev=o,e.parent=e.next=e.prev=null),e},append:function(e){var t,n=this;return e.parent&&e.remove(),t=n.lastChild,t?(t.next=e,e.prev=t,n.lastChild=e):n.lastChild=n.firstChild=e,e.parent=n,e},insert:function(e,t,n){var o;return e.parent&&e.remove(),o=t.parent||this,n?(t===o.firstChild?o.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===o.lastChild?o.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=o,e},getAll:function(e){var n,o=this,r=[];for(n=o.firstChild;n;n=t(n,o))n.name===e&&r.push(n);return r},empty:function(){var e,n,o,r=this;if(r.firstChild){for(e=[],o=r.firstChild;o;o=t(o,r))e.push(o);for(n=e.length;n--;)o=e[n],o.parent=o.firstChild=o.lastChild=o.next=o.prev=null}return r.firstChild=r.lastChild=null,r},isEmpty:function(e){var n,r,i=this,a=i.firstChild;if(a)do{if(1===a.type){if(a.attributes.map["data-mce-bogus"])continue;if(e[a.name])return!1;for(n=a.attributes.length;n--;)if(r=a.attributes[n].name,"name"===r||0===r.indexOf("data-mce-"))return!1}if(8===a.type)return!1;if(3===a.type&&!o.test(a.value))return!1}while(a=t(a,i));return!0},walk:function(e){return t(this,null,e)}}),e.extend(n,{create:function(e,t){var o,i;if(o=new n(e,r[e]||1),t)for(i in t)o.attr(i,t[i]);return o}}),e.html.Node=n}(tinymce),function(e){var t=e.html.Node;e.html.DomParser=function(n,o){function r(n){var r,a,s,c,d,l,u,f,p,m,h,g,v,y;for(h=e.makeMap("tr,td,th,tbody,thead,tfoot,table"),m=o.getNonEmptyElements(),g=o.getTextBlockElements(),r=0;r<n.length;r++)if(a=n[r],a.parent&&!a.fixed)if(g[a.name]&&"li"==a.parent.name){for(v=a.next;v&&g[v.name];)v.name="li",v.fixed=!0,a.parent.insert(v,a.parent),v=v.next;a.unwrap(a)}else{for(c=[a],s=a.parent;s&&!o.isValidChild(s.name,a.name)&&!h[s.name];s=s.parent)c.push(s);if(s&&c.length>1){for(c.reverse(),d=l=i.filterNode(c[0].clone()),p=0;p<c.length-1;p++){for(o.isValidChild(l.name,c[p].name)?(u=i.filterNode(c[p].clone()),l.append(u)):u=l,f=c[p].firstChild;f&&f!=c[p+1];)y=f.next,u.append(f),f=y;l=u}d.isEmpty(m)?s.insert(a,c[0],!0):(s.insert(d,c[0],!0),s.insert(a,d)),s=c[0],(s.isEmpty(m)||s.firstChild===s.lastChild&&"br"===s.firstChild.name)&&s.empty().remove()}else if(a.parent){if("li"===a.name){if(v=a.prev,v&&("ul"===v.name||"ul"===v.name)){v.append(a);continue}if(v=a.next,v&&("ul"===v.name||"ul"===v.name)){v.insert(a,v.firstChild,!0);continue}a.wrap(i.filterNode(new t("ul",1)));continue}o.isValidChild(a.parent.name,"div")&&o.isValidChild("div",a.name)?a.wrap(i.filterNode(new t("div",1))):"style"===a.name||"script"===a.name?a.empty().remove():a.unwrap()}}}var i=this,a={},s=[],c={},d={};n=n||{},n.validate="validate"in n?n.validate:!0,n.root_name=n.root_name||"body",i.schema=o=o||new e.html.Schema,i.filterNode=function(e){var t,n,o;n in a&&(o=c[n],o?o.push(e):c[n]=[e]),t=s.length;for(;t--;)n=s[t].name,n in e.attributes.map&&(o=d[n],o?o.push(e):d[n]=[e]);return e},i.addNodeFilter=function(t,n){e.each(e.explode(t),function(e){var t=a[e];t||(a[e]=t=[]),t.push(n)})},i.addAttributeFilter=function(t,n){e.each(e.explode(t),function(e){var t;for(t=0;t<s.length;t++)if(s[t].name===e)return void s[t].callbacks.push(n);s.push({name:e,callbacks:[n]})})},i.parse=function(i,l){function u(){for(var e,t,n=g.firstChild;n;)e=n.next,3==n.type||1==n.type&&"p"!==n.name&&!w[n.name]&&!n.attr("data-mce-type")?t?t.append(n):(t=f(D,1),g.insert(t,n),t.append(n)):t=null,n=e}function f(e,n){var o,r=new t(e,n);return e in a&&(o=c[e],o?o.push(r):c[e]=[r]),r}function p(e){var t,n,o;for(t=e.prev;t&&3===t.type;)n=t.value.replace(A,""),n.length>0?(t.value=n,t=t.prev):(o=t.prev,t.remove(),t=o)}function m(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var h,g,v,y,b,C,x,_,E,S,k,w,N,T,A,B,M,R,L,I,D,P=[];if(l=l||{},c={},d={},w=e.extend(e.makeMap("script,style,head,html,body,title,meta,param"),o.getBlockElements()),I=o.getNonEmptyElements(),L=o.children,k=n.validate,D="forced_root_block"in l?l.forced_root_block:n.forced_root_block,R=o.getWhiteSpaceElements(),N=/^[ \t\r\n]+/,A=/[ \t\r\n]+$/,B=/[ \t\r\n]+/g,M=/^[ \t\r\n]+$/,h=new e.html.SaxParser({validate:k,self_closing_elements:m(o.getSelfClosingElements()),cdata:function(e){v.append(f("#cdata",4)).value=e},text:function(e,t){var n;T||(e=e.replace(B," "),v.lastChild&&w[v.lastChild.name]&&(e=e.replace(N,""))),0!==e.length&&(n=f("#text",3),n.raw=!!t,v.append(n).value=e)},comment:function(e){v.append(f("#comment",8)).value=e},pi:function(e,t){v.append(f(e,7)).value=t,p(v)},doctype:function(e){var t;t=v.append(f("#doctype",10)),t.value=e,p(v)},start:function(e,t,n){var r,i,a,c,l;if(a=k?o.getElementRule(e):{}){for(r=f(a.outputName||e,1),r.attributes=t,r.shortEnded=n,v.append(r),l=L[v.name],l&&L[r.name]&&!l[r.name]&&P.push(r),i=s.length;i--;)c=s[i].name,c in t.map&&(E=d[c],E?E.push(r):d[c]=[r]);w[e]&&p(r),n||(v=r),!T&&R[e]&&(T=!0)}},end:function(e){var n,r,i,a,s;if(r=k?o.getElementRule(e):{}){if(w[e]&&!T){if(n=v.firstChild,n&&3===n.type)for(i=n.value.replace(N,""),i.length>0?(n.value=i,n=n.next):(a=n.next,n.remove(),n=a);n&&3===n.type;)i=n.value,a=n.next,(0===i.length||M.test(i))&&(n.remove(),n=a),n=a;if(n=v.lastChild,n&&3===n.type)for(i=n.value.replace(A,""),i.length>0?(n.value=i,n=n.prev):(a=n.prev,n.remove(),n=a);n&&3===n.type;)i=n.value,a=n.prev,(0===i.length||M.test(i))&&(n.remove(),n=a),n=a}if(T&&R[e]&&(T=!1),(r.removeEmpty||r.paddEmpty)&&v.isEmpty(I))if(r.paddEmpty)v.empty().append(new t("#text","3")).value="\xa0";else if(!v.attributes.map.name&&!v.attributes.map.id)return s=v.parent,v.empty().remove(),void(v=s);v=v.parent}}},o),g=v=new t(l.context||n.root_name,11),h.parse(i),k&&P.length&&(l.context?l.invalid=!0:r(P)),D&&"body"==g.name&&u(),!l.invalid){for(S in c){for(E=a[S],y=c[S],x=y.length;x--;)y[x].parent||y.splice(x,1);for(b=0,C=E.length;C>b;b++)E[b](y,S,l)}for(b=0,C=s.length;C>b;b++)if(E=s[b],E.name in d){for(y=d[E.name],x=y.length;x--;)y[x].parent||y.splice(x,1);for(x=0,_=E.callbacks.length;_>x;x++)E.callbacks[x](y,E.name,l)}}return g},n.remove_trailing_brs&&i.addNodeFilter("br",function(t){var n,r,i,a,s,c,d=t.length,l=e.extend({},o.getBlockElements()),u=o.getNonEmptyElements();for(l.body=1,n=0;d>n;n++)if(r=t[n],i=r.parent,l[r.parent.name]&&r===i.lastChild){for(s=r.prev;s;){if(c=s.name,"span"!==c||"bookmark"!==s.attr("data-mce-type")){if("br"!==c)break;if("br"===c){r=null;break}}s=s.prev}r&&(r.remove(),i.isEmpty(u)&&(elementRule=o.getElementRule(i.name),elementRule&&(elementRule.removeEmpty?i.remove():elementRule.paddEmpty&&(i.empty().append(new e.html.Node("#text",3)).value="\xa0"))))}else{for(a=r;i.firstChild===a&&i.lastChild===a&&(a=i,!l[i.name]);)i=i.parent;a===i&&(textNode=new e.html.Node("#text",3),textNode.value="\xa0",r.replace(textNode))}}),n.allow_html_in_named_anchor||i.addAttributeFilter("id,name",function(e){for(var t,n,o,r,i=e.length;i--;)if(r=e[i],"a"===r.name&&r.firstChild&&!r.attr("href")){o=r.parent,t=r.lastChild;do n=t.prev,o.insert(t,r),t=n;while(t)}})}}(tinymce),tinymce.html.Writer=function(e){var t,n,o,r,i,a=[];return e=e||{},t=e.indent,n=tinymce.makeMap(e.indent_before||""),o=tinymce.makeMap(e.indent_after||""),r=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities),i="html"==e.element_format,{start:function(e,s,c){var d,l,u,f;if(t&&n[e]&&a.length>0&&(f=a[a.length-1],f.length>0&&"\n"!==f&&a.push("\n")),a.push("<",e),s)for(d=0,l=s.length;l>d;d++)u=s[d],a.push(" ",u.name,'="',r(u.value,!0),'"');a[a.length]=!c||i?">":" />",c&&t&&o[e]&&a.length>0&&(f=a[a.length-1],f.length>0&&"\n"!==f&&a.push("\n"))},end:function(e){var n;a.push("</",e,">"),t&&o[e]&&a.length>0&&(n=a[a.length-1],n.length>0&&"\n"!==n&&a.push("\n"))},text:function(e,t){e.length>0&&(a[a.length]=t?e:r(e))},cdata:function(e){a.push("<![CDATA[",e,"]]>")},comment:function(e){a.push("<!--",e,"-->")},pi:function(e,n){n?a.push("<?",e," ",n,"?>"):a.push("<?",e,"?>"),t&&a.push("\n")},doctype:function(e){a.push("<!DOCTYPE",e,">",t?"\n":"")},reset:function(){a.length=0},getContent:function(){return a.join("").replace(/\n$/,"")}}},function(e){e.html.Serializer=function(t,n){var o=this,r=new e.html.Writer(t);t=t||{},t.validate="validate"in t?t.validate:!0,o.schema=n=n||new e.html.Schema,o.writer=r,o.serialize=function(e){function o(e){var t,s,c,d,l,u,f,p,m,h=i[e.type];if(h)h(e);else{if(t=e.name,s=e.shortEnded,c=e.attributes,a&&c&&c.length>1){for(u=[],u.map={},m=n.getElementRule(e.name),f=0,p=m.attributesOrder.length;p>f;f++)d=m.attributesOrder[f],d in c.map&&(l=c.map[d],u.map[d]=l,u.push({name:d,value:l}));for(f=0,p=c.length;p>f;f++)d=c[f].name,d in u.map||(l=c.map[d],u.map[d]=l,u.push({name:d,value:l}));c=u}if(r.start(e.name,c,s),!s){if(e=e.firstChild)do o(e);while(e=e.next);r.end(t)}}}var i,a;return a=t.validate,i={3:function(e){r.text(e.value,e.raw)},8:function(e){r.comment(e.value)},7:function(e){r.pi(e.name,e.value)},10:function(e){r.doctype(e.value)},4:function(e){r.cdata(e.value)},11:function(e){if(e=e.firstChild)do o(e);while(e=e.next)}},r.reset(),1!=e.type||t.inner?i[11](e):o(e),r.getContent()}}}(tinymce),tinymce.dom={},function(e,t){function n(e,t,n,o){e.addEventListener?e.addEventListener(t,n,o||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function o(e,t,n,o){e.removeEventListener?e.removeEventListener(t,n,o||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function r(e,t){function n(){return!1}function o(){return!0}var r,i=t||{};for(r in e)"layerX"!==r&&"layerY"!==r&&(i[r]=e[r]);return i.target||(i.target=i.srcElement||document),i.preventDefault=function(){i.isDefaultPrevented=o,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},i.stopPropagation=function(){i.isPropagationStopped=o,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=o,i.stopPropagation()},i.isDefaultPrevented||(i.isDefaultPrevented=n,i.isPropagationStopped=n,i.isImmediatePropagationStopped=n),i}function i(e,t,r){function i(){r.domLoaded||(r.domLoaded=!0,t(c))}var a=e.document,c={type:"ready"};return"complete"==a.readyState?void i():(s?n(e,"DOMContentLoaded",i):(n(a,"readystatechange",function(){"complete"===a.readyState&&(o(a,"readystatechange",arguments.callee),i())}),a.documentElement.doScroll&&e===e.top&&!function(){try{a.documentElement.doScroll("left")}catch(e){return void setTimeout(arguments.callee,0)}i()}()),void n(e,"load",i))}function a(e){function a(e,t){var n,o,r,i;if(n=p[t][e.type])for(o=0,r=n.length;r>o;o++)if(i=n[o],i&&i.func.call(i.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var c,d,l,u,f=this,p={};l="onmouseenter"in document.documentElement,d="onfocusin"in document.documentElement,u={mouseenter:"mouseover",mouseleave:"mouseout"},c=1,f.domLoaded=!1,f.events=p,f.bind=function(o,m,h,g){function v(e){a(r(e||k.event),y)}var y,b,C,x,_,E,S,k=window;if(o&&3!==o.nodeType&&8!==o.nodeType){for(o[t]?(y=o[t],p[y]||(p[y]={})):(y=c++,o[t]=y,p[y]={}),g=g||o,m=m.split(" "),C=m.length;C--;)x=m[C],E=v,_=S=!1,"DOMContentLoaded"===x&&(x="ready"),!f.domLoaded&&"complete"!=o.readyState||"ready"!==x?(l||(_=u[x],_&&(E=function(e){var t,n;if(t=e.currentTarget,n=e.relatedTarget,n&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||(e=r(e||k.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,a(e,y))})),d||"focusin"!==x&&"focusout"!==x||(S=!0,_="focusin"===x?"focus":"blur",E=function(e){e=r(e||k.event),e.type="focus"===e.type?"focusin":"focusout",a(e,y)}),b=p[y][x],b?b.push({func:h,scope:g}):(p[y][x]=b=[{func:h,scope:g}],b.fakeName=_,b.capture=S,b.nativeHandler=E,s||(b.proxyHandler=e(y)),"ready"===x?i(o,E,f):n(o,_||x,s?E:b.proxyHandler,S))):(f.domLoaded=!0,h.call(g,r({type:x})));return o=b=0,h}},f.unbind=function(e,n,r){var i,a,c,d,l,u;if(!e||3===e.nodeType||8===e.nodeType)return f;if(i=e[t]){if(u=p[i],n){for(n=n.split(" "),c=n.length;c--;)if(l=n[c],a=u[l]){if(r)for(d=a.length;d--;)a[d].func===r&&a.splice(d,1);r&&0!==a.length||(delete u[l],o(e,a.fakeName||l,s?a.nativeHandler:a.proxyHandler,a.capture))}}else{for(l in u)a=u[l],o(e,a.fakeName||l,s?a.nativeHandler:a.proxyHandler,a.capture);u={}}for(l in u)return f;delete p[i];try{delete e[t]}catch(m){e[t]=null}}return f},f.fire=function(e,n,o){var i,s;if(!e||3===e.nodeType||8===e.nodeType)return f;s=r(null,o),s.type=n;do i=e[t],i&&a(s,i),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow;while(e&&!s.isPropagationStopped());return f},f.clean=function(e){var n,o,r=f.unbind;if(!e||3===e.nodeType||8===e.nodeType)return f;if(e[t]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),o=e.getElementsByTagName("*"),n=o.length;n--;)e=o[n],e[t]&&r(e);return f},f.callNativeHandler=function(e,t){p&&p[e][t.type].nativeHandler(t)},f.destory=function(){p={}},f.add=function(e,t,n,o){"string"==typeof e&&(e=document.getElementById(e));{if(!(e&&e instanceof Array))return"init"===t&&(t="ready"),f.bind(e,t instanceof Array?t.join(" "):t,n,o);for(var r=e.length;r--;)f.add(e[r],t,n,o)}},f.remove=function(e,t,n,o){if(!e)return f;if("string"==typeof e&&(e=document.getElementById(e)),e instanceof Array){for(var r=e.length;r--;)f.remove(e[r],t,n,o);return f}return f.unbind(e,t instanceof Array?t.join(" "):t,n)},f.clear=function(e){return"string"==typeof e&&(e=document.getElementById(e)),f.clean(e)},f.cancel=function(e){return e&&(f.prevent(e),f.stop(e)),!1},f.prevent=function(e){return e.preventDefault||(e=r(e)),e.preventDefault(),!1},f.stop=function(e){return e.stopPropagation||(e=r(e)),e.stopPropagation(),!1}}var s=!!document.addEventListener;e.EventUtils=a,e.Event=new a(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 n(e,n,o,r){var i,a;if(e){if(!r&&e[n])return e[n];if(e!=t){if(i=e[o])return i;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(i=a[o])return i}}}var o=e;this.current=function(){return o},this.next=function(e){return o=n(o,"firstChild","nextSibling",e)},this.prev=function(e){return o=n(o,"lastChild","previousSibling",e)}},function(e){var t=e.each,n=e.is,o=e.isWebKit,r=e.isIE,i=e.html.Entities,a=/^([a-z0-9],?)+$/i,s=/^[ \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,n){var o,r=this;if(r.doc=t,r.win=window,r.files={},r.cssFlicker=!1,r.counter=0,r.stdMode=!e.isIE||t.documentMode>=8,r.boxModel=!e.isIE||"CSS1Compat"==t.compatMode||r.stdMode,r.hasOuterHTML="outerHTML"in t.createElement("a"),r.settings=n=e.extend({keep_values:!1,hex_colors:1},n),r.schema=n.schema,r.styles=new e.html.Styles({url_converter:n.url_converter,url_converter_scope:n.url_converter_scope},n.schema),e.isIE6)try{t.execCommand("BackgroundImageCache",!1,!0)}catch(i){r.cssFlicker=!0}r.fixDoc(t),r.events=n.ownEvents?new e.dom.EventUtils(n.proxy):e.dom.Event,e.addUnload(r.destroy,r),o=n.schema?n.schema.getBlockElements():{},r.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!o[e.nodeName]):!!o[e]}},fixDoc:function(t){var n,o=this.settings;if(r&&!e.isIE11&&o.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(n in o.schema.getCustomElements())t.createElement(n)}},clone:function(n,o){var i,a,s=this;return!r||e.isIE11||1!==n.nodeType||o?n.cloneNode(o):(a=s.doc,o?i.firstChild:(i=a.createElement(n.nodeName),t(s.getAttribs(n),function(e){s.setAttrib(i,e.nodeName,s.getAttrib(n,e.nodeName))}),i))},getRoot:function(){var e=this,t=e.settings;return t&&e.get(t.root_element)||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t,n,o=this;return e=o.get(e),t=o.getPos(e),n=o.getSize(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:function(e){var t,n,o=this;return e=o.get(e),t=o.getStyle(e,"width"),n=o.getStyle(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,t,o,r){var i,a=this,s=a.settings,c=[];for(e=a.get(e),r=void 0===r,s.strict_root&&(o=o||a.getRoot()),n(t,"string")&&(i=t,t="*"===t?function(e){return 1==e.nodeType}:function(e){return a.is(e,i)});e&&e!=o&&e.nodeType&&9!==e.nodeType;){if(!t||t(e)){if(!r)return e;c.push(e)}e=e.parentNode}return r?c: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,n){var o=this;return e.dom.Sizzle(t,o.get(n)||o.get(o.settings.root_element)||o.doc,[])},is:function(t,n){var o;if(void 0===t.length){if("*"===n)return 1==t.nodeType;if(a.test(n)){for(n=n.toLowerCase().split(/,/),t=t.nodeName.toLowerCase(),o=n.length-1;o>=0;o--)if(n[o]==t)return!0;return!1}}return e.dom.Sizzle.matches(n,t.nodeType?[t]:t).length>0},add:function(e,t,o,r,i){var a=this;return this.run(e,function(e){var s;return s=n(t,"string")?a.doc.createElement(t):t,a.setAttribs(s,o),r&&(r.nodeType?s.appendChild(r):a.setHTML(s,r)),i?s:e.appendChild(s)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var o,r="",i=this;r+="<"+e;for(o in t)t.hasOwnProperty(o)&&(r+=" "+o+'="'+i.encode(t[o])+'"');return"undefined"!=typeof n?r+">"+n+"</"+e+">":r+" />"},remove:function(t,n){return this.run(t,function(t){var o,r=t.parentNode;if(!r)return null;if(n)for(;o=t.firstChild;)!e.isIE||3!==o.nodeType||o.nodeValue?r.insertBefore(o,t):t.removeChild(o);return r.removeChild(t)})},setStyle:function(t,n,o){var i=this;return i.run(t,function(a){var s;switch(s=a.style,n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),i.pixelStyles.test(n)&&(e.is(o,"number")||/^[\-0-9\.]+$/.test(o))&&(o+="px"),n){case"opacity":r&&!e.isIE11&&(s.filter=""===o?"":"alpha(opacity="+100*o+")",t.currentStyle&&t.currentStyle.hasLayout||(s.display="inline-block")),s[n]=s["-moz-opacity"]=s["-khtml-opacity"]=o||"";break;case"float":r&&!e.isIE11?s.styleFloat=o:s.cssFloat=o;break;default:s[n]=o||""}i.settings.update_styles&&i.setAttrib(a,"data-mce-style")})},getStyle:function(e,t,n){if(e=this.get(e)){if(this.doc.defaultView&&n){t=t.replace(/[A-Z]/g,function(e){return"-"+e});try{return this.doc.defaultView.getComputedStyle(e,null).getPropertyValue(t)}catch(o){return null}}return t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==t&&(t=r?"styleFloat":"cssFloat"),e.currentStyle&&n?e.currentStyle[t]:e.style?e.style[t]:void 0}},setStyles:function(e,n){var o,r=this,i=r.settings;o=i.update_styles,i.update_styles=0,t(n,function(t,n){r.setStyle(e,n,t)}),i.update_styles=o,i.update_styles&&r.setAttrib(e,i.cssText)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,o,r){var i=this;if(e&&o)return i.settings.strict&&(o=o.toLowerCase()),this.run(e,function(e){var a=i.settings,s=e.getAttribute(o);if(null!==r)switch(o){case"style":if(!n(r,"string"))return void t(r,function(t,n){i.setStyle(e,n,t)});a.keep_values&&(r&&!i._isRes(r)?e.setAttribute("data-mce-style",r,2):e.removeAttribute("data-mce-style",2)),e.style.cssText=r;break;case"class":e.className=r||"";break;case"src":case"href":a.keep_values&&(a.url_converter&&(r=a.url_converter.call(a.url_converter_scope||i,r,o,e)),i.setAttrib(e,"data-mce-"+o,r,2));break;case"shape":e.setAttribute("data-mce-style",r)}if(n(r)&&null!==r&&0!==r.length?e.setAttribute(o,""+r,2):e.removeAttribute(o,2),tinyMCE.activeEditor&&s!=r){var c=tinyMCE.activeEditor;c.onSetAttrib.dispatch(c,e,o,r)}})},setAttribs:function(e,n){var o=this;return this.run(e,function(e){t(n,function(t,n){o.setAttrib(e,n,t)})})},getAttrib:function(t,i,a){var s,c,d=this;if(t=d.get(t),!t||1!==t.nodeType)return a===c?!1:a;if(n(a)||(a=""),/^(src|href|style|coords|shape)$/.test(i)&&(s=t.getAttribute("data-mce-"+i)))return s;
3
- if(r&&d.props[i]&&(s=t[d.props[i]],s=s&&s.nodeValue?s.nodeValue:s),s||(s=t.getAttribute(i,2)),/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(i))return t[d.props[i]]===!0&&""===s?i:s?i:"";if("FORM"===t.nodeName&&t.getAttributeNode(i))return t.getAttributeNode(i).nodeValue;if("style"===i&&(s=s||t.style.cssText,s&&(s=d.serializeStyle(d.parseStyle(s),t.nodeName),d.settings.keep_values&&!d._isRes(s)&&t.setAttribute("data-mce-style",s))),o&&"class"===i&&s&&(s=s.replace(/(apple|webkit)\-[a-z\-]+/gi,"")),r)switch(i){case"rowspan":case"colspan":1===s&&(s="");break;case"size":("+0"===s||20===s||0===s)&&(s="");break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":0===s&&(s="");break;case"hspace":-1===s&&(s="");break;case"maxlength":case"tabindex":(32768===s||2147483647===s||"32768"===s)&&(s="");break;case"multiple":case"compact":case"noshade":case"nowrap":return 65535===s?i:a;case"shape":s=s.toLowerCase();break;default:0===i.indexOf("on")&&s&&(s=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+s))}return s!==c&&null!==s&&""!==s?""+s:a},getPos:function(e,t){var n,o,r=this,i=0,a=0,s=r.doc;if(e=r.get(e),t=t||s.body,e){if(e.getBoundingClientRect)return e=e.getBoundingClientRect(),n=r.boxModel?s.documentElement:s.body,i=e.left+(s.documentElement.scrollLeft||s.body.scrollLeft)-n.clientTop,a=e.top+(s.documentElement.scrollTop||s.body.scrollTop)-n.clientLeft,{x:i,y:a};for(o=e;o&&o!=t&&o.nodeType;)i+=o.offsetLeft||0,a+=o.offsetTop||0,o=o.offsetParent;for(o=e.parentNode;o&&o!=t&&o.nodeType;)i-=o.scrollLeft||0,a-=o.scrollTop||0,o=o.parentNode}return{x:i,y:a}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t,n=this.doc;styleElm=n.getElementById("mceDefaultStyles"),styleElm||(styleElm=n.createElement("style"),styleElm.id="mceDefaultStyles",styleElm.type="text/css",t=n.getElementsByTagName("head")[0],t.firstChild?t.insertBefore(styleElm,t.firstChild):t.appendChild(styleElm)),styleElm.styleSheet?styleElm.styleSheet.cssText+=e:styleElm.appendChild(n.createTextNode(e))},loadCSS:function(n){var o,i=this,a=i.doc;n||(n=""),o=a.getElementsByTagName("head")[0],t(n.split(","),function(t){var n;i.files[t]||(i.files[t]=!0,n=i.create("link",{rel:"stylesheet",href:e._addVer(t)}),r&&!e.isIE11&&a.documentMode&&a.recalc&&(n.onload=function(){a.recalc&&a.recalc(),n.onload=null}),o.appendChild(n))})},addClass:function(e,t){return this.run(e,function(e){var n;return t?this.hasClass(e,t)?e.className:(n=this.removeClass(e,t),e.className=(""!=n?n+" ":"")+t):0})},removeClass:function(t,n){var o,r=this;return r.run(t,function(t){var i;return r.hasClass(t,n)?(o||(o=new RegExp("(^|\\s+)"+n+"(\\s+|$)","g")),i=t.className.replace(o," "),i=e.trim(" "!=i?i:""),t.className=i,i||(t.removeAttribute("class"),t.removeAttribute("className")),i):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(n,o){var i=this;return i.run(n,function(n){if(r){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br />"+o,n.removeChild(n.firstChild)}catch(a){var s=i.create("div");s.innerHTML="<br />"+o,t(e.grep(s.childNodes),function(e,t){t&&n.canHaveHTML&&n.appendChild(e)})}}else n.innerHTML=o;return o})},getOuterHTML:function(e){var t,n=this;return(e=n.get(e))?1===e.nodeType&&n.hasOuterHTML?e.outerHTML:(t=(e.ownerDocument||n.doc).createElement("body"),t.appendChild(e.cloneNode(!0)),t.innerHTML):null},setOuterHTML:function(e,t,n){function o(e,t,n){var o,r;for(r=n.createElement("body"),r.innerHTML=t,o=r.lastChild;o;)i.insertAfter(o.cloneNode(!0),e),o=o.previousSibling;i.remove(e)}var i=this;return this.run(e,function(e){if(e=i.get(e),1==e.nodeType)if(n=n||e.ownerDocument||i.doc,r)try{r&&1==e.nodeType?e.outerHTML=t:o(e,t,n)}catch(a){o(e,t,n)}else o(e,t,n)})},decode:i.decode,encode:i.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,o;return n=t.parentNode,o=t.nextSibling,o?n.insertBefore(e,o):n.appendChild(e),e})},replace:function(o,r,i){var a=this;return n(r,"array")&&(o=o.cloneNode(!0)),a.run(r,function(n){return i&&t(e.grep(n.childNodes),function(e){o.appendChild(e)}),n.parentNode.replaceChild(o,n)})},rename:function(e,n){var o,r=this;return e.nodeName!=n.toUpperCase()&&(o=r.create(n),t(r.getAttribs(e),function(t){r.setAttrib(o,t.nodeName,r.getAttrib(e,t.nodeName))}),r.replace(o,e,1)),o||e},findCommonAncestor:function(e,t){for(var n,o=e;o;){for(n=t;n&&o!=n;)n=n.parentNode;if(o==n)break;o=o.parentNode}return!o&&e.ownerDocument?e.ownerDocument.documentElement:o},toHex:function(e){function t(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}var n=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(e);return n?e="#"+t(n[1])+t(n[2])+t(n[3]):e},getClasses:function(){function n(r){t(r.imports,function(e){n(e)}),t(r.cssRules||r.rules,function(r){switch(r.type||1){case 1:r.selectorText&&t(r.selectorText.split(","),function(t){t=t.replace(/^\s*|\s*$|^\s\./g,""),!/\.mce/.test(t)&&/\.[\w\-]+$/.test(t)&&(o=t,t=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t),(!s||(t=s(t,o)))&&(a[t]||(i.push({"class":t}),a[t]=1)))});break;case 3:try{n(r.styleSheet)}catch(c){}}})}var o,r=this,i=[],a={},s=r.settings.class_filter;if(r.classes)return r.classes;try{t(r.doc.styleSheets,n)}catch(c){}return i.length>0&&(r.classes=i),i},run:function(e,n,o){var r,i=this;return i.doc&&"string"==typeof e&&(e=i.get(e)),e?(o=o||this,e.nodeType||!e.length&&0!==e.length?n.call(o,e):(r=[],t(e,function(e,t){e&&("string"==typeof e&&(e=i.doc.getElementById(e)),r.push(n.call(o,e,t)))}),r)):!1},getAttribs:function(e){var t;return e=this.get(e),e?r?(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,n){var o,r,i,a,c,d=this,l=0;if(t=t.firstChild){a=new e.dom.TreeWalker(t,t.parentNode),n=n||d.schema?d.schema.getNonEmptyElements():null;do{if(i=t.nodeType,1===i){if(t.getAttribute("data-mce-bogus"))continue;if(c=t.nodeName.toLowerCase(),n&&n[c]){if("br"===c){l++;continue}return!1}for(r=d.getAttribs(t),o=t.attributes.length;o--;)if(c=t.attributes[o].nodeName,"name"===c||"data-mce-bookmark"===c)return!1}if(8==i)return!1;if(3===i&&!s.test(t.nodeValue))return!1}while(t=a.next())}return 1>=l},destroy:function(t){var n=this;n.win=n.doc=n.root=n.events=n.frag=null,t||e.removeUnload(n.destroy)},createRng:function(){var t=this.doc;return t.createRange?t.createRange():new e.dom.Range(this)},nodeIndex:function(e,t){var n,o,r,i=0;if(e)for(n=e.nodeType,e=e.previousSibling,o=e;e;e=e.previousSibling)r=e.nodeType,(!t||3!=r||r!=n&&e.nodeValue.length)&&(i++,n=r);return i},split:function(t,n,o){function r(t){function n(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var o,i=t.childNodes,a=t.nodeType;if(1!=a||"bookmark"!=t.getAttribute("data-mce-type")){for(o=i.length-1;o>=0;o--)r(i[o]);if(9!=a){if(3==a&&t.nodeValue.length>0){var s=e.trim(t.nodeValue).length;if(!c.isBlock(t.parentNode)||s>0||0===s&&n(t))return}else if(1==a&&(i=t.childNodes,1==i.length&&i[0]&&1==i[0].nodeType&&"bookmark"==i[0].getAttribute("data-mce-type")&&t.parentNode.insertBefore(i[0],t),i.length||/^(br|hr|input|img)$/i.test(t.nodeName)))return;c.remove(t)}return t}}var i,a,s,c=this,d=c.createRng();return t&&n?(d.setStart(t.parentNode,c.nodeIndex(t)),d.setEnd(n.parentNode,c.nodeIndex(n)),i=d.extractContents(),d=c.createRng(),d.setStart(n.parentNode,c.nodeIndex(n)+1),d.setEnd(t.parentNode,c.nodeIndex(t)+1),a=d.extractContents(),s=t.parentNode,s.insertBefore(r(i),t),o?s.replaceChild(o,n):s.insertBefore(n,t),s.insertBefore(r(a),t),c.remove(t),o||n):void 0},bind:function(e,t,n,o){return this.events.add(e,t,n,o||this)},unbind:function(e,t,n){return this.events.remove(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},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,o){var r=this,i=t;if(e)for(n(i,"string")&&(i=function(e){return r.is(e,t)}),e=e[o];e;e=e[o])if(i(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 n(){return I.createDocumentFragment()}function o(e,t){_(H,e,t)}function r(e,t){_(F,e,t)}function i(e){o(e.parentNode,$(e))}function a(e){o(e.parentNode,$(e)+1)}function s(e){r(e.parentNode,$(e))}function c(e){r(e.parentNode,$(e)+1)}function d(e){e?(L[z]=L[V],L[q]=L[U]):(L[V]=L[z],L[U]=L[q]),L.collapsed=H}function l(e){i(e),c(e)}function u(e){o(e,0),r(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function f(e,t){var n=L[V],o=L[U],r=L[z],i=L[q],a=t.startContainer,s=t.startOffset,c=t.endContainer,d=t.endOffset;return 0===e?x(n,o,a,s):1===e?x(r,i,a,s):2===e?x(r,i,c,d):3===e?x(n,o,c,d):void 0}function p(){E(O)}function m(){return E(D)}function h(){return E(P)}function g(t){var n,o,r=this[V],i=this[U];3!==r.nodeType&&4!==r.nodeType||!r.nodeValue?(r.childNodes.length>0&&(o=r.childNodes[i]),o?r.insertBefore(t,o):r.appendChild(t)):i?i>=r.nodeValue.length?e.insertAfter(t,r):(n=r.splitText(i),r.parentNode.insertBefore(t,n)):r.parentNode.insertBefore(t,r)}function v(e){var t=L.extractContents();L.insertNode(e),e.appendChild(t),L.selectNode(e)}function y(){return K(new t(e),{startContainer:L[V],startOffset:L[U],endContainer:L[z],endOffset:L[q],collapsed:L.collapsed,commonAncestorContainer:L.commonAncestorContainer})}function b(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function C(){return L[V]==L[z]&&L[U]==L[q]}function x(t,n,o,r){var i,a,s,c,d,l;if(t==o)return n==r?0:r>n?-1:1;for(i=o;i&&i.parentNode!=t;)i=i.parentNode;if(i){for(a=0,s=t.firstChild;s!=i&&n>a;)a++,s=s.nextSibling;return a>=n?-1:1}for(i=t;i&&i.parentNode!=o;)i=i.parentNode;if(i){for(a=0,s=o.firstChild;s!=i&&r>a;)a++,s=s.nextSibling;return r>a?-1:1}for(c=e.findCommonAncestor(t,o),d=t;d&&d.parentNode!=c;)d=d.parentNode;for(d||(d=c),l=o;l&&l.parentNode!=c;)l=l.parentNode;if(l||(l=c),d==l)return 0;for(s=c.firstChild;s;){if(s==d)return-1;if(s==l)return 1;s=s.nextSibling}}function _(t,n,o){var r,i;for(t?(L[V]=n,L[U]=o):(L[z]=n,L[q]=o),r=L[z];r.parentNode;)r=r.parentNode;for(i=L[V];i.parentNode;)i=i.parentNode;i==r?x(L[V],L[U],L[z],L[q])>0&&L.collapse(t):L.collapse(t),L.collapsed=C(),L.commonAncestorContainer=e.findCommonAncestor(L[V],L[z])}function E(e){var t,n,o,r,i,a,s,c=0,d=0;if(L[V]==L[z])return S(e);for(t=L[z],n=t.parentNode;n;t=n,n=n.parentNode){if(n==L[V])return k(t,e);++c}for(t=L[V],n=t.parentNode;n;t=n,n=n.parentNode){if(n==L[z])return w(t,e);++d}for(o=d-c,r=L[V];o>0;)r=r.parentNode,o--;for(i=L[z];0>o;)i=i.parentNode,o++;for(a=r.parentNode,s=i.parentNode;a!=s;a=a.parentNode,s=s.parentNode)r=a,i=s;return N(r,i,e)}function S(e){var t,o,r,i,a,s,c,d,l;if(e!=O&&(t=n()),L[U]==L[q])return t;if(3==L[V].nodeType){if(o=L[V].nodeValue,r=o.substring(L[U],L[q]),e!=P&&(i=L[V],d=L[U],l=L[q]-L[U],0===d&&l>=i.nodeValue.length-1?i.parentNode.removeChild(i):i.deleteData(d,l),L.collapse(H)),e==O)return;return r.length>0&&t.appendChild(I.createTextNode(r)),t}for(i=b(L[V],L[U]),a=L[q]-L[U];i&&a>0;)s=i.nextSibling,c=M(i,e),t&&t.appendChild(c),--a,i=s;return e!=P&&L.collapse(H),t}function k(e,t){var o,r,i,a,s,c;if(t!=O&&(o=n()),r=T(e,t),o&&o.appendChild(r),i=$(e),a=i-L[U],0>=a)return t!=P&&(L.setEndBefore(e),L.collapse(F)),o;for(r=e.previousSibling;a>0;)s=r.previousSibling,c=M(r,t),o&&o.insertBefore(c,o.firstChild),--a,r=s;return t!=P&&(L.setEndBefore(e),L.collapse(F)),o}function w(e,t){var o,r,i,a,s,c;for(t!=O&&(o=n()),i=A(e,t),o&&o.appendChild(i),r=$(e),++r,a=L[q]-r,i=e.nextSibling;i&&a>0;)s=i.nextSibling,c=M(i,t),o&&o.appendChild(c),--a,i=s;return t!=P&&(L.setStartAfter(e),L.collapse(H)),o}function N(e,t,o){var r,i,a,s,c,d,l,u;for(o!=O&&(i=n()),r=A(e,o),i&&i.appendChild(r),a=e.parentNode,s=$(e),c=$(t),++s,d=c-s,l=e.nextSibling;d>0;)u=l.nextSibling,r=M(l,o),i&&i.appendChild(r),l=u,--d;return r=T(t,o),i&&i.appendChild(r),o!=P&&(L.setStartAfter(e),L.collapse(H)),i}function T(e,t){var n,o,r,i,a,s=b(L[z],L[q]-1),c=s!=L[z];if(s==e)return B(s,c,F,t);for(n=s.parentNode,o=B(n,F,F,t);n;){for(;s;)r=s.previousSibling,i=B(s,c,F,t),t!=O&&o.insertBefore(i,o.firstChild),c=H,s=r;if(n==e)return o;s=n.previousSibling,n=n.parentNode,a=B(n,F,F,t),t!=O&&a.appendChild(o),o=a}}function A(e,t){var n,o,r,i,a,s=b(L[V],L[U]),c=s!=L[V];if(s==e)return B(s,c,H,t);for(n=s.parentNode,o=B(n,F,H,t);n;){for(;s;)r=s.nextSibling,i=B(s,c,H,t),t!=O&&o.appendChild(i),c=H,s=r;if(n==e)return o;s=n.nextSibling,n=n.parentNode,a=B(n,F,H,t),t!=O&&a.appendChild(o),o=a}}function B(t,n,o,r){var i,a,s,c,d;if(n)return M(t,r);if(3==t.nodeType){if(i=t.nodeValue,o?(c=L[U],a=i.substring(c),s=i.substring(0,c)):(c=L[q],a=i.substring(0,c),s=i.substring(c)),r!=P&&(t.nodeValue=s),r==O)return;return d=e.clone(t,F),d.nodeValue=a,d}if(r!=O)return e.clone(t,F)}function M(t,n){return n!=O?n==P?e.clone(t,H):t:void t.parentNode.removeChild(t)}function R(){return e.create("body",null,h()).outerText}var L=this,I=e.doc,D=0,P=1,O=2,H=!0,F=!1,U="startOffset",V="startContainer",z="endContainer",q="endOffset",K=tinymce.extend,$=e.nodeIndex;return K(L,{startContainer:I,startOffset:0,endContainer:I,endOffset:0,collapsed:H,commonAncestorContainer:I,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:o,setEnd:r,setStartBefore:i,setStartAfter:a,setEndBefore:s,setEndAfter:c,collapse:d,selectNode:l,selectNodeContents:u,compareBoundaryPoints:f,deleteContents:p,extractContents:m,cloneContents:h,insertNode:g,surroundContents:v,cloneRange:y,toStringIE:R}),L}e.Range=t,t.prototype.toString=function(){return this.toStringIE()}}(tinymce.dom),function(){function e(e){function t(t,n){var o,r,i,a,s,c,d,l,u=0,f=-1;if(o=t.duplicate(),o.collapse(n),l=o.parentElement(),l.ownerDocument===e.dom.doc){for(;"false"===l.contentEditable;)l=l.parentNode;if(!l.hasChildNodes())return{node:l,inside:1};for(a=l.children,r=a.length-1;r>=u;)if(d=Math.floor((u+r)/2),s=a[d],o.moveToElementText(s),f=o.compareEndPoints(n?"StartToStart":"EndToEnd",t),f>0)r=d-1;else{if(!(0>f))return{node:s};u=d+1}if(0>f)for(s?o.collapse(!1):(o.moveToElementText(l),o.collapse(!0),s=l,i=!0),c=0;0!==o.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==o.move("character",1)&&l==o.parentElement();)c++;else for(o.collapse(!0),c=0;0!==o.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==o.move("character",-1)&&l==o.parentElement();)c++;return{node:s,position:f,offset:c,inside:i}}}function n(){function n(e){var n,o,r,i,a,s=t(l,e),c=0;if(n=s.node,o=s.offset,s.inside&&!n.hasChildNodes())return void u[e?"setStart":"setEnd"](n,0);if(o===i)return void u[e?"setStartBefore":"setEndAfter"](n);if(s.position<0){if(r=s.inside?n.firstChild:n.nextSibling,!r)return void u[e?"setStartAfter":"setEndAfter"](n);if(!o)return void(3==r.nodeType?u[e?"setStart":"setEnd"](r,0):u[e?"setStartBefore":"setEndBefore"](r));for(;r;){if(a=r.nodeValue,c+=a.length,c>=o){n=r,c-=o,c=a.length-c;break}r=r.nextSibling}}else{if(r=n.previousSibling,!r)return u[e?"setStartBefore":"setEndBefore"](n);if(!o)return void(3==n.nodeType?u[e?"setStart":"setEnd"](r,n.nodeValue.length):u[e?"setStartAfter":"setEndAfter"](r));for(;r;){if(c+=r.nodeValue.length,c>=o){n=r,c-=o;break}r=r.previousSibling}}u[e?"setStart":"setEnd"](n,c)}var i,a,s,c,d,l=e.getRng(),u=r.createRng();if(i=l.item?l.item(0):l.parentElement(),i.ownerDocument!=r.doc)return u;if(a=e.isCollapsed(),l.item)return u.setStart(i.parentNode,r.nodeIndex(i)),u.setEnd(u.startContainer,u.startOffset+1),u;try{n(!0),a||n()}catch(f){if(-2147024809!=f.number)throw f;d=o.getBookmark(2),s=l.duplicate(),s.collapse(!0),i=s.parentElement(),a||(s=l.duplicate(),s.collapse(!1),c=s.parentElement(),c.innerHTML=c.innerHTML),i.innerHTML=i.innerHTML,o.moveToBookmark(d),l=e.getRng(),n(!0),a||n()}return u}var o=this,r=e.dom,i=!1;this.getBookmark=function(n){function o(e){var t,n,o,i,a=[];for(t=e.parentNode,n=r.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(o=t.children,i=o.length;i--;)if(e===o[i]){a.push(i);break}e=t,t=t.parentNode}return a}function i(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:o(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:o(a.item(0))}:(s.start=i(!0),e.isCollapsed()||(s.end=i()))),s},this.moveToBookmark=function(e){function t(e){var t,n,o,i;for(t=r.getRoot(),n=e.length-1;n>=0;n--)i=t.children,o=e[n],o<=i.length-1&&(t=i[o]);return t}function n(n){var r,a,s,c=e[n?"start":"end"];c&&(r=c.position>0,a=i.createTextRange(),a.moveToElementText(t(c.indexes)),offset=c.offset,offset!==s?(a.collapse(c.inside||r),a.moveStart("character",r?-offset:offset)):a.collapse(n),o.setEndPoint(n?"StartToStart":"EndToStart",a),n&&o.collapse(!0))}var o,i=r.doc.body;e.start&&(e.start.ctrl?(o=i.createControlRange(),o.addElement(t(e.start.indexes)),o.select()):(o=i.createTextRange(),n(!0),n(),o.select()))},this.addRange=function(t){function n(e){var t,n,a,u,f;a=r.create("a"),t=e?s:d,n=e?c:l,u=o.duplicate(),(t==m||t==m.documentElement)&&(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),u.moveToElementText(a),u.moveStart("character",n),r.remove(a),o.setEndPoint(e?"StartToStart":"EndToEnd",u)):(f=t.childNodes,f.length?(n>=f.length?r.insertAfter(a,f[f.length-1]):t.insertBefore(a,f[n]),u.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="<span>\ufeff</span>",a=t.firstChild,u.moveToElementText(a),u.collapse(i)),o.setEndPoint(e?"StartToStart":"EndToEnd",u),r.remove(a))}var o,a,s,c,d,l,u,f,p,m=e.dom.doc,h=m.body;if(s=t.startContainer,c=t.startOffset,d=t.endContainer,l=t.endOffset,o=h.createTextRange(),s==d&&1==s.nodeType){if(c==l&&!s.hasChildNodes()){if(s.canHaveHTML)return u=s.previousSibling,u&&!u.hasChildNodes()&&r.isBlock(u)?u.innerHTML="\ufeff":u=null,s.innerHTML="<span>\ufeff</span><span>\ufeff</span>",o.moveToElementText(s.lastChild),o.select(),r.doc.selection.clear(),s.innerHTML="",void(u&&(u.innerHTML=""));c=r.nodeIndex(s),s=s.parentNode}if(c==l-1)try{if(p=s.childNodes[c],a=h.createControlRange(),a.addElement(p),a.select(),f=e.getRng(),f.item&&p===f.item(0))return}catch(g){}}n(!0),n(),o.select()},this.getRangeAt=n}tinymce.dom.TridentSelection=e}(),/*
4
- * Sizzle CSS Selector Engine
5
- * Copyright, The Dojo Foundation
6
- * Released under the MIT, BSD, and GPL Licenses.
7
- * More information: http://sizzlejs.com/
8
- */
9
- function(){function e(e,t,n,r,i,a){for(var s=0,c=r.length;c>s;s++){var d=r[s];if(d){var l=!1;for(d=d[e];d;){if(d[o]===n){l=r[d.sizset];break}if(1!==d.nodeType||a||(d[o]=n,d.sizset=s),d.nodeName.toLowerCase()===t){l=d;break}d=d[e]}r[s]=l}}}function t(e,t,n,r,i,a){for(var s=0,c=r.length;c>s;s++){var d=r[s];if(d){var l=!1;for(d=d[e];d;){if(d[o]===n){l=r[d.sizset];break}if(1===d.nodeType)if(a||(d[o]=n,d.sizset=s),"string"!=typeof t){if(d===t){l=!0;break}}else if(u.filter(t,[d]).length>0){l=d;break}d=d[e]}r[s]=l}}}var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,o="sizcache",r=0,i=Object.prototype.toString,a=!1,s=!0,c=/\\/g,d=/\r\n/g,l=/\W/;[0,0].sort(function(){return s=!1,0});var u=function(e,t,o,r){o=o||[],t=t||document;var a=t;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return o;var s,c,d,l,f,h,g,y,b=!0,C=u.isXML(t),_=[],E=e;do if(n.exec(""),s=n.exec(E),s&&(E=s[3],_.push(s[1]),s[2])){l=s[3];break}while(s);if(_.length>1&&m.exec(e))if(2===_.length&&p.relative[_[0]])c=x(_[0]+_[1],t,r);else for(c=p.relative[_[0]]?[t]:u(_.shift(),t);_.length;)e=_.shift(),p.relative[e]&&(e+=_.shift()),c=x(e,c,r);else if(!r&&_.length>1&&9===t.nodeType&&!C&&p.match.ID.test(_[0])&&!p.match.ID.test(_[_.length-1])&&(f=u.find(_.shift(),t,C),t=f.expr?u.filter(f.expr,f.set)[0]:f.set[0]),t)for(f=r?{expr:_.pop(),set:v(r)}:u.find(_.pop(),1!==_.length||"~"!==_[0]&&"+"!==_[0]||!t.parentNode?t:t.parentNode,C),c=f.expr?u.filter(f.expr,f.set):f.set,_.length>0?d=v(c):b=!1;_.length;)h=_.pop(),g=h,p.relative[h]?g=_.pop():h="",null==g&&(g=t),p.relative[h](d,g,C);else d=_=[];if(d||(d=c),d||u.error(h||e),"[object Array]"===i.call(d))if(b)if(t&&1===t.nodeType)for(y=0;null!=d[y];y++)d[y]&&(d[y]===!0||1===d[y].nodeType&&u.contains(t,d[y]))&&o.push(c[y]);else for(y=0;null!=d[y];y++)d[y]&&1===d[y].nodeType&&o.push(c[y]);else o.push.apply(o,d);else v(d,o);return l&&(u(l,a,o,r),u.uniqueSort(o)),o};u.uniqueSort=function(e){if(b&&(a=s,e.sort(b),a))for(var t=1;t<e.length;t++)e[t]===e[t-1]&&e.splice(t--,1);return e},u.matches=function(e,t){return u(e,null,null,t)},u.matchesSelector=function(e,t){return u(t,null,null,[e]).length>0},u.find=function(e,t,n){var o,r,i,a,s,d;if(!e)return[];for(r=0,i=p.order.length;i>r;r++)if(s=p.order[r],(a=p.leftMatch[s].exec(e))&&(d=a[1],a.splice(1,1),"\\"!==d.substr(d.length-1)&&(a[1]=(a[1]||"").replace(c,""),o=p.find[s](a,t,n),null!=o))){e=e.replace(p.match[s],"");break}return o||(o="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName("*"):[]),{set:o,expr:e}},u.filter=function(e,t,n,o){for(var r,i,a,s,c,d,l,f,m,h=e,g=[],v=t,y=t&&t[0]&&u.isXML(t[0]);e&&t.length;){for(a in p.filter)if(null!=(r=p.leftMatch[a].exec(e))&&r[2]){if(d=p.filter[a],l=r[1],i=!1,r.splice(1,1),"\\"===l.substr(l.length-1))continue;if(v===g&&(g=[]),p.preFilter[a])if(r=p.preFilter[a](r,v,n,g,o,y)){if(r===!0)continue}else i=s=!0;if(r)for(f=0;null!=(c=v[f]);f++)c&&(s=d(c,r,f,v),m=o^s,n&&null!=s?m?i=!0:v[f]=!1:m&&(g.push(c),i=!0));if(void 0!==s){if(n||(v=g),e=e.replace(p.match[a],""),!i)return[];break}}if(e===h){if(null!=i)break;u.error(e)}h=e}return v},u.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var f=u.getText=function(e){var t,n,o=e.nodeType,r="";if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;if("string"==typeof e.innerText)return e.innerText.replace(d,"");for(e=e.firstChild;e;e=e.nextSibling)r+=f(e)}else if(3===o||4===o)return e.nodeValue}else for(t=0;n=e[t];t++)8!==n.nodeType&&(r+=f(n));return r},p=u.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 n="string"==typeof t,o=n&&!l.test(t),r=n&&!o;o&&(t=t.toLowerCase());for(var i,a=0,s=e.length;s>a;a++)if(i=e[a]){for(;(i=i.previousSibling)&&1!==i.nodeType;);e[a]=r||i&&i.nodeName.toLowerCase()===t?i||!1:i===t}r&&u.filter(t,e,!0)},">":function(e,t){var n,o="string"==typeof t,r=0,i=e.length;if(o&&!l.test(t)){for(t=t.toLowerCase();i>r;r++)if(n=e[r]){var a=n.parentNode;e[r]=a.nodeName.toLowerCase()===t?a:!1}}else{for(;i>r;r++)n=e[r],n&&(e[r]=o?n.parentNode:n.parentNode===t);o&&u.filter(t,e,!0)}},"":function(n,o,i){var a,s=r++,c=t;"string"!=typeof o||l.test(o)||(o=o.toLowerCase(),a=o,c=e),c("parentNode",o,s,n,a,i)},"~":function(n,o,i){var a,s=r++,c=t;"string"!=typeof o||l.test(o)||(o=o.toLowerCase(),a=o,c=e),c("previousSibling",o,s,n,a,i)}},find:{ID:function(e,t,n){if("undefined"!=typeof t.getElementById&&!n){var o=t.getElementById(e[1]);return o&&o.parentNode?[o]:[]}},NAME:function(e,t){if("undefined"!=typeof t.getElementsByName){for(var n=[],o=t.getElementsByName(e[1]),r=0,i=o.length;i>r;r++)o[r].getAttribute("name")===e[1]&&n.push(o[r]);return 0===n.length?null:n}},TAG:function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e[1]):void 0}},preFilter:{CLASS:function(e,t,n,o,r,i){if(e=" "+e[1].replace(c,"")+" ",i)return e;for(var a,s=0;null!=(a=t[s]);s++)a&&(r^(a.className&&(" "+a.className+" ").replace(/[\t\n\r]/g," ").indexOf(e)>=0)?n||o.push(a):n&&(t[s]=!1));return!1},ID:function(e){return e[1].replace(c,"")},TAG:function(e){return e[1].replace(c,"").toLowerCase()},CHILD:function(e){if("nth"===e[1]){e[2]||u.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]&&u.error(e[0]);return e[0]=r++,e},ATTR:function(e,t,n,o,r,i){var a=e[1]=e[1].replace(c,"");return!i&&p.attrMap[a]&&(e[1]=p.attrMap[a]),e[4]=(e[4]||e[5]||"").replace(c,""),"~="===e[2]&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(e,t,o,r,i){if("not"===e[1]){if(!((n.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var a=u.filter(e[3],t,o,!0^i);return o||r.push.apply(r,a),!1}e[3]=u(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,n){return!!u(n[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var t=e.getAttribute("type"),n=e.type;return"input"===e.nodeName.toLowerCase()&&"text"===n&&(t===n||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,n,o){return t===o.length-1},even:function(e,t){return t%2===0},odd:function(e,t){return t%2===1},lt:function(e,t,n){return t<n[3]-0},gt:function(e,t,n){return t>n[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,o){var r=t[1],i=p.filters[r];if(i)return i(e,n,t,o);if("contains"===r)return(e.textContent||e.innerText||f([e])||"").indexOf(t[3])>=0;if("not"===r){for(var a=t[3],s=0,c=a.length;c>s;s++)if(a[s]===e)return!1;return!0}u.error(r)},CHILD:function(e,t){var n,r,i,a,s,c,d=t[1],l=e;switch(d){case"only":case"first":for(;l=l.previousSibling;)if(1===l.nodeType)return!1;if("first"===d)return!0;l=e;case"last":for(;l=l.nextSibling;)if(1===l.nodeType)return!1;return!0;case"nth":if(n=t[2],r=t[3],1===n&&0===r)return!0;if(i=t[0],a=e.parentNode,a&&(a[o]!==i||!e.nodeIndex)){for(s=0,l=a.firstChild;l;l=l.nextSibling)1===l.nodeType&&(l.nodeIndex=++s);a[o]=i}return c=e.nodeIndex-r,0===n?0===c:c%n===0&&c/n>=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 n=t[1],o=u.attr?u.attr(e,n):p.attrHandle[n]?p.attrHandle[n](e):null!=e[n]?e[n]:e.getAttribute(n),r=o+"",i=t[2],a=t[4];return null==o?"!="===i:!i&&u.attr?null!=o:"="===i?r===a:"*="===i?r.indexOf(a)>=0:"~="===i?(" "+r+" ").indexOf(a)>=0:a?"!="===i?r!==a:"^="===i?0===r.indexOf(a):"$="===i?r.substr(r.length-a.length)===a:"|="===i?r===a||r.substr(0,a.length+1)===a+"-":!1:r&&o!==!1},POS:function(e,t,n,o){var r=t[2],i=p.setFilters[r];return i?i(e,n,t,o):void 0}}},m=p.match.POS,h=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,h));p.match.globalPOS=m;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(y){v=function(e,t){var n=0,o=t||[];if("[object Array]"===i.call(e))Array.prototype.push.apply(o,e);else if("number"==typeof e.length)for(var r=e.length;r>n;n++)o.push(e[n]);else for(;e[n];n++)o.push(e[n]);return o}}var b,C;document.documentElement.compareDocumentPosition?b=function(e,t){return e===t?(a=!0,0):e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t)?-1:1:e.compareDocumentPosition?-1:1}:(b=function(e,t){if(e===t)return a=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,o,r=[],i=[],s=e.parentNode,c=t.parentNode,d=s;if(s===c)return C(e,t);if(!s)return-1;if(!c)return 1;for(;d;)r.unshift(d),d=d.parentNode;for(d=c;d;)i.unshift(d),d=d.parentNode;n=r.length,o=i.length;for(var l=0;n>l&&o>l;l++)if(r[l]!==i[l])return C(r[l],i[l]);return l===n?C(e,i[l],-1):C(r[l],t,1)},C=function(e,t,n){if(e===t)return n;for(var o=e.nextSibling;o;){if(o===t)return-1;o=o.nextSibling}return 1}),function(){var e=document.createElement("div"),t="script"+(new Date).getTime(),n=document.documentElement;e.innerHTML="<a name='"+t+"'/>",n.insertBefore(e,n.firstChild),document.getElementById(t)&&(p.find.ID=function(e,t,n){if("undefined"!=typeof t.getElementById&&!n){var o=t.getElementById(e[1]);return o?o.id===e[1]||"undefined"!=typeof o.getAttributeNode&&o.getAttributeNode("id").nodeValue===e[1]?[o]:void 0:[]}},p.filter.ID=function(e,t){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),n.removeChild(e),n=e=null}(),function(){var e=document.createElement("div");e.appendChild(document.createComment("")),e.getElementsByTagName("*").length>0&&(p.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);if("*"===e[1]){for(var o=[],r=0;n[r];r++)1===n[r].nodeType&&o.push(n[r]);n=o}return n}),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=u,t=document.createElement("div"),n="__sizzle__";if(t.innerHTML="<p class='TEST'></p>",!t.querySelectorAll||0!==t.querySelectorAll(".TEST").length){u=function(t,o,r,i){if(o=o||document,!i&&!u.isXML(o)){var a=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(a&&(1===o.nodeType||9===o.nodeType)){if(a[1])return v(o.getElementsByTagName(t),r);if(a[2]&&p.find.CLASS&&o.getElementsByClassName)return v(o.getElementsByClassName(a[2]),r)}if(9===o.nodeType){if("body"===t&&o.body)return v([o.body],r);if(a&&a[3]){var s=o.getElementById(a[3]);if(!s||!s.parentNode)return v([],r);if(s.id===a[3])return v([s],r)}try{return v(o.querySelectorAll(t),r)}catch(c){}}else if(1===o.nodeType&&"object"!==o.nodeName.toLowerCase()){var d=o,l=o.getAttribute("id"),f=l||n,m=o.parentNode,h=/^\s*[+~]/.test(t);l?f=f.replace(/'/g,"\\$&"):o.setAttribute("id",f),h&&m&&(o=o.parentNode);try{if(!h||m)return v(o.querySelectorAll("[id='"+f+"'] "+t),r)}catch(g){}finally{l||d.removeAttribute("id")}}}return e(t,o,r,i)};for(var o in e)u[o]=e[o];t=null}}(),function(){var e=document.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var n=!t.call(document.createElement("div"),"div"),o=!1;try{t.call(document.documentElement,"[test!='']:sizzle")}catch(r){o=!0}u.matchesSelector=function(e,r){if(r=r.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!u.isXML(e))try{if(o||!p.match.PSEUDO.test(r)&&!/!=/.test(r)){var i=t.call(e,r);if(i||!n||e.document&&11!==e.document.nodeType)return i}}catch(a){}return u(r,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,n){return"undefined"==typeof t.getElementsByClassName||n?void 0:t.getElementsByClassName(e[1])},e=null))}(),u.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},u.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return t?"HTML"!==t.nodeName:!1};var x=function(e,t,n){for(var o,r=[],i="",a=t.nodeType?[t]:t;o=p.match.PSEUDO.exec(e);)i+=o[0],e=e.replace(p.match.PSEUDO,"");e=p.relative[e]?e+"*":e;for(var s=0,c=a.length;c>s;s++)u(e,a[s],r,n);return u.filter(i,r)};window.tinymce.dom.Sizzle=u}(),function(e){e.dom.Element=function(t,n){var o,r,i=this;i.settings=n=n||{},i.id=t,i.dom=o=n.dom||e.DOM,e.isIE||(r=o.get(i.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){i[e]=function(){var n,r=[t];for(n=0;n<arguments.length;n++)r.push(arguments[n]);return r=o[e].apply(o,r),i.update(e),r}}),e.extend(i,{on:function(t,n,o){return e.dom.Event.add(i.id,t,n,o)},getXY:function(){return{x:parseInt(i.getStyle("left")),y:parseInt(i.getStyle("top"))}},getSize:function(){var e=o.get(i.id);return{w:parseInt(i.getStyle("width")||e.clientWidth),h:parseInt(i.getStyle("height")||e.clientHeight)}},moveTo:function(e,t){i.setStyles({left:e,top:t})},moveBy:function(e,t){var n=i.getXY();i.moveTo(n.x+e,n.y+t)},resizeTo:function(e,t){i.setStyles({width:e,height:t})},resizeBy:function(e,t){var n=i.getSize();i.resizeTo(n.w+e,n.h+t)},update:function(t){var r;if(e.isIE6&&n.blocker){if(t=t||"",0===t.indexOf("get")||0===t.indexOf("has")||0===t.indexOf("is"))return;if("remove"==t)return void o.remove(i.blocker);i.blocker?r=o.get(i.blocker):(i.blocker=o.uniqueId(),r=o.add(n.container||o.getRoot(),"iframe",{id:i.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'}),o.setStyle(r,"opacity",0)),o.setStyles(r,{left:i.getStyle("left",1),top:i.getStyle("top",1),width:i.getStyle("width",1),height:i.getStyle("height",1),display:i.getStyle("display",1),zIndex:parseInt(i.getStyle("zIndex",1)||0)-1})}}})}}(tinymce),function(e){var t=e.is,n=e.isIE,o=e.each,r=e.dom.TreeWalker;e.create("tinymce.dom.Selection",{Selection:function(t,n,r,i){var a=this;a.dom=t,a.win=n,a.serializer=r,a.editor=i,o(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(t){a[t]=new e.util.Dispatcher(a)}),a.win.getSelection||(a.tridentSel=new e.dom.TridentSelection(a)),e.isIE&&!e.isIE11&&t.boxModel&&this._fixIESelection(),e.addUnload(a.destroy,a)},setCursorLocation:function(e,t){var n=this,o=n.dom.createRng();o.setStart(e,t),o.setEnd(e,t),n.setRng(o),n.collapse(!1)},getContent:function(e){var n,o,r,i=this,a=i.getRng(),s=i.dom.create("body"),c=i.getSel();return e=e||{},n=o="",e.get=!0,e.format=e.format||"html",e.forced_root_block="",i.onBeforeGetContent.dispatch(i,e),"text"==e.format?i.isCollapsed()?"":a.text||(c.toString?c.toString():""):(a.cloneContents?(r=a.cloneContents(),r&&s.appendChild(r)):t(a.item)||t(a.htmlText)?(s.innerHTML="<br>"+(a.item?a.item(0).outerHTML:a.htmlText),s.removeChild(s.firstChild)):s.innerHTML=a.toString(),/^\s/.test(s.innerHTML)&&(n=" "),/\s+$/.test(s.innerHTML)&&(o=" "),e.getInner=!0,e.content=i.isCollapsed()?"":n+i.serializer.serialize(s,e)+o,i.onGetContent.dispatch(i,e),e.content)},setContent:function(e,t){var n,o,r,i=this,a=i.getRng(),s=i.win.document;if(t=t||{format:"html"},t.set=!0,e=t.content=e,t.no_events||i.onBeforeSetContent.dispatch(i,t),e=t.content,a.insertNode){e+='<span id="__caret">_</span>',a.startContainer==s&&a.endContainer==s?s.body.innerHTML=e:(a.deleteContents(),0===s.body.childNodes.length?s.body.innerHTML=e:a.createContextualFragment?a.insertNode(a.createContextualFragment(e)):(o=s.createDocumentFragment(),r=s.createElement("div"),o.appendChild(r),r.outerHTML=e,a.insertNode(o))),n=i.dom.get("__caret"),a=s.createRange(),a.setStartBefore(n),a.setEndBefore(n),i.setRng(a),i.dom.remove("__caret");try{i.setRng(a)}catch(c){}}else a.item&&(s.execCommand("Delete",!1,null),a=i.getRng()),/^\s+/.test(e)?(a.pasteHTML('<span id="__mce_tmp">_</span>'+e),i.dom.remove("__mce_tmp")):a.pasteHTML(e);t.no_events||i.onSetContent.dispatch(i,t)},getStart:function(){var e,t,n,o,r=this,i=r.getRng();if(i.duplicate||i.item){if(i.item)return i.item(0);for(n=i.duplicate(),n.collapse(1),e=n.parentElement(),e.ownerDocument!==r.dom.doc&&(e=r.dom.getRoot()),t=o=i.parentElement();o=o.parentNode;)if(o==e){e=t;break}return e}return e=i.startContainer,1==e.nodeType&&e.hasChildNodes()&&(e=e.childNodes[Math.min(e.childNodes.length-1,i.startOffset)]),e&&3==e.nodeType?e.parentNode:e},getEnd:function(){var e,t,n=this,o=n.getRng();return o.duplicate||o.item?o.item?o.item(0):(o=o.duplicate(),o.collapse(0),e=o.parentElement(),e.ownerDocument!==n.dom.doc&&(e=n.dom.getRoot()),e&&"BODY"==e.nodeName?e.lastChild||e:e):(e=o.endContainer,t=o.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 n(e,t){var n=0;return o(m.select(e),function(e,o){e==t&&(n=o)}),n}function r(e){function t(t){var n,o,r,i=t?"start":"end";n=e[i+"Container"],o=e[i+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(r=n.childNodes,n=r[Math.min(t?o:o-1,r.length-1)],n&&(o=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,o)))}return t(!0),t(),e}function i(){function e(e,n){var r,i,a=e[n?"startContainer":"endContainer"],s=e[n?"startOffset":"endOffset"],c=[],d=0;if(3==a.nodeType){if(t)for(r=a.previousSibling;r&&3==r.nodeType;r=r.previousSibling)s+=r.nodeValue.length;c.push(s)}else i=a.childNodes,s>=i.length&&i.length&&(d=1,s=Math.max(0,i.length-1)),c.push(p.dom.nodeIndex(i[s],t)+d);for(;a&&a!=o;a=a.parentNode)c.push(p.dom.nodeIndex(a,t));return c}var n=p.getRng(!0),o=m.getRoot(),r={};return r.start=e(n,!0),p.isCollapsed()||(r.end=e(n)),r}var a,s,c,d,l,u,f,p=this,m=p.dom,h="\ufeff";if(2==e)return p.tridentSel?p.tridentSel.getBookmark(e):i();if(e)return a=p.getRng(),a.setStart&&(a={startContainer:a.startContainer,startOffset:a.startOffset,endContainer:a.endContainer,endOffset:a.endOffset}),{rng:a};if(a=p.getRng(),c=m.uniqueId(),d=tinyMCE.activeEditor.selection.isCollapsed(),f="overflow:hidden;line-height:0px",a.duplicate||a.item){if(a.item)return u=a.item(0),l=u.nodeName,{name:l,index:n(l,u)};s=a.duplicate();try{a.collapse(),a.pasteHTML('<span data-mce-type="bookmark" id="'+c+'_start" style="'+f+'">'+h+"</span>"),d||(s.collapse(!1),a.moveToElementText(s.parentElement()),0===a.compareEndPoints("StartToEnd",s)&&s.move("character",-1),s.pasteHTML('<span data-mce-type="bookmark" id="'+c+'_end" style="'+f+'">'+h+"</span>"))}catch(g){return null}}else{if(u=p.getNode(),l=u.nodeName,"IMG"==l)return{name:l,index:n(l,u)};s=r(a.cloneRange()),d||(s.collapse(!1),s.insertNode(m.create("span",{"data-mce-type":"bookmark",id:c+"_end",style:f},h))),a=r(a),a.collapse(!0),a.insertNode(m.create("span",{"data-mce-type":"bookmark",id:c+"_start",style:f},h))}return p.moveToBookmark({id:c,keep:1}),{id:c}},moveToBookmark:function(t){function r(e){var n,o,r,i,a=t[e?"start":"end"];if(a){for(r=a[0],o=d,n=a.length-1;n>=1;n--){if(i=o.childNodes,a[n]>i.length-1)return;o=i[a[n]]}3===o.nodeType&&(r=Math.min(a[0],o.nodeValue.length)),1===o.nodeType&&(r=Math.min(a[0],o.childNodes.length)),e?s.setStart(o,r):s.setEnd(o,r)}return!0}function i(n){var r,i,a,s,c=h.get(t.id+"_"+n),d=t.keep;if(c&&(r=c.parentNode,"start"==n?(d?(r=c.firstChild,i=1):i=h.nodeIndex(c),l=u=r,f=p=i):(d?(r=c.firstChild,i=1):i=h.nodeIndex(c),u=r,p=i),!d)){for(s=c.previousSibling,a=c.nextSibling,o(e.grep(c.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});c=h.get(t.id+"_"+n);)h.remove(c,1);s&&a&&s.nodeType==a.nodeType&&3==s.nodeType&&!e.isOpera&&(i=s.nodeValue.length,s.appendData(a.nodeValue),h.remove(a),"start"==n?(l=u=s,f=p=i):(u=s,p=i))}}function a(e){return!h.isBlock(e)||e.innerHTML||n||(e.innerHTML='<br data-mce-bogus="1" />'),e}var s,c,d,l,u,f,p,m=this,h=m.dom;if(t)if(t.start){if(s=h.createRng(),d=h.getRoot(),m.tridentSel)return m.tridentSel.moveToBookmark(t);r(!0)&&r()&&m.setRng(s)}else if(t.id)i("start"),i("end"),l&&(s=h.createRng(),s.setStart(a(l),f),s.setEnd(a(u),p),m.setRng(s));else if(t.name)m.select(h.select(t.name)[t.index]);else if(t.rng){if(s=t.rng,s.startContainer){c=m.dom.createRng();try{c.setStart(s.startContainer,s.startOffset),c.setEnd(s.endContainer,s.endOffset)}catch(g){}s=c}m.setRng(s)}},select:function(t,n){function o(t,n){var o=new r(t,t);do{if(3==t.nodeType&&0!==e.trim(t.nodeValue).length)return void(n?c.setStart(t,0):c.setEnd(t,t.nodeValue.length));if("BR"==t.nodeName)return void(n?c.setStartBefore(t):c.setEndBefore(t))}while(t=n?o.next():o.prev())}var i,a=this,s=a.dom,c=s.createRng();return t&&(i=s.nodeIndex(t),c.setStart(t.parentNode,i),c.setEnd(t.parentNode,i+1),n&&(o(t,1),o(t)),a.setRng(c)),t},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t,n=this,o=n.getRng();o.item&&(t=o.item(0),o=n.win.document.body.createTextRange(),o.moveToElementText(t)),o.collapse(!!e),n.setRng(o)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(t){var n,o,r,i=this,a=i.win.document;if(t&&i.tridentSel)return i.tridentSel.getRangeAt(0);try{(n=i.getSel())&&(o=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():a.createRange())}catch(s){}return e.isIE&&!e.isIE11&&o&&o.setStart&&a.selection.createRange().item&&(r=a.selection.createRange().item(0),o=a.createRange(),o.setStartBefore(r),o.setEndAfter(r)),o||(o=a.createRange?a.createRange():a.body.createTextRange()),o.setStart&&9===o.startContainer.nodeType&&o.collapsed&&(r=i.dom.getRoot(),o.setStart(r,0),o.setEnd(r,0)),i.selectedRange&&i.explicitRange&&(0===o.compareBoundaryPoints(o.START_TO_START,i.selectedRange)&&0===o.compareBoundaryPoints(o.END_TO_END,i.selectedRange)?o=i.explicitRange:(i.selectedRange=null,i.explicitRange=null)),o},setRng:function(e,t){var n,o=this;if(o.tridentSel){if(e.cloneRange)try{return void o.tridentSel.addRange(e)}catch(r){}try{e.select()}catch(r){}}else if(n=o.getSel()){o.explicitRange=e;try{n.removeAllRanges()}catch(r){}n.addRange(e),t===!1&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),o.selectedRange=n.rangeCount>0?n.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 n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t,n=this,o=n.getRng(),r=(n.getSel(),o.startContainer),i=o.endContainer;return o?o.setStart?(t=o.commonAncestorContainer,!o.collapsed&&(o.startContainer==o.endContainer&&o.endOffset-o.startOffset<2&&o.startContainer.hasChildNodes()&&(t=o.startContainer.childNodes[o.startOffset]),3===r.nodeType&&3===i.nodeType&&(r=r.length===o.startOffset?e(r.nextSibling,!0):r.parentNode,i=0===o.endOffset?e(i.previousSibling,!1):i.parentNode,r&&r===i))?r:t&&3==t.nodeType?t.parentNode:t):o.item?o.item(0):o.parentElement():n.dom.getRoot()},getSelectedBlocks:function(e,t){var n,o,i,a=this,s=a.dom,c=[];if(n=s.getParent(e||a.getStart(),s.isBlock),o=s.getParent(t||a.getEnd(),s.isBlock),n&&c.push(n),n&&o&&n!=o){i=n;for(var d=new r(n,s.getRoot());(i=d.next())&&i!=o;)s.isBlock(i)&&c.push(i)}return o&&n!=o&&c.push(o),c},isForward:function(){var e,t,n=this.dom,o=this.getSel();return o&&null!=o.anchorNode&&null!=o.focusNode?(e=n.createRng(),e.setStart(o.anchorNode,o.anchorOffset),e.collapse(!0),t=n.createRng(),t.setStart(o.focusNode,o.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0):!0},normalize:function(){function t(e){function t(e,t){for(var n=new r(e,m.getParent(e.parentNode,m.isBlock)||h);e=n[t?"prev":"next"]();)if("BR"===e.nodeName)return!0}function s(e,t){var n,a;for(t=t||c,n=new r(t,m.getParent(t.parentNode,m.isBlock)||h);u=n[e?"prev":"next"]();){if(3===u.nodeType&&u.nodeValue.length>0)return c=u,d=e?u.nodeValue.length:0,void(o=!0);if(m.isBlock(u)||f[u.nodeName.toLowerCase()])return;a=u}i&&a&&(c=a,o=!0,d=0)}var c,d,l,u,f,p,m=a.dom,h=m.getRoot();if(c=n[(e?"start":"end")+"Container"],d=n[(e?"start":"end")+"Offset"],f=m.schema.getNonEmptyElements(),9===c.nodeType&&(c=m.getRoot(),d=0),c===h){if(e&&(u=c.childNodes[d>0?d-1:0],u&&(p=u.nodeName.toLowerCase(),f[u.nodeName]||"TABLE"==u.nodeName)))return;if(c.hasChildNodes()&&(c=c.childNodes[Math.min(!e&&d>0?d-1:d,c.childNodes.length-1)],d=0,c.hasChildNodes()&&!/TABLE/.test(c.nodeName))){u=c,l=new r(c,h);do{if(3===u.nodeType&&u.nodeValue.length>0){d=e?0:u.nodeValue.length,c=u,o=!0;break}if(f[u.nodeName.toLowerCase()]){d=m.nodeIndex(u),c=u.parentNode,"IMG"!=u.nodeName||e||d++,o=!0;break}}while(u=e?l.next():l.prev())}}i&&(3===c.nodeType&&0===d&&s(!0),1===c.nodeType&&(u=c.childNodes[d],!u||"BR"!==u.nodeName||t(u)||t(u,!0)||s(!0,c.childNodes[d]))),e&&!i&&3===c.nodeType&&d===c.nodeValue.length&&s(!1),o&&n["set"+(e?"Start":"End")](c,d)}var n,o,i,a=this;e.isIE||(n=a.getRng(),i=n.collapsed,t(!0),i||t(),o&&(i&&n.collapse(!0),a.setRng(n,a.isForward())))},selectorChanged:function(e,t){var n,r=this;return r.selectorChangedData||(r.selectorChangedData={},n={},r.editor.onNodeChange.addToTop(function(e,t,i){var a=r.dom,s=a.getParents(i,null,a.getRoot()),c={};o(r.selectorChangedData,function(e,t){o(s,function(r){return a.is(r,t)?(n[t]||(o(e,function(e){e(!0,{node:r,selector:t,parents:s})}),n[t]=e),c[t]=e,!1):void 0})}),o(n,function(e,t){c[t]||(delete n[t],o(e,function(e){e(!1,{node:i,selector:t,parents:s})}))})})),r.selectorChangedData[e]||(r.selectorChangedData[e]=[]),r.selectorChangedData[e].push(t),r},scrollIntoView:function(e){var t,n,o=this,r=o.dom;n=r.getViewPort(o.editor.getWin()),t=r.getPos(e).y,(t<n.y||t+25>n.y+n.h)&&o.editor.getWin().scrollTo(0,t<n.y?t:t-n.h+25)},destroy:function(t){var n=this;n.win=null,t||e.removeUnload(n.destroy)},_fixIESelection:function(){function e(e,t){var n=c.createTextRange();try{n.moveToPoint(e,t)}catch(o){n=null}return n}function t(t){var o;t.button?(o=e(t.x,t.y),o&&(o.compareEndPoints("StartToStart",r)>0?o.setEndPoint("StartToStart",r):o.setEndPoint("EndToEnd",r),o.select())):n()}function n(){var e=s.selection.createRange();r&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&r.select(),a.unbind(s,"mouseup",n),a.unbind(s,"mousemove",t),r=o=0}var o,r,i,a=this.dom,s=a.doc,c=s.body;s.documentElement.unselectable=!0,a.bind(s,["mousedown","contextmenu"],function(c){if("HTML"===c.target.nodeName){if(o&&n(),i=s.documentElement,i.scrollHeight>i.clientHeight)return;o=1,r=e(c.x,c.y),r&&(a.bind(s,"mouseup",n),a.bind(s,"mousemove",t),a.win.focus(),r.select())}})}})}(tinymce),function(e){e.dom.Serializer=function(t,n,o){var r,i,a,s=e.isIE,c=e.each;return t.apply_source_formatting||(t.indent=!1),n=n||e.DOM,o=o||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,r=new e.util.Dispatcher(self),i=new e.util.Dispatcher(self),a=new e.html.DomParser(t,o),a.addAttributeFilter("src,href,style",function(e,o){for(var r,i,a,s=e.length,c="data-mce-"+o,d=t.url_converter,l=t.url_converter_scope;s--;)r=e[s],i=r.attributes.map[c],i!==a?(r.attr(o,i.length>0?i:null),r.attr(c,null)):(i=r.attributes.map[o],"style"===o?i=n.serializeStyle(n.parseStyle(i),r.name):d&&(i=d.call(l,i,o,r.name)),r.attr(o,i.length>0?i:null))}),a.addAttributeFilter("class",function(e){for(var t,n,o=e.length;o--;)t=e[o],n=t.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,""),t.attr("class",n.length>0?n:null)}),a.addAttributeFilter("data-mce-type",function(e,t,n){for(var o,r=e.length;r--;)o=e[r],"bookmark"!==o.attributes.map["data-mce-type"]||n.cleanup||o.remove()}),a.addAttributeFilter("data-mce-expando",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),a.addNodeFilter("noscript",function(t){for(var n,o=t.length;o--;)n=t[o].firstChild,n&&(n.value=e.html.Entities.decode(n.value))}),a.addNodeFilter("script,style",function(e,t){function n(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 o,r,i=e.length;i--;)o=e[i],r=o.firstChild?o.firstChild.value:"","script"===t?(o.attr("type",(o.attr("type")||"text/javascript").replace(/^mce\-/,"")),r.length>0&&(o.firstChild.value="// <![CDATA[\n"+n(r)+"\n// ]]>")):r.length>0&&(o.firstChild.value="<!--\n"+n(r)+"\n-->")}),a.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)t=e[n],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))}),a.addNodeFilter("xml:namespace,input",function(e,t){for(var n,o=e.length;o--;)n=e[o],7===n.type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),t.fix_list_elements&&a.addNodeFilter("ul,ol",function(e){for(var t,n,o=e.length;o--;)t=e[o],n=t.parent,("ul"===n.name||"ol"===n.name)&&t.prev&&"li"===t.prev.name&&t.prev.append(t)}),a.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:o,addNodeFilter:a.addNodeFilter,addAttributeFilter:a.addAttributeFilter,onPreProcess:r,onPostProcess:i,serialize:function(d,l){var u,f,p,m,h;return s&&n.select("script,style,select,map").length>0?(h=d.innerHTML,d=d.cloneNode(!1),n.setHTML(d,h)):d=d.cloneNode(!0),u=d.ownerDocument.implementation,u.createHTMLDocument&&(f=u.createHTMLDocument(""),c("BODY"==d.nodeName?d.childNodes:[d],function(e){f.body.appendChild(f.importNode(e,!0))}),d="BODY"!=d.nodeName?f.body.firstChild:f.body,p=n.doc,n.doc=f),l=l||{},l.format=l.format||"html",l.no_events||(l.node=d,r.dispatch(self,l)),m=new e.html.Serializer(t,o),l.content=m.serialize(a.parse(e.trim(l.getInner?d.innerHTML:n.getOuterHTML(d)),l)),l.cleanup||(l.content=l.content.replace(/\uFEFF/g,"")),l.no_events||i.dispatch(self,l),p&&(n.doc=p),l.node=null,l.content},addRules:function(e){o.addValidElements(e)},setRules:function(e){o.setValidElements(e)
10
- }}}}(tinymce),function(e){e.dom.ScriptLoader=function(){function t(t,n){function o(){d.remove(c),i&&(i.onreadystatechange=i.onload=i=null),n()}function r(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+t)}var i,a,s,c,d=e.DOM;return c=d.uniqueId(),e.isIE6&&(a=new e.util.URI(t),s=location,a.host==s.hostname&&a.port==s.port&&a.protocol+":"==s.protocol&&"file"!=a.protocol.toLowerCase())?void e.util.XHR.send({url:e._addVer(a.getURI()),success:function(e){var t=d.create("script",{type:"text/javascript"});t.text=e,document.getElementsByTagName("head")[0].appendChild(t),d.remove(t),o()},error:r}):(i=document.createElement("script"),i.id=c,i.type="text/javascript",i.src=e._addVer(t),(!e.isIE||e.isIE11)&&(i.onload=o),i.onerror=r,e.isOpera||(i.onreadystatechange=function(){var e=i.readyState;("complete"==e||"loaded"==e)&&o()}),void(document.getElementsByTagName("head")[0]||document.body).appendChild(i))}var n,o=0,r=1,i=2,a={},s=[],c={},d=[],l=0;this.isDone=function(e){return a[e]==i},this.markDone=function(e){a[e]=i},this.add=this.load=function(e,t,r){var i=a[e];i==n&&(s.push(e),a[e]=o),t&&(c[e]||(c[e]=[]),c[e].push({func:t,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(s,e,t)},this.loadScripts=function(o,s,u){function f(t){e.each(c[t],function(e){e.func.call(e.scope)}),c[t]=n}var p;d.push({func:s,scope:u||this}),(p=function(){var n=e.grep(o);o.length=0,e.each(n,function(e){return a[e]==i?void f(e):void(a[e]!=r&&(a[e]=r,l++,t(e,function(){a[e]=i,l--,f(e),p()})))}),l||(e.each(d,function(e){e.func.call(e.scope)}),d.length=0)})()}},e.ScriptLoader=new e.dom.ScriptLoader}(tinymce),function(e){e.dom.RangeUtils=function(t){this.walk=function(n,o){function r(e){var t;return t=e[0],3===t.nodeType&&t===h&&g>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===y&&e.length>0&&t===v&&3===t.nodeType&&e.splice(e.length-1,1),e}function i(e,t,n){for(var o=[];e&&e!=n;e=e[t])o.push(e);return o}function a(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function s(e,t,n){var a=n?"nextSibling":"previousSibling";for(u=e,f=u.parentNode;u&&u!=t;u=f)f=u.parentNode,p=i(u==e?u:u[a],a),p.length&&(n||p.reverse(),o(r(p)))}var c,d,l,u,f,p,m,h=n.startContainer,g=n.startOffset,v=n.endContainer,y=n.endOffset;if(m=t.select("td.mceSelected,th.mceSelected"),m.length>0)return void e.each(m,function(e){o([e])});if(1==h.nodeType&&h.hasChildNodes()&&(h=h.childNodes[g]),1==v.nodeType&&v.hasChildNodes()&&(v=v.childNodes[Math.min(y-1,v.childNodes.length-1)]),h==v)return o(r([h]));for(c=t.findCommonAncestor(h,v),u=h;u;u=u.parentNode){if(u===v)return s(h,c,!0);if(u===c)break}for(u=v;u;u=u.parentNode){if(u===h)return s(v,c);if(u===c)break}d=a(h,c)||h,l=a(v,c)||v,s(h,d,!0),p=i(d==h?d:d.nextSibling,"nextSibling",l==v?l.nextSibling:l),p.length&&o(r(p)),s(v,l)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,o=e.startOffset,r=e.endContainer,i=e.endOffset;return n==r&&3==n.nodeType?o>0&&o<n.nodeValue.length&&(r=t(n,o),n=r.previousSibling,i>o?(i-=o,n=r=t(r,i).previousSibling,i=r.nodeValue.length,o=0):i=0):(3==n.nodeType&&o>0&&o<n.nodeValue.length&&(n=t(n,o),o=0),3==r.nodeType&&i>0&&i<r.nodeValue.length&&(r=t(r,i).previousSibling,i=r.nodeValue.length)),{startContainer:n,startOffset:o,endContainer:r,endOffset:i}}},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,n=e.each;e.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(o,r){var i,a,s,c,d,l=this,u=o.root,f=o.items,p=o.enableUpDown,m=o.enableLeftRight||!o.enableUpDown,h=o.excludeFromTabOrder;r=r||e.DOM,i=function(e){d=e.target.id},a=function(e){r.setAttrib(e.target.id,"tabindex","-1")},c=function(){var e=r.get(d);r.setAttrib(e,"tabindex","0"),e.focus()},l.focus=function(){r.get(d).focus()},l.destroy=function(){n(f,function(e){var t=r.get(e.id);r.unbind(t,"focus",i),r.unbind(t,"blur",a)});var e=r.get(u);r.unbind(e,"focus",c),r.unbind(e,"keydown",s),f=r=u=l.focus=i=a=s=c=null,l.destroy=function(){}},l.moveFocus=function(e,i){{var a,s=-1;l.controls}d&&(n(f,function(e,t){return e.id===d?(s=t,!1):void 0}),s+=e,0>s?s=f.length-1:s>=f.length&&(s=0),a=f[s],r.setAttrib(d,"tabindex","-1"),r.setAttrib(a.id,"tabindex","0"),r.get(a.id).focus(),o.actOnFocus&&o.onAction(a.id),i&&t.cancel(i))},s=function(e){var n=37,r=39,i=38,a=40,s=27,c=14,u=13,f=32;switch(e.keyCode){case n:m&&l.moveFocus(-1),t.cancel(e);break;case r:m&&l.moveFocus(1),t.cancel(e);break;case i:p&&l.moveFocus(-1),t.cancel(e);break;case a:p&&l.moveFocus(1),t.cancel(e);break;case s:o.onCancel&&(o.onCancel(),t.cancel(e));break;case c:case u:case f:o.onAction&&(o.onAction(d),t.cancel(e))}},n(f,function(e,t){var n,o;e.id||(e.id=r.uniqueId("_mce_item_")),o=r.get(e.id),h?(r.bind(o,"blur",a),n="-1"):n=0===t?"0":"-1",o.setAttribute("tabindex",n),r.bind(o,"focus",i)}),f[0]&&(d=f[0].id),r.setAttrib(u,"tabindex","-1");var g=r.get(u);r.bind(g,"focus",c),r.bind(g,"keydown",s)}})}(tinymce),function(e){var t=e.DOM,n=e.is;e.create("tinymce.ui.Control",{Control:function(t,n,o){this.id=t,this.settings=n=n||{},this.rendered=!1,this.onRender=new e.util.Dispatcher(this),this.classPrefix="",this.scope=n.scope||this,this.disabled=0,this.active=0,this.editor=o},setAriaProperty:function(e,n){var o=t.get(this.id+"_aria")||t.get(this.id);o&&t.setAttrib(o,"aria-"+e,!!n)},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,n){var o=t.get(this.id);e=this.classPrefix+e,n?t.addClass(o,e):t.removeClass(o,e)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(e){t.setHTML(e,this.renderHTML())},postRender:function(){var e,t=this;n(t.disabled)&&(e=t.disabled,t.disabled=-1,t.setDisabled(e)),n(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,n){this.parent(e,t,n),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),n=(e.each,e.walk);e.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(t,n){var o=this;o.parent(t,n),o.items={},o.collapsed=!1,o.menuCount=0,o.onAddItem=new e.util.Dispatcher(this)},expand:function(e){var t=this;e&&n(t,function(e){e.expand&&e.expand()},"items",t),t.collapsed=!1},collapse:function(e){var t=this;e&&n(t,function(e){e.collapse&&e.collapse()},"items",t),t.collapsed=!0},isCollapsed:function(){return this.collapsed},add:function(n){return n.settings||(n=new e.ui.MenuItem(n.id||t.uniqueId(),n)),this.onAddItem.dispatch(this,n),this.items[n.id]=n},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;n(e,function(e){e.removeAll?e.removeAll():e.remove(),e.destroy()},"items",e),e.items={}},createMenu:function(n){var o=new e.ui.Menu(n.id||t.uniqueId(),n);return o.onAddItem.add(this.onAddItem.dispatch,this.onAddItem),o}})}(tinymce),function(e){var t=e.is,n=e.DOM,o=e.each,r=e.dom.Event,i=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(o,r){r=r||{},r.container=r.container||n.doc.body,r.offset_x=r.offset_x||0,r.offset_y=r.offset_y||0,r.vp_offset_x=r.vp_offset_x||0,r.vp_offset_y=r.vp_offset_y||0,t(r.icons)&&!r.icons&&(r["class"]+=" mceNoIcons"),this.parent(o,r),this.onShowMenu=new e.util.Dispatcher(this),this.onHideMenu=new e.util.Dispatcher(this),this.classPrefix="mceMenu"},createMenu:function(t){var o,r=this,i=r.settings;return t.container=t.container||i.container,t.parent=r,t.constrain=t.constrain||i.constrain,t["class"]=t["class"]||i["class"],t.vp_offset_x=t.vp_offset_x||i.vp_offset_x,t.vp_offset_y=t.vp_offset_y||i.vp_offset_y,t.keyboard_focus=i.keyboard_focus,o=new e.ui.DropMenu(t.id||n.uniqueId(),t),o.onAddItem.add(r.onAddItem.dispatch,r.onAddItem),o},focus:function(){var e=this;e.keyboardNav&&e.keyboardNav.focus()},update:function(){var e,t,o=this,r=o.settings,i=n.get("menu_"+o.id+"_tbl"),a=n.get("menu_"+o.id+"_co");e=r.max_width?Math.min(i.offsetWidth,r.max_width):i.offsetWidth,t=r.max_height?Math.min(i.offsetHeight,r.max_height):i.offsetHeight,o.element.setStyles(n.boxModel?{width:e,height:t}:{width:e+2,height:t+2}),r.max_width&&n.setStyle(a,"width",e),r.max_height&&(n.setStyle(a,"height",t),i.clientHeight<r.max_height&&n.setStyle(a,"overflow","hidden"))},showMenu:function(t,a,s){var c,d,l,u,f,p,m=this,h=m.settings,g=n.getViewPort(),v=2,y=m.classPrefix;m.collapse(1),m.isMenuVisible||(m.rendered?c=n.get("menu_"+m.id):(c=n.add(m.settings.container,m.renderNode()),o(m.items,function(e){e.postRender()}),m.element=new i("menu_"+m.id,{blocker:1,container:h.container})),e.isOpera||n.setStyles(c,{left:-65535,top:-65535}),n.show(c),m.update(),t+=h.offset_x||0,a+=h.offset_y||0,g.w-=4,g.h-=4,h.constrain&&(d=c.clientWidth-v,l=c.clientHeight-v,u=g.x+g.w,f=g.y+g.h,t+h.vp_offset_x+d>u&&(t=s?s-d:Math.max(0,u-h.vp_offset_x-d)),a+h.vp_offset_y+l>f&&(a=Math.max(0,f-h.vp_offset_y-l))),n.setStyles(c,{left:t,top:a}),m.element.update(),m.isMenuVisible=1,m.mouseClickFunc=r.add(c,"click",function(e){var t;if(e=e.target,e&&(e=n.getParent(e,"tr"))&&!n.hasClass(e,y+"ItemSub")){if(t=m.items[e.id],t.isDisabled())return;for(p=m;p;)p.hideMenu&&p.hideMenu(),p=p.settings.parent;return t.settings.onclick&&t.settings.onclick(e),!1}}),m.hasMenus()&&(m.mouseOverFunc=r.add(c,"mouseover",function(e){var t,o;if(e=e.target,e&&(e=n.getParent(e,"tr"))){if(t=m.items[e.id],m.lastMenu&&m.lastMenu.collapse(1),t.isDisabled())return;e&&n.hasClass(e,y+"ItemSub")&&(o=n.getRect(e),t.showMenu(o.x+o.w-v,o.y-v,o.x),m.lastMenu=t,n.addClass(n.get(t.id).firstChild,y+"ItemActive"))}})),r.add(c,"keydown",m._keyHandler,m),m.onShowMenu.dispatch(m),h.keyboard_focus&&m._setupKeyboardNav())},hideMenu:function(e){var t,o=this,i=n.get("menu_"+o.id);o.isMenuVisible&&(o.keyboardNav&&o.keyboardNav.destroy(),r.remove(i,"mouseover",o.mouseOverFunc),r.remove(i,"click",o.mouseClickFunc),r.remove(i,"keydown",o._keyHandler),n.hide(i),o.isMenuVisible=0,e||o.collapse(1),o.element&&o.element.hide(),(t=n.get(o.id))&&n.removeClass(t.firstChild,o.classPrefix+"ItemActive"),o.onHideMenu.dispatch(o))},add:function(e){var t,o=this;return e=o.parent(e),o.isRendered&&(t=n.get("menu_"+o.id))&&o._add(n.select("tbody",t)[0],e),e},collapse:function(e){this.parent(e),this.hideMenu(1)},remove:function(e){return n.remove(e.id),this.destroy(),this.parent(e)},destroy:function(){var e=this,t=n.get("menu_"+e.id);e.keyboardNav&&e.keyboardNav.destroy(),r.remove(t,"mouseover",e.mouseOverFunc),r.remove(n.select("a",t),"focus",e.mouseOverFunc),r.remove(t,"click",e.mouseClickFunc),r.remove(t,"keydown",e._keyHandler),e.element&&e.element.remove(),n.remove(t)},renderNode:function(){var e,t,r,a,s=this,c=s.settings;return a=n.create("div",{role:"listbox",id:"menu_"+s.id,"class":c["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"}),s.settings.parent&&n.setAttrib(a,"aria-parent","menu_"+s.settings.parent.id),r=n.add(a,"div",{role:"presentation",id:"menu_"+s.id+"_co","class":s.classPrefix+(c["class"]?" "+c["class"]:"")}),s.element=new i("menu_"+s.id,{blocker:1,container:c.container}),c.menu_line&&n.add(r,"span",{"class":s.classPrefix+"Line"}),e=n.add(r,"table",{role:"presentation",id:"menu_"+s.id+"_tbl",border:0,cellPadding:0,cellSpacing:0}),t=n.add(e,"tbody"),o(s.items,function(e){s._add(t,e)}),s.rendered=!0,a},_setupKeyboardNav:function(){var t,o,r=this;t=n.get("menu_"+r.id),o=n.select("a[role=option]","menu_"+r.id),o.splice(0,0,t),r.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+r.id,items:o,onCancel:function(){r.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(),r.cancel(e));break;case 39:t.mouseOverFunc&&t.mouseOverFunc(e)}},_add:function(e,t){var o,r,i,a,s,c=t.settings,d=this.classPrefix;return c.separator?(i=n.add(e,"tr",{id:t.id,"class":d+"ItemSeparator"}),n.add(i,"td",{"class":d+"ItemSeparator"}),void((o=i.previousSibling)&&n.addClass(o,"mceLast"))):(o=i=n.add(e,"tr",{id:t.id,"class":d+"Item "+d+"ItemEnabled"}),o=a=n.add(o,c.titleItem?"th":"td"),o=r=n.add(o,"a",{id:t.id+"_aria",role:c.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"}),c.parent&&(n.setAttrib(r,"aria-haspopup","true"),n.setAttrib(r,"aria-owns","menu_"+t.id)),n.addClass(a,c["class"]),s=n.add(o,"span",{"class":"mceIcon"+(c.icon?" mce_"+c.icon:"")}),c.icon_src&&n.add(s,"img",{src:c.icon_src}),o=n.add(o,c.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()),n.setAttrib(o,"style",t.settings.style)),1==e.childNodes.length&&n.addClass(i,"mceFirst"),(o=i.previousSibling)&&n.hasClass(o,d+"ItemSeparator")&&n.addClass(i,"mceFirst"),t.collapse&&n.addClass(i,d+"ItemSub"),(o=i.previousSibling)&&n.removeClass(o,"mceLast"),void n.addClass(i,"mceLast"))}})}(tinymce),function(e){var t=e.DOM;e.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,t,n){this.parent(e,t,n),this.classPrefix="mceButton"},renderHTML:function(){var e,n,o=this.classPrefix,r=this.settings;return n=t.encode(r.label||""),e='<a role="button" id="'+this.id+'" href="javascript:;" class="'+o+" "+o+"Enabled "+r["class"]+(n?" "+o+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+t.encode(r.title)+'">',e+=!r.image||this.editor&&this.editor.forcedHighContrastMode?'<span class="mceIcon '+r["class"]+'"></span>'+(n?'<span class="'+o+'Label">'+n+"</span>":""):'<span class="mceIcon '+r["class"]+'"><img class="mceIcon" src="'+r.image+'" alt="'+t.encode(r.title)+'" /></span>'+(n?'<span class="'+o+'Label">'+n+"</span>":""),e+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+r.title+"</span>",e+="</a>"},postRender:function(){var t,n=this,o=n.settings;e.isIE&&n.editor&&e.dom.Event.add(n.id,"mousedown",function(){var e=n.editor.selection.getNode().nodeName;t="IMG"===e?n.editor.selection.getBookmark():null}),e.dom.Event.add(n.id,"click",function(r){return n.isDisabled()?void 0:(e.isIE&&n.editor&&null!==t&&n.editor.selection.moveToBookmark(t),o.onclick.call(o.scope,r))}),e.dom.Event.add(n.id,"keydown",function(t){return n.isDisabled()||t.keyCode!=e.VK.SPACEBAR?void 0:(e.dom.Event.cancel(t),o.onclick.call(o.scope,t))})}})}(tinymce),function(e){var t,n=e.DOM,o=e.dom.Event,r=e.each,i=e.util.Dispatcher;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(t,n,o){var r=this;r.parent(t,n,o),r.items=[],r.onChange=new i(r),r.onPostRender=new i(r),r.onAdd=new i(r),r.onRenderMenu=new e.util.Dispatcher(this),r.classPrefix="mceListBox",r.marked={}},select:function(e){var n,o,i=this;return i.marked={},e==t?i.selectByIndex(-1):(o=e&&"function"==typeof e?e:function(t){return t==e},void(e!=i.selectedValue&&(r(i.items,function(e,t){return o(e.value)?(n=1,i.selectByIndex(t),!1):void 0}),n||i.selectByIndex(-1))))},selectByIndex:function(e){var t,o,r,i=this;i.marked={},e!=i.selectedIndex&&(t=n.get(i.id+"_text"),r=n.get(i.id+"_voiceDesc"),o=i.items[e],o?(i.selectedValue=o.value,i.selectedIndex=e,n.setHTML(t,n.encode(o.title)),n.setHTML(r,i.settings.title+" - "+o.title),n.removeClass(t,"mceTitle"),n.setAttrib(i.id,"aria-valuenow",o.title)):(n.setHTML(t,n.encode(i.settings.title)),n.setHTML(r,n.encode(i.settings.title)),n.addClass(t,"mceTitle"),i.selectedValue=i.selectedIndex=null,n.setAttrib(i.id,"aria-valuenow",i.settings.title)),t=0)},mark:function(e){this.marked[e]=!0},add:function(t,n,o){var r=this;o=o||{},o=e.extend(o,{title:t,value:n}),r.items.push(o),r.onAdd.dispatch(r,o)},getLength:function(){return this.items.length},renderHTML:function(){var e="",t=this,o=t.settings,r=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="'+r+" "+r+"Enabled"+(o["class"]?" "+o["class"]:"")+'"><tbody><tr>',e+="<td>"+n.createHTML("span",{id:t.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},t.settings.title),e+=n.createHTML("a",{id:t.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},n.encode(t.settings.title))+"</td>",e+="<td>"+n.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">\u25bc</span></span>')+"</td>",e+="</tr></tbody></table></span>"},showMenu:function(){var t,i,a=this,s=n.get(this.id);if(!a.isDisabled()&&0!==a.items.length){if(a.menu&&a.menu.isMenuVisible)return a.hideMenu();a.isMenuRendered||(a.renderMenu(),a.isMenuRendered=!0),t=n.getPos(s),i=a.menu,i.settings.offset_x=t.x,i.settings.offset_y=t.y,i.settings.keyboard_focus=!e.isOpera,r(a.items,function(e){i.items[e.id]&&i.items[e.id].setSelected(0)}),r(a.items,function(e){i.items[e.id]&&a.marked[e.value]&&i.items[e.id].setSelected(1),e.value===a.selectedValue&&i.items[e.id].setSelected(1)}),i.showMenu(0,s.clientHeight),o.add(n.doc,"mousedown",a.hideMenu,a),n.addClass(a.id,a.classPrefix+"Selected")}},hideMenu:function(e){var t=this;if(t.menu&&t.menu.isMenuVisible){if(n.removeClass(t.id,t.classPrefix+"Selected"),e&&"mousedown"==e.type&&(e.target.id==t.id+"_text"||e.target.id==t.id+"_open"))return;e&&n.getParent(e.target,".mceMenu")||(n.removeClass(t.id,t.classPrefix+"Selected"),o.remove(n.doc,"mousedown",t.hideMenu,t),t.menu.hideMenu())}},renderMenu:function(){var e,o=this;e=o.settings.control_manager.createDropMenu(o.id+"_menu",{menu_line:1,"class":o.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150}),e.onHideMenu.add(function(){o.hideMenu(),o.focus()}),e.add({title:o.settings.title,"class":"mceMenuItemTitle",onclick:function(){o.settings.onselect("")!==!1&&o.select("")}}),r(o.items,function(r){r.value===t?e.add({title:r.title,role:"option","class":"mceMenuItemTitle",onclick:function(){o.settings.onselect("")!==!1&&o.select("")}}):(r.id=n.uniqueId(),r.role="option",r.onclick=function(){o.settings.onselect(r.value)!==!1&&o.select(r.value)},e.add(r))}),o.onRenderMenu.dispatch(o,e),o.menu=e},postRender:function(){var t=this,r=t.classPrefix;o.add(t.id,"click",t.showMenu,t),o.add(t.id,"keydown",function(e){32==e.keyCode&&(t.showMenu(e),o.cancel(e))}),o.add(t.id,"focus",function(){t._focused||(t.keyDownHandler=o.add(t.id,"keydown",function(e){40==e.keyCode&&(t.showMenu(),o.cancel(e))}),t.keyPressHandler=o.add(t.id,"keypress",function(e){var n;13==e.keyCode&&(n=t.selectedValue,t.selectedValue=null,o.cancel(e),t.settings.onselect(n))})),t._focused=1}),o.add(t.id,"blur",function(){o.remove(t.id,"keydown",t.keyDownHandler),o.remove(t.id,"keypress",t.keyPressHandler),t._focused=0}),(e.isIE6||!n.boxModel)&&(o.add(t.id,"mouseover",function(){n.hasClass(t.id,r+"Disabled")||n.addClass(t.id,r+"Hover")}),o.add(t.id,"mouseout",function(){n.hasClass(t.id,r+"Disabled")||n.removeClass(t.id,r+"Hover")})),t.onPostRender.dispatch(t,n.get(t.id))},destroy:function(){this.parent(),o.clear(this.id+"_text"),o.clear(this.id+"_open")}})}(tinymce),function(e){{var t,n=e.DOM,o=e.dom.Event,r=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){n.get(this.id).disabled=e,this.setAriaProperty("disabled",e)},isDisabled:function(){return n.get(this.id).disabled},select:function(e){var n,o,i=this;return e==t?i.selectByIndex(-1):(o=e&&"function"==typeof e?e:function(t){return t==e},void(e!=i.selectedValue&&(r(i.items,function(e,t){return o(e.value)?(n=1,i.selectByIndex(t),!1):void 0}),n||i.selectByIndex(-1))))},selectByIndex:function(e){n.get(this.id).selectedIndex=e+1,this.selectedValue=this.items[e]?this.items[e].value:null},add:function(e,t,o){var r,i=this;o=o||{},o.value=t,i.isRendered()&&n.add(n.get(this.id),"option",o,e),r={title:e,value:t,attribs:o},i.items.push(r),i.onAdd.dispatch(i,r)},getLength:function(){return this.items.length},renderHTML:function(){var e,t=this;return e=n.createHTML("option",{value:""},"-- "+t.settings.title+" --"),r(t.items,function(t){e+=n.createHTML("option",{value:t.value},t.title)}),e=n.createHTML("select",{id:t.id,"class":"mceNativeListBox","aria-labelledby":t.id+"_aria"},e),e+=n.createHTML("span",{id:t.id+"_aria",style:"display: none"},t.settings.title)},postRender:function(){function e(e){var t=r.items[e.target.selectedIndex-1];t&&(t=t.value)&&(r.onChange.dispatch(r,t),r.settings.onselect&&r.settings.onselect(t))}var t,r=this,i=!0;r.rendered=!0,o.add(r.id,"change",e),o.add(r.id,"keydown",function(n){var a,s=38,c=40,d=13,l=32;return o.remove(r.id,"change",t),i=!1,a=o.add(r.id,"blur",function(){i||(i=!0,o.add(r.id,"change",e),o.remove(r.id,"blur",a))}),n.keyCode==d||n.keyCode==l?(e(n),o.cancel(n)):void((n.keyCode==c||n.keyCode==s)&&n.stopImmediatePropagation())}),r.onPostRender.dispatch(r,n.get(r.id))}})}(tinymce),function(e){{var t=e.DOM,n=e.dom.Event;e.each}e.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(n,o,r){this.parent(n,o,r),this.onRenderMenu=new e.util.Dispatcher(this),o.menu_container=o.menu_container||t.doc.body},showMenu:function(){var e,o,r,i=this,a=t.get(i.id);if(!i.isDisabled()){if(i.isMenuRendered||(i.renderMenu(),i.isMenuRendered=!0),i.isMenuVisible)return i.hideMenu();e=t.getPos(i.settings.menu_container),o=t.getPos(a),r=i.menu,r.settings.offset_x=o.x,r.settings.offset_y=o.y,r.settings.vp_offset_x=o.x,r.settings.vp_offset_y=o.y,r.settings.keyboard_focus=i._focused,r.showMenu(0,a.firstChild.clientHeight),n.add(t.doc,"mousedown",i.hideMenu,i),i.setState("Selected",1),i.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 o=this;e&&"mousedown"==e.type&&t.getParent(e.target,function(e){return e.id===o.id||e.id===o.id+"_open"})||(e&&t.getParent(e.target,".mceMenu")||(o.setState("Selected",0),n.remove(t.doc,"mousedown",o.hideMenu,o),o.menu&&o.menu.hideMenu()),o.isMenuVisible=0)},postRender:function(){var e=this,t=e.settings;n.add(e.id,"click",function(){e.isDisabled()||(t.onclick&&t.onclick(e.value),e.showMenu())})}})}(tinymce),function(e){{var t=e.DOM,n=e.dom.Event;e.each}e.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(e,t,n){this.parent(e,t,n),this.classPrefix="mceSplitButton"},renderHTML:function(){var e,n,o=this,r=o.settings;return e="<tbody><tr>",n=r.image?t.createHTML("img ",{src:r.image,role:"presentation","class":"mceAction "+r["class"]}):t.createHTML("span",{"class":"mceAction "+r["class"]},""),n+=t.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:o.id+"_voice",style:"display:none;"},r.title),e+="<td >"+t.createHTML("a",{role:"button",id:o.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+r["class"],onclick:"return false;",onmousedown:"return false;",title:r.title},n)+"</td>",n=t.createHTML("span",{"class":"mceOpen "+r["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25bc</span>'),e+="<td >"+t.createHTML("a",{role:"button",id:o.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+r["class"],onclick:"return false;",onmousedown:"return false;",title:r.title},n)+"</td>",e+="</tr></tbody>",e=t.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+r["class"],cellpadding:"0",cellspacing:"0",title:r.title},e),t.createHTML("div",{id:o.id,role:"button",tabindex:"0","aria-labelledby":o.id+"_voice","aria-haspopup":"true"},e)},postRender:function(){var o,r=this,i=r.settings;i.onclick&&(o=function(e){r.isDisabled()||(i.onclick(r.value),n.cancel(e))},n.add(r.id+"_action","click",o),n.add(r.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)&&(r.showMenu(),n.cancel(e)):(o(),n.cancel(e))})),n.add(r.id+"_open","click",function(e){r.showMenu(),n.cancel(e)}),n.add([r.id,r.id+"_open"],"focus",function(){r._focused=1}),n.add([r.id,r.id+"_open"],"blur",function(){r._focused=0}),(e.isIE6||!t.boxModel)&&(n.add(r.id,"mouseover",function(){t.hasClass(r.id,"mceSplitButtonDisabled")||t.addClass(r.id,"mceSplitButtonHover")}),n.add(r.id,"mouseout",function(){t.hasClass(r.id,"mceSplitButtonDisabled")||t.removeClass(r.id,"mceSplitButtonHover")}))},destroy:function(){this.parent(),n.clear(this.id+"_action"),n.clear(this.id+"_open"),n.clear(this.id)}})}(tinymce),function(e){var t=e.DOM,n=e.dom.Event,o=e.is,r=e.each;e.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(t,n,o){var r=this;r.parent(t,n,o),r.settings=n=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"},r.settings),r.onShowMenu=new e.util.Dispatcher(r),r.onHideMenu=new e.util.Dispatcher(r),r.value=n.default_color},showMenu:function(){var o,r,i=this;if(!i.isDisabled()){if(i.isMenuRendered||(i.renderMenu(),i.isMenuRendered=!0),i.isMenuVisible)return i.hideMenu();o=t.get(i.id),t.show(i.id+"_menu"),t.addClass(o,"mceSplitButtonSelected"),r=t.getPos(o),t.setStyles(i.id+"_menu",{left:r.x,top:r.y+o.firstChild.clientHeight,zIndex:2e5}),o=0,n.add(t.doc,"mousedown",i.hideMenu,i),i.onShowMenu.dispatch(i),i._focused&&(i._keyHandler=n.add(i.id+"_menu","keydown",function(e){27==e.keyCode&&i.hideMenu()}),t.select("a",i.id+"_menu")[0].focus()),i.keyboardNav=new e.ui.KeyboardNavigation({root:i.id+"_menu",items:t.select("a",i.id+"_menu"),onCancel:function(){i.hideMenu(),i.focus()}}),i.keyboardNav.focus(),i.isMenuVisible=1}},hideMenu:function(e){var o=this;if(o.isMenuVisible){if(e&&"mousedown"==e.type&&t.getParent(e.target,function(e){return e.id===o.id+"_open"}))return;e&&t.getParent(e.target,".mceSplitButtonMenu")||(t.removeClass(o.id,"mceSplitButtonSelected"),n.remove(t.doc,"mousedown",o.hideMenu,o),n.remove(o.id+"_menu","keydown",o._keyHandler),t.hide(o.id+"_menu")),o.isMenuVisible=0,o.onHideMenu.dispatch(),o.keyboardNav.destroy()}},renderMenu:function(){var i,a,s,c,d,l,u=this,f=0,p=u.settings;return d=t.add(p.menu_container,"div",{role:"listbox",id:u.id+"_menu","class":p.menu_class+" "+p["class"],style:"position:absolute;left:0;top:-1000px;"}),i=t.add(d,"div",{"class":p["class"]+" mceSplitButtonMenu"}),t.add(i,"span",{"class":"mceMenuLine"}),a=t.add(i,"table",{role:"presentation","class":"mceColorSplitMenu"}),s=t.add(a,"tbody"),f=0,r(o(p.colors,"array")?p.colors:p.colors.split(","),function(n){n=n.replace(/^#/,""),f--||(c=t.add(s,"tr"),f=p.grid_width-1),a=t.add(c,"td");var o={href:"javascript:;",style:{backgroundColor:"#"+n},title:u.editor.getLang("colors."+n,n),"data-mce-color":"#"+n};e.isIE||(o.role="option"),a=t.add(a,"a",o),u.editor.forcedHighContrastMode&&(a=t.add(a,"canvas",{width:16,height:16,"aria-hidden":"true"}),a.getContext&&(l=a.getContext("2d"))?(l.fillStyle="#"+n,l.fillRect(0,0,16,16)):t.remove(a))}),p.more_colors_func&&(a=t.add(s,"tr"),a=t.add(a,"td",{colspan:p.grid_width,"class":"mceMoreColors"}),a=t.add(a,"a",{role:"option",id:u.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},p.more_colors_title),n.add(a,"click",function(e){return p.more_colors_func.call(p.more_colors_scope||this),n.cancel(e)})),t.addClass(i,"mceColorSplitMenu"),n.add(u.id+"_menu","mousedown",function(e){return n.cancel(e)}),n.add(u.id+"_menu","click",function(e){var n;return e=t.getParent(e.target,"a",s),e&&"a"==e.nodeName.toLowerCase()&&(n=e.getAttribute("data-mce-color"))&&u.setColor(n),!1}),d},setColor:function(e){this.displayColor(e),this.hideMenu(),this.settings.onselect(e)},displayColor:function(e){var n=this;t.setStyle(n.id+"_preview","backgroundColor",e),n.value=e},postRender:function(){var e=this,n=e.id;e.parent(),t.add(n+"_action","div",{id:n+"_preview","class":"mceColorPreview"}),t.setStyle(e.id+"_preview","backgroundColor",e.value)},destroy:function(){var e=this;e.parent(),n.clear(e.id+"_menu"),n.clear(e.id+"_more"),t.remove(e.id+"_menu"),e.keyboardNav&&e.keyboardNav.destroy()}})}(tinymce),function(e){var t=e.DOM,n=e.each,o=e.dom.Event;e.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var n=this,o=[],r=n.controls,i=e.each,a=n.settings;return o.push('<div id="'+n.id+'" role="group" aria-labelledby="'+n.id+'_voice">'),o.push("<span role='application'>"),o.push('<span id="'+n.id+'_voice" class="mceVoiceLabel" style="display:none;">'+t.encode(a.name)+"</span>"),i(r,function(e){o.push(e.renderHTML())}),o.push("</span>"),o.push("</div>"),o.join("")},focus:function(){var e=this;t.get(e.id).focus()},postRender:function(){var o=this,r=[];n(o.controls,function(e){n(e.controls,function(e){e.id&&r.push(e)})}),o.keyNav=new e.ui.KeyboardNavigation({root:o.id,items:r,onCancel:function(){e.isWebKit&&t.get(o.editor.id+"_ifr").focus(),o.editor.focus()},excludeFromTabOrder:!o.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent(),e.keyNav.destroy(),o.clear(e.id)}})}(tinymce),function(e){{var t=e.DOM;e.each}e.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var e,n,o,r,i,a,s=this,c="",d=s.settings;for(a=s.controls,o=0;o<a.length;o++)n=a[o],r=a[o-1],i=a[o+1],0===o&&(e="mceToolbarStart",n.Button?e+=" mceToolbarStartButton":n.SplitButton?e+=" mceToolbarStartSplitButton":n.ListBox&&(e+=" mceToolbarStartListBox"),c+=t.createHTML("td",{"class":e},t.createHTML("span",null,"<!-- IE -->"))),r&&n.ListBox&&(r.Button||r.SplitButton)&&(c+=t.createHTML("td",{"class":"mceToolbarEnd"},t.createHTML("span",null,"<!-- IE -->"))),c+=t.stdMode?'<td style="position: relative">'+n.renderHTML()+"</td>":"<td>"+n.renderHTML()+"</td>",i&&n.ListBox&&(i.Button||i.SplitButton)&&(c+=t.createHTML("td",{"class":"mceToolbarStart"},t.createHTML("span",null,"<!-- IE -->")));return e="mceToolbarEnd",n.Button?e+=" mceToolbarEndButton":n.SplitButton?e+=" mceToolbarEndSplitButton":n.ListBox&&(e+=" mceToolbarEndListBox"),c+=t.createHTML("td",{"class":e},t.createHTML("span",null,"<!-- IE -->")),t.createHTML("table",{id:s.id,"class":"mceToolbar"+(d["class"]?" "+d["class"]:""),cellpadding:"0",cellspacing:"0",align:s.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+c+"</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 n=e.settings;n&&n.language&&n.language_load!==!1&&e.ScriptLoader.add(this.urls[t]+"/langs/"+n.language+".js")
11
- },add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},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,n){var o=this.urls[t];e.each(n,function(t){e.ScriptLoader.add(o+"/"+t)})},load:function(t,n,o,r){function i(){var i=a.dependencies(t);e.each(i,function(e){var t=a.createUrl(n,e);a.load(t.resource,t,void 0,void 0)}),o&&o.call(r?r:e.ScriptLoader)}var a=this,s=n;a.urls[t]||("object"==typeof n&&(s=n.prefix+n.resource+n.suffix),0!==s.indexOf("/")&&-1==s.indexOf("://")&&(s=e.baseURL+"/"+s),a.urls[t]=s.substring(0,s.lastIndexOf("/")),a.lookup[t]?i():e.ScriptLoader.add(s,i,r))}}),e.PluginManager=new e.AddOnManager,e.ThemeManager=new e.AddOnManager}(tinymce),function(e){var t,n=e.each,o=e.extend,r=e.DOM,i=e.dom.Event,a=(e.ThemeManager,e.PluginManager,e.explode),s=e.util.Dispatcher,c=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 s(e),i.add(window,"beforeunload",function(t){e.onBeforeUnload.dispatch(e,t)}),e.onAddEditor=new s(e),e.onRemoveEditor=new s(e),e.EditorManager=o(e,{editors:[],i18n:{},activeEditor:null,init:function(t){function o(e){var t=e.id;return t||(t=e.name,t=t&&!r.get(t)?e.name:r.uniqueId(),e.setAttribute("id",t)),t}function s(t,n,o){var r=t[n];if(r)return e.is(r,"string")&&(o=r.replace(/\.\w+$/,""),o=o?e.resolve(o):0,r=e.resolve(r)),r.apply(o||this,Array.prototype.slice.call(arguments,2))}function d(e,t){return t.constructor===RegExp?t.test(e.className):r.hasClass(e,t)}var l,u=this,f=(e.ScriptLoader,[]);u.settings=t,i.bind(window,"ready",function(){var i,u;switch(s(t,"onpageload"),t.mode){case"exact":i=t.elements||"",i.length>0&&n(a(i),function(o){r.get(o)?(l=new e.Editor(o,t),f.push(l),l.render(1)):n(document.forms,function(i){n(i.elements,function(n){n.name===o&&(o="mce_editor_"+c++,r.setAttrib(n,"id",o),l=new e.Editor(o,t),f.push(l),l.render(1))})})});break;case"textareas":case"specific_textareas":n(r.select("textarea"),function(n){t.editor_deselector&&d(n,t.editor_deselector)||(!t.editor_selector||d(n,t.editor_selector))&&(l=new e.Editor(o(n),t),f.push(l),l.render(1))});break;default:t.types?n(t.types,function(i){n(r.select(i.selector),function(n){var r=new e.Editor(o(n),e.extend({},t,i));f.push(r),r.render(1)})}):t.selector&&n(r.select(t.selector),function(n){var r=new e.Editor(o(n),t);f.push(r),r.render(1)})}t.oninit&&(i=u=0,n(f,function(e){u++,e.initialized?i++:e.onInit.add(function(){i++,i==u&&s(t,"oninit")}),i==u&&s(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,n=t.editors;return n[e.id]=e,n.push(e),t._setActive(e),t.onAddEditor.dispatch(t,e),e},remove:function(e){var t,n=this,o=n.editors;if(!o[e.id])return null;for(delete o[e.id],t=0;t<o.length;t++)if(o[t]==e){o.splice(t,1);break}return n.activeEditor==e&&n._setActive(o[0]),e.destroy(),n.onRemoveEditor.dispatch(n,e),e},execCommand:function(t,n,o){function r(){s.destroy(),i.detachEvent("onunload",r),i=i.tinyMCE=i.tinymce=null}var i,a=this,s=a.get(o);switch(t){case"mceFocus":return s.focus(),!0;case"mceAddEditor":case"mceAddControl":return a.get(o)||new e.Editor(o,a.settings).render(),!0;case"mceAddFrameControl":return i=o.window,i.tinyMCE=tinyMCE,i.tinymce=e,e.DOM.doc=i.document,e.DOM.win=i,s=new e.Editor(o.element_id,o),s.render(),e.isIE&&!e.isIE11&&i.attachEvent("onunload",r),o.page_window=null,!0;case"mceRemoveEditor":case"mceRemoveControl":return s&&s.remove(),!0;case"mceToggleEditor":return s?(s.isHidden()?s.show():s.hide(),!0):(a.execCommand("mceAddControl",0,o),!0)}return a.activeEditor?a.activeEditor.execCommand(t,n,o):!1},execInstanceCommand:function(e,t,n,o){var r=this.get(e);return r?r.execCommand(t,n,o):!1},triggerSave:function(){n(this.editors,function(e){e.save()})},addI18n:function(t,o){var r=this.i18n;e.is(t,"string")?n(o,function(e,n){r[t+"."+n]=e}):n(t,function(e,t){n(e,function(e,o){n(e,function(e,n){"common"===o?r[t+"."+n]=e:r[t+"."+o+"."+n]=e})})})},_setActive:function(e){this.selectedInstance=this.activeEditor=e}})}(tinymce),function(e){var t=e.DOM,n=e.dom.Event,o=e.extend,r=e.each,i=e.isGecko,a=e.isIE,s=(e.isWebKit,e.is),c=e.ThemeManager,d=e.PluginManager,l=e.explode;e.create("tinymce.Editor",{Editor:function(t,n){var r=this,i=!0;r.settings=n=o({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:i,submit_patch:i,add_unload_trigger:i,convert_urls:i,relative_urls:i,remove_script_host:i,table_inline_editing:!1,object_resizing:i,accessibility_focus:i,doctype:e.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:i,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:i,directionality:"ltr",forced_root_block:"p",hidden_input:i,padd_empty_editor:i,render_ui:i,indentation:"30px",fix_table_elements:i,inline_styles:i,convert_fonts_to_spans:i,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:i,entity_encoding:"named",url_converter:r.convertURL,url_converter_scope:r,ie7_compat:i},n),r.id=r.editorId=t,r.isNotDirty=!1,r.plugins={},r.documentBaseURI=new e.util.URI(n.document_base_url||e.documentBaseURL,{base_uri:tinyMCE.baseURI}),r.baseURI=e.baseURI,r.contentCSS=[],r.contentStyles=[],r.setupEvents(),r.execCommands={},r.queryStateCommands={},r.queryValueCommands={},r.execCallback("setup",r)},render:function(){function o(){a.language&&a.language_load!==!1&&u.add(e.baseURL+"/langs/"+a.language+".js"),a.theme&&"function"!=typeof a.theme&&"-"!=a.theme.charAt(0)&&!c.urls[a.theme]&&c.load(a.theme,"themes/"+a.theme+"/editor_template"+e.suffix+".js"),r(l(a.plugins),function(t){if(t&&!d.urls[t])if("-"==t.charAt(0)){t=t.substr(1,t.length);var n=d.dependencies(t);r(n,function(t){var n={prefix:"plugins/",resource:t,suffix:"/editor_plugin"+e.suffix+".js"};t=d.createUrl(n,t),d.load(t.resource,t)})}else{if("safari"==t)return;d.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+e.suffix+".js"})}}),u.loadQueue(function(){i.removed||i.init()})}var i=this,a=i.settings,s=i.id,u=e.ScriptLoader;return n.domLoaded?(tinyMCE.settings=a,void(i.getElement()&&(!e.isIDevice||e.isIOS5)&&(!/TEXTAREA|INPUT/i.test(i.getElement().nodeName)&&a.hidden_input&&t.getParent(s,"form")&&t.insertAfter(t.create("input",{type:"hidden",name:s}),s),a.content_editable||(i.orgVisibility=i.getElement().style.visibility,i.getElement().style.visibility="hidden"),e.WindowManager&&(i.windowManager=new e.WindowManager(i)),"xml"==a.encoding&&i.onGetContent.add(function(e,n){n.save&&(n.content=t.encode(n.content))}),a.add_form_submit_trigger&&i.onSubmit.addToTop(function(){i.initialized&&(i.save(),i.isNotDirty=1)}),a.add_unload_trigger&&(i._beforeUnload=tinyMCE.onBeforeUnload.add(function(){!i.initialized||i.destroyed||i.isHidden()||i.save({format:"raw",no_events:!0})})),e.addUnload(i.destroy,i),a.submit_patch&&i.onBeforeRenderUI.add(function(){var t=i.getElement().form;t&&(t._mceOldSubmit||(t.submit.nodeType||t.submit.length||(i.formElement=t,t._mceOldSubmit=t.submit,t.submit=function(){return e.triggerSave(),i.isNotDirty=1,i.formElement._mceOldSubmit(i.formElement)}),t=null))}),o()))):void n.add(window,"ready",function(){i.render()})},init:function(){function n(t){var o,i=d.get(t),a=d.urls[t]||e.documentBaseURL.replace(/\/$/,"");i&&-1===e.inArray(x,t)&&(r(d.dependencies(t),function(e){n(e)}),o=new i(y,a),y.plugins[t]=o,o.init&&(o.init(y,a),x.push(t)))}var o,i,s,u,f,p,m,h,g,v,y=this,b=y.settings,C=y.getElement(),x=[];if(e.add(y),b.aria_label=b.aria_label||t.getAttrib(C,"aria-label",y.getLang("aria.rich_text_area")),b.theme&&("function"!=typeof b.theme?(b.theme=b.theme.replace(/-/,""),f=c.get(b.theme),y.theme=new f,y.theme.init&&y.theme.init(y,c.urls[b.theme]||e.documentBaseURL.replace(/\/$/,""))):y.theme=b.theme),r(l(b.plugins.replace(/\-/g,"")),n),b.popup_css!==!1&&(b.popup_css=b.popup_css?y.documentBaseURI.toAbsolute(b.popup_css):y.baseURI.toAbsolute("themes/"+b.theme+"/skins/"+b.skin+"/dialog.css")),b.popup_css_add&&(b.popup_css+=","+y.documentBaseURI.toAbsolute(b.popup_css_add)),y.controlManager=new e.ControlManager(y),y.onBeforeRenderUI.dispatch(y,y.controlManager),b.render_ui&&y.theme&&(y.orgDisplay=C.style.display,"function"!=typeof b.theme?(i=b.width||C.style.width||C.offsetWidth,s=b.height||C.style.height||C.offsetHeight,u=b.min_height||100,g=/^[0-9\.]+(|px)$/i,g.test(""+i)&&(i=Math.max(parseInt(i,10)+(f.deltaWidth||0),100)),g.test(""+s)&&(s=Math.max(parseInt(s,10)+(f.deltaHeight||0),u)),f=y.theme.renderUI({targetNode:C,width:i,height:s,deltaWidth:b.delta_width,deltaHeight:b.delta_height}),t.setStyles(f.sizeContainer||f.editorContainer,{width:i,height:s}),s=(f.iframeHeight||s)+("number"==typeof s?f.deltaHeight||0:""),u>s&&(s=u)):(f=b.theme(y,C),f.editorContainer.nodeType&&(f.editorContainer=f.editorContainer.id=f.editorContainer.id||y.id+"_parent"),f.iframeContainer.nodeType&&(f.iframeContainer=f.iframeContainer.id=f.iframeContainer.id||y.id+"_iframecontainer"),s=f.iframeHeight||C.offsetHeight,a&&(y.onInit.add(function(e){e.dom.bind(e.getBody(),"beforedeactivate keydown keyup",function(){e.bookmark=e.selection.getBookmark(1)})}),y.onNodeChange.add(function(e){document.activeElement.id==e.id+"_ifr"&&(e.bookmark=e.selection.getBookmark(1))}))),y.editorContainer=f.editorContainer),b.content_css&&r(l(b.content_css),function(e){y.contentCSS.push(y.documentBaseURI.toAbsolute(e))}),b.content_style&&y.contentStyles.push(b.content_style),b.content_editable)return C=o=f=null,y.initContentBody();for(document.domain&&location.hostname!=document.domain&&(e.relaxedDomain=document.domain),y.iframeHTML=b.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">',b.document_base_url!=e.documentBaseURL&&(y.iframeHTML+='<base href="'+y.documentBaseURI.getURI()+'" />'),e.isIE8&&(y.iframeHTML+=b.ie7_compat?'<meta http-equiv="X-UA-Compatible" content="IE=7" />':'<meta http-equiv="X-UA-Compatible" content="IE=edge" />'),y.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',v=0;v<y.contentCSS.length;v++)y.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+y.contentCSS[v]+'" />';y.contentCSS=[],m=b.body_id||"tinymce",-1!=m.indexOf("=")&&(m=y.getParam("body_id","","hash"),m=m[y.id]||m),h=b.body_class||"",-1!=h.indexOf("=")&&(h=y.getParam("body_class","","hash"),h=h[y.id]||""),y.iframeHTML+='</head><body id="'+m+'" class="mceContentBody '+h+'" onload="window.parent.tinyMCE.get(\''+y.id+"').onLoad.dispatch();\"><br></body></html>",e.relaxedDomain&&(a||e.isOpera&&parseFloat(opera.version())<11)&&(p='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+y.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'),o=t.add(f.iframeContainer,"iframe",{id:y.id+"_ifr",src:p||'javascript:""',frameBorder:"0",allowTransparency:"true",title:b.aria_label,style:{width:"100%",height:s,display:"block"}}),y.contentAreaContainer=f.iframeContainer,f.editorContainer&&(t.get(f.editorContainer).style.display=y.orgDisplay),C.style.visibility=y.orgVisibility,t.get(y.id).style.display="none",t.setAttrib(y.id,"aria-hidden",!0),e.relaxedDomain&&p||y.initContentBody(),C=o=f=null},initContentBody:function(){var n,o,i=this,s=i.settings,c=t.get(i.id),d=i.getDoc();a&&e.relaxedDomain||s.content_editable||(d.open(),d.write(i.iframeHTML),d.close(),e.relaxedDomain&&(d.domain=e.relaxedDomain)),s.content_editable&&(t.addClass(c,"mceContentBody"),i.contentDocument=d=s.content_document||document,i.contentWindow=s.content_window||window,i.bodyElement=c,s.content_document=s.content_window=null),n=i.getBody(),n.disabled=!0,s.readonly||(n.contentEditable=i.getParam("content_editable_state",!0)),n.disabled=!1,i.schema=new e.html.Schema(s),i.dom=new e.dom.DOMUtils(d,{keep_values:!0,url_converter:i.convertURL,url_converter_scope:i,hex_colors:s.force_hex_style_colors,class_filter:s.class_filter,update_styles:!0,root_element:s.content_editable?i.id:null,schema:i.schema}),i.parser=new e.html.DomParser(s,i.schema),i.parser.addAttributeFilter("src,href,style",function(e,t){for(var n,o,r,a=e.length,s=i.dom;a--;)n=e[a],o=n.attr(t),r="data-mce-"+t,n.attributes.map[r]||("style"===t?n.attr(r,s.serializeStyle(s.parseStyle(o),n.name)):n.attr(r,i.convertURL(o,t,n.name)))}),i.parser.addNodeFilter("script",function(e){for(var t,n=e.length;n--;)t=e[n],t.attr("type","mce-"+(t.attr("type")||"text/javascript"))}),i.parser.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)t=e[n],t.type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),i.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t){for(var n,o=t.length,r=i.schema.getNonEmptyElements();o--;)n=t[o],n.isEmpty(r)&&(n.empty().append(new e.html.Node("br",1)).shortEnded=!0)}),i.serializer=new e.dom.Serializer(s,i.dom,i.schema),i.selection=new e.dom.Selection(i.dom,i.getWin(),i.serializer,i),i.formatter=new e.Formatter(i),i.undoManager=new e.UndoManager(i),i.forceBlocks=new e.ForceBlocks(i),i.enterKey=new e.EnterKey(i),i.editorCommands=new e.EditorCommands(i),i.onExecCommand.add(function(e,t){/^(FontName|FontSize)$/.test(t)||i.nodeChanged()}),i.serializer.onPreProcess.add(function(e,t){return i.onPreProcess.dispatch(i,t,e)}),i.serializer.onPostProcess.add(function(e,t){return i.onPostProcess.dispatch(i,t,e)}),i.onPreInit.dispatch(i),s.browser_spellcheck||s.gecko_spellcheck||(d.body.spellcheck=!1),s.readonly||i.bindNativeEvents(),i.controlManager.onPostRender.dispatch(i,i.controlManager),i.onPostRender.dispatch(i),i.quirks=e.util.Quirks(i),s.directionality&&(n.dir=s.directionality),s.nowrap&&(n.style.whiteSpace="nowrap"),s.protect&&i.onBeforeSetContent.add(function(e,t){r(s.protect,function(e){t.content=t.content.replace(e,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),i.onSetContent.add(function(){i.addVisual(i.getBody())}),s.padd_empty_editor&&i.onPostProcess.add(function(e,t){t.content=t.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),i.load({initial:!0,format:"html"}),i.startContent=i.getContent({format:"raw"}),i.initialized=!0,i.onInit.dispatch(i),i.execCallback("setupcontent_callback",i.id,n,d),i.execCallback("init_instance_callback",i),i.focus(!0),i.nodeChanged({initial:!0}),i.contentStyles.length>0&&(o="",r(i.contentStyles,function(e){o+=e+"\r\n"}),i.dom.addStyle(o)),r(i.contentCSS,function(e){i.dom.loadCSS(e)}),s.auto_focus&&setTimeout(function(){var t=e.get(s.auto_focus);t.selection.select(t.getBody(),1),t.selection.collapse(1),t.getBody().focus(),t.getWin().focus()},100),c=d=n=null},focus:function(t){var n,o,r,i,a=this,s=a.selection,c=a.settings.content_editable,d=a.getDoc();t||(a.bookmark&&(s.moveToBookmark(a.bookmark),a.bookmark=null),o=s.getRng(),o.item&&(r=o.item(0)),a._refreshContentEditable(),c||a.getWin().focus(),(e.isGecko||c)&&(i=a.getBody(),i.setActive&&!e.isIE11?i.setActive():i.focus(),c&&s.normalize()),r&&r.ownerDocument==d&&(o=d.body.createControlRange(),o.addElement(r),o.select())),e.activeEditor!=a&&(null!=(n=e.activeEditor)&&n.onDeactivate.dispatch(n,a),a.onActivate.dispatch(a,n)),e._setActive(a)},execCallback:function(t){var n,o=this,r=o.settings[t];if(r)return o.callbackLookup&&(n=o.callbackLookup[t])&&(r=n.func,n=n.scope),s(r,"string")&&(n=r.replace(/\.\w+$/,""),n=n?e.resolve(n):0,r=e.resolve(r),o.callbackLookup=o.callbackLookup||{},o.callbackLookup[t]={func:r,scope:n}),r.apply(n||o,Array.prototype.slice.call(arguments,1))},translate:function(t){var n=this.settings.language||"en",o=e.i18n;return t?o[n+"."+t]||t.replace(/\{\#([^\}]+)\}/g,function(e,t){return o[n+"."+t]||"{#"+t+"}"}):""},getLang:function(t,n){return e.i18n[(this.settings.language||"en")+"."+t]||(s(n)?n:"{#"+t+"}")},getParam:function(t,n,o){var i,a=e.trim,c=s(this.settings[t])?this.settings[t]:n;return"hash"===o?(i={},s(c,"string")?r(c.split(c.indexOf("=")>0?/[;,](?![^=;,]*(?:[;,]|$))/:","),function(e){e=e.split("="),i[a(e[0])]=a(e.length>1?e[1]:e)}):i=c,i):c},nodeChanged:function(e){var t,n=this,o=n.selection;n.initialized&&(e=e||{},t=o.getStart()||n.getBody(),t=a&&t.ownerDocument!=n.getDoc()?n.getBody():t,e.parents=[],n.dom.getParent(t,function(t){return"BODY"==t.nodeName?!0:void e.parents.push(t)}),n.onNodeChange.dispatch(n,e?e.controlManager||n.controlManager:n.controlManager,t,o.isCollapsed(),e))},addButton:function(e,t){var n=this;n.buttons=n.buttons||{},n.buttons[e]=t},addCommand:function(e,t,n){this.execCommands[e]={func:t,scope:n||this}},addQueryStateHandler:function(e,t,n){this.queryStateCommands[e]={func:t,scope:n||this}},addQueryValueHandler:function(e,t,n){this.queryValueCommands[e]={func:t,scope:n||this}},addShortcut:function(e,t,n,o){var i,a=this;return a.settings.custom_shortcuts===!1?!1:(a.shortcuts=a.shortcuts||{},s(n,"string")&&(i=n,n=function(){a.execCommand(i,!1,null)}),s(n,"object")&&(i=n,n=function(){a.execCommand(i[0],i[1],i[2])}),r(l(e),function(e){var i={func:n,scope:o||this,desc:a.translate(t),alt:!1,ctrl:!1,shift:!1};r(l(e,"+"),function(e){switch(e){case"alt":case"ctrl":case"shift":i[e]=!0;break;default:i.charCode=e.charCodeAt(0),i.keyCode=e.toUpperCase().charCodeAt(0)}}),a.shortcuts[(i.ctrl?"ctrl":"")+","+(i.alt?"alt":"")+","+(i.shift?"shift":"")+","+i.keyCode]=i}),!0)},execCommand:function(e,t,n,i){var a,s,c=this,d=0;return/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(e)||i&&i.skip_focus||c.focus(),i=o({},i),c.onBeforeExecCommand.dispatch(c,e,t,n,i),i.terminate?!1:c.execCallback("execcommand_callback",c.id,c.selection.getNode(),e,t,n)?(c.onExecCommand.dispatch(c,e,t,n,i),!0):(a=c.execCommands[e])&&(s=a.func.call(a.scope,t,n),s!==!0)?(c.onExecCommand.dispatch(c,e,t,n,i),s):(r(c.plugins,function(o){return o.execCommand&&o.execCommand(e,t,n)?(c.onExecCommand.dispatch(c,e,t,n,i),d=1,!1):void 0}),d?!0:c.theme&&c.theme.execCommand&&c.theme.execCommand(e,t,n)?(c.onExecCommand.dispatch(c,e,t,n,i),!0):c.editorCommands.execCommand(e,t,n)?(c.onExecCommand.dispatch(c,e,t,n,i),!0):(c.getDoc().execCommand(e,t,n),void c.onExecCommand.dispatch(c,e,t,n,i)))},queryCommandState:function(e){var t,n,o=this;if(!o._isHidden()){if((t=o.queryStateCommands[e])&&(n=t.func.call(t.scope),n!==!0))return n;if(t=o.editorCommands.queryCommandState(e),-1!==t)return t;try{return this.getDoc().queryCommandState(e)}catch(r){}}},queryCommandValue:function(e){var t,n,o=this;if(!o._isHidden()){if((t=o.queryValueCommands[e])&&(n=t.func.call(t.scope),n!==!0))return n;if(t=o.editorCommands.queryCommandValue(e),s(t))return t;try{return this.getDoc().queryCommandValue(e)}catch(r){}}},show:function(){var e=this;t.show(e.getContainer()),t.hide(e.id),e.load()},hide:function(){var e=this,n=e.getDoc();a&&n&&n.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,n){return this.onSetProgressState.dispatch(this,e,t,n),e},load:function(e){var t,n=this,o=n.getElement();return o?(e=e||{},e.load=!0,t=n.setContent(s(o.value)?o.value:o.innerHTML,e),e.element=o,e.no_events||n.onLoadContent.dispatch(n,e),e.element=o=null,t):void 0},save:function(e){var n,o,i=this,a=i.getElement();if(a&&i.initialized)return e=e||{},e.save=!0,e.element=a,n=e.content=i.getContent(e),e.no_events||i.onSaveContent.dispatch(i,e),n=e.content,/TEXTAREA|INPUT/i.test(a.nodeName)?a.value=n:(a.innerHTML=n,(o=t.getParent(i.id,"form"))&&r(o.elements,function(e){return e.name==i.id?(e.value=n,!1):void 0})),e.element=a=null,n},setContent:function(t,n){var o,r=this,i=r.getBody();return n=n||{},n.format=n.format||"html",n.set=!0,n.content=t,n.no_events||r.onBeforeSetContent.dispatch(r,n),t=n.content,e.isIE||0!==t.length&&!/^\s+$/.test(t)?("raw"!==n.format&&(t=new e.html.Serializer({},r.schema).serialize(r.parser.parse(t))),n.content=e.trim(t),r.dom.setHTML(i,n.content),n.no_events||r.onSetContent.dispatch(r,n),r.settings.content_editable&&document.activeElement!==r.getBody()||r.selection.normalize(),n.content):(o=r.settings.forced_root_block,t=o?"<"+o+'><br data-mce-bogus="1"></'+o+">":'<br data-mce-bogus="1">',i.innerHTML=t,r.selection.select(i,!0),void r.selection.collapse(!0))},getContent:function(t){var n,o=this,r=o.getBody();return t=t||{},t.format=t.format||"html",t.get=!0,t.getInner=!0,t.no_events||o.onBeforeGetContent.dispatch(o,t),n="raw"==t.format?r.innerHTML:"text"==t.format?r.innerText||r.textContent:o.serializer.serialize(r,t),t.content="text"!=t.format?e.trim(n):n,t.no_events||o.onGetContent.dispatch(o,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,n=this;return n.contentWindow||(e=t.get(n.id+"_ifr"),e&&(n.contentWindow=e.contentWindow)),n.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,n){var o=this,r=o.settings;return r.urlconverter_callback?o.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")?e:r.relative_urls?o.documentBaseURI.toRelative(e):e=o.documentBaseURI.toAbsolute(e,r.remove_script_host)},addVisual:function(e){var t,n=this,o=n.settings,i=n.dom;e=e||n.getBody(),s(n.hasVisual)||(n.hasVisual=o.visual),r(i.select("table,a",e),function(e){var r;switch(e.nodeName){case"TABLE":return t=o.visual_table_class||"mceItemTable",r=i.getAttrib(e,"border"),void(r&&"0"!=r||(n.hasVisual?i.addClass(e,t):i.removeClass(e,t)));case"A":return void(i.getAttrib(e,"href",!1)||(r=i.getAttrib(e,"name")||e.id,t="mceItemAnchor",r&&(n.hasVisual?i.addClass(e,t):i.removeClass(e,t))))}}),n.onVisualAid.dispatch(n,e,n.hasVisual)},remove:function(){var o=this,r=o.getContainer(),i=o.getDoc();o.removed||(o.removed=1,a&&i&&i.execCommand("SelectAll"),o.save(),t.setStyle(o.id,"display",o.orgDisplay),o.settings.content_editable||(n.unbind(o.getWin()),n.unbind(o.getDoc())),n.unbind(o.getBody()),n.clear(r),o.execCallback("remove_instance_callback",o),o.onRemove.dispatch(o),o.onExecCommand.listeners=[],e.remove(o),t.remove(r))},destroy:function(t){var o=this;o.destroyed||(i&&(n.unbind(o.getDoc()),n.unbind(o.getWin()),n.unbind(o.getBody())),t||(e.removeUnload(o.destroy),tinyMCE.onBeforeUnload.remove(o._beforeUnload),o.theme&&o.theme.destroy&&o.theme.destroy(),o.controlManager.destroy(),o.selection.destroy(),o.dom.destroy()),o.formElement&&(o.formElement.submit=o.formElement._mceOldSubmit,o.formElement._mceOldSubmit=null),o.contentAreaContainer=o.formElement=o.container=o.settings.content_element=o.bodyElement=o.contentDocument=o.contentWindow=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),o.destroyed=1)},_refreshContentEditable:function(){var e,t,n=this;n._isHidden()&&(e=n.getBody(),t=e.parentNode,t.removeChild(e),t.appendChild(e),e.focus())},_isHidden:function(){var e;return i?(e=this.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}})}(tinymce),function(e){var t=e.each;e.Editor.prototype.setupEvents=function(){var n=this,o=n.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){n[t]=new e.util.Dispatcher(n)}),o.cleanup_callback&&(n.onBeforeSetContent.add(function(e,t){t.content=e.execCallback("cleanup_callback","insert_to_editor",t.content,t)}),n.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)}),n.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))})),o.save_callback&&n.onGetContent.add(function(e,t){t.save&&(t.content=e.execCallback("save_callback",e.id,t.content,e.getBody()))}),o.handle_event_callback&&n.onEvent.add(function(e,t,o){n.execCallback("handle_event_callback",t,e,o)===!1&&(t.preventDefault(),t.stopPropagation())}),o.handle_node_change_callback&&n.onNodeChange.add(function(e,t,n){e.execCallback("handle_node_change_callback",e.id,n,-1,-1,!0,e.selection.isCollapsed())}),o.save_callback&&n.onSaveContent.add(function(e,t){var n=e.execCallback("save_callback",e.id,t.content,e.getBody());n&&(t.content=n)}),o.onchange_callback&&n.onChange.add(function(e,t){e.execCallback("onchange_callback",e,t)})},e.Editor.prototype.bindNativeEvents=function(){function n(e,t){e.type;s.removed||s.onEvent.dispatch(s,e,t)!==!1&&s[a[e.fakeType||e.type]].dispatch(s,e,t)}function o(){s.focus(!0)}function r(t,n){65==n.keyCode&&e.VK.metaKeyPressed(n)||s.selection.normalize(),s.nodeChanged()}function i(n,o){(n.altKey||n.ctrlKey||n.metaKey)&&t(s.shortcuts,function(t){var r=e.isMac?n.metaKey:n.ctrlKey;if(t.ctrl==r&&t.alt==n.altKey&&t.shift==n.shiftKey)return n.keyCode==t.keyCode||n.charCode&&n.charCode==t.charCode?(n.preventDefault(),o&&t.func.call(t.scope),!0):void 0})}var a,s=this,c=s.settings,d=s.dom;a={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"},t(a,function(t,o){var r=c.content_editable?s.getBody():s.getDoc();switch(o){case"contextmenu":d.bind(r,o,n);break;case"paste":d.bind(s.getBody(),o,n);break;case"submit":case"reset":d.bind(s.getElement().form||e.DOM.getParent(s.id,"form"),o,n);break;default:d.bind(r,o,n)}}),d.bind(c.content_editable?s.getBody():e.isGecko?s.getDoc():s.getWin(),"focus",function(){s.focus(!0)}),c.content_editable&&e.isOpera&&(d.bind(s.getBody(),"click",o),d.bind(s.getBody(),"keydown",o)),s.onMouseUp.add(r),s.onKeyUp.add(function(t,n){var o=n.keyCode;(o>=33&&36>=o||o>=37&&40>=o||13==o||45==o||46==o||8==o||e.isMac&&(91==o||93==o)||n.ctrlKey)&&r(t,n)}),s.onReset.add(function(){s.setContent(s.startContent,{format:"raw"})}),s.onKeyUp.add(function(e,t){i(t)}),s.onKeyPress.add(function(e,t){i(t)}),s.onKeyDown.add(function(e,t){i(t,!0)}),e.isOpera&&s.onClick.add(function(e,t){t.preventDefault()})}}(tinymce),function(e){var t,n=e.each,o=!0,r=!1;e.EditorCommands=function(i){function a(e,t,n){var i;return e=e.toLowerCase(),(i=y.exec[e])?(i(e,t,n),o):r}function s(e){var t;return e=e.toLowerCase(),(t=y.state[e])?t(e):-1}function c(e){var t;return e=e.toLowerCase(),(t=y.value[e])?t(e):r}function d(e,t){t=t||"exec",n(e,function(e,o){n(o.toLowerCase().split(","),function(n){y[t][n]=e})})}function l(e,n,o){return n===t&&(n=r),o===t&&(o=null),i.getDoc().execCommand(e,n,o)}function u(e){return C.match(e)}function f(e,n){C.toggle(e,n?{value:n}:t)}function p(e){h=v.getBookmark(e)}function m(){v.moveToBookmark(h)}var h,g=i.dom,v=i.selection,y={state:{},exec:{},value:{}},b=i.settings,C=i.formatter;e.extend(this,{execCommand:a,queryCommandState:s,queryCommandValue:c,addCommands:d}),d({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){i.undoManager.add()},"Cut,Copy,Paste":function(t){var n,r=i.getDoc();try{l(t)}catch(a){n=o}(n||!r.queryCommandSupported(t))&&(e.isGecko?i.windowManager.confirm(i.getLang("clipboard_msg"),function(e){e&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):i.windowManager.alert(i.getLang("clipboard_no_support")))},unlink:function(e){v.isCollapsed()&&v.select(v.getNode()),l(e),v.collapse(r)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t=e.substring(7);n("left,center,right,full".split(","),function(e){t!=e&&C.remove("align"+e)}),f("align"+t),a("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;l(e),t=g.getParent(v.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(p(),g.split(n,t),m()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){f(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){f(e,n)},FontSize:function(t,n,o){var r,i;o>=1&&7>=o&&(i=e.explode(b.font_size_style_values),r=e.explode(b.font_size_classes),o=r?r[o-1]||o:i[o-1]||o),f(t,o)},RemoveFormat:function(e){C.remove(e)},mceBlockQuote:function(){f("blockquote")},FormatBlock:function(e,t,n){return f(n||"p")},mceCleanup:function(){var e=v.getBookmark();i.setContent(i.getContent({cleanup:o}),{cleanup:o}),v.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||v.getNode();r!=i.getBody()&&(p(),i.dom.remove(r,o),m())},mceSelectNodeDepth:function(e,t,n){var o=0;g.getParent(v.getNode(),function(e){return 1==e.nodeType&&o++==n?(v.select(e),r):void 0},i.getBody())},mceSelectNode:function(e,t,n){v.select(n)},mceInsertContent:function(t,n,o){var r,a,s,c,d,l,u,f,p,m,h,y,b,C;if(r=i.parser,a=new e.html.Serializer({},i.schema),b='<span id="mce_marker" data-mce-type="bookmark">\ufeff</span>',l={content:o,format:"html"},v.onBeforeSetContent.dispatch(v,l),o=l.content,-1==o.indexOf("{$caret}")&&(o+="{$caret}"),o=o.replace(/\{\$caret\}/,b),v.isCollapsed()||i.getDoc().execCommand("Delete",!1,null),s=v.getNode(),l={context:s.nodeName.toLowerCase()},d=r.parse(o,l),h=d.lastChild,"mce_marker"==h.attr("id"))for(u=h,h=h.prev;h;h=h.walk(!0))if(3==h.type||!g.isBlock(h.name)){h.parent.insert(u,h,"br"===h.name);break}if(l.invalid){for(v.setContent(b),s=v.getNode(),c=i.getBody(),9==s.nodeType?s=h=c:h=s;h!==c;)s=h,h=h.parentNode;o=s==c?c.innerHTML:g.getOuterHTML(s),o=a.serialize(r.parse(o.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return a.serialize(d)}))),s==c?g.setHTML(c,o):g.setOuterHTML(s,o)}else o=a.serialize(d),h=s.firstChild,y=s.lastChild,!h||h===y&&"BR"===h.nodeName?g.setHTML(s,o):v.setContent(o);u=g.get("mce_marker"),f=g.getRect(u),p=g.getViewPort(i.getWin()),(f.y+f.h>p.y+p.h||f.y<p.y||f.x>p.x+p.w||f.x<p.x)&&(C=e.isIE?i.getDoc().documentElement:i.getBody(),C.scrollLeft=f.x,C.scrollTop=f.y-p.h+25),m=g.createRng(),h=u.previousSibling,h&&3==h.nodeType?m.setStart(h,h.nodeValue.length):(m.setStartBefore(u),m.setEndBefore(u)),g.remove(u),v.setRng(m),v.onSetContent.dispatch(v,l),i.addVisual()},mceInsertRawHTML:function(e,t,n){v.setContent("tiny_mce_marker"),i.setContent(i.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){f(n)},mceSetContent:function(e,t,n){i.setContent(n)},"Indent,Outdent":function(e){var t,o,r;t=b.indentation,o=/[a-z%]+$/i.exec(t),t=parseInt(t),s("InsertUnorderedList")||s("InsertOrderedList")?l(e):(b.forced_root_block||g.getParent(v.getNode(),g.isBlock)||C.apply("div"),n(v.getSelectedBlocks(),function(n){"outdent"==e?(r=Math.max(0,parseInt(n.style.paddingLeft||0)-t),g.setStyle(n,"paddingLeft",r?r+o:"")):g.setStyle(n,"paddingLeft",parseInt(n.style.paddingLeft||0)+t+o)}))},mceRepaint:function(){if(e.isGecko)try{p(o),v.getSel()&&v.getSel().selectAllChildren(i.getBody()),v.collapse(o),m()}catch(t){}},mceToggleFormat:function(e,t,n){C.toggle(n)},InsertHorizontalRule:function(){i.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){i.hasVisual=!i.hasVisual,i.addVisual()},mceReplaceContent:function(e,t,n){i.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,v.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var o;"string"==typeof n&&(n={href:n}),o=g.getParent(v.getNode(),"a"),n.href=n.href.replace(" ","%20"),o&&n.href||C.remove("link"),n.href&&C.apply("link",n,o)
12
- },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)):l("SelectAll")}}),d({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(t){var n="align"+t.substring(7),r=v.isCollapsed()?[g.getParent(v.getNode(),g.isBlock)]:v.getSelectedBlocks(),i=e.map(r,function(e){return!!C.matchNode(e,n)});return-1!==e.inArray(i,o)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return u(e)},mceBlockQuote:function(){return u("blockquote")},Outdent:function(){var e;if(b.inline_styles){if((e=g.getParent(v.getStart(),g.isBlock))&&parseInt(e.style.paddingLeft)>0)return o;if((e=g.getParent(v.getEnd(),g.isBlock))&&parseInt(e.style.paddingLeft)>0)return o}return s("InsertUnorderedList")||s("InsertOrderedList")||!b.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"),d({"FontSize,FontName":function(e){var t,n=0;return(t=g.getParent(v.getNode(),"span"))&&(n="fontsize"==e?t.style.fontSize:t.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),n}},"value"),d({Undo:function(){i.undoManager.undo()},Redo:function(){i.undoManager.redo()}})}}(tinymce),function(e){var t=e.util.Dispatcher;e.UndoManager=function(n){function o(){return e.trim(n.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function r(){i.typing=!1,i.add()}var i,a,s,c,d,l=0,u=[];return onBeforeAdd=new t(i),s=new t(i),c=new t(i),d=new t(i),s.add(function(e,t){return e.hasUndo()?n.onChange.dispatch(n,t,e):void 0}),c.add(function(e,t){return n.onUndo.dispatch(n,t,e)}),d.add(function(e,t){return n.onRedo.dispatch(n,t,e)}),n.onInit.add(function(){i.add()}),n.onBeforeExecCommand.add(function(e,t,n,o,r){"Undo"==t||"Redo"==t||"mceRepaint"==t||r&&r.skip_undo||i.beforeChange()}),n.onExecCommand.add(function(e,t,n,o,r){"Undo"==t||"Redo"==t||"mceRepaint"==t||r&&r.skip_undo||i.add()}),n.onSaveContent.add(r),n.dom.bind(n.dom.getRoot(),"dragend",r),n.dom.bind(n.getBody(),"focusout",function(){!n.removed&&i.typing&&r()}),n.onKeyUp.add(function(e,t){var n=t.keyCode;(n>=33&&36>=n||n>=37&&40>=n||45==n||13==n||t.ctrlKey)&&r()}),n.onKeyDown.add(function(e,t){var n=t.keyCode;return n>=33&&36>=n||n>=37&&40>=n||45==n?void(i.typing&&r()):void((16>n||n>20)&&224!=n&&91!=n&&!i.typing&&(i.beforeChange(),i.typing=!0,i.add()))}),n.onMouseDown.add(function(){i.typing&&r()}),n.addShortcut("ctrl+z","undo_desc","Undo"),n.addShortcut("ctrl+y","redo_desc","Redo"),i={data:u,typing:!1,onBeforeAdd:onBeforeAdd,onAdd:s,onUndo:c,onRedo:d,beforeChange:function(){a=n.selection.getBookmark(2,!0)},add:function(e){var t,r,s=n.settings;if(e=e||{},e.content=o(),i.onBeforeAdd.dispatch(i,e),r=u[l],r&&r.content==e.content)return null;if(u[l]&&(u[l].beforeBookmark=a),s.custom_undo_redo_levels&&u.length>s.custom_undo_redo_levels){for(t=0;t<u.length-1;t++)u[t]=u[t+1];u.length--,l=u.length}return e.bookmark=n.selection.getBookmark(2,!0),l<u.length-1&&(u.length=l+1),u.push(e),l=u.length-1,i.onAdd.dispatch(i,e),n.isNotDirty=0,e},undo:function(){var e;return i.typing&&(i.add(),i.typing=!1),l>0&&(e=u[--l],n.setContent(e.content,{format:"raw"}),n.selection.moveToBookmark(e.beforeBookmark),i.onUndo.dispatch(i,e)),e},redo:function(){var e;return l<u.length-1&&(e=u[++l],n.setContent(e.content,{format:"raw"}),n.selection.moveToBookmark(e.bookmark),i.onRedo.dispatch(i,e)),e},clear:function(){u=[],l=0,i.typing=!1},hasUndo:function(){return l>0||this.typing},hasRedo:function(){return l<u.length-1&&!this.typing}}}}(tinymce),tinymce.ForceBlocks=function(e){function t(){var t,a,s,c,d,l,u,f,p,m=r.getStart(),h=e.getBody(),g=-16777215;if(m&&1===m.nodeType&&n.forced_root_block){for(;m&&m!=h;){if(i[m.nodeName])return;m=m.parentNode}for(t=r.getRng(),t.setStart?(a=t.startContainer,s=t.startOffset,c=t.endContainer,d=t.endOffset):(t.item&&(m=t.item(0),t=e.getDoc().body.createTextRange(),t.moveToElementText(m)),p=t.parentElement().ownerDocument===e.getDoc(),tmpRng=t.duplicate(),tmpRng.collapse(!0),s=-1*tmpRng.move("character",g),tmpRng.collapsed||(tmpRng=t.duplicate(),tmpRng.collapse(!1),d=-1*tmpRng.move("character",g)-s)),m=h.firstChild;m;)if(3===m.nodeType||1==m.nodeType&&!i[m.nodeName]){if(3===m.nodeType&&0==m.nodeValue.length){u=m,m=m.nextSibling,o.remove(u);continue}l||(l=o.create(n.forced_root_block),m.parentNode.insertBefore(l,m),f=!0),u=m,m=m.nextSibling,l.appendChild(u)}else l=null,m=m.nextSibling;if(f){if(t.setStart)t.setStart(a,s),t.setEnd(c,d),r.setRng(t);else if(p)try{t=e.getDoc().body.createTextRange(),t.moveToElementText(h),t.collapse(!0),t.moveStart("character",s),d>0&&t.moveEnd("character",d),t.select()}catch(v){}e.nodeChanged()}}}var n=e.settings,o=e.dom,r=e.selection,i=e.schema.getBlockElements();n.forced_root_block&&(e.onKeyUp.add(t),e.onNodeChange.add(t))},function(e){var t=(e.DOM,e.dom.Event),n=e.each,o=e.extend;e.create("tinymce.ControlManager",{ControlManager:function(t,o){var r=this;o=o||{},r.editor=t,r.controls={},r.onAdd=new e.util.Dispatcher(r),r.onPostRender=new e.util.Dispatcher(r),r.prefix=o.prefix||t.id+"_",r._cls={},r.onPostRender.add(function(){n(r.controls,function(e){e.postRender()})})},get:function(e){return this.controls[this.prefix+e]||this.controls[e]},setActive:function(e,t){var n=null;return(n=this.get(e))&&n.setActive(t),n},setDisabled:function(e,t){var n=null;return(n=this.get(e))&&n.setDisabled(t),n},add:function(e){var t=this;return e&&(t.controls[e.id]=e,t.onAdd.dispatch(e,t)),e},createControl:function(e){var t,o,r,i,a=this,s=a.editor;for(a.controlFactories||(a.controlFactories=[],n(s.plugins,function(e){e.createControl&&a.controlFactories.push(e)})),i=a.controlFactories,o=0,r=i.length;r>o;o++)if(t=i[o].createControl(e,a))return a.add(t);return"|"===e||"separator"===e?a.createSeparator():s.buttons&&(t=s.buttons[e])?a.createButton(e,t):a.add(t)},createDropMenu:function(t,n,r){var i,a,s,c,d=this,l=d.editor;return n=o({"class":"mceDropDown",constrain:l.settings.constrain_menus},n),n["class"]=n["class"]+" "+l.getParam("skin")+"Skin",(s=l.getParam("skin_variant"))&&(n["class"]+=" "+l.getParam("skin")+"Skin"+s.substring(0,1).toUpperCase()+s.substring(1)),n["class"]+="rtl"==l.settings.directionality?" mceRtl":"",t=d.prefix+t,c=r||d._cls.dropmenu||e.ui.DropMenu,i=d.controls[t]=new c(t,n),i.onAddItem.add(function(e,t){var n=t.settings;n.title=l.getLang(n.title,n.title),n.onclick||(n.onclick=function(){n.cmd&&l.execCommand(n.cmd,n.ui||!1,n.value)})}),l.onRemove.add(function(){i.destroy()}),e.isIE&&(i.onShowMenu.add(function(){l.focus(),a=l.selection.getBookmark(1)}),i.onHideMenu.add(function(){a&&(l.selection.moveToBookmark(a),a=0)})),d.add(i)},createListBox:function(n,r,i){function a(t){return t.settings.use_accessible_selects&&!e.isGecko}var s,c,d=this,l=d.editor;return d.get(n)?null:(r.title=l.translate(r.title),r.scope=r.scope||l,r.onselect||(r.onselect=function(e){l.execCommand(r.cmd,r.ui||!1,e||r.value)}),r=o({title:r.title,"class":"mce_"+n,scope:r.scope,control_manager:d},r),n=d.prefix+n,l.settings.use_native_selects||a(l)?s=new e.ui.NativeListBox(n,r):(c=i||d._cls.listbox||e.ui.ListBox,s=new c(n,r,l)),d.controls[n]=s,e.isWebKit&&s.onPostRender.add(function(e,n){t.add(n,"mousedown",function(){l.bookmark=l.selection.getBookmark(1)}),t.add(n,"focus",function(){l.selection.moveToBookmark(l.bookmark),l.bookmark=null})}),s.hideMenu&&l.onMouseDown.add(s.hideMenu,s),d.add(s))},createButton:function(t,n,r){var i,a,s=this,c=s.editor;return s.get(t)?null:(n.title=c.translate(n.title),n.label=c.translate(n.label),n.scope=n.scope||c,n.onclick||n.menu_button||(n.onclick=function(){c.execCommand(n.cmd,n.ui||!1,n.value)}),n=o({title:n.title,"class":"mce_"+t,unavailable_prefix:c.getLang("unavailable",""),scope:n.scope,control_manager:s},n),t=s.prefix+t,n.menu_button?(a=r||s._cls.menubutton||e.ui.MenuButton,i=new a(t,n,c),c.onMouseDown.add(i.hideMenu,i)):(a=s._cls.button||e.ui.Button,i=new a(t,n,c)),s.add(i))},createMenuButton:function(e,t,n){return t=t||{},t.menu_button=1,this.createButton(e,t,n)},createSplitButton:function(t,n,r){var i,a,s=this,c=s.editor;return s.get(t)?null:(n.title=c.translate(n.title),n.scope=n.scope||c,n.onclick||(n.onclick=function(e){c.execCommand(n.cmd,n.ui||!1,e||n.value)}),n.onselect||(n.onselect=function(e){c.execCommand(n.cmd,n.ui||!1,e||n.value)}),n=o({title:n.title,"class":"mce_"+t,scope:n.scope,control_manager:s},n),t=s.prefix+t,a=r||s._cls.splitbutton||e.ui.SplitButton,i=s.add(new a(t,n,c)),c.onMouseDown.add(i.hideMenu,i),i)},createColorSplitButton:function(t,n,r){var i,a,s,c=this,d=c.editor;return c.get(t)?null:(n.title=d.translate(n.title),n.scope=n.scope||d,n.onclick||(n.onclick=function(t){e.isIE&&(s=d.selection.getBookmark(1)),d.execCommand(n.cmd,n.ui||!1,t||n.value)}),n.onselect||(n.onselect=function(e){d.execCommand(n.cmd,n.ui||!1,e||n.value)}),n=o({title:n.title,"class":"mce_"+t,menu_class:d.getParam("skin")+"Skin",scope:n.scope,more_colors_title:d.getLang("more_colors")},n),t=c.prefix+t,a=r||c._cls.colorsplitbutton||e.ui.ColorSplitButton,i=new a(t,n,d),d.onMouseDown.add(i.hideMenu,i),d.onRemove.add(function(){i.destroy()}),e.isIE&&(i.onShowMenu.add(function(){d.focus(),s=d.selection.getBookmark(1)}),i.onHideMenu.add(function(){s&&(d.selection.moveToBookmark(s),s=0)})),c.add(i))},createToolbar:function(t,n,o){var r,i,a=this;return t=a.prefix+t,i=o||a._cls.toolbar||e.ui.Toolbar,r=new i(t,n,a.editor),a.get(t)?null:a.add(r)},createToolbarGroup:function(t,n,o){var r,i,a=this;return t=a.prefix+t,i=o||this._cls.toolbarGroup||e.ui.ToolbarGroup,r=new i(t,n,a.editor),a.get(t)?null:a.add(r)},createSeparator:function(t){var n=t||this._cls.separator||e.ui.Separator;return new n},setControlType:function(e,t){return this._cls[e.toLowerCase()]=t},destroy:function(){n(this.controls,function(e){e.destroy()}),this.controls=null}})}(tinymce),function(e){var t=e.util.Dispatcher,n=e.each,o=e.isIE,r=e.isOpera;e.create("tinymce.WindowManager",{WindowManager:function(e){var n=this;n.editor=e,n.onOpen=new t(n),n.onClose=new t(n),n.params={},n.features={}},open:function(t,i){var a,s,c,d,l=this,u="",f="modal"==l.editor.settings.dialog_type,p=e.DOM.getViewPort();t=t||{},i=i||{},s=r?p.w:screen.width,c=r?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(s/2)-t.width/2,t.top=t.top||parseInt(c/2)-t.height/2,i.inline=!1,i.mce_width=t.width,i.mce_height=t.height,i.mce_auto_focus=t.auto_focus,f&&o&&(t.center=!0,t.help=!1,t.dialogWidth=t.width+"px",t.dialogHeight=t.height+"px",t.scroll=t.scrollbars||!1),n(t,function(t,n){e.is(t,"boolean")&&(t=t?"yes":"no"),/^(name|url)$/.test(n)||(u+=o&&f?(u?";":"")+n+":"+t:(u?",":"")+n+"="+t)}),l.features=t,l.params=i,l.onOpen.dispatch(l,t,i),d=t.url||t.file,d=e._addVer(d);try{o&&f?(a=1,window.showModalDialog(d,window,u)):a=window.open(d,t.name,u)}catch(m){}a||alert(l.editor.getLang("popup_blocked"))},close:function(e){e.close(),this.onClose.dispatch(this)},createInstance:function(t,n,o,r,i,a){var s=e.resolve(t);return new s(n,o,r,i,a)},confirm:function(e,t,n,o){o=o||window,t.call(n||this,o.confirm(this._decode(this.editor.getLang(e,e))))},alert:function(e,t,n,o){var r=this;o=o||window,o.alert(r._decode(r.editor.getLang(e,e))),t&&t.call(n||r)},resizeBy:function(e,t,n){n.resizeBy(e,t)},_decode:function(t){return e.DOM.decode(t).replace(/\\n/g,"\n")}})}(tinymce),function(e){e.Formatter=function(t){function n(e){return e.nodeType&&(e=e.nodeName),!!t.schema.getTextBlockElements()[e.toLowerCase()]}function o(e,t){return P.getParents(e,t,P.getRoot())}function r(e){return 1===e.nodeType&&"_mce_caret"===e.id}function i(){c({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,n){D(n,function(t,n){P.setAttrib(e,n,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}]}),D("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(e){c(e,{block:e,remove:"all"})}),c(t.settings.formats)}function a(){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 s(e){return e?I[e]:I}function c(e,t){e&&("string"!=typeof e?D(e,function(e,t){c(t,e)}):(t=t.length?t:[t],D(t,function(e){e.deep===L&&(e.deep=!e.selector),e.split===L&&(e.split=!e.selector||e.inline),e.remove===L&&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+/))}),I[e]=t))}function d(o,i,a){function c(e,t){t=t||b,e&&(t.onformat&&t.onformat(e,t,i,a),D(t.styles,function(t,n){P.setStyle(e,n,C(t,i))}),D(t.attributes,function(t,n){P.setAttrib(e,n,C(t,i))}),D(t.classes,function(t){t=C(t,i),P.hasClass(e,t)||P.addClass(e,t)}))}function l(){function e(e,t){var n=new H(t);for(a=n.current();a;a=n.prev())if(a.childNodes.length>1||a==e||"BR"==a.tagName)return a}var n=t.selection.getRng(),o=n.startContainer,r=n.endContainer;if(o!=r&&0===n.endOffset){var i=e(o,r),s=3==i.nodeType?i.length:i.childNodes.length;n.setEnd(i,s)}return n}function u(t,n,o,r,i){var a,s,c=[],d=-1,l=-1,u=-1;return D(t.childNodes,function(e,t){return"UL"===e.nodeName||"OL"===e.nodeName?(d=t,a=e,!1):void 0}),D(t.childNodes,function(e,t){"SPAN"===e.nodeName&&"bookmark"==P.getAttrib(e,"data-mce-type")&&(e.id==n.id+"_start"?l=t:e.id==n.id+"_end"&&(u=t))}),0>=d||d>l&&u>d?(D(e.grep(t.childNodes),i),0):(s=P.clone(o,j),D(e.grep(t.childNodes),function(e,t){(d>l&&d>t||l>d&&t>d)&&(c.push(e),e.parentNode.removeChild(e))}),d>l?t.insertBefore(s,a):l>d&&t.insertBefore(s,a.nextSibling),r.push(s),D(c,function(e){s.appendChild(e)}),s)}function p(t,a,s){var d,l,p=[],m=!0;d=b.inline||b.block,l=P.create(d),c(l),F.walk(t,function(t){function h(t){var C,x,E,S,k;return k=m,C=t.nodeName.toLowerCase(),x=t.parentNode.nodeName.toLowerCase(),1===t.nodeType&&G(t)&&(k=m,m="true"===G(t),S=!0),y(C,"br")?(v=0,void(b.block&&P.remove(t))):b.wrapper&&f(t,o,i)?void(v=0):m&&!S&&b.block&&!b.wrapper&&n(C)?(t=P.rename(t,d),c(t),p.push(t),void(v=0)):b.selector&&(D(g,function(e){"collapsed"in e&&e.collapsed!==_||P.is(t,e.selector)&&!r(t)&&(c(t,e),E=!0)}),!b.inline||E)?void(v=0):void(!m||S||!U(d,C)||!U(x,d)||!s&&3===t.nodeType&&1===t.nodeValue.length&&65279===t.nodeValue.charCodeAt(0)||r(t)||b.inline&&V(t)?"li"==C&&a?v=u(t,a,l,p,h):(v=0,D(e.grep(t.childNodes),h),S&&(m=k),v=0):(v||(v=P.clone(l,j),t.parentNode.insertBefore(v,t),p.push(v)),v.appendChild(t)))}var v;D(t,h)}),b.wrap_links===!1&&D(p,function(t){function n(t){var o,r,i;if("A"===t.nodeName){for(r=P.clone(l,j),p.push(r),i=e.grep(t.childNodes),o=0;o<i.length;o++)r.appendChild(i[o]);t.appendChild(r)}D(e.grep(t.childNodes),n)}n(t)}),D(p,function(e){function t(e){var t=0;return D(e.childNodes,function(e){x(e)||N(e)||t++}),t}function n(e){var t,n;return D(e.childNodes,function(e){return 1!=e.nodeType||N(e)||r(e)?void 0:(t=e,j)}),t&&v(t,b)&&(n=P.clone(t,j),c(n),P.replace(n,e,W),P.remove(t,1)),n||e}var a;if(a=t(e),(p.length>1||!V(e))&&0===a)return void P.remove(e,1);if(b.inline||b.wrapper){if(b.exact||1!==a||(e=n(e)),D(g,function(t){D(P.select(t.inline,e),function(e){var n;if(t.wrap_links===!1){n=e.parentNode;do if("A"===n.nodeName)return;while(n=n.parentNode)}S(t,i,e,t.exact?e:null)})}),f(e.parentNode,o,i))return P.remove(e,1),e=0,W;b.merge_with_parents&&P.getParent(e.parentNode,function(t){return f(t,o,i)?(P.remove(e,1),e=0,W):void 0}),e&&b.merge_siblings!==!1&&(e=T(w(e),e),e=T(e,w(e,W)))}})}var m,h,g=s(o),b=g[0],_=O.isCollapsed();if(b)if(a)a.nodeType?(h=P.createRng(),h.setStartBefore(a),h.setEndAfter(a),p(E(h,g),null,!0)):p(a,null,!0);else if(_&&b.inline&&!P.select("td.mceSelected,th.mceSelected").length)B("apply",o,i);else{var k=t.selection.getNode();z||!g[0].defaultBlock||P.getParent(k,P.isBlock)||d(g[0].defaultBlock),t.selection.setRng(l()),m=O.getBookmark(),p(E(O.getRng(W),g),m),b.styles&&(b.styles.color||b.styles.textDecoration)&&(e.walk(k,X,"childNodes"),X(k)),O.moveToBookmark(m),M(O.getRng(W)),t.nodeChanged()}}function l(n,r,i){function a(t){var n,o,i,s,c;if(3!==t.nodeType){if(1===t.nodeType&&G(t)&&(s=b,b="true"===G(t),c=!0),n=e.grep(t.childNodes),b&&!c)for(o=0,i=v.length;i>o&&!S(v[o],r,t,t);o++);if(y.deep&&n.length){for(o=0,i=n.length;i>o;o++)a(n[o]);c&&(b=s)}}}function c(e){var t;return D(o(e.parentNode).reverse(),function(e){var o;t||"_start"==e.id||"_end"==e.id||(o=f(e,n,r),o&&o.split!==!1&&(t=e))}),t}function d(e,t,n,o){var i,a,s,c,d,l;if(e){for(l=e.parentNode,i=t.parentNode;i&&i!=l;i=i.parentNode){for(a=P.clone(i,j),d=0;d<v.length;d++)if(S(v[d],r,a,a)){a=0;break}a&&(s&&a.appendChild(s),c||(c=a),s=a)}!o||y.mixed&&V(e)||(t=P.split(e,t)),s&&(n.parentNode.insertBefore(s,n),c.appendChild(n))}return t}function l(e){return d(c(e),e,e,!0)}function u(e){var t=P.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return N(n)&&(n=n[e?"firstChild":"lastChild"]),P.remove(t,!0),n}function m(e){var n,o;e=E(e,v,W),y.split&&(n=A(e,W),o=A(e),n!=o?(/^(TR|TD)$/.test(n.nodeName)&&n.firstChild&&(n=("TD"==n.nodeName?n.firstChild:n.firstChild.firstChild)||n),n=_(n,"span",{id:"_start","data-mce-type":"bookmark"}),o=_(o,"span",{id:"_end","data-mce-type":"bookmark"}),l(n),l(o),n=u(W),o=u()):n=o=l(n),e.startContainer=n.parentNode,e.startOffset=q(n),e.endContainer=o.parentNode,e.endOffset=q(o)+1),F.walk(e,function(e){D(e,function(e){a(e),1===e.nodeType&&"underline"===t.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===Y(e.parentNode)&&S({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var h,g,v=s(n),y=v[0],b=!0;return i?void(i.nodeType?(g=P.createRng(),g.setStartBefore(i),g.setEndAfter(i),m(g)):m(i)):void(O.isCollapsed()&&y.inline&&!P.select("td.mceSelected,th.mceSelected").length?B("remove",n,r):(h=O.getBookmark(),m(O.getRng(W)),O.moveToBookmark(h),y.inline&&p(n,r,O.getStart())&&M(O.getRng(!0)),t.nodeChanged()))}function u(e,t,n){var o=s(e);!p(e,t,n)||"toggle"in o[0]&&!o[0].toggle?d(e,t,n):l(e,t,n)}function f(e,t,n,o){function r(e,t,r){var i,a,s,c=t[r];if(t.onmatch)return t.onmatch(e,t,r);if(c)if(c.length===L){for(i in c)if(c.hasOwnProperty(i)){if(a="attributes"===r?P.getAttrib(e,i):b(e,i),o&&!a&&!t.exact)return;if((!o||t.exact)&&!y(a,C(c[i],n)))return}}else for(s=0;s<c.length;s++)if("attributes"===r?P.getAttrib(e,c[s]):b(e,c[s]))return t;return t}var i,a,c,d=s(t);if(d&&e)for(a=0;a<d.length;a++)if(i=d[a],v(e,i)&&r(e,i,"attributes")&&r(e,i,"styles")){if(c=i.classes)for(a=0;a<c.length;a++)if(!P.hasClass(e,c[a]))return;return i}}function p(e,t,n){function o(n){return n=P.getParent(n,function(n){return!!f(n,e,t,!0)}),f(n,e,t)}var r;return n?o(n):(n=O.getNode(),o(n)?W:(r=O.getStart(),r!=n&&o(r)?W:j))}function m(e,t){var n,o=[],r={};return n=O.getStart(),P.getParent(n,function(n){var i,a;for(i=0;i<e.length;i++)a=e[i],!r[a]&&f(n,a,t)&&(r[a]=!0,o.push(a))},P.getRoot()),o}function h(e){var t,n,r,i,a,c=s(e);if(c)for(t=O.getStart(),n=o(t),i=c.length-1;i>=0;i--){if(a=c[i].selector,!a)return W;for(r=n.length-1;r>=0;r--)if(P.is(n[r],a))return W}return j}function g(e,n,r){var i;return R||(R={},i={},t.onNodeChange.addToTop(function(e,t,n){var r=o(n),a={};D(R,function(e,t){D(r,function(n){return f(n,t,{},e.similar)?(i[t]||(D(e,function(e){e(!0,{node:n,format:t,parents:r})}),i[t]=e),a[t]=e,!1):void 0})}),D(i,function(e,t){a[t]||(delete i[t],D(e,function(e){e(!1,{node:n,format:t,parents:r})}))})})),D(e.split(","),function(e){R[e]||(R[e]=[],R[e].similar=r),R[e].push(n)}),this}function v(e,t){return y(e,t.inline)?W:y(e,t.block)?W:t.selector?P.is(e,t.selector):void 0}function y(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function b(e,t){var n=P.getStyle(e,t);return("color"==t||"backgroundColor"==t)&&(n=P.toHex(n)),"fontWeight"==t&&700==n&&(n="bold"),""+n}function C(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function x(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function _(e,t,n){var o=P.create(t,n);return e.parentNode.insertBefore(o,e),o.appendChild(e),o}function E(e,r,i){function a(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var n,o,i,a,s;if(n=o=e?h:v,a=e?"previousSibling":"nextSibling",s=P.getRoot(),3==n.nodeType&&!x(n)&&(e?g>0:b<n.nodeValue.length))return n;for(;;){if(!r[0].block_expand&&V(o))return o;for(i=o[a];i;i=i[a])if(!N(i)&&!x(i)&&!t(i))return o;if(o.parentNode==s){n=o;break}o=o.parentNode}return n}function s(e,t){for(t===L&&(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 c(e){for(var t=e;t;){if(1===t.nodeType&&G(t))return"false"===G(t)?t:e;t=t.parentNode}return e}function d(e,n,o){function r(e,t){var n,r,a=e.nodeValue;return"undefined"==typeof t&&(t=o?a.length:0),o?(n=a.lastIndexOf(" ",t),r=a.lastIndexOf("\xa0",t),n=n>r?n:r,-1===n||i||n++):(n=a.indexOf(" ",t),r=a.indexOf("\xa0",t),n=-1!==n&&(-1===r||r>n)?n:r),n}var a,s,c,d;if(3===e.nodeType){if(c=r(e,n),-1!==c)return{container:e,offset:c};d=e}for(a=new H(e,P.getParent(e,V)||t.getBody());s=a[o?"prev":"next"]();)if(3===s.nodeType){if(d=s,c=r(s),-1!==c)return{container:s,offset:c}}else if(V(s))break;return d?(n=o?0:d.length,{container:d,offset:n}):void 0}function l(t,n){var i,a,s,c;for(3==t.nodeType&&0===t.nodeValue.length&&t[n]&&(t=t[n]),i=o(t),a=0;a<i.length;a++)for(s=0;s<r.length;s++)if(c=r[s],!("collapsed"in c&&c.collapsed!==e.collapsed)&&P.is(i[a],c.selector))return i[a];return t}function u(e,t){var i;if(r[0].wrapper||(i=P.getParent(e,r[0].block)),i||(i=P.getParent(3==e.nodeType?e.parentNode:e,n)),i&&r[0].wrapper&&(i=o(i,"ul,ol").reverse()[0]||i),!i)for(i=e;i[t]&&!V(i[t])&&(i=i[t],!y(i,"br")););return i||e}var f,p,m,h=e.startContainer,g=e.startOffset,v=e.endContainer,b=e.endOffset;if(1==h.nodeType&&h.hasChildNodes()&&(f=h.childNodes.length-1,h=h.childNodes[g>f?f:g],3==h.nodeType&&(g=0)),1==v.nodeType&&v.hasChildNodes()&&(f=v.childNodes.length-1,v=v.childNodes[b>f?f:b-1],3==v.nodeType&&(b=v.nodeValue.length)),h=c(h),v=c(v),(N(h.parentNode)||N(h))&&(h=N(h)?h:h.parentNode,h=h.nextSibling||h,3==h.nodeType&&(g=0)),(N(v.parentNode)||N(v))&&(v=N(v)?v:v.parentNode,v=v.previousSibling||v,3==v.nodeType&&(b=v.length)),r[0].inline&&(e.collapsed&&(m=d(h,g,!0),m&&(h=m.container,g=m.offset),m=d(v,b),m&&(v=m.container,b=m.offset)),p=s(v,b),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=s(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(r[0].inline||r[0].block_expand)&&(r[0].inline&&3==h.nodeType&&0!==g||(h=a(!0)),r[0].inline&&3==v.nodeType&&b!==v.nodeValue.length||(v=a())),r[0].selector&&r[0].expand!==j&&!r[0].inline&&(h=l(h,"previousSibling"),v=l(v,"nextSibling")),(r[0].block||r[0].selector)&&(h=u(h,"previousSibling"),v=u(v,"nextSibling"),r[0].block&&(V(h)||(h=a(!0)),V(v)||(v=a()))),1==h.nodeType&&(g=q(h),h=h.parentNode),1==v.nodeType&&(b=q(v)+1,v=v.parentNode),{startContainer:h,startOffset:g,endContainer:v,endOffset:b}}function S(e,t,n,o){var r,i,a;if(!v(n,e))return j;if("all"!=e.remove)for(D(e.styles,function(e,r){e=C(e,t),"number"==typeof r&&(r=e,o=0),(!o||y(b(o,r),e))&&P.setStyle(n,r,""),a=1}),a&&""==P.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),D(e.attributes,function(e,r){var i;if(e=C(e,t),"number"==typeof r&&(r=e,o=0),!o||y(P.getAttrib(o,r),e)){if("class"==r&&(e=P.getAttrib(n,r),e&&(i="",D(e.split(/\s+/),function(e){/mce\w+/.test(e)&&(i+=(i?" ":"")+e)}),i)))return void P.setAttrib(n,r,i);"class"==r&&n.removeAttribute("className"),$.test(r)&&n.removeAttribute("data-mce-"+r),n.removeAttribute(r)}}),D(e.classes,function(e){e=C(e,t),(!o||P.hasClass(o,e))&&P.removeClass(n,e)}),i=P.getAttribs(n),r=0;r<i.length;r++)if(0!==i[r].nodeName.indexOf("_"))return j;return"none"!=e.remove?(k(n,e),W):void 0}function k(t,n){function o(e,t,n){return e=w(e,t,n),!e||"BR"==e.nodeName||V(e)}var r,i=t.parentNode;n.block&&(z?i==P.getRoot()&&(n.list_block&&y(t,n.list_block)||D(e.grep(t.childNodes),function(e){U(z,e.nodeName.toLowerCase())?r?r.appendChild(e):r=_(e,z):r=0})):V(t)&&!V(i)&&(o(t,j)||o(t.firstChild,W,1)||t.insertBefore(P.create("br"),t.firstChild),o(t,W)||o(t.lastChild,j,1)||t.appendChild(P.create("br")))),n.selector&&n.inline&&!y(n.inline,t)||P.remove(t,1)}function w(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!x(e))return e}function N(e){return e&&1==e.nodeType&&"bookmark"==e.getAttribute("data-mce-type")}function T(t,n){function o(e,t){function n(e){var t={};return D(P.getAttribs(e),function(n){var o=n.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&(t[o]=P.getAttrib(e,o))}),t}function o(e,t){var n,o;for(o in e)if(e.hasOwnProperty(o)){if(n=t[o],n===L)return j;if(e[o]!=n)return j;delete t[o]}for(o in t)if(t.hasOwnProperty(o))return j;return W}return e.nodeName!=t.nodeName?j:o(n(e),n(t))&&o(P.parseStyle(P.getAttrib(e,"style")),P.parseStyle(P.getAttrib(t,"style")))?W:j}function r(e,t){for(i=e;i;i=i[t]){if(3==i.nodeType&&0!==i.nodeValue.length)return e;if(1==i.nodeType&&!N(i))return i}return e}var i,a;if(t&&n&&(t=r(t,"previousSibling"),n=r(n,"nextSibling"),o(t,n))){for(i=t.nextSibling;i&&i!=n;)a=i,i=i.nextSibling,t.appendChild(a);return P.remove(n),D(e.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n}function A(e,n){var o,r,i;return o=e[n?"startContainer":"endContainer"],r=e[n?"startOffset":"endOffset"],1==o.nodeType&&(i=o.childNodes.length-1,!n&&r&&r--,o=o.childNodes[r>i?i:r]),3===o.nodeType&&n&&r>=o.nodeValue.length&&(o=new H(o,t.getBody()).next()||o),3!==o.nodeType||n||0!==r||(o=new H(o,t.getBody()).prev()||o),o}function B(o,r,i){function a(e){var n=P.create("span",{id:y,"data-mce-bogus":!0,style:b?"color:red":""});return e&&n.appendChild(t.getDoc().createTextNode(K)),n}function c(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==K||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function u(e){for(;e;){if(e.id===y)return e;e=e.parentNode}}function p(e){var t;if(e)for(t=new H(e,e),e=t.current();e;e=t.next())if(3===e.nodeType)return e}function m(e,t){var n,o;if(e)o=O.getRng(!0),c(e)?(t!==!1&&(o.setStartBefore(e),o.setEndBefore(e)),P.remove(e)):(n=p(e),n.nodeValue.charAt(0)===K&&(n=n.deleteData(0,1)),P.remove(e,1)),O.setRng(o);else if(e=u(O.getStart()),!e)for(;e=P.get(y);)m(e,!1)}function h(){var e,t,n,o,c,l,f;e=O.getRng(!0),o=e.startOffset,l=e.startContainer,f=l.nodeValue,t=u(O.getStart()),t&&(n=p(t)),f&&o>0&&o<f.length&&/\w/.test(f.charAt(o))&&/\w/.test(f.charAt(o-1))?(c=O.getBookmark(),e.collapse(!0),e=E(e,s(r)),e=F.split(e),d(r,i,e),O.moveToBookmark(c)):(t&&n.nodeValue===K?d(r,i,t):(t=a(!0),n=t.firstChild,e.insertNode(t),o=1,d(r,i,t)),O.setCursorLocation(n,o))}function g(){var e,t,o,c,d,u,p,m,h=O.getRng(!0),g=[];for(e=h.startContainer,t=h.startOffset,d=e,3==e.nodeType&&((t!=e.nodeValue.length||e.nodeValue===K)&&(c=!0),d=d.parentNode);d;){if(f(d,r,i)){u=d;break}d.nextSibling&&(c=!0),g.push(d),d=d.parentNode}if(u)if(c)o=O.getBookmark(),h.collapse(!0),h=E(h,s(r),!0),h=F.split(h),l(r,i,h),O.moveToBookmark(o);else{for(m=a(),d=m,p=g.length-1;p>=0;p--)d.appendChild(P.clone(g[p],!1)),d=d.firstChild;d.appendChild(P.doc.createTextNode(K)),d=d.firstChild;var v=P.getParent(u,n);v&&P.isEmpty(v)?u.parentNode.replaceChild(m,u):P.insertAfter(m,u),O.setCursorLocation(d,1),P.isEmpty(u)&&P.remove(u)}}function v(){var t;t=u(O.getStart()),t&&!P.isEmpty(t)&&e.walk(t,function(e){1!=e.nodeType||e.id===y||P.isEmpty(e)||P.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var y="_mce_caret",b=t.settings.caret_debug;self._hasCaretEvents||(t.onBeforeGetContent.addToTop(function(){var e,t=[];if(c(u(O.getStart()),t))for(e=t.length;e--;)P.setAttrib(t[e],"data-mce-bogus","1")}),e.each("onMouseUp onKeyUp".split(" "),function(e){t[e].addToTop(function(){m(),v()})}),t.onKeyDown.addToTop(function(e,t){var n=t.keyCode;(8==n||37==n||39==n)&&m(u(O.getStart())),v()}),O.onSetContent.add(v),self._hasCaretEvents=!0),"apply"==o?h():g()}function M(e){var t,n,o,r,i,a=e.startContainer,s=e.startOffset;if(3==a.nodeType&&s>=a.nodeValue.length&&(s=q(a),a=a.parentNode,t=!0),1==a.nodeType)for(r=a.childNodes,a=r[Math.min(s,r.length-1)],n=new H(a,P.getParent(a,P.isBlock)),(s>r.length-1||t)&&n.next(),o=n.current();o;o=n.next())if(3==o.nodeType&&!x(o))return i=P.create("a",null,K),o.parentNode.insertBefore(i,o),e.setStart(o,0),O.setRng(e),void P.remove(i)}var R,L,I={},D=e.each,P=t.dom,O=t.selection,H=e.dom.TreeWalker,F=new e.dom.RangeUtils(P),U=t.schema.isValidChild,V=(e.isArray,P.isBlock),z=t.settings.forced_root_block,q=P.nodeIndex,K="\ufeff",$=/^(src|href|style)$/,j=!1,W=!0,G=P.getContentEditable,Y=function(e){var n;return t.dom.getParent(e,function(e){return n=t.dom.getStyle(e,"text-decoration"),n&&"none"!==n}),n},X=function(e){var n;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(n=Y(e.parentNode),t.dom.getStyle(e,"color")&&n?t.dom.setStyle(e,"text-decoration",n):t.dom.getStyle(e,"textdecoration")===n&&t.dom.setStyle(e,"text-decoration",null))};e.extend(this,{get:s,register:c,apply:d,remove:l,toggle:u,match:p,matchAll:m,matchNode:f,canApply:h,formatChanged:g}),i(),a()}}(tinymce),tinymce.onAddEditor.add(function(e,t){function n(t,n){e.each(n,function(e,n){e&&a.setStyle(t,n,e)}),a.rename(t,"span")}function o(n,o){a=n.dom,s.convert_fonts_to_spans&&e.each(a.select("font,u,strike",o.node),function(e){r[e.nodeName.toLowerCase()](t.dom,e)})}var r,i,a,s=t.settings;s.inline_styles&&(i=e.explode(s.font_size_legacy_values),r={font:function(e,t){n(t,{backgroundColor:t.style.backgroundColor,color:t.color,fontFamily:t.face,fontSize:i[parseInt(t.size,10)-1]})},u:function(e,t){n(t,{textDecoration:"underline"})},strike:function(e,t){n(t,{textDecoration:"line-through"})}},t.onPreProcess.add(o),t.onSetContent.add(o),t.onInit.add(function(){t.selection.onSetContent.add(o)}))}),function(e){var t=e.dom.TreeWalker;e.EnterKey=function(n){function o(o){function d(e){return e&&r.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==r.getContentEditable(e)}function l(t){var n;e.isIE&&!e.isIE11&&r.isBlock(t)&&(n=i.getRng(),t.appendChild(r.create("span",null,"\xa0")),i.select(t),t.lastChild.outerHTML="",i.setRng(n))}function u(e){for(var t,n=e,o=[];n=n.firstChild;){if(r.isBlock(n))return;1!=n.nodeType||c[n.nodeName.toLowerCase()]||o.push(n)
13
- }for(t=o.length;t--;)n=o[t],!n.hasChildNodes()||n.firstChild==n.lastChild&&""===n.firstChild.nodeValue?r.remove(n):"A"==n.nodeName&&" "===(n.innerText||n.textContent)&&r.remove(n)}function f(e){var o,a,s,d,l,u,f=e;if(s=r.createRng(),e.hasChildNodes()){for(o=new t(e,e);a=o.current();){if(3==a.nodeType){s.setStart(a,0),s.setEnd(a,0);break}if(c[a.nodeName.toLowerCase()]){s.setStartBefore(a),s.setEndBefore(a);break}f=a,a=o.next()}a||(s.setStart(f,0),s.setEnd(f,0))}else"BR"==e.nodeName?e.nextSibling&&r.isBlock(e.nextSibling)?((!N||9>N)&&(u=r.create("br"),e.parentNode.insertBefore(u,e)),s.setStartBefore(e),s.setEndBefore(e)):(s.setStartAfter(e),s.setEndAfter(e)):(s.setStart(e,0),s.setEnd(e,0));i.setRng(s),r.remove(u),l=r.getViewPort(n.getWin()),d=r.getPos(e).y,(d<l.y||d+25>l.y+l.h)&&n.getWin().scrollTo(0,d<l.y?d:d-l.h+25)}function p(t){var n,o,i,s=S;if(n=t||"TABLE"==R?r.create(t||I):w.cloneNode(!1),i=n,a.keep_styles!==!1)do if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(s.nodeName)){if("_mce_caret"==s.id)continue;o=s.cloneNode(!1),r.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(i=o,n.appendChild(o))}while(s=s.parentNode);return(!e.isIE||e.isIE11)&&(i.innerHTML='<br data-mce-bogus="1">'),n}function m(e){var n,o,r;if(3==S.nodeType&&(e?k>0:k<S.nodeValue.length))return!1;if(S.parentNode==w&&D&&!e)return!0;if(e&&1==S.nodeType&&S==w.firstChild)return!0;if("TABLE"===S.nodeName||S.previousSibling&&"TABLE"==S.previousSibling.nodeName)return D&&!e||!D&&e;for(n=new t(S,w),3==S.nodeType&&(e&&0==k?n.prev():e||k!=S.nodeValue.length||n.next());o=n.current();){if(1===o.nodeType){if(!o.getAttribute("data-mce-bogus")&&(r=o.nodeName.toLowerCase(),c[r]&&"br"!==r))return!1}else if(3===o.nodeType&&!/^[ \t\r\n]*$/.test(o.nodeValue))return!1;e?n.prev():n.next()}return!0}function h(e,t){var n,o,i,a,s,c=I||"P";if(o=r.getParent(e,r.isBlock),!o||!d(o)){if(o=o||E,!o.hasChildNodes())return n=r.create(c),o.appendChild(n),P.setStart(n,0),P.setEnd(n,0),n;for(a=e;a.parentNode!=o;)a=a.parentNode;for(;a&&!r.isBlock(a);)i=a,a=a.previousSibling;if(i){for(n=r.create(c),i.parentNode.insertBefore(n,i),a=i;a&&!r.isBlock(a);)s=a.nextSibling,n.appendChild(a),a=s;P.setStart(e,t),P.setEnd(e,t)}}return e}function g(){function e(e){for(var t=M[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===w}A=I?p(I):r.create("BR"),e(!0)&&e()?r.replace(A,M):e(!0)?M.parentNode.insertBefore(A,M):e()?(r.insertAfter(A,M),l(A)):(_=P.cloneRange(),_.setStartAfter(w),_.setEndAfter(M),B=_.extractContents(),r.insertAfter(B,M),r.insertAfter(A,M)),r.remove(w),f(A),s.add()}function v(){for(var e,n=new t(S,w);e=n.next();)if(c[e.nodeName.toLowerCase()]||e.length>0)return!0}function y(){var t,n,o;S&&3==S.nodeType&&k>=S.nodeValue.length&&(e.isIE&&!e.isIE11||v()||(t=r.create("br"),P.insertNode(t),P.setStartAfter(t),P.setEndAfter(t),n=!0)),t=r.create("br"),P.insertNode(t),e.isIE&&!e.isIE11&&"PRE"==R&&(!N||8>N)&&t.parentNode.insertBefore(r.doc.createTextNode("\r"),t),o=r.create("span",{},"&nbsp;"),t.parentNode.insertBefore(o,t),i.scrollIntoView(o),r.remove(o),n?(P.setStartBefore(t),P.setEndBefore(t)):(P.setStartAfter(t),P.setEndAfter(t)),i.setRng(P),s.add()}function b(e){do 3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)}function C(e){var t,n,o=r.getRoot();for(t=e;t!==o&&"false"!==r.getContentEditable(t);)"true"===r.getContentEditable(t)&&(n=t),t=t.parentNode;return t!==o?n:o}function x(t){var n;(!e.isIE||e.isIE11)&&(t.normalize(),n=t.lastChild,(!n||/^(left|right)$/gi.test(r.getStyle(n,"float",!0)))&&r.add(t,"br"))}var _,E,S,k,w,N,T,A,B,M,R,L,I,D,P=i.getRng(!0);if(!P.collapsed)return void n.execCommand("Delete");if(!o.isDefaultPrevented()&&(S=P.startContainer,k=P.startOffset,I=(a.force_p_newlines?"p":"")||a.forced_root_block,I=I?I.toUpperCase():"",N=r.doc.documentMode,T=o.shiftKey,1==S.nodeType&&S.hasChildNodes()&&(D=k>S.childNodes.length-1,S=S.childNodes[Math.min(k,S.childNodes.length-1)]||S,k=D&&3==S.nodeType?S.nodeValue.length:0),E=C(S))){if(s.beforeChange(),!r.isBlock(E)&&E!=r.getRoot())return void((!I||T)&&y());if((I&&!T||!I&&T)&&(S=h(S,k)),w=r.getParent(S,r.isBlock),M=w?r.getParent(w.parentNode,r.isBlock):null,R=w?w.nodeName.toUpperCase():"",L=M?M.nodeName.toUpperCase():"","LI"!=L||o.ctrlKey||(w=M,R=L),"LI"==R){if(!I&&T)return void y();if(r.isEmpty(w))return/^(UL|OL|LI)$/.test(M.parentNode.nodeName)?!1:void g()}if("PRE"==R&&a.br_in_pre!==!1){if(!T)return void y()}else if(!I&&!T&&"LI"!=R||I&&T)return void y();I=I||"P",m()?(A=/^(H[1-6]|PRE)$/.test(R)&&"HGROUP"!=L?p(I):p(),a.end_container_on_empty_block&&d(M)&&r.isEmpty(w)?A=r.split(M,w):r.insertAfter(A,w),f(A)):m(!0)?(A=w.parentNode.insertBefore(p(),w),l(A)):(_=P.cloneRange(),_.setEndAfter(w),B=_.extractContents(),b(B),A=B.firstChild,r.insertAfter(B,w),u(A),x(w),f(A)),r.setAttrib(A,"id",""),s.add()}}var r=n.dom,i=n.selection,a=n.settings,s=n.undoManager,c=n.schema.getNonEmptyElements();n.onKeyDown.add(function(e,t){13==t.keyCode&&o(t)!==!1&&t.preventDefault()})}}(tinymce);
@@ -1,318 +0,0 @@
1
- $.extend wagn,
2
- initializeEditors: (range, map) ->
3
- map = wagn.editorInitFunctionMap unless map?
4
- $.each map, (selector, fn) ->
5
- $.each range.find(selector), ->
6
- fn.call $(this)
7
-
8
- prepUrl: (url, slot)->
9
- xtra = {}
10
- main = $('#main').children('.card-slot').data 'cardName'
11
- xtra['main'] = main if main?
12
- if slot
13
- xtra['is_main'] = true if slot.isMain()
14
- slotdata = slot.data 'slot'
15
- wagn.slotParams slotdata, xtra, 'slot' if slotdata?
16
-
17
- url + ( (if url.match /\?/ then '&' else '?') + $.param(xtra) )
18
-
19
- slotParams: (raw, processed, prefix)->
20
- $.each raw, (key, value)->
21
- cgiKey = prefix + '[' + snakeCase(key) + ']'
22
- if key == 'items'
23
- wagn.slotParams value, processed, cgiKey
24
- else
25
- processed[cgiKey] = value
26
-
27
- slotReady: (func)->
28
- $('document').ready ->
29
- $('body').on 'slotReady', '.card-slot', (e) ->
30
- e.stopPropagation()
31
- func.call this, $(this)
32
- pingName: (name, success)->
33
- $.getJSON wagn.rootPath + '/', { format: 'json', view: 'status', 'card[name]': name }, success
34
-
35
- jQuery.fn.extend {
36
- slot: ->
37
- if @attr('slotSelector')
38
- @closest @attr('slotSelector')
39
- else
40
- @closest '.card-slot'
41
-
42
- setSlotContent: (val) ->
43
- s = @slot()
44
- v = $(val)
45
- if v[0]
46
- if slotdata = s.attr 'data-slot'
47
- v.attr 'data-slot', slotdata if slotdata?
48
- else #simple text (not html)
49
- v = val
50
- s.replaceWith v
51
- v.trigger 'slotReady'
52
- v
53
-
54
- slotSuccess: (data) ->
55
- if data.redirect
56
- window.location=data.redirect
57
- else
58
- notice = @attr('notify-success')
59
- newslot = @setSlotContent data
60
-
61
- if newslot.jquery # sometimes response is plaintext
62
- wagn.initializeEditors newslot
63
- if notice?
64
- newslot.notify notice
65
-
66
- slotError: (status, result) ->
67
- if status == 403 #permission denied
68
- @setSlotContent result
69
- else
70
- @notify result
71
- if status == 409 #edit conflict
72
- @slot().find('.current_revision_id').val @slot().find('.new-current-revision-id').text()
73
- else if status == 449
74
- @slot().find('.recaptcha-box').loadCaptcha()
75
-
76
- notify: (message) ->
77
- slot = @slot()
78
- notice = slot.find '.card-notice'
79
- unless notice[0]
80
- notice = $('<div class="card-notice"></div>')
81
- form = slot.find('.card-form')
82
- if form[0]
83
- $(form[0]).append notice
84
- else
85
- slot.append notice
86
- notice.html message
87
- notice.show 'blind'
88
-
89
- report: (message) ->
90
- report = @slot().find '.card-report'
91
- return false unless report[0]
92
- report.hide()
93
- report.html message
94
- report.show 'drop', 750
95
- setTimeout (->report.hide 'drop', 750), 3000
96
-
97
- isMain: -> @slot().parent('#main')[0]
98
-
99
- loadCaptcha: -> Recaptcha.create wagn.recaptchaKey, this[0]
100
-
101
- autosave: ->
102
- slot = @slot()
103
- return if @attr 'no-autosave'
104
- multi = @closest 'fieldset'
105
- if multi[0]
106
- return unless id = multi.data 'cardId'
107
- reportee = ': ' + multi.data 'cardName'
108
- else
109
- id = slot.data 'cardId'
110
- reportee = ''
111
-
112
- # #might be better to put this href base in the html
113
- submit_url = wagn.rootPath + '/update/~' + id
114
- form_data = $('#edit_card_'+id).serializeArray().reduce( ((obj, item) ->
115
- obj[item.name] = item.value
116
- return obj
117
- ), { 'draft' : 'true', 'success[view]' : 'blank'});
118
- $.ajax submit_url, {
119
- data : form_data,
120
- type : 'POST'
121
- }
122
- ##{ 'card[content]' : @val() },
123
-
124
- setContentFieldsFromMap: (map) ->
125
- map = wagn.editorContentFunctionMap unless map?
126
- this_form = $(this)
127
- $.each map, (selector, fn)->
128
- this_form.setContentFields(selector, fn)
129
- setContentFields: (selector, fn) ->
130
- $.each @find(selector), ->
131
- $(this).setContentField(fn)
132
- setContentField: (fn)->
133
- field = @closest('.card-editor').find('.card-content')
134
- init_val = field.val() # tinymce-jquery overrides val(); that's why we're not using it.
135
- new_val = fn.call this
136
- field.val new_val
137
- field.change() if init_val != new_val
138
- }
139
-
140
- #~~~~~ ( EVENTS )
141
-
142
- setInterval (-> $('.card-form').setContentFieldsFromMap()), 20000
143
-
144
- $(window).ready ->
145
- $.ajaxSetup cache: false
146
-
147
- setTimeout (-> wagn.initializeEditors $('body')), 10
148
- # dislike the timeout, but without this forms with multiple TinyMCE editors were failing to load properly
149
-
150
- $('body').on 'ajax:success', '.slotter', (event, data, c, d) ->
151
- unless event.slotSuccessful
152
- $(this).slotSuccess data
153
- event.slotSuccessful = true
154
-
155
- $('body').on 'ajax:error', '.slotter', (event, xhr) ->
156
- $(this).slotError xhr.status, xhr.responseText
157
-
158
- $('body').on 'click', 'button.slotter', (event)->
159
- return false if !$.rails.allowAction $(this)
160
- $.rails.handleRemote $(this)
161
-
162
- $('body').on 'ajax:beforeSend', '.slotter', (event, xhr, opt)->
163
- return if opt.skip_before_send
164
-
165
- unless opt.url.match /home_view/ #avoiding duplication. could be better test?
166
- opt.url = wagn.prepUrl opt.url, $(this).slot()
167
-
168
- if $(this).is('form')
169
- if wagn.recaptchaKey and $(this).attr('recaptcha')=='on' and !($(this).find('.recaptcha-box')[0])
170
- newCaptcha(this)
171
- return false
172
-
173
- if data = $(this).data 'file-data'
174
- # NOTE - this entire solution is temporary.
175
- input = $(this).find '.file-upload'
176
- if input[1]
177
- $(this).notify "Wagn does not yet support multiple files in a single form."
178
- return false
179
-
180
- widget = input.data 'blueimpFileupload' #jQuery UI widget
181
- unless widget._isXHRUpload(widget.options) # browsers that can't do ajax uploads use iframe
182
- $(this).find('[name=success]').val('_self') # can't do normal redirects.
183
- # iframe response not passed back; all responses treated as success. boo
184
- opt.url += '&simulate_xhr=true'
185
- # iframe is not xhr request, so would otherwise get full response with layout
186
- iframeUploadFilter = (data)-> data.find('body').html()
187
- opt.dataFilter = iframeUploadFilter
188
- # gets rid of default html and body tags
189
-
190
- args = $.extend opt, (widget._getAJAXSettings data), url: opt.url
191
- # combines settings from wagn's slotter and jQuery UI's upload widget
192
- args.skip_before_send = true #avoid looping through this method again
193
-
194
- $.ajax( args )
195
- false
196
-
197
- $('body').on 'submit', '.card-form', ->
198
- # warn "on submit called"
199
- $(this).setContentFieldsFromMap()
200
- # warn "content fields set"
201
- $(this).find('.card-content').attr('no-autosave','true')
202
- # warn "autosave worked"
203
- true
204
-
205
- $('body').on 'click', '.submitter', ->
206
- $(this).closest('form').submit()
207
-
208
- $('body').on 'click', '.renamer-updater', ->
209
- $(this).closest('form').find('#card_update_referencers').val 'true'
210
-
211
- $('body').on 'submit', '.edit_name-view .card-form', ->
212
- confirmer = $(this).find '.confirm_rename-view'
213
- if confirmer.is ':hidden'
214
- if $(this).find('#referers').val() > 0
215
- $(this).find('.renamer-updater').show()
216
-
217
- confirmer.show 'blind'
218
- false
219
-
220
- $('body').on 'click', 'button.redirecter', ->
221
- window.location = $(this).attr('href')
222
-
223
- unless wagn.noDoubleClick
224
- $('body').on 'dblclick', '.card-slot', (event) ->
225
- s = $(this)
226
- return false if s.closest( '.nodblclick' )[0]
227
- return false if s.closest( '.card-header' )[0]
228
- return false if s.find( '.card-editor' )[0]
229
- return false unless s.data('cardId')
230
- s.addClass 'slotter'
231
- s.attr 'href', wagn.rootPath + '/card/edit/~' + s.data('cardId')
232
- $.rails.handleRemote(s)
233
- false # don't propagate up to next slot
234
-
235
- # $('body').on 'dblclick', '.nodblclick', -> false
236
-
237
- $('body').on 'submit', 'form.slotter', (event)->
238
- if (target = $(this).attr 'main-success') and $(this).isMain()
239
- input = $(this).find '[name=success]'
240
- if input and !(input.val().match /^REDIRECT/)
241
- input.val ( if target == 'REDIRECT' then target + ': ' + input.val() else target )
242
-
243
- #more of this info should be in views; will need to refactor for HTTP DELETE anyway...
244
- $('.card-slot').on 'click', '.standard-delete', ->
245
- return if $(this).attr('success-ready') == 'true' #prevent double-click weirdness
246
- s = if $(this).isMain() then 'REDIRECT: *previous' else 'TEXT:' + $(this).slot().data('cardName') + ' removed'
247
- $(this).attr 'href', $(this).attr('href') + '?success=' + encodeURIComponent(s)
248
- $(this).attr 'success-ready', 'true'
249
-
250
- $('body').on 'change', '.live-type-field', ->
251
- $(this).data 'params', $(this).closest('form').serialize()
252
- $(this).data 'url', $(this).attr 'href'
253
-
254
- $('body').on 'change', '.edit-type-field', ->
255
- $(this).closest('form').submit()
256
-
257
- $('body').on 'change', '.autosave .card-content', ->
258
- content_field = $(this)
259
- setTimeout ( -> content_field.autosave() ), 500
260
-
261
- $('body').on 'mouseenter', '[hover_content]', ->
262
- $(this).attr 'hover_restore', $(this).html()
263
- $(this).html $(this).attr( 'hover_content' )
264
- $('body').on 'mouseleave', '[hover_content]', ->
265
- $(this).html $(this).attr( 'hover_restore' )
266
-
267
- $('body').on 'keyup', '.name-editor input', ->
268
- box = $(this)
269
- name = box.val()
270
- wagn.pingName name, (data)->
271
- return null if box.val() != name # avert race conditions
272
- status = data['status']
273
- if status
274
- ed = box.parent()
275
- leg = box.closest('fieldset').find('legend')
276
- msg = leg.find '.name-messages'
277
- unless msg[0]
278
- msg = $('<span class="name-messages"></span>')
279
- leg.append msg
280
- ed.removeClass 'real-name virtual-name known-name'
281
- slot_id = box.slot().data 'cardId' # use id to avoid warning when renaming to name variant
282
- if status != 'unknown' and !(slot_id && parseInt(slot_id) == data['id'])
283
- ed.addClass status + '-name known-name'
284
- link =
285
- qualifier = if status == 'virtual' #wish coffee would let me use a ? b : c syntax here
286
- 'in virtual'
287
- else
288
- 'already in'
289
- msg.html '"<a href="' + wagn.rootPath + '/' + data['url_key'] + '">' + name + '</a>" ' + qualifier + ' use'
290
- else
291
- msg.html ''
292
-
293
- $('body').on 'click', '.render-error-link', (event) ->
294
- msg = $(this).closest('.render-error').find '.render-error-message'
295
- msg.show()
296
- # msg.dialog()
297
- event.preventDefault()
298
-
299
-
300
- # important: this prevents jquery-mobile from taking over everything
301
- $( document ).on "mobileinit", ->
302
- $.extend $.mobile , {
303
- autoInitializePage: false
304
- ajaxEnabled: false
305
- }
306
-
307
-
308
-
309
- newCaptcha = (form)->
310
- recapUri = 'https://www.google.com/recaptcha/api/js/recaptcha_ajax.js'
311
- recapDiv = $('<div class="recaptcha-box"></div>')
312
- $(form).children().last().after recapDiv
313
- $.getScript recapUri, -> recapDiv.loadCaptcha()
314
-
315
- snakeCase = (str)->
316
- str.replace /([a-z])([A-Z])/g, (match)-> match[0] + '_' + match[1].toLowerCase()
317
-
318
- warn = (stuff) -> console.log stuff if console?