artfully_ose 1.1.0 → 1.2.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (719) hide show
  1. checksums.yaml +13 -5
  2. data/README.md +28 -0
  3. data/app/assets/fonts/FontAwesome.otf +0 -0
  4. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  5. data/app/assets/fonts/fontawesome-webfont.svg +472 -252
  6. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  7. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  8. data/app/assets/images/actions/do.png +0 -0
  9. data/app/assets/images/actions/do.psd +0 -0
  10. data/app/assets/images/actions/get.png +0 -0
  11. data/app/assets/images/actions/get.psd +0 -0
  12. data/app/assets/images/actions/give.png +0 -0
  13. data/app/assets/images/actions/give.psd +0 -0
  14. data/app/assets/images/actions/go.png +0 -0
  15. data/app/assets/images/actions/go.psd +0 -0
  16. data/app/assets/images/actions/hear.png +0 -0
  17. data/app/assets/images/actions/hear.psd +0 -0
  18. data/app/assets/images/actions/join.png +0 -0
  19. data/app/assets/images/actions/join.psd +0 -0
  20. data/app/assets/images/actions/say.png +0 -0
  21. data/app/assets/images/actions/say.psd +0 -0
  22. data/app/assets/images/business-default-avatar.png +0 -0
  23. data/app/assets/images/foundation-default-avatar.png +0 -0
  24. data/app/assets/images/glyphish/people/208-facebook.png +0 -0
  25. data/app/assets/images/glyphish/people/210-twitterbird.png +0 -0
  26. data/app/assets/images/glyphish/people/218-trash2-small.png +0 -0
  27. data/app/assets/images/glyphish/people/291-idcard.png +0 -0
  28. data/app/assets/images/glyphish/people/email.png +0 -0
  29. data/app/assets/images/glyphish/people/email.psd +0 -0
  30. data/app/assets/images/glyphish/people/linkedin.png +0 -0
  31. data/app/assets/images/glyphish/people/linkedin.psd +0 -0
  32. data/app/assets/images/glyphish/people/website.png +0 -0
  33. data/app/assets/images/glyphish/people/website.psd +0 -0
  34. data/app/assets/images/government-default-avatar.png +0 -0
  35. data/app/assets/images/household-default-avatar.png +0 -0
  36. data/app/assets/images/loading.gif +0 -0
  37. data/app/assets/images/nonprofit-default-avatar.png +0 -0
  38. data/app/assets/images/other-default-avatar.png +0 -0
  39. data/app/assets/images/person-default-avatar.png +0 -0
  40. data/app/assets/images/person-default-avatar.psd +0 -0
  41. data/app/assets/javascripts/angular-bootstrap-ui.js +1 -0
  42. data/app/assets/javascripts/angular-resource.js +546 -0
  43. data/app/assets/javascripts/angular.js +20311 -0
  44. data/app/assets/javascripts/application.js +340 -24
  45. data/app/assets/javascripts/bootstrap-wysihtml5.js +511 -0
  46. data/app/assets/javascripts/bootstrap.js +1005 -455
  47. data/app/assets/javascripts/boxoffice.js +558 -0
  48. data/app/assets/javascripts/change-membership.js +152 -0
  49. data/app/assets/javascripts/custom/door-list.js +14 -0
  50. data/app/assets/javascripts/custom/endless-scroll.js +25 -0
  51. data/app/assets/javascripts/custom/inline-people-search.js +51 -49
  52. data/app/assets/javascripts/custom/kits-config.js +33 -0
  53. data/app/assets/javascripts/custom/people.js +74 -9
  54. data/app/assets/javascripts/custom/prices.js +1 -0
  55. data/app/assets/javascripts/custom/show.js +116 -27
  56. data/app/assets/javascripts/households.js +59 -0
  57. data/app/assets/javascripts/jquery-lib/fullcalendar.js +5982 -0
  58. data/app/assets/javascripts/jquery-lib/jquery-ui-1.10.3.custom.min.js +7 -0
  59. data/app/assets/javascripts/jquery-lib/jquery-ui-timepicker-addon.js +1992 -949
  60. data/app/assets/javascripts/jquery-lib/jquery.mask-money.js +305 -294
  61. data/app/assets/javascripts/jquery-migrate-1.2.1.js +521 -0
  62. data/app/assets/javascripts/jquery-migrate-1.2.1.min.js +2 -0
  63. data/app/assets/javascripts/jquery.js +5318 -4987
  64. data/app/assets/javascripts/locationselector.js +107 -0
  65. data/app/assets/javascripts/relationships.js +63 -0
  66. data/app/assets/javascripts/sales-console.js +158 -0
  67. data/app/assets/javascripts/store/jquery.validate.additional-methods.js +476 -159
  68. data/app/assets/javascripts/store/jquery.validate.js +449 -406
  69. data/app/assets/javascripts/store/store.js +107 -349
  70. data/app/assets/javascripts/storefront.js +1 -0
  71. data/app/assets/javascripts/wysihtml5-0.3.0.min.js +261 -0
  72. data/app/assets/stylesheets/application.sass +414 -48
  73. data/app/assets/stylesheets/bootstrap-overrides.css +100 -26
  74. data/app/assets/stylesheets/bootstrap-wysihtml5.css +102 -0
  75. data/app/assets/stylesheets/bootstrap.css +6 -3607
  76. data/app/assets/stylesheets/boxoffice.css.scss +258 -0
  77. data/app/assets/stylesheets/font-awesome.css.scss +1566 -0
  78. data/app/assets/stylesheets/jquery/fullcalendar.css +223 -252
  79. data/app/assets/stylesheets/pages/bootstrap-responsive.css +1109 -0
  80. data/app/assets/stylesheets/sass/_event_list.sass +43 -0
  81. data/app/assets/stylesheets/sass/_tags.sass +24 -2
  82. data/app/assets/stylesheets/sass/box-office.sass +24 -4
  83. data/app/assets/stylesheets/sass/cart.sass +0 -6
  84. data/app/assets/stylesheets/sass/store.sass +274 -55
  85. data/app/assets/stylesheets/storefront.css +2 -1
  86. data/app/assets/stylesheets/wysiwyg-color.css +67 -0
  87. data/app/concerns/cart_finder.rb +50 -0
  88. data/app/concerns/immutable_action.rb +9 -0
  89. data/app/concerns/pdf_generation.rb +74 -0
  90. data/app/{models/orders → concerns}/unrefundable.rb +0 -0
  91. data/app/controllers/actions_controller.rb +29 -22
  92. data/app/controllers/addresses_controller.rb +3 -3
  93. data/app/controllers/artfully_ose_controller.rb +56 -7
  94. data/app/controllers/assignments_controller.rb +28 -0
  95. data/app/controllers/charts_controller.rb +1 -1
  96. data/app/controllers/console_sales_controller.rb +182 -0
  97. data/app/controllers/contributions_controller.rb +31 -6
  98. data/app/controllers/discounts_controller.rb +10 -3
  99. data/app/controllers/events_controller.rb +42 -33
  100. data/app/controllers/events_pass_types_controller.rb +87 -0
  101. data/app/controllers/exchanges_controller.rb +16 -8
  102. data/app/controllers/export_controller.rb +10 -2
  103. data/app/controllers/households_controller.rb +71 -0
  104. data/app/controllers/imports_controller.rb +46 -7
  105. data/app/controllers/index_controller.rb +6 -1
  106. data/app/controllers/member_cards_controller.rb +45 -0
  107. data/app/controllers/members/index_controller.rb +4 -0
  108. data/app/controllers/members/invitations_controller.rb +7 -0
  109. data/app/controllers/members/members_controller.rb +9 -0
  110. data/app/controllers/members/passwords_controller.rb +10 -0
  111. data/app/controllers/members/people_controller.rb +17 -0
  112. data/app/controllers/members/sessions_controller.rb +14 -0
  113. data/app/controllers/membership_cancellations_controller.rb +46 -0
  114. data/app/controllers/membership_changes_controller.rb +39 -0
  115. data/app/controllers/membership_comps_controller.rb +102 -0
  116. data/app/controllers/membership_kits_controller.rb +25 -0
  117. data/app/controllers/membership_types_controller.rb +57 -0
  118. data/app/controllers/memberships_controller.rb +18 -47
  119. data/app/controllers/merges_controller.rb +11 -5
  120. data/app/controllers/mobile/dashboard_controller.rb +17 -0
  121. data/app/controllers/mobile/events_controller.rb +16 -0
  122. data/app/controllers/mobile/orders_controller.rb +61 -0
  123. data/app/controllers/mobile/shows_controller.rb +39 -0
  124. data/app/controllers/mobile/tickets_controller.rb +114 -0
  125. data/app/controllers/mobile/users_controller.rb +30 -0
  126. data/app/controllers/notes_controller.rb +3 -3
  127. data/app/controllers/orders_controller.rb +87 -8
  128. data/app/controllers/organizations_controller.rb +3 -2
  129. data/app/controllers/pass_types_controller.rb +53 -0
  130. data/app/controllers/passes_controller.rb +52 -0
  131. data/app/controllers/passes_kits_controller.rb +25 -0
  132. data/app/controllers/passes_reports_controller.rb +5 -0
  133. data/app/controllers/people_controller.rb +83 -28
  134. data/app/controllers/refunds_controller.rb +7 -7
  135. data/app/controllers/regular_donation_kits_controller.rb +32 -0
  136. data/app/controllers/relationships_controller.rb +15 -0
  137. data/app/controllers/sales_controller.rb +95 -31
  138. data/app/controllers/searches_controller.rb +15 -7
  139. data/app/controllers/sections_controller.rb +3 -3
  140. data/app/controllers/segments_controller.rb +4 -4
  141. data/app/controllers/shows_controller.rb +119 -98
  142. data/app/controllers/slices_controller.rb +3 -2
  143. data/app/controllers/statements_controller.rb +1 -1
  144. data/app/controllers/store/checkouts_controller.rb +27 -8
  145. data/app/controllers/store/donations_controller.rb +22 -0
  146. data/app/controllers/store/events_controller.rb +19 -1
  147. data/app/controllers/store/memberships_controller.rb +16 -0
  148. data/app/controllers/store/orders_controller.rb +46 -77
  149. data/app/controllers/store/passes_controller.rb +13 -0
  150. data/app/controllers/store/retrievals_controller.rb +29 -0
  151. data/app/controllers/store/shows_controller.rb +6 -0
  152. data/app/controllers/store/store_controller.rb +21 -23
  153. data/app/controllers/ticket_types_controller.rb +41 -0
  154. data/app/controllers/tickets_controller.rb +16 -0
  155. data/app/controllers/user_memberships_controller.rb +57 -0
  156. data/app/controllers/users/sessions_controller.rb +3 -0
  157. data/app/helpers/artfully_ose_helper.rb +88 -37
  158. data/app/helpers/households_helper.rb +7 -0
  159. data/app/helpers/link_helper.rb +15 -1
  160. data/app/helpers/members_helper.rb +9 -0
  161. data/app/helpers/membership_types_helper.rb +22 -0
  162. data/app/helpers/people_helper.rb +55 -1
  163. data/app/helpers/relationships_helper.rb +26 -0
  164. data/app/helpers/sales_helper.rb +29 -0
  165. data/app/helpers/searches_helper.rb +13 -0
  166. data/app/helpers/suggested_households_helper.rb +5 -0
  167. data/app/mailers/order_mailer.rb +28 -1
  168. data/app/mailers/pass_mailer.rb +17 -0
  169. data/app/mailers/producer_mailer.rb +2 -2
  170. data/app/mailers/reports_mailer.rb +6 -5
  171. data/app/models/ability.rb +1 -0
  172. data/app/models/action.rb +48 -24
  173. data/app/models/actions/change_action.rb +13 -0
  174. data/app/models/actions/comp_action.rb +15 -0
  175. data/app/models/actions/do_action.rb +12 -0
  176. data/app/models/actions/exchange_action.rb +15 -0
  177. data/app/models/actions/get_action.rb +7 -1
  178. data/app/models/actions/give_action.rb +20 -4
  179. data/app/models/actions/go_action.rb +27 -8
  180. data/app/models/actions/hear_action.rb +14 -2
  181. data/app/models/actions/join_action.rb +4 -0
  182. data/app/models/actions/refund_action.rb +2 -1
  183. data/app/models/actions/say_action.rb +23 -0
  184. data/app/models/address.rb +39 -9
  185. data/app/models/cart.rb +254 -0
  186. data/app/models/chart.rb +30 -23
  187. data/app/models/checkout.rb +94 -38
  188. data/app/models/comp.rb +25 -17
  189. data/app/models/company.rb +18 -0
  190. data/app/models/console_sale.rb +30 -0
  191. data/app/models/contribution.rb +11 -9
  192. data/app/models/daily_donation_report.rb +11 -8
  193. data/app/models/daily_membership_report.rb +50 -0
  194. data/app/models/daily_pass_report.rb +48 -0
  195. data/app/models/daily_ticket_report.rb +34 -14
  196. data/app/models/database_views/item_view.rb +148 -0
  197. data/app/models/discount.rb +7 -7
  198. data/app/models/discounts/buy_one_get_one_free_discount_type.rb +6 -1
  199. data/app/models/discounts/discount_type.rb +5 -1
  200. data/app/models/discounts/dollars_off_tickets_discount_type.rb +8 -2
  201. data/app/models/donation.rb +10 -6
  202. data/app/models/donation_search.rb +1 -1
  203. data/app/models/door_list.rb +14 -9
  204. data/app/models/event.rb +81 -10
  205. data/app/models/events_pass_type.rb +18 -0
  206. data/app/models/exchange.rb +23 -15
  207. data/app/models/{ext/ext.rb → ext.rb} +16 -3
  208. data/app/models/ext/integrations.rb +47 -32
  209. data/app/models/ext/preprocessor.rb +7 -0
  210. data/app/models/extendable.rb +6 -0
  211. data/app/models/fee_calculator.rb +13 -0
  212. data/app/models/fee_strategy.rb +5 -0
  213. data/app/models/gateway_transaction.rb +3 -1
  214. data/app/models/household.rb +61 -0
  215. data/app/models/household_suggester.rb +58 -0
  216. data/app/models/import.rb +48 -15
  217. data/app/models/import_message.rb +6 -0
  218. data/app/models/imports/donations_import.rb +3 -22
  219. data/app/models/imports/events_import.rb +56 -57
  220. data/app/models/imports/memberships_import.rb +43 -0
  221. data/app/models/imports/people_import.rb +45 -17
  222. data/app/models/imports/rollback.rb +7 -2
  223. data/app/models/imports/status.rb +8 -0
  224. data/app/models/individual.rb +20 -0
  225. data/app/models/item.rb +65 -54
  226. data/app/models/job/checkout_processor.rb +46 -0
  227. data/app/models/job/cleanup_suggested_households_job.rb +17 -0
  228. data/app/models/job/daily_email_report_job.rb +28 -7
  229. data/app/models/job/destroy_show_job.rb +10 -0
  230. data/app/models/job/expire_ticket_job.rb +9 -0
  231. data/app/models/job/geocode_address_job.rb +11 -0
  232. data/app/models/job/mailchimp_sync_job.rb +1 -3
  233. data/app/models/job/order_mailer_job.rb +8 -0
  234. data/app/models/job/order_processor.rb +93 -0
  235. data/app/models/job/person_lifetime_value_job.rb +10 -0
  236. data/app/models/job/recall_import_job.rb +5 -0
  237. data/app/models/job/refund_order_processor.rb +16 -0
  238. data/app/models/job/show_creator.rb +39 -0
  239. data/app/models/kit.rb +2 -4
  240. data/app/models/kits/mailchimp_kit.rb +49 -22
  241. data/app/models/kits/membership_kit.rb +62 -0
  242. data/app/models/kits/passes_kit.rb +62 -0
  243. data/app/models/kits/regular_donation_kit.rb +38 -8
  244. data/app/models/kits/scannable_tickets_kit.rb +23 -0
  245. data/app/models/member.rb +190 -0
  246. data/app/models/member_card_generator.rb +63 -0
  247. data/app/models/member_number_generator.rb +8 -0
  248. data/app/models/member_walkup.rb +150 -0
  249. data/app/models/membership.rb +97 -7
  250. data/app/models/membership_cancellation.rb +80 -0
  251. data/app/models/membership_change.rb +187 -0
  252. data/app/models/membership_comp.rb +105 -0
  253. data/app/models/membership_comp_job.rb +32 -0
  254. data/app/models/membership_sale_search.rb +36 -0
  255. data/app/models/membership_type.rb +67 -0
  256. data/app/models/note.rb +1 -1
  257. data/app/models/{orders/order.rb → order.rb} +224 -28
  258. data/app/models/order_handler.rb +154 -0
  259. data/app/models/orders/comp_order.rb +4 -0
  260. data/app/models/orders/exchange_order.rb +16 -0
  261. data/app/models/orders/imported_order.rb +4 -0
  262. data/app/models/orders/refund_order.rb +8 -0
  263. data/app/models/organization.rb +68 -17
  264. data/app/models/organization_ability.rb +1 -0
  265. data/app/models/parsed_row.rb +103 -20
  266. data/app/models/pass.rb +196 -0
  267. data/app/models/pass_summary.rb +18 -0
  268. data/app/models/pass_type.rb +41 -0
  269. data/app/models/{payments/payment.rb → payment.rb} +29 -1
  270. data/app/models/payments/cash_payment.rb +3 -1
  271. data/app/models/payments/check_payment.rb +33 -0
  272. data/app/models/payments/comp_payment.rb +3 -1
  273. data/app/models/payments/credit_card_payment.rb +44 -23
  274. data/app/models/person.rb +270 -62
  275. data/app/models/phone.rb +0 -8
  276. data/app/models/refund.rb +28 -18
  277. data/app/models/relation.rb +27 -0
  278. data/app/models/relation_builder.rb +32 -0
  279. data/app/models/relationship.rb +55 -0
  280. data/app/models/relationship_builder.rb +12 -0
  281. data/app/models/relationship_validator.rb +46 -0
  282. data/app/models/relationships_kit.rb +31 -0
  283. data/app/models/rolling_membership_type.rb +11 -0
  284. data/app/models/sale.rb +28 -21
  285. data/app/models/sale_search.rb +1 -1
  286. data/app/models/search.rb +334 -45
  287. data/app/models/seasonal_membership_type.rb +3 -0
  288. data/app/models/section.rb +49 -17
  289. data/app/models/segment.rb +1 -1
  290. data/app/models/show.rb +93 -16
  291. data/app/models/slices.rb +26 -10
  292. data/app/models/statement.rb +38 -9
  293. data/app/models/suggested_household.rb +24 -0
  294. data/app/models/sundial.rb +12 -0
  295. data/app/models/ticket.rb +109 -15
  296. data/app/models/ticket/glance.rb +1 -2
  297. data/app/models/ticket/locker.rb +51 -0
  298. data/app/models/ticket/pricing.rb +30 -22
  299. data/app/models/ticket/qr_code.rb +21 -0
  300. data/app/models/ticket/reports.rb +16 -10
  301. data/app/models/ticket/sale_transitions.rb +4 -0
  302. data/app/models/ticket/template.rb +1 -0
  303. data/app/models/ticket/transfers.rb +12 -1
  304. data/app/models/ticket_summary.rb +7 -1
  305. data/app/models/ticket_type.rb +137 -0
  306. data/app/models/user.rb +22 -9
  307. data/app/models/user_membership.rb +28 -0
  308. data/app/models/valuation/lifetime_donations.rb +2 -2
  309. data/app/models/valuation/lifetime_fees.rb +40 -0
  310. data/app/models/valuation/lifetime_memberships.rb +24 -0
  311. data/app/models/valuation/lifetime_ticket_value.rb +30 -0
  312. data/app/models/valuation/lifetime_value.rb +3 -8
  313. data/app/models/venue.rb +25 -7
  314. data/app/presenters/event_presenter.rb +1 -1
  315. data/app/serializers/show_serializer.rb +15 -0
  316. data/app/views/actions/_action.html.haml +21 -0
  317. data/app/views/actions/_form.html.haml +47 -0
  318. data/app/views/actions/_inline.html.haml +1 -0
  319. data/app/views/actions/_modal.html.haml +5 -0
  320. data/app/views/actions/get/_show.html.haml +3 -0
  321. data/app/views/actions/give/_show.html.haml +8 -0
  322. data/app/views/actions/shared/_show.html.haml +5 -0
  323. data/app/views/addresses/_address.html.haml +7 -6
  324. data/app/views/assignments/new.html.haml +31 -0
  325. data/app/views/console_sales/_aloha.html.haml +26 -0
  326. data/app/views/console_sales/_cart.html.haml +60 -0
  327. data/app/views/console_sales/_payment.html.haml +111 -0
  328. data/app/views/console_sales/_shows.html.haml +24 -0
  329. data/app/views/console_sales/new.html.haml +143 -0
  330. data/app/views/contributions/_form.html.haml +3 -3
  331. data/app/views/contributions/find_person.html.haml +1 -1
  332. data/app/views/contributions/index.html.haml +8 -6
  333. data/app/views/contributions/new.html.haml +5 -9
  334. data/app/views/discounts/_discount_section_fields.html.haml +1 -1
  335. data/app/views/discounts/_form.html.haml +3 -3
  336. data/app/views/discounts/index.html.haml +1 -1
  337. data/app/views/events/_day_date_show.html.haml +2 -2
  338. data/app/views/events/_discount_section_fields.html.haml +1 -1
  339. data/app/views/events/_glance.html.haml +28 -37
  340. data/app/views/events/_header.html.haml +1 -0
  341. data/app/views/events/_list.html.haml +11 -5
  342. data/app/views/events/_menu.html.haml +25 -20
  343. data/app/views/events/_section_fields.html.haml +16 -46
  344. data/app/views/events/_share_and_sell.haml +9 -5
  345. data/app/views/events/_ticket_type_fields.html.haml +86 -0
  346. data/app/views/events/edit.html.haml +13 -3
  347. data/app/views/events/image.html.haml +4 -3
  348. data/app/views/events/index.html.haml +20 -3
  349. data/app/views/events/messages.html.haml +2 -2
  350. data/app/views/events/prices.html.haml +4 -12
  351. data/app/views/events/show.html.haml +3 -1
  352. data/app/views/events/storefront_link.html.haml +1 -1
  353. data/app/views/events/temp_discount_form.html.haml +1 -1
  354. data/app/views/events/temp_discounts_index.html.haml +1 -1
  355. data/app/views/events_pass_types/_form.html.haml +42 -0
  356. data/app/views/events_pass_types/edit.html.haml +22 -0
  357. data/app/views/events_pass_types/index.html.haml +47 -0
  358. data/app/views/events_pass_types/new.html.haml +22 -0
  359. data/app/views/exchanges/new.html.haml +58 -35
  360. data/app/views/households/_action.html.haml +24 -0
  361. data/app/views/households/_edit_modal.html.haml +143 -0
  362. data/app/views/households/_form.html.haml +26 -0
  363. data/app/views/households/_header.html.haml +25 -0
  364. data/app/views/households/_individual_fields.html.haml +8 -0
  365. data/app/views/households/_list.html.haml +10 -0
  366. data/app/views/households/_note.html.haml +33 -0
  367. data/app/views/households/edit.html.haml +1 -0
  368. data/app/views/households/index.html.haml +13 -0
  369. data/app/views/households/new.html.haml +14 -0
  370. data/app/views/households/show.html.haml +72 -0
  371. data/app/views/households/suggested.html.haml +38 -0
  372. data/app/views/imports/_export_links.html.haml +3 -0
  373. data/app/views/imports/donations/_new.html.haml +6 -0
  374. data/app/views/imports/donations/_pending.html.haml +6 -22
  375. data/app/views/imports/events/_new.html.haml +7 -1
  376. data/app/views/imports/events/_pending.html.haml +6 -17
  377. data/app/views/imports/index.html.haml +6 -3
  378. data/app/views/imports/people/_imported.html.haml +35 -5
  379. data/app/views/imports/people/_importing.html.haml +8 -0
  380. data/app/views/imports/people/_new.html.haml +61 -21
  381. data/app/views/imports/people/_pending.html.haml +26 -20
  382. data/app/views/imports/people/_recalled.html.haml +25 -0
  383. data/app/views/imports/people/_recalling.html.haml +15 -0
  384. data/app/views/imports/shared/_knowledge_base.haml +11 -2
  385. data/app/views/imports/shared/_sidebar.html.haml +1 -1
  386. data/app/views/index/_action.html.haml +7 -0
  387. data/app/views/index/_recent_activity.html.haml +11 -0
  388. data/app/views/index/_recent_activity.js.haml +5 -0
  389. data/app/views/index/dashboard.html.haml +40 -36
  390. data/app/views/index/recent_activity.js.haml +5 -0
  391. data/app/views/kits/_list.html.haml +9 -0
  392. data/app/views/layouts/_flash.html.haml +3 -3
  393. data/app/views/layouts/_google_analytics.html.haml +5 -2
  394. data/app/views/layouts/_menu.html.haml +10 -6
  395. data/app/views/layouts/application.html.haml +6 -3
  396. data/app/views/layouts/devise_layout.html.haml +2 -2
  397. data/app/views/layouts/mail.html.haml +20 -0
  398. data/app/views/layouts/members.html.haml +14 -0
  399. data/app/views/layouts/storefront.html.haml +39 -3
  400. data/app/views/members/index/index.html.haml +41 -0
  401. data/app/views/members/invitations/edit.html.haml +17 -0
  402. data/app/views/members/invitations/new.html.erb +14 -0
  403. data/app/views/members/mailer/_invitation_body.html.haml +18 -0
  404. data/app/views/members/mailer/invitation_instructions.html.haml +6 -0
  405. data/app/views/members/mailer/reset_password_instructions.html.erb +8 -0
  406. data/app/views/members/passwords/edit.html.haml +18 -0
  407. data/app/views/members/sessions/new.html.haml +19 -0
  408. data/app/views/membership_cancellations/_form.html.haml +39 -0
  409. data/app/views/membership_cancellations/_modal.html.haml +2 -0
  410. data/app/views/membership_cancellations/_processing.html.haml +12 -0
  411. data/app/views/membership_cancellations/create.js.erb +3 -0
  412. data/app/views/membership_cancellations/new.js.erb +3 -0
  413. data/app/views/membership_comps/confirm.html.haml +86 -0
  414. data/app/views/membership_comps/create.html.haml +20 -0
  415. data/app/views/membership_comps/new.html.haml +95 -0
  416. data/app/views/membership_kits/edit.html.haml +52 -0
  417. data/app/views/membership_mailer/cancellation_confirmation.html.haml +9 -0
  418. data/app/views/membership_mailer/cancellation_confirmation.text.haml +6 -0
  419. data/app/views/membership_mailer/refund_problem.html.haml +18 -0
  420. data/app/views/membership_mailer/refund_problem.text.haml +14 -0
  421. data/app/views/membership_types/_form.html.haml +89 -0
  422. data/app/views/membership_types/_membership_type_fees.html.haml +0 -0
  423. data/app/views/membership_types/_rolling_membership_type_form.html.haml +5 -0
  424. data/app/views/membership_types/_seasonal_membership_type_form.html.haml +8 -0
  425. data/app/views/membership_types/edit.html.haml +4 -0
  426. data/app/views/membership_types/index.html.haml +28 -0
  427. data/app/views/membership_types/new.html.haml +4 -0
  428. data/app/views/membership_types/type.html.haml +19 -0
  429. data/app/views/memberships/_membership_scripts.js.erb +15 -0
  430. data/app/views/memberships/index.html.haml +160 -0
  431. data/app/views/merges/_merge_preview_person.html.haml +11 -6
  432. data/app/views/merges/find_person.html.haml +5 -5
  433. data/app/views/merges/new.html.haml +7 -6
  434. data/app/views/notes/_note.html.haml +29 -0
  435. data/app/views/order_mailer/confirmation_for.html.haml +34 -22
  436. data/app/views/order_mailer/confirmation_for.text.haml +7 -4
  437. data/app/views/order_mailer/confirmation_for_exchange.html.haml +34 -0
  438. data/app/views/order_mailer/confirmation_for_exchange.text.haml +26 -0
  439. data/app/views/order_mailer/confirmation_for_refund.html.haml +36 -0
  440. data/app/views/order_mailer/confirmation_for_refund.text.haml +22 -0
  441. data/app/views/orders/_item_donations_table.html.haml +27 -0
  442. data/app/views/orders/_item_memberships_table.html.haml +16 -0
  443. data/app/views/orders/_item_table.haml +31 -13
  444. data/app/views/orders/_item_tickets_table.html.haml +27 -0
  445. data/app/views/orders/_order_sidebar.html.haml +40 -18
  446. data/app/views/orders/index.html.haml +2 -0
  447. data/app/views/orders/membership.html.haml +104 -0
  448. data/app/views/orders/sales.html.haml +15 -13
  449. data/app/views/orders/show.html.haml +3 -3
  450. data/app/views/organizations/_connection_form.html.haml +1 -1
  451. data/app/views/organizations/_form.html.haml +25 -20
  452. data/app/views/organizations/edit.html.haml +2 -2
  453. data/app/views/organizations/new.html.haml +1 -1
  454. data/app/views/organizations/show.html.haml +22 -16
  455. data/app/views/pass_mailer/pass_info_for.html.haml +21 -0
  456. data/app/views/pass_types/_form.html.haml +76 -0
  457. data/app/views/pass_types/_pass_type_fees.html.haml +0 -0
  458. data/app/views/pass_types/edit.html.haml +4 -0
  459. data/app/views/pass_types/index.html.haml +34 -0
  460. data/app/views/pass_types/new.html.haml +4 -0
  461. data/app/views/passes/index.html.haml +108 -0
  462. data/app/views/passes_kits/edit.html.haml +30 -0
  463. data/app/views/passes_reports/index.html.haml +2 -0
  464. data/app/views/pdfs/member.html.haml +66 -0
  465. data/app/views/pdfs/member_card_generator/blanks_usa_idc6.html.haml +109 -0
  466. data/app/views/pdfs/order.html.haml +84 -0
  467. data/app/views/people/_convert_to_company_modal.html.haml +42 -0
  468. data/app/views/people/_edit_modal.html.haml +186 -0
  469. data/app/views/people/_form.html.haml +23 -5
  470. data/app/views/people/_header.html.haml +50 -0
  471. data/app/views/people/_household_fields.html.haml +5 -0
  472. data/app/views/people/_phone_fields.html.haml +10 -0
  473. data/app/views/people/_relationship_fields.html.haml +14 -0
  474. data/app/views/people/_work_with_menu.html.haml +39 -0
  475. data/app/views/people/index.html.haml +18 -6
  476. data/app/views/people/new.html.haml +2 -2
  477. data/app/views/people/show.html.haml +149 -28
  478. data/app/views/people/show.js.haml +5 -0
  479. data/app/views/producer_mailer/donation_kit_notification.html.haml +8 -0
  480. data/app/views/producer_mailer/donation_kit_notification.text.erb +8 -0
  481. data/app/views/producer_mailer/mailchimp_kit_initial_sync_notification.html.haml +21 -0
  482. data/app/views/producer_mailer/ticket_offer_accepted.html.haml +7 -0
  483. data/app/views/producer_mailer/ticket_offer_accepted.text.erb +7 -0
  484. data/app/views/producer_mailer/ticket_offer_rejected.html.haml +11 -0
  485. data/app/views/producer_mailer/ticket_offer_rejected.text.erb +13 -0
  486. data/app/views/refunds/new.html.haml +45 -27
  487. data/app/views/regular_donation_kits/edit.html.haml +140 -0
  488. data/app/views/relationships/index.html.haml +32 -0
  489. data/app/views/reports_mailer/_fine_print.html.haml +0 -0
  490. data/app/views/reports_mailer/daily.html.haml +113 -51
  491. data/app/views/reports_mailer/daily.text.erb +5 -5
  492. data/app/views/sales/_boxoffice.html.haml +141 -0
  493. data/app/views/sales/_doorlist.html.haml +79 -0
  494. data/app/views/sales/new.html.haml +33 -125
  495. data/app/views/searches/_form.html.haml +180 -34
  496. data/app/views/searches/_household.html.haml +7 -0
  497. data/app/views/searches/_person.html.haml +5 -2
  498. data/app/views/searches/new.html.haml +1 -1
  499. data/app/views/searches/show.html.haml +29 -21
  500. data/app/views/sections/edit.html.haml +1 -1
  501. data/app/views/sections/new.html.haml +1 -1
  502. data/app/views/segments/show.html.haml +19 -15
  503. data/app/views/shared/_door_list_table.haml +19 -6
  504. data/app/views/shared/_error_messages.html.haml +1 -1
  505. data/app/views/shared/_event_image_icon.html.haml +1 -3
  506. data/app/views/shared/_save_save_and_next.html.haml +2 -0
  507. data/app/views/shared/_show_summary.html.haml +0 -6
  508. data/app/views/shared/_show_time_and_calendar.html.haml +21 -0
  509. data/app/views/shared/_submit_cancel.haml +1 -1
  510. data/app/views/shared/_tags.html.haml +5 -3
  511. data/app/views/shows/_controls.html.haml +5 -23
  512. data/app/views/shows/_glance.html.haml +3 -11
  513. data/app/views/shows/_sections_table.html.haml +89 -0
  514. data/app/views/shows/_ticket_table.html.haml +12 -88
  515. data/app/views/shows/_work_with.html.haml +23 -0
  516. data/app/views/shows/calendar.html.haml +18 -0
  517. data/app/views/shows/door_list.html.haml +2 -2
  518. data/app/views/shows/door_list.pdf.haml +29 -0
  519. data/app/views/shows/index.html.haml +88 -19
  520. data/app/views/shows/new.html.haml +13 -27
  521. data/app/views/shows/show.html.haml +11 -11
  522. data/app/views/slices/index.html.haml +2 -1
  523. data/app/views/statements/_discounts_table.html.haml +1 -1
  524. data/app/views/statements/_order_location_table.html.haml +1 -1
  525. data/app/views/statements/_passes_table.html.haml +22 -0
  526. data/app/views/statements/_payment_method_table.haml +1 -1
  527. data/app/views/statements/_ticket_type_table.haml +5 -2
  528. data/app/views/statements/show.html.haml +5 -2
  529. data/app/views/store/checkouts/_membership_info.html.haml +12 -0
  530. data/app/views/store/checkouts/thanks.html.haml +134 -0
  531. data/app/views/store/donations/index.html.haml +19 -0
  532. data/app/views/store/events/_calendar.html.haml +4 -5
  533. data/app/views/store/events/_venue.html.haml +9 -0
  534. data/app/views/store/events/calendar.html.haml +50 -0
  535. data/app/views/store/events/index.html.haml +23 -0
  536. data/app/views/store/events/show.html.haml +26 -185
  537. data/app/views/store/events/single_show.html.haml +45 -0
  538. data/app/views/store/memberships/index.html.haml +40 -0
  539. data/app/views/store/orders/show.html.haml +198 -0
  540. data/app/views/store/passes/index.html.haml +33 -0
  541. data/app/views/store/retrievals/index.html.haml +11 -0
  542. data/app/views/store/shared/_donate_form.html.haml +31 -0
  543. data/app/views/store/shared/_small_donate_form.html.haml +21 -0
  544. data/app/views/store/shows/_show.html.haml +50 -0
  545. data/app/views/store/shows/show.html.haml +1 -0
  546. data/app/views/ticket_types/edit.html.haml +12 -0
  547. data/app/views/ticket_types/new.html.haml +13 -0
  548. data/app/views/user_memberships/_list.html.haml +30 -0
  549. data/app/views/users/invitations/edit.html.haml +19 -9
  550. data/app/views/users/mailer/invitation_instructions.html.haml +14 -0
  551. data/app/views/users/passwords/edit.html.haml +2 -2
  552. data/app/views/users/registrations/edit.html.erb +3 -3
  553. data/app/views/users/sessions/new.html.haml +2 -2
  554. data/app/views/venues/edit.html.haml +6 -4
  555. data/config/initializers/devise.rb +2 -5
  556. data/config/initializers/paperclip.rb +69 -0
  557. data/config/locales/devise.en.yml +1 -1
  558. data/config/locales/devise_invitable.en.yml +1 -1
  559. data/config/locales/en.yml +16 -3
  560. data/config/routes.rb +178 -22
  561. data/db/migrate/20130311184839_rename_memberships.rb +5 -0
  562. data/db/migrate/20130329201707_clean_geographic_data.rb +230 -0
  563. data/db/migrate/20130411162346_add_country_zip_state_phone_number_discipline_to_organizations.rb +9 -0
  564. data/db/migrate/20130412145428_massage_action_subtypes.rb +15 -0
  565. data/db/migrate/20130412184415_add_first_name_and_last_name_to_users.rb +6 -0
  566. data/db/migrate/20130420232537_add_starred_to_note.rb +5 -0
  567. data/db/migrate/20130425153848_add_notes_to_orders.rb +5 -0
  568. data/db/migrate/20130506173918_add_token_to_cart.rb +6 -0
  569. data/db/migrate/20130508180421_ticket_types_ahoy.rb +17 -0
  570. data/db/migrate/20130508194552_add_members_to_section.rb +6 -0
  571. data/db/migrate/20130514153006_add_import_messages.rb +17 -0
  572. data/db/migrate/20130520190452_add_ticket_type_to_tickets.rb +6 -0
  573. data/db/migrate/20130521185848_add_sti_to_cart.rb +12 -0
  574. data/db/migrate/20130526021126_add_validated_to_ticket.rb +5 -0
  575. data/db/migrate/20130528193811_add_widget_requests.rb +12 -0
  576. data/db/migrate/20130530011409_add_ticket_types_to_discounts.rb +5 -0
  577. data/db/migrate/20130531160800_migrate_to_ticket_types.rb +59 -0
  578. data/db/migrate/20130531160801_drop_price_from_ticket.rb +5 -0
  579. data/db/migrate/20130531160802_remove_price_from_section.rb +5 -0
  580. data/db/migrate/20130531180955_add_defaults_to_people_types.rb +21 -0
  581. data/db/migrate/20130604161411_add_validated_action_to_ticket.rb +5 -0
  582. data/db/migrate/20130607180250_change_institution_to_company.rb +9 -0
  583. data/db/migrate/20130609233536_revenue_applies_at.rb +11 -0
  584. data/db/migrate/20130611175122_add_more_indexes.rb +8 -0
  585. data/db/migrate/20130612183117_add_types_to_searches.rb +6 -0
  586. data/db/migrate/20130712145416_add_middle_name_and_suffix_to_people.rb +6 -0
  587. data/db/migrate/20130722153731_add_autentication_token_to_users.rb +5 -0
  588. data/db/migrate/20130722182255_create_membership_types.rb +18 -0
  589. data/db/migrate/20130723182754_create_slugged_slugs.rb +20 -0
  590. data/db/migrate/20130723182811_add_cached_slug_to_organizations.rb +16 -0
  591. data/db/migrate/20130723212712_add_qr_code_to_tickets.rb +9 -0
  592. data/db/migrate/20130725012338_create_new_memberships.rb +28 -0
  593. data/db/migrate/20130725013145_devise_create_members.rb +41 -0
  594. data/db/migrate/20130729140618_convert_to_company.rb +5 -0
  595. data/db/migrate/20130731145336_last_member_number.rb +5 -0
  596. data/db/migrate/20130731153806_add_member_number.rb +5 -0
  597. data/db/migrate/20130801194634_make_events_public.rb +5 -0
  598. data/db/migrate/20130802235709_add_memberships_to_search.rb +9 -0
  599. data/db/migrate/20130808002742_add_lifetime_ticket_value_to_person.rb +9 -0
  600. data/db/migrate/20130808005856_add_members_only_to_events.rb +5 -0
  601. data/db/migrate/20130820011240_add_uuid_to_tickets.rb +13 -0
  602. data/db/migrate/20130820025134_make_ticket_uuid_not_null.rb +11 -0
  603. data/db/migrate/20130823191625_add_pdf_to_orders.rb +5 -0
  604. data/db/migrate/20130827190839_add_fee_to_tickets_and_donations.rb +8 -0
  605. data/db/migrate/20130829015011_migrate_fees_to_items.rb +5 -0
  606. data/db/migrate/20130916194547_add_relationships.rb +21 -0
  607. data/db/migrate/20130917165559_add_service_fee_to_memberships.rb +5 -0
  608. data/db/migrate/20131002191646_create_show_stats_view.rb +16 -0
  609. data/db/migrate/20131003134821_add_relationships_to_search.rb +7 -0
  610. data/db/migrate/20131003200508_add_starred_to_relationships.rb +5 -0
  611. data/db/migrate/20131007141421_add_counters_to_member.rb +7 -0
  612. data/db/migrate/20131007144456_remove_expires_at_from_membership.rb +6 -0
  613. data/db/migrate/20131011154027_add_purchased_to_searches.rb +5 -0
  614. data/db/migrate/20131013144010_add_type_to_membership_type.rb +5 -0
  615. data/db/migrate/20131013150230_add_duration_to_membership_type.rb +6 -0
  616. data/db/migrate/20131013192807_change_number_of_shows_to_tickets.rb +5 -0
  617. data/db/migrate/20131015151550_add_households.rb +18 -0
  618. data/db/migrate/20131022183913_add_search_output_options.rb +24 -0
  619. data/db/migrate/20131023200559_add_admin_to_user_memberships.rb +14 -0
  620. data/db/migrate/20131025162155_default_search_filter_values.rb +10 -0
  621. data/db/migrate/20131025180139_unique_household_names.rb +8 -0
  622. data/db/migrate/20131029173612_add_sales_start_to_membership_typ.rb +6 -0
  623. data/db/migrate/20131106191847_add_suggested_households.rb +13 -0
  624. data/db/migrate/20131127162818_add_buyer_id_index_to_tickets.rb +5 -0
  625. data/db/migrate/20131127164000_member_tickets.rb +9 -0
  626. data/db/migrate/20131204162642_add_shared_address.rb +9 -0
  627. data/db/migrate/20131206153323_add_membership_kit.rb +5 -0
  628. data/db/migrate/20131206175325_add_marketing_to_membership_type.rb +6 -0
  629. data/db/migrate/20131210212342_add_show_fee_to_memberhsip_type.rb +5 -0
  630. data/db/migrate/20131210222814_add_renewal_price_to_membership_type.rb +6 -0
  631. data/db/migrate/20131212164553_add_copy_to_individuals_option.rb +5 -0
  632. data/db/migrate/20131223215615_goodbye_order_view.rb +6 -0
  633. data/db/migrate/20140114011856_add_welcome_message_to_memberships.rb +5 -0
  634. data/db/migrate/20140114212127_add_send_email_to_memberships.rb +5 -0
  635. data/db/migrate/20140125183606_index_memberships_and_types.rb +6 -0
  636. data/db/migrate/20140128213101_add_pdf_to_members.rb +5 -0
  637. data/db/migrate/20140128223140_add_uuid_to_member.rb +6 -0
  638. data/db/migrate/20140128223948_add_qr_code_to_member.rb +9 -0
  639. data/db/migrate/20140207135731_update_items_view.rb +38 -0
  640. data/db/migrate/20140210154723_add_cached_stats.rb +5 -0
  641. data/db/migrate/20140218202726_cache_stats.rb +7 -0
  642. data/db/migrate/20140304171625_passes_ahoy.rb +52 -0
  643. data/db/migrate/20140304174807_add_passes_kit.rb +5 -0
  644. data/db/migrate/20140307144454_add_events_pass_types.rb +9 -0
  645. data/db/migrate/20140307193350_add_pass_id_to_cart.rb +7 -0
  646. data/db/migrate/20140314162422_add_total_paid_to_membership.rb +13 -0
  647. data/db/migrate/20140319191237_add_show_dates_to_advanced_search.rb +6 -0
  648. data/db/migrate/20140328172333_add_cols_to_events_pass_types.rb +6 -0
  649. data/db/migrate/20140328174217_add_deleted_at_to_ept.rb +9 -0
  650. data/db/migrate/20140328185432_add_active_to_ept.rb +5 -0
  651. data/db/migrate/20140328192612_add_pass_type_id_to_search.rb +5 -0
  652. data/db/migrate/20140415212841_add_min_max_start_dates_to_searches.artfully_ose_engine.rb +6 -0
  653. data/db/migrate/20140422193345_add_email_copy_to_pass_type.rb +5 -0
  654. data/db/migrate/20140423181639_add_min_max_end_dates_to_searches.artfully_ose_engine.rb +6 -0
  655. data/db/migrate/20140423185921_add_cached_stats_to_event.rb +9 -0
  656. data/db/migrate/20140424174423_add_lifetime_memberships_to_people.artfully_ose_engine.rb +5 -0
  657. data/db/migrate/20140506155241_add_lpt_to_membership_type.rb +5 -0
  658. data/db/migrate/20140507184646_add_bday_attributes_to_person.rb +7 -0
  659. data/db/migrate/20140507201048_add_check_number_to_orders.rb +5 -0
  660. data/db/migrate/20140515143651_remove_show_stats_view.rb +6 -0
  661. data/db/migrate/20140521195853_add_deleted_at_to_pass_type.rb +5 -0
  662. data/db/migrate/20140522205554_add_limit_to_events_pass_types.rb +5 -0
  663. data/db/migrate/20140523180444_remove_tickets_purchased_from_passes.rb +5 -0
  664. data/db/migrate/20140603200735_add_subtitle_to_events.rb +5 -0
  665. data/db/migrate/20140619194127_add_do_not_call_to_people.artfully_ose_engine.rb +5 -0
  666. data/db/migrate/20140623160543_add_index_to_items.rb +7 -0
  667. data/lib/artfully_ose.rb +7 -4
  668. data/lib/artfully_ose/common_abilities.rb +8 -2
  669. data/lib/artfully_ose/engine.rb +34 -10
  670. data/lib/artfully_ose/version.rb +1 -1
  671. data/spec/factories/action_factories.rb +19 -0
  672. data/spec/factories/address_factories.rb +11 -0
  673. data/spec/factories/cart_factories.rb +26 -0
  674. data/spec/factories/chart_factories.rb +52 -0
  675. data/spec/factories/discount_factories.rb +11 -0
  676. data/spec/factories/donation_factories.rb +14 -0
  677. data/spec/factories/event_factories.rb +29 -0
  678. data/spec/factories/household_factories.rb +8 -0
  679. data/spec/factories/import_factories.rb +61 -0
  680. data/spec/factories/item_factories.rb +51 -0
  681. data/spec/factories/kit_factories.rb +33 -0
  682. data/spec/factories/member_factories.rb +19 -0
  683. data/spec/factories/membership_factories.rb +9 -0
  684. data/spec/factories/membership_type_factories.rb +18 -0
  685. data/spec/factories/order_factories.rb +40 -0
  686. data/spec/factories/organization_factories.rb +48 -0
  687. data/spec/factories/pass_type_factories.rb +11 -0
  688. data/spec/factories/payments_factories.rb +97 -0
  689. data/spec/factories/person_factories.rb +47 -0
  690. data/spec/factories/phone_factories.rb +6 -0
  691. data/spec/factories/section_factories.rb +21 -0
  692. data/spec/factories/segment_factories.rb +6 -0
  693. data/spec/factories/show_factories.rb +33 -0
  694. data/spec/factories/ticket_factories.rb +57 -0
  695. data/spec/factories/ticket_offer_factories.rb +16 -0
  696. data/spec/factories/ticket_type_factories.rb +8 -0
  697. data/spec/factories/user_factories.rb +24 -0
  698. metadata +522 -49
  699. data/app/assets/javascripts/box-office.js +0 -244
  700. data/app/assets/javascripts/jquery-lib/fullcalendar.min.js +0 -113
  701. data/app/assets/javascripts/jquery-lib/jquery-ui-1.8.14.custom.min.js +0 -570
  702. data/app/assets/javascripts/jquery_ujs.js +0 -316
  703. data/app/assets/stylesheets/font-awesome.sass +0 -759
  704. data/app/models/adjustments.rb +0 -10
  705. data/app/models/carts/cart.rb +0 -171
  706. data/app/models/database_views/order_view.rb +0 -34
  707. data/app/views/actions/_list.html.haml +0 -25
  708. data/app/views/actions/edit.html.haml +0 -19
  709. data/app/views/actions/new.html.haml +0 -19
  710. data/app/views/memberships/_list.html.haml +0 -31
  711. data/app/views/notes/_list.html.haml +0 -30
  712. data/app/views/notes/edit.html.haml +0 -14
  713. data/app/views/notes/new.html.haml +0 -14
  714. data/app/views/orders/_grouped_form_help.haml +0 -4
  715. data/app/views/people/_person_summary_sidebar.html.haml +0 -86
  716. data/app/views/people/edit.html.haml +0 -10
  717. data/app/views/shared/_new_person_popup.html.haml +0 -21
  718. data/app/views/store/events/_show.html.haml +0 -43
  719. data/app/views/users/mailer/invitation_instructions.html.erb +0 -8
