diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..5132dd5de --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore Byebug command history file. +.byebug_history + +.env +notes.rb + +Coverage diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..089165f2f --- /dev/null +++ b/Gemfile @@ -0,0 +1,77 @@ +source 'https://rubygems.org' + +git_source(:github) do |repo_name| + repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") + "https://github.com/#{repo_name}.git" +end + + +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem 'rails', '~> 5.0.2' +# Use postgresql as the database for Active Record +gem 'pg', '~> 0.18' +# Use Puma as the app server +gem 'puma', '~> 3.0' +# Use SCSS for stylesheets +gem 'sass-rails', '~> 5.0' +# Use Uglifier as compressor for JavaScript assets +gem 'uglifier', '>= 1.3.0' +# Use CoffeeScript for .coffee assets and views +gem 'coffee-rails', '~> 4.2' +# See https://github.com/rails/execjs#readme for more supported runtimes +# gem 'therubyracer', platforms: :ruby + +# Use jquery as the JavaScript library +gem 'jquery-rails' +# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks +gem 'turbolinks', '~> 5' +# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder +gem 'jbuilder', '~> 2.5' +# Use Redis adapter to run Action Cable in production +# gem 'redis', '~> 3.0' +# Use ActiveModel has_secure_password +# gem 'bcrypt', '~> 3.1.7' + +# Use Capistrano for deployment +# gem 'capistrano-rails', group: :development + +# For Pagination +gem 'kaminari' +gem 'foundation-rails' +# to access external API +gem 'httparty' + +group :development, :test do + # Call 'byebug' anywhere in the code to stop execution and get a debugger console + gem 'byebug', platform: :mri + # to test in browser + gem 'binding_of_caller' + # to test API efficiently + gem 'minitest-vcr' + gem 'webmock' + # to access .env cntent + gem 'dotenv-rails' +end + +group :development do + # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. + gem 'web-console', '>= 3.3.0' + gem 'listen', '~> 3.0.5' + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring + gem 'spring' + gem 'spring-watcher-listen', '~> 2.0.0' +end + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] + +group :development do + gem 'better_errors' + gem 'pry-rails' +end + +group :test do + gem 'minitest-rails' + gem 'minitest-reporters' + gem 'simplecov' +end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..91cb5e2e4 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,267 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (5.0.2) + actionpack (= 5.0.2) + nio4r (>= 1.2, < 3.0) + websocket-driver (~> 0.6.1) + actionmailer (5.0.2) + actionpack (= 5.0.2) + actionview (= 5.0.2) + activejob (= 5.0.2) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (5.0.2) + actionview (= 5.0.2) + activesupport (= 5.0.2) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.0.2) + activesupport (= 5.0.2) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (5.0.2) + activesupport (= 5.0.2) + globalid (>= 0.3.6) + activemodel (5.0.2) + activesupport (= 5.0.2) + activerecord (5.0.2) + activemodel (= 5.0.2) + activesupport (= 5.0.2) + arel (~> 7.0) + activesupport (5.0.2) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (~> 0.7) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.5.1) + public_suffix (~> 2.0, >= 2.0.2) + ansi (1.5.0) + arel (7.1.4) + babel-source (5.8.35) + babel-transpiler (0.7.0) + babel-source (>= 4.0, < 6) + execjs (~> 2.0) + better_errors (2.1.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + rack (>= 0.9.0) + bindex (0.5.0) + binding_of_caller (0.7.2) + debug_inspector (>= 0.0.1) + builder (3.2.3) + byebug (9.0.6) + coderay (1.1.1) + coffee-rails (4.2.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.2.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.12.2) + concurrent-ruby (1.0.5) + crack (0.4.3) + safe_yaml (~> 1.0.0) + debug_inspector (0.0.2) + docile (1.1.5) + dotenv (2.2.0) + dotenv-rails (2.2.0) + dotenv (= 2.2.0) + railties (>= 3.2, < 5.1) + erubis (2.7.0) + execjs (2.7.0) + ffi (1.9.18) + foundation-rails (6.3.1.0) + railties (>= 3.1.0) + sass (>= 3.3.0, < 3.5) + sprockets-es6 (>= 0.9.0) + globalid (0.4.0) + activesupport (>= 4.2.0) + hashdiff (0.3.4) + httparty (0.14.0) + multi_xml (>= 0.5.2) + i18n (0.8.1) + jbuilder (2.6.3) + activesupport (>= 3.0.0, < 5.2) + multi_json (~> 1.2) + jquery-rails (4.3.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + json (2.1.0) + kaminari (1.0.1) + activesupport (>= 4.1.0) + kaminari-actionview (= 1.0.1) + kaminari-activerecord (= 1.0.1) + kaminari-core (= 1.0.1) + kaminari-actionview (1.0.1) + actionview + kaminari-core (= 1.0.1) + kaminari-activerecord (1.0.1) + activerecord + kaminari-core (= 1.0.1) + kaminari-core (1.0.1) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + loofah (2.0.3) + nokogiri (>= 1.5.9) + mail (2.6.5) + mime-types (>= 1.16, < 4) + method_source (0.8.2) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_portile2 (2.1.0) + minispec-metadata (2.0.0) + minitest + minitest (5.10.1) + minitest-rails (3.0.0) + minitest (~> 5.8) + railties (~> 5.0) + minitest-reporters (1.1.14) + ansi + builder + minitest (>= 5.0) + ruby-progressbar + minitest-vcr (1.4.0) + minispec-metadata (~> 2.0) + minitest (>= 4.7.5) + vcr (>= 2.9) + multi_json (1.12.1) + multi_xml (0.6.0) + nio4r (2.0.0) + nokogiri (1.7.1) + mini_portile2 (~> 2.1.0) + pg (0.20.0) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-rails (0.3.6) + pry (>= 0.10.4) + public_suffix (2.0.5) + puma (3.8.2) + rack (2.0.1) + rack-test (0.6.3) + rack (>= 1.0) + rails (5.0.2) + actioncable (= 5.0.2) + actionmailer (= 5.0.2) + actionpack (= 5.0.2) + actionview (= 5.0.2) + activejob (= 5.0.2) + activemodel (= 5.0.2) + activerecord (= 5.0.2) + activesupport (= 5.0.2) + bundler (>= 1.3.0, < 2.0) + railties (= 5.0.2) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.2) + activesupport (>= 4.2.0, < 6.0) + nokogiri (~> 1.6) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (5.0.2) + actionpack (= 5.0.2) + activesupport (= 5.0.2) + method_source + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (12.0.0) + rb-fsevent (0.9.8) + rb-inotify (0.9.8) + ffi (>= 0.5.0) + ruby-progressbar (1.8.1) + safe_yaml (1.0.4) + sass (3.4.23) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + simplecov (0.13.0) + docile (~> 1.1.0) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + slop (3.6.0) + spring (2.0.1) + activesupport (>= 4.2) + spring-watcher-listen (2.0.1) + listen (>= 2.7, < 4.0) + spring (>= 1.2, < 3.0) + sprockets (3.7.1) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-es6 (0.9.2) + babel-source (>= 5.8.11) + babel-transpiler + sprockets (>= 3.0.0) + sprockets-rails (3.2.0) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + thor (0.19.4) + thread_safe (0.3.6) + tilt (2.0.7) + turbolinks (5.0.1) + turbolinks-source (~> 5) + turbolinks-source (5.0.1) + tzinfo (1.2.3) + thread_safe (~> 0.1) + uglifier (3.2.0) + execjs (>= 0.3.0, < 3) + vcr (3.0.3) + web-console (3.5.0) + actionview (>= 5.0) + activemodel (>= 5.0) + bindex (>= 0.4.0) + railties (>= 5.0) + webmock (3.0.1) + addressable (>= 2.3.6) + crack (>= 0.3.2) + hashdiff + websocket-driver (0.6.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + +PLATFORMS + ruby + +DEPENDENCIES + better_errors + binding_of_caller + byebug + coffee-rails (~> 4.2) + dotenv-rails + foundation-rails + httparty + jbuilder (~> 2.5) + jquery-rails + kaminari + listen (~> 3.0.5) + minitest-rails + minitest-reporters + minitest-vcr + pg (~> 0.18) + pry-rails + puma (~> 3.0) + rails (~> 5.0.2) + sass-rails (~> 5.0) + simplecov + spring + spring-watcher-listen (~> 2.0.0) + turbolinks (~> 5) + tzinfo-data + uglifier (>= 1.3.0) + web-console (>= 3.3.0) + webmock + +BUNDLED WITH + 1.14.6 diff --git a/Rakefile b/Rakefile new file mode 100644 index 000000000..e85f91391 --- /dev/null +++ b/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require_relative 'config/application' + +Rails.application.load_tasks diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js new file mode 100644 index 000000000..b16e53d6d --- /dev/null +++ b/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_tree ../images +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css diff --git a/app/assets/images/.keep b/app/assets/images/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/images/cow.png b/app/assets/images/cow.png new file mode 100644 index 000000000..0bf01af00 Binary files /dev/null and b/app/assets/images/cow.png differ diff --git a/app/assets/images/grassy_background.jpg b/app/assets/images/grassy_background.jpg new file mode 100644 index 000000000..6f505c902 Binary files /dev/null and b/app/assets/images/grassy_background.jpg differ diff --git a/app/assets/images/logo.jpg b/app/assets/images/logo.jpg new file mode 100644 index 000000000..6d12a01a6 Binary files /dev/null and b/app/assets/images/logo.jpg differ diff --git a/app/assets/images/logo.png b/app/assets/images/logo.png new file mode 100644 index 000000000..250c4e709 Binary files /dev/null and b/app/assets/images/logo.png differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js new file mode 100644 index 000000000..32980d96f --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,19 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. JavaScript code in this file should be added after the last require_* statement. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require jquery +//= require jquery_ujs +//= require foundation +//= require turbolinks +//= require_tree . + +$(function(){ $(document).foundation(); }); diff --git a/app/assets/javascripts/cable.js b/app/assets/javascripts/cable.js new file mode 100644 index 000000000..71ee1e66d --- /dev/null +++ b/app/assets/javascripts/cable.js @@ -0,0 +1,13 @@ +// Action Cable provides the framework to deal with WebSockets in Rails. +// You can generate new channels where WebSocket features live using the rails generate channel command. +// +//= require action_cable +//= require_self +//= require_tree ./channels + +(function() { + this.App || (this.App = {}); + + App.cable = ActionCable.createConsumer(); + +}).call(this); diff --git a/app/assets/javascripts/channels/.keep b/app/assets/javascripts/channels/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/javascripts/foundation.js b/app/assets/javascripts/foundation.js new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/javascripts/recipes.coffee b/app/assets/javascripts/recipes.coffee new file mode 100644 index 000000000..24f83d18b --- /dev/null +++ b/app/assets/javascripts/recipes.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/_settings.scss b/app/assets/stylesheets/_settings.scss new file mode 100644 index 000000000..0d04587cb --- /dev/null +++ b/app/assets/stylesheets/_settings.scss @@ -0,0 +1,621 @@ +// Foundation for Sites Settings +// ----------------------------- +// +// Table of Contents: +// +// 1. Global +// 2. Breakpoints +// 3. The Grid +// 4. Base Typography +// 5. Typography Helpers +// 6. Abide +// 7. Accordion +// 8. Accordion Menu +// 9. Badge +// 10. Breadcrumbs +// 11. Button +// 12. Button Group +// 13. Callout +// 14. Card +// 15. Close Button +// 16. Drilldown +// 17. Dropdown +// 18. Dropdown Menu +// 19. Forms +// 20. Label +// 21. Media Object +// 22. Menu +// 23. Meter +// 24. Off-canvas +// 25. Orbit +// 26. Pagination +// 27. Progress Bar +// 28. Responsive Embed +// 29. Reveal +// 30. Slider +// 31. Switch +// 32. Table +// 33. Tabs +// 34. Thumbnail +// 35. Title Bar +// 36. Tooltip +// 37. Top Bar + +@import 'util/util'; +@import url('https://fonts.googleapis.com/css?family=Short+Stack'); + +// 1. Global +// --------- + +$global-font-size: 100%; +$global-width: rem-calc(1200); +$global-lineheight: 1.5; +$foundation-palette: ( + primary: #1779ba, + secondary: #767676, + success: #3adb76, + warning: #ffae00, + alert: #cc4b37, +); +$light-gray: #e6e6e6; +$medium-gray: #cacaca; +$dark-gray: #8a8a8a; +$black: #0a0a0a; +$white: #fefefe; +$body-background: $white; +$body-font-color: $black; +$body-font-family: 'Short Stack', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; +$body-antialiased: true; +$global-margin: 1rem; +$global-padding: 1rem; +$global-weight-normal: normal; +$global-weight-bold: bold; +$global-radius: 0; +$global-text-direction: ltr; +$global-flexbox: false; +$print-transparent-backgrounds: true; + +@include add-foundation-colors; + +// 2. Breakpoints +// -------------- + +$breakpoints: ( + small: 0, + medium: 640px, + large: 1024px, + xlarge: 1200px, + xxlarge: 1440px, +); +$print-breakpoint: large; +$breakpoint-classes: (small medium large); + +// 3. The Grid +// ----------- + +$grid-row-width: $global-width; +$grid-column-count: 12; +$grid-column-gutter: ( + small: 20px, + medium: 30px, +); +$grid-column-align-edge: true; +$block-grid-max: 8; + +// 4. Base Typography +// ------------------ + +$header-font-family: $body-font-family; +$header-font-weight: $global-weight-normal; +$header-font-style: normal; +$font-family-monospace: 'Short Stack', Consolas, 'Liberation Mono', Courier, monospace; +$header-color: inherit; +$header-lineheight: 1.4; +$header-margin-bottom: 0.5rem; +$header-styles: ( + small: ( + 'h1': ('font-size': 24), + 'h2': ('font-size': 20), + 'h3': ('font-size': 19), + 'h4': ('font-size': 18), + 'h5': ('font-size': 17), + 'h6': ('font-size': 16), + ), + medium: ( + 'h1': ('font-size': 48), + 'h2': ('font-size': 40), + 'h3': ('font-size': 31), + 'h4': ('font-size': 25), + 'h5': ('font-size': 20), + 'h6': ('font-size': 16), + ), +); +$header-text-rendering: optimizeLegibility; +$small-font-size: 80%; +$header-small-font-color: $medium-gray; +$paragraph-lineheight: 1.6; +$paragraph-margin-bottom: 1rem; +$paragraph-text-rendering: optimizeLegibility; +$code-color: $black; +$code-font-family: $font-family-monospace; +$code-font-weight: $global-weight-normal; +$code-background: $light-gray; +$code-border: 1px solid $medium-gray; +$code-padding: rem-calc(2 5 1); +$anchor-color: $primary-color; +$anchor-color-hover: scale-color($anchor-color, $lightness: -14%); +$anchor-text-decoration: none; +$anchor-text-decoration-hover: none; +$hr-width: $global-width; +$hr-border: 1px solid $medium-gray; +$hr-margin: rem-calc(20) auto; +$list-lineheight: $paragraph-lineheight; +$list-margin-bottom: $paragraph-margin-bottom; +$list-style-type: disc; +$list-style-position: outside; +$list-side-margin: 1.25rem; +$list-nested-side-margin: 1.25rem; +$defnlist-margin-bottom: 1rem; +$defnlist-term-weight: $global-weight-bold; +$defnlist-term-margin-bottom: 0.3rem; +$blockquote-color: $dark-gray; +$blockquote-padding: rem-calc(9 20 0 19); +$blockquote-border: 1px solid $medium-gray; +$cite-font-size: rem-calc(13); +$cite-color: $dark-gray; +$cite-pseudo-content: '\2014 \0020'; +$keystroke-font: $font-family-monospace; +$keystroke-color: $black; +$keystroke-background: $light-gray; +$keystroke-padding: rem-calc(2 4 0); +$keystroke-radius: $global-radius; +$abbr-underline: 1px dotted $black; + +// 5. Typography Helpers +// --------------------- + +$lead-font-size: $global-font-size * 1.25; +$lead-lineheight: 1.6; +$subheader-lineheight: 1.4; +$subheader-color: $dark-gray; +$subheader-font-weight: $global-weight-normal; +$subheader-margin-top: 0.2rem; +$subheader-margin-bottom: 0.5rem; +$stat-font-size: 2.5rem; + +// 6. Abide +// -------- + +$abide-inputs: true; +$abide-labels: true; +$input-background-invalid: get-color(alert); +$form-label-color-invalid: get-color(alert); +$input-error-color: get-color(alert); +$input-error-font-size: rem-calc(12); +$input-error-font-weight: $global-weight-bold; + +// 7. Accordion +// ------------ + +$accordion-background: $white; +$accordion-plusminus: true; +$accordion-title-font-size: rem-calc(12); +$accordion-item-color: $primary-color; +$accordion-item-background-hover: $light-gray; +$accordion-item-padding: 1.25rem 1rem; +$accordion-content-background: $white; +$accordion-content-border: 1px solid $light-gray; +$accordion-content-color: $body-font-color; +$accordion-content-padding: 1rem; + +// 8. Accordion Menu +// ----------------- + +$accordionmenu-arrows: true; +$accordionmenu-arrow-color: $primary-color; +$accordionmenu-arrow-size: 6px; + +// 9. Badge +// -------- + +$badge-background: $primary-color; +$badge-color: $white; +$badge-color-alt: $black; +$badge-palette: $foundation-palette; +$badge-padding: 0.3em; +$badge-minwidth: 2.1em; +$badge-font-size: 0.6rem; + +// 10. Breadcrumbs +// --------------- + +$breadcrumbs-margin: 0 0 $global-margin 0; +$breadcrumbs-item-font-size: rem-calc(11); +$breadcrumbs-item-color: $primary-color; +$breadcrumbs-item-color-current: $black; +$breadcrumbs-item-color-disabled: $medium-gray; +$breadcrumbs-item-margin: 0.75rem; +$breadcrumbs-item-uppercase: true; +$breadcrumbs-item-slash: true; + +// 11. Button +// ---------- + +$button-padding: 0.85em 1em; +$button-margin: 0 0 $global-margin 0; +$button-fill: solid; +$button-background: $primary-color; +$button-background-hover: scale-color($button-background, $lightness: -15%); +$button-color: $white; +$button-color-alt: $black; +$button-radius: $global-radius; +$button-sizes: ( + tiny: 0.6rem, + small: 0.75rem, + default: 0.9rem, + large: 1.25rem, +); +$button-palette: $foundation-palette; +$button-opacity-disabled: 0.25; +$button-background-hover-lightness: -20%; +$button-hollow-hover-lightness: -50%; +$button-transition: background-color 0.25s ease-out, color 0.25s ease-out; + +// 12. Button Group +// ---------------- + +$buttongroup-margin: 1rem; +$buttongroup-spacing: 1px; +$buttongroup-child-selector: '.button'; +$buttongroup-expand-max: 6; +$buttongroup-radius-on-each: true; + +// 13. Callout +// ----------- + +$callout-background: $white; +$callout-background-fade: 85%; +$callout-border: 1px solid rgba($black, 0.25); +$callout-margin: 0 0 1rem 0; +$callout-padding: 1rem; +$callout-font-color: $body-font-color; +$callout-font-color-alt: $body-background; +$callout-radius: $global-radius; +$callout-link-tint: 30%; + +// 14. Card +// -------- + +$card-background: $white; +$card-font-color: $body-font-color; +$card-divider-background: $light-gray; +$card-border: 1px solid $light-gray; +$card-shadow: none; +$card-border-radius: $global-radius; +$card-padding: $global-padding; +$card-margin: $global-margin; + +// 15. Close Button +// ---------------- + +$closebutton-position: right top; +$closebutton-offset-horizontal: ( + small: 0.66rem, + medium: 1rem, +); +$closebutton-offset-vertical: ( + small: 0.33em, + medium: 0.5rem, +); +$closebutton-size: ( + small: 1.5em, + medium: 2em, +); +$closebutton-lineheight: 1; +$closebutton-color: $dark-gray; +$closebutton-color-hover: $black; + +// 16. Drilldown +// ------------- + +$drilldown-transition: transform 0.15s linear; +$drilldown-arrows: true; +$drilldown-arrow-color: $primary-color; +$drilldown-arrow-size: 6px; +$drilldown-background: $white; + +// 17. Dropdown +// ------------ + +$dropdown-padding: 1rem; +$dropdown-background: $body-background; +$dropdown-border: 1px solid $medium-gray; +$dropdown-font-size: 1rem; +$dropdown-width: 300px; +$dropdown-radius: $global-radius; +$dropdown-sizes: ( + tiny: 100px, + small: 200px, + large: 400px, +); + +// 18. Dropdown Menu +// ----------------- + +$dropdownmenu-arrows: true; +$dropdownmenu-arrow-color: $anchor-color; +$dropdownmenu-arrow-size: 6px; +$dropdownmenu-min-width: 200px; +$dropdownmenu-background: $white; +$dropdownmenu-border: 1px solid $medium-gray; + +// 19. Forms +// --------- + +$fieldset-border: 1px solid $medium-gray; +$fieldset-padding: rem-calc(20); +$fieldset-margin: rem-calc(18 0); +$legend-padding: rem-calc(0 3); +$form-spacing: rem-calc(16); +$helptext-color: $black; +$helptext-font-size: rem-calc(13); +$helptext-font-style: italic; +$input-prefix-color: $black; +$input-prefix-background: $light-gray; +$input-prefix-border: 1px solid $medium-gray; +$input-prefix-padding: 1rem; +$form-label-color: $black; +$form-label-font-size: rem-calc(14); +$form-label-font-weight: $global-weight-normal; +$form-label-line-height: 1.8; +$select-background: $white; +$select-triangle-color: $dark-gray; +$select-radius: $global-radius; +$input-color: $black; +$input-placeholder-color: $medium-gray; +$input-font-family: inherit; +$input-font-size: rem-calc(16); +$input-font-weight: $global-weight-normal; +$input-background: $white; +$input-background-focus: $white; +$input-background-disabled: $light-gray; +$input-border: 1px solid $medium-gray; +$input-border-focus: 1px solid $dark-gray; +$input-shadow: inset 0 1px 2px rgba($black, 0.1); +$input-shadow-focus: 0 0 5px $medium-gray; +$input-cursor-disabled: not-allowed; +$input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out; +$input-number-spinners: true; +$input-radius: $global-radius; +$form-button-radius: $global-radius; + +// 20. Label +// --------- + +$label-background: $primary-color; +$label-color: $white; +$label-color-alt: $black; +$label-palette: $foundation-palette; +$label-font-size: 0.8rem; +$label-padding: 0.33333rem 0.5rem; +$label-radius: $global-radius; + +// 21. Media Object +// ---------------- + +$mediaobject-margin-bottom: $global-margin; +$mediaobject-section-padding: $global-padding; +$mediaobject-image-width-stacked: 100%; + +// 22. Menu +// -------- + +$menu-margin: 0; +$menu-margin-nested: 1rem; +$menu-item-padding: 0.7rem 1rem; +$menu-item-color-active: $white; +$menu-item-background-active: get-color(primary); +$menu-icon-spacing: 0.25rem; +$menu-item-background-hover: $light-gray; +$menu-border: $light-gray; + +// 23. Meter +// --------- + +$meter-height: 1rem; +$meter-radius: $global-radius; +$meter-background: $medium-gray; +$meter-fill-good: $success-color; +$meter-fill-medium: $warning-color; +$meter-fill-bad: $alert-color; + +// 24. Off-canvas +// -------------- + +$offcanvas-size: 250px; +$offcanvas-vertical-size: 250px; +$offcanvas-background: $light-gray; +$offcanvas-shadow: 0 0 10px rgba($black, 0.7); +$offcanvas-push-zindex: 1; +$offcanvas-overlap-zindex: 10; +$offcanvas-reveal-zindex: 1; +$offcanvas-transition-length: 0.5s; +$offcanvas-transition-timing: ease; +$offcanvas-fixed-reveal: true; +$offcanvas-exit-background: rgba($white, 0.25); +$maincontent-class: 'off-canvas-content'; + +// 25. Orbit +// --------- + +$orbit-bullet-background: $medium-gray; +$orbit-bullet-background-active: $dark-gray; +$orbit-bullet-diameter: 1.2rem; +$orbit-bullet-margin: 0.1rem; +$orbit-bullet-margin-top: 0.8rem; +$orbit-bullet-margin-bottom: 0.8rem; +$orbit-caption-background: rgba($black, 0.5); +$orbit-caption-padding: 1rem; +$orbit-control-background-hover: rgba($black, 0.5); +$orbit-control-padding: 1rem; +$orbit-control-zindex: 10; + +// 26. Pagination +// -------------- + +$pagination-font-size: rem-calc(14); +$pagination-margin-bottom: $global-margin; +$pagination-item-color: $black; +$pagination-item-padding: rem-calc(3 10); +$pagination-item-spacing: rem-calc(1); +$pagination-radius: $global-radius; +$pagination-item-background-hover: $light-gray; +$pagination-item-background-current: $primary-color; +$pagination-item-color-current: $white; +$pagination-item-color-disabled: $medium-gray; +$pagination-ellipsis-color: $black; +$pagination-mobile-items: false; +$pagination-mobile-current-item: false; +$pagination-arrows: true; + +// 27. Progress Bar +// ---------------- + +$progress-height: 1rem; +$progress-background: $medium-gray; +$progress-margin-bottom: $global-margin; +$progress-meter-background: $primary-color; +$progress-radius: $global-radius; + +// 28. Responsive Embed +// -------------------- + +$responsive-embed-margin-bottom: rem-calc(16); +$responsive-embed-ratios: ( + default: 4 by 3, + widescreen: 16 by 9, +); + +// 29. Reveal +// ---------- + +$reveal-background: $white; +$reveal-width: 600px; +$reveal-max-width: $global-width; +$reveal-padding: $global-padding; +$reveal-border: 1px solid $medium-gray; +$reveal-radius: $global-radius; +$reveal-zindex: 1005; +$reveal-overlay-background: rgba($black, 0.45); + +// 30. Slider +// ---------- + +$slider-width-vertical: 0.5rem; +$slider-transition: all 0.2s ease-in-out; +$slider-height: 0.5rem; +$slider-background: $light-gray; +$slider-fill-background: $medium-gray; +$slider-handle-height: 1.4rem; +$slider-handle-width: 1.4rem; +$slider-handle-background: $primary-color; +$slider-opacity-disabled: 0.25; +$slider-radius: $global-radius; + +// 31. Switch +// ---------- + +$switch-background: $medium-gray; +$switch-background-active: $primary-color; +$switch-height: 2rem; +$switch-height-tiny: 1.5rem; +$switch-height-small: 1.75rem; +$switch-height-large: 2.5rem; +$switch-radius: $global-radius; +$switch-margin: $global-margin; +$switch-paddle-background: $white; +$switch-paddle-offset: 0.25rem; +$switch-paddle-radius: $global-radius; +$switch-paddle-transition: all 0.25s ease-out; + +// 32. Table +// --------- + +$table-background: $white; +$table-color-scale: 5%; +$table-border: 1px solid smart-scale($table-background, $table-color-scale); +$table-padding: rem-calc(8 10 10); +$table-hover-scale: 2%; +$table-row-hover: darken($table-background, $table-hover-scale); +$table-row-stripe-hover: darken($table-background, $table-color-scale + $table-hover-scale); +$table-is-striped: true; +$table-striped-background: smart-scale($table-background, $table-color-scale); +$table-stripe: even; +$table-head-background: smart-scale($table-background, $table-color-scale / 2); +$table-head-row-hover: darken($table-head-background, $table-hover-scale); +$table-foot-background: smart-scale($table-background, $table-color-scale); +$table-foot-row-hover: darken($table-foot-background, $table-hover-scale); +$table-head-font-color: $body-font-color; +$table-foot-font-color: $body-font-color; +$show-header-for-stacked: false; + +// 33. Tabs +// -------- + +$tab-margin: 0; +$tab-background: $white; +$tab-color: $primary-color; +$tab-background-active: $light-gray; +$tab-active-color: $primary-color; +$tab-item-font-size: rem-calc(12); +$tab-item-background-hover: $white; +$tab-item-padding: 1.25rem 1.5rem; +$tab-expand-max: 6; +$tab-content-background: $white; +$tab-content-border: $light-gray; +$tab-content-color: $body-font-color; +$tab-content-padding: 1rem; + +// 34. Thumbnail +// ------------- + +$thumbnail-border: solid 4px $white; +$thumbnail-margin-bottom: $global-margin; +$thumbnail-shadow: 0 0 0 1px rgba($black, 0.2); +$thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5); +$thumbnail-transition: box-shadow 200ms ease-out; +$thumbnail-radius: $global-radius; + +// 35. Title Bar +// ------------- + +$titlebar-background: $black; +$titlebar-color: $white; +$titlebar-padding: 0.5rem; +$titlebar-text-font-weight: bold; +$titlebar-icon-color: $white; +$titlebar-icon-color-hover: $medium-gray; +$titlebar-icon-spacing: 0.25rem; + +// 36. Tooltip +// ----------- + +$has-tip-font-weight: $global-weight-bold; +$has-tip-border-bottom: dotted 1px $dark-gray; +$tooltip-background-color: $black; +$tooltip-color: $white; +$tooltip-padding: 0.75rem; +$tooltip-font-size: $small-font-size; +$tooltip-pip-width: 0.75rem; +$tooltip-pip-height: $tooltip-pip-width * 0.866; +$tooltip-radius: $global-radius; + +// 37. Top Bar +// ----------- + +$topbar-padding: 0.5rem; +$topbar-background: $light-gray; +$topbar-submenu-background: $topbar-background; +$topbar-title-spacing: 0.5rem 1rem 0.5rem 0; +$topbar-input-width: 200px; +$topbar-unstack-breakpoint: medium; diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss new file mode 100644 index 000000000..0ea8c0e50 --- /dev/null +++ b/app/assets/stylesheets/application.scss @@ -0,0 +1,85 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, + * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self +//= require foundation_and_overrides + + *= require foundation_and_overrides + + */ + +.hero-cow { + color: white; +} + .search-bar div { + display: inline-block; + } + +.footer-bar { + margin: 0; + background: none; +} + +.menu li { + display: inline-flex; + vertical-align: middle; +} + +header { + background-color: yellow; +} + +main { + background-image: url(grassy_background.jpg); + opacity: 50%; +} + +.card { + border-radius: 1rem; +} + +.small-cow { + max-height: 280px; + max-width: 280px; +} + +.next-card { + text-align: center; + vertical-align: middle; +} + +.recipe-cards { + padding-top: 2rem; + padding-bottom: 2rem; +} + +.yellow { + background-color: yellow; +} + +.white { + background-color: white; +} + +.ingredients-box { + display: block; + align-items: center; +} + +.ingredients li { + list-style: none; +} + +.recipe-photo { + margin-top: 1rem; +} diff --git a/app/assets/stylesheets/foundation_and_overrides.scss b/app/assets/stylesheets/foundation_and_overrides.scss new file mode 100644 index 000000000..206615508 --- /dev/null +++ b/app/assets/stylesheets/foundation_and_overrides.scss @@ -0,0 +1,53 @@ +@charset 'utf-8'; + +@import 'settings'; +@import 'foundation'; + +// If you'd like to include motion-ui the foundation-rails gem comes prepackaged with it, uncomment the 3 @imports, if you are not using the gem you need to install the motion-ui sass package. +// +// @import 'motion-ui/motion-ui'; + +// We include everything by default. To slim your CSS, remove components you don't use. + +@include foundation-global-styles; +@include foundation-grid; +@include foundation-typography; +@include foundation-button; +@include foundation-forms; +@include foundation-visibility-classes; +@include foundation-float-classes; +@include foundation-accordion; +@include foundation-accordion-menu; +@include foundation-badge; +@include foundation-breadcrumbs; +@include foundation-button-group; +@include foundation-callout; +@include foundation-card; +@include foundation-close-button; +@include foundation-drilldown-menu; +@include foundation-dropdown; +@include foundation-dropdown-menu; +@include foundation-responsive-embed; +@include foundation-label; +@include foundation-media-object; +@include foundation-menu; +@include foundation-menu-icon; +@include foundation-off-canvas; +@include foundation-orbit; +@include foundation-pagination; +@include foundation-progress-bar; +@include foundation-slider; +@include foundation-sticky; +@include foundation-reveal; +@include foundation-switch; +@include foundation-table; +@include foundation-tabs; +@include foundation-thumbnail; +@include foundation-title-bar; +@include foundation-tooltip; +@include foundation-top-bar; + +// If you'd like to include motion-ui the foundation-rails gem comes prepackaged with it, uncomment the 3 @imports, if you are not using the gem you need to install the motion-ui sass package. +// +// @include motion-ui-transitions; +// @include motion-ui-animations; diff --git a/app/assets/stylesheets/recipes.scss b/app/assets/stylesheets/recipes.scss new file mode 100644 index 000000000..1e10ffa50 --- /dev/null +++ b/app/assets/stylesheets/recipes.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the recipes controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb new file mode 100644 index 000000000..d67269728 --- /dev/null +++ b/app/channels/application_cable/channel.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Channel < ActionCable::Channel::Base + end +end diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb new file mode 100644 index 000000000..0ff5442f4 --- /dev/null +++ b/app/channels/application_cable/connection.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Connection < ActionCable::Connection::Base + end +end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb new file mode 100644 index 000000000..1c07694e9 --- /dev/null +++ b/app/controllers/application_controller.rb @@ -0,0 +1,3 @@ +class ApplicationController < ActionController::Base + protect_from_forgery with: :exception +end diff --git a/app/controllers/concerns/.keep b/app/controllers/concerns/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/controllers/recipes_controller.rb b/app/controllers/recipes_controller.rb new file mode 100644 index 000000000..bb4fa3225 --- /dev/null +++ b/app/controllers/recipes_controller.rb @@ -0,0 +1,15 @@ +class RecipesController < ApplicationController + attr_reader :pg_recipes, :page + + def home + end + + def index + @page = params[:page].to_i # increment page here + @recipes = EdamamApiWrapper.find_recipes(params[:q], @page) + end + + def show + @recipe = EdamamApiWrapper.find(params[:index]) + end +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb new file mode 100644 index 000000000..de6be7945 --- /dev/null +++ b/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/app/helpers/edamam_api_wrapper.rb b/app/helpers/edamam_api_wrapper.rb new file mode 100644 index 000000000..e71f3f19d --- /dev/null +++ b/app/helpers/edamam_api_wrapper.rb @@ -0,0 +1,2 @@ +module EdamamApiWrapper +end diff --git a/app/helpers/recipes_helper.rb b/app/helpers/recipes_helper.rb new file mode 100644 index 000000000..f526316e2 --- /dev/null +++ b/app/helpers/recipes_helper.rb @@ -0,0 +1,2 @@ +module RecipesHelper +end diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb new file mode 100644 index 000000000..a009ace51 --- /dev/null +++ b/app/jobs/application_job.rb @@ -0,0 +1,2 @@ +class ApplicationJob < ActiveJob::Base +end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb new file mode 100644 index 000000000..286b2239d --- /dev/null +++ b/app/mailers/application_mailer.rb @@ -0,0 +1,4 @@ +class ApplicationMailer < ActionMailer::Base + default from: 'from@example.com' + layout 'mailer' +end diff --git a/app/models/application_record.rb b/app/models/application_record.rb new file mode 100644 index 000000000..10a4cba84 --- /dev/null +++ b/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/app/models/concerns/.keep b/app/models/concerns/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/models/recipe.rb b/app/models/recipe.rb new file mode 100644 index 000000000..537779247 --- /dev/null +++ b/app/models/recipe.rb @@ -0,0 +1,15 @@ +class Recipe < ApplicationRecord + attr_reader :uri, :label, :url, :image, :ingredients, :dietary, :yield, :source, :calories + + def initialize(recipe) + @uri = recipe["recipe"]["uri"] + @label = recipe["recipe"]["label"] + @url = recipe["recipe"]["shareAs"] + @image = recipe["recipe"]["image"] + @ingredients = recipe["recipe"]["ingredientLines"] + @dietary = recipe["recipe"]["healthLabels"] + @yield = recipe["recipe"]["yield"] + @source = recipe["recipe"]["source"] + @calories = recipe["recipe"]["calories"].to_i + end +end diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 000000000..379658a50 --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,2 @@ +class User < ApplicationRecord +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb new file mode 100644 index 000000000..fb693c2e4 --- /dev/null +++ b/app/views/layouts/application.html.erb @@ -0,0 +1,58 @@ + + + + + + + No Moo + + <%= stylesheet_link_tag "application", media: "all" %> + <%= javascript_include_tag "application", 'data-turbolinks-track' => true %> + <%= csrf_meta_tags %> + + + + + +
+ + +
+ <% flash.each do |name, message| %> +
<%= message %>
+ <% end %> +
+
+ +
+ <%= yield %> +
+ + + + diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb new file mode 100644 index 000000000..cbd34d2e9 --- /dev/null +++ b/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/app/views/layouts/mailer.text.erb b/app/views/layouts/mailer.text.erb new file mode 100644 index 000000000..37f0bddbd --- /dev/null +++ b/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/app/views/recipes/home.html.erb b/app/views/recipes/home.html.erb new file mode 100644 index 000000000..1b63f6843 --- /dev/null +++ b/app/views/recipes/home.html.erb @@ -0,0 +1,10 @@ + + +
+

hey, you!

+

search your way to a happier tummy with NoMoo

+
+ <%= image_tag "cow.png" %> +
+

