telephony 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/README.md +105 -0
- data/Rakefile +39 -0
- data/app/assets/fonts/telephony/zest-telephony.eot +0 -0
- data/app/assets/fonts/telephony/zest-telephony.svg +73 -0
- data/app/assets/fonts/telephony/zest-telephony.ttf +0 -0
- data/app/assets/fonts/telephony/zest-telephony.woff +0 -0
- data/app/assets/images/telephony/backspace.png +0 -0
- data/app/assets/images/telephony/icon-spinner.gif +0 -0
- data/app/assets/javascripts/telephony/application.js +12 -0
- data/app/assets/javascripts/telephony/collections/agents.js +4 -0
- data/app/assets/javascripts/telephony/config.js.erb +11 -0
- data/app/assets/javascripts/telephony/models/agent.js +103 -0
- data/app/assets/javascripts/telephony/models/conversation.js +226 -0
- data/app/assets/javascripts/telephony/models/device.js +30 -0
- data/app/assets/javascripts/telephony/models/transfer.js +65 -0
- data/app/assets/javascripts/telephony/namespace.js +6 -0
- data/app/assets/javascripts/telephony/push.js +80 -0
- data/app/assets/javascripts/telephony/vendor/backbone.js +1159 -0
- data/app/assets/javascripts/telephony/vendor/chosen.jquery.js +1018 -0
- data/app/assets/javascripts/telephony/vendor/jquery.form.js +1117 -0
- data/app/assets/javascripts/telephony/vendor/pusher.js +1304 -0
- data/app/assets/javascripts/telephony/vendor/test_dependencies.js +18 -0
- data/app/assets/javascripts/telephony/vendor/underscore.js +839 -0
- data/app/assets/javascripts/telephony/views/agents_view.js +69 -0
- data/app/assets/javascripts/telephony/views/application_view.js +78 -0
- data/app/assets/javascripts/telephony/views/call_queue_view.js +21 -0
- data/app/assets/javascripts/telephony/views/conversation_buttons_view.js +15 -0
- data/app/assets/javascripts/telephony/views/conversation_view.js +322 -0
- data/app/assets/javascripts/telephony/views/status_view.js +36 -0
- data/app/assets/javascripts/telephony/views/transfer_view.js +87 -0
- data/app/assets/javascripts/telephony/views/twilio_client_view.js +117 -0
- data/app/assets/javascripts/telephony/views/widget_view.js +55 -0
- data/app/assets/javascripts/telephony/widget.js +5 -0
- data/app/assets/javascripts/templates/telephony/agents_view.jst.ejs +8 -0
- data/app/assets/javascripts/templates/telephony/call_queue_view.jst.ejs +2 -0
- data/app/assets/javascripts/templates/telephony/conversation_buttons_view.jst.ejs +23 -0
- data/app/assets/javascripts/templates/telephony/conversation_view.jst.ejs +10 -0
- data/app/assets/javascripts/templates/telephony/status_view.jst.ejs +4 -0
- data/app/assets/javascripts/templates/telephony/transfer_view.jst.ejs +38 -0
- data/app/assets/javascripts/templates/telephony/twilio_client_view.jst.ejs +10 -0
- data/app/assets/stylesheets/telephony/font.css +43 -0
- data/app/assets/stylesheets/telephony/reset.css.scss +10 -0
- data/app/assets/stylesheets/telephony/widget.css.scss +512 -0
- data/app/controllers/telephony/agents_controller.rb +46 -0
- data/app/controllers/telephony/application_controller.rb +4 -0
- data/app/controllers/telephony/call_centers_controller.rb +9 -0
- data/app/controllers/telephony/conversations_controller.rb +74 -0
- data/app/controllers/telephony/inbound/conversation_queues_controller.rb +21 -0
- data/app/controllers/telephony/playable_listeners_controller.rb +43 -0
- data/app/controllers/telephony/providers/twilio/application_controller.rb +26 -0
- data/app/controllers/telephony/providers/twilio/calls_controller.rb +130 -0
- data/app/controllers/telephony/providers/twilio/inbound_calls_controller.rb +54 -0
- data/app/controllers/telephony/providers/twilio/musics_controller.rb +12 -0
- data/app/controllers/telephony/providers/twilio/voicemails_controller.rb +29 -0
- data/app/controllers/telephony/signals/agents/presences_controller.rb +64 -0
- data/app/controllers/telephony/transfers_controller.rb +18 -0
- data/app/controllers/telephony/twilio_client_controller.rb +37 -0
- data/app/controllers/telephony/voicemails_controller.rb +13 -0
- data/app/controllers/telephony/widget_controller.rb +10 -0
- data/app/helpers/telephony/application_helper.rb +4 -0
- data/app/helpers/telephony/calls_helper.rb +13 -0
- data/app/models/telephony/agent.rb +186 -0
- data/app/models/telephony/agent_state_machine.rb +54 -0
- data/app/models/telephony/base.rb +7 -0
- data/app/models/telephony/blacklisted_number.rb +5 -0
- data/app/models/telephony/call.rb +94 -0
- data/app/models/telephony/call_center.rb +26 -0
- data/app/models/telephony/call_state_machine.rb +98 -0
- data/app/models/telephony/conversation.rb +273 -0
- data/app/models/telephony/conversation_state_machine.rb +109 -0
- data/app/models/telephony/conversations_presenter.rb +83 -0
- data/app/models/telephony/events.rb +6 -0
- data/app/models/telephony/events/answer.rb +6 -0
- data/app/models/telephony/events/base.rb +118 -0
- data/app/models/telephony/events/busy.rb +6 -0
- data/app/models/telephony/events/call_answered.rb +22 -0
- data/app/models/telephony/events/call_fail.rb +6 -0
- data/app/models/telephony/events/complete_hold.rb +28 -0
- data/app/models/telephony/events/complete_one_step_transfer.rb +17 -0
- data/app/models/telephony/events/complete_resume.rb +28 -0
- data/app/models/telephony/events/complete_two_step_transfer.rb +6 -0
- data/app/models/telephony/events/conference.rb +6 -0
- data/app/models/telephony/events/connect.rb +22 -0
- data/app/models/telephony/events/customer_left_two_step_transfer.rb +6 -0
- data/app/models/telephony/events/dial_agent.rb +6 -0
- data/app/models/telephony/events/ended.rb +19 -0
- data/app/models/telephony/events/enqueue.rb +6 -0
- data/app/models/telephony/events/fail_one_step_transfer.rb +9 -0
- data/app/models/telephony/events/fail_two_step_transfer.rb +6 -0
- data/app/models/telephony/events/initialize_widget.rb +15 -0
- data/app/models/telephony/events/initiate_hold.rb +6 -0
- data/app/models/telephony/events/initiate_one_step_transfer.rb +6 -0
- data/app/models/telephony/events/initiate_resume.rb +6 -0
- data/app/models/telephony/events/initiate_two_step_transfer.rb +6 -0
- data/app/models/telephony/events/leave_two_step_transfer.rb +17 -0
- data/app/models/telephony/events/leave_voicemail.rb +22 -0
- data/app/models/telephony/events/no_answer.rb +6 -0
- data/app/models/telephony/events/play_closed_greeting.rb +6 -0
- data/app/models/telephony/events/play_message.rb +6 -0
- data/app/models/telephony/events/reject.rb +6 -0
- data/app/models/telephony/events/rona.rb +6 -0
- data/app/models/telephony/events/start.rb +17 -0
- data/app/models/telephony/events/straight_to_voicemail.rb +6 -0
- data/app/models/telephony/events/terminate.rb +6 -0
- data/app/models/telephony/events/transfer.rb +35 -0
- data/app/models/telephony/inbound_conversation_queue.rb +101 -0
- data/app/models/telephony/playable.rb +7 -0
- data/app/models/telephony/playable_listener.rb +42 -0
- data/app/models/telephony/pusher_event_publisher.rb +26 -0
- data/app/models/telephony/recording.rb +4 -0
- data/app/models/telephony/voicemail.rb +36 -0
- data/app/observers/telephony/agent_observer.rb +8 -0
- data/app/observers/telephony/call_observer.rb +15 -0
- data/app/observers/telephony/conversation_observer.rb +9 -0
- data/app/observers/telephony/event_observer.rb +9 -0
- data/app/views/layouts/telephony/application.html.erb +14 -0
- data/app/views/telephony/providers/twilio/calls/child_detached.builder +5 -0
- data/app/views/telephony/providers/twilio/calls/complete_hold.builder +6 -0
- data/app/views/telephony/providers/twilio/calls/connect.builder +13 -0
- data/app/views/telephony/providers/twilio/calls/dial.builder +14 -0
- data/app/views/telephony/providers/twilio/calls/done.builder +5 -0
- data/app/views/telephony/providers/twilio/calls/join_conference.builder +7 -0
- data/app/views/telephony/providers/twilio/calls/whisper_tone.builder +3 -0
- data/app/views/telephony/providers/twilio/inbound_calls/closed_hours.builder +7 -0
- data/app/views/telephony/providers/twilio/inbound_calls/create.builder +8 -0
- data/app/views/telephony/providers/twilio/inbound_calls/enqueue.builder +8 -0
- data/app/views/telephony/providers/twilio/inbound_calls/reject.builder +5 -0
- data/app/views/telephony/providers/twilio/inbound_calls/wait_music.builder +5 -0
- data/app/views/telephony/providers/twilio/musics/hold.builder +5 -0
- data/app/views/telephony/providers/twilio/voicemails/new.builder +6 -0
- data/app/views/telephony/twilio_client/index.html.erb +74 -0
- data/app/views/telephony/widget/index.erb +3 -0
- data/config/cucumber.yml +8 -0
- data/config/database.yml +57 -0
- data/config/environment.rb +67 -0
- data/config/initializers/pusher.rb +21 -0
- data/config/initializers/telephony.rb +44 -0
- data/config/routes.rb +94 -0
- data/config/wopr.yml.example +38 -0
- data/db/migrate/20130806213053_bootstrap_db.rb +105 -0
- data/db/migrate/20131009204026_create_telephony_blacklisted_numbers.rb +11 -0
- data/lib/agent_generator.rb +24 -0
- data/lib/tasks/cucumber.rake +65 -0
- data/lib/tasks/jasmine.rake +8 -0
- data/lib/tasks/telephony_tasks.rake +4 -0
- data/lib/telephony.rb +34 -0
- data/lib/telephony/concerns/controllers/twilio_request_verifier.rb +39 -0
- data/lib/telephony/conversation_data.rb +67 -0
- data/lib/telephony/engine.rb +19 -0
- data/lib/telephony/error.rb +8 -0
- data/lib/telephony/error/agent_on_a_call.rb +2 -0
- data/lib/telephony/error/base.rb +3 -0
- data/lib/telephony/error/connection.rb +2 -0
- data/lib/telephony/error/not_in_progress.rb +2 -0
- data/lib/telephony/error/queue_empty.rb +2 -0
- data/lib/telephony/helper.rb +11 -0
- data/lib/telephony/jobs/agent_offline.rb +28 -0
- data/lib/telephony/jobs/pusher_event.rb +21 -0
- data/lib/telephony/providers/twilio_provider.rb +162 -0
- data/lib/telephony/version.rb +3 -0
- data/spec/controllers/telephony/agents_controller_spec.rb +117 -0
- data/spec/controllers/telephony/call_centers_controller_spec.rb +25 -0
- data/spec/controllers/telephony/conversations_controller_spec.rb +229 -0
- data/spec/controllers/telephony/playable_listeners_controller_spec.rb +138 -0
- data/spec/controllers/telephony/providers/twilio/calls_controller_spec.rb +33 -0
- data/spec/controllers/telephony/providers/twilio/musics_controller_spec.rb +20 -0
- data/spec/controllers/telephony/signals/agents/presences_controller_spec.rb +154 -0
- data/spec/controllers/telephony/twilio_client_controller_spec.rb +58 -0
- data/spec/controllers/telephony/widget_controller_spec.rb +25 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +6 -0
- data/spec/dummy/app/assets/javascripts/lib/event_logger.js +82 -0
- data/spec/dummy/app/assets/javascripts/vendor/backbone.js +1159 -0
- data/spec/dummy/app/assets/javascripts/vendor/chosen.jquery.js +1018 -0
- data/spec/dummy/app/assets/javascripts/vendor/jquery.form.js +1117 -0
- data/spec/dummy/app/assets/javascripts/vendor/underscore.js +839 -0
- data/spec/dummy/app/assets/stylesheets/application.css +23 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/widget_host_controller.rb +2 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +12 -0
- data/spec/dummy/app/views/widget_host/index.html.erb +53 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +61 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/call_centers.yml +35 -0
- data/spec/dummy/config/call_centers.yml.example +35 -0
- data/spec/dummy/config/database.yml +56 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/cucumber.rb +39 -0
- data/spec/dummy/config/environments/development.rb +39 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/pusher.yml +14 -0
- data/spec/dummy/config/pusher.yml.example +14 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/config/sms_whitelist.json.example +4 -0
- data/spec/dummy/config/twilio.yml +57 -0
- data/spec/dummy/config/twilio.yml.example +57 -0
- data/spec/dummy/db/schema.rb +122 -0
- data/spec/dummy/db/seeds.rb +6 -0
- data/spec/dummy/log/production.log +156 -0
- data/spec/dummy/log/test.log +13812 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/assets/application-628309db7ce8c0abdd91f8f796881599.js +32 -0
- data/spec/dummy/public/assets/application-628309db7ce8c0abdd91f8f796881599.js.gz +0 -0
- data/spec/dummy/public/assets/application-6c551430f3bdd32ba57c9c41e5f91846.css +24 -0
- data/spec/dummy/public/assets/application-6c551430f3bdd32ba57c9c41e5f91846.css.gz +0 -0
- data/spec/dummy/public/assets/telephony/backspace-9f5b195e049ed90eb20ecdda6e264b0a.png +0 -0
- data/spec/dummy/public/assets/telephony/icon-spinner-ddbae473a70c5425810aeee31d4a8ad7.gif +0 -0
- data/spec/dummy/public/assets/telephony/zest-telephony-0e6b13673634da80de9ae09bcca253e3.eot +0 -0
- data/spec/dummy/public/assets/telephony/zest-telephony-37f394757ccb11b978f16d9fd32cb3b5.ttf +0 -0
- data/spec/dummy/public/assets/telephony/zest-telephony-e7efdbc60c0a1c8404951bc79c7fb3a8.woff +0 -0
- data/spec/dummy/public/assets/telephony/zest-telephony-f34287df626936908408f53a33db9e83.svg +73 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/tmp/cache/assets/C98/020/sprockets%2Fa83f8254d688334ff179984e423f502f +0 -0
- data/spec/dummy/tmp/cache/assets/CA4/550/sprockets%2F407f9191fe573f2435c55c017cb0d022 +0 -0
- data/spec/dummy/tmp/cache/assets/CAA/6A0/sprockets%2F3265550e2d2c7f5a864ca85d255504c2 +0 -0
- data/spec/dummy/tmp/cache/assets/CB0/F60/sprockets%2F462f9efed31e6710732376ae06c27208 +0 -0
- data/spec/dummy/tmp/cache/assets/CB6/E20/sprockets%2Fa7092cd9f16917099d754f1380af13e1 +0 -0
- data/spec/dummy/tmp/cache/assets/CC7/9F0/sprockets%2F0517100815cd45c43fec1d8510fcb630 +0 -0
- data/spec/dummy/tmp/cache/assets/CCA/BF0/sprockets%2F16ea15e0b5d367c34b812612a4207e3e +0 -0
- data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/CF1/960/sprockets%2F36ef26985821ec702c74dae4af789903 +0 -0
- data/spec/dummy/tmp/cache/assets/D07/F30/sprockets%2Fd12862f20df0c9ef7aa2b4216d247079 +0 -0
- data/spec/dummy/tmp/cache/assets/D09/BF0/sprockets%2F5c8595efaa8cc5235a09801c60e25a16 +0 -0
- data/spec/dummy/tmp/cache/assets/D0D/250/sprockets%2F5e759d66e374910dae5a51b221e6e3a4 +0 -0
- data/spec/dummy/tmp/cache/assets/D0D/E30/sprockets%2Fa282879e0788ba133f5bdc211cf134e8 +0 -0
- data/spec/dummy/tmp/cache/assets/D11/8E0/sprockets%2F2a193a8af29963f1113bef05788e02ff +0 -0
- data/spec/dummy/tmp/cache/assets/D14/270/sprockets%2F7f95a752910ed33d728532f8fabd340d +0 -0
- data/spec/dummy/tmp/cache/assets/D17/BE0/sprockets%2F58749d7aea4ca766c2520801f0f96b9b +0 -0
- data/spec/dummy/tmp/cache/assets/D18/270/sprockets%2Fbb2d88813b1795a97e9a7c14100eef77 +0 -0
- data/spec/dummy/tmp/cache/assets/D22/310/sprockets%2Fbae9148ce1229214dfbb0c425b0054d0 +0 -0
- data/spec/dummy/tmp/cache/assets/D30/EB0/sprockets%2F2c668b88beb4c9805d91ed4587f549e7 +0 -0
- data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/D3C/690/sprockets%2F681ba175fdd2da8d590b7e624b6135a6 +0 -0
- data/spec/dummy/tmp/cache/assets/D44/BC0/sprockets%2F7214f66dd91fdd51f00c3882293f5eea +0 -0
- data/spec/dummy/tmp/cache/assets/D46/FA0/sprockets%2F4f9543cd9e68ba3141fd488afb13681b +0 -0
- data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/D51/9A0/sprockets%2Fb6e4cbcf30f6f611671695f79ea846d5 +0 -0
- data/spec/dummy/tmp/cache/assets/D55/920/sprockets%2F0a02242aa4c4febcc796419aba103c69 +0 -0
- data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/D5F/6F0/sprockets%2F155e7bc44f326371cce0ca8bc5b2414e +0 -0
- data/spec/dummy/tmp/cache/assets/D6B/250/sprockets%2Fe4eecce7a3371b11038c92f07cb28e67 +0 -0
- data/spec/dummy/tmp/cache/assets/D6B/E70/sprockets%2F103a456ae3692e3cca20b7696fdee8f0 +0 -0
- data/spec/dummy/tmp/cache/assets/D7F/AD0/sprockets%2Fb1c02d12303b1fe2f981771cbb0c4cbd +0 -0
- data/spec/dummy/tmp/cache/assets/D81/D00/sprockets%2F0c68b6d9dce98681a2a710d9fc3f7e39 +0 -0
- data/spec/dummy/tmp/cache/assets/D94/4D0/sprockets%2F4608a5bdf27ddf11bcaed1375911e9a2 +0 -0
- data/spec/dummy/tmp/cache/assets/D9A/580/sprockets%2F433005b19aaf7ed5cba9c7f8cd30b775 +0 -0
- data/spec/dummy/tmp/cache/assets/DA4/270/sprockets%2F860ab3bd30204e02c0a5d82bd4bbabe1 +0 -0
- data/spec/dummy/tmp/cache/assets/DA4/480/sprockets%2F53e39285bb57a2ddb6ff856b2eb491da +0 -0
- data/spec/dummy/tmp/cache/assets/DA6/3C0/sprockets%2F587c7e35f47442eadaa530acc5e9f5e6 +0 -0
- data/spec/dummy/tmp/cache/assets/DAB/DA0/sprockets%2Fb8fb5e8518ed3d38a7f6a8f18a9208aa +0 -0
- data/spec/dummy/tmp/cache/assets/DB2/700/sprockets%2Ffa85cb79b94fce1b8344d983ea863d2e +0 -0
- data/spec/dummy/tmp/cache/assets/DCC/4F0/sprockets%2Fbc0f3c61e16afb5a285ba8b39846ed8b +0 -0
- data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/DDC/BE0/sprockets%2F2c0a4d4675a61b014aedbbabb3f071fc +0 -0
- data/spec/dummy/tmp/cache/assets/E04/640/sprockets%2F3c5ddf2bbefd9d70f1b506b519cf856e +0 -0
- data/spec/dummy/tmp/cache/assets/E04/7F0/sprockets%2F35f1b2ff729a5ec21f6dc5f7d6faa67b +0 -0
- data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/E07/230/sprockets%2Febd4f2dd708879d593aff008ccb75acc +0 -0
- data/spec/dummy/tmp/cache/assets/E17/9D0/sprockets%2F8db2b79f6c4eabe7a9ebe7a7898ec066 +0 -0
- data/spec/dummy/tmp/cache/assets/E31/F10/sprockets%2Fcebacf56667da1cc2961b59fd922eafb +0 -0
- data/spec/factories/agent.rb +26 -0
- data/spec/factories/calls.rb +106 -0
- data/spec/factories/conversations.rb +171 -0
- data/spec/factories/events.rb +250 -0
- data/spec/factories/playable_listeners.rb +6 -0
- data/spec/factories/recordings.rb +6 -0
- data/spec/factories/voicemails.rb +8 -0
- data/spec/fixtures/vcr_cassettes/Authenticating_an_online_user.yml +90 -0
- data/spec/fixtures/vcr_cassettes/Creating_a_conversation/creates_a_new_call.yml +42 -0
- data/spec/fixtures/vcr_cassettes/Creating_a_conversation/creates_a_new_conversation.yml +42 -0
- data/spec/fixtures/vcr_cassettes/Creating_a_conversation/returns_the_conversation_as_JSON.yml +42 -0
- data/spec/fixtures/vcr_cassettes/Pusher_channel_as_JSON.yml +90 -0
- data/spec/fixtures/vcr_cassettes/Pusher_to_publish_the_event.yml +32 -0
- data/spec/fixtures/vcr_cassettes/Reloading_the_widget_during_a_call/_create/during_a_call/after_a_failed_transfer/pushes_the_event_for_the_active_call.yml +1110 -0
- data/spec/fixtures/vcr_cassettes/Telephony_ConversationsController/_create/by_default/creates_a_new_call.yml +45 -0
- data/spec/fixtures/vcr_cassettes/Telephony_ConversationsController/_create/by_default/creates_a_new_conversation.yml +43 -0
- data/spec/fixtures/vcr_cassettes/Telephony_ConversationsController/_create/by_default/returns_the_conversation_as_JSON.yml +44 -0
- data/spec/fixtures/vcr_cassettes/Telephony_Providers_TwilioProvider/_call/allows_the_phone_to_ring_for_60_seconds.yml +42 -0
- data/spec/fixtures/vcr_cassettes/Telephony_Providers_TwilioProvider/_call/includes_a_status_change_callback_url.yml +42 -0
- data/spec/fixtures/vcr_cassettes/Telephony_Providers_TwilioProvider/_call/places_a_call.yml +42 -0
- data/spec/fixtures/vcr_cassettes/Telephony_Providers_TwilioProvider/_dial_into_conference/allows_the_phone_to_ring_for_15_seconds.yml +42 -0
- data/spec/fixtures/vcr_cassettes/Telephony_Providers_TwilioProvider/_dial_into_conference/places_a_call_to_redirect_the_participant_to_a_conference.yml +42 -0
- data/spec/fixtures/vcr_cassettes/Telephony_Providers_TwilioProvider/_hangup/by_default/hangs_up_the_call.yml +42 -0
- data/spec/fixtures/vcr_cassettes/buying_number_for_an_area_code.yml +42 -0
- data/spec/fixtures/vcr_cassettes/returns_success.yml +90 -0
- data/spec/javascripts/helpers/jasmine-jquery.js +546 -0
- data/spec/javascripts/helpers/mock-ajax.js +207 -0
- data/spec/javascripts/support/jasmine.yml +80 -0
- data/spec/javascripts/telephony/models/agent_spec.js +40 -0
- data/spec/javascripts/telephony/models/conversation_spec.js +515 -0
- data/spec/javascripts/telephony/models/device_spec.js +80 -0
- data/spec/javascripts/telephony/models/transfer_spec.js +22 -0
- data/spec/javascripts/telephony/push_spec.js +427 -0
- data/spec/javascripts/telephony/views/agents_view_spec.js +101 -0
- data/spec/javascripts/telephony/views/application_view_spec.js +74 -0
- data/spec/javascripts/telephony/views/conversation_view_spec.js +626 -0
- data/spec/javascripts/telephony/views/status_view_spec.js +30 -0
- data/spec/javascripts/telephony/views/transfer_view_spec.js +187 -0
- data/spec/javascripts/telephony/views/twilio_client_view_spec.js +77 -0
- data/spec/javascripts/telephony/views/widget_view_spec.js +20 -0
- data/spec/lib/telephony/concerns/controllers/twilio_request_verifier_spec.rb +77 -0
- data/spec/lib/telephony/conversation_data_spec.rb +342 -0
- data/spec/lib/telephony/helper_spec.rb +24 -0
- data/spec/lib/telephony/jobs/agent_offline_spec.rb +37 -0
- data/spec/lib/telephony/jobs/pusher_event_spec.rb +39 -0
- data/spec/lib/telephony/providers/twilio_provider_spec.rb +439 -0
- data/spec/lib/telephony_spec.rb +104 -0
- data/spec/models/telephony/agent_spec.rb +479 -0
- data/spec/models/telephony/agent_state_machine_spec.rb +131 -0
- data/spec/models/telephony/call_center_spec.rb +32 -0
- data/spec/models/telephony/call_spec.rb +597 -0
- data/spec/models/telephony/call_state_machine_spec.rb +472 -0
- data/spec/models/telephony/conversation_spec.rb +751 -0
- data/spec/models/telephony/conversation_state_machine_spec.rb +387 -0
- data/spec/models/telephony/conversations_presenter_spec.rb +40 -0
- data/spec/models/telephony/event_spec.rb +716 -0
- data/spec/models/telephony/inbound_conversation_queue_spec.rb +243 -0
- data/spec/models/telephony/playable_listener_spec.rb +43 -0
- data/spec/models/telephony/pusher_event_publisher_spec.rb +36 -0
- data/spec/models/telephony/recording_spec.rb +6 -0
- data/spec/models/telephony/voicemail_spec.rb +96 -0
- data/spec/observers/telephony/agent_observer_spec.rb +21 -0
- data/spec/observers/telephony/event_observer_spec.rb +19 -0
- data/spec/requests/create_conversation_spec.rb +39 -0
- data/spec/requests/dequeue_call_spec.rb +42 -0
- data/spec/requests/list_conversations_spec.rb +33 -0
- data/spec/requests/presences_spec.rb +51 -0
- data/spec/requests/providers/twilio/calls/child_answered_spec.rb +24 -0
- data/spec/requests/providers/twilio/calls/child_detached_spec.rb +249 -0
- data/spec/requests/providers/twilio/calls/dial_spec.rb +132 -0
- data/spec/requests/providers/twilio/calls/done_spec.rb +69 -0
- data/spec/requests/providers/twilio/calls/join_conference_spec.rb +56 -0
- data/spec/requests/providers/twilio/calls/leave_queue_spec.rb +44 -0
- data/spec/requests/providers/twilio/calls/parent_answered_spec.rb +59 -0
- data/spec/requests/providers/twilio/inbound/connect_dequeued_call_spec.rb +124 -0
- data/spec/requests/providers/twilio/inbound/enqueue_inbound_call_spec.rb +108 -0
- data/spec/requests/providers/twilio/inbound/enqueued_call_wait_music_spec.rb +13 -0
- data/spec/requests/providers/twilio/voicemails/leave_voicemail_spec.rb +78 -0
- data/spec/requests/search_conversations_spec.rb +101 -0
- data/spec/requests/transfer_spec.rb +65 -0
- data/spec/requests/voicemail_api_spec.rb +58 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/support/factory_girl.rb +5 -0
- data/spec/support/matchers/be_complete_hold.rb +20 -0
- data/spec/support/matchers/be_whisper_tone.rb +35 -0
- data/spec/support/matchers/join_conference.rb +23 -0
- data/spec/support/nokogiri.rb +1 -0
- data/spec/support/pusher_helper.rb +24 -0
- data/spec/support/vcr.rb +12 -0
- data/spec/support/webmock.rb +1 -0
- metadata +692 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
</div>
|
24
|
+
</body>
|
25
|
+
</html>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/*!
|
2
|
+
* jQuery JavaScript Library v1.8.1
|
3
|
+
* http://jquery.com/
|
4
|
+
*
|
5
|
+
* Includes Sizzle.js
|
6
|
+
* http://sizzlejs.com/
|
7
|
+
*
|
8
|
+
* Copyright 2012 jQuery Foundation and other contributors
|
9
|
+
* Released under the MIT license
|
10
|
+
* http://jquery.org/license
|
11
|
+
*
|
12
|
+
* Date: Thu Aug 30 2012 17:17:22 GMT-0400 (Eastern Daylight Time)
|
13
|
+
*/
|
14
|
+
!function(e,t){function n(e){var t=pt[e]={};return K.each(e.split(tt),function(e,n){t[n]=!0}),t}function r(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(mt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:gt.test(r)?K.parseJSON(r):r}catch(s){}K.data(e,n,r)}else r=t}return r}function i(e){var t;for(t in e)if(("data"!==t||!K.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function s(){return!1}function o(){return!0}function a(e){return!e||!e.parentNode||11===e.parentNode.nodeType}function l(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function u(e,t,n){if(t=t||0,K.isFunction(t))return K.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return K.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=K.grep(e,function(e){return 1===e.nodeType});if(Ht.test(t))return K.filter(t,r,!n);t=K.filter(t,r)}return K.grep(e,function(e){return K.inArray(e,t)>=0===n})}function c(e){var t=Rt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function d(e,t){if(1===t.nodeType&&K.hasData(e)){var n,r,i,s=K._data(e),o=K._data(t,s),a=s.events;if(a){delete o.handle,o.events={};for(n in a)for(r=0,i=a[n].length;i>r;r++)K.event.add(t,n,a[n][r])}o.data&&(o.data=K.extend({},o.data))}}function f(e,t){var n;1===t.nodeType&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),K.support.html5Clone&&e.innerHTML&&!K.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Yt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.selected=e.defaultSelected:"input"===n||"textarea"===n?t.defaultValue=e.defaultValue:"script"===n&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(K.expando))}function p(e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName("*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll("*"):[]}function g(e){Yt.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=yn.length;i--;)if(t=yn[i]+n,t in e)return t;return r}function v(e,t){return e=t||e,"none"===K.css(e,"display")||!K.contains(e.ownerDocument,e)}function y(e,t){for(var n,r,i=[],s=0,o=e.length;o>s;s++)n=e[s],n.style&&(i[s]=K._data(n,"olddisplay"),t?(i[s]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&v(n)&&(i[s]=K._data(n,"olddisplay",w(n.nodeName)))):(r=nn(n,"display"),i[s]||"none"===r||K._data(n,"olddisplay",r)));for(s=0;o>s;s++)n=e[s],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?i[s]||"":"none"));return e}function _(e,t,n){var r=hn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function b(e,t,n,r){for(var i=n===(r?"border":"content")?4:"width"===t?1:0,s=0;4>i;i+=2)"margin"===n&&(s+=K.css(e,n+vn[i],!0)),r?("content"===n&&(s-=parseFloat(nn(e,"padding"+vn[i]))||0),"margin"!==n&&(s-=parseFloat(nn(e,"border"+vn[i]+"Width"))||0)):(s+=parseFloat(nn(e,"padding"+vn[i]))||0,"padding"!==n&&(s+=parseFloat(nn(e,"border"+vn[i]+"Width"))||0));return s}function x(e,t,n){var r="width"===t?e.offsetWidth:e.offsetHeight,i=!0,s=K.support.boxSizing&&"border-box"===K.css(e,"boxSizing");if(0>=r||null==r){if(r=nn(e,t),(0>r||null==r)&&(r=e.style[t]),dn.test(r))return r;i=s&&(K.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+b(e,t,n||(s?"border":"content"),i)+"px"}function w(e){if(pn[e])return pn[e];var t=K("<"+e+">").appendTo(B.body),n=t.css("display");return t.remove(),("none"===n||""===n)&&(rn=B.body.appendChild(rn||K.extend(B.createElement("iframe"),{frameBorder:0,width:0,height:0})),sn&&rn.createElement||(sn=(rn.contentWindow||rn.contentDocument).document,sn.write("<!doctype html><html><body>"),sn.close()),t=sn.body.appendChild(sn.createElement(e)),n=nn(t,"display"),B.body.removeChild(rn)),pn[e]=n,n}function T(e,t,n,r){var i;if(K.isArray(t))K.each(t,function(t,i){n||xn.test(e)?r(e,i):T(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==K.type(t))r(e,t);else for(i in t)T(e+"["+i+"]",t[i],n,r)}function k(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(tt),a=0,l=o.length;if(K.isFunction(n))for(;l>a;a++)r=o[a],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function C(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;for(var a,l=e[s],u=0,c=l?l.length:0,h=e===qn;c>u&&(h||!a);u++)a=l[u](n,r,i),"string"==typeof a&&(!h||o[a]?a=t:(n.dataTypes.unshift(a),a=C(e,n,r,i,a,o)));return!h&&a||o["*"]||(a=C(e,n,r,i,"*",o)),a}function E(e,n){var r,i,s=K.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&K.extend(!0,e,i)}function N(e,n,r){var i,s,o,a,l=e.contents,u=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);for(;"*"===u[0];)u.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in l)if(l[s]&&l[s].test(i)){u.unshift(s);break}if(u[0]in r)o=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){o=s;break}a||(a=s)}o=o||a}return o?(o!==u[0]&&u.unshift(o),r[o]):void 0}function S(e,t){var n,r,i,s,o=e.dataTypes.slice(),a=o[0],l={},u=0;if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),o[1])for(n in e.converters)l[n.toLowerCase()]=e.converters[n];for(;i=o[++u];)if("*"!==i){if("*"!==a&&a!==i){if(n=l[a+" "+i]||l["* "+i],!n)for(r in l)if(s=r.split(" "),s[1]===i&&(n=l[a+" "+s[0]]||l["* "+s[0]])){n===!0?n=l[r]:l[r]!==!0&&(i=s[0],o.splice(u--,0,i));break}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(c){return{state:"parsererror",error:n?c:"No conversion from "+a+" to "+i}}}a=i}return{state:"success",data:t}}function A(){try{return new e.XMLHttpRequest}catch(t){}}function j(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function D(){return setTimeout(function(){Jn=t},0),Jn=K.now()}function O(e,t){K.each(t,function(t,n){for(var r=(er[t]||[]).concat(er["*"]),i=0,s=r.length;s>i;i++)if(r[i].call(e,t,n))return})}function L(e,t,n){var r,i=0,s=Zn.length,o=K.Deferred().always(function(){delete a.elem}),a=function(){for(var t=Jn||D(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),i=0,s=l.tweens.length;s>i;i++)l.tweens[i].run(r);return o.notifyWith(e,[l,r,n]),1>r&&s?n:(o.resolveWith(e,[l]),!1)},l=o.promise({elem:e,props:K.extend({},t),opts:K.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Jn||D(),duration:n.duration,tweens:[],createTween:function(t,n){var r=K.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){for(var n=0,r=t?l.tweens.length:0;r>n;n++)l.tweens[n].run(1);return t?o.resolveWith(e,[l,t]):o.rejectWith(e,[l,t]),this}}),u=l.props;for(F(u,l.opts.specialEasing);s>i;i++)if(r=Zn[i].call(l,e,u,l.opts))return r;return O(l,u),K.isFunction(l.opts.start)&&l.opts.start.call(e,l),K.fx.timer(K.extend(a,{anim:l,queue:l.opts.queue,elem:e})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function F(e,t){var n,r,i,s,o;for(n in e)if(r=K.camelCase(n),i=t[r],s=e[n],K.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=K.cssHooks[r],o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}function M(e,t,n){var r,i,s,o,a,l,u,c,h=this,d=e.style,f={},p=[],g=e.nodeType&&v(e);n.queue||(u=K._queueHooks(e,"fx"),null==u.unqueued&&(u.unqueued=0,c=u.empty.fire,u.empty.fire=function(){u.unqueued||c()}),u.unqueued++,h.always(function(){h.always(function(){u.unqueued--,K.queue(e,"fx").length||u.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===K.css(e,"display")&&"none"===K.css(e,"float")&&(K.support.inlineBlockNeedsLayout&&"inline"!==w(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",K.support.shrinkWrapBlocks||h.done(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(s=t[r],Gn.exec(s)){if(delete t[r],s===(g?"hide":"show"))continue;p.push(r)}if(o=p.length)for(a=K._data(e,"fxshow")||K._data(e,"fxshow",{}),g?K(e).show():h.done(function(){K(e).hide()}),h.done(function(){var t;K.removeData(e,"fxshow",!0);for(t in f)K.style(e,t,f[t])}),r=0;o>r;r++)i=p[r],l=h.createTween(i,g?a[i]:0),f[i]=a[i]||K.style(e,i),i in a||(a[i]=l.start,g&&(l.end=l.start,l.start="width"===i||"height"===i?1:0))}function H(e,t,n,r,i){return new H.prototype.init(e,t,n,r,i)}function q(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=vn[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function z(e){return K.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var R,P,B=e.document,I=e.location,W=e.navigator,$=e.jQuery,X=e.$,U=Array.prototype.push,V=Array.prototype.slice,J=Array.prototype.indexOf,Y=Object.prototype.toString,G=Object.prototype.hasOwnProperty,Q=String.prototype.trim,K=function(e,t){return new K.fn.init(e,t,R)},Z=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,et=/\S/,tt=/\s+/,nt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rt=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,it=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,st=/^[\],:{}\s]*$/,ot=/(?:^|:|,)(?:\s*\[)+/g,at=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,lt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,ut=/^-ms-/,ct=/-([\da-z])/gi,ht=function(e,t){return(t+"").toUpperCase()},dt=function(){B.addEventListener?(B.removeEventListener("DOMContentLoaded",dt,!1),K.ready()):"complete"===B.readyState&&(B.detachEvent("onreadystatechange",dt),K.ready())},ft={};K.fn=K.prototype={constructor:K,init:function(e,n,r){var i,s,o;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:rt.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1])return n=n instanceof K?n[0]:n,o=n&&n.nodeType?n.ownerDocument||n:B,e=K.parseHTML(i[1],o,!0),it.test(i[1])&&K.isPlainObject(n)&&this.attr.call(e,n,!0),K.merge(this,e);if(s=B.getElementById(i[2]),s&&s.parentNode){if(s.id!==i[2])return r.find(e);this.length=1,this[0]=s}return this.context=B,this.selector=e,this}return K.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),K.makeArray(e,this))},selector:"",jquery:"1.8.1",length:0,size:function(){return this.length},toArray:function(){return V.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=K.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,"find"===t?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return K.each(this,e,t)},ready:function(e){return K.ready.promise().done(e),this},eq:function(e){return e=+e,-1===e?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(V.apply(this,arguments),"slice",V.call(arguments).join(","))},map:function(e){return this.pushStack(K.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:[].sort,splice:[].splice},K.fn.init.prototype=K.fn,K.extend=K.fn.extend=function(){var e,n,r,i,s,o,a=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},l=2),"object"==typeof a||K.isFunction(a)||(a={}),u===l&&(a=this,--l);u>l;l++)if(null!=(e=arguments[l]))for(n in e)r=a[n],i=e[n],a!==i&&(c&&i&&(K.isPlainObject(i)||(s=K.isArray(i)))?(s?(s=!1,o=r&&K.isArray(r)?r:[]):o=r&&K.isPlainObject(r)?r:{},a[n]=K.extend(c,o,i)):i!==t&&(a[n]=i));return a},K.extend({noConflict:function(t){return e.$===K&&(e.$=X),t&&e.jQuery===K&&(e.jQuery=$),K},isReady:!1,readyWait:1,holdReady:function(e){e?K.readyWait++:K.ready(!0)},ready:function(e){if(e===!0?!--K.readyWait:!K.isReady){if(!B.body)return setTimeout(K.ready,1);K.isReady=!0,e!==!0&&--K.readyWait>0||(P.resolveWith(B,[K]),K.fn.trigger&&K(B).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===K.type(e)},isArray:Array.isArray||function(e){return"array"===K.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):ft[Y.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==K.type(e)||e.nodeType||K.isWindow(e))return!1;try{if(e.constructor&&!G.call(e,"constructor")&&!G.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||G.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return e&&"string"==typeof e?("boolean"==typeof t&&(n=t,t=0),t=t||B,(r=it.exec(e))?[t.createElement(r[1])]:(r=K.buildFragment([e],t,n?null:[]),K.merge([],(r.cacheable?K.clone(r.fragment):r.fragment).childNodes))):null},parseJSON:function(t){return t&&"string"==typeof t?(t=K.trim(t),e.JSON&&e.JSON.parse?e.JSON.parse(t):st.test(t.replace(at,"@").replace(lt,"]").replace(ot,""))?new Function("return "+t)():(K.error("Invalid JSON: "+t),void 0)):null},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||K.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&et.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ut,"ms-").replace(ct,ht)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,r){var i,s=0,o=e.length,a=o===t||K.isFunction(e);if(r)if(a){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;o>s&&n.apply(e[s++],r)!==!1;);else if(a){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;o>s&&n.call(e[s],s,e[s++])!==!1;);return e},trim:Q&&!Q.call(" ")?function(e){return null==e?"":Q.call(e)}:function(e){return null==e?"":e.toString().replace(nt,"")},makeArray:function(e,t){var n,r=t||[];return null!=e&&(n=K.type(e),null==e.length||"string"===n||"function"===n||"regexp"===n||K.isWindow(e)?U.call(r,e):K.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(J)return J.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if("number"==typeof r)for(;r>s;s++)e[i++]=n[s];else for(;n[s]!==t;)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;for(n=!!n;o>s;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],a=0,l=e.length,u=e instanceof K||l!==t&&"number"==typeof l&&(l>0&&e[0]&&e[l-1]||0===l||K.isArray(e));if(u)for(;l>a;a++)i=n(e[a],a,r),null!=i&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),null!=i&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return"string"==typeof n&&(r=e[n],n=e,e=r),K.isFunction(e)?(i=V.call(arguments,2),s=function(){return e.apply(n,i.concat(V.call(arguments)))},s.guid=e.guid=e.guid||s.guid||K.guid++,s):t},access:function(e,n,r,i,s,o,a){var l,u=null==r,c=0,h=e.length;if(r&&"object"==typeof r){for(c in r)K.access(e,n,c,r[c],1,o,i);s=1}else if(i!==t){if(l=a===t&&K.isFunction(i),u&&(l?(l=n,n=function(e,t,n){return l.call(K(e),n)}):(n.call(e,i),n=null)),n)for(;h>c;c++)n(e[c],r,l?i.call(e[c],c,n(e[c],r)):i,a);s=1}return s?e:u?n.call(e):h?n(e[0],r):o},now:function(){return(new Date).getTime()}}),K.ready.promise=function(t){if(!P)if(P=K.Deferred(),"complete"===B.readyState)setTimeout(K.ready,1);else if(B.addEventListener)B.addEventListener("DOMContentLoaded",dt,!1),e.addEventListener("load",K.ready,!1);else{B.attachEvent("onreadystatechange",dt),e.attachEvent("onload",K.ready);var n=!1;try{n=null==e.frameElement&&B.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!K.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}K.ready()}}()}return P.promise(t)},K.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){ft["[object "+t+"]"]=t.toLowerCase()}),R=K(B);var pt={};K.Callbacks=function(e){e="string"==typeof e?pt[e]||n(e):K.extend({},e);var r,i,s,o,a,l,u=[],c=!e.once&&[],h=function(t){for(r=e.memory&&t,i=!0,l=o||0,o=0,a=u.length,s=!0;u&&a>l;l++)if(u[l].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}s=!1,u&&(c?c.length&&h(c.shift()):r?u=[]:d.disable())},d={add:function(){if(u){var t=u.length;!function n(t){K.each(t,function(t,r){var i=K.type(r);"function"!==i||e.unique&&d.has(r)?r&&r.length&&"string"!==i&&n(r):u.push(r)})}(arguments),s?a=u.length:r&&(o=t,h(r))}return this},remove:function(){return u&&K.each(arguments,function(e,t){for(var n;(n=K.inArray(t,u,n))>-1;)u.splice(n,1),s&&(a>=n&&a--,l>=n&&l--)}),this},has:function(e){return K.inArray(e,u)>-1},empty:function(){return u=[],this},disable:function(){return u=c=r=t,this},disabled:function(){return!u},lock:function(){return c=t,r||d.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!c||(s?c.push(t):h(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},K.extend({Deferred:function(e){var t=[["resolve","done",K.Callbacks("once memory"),"resolved"],["reject","fail",K.Callbacks("once memory"),"rejected"],["notify","progress",K.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return K.Deferred(function(n){K.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](K.isFunction(o)?function(){var e=o.apply(this,arguments);e&&K.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return"object"==typeof e?K.extend(e,r):r}},i={};return r.pipe=r.then,K.each(t,function(e,s){var o=s[2],a=s[3];r[s[1]]=o.add,a&&o.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,s=V.call(arguments),o=s.length,a=1!==o||e&&K.isFunction(e.promise)?o:0,l=1===a?e:K.Deferred(),u=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?V.call(arguments):i,r===t?l.notifyWith(n,r):--a||l.resolveWith(n,r)}};if(o>1)for(t=new Array(o),n=new Array(o),r=new Array(o);o>i;i++)s[i]&&K.isFunction(s[i].promise)?s[i].promise().done(u(i,r,s)).fail(l.reject).progress(u(i,n,t)):--a;return a||l.resolveWith(r,s),l.promise()}}),K.support=function(){var t,n,r,i,s,o,a,l,u,c,h,d=B.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],r.style.cssText="top:1px;float:left;opacity:.5",!n||!n.length||!r)return{};i=B.createElement("select"),s=i.appendChild(B.createElement("option")),o=d.getElementsByTagName("input")[0],t={leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:"on"===o.value,optSelected:s.selected,getSetAttribute:"t"!==d.className,enctype:!!B.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==B.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===B.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!s.disabled;try{delete d.test}catch(f){t.deleteExpando=!1}if(!d.addEventListener&&d.attachEvent&&d.fireEvent&&(d.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),d.cloneNode(!0).fireEvent("onclick"),d.detachEvent("onclick",h)),o=B.createElement("input"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","checked"),o.setAttribute("name","t"),d.appendChild(o),a=B.createDocumentFragment(),a.appendChild(d.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=o.checked,a.removeChild(o),a.appendChild(d),d.attachEvent)for(u in{submit:!0,change:!0,focusin:!0})l="on"+u,c=l in d,c||(d.setAttribute(l,"return;"),c="function"==typeof d[l]),t[u+"Bubbles"]=c;return K(function(){var n,r,i,s,o="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=B.getElementsByTagName("body")[0];a&&(n=B.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=B.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=r.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",t.reliableHiddenOffsets=c&&0===i[0].offsetHeight,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===r.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==a.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(r,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(r,null)||{width:"4px"}).width,s=B.createElement("div"),s.style.cssText=r.style.cssText=o,s.style.marginRight=s.style.width="0",r.style.width="1px",r.appendChild(s),t.reliableMarginRight=!parseFloat((e.getComputedStyle(s,null)||{}).marginRight)),"undefined"!=typeof r.style.zoom&&(r.innerHTML="",r.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===r.offsetWidth,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==r.offsetWidth,n.style.zoom=1),a.removeChild(n),n=r=i=s=null)}),a.removeChild(d),n=r=i=s=o=a=d=null,t}();var gt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,mt=/([A-Z])/g;K.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(K.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?K.cache[e[K.expando]]:e[K.expando],!!e&&!i(e)},data:function(e,n,r,i){if(K.acceptData(e)){var s,o,a=K.expando,l="string"==typeof n,u=e.nodeType,c=u?K.cache:e,h=u?e[a]:e[a]&&a;if(h&&c[h]&&(i||c[h].data)||!l||r!==t)return h||(u?e[a]=h=K.deletedIds.pop()||++K.uuid:h=a),c[h]||(c[h]={},u||(c[h].toJSON=K.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[h]=K.extend(c[h],n):c[h].data=K.extend(c[h].data,n)),s=c[h],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[K.camelCase(n)]=r),l?(o=s[n],null==o&&(o=s[K.camelCase(n)])):o=s,o}},removeData:function(e,t,n){if(K.acceptData(e)){var r,s,o,a=e.nodeType,l=a?K.cache:e,u=a?e[K.expando]:K.expando;if(l[u]){if(t&&(r=n?l[u]:l[u].data)){K.isArray(t)||(t in r?t=[t]:(t=K.camelCase(t),t=t in r?[t]:t.split(" ")));for(s=0,o=t.length;o>s;s++)delete r[t[s]];if(!(n?i:K.isEmptyObject)(r))return}(n||(delete l[u].data,i(l[u])))&&(a?K.cleanData([e],!0):K.support.deleteExpando||l!=l.window?delete l[u]:l[u]=null)}}},_data:function(e,t,n){return K.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&K.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),K.fn.extend({data:function(e,n){var i,s,o,a,l,u=this[0],c=0,h=null;if(e===t){if(this.length&&(h=K.data(u),1===u.nodeType&&!K._data(u,"parsedAttrs"))){for(o=u.attributes,l=o.length;l>c;c++)a=o[c].name,0===a.indexOf("data-")&&(a=K.camelCase(a.substring(5)),r(u,a,h[a]));K._data(u,"parsedAttrs",!0)}return h}return"object"==typeof e?this.each(function(){K.data(this,e)}):(i=e.split(".",2),i[1]=i[1]?"."+i[1]:"",s=i[1]+"!",K.access(this,function(n){return n===t?(h=this.triggerHandler("getData"+s,[i[0]]),h===t&&u&&(h=K.data(u,e),h=r(u,e,h)),h===t&&i[1]?this.data(i[0]):h):(i[1]=n,this.each(function(){var t=K(this);t.triggerHandler("setData"+s,i),K.data(this,e,n),t.triggerHandler("changeData"+s,i)}),void 0)},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){K.removeData(this,e)})}}),K.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=K._data(e,t),n&&(!r||K.isArray(n)?r=K._data(e,t,K.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=K.queue(e,t),r=n.length,i=n.shift(),s=K._queueHooks(e,t),o=function(){K.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K._data(e,n)||K._data(e,n,{empty:K.Callbacks("once memory").add(function(){K.removeData(e,t+"queue",!0),K.removeData(e,n,!0)})})}}),K.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),arguments.length<r?K.queue(this[0],e):n===t?this:this.each(function(){var t=K.queue(this,e,n);K._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&K.dequeue(this,e)})},dequeue:function(e){return this.each(function(){K.dequeue(this,e)})},delay:function(e,t){return e=K.fx?K.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=K.Deferred(),o=this,a=this.length,l=function(){--i||s.resolveWith(o,[o])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";a--;)r=K._data(o[a],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),s.promise(n)}});var vt,yt,_t,bt=/[\t\r\n]/g,xt=/\r/g,wt=/^(?:button|input)$/i,Tt=/^(?:button|input|object|select|textarea)$/i,kt=/^a(?:rea|)$/i,Ct=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Et=K.support.getSetAttribute;K.fn.extend({attr:function(e,t){return K.access(this,K.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){K.removeAttr(this,e)})},prop:function(e,t){return K.access(this,K.prop,e,t,arguments.length>1)},removeProp:function(e){return e=K.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,a;if(K.isFunction(e))return this.each(function(t){K(this).addClass(e.call(this,t,this.className))});if(e&&"string"==typeof e)for(t=e.split(tt),n=0,r=this.length;r>n;n++)if(i=this[n],1===i.nodeType)if(i.className||1!==t.length){for(s=" "+i.className+" ",o=0,a=t.length;a>o;o++)~s.indexOf(" "+t[o]+" ")||(s+=t[o]+" ");i.className=K.trim(s)}else i.className=e;return this},removeClass:function(e){var n,r,i,s,o,a,l;if(K.isFunction(e))return this.each(function(t){K(this).removeClass(e.call(this,t,this.className))});if(e&&"string"==typeof e||e===t)for(n=(e||"").split(tt),a=0,l=this.length;l>a;a++)if(i=this[a],1===i.nodeType&&i.className){for(r=(" "+i.className+" ").replace(bt," "),s=0,o=n.length;o>s;s++)for(;r.indexOf(" "+n[s]+" ")>-1;)r=r.replace(" "+n[s]+" "," ");i.className=e?K.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return K.isFunction(e)?this.each(function(n){K(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var i,s=0,o=K(this),a=t,l=e.split(tt);i=l[s++];)a=r?a:!o.hasClass(i),o[a?"addClass":"removeClass"](i);else("undefined"===n||"boolean"===n)&&(this.className&&K._data(this,"__className__",this.className),this.className=this.className||e===!1?"":K._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(bt," ").indexOf(t)>-1)return!0;return!1},val:function(e){var n,r,i,s=this[0];{if(arguments.length)return i=K.isFunction(e),this.each(function(r){var s,o=K(this);1===this.nodeType&&(s=i?e.call(this,r,o.val()):e,null==s?s="":"number"==typeof s?s+="":K.isArray(s)&&(s=K.map(s,function(e){return null==e?"":e+""})),n=K.valHooks[this.type]||K.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,s,"value")!==t||(this.value=s))});if(s)return n=K.valHooks[s.type]||K.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,"string"==typeof r?r.replace(xt,""):null==r?"":r)}}}),K.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r,i,s=e.selectedIndex,o=[],a=e.options,l="select-one"===e.type;if(0>s)return null;for(n=l?s:0,r=l?s+1:a.length;r>n;n++)if(i=a[n],!(!i.selected||(K.support.optDisabled?i.disabled:null!==i.getAttribute("disabled"))||i.parentNode.disabled&&K.nodeName(i.parentNode,"optgroup"))){if(t=K(i).val(),l)return t;o.push(t)}return l&&!o.length&&a.length?K(a[s]).val():o},set:function(e,t){var n=K.makeArray(t);return K(e).find("option").each(function(){this.selected=K.inArray(K(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,a,l=e.nodeType;if(e&&3!==l&&8!==l&&2!==l)return i&&K.isFunction(K.fn[n])?K(e)[n](r):"undefined"==typeof e.getAttribute?K.prop(e,n,r):(a=1!==l||!K.isXMLDoc(e),a&&(n=n.toLowerCase(),o=K.attrHooks[n]||(Ct.test(n)?yt:vt)),r!==t?null===r?(K.removeAttr(e,n),void 0):o&&"set"in o&&a&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,""+r),r):o&&"get"in o&&a&&null!==(s=o.get(e,n))?s:(s=e.getAttribute(n),null===s?t:s))},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&1===e.nodeType)for(r=t.split(tt);o<r.length;o++)i=r[o],i&&(n=K.propFix[i]||i,s=Ct.test(i),s||K.attr(e,i,""),e.removeAttribute(Et?i:n),s&&n in e&&(e[n]=!1))},attrHooks:{type:{set:function(e,t){if(wt.test(e.nodeName)&&e.parentNode)K.error("type property can't be changed");else if(!K.support.radioValue&&"radio"===t&&K.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return vt&&K.nodeName(e,"button")?vt.get(e,t):t in e?e.value:null},set:function(e,t,n){return vt&&K.nodeName(e,"button")?vt.set(e,t,n):(e.value=t,void 0)}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!K.isXMLDoc(e),o&&(n=K.propFix[n]||n,s=K.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&null!==(i=s.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):Tt.test(e.nodeName)||kt.test(e.nodeName)&&e.href?0:t}}}}),yt={get:function(e,n){var r,i=K.prop(e,n);return i===!0||"boolean"!=typeof i&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?K.removeAttr(e,n):(r=K.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},Et||(_t={name:!0,id:!0,coords:!0},vt=K.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(_t[n]?""!==r.value:r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=B.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},K.each(["width","height"],function(e,t){K.attrHooks[t]=K.extend(K.attrHooks[t],{set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}})}),K.attrHooks.contenteditable={get:vt.get,set:function(e,t,n){""===t&&(t="false"),vt.set(e,t,n)}}),K.support.hrefNormalized||K.each(["href","src","width","height"],function(e,n){K.attrHooks[n]=K.extend(K.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null===r?t:r}})}),K.support.style||(K.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=""+t}}),K.support.optSelected||(K.propHooks.selected=K.extend(K.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),K.support.enctype||(K.propFix.enctype="encoding"),K.support.checkOn||K.each(["radio","checkbox"],function(){K.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value
|
15
|
+
}}}),K.each(["radio","checkbox"],function(){K.valHooks[this]=K.extend(K.valHooks[this],{set:function(e,t){return K.isArray(t)?e.checked=K.inArray(K(e).val(),t)>=0:void 0}})});var Nt=/^(?:textarea|input|select)$/i,St=/^([^\.]*|)(?:\.(.+)|)$/,At=/(?:^|\s)hover(\.\S+|)\b/,jt=/^key/,Dt=/^(?:mouse|contextmenu)|click/,Ot=/^(?:focusinfocus|focusoutblur)$/,Lt=function(e){return K.event.special.hover?e:e.replace(At,"mouseenter$1 mouseleave$1")};K.event={add:function(e,n,r,i,s){var o,a,l,u,c,h,d,f,p,g,m;if(3!==e.nodeType&&8!==e.nodeType&&n&&r&&(o=K._data(e))){for(r.handler&&(p=r,r=p.handler,s=p.selector),r.guid||(r.guid=K.guid++),l=o.events,l||(o.events=l={}),a=o.handle,a||(o.handle=a=function(e){return"undefined"==typeof K||e&&K.event.triggered===e.type?t:K.event.dispatch.apply(a.elem,arguments)},a.elem=e),n=K.trim(Lt(n)).split(" "),u=0;u<n.length;u++)c=St.exec(n[u])||[],h=c[1],d=(c[2]||"").split(".").sort(),m=K.event.special[h]||{},h=(s?m.delegateType:m.bindType)||h,m=K.event.special[h]||{},f=K.extend({type:h,origType:c[1],data:i,handler:r,guid:r.guid,selector:s,namespace:d.join(".")},p),g=l[h],g||(g=l[h]=[],g.delegateCount=0,m.setup&&m.setup.call(e,i,d,a)!==!1||(e.addEventListener?e.addEventListener(h,a,!1):e.attachEvent&&e.attachEvent("on"+h,a))),m.add&&(m.add.call(e,f),f.handler.guid||(f.handler.guid=r.guid)),s?g.splice(g.delegateCount++,0,f):g.push(f),K.event.global[h]=!0;e=null}},global:{},remove:function(e,t,n,r,i){var s,o,a,l,u,c,h,d,f,p,g,m=K.hasData(e)&&K._data(e);if(m&&(d=m.events)){for(t=K.trim(Lt(t||"")).split(" "),s=0;s<t.length;s++)if(o=St.exec(t[s])||[],a=l=o[1],u=o[2],a){for(f=K.event.special[a]||{},a=(r?f.delegateType:f.bindType)||a,p=d[a]||[],c=p.length,u=u?new RegExp("(^|\\.)"+u.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=0;h<p.length;h++)g=p[h],!i&&l!==g.origType||n&&n.guid!==g.guid||u&&!u.test(g.namespace)||r&&r!==g.selector&&("**"!==r||!g.selector)||(p.splice(h--,1),g.selector&&p.delegateCount--,f.remove&&f.remove.call(e,g));0===p.length&&c!==p.length&&(f.teardown&&f.teardown.call(e,u,m.handle)!==!1||K.removeEvent(e,a,m.handle),delete d[a])}else for(a in d)K.event.remove(e,a+t[s],n,r,!0);K.isEmptyObject(d)&&(delete m.handle,K.removeData(e,"events",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,s){if(!i||3!==i.nodeType&&8!==i.nodeType){var o,a,l,u,c,h,d,f,p,g,m=n.type||n,v=[];if(!Ot.test(m+K.event.triggered)&&(m.indexOf("!")>=0&&(m=m.slice(0,-1),a=!0),m.indexOf(".")>=0&&(v=m.split("."),m=v.shift(),v.sort()),i&&!K.event.customEvent[m]||K.event.global[m]))if(n="object"==typeof n?n[K.expando]?n:new K.Event(m,n):new K.Event(m),n.type=m,n.isTrigger=!0,n.exclusive=a,n.namespace=v.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=m.indexOf(":")<0?"on"+m:"",i){if(n.result=t,n.target||(n.target=i),r=null!=r?K.makeArray(r):[],r.unshift(n),d=K.event.special[m]||{},!d.trigger||d.trigger.apply(i,r)!==!1){if(p=[[i,d.bindType||m]],!s&&!d.noBubble&&!K.isWindow(i)){for(g=d.delegateType||m,u=Ot.test(g+m)?i:i.parentNode,c=i;u;u=u.parentNode)p.push([u,g]),c=u;c===(i.ownerDocument||B)&&p.push([c.defaultView||c.parentWindow||e,g])}for(l=0;l<p.length&&!n.isPropagationStopped();l++)u=p[l][0],n.type=p[l][1],f=(K._data(u,"events")||{})[n.type]&&K._data(u,"handle"),f&&f.apply(u,r),f=h&&u[h],f&&K.acceptData(u)&&f.apply(u,r)===!1&&n.preventDefault();return n.type=m,s||n.isDefaultPrevented()||d._default&&d._default.apply(i.ownerDocument,r)!==!1||"click"===m&&K.nodeName(i,"a")||!K.acceptData(i)||h&&i[m]&&("focus"!==m&&"blur"!==m||0!==n.target.offsetWidth)&&!K.isWindow(i)&&(c=i[h],c&&(i[h]=null),K.event.triggered=m,i[m](),K.event.triggered=t,c&&(i[h]=c)),n.result}}else{o=K.cache;for(l in o)o[l].events&&o[l].events[m]&&K.event.trigger(n,r,o[l].handle.elem,!0)}}},dispatch:function(n){n=K.event.fix(n||e.event);var r,i,s,o,a,l,u,c,h,d=(K._data(this,"events")||{})[n.type]||[],f=d.delegateCount,p=[].slice.call(arguments),g=!n.exclusive&&!n.namespace,m=K.event.special[n.type]||{},v=[];if(p[0]=n,n.delegateTarget=this,!m.preDispatch||m.preDispatch.call(this,n)!==!1){if(f&&(!n.button||"click"!==n.type))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||"click"!==n.type){for(a={},u=[],r=0;f>r;r++)c=d[r],h=c.selector,a[h]===t&&(a[h]=K(h,this).index(s)>=0),a[h]&&u.push(c);u.length&&v.push({elem:s,matches:u})}for(d.length>f&&v.push({elem:this,matches:d.slice(f)}),r=0;r<v.length&&!n.isPropagationStopped();r++)for(l=v[r],n.currentTarget=l.elem,i=0;i<l.matches.length&&!n.isImmediatePropagationStopped();i++)c=l.matches[i],(g||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))&&(n.data=c.data,n.handleObj=c,o=((K.event.special[c.origType]||{}).handle||c.handler).apply(l.elem,p),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation())));return m.postDispatch&&m.postDispatch.call(this,n),n.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,s,o=n.button,a=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||B,i=r.documentElement,s=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),e.which||o===t||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[K.expando])return e;var t,n,r=e,i=K.event.fixHooks[e.type]||{},s=i.props?this.props.concat(i.props):this.props;for(e=K.Event(r),t=s.length;t;)n=s[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||B),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){K.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=K.extend(new K.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?K.event.trigger(i,null,t):K.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},K.event.handle=K.event.dispatch,K.removeEvent=B.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&("undefined"==typeof e[r]&&(e[r]=null),e.detachEvent(r,n))},K.Event=function(e,t){return this instanceof K.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?o:s):this.type=e,t&&K.extend(this,t),this.timeStamp=e&&e.timeStamp||K.now(),this[K.expando]=!0,void 0):new K.Event(e,t)},K.Event.prototype={preventDefault:function(){this.isDefaultPrevented=o;var e=this.originalEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=o;var e=this.originalEvent;e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=o,this.stopPropagation()},isDefaultPrevented:s,isPropagationStopped:s,isImmediatePropagationStopped:s},K.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){K.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;return s.selector,(!i||i!==r&&!K.contains(r,i))&&(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}}),K.support.submitBubbles||(K.event.special.submit={setup:function(){return K.nodeName(this,"form")?!1:(K.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=K.nodeName(n,"input")||K.nodeName(n,"button")?n.form:t;r&&!K._data(r,"_submit_attached")&&(K.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),K._data(r,"_submit_attached",!0))}),void 0)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&K.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return K.nodeName(this,"form")?!1:(K.event.remove(this,"._submit"),void 0)}}),K.support.changeBubbles||(K.event.special.change={setup:function(){return Nt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(K.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),K.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),K.event.simulate("change",this,e,!0)})),!1):(K.event.add(this,"beforeactivate._change",function(e){var t=e.target;Nt.test(t.nodeName)&&!K._data(t,"_change_attached")&&(K.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||K.event.simulate("change",this.parentNode,e,!0)}),K._data(t,"_change_attached",!0))}),void 0)},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return K.event.remove(this,"._change"),!Nt.test(this.nodeName)}}),K.support.focusinBubbles||K.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){K.event.simulate(t,e.target,K.event.fix(e),!0)};K.event.special[t]={setup:function(){0===n++&&B.addEventListener(e,r,!0)},teardown:function(){0===--n&&B.removeEventListener(e,r,!0)}}}),K.fn.extend({on:function(e,n,r,i,o){var a,l;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(l in e)this.on(l,n,r,e[l],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=s;else if(!i)return this;return 1===o&&(a=i,i=function(e){return K().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=K.guid++)),this.each(function(){K.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,K(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=s),this.each(function(){K.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return K(this.context).on(e,this.selector,t,n),this},die:function(e,t){return K(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1==arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){K.event.trigger(e,t,this)})},triggerHandler:function(e,t){return this[0]?K.event.trigger(e,t,this[0],!0):void 0},toggle:function(e){var t=arguments,n=e.guid||K.guid++,r=0,i=function(n){var i=(K._data(this,"lastToggle"+e.guid)||0)%r;return K._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};for(i.guid=n;r<t.length;)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),K.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){K.fn[t]=function(e,n){return null==n&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},jt.test(t)&&(K.event.fixHooks[t]=K.event.keyHooks),Dt.test(t)&&(K.event.fixHooks[t]=K.event.mouseHooks)}),/*!
|
16
|
+
* Sizzle CSS Selector Engine
|
17
|
+
* Copyright 2012 jQuery Foundation and other contributors
|
18
|
+
* Released under the MIT license
|
19
|
+
* http://sizzlejs.com/
|
20
|
+
*/
|
21
|
+
function(e,t){function n(e,t,n,r){n=n||[],t=t||S;var i,s,o,a,l=t.nodeType;if(1!==l&&9!==l)return[];if(!e||"string"!=typeof e)return n;if(o=b(t),!o&&!r&&(i=Y.exec(e)))if(a=i[1]){if(9===l){if(s=t.getElementById(a),!s||!s.parentNode)return n;if(s.id===a)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&x(t,s)&&s.id===a)return n.push(s),n}else{if(i[2])return O.apply(n,D.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&at&&t.getElementsByClassName)return O.apply(n,D.call(t.getElementsByClassName(a),0)),n}return p(e,t,n,r,o)}function r(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function i(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function s(e,t,n){if(e===t)return n;for(var r=e.nextSibling;r;){if(r===t)return-1;r=r.nextSibling}return 1}function o(e,t,r,i){var s,o,a,l,u,c,h,d,f,p,g=!r&&t!==S,m=(g?"<s>":"")+e.replace(X,"$1<s>"),v=H[N][m];if(v)return i?0:D.call(v,0);for(u=e,c=[],d=0,f=y.preFilter,p=y.filter;u;){(!s||(o=U.exec(u)))&&(o&&(u=u.slice(o[0].length),a.selector=h),c.push(a=[]),h="",g&&(u=" "+u)),s=!1,(o=V.exec(u))&&(h+=o[0],u=u.slice(o[0].length),s=a.push({part:o.pop().replace(X," "),string:o[0],captures:o}));for(l in p)!(o=nt[l].exec(u))||f[l]&&!(o=f[l](o,t,r))||(h+=o[0],u=u.slice(o[0].length),s=a.push({part:l,string:o.shift(),captures:o}));if(!s)break}return h&&(a.selector=h),i?u.length:u?n.error(e):D.call(H(m,c),0)}function a(e,t,n,r){var i=t.dir,s=j++;return e||(e=function(e){return e===n}),t.first?function(t){for(;t=t[i];)if(1===t.nodeType)return e(t)&&t}:r?function(t){for(;t=t[i];)if(1===t.nodeType&&e(t))return t}:function(t){for(var n,r=s+"."+g,o=r+"."+m;t=t[i];)if(1===t.nodeType){if((n=t[N])===o)return t.sizset;if("string"==typeof n&&0===n.indexOf(r)){if(t.sizset)return t}else{if(t[N]=o,e(t))return t.sizset=!0,t;t.sizset=!1}}}}function l(e,t){return e?function(n){var r=t(n);return r&&e(r===!0?n:r)}:t}function u(e,t,n){for(var r,i,s=0;r=e[s];s++)i=y.relative[r.part]?a(i,y.relative[r.part],t,n):l(i,y.filter[r.part].apply(null,r.captures.concat(t,n)));return i}function c(e){return function(t){for(var n,r=0;n=e[r];r++)if(n(t))return!0;return!1}}function h(e,t,r,i){for(var s=0,o=t.length;o>s;s++)n(e,t[s],r,i)}function d(e,t,r,i,s,o){var a,l=y.setFilters[t.toLowerCase()];return l||n.error(t),(e||!(a=s))&&h(e||"*",i,a=[],s),a.length>0?l(a,r,o):[]}function f(e,r,i,s){for(var o,a,l,u,c,f,p,g,m,v,y,_,b,x=0,w=e.length,T=nt.POS,k=new RegExp("^"+T.source+"(?!"+z+")","i"),C=function(){for(var e=1,n=arguments.length-2;n>e;e++)arguments[e]===t&&(m[e]=t)};w>x;x++){for(o=e[x],a="",g=s,l=0,u=o.length;u>l;l++){if(c=o[l],f=c.string,"PSEUDO"===c.part)for(T.exec(""),p=0;m=T.exec(f);)v=!0,y=T.lastIndex=m.index+m[0].length,y>p&&(a+=f.slice(p,m.index),p=y,_=[r],V.test(a)&&(g&&(_=g),g=s),(b=Q.test(a))&&(a=a.slice(0,-5).replace(V,"$&*"),p++),m.length>1&&m[0].replace(k,C),g=d(a,m[1],m[2],_,g,b)),a="";v||(a+=f),v=!1}a?V.test(a)?h(a,g||[r],i,s):n(a,r,i,s?s.concat(g):g):O.apply(i,g)}return 1===w?i:n.uniqueSort(i)}function p(e,t,n,r,i){e=e.replace(X,"$1");var s,a,l,u,c,h,d,p,v,_=o(e,t,i),b=t.nodeType;if(nt.POS.test(e))return f(_,t,n,r);if(r)s=D.call(r,0);else if(1===_.length){if((c=D.call(_[0],0)).length>2&&"ID"===(h=c[0]).part&&9===b&&!i&&y.relative[c[1].part]){if(t=y.find.ID(h.captures[0].replace(tt,""),t,i)[0],!t)return n;e=e.slice(c.shift().string.length)}for(p=(_=G.exec(c[0].string))&&!_.index&&t.parentNode||t,d="",u=c.length-1;u>=0&&(h=c[u],v=h.part,d=h.string+d,!y.relative[v]);u--)if(y.order.test(v)){if(s=y.find[v](h.captures[0].replace(tt,""),p,i),null==s)continue;e=e.slice(0,e.length-d.length)+d.replace(nt[v],""),e||O.apply(n,D.call(s,0));break}}if(e)for(a=w(e,t,i),g=a.dirruns++,null==s&&(s=y.find.TAG("*",G.test(e)&&t.parentNode||t)),u=0;l=s[u];u++)m=a.runs++,a(l)&&n.push(l);return n}var g,m,v,y,_,b,x,w,T,k,C=!0,E="undefined",N=("sizcache"+Math.random()).replace(".",""),S=e.document,A=S.documentElement,j=0,D=[].slice,O=[].push,L=function(e,t){return e[N]=t||!0,e},F=function(){var e={},t=[];return L(function(n,r){return t.push(n)>y.cacheLength&&delete e[t.shift()],e[n]=r},e)},M=F(),H=F(),q=F(),z="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",P=R.replace("w","w#"),B="([*^$|!~]?=)",I="\\["+z+"*("+R+")"+z+"*(?:"+B+z+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+P+")|)|)"+z+"*\\]",W=":("+R+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",$=":(nth|eq|gt|lt|first|last|even|odd)(?:\\(((?:-\\d)?\\d*)\\)|)(?=[^-]|$)",X=new RegExp("^"+z+"+|((?:^|[^\\\\])(?:\\\\.)*)"+z+"+$","g"),U=new RegExp("^"+z+"*,"+z+"*"),V=new RegExp("^"+z+"*([\\x20\\t\\r\\n\\f>+~])"+z+"*"),J=new RegExp(W),Y=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,Q=/:not\($/,Z=/h\d/i,et=/input|select|textarea|button/i,tt=/\\(?!\\)/g,nt={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),NAME:new RegExp("^\\[name=['\"]?("+R+")['\"]?\\]"),TAG:new RegExp("^("+R.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+z+"*(even|odd|(([+-]|)(\\d*)n|)"+z+"*(?:([+-]|)"+z+"*(\\d+)|))"+z+"*\\)|)","i"),POS:new RegExp($,"ig"),needsContext:new RegExp("^"+z+"*[>+~]|"+$,"i")},rt=function(e){var t=S.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},it=rt(function(e){return e.appendChild(S.createComment("")),!e.getElementsByTagName("*").length}),st=rt(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==E&&"#"===e.firstChild.getAttribute("href")}),ot=rt(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),at=rt(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),lt=rt(function(e){e.id=N+0,e.innerHTML="<a name='"+N+"'></a><div name='"+N+"'></div>",A.insertBefore(e,A.firstChild);var t=S.getElementsByName&&S.getElementsByName(N).length===2+S.getElementsByName(N+0).length;return v=!S.getElementById(N),A.removeChild(e),t});try{D.call(A.childNodes,0)[0].nodeType}catch(ut){D=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){return n(t,null,null,[e]).length>0},_=n.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=_(t);return n},b=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},x=n.contains=A.contains?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&1===r.nodeType&&n.contains&&n.contains(r))}:A.compareDocumentPosition?function(e,t){return t&&!!(16&e.compareDocumentPosition(t))}:function(e,t){for(;t=t.parentNode;)if(t===e)return!0;return!1},n.attr=function(e,t){var n,r=b(e);return r||(t=t.toLowerCase()),y.attrHandle[t]?y.attrHandle[t](e):ot||r?e.getAttribute(t):(n=e.getAttributeNode(t),n?"boolean"==typeof e[t]?e[t]?t:null:n.specified?n.value:null:null)},y=n.selectors={cacheLength:50,createPseudo:L,match:nt,order:new RegExp("ID|TAG"+(lt?"|NAME":"")+(at?"|CLASS":"")),attrHandle:st?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:v?function(e,t,n){if(typeof t.getElementById!==E&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==E&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==E&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:it?function(e,t){return typeof t.getElementsByTagName!==E?t.getElementsByTagName(e):void 0}:function(e,t){var n=t.getElementsByTagName(e);if("*"===e){for(var r,i=[],s=0;r=n[s];s++)1===r.nodeType&&i.push(r);return i}return n},NAME:function(e,t){return typeof t.getElementsByName!==E?t.getElementsByName(name):void 0},CLASS:function(e,t,n){return typeof t.getElementsByClassName===E||n?void 0:t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(tt,""),e[3]=(e[4]||e[5]||"").replace(tt,""),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1]?(e[2]||n.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*("even"===e[2]||"odd"===e[2])),e[4]=+(e[6]+e[7]||"odd"===e[2])):e[2]&&n.error(e[0]),e},PSEUDO:function(e,t,n){var r,i;return nt.CHILD.test(e[0])?null:(e[3]?e[2]=e[3]:(r=e[4])&&(J.test(r)&&(i=o(r,t,n,!0))&&(i=r.indexOf(")",r.length-i)-r.length)&&(r=r.slice(0,i),e[0]=e[0].slice(0,i)),e[2]=r),e.slice(0,3))}},filter:{ID:v?function(e){return e=e.replace(tt,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace(tt,""),function(t){var n=typeof t.getAttributeNode!==E&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(tt,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=M[N][e];return t||(t=M(e,new RegExp("(^|"+z+")"+e+"("+z+"|$)"))),function(e){return t.test(e.className||typeof e.getAttribute!==E&&e.getAttribute("class")||"")}},ATTR:function(e,t,r){return t?function(i){var s=n.attr(i,e),o=s+"";if(null==s)return"!="===t;switch(t){case"=":return o===r;case"!=":return o!==r;case"^=":return r&&0===o.indexOf(r);case"*=":return r&&o.indexOf(r)>-1;case"$=":return r&&o.substr(o.length-r.length)===r;case"~=":return(" "+o+" ").indexOf(r)>-1;case"|=":return o===r||o.substr(0,r.length+1)===r+"-"}}:function(t){return null!=n.attr(t,e)}},CHILD:function(e,t,n,r){if("nth"===e){var i=j++;return function(e){var t,s,o=0,a=e;if(1===n&&0===r)return!0;if(t=e.parentNode,t&&(t[N]!==i||!e.sizset)){for(a=t.firstChild;a&&(1!==a.nodeType||(a.sizset=++o,a!==e));a=a.nextSibling);t[N]=i}return s=e.sizset-r,0===n?0===s:0===s%n&&s/n>=0}}return function(t){var n=t;switch(e){case"only":case"first":for(;n=n.previousSibling;)if(1===n.nodeType)return!1;if("first"===e)return!0;n=t;case"last":for(;n=n.nextSibling;)if(1===n.nodeType)return!1;return!0}}},PSEUDO:function(e,t,r,i){var s,o=y.pseudos[e]||y.pseudos[e.toLowerCase()];return o||n.error("unsupported pseudo: "+e),o[N]?o(t,r,i):o.length>1?(s=[e,e,"",t],function(e){return o(e,0,s)}):o}},pseudos:{not:L(function(e,t,n){var r=w(e.replace(X,"$1"),t,n);return function(e){return!r(e)}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!y.pseudos.empty(e)},empty:function(e){var t;for(e=e.firstChild;e;){if(e.nodeName>"@"||3===(t=e.nodeType)||4===t)return!1;e=e.nextSibling}return!0},contains:L(function(e){return function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),has:L(function(e){return function(t){return n(e,t).length>0}}),header:function(e){return Z.test(e.nodeName)},text:function(e){var t,n;return"input"===e.nodeName.toLowerCase()&&"text"===(t=e.type)&&(null==(n=e.getAttribute("type"))||n.toLowerCase()===t)},radio:r("radio"),checkbox:r("checkbox"),file:r("file"),password:r("password"),image:r("image"),submit:i("submit"),reset:i("reset"),button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return et.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return!(e!==t.activeElement||t.hasFocus&&!t.hasFocus()||!e.type&&!e.href)},active:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t,n){return n?e.slice(1):[e[0]]},last:function(e,t,n){var r=e.pop();return n?e:[r]},even:function(e,t,n){for(var r=[],i=n?1:0,s=e.length;s>i;i+=2)r.push(e[i]);return r},odd:function(e,t,n){for(var r=[],i=n?0:1,s=e.length;s>i;i+=2)r.push(e[i]);return r},lt:function(e,t,n){return n?e.slice(+t):e.slice(0,+t)},gt:function(e,t,n){return n?e.slice(0,+t+1):e.slice(+t+1)},eq:function(e,t,n){var r=e.splice(+t,1);return n?e:r}}},T=A.compareDocumentPosition?function(e,t){return e===t?(k=!0,0):(e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t):e.compareDocumentPosition)?-1:1}:function(e,t){if(e===t)return k=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],o=[],a=e.parentNode,l=t.parentNode,u=a;if(a===l)return s(e,t);if(!a)return-1;if(!l)return 1;for(;u;)i.unshift(u),u=u.parentNode;for(u=l;u;)o.unshift(u),u=u.parentNode;n=i.length,r=o.length;for(var c=0;n>c&&r>c;c++)if(i[c]!==o[c])return s(i[c],o[c]);return c===n?s(e,o[c],-1):s(i[c],t,1)},[0,0].sort(T),C=!k,n.uniqueSort=function(e){var t,n=1;if(k=C,e.sort(T),k)for(;t=e[n];n++)t===e[n-1]&&e.splice(n--,1);return e},n.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},w=n.compile=function(e,t,n){var r,i,s,a=q[N][e];if(a&&a.context===t)return a;for(r=o(e,t,n),i=0,s=r.length;s>i;i++)r[i]=u(r[i],t,n);return a=q(e,c(r)),a.context=t,a.runs=a.dirruns=0,a},S.querySelectorAll&&!function(){var e,t=p,r=/'|\\/g,i=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,s=[],a=[":active"],l=A.matchesSelector||A.mozMatchesSelector||A.webkitMatchesSelector||A.oMatchesSelector||A.msMatchesSelector;rt(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||s.push("\\["+z+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||s.push(":checked")}),rt(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&s.push("[*^$]="+z+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||s.push(":enabled",":disabled")}),s=s.length&&new RegExp(s.join("|")),p=function(e,n,i,a,l){if(!(a||l||s&&s.test(e)))if(9===n.nodeType)try{return O.apply(i,D.call(n.querySelectorAll(e),0)),i}catch(u){}else if(1===n.nodeType&&"object"!==n.nodeName.toLowerCase()){var c,h,d,f=n.getAttribute("id"),p=f||N,g=G.test(e)&&n.parentNode||n;for(f?p=p.replace(r,"\\$&"):n.setAttribute("id",p),c=o(e,n,l),p="[id='"+p+"']",h=0,d=c.length;d>h;h++)c[h]=p+c[h].selector;try{return O.apply(i,D.call(g.querySelectorAll(c.join(",")),0)),i}catch(u){}finally{f||n.removeAttribute("id")}}return t(e,n,i,a,l)},l&&(rt(function(t){e=l.call(t,"div");try{l.call(t,"[test!='']:sizzle"),a.push(nt.PSEUDO.source,nt.POS.source,"!=")}catch(n){}}),a=new RegExp(a.join("|")),n.matchesSelector=function(t,r){if(r=r.replace(i,"='$1']"),!(b(t)||a.test(r)||s&&s.test(r)))try{var o=l.call(t,r);if(o||e||t.document&&11!==t.document.nodeType)return o}catch(u){}return n(r,null,null,[t]).length>0})}(),y.setFilters.nth=y.setFilters.eq,y.filters=y.pseudos,n.attr=K.attr,K.find=n,K.expr=n.selectors,K.expr[":"]=K.expr.pseudos,K.unique=n.uniqueSort,K.text=n.getText,K.isXMLDoc=n.isXML,K.contains=n.contains}(e);var Ft=/Until$/,Mt=/^(?:parents|prev(?:Until|All))/,Ht=/^.[^:#\[\.,]*$/,qt=K.expr.match.needsContext,zt={children:!0,contents:!0,next:!0,prev:!0};K.fn.extend({find:function(e){var t,n,r,i,s,o,a=this;if("string"!=typeof e)return K(e).filter(function(){for(t=0,n=a.length;n>t;t++)if(K.contains(a[t],this))return!0});for(o=this.pushStack("","find",e),t=0,n=this.length;n>t;t++)if(r=o.length,K.find(e,this[t],o),t>0)for(i=r;i<o.length;i++)for(s=0;r>s;s++)if(o[s]===o[i]){o.splice(i--,1);break}return o},has:function(e){var t,n=K(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(K.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(u(this,e,!1),"not",e)},filter:function(e){return this.pushStack(u(this,e,!0),"filter",e)},is:function(e){return!!e&&("string"==typeof e?qt.test(e)?K(e,this.context).index(this[0])>=0:K.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,s=[],o=qt.test(e)||"string"!=typeof e?K(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(o?o.index(n)>-1:K.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}return s=s.length>1?K.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?"string"==typeof e?K.inArray(this[0],K(e)):K.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n="string"==typeof e?K(e,t):K.makeArray(e&&e.nodeType?[e]:e),r=K.merge(this.get(),n);return this.pushStack(a(n[0])||a(r[0])?r:K.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),K.fn.andSelf=K.fn.addBack,K.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return K.dir(e,"parentNode")},parentsUntil:function(e,t,n){return K.dir(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return K.dir(e,"nextSibling")},prevAll:function(e){return K.dir(e,"previousSibling")},nextUntil:function(e,t,n){return K.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return K.dir(e,"previousSibling",n)},siblings:function(e){return K.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return K.sibling(e.firstChild)},contents:function(e){return K.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:K.merge([],e.childNodes)}},function(e,t){K.fn[e]=function(n,r){var i=K.map(this,t,n);return Ft.test(e)||(r=n),r&&"string"==typeof r&&(i=K.filter(r,i)),i=this.length>1&&!zt[e]?K.unique(i):i,this.length>1&&Mt.test(e)&&(i=i.reverse()),this.pushStack(i,e,V.call(arguments).join(","))}}),K.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?K.find.matchesSelector(t[0],e)?[t[0]]:[]:K.find.matches(e,t)},dir:function(e,n,r){for(var i=[],s=e[n];s&&9!==s.nodeType&&(r===t||1!==s.nodeType||!K(s).is(r));)1===s.nodeType&&i.push(s),s=s[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var Rt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Pt=/ jQuery\d+="(?:null|\d+)"/g,Bt=/^\s+/,It=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Wt=/<([\w:]+)/,$t=/<tbody/i,Xt=/<|&#?\w+;/,Ut=/<(?:script|style|link)/i,Vt=/<(?:script|object|embed|option|style)/i,Jt=new RegExp("<(?:"+Rt+")[\\s/>]","i"),Yt=/^(?:checkbox|radio)$/,Gt=/checked\s*(?:[^=]|=\s*.checked.)/i,Qt=/\/(java|ecma)script/i,Kt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Zt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},en=c(B),tn=en.appendChild(B.createElement("div"));Zt.optgroup=Zt.option,Zt.tbody=Zt.tfoot=Zt.colgroup=Zt.caption=Zt.thead,Zt.th=Zt.td,K.support.htmlSerialize||(Zt._default=[1,"X<div>","</div>"]),K.fn.extend({text:function(e){return K.access(this,function(e){return e===t?K.text(this):this.empty().append((this[0]&&this[0].ownerDocument||B).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(K.isFunction(e))return this.each(function(t){K(this).wrapAll(e.call(this,t))});if(this[0]){var t=K(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return K.isFunction(e)?this.each(function(t){K(this).wrapInner(e.call(this,t))}):this.each(function(){var t=K(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=K.isFunction(e);return this.each(function(n){K(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){K.nodeName(this,"body")||K(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!a(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=K.clean(arguments);return this.pushStack(K.merge(e,this),"before",this.selector)}},after:function(){if(!a(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=K.clean(arguments);return this.pushStack(K.merge(this,e),"after",this.selector)}},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||K.filter(e,[n]).length)&&(t||1!==n.nodeType||(K.cleanData(n.getElementsByTagName("*")),K.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&K.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return K.clone(this,e,t)})},html:function(e){return K.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Pt,""):t;if(!("string"!=typeof e||Ut.test(e)||!K.support.htmlSerialize&&Jt.test(e)||!K.support.leadingWhitespace&&Bt.test(e)||Zt[(Wt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(It,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(K.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return a(this[0])?this.length?this.pushStack(K(K.isFunction(e)?e():e),"replaceWith",e):this:K.isFunction(e)?this.each(function(t){var n=K(this),r=n.html();n.replaceWith(e.call(this,t,r))}):("string"!=typeof e&&(e=K(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;K(this).remove(),t?K(t).before(e):K(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,a,l=0,u=e[0],c=[],d=this.length;if(!K.support.checkClone&&d>1&&"string"==typeof u&&Gt.test(u))return this.each(function(){K(this).domManip(e,n,r)});if(K.isFunction(u))return this.each(function(i){var s=K(this);e[0]=u.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){if(i=K.buildFragment(e,this,c),o=i.fragment,s=o.firstChild,1===o.childNodes.length&&(o=s),s)for(n=n&&K.nodeName(s,"tr"),a=i.cacheable||d-1;d>l;l++)r.call(n&&K.nodeName(this[l],"table")?h(this[l],"tbody"):this[l],l===a?o:K.clone(o,!0,!0));o=s=null,c.length&&K.each(c,function(e,t){t.src?K.ajax?K.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):K.error("no ajax"):K.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Kt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),K.buildFragment=function(e,n,r){var i,s,o,a=e[0];return n=n||B,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,!(1===e.length&&"string"==typeof a&&a.length<512&&n===B&&"<"===a.charAt(0))||Vt.test(a)||!K.support.checkClone&&Gt.test(a)||!K.support.html5Clone&&Jt.test(a)||(s=!0,i=K.fragments[a],o=i!==t),i||(i=n.createDocumentFragment(),K.clean(e,n,i,r),s&&(K.fragments[a]=o&&i)),{fragment:i,cacheable:s}},K.fragments={},K.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){K.fn[e]=function(n){var r,i=0,s=[],o=K(n),a=o.length,l=1===this.length&&this[0].parentNode;if((null==l||l&&11===l.nodeType&&1===l.childNodes.length)&&1===a)return o[t](this[0]),this;for(;a>i;i++)r=(i>0?this.clone(!0):this).get(),K(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),K.extend({clone:function(e,t,n){var r,i,s,o;if(K.support.html5Clone||K.isXMLDoc(e)||!Jt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(tn.innerHTML=e.outerHTML,tn.removeChild(o=tn.firstChild)),!(K.support.noCloneEvent&&K.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||K.isXMLDoc(e)))for(f(e,o),r=p(e),i=p(o),s=0;r[s];++s)i[s]&&f(r[s],i[s]);if(t&&(d(e,o),n))for(r=p(e),i=p(o),s=0;r[s];++s)d(r[s],i[s]);return r=i=null,o},clean:function(e,t,n,r){var i,s,o,a,l,u,h,d,f,p,m,v=t===B&&en,y=[];for(t&&"undefined"!=typeof t.createDocumentFragment||(t=B),i=0;null!=(o=e[i]);i++)if("number"==typeof o&&(o+=""),o){if("string"==typeof o)if(Xt.test(o)){for(v=v||c(t),h=t.createElement("div"),v.appendChild(h),o=o.replace(It,"<$1></$2>"),a=(Wt.exec(o)||["",""])[1].toLowerCase(),l=Zt[a]||Zt._default,u=l[0],h.innerHTML=l[1]+o+l[2];u--;)h=h.lastChild;if(!K.support.tbody)for(d=$t.test(o),f="table"!==a||d?"<table>"!==l[1]||d?[]:h.childNodes:h.firstChild&&h.firstChild.childNodes,s=f.length-1;s>=0;--s)K.nodeName(f[s],"tbody")&&!f[s].childNodes.length&&f[s].parentNode.removeChild(f[s]);!K.support.leadingWhitespace&&Bt.test(o)&&h.insertBefore(t.createTextNode(Bt.exec(o)[0]),h.firstChild),o=h.childNodes,h.parentNode.removeChild(h)}else o=t.createTextNode(o);o.nodeType?y.push(o):K.merge(y,o)}if(h&&(o=h=v=null),!K.support.appendChecked)for(i=0;null!=(o=y[i]);i++)K.nodeName(o,"input")?g(o):"undefined"!=typeof o.getElementsByTagName&&K.grep(o.getElementsByTagName("input"),g);if(n)for(p=function(e){return!e.type||Qt.test(e.type)?r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e):void 0},i=0;null!=(o=y[i]);i++)K.nodeName(o,"script")&&p(o)||(n.appendChild(o),"undefined"!=typeof o.getElementsByTagName&&(m=K.grep(K.merge([],o.getElementsByTagName("script")),p),y.splice.apply(y,[i+1,0].concat(m)),i+=m.length));return y},cleanData:function(e,t){for(var n,r,i,s,o=0,a=K.expando,l=K.cache,u=K.support.deleteExpando,c=K.event.special;null!=(i=e[o]);o++)if((t||K.acceptData(i))&&(r=i[a],n=r&&l[r])){if(n.events)for(s in n.events)c[s]?K.event.remove(i,s):K.removeEvent(i,s,n.handle);l[r]&&(delete l[r],u?delete i[a]:i.removeAttribute?i.removeAttribute(a):i[a]=null,K.deletedIds.push(r))}}}),function(){var e,t;K.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=K.uaMatch(W.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),K.browser=t,K.sub=function(){function e(t,n){return new e.fn.init(t,n)}K.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,r){return r&&r instanceof K&&!(r instanceof e)&&(r=e(r)),K.fn.init.call(this,n,r,t)},e.fn.init.prototype=e.fn;var t=e(B);return e}}();var nn,rn,sn,on=/alpha\([^)]*\)/i,an=/opacity=([^)]*)/,ln=/^(top|right|bottom|left)$/,un=/^(none|table(?!-c[ea]).+)/,cn=/^margin/,hn=new RegExp("^("+Z+")(.*)$","i"),dn=new RegExp("^("+Z+")(?!px)[a-z%]+$","i"),fn=new RegExp("^([-+])=("+Z+")","i"),pn={},gn={position:"absolute",visibility:"hidden",display:"block"},mn={letterSpacing:0,fontWeight:400},vn=["Top","Right","Bottom","Left"],yn=["Webkit","O","Moz","ms"],_n=K.fn.toggle;K.fn.extend({css:function(e,n){return K.access(this,function(e,n,r){return r!==t?K.style(e,n,r):K.css(e,n)},e,n,arguments.length>1)},show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(e,t){var n="boolean"==typeof e;return K.isFunction(e)&&K.isFunction(t)?_n.apply(this,arguments):this.each(function(){(n?e:v(this))?K(this).show():K(this).hide()})}}),K.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=nn(e,"opacity");return""===n?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":K.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,a,l=K.camelCase(n),u=e.style;if(n=K.cssProps[l]||(K.cssProps[l]=m(u,l)),a=K.cssHooks[n]||K.cssHooks[l],r===t)return a&&"get"in a&&(s=a.get(e,!1,i))!==t?s:u[n];if(o=typeof r,"string"===o&&(s=fn.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(K.css(e,n)),o="number"),!(null==r||"number"===o&&isNaN(r)||("number"!==o||K.cssNumber[l]||(r+="px"),a&&"set"in a&&(r=a.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var s,o,a,l=K.camelCase(n);return n=K.cssProps[l]||(K.cssProps[l]=m(e.style,l)),a=K.cssHooks[n]||K.cssHooks[l],a&&"get"in a&&(s=a.get(e,!0,i)),s===t&&(s=nn(e,n)),"normal"===s&&n in mn&&(s=mn[n]),r||i!==t?(o=parseFloat(s),r||K.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?nn=function(t,n){var r,i,s,o,a=e.getComputedStyle(t,null),l=t.style;return a&&(r=a[n],""!==r||K.contains(t.ownerDocument,t)||(r=K.style(t,n)),dn.test(r)&&cn.test(n)&&(i=l.width,s=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=r,r=a.width,l.width=i,l.minWidth=s,l.maxWidth=o)),r}:B.documentElement.currentStyle&&(nn=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return null==i&&s&&s[t]&&(i=s[t]),dn.test(i)&&!ln.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left="fontSize"===t?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),""===i?"auto":i}),K.each(["height","width"],function(e,t){K.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&un.test(nn(e,"display"))?K.swap(e,gn,function(){return x(e,t,r)}):x(e,t,r):void 0},set:function(e,n,r){return _(e,n,r?b(e,t,r,K.support.boxSizing&&"border-box"===K.css(e,"boxSizing")):0)}}}),K.support.opacity||(K.cssHooks.opacity={get:function(e,t){return an.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=K.isNumeric(t)?"alpha(opacity="+100*t+")":"",s=r&&r.filter||n.filter||"";n.zoom=1,t>=1&&""===K.trim(s.replace(on,""))&&n.removeAttribute&&(n.removeAttribute("filter"),r&&!r.filter)||(n.filter=on.test(s)?s.replace(on,i):s+" "+i)}}),K(function(){K.support.reliableMarginRight||(K.cssHooks.marginRight={get:function(e,t){return K.swap(e,{display:"inline-block"},function(){return t?nn(e,"marginRight"):void 0})}}),!K.support.pixelPosition&&K.fn.position&&K.each(["top","left"],function(e,t){K.cssHooks[t]={get:function(e,n){if(n){var r=nn(e,t);return dn.test(r)?K(e).position()[t]+"px":r}}}})}),K.expr&&K.expr.filters&&(K.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!K.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||nn(e,"display"))},K.expr.filters.visible=function(e){return!K.expr.filters.hidden(e)}),K.each({margin:"",padding:"",border:"Width"},function(e,t){K.cssHooks[e+t]={expand:function(n){var r,i="string"==typeof n?n.split(" "):[n],s={};for(r=0;4>r;r++)s[e+vn[r]+t]=i[r]||i[r-2]||i[0];return s}},cn.test(e)||(K.cssHooks[e+t].set=_)});var bn=/%20/g,xn=/\[\]$/,wn=/\r?\n/g,Tn=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,kn=/^(?:select|textarea)/i;K.fn.extend({serialize:function(){return K.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?K.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||kn.test(this.nodeName)||Tn.test(this.type))}).map(function(e,t){var n=K(this).val();return null==n?null:K.isArray(n)?K.map(n,function(e){return{name:t.name,value:e.replace(wn,"\r\n")}}):{name:t.name,value:n.replace(wn,"\r\n")}}).get()}}),K.param=function(e,n){var r,i=[],s=function(e,t){t=K.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=K.ajaxSettings&&K.ajaxSettings.traditional),K.isArray(e)||e.jquery&&!K.isPlainObject(e))K.each(e,function(){s(this.name,this.value)});else for(r in e)T(r,e[r],n,s);return i.join("&").replace(bn,"+")};var Cn,En,Nn=/#.*$/,Sn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,An=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,jn=/^(?:GET|HEAD)$/,Dn=/^\/\//,On=/\?/,Ln=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Fn=/([?&])_=[^&]*/,Mn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Hn=K.fn.load,qn={},zn={},Rn=["*/"]+["*"];
|
22
|
+
try{Cn=I.href}catch(Pn){Cn=B.createElement("a"),Cn.href="",Cn=Cn.href}En=Mn.exec(Cn.toLowerCase())||[],K.fn.load=function(e,n,r){if("string"!=typeof e&&Hn)return Hn.apply(this,arguments);if(!this.length)return this;var i,s,o,a=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),K.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(s="POST"),K.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&a.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,a.html(i?K("<div>").append(e.replace(Ln,"")).find(i):e)}),this},K.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){K.fn[t]=function(e){return this.on(t,e)}}),K.each(["get","post"],function(e,n){K[n]=function(e,r,i,s){return K.isFunction(r)&&(s=s||i,i=r,r=t),K.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),K.extend({getScript:function(e,n){return K.get(e,t,n,"script")},getJSON:function(e,t,n){return K.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?E(e,K.ajaxSettings):(t=e,e=K.ajaxSettings),E(e,t),e},ajaxSettings:{url:Cn,isLocal:An.test(En[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Rn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":K.parseJSON,"text xml":K.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:k(qn),ajaxTransport:k(zn),ajax:function(e,n){function r(e,n,r,o){var u,h,y,_,x,T=n;2!==b&&(b=2,l&&clearTimeout(l),a=t,s=o||"",w.readyState=e>0?4:0,r&&(_=N(d,w,r)),e>=200&&300>e||304===e?(d.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(K.lastModified[i]=x),x=w.getResponseHeader("Etag"),x&&(K.etag[i]=x)),304===e?(T="notmodified",u=!0):(u=S(d,_),T=u.state,h=u.data,y=u.error,u=!y)):(y=T,(!T||e)&&(T="error",0>e&&(e=0))),w.status=e,w.statusText=""+(n||T),u?g.resolveWith(f,[h,T,w]):g.rejectWith(f,[w,T,y]),w.statusCode(v),v=t,c&&p.trigger("ajax"+(u?"Success":"Error"),[w,d,u?h:y]),m.fireWith(f,[w,T]),c&&(p.trigger("ajaxComplete",[w,d]),--K.active||K.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,s,o,a,l,u,c,h,d=K.ajaxSetup({},n),f=d.context||d,p=f!==d&&(f.nodeType||f instanceof K)?K(f):K.event,g=K.Deferred(),m=K.Callbacks("once memory"),v=d.statusCode||{},y={},_={},b=0,x="canceled",w={readyState:0,setRequestHeader:function(e,t){if(!b){var n=e.toLowerCase();e=_[n]=_[n]||e,y[e]=t}return this},getAllResponseHeaders:function(){return 2===b?s:null},getResponseHeader:function(e){var n;if(2===b){if(!o)for(o={};n=Sn.exec(s);)o[n[1].toLowerCase()]=n[2];n=o[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return b||(d.mimeType=e),this},abort:function(e){return e=e||x,a&&a.abort(e),r(0,e),this}};if(g.promise(w),w.success=w.done,w.error=w.fail,w.complete=m.add,w.statusCode=function(e){if(e){var t;if(2>b)for(t in e)v[t]=[v[t],e[t]];else t=e[w.status],w.always(t)}return this},d.url=((e||d.url)+"").replace(Nn,"").replace(Dn,En[1]+"//"),d.dataTypes=K.trim(d.dataType||"*").toLowerCase().split(tt),null==d.crossDomain&&(u=Mn.exec(d.url.toLowerCase()),d.crossDomain=!(!u||u[1]==En[1]&&u[2]==En[2]&&(u[3]||("http:"===u[1]?80:443))==(En[3]||("http:"===En[1]?80:443)))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=K.param(d.data,d.traditional)),C(qn,d,n,w),2===b)return w;if(c=d.global,d.type=d.type.toUpperCase(),d.hasContent=!jn.test(d.type),c&&0===K.active++&&K.event.trigger("ajaxStart"),!d.hasContent&&(d.data&&(d.url+=(On.test(d.url)?"&":"?")+d.data,delete d.data),i=d.url,d.cache===!1)){var T=K.now(),k=d.url.replace(Fn,"$1_="+T);d.url=k+(k===d.url?(On.test(d.url)?"&":"?")+"_="+T:"")}(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(i=i||d.url,K.lastModified[i]&&w.setRequestHeader("If-Modified-Since",K.lastModified[i]),K.etag[i]&&w.setRequestHeader("If-None-Match",K.etag[i])),w.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Rn+"; q=0.01":""):d.accepts["*"]);for(h in d.headers)w.setRequestHeader(h,d.headers[h]);if(d.beforeSend&&(d.beforeSend.call(f,w,d)===!1||2===b))return w.abort();x="abort";for(h in{success:1,error:1,complete:1})w[h](d[h]);if(a=C(zn,d,n,w)){w.readyState=1,c&&p.trigger("ajaxSend",[w,d]),d.async&&d.timeout>0&&(l=setTimeout(function(){w.abort("timeout")},d.timeout));try{b=1,a.send(y,r)}catch(E){if(!(2>b))throw E;r(-1,E)}}else r(-1,"No Transport");return w},active:0,lastModified:{},etag:{}});var Bn=[],In=/\?/,Wn=/(=)\?(?=&|$)|\?\?/,$n=K.now();K.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Bn.pop()||K.expando+"_"+$n++;return this[e]=!0,e}}),K.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,a,l=n.data,u=n.url,c=n.jsonp!==!1,h=c&&Wn.test(u),d=c&&!h&&"string"==typeof l&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Wn.test(l);return"jsonp"===n.dataTypes[0]||h||d?(s=n.jsonpCallback=K.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],h?n.url=u.replace(Wn,"$1"+s):d?n.data=l.replace(Wn,"$1"+s):c&&(n.url+=(In.test(u)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return a||K.error(s+" was not called"),a[0]},n.dataTypes[0]="json",e[s]=function(){a=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Bn.push(s)),a&&K.isFunction(o)&&o(a[0]),a=o=t}),"script"):void 0}),K.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return K.globalEval(e),e}}}),K.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),K.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=B.head||B.getElementsByTagName("head")[0]||B.documentElement;return{send:function(i,s){n=B.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){(i||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||s(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Xn,Un=e.ActiveXObject?function(){for(var e in Xn)Xn[e](0,1)}:!1,Vn=0;K.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&A()||j()}:A,function(e){K.extend(K.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(K.ajaxSettings.xhr()),K.support.ajax&&K.ajaxTransport(function(n){if(!n.crossDomain||K.support.cors){var r;return{send:function(i,s){var o,a,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(a in n.xhrFields)l[a]=n.xhrFields[a];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(a in i)l.setRequestHeader(a,i[a])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var a,u,c,h,d;try{if(r&&(i||4===l.readyState))if(r=t,o&&(l.onreadystatechange=K.noop,Un&&delete Xn[o]),i)4!==l.readyState&&l.abort();else{a=l.status,c=l.getAllResponseHeaders(),h={},d=l.responseXML,d&&d.documentElement&&(h.xml=d);try{h.text=l.responseText}catch(e){}try{u=l.statusText}catch(f){u=""}a||!n.isLocal||n.crossDomain?1223===a&&(a=204):a=h.text?200:404}}catch(p){i||s(-1,p)}h&&s(a,u,h,c)},n.async?4===l.readyState?setTimeout(r,0):(o=++Vn,Un&&(Xn||(Xn={},K(e).unload(Un)),Xn[o]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var Jn,Yn,Gn=/^(?:toggle|show|hide)$/,Qn=new RegExp("^(?:([-+])=|)("+Z+")([a-z%]*)$","i"),Kn=/queueHooks$/,Zn=[M],er={"*":[function(e,t){var n,r,i,s=this.createTween(e,t),o=Qn.exec(t),a=s.cur(),l=+a||0,u=1;if(o){if(n=+o[2],r=o[3]||(K.cssNumber[e]?"":"px"),"px"!==r&&l){l=K.css(s.elem,e,!0)||n||1;do i=u=u||".5",l/=u,K.style(s.elem,e,l+r),u=s.cur()/a;while(1!==u&&u!==i)}s.unit=r,s.start=l,s.end=o[1]?l+(o[1]+1)*n:n}return s}]};K.Animation=K.extend(L,{tweener:function(e,t){K.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],er[n]=er[n]||[],er[n].unshift(t)},prefilter:function(e,t){t?Zn.unshift(e):Zn.push(e)}}),K.Tween=H,H.prototype={constructor:H,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(K.cssNumber[n]?"":"px")},cur:function(){var e=H.propHooks[this.prop];return e&&e.get?e.get(this):H.propHooks._default.get(this)},run:function(e){var t,n=H.propHooks[this.prop];return this.pos=t=this.options.duration?K.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=K.css(e.elem,e.prop,!1,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){K.fx.step[e.prop]?K.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[K.cssProps[e.prop]]||K.cssHooks[e.prop])?K.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},K.each(["toggle","show","hide"],function(e,t){var n=K.fn[t];K.fn[t]=function(r,i,s){return null==r||"boolean"==typeof r||!e&&K.isFunction(r)&&K.isFunction(i)?n.apply(this,arguments):this.animate(q(t,!0),r,i,s)}}),K.fn.extend({fadeTo:function(e,t,n,r){return this.filter(v).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=K.isEmptyObject(e),s=K.speed(t,n,r),o=function(){var t=L(this,K.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",s=K.timers,o=K._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Kn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem!==this||null!=e&&s[n].queue!==e||(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&K.dequeue(this,e)})}}),K.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){K.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),K.speed=function(e,t,n){var r=e&&"object"==typeof e?K.extend({},e):{complete:n||!n&&t||K.isFunction(e)&&e,duration:e,easing:n&&t||t&&!K.isFunction(t)&&t};return r.duration=K.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in K.fx.speeds?K.fx.speeds[r.duration]:K.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){K.isFunction(r.old)&&r.old.call(this),r.queue&&K.dequeue(this,r.queue)},r},K.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},K.timers=[],K.fx=H.prototype.init,K.fx.tick=function(){for(var e,t=K.timers,n=0;n<t.length;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||K.fx.stop()},K.fx.timer=function(e){e()&&K.timers.push(e)&&!Yn&&(Yn=setInterval(K.fx.tick,K.fx.interval))},K.fx.interval=13,K.fx.stop=function(){clearInterval(Yn),Yn=null},K.fx.speeds={slow:600,fast:200,_default:400},K.fx.step={},K.expr&&K.expr.filters&&(K.expr.filters.animated=function(e){return K.grep(K.timers,function(t){return e===t.elem}).length});var tr=/^(?:body|html)$/i;K.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){K.offset.setOffset(this,e,t)});var n,r,i,s,o,a,l,u,c,h,d=this[0],f=d&&d.ownerDocument;if(f)return(i=f.body)===d?K.offset.bodyOffset(d):(r=f.documentElement,K.contains(r,d)?(n=d.getBoundingClientRect(),s=z(f),o=r.clientTop||i.clientTop||0,a=r.clientLeft||i.clientLeft||0,l=s.pageYOffset||r.scrollTop,u=s.pageXOffset||r.scrollLeft,c=n.top+l-o,h=n.left+u-a,{top:c,left:h}):{top:0,left:0})},K.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return K.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(K.css(e,"marginTop"))||0,n+=parseFloat(K.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=K.css(e,"position");"static"===r&&(e.style.position="relative");var i,s,o=K(e),a=o.offset(),l=K.css(e,"top"),u=K.css(e,"left"),c=("absolute"===r||"fixed"===r)&&K.inArray("auto",[l,u])>-1,h={},d={};c?(d=o.position(),i=d.top,s=d.left):(i=parseFloat(l)||0,s=parseFloat(u)||0),K.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(h.top=t.top-a.top+i),null!=t.left&&(h.left=t.left-a.left+s),"using"in t?t.using.call(e,h):o.css(h)}},K.fn.extend({position:function(){if(this[0]){var e=this[0],t=this.offsetParent(),n=this.offset(),r=tr.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(K.css(e,"marginTop"))||0,n.left-=parseFloat(K.css(e,"marginLeft"))||0,r.top+=parseFloat(K.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(K.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||B.body;e&&!tr.test(e.nodeName)&&"static"===K.css(e,"position");)e=e.offsetParent;return e||B.body})}}),K.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);K.fn[e]=function(i){return K.access(this,function(e,i,s){var o=z(e);return s===t?o?n in o?o[n]:o.document.documentElement[i]:e[i]:(o?o.scrollTo(r?K(o).scrollLeft():s,r?s:K(o).scrollTop()):e[i]=s,void 0)},e,i,arguments.length,null)}}),K.each({Height:"height",Width:"width"},function(e,n){K.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){K.fn[i]=function(i,s){var o=arguments.length&&(r||"boolean"!=typeof i),a=r||(i===!0||s===!0?"margin":"border");return K.access(this,function(n,r,i){var s;return K.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?K.css(n,r,i,a):K.style(n,r,i,a)},n,o?i:t,o,null)}})}),e.jQuery=e.$=K,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return K})}(window),function(e){"use strict";function t(t){var n=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(this).ajaxSubmit(n))}function n(t){var n=t.target,r=e(n);if(!r.is(":submit,input:image")){var i=r.closest(":submit");if(0===i.length)return;n=i[0]}var s=this;if(s.clk=n,"image"==n.type)if(void 0!==t.offsetX)s.clk_x=t.offsetX,s.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=r.offset();s.clk_x=t.pageX-o.left,s.clk_y=t.pageY-o.top}else s.clk_x=t.pageX-n.offsetLeft,s.clk_y=t.pageY-n.offsetTop;setTimeout(function(){s.clk=s.clk_x=s.clk_y=null},100)}function r(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var i={};i.fileapi=void 0!==e("<input type='file'/>").get(0).files,i.formdata=void 0!==window.FormData,e.fn.ajaxSubmit=function(t){function n(t){var n,r,i=e.param(t).split("&"),s=i.length,o={};for(n=0;s>n;n++)r=i[n].split("="),o[decodeURIComponent(r[0])]=decodeURIComponent(r[1]);return o}function s(r){for(var i=new FormData,s=0;s<r.length;s++)i.append(r[s].name,r[s].value);if(t.extraData){var o=n(t.extraData);for(var l in o)o.hasOwnProperty(l)&&i.append(l,o[l])}t.data=null;var u=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:a||"POST"});t.uploadProgress&&(u.xhr=function(){var e=jQuery.ajaxSettings.xhr();return e.upload&&(e.upload.onprogress=function(e){var n=0,r=e.loaded||e.position,i=e.total;e.lengthComputable&&(n=Math.ceil(100*(r/i))),t.uploadProgress(e,r,i,n)}),e}),u.data=null;var c=u.beforeSend;return u.beforeSend=function(e,t){t.data=i,c&&c.call(this,e,t)},e.ajax(u)}function o(n){function i(e){var t=e.contentWindow?e.contentWindow.document:e.contentDocument?e.contentDocument:e.document;return t}function s(){function t(){try{var e=i(m).readyState;r("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(n){r("Server abort: ",n," (",n.name,")"),o(E),x&&clearTimeout(x),x=void 0}}var n=c.attr("target"),s=c.attr("action");w.setAttribute("target",f),a||w.setAttribute("method","POST"),s!=h.url&&w.setAttribute("action",h.url),h.skipEncodingOverride||a&&!/post/i.test(a)||c.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),h.timeout&&(x=setTimeout(function(){b=!0,o(C)},h.timeout));var l=[];try{if(h.extraData)for(var u in h.extraData)h.extraData.hasOwnProperty(u)&&(e.isPlainObject(h.extraData[u])&&h.extraData[u].hasOwnProperty("name")&&h.extraData[u].hasOwnProperty("value")?l.push(e('<input type="hidden" name="'+h.extraData[u].name+'">').attr("value",h.extraData[u].value).appendTo(w)[0]):l.push(e('<input type="hidden" name="'+u+'">').attr("value",h.extraData[u]).appendTo(w)[0]));h.iframeTarget||(g.appendTo("body"),m.attachEvent?m.attachEvent("onload",o):m.addEventListener("load",o,!1)),setTimeout(t,15),w.submit()}finally{w.setAttribute("action",s),n?w.setAttribute("target",n):c.removeAttr("target"),e(l).remove()}}function o(t){if(!v.aborted&&!D){try{j=i(m)}catch(n){r("cannot access response document: ",n),t=E}if(t===C&&v)return v.abort("timeout"),k.reject(v,"timeout"),void 0;if(t==E&&v)return v.abort("server abort"),k.reject(v,"error","server abort"),void 0;if(j&&j.location.href!=h.iframeSrc||b){m.detachEvent?m.detachEvent("onload",o):m.removeEventListener("load",o,!1);var s,a="success";try{if(b)throw"timeout";var l="xml"==h.dataType||j.XMLDocument||e.isXMLDoc(j);if(r("isXml="+l),!l&&window.opera&&(null===j.body||!j.body.innerHTML)&&--O)return r("requeing onLoad callback, DOM not available"),setTimeout(o,250),void 0;var u=j.body?j.body:j.documentElement;v.responseText=u?u.innerHTML:null,v.responseXML=j.XMLDocument?j.XMLDocument:j,l&&(h.dataType="xml"),v.getResponseHeader=function(e){var t={"content-type":h.dataType};return t[e]},u&&(v.status=Number(u.getAttribute("status"))||v.status,v.statusText=u.getAttribute("statusText")||v.statusText);var c=(h.dataType||"").toLowerCase(),f=/(json|script|text)/.test(c);if(f||h.textarea){var p=j.getElementsByTagName("textarea")[0];if(p)v.responseText=p.value,v.status=Number(p.getAttribute("status"))||v.status,v.statusText=p.getAttribute("statusText")||v.statusText;else if(f){var y=j.getElementsByTagName("pre")[0],_=j.getElementsByTagName("body")[0];y?v.responseText=y.textContent?y.textContent:y.innerText:_&&(v.responseText=_.textContent?_.textContent:_.innerText)}}else"xml"==c&&!v.responseXML&&v.responseText&&(v.responseXML=L(v.responseText));try{A=M(v,c,h)}catch(t){a="parsererror",v.error=s=t||a}}catch(t){r("error caught: ",t),a="error",v.error=s=t||a}v.aborted&&(r("upload aborted"),a=null),v.status&&(a=v.status>=200&&v.status<300||304===v.status?"success":"error"),"success"===a?(h.success&&h.success.call(h.context,A,"success",v),k.resolve(v.responseText,"success",v),d&&e.event.trigger("ajaxSuccess",[v,h])):a&&(void 0===s&&(s=v.statusText),h.error&&h.error.call(h.context,v,a,s),k.reject(v,"error",s),d&&e.event.trigger("ajaxError",[v,h,s])),d&&e.event.trigger("ajaxComplete",[v,h]),d&&!--e.active&&e.event.trigger("ajaxStop"),h.complete&&h.complete.call(h.context,v,a),D=!0,h.timeout&&clearTimeout(x),setTimeout(function(){h.iframeTarget||g.remove(),v.responseXML=null},100)}}}var l,u,h,d,f,g,m,v,y,_,b,x,w=c[0],T=!!e.fn.prop,k=e.Deferred();if(e(":input[name=submit],:input[id=submit]",w).length)return alert('Error: Form elements must not have name or id of "submit".'),k.reject(),k;if(n)for(u=0;u<p.length;u++)l=e(p[u]),T?l.prop("disabled",!1):l.removeAttr("disabled");if(h=e.extend(!0,{},e.ajaxSettings,t),h.context=h.context||h,f="jqFormIO"+(new Date).getTime(),h.iframeTarget?(g=e(h.iframeTarget),_=g.attr("name"),_?f=_:g.attr("name",f)):(g=e('<iframe name="'+f+'" src="'+h.iframeSrc+'" />'),g.css({position:"absolute",top:"-1000px",left:"-1000px"})),m=g[0],v={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var n="timeout"===t?"timeout":"aborted";if(r("aborting upload... "+n),this.aborted=1,m.contentWindow.document.execCommand)try{m.contentWindow.document.execCommand("Stop")}catch(i){}g.attr("src",h.iframeSrc),v.error=n,h.error&&h.error.call(h.context,v,n,t),d&&e.event.trigger("ajaxError",[v,h,n]),h.complete&&h.complete.call(h.context,v,n)}},d=h.global,d&&0===e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[v,h]),h.beforeSend&&h.beforeSend.call(h.context,v,h)===!1)return h.global&&e.active--,k.reject(),k;if(v.aborted)return k.reject(),k;y=w.clk,y&&(_=y.name,_&&!y.disabled&&(h.extraData=h.extraData||{},h.extraData[_]=y.value,"image"==y.type&&(h.extraData[_+".x"]=w.clk_x,h.extraData[_+".y"]=w.clk_y)));var C=1,E=2,N=e("meta[name=csrf-token]").attr("content"),S=e("meta[name=csrf-param]").attr("content");S&&N&&(h.extraData=h.extraData||{},h.extraData[S]=N),h.forceSync?s():setTimeout(s,10);var A,j,D,O=50,L=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},F=e.parseJSON||function(e){return window.eval("("+e+")")},M=function(t,n,r){var i=t.getResponseHeader("content-type")||"",s="xml"===n||!n&&i.indexOf("xml")>=0,o=s?t.responseXML:t.responseText;return s&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),r&&r.dataFilter&&(o=r.dataFilter(o,n)),"string"==typeof o&&("json"===n||!n&&i.indexOf("json")>=0?o=F(o):("script"===n||!n&&i.indexOf("javascript")>=0)&&e.globalEval(o)),o};return k}if(!this.length)return r("ajaxSubmit: skipping submit process - no element selected"),this;var a,l,u,c=this;"function"==typeof t&&(t={success:t}),a=this.attr("method"),l=this.attr("action"),u="string"==typeof l?e.trim(l):"",u=u||window.location.href||"",u&&(u=(u.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:u,success:e.ajaxSettings.success,type:a||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var h={};if(this.trigger("form-pre-serialize",[this,t,h]),h.veto)return r("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return r("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var f,p=[],g=this.formToArray(t.semantic,p);if(t.data&&(t.extraData=t.data,f=e.param(t.data,d)),t.beforeSubmit&&t.beforeSubmit(g,this,t)===!1)return r("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[g,this,t,h]),h.veto)return r("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var m=e.param(g,d);f&&(m=m?m+"&"+f:f),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+m,t.data=null):t.data=m;var v=[];if(t.resetForm&&v.push(function(){c.resetForm()}),t.clearForm&&v.push(function(){c.clearForm(t.includeHidden)}),!t.dataType&&t.target){var y=t.success||function(){};v.push(function(n){var r=t.replaceTarget?"replaceWith":"html";e(t.target)[r](n).each(y,arguments)})}else t.success&&v.push(t.success);t.success=function(e,n,r){for(var i=t.context||this,s=0,o=v.length;o>s;s++)v[s].apply(i,[e,n,r||c,c])};var _=e("input:file:enabled[value]",this),b=_.length>0,x="multipart/form-data",w=c.attr("enctype")==x||c.attr("encoding")==x,T=i.fileapi&&i.formdata;r("fileAPI :"+T);var k,C=(b||w)&&!T;t.iframe!==!1&&(t.iframe||C)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){k=o(g)}):k=o(g):k=(b||w)&&T?s(g):e.ajax(t),c.removeData("jqxhr").data("jqxhr",k);for(var E=0;E<p.length;E++)p[E]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(i){if(i=i||{},i.delegation=i.delegation&&e.isFunction(e.fn.on),!i.delegation&&0===this.length){var s={s:this.selector,c:this.context};return!e.isReady&&s.s?(r("DOM not ready, queuing ajaxForm"),e(function(){e(s.s,s.c).ajaxForm(i)}),this):(r("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return i.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,n).on("submit.form-plugin",this.selector,i,t).on("click.form-plugin",this.selector,i,n),this):this.ajaxFormUnbind().bind("submit.form-plugin",i,t).bind("click.form-plugin",i,n)},e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,n){var r=[];if(0===this.length)return r;var s=this[0],o=t?s.getElementsByTagName("*"):s.elements;if(!o)return r;var a,l,u,c,h,d,f;for(a=0,d=o.length;d>a;a++)if(h=o[a],u=h.name)if(t&&s.clk&&"image"==h.type)h.disabled||s.clk!=h||(r.push({name:u,value:e(h).val(),type:h.type}),r.push({name:u+".x",value:s.clk_x},{name:u+".y",value:s.clk_y}));else if(c=e.fieldValue(h,!0),c&&c.constructor==Array)for(n&&n.push(h),l=0,f=c.length;f>l;l++)r.push({name:u,value:c[l]});else if(i.fileapi&&"file"==h.type&&!h.disabled){n&&n.push(h);var p=h.files;if(p.length)for(l=0;l<p.length;l++)r.push({name:u,value:p[l],type:h.type});else r.push({name:u,value:"",type:h.type})}else null!==c&&"undefined"!=typeof c&&(n&&n.push(h),r.push({name:u,value:c,type:h.type,required:h.required}));if(!t&&s.clk){var g=e(s.clk),m=g[0];u=m.name,u&&!m.disabled&&"image"==m.type&&(r.push({name:u,value:g.val()}),r.push({name:u+".x",value:s.clk_x},{name:u+".y",value:s.clk_y}))}return r},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var n=[];return this.each(function(){var r=this.name;if(r){var i=e.fieldValue(this,t);if(i&&i.constructor==Array)for(var s=0,o=i.length;o>s;s++)n.push({name:r,value:i[s]});else null!==i&&"undefined"!=typeof i&&n.push({name:this.name,value:i})}}),e.param(n)},e.fn.fieldValue=function(t){for(var n=[],r=0,i=this.length;i>r;r++){var s=this[r],o=e.fieldValue(s,t);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(n,o):n.push(o))}return n},e.fieldValue=function(t,n){var r=t.name,i=t.type,s=t.tagName.toLowerCase();if(void 0===n&&(n=!0),n&&(!r||t.disabled||"reset"==i||"button"==i||("checkbox"==i||"radio"==i)&&!t.checked||("submit"==i||"image"==i)&&t.form&&t.form.clk!=t||"select"==s&&-1==t.selectedIndex))return null;if("select"==s){var o=t.selectedIndex;if(0>o)return null;for(var a=[],l=t.options,u="select-one"==i,c=u?o+1:l.length,h=u?o:0;c>h;h++){var d=l[h];if(d.selected){var f=d.value;if(f||(f=d.attributes&&d.attributes.value&&!d.attributes.value.specified?d.text:d.value),u)return f;a.push(f)}}return a}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var n=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var r=this.type,i=this.tagName.toLowerCase();n.test(r)||"textarea"==i?this.value="":"checkbox"==r||"radio"==r?this.checked=!1:"select"==i?this.selectedIndex=-1:t&&(t===!0&&/hidden/.test(r)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var n=this.type;if("checkbox"==n||"radio"==n)this.checked=t;else if("option"==this.tagName.toLowerCase()){var r=e(this).parent("select");t&&r[0]&&"select-one"==r[0].type&&r.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}(jQuery),function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.slice,a=r.unshift,l=i.toString,u=i.hasOwnProperty,c=r.forEach,h=r.map,d=r.reduce,f=r.reduceRight,p=r.filter,g=r.every,m=r.some,v=r.indexOf,y=r.lastIndexOf,_=Array.isArray,b=Object.keys,x=s.bind,w=function(e){return new N(e)};"undefined"!=typeof module&&module.exports?(module.exports=w,w._=w):e._=w,w.VERSION="1.1.7";var T=w.each=w.forEach=function(e,t,r){if(null!=e)if(c&&e.forEach===c)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;s>i;i++)if(i in e&&t.call(r,e[i],i,e)===n)return}else for(var o in e)if(u.call(e,o)&&t.call(r,e[o],o,e)===n)return};w.map=function(e,t,n){var r=[];return null==e?r:h&&e.map===h?e.map(t,n):(T(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)},w.reduce=w.foldl=w.inject=function(e,t,n,r){var i=void 0!==n;if(null==e&&(e=[]),d&&e.reduce===d)return r&&(t=w.bind(t,r)),i?e.reduce(t,n):e.reduce(t);if(T(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)}),!i)throw new TypeError("Reduce of empty array with no initial value");return n},w.reduceRight=w.foldr=function(e,t,n,r){if(null==e&&(e=[]),f&&e.reduceRight===f)return r&&(t=w.bind(t,r)),void 0!==n?e.reduceRight(t,n):e.reduceRight(t);var i=(w.isArray(e)?e.slice():w.toArray(e)).reverse();return w.reduce(i,t,n,r)},w.find=w.detect=function(e,t,n){var r;return k(e,function(e,i,s){return t.call(n,e,i,s)?(r=e,!0):void 0}),r},w.filter=w.select=function(e,t,n){var r=[];return null==e?r:p&&e.filter===p?e.filter(t,n):(T(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},w.reject=function(e,t,n){var r=[];return null==e?r:(T(e,function(e,i,s){t.call(n,e,i,s)||(r[r.length]=e)}),r)},w.every=w.all=function(e,t,r){var i=!0;return null==e?i:g&&e.every===g?e.every(t,r):(T(e,function(e,s,o){return(i=i&&t.call(r,e,s,o))?void 0:n}),i)};var k=w.some=w.any=function(e,t,r){t=t||w.identity;var i=!1;return null==e?i:m&&e.some===m?e.some(t,r):(T(e,function(e,s,o){return(i|=t.call(r,e,s,o))?n:void 0}),!!i)};w.include=w.contains=function(e,t){var n=!1;return null==e?n:v&&e.indexOf===v?-1!=e.indexOf(t):(k(e,function(e){return(n=e===t)?!0:void 0}),n)},w.invoke=function(e,t){var n=o.call(arguments,2);return w.map(e,function(e){return(t.call?t||e:e[t]).apply(e,n)})},w.pluck=function(e,t){return w.map(e,function(e){return e[t]})},w.max=function(e,t,n){if(!t&&w.isArray(e))return Math.max.apply(Math,e);var r={computed:-1/0};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.computed&&(r={value:e,computed:o})}),r.value},w.min=function(e,t,n){if(!t&&w.isArray(e))return Math.min.apply(Math,e);var r={computed:1/0};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},w.sortBy=function(e,t,n){return w.pluck(w.map(e,function(e,r,i){return{value:e,criteria:t.call(n,e,r,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;return r>n?-1:n>r?1:0}),"value")},w.groupBy=function(e,t){var n={};return T(e,function(e,r){var i=t(e,r);(n[i]||(n[i]=[])).push(e)}),n},w.sortedIndex=function(e,t,n){n||(n=w.identity);for(var r=0,i=e.length;i>r;){var s=r+i>>1;n(e[s])<n(t)?r=s+1:i=s}return r},w.toArray=function(e){return e?e.toArray?e.toArray():w.isArray(e)?o.call(e):w.isArguments(e)?o.call(e):w.values(e):[]},w.size=function(e){return w.toArray(e).length},w.first=w.head=function(e,t,n){return null==t||n?e[0]:o.call(e,0,t)},w.rest=w.tail=function(e,t,n){return o.call(e,null==t||n?1:t)},w.last=function(e){return e[e.length-1]},w.compact=function(e){return w.filter(e,function(e){return!!e})},w.flatten=function(e){return w.reduce(e,function(e,t){return w.isArray(t)?e.concat(w.flatten(t)):(e[e.length]=t,e)},[])},w.without=function(e){return w.difference(e,o.call(arguments,1))},w.uniq=w.unique=function(e,t){return w.reduce(e,function(e,n,r){return 0!=r&&(t===!0?w.last(e)==n:w.include(e,n))||(e[e.length]=n),e},[])},w.union=function(){return w.uniq(w.flatten(arguments))},w.intersection=w.intersect=function(e){var t=o.call(arguments,1);return w.filter(w.uniq(e),function(e){return w.every(t,function(t){return w.indexOf(t,e)>=0})})},w.difference=function(e,t){return w.filter(e,function(e){return!w.include(t,e)})},w.zip=function(){for(var e=o.call(arguments),t=w.max(w.pluck(e,"length")),n=new Array(t),r=0;t>r;r++)n[r]=w.pluck(e,""+r);return n},w.indexOf=function(e,t,n){if(null==e)return-1;var r,i;if(n)return r=w.sortedIndex(e,t),e[r]===t?r:-1;if(v&&e.indexOf===v)return e.indexOf(t);for(r=0,i=e.length;i>r;r++)if(e[r]===t)return r;return-1},w.lastIndexOf=function(e,t){if(null==e)return-1;
|
23
|
+
if(y&&e.lastIndexOf===y)return e.lastIndexOf(t);for(var n=e.length;n--;)if(e[n]===t)return n;return-1},w.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);r>i;)s[i++]=e,e+=n;return s},w.bind=function(e,t){if(e.bind===x&&x)return x.apply(e,o.call(arguments,1));var n=o.call(arguments,2);return function(){return e.apply(t,n.concat(o.call(arguments)))}},w.bindAll=function(e){var t=o.call(arguments,1);return 0==t.length&&(t=w.functions(e)),T(t,function(t){e[t]=w.bind(e[t],e)}),e},w.memoize=function(e,t){var n={};return t||(t=w.identity),function(){var r=t.apply(this,arguments);return u.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},w.delay=function(e,t){var n=o.call(arguments,2);return setTimeout(function(){return e.apply(e,n)},t)},w.defer=function(e){return w.delay.apply(w,[e,1].concat(o.call(arguments,1)))};var C=function(e,t,n){var r;return function(){var i=this,s=arguments,o=function(){r=null,e.apply(i,s)};n&&clearTimeout(r),(n||!r)&&(r=setTimeout(o,t))}};w.throttle=function(e,t){return C(e,t,!1)},w.debounce=function(e,t){return C(e,t,!0)},w.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments))}},w.wrap=function(e,t){return function(){var n=[e].concat(o.call(arguments));return t.apply(this,n)}},w.compose=function(){var e=o.call(arguments);return function(){for(var t=o.call(arguments),n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},w.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},w.keys=b||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)u.call(e,n)&&(t[t.length]=n);return t},w.values=function(e){return w.map(e,w.identity)},w.functions=w.methods=function(e){var t=[];for(var n in e)w.isFunction(e[n])&&t.push(n);return t.sort()},w.extend=function(e){return T(o.call(arguments,1),function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])}),e},w.defaults=function(e){return T(o.call(arguments,1),function(t){for(var n in t)null==e[n]&&(e[n]=t[n])}),e},w.clone=function(e){return w.isArray(e)?e.slice():w.extend({},e)},w.tap=function(e,t){return t(e),e},w.isEqual=function(e,t){if(e===t)return!0;var n=typeof e,r=typeof t;if(n!=r)return!1;if(e==t)return!0;if(!e&&t||e&&!t)return!1;if(e._chain&&(e=e._wrapped),t._chain&&(t=t._wrapped),e.isEqual)return e.isEqual(t);if(t.isEqual)return t.isEqual(e);if(w.isDate(e)&&w.isDate(t))return e.getTime()===t.getTime();if(w.isNaN(e)&&w.isNaN(t))return!1;if(w.isRegExp(e)&&w.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline;if("object"!==n)return!1;if(e.length&&e.length!==t.length)return!1;var i=w.keys(e),s=w.keys(t);if(i.length!=s.length)return!1;for(var o in e)if(!(o in t&&w.isEqual(e[o],t[o])))return!1;return!0},w.isEmpty=function(e){if(w.isArray(e)||w.isString(e))return 0===e.length;for(var t in e)if(u.call(e,t))return!1;return!0},w.isElement=function(e){return!(!e||1!=e.nodeType)},w.isArray=_||function(e){return"[object Array]"===l.call(e)},w.isObject=function(e){return e===Object(e)},w.isArguments=function(e){return!(!e||!u.call(e,"callee"))},w.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},w.isString=function(e){return!!(""===e||e&&e.charCodeAt&&e.substr)},w.isNumber=function(e){return!!(0===e||e&&e.toExponential&&e.toFixed)},w.isNaN=function(e){return e!==e},w.isBoolean=function(e){return e===!0||e===!1},w.isDate=function(e){return!!(e&&e.getTimezoneOffset&&e.setUTCFullYear)},w.isRegExp=function(e){return!(!(e&&e.test&&e.exec)||!e.ignoreCase&&e.ignoreCase!==!1)},w.isNull=function(e){return null===e},w.isUndefined=function(e){return void 0===e},w.noConflict=function(){return e._=t,this},w.identity=function(e){return e},w.times=function(e,t,n){for(var r=0;e>r;r++)t.call(n,r)},w.mixin=function(e){T(w.functions(e),function(t){A(t,w[t]=e[t])})};var E=0;w.uniqueId=function(e){var t=E++;return e?e+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g},w.template=function(e,t){var n=w.templateSettings,r="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(n.interpolate,function(e,t){return"',"+t.replace(/\\'/g,"'")+",'"}).replace(n.evaluate||null,function(e,t){return"');"+t.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",i=new Function("obj",r);return t?i(t):i};var N=function(e){this._wrapped=e};w.prototype=N.prototype;var S=function(e,t){return t?w(e).chain():e},A=function(e,t){N.prototype[e]=function(){var e=o.call(arguments);return a.call(e,this._wrapped),S(t.apply(w,e),this._chain)}};w.mixin(w),T(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];N.prototype[e]=function(){return t.apply(this._wrapped,arguments),S(this._wrapped,this._chain)}}),T(["concat","join","slice"],function(e){var t=r[e];N.prototype[e]=function(){return S(t.apply(this._wrapped,arguments),this._chain)}}),N.prototype.chain=function(){return this._chain=!0,this},N.prototype.value=function(){return this._wrapped}}(),function(){var e,t=this,n=t.Backbone;e="undefined"!=typeof exports?exports:t.Backbone={},e.VERSION="0.5.3";var r=t._;r||"undefined"==typeof require||(r=require("underscore")._);var i=t.jQuery||t.Zepto;e.noConflict=function(){return t.Backbone=n,this},e.emulateHTTP=!1,e.emulateJSON=!1,e.Events={bind:function(e,t,n){var r=this._callbacks||(this._callbacks={}),i=r[e]||(r[e]=[]);return i.push([t,n]),this},unbind:function(e,t){var n;if(e){if(n=this._callbacks)if(t){var r=n[e];if(!r)return this;for(var i=0,s=r.length;s>i;i++)if(r[i]&&t===r[i][0]){r[i]=null;break}}else n[e]=[]}else this._callbacks={};return this},trigger:function(e){var t,n,r,i,s,o=2;if(!(n=this._callbacks))return this;for(;o--;)if(r=o?e:"all",t=n[r])for(var a=0,l=t.length;l>a;a++)(i=t[a])?(s=o?Array.prototype.slice.call(arguments,1):arguments,i[0].apply(i[1]||this,s)):(t.splice(a,1),a--,l--);return this}},e.Model=function(e,t){var n;e||(e={}),(n=this.defaults)&&(r.isFunction(n)&&(n=n.call(this)),e=r.extend({},n,e)),this.attributes={},this._escapedAttributes={},this.cid=r.uniqueId("c"),this.set(e,{silent:!0}),this._changed=!1,this._previousAttributes=r.clone(this.attributes),t&&t.collection&&(this.collection=t.collection),this.initialize(e,t)},r.extend(e.Model.prototype,e.Events,{_previousAttributes:null,_changed:!1,idAttribute:"id",initialize:function(){},toJSON:function(){return r.clone(this.attributes)},get:function(e){return this.attributes[e]},escape:function(e){var t;if(t=this._escapedAttributes[e])return t;var n=this.attributes[e];return this._escapedAttributes[e]=w(null==n?"":""+n)},has:function(e){return null!=this.attributes[e]},set:function(e,t){if(t||(t={}),!e)return this;e.attributes&&(e=e.attributes);var n=this.attributes,i=this._escapedAttributes;if(!t.silent&&this.validate&&!this._performValidation(e,t))return!1;this.idAttribute in e&&(this.id=e[this.idAttribute]);var s=this._changing;this._changing=!0;for(var o in e){var a=e[o];r.isEqual(n[o],a)||(n[o]=a,delete i[o],this._changed=!0,t.silent||this.trigger("change:"+o,this,a,t))}return s||t.silent||!this._changed||this.change(t),this._changing=!1,this},unset:function(e,t){if(!(e in this.attributes))return this;t||(t={}),this.attributes[e];var n={};return n[e]=void 0,t.silent||!this.validate||this._performValidation(n,t)?(delete this.attributes[e],delete this._escapedAttributes[e],e==this.idAttribute&&delete this.id,this._changed=!0,t.silent||(this.trigger("change:"+e,this,void 0,t),this.change(t)),this):!1},clear:function(e){e||(e={});var t,n=this.attributes,r={};for(t in n)r[t]=void 0;if(!e.silent&&this.validate&&!this._performValidation(r,e))return!1;if(this.attributes={},this._escapedAttributes={},this._changed=!0,!e.silent){for(t in n)this.trigger("change:"+t,this,void 0,e);this.change(e)}return this},fetch:function(t){t||(t={});var n=this,r=t.success;return t.success=function(e,i,s){return n.set(n.parse(e,s),t)?(r&&r(n,e),void 0):!1},t.error=x(t.error,n,t),(this.sync||e.sync).call(this,"read",this,t)},save:function(t,n){if(n||(n={}),t&&!this.set(t,n))return!1;var r=this,i=n.success;n.success=function(e,t,s){return r.set(r.parse(e,s),n)?(i&&i(r,e,s),void 0):!1},n.error=x(n.error,r,n);var s=this.isNew()?"create":"update";return(this.sync||e.sync).call(this,s,this,n)},destroy:function(t){if(t||(t={}),this.isNew())return this.trigger("destroy",this,this.collection,t);var n=this,r=t.success;return t.success=function(e){n.trigger("destroy",n,n.collection,t),r&&r(n,e)},t.error=x(t.error,n,t),(this.sync||e.sync).call(this,"delete",this,t)},url:function(){var e=_(this.collection)||this.urlRoot||b();return this.isNew()?e:e+("/"==e.charAt(e.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(e){return e},clone:function(){return new this.constructor(this)},isNew:function(){return null==this.id},change:function(e){this.trigger("change",this,e),this._previousAttributes=r.clone(this.attributes),this._changed=!1},hasChanged:function(e){return e?this._previousAttributes[e]!=this.attributes[e]:this._changed},changedAttributes:function(e){e||(e=this.attributes);var t=this._previousAttributes,n=!1;for(var i in e)r.isEqual(t[i],e[i])||(n=n||{},n[i]=e[i]);return n},previous:function(e){return e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return r.clone(this._previousAttributes)},_performValidation:function(e,t){var n=this.validate(e);return n?(t.error?t.error(this,n,t):this.trigger("error",this,n,t),!1):!0}}),e.Collection=function(e,t){t||(t={}),t.comparator&&(this.comparator=t.comparator),r.bindAll(this,"_onModelEvent","_removeReference"),this._reset(),e&&this.reset(e,{silent:!0}),this.initialize.apply(this,arguments)},r.extend(e.Collection.prototype,e.Events,{model:e.Model,initialize:function(){},toJSON:function(){return this.map(function(e){return e.toJSON()})},add:function(e,t){if(r.isArray(e))for(var n=0,i=e.length;i>n;n++)this._add(e[n],t);else this._add(e,t);return this},remove:function(e,t){if(r.isArray(e))for(var n=0,i=e.length;i>n;n++)this._remove(e[n],t);else this._remove(e,t);return this},get:function(e){return null==e?null:this._byId[null!=e.id?e.id:e]},getByCid:function(e){return e&&this._byCid[e.cid||e]},at:function(e){return this.models[e]},sort:function(e){if(e||(e={}),!this.comparator)throw new Error("Cannot sort a set without a comparator");return this.models=this.sortBy(this.comparator),e.silent||this.trigger("reset",this,e),this},pluck:function(e){return r.map(this.models,function(t){return t.get(e)})},reset:function(e,t){return e||(e=[]),t||(t={}),this.each(this._removeReference),this._reset(),this.add(e,{silent:!0}),t.silent||this.trigger("reset",this,t),this},fetch:function(t){t||(t={});var n=this,r=t.success;return t.success=function(e,i,s){n[t.add?"add":"reset"](n.parse(e,s),t),r&&r(n,e)},t.error=x(t.error,n,t),(this.sync||e.sync).call(this,"read",this,t)},create:function(e,t){var n=this;if(t||(t={}),e=this._prepareModel(e,t),!e)return!1;var r=t.success;return t.success=function(e,i,s){n.add(e,t),r&&r(e,i,s)},e.save(null,t),e},parse:function(e){return e},chain:function(){return r(this.models).chain()},_reset:function(){this.length=0,this.models=[],this._byId={},this._byCid={}},_prepareModel:function(t,n){if(t instanceof e.Model)t.collection||(t.collection=this);else{var r=t;t=new this.model(r,{collection:this}),t.validate&&!t._performValidation(r,n)&&(t=!1)}return t},_add:function(e,t){if(t||(t={}),e=this._prepareModel(e,t),!e)return!1;var n=this.getByCid(e);if(n)throw new Error(["Can't add the same model to a set twice",n.id]);this._byId[e.id]=e,this._byCid[e.cid]=e;var r=null!=t.at?t.at:this.comparator?this.sortedIndex(e,this.comparator):this.length;return this.models.splice(r,0,e),e.bind("all",this._onModelEvent),this.length++,t.silent||e.trigger("add",e,this,t),e},_remove:function(e,t){return t||(t={}),(e=this.getByCid(e)||this.get(e))?(delete this._byId[e.id],delete this._byCid[e.cid],this.models.splice(this.indexOf(e),1),this.length--,t.silent||e.trigger("remove",e,this,t),this._removeReference(e),e):null},_removeReference:function(e){this==e.collection&&delete e.collection,e.unbind("all",this._onModelEvent)},_onModelEvent:function(e,t,n,r){("add"!=e&&"remove"!=e||n==this)&&("destroy"==e&&this._remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],this._byId[t.id]=t),this.trigger.apply(this,arguments))}});var s=["forEach","each","map","reduce","reduceRight","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","sortBy","sortedIndex","toArray","size","first","rest","last","without","indexOf","lastIndexOf","isEmpty","groupBy"];r.each(s,function(t){e.Collection.prototype[t]=function(){return r[t].apply(r,[this.models].concat(r.toArray(arguments)))}}),e.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)};var o=/:([\w\d]+)/g,a=/\*([\w\d]+)/g,l=/[-[\]{}()+?.,\\^$|#\s]/g;r.extend(e.Router.prototype,e.Events,{initialize:function(){},route:function(t,n,i){e.history||(e.history=new e.History),r.isRegExp(t)||(t=this._routeToRegExp(t)),e.history.route(t,r.bind(function(e){var r=this._extractParameters(t,e);i.apply(this,r),this.trigger.apply(this,["route:"+n].concat(r))},this))},navigate:function(t,n){e.history.navigate(t,n)},_bindRoutes:function(){if(this.routes){var e=[];for(var t in this.routes)e.unshift([t,this.routes[t]]);for(var n=0,r=e.length;r>n;n++)this.route(e[n][0],e[n][1],this[e[n][1]])}},_routeToRegExp:function(e){return e=e.replace(l,"\\$&").replace(o,"([^/]*)").replace(a,"(.*?)"),new RegExp("^"+e+"$")},_extractParameters:function(e,t){return e.exec(t).slice(1)}}),e.History=function(){this.handlers=[],r.bindAll(this,"checkUrl")};var u=/^#*/,c=/msie [\w.]+/,h=!1;r.extend(e.History.prototype,{interval:50,getFragment:function(e,t){if(null==e)if(this._hasPushState||t){e=window.location.pathname;var n=window.location.search;n&&(e+=n),0==e.indexOf(this.options.root)&&(e=e.substr(this.options.root.length))}else e=window.location.hash;return decodeURIComponent(e.replace(u,""))},start:function(e){if(h)throw new Error("Backbone.history has already been started");this.options=r.extend({},{root:"/"},this.options,e),this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&window.history&&window.history.pushState);var t=this.getFragment(),n=document.documentMode,s=c.exec(navigator.userAgent.toLowerCase())&&(!n||7>=n);s&&(this.iframe=i('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(t)),this._hasPushState?i(window).bind("popstate",this.checkUrl):"onhashchange"in window&&!s?i(window).bind("hashchange",this.checkUrl):setInterval(this.checkUrl,this.interval),this.fragment=t,h=!0;var o=window.location,a=o.pathname==this.options.root;return!this._wantsPushState||this._hasPushState||a?(this._wantsPushState&&this._hasPushState&&a&&o.hash&&(this.fragment=o.hash.replace(u,""),window.history.replaceState({},document.title,o.protocol+"//"+o.host+this.options.root+this.fragment)),this.options.silent?void 0:this.loadUrl()):(this.fragment=this.getFragment(null,!0),window.location.replace(this.options.root+"#"+this.fragment),!0)},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(){var e=this.getFragment();return e==this.fragment&&this.iframe&&(e=this.getFragment(this.iframe.location.hash)),e==this.fragment||e==decodeURIComponent(this.fragment)?!1:(this.iframe&&this.navigate(e),this.loadUrl()||this.loadUrl(window.location.hash),void 0)},loadUrl:function(e){var t=this.fragment=this.getFragment(e),n=r.any(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0});return n},navigate:function(e,t){var n=(e||"").replace(u,"");if(this.fragment!=n&&this.fragment!=decodeURIComponent(n)){if(this._hasPushState){var r=window.location;0!=n.indexOf(this.options.root)&&(n=this.options.root+n),this.fragment=n,window.history.pushState({},document.title,r.protocol+"//"+r.host+n)}else window.location.hash=this.fragment=n,this.iframe&&n!=this.getFragment(this.iframe.location.hash)&&(this.iframe.document.open().close(),this.iframe.location.hash=n);t&&this.loadUrl(e)}}}),e.View=function(e){this.cid=r.uniqueId("view"),this._configure(e||{}),this._ensureElement(),this.delegateEvents(),this.initialize.apply(this,arguments)};var d=function(e){return i(e,this.el)},f=/^(\S+)\s*(.*)$/,p=["model","collection","el","id","attributes","className","tagName"];r.extend(e.View.prototype,e.Events,{tagName:"div",$:d,initialize:function(){},render:function(){return this},remove:function(){return i(this.el).remove(),this},make:function(e,t,n){var r=document.createElement(e);return t&&i(r).attr(t),n&&i(r).html(n),r},delegateEvents:function(e){if(e||(e=this.events)){r.isFunction(e)&&(e=e.call(this)),i(this.el).unbind(".delegateEvents"+this.cid);for(var t in e){var n=this[e[t]];if(!n)throw new Error('Event "'+e[t]+'" does not exist');var s=t.match(f),o=s[1],a=s[2];n=r.bind(n,this),o+=".delegateEvents"+this.cid,""===a?i(this.el).bind(o,n):i(this.el).delegate(a,o,n)}}},_configure:function(e){this.options&&(e=r.extend({},this.options,e));for(var t=0,n=p.length;n>t;t++){var i=p[t];e[i]&&(this[i]=e[i])}this.options=e},_ensureElement:function(){if(this.el)r.isString(this.el)&&(this.el=i(this.el).get(0));else{var e=this.attributes||{};this.id&&(e.id=this.id),this.className&&(e["class"]=this.className),this.el=this.make(this.tagName,e)}}});var g=function(e,t){var n=y(this,e,t);return n.extend=this.extend,n};e.Model.extend=e.Collection.extend=e.Router.extend=e.View.extend=g;var m={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};e.sync=function(t,n,s){var o=m[t],a=r.extend({type:o,dataType:"json"},s);return a.url||(a.url=_(n)||b()),a.data||!n||"create"!=t&&"update"!=t||(a.contentType="application/json",a.data=JSON.stringify(n.toJSON())),e.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),e.emulateHTTP&&("PUT"===o||"DELETE"===o)&&(e.emulateJSON&&(a.data._method=o),a.type="POST",a.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",o)}),"GET"===a.type||e.emulateJSON||(a.processData=!1),i.ajax(a)};var v=function(){},y=function(e,t,n){var i;return i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},r.extend(i,e),v.prototype=e.prototype,i.prototype=new v,t&&r.extend(i.prototype,t),n&&r.extend(i,n),i.prototype.constructor=i,i.__super__=e.prototype,i},_=function(e){return e&&e.url?r.isFunction(e.url)?e.url():e.url:null},b=function(){throw new Error('A "url" property or function must be specified')},x=function(e,t,n){return function(r){e?e(t,r,n):t.trigger("error",t,r,n)}},w=function(e){return e.replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}}.call(this),// Copyright (c) 2011 Harvest http://getharvest.com
|
24
|
+
function(){var e;e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,r,i,s,o;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),s=e.childNodes,o=[],r=0,i=s.length;i>r;r++)n=s[r],o.push(this.add_option(n,t,e.disabled));return o},e.prototype.add_option=function(e,t,n){return"OPTION"===e.nodeName.toUpperCase()?(""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:n===!0?n:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},e}(),e.select_to_array=function(t){var n,r,i,s,o;for(r=new e,o=t.childNodes,i=0,s=o.length;s>i;i++)n=o[i],r.add_node(n);return r.parsed},this.SelectParser=e}.call(this),/*
|
25
|
+
Chosen source: generate output using 'cake build'
|
26
|
+
Copyright (c) 2011 by Harvest
|
27
|
+
*/
|
28
|
+
function(){var e,t;t=this,e=function(){function e(e,t){this.form_field=e,this.options=null!=t?t:{},this.set_default_values(),this.is_multiple=this.form_field.multiple,this.set_default_text(),this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.search_contains=this.options.search_contains||!1,this.choices=0,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||1/0},e.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||"Select Some Options":this.options.placeholder_text_single||this.options.placeholder_text||"Select an Option",this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||"No results match"},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(){var e=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return e.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(){var e=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return e.blur_test()},100))},e.prototype.result_add_option=function(e){var t,n;return e.disabled?"":(e.dom_id=this.container_id+"_o_"+e.array_index,t=e.selected&&this.is_multiple?[]:["active-result"],e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),n=""!==e.style.cssText?' style="'+e.style+'"':"",'<li id="'+e.dom_id+'" class="'+t.join(" ")+'"'+n+">"+e.html+"</li>")},e.prototype.results_update_field=function(){return this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.keyup_checker=function(e){var t,n;switch(t=null!=(n=e.which)?n:e.keyCode,this.search_field_scale(),t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(e.preventDefault(),this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t,n;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=Math.floor(Math.random()*e.length),t=e.substring(n,n+1)},e}(),t.AbstractChosen=e}.call(this),/*
|
29
|
+
Chosen source: generate output using 'cake build'
|
30
|
+
Copyright (c) 2011 by Harvest
|
31
|
+
*/
|
32
|
+
function(){var e,t,n,r,i=Object.prototype.hasOwnProperty,s=function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};r=this,e=jQuery,e.fn.extend({chosen:function(n){return e.browser.msie&&("6.0"===e.browser.version||"7.0"===e.browser.version&&7===document.documentMode)?this:this.each(function(){var r;return r=e(this),r.hasClass("chzn-done")?void 0:r.data("chosen",new t(this,n))})}}),t=function(t){function i(){i.__super__.constructor.apply(this,arguments)}return s(i,t),i.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_value=this.form_field_jq.val(),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},i.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},i.prototype.set_up_html=function(){var t,r,i,s;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/[^\w]/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),t=e("<div />",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?t.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):t.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(t),this.container=e("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),r=this.container.height(),i=this.f_width-n(this.dropdown),this.dropdown.css({width:i+"px",top:r+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),s=i-n(this.search_container)-n(this.search_field),this.search_field.css({width:s+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},i.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){return e.container_mousedown(t)}),this.container.mouseup(function(t){return e.container_mouseup(t)}),this.container.mouseenter(function(t){return e.mouse_enter(t)}),this.container.mouseleave(function(t){return e.mouse_leave(t)}),this.search_results.mouseup(function(t){return e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){return e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){return e.search_results_mouseout(t)}),this.form_field_jq.bind("liszt:updated",function(t){return e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){return e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){return e.container_mousedown(t)}),this.search_field.blur(function(t){return e.input_blur(t)}),this.search_field.keyup(function(t){return e.keyup_checker(t)}),this.search_field.keydown(function(t){return e.keydown_checker(t)}),this.search_field.focus(function(t){return e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){return e.choices_click(t)}):this.container.click(function(e){return e.preventDefault()})},i.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field()):(this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus",this.activate_action))},i.prototype.container_mousedown=function(t){var n;return this.is_disabled?void 0:(n=null!=t?e(t.target).hasClass("search-choice-close"):!1,t&&"mousedown"===t.type&&!this.results_showing&&t.stopPropagation(),this.pending_destroy_click||n?this.pending_destroy_click=!1:(this.active_field?this.is_multiple||!t||e(t.target)[0]!==this.selected_item[0]&&!e(t.target).parents("a.chzn-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field()))},i.prototype.container_mouseup=function(e){return"ABBR"!==e.target.nodeName||this.is_disabled?void 0:this.results_reset(e)},i.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chzn-container-active")?this.close_field():void 0},i.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},i.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},i.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){var e,t,n,i,s;for(this.parsing=!0,this.results_data=r.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),e="",s=this.results_data,n=0,i=s.length;i>n;n++)t=s[n],t.group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},i.prototype.result_add_group=function(t){return t.disabled?"":(t.dom_id=this.container_id+"_g_"+t.array_index,'<li id="'+t.dom_id+'" class="group-result">'+e("<div />").text(t.label).html()+"</li>")},i.prototype.result_do_highlight=function(e){var t,n,r,i,s;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),r=parseInt(this.search_results.css("maxHeight"),10),s=this.search_results.scrollTop(),i=r+s,n=this.result_highlight.position().top+this.search_results.scrollTop(),t=n+this.result_highlight.outerHeight(),t>=i)return this.search_results.scrollTop(t-r>0?t-r:0);if(s>n)return this.search_results.scrollTop(n)}},i.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},i.prototype.results_show=function(){var e;if(this.is_multiple){if(this.max_selected_options<=this.choices)return this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1}else this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected);return e=this.is_multiple?this.container.height():this.container.height()-1,this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.dropdown.css({top:e+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},i.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this}),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},i.prototype.set_tab_index=function(){var e;return this.form_field_jq.attr("tabindex")?(e=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",e)):void 0},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(t){var n;return n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),n.length?(this.result_highlight=n,this.result_select(t),this.search_field.focus()):void 0},i.prototype.search_results_mouseover=function(t){var n;return n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),n?this.result_do_highlight(n):void 0},i.prototype.search_results_mouseout=function(t){return e(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},i.prototype.choices_click=function(t){return t.preventDefault(),!this.active_field||e(t.target).hasClass("search-choice")||this.results_showing?void 0:this.results_show()},i.prototype.choice_build=function(t){var n,r,i,s=this;return this.is_multiple&&this.max_selected_options<=this.choices?(this.form_field_jq.trigger("liszt:maxselected",{chosen:this}),!1):(n=this.container_id+"_c_"+t.array_index,this.choices+=1,r=t.disabled?'<li class="search-choice search-choice-disabled" id="'+n+'"><span>'+t.html+"</span></li>":'<li class="search-choice" id="'+n+'"><span>'+t.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+t.array_index+'"></a></li>',this.search_container.before(r),i=e("#"+n).find("a").first(),i.click(function(e){return s.choice_destroy_link_click(e)}))},i.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),this.is_disabled?t.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(e(t.target)))},i.prototype.choice_destroy=function(e){return this.result_deselect(e.attr("rel"))?(this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove()):void 0},i.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},i.prototype.results_reset_cleanup=function(){return this.current_value=this.form_field_jq.val(),this.selected_item.find("abbr").remove()},i.prototype.result_select=function(e){var t,n,r,i;return this.result_highlight?(t=this.result_highlight,n=t.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(t):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),i=n.substr(n.lastIndexOf("_")+1),r=this.results_data[i],r.selected=!0,this.form_field.options[r.options_index].selected=!0,this.is_multiple?this.choice_build(r):(this.selected_item.find("span").first().text(r.text),this.allow_single_deselect&&this.single_deselect_control_build()),e.metaKey&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field_jq.val()!==this.current_value)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[r.options_index].value}),this.current_value=this.form_field_jq.val(),this.search_field_scale()):void 0},i.prototype.result_activate=function(e){return e.addClass("active-result")},i.prototype.result_deactivate=function(e){return e.removeClass("active-result")},i.prototype.result_deselect=function(t){var n,r;return r=this.results_data[t],this.form_field.options[r.options_index].disabled?!1:(r.selected=!1,this.form_field.options[r.options_index].selected=!1,n=e("#"+this.container_id+"_o_"+t),n.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[r.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){return this.allow_single_deselect&&this.selected_item.find("abbr").length<1?this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'):void 0},i.prototype.winnow_results=function(){var t,n,r,i,s,o,a,l,u,c,h,d,f,p,g,m,v,y;for(this.no_results_clear(),u=0,c=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html(),o=this.search_contains?"":"^",s=new RegExp(o+c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),f=new RegExp(c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),y=this.results_data,p=0,m=y.length;m>p;p++)if(n=y[p],!n.disabled&&!n.empty)if(n.group)e("#"+n.dom_id).css("display","none");else if(!this.is_multiple||!n.selected){if(t=!1,l=n.dom_id,a=e("#"+l),s.test(n.html))t=!0,u+=1;else if((n.html.indexOf(" ")>=0||0===n.html.indexOf("["))&&(i=n.html.replace(/\[|\]/g,"").split(" "),i.length))for(g=0,v=i.length;v>g;g++)r=i[g],s.test(r)&&(t=!0,u+=1);t?(c.length?(h=n.html.search(f),d=n.html.substr(0,h+c.length)+"</em>"+n.html.substr(h+c.length),d=d.substr(0,h)+"<em>"+d.substr(h)):d=n.html,a.html(d),this.result_activate(a),null!=n.group_array_index&&e("#"+this.results_data[n.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&l===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(a))}return 1>u&&c.length?this.no_results(c):this.winnow_results_set_highlight()},i.prototype.winnow_results_clear=function(){var t,n,r,i,s;for(this.search_field.val(""),n=this.search_results.find("li"),s=[],r=0,i=n.length;i>r;r++)t=n[r],t=e(t),t.hasClass("group-result")?s.push(t.css("display","auto")):this.is_multiple&&t.hasClass("result-selected")?s.push(void 0):s.push(this.result_activate(t));return s},i.prototype.winnow_results_set_highlight=function(){var e,t;return this.result_highlight||(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first(),null==e)?void 0:this.result_do_highlight(e)},i.prototype.no_results=function(t){var n;return n=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),n.find("span").first().html(t),this.search_results.append(n)},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t,n;return this.result_highlight?this.results_showing&&(n=this.result_highlight.nextAll("li.active-result").first(),n&&this.result_do_highlight(n)):(t=this.search_results.find("li.active-result").first(),t&&this.result_do_highlight(e(t))),this.results_showing?void 0:this.results_show()},i.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},i.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last(),e.length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(e){var t,n;switch(t=null!=(n=e.which)?n:e.keyCode,this.search_field_scale(),8!==t&&this.pending_backstroke&&this.clear_backstroke(),t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},i.prototype.search_field_scale=function(){var t,n,r,i,s,o,a,l,u;if(this.is_multiple){for(r=0,a=0,s="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],l=0,u=o.length;u>l;l++)i=o[l],s+=i+":"+this.search_field.css(i)+";";return n=e("<div />",{style:s}),n.text(this.search_field.val()),e("body").append(n),a=n.width()+25,n.remove(),a>this.f_width-10&&(a=this.f_width-10),this.search_field.css({width:a+"px"}),t=this.container.height(),this.dropdown.css({top:t+"px"})}},i.prototype.generate_random_id=function(){var t;for(t="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();e("#"+t).length>0;)t+=this.generate_random_char();return t},i}(AbstractChosen),n=function(e){var t;return t=e.outerWidth()-e.width()},r.get_side_border_padding=n}.call(this),function(e,t){function n(t,n){n||(n={},"object"==typeof console&&"function"==typeof console.log&&console.log("data was undefined for "+t.type));var i=r(n),s=t.type+" - data: "+i,o=e("<pre>").html(s),a=e("<li>").append(o);e(".events ul").append(a)}function r(e){return"string"!=typeof e&&(e=JSON.stringify(e,void 0,2)),e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,function(e){var t="number";return/^"/.test(e)?t=/:$/.test(e)?"key":"string":/true|false/.test(e)?t="boolean":/null/.test(e)&&(t="null"),'<span class="'+t+'">'+e+"</span>"})}var i=["telephony:Answer","telephony:Busy","telephony:CallFail","telephony:ClickToCall","telephony:CompleteHold","telephony:CompleteOneStepTransfer","telephony:CompleteResume","telephony:CompleteTwoStepTransfer","telephony:Conference","telephony:Connect","telephony:csrDidChangeStatus","telephony:csrNotAvailable","telephony:CustomerLeftTwoStepTransfer","telephony:FailOneStepTransfer","telephony:FailTwoStepTransfer","telephony:InitiateOneStepTransfer","telephony:InitiateTwoStepTransfer","telephony:InitializeWidget","telephony:LeaveTwoStepTransfer","telephony:LeaveVoicemail","telephony:NoAnswer","telephony:QueueChange","telephony:RemoveFromConference","telephony:Start","telephony:Terminate","telephony:toggleCsrStatus","telephony:WidgetReady","telephony:conversationCreated","transferInitiated"];t.each(i,function(t){e(document).bind(t,n)})}(jQuery,_),$(function(){$("button.clear").bind("click",function(){$(".events ul").empty()})});
|
@@ -0,0 +1,24 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
|
12
|
+
|
13
|
+
*/
|
14
|
+
|
15
|
+
|
16
|
+
body { background: #aee3f6; font-family: sans-serif; font-size: 14px; }
|
17
|
+
.events { position: absolute; top: 5px; left: 600px; z-index: 1; }
|
18
|
+
.events ul{ padding:0; margin:0; background: #fff; border: 2px solid orange; list-style: none; }
|
19
|
+
.events ul li { border: 1px solid orange; font-size: 12px; }
|
20
|
+
pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }
|
21
|
+
.string { color: green; }
|
22
|
+
.boolean { color: blue; }
|
23
|
+
.null { color: magenta; }
|
24
|
+
.key { color: red; }
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4
|
+
<metadata>
|
5
|
+
Created by FontForge 20100429 at Sat Dec 22 19:34:50 2012
|
6
|
+
By root
|
7
|
+
Copyright (C) 2012 by original authors @ fontello.com
|
8
|
+
</metadata>
|
9
|
+
<defs>
|
10
|
+
<font id="zest-telephony" horiz-adv-x="852" >
|
11
|
+
<font-face
|
12
|
+
font-family="zest-telephony"
|
13
|
+
font-weight="500"
|
14
|
+
font-stretch="normal"
|
15
|
+
units-per-em="1000"
|
16
|
+
panose-1="2 0 6 3 0 0 0 0 0 0"
|
17
|
+
ascent="850"
|
18
|
+
descent="-150"
|
19
|
+
bbox="15 -150 1015 850"
|
20
|
+
underline-thickness="50"
|
21
|
+
underline-position="-100"
|
22
|
+
unicode-range="U+26A0-1F514"
|
23
|
+
/>
|
24
|
+
<missing-glyph horiz-adv-x="364"
|
25
|
+
d="M33 0v666h265v-666h-265zM66 33h199v600h-199v-600z" />
|
26
|
+
<glyph glyph-name=".notdef" horiz-adv-x="364"
|
27
|
+
d="M33 0v666h265v-666h-265zM66 33h199v600h-199v-600z" />
|
28
|
+
<glyph glyph-name=".null" horiz-adv-x="0"
|
29
|
+
/>
|
30
|
+
<glyph glyph-name="nonmarkingreturn" horiz-adv-x="333"
|
31
|
+
/>
|
32
|
+
<glyph glyph-name="uni26A0" unicode="⚠" horiz-adv-x="944"
|
33
|
+
d="M77 -53q-25 0 -43 12t-18 35q0 21 11 38l395 684q22 37 49.5 37t49.5 -37l396 -684q12 -19 12 -38q0 -23 -18 -35t-43 -12h-791zM430 537q-18 0 -18 -17l6 -326q0 -7 5.5 -12.5t12.5 -5.5h72q7 0 12 5.5t5 12.5l8 326q0 7 -5.5 12t-12.5 5h-85zM415 33q0 -18 18 -18h79
|
34
|
+
q18 0 18 18v76q0 19 -18 19h-79q-18 0 -18 -19v-76z" />
|
35
|
+
<glyph glyph-name="uni2714" unicode="✔"
|
36
|
+
d="M16 350q0 171 120 291t290.5 120t290.5 -120t120 -291t-120 -291t-290.5 -120t-290.5 120t-120 291zM139 325q0 -11 7 -18l165 -164q18 -18 42 -18h28q24 0 42 18l284 283q17 18 0 35l-54 54q-8 8 -18.5 8t-17.5 -8l-233 -232q-7 -8 -17 -8t-17 8l-114 113q-7 8 -17 8
|
37
|
+
q-11 0 -19 -8l-54 -54q-7 -8 -7 -17z" />
|
38
|
+
<glyph glyph-name="uni2716" unicode="✖"
|
39
|
+
d="M16 350q0 171 120 291t290.5 120t290.5 -120t120 -291t-120 -291t-290.5 -120t-290.5 120t-120 291zM214 214q0 -5 5 -12l59 -60q13 -13 24 0l126 125l112 -114q5 -5 13 -5q6 0 11 5l58 58q12 12 0 24l-113 113l126 126q12 12 0 24l-60 59q-13 13 -24 0l-126 -125
|
40
|
+
l-113 114q-6 5 -12 5q-5 0 -13 -5l-56 -58q-13 -12 0 -24l112 -113l-124 -125q-5 -6 -5 -12z" />
|
41
|
+
<glyph glyph-name="uniE782" unicode="" horiz-adv-x="979"
|
42
|
+
d="M56 -45q-17 0 -28.5 11.5t-11.5 28.5v59q0 17 11.5 28t28.5 11h79q16 0 27.5 -11.5t11.5 -27.5v-59q0 -17 -11 -28.5t-28 -11.5h-79zM56 172q-17 0 -28.5 11.5t-11.5 28.5v59q0 17 11.5 28.5t28.5 11.5h79q17 0 28 -11.5t11 -28.5v-59q0 -17 -11 -28.5t-28 -11.5h-79z
|
43
|
+
M56 390q-17 0 -28.5 11t-11.5 28v59q0 17 11.5 28.5t28.5 11.5h79q17 0 28 -11.5t11 -28.5v-59q0 -17 -11 -28t-28 -11h-79zM56 607q-17 0 -28.5 11.5t-11.5 27.5v60q0 17 11.5 28t28.5 11h79q16 0 27.5 -11.5t11.5 -27.5v-60q0 -16 -11.5 -27.5t-27.5 -11.5h-79zM293 -45
|
44
|
+
q-17 0 -28.5 11.5t-11.5 28.5v59q0 17 11.5 28t28.5 11h632q15 0 26.5 -11.5t11.5 -27.5v-59q0 -17 -11 -28.5t-27 -11.5h-632zM293 172q-17 0 -28.5 11.5t-11.5 28.5v59q0 17 11.5 28.5t28.5 11.5h632q16 0 27 -11.5t11 -28.5v-59q0 -17 -11 -28.5t-27 -11.5h-632zM293 390
|
45
|
+
q-17 0 -28.5 11t-11.5 28v59q0 17 11.5 28.5t28.5 11.5h632q16 0 27 -11.5t11 -28.5v-59q0 -17 -11 -28t-27 -11h-632zM253 646v60q0 17 11.5 28t28.5 11h632q15 0 26.5 -11.5t11.5 -27.5v-60q0 -16 -11.5 -27.5t-26.5 -11.5h-632q-17 0 -28.5 11.5t-11.5 27.5z" />
|
46
|
+
<glyph glyph-name="uniE838" unicode="" horiz-adv-x="1030"
|
47
|
+
d="M335 586q-11 -5 -16 5l-91 157q-6 10 4 16l61 35q11 5 16 -5l91 -157q6 -10 -4 -16zM276 525l-35 -60q-5 -10 -16 -5l-158 92q-9 5 -4 15l35 61q5 10 16 4l158 -91q12 -6 4 -16zM220 381v-69q0 -11 -11 -11h-182q-12 0 -12 11v1v69q0 4 3.5 8t8.5 4h182q11 0 11 -12v-1z
|
48
|
+
M279 170q5 -11 -5 -16l-157 -91q-10 -6 -16 4l-35 61q-5 11 5 16l157 91q10 6 16 -4zM340 111l60 -35q10 -5 5 -16l-92 -158q-5 -9 -15 -4l-61 35q-10 5 -4 16l91 158q6 12 16 4zM484 55h69q11 0 11 -11v-182q0 -12 -11 -12h-1h-69q-5 0 -8.5 4t-3.5 8v182q0 11 12 11h1z
|
49
|
+
M695 114q11 5 16 -5l91 -157q6 -10 -4 -16l-61 -35q-11 -5 -16 5l-91 157q-6 10 4 16zM754 175l35 60q5 10 16 5l158 -92q9 -5 4 -15l-35 -61q-5 -10 -16 -4l-158 91q-12 6 -4 16zM810 319v69q0 11 11 11h182q12 0 12 -11v-1v-69q0 -4 -3.5 -8t-8.5 -4h-182q-11 0 -11 12v1z
|
50
|
+
M751 530q-5 11 5 16l157 91q10 6 16 -4l35 -61q5 -11 -5 -16l-157 -91q-10 -6 -16 4zM690 589l-60 35q-10 5 -5 16l92 158q5 9 15 4l61 -35q10 -5 4 -16l-91 -158q-6 -12 -16 -4zM546 645h-69q-11 0 -11 11v182q0 12 11 12h1h69q5 0 8.5 -4t3.5 -8v-182q0 -11 -12 -11h-1z
|
51
|
+
" />
|
52
|
+
<glyph glyph-name="uniF098" unicode="" horiz-adv-x="821"
|
53
|
+
d="M115 -45q-41 0 -70 29t-29 70v592q0 63 60 90q19 9 39 9h592q41 0 70 -29t29 -70v-592q0 -63 -62 -90q-20 -9 -37 -9h-592zM115 490q1 -13 3 -25t8 -27l8 -22l12 -24t10 -19q95 -189 258 -273q17 -8 82 -32q56 -22 99 -11q39 10 76 35q26 19 36 80q1 8 -2.5 14.5t-7 9
|
54
|
+
t-12 7t-11.5 6.5q-79 45 -90 53q-12 7 -20 7q-4 0 -9 -2.5t-10.5 -8t-8.5 -9.5l-9 -10q-5 -6 -6 -7q-2 -2 -8.5 -10.5t-10.5 -12t-12.5 -10t-13.5 -5.5l-15 5q-3 3 -9.5 6.5t-9.5 5.5q-110 61 -173 180q-8 8 -4 18t7 14t11.5 11t11.5 10q1 2 6 7.5t8 8.5t6.5 8.5t4.5 10.5
|
55
|
+
t1 11.5t-2 13.5q-35 84 -43 121q-2 7 -7 12.5t-15 7t-15.5 2t-20 0t-18.5 -0.5h-4q-57 -27 -76 -104q-6 -28 -5 -52z" />
|
56
|
+
<glyph glyph-name="uniF0E0" unicode="" horiz-adv-x="979"
|
57
|
+
d="M75 -45q-24 0 -41.5 17.5t-17.5 41.5v466q6 -7 21 -17l261 -199q82 -66 138 -82q27 -9 53 -9q73 0 149 57q32 23 89 68.5t84 65.5l142 107q6 4 10 9v-466q0 -24 -17 -41.5t-41 -17.5h-830zM17 692q0 20 18.5 36.5t39.5 16.5h830q21 0 39 -16.5t18 -36.5q0 -28 -32 -73
|
58
|
+
q-29 -38 -57 -61l-248 -187q-10 -7 -29.5 -23t-37 -28t-34 -20.5t-33.5 -8.5h-2q-28 0 -71 31q-12 8 -34 26l-30 23l-124 94l-124 93q-53 43 -80 99q-9 19 -9 35z" />
|
59
|
+
<glyph glyph-name="u1F464" unicode="👤" horiz-adv-x="837"
|
60
|
+
d="M16 -24v199q0 39 33 87q36 49 71 60q24 7 86 14q13 2 46.5 6t47.5 6q-45 28 -73 76t-28 109q0 89 64 155q63 65 155 65q91 0 156 -65q64 -64 64 -155q0 -60 -28.5 -108.5t-72.5 -76.5l69 -8q52 -7 76 -11t31.5 -5.5t17.5 -7t22 -15.5q40 -37 59 -84q9 -24 9 -42v-199
|
61
|
+
q-7 -3 -20.5 -13t-18.5 -12q-8 -4 -11 -4h-705q-18 0 -27 11q-8 10 -23 18z" />
|
62
|
+
<glyph glyph-name="u1F4DE" unicode="📞"
|
63
|
+
d="M16 556q0 94 65 168q22 24 47 36q6 -1 16 0t12 1h15l21 -1q-1 -1 33 -7q7 -4 10.5 -12.5t7.5 -21.5t6 -17q7 -21 24 -68l23 -64q7 -21 7 -27q0 -30 -40 -65q-21 -18 -28 -26q-13 -12 -13 -23q0 -8 22 -48q45 -76 98 -129t129 -96q39 -23 49.5 -23t27.5 17q7 7 28.5 33.5
|
64
|
+
t33.5 38.5q17 16 30 16q3 0 27 -11q56 -31 93 -54q36 -22 55 -31q22 -11 22 -31q0 -32 -19 -81q-26 -59 -131 -84q-28 -7 -48 -7q-14 0 -29.5 2.5t-25.5 4.5t-27.5 7.5t-23 8t-25.5 10t-23 8.5q-174 65 -314 247q-83 106 -127 217q-28 67 -28 112z" />
|
65
|
+
<glyph glyph-name="u1F50D" unicode="🔍"
|
66
|
+
d="M547 133q-90 -57 -189 -57q-140 0 -242 100q-100 100 -100 242q0 144 100 242q101 101 242 101q138 0 241 -101q101 -102 101 -242q0 -99 -57 -188l185 -184q9 -10 9 -25q0 -16 -32.5 -49t-49.5 -33q-15 0 -24 10zM153 418q0 -68 35 -116.5t91 -72.5q38 -16 79 -16
|
67
|
+
q67 0 115.5 35.5t73.5 89.5q16 40 16 80q0 84 -61 145q-59 61 -144 61q-67 0 -115.5 -36t-72.5 -91q-17 -40 -17 -79zM229 418q0 43 22.5 74t55.5 45q27 11 51 11q11 0 18 -8t7 -18.5t-7 -18t-18 -7.5q-33 0 -55.5 -22.5t-22.5 -55.5q0 -10 -7.5 -17.5t-17.5 -7.5
|
68
|
+
q-12 0 -19 7.5t-7 17.5z" />
|
69
|
+
<glyph glyph-name="u1F514" unicode="🔔" horiz-adv-x="936"
|
70
|
+
d="M106 36q-35 0 -61.5 24.5t-28.5 57.5q144 109 176 308q8 54 13 123q6 84 94 150q83 62 170 62q83 0 169 -62q93 -66 93 -148q15 -299 189 -433q-2 -34 -28 -58t-62 -24h-241q-10 -41 -42.5 -69t-78 -28t-78.5 28.5t-43 68.5h-241zM798 118q-128 142 -148 423
|
71
|
+
q-5 53 -67 98q-57 40 -114 40q-54 0 -114 -40q-64 -43 -68 -94q-13 -273 -149 -427h660zM382 63q0 -36 25.5 -61.5t61.5 -25.5q9 0 9 10.5t-9 10.5q-28 0 -47.5 19.5t-19.5 46.5q0 10 -9 10q-11 0 -11 -10z" />
|
72
|
+
</font>
|
73
|
+
</defs></svg>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,26 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
factory :agent, aliases: [:offline_agent], class: Telephony::Agent do
|
3
|
+
sequence :csr_id
|
4
|
+
csr_type 'A'
|
5
|
+
phone_type 'phone'
|
6
|
+
phone_number '123-123-1233'
|
7
|
+
|
8
|
+
factory :available_agent do
|
9
|
+
status Telephony::Agent::AVAILABLE
|
10
|
+
end
|
11
|
+
|
12
|
+
factory :on_a_call_agent do
|
13
|
+
status Telephony::Agent::ON_A_CALL
|
14
|
+
end
|
15
|
+
|
16
|
+
factory :not_available_agent do
|
17
|
+
status Telephony::Agent::NOT_AVAILABLE
|
18
|
+
end
|
19
|
+
|
20
|
+
factory :invalid_agent do
|
21
|
+
after(:create) do |agent|
|
22
|
+
agent.update_attribute :phone_type, 'invalid'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
factory :call, class: Telephony::Call, aliases: [:participant] do
|
3
|
+
conversation
|
4
|
+
sid
|
5
|
+
number '562-555-5555'
|
6
|
+
sequence :participant_id
|
7
|
+
|
8
|
+
factory :lone_call do
|
9
|
+
conversation nil
|
10
|
+
end
|
11
|
+
|
12
|
+
factory :terminated_call do
|
13
|
+
state 'terminated'
|
14
|
+
end
|
15
|
+
|
16
|
+
factory :not_initiated_call do
|
17
|
+
state 'not_initiated'
|
18
|
+
end
|
19
|
+
|
20
|
+
factory :connecting_call do
|
21
|
+
state 'connecting'
|
22
|
+
end
|
23
|
+
|
24
|
+
factory :in_progress_call do
|
25
|
+
state 'in_progress'
|
26
|
+
end
|
27
|
+
|
28
|
+
factory :in_conference_call do
|
29
|
+
state 'in_conference'
|
30
|
+
end
|
31
|
+
|
32
|
+
factory :holding_agent_call do
|
33
|
+
state 'in_progress'
|
34
|
+
conversation do
|
35
|
+
build :conversation, state: 'initiating_hold'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
factory :holding_cust_call do
|
40
|
+
state 'in_progress'
|
41
|
+
conversation do
|
42
|
+
build :conversation, state: 'initiating_hold'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
factory :failed_call do
|
47
|
+
sid nil
|
48
|
+
state 'in_progress'
|
49
|
+
end
|
50
|
+
|
51
|
+
factory :no_answer_call do
|
52
|
+
state 'terminated'
|
53
|
+
end
|
54
|
+
|
55
|
+
factory :transferred_call do
|
56
|
+
factory :one_step_transfer_call do
|
57
|
+
conversation do
|
58
|
+
build :conversation, state: 'one_step_transferring', transfer_type: 'one_step'
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
factory :two_step_transfer_call do
|
63
|
+
conversation do
|
64
|
+
build :conversation, state: 'two_step_transferring', transfer_type: 'two_step'
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
factory :transferred_participant do
|
70
|
+
number '555-555-5555'
|
71
|
+
conversation do
|
72
|
+
build :conversation
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
factory :call_with_recording do
|
77
|
+
recordings do
|
78
|
+
[build(:recording)]
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
factory :connecting_agent_leg do
|
83
|
+
agent
|
84
|
+
state :connecting
|
85
|
+
end
|
86
|
+
|
87
|
+
factory :active_agent_leg do
|
88
|
+
agent
|
89
|
+
state :in_progress
|
90
|
+
end
|
91
|
+
|
92
|
+
factory :customer_leg do
|
93
|
+
agent nil
|
94
|
+
state :in_progress
|
95
|
+
end
|
96
|
+
|
97
|
+
factory :inactive_agent_leg do
|
98
|
+
agent
|
99
|
+
state :terminated
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
sequence :sid do |number|
|
104
|
+
"sid-#{number}"
|
105
|
+
end
|
106
|
+
end
|