@@ -1,6 +1,7 @@
1
1
  //= require jquery
2
2
  //= require jquery_ujs
3
3
  //= require jquery-lib
4
+ //= require locationselector
4
5
  //= require_directory ./custom
5
6
  //= require bootstrap
6
7
  //= require_directory ./store
@@ -0,0 +1,261 @@
1
+ /*
2
+ wysihtml5 v0.3.0
3
+ https://github.com/xing/wysihtml5
4
+
5
+ Author: Christopher Blum (https://github.com/tiff)
6
+
7
+ Copyright (C) 2012 XING AG
8
+ Licensed under the MIT license (MIT)
9
+
10
+ Rangy, a cross-browser JavaScript range and selection library
11
+ http://code.google.com/p/rangy/
12
+
13
+ Copyright 2011, Tim Down
14
+ Licensed under the MIT license.
15
+ Version: 1.2.2
16
+ Build date: 13 November 2011
17
+ */
18
+ var wysihtml5={version:"0.3.0",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,DELETE_KEY:46};
19
+ window.rangy=function(){function b(a,b){var c=typeof a[b];return c==k||!!(c==h&&a[b])||"unknown"==c}function c(a,b){return!!(typeof a[b]==h&&a[b])}function a(a,b){return typeof a[b]!=j}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&m(a,r)&&x(a,q)}function f(a){window.alert("Rangy not supported in your browser. Reason: "+a);o.initialized=!0;o.supported=!1}function g(){if(!o.initialized){var a,d=!1,h=!1;b(document,"createRange")&&
20
+ (a=document.createRange(),m(a,p)&&x(a,n)&&(d=!0),a.detach());if((a=c(document,"body")?document.body:document.getElementsByTagName("body")[0])&&b(a,"createTextRange"))a=a.createTextRange(),e(a)&&(h=!0);!d&&!h&&f("Neither Range nor TextRange are implemented");o.initialized=!0;o.features={implementsDomRange:d,implementsTextRange:h};d=w.concat(z);h=0;for(a=d.length;h<a;++h)try{d[h](o)}catch(j){c(window,"console")&&b(window.console,"log")&&window.console.log("Init listener threw an exception. Continuing.",
21
+ j)}}}function i(a){this.name=a;this.supported=this.initialized=!1}var h="object",k="function",j="undefined",n="startContainer startOffset endContainer endOffset collapsed commonAncestorContainer START_TO_START START_TO_END END_TO_START END_TO_END".split(" "),p="setStart setStartBefore setStartAfter setEnd setEndBefore setEndAfter collapse selectNode selectNodeContents compareBoundaryPoints deleteContents extractContents cloneContents insertNode surroundContents cloneRange toString detach".split(" "),
22
+ q="boundingHeight boundingLeft boundingTop boundingWidth htmlText text".split(" "),r="collapse compareEndPoints duplicate getBookmark moveToBookmark moveToElementText parentElement pasteHTML select setEndPoint getBoundingClientRect".split(" "),m=d(b),s=d(c),x=d(a),o={version:"1.2.2",initialized:!1,supported:!0,util:{isHostMethod:b,isHostObject:c,isHostProperty:a,areHostMethods:m,areHostObjects:s,areHostProperties:x,isTextRange:e},features:{},modules:{},config:{alertOnWarn:!1,preferTextRange:!1}};
23
+ o.fail=f;o.warn=function(a){a="Rangy warning: "+a;o.config.alertOnWarn?window.alert(a):typeof window.console!=j&&typeof window.console.log!=j&&window.console.log(a)};({}).hasOwnProperty?o.util.extend=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}:f("hasOwnProperty not supported");var z=[],w=[];o.init=g;o.addInitListener=function(a){o.initialized?a(o):z.push(a)};var y=[];o.addCreateMissingNativeApiListener=function(a){y.push(a)};o.createMissingNativeApi=function(a){a=a||window;g();
24
+ for(var b=0,c=y.length;b<c;++b)y[b](a)};i.prototype.fail=function(a){this.initialized=!0;this.supported=!1;throw Error("Module '"+this.name+"' failed to load: "+a);};i.prototype.warn=function(a){o.warn("Module "+this.name+": "+a)};i.prototype.createError=function(a){return Error("Error in Rangy "+this.name+" module: "+a)};o.createModule=function(a,b){var c=new i(a);o.modules[a]=c;w.push(function(a){b(a,c);c.initialized=!0;c.supported=!0})};o.requireModules=function(a){for(var b=0,c=a.length,d,h;b<
25
+ c;++b){h=a[b];d=o.modules[h];if(!d||!(d instanceof i))throw Error("Module '"+h+"' not found");if(!d.supported)throw Error("Module '"+h+"' not supported");}};var A=!1,s=function(){A||(A=!0,o.initialized||g())};if(typeof window==j)f("No window found");else if(typeof document==j)f("No document found");else return b(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",s,!1),b(window,"addEventListener")?window.addEventListener("load",s,!1):b(window,"attachEvent")?window.attachEvent("onload",
26
+ s):f("Window does not have required addEventListener or attachEvent method"),o}();
27
+ rangy.createModule("DomUtil",function(b,c){function a(a){for(var b=0;a=a.previousSibling;)b++;return b}function d(a,b){var c=[],d;for(d=a;d;d=d.parentNode)c.push(d);for(d=b;d;d=d.parentNode)if(m(c,d))return d;return null}function e(a,b,c){for(c=c?a:a.parentNode;c;){a=c.parentNode;if(a===b)return c;c=a}return null}function f(a){a=a.nodeType;return 3==a||4==a||8==a}function g(a,b){var c=b.nextSibling,d=b.parentNode;c?d.insertBefore(a,c):d.appendChild(a);return a}function i(a){if(9==a.nodeType)return a;
28
+ if(typeof a.ownerDocument!=p)return a.ownerDocument;if(typeof a.document!=p)return a.document;if(a.parentNode)return i(a.parentNode);throw Error("getDocument: no document found for node");}function h(a){return!a?"[No node]":f(a)?'"'+a.data+'"':1==a.nodeType?"<"+a.nodeName+(a.id?' id="'+a.id+'"':"")+">["+a.childNodes.length+"]":a.nodeName}function k(a){this._next=this.root=a}function j(a,b){this.node=a;this.offset=b}function n(a){this.code=this[a];this.codeName=a;this.message="DOMException: "+this.codeName}
29
+ var p="undefined",q=b.util;q.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||c.fail("document missing a Node creation method");q.isHostMethod(document,"getElementsByTagName")||c.fail("document missing getElementsByTagName method");var r=document.createElement("div");q.areHostMethods(r,["insertBefore","appendChild","cloneNode"])||c.fail("Incomplete Element implementation");q.isHostProperty(r,"innerHTML")||c.fail("Element is missing innerHTML property");r=document.createTextNode("test");
30
+ q.areHostMethods(r,["splitText","deleteData","insertData","appendData","cloneNode"])||c.fail("Incomplete Text Node implementation");var m=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1};k.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a=this._current=this._next,b;if(this._current){b=a.firstChild;if(!b)for(b=null;a!==this.root&&!(b=a.nextSibling);)a=a.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=
31
+ null}};j.prototype={equals:function(a){return this.node===a.node&this.offset==a.offset},inspect:function(){return"[DomPosition("+h(this.node)+":"+this.offset+")]"}};n.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11};n.prototype.toString=function(){return this.message};b.dom={arrayContains:m,isHtmlNamespace:function(a){var b;return typeof a.namespaceURI==p||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==
32
+ b},parentElement:function(a){a=a.parentNode;return 1==a.nodeType?a:null},getNodeIndex:a,getNodeLength:function(a){var b;return f(a)?a.length:(b=a.childNodes)?b.length:0},getCommonAncestor:d,isAncestorOf:function(a,b,c){for(b=c?b:b.parentNode;b;){if(b===a)return!0;b=b.parentNode}return!1},getClosestAncestorIn:e,isCharacterDataNode:f,insertAfter:g,splitDataNode:function(a,b){var c=a.cloneNode(!1);c.deleteData(0,b);a.deleteData(b,a.length-b);g(c,a);return c},getDocument:i,getWindow:function(a){a=i(a);
33
+ if(typeof a.defaultView!=p)return a.defaultView;if(typeof a.parentWindow!=p)return a.parentWindow;throw Error("Cannot get a window object for node");},getIframeWindow:function(a){if(typeof a.contentWindow!=p)return a.contentWindow;if(typeof a.contentDocument!=p)return a.contentDocument.defaultView;throw Error("getIframeWindow: No Window object found for iframe element");},getIframeDocument:function(a){if(typeof a.contentDocument!=p)return a.contentDocument;if(typeof a.contentWindow!=p)return a.contentWindow.document;
34
+ throw Error("getIframeWindow: No Document object found for iframe element");},getBody:function(a){return q.isHostObject(a,"body")?a.body:a.getElementsByTagName("body")[0]},getRootContainer:function(a){for(var b;b=a.parentNode;)a=b;return a},comparePoints:function(b,c,h,j){var k;if(b==h)return c===j?0:c<j?-1:1;if(k=e(h,b,!0))return c<=a(k)?-1:1;if(k=e(b,h,!0))return a(k)<j?-1:1;c=d(b,h);b=b===c?c:e(b,c,!0);h=h===c?c:e(h,c,!0);if(b===h)throw Error("comparePoints got to case 4 and childA and childB are the same!");
35
+ for(c=c.firstChild;c;){if(c===b)return-1;if(c===h)return 1;c=c.nextSibling}throw Error("Should not be here!");},inspectNode:h,fragmentFromNodeChildren:function(a){for(var b=i(a).createDocumentFragment(),c;c=a.firstChild;)b.appendChild(c);return b},createIterator:function(a){return new k(a)},DomPosition:j};b.DOMException=n});
36
+ rangy.createModule("DomRange",function(b){function c(a,b){return 3!=a.nodeType&&(l.isAncestorOf(a,b.startContainer,!0)||l.isAncestorOf(a,b.endContainer,!0))}function a(a){return l.getDocument(a.startContainer)}function d(a,b,c){if(b=a._listeners[b])for(var d=0,h=b.length;d<h;++d)b[d].call(a,{target:a,args:c})}function e(a){return new u(a.parentNode,l.getNodeIndex(a))}function f(a){return new u(a.parentNode,l.getNodeIndex(a)+1)}function g(a,b,c){var d=11==a.nodeType?a.firstChild:a;l.isCharacterDataNode(b)?
37
+ c==b.length?l.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:l.splitDataNode(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]);return d}function i(b){for(var c,d,h=a(b.range).createDocumentFragment();d=b.next();){c=b.isPartiallySelectedSubtree();d=d.cloneNode(!c);c&&(c=b.getSubtreeIterator(),d.appendChild(i(c)),c.detach(!0));if(10==d.nodeType)throw new B("HIERARCHY_REQUEST_ERR");h.appendChild(d)}return h}function h(a,b,c){for(var d,e,c=c||{stop:!1};d=a.next();)if(a.isPartiallySelectedSubtree())if(!1===
38
+ b(d)){c.stop=!0;break}else{if(d=a.getSubtreeIterator(),h(d,b,c),d.detach(!0),c.stop)break}else for(d=l.createIterator(d);e=d.next();)if(!1===b(e)){c.stop=!0;return}}function k(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),k(b),b.detach(!0)):a.remove()}function j(b){for(var c,d=a(b.range).createDocumentFragment(),h;c=b.next();){b.isPartiallySelectedSubtree()?(c=c.cloneNode(!1),h=b.getSubtreeIterator(),c.appendChild(j(h)),h.detach(!0)):b.remove();if(10==c.nodeType)throw new B("HIERARCHY_REQUEST_ERR");
39
+ d.appendChild(c)}return d}function n(a,b,c){var d=!(!b||!b.length),e,j=!!c;d&&(e=RegExp("^("+b.join("|")+")$"));var k=[];h(new q(a,!1),function(a){(!d||e.test(a.nodeType))&&(!j||c(a))&&k.push(a)});return k}function p(a){return"["+("undefined"==typeof a.getName?"Range":a.getName())+"("+l.inspectNode(a.startContainer)+":"+a.startOffset+", "+l.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function q(a,b){this.range=a;this.clonePartiallySelectedTextNodes=b;if(!a.collapsed){this.sc=a.startContainer;
40
+ this.so=a.startOffset;this.ec=a.endContainer;this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&l.isCharacterDataNode(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc===c&&!l.isCharacterDataNode(this.sc)?this.sc.childNodes[this.so]:l.getClosestAncestorIn(this.sc,c,!0),this._last=this.ec===c&&!l.isCharacterDataNode(this.ec)?this.ec.childNodes[this.eo-1]:l.getClosestAncestorIn(this.ec,c,!0))}}function r(a){this.code=
41
+ this[a];this.codeName=a;this.message="RangeException: "+this.codeName}function m(a,b,c){this.nodes=n(a,b,c);this._next=this.nodes[0];this._position=0}function s(a){return function(b,c){for(var d,h=c?b:b.parentNode;h;){d=h.nodeType;if(l.arrayContains(a,d))return h;h=h.parentNode}return null}}function x(a,b){if($(a,b))throw new r("INVALID_NODE_TYPE_ERR");}function o(a){if(!a.startContainer)throw new B("INVALID_STATE_ERR");}function z(a,b){if(!l.arrayContains(b,a.nodeType))throw new r("INVALID_NODE_TYPE_ERR");
42
+ }function w(a,b){if(0>b||b>(l.isCharacterDataNode(a)?a.length:a.childNodes.length))throw new B("INDEX_SIZE_ERR");}function y(a,b){if(O(a,!0)!==O(b,!0))throw new B("WRONG_DOCUMENT_ERR");}function A(a){if(aa(a,!0))throw new B("NO_MODIFICATION_ALLOWED_ERR");}function t(a,b){if(!a)throw new B(b);}function v(a){o(a);if(!l.arrayContains(G,a.startContainer.nodeType)&&!O(a.startContainer,!0)||!l.arrayContains(G,a.endContainer.nodeType)&&!O(a.endContainer,!0)||!(a.startOffset<=(l.isCharacterDataNode(a.startContainer)?
43
+ a.startContainer.length:a.startContainer.childNodes.length))||!(a.endOffset<=(l.isCharacterDataNode(a.endContainer)?a.endContainer.length:a.endContainer.childNodes.length)))throw Error("Range error: Range is no longer valid after DOM mutation ("+a.inspect()+")");}function D(){}function K(a){a.START_TO_START=Q;a.START_TO_END=U;a.END_TO_END=ba;a.END_TO_START=V;a.NODE_BEFORE=W;a.NODE_AFTER=X;a.NODE_BEFORE_AND_AFTER=Y;a.NODE_INSIDE=R}function F(a){K(a);K(a.prototype)}function E(a,b){return function(){v(this);
44
+ var c=this.startContainer,d=this.startOffset,e=this.commonAncestorContainer,j=new q(this,!0);c!==e&&(c=l.getClosestAncestorIn(c,e,!0),d=f(c),c=d.node,d=d.offset);h(j,A);j.reset();e=a(j);j.detach();b(this,c,d,c,d);return e}}function I(a,d,h){function g(a,b){return function(c){o(this);z(c,L);z(M(c),G);c=(a?e:f)(c);(b?i:n)(this,c.node,c.offset)}}function i(a,b,c){var h=a.endContainer,e=a.endOffset;if(b!==a.startContainer||c!==a.startOffset){if(M(b)!=M(h)||1==l.comparePoints(b,c,h,e))h=b,e=c;d(a,b,c,
45
+ h,e)}}function n(a,b,c){var h=a.startContainer,e=a.startOffset;if(b!==a.endContainer||c!==a.endOffset){if(M(b)!=M(h)||-1==l.comparePoints(b,c,h,e))h=b,e=c;d(a,h,e,b,c)}}a.prototype=new D;b.util.extend(a.prototype,{setStart:function(a,b){o(this);x(a,!0);w(a,b);i(this,a,b)},setEnd:function(a,b){o(this);x(a,!0);w(a,b);n(this,a,b)},setStartBefore:g(!0,!0),setStartAfter:g(!1,!0),setEndBefore:g(!0,!1),setEndAfter:g(!1,!1),collapse:function(a){v(this);a?d(this,this.startContainer,this.startOffset,this.startContainer,
46
+ this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){o(this);x(a,!0);d(this,a,0,a,l.getNodeLength(a))},selectNode:function(a){o(this);x(a,!1);z(a,L);var b=e(a),a=f(a);d(this,b.node,b.offset,a.node,a.offset)},extractContents:E(j,d),deleteContents:E(k,d),canSurroundContents:function(){v(this);A(this.startContainer);A(this.endContainer);var a=new q(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);a.detach();return!b},
47
+ detach:function(){h(this)},splitBoundaries:function(){v(this);var a=this.startContainer,b=this.startOffset,c=this.endContainer,h=this.endOffset,e=a===c;l.isCharacterDataNode(c)&&(0<h&&h<c.length)&&l.splitDataNode(c,h);l.isCharacterDataNode(a)&&(0<b&&b<a.length)&&(a=l.splitDataNode(a,b),e?(h-=b,c=a):c==a.parentNode&&h>=l.getNodeIndex(a)&&h++,b=0);d(this,a,b,c,h)},normalizeBoundaries:function(){v(this);var a=this.startContainer,b=this.startOffset,c=this.endContainer,h=this.endOffset,e=function(a){var b=
48
+ a.nextSibling;b&&b.nodeType==a.nodeType&&(c=a,h=a.length,a.appendData(b.data),b.parentNode.removeChild(b))},j=function(d){var e=d.previousSibling;if(e&&e.nodeType==d.nodeType){a=d;var j=d.length;b=e.length;d.insertData(0,e.data);e.parentNode.removeChild(e);a==c?(h+=b,c=a):c==d.parentNode&&(e=l.getNodeIndex(d),h==e?(c=d,h=j):h>e&&h--)}},k=!0;l.isCharacterDataNode(c)?c.length==h&&e(c):(0<h&&(k=c.childNodes[h-1])&&l.isCharacterDataNode(k)&&e(k),k=!this.collapsed);k?l.isCharacterDataNode(a)?0==b&&j(a):
49
+ b<a.childNodes.length&&(e=a.childNodes[b])&&l.isCharacterDataNode(e)&&j(e):(a=c,b=h);d(this,a,b,c,h)},collapseToPoint:function(a,b){o(this);x(a,!0);w(a,b);(a!==this.startContainer||b!==this.startOffset||a!==this.endContainer||b!==this.endOffset)&&d(this,a,b,a,b)}});F(a)}function N(a){a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset;a.commonAncestorContainer=a.collapsed?a.startContainer:l.getCommonAncestor(a.startContainer,a.endContainer)}function J(a,b,c,h,e){var j=a.startContainer!==
50
+ b||a.startOffset!==c,k=a.endContainer!==h||a.endOffset!==e;a.startContainer=b;a.startOffset=c;a.endContainer=h;a.endOffset=e;N(a);d(a,"boundarychange",{startMoved:j,endMoved:k})}function C(a){this.startContainer=a;this.startOffset=0;this.endContainer=a;this.endOffset=0;this._listeners={boundarychange:[],detach:[]};N(this)}b.requireModules(["DomUtil"]);var l=b.dom,u=l.DomPosition,B=b.DOMException;q.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=
51
+ null;this._next=this._first},hasNext:function(){return!!this._next},next:function(){var a=this._current=this._next;a&&(this._next=a!==this._last?a.nextSibling:null,l.isCharacterDataNode(a)&&this.clonePartiallySelectedTextNodes&&(a===this.ec&&(a=a.cloneNode(!0)).deleteData(this.eo,a.length-this.eo),this._current===this.sc&&(a=a.cloneNode(!0)).deleteData(0,this.so)));return a},remove:function(){var a=this._current,b,c;l.isCharacterDataNode(a)&&(a===this.sc||a===this.ec)?(b=a===this.sc?this.so:0,c=a===
52
+ this.ec?this.eo:a.length,b!=c&&a.deleteData(b,c-b)):a.parentNode&&a.parentNode.removeChild(a)},isPartiallySelectedSubtree:function(){return c(this._current,this.range)},getSubtreeIterator:function(){var b;if(this.isSingleCharacterDataNode)b=this.range.cloneRange(),b.collapse();else{b=new C(a(this.range));var c=this._current,d=c,h=0,e=c,j=l.getNodeLength(c);l.isAncestorOf(c,this.sc,!0)&&(d=this.sc,h=this.so);l.isAncestorOf(c,this.ec,!0)&&(e=this.ec,j=this.eo);J(b,d,h,e,j)}return new q(b,this.clonePartiallySelectedTextNodes)},
53
+ detach:function(a){a&&this.range.detach();this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};r.prototype={BAD_BOUNDARYPOINTS_ERR:1,INVALID_NODE_TYPE_ERR:2};r.prototype.toString=function(){return this.message};m.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){this._current=this._next;this._next=this.nodes[++this._position];return this._current},detach:function(){this._current=this._next=this.nodes=null}};var L=[1,3,4,5,
54
+ 7,8,10],G=[2,9,11],P=[1,3,4,5,7,8,10,11],H=[1,3,4,5,7,8],M=l.getRootContainer,O=s([9,11]),aa=s([5,6,10,12]),$=s([6,10,12]),Z=document.createElement("style"),S=!1;try{Z.innerHTML="<b>x</b>",S=3==Z.firstChild.nodeType}catch(ca){}b.features.htmlParsingConforms=S;var T="startContainer startOffset endContainer endOffset collapsed commonAncestorContainer".split(" "),Q=0,U=1,ba=2,V=3,W=0,X=1,Y=2,R=3;D.prototype={attachListener:function(a,b){this._listeners[a].push(b)},compareBoundaryPoints:function(a,b){v(this);
55
+ y(this.startContainer,b.startContainer);var c=a==V||a==Q?"start":"end",d=a==U||a==Q?"start":"end";return l.comparePoints(this[c+"Container"],this[c+"Offset"],b[d+"Container"],b[d+"Offset"])},insertNode:function(a){v(this);z(a,P);A(this.startContainer);if(l.isAncestorOf(a,this.startContainer,!0))throw new B("HIERARCHY_REQUEST_ERR");this.setStartBefore(g(a,this.startContainer,this.startOffset))},cloneContents:function(){v(this);var b,c;if(this.collapsed)return a(this).createDocumentFragment();if(this.startContainer===
56
+ this.endContainer&&l.isCharacterDataNode(this.startContainer))return b=this.startContainer.cloneNode(!0),b.data=b.data.slice(this.startOffset,this.endOffset),c=a(this).createDocumentFragment(),c.appendChild(b),c;c=new q(this,!0);b=i(c);c.detach();return b},canSurroundContents:function(){v(this);A(this.startContainer);A(this.endContainer);var a=new q(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);a.detach();return!b},surroundContents:function(a){z(a,H);if(!this.canSurroundContents())throw new r("BAD_BOUNDARYPOINTS_ERR");
57
+ var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);g(a,this.startContainer,this.startOffset);a.appendChild(b);this.selectNode(a)},cloneRange:function(){v(this);for(var b=new C(a(this)),c=T.length,d;c--;)d=T[c],b[d]=this[d];return b},toString:function(){v(this);var a=this.startContainer;if(a===this.endContainer&&l.isCharacterDataNode(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],a=new q(this,!0);h(a,function(a){(3==
58
+ a.nodeType||4==a.nodeType)&&b.push(a.data)});a.detach();return b.join("")},compareNode:function(a){v(this);var b=a.parentNode,c=l.getNodeIndex(a);if(!b)throw new B("NOT_FOUND_ERR");a=this.comparePoint(b,c);b=this.comparePoint(b,c+1);return 0>a?0<b?Y:W:0<b?X:R},comparePoint:function(a,b){v(this);t(a,"HIERARCHY_REQUEST_ERR");y(a,this.startContainer);return 0>l.comparePoints(a,b,this.startContainer,this.startOffset)?-1:0<l.comparePoints(a,b,this.endContainer,this.endOffset)?1:0},createContextualFragment:S?
59
+ function(a){var b=this.startContainer,c=l.getDocument(b);if(!b)throw new B("INVALID_STATE_ERR");var d=null;1==b.nodeType?d=b:l.isCharacterDataNode(b)&&(d=l.parentElement(b));d=null===d||"HTML"==d.nodeName&&l.isHtmlNamespace(l.getDocument(d).documentElement)&&l.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1);d.innerHTML=a;return l.fragmentFromNodeChildren(d)}:function(b){o(this);var c=a(this).createElement("body");c.innerHTML=b;return l.fragmentFromNodeChildren(c)},toHtml:function(){v(this);
60
+ var b=a(this).createElement("div");b.appendChild(this.cloneContents());return b.innerHTML},intersectsNode:function(b,c){v(this);t(b,"NOT_FOUND_ERR");if(l.getDocument(b)!==a(this))return!1;var d=b.parentNode,h=l.getNodeIndex(b);t(d,"NOT_FOUND_ERR");var e=l.comparePoints(d,h,this.endContainer,this.endOffset),d=l.comparePoints(d,h+1,this.startContainer,this.startOffset);return c?0>=e&&0<=d:0>e&&0<d},isPointInRange:function(a,b){v(this);t(a,"HIERARCHY_REQUEST_ERR");y(a,this.startContainer);return 0<=
61
+ l.comparePoints(a,b,this.startContainer,this.startOffset)&&0>=l.comparePoints(a,b,this.endContainer,this.endOffset)},intersectsRange:function(b,c){v(this);if(a(b)!=a(this))throw new B("WRONG_DOCUMENT_ERR");var d=l.comparePoints(this.startContainer,this.startOffset,b.endContainer,b.endOffset),h=l.comparePoints(this.endContainer,this.endOffset,b.startContainer,b.startOffset);return c?0>=d&&0<=h:0>d&&0<h},intersection:function(a){if(this.intersectsRange(a)){var b=l.comparePoints(this.startContainer,
62
+ this.startOffset,a.startContainer,a.startOffset),c=l.comparePoints(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();-1==b&&d.setStart(a.startContainer,a.startOffset);1==c&&d.setEnd(a.endContainer,a.endOffset);return d}return null},union:function(a){if(this.intersectsRange(a,!0)){var b=this.cloneRange();-1==l.comparePoints(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset);1==l.comparePoints(a.endContainer,
63
+ a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset);return b}throw new r("Ranges do not intersect");},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==R},containsNodeContents:function(a){return 0<=this.comparePoint(a,0)&&0>=this.comparePoint(a,l.getNodeLength(a))},containsRange:function(a){return this.intersection(a).equals(a)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);return 0<c.length?
64
+ (b.setStart(c[0],0),a=c.pop(),b.setEnd(a,a.length),a=this.containsRange(b),b.detach(),a):this.containsNodeContents(a)},createNodeIterator:function(a,b){v(this);return new m(this,a,b)},getNodes:function(a,b){v(this);return n(this,a,b)},getDocument:function(){return a(this)},collapseBefore:function(a){o(this);this.setEndBefore(a);this.collapse(!1)},collapseAfter:function(a){o(this);this.setStartAfter(a);this.collapse(!0)},getName:function(){return"DomRange"},equals:function(a){return C.rangesEqual(this,
65
+ a)},inspect:function(){return p(this)}};I(C,J,function(a){o(a);a.startContainer=a.startOffset=a.endContainer=a.endOffset=null;a.collapsed=a.commonAncestorContainer=null;d(a,"detach",null);a._listeners=null});b.rangePrototype=D.prototype;C.rangeProperties=T;C.RangeIterator=q;C.copyComparisonConstants=F;C.createPrototypeRange=I;C.inspect=p;C.getRangeDocument=a;C.rangesEqual=function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===
66
+ b.endOffset};b.DomRange=C;b.RangeException=r});
67
+ rangy.createModule("WrappedRange",function(b){function c(a,b,c,d){var g=a.duplicate();g.collapse(c);var i=g.parentElement();e.isAncestorOf(b,i,!0)||(i=b);if(!i.canHaveHTML)return new f(i.parentNode,e.getNodeIndex(i));var b=e.getDocument(i).createElement("span"),r,m=c?"StartToStart":"StartToEnd";do i.insertBefore(b,b.previousSibling),g.moveToElementText(b);while(0<(r=g.compareEndPoints(m,a))&&b.previousSibling);m=b.nextSibling;if(-1==r&&m&&e.isCharacterDataNode(m)){g.setEndPoint(c?"EndToStart":"EndToEnd",
68
+ a);if(/[\r\n]/.test(m.data)){i=g.duplicate();c=i.text.replace(/\r\n/g,"\r").length;for(c=i.moveStart("character",c);-1==i.compareEndPoints("StartToEnd",i);)c++,i.moveStart("character",1)}else c=g.text.length;i=new f(m,c)}else m=(d||!c)&&b.previousSibling,i=(c=(d||c)&&b.nextSibling)&&e.isCharacterDataNode(c)?new f(c,0):m&&e.isCharacterDataNode(m)?new f(m,m.length):new f(i,e.getNodeIndex(b));b.parentNode.removeChild(b);return i}function a(a,b){var c,d,f=a.offset,g=e.getDocument(a.node),i=g.body.createTextRange(),
69
+ m=e.isCharacterDataNode(a.node);m?(c=a.node,d=c.parentNode):(c=a.node.childNodes,c=f<c.length?c[f]:null,d=a.node);g=g.createElement("span");g.innerHTML="&#feff;";c?d.insertBefore(g,c):d.appendChild(g);i.moveToElementText(g);i.collapse(!b);d.removeChild(g);if(m)i[b?"moveStart":"moveEnd"]("character",f);return i}b.requireModules(["DomUtil","DomRange"]);var d,e=b.dom,f=e.DomPosition,g=b.DomRange;if(b.features.implementsDomRange&&(!b.features.implementsTextRange||!b.config.preferTextRange))(function(){function a(b){for(var c=
70
+ j.length,d;c--;)d=j[c],b[d]=b.nativeRange[d]}var c,j=g.rangeProperties,f;d=function(b){if(!b)throw Error("Range must be specified");this.nativeRange=b;a(this)};g.createPrototypeRange(d,function(a,b,c,d,h){var e=a.endContainer!==d||a.endOffset!=h;if(a.startContainer!==b||a.startOffset!=c||e)a.setEnd(d,h),a.setStart(b,c)},function(a){a.nativeRange.detach();a.detached=!0;for(var b=j.length,c;b--;)c=j[b],a[c]=null});c=d.prototype;c.selectNode=function(b){this.nativeRange.selectNode(b);a(this)};c.deleteContents=
71
+ function(){this.nativeRange.deleteContents();a(this)};c.extractContents=function(){var b=this.nativeRange.extractContents();a(this);return b};c.cloneContents=function(){return this.nativeRange.cloneContents()};c.surroundContents=function(b){this.nativeRange.surroundContents(b);a(this)};c.collapse=function(b){this.nativeRange.collapse(b);a(this)};c.cloneRange=function(){return new d(this.nativeRange.cloneRange())};c.refresh=function(){a(this)};c.toString=function(){return this.nativeRange.toString()};
72
+ var i=document.createTextNode("test");e.getBody(document).appendChild(i);var q=document.createRange();q.setStart(i,0);q.setEnd(i,0);try{q.setStart(i,1),c.setStart=function(b,c){this.nativeRange.setStart(b,c);a(this)},c.setEnd=function(b,c){this.nativeRange.setEnd(b,c);a(this)},f=function(b){return function(c){this.nativeRange[b](c);a(this)}}}catch(r){c.setStart=function(b,c){try{this.nativeRange.setStart(b,c)}catch(d){this.nativeRange.setEnd(b,c),this.nativeRange.setStart(b,c)}a(this)},c.setEnd=function(b,
73
+ c){try{this.nativeRange.setEnd(b,c)}catch(d){this.nativeRange.setStart(b,c),this.nativeRange.setEnd(b,c)}a(this)},f=function(b,c){return function(d){try{this.nativeRange[b](d)}catch(e){this.nativeRange[c](d),this.nativeRange[b](d)}a(this)}}}c.setStartBefore=f("setStartBefore","setEndBefore");c.setStartAfter=f("setStartAfter","setEndAfter");c.setEndBefore=f("setEndBefore","setStartBefore");c.setEndAfter=f("setEndAfter","setStartAfter");q.selectNodeContents(i);c.selectNodeContents=q.startContainer==
74
+ i&&q.endContainer==i&&0==q.startOffset&&q.endOffset==i.length?function(b){this.nativeRange.selectNodeContents(b);a(this)}:function(a){this.setStart(a,0);this.setEnd(a,g.getEndOffset(a))};q.selectNodeContents(i);q.setEnd(i,3);f=document.createRange();f.selectNodeContents(i);f.setEnd(i,4);f.setStart(i,2);c.compareBoundaryPoints=-1==q.compareBoundaryPoints(q.START_TO_END,f)&1==q.compareBoundaryPoints(q.END_TO_START,f)?function(a,b){b=b.nativeRange||b;a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&
75
+ (a=b.START_TO_END);return this.nativeRange.compareBoundaryPoints(a,b)}:function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};b.util.isHostMethod(q,"createContextualFragment")&&(c.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)});e.getBody(document).removeChild(i);q.detach();f.detach()})(),b.createNativeRange=function(a){a=a||document;return a.createRange()};else if(b.features.implementsTextRange){d=function(a){this.textRange=a;this.refresh()};
76
+ d.prototype=new g(document);d.prototype.refresh=function(){var a,b,d=this.textRange;a=d.parentElement();var f=d.duplicate();f.collapse(!0);b=f.parentElement();f=d.duplicate();f.collapse(!1);d=f.parentElement();b=b==d?b:e.getCommonAncestor(b,d);b=b==a?b:e.getCommonAncestor(a,b);0==this.textRange.compareEndPoints("StartToEnd",this.textRange)?b=a=c(this.textRange,b,!0,!0):(a=c(this.textRange,b,!0,!1),b=c(this.textRange,b,!1,!1));this.setStart(a.node,a.offset);this.setEnd(b.node,b.offset)};g.copyComparisonConstants(d);
77
+ var i=function(){return this}();"undefined"==typeof i.Range&&(i.Range=d);b.createNativeRange=function(a){a=a||document;return a.body.createTextRange()}}b.features.implementsTextRange&&(d.rangeToTextRange=function(b){if(b.collapsed)return a(new f(b.startContainer,b.startOffset),!0);var c=a(new f(b.startContainer,b.startOffset),!0),d=a(new f(b.endContainer,b.endOffset),!1),b=e.getDocument(b.startContainer).body.createTextRange();b.setEndPoint("StartToStart",c);b.setEndPoint("EndToEnd",d);return b});
78
+ d.prototype.getName=function(){return"WrappedRange"};b.WrappedRange=d;b.createRange=function(a){a=a||document;return new d(b.createNativeRange(a))};b.createRangyRange=function(a){a=a||document;return new g(a)};b.createIframeRange=function(a){return b.createRange(e.getIframeDocument(a))};b.createIframeRangyRange=function(a){return b.createRangyRange(e.getIframeDocument(a))};b.addCreateMissingNativeApiListener(function(a){a=a.document;if(typeof a.createRange=="undefined")a.createRange=function(){return b.createRange(this)};
79
+ a=a=null})});
80
+ rangy.createModule("WrappedSelection",function(b,c){function a(a){return(a||window).getSelection()}function d(a){return(a||window).document.selection}function e(a,b,c){var d=c?"end":"start",c=c?"start":"end";a.anchorNode=b[d+"Container"];a.anchorOffset=b[d+"Offset"];a.focusNode=b[c+"Container"];a.focusOffset=b[c+"Offset"]}function f(a){a.anchorNode=a.focusNode=null;a.anchorOffset=a.focusOffset=0;a.rangeCount=0;a.isCollapsed=!0;a._ranges.length=0}function g(a){var c;a instanceof x?(c=a._selectionNativeRange,
81
+ c||(c=b.createNativeRange(m.getDocument(a.startContainer)),c.setEnd(a.endContainer,a.endOffset),c.setStart(a.startContainer,a.startOffset),a._selectionNativeRange=c,a.attachListener("detach",function(){this._selectionNativeRange=null}))):a instanceof o?c=a.nativeRange:b.features.implementsDomRange&&a instanceof m.getWindow(a.startContainer).Range&&(c=a);return c}function i(a){var b=a.getNodes(),c;a:if(!b.length||1!=b[0].nodeType)c=!1;else{c=1;for(var d=b.length;c<d;++c)if(!m.isAncestorOf(b[0],b[c])){c=
82
+ !1;break a}c=!0}if(!c)throw Error("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return b[0]}function h(a,b){var c=new o(b);a._ranges=[c];e(a,c,!1);a.rangeCount=1;a.isCollapsed=c.collapsed}function k(a){a._ranges.length=0;if("None"==a.docSelection.type)f(a);else{var c=a.docSelection.createRange();if(c&&"undefined"!=typeof c.text)h(a,c);else{a.rangeCount=c.length;for(var d,j=m.getDocument(c.item(0)),k=0;k<a.rangeCount;++k)d=b.createRange(j),d.selectNode(c.item(k)),
83
+ a._ranges.push(d);a.isCollapsed=1==a.rangeCount&&a._ranges[0].collapsed;e(a,a._ranges[a.rangeCount-1],!1)}}}function j(a,b){for(var c=a.docSelection.createRange(),d=i(b),e=m.getDocument(c.item(0)),e=m.getBody(e).createControlRange(),h=0,j=c.length;h<j;++h)e.add(c.item(h));try{e.add(d)}catch(f){throw Error("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)");}e.select();k(a)}function n(a,b,c){this.nativeSelection=a;this.docSelection=b;this._ranges=
84
+ [];this.win=c;this.refresh()}function p(a,b){for(var c=m.getDocument(b[0].startContainer),c=m.getBody(c).createControlRange(),d=0,e;d<rangeCount;++d){e=i(b[d]);try{c.add(e)}catch(h){throw Error("setRanges(): Element within the one of the specified Ranges could not be added to control selection (does it have layout?)");}}c.select();k(a)}function q(a,b){if(a.anchorNode&&m.getDocument(a.anchorNode)!==m.getDocument(b))throw new z("WRONG_DOCUMENT_ERR");}function r(a){var b=[],c=new w(a.anchorNode,a.anchorOffset),
85
+ d=new w(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var h=0,j=a.rangeCount;h<j;++h)b[h]=x.inspect(a.getRangeAt(h));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}b.requireModules(["DomUtil","DomRange","WrappedRange"]);b.config.checkSelectionRanges=!0;var m=b.dom,s=b.util,x=b.DomRange,o=b.WrappedRange,z=b.DOMException,w=m.DomPosition,y,A,t=b.util.isHostMethod(window,"getSelection"),
86
+ v=b.util.isHostObject(document,"selection"),D=v&&(!t||b.config.preferTextRange);D?(y=d,b.isSelectionValid=function(a){var a=(a||window).document,b=a.selection;return"None"!=b.type||m.getDocument(b.createRange().parentElement())==a}):t?(y=a,b.isSelectionValid=function(){return!0}):c.fail("Neither document.selection or window.getSelection() detected.");b.getNativeSelection=y;var t=y(),K=b.createNativeRange(document),F=m.getBody(document),E=s.areHostObjects(t,s.areHostProperties(t,["anchorOffset","focusOffset"]));
87
+ b.features.selectionHasAnchorAndFocus=E;var I=s.isHostMethod(t,"extend");b.features.selectionHasExtend=I;var N="number"==typeof t.rangeCount;b.features.selectionHasRangeCount=N;var J=!1,C=!0;s.areHostMethods(t,["addRange","getRangeAt","removeAllRanges"])&&("number"==typeof t.rangeCount&&b.features.implementsDomRange)&&function(){var a=document.createElement("iframe");F.appendChild(a);var b=m.getIframeDocument(a);b.open();b.write("<html><head></head><body>12</body></html>");b.close();var c=m.getIframeWindow(a).getSelection(),
88
+ d=b.documentElement.lastChild.firstChild,b=b.createRange();b.setStart(d,1);b.collapse(true);c.addRange(b);C=c.rangeCount==1;c.removeAllRanges();var e=b.cloneRange();b.setStart(d,0);e.setEnd(d,2);c.addRange(b);c.addRange(e);J=c.rangeCount==2;b.detach();e.detach();F.removeChild(a)}();b.features.selectionSupportsMultipleRanges=J;b.features.collapsedNonEditableSelectionsSupported=C;var l=!1,u;F&&s.isHostMethod(F,"createControlRange")&&(u=F.createControlRange(),s.areHostProperties(u,["item","add"])&&(l=
89
+ !0));b.features.implementsControlRange=l;A=E?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:false};var B;s.isHostMethod(t,"getRangeAt")?B=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:E&&(B=function(a){var c=m.getDocument(a.anchorNode),c=b.createRange(c);c.setStart(a.anchorNode,a.anchorOffset);c.setEnd(a.focusNode,a.focusOffset);if(c.collapsed!==this.isCollapsed){c.setStart(a.focusNode,
90
+ a.focusOffset);c.setEnd(a.anchorNode,a.anchorOffset)}return c});b.getSelection=function(a){var a=a||window,b=a._rangySelection,c=y(a),e=v?d(a):null;if(b){b.nativeSelection=c;b.docSelection=e;b.refresh(a)}else{b=new n(c,e,a);a._rangySelection=b}return b};b.getIframeSelection=function(a){return b.getSelection(m.getIframeWindow(a))};u=n.prototype;if(!D&&E&&s.areHostMethods(t,["removeAllRanges","addRange"])){u.removeAllRanges=function(){this.nativeSelection.removeAllRanges();f(this)};var L=function(a,
91
+ c){var d=x.getRangeDocument(c),d=b.createRange(d);d.collapseToPoint(c.endContainer,c.endOffset);a.nativeSelection.addRange(g(d));a.nativeSelection.extend(c.startContainer,c.startOffset);a.refresh()};u.addRange=N?function(a,c){if(l&&v&&this.docSelection.type=="Control")j(this,a);else if(c&&I)L(this,a);else{var d;if(J)d=this.rangeCount;else{this.removeAllRanges();d=0}this.nativeSelection.addRange(g(a));this.rangeCount=this.nativeSelection.rangeCount;if(this.rangeCount==d+1){if(b.config.checkSelectionRanges)(d=
92
+ B(this.nativeSelection,this.rangeCount-1))&&!x.rangesEqual(d,a)&&(a=new o(d));this._ranges[this.rangeCount-1]=a;e(this,a,H(this.nativeSelection));this.isCollapsed=A(this)}else this.refresh()}}:function(a,b){if(b&&I)L(this,a);else{this.nativeSelection.addRange(g(a));this.refresh()}};u.setRanges=function(a){if(l&&a.length>1)p(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;b<c;++b)this.addRange(a[b])}}}else if(s.isHostMethod(t,"empty")&&s.isHostMethod(K,"select")&&l&&D)u.removeAllRanges=
93
+ function(){try{this.docSelection.empty();if(this.docSelection.type!="None"){var a;if(this.anchorNode)a=m.getDocument(this.anchorNode);else if(this.docSelection.type=="Control"){var b=this.docSelection.createRange();b.length&&(a=m.getDocument(b.item(0)).body.createTextRange())}if(a){a.body.createTextRange().select();this.docSelection.empty()}}}catch(c){}f(this)},u.addRange=function(a){if(this.docSelection.type=="Control")j(this,a);else{o.rangeToTextRange(a).select();this._ranges[0]=a;this.rangeCount=
94
+ 1;this.isCollapsed=this._ranges[0].collapsed;e(this,a,false)}},u.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?p(this,a):b&&this.addRange(a[0])};else return c.fail("No means of selecting a Range or TextRange was found"),!1;u.getRangeAt=function(a){if(a<0||a>=this.rangeCount)throw new z("INDEX_SIZE_ERR");return this._ranges[a]};var G;if(D)G=function(a){var c;if(b.isSelectionValid(a.win))c=a.docSelection.createRange();else{c=m.getBody(a.win.document).createTextRange();c.collapse(true)}a.docSelection.type==
95
+ "Control"?k(a):c&&typeof c.text!="undefined"?h(a,c):f(a)};else if(s.isHostMethod(t,"getRangeAt")&&"number"==typeof t.rangeCount)G=function(a){if(l&&v&&a.docSelection.type=="Control")k(a);else{a._ranges.length=a.rangeCount=a.nativeSelection.rangeCount;if(a.rangeCount){for(var c=0,d=a.rangeCount;c<d;++c)a._ranges[c]=new b.WrappedRange(a.nativeSelection.getRangeAt(c));e(a,a._ranges[a.rangeCount-1],H(a.nativeSelection));a.isCollapsed=A(a)}else f(a)}};else if(E&&"boolean"==typeof t.isCollapsed&&"boolean"==
96
+ typeof K.collapsed&&b.features.implementsDomRange)G=function(a){var b;b=a.nativeSelection;if(b.anchorNode){b=B(b,0);a._ranges=[b];a.rangeCount=1;b=a.nativeSelection;a.anchorNode=b.anchorNode;a.anchorOffset=b.anchorOffset;a.focusNode=b.focusNode;a.focusOffset=b.focusOffset;a.isCollapsed=A(a)}else f(a)};else return c.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;u.refresh=function(a){var b=a?this._ranges.slice(0):null;G(this);if(a){a=b.length;if(a!=this._ranges.length)return false;
97
+ for(;a--;)if(!x.rangesEqual(b[a],this._ranges[a]))return false;return true}};var P=function(a,b){var c=a.getAllRanges(),d=false;a.removeAllRanges();for(var e=0,h=c.length;e<h;++e)d||b!==c[e]?a.addRange(c[e]):d=true;a.rangeCount||f(a)};u.removeRange=l?function(a){if(this.docSelection.type=="Control"){for(var b=this.docSelection.createRange(),a=i(a),c=m.getDocument(b.item(0)),c=m.getBody(c).createControlRange(),d,e=false,h=0,j=b.length;h<j;++h){d=b.item(h);d!==a||e?c.add(b.item(h)):e=true}c.select();
98
+ k(this)}else P(this,a)}:function(a){P(this,a)};var H;!D&&E&&b.features.implementsDomRange?(H=function(a){var b=false;a.anchorNode&&(b=m.comparePoints(a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset)==1);return b},u.isBackwards=function(){return H(this)}):H=u.isBackwards=function(){return false};u.toString=function(){for(var a=[],b=0,c=this.rangeCount;b<c;++b)a[b]=""+this._ranges[b];return a.join("")};u.collapse=function(a,c){q(this,a);var d=b.createRange(m.getDocument(a));d.collapseToPoint(a,
99
+ c);this.removeAllRanges();this.addRange(d);this.isCollapsed=true};u.collapseToStart=function(){if(this.rangeCount){var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)}else throw new z("INVALID_STATE_ERR");};u.collapseToEnd=function(){if(this.rangeCount){var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)}else throw new z("INVALID_STATE_ERR");};u.selectAllChildren=function(a){q(this,a);var c=b.createRange(m.getDocument(a));c.selectNodeContents(a);this.removeAllRanges();
100
+ this.addRange(c)};u.deleteFromDocument=function(){if(l&&v&&this.docSelection.type=="Control"){for(var a=this.docSelection.createRange(),b;a.length;){b=a.item(0);a.remove(b);b.parentNode.removeChild(b)}this.refresh()}else if(this.rangeCount){a=this.getAllRanges();this.removeAllRanges();b=0;for(var c=a.length;b<c;++b)a[b].deleteContents();this.addRange(a[c-1])}};u.getAllRanges=function(){return this._ranges.slice(0)};u.setSingleRange=function(a){this.setRanges([a])};u.containsNode=function(a,b){for(var c=
101
+ 0,d=this._ranges.length;c<d;++c)if(this._ranges[c].containsNode(a,b))return true;return false};u.toHtml=function(){var a="";if(this.rangeCount){for(var a=x.getRangeDocument(this._ranges[0]).createElement("div"),b=0,c=this._ranges.length;b<c;++b)a.appendChild(this._ranges[b].cloneContents());a=a.innerHTML}return a};u.getName=function(){return"WrappedSelection"};u.inspect=function(){return r(this)};u.detach=function(){this.win=this.anchorNode=this.focusNode=this.win._rangySelection=null};n.inspect=
102
+ r;b.Selection=n;b.selectionPrototype=u;b.addCreateMissingNativeApiListener(function(a){if(typeof a.getSelection=="undefined")a.getSelection=function(){return b.getSelection(this)};a=null})});var Base=function(){};
103
+ Base.extend=function(b,c){var a=Base.prototype.extend;Base._prototyping=!0;var d=new this;a.call(d,b);d.base=function(){};delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||a).call(arguments[0],d)};f.ancestor=this;f.extend=this.extend;f.forEach=this.forEach;f.implement=this.implement;f.prototype=
104
+ d;f.toString=this.toString;f.valueOf=function(a){return"object"==a?f:e.valueOf()};a.call(f,c);"function"==typeof f.init&&f.init();return f};
105
+ Base.prototype={extend:function(b,c){if(1<arguments.length){var a=this[b];if(a&&"function"==typeof c&&(!a.valueOf||a.valueOf()!=c.valueOf())&&/\bbase\b/.test(c)){var d=c.valueOf(),c=function(){var b=this.base||Base.prototype.base;this.base=a;var c=d.apply(this,arguments);this.base=b;return c};c.valueOf=function(a){return"object"==a?c:d};c.toString=Base.toString}this[b]=c}else if(b){var e=Base.prototype.extend;!Base._prototyping&&"function"!=typeof this&&(e=this.extend||e);for(var f={toSource:null},
106
+ g=["constructor","toString","valueOf"],i=Base._prototyping?0:1;h=g[i++];)b[h]!=f[h]&&e.call(this,h,b[h]);for(var h in b)f[h]||e.call(this,h,b[h])}return this}};
107
+ Base=Base.extend({constructor:function(b){this.extend(b)}},{ancestor:Object,version:"1.1",forEach:function(b,c,a){for(var d in b)void 0===this.prototype[d]&&c.call(a,b[d],d,b)},implement:function(){for(var b=0;b<arguments.length;b++)if("function"==typeof arguments[b])arguments[b](this.prototype);else this.prototype.extend(arguments[b]);return this},toString:function(){return""+this.valueOf()}});
108
+ wysihtml5.browser=function(){var b=navigator.userAgent,c=document.createElement("div"),a=-1!==b.indexOf("MSIE")&&-1===b.indexOf("Opera"),d=-1!==b.indexOf("Gecko")&&-1===b.indexOf("KHTML"),e=-1!==b.indexOf("AppleWebKit/"),f=-1!==b.indexOf("Chrome/"),g=-1!==b.indexOf("Opera/");return{USER_AGENT:b,supported:function(){var a=this.USER_AGENT.toLowerCase(),b="contentEditable"in c,d=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,e=document.querySelector&&document.querySelectorAll,
109
+ a=this.isIos()&&5>(/ipad|iphone|ipod/.test(a)&&a.match(/ os (\d+).+? like mac os x/)||[,0])[1]||-1!==a.indexOf("opera mobi")||-1!==a.indexOf("hpwos/");return b&&d&&e&&!a},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){var a=this.USER_AGENT.toLowerCase();return-1!==a.indexOf("webkit")&&-1!==a.indexOf("mobile")},supportsSandboxedIframes:function(){return a},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return!d},
110
+ hasCurrentStyleProperty:function(){return"currentStyle"in c},insertsLineBreaksOnReturn:function(){return d},supportsPlaceholderAttributeOn:function(a){return"placeholder"in a},supportsEvent:function(a){var b;if(!(b="on"+a in c))c.setAttribute("on"+a,"return;"),b="function"===typeof c["on"+a];return b},supportsEventsInIframeCorrectly:function(){return!g},firesOnDropOnlyWhenOnDragOverIsCancelled:function(){return e||d},supportsDataTransfer:function(){try{return e&&(window.Clipboard||window.DataTransfer).prototype.getData}catch(a){return!1}},
111
+ supportsHTML5Tags:function(a){a=a.createElement("div");a.innerHTML="<article>foo</article>";return"<article>foo</article>"===a.innerHTML.toLowerCase()},supportsCommand:function(){var b={formatBlock:a,insertUnorderedList:a||g||e,insertOrderedList:a||g||e},c={insertHTML:d};return function(a,d){if(!b[d]){try{return a.queryCommandSupported(d)}catch(e){}try{return a.queryCommandEnabled(d)}catch(f){return!!c[d]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return a},canDisableAutoLinking:function(){return this.supportsCommand(document,
112
+ "AutoUrlDetect")},clearsContentEditableCorrectly:function(){return d||g||e},supportsGetAttributeCorrectly:function(){return"1"!=document.createElement("td").getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return d||a||g},clearsListsInContentEditableCorrectly:function(){return d||a||e},autoScrollsToCaret:function(){return!e},autoClosesUnclosedTags:function(){var a=c.cloneNode(!1),b;a.innerHTML="<p><div></div>";a=a.innerHTML.toLowerCase();b="<p></p><div></div>"===a||"<p><div></div></p>"===
113
+ a;this.autoClosesUnclosedTags=function(){return b};return b},supportsNativeGetElementsByClassName:function(){return-1!==(""+document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},supportsClassList:function(){return"classList"in c},needsSpaceAfterLineBreak:function(){return g},supportsSpeechApiOn:function(a){return 11<=(b.match(/Chrome\/(\d+)/)||[,0])[1]&&("onwebkitspeechchange"in a||"speech"in a)},
114
+ crashesWhenDefineProperty:function(b){return a&&("XMLHttpRequest"===b||"XDomainRequest"===b)},doesAsyncFocus:function(){return a},hasProblemsSettingCaretAfterImg:function(){return a},hasUndoInContextMenu:function(){return d||f||g}}}();
115
+ wysihtml5.lang.array=function(b){return{contains:function(c){if(b.indexOf)return-1!==b.indexOf(c);for(var a=0,d=b.length;a<d;a++)if(b[a]===c)return!0;return!1},without:function(c){for(var c=wysihtml5.lang.array(c),a=[],d=0,e=b.length;d<e;d++)c.contains(b[d])||a.push(b[d]);return a},get:function(){for(var c=0,a=b.length,d=[];c<a;c++)d.push(b[c]);return d}}};
116
+ wysihtml5.lang.Dispatcher=Base.extend({observe:function(b,c){this.events=this.events||{};this.events[b]=this.events[b]||[];this.events[b].push(c);return this},on:function(){return this.observe.apply(this,wysihtml5.lang.array(arguments).get())},fire:function(b,c){this.events=this.events||{};for(var a=this.events[b]||[],d=0;d<a.length;d++)a[d].call(this,c);return this},stopObserving:function(b,c){this.events=this.events||{};var a=0,d,e;if(b){d=this.events[b]||[];for(e=[];a<d.length;a++)d[a]!==c&&c&&
117
+ e.push(d[a]);this.events[b]=e}else this.events={};return this}});wysihtml5.lang.object=function(b){return{merge:function(c){for(var a in c)b[a]=c[a];return this},get:function(){return b},clone:function(){var c={},a;for(a in b)c[a]=b[a];return c},isArray:function(){return"[object Array]"===Object.prototype.toString.call(b)}}};
118
+ (function(){var b=/^\s+/,c=/\s+$/;wysihtml5.lang.string=function(a){a=""+a;return{trim:function(){return a.replace(b,"").replace(c,"")},interpolate:function(b){for(var c in b)a=this.replace("#{"+c+"}").by(b[c]);return a},replace:function(b){return{by:function(c){return a.split(b).join(c)}}}}}})();
119
+ (function(b){function c(a){return a.replace(e,function(a,b){var c=(b.match(f)||[])[1]||"",d=i[c],b=b.replace(f,"");b.split(d).length>b.split(c).length&&(b+=c,c="");var e=d=b;b.length>g&&(e=e.substr(0,g)+"...");"www."===d.substr(0,4)&&(d="http://"+d);return'<a href="'+d+'">'+e+"</a>"+c})}function a(h){if(!d.contains(h.nodeName))if(h.nodeType===b.TEXT_NODE&&h.data.match(e)){var f=h.parentNode,j;j=f.ownerDocument;var g=j._wysihtml5_tempElement;g||(g=j._wysihtml5_tempElement=j.createElement("div"));j=
120
+ g;j.innerHTML="<span></span>"+c(h.data);for(j.removeChild(j.firstChild);j.firstChild;)f.insertBefore(j.firstChild,h);f.removeChild(h)}else{f=b.lang.array(h.childNodes).get();j=f.length;for(g=0;g<j;g++)a(f[g]);return h}}var d=b.lang.array("CODE PRE A SCRIPT HEAD TITLE STYLE".split(" ")),e=/((https?:\/\/|www\.)[^\s<]{3,})/gi,f=/([^\w\/\-](,?))$/i,g=100,i={")":"(","]":"[","}":"{"};b.dom.autoLink=function(b){var c;a:{c=b;for(var e;c.parentNode;){c=c.parentNode;e=c.nodeName;if(d.contains(e)){c=!0;break a}if("body"===
121
+ e)break}c=!1}if(c)return b;b===b.ownerDocument.documentElement&&(b=b.ownerDocument.body);return a(b)};b.dom.autoLink.URL_REG_EXP=e})(wysihtml5);
122
+ (function(b){var c=b.browser.supportsClassList(),a=b.dom;a.addClass=function(b,e){if(c)return b.classList.add(e);a.hasClass(b,e)||(b.className+=" "+e)};a.removeClass=function(a,b){if(c)return a.classList.remove(b);a.className=a.className.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)")," ")};a.hasClass=function(a,b){if(c)return a.classList.contains(b);var f=a.className;return 0<f.length&&(f==b||RegExp("(^|\\s)"+b+"(\\s|$)").test(f))}})(wysihtml5);
123
+ wysihtml5.dom.contains=function(){var b=document.documentElement;if(b.contains)return function(b,a){a.nodeType!==wysihtml5.ELEMENT_NODE&&(a=a.parentNode);return b!==a&&b.contains(a)};if(b.compareDocumentPosition)return function(b,a){return!!(b.compareDocumentPosition(a)&16)}}();
124
+ wysihtml5.dom.convertToList=function(){function b(b,a){var d=b.createElement("li");a.appendChild(d);return d}return function(c,a){if("UL"===c.nodeName||"OL"===c.nodeName||"MENU"===c.nodeName)return c;var d=c.ownerDocument,e=d.createElement(a),f=c.querySelectorAll("br"),g=f.length,i,h,k,j,n;for(n=0;n<g;n++)for(i=f[n];(h=i.parentNode)&&h!==c&&h.lastChild===i;){if("block"===wysihtml5.dom.getStyle("display").from(h)){h.removeChild(i);break}wysihtml5.dom.insert(i).after(i.parentNode)}f=wysihtml5.lang.array(c.childNodes).get();
125
+ g=f.length;for(n=0;n<g;n++)j=j||b(d,e),i=f[n],h="block"===wysihtml5.dom.getStyle("display").from(i),k="BR"===i.nodeName,h?(j=j.firstChild?b(d,e):j,j.appendChild(i),j=null):k?j=j.firstChild?null:j:j.appendChild(i);c.parentNode.replaceChild(e,c);return e}}();wysihtml5.dom.copyAttributes=function(b){return{from:function(c){return{to:function(a){for(var d,e=0,f=b.length;e<f;e++)d=b[e],"undefined"!==typeof c[d]&&""!==c[d]&&(a[d]=c[d]);return{andTo:arguments.callee}}}}}};
126
+ (function(b){var c=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],a=function(a){var e;a:for(var f=0,g=c.length;f<g;f++)if("border-box"===b.getStyle(c[f]).from(a)){e=c[f];break a}return e?parseInt(b.getStyle("width").from(a),10)<a.offsetWidth:!1};b.copyStyles=function(d){return{from:function(e){a(e)&&(d=wysihtml5.lang.array(d).without(c));for(var f="",g=d.length,i=0,h;i<g;i++)h=d[i],f+=h+":"+b.getStyle(h).from(e)+";";return{to:function(a){b.setStyles(f).on(a);return{andTo:arguments.callee}}}}}}})(wysihtml5.dom);
127
+ (function(b){b.dom.delegate=function(c,a,d,e){return b.dom.observe(c,d,function(d){for(var g=d.target,i=b.lang.array(c.querySelectorAll(a));g&&g!==c;){if(i.contains(g)){e.call(g,d);break}g=g.parentNode}})}})(wysihtml5);
128
+ wysihtml5.dom.getAsDom=function(){var b="abbr article aside audio bdi canvas command datalist details figcaption figure footer header hgroup keygen mark meter nav output progress rp rt ruby svg section source summary time track video wbr".split(" ");return function(c,a){var a=a||document,d;if("object"===typeof c&&c.nodeType)d=a.createElement("div"),d.appendChild(c);else if(wysihtml5.browser.supportsHTML5Tags(a))d=a.createElement("div"),d.innerHTML=c;else{d=a;if(!d._wysihtml5_supportsHTML5Tags){for(var e=
129
+ 0,f=b.length;e<f;e++)d.createElement(b[e]);d._wysihtml5_supportsHTML5Tags=!0}d=a;e=d.createElement("div");e.style.display="none";d.body.appendChild(e);try{e.innerHTML=c}catch(g){}d.body.removeChild(e);d=e}return d}}();
130
+ wysihtml5.dom.getParentElement=function(){function b(b,a){return!a||!a.length?!0:"string"===typeof a?b===a:wysihtml5.lang.array(a).contains(b)}return function(c,a,d){d=d||50;if(a.className||a.classRegExp){a:{for(var e=a.nodeName,f=a.className,a=a.classRegExp;d--&&c&&"BODY"!==c.nodeName;){var g;if(g=c.nodeType===wysihtml5.ELEMENT_NODE)if(g=b(c.nodeName,e)){g=f;var i=(c.className||"").match(a)||[];g=!g?!!i.length:i[i.length-1]===g}if(g)break a;c=c.parentNode}c=null}return c}a:{e=a.nodeName;for(f=d;f--&&
131
+ c&&"BODY"!==c.nodeName;){if(b(c.nodeName,e))break a;c=c.parentNode}c=null}return c}}();
132
+ wysihtml5.dom.getStyle=function(){function b(b){return b.replace(a,function(a){return a.charAt(1).toUpperCase()})}var c={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},a=/\-[a-z]/g;return function(a){return{from:function(e){if(e.nodeType===wysihtml5.ELEMENT_NODE){var f=e.ownerDocument,g=c[a]||b(a),i=e.style,h=e.currentStyle,k=i[g];if(k)return k;if(h)try{return h[g]}catch(j){}var g=f.defaultView||f.parentWindow,f=("height"===a||"width"===a)&&"TEXTAREA"===e.nodeName,
133
+ n;if(g.getComputedStyle)return f&&(n=i.overflow,i.overflow="hidden"),e=g.getComputedStyle(e,null).getPropertyValue(a),f&&(i.overflow=n||""),e}}}}}();wysihtml5.dom.hasElementWithTagName=function(){var b={},c=1;return function(a,d){var e=(a._wysihtml5_identifier||(a._wysihtml5_identifier=c++))+":"+d,f=b[e];f||(f=b[e]=a.getElementsByTagName(d));return 0<f.length}}();
134
+ (function(b){var c={},a=1;b.dom.hasElementWithClassName=function(d,e){if(!b.browser.supportsNativeGetElementsByClassName())return!!d.querySelector("."+e);var f=(d._wysihtml5_identifier||(d._wysihtml5_identifier=a++))+":"+e,g=c[f];g||(g=c[f]=d.getElementsByClassName(e));return 0<g.length}})(wysihtml5);wysihtml5.dom.insert=function(b){return{after:function(c){c.parentNode.insertBefore(b,c.nextSibling)},before:function(c){c.parentNode.insertBefore(b,c)},into:function(c){c.appendChild(b)}}};
135
+ wysihtml5.dom.insertCSS=function(b){b=b.join("\n");return{into:function(c){var a=c.head||c.getElementsByTagName("head")[0],d=c.createElement("style");d.type="text/css";d.styleSheet?d.styleSheet.cssText=b:d.appendChild(c.createTextNode(b));a&&a.appendChild(d)}}};
136
+ wysihtml5.dom.observe=function(b,c,a){for(var c="string"===typeof c?[c]:c,d,e,f=0,g=c.length;f<g;f++)e=c[f],b.addEventListener?b.addEventListener(e,a,!1):(d=function(c){"target"in c||(c.target=c.srcElement);c.preventDefault=c.preventDefault||function(){this.returnValue=false};c.stopPropagation=c.stopPropagation||function(){this.cancelBubble=true};a.call(b,c)},b.attachEvent("on"+e,d));return{stop:function(){for(var e,h=0,f=c.length;h<f;h++)e=c[h],b.removeEventListener?b.removeEventListener(e,a,!1):
137
+ b.detachEvent("on"+e,d)}}};
138
+ wysihtml5.dom.parse=function(){function b(c,e){var h=c.childNodes,f=h.length,g;g=a[c.nodeType];var k=0;g=g&&g(c);if(!g)return null;for(k=0;k<f;k++)(newChild=b(h[k],e))&&g.appendChild(newChild);return e&&1>=g.childNodes.length&&g.nodeName.toLowerCase()===d&&!g.attributes.length?g.firstChild:g}function c(a,b){var b=b.toLowerCase(),c;if(c="IMG"==a.nodeName)if(c="src"==b){var d;try{d=a.complete&&!a.mozMatchesSelector(":-moz-broken")}catch(e){a.complete&&"complete"===a.readyState&&(d=!0)}c=!0===d}return c?
139
+ a.src:i&&"outerHTML"in a?-1!=a.outerHTML.toLowerCase().indexOf(" "+b+"=")?a.getAttribute(b):null:a.getAttribute(b)}var a={1:function(a){var b,f,i=g.tags;f=a.nodeName.toLowerCase();b=a.scopeName;if(a._wysihtml5)return null;a._wysihtml5=1;if("wysihtml5-temp"===a.className)return null;b&&"HTML"!=b&&(f=b+":"+f);"outerHTML"in a&&!wysihtml5.browser.autoClosesUnclosedTags()&&("P"===a.nodeName&&"</p>"!==a.outerHTML.slice(-4).toLowerCase())&&(f="div");if(f in i){b=i[f];if(!b||b.remove)return null;b="string"===
140
+ typeof b?{rename_tag:b}:b}else if(a.firstChild)b={rename_tag:d};else return null;f=a.ownerDocument.createElement(b.rename_tag||f);var i={},r=b.set_class,m=b.add_class,s=b.set_attributes,x=b.check_attributes,o=g.classes,z=0,w=[];b=[];var y=[],A=[],t;s&&(i=wysihtml5.lang.object(s).clone());if(x)for(t in x)if(s=h[x[t]])s=s(c(a,t)),"string"===typeof s&&(i[t]=s);r&&w.push(r);if(m)for(t in m)if(s=k[m[t]])r=s(c(a,t)),"string"===typeof r&&w.push(r);o["_wysihtml5-temp-placeholder"]=1;(A=a.getAttribute("class"))&&
141
+ (w=w.concat(A.split(e)));for(m=w.length;z<m;z++)a=w[z],o[a]&&b.push(a);for(o=b.length;o--;)a=b[o],wysihtml5.lang.array(y).contains(a)||y.unshift(a);y.length&&(i["class"]=y.join(" "));for(t in i)try{f.setAttribute(t,i[t])}catch(v){}i.src&&("undefined"!==typeof i.width&&f.setAttribute("width",i.width),"undefined"!==typeof i.height&&f.setAttribute("height",i.height));return f},3:function(a){return a.ownerDocument.createTextNode(a.data)}},d="span",e=/\s+/,f={tags:{},classes:{}},g={},i=!wysihtml5.browser.supportsGetAttributeCorrectly(),
142
+ h={url:function(){var a=/^https?:\/\//i;return function(b){return!b||!b.match(a)?null:b.replace(a,function(a){return a.toLowerCase()})}}(),alt:function(){var a=/[^ a-z0-9_\-]/gi;return function(b){return!b?"":b.replace(a,"")}}(),numbers:function(){var a=/\D/g;return function(b){return(b=(b||"").replace(a,""))||null}}()},k={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[(""+b).toLowerCase()]}}(),align_text:function(){var a={left:"wysiwyg-text-align-left",
143
+ right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(b){return a[(""+b).toLowerCase()]}}(),clear_br:function(){var a={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(b){return a[(""+b).toLowerCase()]}}(),size_font:function(){var a={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",
144
+ 6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(b){return a[(""+b).charAt(0)]}}()};return function(a,c,d,e){wysihtml5.lang.object(g).merge(f).merge(c).get();for(var d=d||a.ownerDocument||document,c=d.createDocumentFragment(),h="string"===typeof a,a=h?wysihtml5.dom.getAsDom(a,d):a;a.firstChild;)d=a.firstChild,a.removeChild(d),(d=b(d,e))&&c.appendChild(d);a.innerHTML="";a.appendChild(c);return h?wysihtml5.quirks.getCorrectInnerHTML(a):
145
+ a}}();wysihtml5.dom.removeEmptyTextNodes=function(b){for(var c=wysihtml5.lang.array(b.childNodes).get(),a=c.length,d=0;d<a;d++)b=c[d],b.nodeType===wysihtml5.TEXT_NODE&&""===b.data&&b.parentNode.removeChild(b)};wysihtml5.dom.renameElement=function(b,c){for(var a=b.ownerDocument.createElement(c),d;d=b.firstChild;)a.appendChild(d);wysihtml5.dom.copyAttributes(["align","className"]).from(b).to(a);b.parentNode.replaceChild(a,b);return a};
146
+ wysihtml5.dom.replaceWithChildNodes=function(b){if(b.parentNode)if(b.firstChild){for(var c=b.ownerDocument.createDocumentFragment();b.firstChild;)c.appendChild(b.firstChild);b.parentNode.replaceChild(c,b)}else b.parentNode.removeChild(b)};
147
+ (function(b){function c(a){var b=a.ownerDocument.createElement("br");a.appendChild(b)}b.resolveList=function(a){if(!("MENU"!==a.nodeName&&"UL"!==a.nodeName&&"OL"!==a.nodeName)){var d=a.ownerDocument.createDocumentFragment(),e=a.previousElementSibling||a.previousSibling,f,g,i;for(e&&"block"!==b.getStyle("display").from(e)&&c(d);i=a.firstChild;){for(f=i.lastChild;e=i.firstChild;)g=(g=e===f)&&"block"!==b.getStyle("display").from(e)&&"BR"!==e.nodeName,d.appendChild(e),g&&c(d);i.parentNode.removeChild(i)}a.parentNode.replaceChild(d,
148
+ a)}}})(wysihtml5.dom);
149
+ (function(b){var c=document,a="parent top opener frameElement frames localStorage globalStorage sessionStorage indexedDB".split(" "),d="open close openDialog showModalDialog alert confirm prompt openDatabase postMessage XMLHttpRequest XDomainRequest".split(" "),e=["referrer","write","open","close"];b.dom.Sandbox=Base.extend({constructor:function(a,c){this.callback=a||b.EMPTY_FUNCTION;this.config=b.lang.object({}).merge(c).get();this.iframe=this._createIframe()},insertInto:function(a){"string"===typeof a&&
150
+ (a=c.getElementById(a));a.appendChild(this.iframe)},getIframe:function(){return this.iframe},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var a=this.getIframe();a.parentNode.removeChild(a)},_readyError:function(){throw Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet");},_createIframe:function(){var a=this,d=c.createElement("iframe");d.className="wysihtml5-sandbox";b.dom.setAttributes({security:"restricted",allowtransparency:"true",
151
+ frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(d);b.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(d.src="javascript:'<html></html>'");d.onload=function(){d.onreadystatechange=d.onload=null;a._onLoadIframe(d)};d.onreadystatechange=function(){if(/loaded|complete/.test(d.readyState)){d.onreadystatechange=d.onload=null;a._onLoadIframe(d)}};return d},_onLoadIframe:function(f){if(b.dom.contains(c.documentElement,f)){var g=this,i=f.contentWindow,h=f.contentWindow.document,k=
152
+ this._getHtml({charset:c.characterSet||c.charset||"utf-8",stylesheets:this.config.stylesheets});h.open("text/html","replace");h.write(k);h.close();this.getWindow=function(){return f.contentWindow};this.getDocument=function(){return f.contentWindow.document};i.onerror=function(a,b,c){throw Error("wysihtml5.Sandbox: "+a,b,c);};if(!b.browser.supportsSandboxedIframes()){var j,k=0;for(j=a.length;k<j;k++)this._unset(i,a[k]);k=0;for(j=d.length;k<j;k++)this._unset(i,d[k],b.EMPTY_FUNCTION);k=0;for(j=e.length;k<
153
+ j;k++)this._unset(h,e[k]);this._unset(h,"cookie","",!0)}this.loaded=!0;setTimeout(function(){g.callback(g)},0)}},_getHtml:function(a){var c=a.stylesheets,d="",e=0,k;if(c="string"===typeof c?[c]:c)for(k=c.length;e<k;e++)d+='<link rel="stylesheet" href="'+c[e]+'">';a.stylesheets=d;return b.lang.string('<!DOCTYPE html><html><head><meta charset="#{charset}">#{stylesheets}</head><body></body></html>').interpolate(a)},_unset:function(a,c,d,e){try{a[c]=d}catch(k){}try{a.__defineGetter__(c,function(){return d})}catch(j){}if(e)try{a.__defineSetter__(c,
154
+ function(){})}catch(n){}if(!b.browser.crashesWhenDefineProperty(c))try{var p={get:function(){return d}};e&&(p.set=function(){});Object.defineProperty(a,c,p)}catch(q){}}})})(wysihtml5);(function(){var b={className:"class"};wysihtml5.dom.setAttributes=function(c){return{on:function(a){for(var d in c)a.setAttribute(b[d]||d,c[d])}}}})();
155
+ wysihtml5.dom.setStyles=function(b){return{on:function(c){c=c.style;if("string"===typeof b)c.cssText+=";"+b;else for(var a in b)"float"===a?(c.cssFloat=b[a],c.styleFloat=b[a]):c[a]=b[a]}}};
156
+ (function(b){b.simulatePlaceholder=function(c,a,d){var e=function(){a.hasPlaceholderSet()&&a.clear();b.removeClass(a.element,"placeholder")},f=function(){a.isEmpty()&&(a.setValue(d),b.addClass(a.element,"placeholder"))};c.observe("set_placeholder",f).observe("unset_placeholder",e).observe("focus:composer",e).observe("paste:composer",e).observe("blur:composer",f);f()}})(wysihtml5.dom);
157
+ (function(b){var c=document.documentElement;"textContent"in c?(b.setTextContent=function(a,b){a.textContent=b},b.getTextContent=function(a){return a.textContent}):"innerText"in c?(b.setTextContent=function(a,b){a.innerText=b},b.getTextContent=function(a){return a.innerText}):(b.setTextContent=function(a,b){a.nodeValue=b},b.getTextContent=function(a){return a.nodeValue})})(wysihtml5.dom);
158
+ wysihtml5.quirks.cleanPastedHTML=function(){var b={"a u":wysihtml5.dom.replaceWithChildNodes};return function(c,a,d){var a=a||b,d=d||c.ownerDocument||document,e="string"===typeof c,f,g,i,h=0,c=e?wysihtml5.dom.getAsDom(c,d):c;for(i in a){f=c.querySelectorAll(i);d=a[i];for(g=f.length;h<g;h++)d(f[h])}return e?c.innerHTML:c}}();
159
+ (function(b){var c=b.dom;b.quirks.ensureProperClearing=function(){var a=function(){var a=this;setTimeout(function(){var b=a.innerHTML.toLowerCase();if("<p>&nbsp;</p>"==b||"<p>&nbsp;</p><p>&nbsp;</p>"==b)a.innerHTML=""},0)};return function(b){c.observe(b.element,["cut","keydown"],a)}}();b.quirks.ensureProperClearingOfLists=function(){var a=["OL","UL","MENU"];return function(d){c.observe(d.element,"keydown",function(e){if(e.keyCode===b.BACKSPACE_KEY){var f=d.selection.getSelectedNode(),e=d.element;
160
+ e.firstChild&&b.lang.array(a).contains(e.firstChild.nodeName)&&(f=c.getParentElement(f,{nodeName:a}))&&f==e.firstChild&&1>=f.childNodes.length&&(f.firstChild?""===f.firstChild.innerHTML:1)&&f.parentNode.removeChild(f)}})}}()})(wysihtml5);
161
+ (function(b){b.quirks.getCorrectInnerHTML=function(c){var a=c.innerHTML;if(-1===a.indexOf("%7E"))return a;var c=c.querySelectorAll("[href*='~'], [src*='~']"),d,e,f,g;g=0;for(f=c.length;g<f;g++)d=c[g].href||c[g].src,e=b.lang.string(d).replace("~").by("%7E"),a=b.lang.string(a).replace(e).by(d);return a}})(wysihtml5);
162
+ (function(b){var c=b.dom,a="LI P H1 H2 H3 H4 H5 H6".split(" "),d=["UL","OL","MENU"];b.quirks.insertLineBreakOnReturn=function(e){function f(a){if(a=c.getParentElement(a,{nodeName:["P","DIV"]},2)){var d=document.createTextNode(b.INVISIBLE_SPACE);c.insert(d).before(a);c.replaceWithChildNodes(a);e.selection.selectNode(d)}}c.observe(e.element.ownerDocument,"keydown",function(g){var i=g.keyCode;if(!(g.shiftKey||i!==b.ENTER_KEY&&i!==b.BACKSPACE_KEY)){var h=e.selection.getSelectedNode();(h=c.getParentElement(h,
163
+ {nodeName:a},4))?"LI"===h.nodeName&&(i===b.ENTER_KEY||i===b.BACKSPACE_KEY)?setTimeout(function(){var a=e.selection.getSelectedNode(),b;a&&((b=c.getParentElement(a,{nodeName:d},2))||f(a))},0):h.nodeName.match(/H[1-6]/)&&i===b.ENTER_KEY&&setTimeout(function(){f(e.selection.getSelectedNode())},0):i===b.ENTER_KEY&&!b.browser.insertsLineBreaksOnReturn()&&(e.commands.exec("insertLineBreak"),g.preventDefault())}})}})(wysihtml5);
164
+ (function(b){b.quirks.redraw=function(c){b.dom.addClass(c,"wysihtml5-quirks-redraw");b.dom.removeClass(c,"wysihtml5-quirks-redraw");try{var a=c.ownerDocument;a.execCommand("italic",!1,null);a.execCommand("italic",!1,null)}catch(d){}}})(wysihtml5);
165
+ (function(b){var c=b.dom;b.Selection=Base.extend({constructor:function(a){window.rangy.init();this.editor=a;this.composer=a.composer;this.doc=this.composer.doc},getBookmark:function(){var a=this.getRange();return a&&a.cloneRange()},setBookmark:function(a){a&&this.setSelection(a)},setBefore:function(a){var b=rangy.createRange(this.doc);b.setStartBefore(a);b.setEndBefore(a);return this.setSelection(b)},setAfter:function(a){var b=rangy.createRange(this.doc);b.setStartAfter(a);b.setEndAfter(a);return this.setSelection(b)},
166
+ selectNode:function(a){var d=rangy.createRange(this.doc),e=a.nodeType===b.ELEMENT_NODE,f="canHaveHTML"in a?a.canHaveHTML:"IMG"!==a.nodeName,g=e?a.innerHTML:a.data,g=""===g||g===b.INVISIBLE_SPACE,i=c.getStyle("display").from(a),i="block"===i||"list-item"===i;if(g&&e&&f)try{a.innerHTML=b.INVISIBLE_SPACE}catch(h){}f?d.selectNodeContents(a):d.selectNode(a);f&&g&&e?d.collapse(i):f&&g&&(d.setStartAfter(a),d.setEndAfter(a));this.setSelection(d)},getSelectedNode:function(a){if(a&&this.doc.selection&&"Control"===
167
+ this.doc.selection.type&&(a=this.doc.selection.createRange())&&a.length)return a.item(0);a=this.getSelection(this.doc);return a.focusNode===a.anchorNode?a.focusNode:(a=this.getRange(this.doc))?a.commonAncestorContainer:this.doc.body},executeAndRestore:function(a,c){var e=this.doc.body,f=c&&e.scrollTop,g=c&&e.scrollLeft,i='<span class="_wysihtml5-temp-placeholder">'+b.INVISIBLE_SPACE+"</span>",h=this.getRange(this.doc);if(h){i=h.createContextualFragment(i);h.insertNode(i);try{a(h.startContainer,h.endContainer)}catch(k){setTimeout(function(){throw k;
168
+ },0)}(caretPlaceholder=this.doc.querySelector("._wysihtml5-temp-placeholder"))?(h=rangy.createRange(this.doc),h.selectNode(caretPlaceholder),h.deleteContents(),this.setSelection(h)):e.focus();c&&(e.scrollTop=f,e.scrollLeft=g);try{caretPlaceholder.parentNode.removeChild(caretPlaceholder)}catch(j){}}else a(e,e)},executeAndRestoreSimple:function(a){var b,c,f=this.getRange(),g=this.doc.body,i;if(f){b=f.getNodes([3]);g=b[0]||f.startContainer;i=b[b.length-1]||f.endContainer;b=g===f.startContainer?f.startOffset:
169
+ 0;c=i===f.endContainer?f.endOffset:i.length;try{a(f.startContainer,f.endContainer)}catch(h){setTimeout(function(){throw h;},0)}a=rangy.createRange(this.doc);try{a.setStart(g,b)}catch(k){}try{a.setEnd(i,c)}catch(j){}try{this.setSelection(a)}catch(n){}}else a(g,g)},insertHTML:function(a){var a=rangy.createRange(this.doc).createContextualFragment(a),b=a.lastChild;this.insertNode(a);b&&this.setAfter(b)},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},surround:function(a){var b=this.getRange();
170
+ if(b)try{b.surroundContents(a),this.selectNode(a)}catch(c){a.appendChild(b.extractContents()),b.insertNode(a)}},scrollIntoView:function(){var a=this.doc,c=a.documentElement.scrollHeight>a.documentElement.offsetHeight,e;if(!(e=a._wysihtml5ScrollIntoViewElement))e=a.createElement("span"),e.innerHTML=b.INVISIBLE_SPACE;e=a._wysihtml5ScrollIntoViewElement=e;if(c){this.insertNode(e);var c=e,f=0;if(c.parentNode){do f+=c.offsetTop||0,c=c.offsetParent;while(c)}c=f;e.parentNode.removeChild(e);c>a.body.scrollTop&&
171
+ (a.body.scrollTop=c)}},selectLine:function(){b.browser.supportsSelectionModify()?this._selectLine_W3C():this.doc.selection&&this._selectLine_MSIE()},_selectLine_W3C:function(){var a=this.doc.defaultView.getSelection();a.modify("extend","left","lineboundary");a.modify("extend","right","lineboundary")},_selectLine_MSIE:function(){var a=this.doc.selection.createRange(),b=a.boundingTop,c=this.doc.body.scrollWidth,f;if(a.moveToPoint){0===b&&(f=this.doc.createElement("span"),this.insertNode(f),b=f.offsetTop,
172
+ f.parentNode.removeChild(f));b+=1;for(f=-10;f<c;f+=2)try{a.moveToPoint(f,b);break}catch(g){}for(f=this.doc.selection.createRange();0<=c;c--)try{f.moveToPoint(c,b);break}catch(i){}a.setEndPoint("EndToEnd",f);a.select()}},getText:function(){var a=this.getSelection();return a?a.toString():""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes([a],b):[]},getRange:function(){var a=this.getSelection();return a&&a.rangeCount&&a.getRangeAt(0)},getSelection:function(){return rangy.getSelection(this.doc.defaultView||
173
+ this.doc.parentWindow)},setSelection:function(a){return rangy.getSelection(this.doc.defaultView||this.doc.parentWindow).setSingleRange(a)}})})(wysihtml5);
174
+ (function(b,c){function a(a,b){return c.dom.isCharacterDataNode(a)?0==b?!!a.previousSibling:b==a.length?!!a.nextSibling:!0:0<b&&b<a.childNodes.length}function d(a,b,e){var f;c.dom.isCharacterDataNode(b)&&(0==e?(e=c.dom.getNodeIndex(b),b=b.parentNode):e==b.length?(e=c.dom.getNodeIndex(b)+1,b=b.parentNode):f=c.dom.splitDataNode(b,e));if(!f){f=b.cloneNode(!1);f.id&&f.removeAttribute("id");for(var g;g=b.childNodes[e];)f.appendChild(g);c.dom.insertAfter(f,b)}return b==a?f:d(a,f.parentNode,c.dom.getNodeIndex(f))}
175
+ function e(a){this.firstTextNode=(this.isElementMerge=a.nodeType==b.ELEMENT_NODE)?a.lastChild:a;this.textNodes=[this.firstTextNode]}function f(a,b,c,d){this.tagNames=a||[g];this.cssClass=b||"";this.similarClassRegExp=c;this.normalize=d;this.applyToAnyTagName=!1}var g="span",i=/\s+/g;e.prototype={doMerge:function(){for(var a=[],b,c,d=0,e=this.textNodes.length;d<e;++d)b=this.textNodes[d],c=b.parentNode,a[d]=b.data,d&&(c.removeChild(b),c.hasChildNodes()||c.parentNode.removeChild(c));return this.firstTextNode.data=
176
+ a=a.join("")},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){for(var a=[],b=0,c=this.textNodes.length;b<c;++b)a[b]="'"+this.textNodes[b].data+"'";return"[Merge("+a.join(",")+")]"}};f.prototype={getAncestorWithClass:function(a){for(var d;a;){if(this.cssClass)if(d=this.cssClass,a.className){var e=a.className.match(this.similarClassRegExp)||[];d=e[e.length-1]===d}else d=!1;else d=!0;if(a.nodeType==b.ELEMENT_NODE&&c.dom.arrayContains(this.tagNames,
177
+ a.tagName.toLowerCase())&&d)return a;a=a.parentNode}return!1},postApply:function(a,b){for(var c=a[0],d=a[a.length-1],f=[],g,i=c,m=d,s=0,x=d.length,o,z,w=0,y=a.length;w<y;++w)if(o=a[w],z=this.getAdjacentMergeableTextNode(o.parentNode,!1)){if(g||(g=new e(z),f.push(g)),g.textNodes.push(o),o===c&&(i=g.firstTextNode,s=i.length),o===d)m=g.firstTextNode,x=g.getLength()}else g=null;if(c=this.getAdjacentMergeableTextNode(d.parentNode,!0))g||(g=new e(d),f.push(g)),g.textNodes.push(c);if(f.length){w=0;for(y=
178
+ f.length;w<y;++w)f[w].doMerge();b.setStart(i,s);b.setEnd(m,x)}},getAdjacentMergeableTextNode:function(a,c){var d=a.nodeType==b.TEXT_NODE,e=d?a.parentNode:a,f=c?"nextSibling":"previousSibling";if(d){if((d=a[f])&&d.nodeType==b.TEXT_NODE)return d}else if((d=e[f])&&this.areElementsMergeable(a,d))return d[c?"firstChild":"lastChild"];return null},areElementsMergeable:function(a,b){var d;if(d=c.dom.arrayContains(this.tagNames,(a.tagName||"").toLowerCase()))if(d=c.dom.arrayContains(this.tagNames,(b.tagName||
179
+ "").toLowerCase()))if(d=a.className.replace(i," ")==b.className.replace(i," "))a:if(a.attributes.length!=b.attributes.length)d=!1;else{d=0;for(var e=a.attributes.length,f,g;d<e;++d)if(f=a.attributes[d],g=f.name,"class"!=g&&(g=b.attributes.getNamedItem(g),f.specified!=g.specified||f.specified&&f.nodeValue!==g.nodeValue)){d=!1;break a}d=!0}return d},createContainer:function(a){a=a.createElement(this.tagNames[0]);this.cssClass&&(a.className=this.cssClass);return a},applyToTextNode:function(a){var b=
180
+ a.parentNode;1==b.childNodes.length&&c.dom.arrayContains(this.tagNames,b.tagName.toLowerCase())?this.cssClass&&(a=this.cssClass,b.className?(b.className&&(b.className=b.className.replace(this.similarClassRegExp,"")),b.className+=" "+a):b.className=a):(b=this.createContainer(c.dom.getDocument(a)),a.parentNode.insertBefore(b,a),b.appendChild(a))},isRemovable:function(a){return c.dom.arrayContains(this.tagNames,a.tagName.toLowerCase())&&b.lang.string(a.className).trim()==this.cssClass},undoToTextNode:function(b,
181
+ c,e){c.containsNode(e)||(b=c.cloneRange(),b.selectNode(e),b.isPointInRange(c.endContainer,c.endOffset)&&a(c.endContainer,c.endOffset)&&(d(e,c.endContainer,c.endOffset),c.setEndAfter(e)),b.isPointInRange(c.startContainer,c.startOffset)&&a(c.startContainer,c.startOffset)&&(e=d(e,c.startContainer,c.startOffset)));this.similarClassRegExp&&e.className&&(e.className=e.className.replace(this.similarClassRegExp,""));if(this.isRemovable(e)){c=e;for(e=c.parentNode;c.firstChild;)e.insertBefore(c.firstChild,
182
+ c);e.removeChild(c)}},applyToRange:function(a){var c=a.getNodes([b.TEXT_NODE]);if(!c.length)try{var d=this.createContainer(a.endContainer.ownerDocument);a.surroundContents(d);this.selectNode(a,d);return}catch(e){}a.splitBoundaries();c=a.getNodes([b.TEXT_NODE]);if(c.length){for(var f=0,g=c.length;f<g;++f)d=c[f],this.getAncestorWithClass(d)||this.applyToTextNode(d);a.setStart(c[0],0);d=c[c.length-1];a.setEnd(d,d.length);this.normalize&&this.postApply(c,a)}},undoToRange:function(a){var c=a.getNodes([b.TEXT_NODE]),
183
+ d,e;c.length?(a.splitBoundaries(),c=a.getNodes([b.TEXT_NODE])):(c=a.endContainer.ownerDocument.createTextNode(b.INVISIBLE_SPACE),a.insertNode(c),a.selectNode(c),c=[c]);for(var f=0,g=c.length;f<g;++f)d=c[f],(e=this.getAncestorWithClass(d))&&this.undoToTextNode(d,a,e);1==g?this.selectNode(a,c[0]):(a.setStart(c[0],0),d=c[c.length-1],a.setEnd(d,d.length),this.normalize&&this.postApply(c,a))},selectNode:function(a,c){var d=c.nodeType===b.ELEMENT_NODE,e="canHaveHTML"in c?c.canHaveHTML:!0,f=d?c.innerHTML:
184
+ c.data;if((f=""===f||f===b.INVISIBLE_SPACE)&&d&&e)try{c.innerHTML=b.INVISIBLE_SPACE}catch(g){}a.selectNodeContents(c);f&&d?a.collapse(!1):f&&(a.setStartAfter(c),a.setEndAfter(c))},getTextSelectedByRange:function(a,b){var c=b.cloneRange();c.selectNodeContents(a);var d=c.intersection(b),d=d?d.toString():"";c.detach();return d},isAppliedToRange:function(a){var c=[],d,e=a.getNodes([b.TEXT_NODE]);if(!e.length)return(d=this.getAncestorWithClass(a.startContainer))?[d]:!1;for(var f=0,g=e.length,i;f<g;++f){i=
185
+ this.getTextSelectedByRange(e[f],a);d=this.getAncestorWithClass(e[f]);if(""!=i&&!d)return!1;c.push(d)}return c},toggleRange:function(a){this.isAppliedToRange(a)?this.undoToRange(a):this.applyToRange(a)}};b.selection.HTMLApplier=f})(wysihtml5,rangy);
186
+ wysihtml5.Commands=Base.extend({constructor:function(b){this.editor=b;this.composer=b.composer;this.doc=this.composer.doc},support:function(b){return wysihtml5.browser.supportsCommand(this.doc,b)},exec:function(b,c){var a=wysihtml5.commands[b],d=wysihtml5.lang.array(arguments).get(),e=a&&a.exec,f=null;this.editor.fire("beforecommand:composer");if(e)d.unshift(this.composer),f=e.apply(a,d);else try{f=this.doc.execCommand(b,!1,c)}catch(g){}this.editor.fire("aftercommand:composer");return f},state:function(b,
187
+ c){var a=wysihtml5.commands[b],d=wysihtml5.lang.array(arguments).get(),e=a&&a.state;if(e)return d.unshift(this.composer),e.apply(a,d);try{return this.doc.queryCommandState(b)}catch(f){return!1}},value:function(b){var c=wysihtml5.commands[b],a=c&&c.value;if(a)return a.call(c,this.composer,b);try{return this.doc.queryCommandValue(b)}catch(d){return null}}});
188
+ (function(b){b.commands.bold={exec:function(c,a){return b.commands.formatInline.exec(c,a,"b")},state:function(c,a){return b.commands.formatInline.state(c,a,"b")},value:function(){}}})(wysihtml5);
189
+ (function(b){function c(c,g){var i=c.doc,h="_wysihtml5-temp-"+ +new Date,k=0,j,n,p;b.commands.formatInline.exec(c,a,d,h,/non-matching-class/g);j=i.querySelectorAll(d+"."+h);for(h=j.length;k<h;k++)for(p in n=j[k],n.removeAttribute("class"),g)n.setAttribute(p,g[p]);k=n;1===h&&(p=e.getTextContent(n),h=!!n.querySelector("*"),p=""===p||p===b.INVISIBLE_SPACE,!h&&p&&(e.setTextContent(n,g.text||n.href),i=i.createTextNode(" "),c.selection.setAfter(n),c.selection.insertNode(i),k=i));c.selection.setAfter(k)}
190
+ var a,d="A",e=b.dom;b.commands.createLink={exec:function(a,b,d){var h=this.state(a,b);h?a.selection.executeAndRestore(function(){for(var a=h.length,b=0,c,d,f;b<a;b++)c=h[b],d=e.getParentElement(c,{nodeName:"code"}),f=e.getTextContent(c),f.match(e.autoLink.URL_REG_EXP)&&!d?e.renameElement(c,"code"):e.replaceWithChildNodes(c)}):(d="object"===typeof d?d:{href:d},c(a,d))},state:function(a,c){return b.commands.formatInline.state(a,c,"A")},value:function(){return a}}})(wysihtml5);
191
+ (function(b){var c=/wysiwyg-font-size-[a-z\-]+/g;b.commands.fontSize={exec:function(a,d,e){return b.commands.formatInline.exec(a,d,"span","wysiwyg-font-size-"+e,c)},state:function(a,d,e){return b.commands.formatInline.state(a,d,"span","wysiwyg-font-size-"+e,c)},value:function(){}}})(wysihtml5);
192
+ (function(b){var c=/wysiwyg-color-[a-z]+/g;b.commands.foreColor={exec:function(a,d,e){return b.commands.formatInline.exec(a,d,"span","wysiwyg-color-"+e,c)},state:function(a,d,e){return b.commands.formatInline.state(a,d,"span","wysiwyg-color-"+e,c)},value:function(){}}})(wysihtml5);
193
+ (function(b){function c(a){for(a=a.previousSibling;a&&a.nodeType===b.TEXT_NODE&&!b.lang.string(a.data).trim();)a=a.previousSibling;return a}function a(a){for(a=a.nextSibling;a&&a.nodeType===b.TEXT_NODE&&!b.lang.string(a.data).trim();)a=a.nextSibling;return a}function d(a){return"BR"===a.nodeName||"block"===g.getStyle("display").from(a)?!0:!1}function e(a,c,d,e){if(e)var f=g.observe(a,"DOMNodeInserted",function(a){var a=a.target,c;a.nodeType===b.ELEMENT_NODE&&(c=g.getStyle("display").from(a),"inline"!==
194
+ c.substr(0,6)&&(a.className+=" "+e))});a.execCommand(c,!1,d);f&&f.stop()}function f(b,d){b.selection.selectLine();b.selection.surround(d);var e=a(d),f=c(d);e&&"BR"===e.nodeName&&e.parentNode.removeChild(e);f&&"BR"===f.nodeName&&f.parentNode.removeChild(f);(e=d.lastChild)&&"BR"===e.nodeName&&e.parentNode.removeChild(e);b.selection.selectNode(d)}var g=b.dom,i="H1 H2 H3 H4 H5 H6 P BLOCKQUOTE DIV".split(" ");b.commands.formatBlock={exec:function(h,k,j,n,p){var q=h.doc,r=this.state(h,k,j,n,p),m,j="string"===
195
+ typeof j?j.toUpperCase():j;if(r)h.selection.executeAndRestoreSimple(function(){p&&(r.className=r.className.replace(p,""));var e=!!b.lang.string(r.className).trim();if(!e&&r.nodeName===(j||"DIV")){var e=r,f=e.ownerDocument,h=a(e),i=c(e);h&&!d(h)&&e.parentNode.insertBefore(f.createElement("br"),h);i&&!d(i)&&e.parentNode.insertBefore(f.createElement("br"),e);g.replaceWithChildNodes(r)}else e&&g.renameElement(r,"DIV")});else{if(null===j||b.lang.array(i).contains(j))if(m=h.selection.getSelectedNode(),
196
+ r=g.getParentElement(m,{nodeName:i})){h.selection.executeAndRestoreSimple(function(){j&&(r=g.renameElement(r,j));if(n){var a=r;a.className?(a.className=a.className.replace(p,""),a.className+=" "+n):a.className=n}});return}h.commands.support(k)?e(q,k,j||"DIV",n):(r=q.createElement(j||"DIV"),n&&(r.className=n),f(h,r))}},state:function(a,b,c,d,e){c="string"===typeof c?c.toUpperCase():c;a=a.selection.getSelectedNode();return g.getParentElement(a,{nodeName:c,className:d,classRegExp:e})},value:function(){}}})(wysihtml5);
197
+ (function(b){function c(c,f,g){var i=c+":"+f;if(!d[i]){var h=d,k=b.selection.HTMLApplier,j=a[c],c=j?[c.toLowerCase(),j.toLowerCase()]:[c.toLowerCase()];h[i]=new k(c,f,g,!0)}return d[i]}var a={strong:"b",em:"i",b:"strong",i:"em"},d={};b.commands.formatInline={exec:function(a,b,d,i,h){b=a.selection.getRange();if(!b)return!1;c(d,i,h).toggleRange(b);a.selection.setSelection(b)},state:function(d,f,g,i,h){var f=d.doc,k=a[g]||g;if(!b.dom.hasElementWithTagName(f,g)&&!b.dom.hasElementWithTagName(f,k)||i&&
198
+ !b.dom.hasElementWithClassName(f,i))return!1;d=d.selection.getRange();return!d?!1:c(g,i,h).isAppliedToRange(d)},value:function(){}}})(wysihtml5);(function(b){b.commands.insertHTML={exec:function(b,a,d){b.commands.support(a)?b.doc.execCommand(a,!1,d):b.selection.insertHTML(d)},state:function(){return!1},value:function(){}}})(wysihtml5);
199
+ (function(b){b.commands.insertImage={exec:function(c,a,d){var d="object"===typeof d?d:{src:d},e=c.doc,a=this.state(c),f;if(a)c.selection.setBefore(a),d=a.parentNode,d.removeChild(a),b.dom.removeEmptyTextNodes(d),"A"===d.nodeName&&!d.firstChild&&(c.selection.setAfter(d),d.parentNode.removeChild(d)),b.quirks.redraw(c.element);else{a=e.createElement("IMG");for(f in d)a[f]=d[f];c.selection.insertNode(a);b.browser.hasProblemsSettingCaretAfterImg()?(d=e.createTextNode(b.INVISIBLE_SPACE),c.selection.insertNode(d),
200
+ c.selection.setAfter(d)):c.selection.setAfter(a)}},state:function(c){var a;if(!b.dom.hasElementWithTagName(c.doc,"IMG"))return!1;a=c.selection.getSelectedNode();if(!a)return!1;if("IMG"===a.nodeName)return a;if(a.nodeType!==b.ELEMENT_NODE)return!1;a=c.selection.getText();if(a=b.lang.string(a).trim())return!1;c=c.selection.getNodes(b.ELEMENT_NODE,function(a){return"IMG"===a.nodeName});return 1!==c.length?!1:c[0]},value:function(b){return(b=this.state(b))&&b.src}}})(wysihtml5);
201
+ (function(b){var c="<br>"+(b.browser.needsSpaceAfterLineBreak()?" ":"");b.commands.insertLineBreak={exec:function(a,d){a.commands.support(d)?(a.doc.execCommand(d,!1,null),b.browser.autoScrollsToCaret()||a.selection.scrollIntoView()):a.commands.exec("insertHTML",c)},state:function(){return!1},value:function(){}}})(wysihtml5);
202
+ (function(b){b.commands.insertOrderedList={exec:function(c,a){var d=c.doc,e=c.selection.getSelectedNode(),f=b.dom.getParentElement(e,{nodeName:"OL"}),g=b.dom.getParentElement(e,{nodeName:"UL"}),e="_wysihtml5-temp-"+(new Date).getTime(),i;c.commands.support(a)?d.execCommand(a,!1,null):f?c.selection.executeAndRestoreSimple(function(){b.dom.resolveList(f)}):g?c.selection.executeAndRestoreSimple(function(){b.dom.renameElement(g,"ol")}):(c.commands.exec("formatBlock","div",e),i=d.querySelector("."+e),
203
+ d=""===i.innerHTML||i.innerHTML===b.INVISIBLE_SPACE,c.selection.executeAndRestoreSimple(function(){f=b.dom.convertToList(i,"ol")}),d&&c.selection.selectNode(f.querySelector("li")))},state:function(c){c=c.selection.getSelectedNode();return b.dom.getParentElement(c,{nodeName:"OL"})},value:function(){}}})(wysihtml5);
204
+ (function(b){b.commands.insertUnorderedList={exec:function(c,a){var d=c.doc,e=c.selection.getSelectedNode(),f=b.dom.getParentElement(e,{nodeName:"UL"}),g=b.dom.getParentElement(e,{nodeName:"OL"}),e="_wysihtml5-temp-"+(new Date).getTime(),i;c.commands.support(a)?d.execCommand(a,!1,null):f?c.selection.executeAndRestoreSimple(function(){b.dom.resolveList(f)}):g?c.selection.executeAndRestoreSimple(function(){b.dom.renameElement(g,"ul")}):(c.commands.exec("formatBlock","div",e),i=d.querySelector("."+e),
205
+ d=""===i.innerHTML||i.innerHTML===b.INVISIBLE_SPACE,c.selection.executeAndRestoreSimple(function(){f=b.dom.convertToList(i,"ul")}),d&&c.selection.selectNode(f.querySelector("li")))},state:function(c){c=c.selection.getSelectedNode();return b.dom.getParentElement(c,{nodeName:"UL"})},value:function(){}}})(wysihtml5);(function(b){b.commands.italic={exec:function(c,a){return b.commands.formatInline.exec(c,a,"i")},state:function(c,a){return b.commands.formatInline.state(c,a,"i")},value:function(){}}})(wysihtml5);
206
+ (function(b){var c=/wysiwyg-text-align-[a-z]+/g;b.commands.justifyCenter={exec:function(a){return b.commands.formatBlock.exec(a,"formatBlock",null,"wysiwyg-text-align-center",c)},state:function(a){return b.commands.formatBlock.state(a,"formatBlock",null,"wysiwyg-text-align-center",c)},value:function(){}}})(wysihtml5);
207
+ (function(b){var c=/wysiwyg-text-align-[a-z]+/g;b.commands.justifyLeft={exec:function(a){return b.commands.formatBlock.exec(a,"formatBlock",null,"wysiwyg-text-align-left",c)},state:function(a){return b.commands.formatBlock.state(a,"formatBlock",null,"wysiwyg-text-align-left",c)},value:function(){}}})(wysihtml5);
208
+ (function(b){var c=/wysiwyg-text-align-[a-z]+/g;b.commands.justifyRight={exec:function(a){return b.commands.formatBlock.exec(a,"formatBlock",null,"wysiwyg-text-align-right",c)},state:function(a){return b.commands.formatBlock.state(a,"formatBlock",null,"wysiwyg-text-align-right",c)},value:function(){}}})(wysihtml5);(function(b){b.commands.underline={exec:function(c,a){return b.commands.formatInline.exec(c,a,"u")},state:function(c,a){return b.commands.formatInline.state(c,a,"u")},value:function(){}}})(wysihtml5);
209
+ (function(b){var c='<span id="_wysihtml5-undo" class="_wysihtml5-temp">'+b.INVISIBLE_SPACE+"</span>",a='<span id="_wysihtml5-redo" class="_wysihtml5-temp">'+b.INVISIBLE_SPACE+"</span>",d=b.dom;b.UndoManager=b.lang.Dispatcher.extend({constructor:function(a){this.editor=a;this.composer=a.composer;this.element=this.composer.element;this.history=[this.composer.getValue()];this.position=1;this.composer.commands.support("insertHTML")&&this._observe()},_observe:function(){var e=this,f=this.composer.sandbox.getDocument(),
210
+ g;d.observe(this.element,"keydown",function(a){if(!(a.altKey||!a.ctrlKey&&!a.metaKey)){var b=a.keyCode,c=90===b&&a.shiftKey||89===b;90===b&&!a.shiftKey?(e.undo(),a.preventDefault()):c&&(e.redo(),a.preventDefault())}});d.observe(this.element,"keydown",function(a){a=a.keyCode;a!==g&&(g=a,(8===a||46===a)&&e.transact())});if(b.browser.hasUndoInContextMenu()){var i,h,k=function(){for(var a;a=f.querySelector("._wysihtml5-temp");)a.parentNode.removeChild(a);clearInterval(i)};d.observe(this.element,"contextmenu",
211
+ function(){k();e.composer.selection.executeAndRestoreSimple(function(){e.element.lastChild&&e.composer.selection.setAfter(e.element.lastChild);f.execCommand("insertHTML",!1,c);f.execCommand("insertHTML",!1,a);f.execCommand("undo",!1,null)});i=setInterval(function(){f.getElementById("_wysihtml5-redo")?(k(),e.redo()):f.getElementById("_wysihtml5-undo")||(k(),e.undo())},400);h||(h=!0,d.observe(document,"mousedown",k),d.observe(f,["mousedown","paste","cut","copy"],k))})}this.editor.observe("newword:composer",
212
+ function(){e.transact()}).observe("beforecommand:composer",function(){e.transact()})},transact:function(){var a=this.history[this.position-1],b=this.composer.getValue();if(b!=a){if(40<(this.history.length=this.position))this.history.shift(),this.position--;this.position++;this.history.push(b)}},undo:function(){this.transact();1>=this.position||(this.set(this.history[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.position>=this.history.length||(this.set(this.history[++this.position-
213
+ 1]),this.editor.fire("redo:composer"))},set:function(a){this.composer.setValue(a);this.editor.focus(!0)}})})(wysihtml5);
214
+ wysihtml5.views.View=Base.extend({constructor:function(b,c,a){this.parent=b;this.element=c;this.config=a;this._observeViewChange()},_observeViewChange:function(){var b=this;this.parent.observe("beforeload",function(){b.parent.observe("change_view",function(c){c===b.name?(b.parent.currentView=b,b.show(),setTimeout(function(){b.focus()},0)):b.hide()})})},focus:function(){if(this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element.focus()}catch(b){}},hide:function(){this.element.style.display=
215
+ "none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}});
216
+ (function(b){var c=b.dom,a=b.browser;b.views.Composer=b.views.View.extend({name:"composer",CARET_HACK:"<br>",constructor:function(a,b,c){this.base(a,b,c);this.textarea=this.parent.textarea;this._initSandbox()},clear:function(){this.element.innerHTML=a.displaysCaretInEmptyContentEditableCorrectly()?"":this.CARET_HACK},getValue:function(a){var c=this.isEmpty()?"":b.quirks.getCorrectInnerHTML(this.element);a&&(c=this.parent.parse(c));return c=b.lang.string(c).replace(b.INVISIBLE_SPACE).by("")},setValue:function(a,
217
+ b){b&&(a=this.parent.parse(a));this.element.innerHTML=a},show:function(){this.iframe.style.display=this._displayStyle||"";this.disable();this.enable()},hide:function(){this._displayStyle=c.getStyle("display").from(this.iframe);"none"===this._displayStyle&&(this._displayStyle=null);this.iframe.style.display="none"},disable:function(){this.element.removeAttribute("contentEditable");this.base()},enable:function(){this.element.setAttribute("contentEditable","true");this.base()},focus:function(a){b.browser.doesAsyncFocus()&&
218
+ this.hasPlaceholderSet()&&this.clear();this.base();var c=this.element.lastChild;a&&c&&("BR"===c.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getTextContent:function(){return c.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==this.textarea.element.getAttribute("placeholder")},isEmpty:function(){var a=this.element.innerHTML;return""===a||a===this.CARET_HACK||this.hasPlaceholderSet()||""===this.getTextContent()&&
219
+ !this.element.querySelector("blockquote, ul, ol, img, embed, object, table, iframe, svg, video, audio, button, input, select, textarea")},_initSandbox:function(){var a=this;this.sandbox=new c.Sandbox(function(){a._create()},{stylesheets:this.config.stylesheets});this.iframe=this.sandbox.getIframe();var b=document.createElement("input");b.type="hidden";b.name="_wysihtml5_mode";b.value=1;var f=this.textarea.element;c.insert(this.iframe).after(f);c.insert(b).after(f)},_create:function(){var d=this;this.doc=
220
+ this.sandbox.getDocument();this.element=this.doc.body;this.textarea=this.parent.textarea;this.element.innerHTML=this.textarea.getValue(!0);this.enable();this.selection=new b.Selection(this.parent);this.commands=new b.Commands(this.parent);c.copyAttributes("className spellcheck title lang dir accessKey".split(" ")).from(this.textarea.element).to(this.element);c.addClass(this.element,this.config.composerClassName);this.config.style&&this.style();this.observe();var e=this.config.name;e&&(c.addClass(this.element,
221
+ e),c.addClass(this.iframe,e));(e="string"===typeof this.config.placeholder?this.config.placeholder:this.textarea.element.getAttribute("placeholder"))&&c.simulatePlaceholder(this.parent,this,e);this.commands.exec("styleWithCSS",!1);this._initAutoLinking();this._initObjectResizing();this._initUndoManager();(this.textarea.element.hasAttribute("autofocus")||document.querySelector(":focus")==this.textarea.element)&&setTimeout(function(){d.focus()},100);b.quirks.insertLineBreakOnReturn(this);a.clearsContentEditableCorrectly()||
222
+ b.quirks.ensureProperClearing(this);a.clearsListsInContentEditableCorrectly()||b.quirks.ensureProperClearingOfLists(this);this.initSync&&this.config.sync&&this.initSync();this.textarea.hide();this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var d=this,e=a.canDisableAutoLinking(),f=a.doesAutoLinkingInContentEditable();e&&this.commands.exec("autoUrlDetect",!1);if(this.config.autoLink){(!f||f&&e)&&this.parent.observe("newword:composer",function(){d.selection.executeAndRestore(function(a,
223
+ b){c.autoLink(b.parentNode)})});var g=this.sandbox.getDocument().getElementsByTagName("a"),i=c.autoLink.URL_REG_EXP,h=function(a){a=b.lang.string(c.getTextContent(a)).trim();"www."===a.substr(0,4)&&(a="http://"+a);return a};c.observe(this.element,"keydown",function(a){if(g.length){var a=d.selection.getSelectedNode(a.target.ownerDocument),b=c.getParentElement(a,{nodeName:"A"},4),e;b&&(e=h(b),setTimeout(function(){var a=h(b);a!==e&&a.match(i)&&b.setAttribute("href",a)},0))}})}},_initObjectResizing:function(){var d=
224
+ ["width","height"],e=d.length,f=this.element;this.commands.exec("enableObjectResizing",this.config.allowObjectResizing);this.config.allowObjectResizing?a.supportsEvent("resizeend")&&c.observe(f,"resizeend",function(a){for(var a=a.target||a.srcElement,c=a.style,h=0,k;h<e;h++)k=d[h],c[k]&&(a.setAttribute(k,parseInt(c[k],10)),c[k]="");b.quirks.redraw(f)}):a.supportsEvent("resizestart")&&c.observe(f,"resizestart",function(a){a.preventDefault()})},_initUndoManager:function(){new b.UndoManager(this.parent)}})})(wysihtml5);
225
+ (function(b){var c=b.dom,a=document,d=window,e=a.createElement("div"),f="background-color color cursor font-family font-size font-style font-variant font-weight line-height letter-spacing text-align text-decoration text-indent text-rendering word-break word-wrap word-spacing".split(" "),g="background-color border-collapse border-bottom-color border-bottom-style border-bottom-width border-left-color border-left-style border-left-width border-right-color border-right-style border-right-width border-top-color border-top-style border-top-width clear display float margin-bottom margin-left margin-right margin-top outline-color outline-offset outline-width outline-style padding-left padding-right padding-top padding-bottom position top left right bottom z-index vertical-align text-align -webkit-box-sizing -moz-box-sizing -ms-box-sizing box-sizing -webkit-box-shadow -moz-box-shadow -ms-box-shadow box-shadow -webkit-border-top-right-radius -moz-border-radius-topright border-top-right-radius -webkit-border-bottom-right-radius -moz-border-radius-bottomright border-bottom-right-radius -webkit-border-bottom-left-radius -moz-border-radius-bottomleft border-bottom-left-radius -webkit-border-top-left-radius -moz-border-radius-topleft border-top-left-radius width height".split(" "),
226
+ i="width height top left right bottom".split(" "),h=["html { height: 100%; }","body { min-height: 100%; padding: 0; margin: 0; margin-top: -1px; padding-top: 1px; }","._wysihtml5-temp { display: none; }",b.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","body[disabled] { background-color: #eee !important; color: #999 !important; cursor: default !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],
227
+ k=function(b){if(b.setActive)try{b.setActive()}catch(e){}else{var f=b.style,h=a.documentElement.scrollTop||a.body.scrollTop,g=a.documentElement.scrollLeft||a.body.scrollLeft,f={position:f.position,top:f.top,left:f.left,WebkitUserSelect:f.WebkitUserSelect};c.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(b);b.focus();c.setStyles(f).on(b);d.scrollTo&&d.scrollTo(g,h)}};b.views.Composer.prototype.style=function(){var j=this,n=a.querySelector(":focus"),p=this.textarea.element,
228
+ q=p.hasAttribute("placeholder"),r=q&&p.getAttribute("placeholder");this.focusStylesHost=this.focusStylesHost||e.cloneNode(!1);this.blurStylesHost=this.blurStylesHost||e.cloneNode(!1);q&&p.removeAttribute("placeholder");p===n&&p.blur();c.copyStyles(g).from(p).to(this.iframe).andTo(this.blurStylesHost);c.copyStyles(f).from(p).to(this.element).andTo(this.blurStylesHost);c.insertCSS(h).into(this.element.ownerDocument);k(p);c.copyStyles(g).from(p).to(this.focusStylesHost);c.copyStyles(f).from(p).to(this.focusStylesHost);
229
+ var m=b.lang.array(g).without(["display"]);n?n.focus():p.blur();q&&p.setAttribute("placeholder",r);if(!b.browser.hasCurrentStyleProperty())var s=c.observe(d,"resize",function(){if(c.contains(document.documentElement,j.iframe)){var a=c.getStyle("display").from(p),b=c.getStyle("display").from(j.iframe);p.style.display="";j.iframe.style.display="none";c.copyStyles(i).from(p).to(j.iframe).andTo(j.focusStylesHost).andTo(j.blurStylesHost);j.iframe.style.display=b;p.style.display=a}else s.stop()});this.parent.observe("focus:composer",
230
+ function(){c.copyStyles(m).from(j.focusStylesHost).to(j.iframe);c.copyStyles(f).from(j.focusStylesHost).to(j.element)});this.parent.observe("blur:composer",function(){c.copyStyles(m).from(j.blurStylesHost).to(j.iframe);c.copyStyles(f).from(j.blurStylesHost).to(j.element)});return this}})(wysihtml5);
231
+ (function(b){var c=b.dom,a=b.browser,d={66:"bold",73:"italic",85:"underline"};b.views.Composer.prototype.observe=function(){var e=this,f=this.getValue(),g=this.sandbox.getIframe(),i=this.element,h=a.supportsEventsInIframeCorrectly()?i:this.sandbox.getWindow(),k=a.supportsEvent("drop")?["drop","paste"]:["dragdrop","paste"];c.observe(g,"DOMNodeRemoved",function(){clearInterval(j);e.parent.fire("destroy:composer")});var j=setInterval(function(){c.contains(document.documentElement,g)||(clearInterval(j),
232
+ e.parent.fire("destroy:composer"))},250);c.observe(h,"focus",function(){e.parent.fire("focus").fire("focus:composer");setTimeout(function(){f=e.getValue()},0)});c.observe(h,"blur",function(){f!==e.getValue()&&e.parent.fire("change").fire("change:composer");e.parent.fire("blur").fire("blur:composer")});b.browser.isIos()&&c.observe(i,"blur",function(){var a=i.ownerDocument.createElement("input"),b=document.documentElement.scrollTop||document.body.scrollTop,c=document.documentElement.scrollLeft||document.body.scrollLeft;
233
+ try{e.selection.insertNode(a)}catch(d){i.appendChild(a)}a.focus();a.parentNode.removeChild(a);window.scrollTo(c,b)});c.observe(i,"dragenter",function(){e.parent.fire("unset_placeholder")});a.firesOnDropOnlyWhenOnDragOverIsCancelled()&&c.observe(i,["dragover","dragenter"],function(a){a.preventDefault()});c.observe(i,k,function(b){var c=b.dataTransfer,d;c&&a.supportsDataTransfer()&&(d=c.getData("text/html")||c.getData("text/plain"));d?(i.focus(),e.commands.exec("insertHTML",d),e.parent.fire("paste").fire("paste:composer"),
234
+ b.stopPropagation(),b.preventDefault()):setTimeout(function(){e.parent.fire("paste").fire("paste:composer")},0)});c.observe(i,"keyup",function(a){a=a.keyCode;(a===b.SPACE_KEY||a===b.ENTER_KEY)&&e.parent.fire("newword:composer")});this.parent.observe("paste:composer",function(){setTimeout(function(){e.parent.fire("newword:composer")},0)});a.canSelectImagesInContentEditable()||c.observe(i,"mousedown",function(a){var b=a.target;"IMG"===b.nodeName&&(e.selection.selectNode(b),a.preventDefault())});c.observe(i,
235
+ "keydown",function(a){var b=d[a.keyCode];if((a.ctrlKey||a.metaKey)&&!a.altKey&&b)e.commands.exec(b),a.preventDefault()});c.observe(i,"keydown",function(a){var c=e.selection.getSelectedNode(!0),d=a.keyCode;if(c&&"IMG"===c.nodeName&&(d===b.BACKSPACE_KEY||d===b.DELETE_KEY))d=c.parentNode,d.removeChild(c),"A"===d.nodeName&&!d.firstChild&&d.parentNode.removeChild(d),setTimeout(function(){b.quirks.redraw(i)},0),a.preventDefault()});var n={IMG:"Image: ",A:"Link: "};c.observe(i,"mouseover",function(a){var a=
236
+ a.target,b=a.nodeName;!("A"!==b&&"IMG"!==b)&&!a.hasAttribute("title")&&(b=n[b]+(a.getAttribute("href")||a.getAttribute("src")),a.setAttribute("title",b))})}})(wysihtml5);
237
+ (function(b){b.views.Synchronizer=Base.extend({constructor:function(b,a,d){this.editor=b;this.textarea=a;this.composer=d;this._observe()},fromComposerToTextarea:function(c){this.textarea.setValue(b.lang.string(this.composer.getValue()).trim(),c)},fromTextareaToComposer:function(b){var a=this.textarea.getValue();a?this.composer.setValue(a,b):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(b){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(b):this.fromComposerToTextarea(b)},
238
+ _observe:function(){var c,a=this,d=this.textarea.element.form,e=function(){c=setInterval(function(){a.fromComposerToTextarea()},400)},f=function(){clearInterval(c);c=null};e();d&&(b.dom.observe(d,"submit",function(){a.sync(!0)}),b.dom.observe(d,"reset",function(){setTimeout(function(){a.fromTextareaToComposer()},0)}));this.editor.observe("change_view",function(b){if(b==="composer"&&!c){a.fromTextareaToComposer(true);e()}else if(b==="textarea"){a.fromComposerToTextarea(true);f()}});this.editor.observe("destroy:composer",
239
+ f)}})})(wysihtml5);
240
+ wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(b,c,a){this.base(b,c,a);this._observe()},clear:function(){this.element.value=""},getValue:function(b){var c=this.isEmpty()?"":this.element.value;b&&(c=this.parent.parse(c));return c},setValue:function(b,c){c&&(b=this.parent.parse(b));this.element.value=b},hasPlaceholderSet:function(){var b=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),c=this.element.getAttribute("placeholder")||null,a=this.element.value;
241
+ return b&&!a||a===c},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var b=this.element,c=this.parent,a={focusin:"focus",focusout:"blur"},d=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];c.observe("beforeload",function(){wysihtml5.dom.observe(b,d,function(b){b=a[b.type]||b.type;c.fire(b).fire(b+":textarea")});wysihtml5.dom.observe(b,["paste","drop"],function(){setTimeout(function(){c.fire("paste").fire("paste:textarea")},
242
+ 0)})})}});
243
+ (function(b){var c=b.dom;b.toolbar.Dialog=b.lang.Dispatcher.extend({constructor:function(a,b){this.link=a;this.container=b},_observe:function(){if(!this._observed){var a=this,d=function(b){var c=a._serialize();c==a.elementToChange?a.fire("edit",c):a.fire("save",c);a.hide();b.preventDefault();b.stopPropagation()};c.observe(a.link,"click",function(){c.hasClass(a.link,"wysihtml5-command-dialog-opened")&&setTimeout(function(){a.hide()},0)});c.observe(this.container,"keydown",function(c){var e=c.keyCode;
244
+ e===b.ENTER_KEY&&d(c);e===b.ESCAPE_KEY&&a.hide()});c.delegate(this.container,"[data-wysihtml5-dialog-action=save]","click",d);c.delegate(this.container,"[data-wysihtml5-dialog-action=cancel]","click",function(b){a.fire("cancel");a.hide();b.preventDefault();b.stopPropagation()});for(var e=this.container.querySelectorAll("input, select, textarea"),f=0,g=e.length,i=function(){clearInterval(a.interval)};f<g;f++)c.observe(e[f],"change",i);this._observed=!0}},_serialize:function(){for(var a=this.elementToChange||
245
+ {},b=this.container.querySelectorAll("[data-wysihtml5-dialog-field]"),c=b.length,f=0;f<c;f++)a[b[f].getAttribute("data-wysihtml5-dialog-field")]=b[f].value;return a},_interpolate:function(a){for(var b,c,f=document.querySelector(":focus"),g=this.container.querySelectorAll("[data-wysihtml5-dialog-field]"),i=g.length,h=0;h<i;h++)b=g[h],b!==f&&!(a&&"hidden"===b.type)&&(c=b.getAttribute("data-wysihtml5-dialog-field"),c=this.elementToChange?this.elementToChange[c]||"":b.defaultValue,b.value=c)},show:function(a){var b=
246
+ this,e=this.container.querySelector("input, select, textarea");this.elementToChange=a;this._observe();this._interpolate();a&&(this.interval=setInterval(function(){b._interpolate(!0)},500));c.addClass(this.link,"wysihtml5-command-dialog-opened");this.container.style.display="";this.fire("show");if(e&&!a)try{e.focus()}catch(f){}},hide:function(){clearInterval(this.interval);this.elementToChange=null;c.removeClass(this.link,"wysihtml5-command-dialog-opened");this.container.style.display="none";this.fire("hide")}})})(wysihtml5);
247
+ (function(b){var c=b.dom,a={position:"relative"},d={left:0,margin:0,opacity:0,overflow:"hidden",padding:0,position:"absolute",top:0,zIndex:1},e={cursor:"inherit",fontSize:"50px",height:"50px",marginTop:"-25px",outline:0,padding:0,position:"absolute",right:"-4px",top:"50%"},f={"x-webkit-speech":"",speech:""};b.toolbar.Speech=function(g,i){var h=document.createElement("input");if(b.browser.supportsSpeechApiOn(h)){var k=document.createElement("div");b.lang.object(d).merge({width:i.offsetWidth+"px",height:i.offsetHeight+
248
+ "px"});c.insert(h).into(k);c.insert(k).into(i);c.setStyles(e).on(h);c.setAttributes(f).on(h);c.setStyles(d).on(k);c.setStyles(a).on(i);c.observe(h,"onwebkitspeechchange"in h?"webkitspeechchange":"speechchange",function(){g.execCommand("insertText",h.value);h.value=""});c.observe(h,"click",function(a){c.hasClass(i,"wysihtml5-command-disabled")&&a.preventDefault();a.stopPropagation()})}else i.style.display="none"}})(wysihtml5);
249
+ (function(b){var c=b.dom;b.toolbar.Toolbar=Base.extend({constructor:function(a,c){this.editor=a;this.container="string"===typeof c?document.getElementById(c):c;this.composer=a.composer;this._getLinks("command");this._getLinks("action");this._observe();this.show();for(var e=this.container.querySelectorAll("[data-wysihtml5-command=insertSpeech]"),f=e.length,g=0;g<f;g++)new b.toolbar.Speech(this,e[g])},_getLinks:function(a){for(var c=this[a+"Links"]=b.lang.array(this.container.querySelectorAll("[data-wysihtml5-"+
250
+ a+"]")).get(),e=c.length,f=0,g=this[a+"Mapping"]={},i,h,k,j,n;f<e;f++)i=c[f],k=i.getAttribute("data-wysihtml5-"+a),j=i.getAttribute("data-wysihtml5-"+a+"-value"),h=this.container.querySelector("[data-wysihtml5-"+a+"-group='"+k+"']"),n=this._getDialog(i,k),g[k+":"+j]={link:i,group:h,name:k,value:j,dialog:n,state:!1}},_getDialog:function(a,c){var e=this,f=this.container.querySelector("[data-wysihtml5-dialog='"+c+"']"),g,i;f&&(g=new b.toolbar.Dialog(a,f),g.observe("show",function(){i=e.composer.selection.getBookmark();
251
+ e.editor.fire("show:dialog",{command:c,dialogContainer:f,commandLink:a})}),g.observe("save",function(b){i&&e.composer.selection.setBookmark(i);e._execCommand(c,b);e.editor.fire("save:dialog",{command:c,dialogContainer:f,commandLink:a})}),g.observe("cancel",function(){e.editor.focus(!1);e.editor.fire("cancel:dialog",{command:c,dialogContainer:f,commandLink:a})}));return g},execCommand:function(a,b){if(!this.commandsDisabled){var c=this.commandMapping[a+":"+b];c&&c.dialog&&!c.state?c.dialog.show():
252
+ this._execCommand(a,b)}},_execCommand:function(a,b){this.editor.focus(!1);this.composer.commands.exec(a,b);this._updateLinkStates()},execAction:function(a){var b=this.editor;switch(a){case "change_view":b.currentView===b.textarea?b.fire("change_view","composer"):b.fire("change_view","textarea")}},_observe:function(){for(var a=this,b=this.editor,e=this.container,f=this.commandLinks.concat(this.actionLinks),g=f.length,i=0;i<g;i++)c.setAttributes({href:"javascript:;",unselectable:"on"}).on(f[i]);c.delegate(e,
253
+ "[data-wysihtml5-command]","mousedown",function(a){a.preventDefault()});c.delegate(e,"[data-wysihtml5-command]","click",function(b){var c=this.getAttribute("data-wysihtml5-command"),d=this.getAttribute("data-wysihtml5-command-value");a.execCommand(c,d);b.preventDefault()});c.delegate(e,"[data-wysihtml5-action]","click",function(b){var c=this.getAttribute("data-wysihtml5-action");a.execAction(c);b.preventDefault()});b.observe("focus:composer",function(){a.bookmark=null;clearInterval(a.interval);a.interval=
254
+ setInterval(function(){a._updateLinkStates()},500)});b.observe("blur:composer",function(){clearInterval(a.interval)});b.observe("destroy:composer",function(){clearInterval(a.interval)});b.observe("change_view",function(b){setTimeout(function(){a.commandsDisabled="composer"!==b;a._updateLinkStates();a.commandsDisabled?c.addClass(e,"wysihtml5-commands-disabled"):c.removeClass(e,"wysihtml5-commands-disabled")},0)})},_updateLinkStates:function(){var a=this.commandMapping,d=this.actionMapping,e,f,g;for(e in a)if(g=
255
+ a[e],this.commandsDisabled?(f=!1,c.removeClass(g.link,"wysihtml5-command-active"),g.group&&c.removeClass(g.group,"wysihtml5-command-active"),g.dialog&&g.dialog.hide()):(f=this.composer.commands.state(g.name,g.value),b.lang.object(f).isArray()&&(f=1===f.length?f[0]:!0),c.removeClass(g.link,"wysihtml5-command-disabled"),g.group&&c.removeClass(g.group,"wysihtml5-command-disabled")),g.state!==f)(g.state=f)?(c.addClass(g.link,"wysihtml5-command-active"),g.group&&c.addClass(g.group,"wysihtml5-command-active"),
256
+ g.dialog&&("object"===typeof f?g.dialog.show(f):g.dialog.hide())):(c.removeClass(g.link,"wysihtml5-command-active"),g.group&&c.removeClass(g.group,"wysihtml5-command-active"),g.dialog&&g.dialog.hide());for(e in d)a=d[e],"change_view"===a.name&&(a.state=this.editor.currentView===this.editor.textarea,a.state?c.addClass(a.link,"wysihtml5-action-active"):c.removeClass(a.link,"wysihtml5-action-active"))},show:function(){this.container.style.display=""},hide:function(){this.container.style.display="none"}})})(wysihtml5);
257
+ (function(b){var c={name:void 0,style:!0,toolbar:void 0,autoLink:!0,parserRules:{tags:{br:{},span:{},div:{},p:{}},classes:{}},parser:b.dom.parse,composerClassName:"wysihtml5-editor",bodyClassName:"wysihtml5-supported",stylesheets:[],placeholderText:void 0,allowObjectResizing:!0,supportTouchDevices:!0};b.Editor=b.lang.Dispatcher.extend({constructor:function(a,d){this.textareaElement="string"===typeof a?document.getElementById(a):a;this.config=b.lang.object({}).merge(c).merge(d).get();this.currentView=
258
+ this.textarea=new b.views.Textarea(this,this.textareaElement,this.config);this._isCompatible=b.browser.supported();if(!this._isCompatible||!this.config.supportTouchDevices&&b.browser.isTouchDevice()){var e=this;setTimeout(function(){e.fire("beforeload").fire("load")},0)}else{b.dom.addClass(document.body,this.config.bodyClassName);this.currentView=this.composer=new b.views.Composer(this,this.textareaElement,this.config);"function"===typeof this.config.parser&&this._initParser();this.observe("beforeload",
259
+ function(){this.synchronizer=new b.views.Synchronizer(this,this.textarea,this.composer);this.config.toolbar&&(this.toolbar=new b.toolbar.Toolbar(this,this.config.toolbar))});try{console.log("Heya! This page is using wysihtml5 for rich text editing. Check out https://github.com/xing/wysihtml5")}catch(f){}}},isCompatible:function(){return this._isCompatible},clear:function(){this.currentView.clear();return this},getValue:function(a){return this.currentView.getValue(a)},setValue:function(a,b){if(!a)return this.clear();
260
+ this.currentView.setValue(a,b);return this},focus:function(a){this.currentView.focus(a);return this},disable:function(){this.currentView.disable();return this},enable:function(){this.currentView.enable();return this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},parse:function(a){var c=this.config.parser(a,this.config.parserRules,this.composer.sandbox.getDocument(),!0);"object"===typeof a&&b.quirks.redraw(a);return c},
261
+ _initParser:function(){this.observe("paste:composer",function(){var a=this;a.composer.selection.executeAndRestore(function(){b.quirks.cleanPastedHTML(a.composer.element);a.parse(a.composer.element)},!0)});this.observe("paste:textarea",function(){this.textarea.setValue(this.parse(this.textarea.getValue()))})}})})(wysihtml5);
@@ -1,38 +1,45 @@
1
1
  @import "./jquery/*"
2
2
  @import "./sass/mixins"
3
+ @import "./sass/event_list"
3
4
  @import "./sass/tags"
4
5
  @import "./sass/box-office"
5
- @import "./font-awesome"
6
+ @import "font-awesome"
6
7
 
7
8
  #preload_assets
8
9
  display: none
9
10
 
10
11
  .left
11
12
  float: left
12
-
13
+
13
14
  .clear
14
15
  clear: both
15
16
 
16
17
  ul
17
18
  list-style: none
18
19
  margin-left: 0px
19
-
20
+
20
21
  h1
21
22
  font-size: 2.5em
22
23
  h2
23
24
  margin-bottom: 10px
24
25
  font-size: 2.0em
25
-
26
+
26
27
  h3
27
28
  margin-bottom: 10px
28
29
  font-size: 1.6em
29
-
30
+
31
+ h4.event-link
32
+ margin: 0px 0px 2px 0px
33
+
30
34
  a
31
35
  font-weight: bold
32
-
36
+
37
+ a.weak
38
+ font-weight: normal
39
+
33
40
  #organization-details
34
41
  margin-top: 50px
35
-
42
+
36
43
  #kit-table
37
44
  td.status
38
45
  width: 60px
@@ -44,8 +51,8 @@ a
44
51
  vertical-align: top
45
52
  .kit-type
46
53
  font-weight: bold
47
-
48
- ul#memberships
54
+
55
+ ul#memberships
49
56
  li
50
57
  margin: 0 10px 10px 0px
51
58
  .email
@@ -56,13 +63,19 @@ ul#memberships
56
63
  text-align: center
57
64
  border-radius: 5px
58
65
  moz-border-radius: 5px
59
-
66
+
60
67
  .nav-grav
61
68
  padding-top: 3px
62
69
  border-radius: 5px
63
70
  moz-border-radius: 5px
64
71
  height: 32px
65
72
 
73
+ .medium-grav
74
+ padding-top: 3px
75
+ border-radius: 5px
76
+ moz-border-radius: 5px
77
+ height: 64px
78
+
66
79
  .user-grav
67
80
  height: 48px
68
81
  width: 48px
@@ -72,7 +85,7 @@ ul#memberships
72
85
  height: 130px
73
86
  width: 130px
74
87
  padding: 2px
75
-
88
+
76
89
  .no-image
77
90
  border-radius: 10px
78
91
  moz-border-radius: 10px
@@ -89,22 +102,29 @@ ul#memberships
89
102
  cursor: pointer
90
103
  p
91
104
  color: #999
92
-
105
+
93
106
  .full
94
107
  width: 100%
95
-
108
+
96
109
  #add-a-description
97
110
  width: 100%
98
111
  height: 150px
99
112
  margin-bottom: 9px
100
113
  #text
101
114
  padding-top: 50px
102
-
115
+
103
116
  #add-a-venue
104
117
  width: 100%
105
118
  height: 150px
106
119
  #text
107
120
  padding-top: 50px
121
+
122
+ #add-a-pass-type
123
+ text-align: center
124
+ width: 75%
125
+ height: 150px
126
+ #text
127
+ padding-top: 50px
108
128
 
109
129
  #day-date
110
130
  width: 95%
@@ -129,19 +149,23 @@ ul#memberships
129
149
  ul#event-list
130
150
  li.event-list-item
131
151
  margin-bottom: 20px
132
-
152
+
133
153
  ul.mini-stats
134
154
  li
135
155
  line-height: 20px
136
-
156
+
137
157
  ul.kv
138
158
  li
139
159
  margin-bottom: 10px
140
-
160
+
141
161
  ul#recent-list
142
162
  li
143
163
  margin-bottom: 10px
144
-
164
+
165
+ .recent-activity-text
166
+ font-size: 14px
167
+ line-height: 18px
168
+
145
169
  .quiz-form
146
170
  label.control-label
147
171
  font-size: 1.8em
@@ -150,7 +174,7 @@ ul#recent-list
150
174
  margin-left: 250px
151
175
  .form-actions
152
176
  padding-left: 250px
153
-
177
+
154
178
  .modal
155
179
  display: none
156
180
 
@@ -160,36 +184,39 @@ ul#recent-list
160
184
  .modal-footer form
161
185
  display: inline-block
162
186
  margin: 0
163
-
187
+
188
+ .event-subtitle
189
+ font-weight: normal
190
+
164
191
  #event-header-logo-container
165
192
  text-align: right
166
-
193
+
167
194
  #event-header-logo
168
195
  border-radius: 5px
169
196
  moz-border-radius: 5px
170
-
197
+
171
198
  #storefront-link
172
199
  font-size: 1.5em
173
-
200
+
174
201
  #storefront-text
175
202
  margin-top: 40px
176
203
  font-size: 1.3em
177
-
204
+
178
205
  .section-fields
179
206
  margin-bottom: 40px
180
207
  &.discount-tickets
181
208
  margin-bottom: 50px
182
-
209
+
183
210
  #show-headline
184
211
  background-color: #eee
185
212
  padding: 15px
186
213
  margin-bottom: 15px
187
-
214
+
188
215
  .merge-confirm-block
189
216
  background-color: #eee
190
217
  padding: 15px
191
218
  margin-bottom: 15px
192
-
219
+
193
220
  #merge-arrow
194
221
  text-align: center
195
222
  margin-bottom: 15px
@@ -197,19 +224,35 @@ ul#recent-list
197
224
  #admin #heading
198
225
  h1
199
226
  margin-bottom: 25px
200
-
201
- form.sprited
227
+
228
+ form.sprited, li.sprited
202
229
  display: none
203
230
 
204
- tr.published form.published, tr.unpublished form.unpublished, tr.built form.built, tr.pending form.pending, tr.destroyable form.destroyable
231
+ tr.published form.published,
232
+ tr.unpublished form.unpublished,
233
+ tr.built form.built,
234
+ tr.pending form.pending,
235
+ tr.destroyable form.destroyable,
236
+ ul.published li.published,
237
+ ul.unpublished li.unpublished,
238
+ ul.built li.built,
239
+ ul.pending li.pending,
240
+ ul.destroyable li.destroyable
205
241
  display: inline
206
-
242
+
243
+ tr.unpublished
244
+ background-color: #EEE
245
+
246
+ tr.valign
247
+ td
248
+ vertical-align: middle
249
+
207
250
  .dialog
208
251
  display: none
209
-
252
+
210
253
  .hidden
211
254
  display: none !important
212
-
255
+
213
256
  #contact-information
214
257
  #image
215
258
  margin-right: 10px
@@ -232,21 +275,21 @@ ul.report
232
275
  tr.returned, tr.refunded, tr.exchanged
233
276
  td.item-description, td.price
234
277
  text-decoration: line-through
235
-
278
+
236
279
  .in-table
237
280
  margin-bottom: 0px
238
281
 
239
282
  table.example-contact
240
283
  .field
241
284
  font-weight: bold
242
-
285
+
243
286
  tr.no-border
244
287
  td
245
288
  border-top: 0px
246
289
 
247
290
  .label.hidden
248
291
  display: none
249
-
292
+
250
293
  .invisible
251
294
  visibility: hidden
252
295
 
@@ -274,7 +317,7 @@ span.help
274
317
 
275
318
  .tight
276
319
  margin-left: 0px !important
277
-
320
+
278
321
  input.datepicker, input.datetimepicker
279
322
  cursor: pointer
280
323
 
@@ -314,16 +357,16 @@ a.red
314
357
  a.red:hover
315
358
  color: red
316
359
  text-decoration: underline
317
-
360
+
318
361
  .event-icon-container
319
362
  height: 80px
320
-
363
+
321
364
  .bottom-room
322
365
  margin-bottom: 15px
323
-
366
+
324
367
  .btn3
325
368
  width: 150px
326
-
369
+
327
370
  table.docs
328
371
  td.field
329
372
  width: 200px
@@ -335,11 +378,12 @@ table.docs
335
378
  .bottom-room
336
379
  margin-bottom: 15px
337
380
 
381
+ //Bootstrap 2.3 broke .right in table cells, hance the !important
338
382
  .center
339
- text-align: center
383
+ text-align: center !important
340
384
  .right
341
- text-align: right
342
-
385
+ text-align: right !important
386
+
343
387
  .headline-caption
344
388
  font-size: 12px
345
389
  color: #999
@@ -348,7 +392,7 @@ table.docs
348
392
  .headline-stat
349
393
  font-size: 2em
350
394
  font-weight: bold
351
-
395
+
352
396
  // Datepicker Icons
353
397
  .ui-datepicker
354
398
  z-index: 1050 !important
@@ -394,7 +438,7 @@ table.docs
394
438
  color: black
395
439
  p
396
440
  color: black
397
- a
441
+ a
398
442
  color: black
399
443
 
400
444
  .popover.right .popover-content, .popover.right .popover-title
@@ -402,10 +446,222 @@ table.docs
402
446
 
403
447
  .badge-big
404
448
  font-size: 30px
405
-
449
+
406
450
  a.artfully-tooltip, a.artfully-tooltip:hover
407
451
  text-decoration: none
408
452
 
453
+ body[data-controller=people][data-action=show],
454
+ body[data-controller=households][data-action=show],
455
+ body[data-controller=memberships][data-action=index],
456
+ body[data-controller=passes][data-action=index]
457
+ padding-top: 10px
458
+
459
+
460
+ .table.search-results
461
+ td.controls
462
+ width: 10px
463
+ td.name
464
+ label
465
+ font-weight: bold
466
+ display: inline
467
+
468
+ .person-header,
469
+ .household-header
470
+ overflow: hidden
471
+ background: #eee
472
+ border-bottom: 1px solid #ccc
473
+ padding: 20px
474
+ border-bottom-left-radius: 8px
475
+ border-bottom-right-radius: 8px
476
+ margin-bottom: 20px
477
+
478
+ .person-avatar,
479
+ .household-avatar
480
+ float: left
481
+ margin-right: 20px
482
+ img
483
+ border-radius: 4px
484
+ width: 150px
485
+ height: 150px
486
+
487
+ .person-header .view-household
488
+ margin-right: 20px
489
+
490
+ .person-header .view-household .btn
491
+ margin: 4px auto
492
+
493
+ .person-values-and-tags,
494
+ .household-values-and-tags
495
+ float: right
496
+
497
+ .company-and-title
498
+ margin-bottom: 20px
499
+
500
+ .person-values,
501
+ .household-values
502
+ margin-bottom: 20px
503
+ border: 1px solid #ccc
504
+ border-radius: 4px
505
+ float: right
506
+ text-align: center
507
+ padding: 5px
508
+ li
509
+ min-width: 75px
510
+ border-right: 1px solid #cecece
511
+ float: left
512
+ padding: 0 10px
513
+ &:last-child
514
+ border: none
515
+ h3, h6
516
+ margin: 0
517
+
518
+ .person-tags
519
+ width: 300px
520
+ clear: right
521
+
522
+ .person-links,
523
+ .household-links
524
+ float: left
525
+ a
526
+ display: block
527
+ padding-bottom: 10px
528
+ padding-left: 32px
529
+ &.email
530
+ background: image-url('glyphish/people/email.png') no-repeat
531
+ &.twitter
532
+ background: image-url('glyphish/people/210-twitterbird.png') no-repeat
533
+ &.facebook
534
+ background: image-url('glyphish/people/208-facebook.png') no-repeat
535
+ &.linked-in
536
+ background: image-url('glyphish/people/linkedin.png') no-repeat
537
+ &.website
538
+ background: image-url('glyphish/people/website.png') no-repeat
539
+ &.member-number
540
+ background: image-url('glyphish/gray/108-badge.png') no-repeat
541
+
542
+ .person-inline-form, td.person-inline-form
543
+ border-top: 1px solid #ccc
544
+ padding: 20px
545
+ padding-bottom: 1px
546
+ background: #eee
547
+ clear: left
548
+ a.delete-with-trash
549
+ margin-right: 40px
550
+
551
+ a.delete-with-trash
552
+ font-size: 13px
553
+ float: right
554
+ padding-left: 18px
555
+ color: #666
556
+ font-weight: normal
557
+ display: block
558
+ background: image-url('glyphish/people/218-trash2-small.png') no-repeat
559
+
560
+ .action-form
561
+ .action-type, .action-subtype, .dollar-inputs, .datetimepicker
562
+ float: left
563
+ margin-right: 18px
564
+ .dollar-inputs
565
+ span.add-on
566
+ margin-bottom: 9px
567
+
568
+ tr.action td
569
+ padding-top: 9px
570
+ &.icon
571
+ padding: 5px
572
+ &.starable
573
+ padding: 7px
574
+
575
+ .btn.action-icon
576
+ background-position: 0 5px
577
+ padding-left: 20px
578
+ font-weight: normal
579
+ text-indent: -5000px
580
+ background: #eee
581
+ background-repeat: no-repeat
582
+ background-position: center center
583
+ cursor: default // temp until the filter button works
584
+ &.hear-icon
585
+ background-image: image_url('actions/hear.png')
586
+ &.say-icon
587
+ background-image: image_url('actions/say.png')
588
+ &.go-icon
589
+ background-image: image_url('actions/go.png')
590
+ &.do-icon
591
+ background-image: image_url('actions/do.png')
592
+ &.get-icon
593
+ background-image: image_url('actions/get.png')
594
+ &.give-icon
595
+ background-image: image_url('actions/give.png')
596
+ &.join-icon
597
+ background-image: image_url('actions/join.png')
598
+
599
+ .edit-action-link
600
+ font-weight: normal
601
+ text-shadow: none
602
+ letter-spacing: 0.5px
603
+
604
+ .toggle-truncated
605
+ cursor: pointer
606
+
607
+ #edit-person,
608
+ #edit-household
609
+ width: 740px
610
+ margin-left: -360px
611
+ form
612
+ margin-bottom: 0
613
+ .form-horizontal
614
+ .controls
615
+ margin-left: 0
616
+ .control-label
617
+ padding-right: 18px
618
+ .modal-footer
619
+ margin-bottom: 0
620
+
621
+ #edit-household
622
+ #address.tab-pane
623
+ .wide
624
+ .controls
625
+ label
626
+ width: auto
627
+ .control
628
+ select
629
+ width: 400px
630
+ #address.tab-pane
631
+ .controls
632
+ label.wide
633
+ width: auto
634
+
635
+ table#action-list td, table#notes-list td
636
+ line-height: 20px
637
+ border-top: 0px
638
+
639
+ .loading
640
+ background: image_url('loading.gif') no-repeat
641
+
642
+ #endless-scroll-pagination
643
+ &.loading
644
+ background: image_url('loading.gif') no-repeat
645
+ color: #ccc
646
+ ul
647
+ display: none
648
+
649
+ .starable
650
+ width: 10px
651
+ font-size: 17px
652
+ font-weight: bold
653
+ &:hover
654
+ cursor: pointer
655
+ &.active
656
+ color: #f8930a
657
+ &.not-active
658
+ color: #ccc
659
+
660
+ .starable-spacer
661
+ width: 10px
662
+ font-size: 17px
663
+ color: transparent
664
+
409
665
  form > fieldset:last-of-type > *:last-child
410
666
  margin-bottom: 45px
411
667
 
@@ -433,4 +689,114 @@ form > fieldset:last-of-type > *:last-child
433
689
  i
434
690
  height: 50px
435
691
  margin: 30px 0
436
- display: block
692
+ display: block
693
+
694
+ .recent-actions
695
+ .recent-action-time
696
+ font-size: 0.9em
697
+
698
+ p.alternate_form_link
699
+ text-align: right
700
+
701
+ .big-money
702
+ font-size: 30px
703
+
704
+ #show-calendar
705
+ .fc-event
706
+ cursor: pointer
707
+
708
+ #new-show-calendar
709
+ .past-date
710
+ background-color: #efefef
711
+
712
+ [ng\:cloak], [ng-cloak], .ng-cloak
713
+ display: none !important
714
+
715
+ .ui-autocomplete
716
+ z-index: 3000 !important
717
+ max-height: 300px
718
+ overflow: scroll
719
+
720
+ .wysihtml5-editor
721
+ h3
722
+ font-size: 1.3em
723
+ color: #666
724
+ margin-bottom: .5em
725
+ h4
726
+ color: #666
727
+ font-size: 1.25em
728
+ margin-bottom: .5em
729
+ h5
730
+ color: #666
731
+ font-size: 1.25em
732
+ margin-bottom: .5em
733
+ color: #99BABB
734
+ h6
735
+ color: #666
736
+ font-size: 1.25em
737
+ margin-bottom: .5em
738
+ color: #9d2235
739
+
740
+ #edit-membership-kit, #edit-donation-kit
741
+ label
742
+ font-weight: bold
743
+
744
+
745
+ .bordered-section
746
+ border-bottom: 1px solid #ACACAE
747
+
748
+ .control-group
749
+ .controls
750
+ label
751
+ margin-bottom: 5px
752
+ padding-top: 5px
753
+
754
+ .btn-add-preset-amount
755
+ margin-top: -10px
756
+ margin-left: 9px
757
+
758
+ .flat-button
759
+ background-image: none
760
+
761
+ #console-build-order
762
+ margin-top: 12px
763
+
764
+ .console-button
765
+ height: 100px
766
+ padding: 36px 28px
767
+ font-size: 22px
768
+ line-height: normal
769
+ background-image: none
770
+ color: white
771
+
772
+ .console-button-smalltext
773
+ padding: 30px 28px
774
+ font-size: 18px
775
+
776
+ /* Portrait tablet to landscape and desktop */
777
+ @media (min-width: 980px) and (max-width: 1200px)
778
+ .console-button
779
+ font-size: 18px
780
+ .console-button-smalltext
781
+ padding: 28px 20px
782
+ font-size: 18px
783
+
784
+ /* Landscape phone to portrait tablet */
785
+ @media (max-width: 979px)
786
+ .console-button
787
+ font-size: 16px
788
+ padding: 38px 10px
789
+ .console-button-smalltext
790
+ padding: 16px 16px
791
+ font-size: 16px
792
+
793
+ @media (max-width: 767px)
794
+ .console-button
795
+ padding: 36px 10px
796
+ font-size: 24px
797
+ .console-button-smalltext
798
+ padding: 34px 16px
799
+ font-size: 22px
800
+
801
+ #birth_year
802
+ padding: 0px