dairy-free recipes just for you

+
diff --git a/app/views/recipes/index.html.erb b/app/views/recipes/index.html.erb new file mode 100644 index 000000000..372bee164 --- /dev/null +++ b/app/views/recipes/index.html.erb @@ -0,0 +1,38 @@ + +
+
+
+
+

Your Recipes

+
<%= "Showing 10 results at a time from your search \"#{params[:q]}\"." %>
+
+
+ <%= image_tag "cow.png" %> +
+
+
+ + <% @recipes.each_with_index do |recipe, i| %> +
+
+
+ +
+
+
<%= link_to recipe.label, recipe_path(i) %>
+
+
+
+ <% end %> + +
+
+
+ <%= image_tag "cow.png" %> +
+
+

<%= link_to "next", recipes_path( q: params[:q], page: params[:page].to_i + 1, class: "button" ) %>

+
+
+
+
diff --git a/app/views/recipes/search.html.erb b/app/views/recipes/search.html.erb new file mode 100644 index 000000000..b30f1c853 --- /dev/null +++ b/app/views/recipes/search.html.erb @@ -0,0 +1,15 @@ +

Your Recipes

+ + + +<% if @recipes.empty? %> + <%= flash[:message] = "No recipes found with your search." %> +<% else %> + <%= flash[:message] = "Recipes found!" %> +

<%= "#{@recipes.count} recipes found for your search '#{params[:q]}'." %>

+ + <% @recipes.each_with_index do |recipe, i| %> + +

<%= link_to recipe.label, recipe_path(i) %>

+ <% end %> +<% end %> diff --git a/app/views/recipes/show.html.erb b/app/views/recipes/show.html.erb new file mode 100644 index 000000000..56b3553d0 --- /dev/null +++ b/app/views/recipes/show.html.erb @@ -0,0 +1,42 @@ + + +<% if @recipe.nil? %> + <%= flash[:message] = "Your recipe could not be found." %> +<% end %> + +
+
+

<%= @recipe.label %>

+ +
+ +
+ <% @recipe.dietary.each do |label| %> + <%= "#{label}" %>   + <% end %> +
+
+ +
+
+
.
+
+

Ingredients

+

(Recipe for <%= @recipe.yield.to_i %>)

+
    + <% @recipe.ingredients.each do |ingredient| %> +
  • <%= ingredient %>
  • + <% end %> +
+ +

<%= @recipe.calories %> kcal

+
+
.
+
+
+ + +
diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 000000000..66e9889e8 --- /dev/null +++ b/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/bin/rails b/bin/rails new file mode 100755 index 000000000..5badb2fde --- /dev/null +++ b/bin/rails @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +APP_PATH = File.expand_path('../config/application', __dir__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/bin/rake b/bin/rake new file mode 100755 index 000000000..d87d5f578 --- /dev/null +++ b/bin/rake @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/bin/setup b/bin/setup new file mode 100755 index 000000000..e620b4dad --- /dev/null +++ b/bin/setup @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + # puts "\n== Copying sample files ==" + # unless File.exist?('config/database.yml') + # cp 'config/database.yml.sample', 'config/database.yml' + # end + + puts "\n== Preparing database ==" + system! 'bin/rails db:setup' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/bin/spring b/bin/spring new file mode 100755 index 000000000..fb2ec2ebb --- /dev/null +++ b/bin/spring @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby + +# This file loads spring without using Bundler, in order to be fast. +# It gets overwritten when you run the `spring binstub` command. + +unless defined?(Spring) + require 'rubygems' + require 'bundler' + + lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) + spring = lockfile.specs.detect { |spec| spec.name == "spring" } + if spring + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path + gem 'spring', spring.version + require 'spring/binstub' + end +end diff --git a/bin/update b/bin/update new file mode 100755 index 000000000..a8e4462f2 --- /dev/null +++ b/bin/update @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a way to update your development environment automatically. + # Add necessary update steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + puts "\n== Updating database ==" + system! 'bin/rails db:migrate' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/config.ru b/config.ru new file mode 100644 index 000000000..f7ba0b527 --- /dev/null +++ b/config.ru @@ -0,0 +1,5 @@ +# This file is used by Rack-based servers to start the application. + +require_relative 'config/environment' + +run Rails.application diff --git a/config/application.rb b/config/application.rb new file mode 100644 index 000000000..3921fe43f --- /dev/null +++ b/config/application.rb @@ -0,0 +1,23 @@ +require_relative 'boot' + +require 'rails/all' + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module ApiMuncher + class Application < Rails::Application + config.autoload_paths << Rails.root.join('lib') + # compress files with gzip + config.middleware.use Rack::Deflater + + # Force new test files to be generated in the minitest-spec style + config.generators do |g| + g.test_framework :minitest, spec: true + end + # Settings in config/environments/* take precedence over those specified here. + # Application configuration should go into files in config/initializers + # -- all .rb files in that directory are automatically loaded. + end +end diff --git a/config/boot.rb b/config/boot.rb new file mode 100644 index 000000000..30f5120df --- /dev/null +++ b/config/boot.rb @@ -0,0 +1,3 @@ +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) + +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/config/cable.yml b/config/cable.yml new file mode 100644 index 000000000..0bbde6f74 --- /dev/null +++ b/config/cable.yml @@ -0,0 +1,9 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: redis://localhost:6379/1 diff --git a/config/database.yml b/config/database.yml new file mode 100644 index 000000000..1c5ce1b69 --- /dev/null +++ b/config/database.yml @@ -0,0 +1,85 @@ +# PostgreSQL. Versions 9.1 and up are supported. +# +# Install the pg driver: +# gem install pg +# On OS X with Homebrew: +# gem install pg -- --with-pg-config=/usr/local/bin/pg_config +# On OS X with MacPorts: +# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config +# On Windows: +# gem install pg +# Choose the win32 build. +# Install PostgreSQL and put its /bin directory on your path. +# +# Configure Using Gemfile +# gem 'pg' +# +default: &default + adapter: postgresql + encoding: unicode + # For details on connection pooling, see rails configuration guide + # http://guides.rubyonrails.org/configuring.html#database-pooling + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + +development: + <<: *default + database: api-muncher_development + + # The specified database role being used to connect to postgres. + # To create additional roles in postgres see `$ createuser --help`. + # When left blank, postgres will use the default role. This is + # the same name as the operating system user that initialized the database. + #username: api-muncher + + # The password associated with the postgres role (username). + #password: + + # Connect on a TCP socket. Omitted by default since the client uses a + # domain socket that doesn't need configuration. Windows does not have + # domain sockets, so uncomment these lines. + #host: localhost + + # The TCP port the server listens on. Defaults to 5432. + # If your server runs on a different port number, change accordingly. + #port: 5432 + + # Schema search path. The server defaults to $user,public + #schema_search_path: myapp,sharedapp,public + + # Minimum log levels, in increasing order: + # debug5, debug4, debug3, debug2, debug1, + # log, notice, warning, error, fatal, and panic + # Defaults to warning. + #min_messages: notice + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: api-muncher_test + +# As with config/secrets.yml, you never want to store sensitive information, +# like your database password, in your source code. If your source code is +# ever seen by anyone, they now have access to your database. +# +# Instead, provide the password as a unix environment variable when you boot +# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database +# for a full rundown on how to provide these environment variables in a +# production deployment. +# +# On Heroku and other platform providers, you may have a full connection URL +# available as an environment variable. For example: +# +# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase" +# +# You can use this database configuration with: +# +# production: +# url: <%= ENV['DATABASE_URL'] %> +# +production: + <<: *default + database: api-muncher_production + username: api-muncher + password: <%= ENV['API-MUNCHER_DATABASE_PASSWORD'] %> diff --git a/config/environment.rb b/config/environment.rb new file mode 100644 index 000000000..426333bb4 --- /dev/null +++ b/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative 'application' + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb new file mode 100644 index 000000000..6f7197045 --- /dev/null +++ b/config/environments/development.rb @@ -0,0 +1,54 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + if Rails.root.join('tmp/caching-dev.txt').exist? + config.action_controller.perform_caching = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=172800' + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + + # Suppress logger output for asset requests. + config.assets.quiet = true + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + config.file_watcher = ActiveSupport::EventedFileUpdateChecker +end diff --git a/config/environments/production.rb b/config/environments/production.rb new file mode 100644 index 000000000..2a3bd799e --- /dev/null +++ b/config/environments/production.rb @@ -0,0 +1,86 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Mount Action Cable outside main process or domain + # config.action_cable.mount_path = nil + # config.action_cable.url = 'wss://example.com/cable' + # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment) + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "api-muncher_#{Rails.env}" + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Use a different logger for distributed setups. + # require 'syslog/logger' + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false +end diff --git a/config/environments/test.rb b/config/environments/test.rb new file mode 100644 index 000000000..30587ef6d --- /dev/null +++ b/config/environments/test.rb @@ -0,0 +1,42 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # The test environment is used exclusively to run your application's + # test suite. You never need to work with it otherwise. Remember that + # your test database is "scratch space" for the test suite and is wiped + # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=3600' + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true +end diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb new file mode 100644 index 000000000..51639b67a --- /dev/null +++ b/config/initializers/application_controller_renderer.rb @@ -0,0 +1,6 @@ +# Be sure to restart your server when you modify this file. + +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 000000000..01ef3e663 --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1,11 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '1.0' + +# Add additional assets to the asset load path +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. +# Rails.application.config.assets.precompile += %w( search.js ) diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb new file mode 100644 index 000000000..59385cdf3 --- /dev/null +++ b/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# Rails.backtrace_cleaner.remove_silencers! diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb new file mode 100644 index 000000000..5a6a32d37 --- /dev/null +++ b/config/initializers/cookies_serializer.rb @@ -0,0 +1,5 @@ +# Be sure to restart your server when you modify this file. + +# Specify a serializer for the signed and encrypted cookie jars. +# Valid options are :json, :marshal, and :hybrid. +Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb new file mode 100644 index 000000000..4a994e1e7 --- /dev/null +++ b/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb new file mode 100644 index 000000000..ac033bf9d --- /dev/null +++ b/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb new file mode 100644 index 000000000..7921e5fc2 --- /dev/null +++ b/config/initializers/kaminari_config.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true +# Kaminari.configure do |config| +# # config.default_per_page = 10 +# # config.max_per_page = nil +# # config.window = 4 +# # config.outer_window = 0 +# # config.left = 0 +# # config.right = 0 +# # config.page_method_name = :page +# # config.param_name = :page +# # config.params_on_first_page = false +# end diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb new file mode 100644 index 000000000..dc1899682 --- /dev/null +++ b/config/initializers/mime_types.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb new file mode 100644 index 000000000..671abb69a --- /dev/null +++ b/config/initializers/new_framework_defaults.rb @@ -0,0 +1,24 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 5.0 upgrade. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Enable per-form CSRF tokens. Previous versions had false. +Rails.application.config.action_controller.per_form_csrf_tokens = true + +# Enable origin-checking CSRF mitigation. Previous versions had false. +Rails.application.config.action_controller.forgery_protection_origin_check = true + +# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. +# Previous versions had false. +ActiveSupport.to_time_preserves_timezone = true + +# Require `belongs_to` associations by default. Previous versions had false. +Rails.application.config.active_record.belongs_to_required_by_default = true + +# Do not halt callback chains when a callback returns false. Previous versions had true. +ActiveSupport.halt_callback_chains_on_return_false = false + +# Configure SSL options to enable HSTS with subdomains. Previous versions had false. +Rails.application.config.ssl_options = { hsts: { subdomains: true } } diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb new file mode 100644 index 000000000..6cc0e03e4 --- /dev/null +++ b/config/initializers/session_store.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.session_store :cookie_store, key: '_api-muncher_session' diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb new file mode 100644 index 000000000..bbfc3961b --- /dev/null +++ b/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] +end + +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 000000000..065395716 --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,23 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 000000000..c7f311f81 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,47 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum, this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests, default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +# preload_app! + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted this block will be run, if you are using `preload_app!` +# option you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, Ruby +# cannot share connections between processes. +# +# on_worker_boot do +# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +# end + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/config/routes.rb b/config/routes.rb new file mode 100644 index 000000000..33cc6a2e0 --- /dev/null +++ b/config/routes.rb @@ -0,0 +1,5 @@ +Rails.application.routes.draw do + root 'recipes#home' + get '/recipes/page/:page', to: 'recipes#index', defaults: {page: 1}, as: 'recipes' + get '/recipes/:index', to: 'recipes#show', as: 'recipe' +end diff --git a/config/secrets.yml b/config/secrets.yml new file mode 100644 index 000000000..0cebf7a09 --- /dev/null +++ b/config/secrets.yml @@ -0,0 +1,22 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +# You can use `rails secret` to generate a secure secret key. + +# Make sure the secrets in this file are kept private +# if you're sharing your code publicly. + +development: + secret_key_base: 598b1252b67ac28a16aba0bf59eae8d4e7003c0bd37e8030b329980f3f4eb98cf4bbcf69d2f513794ef7831974618106a63a12877c6c93e8902a65112d4fd7fb + +test: + secret_key_base: 9920cce07b1fc3371d2b8d1cafbd478b9062e6846bddcdebfe1f0a55ea429b48595d4e04ee50ed2402db21b8a9ce2899033a7cd614425de7322e47fc1edd2a4e + +# Do not keep production secrets in the repository, +# instead read values from the environment. +production: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/config/spring.rb b/config/spring.rb new file mode 100644 index 000000000..c9119b40c --- /dev/null +++ b/config/spring.rb @@ -0,0 +1,6 @@ +%w( + .ruby-version + .rbenv-vars + tmp/restart.txt + tmp/caching-dev.txt +).each { |path| Spring.watch(path) } diff --git a/db/migrate/20170504164518_create_users.rb b/db/migrate/20170504164518_create_users.rb new file mode 100644 index 000000000..4a6614335 --- /dev/null +++ b/db/migrate/20170504164518_create_users.rb @@ -0,0 +1,10 @@ +class CreateUsers < ActiveRecord::Migration[5.0] + def change + create_table :users do |t| + t.string :username + t.string :email + + t.timestamps + end + end +end diff --git a/db/migrate/20170509094219_create_recipes.rb b/db/migrate/20170509094219_create_recipes.rb new file mode 100644 index 000000000..3a9136637 --- /dev/null +++ b/db/migrate/20170509094219_create_recipes.rb @@ -0,0 +1,8 @@ +class CreateRecipes < ActiveRecord::Migration[5.0] + def change + create_table :recipes do |t| + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 000000000..98ccd61ed --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,30 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20170509094219) do + + # These are extensions that must be enabled in order to support this database + enable_extension "plpgsql" + + create_table "recipes", force: :cascade do |t| + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "users", force: :cascade do |t| + t.string "username" + t.string "email" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + +end diff --git a/db/seeds.rb b/db/seeds.rb new file mode 100644 index 000000000..1beea2acc --- /dev/null +++ b/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) +# Character.create(name: 'Luke', movie: movies.first) diff --git a/lib/assets/.keep b/lib/assets/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/lib/edamam_api_wrapper.rb b/lib/edamam_api_wrapper.rb new file mode 100644 index 000000000..2c1d96e35 --- /dev/null +++ b/lib/edamam_api_wrapper.rb @@ -0,0 +1,36 @@ +BASE_URL = "https://api.edamam.com/search\?" +EDAMAM_ID = ENV["EDAMAM_ID"] +EDAMAM_KEY = ENV["EDAMAM_KEY"] + +class EdamamApiWrapper + attr_reader :all_recipes, :count + + def self.find_recipes(query, page) + if page + per_page = 10 + from = (page - 1) * per_page + to = page * per_page + + query_params = { + "q" => query, + "id" => EDAMAM_ID, + "app_key" => EDAMAM_KEY, + "from" => from, + "to" => to, + "health" => "dairy-free", + } + + response = HTTParty.get(BASE_URL, query: query_params).parsed_response + recipe_collection = Array.new + response["hits"].map { |recipe| recipe_collection << Recipe.new(recipe) } + @count = response["count"] + @all_recipes = recipe_collection + else + ArgumentError.new("invalid page") + end + end + + def self.find(index) + @all_recipes[index.to_i] + end +end diff --git a/lib/tasks/.keep b/lib/tasks/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/log/.keep b/log/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/public/404.html b/public/404.html new file mode 100644 index 000000000..b612547fc --- /dev/null +++ b/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/422.html b/public/422.html new file mode 100644 index 000000000..a21f82b3b --- /dev/null +++ b/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/500.html b/public/500.html new file mode 100644 index 000000000..061abc587 --- /dev/null +++ b/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/apple-touch-icon-precomposed.png b/public/apple-touch-icon-precomposed.png new file mode 100644 index 000000000..e69de29bb diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 000000000..e69de29bb diff --git a/public/assets/.sprockets-manifest-1122e23cacbd73caabe11d134ec9d68f.json b/public/assets/.sprockets-manifest-1122e23cacbd73caabe11d134ec9d68f.json new file mode 100644 index 000000000..812c2fd55 --- /dev/null +++ b/public/assets/.sprockets-manifest-1122e23cacbd73caabe11d134ec9d68f.json @@ -0,0 +1 @@ +{"files":{"cow-433f052ce83ed226236fa1829f49e619c482c5cd0b39ccaf0f4aea188410e785.png":{"logical_path":"cow.png","mtime":"2017-05-09T06:51:45-07:00","size":99027,"digest":"433f052ce83ed226236fa1829f49e619c482c5cd0b39ccaf0f4aea188410e785","integrity":"sha256-Qz8FLOg+0iYjb6GCn0nmGcSCxc0LOcyvD0rqGIQQ54U="},"grassy_background-4d5c4abcdf42706017b64b2a1d02d442284c0f567010ac47525193ad11c2428a.jpg":{"logical_path":"grassy_background.jpg","mtime":"2017-05-09T10:34:31-07:00","size":1460078,"digest":"4d5c4abcdf42706017b64b2a1d02d442284c0f567010ac47525193ad11c2428a","integrity":"sha256-TVxKvN9CcGAXtksqHQLUQihMD1ZwEKxHUlGTrRHCQoo="},"logo-c63fc59e4be79dbb85fef0ce57bf7104b42ad9bd761655f91d490c3ceedda05d.jpg":{"logical_path":"logo.jpg","mtime":"2017-05-07T09:46:58-07:00","size":14603,"digest":"c63fc59e4be79dbb85fef0ce57bf7104b42ad9bd761655f91d490c3ceedda05d","integrity":"sha256-xj/FnkvnnbuF/vDOV79xBLQq2b12FlX5HUkMPO7doF0="},"logo-8efa3fda66cbc7de9fe4e0262a03ca3ae0cb09f9aecc840988d75d1c929b0277.png":{"logical_path":"logo.png","mtime":"2017-05-07T09:46:32-07:00","size":21506,"digest":"8efa3fda66cbc7de9fe4e0262a03ca3ae0cb09f9aecc840988d75d1c929b0277","integrity":"sha256-jvo/2mbLx96f5OAmKgPKOuDLCfmuzIQJiNddHJKbAnc="},"application-9e023c92b003df8e2fa4aa3a6a331ea79d8a6e3ecebdf37a16a0f84a6d896960.js":{"logical_path":"application.js","mtime":"2017-05-11T23:02:17-07:00","size":276991,"digest":"9e023c92b003df8e2fa4aa3a6a331ea79d8a6e3ecebdf37a16a0f84a6d896960","integrity":"sha256-ngI8krAD344vpKo6ajMep52Kbj7OvfN6FqD4Sm2JaWA="},"application-3259c52241b42227168b494d8b89f1c1e0af214eca4904d60d9da470b4054e21.css":{"logical_path":"application.css","mtime":"2017-05-12T14:00:07-07:00","size":71166,"digest":"3259c52241b42227168b494d8b89f1c1e0af214eca4904d60d9da470b4054e21","integrity":"sha256-MlnFIkG0IicWi0lNi4nxweCvIU7KSQTWDZ2kcLQFTiE="}},"assets":{"cow.png":"cow-433f052ce83ed226236fa1829f49e619c482c5cd0b39ccaf0f4aea188410e785.png","grassy_background.jpg":"grassy_background-4d5c4abcdf42706017b64b2a1d02d442284c0f567010ac47525193ad11c2428a.jpg","logo.jpg":"logo-c63fc59e4be79dbb85fef0ce57bf7104b42ad9bd761655f91d490c3ceedda05d.jpg","logo.png":"logo-8efa3fda66cbc7de9fe4e0262a03ca3ae0cb09f9aecc840988d75d1c929b0277.png","application.js":"application-9e023c92b003df8e2fa4aa3a6a331ea79d8a6e3ecebdf37a16a0f84a6d896960.js","application.css":"application-3259c52241b42227168b494d8b89f1c1e0af214eca4904d60d9da470b4054e21.css"}} \ No newline at end of file diff --git a/public/assets/application-3259c52241b42227168b494d8b89f1c1e0af214eca4904d60d9da470b4054e21.css b/public/assets/application-3259c52241b42227168b494d8b89f1c1e0af214eca4904d60d9da470b4054e21.css new file mode 100644 index 000000000..ee1c438da --- /dev/null +++ b/public/assets/application-3259c52241b42227168b494d8b89f1c1e0af214eca4904d60d9da470b4054e21.css @@ -0,0 +1 @@ +@import url("https://fonts.googleapis.com/css?family=Short+Stack");@import url("https://fonts.googleapis.com/css?family=Short+Stack");/*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:0.67em 0}figcaption,figure{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}main{display:block}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}input{overflow:visible}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{box-sizing:border-box;display:table;max-width:100%;padding:0;color:inherit;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}details{display:block}summary{display:list-item}menu{display:block}canvas{display:inline-block}template{display:none}[hidden]{display:none}.foundation-mq{font-family:"small=0em&medium=40em&large=64em&xlarge=75em&xxlarge=90em"}html{box-sizing:border-box;font-size:100%}*,*::before,*::after{box-sizing:inherit}body{margin:0;padding:0;background:#fefefe;font-family:"Short Stack", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:normal;line-height:1.5;color:#0a0a0a;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img{display:inline-block;vertical-align:middle;max-width:100%;height:auto;-ms-interpolation-mode:bicubic}textarea{height:auto;min-height:50px;border-radius:0}select{box-sizing:border-box;width:100%;border-radius:0}.map_canvas img,.map_canvas embed,.map_canvas object,.mqa-display img,.mqa-display embed,.mqa-display object{max-width:none !important}button{padding:0;appearance:none;border:0;border-radius:0;background:transparent;line-height:1}[data-whatinput='mouse'] button{outline:0}pre{overflow:auto}.is-visible{display:block !important}.is-hidden{display:none !important}.row{max-width:75rem;margin-right:auto;margin-left:auto}.row::before,.row::after{display:table;content:' '}.row::after{clear:both}.row.collapse>.column,.row.collapse>.columns{padding-right:0;padding-left:0}.row .row{margin-right:-0.625rem;margin-left:-0.625rem}@media print, screen and (min-width: 40em){.row .row{margin-right:-0.9375rem;margin-left:-0.9375rem}}@media print, screen and (min-width: 64em){.row .row{margin-right:-0.9375rem;margin-left:-0.9375rem}}.row .row.collapse{margin-right:0;margin-left:0}.row.expanded{max-width:none}.row.expanded .row{margin-right:auto;margin-left:auto}.row:not(.expanded) .row{max-width:none}.row.gutter-small>.column,.row.gutter-small>.columns{padding-right:0.625rem;padding-left:0.625rem}.row.gutter-medium>.column,.row.gutter-medium>.columns{padding-right:0.9375rem;padding-left:0.9375rem}.column,.columns{width:100%;float:left;padding-right:0.625rem;padding-left:0.625rem}@media print, screen and (min-width: 40em){.column,.columns{padding-right:0.9375rem;padding-left:0.9375rem}}.column:last-child:not(:first-child),.columns:last-child:not(:first-child){float:right}.column.end:last-child:last-child,.end.columns:last-child:last-child{float:left}.column.row.row,.row.row.columns{float:none}.row .column.row.row,.row .row.row.columns{margin-right:0;margin-left:0;padding-right:0;padding-left:0}.small-1{width:8.33333%}.small-push-1{position:relative;left:8.33333%}.small-pull-1{position:relative;left:-8.33333%}.small-offset-0{margin-left:0%}.small-2{width:16.66667%}.small-push-2{position:relative;left:16.66667%}.small-pull-2{position:relative;left:-16.66667%}.small-offset-1{margin-left:8.33333%}.small-3{width:25%}.small-push-3{position:relative;left:25%}.small-pull-3{position:relative;left:-25%}.small-offset-2{margin-left:16.66667%}.small-4{width:33.33333%}.small-push-4{position:relative;left:33.33333%}.small-pull-4{position:relative;left:-33.33333%}.small-offset-3{margin-left:25%}.small-5{width:41.66667%}.small-push-5{position:relative;left:41.66667%}.small-pull-5{position:relative;left:-41.66667%}.small-offset-4{margin-left:33.33333%}.small-6{width:50%}.small-push-6{position:relative;left:50%}.small-pull-6{position:relative;left:-50%}.small-offset-5{margin-left:41.66667%}.small-7{width:58.33333%}.small-push-7{position:relative;left:58.33333%}.small-pull-7{position:relative;left:-58.33333%}.small-offset-6{margin-left:50%}.small-8{width:66.66667%}.small-push-8{position:relative;left:66.66667%}.small-pull-8{position:relative;left:-66.66667%}.small-offset-7{margin-left:58.33333%}.small-9{width:75%}.small-push-9{position:relative;left:75%}.small-pull-9{position:relative;left:-75%}.small-offset-8{margin-left:66.66667%}.small-10{width:83.33333%}.small-push-10{position:relative;left:83.33333%}.small-pull-10{position:relative;left:-83.33333%}.small-offset-9{margin-left:75%}.small-11{width:91.66667%}.small-push-11{position:relative;left:91.66667%}.small-pull-11{position:relative;left:-91.66667%}.small-offset-10{margin-left:83.33333%}.small-12{width:100%}.small-offset-11{margin-left:91.66667%}.small-up-1>.column,.small-up-1>.columns{float:left;width:100%}.small-up-1>.column:nth-of-type(1n),.small-up-1>.columns:nth-of-type(1n){clear:none}.small-up-1>.column:nth-of-type(1n+1),.small-up-1>.columns:nth-of-type(1n+1){clear:both}.small-up-1>.column:last-child,.small-up-1>.columns:last-child{float:left}.small-up-2>.column,.small-up-2>.columns{float:left;width:50%}.small-up-2>.column:nth-of-type(1n),.small-up-2>.columns:nth-of-type(1n){clear:none}.small-up-2>.column:nth-of-type(2n+1),.small-up-2>.columns:nth-of-type(2n+1){clear:both}.small-up-2>.column:last-child,.small-up-2>.columns:last-child{float:left}.small-up-3>.column,.small-up-3>.columns{float:left;width:33.33333%}.small-up-3>.column:nth-of-type(1n),.small-up-3>.columns:nth-of-type(1n){clear:none}.small-up-3>.column:nth-of-type(3n+1),.small-up-3>.columns:nth-of-type(3n+1){clear:both}.small-up-3>.column:last-child,.small-up-3>.columns:last-child{float:left}.small-up-4>.column,.small-up-4>.columns{float:left;width:25%}.small-up-4>.column:nth-of-type(1n),.small-up-4>.columns:nth-of-type(1n){clear:none}.small-up-4>.column:nth-of-type(4n+1),.small-up-4>.columns:nth-of-type(4n+1){clear:both}.small-up-4>.column:last-child,.small-up-4>.columns:last-child{float:left}.small-up-5>.column,.small-up-5>.columns{float:left;width:20%}.small-up-5>.column:nth-of-type(1n),.small-up-5>.columns:nth-of-type(1n){clear:none}.small-up-5>.column:nth-of-type(5n+1),.small-up-5>.columns:nth-of-type(5n+1){clear:both}.small-up-5>.column:last-child,.small-up-5>.columns:last-child{float:left}.small-up-6>.column,.small-up-6>.columns{float:left;width:16.66667%}.small-up-6>.column:nth-of-type(1n),.small-up-6>.columns:nth-of-type(1n){clear:none}.small-up-6>.column:nth-of-type(6n+1),.small-up-6>.columns:nth-of-type(6n+1){clear:both}.small-up-6>.column:last-child,.small-up-6>.columns:last-child{float:left}.small-up-7>.column,.small-up-7>.columns{float:left;width:14.28571%}.small-up-7>.column:nth-of-type(1n),.small-up-7>.columns:nth-of-type(1n){clear:none}.small-up-7>.column:nth-of-type(7n+1),.small-up-7>.columns:nth-of-type(7n+1){clear:both}.small-up-7>.column:last-child,.small-up-7>.columns:last-child{float:left}.small-up-8>.column,.small-up-8>.columns{float:left;width:12.5%}.small-up-8>.column:nth-of-type(1n),.small-up-8>.columns:nth-of-type(1n){clear:none}.small-up-8>.column:nth-of-type(8n+1),.small-up-8>.columns:nth-of-type(8n+1){clear:both}.small-up-8>.column:last-child,.small-up-8>.columns:last-child{float:left}.small-collapse>.column,.small-collapse>.columns{padding-right:0;padding-left:0}.small-collapse .row{margin-right:0;margin-left:0}.expanded.row .small-collapse.row{margin-right:0;margin-left:0}.small-uncollapse>.column,.small-uncollapse>.columns{padding-right:0.625rem;padding-left:0.625rem}.small-centered{margin-right:auto;margin-left:auto}.small-centered,.small-centered:last-child:not(:first-child){float:none;clear:both}.small-uncentered,.small-push-0,.small-pull-0{position:static;float:left;margin-right:0;margin-left:0}@media print, screen and (min-width: 40em){.medium-1{width:8.33333%}.medium-push-1{position:relative;left:8.33333%}.medium-pull-1{position:relative;left:-8.33333%}.medium-offset-0{margin-left:0%}.medium-2{width:16.66667%}.medium-push-2{position:relative;left:16.66667%}.medium-pull-2{position:relative;left:-16.66667%}.medium-offset-1{margin-left:8.33333%}.medium-3{width:25%}.medium-push-3{position:relative;left:25%}.medium-pull-3{position:relative;left:-25%}.medium-offset-2{margin-left:16.66667%}.medium-4{width:33.33333%}.medium-push-4{position:relative;left:33.33333%}.medium-pull-4{position:relative;left:-33.33333%}.medium-offset-3{margin-left:25%}.medium-5{width:41.66667%}.medium-push-5{position:relative;left:41.66667%}.medium-pull-5{position:relative;left:-41.66667%}.medium-offset-4{margin-left:33.33333%}.medium-6{width:50%}.medium-push-6{position:relative;left:50%}.medium-pull-6{position:relative;left:-50%}.medium-offset-5{margin-left:41.66667%}.medium-7{width:58.33333%}.medium-push-7{position:relative;left:58.33333%}.medium-pull-7{position:relative;left:-58.33333%}.medium-offset-6{margin-left:50%}.medium-8{width:66.66667%}.medium-push-8{position:relative;left:66.66667%}.medium-pull-8{position:relative;left:-66.66667%}.medium-offset-7{margin-left:58.33333%}.medium-9{width:75%}.medium-push-9{position:relative;left:75%}.medium-pull-9{position:relative;left:-75%}.medium-offset-8{margin-left:66.66667%}.medium-10{width:83.33333%}.medium-push-10{position:relative;left:83.33333%}.medium-pull-10{position:relative;left:-83.33333%}.medium-offset-9{margin-left:75%}.medium-11{width:91.66667%}.medium-push-11{position:relative;left:91.66667%}.medium-pull-11{position:relative;left:-91.66667%}.medium-offset-10{margin-left:83.33333%}.medium-12{width:100%}.medium-offset-11{margin-left:91.66667%}.medium-up-1>.column,.medium-up-1>.columns{float:left;width:100%}.medium-up-1>.column:nth-of-type(1n),.medium-up-1>.columns:nth-of-type(1n){clear:none}.medium-up-1>.column:nth-of-type(1n+1),.medium-up-1>.columns:nth-of-type(1n+1){clear:both}.medium-up-1>.column:last-child,.medium-up-1>.columns:last-child{float:left}.medium-up-2>.column,.medium-up-2>.columns{float:left;width:50%}.medium-up-2>.column:nth-of-type(1n),.medium-up-2>.columns:nth-of-type(1n){clear:none}.medium-up-2>.column:nth-of-type(2n+1),.medium-up-2>.columns:nth-of-type(2n+1){clear:both}.medium-up-2>.column:last-child,.medium-up-2>.columns:last-child{float:left}.medium-up-3>.column,.medium-up-3>.columns{float:left;width:33.33333%}.medium-up-3>.column:nth-of-type(1n),.medium-up-3>.columns:nth-of-type(1n){clear:none}.medium-up-3>.column:nth-of-type(3n+1),.medium-up-3>.columns:nth-of-type(3n+1){clear:both}.medium-up-3>.column:last-child,.medium-up-3>.columns:last-child{float:left}.medium-up-4>.column,.medium-up-4>.columns{float:left;width:25%}.medium-up-4>.column:nth-of-type(1n),.medium-up-4>.columns:nth-of-type(1n){clear:none}.medium-up-4>.column:nth-of-type(4n+1),.medium-up-4>.columns:nth-of-type(4n+1){clear:both}.medium-up-4>.column:last-child,.medium-up-4>.columns:last-child{float:left}.medium-up-5>.column,.medium-up-5>.columns{float:left;width:20%}.medium-up-5>.column:nth-of-type(1n),.medium-up-5>.columns:nth-of-type(1n){clear:none}.medium-up-5>.column:nth-of-type(5n+1),.medium-up-5>.columns:nth-of-type(5n+1){clear:both}.medium-up-5>.column:last-child,.medium-up-5>.columns:last-child{float:left}.medium-up-6>.column,.medium-up-6>.columns{float:left;width:16.66667%}.medium-up-6>.column:nth-of-type(1n),.medium-up-6>.columns:nth-of-type(1n){clear:none}.medium-up-6>.column:nth-of-type(6n+1),.medium-up-6>.columns:nth-of-type(6n+1){clear:both}.medium-up-6>.column:last-child,.medium-up-6>.columns:last-child{float:left}.medium-up-7>.column,.medium-up-7>.columns{float:left;width:14.28571%}.medium-up-7>.column:nth-of-type(1n),.medium-up-7>.columns:nth-of-type(1n){clear:none}.medium-up-7>.column:nth-of-type(7n+1),.medium-up-7>.columns:nth-of-type(7n+1){clear:both}.medium-up-7>.column:last-child,.medium-up-7>.columns:last-child{float:left}.medium-up-8>.column,.medium-up-8>.columns{float:left;width:12.5%}.medium-up-8>.column:nth-of-type(1n),.medium-up-8>.columns:nth-of-type(1n){clear:none}.medium-up-8>.column:nth-of-type(8n+1),.medium-up-8>.columns:nth-of-type(8n+1){clear:both}.medium-up-8>.column:last-child,.medium-up-8>.columns:last-child{float:left}.medium-collapse>.column,.medium-collapse>.columns{padding-right:0;padding-left:0}.medium-collapse .row{margin-right:0;margin-left:0}.expanded.row .medium-collapse.row{margin-right:0;margin-left:0}.medium-uncollapse>.column,.medium-uncollapse>.columns{padding-right:0.9375rem;padding-left:0.9375rem}.medium-centered{margin-right:auto;margin-left:auto}.medium-centered,.medium-centered:last-child:not(:first-child){float:none;clear:both}.medium-uncentered,.medium-push-0,.medium-pull-0{position:static;float:left;margin-right:0;margin-left:0}}@media print, screen and (min-width: 64em){.large-1{width:8.33333%}.large-push-1{position:relative;left:8.33333%}.large-pull-1{position:relative;left:-8.33333%}.large-offset-0{margin-left:0%}.large-2{width:16.66667%}.large-push-2{position:relative;left:16.66667%}.large-pull-2{position:relative;left:-16.66667%}.large-offset-1{margin-left:8.33333%}.large-3{width:25%}.large-push-3{position:relative;left:25%}.large-pull-3{position:relative;left:-25%}.large-offset-2{margin-left:16.66667%}.large-4{width:33.33333%}.large-push-4{position:relative;left:33.33333%}.large-pull-4{position:relative;left:-33.33333%}.large-offset-3{margin-left:25%}.large-5{width:41.66667%}.large-push-5{position:relative;left:41.66667%}.large-pull-5{position:relative;left:-41.66667%}.large-offset-4{margin-left:33.33333%}.large-6{width:50%}.large-push-6{position:relative;left:50%}.large-pull-6{position:relative;left:-50%}.large-offset-5{margin-left:41.66667%}.large-7{width:58.33333%}.large-push-7{position:relative;left:58.33333%}.large-pull-7{position:relative;left:-58.33333%}.large-offset-6{margin-left:50%}.large-8{width:66.66667%}.large-push-8{position:relative;left:66.66667%}.large-pull-8{position:relative;left:-66.66667%}.large-offset-7{margin-left:58.33333%}.large-9{width:75%}.large-push-9{position:relative;left:75%}.large-pull-9{position:relative;left:-75%}.large-offset-8{margin-left:66.66667%}.large-10{width:83.33333%}.large-push-10{position:relative;left:83.33333%}.large-pull-10{position:relative;left:-83.33333%}.large-offset-9{margin-left:75%}.large-11{width:91.66667%}.large-push-11{position:relative;left:91.66667%}.large-pull-11{position:relative;left:-91.66667%}.large-offset-10{margin-left:83.33333%}.large-12{width:100%}.large-offset-11{margin-left:91.66667%}.large-up-1>.column,.large-up-1>.columns{float:left;width:100%}.large-up-1>.column:nth-of-type(1n),.large-up-1>.columns:nth-of-type(1n){clear:none}.large-up-1>.column:nth-of-type(1n+1),.large-up-1>.columns:nth-of-type(1n+1){clear:both}.large-up-1>.column:last-child,.large-up-1>.columns:last-child{float:left}.large-up-2>.column,.large-up-2>.columns{float:left;width:50%}.large-up-2>.column:nth-of-type(1n),.large-up-2>.columns:nth-of-type(1n){clear:none}.large-up-2>.column:nth-of-type(2n+1),.large-up-2>.columns:nth-of-type(2n+1){clear:both}.large-up-2>.column:last-child,.large-up-2>.columns:last-child{float:left}.large-up-3>.column,.large-up-3>.columns{float:left;width:33.33333%}.large-up-3>.column:nth-of-type(1n),.large-up-3>.columns:nth-of-type(1n){clear:none}.large-up-3>.column:nth-of-type(3n+1),.large-up-3>.columns:nth-of-type(3n+1){clear:both}.large-up-3>.column:last-child,.large-up-3>.columns:last-child{float:left}.large-up-4>.column,.large-up-4>.columns{float:left;width:25%}.large-up-4>.column:nth-of-type(1n),.large-up-4>.columns:nth-of-type(1n){clear:none}.large-up-4>.column:nth-of-type(4n+1),.large-up-4>.columns:nth-of-type(4n+1){clear:both}.large-up-4>.column:last-child,.large-up-4>.columns:last-child{float:left}.large-up-5>.column,.large-up-5>.columns{float:left;width:20%}.large-up-5>.column:nth-of-type(1n),.large-up-5>.columns:nth-of-type(1n){clear:none}.large-up-5>.column:nth-of-type(5n+1),.large-up-5>.columns:nth-of-type(5n+1){clear:both}.large-up-5>.column:last-child,.large-up-5>.columns:last-child{float:left}.large-up-6>.column,.large-up-6>.columns{float:left;width:16.66667%}.large-up-6>.column:nth-of-type(1n),.large-up-6>.columns:nth-of-type(1n){clear:none}.large-up-6>.column:nth-of-type(6n+1),.large-up-6>.columns:nth-of-type(6n+1){clear:both}.large-up-6>.column:last-child,.large-up-6>.columns:last-child{float:left}.large-up-7>.column,.large-up-7>.columns{float:left;width:14.28571%}.large-up-7>.column:nth-of-type(1n),.large-up-7>.columns:nth-of-type(1n){clear:none}.large-up-7>.column:nth-of-type(7n+1),.large-up-7>.columns:nth-of-type(7n+1){clear:both}.large-up-7>.column:last-child,.large-up-7>.columns:last-child{float:left}.large-up-8>.column,.large-up-8>.columns{float:left;width:12.5%}.large-up-8>.column:nth-of-type(1n),.large-up-8>.columns:nth-of-type(1n){clear:none}.large-up-8>.column:nth-of-type(8n+1),.large-up-8>.columns:nth-of-type(8n+1){clear:both}.large-up-8>.column:last-child,.large-up-8>.columns:last-child{float:left}.large-collapse>.column,.large-collapse>.columns{padding-right:0;padding-left:0}.large-collapse .row{margin-right:0;margin-left:0}.expanded.row .large-collapse.row{margin-right:0;margin-left:0}.large-uncollapse>.column,.large-uncollapse>.columns{padding-right:0.9375rem;padding-left:0.9375rem}.large-centered{margin-right:auto;margin-left:auto}.large-centered,.large-centered:last-child:not(:first-child){float:none;clear:both}.large-uncentered,.large-push-0,.large-pull-0{position:static;float:left;margin-right:0;margin-left:0}}.column-block{margin-bottom:1.25rem}.column-block>:last-child{margin-bottom:0}@media print, screen and (min-width: 40em){.column-block{margin-bottom:1.875rem}.column-block>:last-child{margin-bottom:0}}div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}p{margin-bottom:1rem;font-size:inherit;line-height:1.6;text-rendering:optimizeLegibility}em,i{font-style:italic;line-height:inherit}strong,b{font-weight:bold;line-height:inherit}small{font-size:80%;line-height:inherit}h1,h2,h3,h4,h5,h6{font-family:"Short Stack", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-style:normal;font-weight:normal;color:inherit;text-rendering:optimizeLegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{line-height:0;color:#cacaca}h1{font-size:1.5rem;line-height:1.4;margin-top:0;margin-bottom:0.5rem}h2{font-size:1.25rem;line-height:1.4;margin-top:0;margin-bottom:0.5rem}h3{font-size:1.1875rem;line-height:1.4;margin-top:0;margin-bottom:0.5rem}h4{font-size:1.125rem;line-height:1.4;margin-top:0;margin-bottom:0.5rem}h5{font-size:1.0625rem;line-height:1.4;margin-top:0;margin-bottom:0.5rem}h6{font-size:1rem;line-height:1.4;margin-top:0;margin-bottom:0.5rem}@media print, screen and (min-width: 40em){h1{font-size:3rem}h2{font-size:2.5rem}h3{font-size:1.9375rem}h4{font-size:1.5625rem}h5{font-size:1.25rem}h6{font-size:1rem}}a{line-height:inherit;color:#1779ba;text-decoration:none;cursor:pointer}a:hover,a:focus{color:#1468a0}a img{border:0}hr{clear:both;max-width:75rem;height:0;margin:1.25rem auto;border-top:0;border-right:0;border-bottom:1px solid #cacaca;border-left:0}ul,ol,dl{margin-bottom:1rem;list-style-position:outside;line-height:1.6}li{font-size:inherit}ul{margin-left:1.25rem;list-style-type:disc}ol{margin-left:1.25rem}ul ul,ol ul,ul ol,ol ol{margin-left:1.25rem;margin-bottom:0}dl{margin-bottom:1rem}dl dt{margin-bottom:0.3rem;font-weight:bold}blockquote{margin:0 0 1rem;padding:0.5625rem 1.25rem 0 1.1875rem;border-left:1px solid #cacaca}blockquote,blockquote p{line-height:1.6;color:#8a8a8a}cite{display:block;font-size:0.8125rem;color:#8a8a8a}cite:before{content:"— "}abbr{border-bottom:1px dotted #0a0a0a;color:#0a0a0a;cursor:help}figure{margin:0}code{padding:0.125rem 0.3125rem 0.0625rem;border:1px solid #cacaca;background-color:#e6e6e6;font-family:"Short Stack", Consolas, "Liberation Mono", Courier, monospace;font-weight:normal;color:#0a0a0a}kbd{margin:0;padding:0.125rem 0.25rem 0;background-color:#e6e6e6;font-family:"Short Stack", Consolas, "Liberation Mono", Courier, monospace;color:#0a0a0a}.subheader{margin-top:0.2rem;margin-bottom:0.5rem;font-weight:normal;line-height:1.4;color:#8a8a8a}.lead{font-size:125%;line-height:1.6}.stat{font-size:2.5rem;line-height:1}p+.stat{margin-top:-1rem}.no-bullet{margin-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}@media print, screen and (min-width: 40em){.medium-text-left{text-align:left}.medium-text-right{text-align:right}.medium-text-center{text-align:center}.medium-text-justify{text-align:justify}}@media print, screen and (min-width: 64em){.large-text-left{text-align:left}.large-text-right{text-align:right}.large-text-center{text-align:center}.large-text-justify{text-align:justify}}.show-for-print{display:none !important}@media print{*{background:transparent !important;box-shadow:none !important;color:black !important;text-shadow:none !important}.show-for-print{display:block !important}.hide-for-print{display:none !important}table.show-for-print{display:table !important}thead.show-for-print{display:table-header-group !important}tbody.show-for-print{display:table-row-group !important}tr.show-for-print{display:table-row !important}td.show-for-print{display:table-cell !important}th.show-for-print{display:table-cell !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}.ir a:after,a[href^='javascript:']:after,a[href^='#']:after{content:''}abbr[title]:after{content:" (" attr(title) ")"}pre,blockquote{border:1px solid #8a8a8a;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.print-break-inside{page-break-inside:auto}}.button{display:inline-block;vertical-align:middle;margin:0 0 1rem 0;padding:0.85em 1em;-webkit-appearance:none;border:1px solid transparent;border-radius:0;transition:background-color 0.25s ease-out, color 0.25s ease-out;font-size:0.9rem;line-height:1;text-align:center;cursor:pointer;background-color:#1779ba;color:#fefefe}[data-whatinput='mouse'] .button{outline:0}.button:hover,.button:focus{background-color:#14679e;color:#fefefe}.button.tiny{font-size:0.6rem}.button.small{font-size:0.75rem}.button.large{font-size:1.25rem}.button.expanded{display:block;width:100%;margin-right:0;margin-left:0}.button.primary{background-color:#1779ba;color:#fefefe}.button.primary:hover,.button.primary:focus{background-color:#126195;color:#fefefe}.button.secondary{background-color:#767676;color:#fefefe}.button.secondary:hover,.button.secondary:focus{background-color:#5e5e5e;color:#fefefe}.button.success{background-color:#3adb76;color:#0a0a0a}.button.success:hover,.button.success:focus{background-color:#22bb5b;color:#0a0a0a}.button.warning{background-color:#ffae00;color:#0a0a0a}.button.warning:hover,.button.warning:focus{background-color:#cc8b00;color:#0a0a0a}.button.alert{background-color:#cc4b37;color:#fefefe}.button.alert:hover,.button.alert:focus{background-color:#a53b2a;color:#fefefe}.button.hollow{border:1px solid #1779ba;color:#1779ba}.button.hollow,.button.hollow:hover,.button.hollow:focus{background-color:transparent}.button.hollow:hover,.button.hollow:focus{border-color:#0c3d5d;color:#0c3d5d}.button.hollow.primary{border:1px solid #1779ba;color:#1779ba}.button.hollow.primary:hover,.button.hollow.primary:focus{border-color:#0c3d5d;color:#0c3d5d}.button.hollow.secondary{border:1px solid #767676;color:#767676}.button.hollow.secondary:hover,.button.hollow.secondary:focus{border-color:#3b3b3b;color:#3b3b3b}.button.hollow.success{border:1px solid #3adb76;color:#3adb76}.button.hollow.success:hover,.button.hollow.success:focus{border-color:#157539;color:#157539}.button.hollow.warning{border:1px solid #ffae00;color:#ffae00}.button.hollow.warning:hover,.button.hollow.warning:focus{border-color:#805700;color:#805700}.button.hollow.alert{border:1px solid #cc4b37;color:#cc4b37}.button.hollow.alert:hover,.button.hollow.alert:focus{border-color:#67251a;color:#67251a}.button.disabled,.button[disabled]{opacity:0.25;cursor:not-allowed}.button.disabled,.button.disabled:hover,.button.disabled:focus,.button[disabled],.button[disabled]:hover,.button[disabled]:focus{background-color:#1779ba;color:#fefefe}.button.disabled.primary,.button[disabled].primary{opacity:0.25;cursor:not-allowed}.button.disabled.primary,.button.disabled.primary:hover,.button.disabled.primary:focus,.button[disabled].primary,.button[disabled].primary:hover,.button[disabled].primary:focus{background-color:#1779ba;color:#fefefe}.button.disabled.secondary,.button[disabled].secondary{opacity:0.25;cursor:not-allowed}.button.disabled.secondary,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary,.button[disabled].secondary:hover,.button[disabled].secondary:focus{background-color:#767676;color:#fefefe}.button.disabled.success,.button[disabled].success{opacity:0.25;cursor:not-allowed}.button.disabled.success,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success,.button[disabled].success:hover,.button[disabled].success:focus{background-color:#3adb76;color:#0a0a0a}.button.disabled.warning,.button[disabled].warning{opacity:0.25;cursor:not-allowed}.button.disabled.warning,.button.disabled.warning:hover,.button.disabled.warning:focus,.button[disabled].warning,.button[disabled].warning:hover,.button[disabled].warning:focus{background-color:#ffae00;color:#0a0a0a}.button.disabled.alert,.button[disabled].alert{opacity:0.25;cursor:not-allowed}.button.disabled.alert,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert,.button[disabled].alert:hover,.button[disabled].alert:focus{background-color:#cc4b37;color:#fefefe}.button.dropdown::after{display:block;width:0;height:0;border:inset 0.4em;content:'';border-bottom-width:0;border-top-style:solid;border-color:#fefefe transparent transparent;position:relative;top:0.4em;display:inline-block;float:right;margin-left:1em}.button.dropdown.hollow::after{border-top-color:#1779ba}.button.dropdown.hollow.primary::after{border-top-color:#1779ba}.button.dropdown.hollow.secondary::after{border-top-color:#767676}.button.dropdown.hollow.success::after{border-top-color:#3adb76}.button.dropdown.hollow.warning::after{border-top-color:#ffae00}.button.dropdown.hollow.alert::after{border-top-color:#cc4b37}.button.arrow-only::after{top:-0.1em;float:none;margin-left:0}[type='text'],[type='password'],[type='date'],[type='datetime'],[type='datetime-local'],[type='month'],[type='week'],[type='email'],[type='number'],[type='search'],[type='tel'],[type='time'],[type='url'],[type='color'],textarea{display:block;box-sizing:border-box;width:100%;height:2.4375rem;margin:0 0 1rem;padding:0.5rem;border:1px solid #cacaca;border-radius:0;background-color:#fefefe;box-shadow:inset 0 1px 2px rgba(10,10,10,0.1);font-family:inherit;font-size:1rem;font-weight:normal;color:#0a0a0a;transition:box-shadow 0.5s, border-color 0.25s ease-in-out;appearance:none}[type='text']:focus,[type='password']:focus,[type='date']:focus,[type='datetime']:focus,[type='datetime-local']:focus,[type='month']:focus,[type='week']:focus,[type='email']:focus,[type='number']:focus,[type='search']:focus,[type='tel']:focus,[type='time']:focus,[type='url']:focus,[type='color']:focus,textarea:focus{outline:none;border:1px solid #8a8a8a;background-color:#fefefe;box-shadow:0 0 5px #cacaca;transition:box-shadow 0.5s, border-color 0.25s ease-in-out}textarea{max-width:100%}textarea[rows]{height:auto}input::placeholder,textarea::placeholder{color:#cacaca}input:disabled,input[readonly],textarea:disabled,textarea[readonly]{background-color:#e6e6e6;cursor:not-allowed}[type='submit'],[type='button']{appearance:none;border-radius:0}input[type='search']{box-sizing:border-box}[type='file'],[type='checkbox'],[type='radio']{margin:0 0 1rem}[type='checkbox']+label,[type='radio']+label{display:inline-block;vertical-align:baseline;margin-left:0.5rem;margin-right:1rem;margin-bottom:0}[type='checkbox']+label[for],[type='radio']+label[for]{cursor:pointer}label>[type='checkbox'],label>[type='radio']{margin-right:0.5rem}[type='file']{width:100%}label{display:block;margin:0;font-size:0.875rem;font-weight:normal;line-height:1.8;color:#0a0a0a}label.middle{margin:0 0 1rem;padding:0.5625rem 0}.help-text{margin-top:-0.5rem;font-size:0.8125rem;font-style:italic;color:#0a0a0a}.input-group{display:table;width:100%;margin-bottom:1rem}.input-group>:first-child{border-radius:0 0 0 0}.input-group>:last-child>*{border-radius:0 0 0 0}.input-group-label,.input-group-field,.input-group-button,.input-group-button a,.input-group-button input,.input-group-button button,.input-group-button label{margin:0;white-space:nowrap;display:table-cell;vertical-align:middle}.input-group-label{padding:0 1rem;border:1px solid #cacaca;background:#e6e6e6;color:#0a0a0a;text-align:center;white-space:nowrap;width:1%;height:100%}.input-group-label:first-child{border-right:0}.input-group-label:last-child{border-left:0}.input-group-field{border-radius:0;height:2.5rem}.input-group-button{padding-top:0;padding-bottom:0;text-align:center;width:1%;height:100%}.input-group-button a,.input-group-button input,.input-group-button button,.input-group-button label{height:2.5rem;padding-top:0;padding-bottom:0;font-size:1rem}.input-group .input-group-button{display:table-cell}fieldset{margin:0;padding:0;border:0}legend{max-width:100%;margin-bottom:0.5rem}.fieldset{margin:1.125rem 0;padding:1.25rem;border:1px solid #cacaca}.fieldset legend{margin:0;margin-left:-0.1875rem;padding:0 0.1875rem;background:#fefefe}select{height:2.4375rem;margin:0 0 1rem;padding:0.5rem;appearance:none;border:1px solid #cacaca;border-radius:0;background-color:#fefefe;font-family:inherit;font-size:1rem;line-height:normal;color:#0a0a0a;background-image:url("data:image/svg+xml;utf8,");background-origin:content-box;background-position:right -1rem center;background-repeat:no-repeat;background-size:9px 6px;padding-right:1.5rem;transition:box-shadow 0.5s, border-color 0.25s ease-in-out}@media screen and (min-width: 0\0){select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAYCAYAAACbU/80AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIpJREFUeNrEkckNgDAMBBfRkEt0ObRBBdsGXUDgmQfK4XhH2m8czQAAy27R3tsw4Qfe2x8uOO6oYLb6GlOor3GF+swURAOmUJ+RwtEJs9WvTGEYxBXqI1MQAZhCfUQKRzDMVj+TwrAIV6jvSUEkYAr1LSkcyTBb/V+KYfX7xAeusq3sLDtGH3kEGACPWIflNZfhRQAAAABJRU5ErkJggg==")}}select:focus{outline:none;border:1px solid #8a8a8a;background-color:#fefefe;box-shadow:0 0 5px #cacaca;transition:box-shadow 0.5s, border-color 0.25s ease-in-out}select:disabled{background-color:#e6e6e6;cursor:not-allowed}select::-ms-expand{display:none}select[multiple]{height:auto;background-image:none}.is-invalid-input:not(:focus){border-color:#cc4b37;background-color:#f9ecea}.is-invalid-input:not(:focus)::placeholder{color:#cc4b37}.is-invalid-label{color:#cc4b37}.form-error{display:none;margin-top:-0.5rem;margin-bottom:1rem;font-size:0.75rem;font-weight:bold;color:#cc4b37}.form-error.is-visible{display:block}.hide{display:none !important}.invisible{visibility:hidden}@media screen and (max-width: 39.9375em){.hide-for-small-only{display:none !important}}@media screen and (max-width: 0em), screen and (min-width: 40em){.show-for-small-only{display:none !important}}@media print, screen and (min-width: 40em){.hide-for-medium{display:none !important}}@media screen and (max-width: 39.9375em){.show-for-medium{display:none !important}}@media screen and (min-width: 40em) and (max-width: 63.9375em){.hide-for-medium-only{display:none !important}}@media screen and (max-width: 39.9375em), screen and (min-width: 64em){.show-for-medium-only{display:none !important}}@media print, screen and (min-width: 64em){.hide-for-large{display:none !important}}@media screen and (max-width: 63.9375em){.show-for-large{display:none !important}}@media screen and (min-width: 64em) and (max-width: 74.9375em){.hide-for-large-only{display:none !important}}@media screen and (max-width: 63.9375em), screen and (min-width: 75em){.show-for-large-only{display:none !important}}.show-for-sr,.show-on-focus{position:absolute !important;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0)}.show-on-focus:active,.show-on-focus:focus{position:static !important;width:auto;height:auto;overflow:visible;clip:auto}.show-for-landscape,.hide-for-portrait{display:block !important}@media screen and (orientation: landscape){.show-for-landscape,.hide-for-portrait{display:block !important}}@media screen and (orientation: portrait){.show-for-landscape,.hide-for-portrait{display:none !important}}.hide-for-landscape,.show-for-portrait{display:none !important}@media screen and (orientation: landscape){.hide-for-landscape,.show-for-portrait{display:none !important}}@media screen and (orientation: portrait){.hide-for-landscape,.show-for-portrait{display:block !important}}.float-left{float:left !important}.float-right{float:right !important}.float-center{display:block;margin-right:auto;margin-left:auto}.clearfix::before,.clearfix::after{display:table;content:' '}.clearfix::after{clear:both}.accordion{margin-left:0;background:#fefefe;list-style-type:none}.accordion-item:first-child>:first-child{border-radius:0 0 0 0}.accordion-item:last-child>:last-child{border-radius:0 0 0 0}.accordion-title{position:relative;display:block;padding:1.25rem 1rem;border:1px solid #e6e6e6;border-bottom:0;font-size:0.75rem;line-height:1;color:#1779ba}:last-child:not(.is-active)>.accordion-title{border-bottom:1px solid #e6e6e6;border-radius:0 0 0 0}.accordion-title:hover,.accordion-title:focus{background-color:#e6e6e6}.accordion-title::before{position:absolute;top:50%;right:1rem;margin-top:-0.5rem;content:'+'}.is-active>.accordion-title::before{content:'\2013'}.accordion-content{display:none;padding:1rem;border:1px solid #e6e6e6;border-bottom:0;background-color:#fefefe;color:#0a0a0a}:last-child>.accordion-content:last-child{border-bottom:1px solid #e6e6e6}.is-accordion-submenu-parent>a{position:relative}.is-accordion-submenu-parent>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-bottom-width:0;border-top-style:solid;border-color:#1779ba transparent transparent;position:absolute;top:50%;margin-top:-3px;right:1rem}.is-accordion-submenu-parent[aria-expanded='true']>a::after{transform:rotate(180deg);transform-origin:50% 50%}.badge{display:inline-block;min-width:2.1em;padding:0.3em;border-radius:50%;font-size:0.6rem;text-align:center;background:#1779ba;color:#fefefe}.badge.primary{background:#1779ba;color:#fefefe}.badge.secondary{background:#767676;color:#fefefe}.badge.success{background:#3adb76;color:#0a0a0a}.badge.warning{background:#ffae00;color:#0a0a0a}.badge.alert{background:#cc4b37;color:#fefefe}.breadcrumbs{margin:0 0 1rem 0;list-style:none}.breadcrumbs::before,.breadcrumbs::after{display:table;content:' '}.breadcrumbs::after{clear:both}.breadcrumbs li{float:left;font-size:0.6875rem;color:#0a0a0a;cursor:default;text-transform:uppercase}.breadcrumbs li:not(:last-child)::after{position:relative;top:1px;margin:0 0.75rem;opacity:1;content:"/";color:#cacaca}.breadcrumbs a{color:#1779ba}.breadcrumbs a:hover{text-decoration:underline}.breadcrumbs .disabled{color:#cacaca;cursor:not-allowed}.button-group{margin-bottom:1rem;font-size:0}.button-group::before,.button-group::after{display:table;content:' '}.button-group::after{clear:both}.button-group .button{margin:0;margin-right:1px;margin-bottom:1px;font-size:0.9rem}.button-group .button:last-child{margin-right:0}.button-group.tiny .button{font-size:0.6rem}.button-group.small .button{font-size:0.75rem}.button-group.large .button{font-size:1.25rem}.button-group.expanded{margin-right:-1px}.button-group.expanded::before,.button-group.expanded::after{display:none}.button-group.expanded .button:first-child:last-child{width:100%}.button-group.expanded .button:first-child:nth-last-child(2),.button-group.expanded .button:first-child:nth-last-child(2):first-child:nth-last-child(2) ~ .button{display:inline-block;width:calc(50% - 1px);margin-right:1px}.button-group.expanded .button:first-child:nth-last-child(2):last-child,.button-group.expanded .button:first-child:nth-last-child(2):first-child:nth-last-child(2) ~ .button:last-child{margin-right:-6px}.button-group.expanded .button:first-child:nth-last-child(3),.button-group.expanded .button:first-child:nth-last-child(3):first-child:nth-last-child(3) ~ .button{display:inline-block;width:calc(33.33333% - 1px);margin-right:1px}.button-group.expanded .button:first-child:nth-last-child(3):last-child,.button-group.expanded .button:first-child:nth-last-child(3):first-child:nth-last-child(3) ~ .button:last-child{margin-right:-6px}.button-group.expanded .button:first-child:nth-last-child(4),.button-group.expanded .button:first-child:nth-last-child(4):first-child:nth-last-child(4) ~ .button{display:inline-block;width:calc(25% - 1px);margin-right:1px}.button-group.expanded .button:first-child:nth-last-child(4):last-child,.button-group.expanded .button:first-child:nth-last-child(4):first-child:nth-last-child(4) ~ .button:last-child{margin-right:-6px}.button-group.expanded .button:first-child:nth-last-child(5),.button-group.expanded .button:first-child:nth-last-child(5):first-child:nth-last-child(5) ~ .button{display:inline-block;width:calc(20% - 1px);margin-right:1px}.button-group.expanded .button:first-child:nth-last-child(5):last-child,.button-group.expanded .button:first-child:nth-last-child(5):first-child:nth-last-child(5) ~ .button:last-child{margin-right:-6px}.button-group.expanded .button:first-child:nth-last-child(6),.button-group.expanded .button:first-child:nth-last-child(6):first-child:nth-last-child(6) ~ .button{display:inline-block;width:calc(16.66667% - 1px);margin-right:1px}.button-group.expanded .button:first-child:nth-last-child(6):last-child,.button-group.expanded .button:first-child:nth-last-child(6):first-child:nth-last-child(6) ~ .button:last-child{margin-right:-6px}.button-group.primary .button{background-color:#1779ba;color:#fefefe}.button-group.primary .button:hover,.button-group.primary .button:focus{background-color:#126195;color:#fefefe}.button-group.secondary .button{background-color:#767676;color:#fefefe}.button-group.secondary .button:hover,.button-group.secondary .button:focus{background-color:#5e5e5e;color:#fefefe}.button-group.success .button{background-color:#3adb76;color:#0a0a0a}.button-group.success .button:hover,.button-group.success .button:focus{background-color:#22bb5b;color:#0a0a0a}.button-group.warning .button{background-color:#ffae00;color:#0a0a0a}.button-group.warning .button:hover,.button-group.warning .button:focus{background-color:#cc8b00;color:#0a0a0a}.button-group.alert .button{background-color:#cc4b37;color:#fefefe}.button-group.alert .button:hover,.button-group.alert .button:focus{background-color:#a53b2a;color:#fefefe}.button-group.stacked .button,.button-group.stacked-for-small .button,.button-group.stacked-for-medium .button{width:100%}.button-group.stacked .button:last-child,.button-group.stacked-for-small .button:last-child,.button-group.stacked-for-medium .button:last-child{margin-bottom:0}@media print, screen and (min-width: 40em){.button-group.stacked-for-small .button{width:auto;margin-bottom:0}}@media print, screen and (min-width: 64em){.button-group.stacked-for-medium .button{width:auto;margin-bottom:0}}@media screen and (max-width: 39.9375em){.button-group.stacked-for-small.expanded{display:block}.button-group.stacked-for-small.expanded .button{display:block;margin-right:0}}.callout{position:relative;margin:0 0 1rem 0;padding:1rem;border:1px solid rgba(10,10,10,0.25);border-radius:0;background-color:white;color:#0a0a0a}.callout>:first-child{margin-top:0}.callout>:last-child{margin-bottom:0}.callout.primary{background-color:#d7ecfa;color:#0a0a0a}.callout.secondary{background-color:#eaeaea;color:#0a0a0a}.callout.success{background-color:#e1faea;color:#0a0a0a}.callout.warning{background-color:#fff3d9;color:#0a0a0a}.callout.alert{background-color:#f7e4e1;color:#0a0a0a}.callout.small{padding-top:0.5rem;padding-right:0.5rem;padding-bottom:0.5rem;padding-left:0.5rem}.callout.large{padding-top:3rem;padding-right:3rem;padding-bottom:3rem;padding-left:3rem}.card{margin-bottom:1rem;border:1px solid #e6e6e6;border-radius:0;background:#fefefe;box-shadow:none;overflow:hidden;color:#0a0a0a}.card>:last-child{margin-bottom:0}.card-divider{padding:1rem;background:#e6e6e6}.card-divider>:last-child{margin-bottom:0}.card-section{padding:1rem}.card-section>:last-child{margin-bottom:0}.close-button{position:absolute;color:#8a8a8a;cursor:pointer}[data-whatinput='mouse'] .close-button{outline:0}.close-button:hover,.close-button:focus{color:#0a0a0a}.close-button.small{right:0.66rem;top:0.33em;font-size:1.5em;line-height:1}.close-button,.close-button.medium{right:1rem;top:0.5rem;font-size:2em;line-height:1}.is-drilldown{position:relative;overflow:hidden}.is-drilldown li{display:block}.is-drilldown.animate-height{transition:height 0.5s}.is-drilldown-submenu{position:absolute;top:0;left:100%;z-index:-1;width:100%;background:#fefefe;transition:transform 0.15s linear}.is-drilldown-submenu.is-active{z-index:1;display:block;transform:translateX(-100%)}.is-drilldown-submenu.is-closing{transform:translateX(100%)}.drilldown-submenu-cover-previous{min-height:100%}.is-drilldown-submenu-parent>a{position:relative}.is-drilldown-submenu-parent>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #1779ba;position:absolute;top:50%;margin-top:-6px;right:1rem}.js-drilldown-back>a::before{display:block;width:0;height:0;border:inset 6px;content:'';border-left-width:0;border-right-style:solid;border-color:transparent #1779ba transparent transparent;border-left-width:0;display:inline-block;vertical-align:middle;margin-right:0.75rem;border-left-width:0}.dropdown-pane{position:absolute;z-index:10;display:block;width:300px;padding:1rem;visibility:hidden;border:1px solid #cacaca;border-radius:0;background-color:#fefefe;font-size:1rem}.dropdown-pane.is-open{visibility:visible}.dropdown-pane.tiny{width:100px}.dropdown-pane.small{width:200px}.dropdown-pane.large{width:400px}.dropdown.menu>li.opens-left>.is-dropdown-submenu{top:100%;right:0;left:auto}.dropdown.menu>li.opens-right>.is-dropdown-submenu{top:100%;right:auto;left:0}.dropdown.menu>li.is-dropdown-submenu-parent>a{position:relative;padding-right:1.5rem}.dropdown.menu>li.is-dropdown-submenu-parent>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-bottom-width:0;border-top-style:solid;border-color:#1779ba transparent transparent;right:5px;margin-top:-3px}[data-whatinput='mouse'] .dropdown.menu a{outline:0}.no-js .dropdown.menu ul{display:none}.dropdown.menu.vertical>li .is-dropdown-submenu{top:0}.dropdown.menu.vertical>li.opens-left>.is-dropdown-submenu{right:100%;left:auto}.dropdown.menu.vertical>li.opens-right>.is-dropdown-submenu{right:auto;left:100%}.dropdown.menu.vertical>li>a::after{right:14px}.dropdown.menu.vertical>li.opens-left>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-left-width:0;border-right-style:solid;border-color:transparent #1779ba transparent transparent}.dropdown.menu.vertical>li.opens-right>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #1779ba}@media print, screen and (min-width: 40em){.dropdown.menu.medium-horizontal>li.opens-left>.is-dropdown-submenu{top:100%;right:0;left:auto}.dropdown.menu.medium-horizontal>li.opens-right>.is-dropdown-submenu{top:100%;right:auto;left:0}.dropdown.menu.medium-horizontal>li.is-dropdown-submenu-parent>a{position:relative;padding-right:1.5rem}.dropdown.menu.medium-horizontal>li.is-dropdown-submenu-parent>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-bottom-width:0;border-top-style:solid;border-color:#1779ba transparent transparent;right:5px;margin-top:-3px}.dropdown.menu.medium-vertical>li .is-dropdown-submenu{top:0}.dropdown.menu.medium-vertical>li.opens-left>.is-dropdown-submenu{right:100%;left:auto}.dropdown.menu.medium-vertical>li.opens-right>.is-dropdown-submenu{right:auto;left:100%}.dropdown.menu.medium-vertical>li>a::after{right:14px}.dropdown.menu.medium-vertical>li.opens-left>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-left-width:0;border-right-style:solid;border-color:transparent #1779ba transparent transparent}.dropdown.menu.medium-vertical>li.opens-right>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #1779ba}}@media print, screen and (min-width: 64em){.dropdown.menu.large-horizontal>li.opens-left>.is-dropdown-submenu{top:100%;right:0;left:auto}.dropdown.menu.large-horizontal>li.opens-right>.is-dropdown-submenu{top:100%;right:auto;left:0}.dropdown.menu.large-horizontal>li.is-dropdown-submenu-parent>a{position:relative;padding-right:1.5rem}.dropdown.menu.large-horizontal>li.is-dropdown-submenu-parent>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-bottom-width:0;border-top-style:solid;border-color:#1779ba transparent transparent;right:5px;margin-top:-3px}.dropdown.menu.large-vertical>li .is-dropdown-submenu{top:0}.dropdown.menu.large-vertical>li.opens-left>.is-dropdown-submenu{right:100%;left:auto}.dropdown.menu.large-vertical>li.opens-right>.is-dropdown-submenu{right:auto;left:100%}.dropdown.menu.large-vertical>li>a::after{right:14px}.dropdown.menu.large-vertical>li.opens-left>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-left-width:0;border-right-style:solid;border-color:transparent #1779ba transparent transparent}.dropdown.menu.large-vertical>li.opens-right>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #1779ba}}.dropdown.menu.align-right .is-dropdown-submenu.first-sub{top:100%;right:0;left:auto}.is-dropdown-menu.vertical{width:100px}.is-dropdown-menu.vertical.align-right{float:right}.is-dropdown-submenu-parent{position:relative}.is-dropdown-submenu-parent a::after{position:absolute;top:50%;right:5px;margin-top:-6px}.is-dropdown-submenu-parent.opens-inner>.is-dropdown-submenu{top:100%;left:auto}.is-dropdown-submenu-parent.opens-left>.is-dropdown-submenu{right:100%;left:auto}.is-dropdown-submenu-parent.opens-right>.is-dropdown-submenu{right:auto;left:100%}.is-dropdown-submenu{position:absolute;top:0;left:100%;z-index:1;display:none;min-width:200px;border:1px solid #cacaca;background:#fefefe}.is-dropdown-submenu .is-dropdown-submenu-parent>a::after{right:14px}.is-dropdown-submenu .is-dropdown-submenu-parent.opens-left>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-left-width:0;border-right-style:solid;border-color:transparent #1779ba transparent transparent}.is-dropdown-submenu .is-dropdown-submenu-parent.opens-right>a::after{display:block;width:0;height:0;border:inset 6px;content:'';border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #1779ba}.is-dropdown-submenu .is-dropdown-submenu{margin-top:-1px}.is-dropdown-submenu>li{width:100%}.is-dropdown-submenu.js-dropdown-active{display:block}.responsive-embed,.flex-video{position:relative;height:0;margin-bottom:1rem;padding-bottom:75%;overflow:hidden}.responsive-embed iframe,.responsive-embed object,.responsive-embed embed,.responsive-embed video,.flex-video iframe,.flex-video object,.flex-video embed,.flex-video video{position:absolute;top:0;left:0;width:100%;height:100%}.responsive-embed.widescreen,.flex-video.widescreen{padding-bottom:56.25%}.label{display:inline-block;padding:0.33333rem 0.5rem;border-radius:0;font-size:0.8rem;line-height:1;white-space:nowrap;cursor:default;background:#1779ba;color:#fefefe}.label.primary{background:#1779ba;color:#fefefe}.label.secondary{background:#767676;color:#fefefe}.label.success{background:#3adb76;color:#0a0a0a}.label.warning{background:#ffae00;color:#0a0a0a}.label.alert{background:#cc4b37;color:#fefefe}.media-object{display:block;margin-bottom:1rem}.media-object img{max-width:none}@media screen and (max-width: 39.9375em){.media-object.stack-for-small .media-object-section{padding:0;padding-bottom:1rem;display:block}.media-object.stack-for-small .media-object-section img{width:100%}}.media-object-section{display:table-cell;vertical-align:top}.media-object-section:first-child{padding-right:1rem}.media-object-section:last-child:not(:nth-child(2)){padding-left:1rem}.media-object-section>:last-child{margin-bottom:0}.media-object-section.middle{vertical-align:middle}.media-object-section.bottom{vertical-align:bottom}.menu{margin:0;list-style-type:none}.menu>li{display:table-cell;vertical-align:middle}[data-whatinput='mouse'] .menu>li{outline:0}.menu>li>a{display:block;padding:0.7rem 1rem;line-height:1}.menu input,.menu select,.menu a,.menu button{margin-bottom:0}.menu>li>a img,.menu>li>a i,.menu>li>a svg{vertical-align:middle}.menu>li>a img+span,.menu>li>a i+span,.menu>li>a svg+span{vertical-align:middle}.menu>li>a img,.menu>li>a i,.menu>li>a svg{margin-right:0.25rem;display:inline-block}.menu>li,.menu.horizontal>li{display:table-cell}.menu.expanded{display:table;width:100%;table-layout:fixed}.menu.expanded>li:first-child:last-child{width:100%}.menu.vertical>li{display:block}@media print, screen and (min-width: 40em){.menu.medium-horizontal>li{display:table-cell}.menu.medium-expanded{display:table;width:100%;table-layout:fixed}.menu.medium-expanded>li:first-child:last-child{width:100%}.menu.medium-vertical>li{display:block}}@media print, screen and (min-width: 64em){.menu.large-horizontal>li{display:table-cell}.menu.large-expanded{display:table;width:100%;table-layout:fixed}.menu.large-expanded>li:first-child:last-child{width:100%}.menu.large-vertical>li{display:block}}.menu.simple li{display:inline-block;vertical-align:top;line-height:1}.menu.simple a{padding:0}.menu.simple li{margin-left:0;margin-right:1rem}.menu.simple.align-right li{margin-right:0;margin-left:1rem}.menu.align-right::before,.menu.align-right::after{display:table;content:' '}.menu.align-right::after{clear:both}.menu.align-right>li{float:right}.menu.icon-top>li>a{text-align:center}.menu.icon-top>li>a img,.menu.icon-top>li>a i,.menu.icon-top>li>a svg{display:block;margin:0 auto 0.25rem}.menu.icon-top.vertical a>span{margin:auto}.menu.nested{margin-left:1rem}.menu .active>a{background:#1779ba;color:#fefefe}.menu.menu-bordered li{border:1px solid #e6e6e6}.menu.menu-bordered li:not(:first-child){border-top:0}.menu.menu-hover li:hover{background-color:#e6e6e6}.menu-text{padding-top:0;padding-bottom:0;padding:0.7rem 1rem;font-weight:bold;line-height:1;color:inherit}.menu-centered{text-align:center}.menu-centered>.menu{display:inline-block;vertical-align:top}.no-js [data-responsive-menu] ul{display:none}.menu-icon{position:relative;display:inline-block;vertical-align:middle;width:20px;height:16px;cursor:pointer}.menu-icon::after{position:absolute;top:0;left:0;display:block;width:100%;height:2px;background:#fefefe;box-shadow:0 7px 0 #fefefe, 0 14px 0 #fefefe;content:''}.menu-icon:hover::after{background:#cacaca;box-shadow:0 7px 0 #cacaca, 0 14px 0 #cacaca}.menu-icon.dark{position:relative;display:inline-block;vertical-align:middle;width:20px;height:16px;cursor:pointer}.menu-icon.dark::after{position:absolute;top:0;left:0;display:block;width:100%;height:2px;background:#0a0a0a;box-shadow:0 7px 0 #0a0a0a, 0 14px 0 #0a0a0a;content:''}.menu-icon.dark:hover::after{background:#8a8a8a;box-shadow:0 7px 0 #8a8a8a, 0 14px 0 #8a8a8a}.is-off-canvas-open{overflow:hidden}.js-off-canvas-overlay{position:absolute;top:0;left:0;width:100%;height:100%;transition:opacity 0.5s ease, visibility 0.5s ease;background:rgba(254,254,254,0.25);opacity:0;visibility:hidden;overflow:hidden}.js-off-canvas-overlay.is-visible{opacity:1;visibility:visible}.js-off-canvas-overlay.is-closable{cursor:pointer}.js-off-canvas-overlay.is-overlay-absolute{position:absolute}.js-off-canvas-overlay.is-overlay-fixed{position:fixed}.off-canvas-wrapper{position:relative;overflow:hidden}.off-canvas{position:fixed;z-index:1;transition:transform 0.5s ease;backface-visibility:hidden;background:#e6e6e6}[data-whatinput='mouse'] .off-canvas{outline:0}.off-canvas.is-transition-overlap{z-index:10}.off-canvas.is-transition-overlap.is-open{box-shadow:0 0 10px rgba(10,10,10,0.7)}.off-canvas.is-open{transform:translate(0, 0)}.off-canvas-absolute{position:absolute;z-index:1;transition:transform 0.5s ease;backface-visibility:hidden;background:#e6e6e6}[data-whatinput='mouse'] .off-canvas-absolute{outline:0}.off-canvas-absolute.is-transition-overlap{z-index:10}.off-canvas-absolute.is-transition-overlap.is-open{box-shadow:0 0 10px rgba(10,10,10,0.7)}.off-canvas-absolute.is-open{transform:translate(0, 0)}.position-left{top:0;left:0;width:250px;height:100%;transform:translateX(-250px);overflow-y:auto}.position-left.is-open ~ .off-canvas-content{transform:translateX(250px)}.position-left.is-transition-push::after{position:absolute;top:0;right:0;height:100%;width:1px;box-shadow:0 0 10px rgba(10,10,10,0.7);content:" "}.position-left.is-transition-overlap.is-open ~ .off-canvas-content{transform:none}.position-right{top:0;right:0;width:250px;height:100%;transform:translateX(250px);overflow-y:auto}.position-right.is-open ~ .off-canvas-content{transform:translateX(-250px)}.position-right.is-transition-push::after{position:absolute;top:0;left:0;height:100%;width:1px;box-shadow:0 0 10px rgba(10,10,10,0.7);content:" "}.position-right.is-transition-overlap.is-open ~ .off-canvas-content{transform:none}.position-top{top:0;left:0;width:100%;height:250px;transform:translateY(-250px);overflow-x:auto}.position-top.is-open ~ .off-canvas-content{transform:translateY(250px)}.position-top.is-transition-push::after{position:absolute;bottom:0;left:0;height:1px;width:100%;box-shadow:0 0 10px rgba(10,10,10,0.7);content:" "}.position-top.is-transition-overlap.is-open ~ .off-canvas-content{transform:none}.position-bottom{bottom:0;left:0;width:100%;height:250px;transform:translateY(250px);overflow-x:auto}.position-bottom.is-open ~ .off-canvas-content{transform:translateY(-250px)}.position-bottom.is-transition-push::after{position:absolute;top:0;left:0;height:1px;width:100%;box-shadow:0 0 10px rgba(10,10,10,0.7);content:" "}.position-bottom.is-transition-overlap.is-open ~ .off-canvas-content{transform:none}.off-canvas-content{transition:transform 0.5s ease;backface-visibility:hidden}@media print, screen and (min-width: 40em){.position-left.reveal-for-medium{transform:none;z-index:1}.position-left.reveal-for-medium ~ .off-canvas-content{margin-left:250px}.position-right.reveal-for-medium{transform:none;z-index:1}.position-right.reveal-for-medium ~ .off-canvas-content{margin-right:250px}.position-top.reveal-for-medium{transform:none;z-index:1}.position-top.reveal-for-medium ~ .off-canvas-content{margin-top:250px}.position-bottom.reveal-for-medium{transform:none;z-index:1}.position-bottom.reveal-for-medium ~ .off-canvas-content{margin-bottom:250px}}@media print, screen and (min-width: 64em){.position-left.reveal-for-large{transform:none;z-index:1}.position-left.reveal-for-large ~ .off-canvas-content{margin-left:250px}.position-right.reveal-for-large{transform:none;z-index:1}.position-right.reveal-for-large ~ .off-canvas-content{margin-right:250px}.position-top.reveal-for-large{transform:none;z-index:1}.position-top.reveal-for-large ~ .off-canvas-content{margin-top:250px}.position-bottom.reveal-for-large{transform:none;z-index:1}.position-bottom.reveal-for-large ~ .off-canvas-content{margin-bottom:250px}}.orbit{position:relative}.orbit-container{position:relative;height:0;margin:0;list-style:none;overflow:hidden}.orbit-slide{width:100%}.orbit-slide.no-motionui.is-active{top:0;left:0}.orbit-figure{margin:0}.orbit-image{width:100%;max-width:100%;margin:0}.orbit-caption{position:absolute;bottom:0;width:100%;margin-bottom:0;padding:1rem;background-color:rgba(10,10,10,0.5);color:#fefefe}.orbit-previous,.orbit-next{position:absolute;top:50%;transform:translateY(-50%);z-index:10;padding:1rem;color:#fefefe}[data-whatinput='mouse'] .orbit-previous,[data-whatinput='mouse'] .orbit-next{outline:0}.orbit-previous:hover,.orbit-next:hover,.orbit-previous:active,.orbit-next:active,.orbit-previous:focus,.orbit-next:focus{background-color:rgba(10,10,10,0.5)}.orbit-previous{left:0}.orbit-next{left:auto;right:0}.orbit-bullets{position:relative;margin-top:0.8rem;margin-bottom:0.8rem;text-align:center}[data-whatinput='mouse'] .orbit-bullets{outline:0}.orbit-bullets button{width:1.2rem;height:1.2rem;margin:0.1rem;border-radius:50%;background-color:#cacaca}.orbit-bullets button:hover{background-color:#8a8a8a}.orbit-bullets button.is-active{background-color:#8a8a8a}.pagination{margin-left:0;margin-bottom:1rem}.pagination::before,.pagination::after{display:table;content:' '}.pagination::after{clear:both}.pagination li{margin-right:0.0625rem;border-radius:0;font-size:0.875rem;display:none}.pagination li:last-child,.pagination li:first-child{display:inline-block}@media print, screen and (min-width: 40em){.pagination li{display:inline-block}}.pagination a,.pagination button{display:block;padding:0.1875rem 0.625rem;border-radius:0;color:#0a0a0a}.pagination a:hover,.pagination button:hover{background:#e6e6e6}.pagination .current{padding:0.1875rem 0.625rem;background:#1779ba;color:#fefefe;cursor:default}.pagination .disabled{padding:0.1875rem 0.625rem;color:#cacaca;cursor:not-allowed}.pagination .disabled:hover{background:transparent}.pagination .ellipsis::after{padding:0.1875rem 0.625rem;content:'\2026';color:#0a0a0a}.pagination-previous a::before,.pagination-previous.disabled::before{display:inline-block;margin-right:0.5rem;content:'\00ab'}.pagination-next a::after,.pagination-next.disabled::after{display:inline-block;margin-left:0.5rem;content:'\00bb'}.progress{height:1rem;margin-bottom:1rem;border-radius:0;background-color:#cacaca}.progress.primary .progress-meter{background-color:#1779ba}.progress.secondary .progress-meter{background-color:#767676}.progress.success .progress-meter{background-color:#3adb76}.progress.warning .progress-meter{background-color:#ffae00}.progress.alert .progress-meter{background-color:#cc4b37}.progress-meter{position:relative;display:block;width:0%;height:100%;background-color:#1779ba}.progress-meter-text{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);position:absolute;margin:0;font-size:0.75rem;font-weight:bold;color:#fefefe;white-space:nowrap}.slider{position:relative;height:0.5rem;margin-top:1.25rem;margin-bottom:2.25rem;background-color:#e6e6e6;cursor:pointer;user-select:none;touch-action:none}.slider-fill{position:absolute;top:0;left:0;display:inline-block;max-width:100%;height:0.5rem;background-color:#cacaca;transition:all 0.2s ease-in-out}.slider-fill.is-dragging{transition:all 0s linear}.slider-handle{position:absolute;top:50%;transform:translateY(-50%);position:absolute;left:0;z-index:1;display:inline-block;width:1.4rem;height:1.4rem;border-radius:0;background-color:#1779ba;transition:all 0.2s ease-in-out;touch-action:manipulation}[data-whatinput='mouse'] .slider-handle{outline:0}.slider-handle:hover{background-color:#14679e}.slider-handle.is-dragging{transition:all 0s linear}.slider.disabled,.slider[disabled]{opacity:0.25;cursor:not-allowed}.slider.vertical{display:inline-block;width:0.5rem;height:12.5rem;margin:0 1.25rem;transform:scale(1, -1)}.slider.vertical .slider-fill{top:0;width:0.5rem;max-height:100%}.slider.vertical .slider-handle{position:absolute;top:0;left:50%;width:1.4rem;height:1.4rem;transform:translateX(-50%)}.sticky-container{position:relative}.sticky{position:relative;z-index:0;transform:translate3d(0, 0, 0)}.sticky.is-stuck{position:fixed;z-index:5}.sticky.is-stuck.is-at-top{top:0}.sticky.is-stuck.is-at-bottom{bottom:0}.sticky.is-anchored{position:relative;right:auto;left:auto}.sticky.is-anchored.is-at-bottom{bottom:0}body.is-reveal-open{overflow:hidden}html.is-reveal-open,html.is-reveal-open body{min-height:100%;overflow:hidden;position:fixed;user-select:none}.reveal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1005;display:none;background-color:rgba(10,10,10,0.45);overflow-y:scroll}.reveal{z-index:1006;backface-visibility:hidden;display:none;padding:1rem;border:1px solid #cacaca;border-radius:0;background-color:#fefefe;position:relative;top:100px;margin-right:auto;margin-left:auto;overflow-y:auto}[data-whatinput='mouse'] .reveal{outline:0}@media print, screen and (min-width: 40em){.reveal{min-height:0}}.reveal .column,.reveal .columns{min-width:0}.reveal>:last-child{margin-bottom:0}@media print, screen and (min-width: 40em){.reveal{width:600px;max-width:75rem}}@media print, screen and (min-width: 40em){.reveal .reveal{right:auto;left:auto;margin:0 auto}}.reveal.collapse{padding:0}@media print, screen and (min-width: 40em){.reveal.tiny{width:30%;max-width:75rem}}@media print, screen and (min-width: 40em){.reveal.small{width:50%;max-width:75rem}}@media print, screen and (min-width: 40em){.reveal.large{width:90%;max-width:75rem}}.reveal.full{top:0;left:0;width:100%;max-width:none;height:100%;height:100vh;min-height:100vh;margin-left:0;border:0;border-radius:0}@media screen and (max-width: 39.9375em){.reveal{top:0;left:0;width:100%;max-width:none;height:100%;height:100vh;min-height:100vh;margin-left:0;border:0;border-radius:0}}.reveal.without-overlay{position:fixed}.switch{height:2rem;position:relative;margin-bottom:1rem;outline:0;font-size:0.875rem;font-weight:bold;color:#fefefe;user-select:none}.switch-input{position:absolute;margin-bottom:0;opacity:0}.switch-paddle{position:relative;display:block;width:4rem;height:2rem;border-radius:0;background:#cacaca;transition:all 0.25s ease-out;font-weight:inherit;color:inherit;cursor:pointer}input+.switch-paddle{margin:0}.switch-paddle::after{position:absolute;top:0.25rem;left:0.25rem;display:block;width:1.5rem;height:1.5rem;transform:translate3d(0, 0, 0);border-radius:0;background:#fefefe;transition:all 0.25s ease-out;content:''}input:checked ~ .switch-paddle{background:#1779ba}input:checked ~ .switch-paddle::after{left:2.25rem}[data-whatinput='mouse'] input:focus ~ .switch-paddle{outline:0}.switch-active,.switch-inactive{position:absolute;top:50%;transform:translateY(-50%)}.switch-active{left:8%;display:none}input:checked+label>.switch-active{display:block}.switch-inactive{right:15%}input:checked+label>.switch-inactive{display:none}.switch.tiny{height:1.5rem}.switch.tiny .switch-paddle{width:3rem;height:1.5rem;font-size:0.625rem}.switch.tiny .switch-paddle::after{top:0.25rem;left:0.25rem;width:1rem;height:1rem}.switch.tiny input:checked ~ .switch-paddle::after{left:1.75rem}.switch.small{height:1.75rem}.switch.small .switch-paddle{width:3.5rem;height:1.75rem;font-size:0.75rem}.switch.small .switch-paddle::after{top:0.25rem;left:0.25rem;width:1.25rem;height:1.25rem}.switch.small input:checked ~ .switch-paddle::after{left:2rem}.switch.large{height:2.5rem}.switch.large .switch-paddle{width:5rem;height:2.5rem;font-size:1rem}.switch.large .switch-paddle::after{top:0.25rem;left:0.25rem;width:2rem;height:2rem}.switch.large input:checked ~ .switch-paddle::after{left:2.75rem}table{width:100%;margin-bottom:1rem;border-radius:0}thead,tbody,tfoot{border:1px solid #f1f1f1;background-color:#fefefe}caption{padding:0.5rem 0.625rem 0.625rem;font-weight:bold}thead{background:#f8f8f8;color:#0a0a0a}tfoot{background:#f1f1f1;color:#0a0a0a}thead tr,tfoot tr{background:transparent}thead th,thead td,tfoot th,tfoot td{padding:0.5rem 0.625rem 0.625rem;font-weight:bold;text-align:left}tbody th,tbody td{padding:0.5rem 0.625rem 0.625rem}tbody tr:nth-child(even){border-bottom:0;background-color:#f1f1f1}table.unstriped tbody{background-color:#fefefe}table.unstriped tbody tr{border-bottom:0;border-bottom:1px solid #f1f1f1;background-color:#fefefe}@media screen and (max-width: 63.9375em){table.stack thead{display:none}table.stack tfoot{display:none}table.stack tr,table.stack th,table.stack td{display:block}table.stack td{border-top:0}}table.scroll{display:block;width:100%;overflow-x:auto}table.hover thead tr:hover{background-color:#f3f3f3}table.hover tfoot tr:hover{background-color:#ececec}table.hover tbody tr:hover{background-color:#f9f9f9}table.hover:not(.unstriped) tr:nth-of-type(even):hover{background-color:#ececec}.table-scroll{overflow-x:auto}.table-scroll table{width:auto}.tabs{margin:0;border:1px solid #e6e6e6;background:#fefefe;list-style-type:none}.tabs::before,.tabs::after{display:table;content:' '}.tabs::after{clear:both}.tabs.vertical>li{display:block;float:none;width:auto}.tabs.simple>li>a{padding:0}.tabs.simple>li>a:hover{background:transparent}.tabs.primary{background:#1779ba}.tabs.primary>li>a{color:#fefefe}.tabs.primary>li>a:hover,.tabs.primary>li>a:focus{background:#1673b1}.tabs-title{float:left}.tabs-title>a{display:block;padding:1.25rem 1.5rem;font-size:0.75rem;line-height:1;color:#1779ba}.tabs-title>a:hover{background:#fefefe;color:#1468a0}.tabs-title>a:focus,.tabs-title>a[aria-selected='true']{background:#e6e6e6;color:#1779ba}.tabs-content{border:1px solid #e6e6e6;border-top:0;background:#fefefe;color:#0a0a0a;transition:all 0.5s ease}.tabs-content.vertical{border:1px solid #e6e6e6;border-left:0}.tabs-panel{display:none;padding:1rem}.tabs-panel[aria-hidden="false"]{display:block}.thumbnail{display:inline-block;max-width:100%;margin-bottom:1rem;border:solid 4px #fefefe;border-radius:0;box-shadow:0 0 0 1px rgba(10,10,10,0.2);line-height:0}a.thumbnail{transition:box-shadow 200ms ease-out}a.thumbnail:hover,a.thumbnail:focus{box-shadow:0 0 6px 1px rgba(23,121,186,0.5)}a.thumbnail image{box-shadow:none}.title-bar{padding:0.5rem;background:#0a0a0a;color:#fefefe}.title-bar::before,.title-bar::after{display:table;content:' '}.title-bar::after{clear:both}.title-bar .menu-icon{margin-left:0.25rem;margin-right:0.25rem}.title-bar-left{float:left}.title-bar-right{float:right;text-align:right}.title-bar-title{display:inline-block;vertical-align:middle;font-weight:bold}.has-tip{position:relative;display:inline-block;border-bottom:dotted 1px #8a8a8a;font-weight:bold;cursor:help}.tooltip{position:absolute;top:calc(100% + 0.6495rem);z-index:1200;max-width:10rem;padding:0.75rem;border-radius:0;background-color:#0a0a0a;font-size:80%;color:#fefefe}.tooltip::before{display:block;width:0;height:0;border:inset 0.75rem;content:'';border-top-width:0;border-bottom-style:solid;border-color:transparent transparent #0a0a0a;position:absolute;bottom:100%;left:50%;transform:translateX(-50%)}.tooltip.top::before{display:block;width:0;height:0;border:inset 0.75rem;content:'';border-bottom-width:0;border-top-style:solid;border-color:#0a0a0a transparent transparent;top:100%;bottom:auto}.tooltip.left::before{display:block;width:0;height:0;border:inset 0.75rem;content:'';border-right-width:0;border-left-style:solid;border-color:transparent transparent transparent #0a0a0a;top:50%;bottom:auto;left:100%;transform:translateY(-50%)}.tooltip.right::before{display:block;width:0;height:0;border:inset 0.75rem;content:'';border-left-width:0;border-right-style:solid;border-color:transparent #0a0a0a transparent transparent;top:50%;right:100%;bottom:auto;left:auto;transform:translateY(-50%)}.top-bar{padding:0.5rem}.top-bar::before,.top-bar::after{display:table;content:' '}.top-bar::after{clear:both}.top-bar,.top-bar ul{background-color:#e6e6e6}.top-bar input{max-width:200px;margin-right:1rem}.top-bar .input-group-field{width:100%;margin-right:0}.top-bar input.button{width:auto}.top-bar .top-bar-left,.top-bar .top-bar-right{width:100%}@media print, screen and (min-width: 40em){.top-bar .top-bar-left,.top-bar .top-bar-right{width:auto}}@media screen and (max-width: 63.9375em){.top-bar.stacked-for-medium .top-bar-left,.top-bar.stacked-for-medium .top-bar-right{width:100%}}@media screen and (max-width: 74.9375em){.top-bar.stacked-for-large .top-bar-left,.top-bar.stacked-for-large .top-bar-right{width:100%}}.top-bar-title{display:inline-block;float:left;padding:0.5rem 1rem 0.5rem 0}.top-bar-title .menu-icon{bottom:2px}.top-bar-left{float:left}.top-bar-right{float:right}.hero-cow{color:white}.search-bar div{display:inline-block}.footer-bar{margin:0;background:none}.menu li{display:inline-flex;vertical-align:middle}header{background-color:yellow}main{background-image:url(grassy_background.jpg);opacity:50%}.card{border-radius:1rem}.small-cow{max-height:280px;max-width:280px}.next-card{text-align:center;vertical-align:middle}.recipe-cards{padding-top:2rem;padding-bottom:2rem}.yellow{background-color:yellow}.white{background-color:white}.ingredients-box{display:block;align-items:center}.ingredients li{list-style:none}.recipe-photo{margin-top:1rem} diff --git a/public/assets/application-3259c52241b42227168b494d8b89f1c1e0af214eca4904d60d9da470b4054e21.css.gz b/public/assets/application-3259c52241b42227168b494d8b89f1c1e0af214eca4904d60d9da470b4054e21.css.gz new file mode 100644 index 000000000..5279b2d0d Binary files /dev/null and b/public/assets/application-3259c52241b42227168b494d8b89f1c1e0af214eca4904d60d9da470b4054e21.css.gz differ diff --git a/public/assets/application-9e023c92b003df8e2fa4aa3a6a331ea79d8a6e3ecebdf37a16a0f84a6d896960.js b/public/assets/application-9e023c92b003df8e2fa4aa3a6a331ea79d8a6e3ecebdf37a16a0f84a6d896960.js new file mode 100644 index 000000000..df0a6a7fb --- /dev/null +++ b/public/assets/application-9e023c92b003df8e2fa4aa3a6a331ea79d8a6e3ecebdf37a16a0f84a6d896960.js @@ -0,0 +1,9 @@ +function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=!!t&&"length"in t&&t.length,n=ft.type(t);return"function"!==n&&!ft.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function i(t,e,n){if(ft.isFunction(e))return ft.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return ft.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(xt.test(e))return ft.filter(e,t,n);e=ft.filter(e,t)}return ft.grep(t,function(t){return ft.inArray(t,e)>-1!==n})}function o(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}function r(t){var e={};return ft.each(t.match(Ft)||[],function(t,n){e[n]=!0}),e}function s(){it.addEventListener?(it.removeEventListener("DOMContentLoaded",a),t.removeEventListener("load",a)):(it.detachEvent("onreadystatechange",a),t.detachEvent("onload",a))}function a(){(it.addEventListener||"load"===t.event.type||"complete"===it.readyState)&&(s(),ft.ready())}function l(t,e,n){if(n===undefined&&1===t.nodeType){var i="data-"+e.replace(Dt,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Pt.test(n)?ft.parseJSON(n):n)}catch(t){}ft.data(t,e,n)}else n=undefined}return n}function u(t){var e;for(e in t)if(("data"!==e||!ft.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function c(t,e,n,i){if(zt(t)){var o,r,s=ft.expando,a=t.nodeType,l=a?ft.cache:t,u=a?t[s]:t[s]&&s;if(u&&l[u]&&(i||l[u].data)||n!==undefined||"string"!=typeof e)return u||(u=a?t[s]=nt.pop()||ft.guid++:s),l[u]||(l[u]=a?{}:{toJSON:ft.noop}),"object"!=typeof e&&"function"!=typeof e||(i?l[u]=ft.extend(l[u],e):l[u].data=ft.extend(l[u].data,e)),r=l[u],i||(r.data||(r.data={}),r=r.data),n!==undefined&&(r[ft.camelCase(e)]=n),"string"==typeof e?null==(o=r[e])&&(o=r[ft.camelCase(e)]):o=r,o}}function d(t,e,n){if(zt(t)){var i,o,r=t.nodeType,s=r?ft.cache:t,a=r?t[ft.expando]:ft.expando;if(s[a]){if(e&&(i=n?s[a]:s[a].data)){ft.isArray(e)?e=e.concat(ft.map(e,ft.camelCase)):e in i?e=[e]:(e=ft.camelCase(e),e=e in i?[e]:e.split(" ")),o=e.length;for(;o--;)delete i[e[o]];if(n?!u(i):!ft.isEmptyObject(i))return}(n||(delete s[a].data,u(s[a])))&&(r?ft.cleanData([t],!0):dt.deleteExpando||s!=s.window?delete s[a]:s[a]=undefined)}}}function h(t,e,n,i){var o,r=1,s=20,a=i?function(){return i.cur()}:function(){return ft.css(t,e,"")},l=a(),u=n&&n[3]||(ft.cssNumber[e]?"":"px"),c=(ft.cssNumber[e]||"px"!==u&&+l)&&Rt.exec(ft.css(t,e));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do{r=r||".5",c/=r,ft.style(t,e,c+u)}while(r!==(r=a()/l)&&1!==r&&--s)}return n&&(c=+c||+l||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=o)),o}function f(t){var e=Bt.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function p(t,e){var n,i,o=0,r="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):undefined;if(!r)for(r=[],n=t.childNodes||t;null!=(i=n[o]);o++)!e||ft.nodeName(i,e)?r.push(i):ft.merge(r,p(i,e));return e===undefined||e&&ft.nodeName(t,e)?ft.merge([t],r):r}function m(t,e){for(var n,i=0;null!=(n=t[i]);i++)ft._data(n,"globalEval",!e||ft._data(e[i],"globalEval"))}function g(t){Nt.test(t.type)&&(t.defaultChecked=t.checked)}function v(t,e,n,i,o){for(var r,s,a,l,u,c,d,h=t.length,v=f(e),y=[],b=0;b"!==d[1]||Ut.test(s)?0:l:l.firstChild,r=s&&s.childNodes.length;r--;)ft.nodeName(c=s.childNodes[r],"tbody")&&!c.childNodes.length&&s.removeChild(c);for(ft.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(e.createTextNode(s));for(l&&v.removeChild(l),dt.appendChecked||ft.grep(p(y,"input"),g),b=0;s=y[b++];)if(i&&ft.inArray(s,i)>-1)o&&o.push(s);else if(a=ft.contains(s.ownerDocument,s),l=p(v.appendChild(s),"script"),a&&m(l),n)for(r=0;s=l[r++];)jt.test(s.type||"")&&n.push(s);return l=null,v}function y(){return!0}function b(){return!1}function w(){try{return it.activeElement}catch(t){}}function C(t,e,n,i,o,r){var s,a;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=undefined);for(a in e)C(t,a,n,i,e[a],r);return t}if(null==i&&null==o?(o=n,i=n=undefined):null==o&&("string"==typeof n?(o=i,i=undefined):(o=i,i=n,n=undefined)),!1===o)o=b;else if(!o)return t;return 1===r&&(s=o,o=function(t){return ft().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=ft.guid++)),t.each(function(){ft.event.add(this,e,o,i,n)})}function k(t,e){return ft.nodeName(t,"table")&&ft.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function x(t){return t.type=(null!==ft.find.attr(t,"type"))+"/"+t.type,t}function $(t){var e=ie.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function T(t,e){if(1===e.nodeType&&ft.hasData(t)){var n,i,o,r=ft._data(t),s=ft._data(e,r),a=r.events;if(a){delete s.handle,s.events={};for(n in a)for(i=0,o=a[n].length;i1&&"string"==typeof f&&!dt.checkClone&&ne.test(f))return t.each(function(o){var r=t.eq(o);m&&(e[0]=f.call(this,o,r.html())),E(r,e,n,i)});if(d&&(u=v(e,t[0].ownerDocument,!1,t,i),o=u.firstChild,1===u.childNodes.length&&(u=o),o||i)){for(a=ft.map(p(u,"script"),x),s=a.length;c")).appendTo(e.documentElement),e=(ae[0].contentWindow||ae[0].contentDocument).document,e.write(),e.close(),n=S(t,e),ae.detach()),le[t]=n),n}function z(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function P(t){if(t in xe)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=ke.length;n--;)if((t=ke[n]+e)in xe)return t}function D(t,e){for(var n,i,o,r=[],s=0,a=t.length;s=0&&n=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==ft.type(t)||t.nodeType||ft.isWindow(t))return!1;try{if(t.constructor&&!ct.call(t,"constructor")&&!ct.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(!dt.ownFirst)for(e in t)return ct.call(t,e);for(e in t);return e===undefined||ct.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?lt[ut.call(t)]||"object":typeof t},globalEval:function(e){e&&ft.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(mt,"ms-").replace(gt,vt)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var i,o=0;if(n(t))for(i=t.length;ok.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[N]=!0,t}function o(t){var e=P.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var n=t.split("|"),i=n.length;i--;)k.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||V)-(~t.sourceIndex||V);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function u(t){return i(function(e){return e=+e,i(function(n,i){for(var o,r=t([],n.length,e),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function c(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function d(){}function h(t){for(var e=0,n=t.length,i="";e1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function m(t,n,i){for(var o=0,r=n.length;o-1&&(i[u]=!(s[u]=d))}}else b=g(b===s?b.splice(p,b.length):b),r?r(null,s,b,l):Z.apply(s,b)})}function y(t){for(var e,n,i,o=t.length,r=k.relative[t[0].type],s=r||k.relative[" "],a=r?1:0,l=f(function(t){return t===e},s,!0),u=f(function(t){return tt(e,t)>-1},s,!0),c=[function(t,n,i){var o=!r&&(i||n!==F)||((e=n).nodeType?l(t,n,i):u(t,n,i));return e=null,o}];a1&&p(c),a>1&&h(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),n,a0,r=t.length>0,s=function(i,s,a,l,u){var c,d,h,f=0,p="0",m=i&&[],v=[],y=F,b=i||r&&k.find.TAG("*",u),w=j+=null==y?1:Math.random()||.1,C=b.length;for(u&&(F=s===P||s||u);p!==C&&null!=(c=b[p]);p++){if(r&&c){for(d=0,s||c.ownerDocument===P||(z(c),a=!O);h=t[d++];)if(h(c,s||P,a)){l.push(c);break}u&&(j=w)}o&&((c=!h&&c)&&f--,i&&m.push(c))}if(f+=p,o&&p!==f){for(d=0;h=n[d++];)h(m,v,s,a);if(i){if(f>0)for(;p--;)m[p]||v[p]||(v[p]=G.call(l));v=g(v)}Z.apply(l,v),u&&!i&&v.length>0&&f+n.length>1&&e.uniqueSort(l)}return u&&(j=w,F=y),m};return o?i(s):s}var w,C,k,x,$,T,_,E,F,S,A,z,P,D,O,R,L,H,q,N="sizzle"+1*new Date,M=t.document,j=0,I=0,B=n(),W=n(),K=n(),U=function(t,e){return t===e&&(A=!0),0},V=1<<31,Q={}.hasOwnProperty,Y=[],G=Y.pop,X=Y.push,Z=Y.push,J=Y.slice,tt=function(t,e){for(var n=0,i=t.length;n+~]|"+nt+")"+nt+"*"),ct=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),dt=new RegExp(rt),ht=new RegExp("^"+it+"$"),ft={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+rt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},pt=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,wt=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),Ct=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},kt=function(){z()};try{Z.apply(Y=J.call(M.childNodes),M.childNodes),Y[M.childNodes.length].nodeType}catch(t){Z={apply:Y.length?function(t,e){X.apply(t,J.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}C=e.support={},$=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},z=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:M;return i!==P&&9===i.nodeType&&i.documentElement?(P=i,D=P.documentElement,O=!$(P),(n=P.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",kt,!1):n.attachEvent&&n.attachEvent("onunload",kt)),C.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),C.getElementsByTagName=o(function(t){return t.appendChild(P.createComment("")),!t.getElementsByTagName("*").length}),C.getElementsByClassName=gt.test(P.getElementsByClassName),C.getById=o(function(t){return D.appendChild(t).id=N,!P.getElementsByName||!P.getElementsByName(N).length}),C.getById?(k.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&O){var n=e.getElementById(t);return n?[n]:[]}},k.filter.ID=function(t){var e=t.replace(wt,Ct);return function(t){return t.getAttribute("id")===e}}):(delete k.find.ID,k.filter.ID=function(t){var e=t.replace(wt,Ct);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),k.find.TAG=C.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):C.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},k.find.CLASS=C.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&O)return e.getElementsByClassName(t)},L=[],R=[],(C.qsa=gt.test(P.querySelectorAll))&&(o(function(t){D.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||R.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+N+"-]").length||R.push("~="),t.querySelectorAll(":checked").length||R.push(":checked"),t.querySelectorAll("a#"+N+"+*").length||R.push(".#.+[+~]")}),o(function(t){var e=P.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&R.push("name"+nt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),R.push(",.*:")})),(C.matchesSelector=gt.test(H=D.matches||D.webkitMatchesSelector||D.mozMatchesSelector||D.oMatchesSelector||D.msMatchesSelector))&&o(function(t){C.disconnectedMatch=H.call(t,"div"),H.call(t,"[s!='']:x"),L.push("!=",rt)}),R=R.length&&new RegExp(R.join("|")),L=L.length&&new RegExp(L.join("|")),e=gt.test(D.compareDocumentPosition),q=e||gt.test(D.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},U=e?function(t,e){if(t===e)return A=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!C.sortDetached&&e.compareDocumentPosition(t)===n?t===P||t.ownerDocument===M&&q(M,t)?-1:e===P||e.ownerDocument===M&&q(M,e)?1:S?tt(S,t)-tt(S,e):0:4&n?-1:1)}:function(t,e){if(t===e)return A=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,a=[t],l=[e];if(!o||!r)return t===P?-1:e===P?1:o?-1:r?1:S?tt(S,t)-tt(S,e):0;if(o===r)return s(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?s(a[i],l[i]):a[i]===M?-1:l[i]===M?1:0},P):P},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==P&&z(t),n=n.replace(ct,"='$1']"),C.matchesSelector&&O&&!K[n+" "]&&(!L||!L.test(n))&&(!R||!R.test(n)))try{var i=H.call(t,n);if(i||C.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(n,P,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==P&&z(t),q(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==P&&z(t);var n=k.attrHandle[e.toLowerCase()],i=n&&Q.call(k.attrHandle,e.toLowerCase())?n(t,e,!O):undefined;return i!==undefined?i:C.attributes||!O?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,o=0;if(A=!C.detectDuplicates,S=!C.sortStable&&t.slice(0),t.sort(U),A){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)t.splice(n[i],1)}return S=null,t},x=e.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=x(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=x(e);return n},k=e.selectors={cacheLength:50,createPseudo:i,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(wt,Ct),t[3]=(t[3]||t[4]||t[5]||"").replace(wt,Ct),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2] +;return ft.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&dt.test(n)&&(e=T(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(wt,Ct).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=B[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(o){var r=e.attr(o,t);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(st," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var u,c,d,h,f,p,m=r!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(g){if(r){for(;m;){for(h=e;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?g.firstChild:g.lastChild],s&&y){for(h=g,d=h[N]||(h[N]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),u=c[t]||[],f=u[0]===j&&u[1],b=f&&u[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[j,f,b];break}}else if(y&&(h=e,d=h[N]||(h[N]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),u=c[t]||[],f=u[0]===j&&u[1],b=f),!1===b)for(;(h=++f&&h&&h[m]||(b=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&(d=h[N]||(h[N]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),c[t]=[j,b]),h!==e)););return(b-=o)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,n){var o,r=k.pseudos[t]||k.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return r[N]?r(n):r.length>1?(o=[t,t,"",n],k.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,o=r(t,n),s=o.length;s--;)i=tt(t,o[s]),t[i]=!(e[i]=o[s])}):function(t){return r(t,0,o)}):r}},pseudos:{not:i(function(t){var e=[],n=[],o=_(t.replace(at,"$1"));return o[N]?i(function(t,e,n,i){for(var r,s=o(t,null,i,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))}):function(t,i,r){return e[0]=t,o(e,null,r,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(wt,Ct),function(e){return(e.textContent||e.innerText||x(e)).indexOf(t)>-1}}),lang:i(function(t){return ht.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(wt,Ct).toLowerCase(),function(e){var n;do{if(n=O?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===D},focus:function(t){return t===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!k.pseudos.empty(t)},header:function(t){return mt.test(t.nodeName)},input:function(t){return pt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:u(function(){return[0]}),last:u(function(t,e){return[e-1]}),eq:u(function(t,e,n){return[n<0?n+e:n]}),even:u(function(t,e){for(var n=0;n=0;)t.push(i);return t}),gt:u(function(t,e,n){for(var i=n<0?n+e:n;++i2&&"ID"===(s=r[0]).type&&C.getById&&9===e.nodeType&&O&&k.relative[r[1].type]){if(!(e=(k.find.ID(s.matches[0].replace(wt,Ct),e)||[])[0]))return n;u&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(o=ft.needsContext.test(t)?0:r.length;o--&&(s=r[o],!k.relative[a=s.type]);)if((l=k.find[a])&&(i=l(s.matches[0].replace(wt,Ct),yt.test(r[0].type)&&c(e.parentNode)||e))){if(r.splice(o,1),!(t=i.length&&h(r)))return Z.apply(n,i),n;break}}return(u||_(t,d))(i,e,!O,n,!e||yt.test(t)&&c(e.parentNode)||e),n},C.sortStable=N.split("").sort(U).join("")===N,C.detectDuplicates=!!A,z(),C.sortDetached=o(function(t){return 1&t.compareDocumentPosition(P.createElement("div"))}),o(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||r("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),C.attributes&&o(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||r("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||r(et,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);ft.find=yt,ft.expr=yt.selectors,ft.expr[":"]=ft.expr.pseudos,ft.uniqueSort=ft.unique=yt.uniqueSort,ft.text=yt.getText,ft.isXMLDoc=yt.isXML,ft.contains=yt.contains;var bt=function(t,e,n){for(var i=[],o=n!==undefined;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&ft(t).is(n))break;i.push(t)}return i},wt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},Ct=ft.expr.match.needsContext,kt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,xt=/^.[^:#\[\.,]*$/;ft.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?ft.find.matchesSelector(i,t)?[i]:[]:ft.find.matches(t,ft.grep(e,function(t){return 1===t.nodeType}))},ft.fn.extend({find:function(t){var e,n=[],i=this,o=i.length;if("string"!=typeof t)return this.pushStack(ft(t).filter(function(){for(e=0;e1?ft.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&Ct.test(t)?ft(t):t||[],!1).length}});var $t,Tt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(ft.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||$t,"string"==typeof t){if(!(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Tt.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof ft?e[0]:e,ft.merge(this,ft.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:it,!0)),kt.test(i[1])&&ft.isPlainObject(e))for(i in e)ft.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}if((o=it.getElementById(i[2]))&&o.parentNode){if(o.id!==i[2])return $t.find(t);this.length=1,this[0]=o}return this.context=it,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):ft.isFunction(t)?"undefined"!=typeof n.ready?n.ready(t):t(ft):(t.selector!==undefined&&(this.selector=t.selector,this.context=t.context),ft.makeArray(t,this))}).prototype=ft.fn,$t=ft(it);var _t=/^(?:parents|prev(?:Until|All))/,Et={children:!0,contents:!0,next:!0,prev:!0};ft.fn.extend({has:function(t){var e,n=ft(t,this),i=n.length;return this.filter(function(){for(e=0;e-1:1===n.nodeType&&ft.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?ft.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?ft.inArray(this[0],ft(t)):ft.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(ft.uniqueSort(ft.merge(this.get(),ft(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ft.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return bt(t,"parentNode")},parentsUntil:function(t,e,n){return bt(t,"parentNode",n)},next:function(t){return o(t,"nextSibling")},prev:function(t){return o(t,"previousSibling")},nextAll:function(t){return bt(t,"nextSibling")},prevAll:function(t){return bt(t,"previousSibling")},nextUntil:function(t,e,n){return bt(t,"nextSibling",n)},prevUntil:function(t,e,n){return bt(t,"previousSibling",n)},siblings:function(t){return wt((t.parentNode||{}).firstChild,t)},children:function(t){return wt(t.firstChild)},contents:function(t){return ft.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:ft.merge([],t.childNodes)}},function(t,e){ft.fn[t]=function(n,i){var o=ft.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=ft.filter(i,o)),this.length>1&&(Et[t]||(o=ft.uniqueSort(o)),_t.test(t)&&(o=o.reverse())),this.pushStack(o)}});var Ft=/\S+/g;ft.Callbacks=function(t){t="string"==typeof t?r(t):ft.extend({},t);var e,n,i,o,s=[],a=[],l=-1,u=function(){for(o=t.once,i=e=!0;a.length;l=-1)for(n=a.shift();++l-1;)s.splice(n,1),n<=l&&l--}),this},has:function(t){return t?ft.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=n="",this},disabled:function(){return!s},lock:function(){return o=!0,n||c.disable(),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=n||[],n=[t,n.slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},ft.extend({Deferred:function(t){var e=[["resolve","done",ft.Callbacks("once memory"),"resolved"],["reject","fail",ft.Callbacks("once memory"),"rejected"],["notify","progress",ft.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return ft.Deferred(function(n){ft.each(e,function(e,r){var s=ft.isFunction(t[e])&&t[e];o[r[1]](function(){var t=s&&s.apply(this,arguments);t&&ft.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this===i?n.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?ft.extend(t,i):i}},o={};return i.pipe=i.then,ft.each(e,function(t,r){var s=r[2],a=r[3];i[r[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?i:this,arguments),this},o[r[0]+"With"]=s.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e,n,i,o=0,r=ot.call(arguments),s=r.length,a=1!==s||t&&ft.isFunction(t.promise)?s:0,l=1===a?t:ft.Deferred(),u=function(t,n,i){return function(o){n[t]=this,i[t]=arguments.length>1?ot.call(arguments):o,i===e?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1)for(e=new Array(s),n=new Array(s),i=new Array(s);o0||(St.resolveWith(it,[ft]),ft.fn.triggerHandler&&(ft(it).triggerHandler("ready"),ft(it).off("ready"))))}}),ft.ready.promise=function(e){if(!St)if(St=ft.Deferred(),"complete"===it.readyState||"loading"!==it.readyState&&!it.documentElement.doScroll)t.setTimeout(ft.ready);else if(it.addEventListener)it.addEventListener("DOMContentLoaded",a),t.addEventListener("load",a);else{it.attachEvent("onreadystatechange",a),t.attachEvent("onload",a);var n=!1;try{n=null==t.frameElement&&it.documentElement}catch(t){}n&&n.doScroll&&function e(){if(!ft.isReady){try{n.doScroll("left")}catch(n){return t.setTimeout(e,50)}s(),ft.ready()}}()}return St.promise(e)},ft.ready.promise();var At;for(At in ft(dt))break;dt.ownFirst="0"===At,dt.inlineBlockNeedsLayout=!1,ft(function(){var t,e,n,i;(n=it.getElementsByTagName("body")[0])&&n.style&&(e=it.createElement("div"),i=it.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",dt.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(i))}),function(){var t=it.createElement("div");dt.deleteExpando=!0;try{delete t.test}catch(t){dt.deleteExpando=!1}t=null}();var zt=function(t){var e=ft.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return(1===n||9===n)&&(!e||!0!==e&&t.getAttribute("classid")===e)},Pt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Dt=/([A-Z])/g;ft.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?ft.cache[t[ft.expando]]:t[ft.expando])&&!u(t)},data:function(t,e,n){return c(t,e,n)},removeData:function(t,e){return d(t,e)},_data:function(t,e,n){return c(t,e,n,!0)},_removeData:function(t,e){return d(t,e,!0)}}),ft.fn.extend({data:function(t,e){var n,i,o,r=this[0],s=r&&r.attributes;if(t===undefined){if(this.length&&(o=ft.data(r),1===r.nodeType&&!ft._data(r,"parsedAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=ft.camelCase(i.slice(5)),l(r,i,o[i])));ft._data(r,"parsedAttrs",!0)}return o}return"object"==typeof t?this.each(function(){ft.data(this,t)}):arguments.length>1?this.each(function(){ft.data(this,t,e)}):r?l(r,t,ft.data(r,t)):undefined},removeData:function(t){return this.each(function(){ft.removeData(this,t)})}}),ft.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=ft._data(t,e),n&&(!i||ft.isArray(n)?i=ft._data(t,e,ft.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=ft.queue(t,e),i=n.length,o=n.shift(),r=ft._queueHooks(t,e),s=function(){ft.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,s,r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return ft._data(t,n)||ft._data(t,n,{empty:ft.Callbacks("once memory").add(function(){ft._removeData(t,e+"queue"),ft._removeData(t,n)})})}}),ft.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length
a",dt.leadingWhitespace=3===t.firstChild.nodeType,dt.tbody=!t.getElementsByTagName("tbody").length,dt.htmlSerialize=!!t.getElementsByTagName("link").length,dt.html5Clone="<:nav>"!==it.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,e.appendChild(n),dt.appendChecked=n.checked,t.innerHTML="",dt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),n=it.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),dt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,dt.noCloneEvent=!!t.addEventListener,t[ft.expando]=1,dt.attributes=!t.getAttribute(ft.expando)}();var Wt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:dt.htmlSerialize?[0,"",""]:[1,"X
","
"]};Wt.optgroup=Wt.option,Wt.tbody=Wt.tfoot=Wt.colgroup=Wt.caption=Wt.thead,Wt.th=Wt.td;var Kt=/<|&#?\w+;/,Ut=/-1&&(p=f.split("."),f=p.shift(),p.sort()),s=f.indexOf(":")<0&&"on"+f,e=e[ft.expando]?e:new ft.Event(f,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=i),n=null==n?[e]:ft.makeArray(n,[e]),u=ft.event.special[f]||{},o||!u.trigger||!1!==u.trigger.apply(i,n))){if(!o&&!u.noBubble&&!ft.isWindow(i)){for(l=u.delegateType||f,Gt.test(l+f)||(a=a.parentNode);a;a=a.parentNode)h.push(a),c=a;c===(i.ownerDocument||it)&&h.push(c.defaultView||c.parentWindow||t)}for(d=0;(a=h[d++])&&!e.isPropagationStopped();)e.type=d>1?l:u.bindType||f,r=(ft._data(a,"events")||{})[e.type]&&ft._data(a,"handle"),r&&r.apply(a,n),(r=s&&a[s])&&r.apply&&zt(a)&&(e.result=r.apply(a,n),!1===e.result&&e.preventDefault());if(e.type=f,!o&&!e.isDefaultPrevented()&&(!u._default||!1===u._default.apply(h.pop(),n))&&zt(i)&&s&&i[f]&&!ft.isWindow(i)){c=i[s],c&&(i[s]=null),ft.event.triggered=f;try{i[f]()}catch(t){}ft.event.triggered=undefined,c&&(i[s]=c)}return e.result}},dispatch:function(t){t=ft.event.fix(t);var e,n,i,o,r,s=[],a=ot.call(arguments),l=(ft._data(this,"events")||{})[t.type]||[],u=ft.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,t)){for(s=ft.event.handlers.call(this,t,l),e=0;(o=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(r.namespace)||(t.handleObj=r,t.data=r.data,(i=((ft.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a))!==undefined&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,o,r,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==t.type)){for(i=[],n=0;n-1:ft.find(o,this,null,[l]).length),i[o]&&i.push(r);i.length&&s.push({elem:l,handlers:i})}return a]","i"),te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ee=/\s*$/g,re=f(it),se=re.appendChild(it.createElement("div"));ft.extend({htmlPrefilter:function(t){return t.replace(te,"<$1>")},clone:function(t,e,n){var i,o,r,s,a,l=ft.contains(t.ownerDocument,t);if(dt.html5Clone||ft.isXMLDoc(t)||!Jt.test("<"+t.nodeName+">")?r=t.cloneNode(!0):(se.innerHTML=t.outerHTML,se.removeChild(r=se.firstChild)),!(dt.noCloneEvent&&dt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ft.isXMLDoc(t)))for(i=p(r),a=p(t),s=0;null!=(o=a[s]);++s)i[s]&&_(o,i[s]);if(e)if(n)for(a=a||p(t),i=i||p(r),s=0;null!=(o=a[s]);s++)T(o,i[s]);else T(t,r);return i=p(r,"script"),i.length>0&&m(i,!l&&p(t,"script")),i=a=o=null,r},cleanData:function(t,e){for(var n,i,o,r,s=0,a=ft.expando,l=ft.cache,u=dt.attributes,c=ft.event.special;null!=(n=t[s]);s++)if((e||zt(n))&&(o=n[a],r=o&&l[o])){if(r.events)for(i in r.events)c[i]?ft.event.remove(n,i):ft.removeEvent(n,i,r.handle);l[o]&&(delete l[o],u||"undefined"==typeof n.removeAttribute?n[a]=undefined:n.removeAttribute(a),nt.push(o))}}}),ft.fn.extend({domManip:E,detach:function(t){return F(this,t,!0)},remove:function(t){return F(this,t)},text:function(t){return qt(this,function(t){return t===undefined?ft.text(this):this.empty().append((this[0]&&this[0].ownerDocument||it).createTextNode(t))},null,t,arguments.length)},append:function(){return E(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){k(this,t).appendChild(t)}})},prepend:function(){return E(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=k(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return E(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return E(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&ft.cleanData(p(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&ft.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){ +return t=null!=t&&t,e=null==e?t:e,this.map(function(){return ft.clone(this,t,e)})},html:function(t){return qt(this,function(t){var e=this[0]||{},n=0,i=this.length;if(t===undefined)return 1===e.nodeType?e.innerHTML.replace(Zt,""):undefined;if("string"==typeof t&&!ee.test(t)&&(dt.htmlSerialize||!Jt.test(t))&&(dt.leadingWhitespace||!It.test(t))&&!Wt[(Mt.exec(t)||["",""])[1].toLowerCase()]){t=ft.htmlPrefilter(t);try{for(;nt",u.childNodes[0].style.borderCollapse="separate",e=u.getElementsByTagName("td"),e[0].style.cssText="margin:0;border:0;padding:0;display:none",(r=0===e[0].offsetHeight)&&(e[0].style.display="",e[1].style.display="none",r=0===e[0].offsetHeight)),d.removeChild(l)}var n,i,o,r,s,a,l=it.createElement("div"),u=it.createElement("div");u.style&&(u.style.cssText="float:left;opacity:.5",dt.opacity="0.5"===u.style.opacity,dt.cssFloat=!!u.style.cssFloat,u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",dt.clearCloneStyle="content-box"===u.style.backgroundClip,l=it.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",u.innerHTML="",l.appendChild(u),dt.boxSizing=""===u.style.boxSizing||""===u.style.MozBoxSizing||""===u.style.WebkitBoxSizing,ft.extend(dt,{reliableHiddenOffsets:function(){return null==n&&e(),r},boxSizingReliable:function(){return null==n&&e(),o},pixelMarginRight:function(){return null==n&&e(),i},pixelPosition:function(){return null==n&&e(),n},reliableMarginRight:function(){return null==n&&e(),s},reliableMarginLeft:function(){return null==n&&e(),a}}))}();var fe,pe,me=/^(top|right|bottom|left)$/;t.getComputedStyle?(fe=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},pe=function(t,e,n){var i,o,r,s,a=t.style;return n=n||fe(t),s=n?n.getPropertyValue(e)||n[e]:undefined,""!==s&&s!==undefined||ft.contains(t.ownerDocument,t)||(s=ft.style(t,e)),n&&!dt.pixelMarginRight()&&ce.test(s)&&ue.test(e)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r),s===undefined?s:s+""}):he.currentStyle&&(fe=function(t){return t.currentStyle},pe=function(t,e,n){var i,o,r,s,a=t.style;return n=n||fe(t),s=n?n[e]:undefined,null==s&&a&&a[e]&&(s=a[e]),ce.test(s)&&!me.test(e)&&(i=a.left,o=t.runtimeStyle,r=o&&o.left,r&&(o.left=t.currentStyle.left),a.left="fontSize"===e?"1em":s,s=a.pixelLeft+"px",a.left=i,r&&(o.left=r)),s===undefined?s:s+""||"auto"});var ge=/alpha\([^)]*\)/i,ve=/opacity\s*=\s*([^)]*)/i,ye=/^(none|table(?!-c[ea]).+)/,be=new RegExp("^("+Ot+")(.*)$","i"),we={position:"absolute",visibility:"hidden",display:"block"},Ce={letterSpacing:"0",fontWeight:"400"},ke=["Webkit","O","Moz","ms"],xe=it.createElement("div").style;ft.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=pe(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":dt.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=ft.camelCase(e),l=t.style;if(e=ft.cssProps[a]||(ft.cssProps[a]=P(a)||a),s=ft.cssHooks[e]||ft.cssHooks[a],n===undefined)return s&&"get"in s&&(o=s.get(t,!1,i))!==undefined?o:l[e];if(r=typeof n,"string"===r&&(o=Rt.exec(n))&&o[1]&&(n=h(t,e,o),r="number"),null!=n&&n===n&&("number"===r&&(n+=o&&o[3]||(ft.cssNumber[a]?"":"px")),dt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),!(s&&"set"in s&&(n=s.set(t,n,i))===undefined)))try{l[e]=n}catch(t){}}},css:function(t,e,n,i){var o,r,s,a=ft.camelCase(e);return e=ft.cssProps[a]||(ft.cssProps[a]=P(a)||a),s=ft.cssHooks[e]||ft.cssHooks[a],s&&"get"in s&&(r=s.get(t,!0,n)),r===undefined&&(r=pe(t,e,i)),"normal"===r&&e in Ce&&(r=Ce[e]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),ft.each(["height","width"],function(t,e){ft.cssHooks[e]={get:function(t,n,i){if(n)return ye.test(ft.css(t,"display"))&&0===t.offsetWidth?de(t,we,function(){return L(t,e,i)}):L(t,e,i)},set:function(t,n,i){var o=i&&fe(t);return O(t,n,i?R(t,e,i,dt.boxSizing&&"border-box"===ft.css(t,"boxSizing",!1,o),o):0)}}}),dt.opacity||(ft.cssHooks.opacity={get:function(t,e){return ve.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,i=t.currentStyle,o=ft.isNumeric(e)?"alpha(opacity="+100*e+")":"",r=i&&i.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===ft.trim(r.replace(ge,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||i&&!i.filter)||(n.filter=ge.test(r)?r.replace(ge,o):r+" "+o)}}),ft.cssHooks.marginRight=z(dt.reliableMarginRight,function(t,e){if(e)return de(t,{display:"inline-block"},pe,[t,"marginRight"])}),ft.cssHooks.marginLeft=z(dt.reliableMarginLeft,function(t,e){if(e)return(parseFloat(pe(t,"marginLeft"))||(ft.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-de(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px"}),ft.each({margin:"",padding:"",border:"Width"},function(t,e){ft.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+Lt[i]+e]=r[i]||r[i-2]||r[0];return o}},ue.test(t)||(ft.cssHooks[t+e].set=O)}),ft.fn.extend({css:function(t,e){return qt(this,function(t,e,n){var i,o,r={},s=0;if(ft.isArray(e)){for(i=fe(t),o=e.length;s1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Ht(this)?ft(this).show():ft(this).hide()})}}),ft.Tween=H,H.prototype={constructor:H,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||ft.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(ft.cssNumber[n]?"":"px")},cur:function(){var t=H.propHooks[this.prop];return t&&t.get?t.get(this):H.propHooks._default.get(this)},run:function(t){var e,n=H.propHooks[this.prop];return this.options.duration?this.pos=e=ft.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+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(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=ft.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){ft.fx.step[t.prop]?ft.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[ft.cssProps[t.prop]]&&!ft.cssHooks[t.prop]?t.elem[t.prop]=t.now:ft.style(t.elem,t.prop,t.now+t.unit)}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ft.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},ft.fx=H.prototype.init,ft.fx.step={};var $e,Te,_e=/^(?:toggle|show|hide)$/,Ee=/queueHooks$/;ft.Animation=ft.extend(B,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return h(n.elem,t,Rt.exec(e),n),n}]},tweener:function(t,e){ft.isFunction(t)?(e=t,t=["*"]):t=t.match(Ft);for(var n,i=0,o=t.length;i
a",t=n.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),n.appendChild(e),t=n.getElementsByTagName("a")[0],t.style.cssText="top:1px",dt.getSetAttribute="t"!==n.className,dt.style=/top/.test(t.getAttribute("style")),dt.hrefNormalized="/a"===t.getAttribute("href"),dt.checkOn=!!e.value,dt.optSelected=o.selected,dt.enctype=!!it.createElement("form").enctype,i.disabled=!0,dt.optDisabled=!o.disabled,e=it.createElement("input"),e.setAttribute("value",""),dt.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),dt.radioValue="t"===e.value}();var Fe=/\r/g,Se=/[\x20\t\r\n\f]+/g;ft.fn.extend({val:function(t){var e,n,i,o=this[0];{if(arguments.length)return i=ft.isFunction(t),this.each(function(n){var o;1===this.nodeType&&(o=i?t.call(this,n,ft(this).val()):t,null==o?o="":"number"==typeof o?o+="":ft.isArray(o)&&(o=ft.map(o,function(t){return null==t?"":t+""})),(e=ft.valHooks[this.type]||ft.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&e.set(this,o,"value")!==undefined||(this.value=o))});if(o)return(e=ft.valHooks[o.type]||ft.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&(n=e.get(o,"value"))!==undefined?n:(n=o.value,"string"==typeof n?n.replace(Fe,""):null==n?"":n)}}}),ft.extend({valHooks:{option:{get:function(t){var e=ft.find.attr(t,"value");return null!=e?e:ft.trim(ft.text(t)).replace(Se," ")}},select:{get:function(t){for(var e,n,i=t.options,o=t.selectedIndex,r="select-one"===t.type||o<0,s=r?null:[],a=r?o+1:i.length,l=o<0?a:r?o:0;l-1)try{i.selected=n=!0}catch(t){i.scrollHeight}else i.selected=!1;return n||(t.selectedIndex=-1),o}}}}),ft.each(["radio","checkbox"],function(){ft.valHooks[this]={set:function(t,e){if(ft.isArray(e))return t.checked=ft.inArray(ft(t).val(),e)>-1}},dt.checkOn||(ft.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Ae,ze,Pe=ft.expr.attrHandle,De=/^(?:checked|selected)$/i,Oe=dt.getSetAttribute,Re=dt.input;ft.fn.extend({attr:function(t,e){return qt(this,ft.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){ft.removeAttr(this,t)})}}),ft.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof t.getAttribute?ft.prop(t,e,n):(1===r&&ft.isXMLDoc(t)||(e=e.toLowerCase(),o=ft.attrHooks[e]||(ft.expr.match.bool.test(e)?ze:Ae)),n!==undefined?null===n?void ft.removeAttr(t,e):o&&"set"in o&&(i=o.set(t,n,e))!==undefined?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:(i=ft.find.attr(t,e),null==i?undefined:i))},attrHooks:{type:{set:function(t,e){if(!dt.radioValue&&"radio"===e&&ft.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i,o=0,r=e&&e.match(Ft);if(r&&1===t.nodeType)for(;n=r[o++];)i=ft.propFix[n]||n,ft.expr.match.bool.test(n)?Re&&Oe||!De.test(n)?t[i]=!1:t[ft.camelCase("default-"+n)]=t[i]=!1:ft.attr(t,n,""),t.removeAttribute(Oe?n:i)}}),ze={set:function(t,e,n){return!1===e?ft.removeAttr(t,n):Re&&Oe||!De.test(n)?t.setAttribute(!Oe&&ft.propFix[n]||n,n):t[ft.camelCase("default-"+n)]=t[n]=!0,n}},ft.each(ft.expr.match.bool.source.match(/\w+/g),function(t,e){var n=Pe[e]||ft.find.attr;Re&&Oe||!De.test(e)?Pe[e]=function(t,e,i){var o,r;return i||(r=Pe[e],Pe[e]=o,o=null!=n(t,e,i)?e.toLowerCase():null,Pe[e]=r),o}:Pe[e]=function(t,e,n){if(!n)return t[ft.camelCase("default-"+e)]?e.toLowerCase():null}}),Re&&Oe||(ft.attrHooks.value={set:function(t,e,n){if(!ft.nodeName(t,"input"))return Ae&&Ae.set(t,e,n);t.defaultValue=e}}),Oe||(Ae={set:function(t,e,n){var i=t.getAttributeNode(n);if(i||t.setAttributeNode(i=t.ownerDocument.createAttribute(n)),i.value=e+="","value"===n||e===t.getAttribute(n))return e}},Pe.id=Pe.name=Pe.coords=function(t,e,n){var i;if(!n)return(i=t.getAttributeNode(e))&&""!==i.value?i.value:null},ft.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);if(n&&n.specified)return n.value},set:Ae.set},ft.attrHooks.contenteditable={set:function(t,e,n){Ae.set(t,""!==e&&e,n)}},ft.each(["width","height"],function(t,e){ft.attrHooks[e]={set:function(t,n){if(""===n)return t.setAttribute(e,"auto"),n}}})),dt.style||(ft.attrHooks.style={get:function(t){return t.style.cssText||undefined},set:function(t,e){return t.style.cssText=e+""}});var Le=/^(?:input|select|textarea|button|object)$/i,He=/^(?:a|area)$/i;ft.fn.extend({prop:function(t,e){return qt(this,ft.prop,t,e,arguments.length>1)},removeProp:function(t){return t=ft.propFix[t]||t,this.each(function(){try{this[t]=undefined,delete this[t]}catch(t){}})}}),ft.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&ft.isXMLDoc(t)||(e=ft.propFix[e]||e,o=ft.propHooks[e]),n!==undefined?o&&"set"in o&&(i=o.set(t,n,e))!==undefined?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=ft.find.attr(t,"tabindex");return e?parseInt(e,10):Le.test(t.nodeName)||He.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),dt.hrefNormalized||ft.each(["href","src"],function(t,e){ft.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),dt.optSelected||(ft.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),ft.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ft.propFix[this.toLowerCase()]=this}),dt.enctype||(ft.propFix.enctype="encoding");var qe=/[\t\r\n\f]/g;ft.fn.extend({addClass:function(t){var e,n,i,o,r,s,a,l=0;if(ft.isFunction(t))return this.each(function(e){ft(this).addClass(t.call(this,e,W(this)))});if("string"==typeof t&&t)for(e=t.match(Ft)||[];n=this[l++];)if(o=W(n),i=1===n.nodeType&&(" "+o+" ").replace(qe," ")){for(s=0;r=e[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=ft.trim(i),o!==a&&ft.attr(n,"class",a)}return this},removeClass:function(t){var e,n,i,o,r,s,a,l=0;if(ft.isFunction(t))return this.each(function(e){ft(this).removeClass(t.call(this,e,W(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Ft)||[];n=this[l++];)if(o=W(n),i=1===n.nodeType&&(" "+o+" ").replace(qe," ")){for(s=0;r=e[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");a=ft.trim(i),o!==a&&ft.attr(n,"class",a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):ft.isFunction(t)?this.each(function(n){ft(this).toggleClass(t.call(this,n,W(this),e),e)}):this.each(function(){var e,i,o,r;if("string"===n)for(i=0,o=ft(this),r=t.match(Ft)||[];e=r[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else t!==undefined&&"boolean"!==n||(e=W(this),e&&ft._data(this,"__className__",e),ft.attr(this,"class",e||!1===t?"":ft._data(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+W(n)+" ").replace(qe," ").indexOf(e)>-1)return!0;return!1}}),ft.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(t,e){ft.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),ft.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var Ne=t.location,Me=ft.now(),je=/\?/,Ie=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;ft.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,i=null,o=ft.trim(e+"");return o&&!ft.trim(o.replace(Ie,function(t,e,o,r){return n&&e&&(i=0),0===i?t:(n=o||e,i+=!r-!o,"")}))?Function("return "+o)():ft.error("Invalid JSON: "+e)},ft.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(i=new t.DOMParser,n=i.parseFromString(e,"text/xml")):(n=new t.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(e))}catch(t){n=undefined}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ft.error("Invalid XML: "+e),n};var Be=/#.*$/,We=/([?&])_=[^&]*/,Ke=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ue=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ve=/^(?:GET|HEAD)$/,Qe=/^\/\//,Ye=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ge={},Xe={},Ze="*/".concat("*"),Je=Ne.href,tn=Ye.exec(Je.toLowerCase())||[];ft.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Je,type:"GET",isLocal:Ue.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ft.parseJSON,"text xml":ft.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?V(V(t,ft.ajaxSettings),e):V(ft.ajaxSettings,t)},ajaxPrefilter:K(Ge),ajaxTransport:K(Xe),ajax:function(e,n){function i(e,n,i,o){var r,d,y,b,C,x=n;2!==w&&(w=2,l&&t.clearTimeout(l),c=undefined,a=o||"",k.readyState=e>0?4:0,r=e>=200&&e<300||304===e,i&&(b=Q(h,k,i)),b=Y(h,b,k,r),r?(h.ifModified&&(C=k.getResponseHeader("Last-Modified"),C&&(ft.lastModified[s]=C),(C=k.getResponseHeader("etag"))&&(ft.etag[s]=C)),204===e||"HEAD"===h.type?x="nocontent":304===e?x="notmodified":(x=b.state,d=b.data,y=b.error,r=!y)):(y=x,!e&&x||(x="error",e<0&&(e=0))),k.status=e,k.statusText=(n||x)+"",r?m.resolveWith(f,[d,x,k]):m.rejectWith(f,[k,x,y]),k.statusCode(v),v=undefined,u&&p.trigger(r?"ajaxSuccess":"ajaxError",[k,h,r?d:y]),g.fireWith(f,[k,x]),u&&(p.trigger("ajaxComplete",[k,h]),--ft.active||ft.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=undefined),n=n||{};var o,r,s,a,l,u,c,d,h=ft.ajaxSetup({},n),f=h.context||h,p=h.context&&(f.nodeType||f.jquery)?ft(f):ft.event,m=ft.Deferred(),g=ft.Callbacks("once memory"),v=h.statusCode||{},y={},b={},w=0,C="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!d)for(d={};e=Ke.exec(a);)d[e[1].toLowerCase()]=e[2];e=d[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?a:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return w||(t=b[n]=b[n]||t,y[t]=e),this},overrideMimeType:function(t){return w||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(w<2)for(e in t)v[e]=[v[e],t[e]];else k.always(t[k.status]);return this},abort:function(t){var e=t||C;return c&&c.abort(e),i(0,e),this}};if(m.promise(k).complete=g.add,k.success=k.done,k.error=k.fail,h.url=((e||h.url||Je)+"").replace(Be,"").replace(Qe,tn[1]+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=ft.trim(h.dataType||"*").toLowerCase().match(Ft)||[""],null==h.crossDomain&&(o=Ye.exec(h.url.toLowerCase()),h.crossDomain=!(!o||o[1]===tn[1]&&o[2]===tn[2]&&(o[3]||("http:"===o[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=ft.param(h.data,h.traditional)),U(Ge,h,n,k),2===w)return k;u=ft.event&&h.global,u&&0==ft.active++&&ft.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ve.test(h.type),s=h.url,h.hasContent||(h.data&&(s=h.url+=(je.test(s)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=We.test(s)?s.replace(We,"$1_="+Me++):s+(je.test(s)?"&":"?")+"_="+Me++)),h.ifModified&&(ft.lastModified[s]&&k.setRequestHeader("If-Modified-Since",ft.lastModified[s]),ft.etag[s]&&k.setRequestHeader("If-None-Match",ft.etag[s])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&k.setRequestHeader("Content-Type",h.contentType),k.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ze+"; q=0.01":""):h.accepts["*"]);for(r in h.headers)k.setRequestHeader(r,h.headers[r]);if(h.beforeSend&&(!1===h.beforeSend.call(f,k,h)||2===w))return k.abort();C="abort";for(r in{success:1,error:1,complete:1})k[r](h[r]);if(c=U(Xe,h,n,k)){if(k.readyState=1,u&&p.trigger("ajaxSend",[k,h]),2===w)return k;h.async&&h.timeout>0&&(l=t.setTimeout(function(){k.abort("timeout")},h.timeout));try{w=1,c.send(y,i)}catch(t){if(!(w<2))throw t;i(-1,t)}}else i(-1,"No Transport");return k},getJSON:function(t,e,n){return ft.get(t,e,n,"json")},getScript:function(t,e){return ft.get(t,undefined,e,"script")}}),ft.each(["get","post"],function(t,e){ft[e]=function(t,n,i,o){return ft.isFunction(n)&&(o=o||i,i=n,n=undefined),ft.ajax(ft.extend({url:t,type:e,dataType:o,data:n,success:i},ft.isPlainObject(t)&&t))}}),ft._evalUrl=function(t){return ft.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},ft.fn.extend({wrapAll:function(t){if(ft.isFunction(t))return this.each(function(e){ft(this).wrapAll(t.call(this,e))});if(this[0]){var e=ft(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return ft.isFunction(t)?this.each(function(e){ft(this).wrapInner(t.call(this,e))}):this.each(function(){var e=ft(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=ft.isFunction(t);return this.each(function(n){ft(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){ft.nodeName(this,"body")||ft(this).replaceWith(this.childNodes)}).end()}}),ft.expr.filters.hidden=function(t){return dt.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:X(t)},ft.expr.filters.visible=function(t){return!ft.expr.filters.hidden(t)};var en=/%20/g,nn=/\[\]$/,on=/\r?\n/g,rn=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;ft.param=function(t,e){var n,i=[],o=function(t,e){e=ft.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(e===undefined&&(e=ft.ajaxSettings&&ft.ajaxSettings.traditional),ft.isArray(t)||t.jquery&&!ft.isPlainObject(t))ft.each(t,function(){o(this.name,this.value)});else for(n in t)Z(n,t[n],e,o);return i.join("&").replace(en,"+")},ft.fn.extend({serialize:function(){return ft.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=ft.prop(this,"elements");return t?ft.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!ft(this).is(":disabled")&&sn.test(this.nodeName)&&!rn.test(t)&&(this.checked||!Nt.test(t))}).map(function(t,e){var n=ft(this).val();return null==n?null:ft.isArray(n)?ft.map(n,function(t){return{name:e.name,value:t.replace(on,"\r\n")}}):{name:e.name,value:n.replace(on,"\r\n")}}).get()}}),ft.ajaxSettings.xhr=t.ActiveXObject!==undefined?function(){return this.isLocal?tt():it.documentMode>8?J():/^(get|post|head|put|delete|options)$/i.test(this.type)&&J()||tt()}:J;var an=0,ln={},un=ft.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in ln)ln[t](undefined,!0)}),dt.cors=!!un&&"withCredentials"in un,un=dt.ajax=!!un,un&&ft.ajaxTransport(function(e){if(!e.crossDomain||dt.cors){var n;return{send:function(i,o){var r,s=e.xhr(),a=++an;if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)s[r]=e.xhrFields[r];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(r in i)i[r]!==undefined&&s.setRequestHeader(r,i[r]+"");s.send(e.hasContent&&e.data||null),n=function(t,i){var r,l,u;if(n&&(i||4===s.readyState))if(delete ln[a],n=undefined,s.onreadystatechange=ft.noop,i)4!==s.readyState&&s.abort();else{u={},r=s.status,"string"==typeof s.responseText&&(u.text=s.responseText);try{l=s.statusText}catch(t){l=""}r||!e.isLocal||e.crossDomain?1223===r&&(r=204):r=u.text?200:404}u&&o(r,l,u,s.getAllResponseHeaders())},e.async?4===s.readyState?t.setTimeout(n):s.onreadystatechange=ln[a]=n:n()},abort:function(){n&&n(undefined,!0)}}}}),ft.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return ft.globalEval(t),t}}}),ft.ajaxPrefilter("script",function(t){t.cache===undefined&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),ft.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=it.head||ft("head")[0]||it.documentElement;return{send:function(i,o){e=it.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||o(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(undefined,!0)}}}});var cn=[],dn=/(=)\?(?=&|$)|\?\?/;ft.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=cn.pop()||ft.expando+"_"+Me++;return this[t]=!0,t}}),ft.ajaxPrefilter("json jsonp",function(e,n,i){var o,r,s,a=!1!==e.jsonp&&(dn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=ft.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(dn,"$1"+o):!1!==e.jsonp&&(e.url+=(je.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||ft.error(o+" was not called"),s[0]},e.dataTypes[0]="json",r=t[o],t[o]=function(){s=arguments},i.always(function(){r===undefined?ft(t).removeProp(o):t[o]=r,e[o]&&(e.jsonpCallback=n.jsonpCallback,cn.push(o)),s&&ft.isFunction(r)&&r(s[0]),s=r=undefined}),"script"}),ft.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||it;var i=kt.exec(t),o=!n&&[];return i?[e.createElement(i[1])]:(i=v([t],e,o),o&&o.length&&ft(o).remove(),ft.merge([],i.childNodes))};var hn=ft.fn.load;ft.fn.load=function(t,e,n){if("string"!=typeof t&&hn)return hn.apply(this,arguments);var i,o,r,s=this,a=t.indexOf(" ");return a>-1&&(i=ft.trim(t.slice(a,t.length)),t=t.slice(0,a)),ft.isFunction(e)?(n=e,e=undefined):e&&"object"==typeof e&&(o="POST"),s.length>0&&ft.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){r=arguments,s.html(i?ft("
").append(ft.parseHTML(t)).find(i):t)}).always(n&&function(t,e){s.each(function(){n.apply(this,r||[t.responseText,e,t])})}),this},ft.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){ft.fn[e]=function(t){return this.on(e,t)}}),ft.expr.filters.animated=function(t){return ft.grep(ft.timers,function(e){return t===e.elem}).length},ft.offset={setOffset:function(t,e,n){var i,o,r,s,a,l,u,c=ft.css(t,"position"),d=ft(t),h={};"static"===c&&(t.style.position="relative"),a=d.offset(),r=ft.css(t,"top"),l=ft.css(t,"left"),u=("absolute"===c||"fixed"===c)&&ft.inArray("auto",[r,l])>-1,u?(i=d.position(),s=i.top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),ft.isFunction(e)&&(e=e.call(t,n,ft.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):d.css(h)}},ft.fn.extend({offset:function(t){if(arguments.length)return t===undefined?this:this.each(function(e){ft.offset.setOffset(this,t,e)});var e,n,i={top:0,left:0},o=this[0],r=o&&o.ownerDocument;if(r)return e=r.documentElement,ft.contains(e,o)?("undefined"!=typeof o.getBoundingClientRect&&(i=o.getBoundingClientRect()),n=et(r),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i},position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===ft.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),ft.nodeName(t[0],"html")||(n=t.offset()),n.top+=ft.css(t[0],"borderTopWidth",!0),n.left+=ft.css(t[0],"borderLeftWidth",!0)),{ +top:e.top-n.top-ft.css(i,"marginTop",!0),left:e.left-n.left-ft.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&!ft.nodeName(t,"html")&&"static"===ft.css(t,"position");)t=t.offsetParent;return t||he})}}),ft.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);ft.fn[t]=function(i){return qt(this,function(t,i,o){var r=et(t);if(o===undefined)return r?e in r?r[e]:r.document.documentElement[i]:t[i];r?r.scrollTo(n?ft(r).scrollLeft():o,n?o:ft(r).scrollTop()):t[i]=o},t,i,arguments.length,null)}}),ft.each(["top","left"],function(t,e){ft.cssHooks[e]=z(dt.pixelPosition,function(t,n){if(n)return n=pe(t,e),ce.test(n)?ft(t).position()[e]+"px":n})}),ft.each({Height:"height",Width:"width"},function(t,e){ft.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){ft.fn[i]=function(i,o){var r=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return qt(this,function(e,n,i){var o;return ft.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):i===undefined?ft.css(e,n,s):ft.style(e,n,i,s)},e,r?i:undefined,r,null)}})}),ft.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),ft.fn.size=function(){return this.length},ft.fn.andSelf=ft.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ft});var fn=t.jQuery,pn=t.$;return ft.noConflict=function(e){return t.$===ft&&(t.$=pn),e&&t.jQuery===ft&&(t.jQuery=fn),ft},e||(t.jQuery=t.$=ft),ft}),function(t,e){"use strict";t.rails!==e&&t.error("jquery-ujs has already been loaded!");var n,i=t(document);t.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return t("meta[name=csrf-token]").attr("content")},csrfParam:function(){return t("meta[name=csrf-param]").attr("content")},CSRFProtection:function(t){var e=n.csrfToken();e&&t.setRequestHeader("X-CSRF-Token",e)},refreshCSRFTokens:function(){t('form input[name="'+n.csrfParam()+'"]').val(n.csrfToken())},fire:function(e,n,i){var o=t.Event(n);return e.trigger(o,i),!1!==o.result},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t[0].href},isRemote:function(t){return t.data("remote")!==e&&!1!==t.data("remote")},handleRemote:function(i){var o,r,s,a,l,u;if(n.fire(i,"ajax:before")){if(a=i.data("with-credentials")||null,l=i.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,i.is("form")){o=i.data("ujs:submit-button-formmethod")||i.attr("method"),r=i.data("ujs:submit-button-formaction")||i.attr("action"),s=t(i[0]).serializeArray();var c=i.data("ujs:submit-button");c&&(s.push(c),i.data("ujs:submit-button",null)),i.data("ujs:submit-button-formmethod",null),i.data("ujs:submit-button-formaction",null)}else i.is(n.inputChangeSelector)?(o=i.data("method"),r=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(o=i.data("method")||"get",r=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):(o=i.data("method"),r=n.href(i),s=i.data("params")||null);return u={type:o||"GET",data:s,dataType:l,beforeSend:function(t,o){if(o.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+o.accepts.script),!n.fire(i,"ajax:beforeSend",[t,o]))return!1;i.trigger("ajax:send",t)},success:function(t,e,n){i.trigger("ajax:success",[t,e,n])},complete:function(t,e){i.trigger("ajax:complete",[t,e])},error:function(t,e,n){i.trigger("ajax:error",[t,e,n])},crossDomain:n.isCrossDomain(r)},a&&(u.xhrFields={withCredentials:a}),r&&(u.url=r),n.ajax(u)}return!1},isCrossDomain:function(t){var e=document.createElement("a");e.href=location.href;var n=document.createElement("a");try{return n.href=t,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(t){return!0}},handleMethod:function(i){var o=n.href(i),r=i.data("method"),s=i.attr("target"),a=n.csrfToken(),l=n.csrfParam(),u=t('
'),c='';l===e||a===e||n.isCrossDomain(o)||(c+=''),s&&u.attr("target",s),u.hide().append(c).appendTo("body"),u.submit()},formElements:function(e,n){return e.is("form")?t(e[0].elements).filter(n):e.find(n)},disableFormElements:function(e){n.formElements(e,n.disableSelector).each(function(){n.disableFormElement(t(this))})},disableFormElement:function(t){var n,i;n=t.is("button")?"html":"val",i=t.data("disable-with"),i!==e&&(t.data("ujs:enable-with",t[n]()),t[n](i)),t.prop("disabled",!0),t.data("ujs:disabled",!0)},enableFormElements:function(e){n.formElements(e,n.enableSelector).each(function(){n.enableFormElement(t(this))})},enableFormElement:function(t){var n=t.is("button")?"html":"val";t.data("ujs:enable-with")!==e&&(t[n](t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.prop("disabled",!1),t.removeData("ujs:disabled")},allowAction:function(t){var e,i=t.data("confirm"),o=!1;if(!i)return!0;if(n.fire(t,"confirm")){try{o=n.confirm(i)}catch(t){(console.error||console.log).call(console,t.stack||t)}e=n.fire(t,"confirm:complete",[o])}return o&&e},blankInputs:function(e,n,i){var o,r,s,a,l=t(),u=n||"input,textarea",c=e.find(u),d={};return c.each(function(){o=t(this),o.is("input[type=radio]")?(a=o.attr("name"),d[a]||(0===e.find('input[type=radio]:checked[name="'+a+'"]').length&&(s=e.find('input[type=radio][name="'+a+'"]'),l=l.add(s)),d[a]=a)):(r=o.is("input[type=checkbox],input[type=radio]")?o.is(":checked"):!!o.val())===i&&(l=l.add(o))}),!!l.length&&l},nonBlankInputs:function(t,e){return n.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){var i=t.data("disable-with");i!==e&&(t.data("ujs:enable-with",t.html()),t.html(i)),t.bind("click.railsDisable",function(t){return n.stopEverything(t)}),t.data("ujs:disabled",!0)},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable"),t.removeData("ujs:disabled")}},n.fire(i,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,i){t.crossDomain||n.CSRFProtection(i)}),t(window).on("pageshow.rails",function(){t(t.rails.enableSelector).each(function(){var e=t(this);e.data("ujs:disabled")&&t.rails.enableFormElement(e)}),t(t.rails.linkDisableSelector).each(function(){var e=t(this);e.data("ujs:disabled")&&t.rails.enableElement(e)})}),i.on("ajax:complete",n.linkDisableSelector,function(){n.enableElement(t(this))}),i.on("ajax:complete",n.buttonDisableSelector,function(){n.enableFormElement(t(this))}),i.on("click.rails",n.linkClickSelector,function(e){var i=t(this),o=i.data("method"),r=i.data("params"),s=e.metaKey||e.ctrlKey;if(!n.allowAction(i))return n.stopEverything(e);if(!s&&i.is(n.linkDisableSelector)&&n.disableElement(i),n.isRemote(i)){if(s&&(!o||"GET"===o)&&!r)return!0;var a=n.handleRemote(i);return!1===a?n.enableElement(i):a.fail(function(){n.enableElement(i)}),!1}return o?(n.handleMethod(i),!1):void 0}),i.on("click.rails",n.buttonClickSelector,function(e){var i=t(this);if(!n.allowAction(i)||!n.isRemote(i))return n.stopEverything(e);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var o=n.handleRemote(i);return!1===o?n.enableFormElement(i):o.fail(function(){n.enableFormElement(i)}),!1}),i.on("change.rails",n.inputChangeSelector,function(e){var i=t(this);return n.allowAction(i)&&n.isRemote(i)?(n.handleRemote(i),!1):n.stopEverything(e)}),i.on("submit.rails",n.formSubmitSelector,function(i){var o,r,s=t(this),a=n.isRemote(s);if(!n.allowAction(s))return n.stopEverything(i);if(s.attr("novalidate")===e)if(s.data("ujs:formnovalidate-button")===e){if((o=n.blankInputs(s,n.requiredInputSelector,!1))&&n.fire(s,"ajax:aborted:required",[o]))return n.stopEverything(i)}else s.data("ujs:formnovalidate-button",e);if(a){if(r=n.nonBlankInputs(s,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(s)},13);var l=n.fire(s,"ajax:aborted:file",[r]);return l||setTimeout(function(){n.enableFormElements(s)},13),l}return n.handleRemote(s),!1}setTimeout(function(){n.disableFormElements(s)},13)}),i.on("click.rails",n.formInputClickSelector,function(e){var i=t(this);if(!n.allowAction(i))return n.stopEverything(e);var o=i.attr("name"),r=o?{name:o,value:i.val()}:null,s=i.closest("form");0===s.length&&(s=t("#"+i.attr("form"))),s.data("ujs:submit-button",r),s.data("ujs:formnovalidate-button",i.attr("formnovalidate")),s.data("ujs:submit-button-formaction",i.attr("formaction")),s.data("ujs:submit-button-formmethod",i.attr("formmethod"))}),i.on("ajax:send.rails",n.formSubmitSelector,function(e){this===e.target&&n.disableFormElements(t(this))}),i.on("ajax:complete.rails",n.formSubmitSelector,function(e){this===e.target&&n.enableFormElements(t(this))}),t(function(){n.refreshCSRFTokens()}))}(jQuery),function(t){"use strict";function e(t){if(Function.prototype.name===undefined){var e=/function\s([^(]{1,})\(/,n=e.exec(t.toString());return n&&n.length>1?n[1].trim():""}return t.prototype===undefined?t.constructor.name:t.prototype.constructor.name}function n(t){return"true"===t||"false"!==t&&(isNaN(1*t)?t:parseFloat(t))}function i(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var o="6.3.1",r={version:o,_plugins:{},_uuids:[],rtl:function(){return"rtl"===t("html").attr("dir")},plugin:function(t,n){var o=n||e(t),r=i(o);this._plugins[r]=this[o]=t},registerPlugin:function(t,n){var o=n?i(n):e(t.constructor).toLowerCase();t.uuid=this.GetYoDigits(6,o),t.$element.attr("data-"+o)||t.$element.attr("data-"+o,t.uuid),t.$element.data("zfPlugin")||t.$element.data("zfPlugin",t),t.$element.trigger("init.zf."+o),this._uuids.push(t.uuid)},unregisterPlugin:function(t){var n=i(e(t.$element.data("zfPlugin").constructor));this._uuids.splice(this._uuids.indexOf(t.uuid),1),t.$element.removeAttr("data-"+n).removeData("zfPlugin").trigger("destroyed.zf."+n);for(var o in t)t[o]=null},reInit:function(e){var n=e instanceof t;try{if(n)e.each(function(){t(this).data("zfPlugin")._init()});else{var o=typeof e,r=this;({object:function(e){e.forEach(function(e){e=i(e),t("[data-"+e+"]").foundation("_init")})},string:function(){e=i(e),t("[data-"+e+"]").foundation("_init")},undefined:function(){this.object(Object.keys(r._plugins))}})[o](e)}}catch(t){console.error(t)}finally{return e}},GetYoDigits:function(t,e){return t=t||6,Math.round(Math.pow(36,t+1)-Math.random()*Math.pow(36,t)).toString(36).slice(1)+(e?"-"+e:"")},reflow:function(e,i){void 0===i?i=Object.keys(this._plugins):"string"==typeof i&&(i=[i]);var o=this;t.each(i,function(i,r){var s=o._plugins[r];t(e).find("[data-"+r+"]").addBack("[data-"+r+"]").each(function(){var e=t(this),i={};if(e.data("zfPlugin"))return void console.warn("Tried to initialize "+r+" on an element that already has a Foundation plugin.");e.attr("data-options")&&e.attr("data-options").split(";").forEach(function(t){var e=t.split(":").map(function(t){return t.trim()});e[0]&&(i[e[0]]=n(e[1]))});try{e.data("zfPlugin",new s(t(this),i))}catch(t){console.error(t)}finally{return}})})},getFnName:e,transitionend:function(t){var e,n={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend"},i=document.createElement("div");for(var o in n)"undefined"!=typeof i.style[o]&&(e=n[o]);return e||(e=setTimeout(function(){t.triggerHandler("transitionend",[t])},1),"transitionend")}};r.util={throttle:function(t,e){var n=null;return function(){var i=this,o=arguments;null===n&&(n=setTimeout(function(){t.apply(i,o),n=null},e))}}};var s=function(n){var i=typeof n,o=t("meta.foundation-mq"),s=t(".no-js");if(o.length||t('').appendTo(document.head),s.length&&s.removeClass("no-js"),"undefined"===i)r.MediaQuery._init(),r.reflow(this);else{if("string"!==i)throw new TypeError("We're sorry, "+i+" is not a valid parameter. You must use a string representing the method you wish to invoke.");var a=Array.prototype.slice.call(arguments,1),l=this.data("zfPlugin");if(l===undefined||l[n]===undefined)throw new ReferenceError("We're sorry, '"+n+"' is not an available method for "+(l?e(l):"this element")+".");1===this.length?l[n].apply(l,a):this.each(function(e,i){l[n].apply(t(i).data("zfPlugin"),a)})}return this};window.Foundation=r,t.fn.foundation=s,function(){Date.now&&window.Date.now||(window.Date.now=Date.now=function(){return(new Date).getTime()});for(var t=["webkit","moz"],e=0;e'),n.data("savedHref",n.attr("href")).removeAttr("href").attr("tabindex",0),n.children("[data-submenu]").attr({"aria-hidden":!0,tabindex:0,role:"menu"}),e._events(n)}),this.$submenus.each(function(){var n=t(this);if(!n.find(".js-drilldown-back").length)switch(e.options.backButtonPosition){case"bottom":n.append(e.options.backButton);break;case"top":n.prepend(e.options.backButton);break;default:console.error("Unsupported backButtonPosition value '"+e.options.backButtonPosition+"'")}e._back(n)}),this.$submenus.addClass("invisible"),this.options.autoHeight||this.$submenus.addClass("drilldown-submenu-cover-previous"),this.$element.parent().hasClass("is-drilldown")||(this.$wrapper=t(this.options.wrapper).addClass("is-drilldown"),this.options.animateHeight&&this.$wrapper.addClass("animate-height"),this.$element.wrap(this.$wrapper)),this.$wrapper=this.$element.parent(),this.$wrapper.css(this._getMaxDims())}},{key:"_resize",value:function(){this.$wrapper.css({"max-width":"none","min-height":"none"}),this.$wrapper.css(this._getMaxDims())}},{key:"_events",value:function(e){var n=this;e.off("click.zf.drilldown").on("click.zf.drilldown",function(i){if(t(i.target).parentsUntil("ul","li").hasClass("is-drilldown-submenu-parent")&&(i.stopImmediatePropagation(),i.preventDefault()),n._show(e.parent("li")),n.options.closeOnClick){var o=t("body");o.off(".zf.drilldown").on("click.zf.drilldown",function(e){e.target===n.$element[0]||t.contains(n.$element[0],e.target)||(e.preventDefault(),n._hideAll(),o.off(".zf.drilldown"))})}}),this.$element.on("mutateme.zf.trigger",this._resize.bind(this))}},{key:"_registerEvents",value:function(){this.options.scrollTop&&(this._bindHandler=this._scrollTop.bind(this),this.$element.on("open.zf.drilldown hide.zf.drilldown closed.zf.drilldown",this._bindHandler))}},{key:"_scrollTop",value:function(){var e=this,n=""!=e.options.scrollTopElement?t(e.options.scrollTopElement):e.$element,i=parseInt(n.offset().top+e.options.scrollTopOffset);t("html, body").stop(!0).animate({scrollTop:i},e.options.animationDuration,e.options.animationEasing,function(){this===t("html")[0]&&e.$element.trigger("scrollme.zf.drilldown")})}},{key:"_keyboardEvents",value:function(){var e=this;this.$menuItems.add(this.$element.find(".js-drilldown-back > a, .is-submenu-parent-item > a")).on("keydown.zf.drilldown",function(n){var i,o,r=t(this),s=r.parent("li").parent("ul").children("li").children("a");s.each(function(e){if(t(this).is(r))return i=s.eq(Math.max(0,e-1)),void(o=s.eq(Math.min(e+1,s.length-1)))}),Foundation.Keyboard.handleKey(n,"Drilldown",{next:function(){if(r.is(e.$submenuAnchors))return e._show(r.parent("li")),r.parent("li").one(Foundation.transitionend(r),function(){r.parent("li").find("ul li a").filter(e.$menuItems).first().focus()}),!0},previous:function(){return e._hide(r.parent("li").parent("ul")),r.parent("li").parent("ul").one(Foundation.transitionend(r),function(){setTimeout(function(){r.parent("li").parent("ul").parent("li").children("a").first().focus()},1)}),!0},up:function(){return i.focus(),!r.is(e.$element.find("> li:first-child > a"))},down:function(){return o.focus(),!r.is(e.$element.find("> li:last-child > a"))},close:function(){r.is(e.$element.find("> li > a"))||(e._hide(r.parent().parent()),r.parent().parent().siblings("a").focus())},open:function(){return r.is(e.$menuItems)?r.is(e.$submenuAnchors)?(e._show(r.parent("li")),r.parent("li").one(Foundation.transitionend(r),function(){r.parent("li").find("ul li a").filter(e.$menuItems).first().focus()}),!0):void 0:(e._hide(r.parent("li").parent("ul")),r.parent("li").parent("ul").one(Foundation.transitionend(r),function(){setTimeout(function(){r.parent("li").parent("ul").parent("li").children("a").first().focus()},1)}),!0)},handled:function(t){t&&n.preventDefault(),n.stopImmediatePropagation()}})})}},{key:"_hideAll",value:function(){var t=this.$element.find(".is-drilldown-submenu.is-active").addClass("is-closing");this.options.autoHeight&&this.$wrapper.css({height:t.parent().closest("ul").data("calcHeight")}),t.one(Foundation.transitionend(t),function(){t.removeClass("is-active is-closing")}),this.$element.trigger("closed.zf.drilldown")}},{key:"_back",value:function(t){var e=this;t.off("click.zf.drilldown"),t.children(".js-drilldown-back").on("click.zf.drilldown",function(n){n.stopImmediatePropagation(),e._hide(t);var i=t.parent("li").parent("ul").parent("li");i.length&&e._show(i)})}},{key:"_menuLinkEvents",value:function(){var t=this;this.$menuItems.not(".is-drilldown-submenu-parent").off("click.zf.drilldown").on("click.zf.drilldown",function(){setTimeout(function(){t._hideAll()},0)})}},{key:"_show",value:function(t){this.options.autoHeight&&this.$wrapper.css({height:t.children("[data-submenu]").data("calcHeight")}),t.attr("aria-expanded",!0),t.children("[data-submenu]").addClass("is-active").removeClass("invisible").attr("aria-hidden",!1),this.$element.trigger("open.zf.drilldown",[t])}},{key:"_hide",value:function(t){this.options.autoHeight&&this.$wrapper.css({height:t.parent().closest("ul").data("calcHeight")});t.parent("li").attr("aria-expanded",!1),t.attr("aria-hidden",!0).addClass("is-closing"),t.addClass("is-closing").one(Foundation.transitionend(t),function(){t.removeClass("is-active is-closing"),t.blur().addClass("invisible")}),t.trigger("hide.zf.drilldown",[t])}},{key:"_getMaxDims",value:function(){var e=0,n={},i=this;return this.$submenus.add(this.$element).each(function(){var o=(t(this).children("li").length,Foundation.Box.GetDimensions(this).height);e=o>e?o:e,i.options.autoHeight&&(t(this).data("calcHeight",o),t(this).hasClass("is-drilldown-submenu")||(n.height=o))}),this.options.autoHeight||(n["min-height"]=e+"px"),n["max-width"]=this.$element[0].getBoundingClientRect().width+"px",n}},{key:"destroy",value:function(){this.options.scrollTop&&this.$element.off(".zf.drilldown",this._bindHandler),this._hideAll(),this.$element.off("mutateme.zf.trigger"),Foundation.Nest.Burn(this.$element,"drilldown"),this.$element.unwrap().find(".js-drilldown-back, .is-submenu-parent-item").remove().end().find(".is-active, .is-closing, .is-drilldown-submenu").removeClass("is-active is-closing is-drilldown-submenu").end().find("[data-submenu]").removeAttr("aria-hidden tabindex role"),this.$submenuAnchors.each(function(){t(this).off(".zf.drilldown")}),this.$submenus.removeClass("drilldown-submenu-cover-previous"),this.$element.find("a").each(function(){var e=t(this);e.removeAttr("tabindex"),e.data("savedHref")&&e.attr("href",e.data("savedHref")).removeData("savedHref")}),Foundation.unregisterPlugin(this)}}]),e}();e.defaults={backButton:'
  • Back
  • ',backButtonPosition:"top",wrapper:"
    ",parentLink:!1,closeOnClick:!1,autoHeight:!1,animateHeight:!1,scrollTop:!1,scrollTopElement:"",scrollTopOffset:0,animationDuration:500,animationEasing:"swing"},Foundation.plugin(e,"Drilldown")}(jQuery);var _createClass=function(){function t(t,e){for(var n=0;n-1&&this.usedPositions.indexOf("left")<0?this.$element.addClass("left"):"top"===t&&this.usedPositions.indexOf("bottom")>-1&&this.usedPositions.indexOf("left")<0?this.$element.removeClass(t).addClass("left"):"left"===t&&this.usedPositions.indexOf("right")>-1&&this.usedPositions.indexOf("bottom")<0?this.$element.removeClass(t):("right"===t&&this.usedPositions.indexOf("left")>-1&&this.usedPositions.indexOf("bottom"),this.$element.removeClass(t)),this.classChanged=!0,this.counter--}},{key:"_setPosition",value:function(){if("false"===this.$anchor.attr("aria-expanded"))return!1;var t=this.getPositionClass(),e=Foundation.Box.GetDimensions(this.$element),n=(Foundation.Box.GetDimensions(this.$anchor),"left"===t?"left":"right"===t?"left":"top"),i="top"===n?"height":"width";"height"===i?this.options.vOffset:this.options.hOffset;if(e.width>=e.windowDims.width||!this.counter&&!Foundation.Box.ImNotTouchingYou(this.$element,this.$parent)){var o=e.windowDims.width,r=0;if(this.$parent){var s=Foundation.Box.GetDimensions(this.$parent),r=s.offset.left;s.width-1,a=s?e.$tabs:r.siblings("li").add(r);a.each(function(e){if(t(this).is(r))return i=a.eq(e-1),void(o=a.eq(e+1))});var l=function(){r.is(":last-child")||(o.children("a:first").focus(),n.preventDefault())},u=function(){i.children("a:first").focus(),n.preventDefault()},c=function(){var t=r.children("ul.is-dropdown-submenu");t.length&&(e._show(t),r.find("li > a:first").focus(),n.preventDefault())},d=function(){var t=r.parent("ul").parent("li");t.children("a:first").focus(),e._hide(t),n.preventDefault()},h={open:c,close:function(){e._hide(e.$element),e.$menuItems.find("a:first").focus(),n.preventDefault()},handled:function(){n.stopImmediatePropagation()}};s?e._isVertical()?Foundation.rtl()?t.extend(h,{down:l,up:u,next:d,previous:c}):t.extend(h,{down:l,up:u,next:c,previous:d}):Foundation.rtl()?t.extend(h,{next:u,previous:l,down:c,up:d}):t.extend(h,{next:l,previous:u,down:c,up:d}):Foundation.rtl()?t.extend(h,{next:d,previous:c,down:l,up:u}):t.extend(h,{next:c,previous:d,down:l,up:u}),Foundation.Keyboard.handleKey(n,"DropdownMenu",h)})}},{key:"_addBodyHandler",value:function(){var e=t(document.body),n=this;e.off("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu").on("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu",function(t){n.$element.find(t.target).length||(n._hide(),e.off("mouseup.zf.dropdownmenu touchend.zf.dropdownmenu"))})}},{key:"_show",value:function(e){var n=this.$tabs.index(this.$tabs.filter(function(n,i){return t(i).find(e).length>0})),i=e.parent("li.is-dropdown-submenu-parent").siblings("li.is-dropdown-submenu-parent");this._hide(i,n),e.css("visibility","hidden").addClass("js-dropdown-active").parent("li.is-dropdown-submenu-parent").addClass("is-active");var o=Foundation.Box.ImNotTouchingYou(e,null,!0);if(!o){var r="left"===this.options.alignment?"-right":"-left",s=e.parent(".is-dropdown-submenu-parent");s.removeClass("opens"+r).addClass("opens-"+this.options.alignment),o=Foundation.Box.ImNotTouchingYou(e,null,!0),o||s.removeClass("opens-"+this.options.alignment).addClass("opens-inner"),this.changed=!0}e.css("visibility",""),this.options.closeOnClick&&this._addBodyHandler(),this.$element.trigger("show.zf.dropdownmenu",[e])}},{key:"_hide",value:function(t,e){var n;if(n=t&&t.length?t:e!==undefined?this.$tabs.not(function(t){return t===e}):this.$element,n.hasClass("is-active")||n.find(".is-active").length>0){if(n.find("li.is-active").add(n).attr({"data-is-click":!1}).removeClass("is-active"),n.find("ul.js-dropdown-active").removeClass("js-dropdown-active"),this.changed||n.find("opens-inner").length){var i="left"===this.options.alignment?"right":"left";n.find("li.is-dropdown-submenu-parent").add(n).removeClass("opens-inner opens-"+this.options.alignment).addClass("opens-"+i),this.changed=!1}this.$element.trigger("hide.zf.dropdownmenu",[n])}}},{key:"destroy",value:function(){this.$menuItems.off(".zf.dropdownmenu").removeAttr("data-is-click").removeClass("is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner"),t(document.body).off(".zf.dropdownmenu"),Foundation.Nest.Burn(this.$element,"dropdown"),Foundation.unregisterPlugin(this)}}]),e}();e.defaults={disableHover:!1,autoclose:!0,hoverDelay:50,clickOpen:!1,closingTime:500,alignment:"left",closeOnClick:!0,closeOnClickInside:!0,verticalClass:"vertical",rightClass:"align-right",forceFollow:!0},Foundation.plugin(e,"DropdownMenu")}(jQuery);var _createClass=function(){function t(t,e){for(var n=0;n0,this.isNested=this.$element.parentsUntil(document.body,"[data-equalizer]").length>0,this.isOn=!1,this._bindHandler={onResizeMeBound:this._onResizeMe.bind(this),onPostEqualizedBound:this._onPostEqualized.bind(this)};var i,o=this.$element.find("img");this.options.equalizeOn?(i=this._checkMQ(),t(window).on("changed.zf.mediaquery",this._checkMQ.bind(this))):this._events(),(i!==undefined&&!1===i||i===undefined)&&(o.length?Foundation.onImagesLoaded(o,this._reflow.bind(this)):this._reflow())}},{key:"_pauseEvents",value:function(){this.isOn=!1,this.$element.off({".zf.equalizer":this._bindHandler.onPostEqualizedBound,"resizeme.zf.trigger":this._bindHandler.onResizeMeBound,"mutateme.zf.trigger":this._bindHandler.onResizeMeBound})}},{key:"_onResizeMe",value:function(){this._reflow()}},{key:"_onPostEqualized",value:function(t){t.target!==this.$element[0]&&this._reflow()}},{key:"_events",value:function(){this._pauseEvents(),this.hasNested?this.$element.on("postequalized.zf.equalizer",this._bindHandler.onPostEqualizedBound):(this.$element.on("resizeme.zf.trigger",this._bindHandler.onResizeMeBound),this.$element.on("mutateme.zf.trigger",this._bindHandler.onResizeMeBound)),this.isOn=!0}},{key:"_checkMQ",value:function(){var t=!Foundation.MediaQuery.is(this.options.equalizeOn);return t?this.isOn&&(this._pauseEvents(),this.$watched.css("height","auto")):this.isOn||this._events(),t}},{key:"_killswitch",value:function(){}},{key:"_reflow",value:function(){if(!this.options.equalizeOnStack&&this._isStacked())return this.$watched.css("height","auto"),!1;this.options.equalizeByRow?this.getHeightsByRow(this.applyHeightByRow.bind(this)):this.getHeights(this.applyHeight.bind(this))}},{key:"_isStacked",value:function(){return!this.$watched[0]||!this.$watched[1]||this.$watched[0].getBoundingClientRect().top!==this.$watched[1].getBoundingClientRect().top}},{key:"getHeights",value:function(t){for(var e=[],n=0,i=this.$watched.length;n0,e.allowDown=e.scrollTop1&&this.geoSync(),this.options.accessible&&this.$wrapper.attr("tabindex",0)}},{key:"_loadBullets",value:function(){this.$bullets=this.$element.find("."+this.options.boxOfBullets).find("button")}},{key:"geoSync",value:function(){var t=this;this.timer=new Foundation.Timer(this.$element,{duration:this.options.timerDelay,infinite:!1},function(){t.changeSlide(!0)}),this.timer.start()}},{key:"_prepareForOrbit",value:function(){this._setWrapperHeight()}},{key:"_setWrapperHeight",value:function(e){var n,i=0,o=0,r=this;this.$slides.each(function(){n=this.getBoundingClientRect().height,t(this).attr("data-slide",o),r.$slides.filter(".is-active")[0]!==r.$slides.eq(o)[0]&&t(this).css({position:"relative",display:"none"}),i=n>i?n:i,o++}),o===this.$slides.length&&(this.$wrapper.css({height:i}),e&&e(i))}},{key:"_setSlideHeight",value:function(e){this.$slides.each(function(){t(this).css("max-height",e)})}},{key:"_events",value:function(){var e=this;if(this.$element.off(".resizeme.zf.trigger").on({"resizeme.zf.trigger":this._prepareForOrbit.bind(this)}),this.$slides.length>1){if(this.options.swipe&&this.$slides.off("swipeleft.zf.orbit swiperight.zf.orbit").on("swipeleft.zf.orbit",function(t){t.preventDefault(),e.changeSlide(!0)}).on("swiperight.zf.orbit",function(t){t.preventDefault(),e.changeSlide(!1)}),this.options.autoPlay&&(this.$slides.on("click.zf.orbit",function(){e.$element.data("clickedOn",!e.$element.data("clickedOn")),e.timer[e.$element.data("clickedOn")?"pause":"start"]()}),this.options.pauseOnHover&&this.$element.on("mouseenter.zf.orbit",function(){e.timer.pause()}).on("mouseleave.zf.orbit",function(){e.$element.data("clickedOn")||e.timer.start()})),this.options.navButtons){this.$element.find("."+this.options.nextClass+", ."+this.options.prevClass).attr("tabindex",0).on("click.zf.orbit touchend.zf.orbit",function(n){n.preventDefault(),e.changeSlide(t(this).hasClass(e.options.nextClass))})}this.options.bullets&&this.$bullets.on("click.zf.orbit touchend.zf.orbit",function(){if(/is-active/g.test(this.className))return!1;var n=t(this).data("slide"),i=n>e.$slides.filter(".is-active").data("slide"),o=e.$slides.eq(n);e.changeSlide(i,o,n)}),this.options.accessible&&this.$wrapper.add(this.$bullets).on("keydown.zf.orbit",function(n){Foundation.Keyboard.handleKey(n,"Orbit",{next:function(){e.changeSlide(!0)},previous:function(){e.changeSlide(!1)},handled:function(){t(n.target).is(e.$bullets)&&e.$bullets.filter(".is-active").focus()}})})}}},{key:"_reset",value:function(){"undefined"!=typeof this.$slides&&this.$slides.length>1&&(this.$element.off(".zf.orbit").find("*").off(".zf.orbit"),this.options.autoPlay&&this.timer.restart(),this.$slides.each(function(e){t(e).removeClass("is-active is-active is-in").removeAttr("aria-live").hide()}),this.$slides.first().addClass("is-active").show(),this.$element.trigger("slidechange.zf.orbit",[this.$slides.first()]),this.options.bullets&&this._updateBullets(0))}},{key:"changeSlide",value:function(t,e,n){if(this.$slides){var i=this.$slides.filter(".is-active").eq(0);if(/mui/g.test(i[0].className))return!1;var o,r=this.$slides.first(),s=this.$slides.last(),a=t?"Right":"Left",l=t?"Left":"Right",u=this;o=e||(t?this.options.infiniteWrap?i.next("."+this.options.slideClass).length?i.next("."+this.options.slideClass):r:i.next("."+this.options.slideClass):this.options.infiniteWrap?i.prev("."+this.options.slideClass).length?i.prev("."+this.options.slideClass):s:i.prev("."+this.options.slideClass)),o.length&&(this.$element.trigger("beforeslidechange.zf.orbit",[i,o]),this.options.bullets&&(n=n||this.$slides.index(o),this._updateBullets(n)),this.options.useMUI&&!this.$element.is(":hidden")?(Foundation.Motion.animateIn(o.addClass("is-active").css({position:"absolute",top:0}),this.options["animInFrom"+a],function(){o.css({position:"relative",display:"block"}).attr("aria-live","polite")}),Foundation.Motion.animateOut(i.removeClass("is-active"),this.options["animOutTo"+l],function(){i.removeAttr("aria-live"),u.options.autoPlay&&!u.timer.isPaused&&u.timer.restart()})):(i.removeClass("is-active is-in").removeAttr("aria-live").hide(),o.addClass("is-active is-in").attr("aria-live","polite").show(),this.options.autoPlay&&!this.timer.isPaused&&this.timer.restart()),this.$element.trigger("slidechange.zf.orbit",[o]))}}},{key:"_updateBullets",value:function(t){var e=this.$element.find("."+this.options.boxOfBullets).find(".is-active").removeClass("is-active").blur(),n=e.find("span:last").detach();this.$bullets.eq(t).addClass("is-active").append(n)}},{key:"destroy",value:function(){this.$element.off(".zf.orbit").find("*").off(".zf.orbit").end().hide(),Foundation.unregisterPlugin(this)}}]),e}();e.defaults={bullets:!0,navButtons:!0,animInFromRight:"slide-in-right",animOutToRight:"slide-out-right",animInFromLeft:"slide-in-left",animOutToLeft:"slide-out-left",autoPlay:!0,timerDelay:5e3,infiniteWrap:!0,swipe:!0,pauseOnHover:!0,accessible:!0,containerClass:"orbit-container",slideClass:"orbit-slide",boxOfBullets:"orbit-bullets",nextClass:"orbit-next",prevClass:"orbit-previous",useMUI:!0},Foundation.plugin(e,"Orbit")}(jQuery);var _createClass=function(){function t(t,e){for(var n=0;n1?r[0]:"small",a=r.length>1?r[1]:r[0];null!==n[a]&&(e[s]=n[a])}this.rules=e}t.isEmptyObject(this.rules)||this._checkMediaQueries(),this.$element.attr("data-mutate",this.$element.attr("data-mutate")||Foundation.GetYoDigits(6,"responsive-menu"))}},{key:"_events",value:function(){var e=this;t(window).on("changed.zf.mediaquery",function(){e._checkMediaQueries()})}},{key:"_checkMediaQueries",value:function(){var e,i=this;t.each(this.rules,function(t){Foundation.MediaQuery.atLeast(t)&&(e=t)}),e&&(this.currentPlugin instanceof this.rules[e].plugin||(t.each(n,function(t,e){i.$element.removeClass(e.cssClass)}),this.$element.addClass(this.rules[e].cssClass),this.currentPlugin&&this.currentPlugin.destroy(),this.currentPlugin=new this.rules[e].plugin(this.$element,{})))}},{key:"destroy",value:function(){this.currentPlugin.destroy(),t(window).off(".zf.ResponsiveMenu"),Foundation.unregisterPlugin(this)}}]),e}();e.defaults={};var n={dropdown:{cssClass:"dropdown",plugin:Foundation._plugins["dropdown-menu"]||null},drilldown:{cssClass:"drilldown",plugin:Foundation._plugins.drilldown||null},accordion:{cssClass:"accordion-menu",plugin:Foundation._plugins["accordion-menu"]||null}};Foundation.plugin(e,"ResponsiveMenu")}(jQuery);var _createClass=function(){function t(t,e){for(var n=0;n
    ").addClass("reveal-overlay").appendTo(this.options.appendTo)}},{key:"_updatePosition",value:function(){var e,n,i=this.$element.outerWidth(),o=t(window).width(),r=this.$element.outerHeight(),s=t(window).height();e="auto"===this.options.hOffset?parseInt((o-i)/2,10):parseInt(this.options.hOffset,10),n="auto"===this.options.vOffset?r>s?parseInt(Math.min(100,s/10),10):parseInt((s-r)/4,10):parseInt(this.options.vOffset,10),this.$element.css({top:n+"px"}),this.$overlay&&"auto"===this.options.hOffset||(this.$element.css({left:e+"px"}),this.$element.css({margin:"0px"}))}},{key:"_events",value:function(){var e=this,n=this;this.$element.on({"open.zf.trigger":this.open.bind(this),"close.zf.trigger":function(i,o){if(i.target===n.$element[0]||t(i.target).parents("[data-closable]")[0]===o)return e.close.apply(e)},"toggle.zf.trigger":this.toggle.bind(this),"resizeme.zf.trigger":function(){n._updatePosition()}}),this.$anchor.length&&this.$anchor.on("keydown.zf.reveal",function(t){13!==t.which&&32!==t.which||(t.stopPropagation(),t.preventDefault(),n.open())}),this.options.closeOnClick&&this.options.overlay&&this.$overlay.off(".zf.reveal").on("click.zf.reveal",function(e){e.target!==n.$element[0]&&!t.contains(n.$element[0],e.target)&&t.contains(document,e.target)&&n.close()}),this.options.deepLink&&t(window).on("popstate.zf.reveal:"+this.id,this._handleState.bind(this))}},{key:"_handleState",value:function(){window.location.hash!=="#"+this.id||this.isActive?this.close():this.open()}},{key:"open",value:function(){function e(){o.isMobile?(o.originalScrollPos||(o.originalScrollPos=window.pageYOffset),t("html, body").addClass("is-reveal-open")):t("body").addClass("is-reveal-open")}var n=this;if(this.options.deepLink){var i="#"+this.id;window.history.pushState?window.history.pushState(null,null,i):window.location.hash=i}this.isActive=!0,this.$element.css({visibility:"hidden"}).show().scrollTop(0),this.options.overlay&&this.$overlay.css({visibility:"hidden"}).show(),this._updatePosition(),this.$element.hide().css({visibility:""}),this.$overlay&&(this.$overlay.css({visibility:""}).hide(),this.$element.hasClass("fast")?this.$overlay.addClass("fast"):this.$element.hasClass("slow")&&this.$overlay.addClass("slow")),this.options.multipleOpened||this.$element.trigger("closeme.zf.reveal",this.id);var o=this;this.options.animationIn?function(){var t=function(){o.$element.attr({"aria-hidden":!1,tabindex:-1}).focus(),e(),Foundation.Keyboard.trapFocus(o.$element)};n.options.overlay&&Foundation.Motion.animateIn(n.$overlay,"fade-in"),Foundation.Motion.animateIn(n.$element,n.options.animationIn,function(){n.$element&&(n.focusableElements=Foundation.Keyboard.findFocusable(n.$element),t())})}():(this.options.overlay&&this.$overlay.show(0),this.$element.show(this.options.showDelay)),this.$element.attr({"aria-hidden":!1,tabindex:-1}).focus(),Foundation.Keyboard.trapFocus(this.$element),this.$element.trigger("open.zf.reveal"),e(),setTimeout(function(){n._extraHandlers()},0)}},{key:"_extraHandlers",value:function(){var e=this;this.$element&&(this.focusableElements=Foundation.Keyboard.findFocusable(this.$element),this.options.overlay||!this.options.closeOnClick||this.options.fullScreen||t("body").on("click.zf.reveal",function(n){n.target!==e.$element[0]&&!t.contains(e.$element[0],n.target)&&t.contains(document,n.target)&&e.close()}),this.options.closeOnEsc&&t(window).on("keydown.zf.reveal",function(t){Foundation.Keyboard.handleKey(t,"Reveal",{close:function(){e.options.closeOnEsc&&(e.close(),e.$anchor.focus())}})}),this.$element.on("keydown.zf.reveal",function(n){var i=t(this);Foundation.Keyboard.handleKey(n,"Reveal",{open:function(){e.$element.find(":focus").is(e.$element.find("[data-close]"))?setTimeout(function(){e.$anchor.focus()},1):i.is(e.focusableElements)&&e.open()},close:function(){e.options.closeOnEsc&&(e.close(),e.$anchor.focus())},handled:function(t){t&&n.preventDefault()}})}))}},{key:"close",value:function(){function e(){n.isMobile?(0===t(".reveal:visible").length&&t("html, body").removeClass("is-reveal-open"),n.originalScrollPos&&(t("body").scrollTop(n.originalScrollPos),n.originalScrollPos=null)):0===t(".reveal:visible").length&&t("body").removeClass("is-reveal-open"),Foundation.Keyboard.releaseFocus(n.$element),n.$element.attr("aria-hidden",!0),n.$element.trigger("closed.zf.reveal")}if(!this.isActive||!this.$element.is(":visible"))return!1;var n=this;this.options.animationOut?(this.options.overlay?Foundation.Motion.animateOut(this.$overlay,"fade-out",e):e(),Foundation.Motion.animateOut(this.$element,this.options.animationOut)):(this.$element.hide(this.options.hideDelay),this.options.overlay?this.$overlay.hide(0,e):e()),this.options.closeOnEsc&&t(window).off("keydown.zf.reveal"),!this.options.overlay&&this.options.closeOnClick&&t("body").off("click.zf.reveal"),this.$element.off("keydown.zf.reveal"),this.options.resetOnClose&&this.$element.html(this.$element.html()),this.isActive=!1,n.options.deepLink&&(window.history.replaceState?window.history.replaceState("",document.title,window.location.href.replace("#"+this.id,"")):window.location.hash="")}},{key:"toggle",value:function(){this.isActive?this.close():this.open()}},{key:"destroy",value:function(){this.options.overlay&&(this.$element.appendTo(t(this.options.appendTo)),this.$overlay.hide().off().remove()),this.$element.hide().off(),this.$anchor.off(".zf"),t(window).off(".zf.reveal:"+this.id),Foundation.unregisterPlugin(this)}}]),e}();o.defaults={animationIn:"",animationOut:"",showDelay:0,hideDelay:0,closeOnClick:!0,closeOnEsc:!0,multipleOpened:!1,vOffset:"auto",hOffset:"auto",fullScreen:!1,btmOffsetPct:10,overlay:!0,resetOnClose:!1,deepLink:!1,appendTo:"body"},Foundation.plugin(o,"Reveal")}(jQuery);var _createClass=function(){function t(t,e){for(var n=0;n1?this.inputs.eq(1):t("#"+this.$handle2.attr("aria-controls")),this.inputs[1]||(this.inputs=this.inputs.add(this.$input2)),!0,this._setInitAttr(1)),this.setHandles(),this._events()}},{key:"setHandles",value:function(){var t=this;this.handles[1]?this._setHandlePos(this.$handle,this.inputs.eq(0).val(),!0,function(){t._setHandlePos(t.$handle2,t.inputs.eq(1).val(),!0)}):this._setHandlePos(this.$handle,this.inputs.eq(0).val(),!0)}},{key:"_reflow",value:function(){this.setHandles()}},{key:"_pctOfBar",value:function(t){var n=e(t-this.options.start,this.options.end-this.options.start);switch(this.options.positionValueFunction){case"pow":n=this._logTransform(n);break;case"log":n=this._powTransform(n)}return n.toFixed(2)}},{key:"_value",value:function(t){switch(this.options.positionValueFunction){case"pow":t=this._powTransform(t);break;case"log":t=this._logTransform(t)}return(this.options.end-this.options.start)*t+this.options.start}},{key:"_logTransform",value:function(t){return i(this.options.nonLinearBase,t*(this.options.nonLinearBase-1)+1)}},{key:"_powTransform",value:function(t){return(Math.pow(this.options.nonLinearBase,t)-1)/(this.options.nonLinearBase-1)}},{key:"_setHandlePos",value:function(t,n,i,o){if(!this.$element.hasClass(this.options.disabledClass)){n=parseFloat(n),nthis.options.end&&(n=this.options.end);var r=this.options.doubleSided;if(r)if(0===this.handles.index(t)){var s=parseFloat(this.$handle2.attr("aria-valuenow"));n=n>=s?s-this.options.step:n}else{var a=parseFloat(this.$handle.attr("aria-valuenow"));n=n<=a?a+this.options.step:n}this.options.vertical&&!i&&(n=this.options.end-n);var l=this,u=this.options.vertical,c=u?"height":"width",d=u?"top":"left",h=t[0].getBoundingClientRect()[c],f=this.$element[0].getBoundingClientRect()[c],p=this._pctOfBar(n),m=(f-h)*p,g=(100*e(m,f)).toFixed(this.options.decimal);n=parseFloat(n.toFixed(this.options.decimal));var v={};if(this._setValues(t,n),r){var y,b=0===this.handles.index(t),w=~~(100*e(h,f));if(b)v[d]=g+"%",y=parseFloat(this.$handle2[0].style[d])-g+w,o&&"function"==typeof o&&o();else{var C=parseFloat(this.$handle[0].style[d]);y=g-(isNaN(C)?(this.options.initialStart-this.options.start)/((this.options.end-this.options.start)/100):C)+w}v["min-"+c]=y+"%"}this.$element.one("finished.zf.animate",function(){l.$element.trigger("moved.zf.slider",[t])});var k=this.$element.data("dragging")?1e3/60:this.options.moveTime;Foundation.Move(k,t,function(){isNaN(g)?t.css(d,100*p+"%"):t.css(d,g+"%"),l.options.doubleSided?l.$fill.css(v):l.$fill.css(c,100*p+"%")}),clearTimeout(l.timeout),l.timeout=setTimeout(function(){l.$element.trigger("changed.zf.slider",[t])},l.options.changedDelay)}}},{key:"_setInitAttr",value:function(t){var e=0===t?this.options.initialStart:this.options.initialEnd,n=this.inputs.eq(t).attr("id")||Foundation.GetYoDigits(6,"slider");this.inputs.eq(t).attr({id:n,max:this.options.end,min:this.options.start,step:this.options.step}),this.inputs.eq(t).val(e),this.handles.eq(t).attr({role:"slider","aria-controls":n,"aria-valuemax":this.options.end,"aria-valuemin":this.options.start,"aria-valuenow":e,"aria-orientation":this.options.vertical?"vertical":"horizontal",tabindex:0})}},{key:"_setValues",value:function(t,e){var n=this.options.doubleSided?this.handles.index(t):0;this.inputs.eq(n).val(e),t.attr("aria-valuenow",e)}},{key:"_handleEvent",value:function(i,o,r){var s,a;if(r)s=this._adjustValue(null,r),a=!0;else{i.preventDefault();var l=this,u=this.options.vertical,c=u?"height":"width",d=u?"top":"left",h=u?i.pageY:i.pageX,f=(this.$handle[0].getBoundingClientRect()[c],this.$element[0].getBoundingClientRect()[c]),p=u?t(window).scrollTop():t(window).scrollLeft(),m=this.$element.offset()[d];i.clientY===i.pageY&&(h+=p);var g,v=h-m;g=v<0?0:v>f?f:v;var y=e(g,f);if(s=this._value(y),Foundation.rtl()&&!this.options.vertical&&(s=this.options.end-s),s=l._adjustValue(null,s),a=!1,!o){o=n(this.$handle,d,g,c)<=n(this.$handle2,d,g,c)?this.$handle:this.$handle2}}this._setHandlePos(o,s,a)}},{key:"_adjustValue",value:function(t,e){var n,i,o,r,s=this.options.step,a=parseFloat(s/2);return n=t?parseFloat(t.attr("aria-valuenow")):e,i=n%s,o=n-i,r=o+s,0===i?n:n=n>=o+a?r:o}},{key:"_events",value:function(){this._eventsForHandle(this.$handle),this.handles[1]&&this._eventsForHandle(this.$handle2)}},{key:"_eventsForHandle",value:function(e){var n,i=this;if(this.inputs.off("change.zf.slider").on("change.zf.slider",function(e){var n=i.inputs.index(t(this));i._handleEvent(e,i.handles.eq(n),t(this).val())}),this.options.clickSelect&&this.$element.off("click.zf.slider").on("click.zf.slider",function(e){if(i.$element.data("dragging"))return!1;t(e.target).is("[data-slider-handle]")||(i.options.doubleSided?i._handleEvent(e):i._handleEvent(e,i.$handle))}),this.options.draggable){this.handles.addTouch();var o=t("body");e.off("mousedown.zf.slider").on("mousedown.zf.slider",function(r){e.addClass("is-dragging"),i.$fill.addClass("is-dragging"),i.$element.data("dragging",!0),n=t(r.currentTarget),o.on("mousemove.zf.slider",function(t){t.preventDefault(),i._handleEvent(t,n)}).on("mouseup.zf.slider",function(t){i._handleEvent(t,n),e.removeClass("is-dragging"),i.$fill.removeClass("is-dragging"),i.$element.data("dragging",!1),o.off("mousemove.zf.slider mouseup.zf.slider")})}).on("selectstart.zf.slider touchmove.zf.slider",function(t){t.preventDefault()})}e.off("keydown.zf.slider").on("keydown.zf.slider",function(e){var n,o=t(this),r=i.options.doubleSided?i.handles.index(o):0,s=parseFloat(i.inputs.eq(r).val());Foundation.Keyboard.handleKey(e,"Slider",{decrease:function(){n=s-i.options.step},increase:function(){n=s+i.options.step},decrease_fast:function(){n=s-10*i.options.step},increase_fast:function(){n=s+10*i.options.step},handled:function(){e.preventDefault(),i._setHandlePos(o,n,!0)}})})}},{key:"destroy",value:function(){this.handles.off(".zf.slider"),this.inputs.off(".zf.slider"),this.$element.off(".zf.slider"),clearTimeout(this.timeout),Foundation.unregisterPlugin(this)}}]),o}();o.defaults={start:0,end:100,step:1,initialStart:0,initialEnd:100,binding:!1,clickSelect:!0,vertical:!1,draggable:!0,disabled:!1,doubleSided:!1,decimal:2,moveTime:200,disabledClass:"disabled",invertVertical:!1,changedDelay:500,nonLinearBase:5,positionValueFunction:"linear"},Foundation.plugin(o,"Slider")}(jQuery);var _createClass=function(){function t(t,e){for(var n=0;n=i.topPoint))}),i._events(n.split("-").reverse().join("-"))})}},{key:"_parsePoints",value:function(){for(var e=""==this.options.topAnchor?1:this.options.topAnchor,n=""==this.options.btmAnchor?document.documentElement.scrollHeight:this.options.btmAnchor,i=[e,n],o={},r=0,s=i.length;r=this.topPoint?e<=this.bottomPoint?this.isStuck||this._setSticky():this.isStuck&&this._removeSticky(!1):this.isStuck&&this._removeSticky(!0)}},{key:"_setSticky",value:function(){var t=this,e=this.options.stickTo,n="top"===e?"marginTop":"marginBottom",i="top"===e?"bottom":"top",o={};o[n]=this.options[n]+"em",o[e]=0,o[i]="auto",this.isStuck=!0,this.$element.removeClass("is-anchored is-at-"+i).addClass("is-stuck is-at-"+e).css(o).trigger("sticky.zf.stuckto:"+e),this.$element.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",function(){t._setSizes()})}},{key:"_removeSticky",value:function(t){var e=this.options.stickTo,n="top"===e,i={},o=(this.points?this.points[1]-this.points[0]:this.anchorHeight)-this.elemHeight,r=n?"marginTop":"marginBottom",s=t?"top":"bottom";i[r]=0,i.bottom="auto",i.top=t?0:o,this.isStuck=!1,this.$element.removeClass("is-stuck is-at-"+e).addClass("is-anchored is-at-"+s).css(i).trigger("sticky.zf.unstuckfrom:"+s)}},{key:"_setSizes",value:function(t){this.canStick=Foundation.MediaQuery.is(this.options.stickyOn),this.canStick||t&&"function"==typeof t&&t();var e=this.$container[0].getBoundingClientRect().width,n=window.getComputedStyle(this.$container[0]),i=parseInt(n["padding-left"],10),o=parseInt(n["padding-right"],10);this.$anchor&&this.$anchor.length?this.anchorHeight=this.$anchor[0].getBoundingClientRect().height:this._parsePoints(),this.$element.css({"max-width":e-i-o+"px"});var r=this.$element[0].getBoundingClientRect().height||this.containerHeight;if("none"==this.$element.css("display")&&(r=0),this.containerHeight=r,this.$container.css({height:r}),this.elemHeight=r,!this.isStuck&&this.$element.hasClass("is-at-bottom")){var s=(this.points?this.points[1]-this.$container.offset().top:this.anchorHeight)-this.elemHeight;this.$element.css("top",s)}this._setBreakPoints(r,function(){t&&"function"==typeof t&&t()})}},{key:"_setBreakPoints",value:function(t,n){if(!this.canStick){if(!n||"function"!=typeof n)return!1;n()}var i=e(this.options.marginTop),o=e(this.options.marginBottom),r=this.points?this.points[0]:this.$anchor.offset().top,s=this.points?this.points[1]:r+this.anchorHeight,a=window.innerHeight;"top"===this.options.stickTo?(r-=i,s-=t+i):"bottom"===this.options.stickTo&&(r-=a-(t+o),s-=a-o),this.topPoint=r,this.bottomPoint=s,n&&"function"==typeof n&&n()}},{key:"destroy",value:function(){this._removeSticky(!0),this.$element.removeClass(this.options.stickyClass+" is-anchored is-at-top").css({height:"",top:"",bottom:"","max-width":""}).off("resizeme.zf.trigger").off("mutateme.zf.trigger"),this.$anchor&&this.$anchor.length&&this.$anchor.off("change.zf.sticky"),t(window).off(this.scrollListener),this.wasWrapped?this.$element.unwrap():this.$container.removeClass(this.options.containerClass).css({height:""}),Foundation.unregisterPlugin(this)}}]),n}();n.defaults={container:"
    ",stickTo:"top",anchor:"",topAnchor:"",btmAnchor:"",marginTop:1,marginBottom:1,stickyOn:"medium",stickyClass:"sticky",containerClass:"sticky-container",checkEvery:-1},Foundation.plugin(n,"Sticky")}(jQuery);var _createClass=function(){function t(t,e){for(var n=0;ne?r:e}).css("height",e+"px")}},{key:"destroy",value:function(){this.$element.find("."+this.options.linkClass).off(".zf.tabs").hide().end().find("."+this.options.panelClass).hide(),this.options.matchHeight&&null!=this._setHeightMqHandler&&t(window).off("changed.zf.mediaquery",this._setHeightMqHandler),this.options.deepLink&&t(window).off("popstate",this._checkDeepLink),Foundation.unregisterPlugin(this)}}]),e}();e.defaults={deepLink:!1,deepLinkSmudge:!1,deepLinkSmudgeDelay:300,updateHistory:!1,autoFocus:!1,wrapOnKeys:!0,matchHeight:!1,activeCollapse:!1,linkClass:"tabs-title",linkActiveClass:"is-active",panelClass:"tabs-panel",panelActiveClass:"is-active"},Foundation.plugin(e,"Tabs")}(jQuery);var _createClass=function(){function t(t,e){for(var n=0;n").addClass(n).attr({role:"tooltip","aria-hidden":!0,"data-is-active":!1,"data-is-focus":!1,id:e})}},{key:"_reposition",value:function(t){this.usedPositions.push(t||"bottom"),!t&&this.usedPositions.indexOf("top")<0?this.template.addClass("top"):"top"===t&&this.usedPositions.indexOf("bottom")<0?this.template.removeClass(t):"left"===t&&this.usedPositions.indexOf("right")<0?this.template.removeClass(t).addClass("right"):"right"===t&&this.usedPositions.indexOf("left")<0?this.template.removeClass(t).addClass("left"):!t&&this.usedPositions.indexOf("top")>-1&&this.usedPositions.indexOf("left")<0?this.template.addClass("left"):"top"===t&&this.usedPositions.indexOf("bottom")>-1&&this.usedPositions.indexOf("left")<0?this.template.removeClass(t).addClass("left"):"left"===t&&this.usedPositions.indexOf("right")>-1&&this.usedPositions.indexOf("bottom")<0?this.template.removeClass(t):("right"===t&&this.usedPositions.indexOf("left")>-1&&this.usedPositions.indexOf("bottom"),this.template.removeClass(t)),this.classChanged=!0,this.counter--}},{key:"_setPosition",value:function(){var t=this._getPositionClass(this.template),e=Foundation.Box.GetDimensions(this.template),n=Foundation.Box.GetDimensions(this.$element),i="left"===t?"left":"right"===t?"left":"top",o="top"===i?"height":"width";"height"===o?this.options.vOffset:this.options.hOffset;if(e.width>=e.windowDims.width||!this.counter&&!Foundation.Box.ImNotTouchingYou(this.template))return this.template.offset(Foundation.Box.GetOffsets(this.template,this.$element,"center bottom",this.options.vOffset,this.options.hOffset,!0)).css({width:n.windowDims.width-2*this.options.hOffset,height:"auto"}),!1;for(this.template.offset(Foundation.Box.GetOffsets(this.template,this.$element,"center "+(t||"bottom"),this.options.vOffset,this.options.hOffset));!Foundation.Box.ImNotTouchingYou(this.template)&&this.counter;)this._reposition(t),this._setPosition()}},{key:"show",value:function(){if("all"!==this.options.showOn&&!Foundation.MediaQuery.is(this.options.showOn))return!1;var t=this;this.template.css("visibility","hidden").show(),this._setPosition(),this.$element.trigger("closeme.zf.tooltip",this.template.attr("id")),this.template.attr({"data-is-active":!0,"aria-hidden":!1}),t.isActive=!0,this.template.stop().hide().css("visibility","").fadeIn(this.options.fadeInDuration,function(){}),this.$element.trigger("show.zf.tooltip")}},{key:"hide",value:function(){var t=this;this.template.stop().attr({"aria-hidden":!0,"data-is-active":!1}).fadeOut(this.options.fadeOutDuration,function(){t.isActive=!1,t.isClick=!1,t.classChanged&&(t.template.removeClass(t._getPositionClass(t.template)).addClass(t.options.positionClass),t.usedPositions=[],t.counter=4,t.classChanged=!1)}),this.$element.trigger("hide.zf.tooltip")}},{key:"_events",value:function(){var t=this,e=(this.template,!1);this.options.disableHover||this.$element.on("mouseenter.zf.tooltip",function(){t.isActive||(t.timeout=setTimeout(function(){t.show()},t.options.hoverDelay))}).on("mouseleave.zf.tooltip",function(){clearTimeout(t.timeout),(!e||t.isClick&&!t.options.clickOpen)&&t.hide()}),this.options.clickOpen?this.$element.on("mousedown.zf.tooltip",function(e){e.stopImmediatePropagation(),t.isClick||(t.isClick=!0,!t.options.disableHover&&t.$element.attr("tabindex")||t.isActive||t.show())}):this.$element.on("mousedown.zf.tooltip",function(e){e.stopImmediatePropagation(),t.isClick=!0}),this.options.disableForTouch||this.$element.on("tap.zf.tooltip touchend.zf.tooltip",function(){t.isActive?t.hide():t.show()}),this.$element.on({"close.zf.trigger":this.hide.bind(this)}),this.$element.on("focus.zf.tooltip",function(){if(e=!0,t.isClick)return t.options.clickOpen||(e=!1),!1;t.show()}).on("focusout.zf.tooltip",function(){e=!1,t.isClick=!1,t.hide()}).on("resizeme.zf.trigger",function(){t.isActive&&t._setPosition()})}},{key:"toggle",value:function(){this.isActive?this.hide():this.show()}},{key:"destroy",value:function(){this.$element.attr("title",this.template.text()).off(".zf.trigger .zf.tooltip").removeClass("has-tip top right left").removeAttr("aria-describedby aria-haspopup data-disable-hover data-resize data-toggle data-tooltip data-yeti-box"),this.template.remove(),Foundation.unregisterPlugin(this)}}]),e}();e.defaults={disableForTouch:!1,hoverDelay:200,fadeInDuration:150,fadeOutDuration:150,disableHover:!1,templateClasses:"",tooltipClass:"tooltip",triggerClass:"has-tip",showOn:"small",template:"",tipText:"",touchCloseText:"Tap to close.",clickOpen:!0,positionClass:"",vOffset:10,hOffset:12,allowHtml:!1},Foundation.plugin(e,"Tooltip")}(jQuery),function(){function t(t,n,i,o){var r,s,a,l,u=e(t);if(n){var c=e(n);s=u.offset.top+u.height<=c.height+c.offset.top,r=u.offset.top>=c.offset.top,a=u.offset.left>=c.offset.left,l=u.offset.left+u.width<=c.width+c.offset.left}else s=u.offset.top+u.height<=u.windowDims.height+u.windowDims.offset.top,r=u.offset.top>=u.windowDims.offset.top,a=u.offset.left>=u.windowDims.offset.left,l=u.offset.left+u.width<=u.windowDims.width;var d=[s,r,a,l];return i?a===l==!0:o?r===s==!0:-1===d.indexOf(!1)}function e(t){if((t=t.length?t[0]:t)===window||t===document)throw new Error("I'm sorry, Dave. I'm afraid I can't do that.");var e=t.getBoundingClientRect(),n=t.parentNode.getBoundingClientRect(),i=document.body.getBoundingClientRect(),o=window.pageYOffset,r=window.pageXOffset;return{width:e.width,height:e.height,offset:{top:e.top+o,left:e.left+r},parentDims:{width:n.width,height:n.height,offset:{top:n.top+o,left:n.left+r}},windowDims:{width:i.width,height:i.height,offset:{top:o,left:r}}}}function n(t,n,i,o,r,s){var a=e(t),l=n?e(n):null;switch(i){case"top":return{left:Foundation.rtl()?l.offset.left-a.width+l.width:l.offset.left,top:l.offset.top-(a.height+o)};case"left":return{left:l.offset.left-(a.width+r),top:l.offset.top};case"right":return{left:l.offset.left+l.width+r,top:l.offset.top};case"center top":return{left:l.offset.left+l.width/2-a.width/2,top:l.offset.top-(a.height+o)};case"center bottom":return{left:s?r:l.offset.left+l.width/2-a.width/2,top:l.offset.top+l.height+o};case"center left":return{left:l.offset.left-(a.width+r),top:l.offset.top+l.height/2-a.height/2};case"center right":return{left:l.offset.left+l.width+r+1,top:l.offset.top+l.height/2-a.height/2};case"center":return{left:a.windowDims.offset.left+a.windowDims.width/2-a.width/2,top:a.windowDims.offset.top+a.windowDims.height/2-a.height/2};case"reveal":return{left:(a.windowDims.width-a.width)/2,top:a.windowDims.offset.top+o};case"reveal full":return{left:a.windowDims.offset.left,top:a.windowDims.offset.top};case"left bottom":return{left:l.offset.left,top:l.offset.top+l.height+o};case"right bottom":return{left:l.offset.left+l.width+r-a.width,top:l.offset.top+l.height+o};default:return{left:Foundation.rtl()?l.offset.left-a.width+l.width:l.offset.left+r,top:l.offset.top+l.height+o}}}Foundation.Box={ImNotTouchingYou:t,GetDimensions:e,GetOffsets:n}}(jQuery),function(t){function e(t){var e={};for(var n in t)e[t[n]]=t[n];return e}var n={9:"TAB",13:"ENTER",27:"ESCAPE",32:"SPACE",37:"ARROW_LEFT",38:"ARROW_UP",39:"ARROW_RIGHT",40:"ARROW_DOWN"},i={},o={keys:e(n),parseKey:function(t){var e=n[t.which||t.keyCode]||String.fromCharCode(t.which).toUpperCase();return e=e.replace(/\W+/,""),t.shiftKey&&(e="SHIFT_"+e),t.ctrlKey&&(e="CTRL_"+e),t.altKey&&(e="ALT_"+e),e=e.replace(/_$/,"")},handleKey:function(e,n,o){var r,s,a,l=i[n],u=this.parseKey(e);if(!l)return console.warn("Component not defined!");if(r="undefined"==typeof l.ltr?l:Foundation.rtl()?t.extend({},l.ltr,l.rtl):t.extend({},l.rtl,l.ltr),s=r[u],(a=o[s])&&"function"==typeof a){var c=a.apply();(o.handled||"function"==typeof o.handled)&&o.handled(c)}else(o.unhandled||"function"==typeof o.unhandled)&&o.unhandled()},findFocusable:function(e){return!!e&&e.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function(){return!(!t(this).is(":visible")||t(this).attr("tabindex")<0)})},register:function(t,e){i[t]=e},trapFocus:function(t){var e=Foundation.Keyboard.findFocusable(t),n=e.eq(0),i=e.eq(-1);t.on("keydown.zf.trapfocus",function(t){t.target===i[0]&&"TAB"===Foundation.Keyboard.parseKey(t)?(t.preventDefault(),n.focus()):t.target===n[0]&&"SHIFT_TAB"===Foundation.Keyboard.parseKey(t)&&(t.preventDefault(),i.focus())})},releaseFocus:function(t){t.off("keydown.zf.trapfocus")}};Foundation.Keyboard=o}(jQuery),function(t){function e(t){var e={};return"string"!=typeof t?e:(t=t.trim().slice(1,-1))?e=t.split("&").reduce(function(t,e){var n=e.replace(/\+/g," ").split("="),i=n[0],o=n[1];return i=decodeURIComponent(i),o=o===undefined?null:decodeURIComponent(o),t.hasOwnProperty(i)?Array.isArray(t[i])?t[i].push(o):t[i]=[t[i],o]:t[i]=o,t},{}):e}var n={queries:[],current:"",_init:function(){var n,i=this,o=t(".foundation-mq").css("font-family");n=e(o);for(var r in n)n.hasOwnProperty(r)&&i.queries.push({name:r,value:"only screen and (min-width: "+n[r]+")"});this.current=this._getCurrentSize(),this._watcher()},atLeast:function(t){var e=this.get(t);return!!e&&window.matchMedia(e).matches},is:function(t){return t=t.trim().split(" "),t.length>1&&"only"===t[1]?t[0]===this._getCurrentSize():this.atLeast(t[0])},get:function(t){for(var e in this.queries)if(this.queries.hasOwnProperty(e)){var n=this.queries[e];if(t===n.name)return n.value}return null},_getCurrentSize:function(){for(var t,e=0;eli, .menu, .menu > li").removeClass(n+" "+i+" "+o+" is-submenu-item submenu is-active").removeAttr("data-submenu").css("display","")}};Foundation.Nest=e}(jQuery),function(t){function e(t,e,n){var i,o,r=this,s=e.duration,a=Object.keys(t.data())[0]||"timer",l=-1;this.isPaused=!1,this.restart=function(){l=-1,clearTimeout(o),this.start()},this.start=function(){this.isPaused=!1,clearTimeout(o),l=l<=0?s:l,t.data("paused",!1),i=Date.now(),o=setTimeout(function(){e.infinite&&r.restart(),n&&"function"==typeof n&&n()},l),t.trigger("timerstart.zf."+a)},this.pause=function(){this.isPaused=!0,clearTimeout(o),t.data("paused",!0);var e=Date.now();l-=e-i,t.trigger("timerpaused.zf."+a)}}function n(e,n){function i(){0===--o&&n()}var o=e.length;0===o&&n(),e.each(function(){if(this.complete||4===this.readyState||"complete"===this.readyState)i();else{var e=t(this).attr("src");t(this).attr("src",e+(e.indexOf("?")>=0?"&":"?")+(new Date).getTime()),t(this).one("load",function(){i()})}})}Foundation.Timer=e,Foundation.onImagesLoaded=n}(jQuery),function(t){function e(){this.removeEventListener("touchmove",n),this.removeEventListener("touchend",e),u=!1}function n(n){if(t.spotSwipe.preventDefault&&n.preventDefault(),u){var i,o=n.touches[0].pageX,s=(n.touches[0].pageY,r-o);l=(new Date).getTime()-a,Math.abs(s)>=t.spotSwipe.moveThreshold&&l<=t.spotSwipe.timeThreshold&&(i=s>0?"left":"right"),i&&(n.preventDefault(),e.call(this),t(this).trigger("swipe",i).trigger("swipe"+i))}}function i(t){1==t.touches.length&&(r=t.touches[0].pageX,s=t.touches[0].pageY,u=!0,a=(new Date).getTime(),this.addEventListener("touchmove",n,!1),this.addEventListener("touchend",e,!1))}function o(){this.addEventListener&&this.addEventListener("touchstart",i,!1)}t.spotSwipe={version:"1.0.0",enabled:"ontouchstart"in document.documentElement,preventDefault:!1,moveThreshold:75,timeThreshold:200};var r,s,a,l,u=!1;t.event.special.swipe={setup:o},t.each(["left","up","down","right"],function(){t.event.special["swipe"+this]={setup:function(){t(this).on("swipe",t.noop)}}})}(jQuery),function(t){t.fn.addTouch=function(){this.each(function(n,i){t(i).bind("touchstart touchmove touchend touchcancel",function(){e(event)})});var e=function(t){var e,n=t.changedTouches,i=n[0],o={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},r=o[t.type];"MouseEvent"in window&&"function"==typeof window.MouseEvent?e=new window.MouseEvent(r,{bubbles:!0,cancelable:!0,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY}):(e=document.createEvent("MouseEvent"),e.initMouseEvent(r,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null)),i.target.dispatchEvent(e)}}}(jQuery),function(t){function e(){r(),i(),o(),n()}function n(e){var n=t("[data-yeti-box]"),i=["dropdown","tooltip","reveal"];if(e&&("string"==typeof e?i.push(e):"object"==typeof e&&"string"==typeof e[0]?i.concat(e):console.error("Plugin names must be strings")),n.length){var o=i.map(function(t){return"closeme.zf."+t}).join(" ");t(window).off(o).on(o,function(e,n){var i=e.namespace.split(".")[0];t("[data-"+i+"]").not('[data-yeti-box="'+n+'"]').each(function(){var e=t(this);e.triggerHandler("close.zf.trigger",[e])})})}}function i(e){var n=undefined,i=t("[data-resize]");i.length&&t(window).off("resize.zf.trigger").on("resize.zf.trigger",function(){n&&clearTimeout(n),n=setTimeout(function(){s||i.each(function(){t(this).triggerHandler("resizeme.zf.trigger")}),i.attr("data-events","resize")},e||10)})}function o(e){var n=undefined,i=t("[data-scroll]");i.length&&t(window).off("scroll.zf.trigger").on("scroll.zf.trigger",function(){n&&clearTimeout(n),n=setTimeout(function(){s||i.each(function(){t(this).triggerHandler("scrollme.zf.trigger")}),i.attr("data-events","scroll")},e||10)})}function r(){if(!s)return!1;var e=document.querySelectorAll("[data-resize], [data-scroll], [data-mutate]"),n=function(e){var n=t(e[0].target);switch(e[0].type){case"attributes":"scroll"===n.attr("data-events")&&"data-events"===e[0].attributeName&&n.triggerHandler("scrollme.zf.trigger",[n,window.pageYOffset]),"resize"===n.attr("data-events")&&"data-events"===e[0].attributeName&&n.triggerHandler("resizeme.zf.trigger",[n]),"style"===e[0].attributeName&&(n.closest("[data-mutate]").attr("data-events","mutate"),n.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[n.closest("[data-mutate]")]));break;case"childList":n.closest("[data-mutate]").attr("data-events","mutate"),n.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[n.closest("[data-mutate]")]);break;default:return!1}};if(e.length)for(var i=0;i<=e.length-1;i++){var o=new s(n);o.observe(e[i],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})}}var s=function(){for(var t=["WebKit","Moz","O","Ms",""],e=0;e1?r[0]:"small",a=r.length>1?r[1]:r[0];null!==n[a]&&(e[s]=n[a])}this.rules=e}this._getAllOptions(),t.isEmptyObject(this.rules)||this._checkMediaQueries()}},{key:"_getAllOptions",value:function(){var e=this;e.allOptions={};for(var i in n)if(n.hasOwnProperty(i)){var o=n[i];try{var r=t("
      "),s=new o.plugin(r,e.options);for(var a in s.options)if(s.options.hasOwnProperty(a)&&"zfPlugin"!==a){var l=s.options[a];e.allOptions[a]=l}s.destroy()}catch(t){}}}},{key:"_events",value:function(){var e=this;t(window).on("changed.zf.mediaquery",function(){e._checkMediaQueries()})}},{key:"_checkMediaQueries",value:function(){var e,i=this;t.each(this.rules,function(t){Foundation.MediaQuery.atLeast(t)&&(e=t)}),e&&(this.currentPlugin instanceof this.rules[e].plugin||(t.each(n,function(t,e){i.$element.removeClass(e.cssClass)}),this.$element.addClass(this.rules[e].cssClass),this.currentPlugin&&(!this.currentPlugin.$element.data("zfPlugin")&&this.storezfData&&this.currentPlugin.$element.data("zfPlugin",this.storezfData),this.currentPlugin.destroy()),this._handleMarkup(this.rules[e].cssClass),this.currentPlugin=new this.rules[e].plugin(this.$element,{}),this.storezfData=this.currentPlugin.$element.data("zfPlugin")))}},{key:"_handleMarkup",value:function(e){var n=this,i="accordion",o=t("[data-tabs-content="+this.$element.attr("id")+"]");if(o.length&&(i="tabs"),i!==e){var r=n.allOptions.linkClass?n.allOptions.linkClass:"tabs-title",s=n.allOptions.panelClass?n.allOptions.panelClass:"tabs-panel";this.$element.removeAttr("role") +;var a=this.$element.children("."+r+",[data-accordion-item]").removeClass(r).removeClass("accordion-item").removeAttr("data-accordion-item"),l=a.children("a").removeClass("accordion-title");if("tabs"===i?(o=o.children("."+s).removeClass(s).removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby"),o.children("a").removeAttr("role").removeAttr("aria-controls").removeAttr("aria-selected")):o=a.children("[data-tab-content]").removeClass("accordion-content"),o.css({display:"",visibility:""}),a.css({display:"",visibility:""}),"accordion"===e)o.each(function(e,i){t(i).appendTo(a.get(e)).addClass("accordion-content").attr("data-tab-content","").removeClass("is-active").css({height:""}),t("[data-tabs-content="+n.$element.attr("id")+"]").after('
      ').remove(),a.addClass("accordion-item").attr("data-accordion-item",""),l.addClass("accordion-title")});else if("tabs"===e){var u=t("[data-tabs-content="+n.$element.attr("id")+"]"),c=t("#tabs-placeholder-"+n.$element.attr("id"));c.length?(u=t('
      ').insertAfter(c).attr("data-tabs-content",n.$element.attr("id")),c.remove()):u=t('
      ').insertAfter(n.$element).attr("data-tabs-content",n.$element.attr("id")),o.each(function(e,n){var i=t(n).appendTo(u).addClass(s),o=l.get(e).hash.slice(1),r=t(n).attr("id")||Foundation.GetYoDigits(6,"accordion");o!==r&&(""!==o?t(n).attr("id",o):(o=r,t(n).attr("id",o),t(l.get(e)).attr("href",t(l.get(e)).attr("href").replace("#","")+"#"+o))),t(a.get(e)).hasClass("is-active")&&i.addClass("is-active")}),a.addClass(r)}}}},{key:"destroy",value:function(){this.currentPlugin&&this.currentPlugin.destroy(),t(window).off(".zf.ResponsiveAccordionTabs"),Foundation.unregisterPlugin(this)}}]),e}();e.defaults={};var n={tabs:{cssClass:"tabs",plugin:Foundation._plugins.tabs||null},accordion:{cssClass:"accordion",plugin:Foundation._plugins.accordion||null}};Foundation.plugin(e,"ResponsiveAccordionTabs")}(jQuery),function(){(function(){(function(){this.Turbolinks={supported:function(){return null!=window.history.pushState&&null!=window.requestAnimationFrame&&null!=window.addEventListener}(),visit:function(e,n){return t.controller.visit(e,n)},clearCache:function(){return t.controller.clearCache()}}}).call(this)}).call(this);var t=this.Turbolinks;(function(){(function(){var e,n,i=[].slice;t.copyObject=function(t){var e,n,i;n={};for(e in t)i=t[e],n[e]=i;return n},t.closest=function(t,n){return e.call(t,n)},e=function(){var t,e;return t=document.documentElement,null!=(e=t.closest)?e:function(t){var e;for(e=this;e;){if(e.nodeType===Node.ELEMENT_NODE&&n.call(e,t))return e;e=e.parentNode}}}(),t.defer=function(t){return setTimeout(t,1)},t.throttle=function(t){var e;return e=null,function(){var n;return n=1<=arguments.length?i.call(arguments,0):[],null!=e?e:e=requestAnimationFrame(function(i){return function(){return e=null,t.apply(i,n)}}(this))}},t.dispatch=function(t,e){var n,i,o,r,s;return r=null!=e?e:{},s=r.target,n=r.cancelable,i=r.data,o=document.createEvent("Events"),o.initEvent(t,!0,!0===n),o.data=null!=i?i:{},(null!=s?s:document).dispatchEvent(o),o},t.match=function(t,e){return n.call(t,e)},n=function(){var t,e,n,i;return t=document.documentElement,null!=(e=null!=(n=null!=(i=t.matchesSelector)?i:t.webkitMatchesSelector)?n:t.msMatchesSelector)?e:t.mozMatchesSelector}(),t.uuid=function(){var t,e,n;for(n="",t=e=1;36>=e;t=++e)n+=9===t||14===t||19===t||24===t?"-":15===t?"4":20===t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return n}}).call(this),function(){t.Location=function(){function t(t){var e,n;null==t&&(t=""),n=document.createElement("a"),n.href=t.toString(),this.absoluteURL=n.href,e=n.hash.length,2>e?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-e),this.anchor=n.hash.slice(1))}var e,n,i,o;return t.wrap=function(t){return t instanceof this?t:new this(t)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var t,e;return null!=(t=null!=(e=this.absoluteURL.match(/\/\/[^\/]*(\/[^?;]*)/))?e[1]:void 0)?t:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var t,e;return null!=(t=null!=(e=this.getLastPathComponent().match(/\.[^.]*$/))?e[0]:void 0)?t:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(t){var e;return e=n(t),this.isEqualTo(t)||o(this.absoluteURL,e)},t.prototype.isEqualTo=function(t){return this.absoluteURL===(null!=t?t.absoluteURL:void 0)},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},n=function(t){return e(t.getOrigin()+t.getPath())},e=function(t){return i(t,"/")?t:t+"/"},o=function(t,e){return t.slice(0,e.length)===e},i=function(t,e){return t.slice(-e.length)===e},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.HttpRequest=function(){function n(n,i,o){this.delegate=n,this.requestCanceled=e(this.requestCanceled,this),this.requestTimedOut=e(this.requestTimedOut,this),this.requestFailed=e(this.requestFailed,this),this.requestLoaded=e(this.requestLoaded,this),this.requestProgressed=e(this.requestProgressed,this),this.url=t.Location.wrap(i).requestURL,this.referrer=t.Location.wrap(o).absoluteURL,this.createXHR()}return n.NETWORK_FAILURE=0,n.TIMEOUT_FAILURE=-1,n.timeout=60,n.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(t=this.delegate).requestStarted?t.requestStarted():void 0):void 0},n.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},n.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},n.prototype.requestLoaded=function(){return this.endRequest(function(t){return function(){var e;return 200<=(e=t.xhr.status)&&300>e?t.delegate.requestCompletedWithResponse(t.xhr.responseText,t.xhr.getResponseHeader("Turbolinks-Location")):(t.failed=!0,t.delegate.requestFailedWithStatusCode(t.xhr.status,t.xhr.responseText))}}(this))},n.prototype.requestFailed=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}}(this))},n.prototype.requestTimedOut=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}}(this))},n.prototype.requestCanceled=function(){return this.endRequest()},n.prototype.notifyApplicationBeforeRequestStart=function(){return t.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},n.prototype.notifyApplicationAfterRequestEnd=function(){return t.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},n.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},n.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),null!=t&&t.call(this),this.destroy()):void 0},n.prototype.setProgress=function(t){var e;return this.progress=t,"function"==typeof(e=this.delegate).requestProgressed?e.requestProgressed(this.progress):void 0},n.prototype.destroy=function(){var t;return this.setProgress(1),"function"==typeof(t=this.delegate).requestFinished&&t.requestFinished(),this.delegate=null,this.xhr=null},n}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ProgressBar=function(){function t(){this.trickle=e(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var n;return n=300,t.defaultCSS=".turbolinks-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 9999;\n transition: width "+n+"ms ease-out, opacity "+n/2+"ms "+n/2+"ms ease-in;\n transform: translate3d(0, 0, 0);\n}",t.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},t.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement(function(t){return function(){return t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1}}(this))):void 0},t.prototype.setValue=function(t){return this.value=t,this.refresh()},t.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},t.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},t.prototype.fadeProgressElement=function(t){return this.progressElement.style.opacity=0,setTimeout(t,1.5*n)},t.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},t.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,n)},t.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},t.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},t.prototype.refresh=function(){return requestAnimationFrame(function(t){return function(){return t.progressElement.style.width=10+90*t.value+"%"}}(this))},t.prototype.createStylesheetElement=function(){var t;return t=document.createElement("style"),t.type="text/css",t.textContent=this.constructor.defaultCSS,t},t.prototype.createProgressElement=function(){var t;return t=document.createElement("div"),t.className="turbolinks-progress-bar",t},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.BrowserAdapter=function(){function n(n){this.controller=n,this.showProgressBar=e(this.showProgressBar,this),this.progressBar=new t.ProgressBar}var i,o,r,s;return s=t.HttpRequest,i=s.NETWORK_FAILURE,r=s.TIMEOUT_FAILURE,o=500,n.prototype.visitProposedToLocationWithAction=function(t,e){return this.controller.startVisitToLocationWithAction(t,e)},n.prototype.visitStarted=function(t){return t.issueRequest(),t.changeHistory(),t.loadCachedSnapshot()},n.prototype.visitRequestStarted=function(t){return this.progressBar.setValue(0),t.hasCachedSnapshot()||"restore"!==t.action?this.showProgressBarAfterDelay():this.showProgressBar()},n.prototype.visitRequestProgressed=function(t){return this.progressBar.setValue(t.progress)},n.prototype.visitRequestCompleted=function(t){return t.loadResponse()},n.prototype.visitRequestFailedWithStatusCode=function(t,e){switch(e){case i:case r:return this.reload();default:return t.loadResponse()}},n.prototype.visitRequestFinished=function(){return this.hideProgressBar()},n.prototype.visitCompleted=function(t){return t.followRedirect()},n.prototype.pageInvalidated=function(){return this.reload()},n.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,o)},n.prototype.showProgressBar=function(){return this.progressBar.show()},n.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},n.prototype.reload=function(){return window.location.reload()},n}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.History=function(){function n(t){this.delegate=t,this.onPageLoad=e(this.onPageLoad,this),this.onPopState=e(this.onPopState,this)}return n.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0)},n.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1):void 0},n.prototype.push=function(e,n){return e=t.Location.wrap(e),this.update("push",e,n)},n.prototype.replace=function(e,n){return e=t.Location.wrap(e),this.update("replace",e,n)},n.prototype.onPopState=function(e){var n,i,o,r;return this.shouldHandlePopState()&&(r=null!=(i=e.state)?i.turbolinks:void 0)?(n=t.Location.wrap(window.location),o=r.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(n,o)):void 0},n.prototype.onPageLoad=function(){return t.defer(function(t){return function(){return t.pageLoaded=!0}}(this))},n.prototype.shouldHandlePopState=function(){return this.pageIsLoaded()},n.prototype.pageIsLoaded=function(){return this.pageLoaded||"complete"===document.readyState},n.prototype.update=function(t,e,n){var i;return i={turbolinks:{restorationIdentifier:n}},history[t+"State"](i,null,e)},n}()}.call(this),function(){t.Snapshot=function(){function e(t){var e,n;n=t.head,e=t.body,this.head=null!=n?n:document.createElement("head"),this.body=null!=e?e:document.createElement("body")}return e.wrap=function(t){return t instanceof this?t:this.fromHTML(t)},e.fromHTML=function(t){var e;return e=document.createElement("html"),e.innerHTML=t,this.fromElement(e)},e.fromElement=function(t){return new this({head:t.querySelector("head"),body:t.querySelector("body")})},e.prototype.clone=function(){return new e({head:this.head.cloneNode(!0),body:this.body.cloneNode(!0)})},e.prototype.getRootLocation=function(){var e,n;return n=null!=(e=this.getSetting("root"))?e:"/",new t.Location(n)},e.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},e.prototype.hasAnchor=function(t){try{return null!=this.body.querySelector("[id='"+t+"']")}catch(t){}},e.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},e.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},e.prototype.getSetting=function(t){var e,n;return n=this.head.querySelectorAll("meta[name='turbolinks-"+t+"']"),e=n[n.length-1],null!=e?e.getAttribute("content"):void 0},e}()}.call(this),function(){var e=[].slice;t.Renderer=function(){function t(){}var n;return t.render=function(){var t,n,i,o;return i=arguments[0],n=arguments[1],t=3<=arguments.length?e.call(arguments,2):[],o=function(t,e,n){n.prototype=t.prototype;var i=new n,o=t.apply(i,e);return Object(o)===o?o:i}(this,t,function(){}),o.delegate=i,o.render(n),o},t.prototype.renderView=function(t){return this.delegate.viewWillRender(this.newBody),t(),this.delegate.viewRendered(this.newBody)},t.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},t.prototype.createScriptElement=function(t){var e;return"false"===t.getAttribute("data-turbolinks-eval")?t:(e=document.createElement("script"),e.textContent=t.textContent,n(e,t),e)},n=function(t,e){var n,i,o,r,s,a,l;for(r=e.attributes,a=[],n=0,i=r.length;i>n;n++)s=r[n],o=s.name,l=s.value,a.push(t.setAttribute(o,l));return a},t}()}.call(this),function(){t.HeadDetails=function(){function t(t){var e,n,r,s,a,l,u;for(this.element=t,this.elements={},u=this.element.childNodes,s=0,l=u.length;l>s;s++)r=u[s],r.nodeType===Node.ELEMENT_NODE&&(a=r.outerHTML,n=null!=(e=this.elements)[a]?e[a]:e[a]={type:o(r),tracked:i(r),elements:[]},n.elements.push(r))}var e,n,i,o;return t.prototype.hasElementWithKey=function(t){return t in this.elements},t.prototype.getTrackedElementSignature=function(){var t,e;return function(){var n,i;n=this.elements,i=[];for(t in n)(e=n[t].tracked)&&i.push(t);return i}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("script",t)},t.prototype.getStylesheetElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("stylesheet",t)},t.prototype.getElementsMatchingTypeNotInDetails=function(t,e){var n,i,o,r,s,a;o=this.elements,s=[];for(i in o)r=o[i],a=r.type,n=r.elements,a!==t||e.hasElementWithKey(i)||s.push(n[0]);return s},t.prototype.getProvisionalElements=function(){var t,e,n,i,o,r,s;n=[],i=this.elements;for(e in i)o=i[e],s=o.type,r=o.tracked,t=o.elements,null!=s||r?t.length>1&&n.push.apply(n,t.slice(1)):n.push.apply(n,t);return n},o=function(t){return e(t)?"script":n(t)?"stylesheet":void 0},i=function(t){return"reload"===t.getAttribute("data-turbolinks-track")},e=function(t){return"script"===t.tagName.toLowerCase()},n=function(t){var e;return"style"===(e=t.tagName.toLowerCase())||"link"===e&&"stylesheet"===t.getAttribute("rel")},t}()}.call(this),function(){var e=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;t.SnapshotRenderer=function(n){function i(e,n){this.currentSnapshot=e,this.newSnapshot=n,this.currentHeadDetails=new t.HeadDetails(this.currentSnapshot.head),this.newHeadDetails=new t.HeadDetails(this.newSnapshot.head),this.newBody=this.newSnapshot.body}return e(i,n),i.prototype.render=function(t){return this.trackedElementsAreIdentical()?(this.mergeHead(),this.renderView(function(e){return function(){return e.replaceBody(),e.focusFirstAutofocusableElement(),t()}}(this))):this.invalidateView()},i.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},i.prototype.replaceBody=function(){return this.activateBodyScriptElements(),this.importBodyPermanentElements(),this.assignNewBody()},i.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},i.prototype.copyNewHeadStylesheetElements=function(){var t,e,n,i,o;for(i=this.getNewHeadStylesheetElements(),o=[],e=0,n=i.length;n>e;e++)t=i[e],o.push(document.head.appendChild(t));return o},i.prototype.copyNewHeadScriptElements=function(){var t,e,n,i,o;for(i=this.getNewHeadScriptElements(),o=[],e=0,n=i.length;n>e;e++)t=i[e],o.push(document.head.appendChild(this.createScriptElement(t)));return o},i.prototype.removeCurrentHeadProvisionalElements=function(){var t,e,n,i,o;for(i=this.getCurrentHeadProvisionalElements(),o=[],e=0,n=i.length;n>e;e++)t=i[e],o.push(document.head.removeChild(t));return o},i.prototype.copyNewHeadProvisionalElements=function(){var t,e,n,i,o;for(i=this.getNewHeadProvisionalElements(),o=[],e=0,n=i.length;n>e;e++)t=i[e],o.push(document.head.appendChild(t));return o},i.prototype.importBodyPermanentElements=function(){var t,e,n,i,o,r;for(i=this.getNewBodyPermanentElements(),r=[],e=0,n=i.length;n>e;e++)o=i[e],(t=this.findCurrentBodyPermanentElement(o))?r.push(o.parentNode.replaceChild(t,o)):r.push(void 0);return r},i.prototype.activateBodyScriptElements=function(){var t,e,n,i,o,r;for(i=this.getNewBodyScriptElements(),r=[],e=0,n=i.length;n>e;e++)o=i[e],t=this.createScriptElement(o),r.push(o.parentNode.replaceChild(t,o));return r},i.prototype.assignNewBody=function(){return document.body=this.newBody},i.prototype.focusFirstAutofocusableElement=function(){var t;return null!=(t=this.findFirstAutofocusableElement())?t.focus():void 0},i.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},i.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},i.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},i.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},i.prototype.getNewBodyPermanentElements=function(){return this.newBody.querySelectorAll("[id][data-turbolinks-permanent]")},i.prototype.findCurrentBodyPermanentElement=function(t){return document.body.querySelector("#"+t.id+"[data-turbolinks-permanent]")},i.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},i.prototype.findFirstAutofocusableElement=function(){return document.body.querySelector("[autofocus]")},i}(t.Renderer)}.call(this),function(){var e=function(t,e){function i(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;t.ErrorRenderer=function(t){function n(t){this.html=t}return e(n,t),n.prototype.render=function(t){return this.renderView(function(e){return function(){return e.replaceDocumentHTML(),e.activateBodyScriptElements(),t()}}(this))},n.prototype.replaceDocumentHTML=function(){return document.documentElement.innerHTML=this.html},n.prototype.activateBodyScriptElements=function(){var t,e,n,i,o,r;for(i=this.getScriptElements(),r=[],e=0,n=i.length;n>e;e++)o=i[e],t=this.createScriptElement(o),r.push(o.parentNode.replaceChild(t,o));return r},n.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},n}(t.Renderer)}.call(this),function(){t.View=function(){function e(t){this.delegate=t,this.element=document.documentElement}return e.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},e.prototype.getSnapshot=function(){return t.Snapshot.fromElement(this.element)},e.prototype.render=function(t,e){var n,i,o;return o=t.snapshot,n=t.error,i=t.isPreview,this.markAsPreview(i),null!=o?this.renderSnapshot(o,e):this.renderError(n,e)},e.prototype.markAsPreview=function(t){return t?this.element.setAttribute("data-turbolinks-preview",""):this.element.removeAttribute("data-turbolinks-preview")},e.prototype.renderSnapshot=function(e,n){return t.SnapshotRenderer.render(this.delegate,n,this.getSnapshot(),t.Snapshot.wrap(e))},e.prototype.renderError=function(e,n){return t.ErrorRenderer.render(this.delegate,n,e)},e}()}.call(this),function(){t.ScrollManager=function(){function e(e){this.delegate=e,this.onScroll=t.throttle(this.onScroll).bind(this)}return e.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},e.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},e.prototype.scrollToElement=function(t){return t.scrollIntoView()},e.prototype.scrollToPosition=function(t){var e,n;return e=t.x,n=t.y,window.scrollTo(e,n)},e.prototype.onScroll=function(){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},e.prototype.updatePosition=function(t){var e;return this.position=t,null!=(e=this.delegate)?e.scrollPositionChanged(this.position):void 0},e}()}.call(this),function(){t.SnapshotCache=function(){function e(t){this.size=t,this.keys=[],this.snapshots={}}var n;return e.prototype.has=function(t){return n(t)in this.snapshots},e.prototype.get=function(t){var e;if(this.has(t))return e=this.read(t),this.touch(t),e},e.prototype.put=function(t,e){return this.write(t,e),this.touch(t),e},e.prototype.read=function(t){var e;return e=n(t),this.snapshots[e]},e.prototype.write=function(t,e){var i;return i=n(t),this.snapshots[i]=e},e.prototype.touch=function(t){var e,i;return i=n(t),e=this.keys.indexOf(i),e>-1&&this.keys.splice(e,1),this.keys.unshift(i),this.trim()},e.prototype.trim=function(){var t,e,n,i,o;for(i=this.keys.splice(this.size),o=[],t=0,n=i.length;n>t;t++)e=i[t],o.push(delete this.snapshots[e]);return o},n=function(e){return t.Location.wrap(e).toCacheKey()},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Visit=function(){function n(n,i,o){this.controller=n,this.action=o,this.performScroll=e(this.performScroll,this),this.identifier=t.uuid(),this.location=t.Location.wrap(i),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var i;return n.prototype.start=function(){return"initialized"===this.state?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},n.prototype.cancel=function(){var t;return"started"===this.state?(null!=(t=this.request)&&t.cancel(),this.cancelRender(),this.state="canceled"):void 0},n.prototype.complete=function(){var t;return"started"===this.state?(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(t=this.adapter).visitCompleted&&t.visitCompleted(this),this.controller.visitCompleted(this)):void 0},n.prototype.fail=function(){var t;return"started"===this.state?(this.state="failed","function"==typeof(t=this.adapter).visitFailed?t.visitFailed(this):void 0):void 0},n.prototype.changeHistory=function(){var t,e;return this.historyChanged?void 0:(t=this.location.isEqualTo(this.referrer)?"replace":this.action,e=i(t),this.controller[e](this.location,this.restorationIdentifier),this.historyChanged=!0)},n.prototype.issueRequest=function(){return this.shouldIssueRequest()&&null==this.request?(this.progress=0,this.request=new t.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},n.prototype.getCachedSnapshot=function(){var t;return!(t=this.controller.getCachedSnapshotForLocation(this.location))||null!=this.location.anchor&&!t.hasAnchor(this.location.anchor)||"restore"!==this.action&&!t.isPreviewable()?void 0:t},n.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},n.prototype.loadCachedSnapshot=function(){var t,e;return(e=this.getCachedSnapshot())?(t=this.shouldIssueRequest(),this.render(function(){var n;return this.cacheSnapshot(),this.controller.render({snapshot:e,isPreview:t},this.performScroll),"function"==typeof(n=this.adapter).visitRendered&&n.visitRendered(this),t?void 0:this.complete()})):void 0},n.prototype.loadResponse=function(){return null!=this.response?this.render(function(){var t,e;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),"function"==typeof(e=this.adapter).visitRendered&&e.visitRendered(this),this.complete())}):void 0},n.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},n.prototype.requestStarted=function(){var t;return this.recordTimingMetric("requestStart"),"function"==typeof(t=this.adapter).visitRequestStarted?t.visitRequestStarted(this):void 0},n.prototype.requestProgressed=function(t){var e;return this.progress=t,"function"==typeof(e=this.adapter).visitRequestProgressed?e.visitRequestProgressed(this):void 0},n.prototype.requestCompletedWithResponse=function(e,n){return this.response=e,null!=n&&(this.redirectedToLocation=t.Location.wrap(n)),this.adapter.visitRequestCompleted(this)},n.prototype.requestFailedWithStatusCode=function(t,e){return this.response=e,this.adapter.visitRequestFailedWithStatusCode(this,t)},n.prototype.requestFinished=function(){var t;return this.recordTimingMetric("requestEnd"),"function"==typeof(t=this.adapter).visitRequestFinished?t.visitRequestFinished(this):void 0},n.prototype.performScroll=function(){return this.scrolled?void 0:("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},n.prototype.scrollToRestoredPosition=function(){var t,e;return t=null!=(e=this.restorationData)?e.scrollPosition:void 0,null!=t?(this.controller.scrollToPosition(t),!0):void 0},n.prototype.scrollToAnchor=function(){return null!=this.location.anchor?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},n.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},n.prototype.recordTimingMetric=function(t){var e;return null!=(e=this.timingMetrics)[t]?e[t]:e[t]=(new Date).getTime()},n.prototype.getTimingMetrics=function(){return t.copyObject(this.timingMetrics)},i=function(t){switch(t){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},n.prototype.shouldIssueRequest=function(){return"restore"!==this.action||!this.hasCachedSnapshot()},n.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},n.prototype.render=function(t){return this.cancelRender(),this.frame=requestAnimationFrame(function(e){return function(){return e.frame=null,t.call(e)}}(this))},n.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},n}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Controller=function(){function n(){this.clickBubbled=e(this.clickBubbled,this),this.clickCaptured=e(this.clickCaptured,this),this.pageLoaded=e(this.pageLoaded,this),this.history=new t.History(this),this.view=new t.View(this),this.scrollManager=new t.ScrollManager(this),this.restorationData={},this.clearCache()}return n.prototype.start=function(){return t.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),this.startHistory(),"loading"===document.readyState?addEventListener("DOMContentLoaded",this.pageLoaded,!1):this.pageLoaded(),this.scrollManager.start(),this.started=!0,this.enabled=!0):void 0},n.prototype.disable=function(){return this.enabled=!1},n.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},n.prototype.clearCache=function(){return this.cache=new t.SnapshotCache(10)},n.prototype.visit=function(e,n){var i,o;return null==n&&(n={}),e=t.Location.wrap(e),this.applicationAllowsVisitingLocation(e)?this.locationIsVisitable(e)?(i=null!=(o=n.action)?o:"advance",this.adapter.visitProposedToLocationWithAction(e,i)):window.location=e:void 0},n.prototype.startVisitToLocationWithAction=function(e,n,i){var o;return t.supported?(o=this.getRestorationDataForIdentifier(i),this.startVisit(e,n,{restorationData:o})):window.location=e},n.prototype.startHistory=function(){return this.location=t.Location.wrap(window.location),this.restorationIdentifier=t.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},n.prototype.stopHistory=function(){return this.history.stop()},n.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(e,n){return this.restorationIdentifier=n,this.location=t.Location.wrap(e),this.history.push(this.location,this.restorationIdentifier)},n.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(e,n){return this.restorationIdentifier=n,this.location=t.Location.wrap(e),this.history.replace(this.location,this.restorationIdentifier)},n.prototype.historyPoppedToLocationWithRestorationIdentifier=function(e,n){var i;return this.restorationIdentifier=n,this.enabled?(i=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(e,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:i,historyChanged:!0}),this.location=t.Location.wrap(e)):this.adapter.pageInvalidated()},n.prototype.getCachedSnapshotForLocation=function(t){var e;return e=this.cache.get(t),e?e.clone():void 0},n.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},n.prototype.cacheSnapshot=function(){var t;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),t=this.view.getSnapshot(),this.cache.put(this.lastRenderedLocation,t.clone())):void 0},n.prototype.scrollToAnchor=function(t){var e;return(e=document.getElementById(t))?this.scrollToElement(e):this.scrollToPosition({x:0,y:0})},n.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},n.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t) +},n.prototype.scrollPositionChanged=function(t){var e;return e=this.getCurrentRestorationData(),e.scrollPosition=t},n.prototype.render=function(t,e){return this.view.render(t,e)},n.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},n.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},n.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},n.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},n.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},n.prototype.clickBubbled=function(t){var e,n,i;return this.enabled&&this.clickEventIsSignificant(t)&&(n=this.getVisitableLinkForNode(t.target))&&(i=this.getVisitableLocationForLink(n))&&this.applicationAllowsFollowingLinkToLocation(n,i)?(t.preventDefault(),e=this.getActionForLink(n),this.visit(i,{action:e})):void 0},n.prototype.applicationAllowsFollowingLinkToLocation=function(t,e){var n;return n=this.notifyApplicationAfterClickingLinkToLocation(t,e),!n.defaultPrevented},n.prototype.applicationAllowsVisitingLocation=function(t){var e;return e=this.notifyApplicationBeforeVisitingLocation(t),!e.defaultPrevented},n.prototype.notifyApplicationAfterClickingLinkToLocation=function(e,n){return t.dispatch("turbolinks:click",{target:e,data:{url:n.absoluteURL},cancelable:!0})},n.prototype.notifyApplicationBeforeVisitingLocation=function(e){return t.dispatch("turbolinks:before-visit",{data:{url:e.absoluteURL},cancelable:!0})},n.prototype.notifyApplicationAfterVisitingLocation=function(e){return t.dispatch("turbolinks:visit",{data:{url:e.absoluteURL}})},n.prototype.notifyApplicationBeforeCachingSnapshot=function(){return t.dispatch("turbolinks:before-cache")},n.prototype.notifyApplicationBeforeRender=function(e){return t.dispatch("turbolinks:before-render",{data:{newBody:e}})},n.prototype.notifyApplicationAfterRender=function(){return t.dispatch("turbolinks:render")},n.prototype.notifyApplicationAfterPageLoad=function(e){return null==e&&(e={}),t.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:e}})},n.prototype.startVisit=function(t,e,n){var i;return null!=(i=this.currentVisit)&&i.cancel(),this.currentVisit=this.createVisit(t,e,n),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},n.prototype.createVisit=function(e,n,i){var o,r,s,a,l;return r=null!=i?i:{},a=r.restorationIdentifier,s=r.restorationData,o=r.historyChanged,l=new t.Visit(this,e,n),l.restorationIdentifier=null!=a?a:t.uuid(),l.restorationData=t.copyObject(s),l.historyChanged=o,l.referrer=this.location,l},n.prototype.visitCompleted=function(t){return this.notifyApplicationAfterPageLoad(t.getTimingMetrics())},n.prototype.clickEventIsSignificant=function(t){return!(t.defaultPrevented||t.target.isContentEditable||t.which>1||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)},n.prototype.getVisitableLinkForNode=function(e){return this.nodeIsVisitable(e)?t.closest(e,"a[href]:not([target]):not([download])"):void 0},n.prototype.getVisitableLocationForLink=function(e){var n;return n=new t.Location(e.getAttribute("href")),this.locationIsVisitable(n)?n:void 0},n.prototype.getActionForLink=function(t){var e;return null!=(e=t.getAttribute("data-turbolinks-action"))?e:"advance"},n.prototype.nodeIsVisitable=function(e){var n;return!(n=t.closest(e,"[data-turbolinks]"))||"false"!==n.getAttribute("data-turbolinks")},n.prototype.locationIsVisitable=function(t){return t.isPrefixedBy(this.view.getRootLocation())&&t.isHTML()},n.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},n.prototype.getRestorationDataForIdentifier=function(t){var e;return null!=(e=this.restorationData)[t]?e[t]:e[t]={}},n}()}.call(this),function(){var e,n,i;t.start=function(){return n()?(null==t.controller&&(t.controller=e()),t.controller.start()):void 0},n=function(){return null==window.Turbolinks&&(window.Turbolinks=t),i()},e=function(){var e;return e=new t.Controller,e.adapter=new t.BrowserAdapter(e),e},(i=function(){return window.Turbolinks===t})()&&t.start()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd&&define(t)}.call(this),function(){(function(){(function(){var e=[].slice;this.ActionCable={INTERNAL:{message_types:{welcome:"welcome",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]},createConsumer:function(e){var n;return null==e&&(e=null!=(n=this.getConfig("url"))?n:this.INTERNAL.default_mount_path),new t.Consumer(this.createWebSocketURL(e))},getConfig:function(t){var e;return e=document.head.querySelector("meta[name='action-cable-"+t+"']"),null!=e?e.getAttribute("content"):void 0},createWebSocketURL:function(t){var e;return t&&!/^wss?:/i.test(t)?(e=document.createElement("a"),e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href):t},startDebugging:function(){return this.debugging=!0},stopDebugging:function(){return this.debugging=null},log:function(){var t;if(t=1<=arguments.length?e.call(arguments,0):[],this.debugging)return t.push(Date.now()),console.log.apply(console,["[ActionCable]"].concat(e.call(t)))}}}).call(this)}).call(this);var t=this.ActionCable;(function(){(function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ConnectionMonitor=function(){function n(t){this.connection=t,this.visibilityDidChange=e(this.visibilityDidChange,this),this.reconnectAttempts=0}var i,o,r;return n.pollInterval={min:3,max:30},n.staleThreshold=6,n.prototype.start=function(){if(!this.isRunning())return this.startedAt=o(),delete this.stoppedAt,this.startPolling(),document.addEventListener("visibilitychange",this.visibilityDidChange),t.log("ConnectionMonitor started. pollInterval = "+this.getPollInterval()+" ms")},n.prototype.stop=function(){if(this.isRunning())return this.stoppedAt=o(),this.stopPolling(),document.removeEventListener("visibilitychange",this.visibilityDidChange),t.log("ConnectionMonitor stopped")},n.prototype.isRunning=function(){return null!=this.startedAt&&null==this.stoppedAt},n.prototype.recordPing=function(){return this.pingedAt=o()},n.prototype.recordConnect=function(){return this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,t.log("ConnectionMonitor recorded connect")},n.prototype.recordDisconnect=function(){return this.disconnectedAt=o(),t.log("ConnectionMonitor recorded disconnect")},n.prototype.startPolling=function(){return this.stopPolling(),this.poll()},n.prototype.stopPolling=function(){return clearTimeout(this.pollTimeout)},n.prototype.poll=function(){return this.pollTimeout=setTimeout(function(t){return function(){return t.reconnectIfStale(),t.poll()}}(this),this.getPollInterval())},n.prototype.getPollInterval=function(){var t,e,n,o;return o=this.constructor.pollInterval,n=o.min,e=o.max,t=5*Math.log(this.reconnectAttempts+1),Math.round(1e3*i(t,n,e))},n.prototype.reconnectIfStale=function(){if(this.connectionIsStale())return t.log("ConnectionMonitor detected stale connection. reconnectAttempts = "+this.reconnectAttempts+", pollInterval = "+this.getPollInterval()+" ms, time disconnected = "+r(this.disconnectedAt)+" s, stale threshold = "+this.constructor.staleThreshold+" s"),this.reconnectAttempts++,this.disconnectedRecently()?t.log("ConnectionMonitor skipping reopening recent disconnect"):(t.log("ConnectionMonitor reopening"),this.connection.reopen())},n.prototype.connectionIsStale=function(){var t;return r(null!=(t=this.pingedAt)?t:this.startedAt)>this.constructor.staleThreshold},n.prototype.disconnectedRecently=function(){return this.disconnectedAt&&r(this.disconnectedAt)=0},e.prototype.isState=function(){var t,e;return e=1<=arguments.length?s.call(arguments,0):[],t=this.getState(),l.call(e,t)>=0},e.prototype.getState=function(){var t,e;for(e in WebSocket)if(WebSocket[e]===(null!=(t=this.webSocket)?t.readyState:void 0))return e.toLowerCase();return null},e.prototype.installEventHandlers=function(){var t,e;for(t in this.events)e=this.events[t].bind(this),this.webSocket["on"+t]=e},e.prototype.uninstallEventHandlers=function(){var t;for(t in this.events)this.webSocket["on"+t]=function(){}},e.prototype.events={message:function(t){var e,i,o,r;if(this.isProtocolSupported())switch(o=JSON.parse(t.data),e=o.identifier,i=o.message,r=o.type,r){case n.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case n.ping:return this.monitor.recordPing();case n.confirmation:return this.subscriptions.notify(e,"connected");case n.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",i)}},open:function(){if(t.log("WebSocket onopen event, using '"+this.getProtocol()+"' subprotocol"),this.disconnected=!1,!this.isProtocolSupported())return t.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close:function(){if(t.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error:function(){return t.log("WebSocket onerror event")}},e}()}.call(this),function(){var e=[].slice;t.Subscriptions=function(){function n(t){this.consumer=t,this.subscriptions=[]}return n.prototype.create=function(e,n){var i,o,r;return i=e,o="object"==typeof i?i:{channel:i},r=new t.Subscription(this.consumer,o,n),this.add(r)},n.prototype.add=function(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.sendCommand(t,"subscribe"),t},n.prototype.remove=function(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t},n.prototype.reject=function(t){var e,n,i,o,r;for(i=this.findAll(t),o=[],e=0,n=i.length;e, 1 + # response search must equal... + end + end + + it "Can get a list of recipes from a fake search" do + skip + VCR.use_cassette("recipes") do + response = EdamamApiWrapper.find_recipes("invalid search", "test search") + response["ok"].must_equal false + response["error"].wont_be_nil + end + end + end +end diff --git a/test/mailers/.keep b/test/mailers/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/models/.keep b/test/models/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/models/recipe_test.rb b/test/models/recipe_test.rb new file mode 100644 index 000000000..0e085057e --- /dev/null +++ b/test/models/recipe_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +describe Recipe do + let(:recipe) { Recipe.new } + + it "must be valid" do + value(recipe).must_be :valid? + end +end diff --git a/test/models/user_test.rb b/test/models/user_test.rb new file mode 100644 index 000000000..cc862ac2d --- /dev/null +++ b/test/models/user_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +describe User do + let(:user) { User.new } + + it "must be valid" do + value(user).must_be :valid? + end +end diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 000000000..9c746f0fe --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,35 @@ +require 'simplecov' +SimpleCov.start 'rails' + +ENV["RAILS_ENV"] = "test" +require File.expand_path("../../config/environment", __FILE__) +require "rails/test_help" +require "minitest/rails" +require "minitest/reporters" # for Colorized output +require 'vcr' +require 'webmock/minitest' + +# For colorful output! +Minitest::Reporters.use!( + Minitest::Reporters::SpecReporter.new, + ENV, + Minitest.backtrace_filter +) + +VCR.configure do |config| + config.cassette_library_dir = 'test/cassettes' # folder where casettes will be located + config.hook_into :webmock # tie into this other tool called webmock + config.default_cassette_options = { + :record => :new_episodes, # record new data when we don't have it yet + :match_requests_on => [:method, :uri, :body] # The http method, URI and body of a request all need to match + } + # Don't leave token lying around in a cassette file. + config.filter_sensitive_data('EDAMAM_ID') { ENV['EDAMAM_ID'] } + config.filter_sensitive_data('EDAMAM_KEY') { ENV['EDAMAM_KEY'] } +end + +class ActiveSupport::TestCase + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + # Add more helper methods to be used by all tests here... +end diff --git a/tmp/.keep b/tmp/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/assets/javascripts/.keep b/vendor/assets/javascripts/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/assets/stylesheets/.keep b/vendor/assets/stylesheets/.keep new file mode 100644 index 000000000..e69de29bb