diff --git a/Gemfile b/Gemfile index b8a1ebd..842ec59 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,8 @@ gem "faye" gem "thor" gem "listen" gem "rack-webconsole-pry" +gem "haml_coffee_assets" +gem "font-awesome-rails" group :development, :test do gem 'rspec' diff --git a/Gemfile.lock b/Gemfile.lock index 724bc60..30bbc58 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,28 +1,43 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.3.3) + actionpack (4.0.0) + activesupport (= 4.0.0) + builder (~> 3.1.0) + erubis (~> 2.7.0) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + activesupport (4.0.0) + i18n (~> 0.6, >= 0.6.4) + minitest (~> 4.2) + multi_json (~> 1.3) + thread_safe (~> 0.1) + tzinfo (~> 0.3.37) + addressable (2.3.5) + atomic (1.1.10) + builder (3.1.4) coderay (1.0.9) coffee-script (2.2.0) coffee-script-source execjs - coffee-script-source (1.6.1) + coffee-script-source (1.6.3) cookiejar (0.3.0) daemons (1.1.9) - diff-lcs (1.2.1) + diff-lcs (1.2.4) ejs (1.1.1) - em-http-request (1.0.3) - addressable (>= 2.2.3) + em-http-request (1.1.0) + addressable (>= 2.3.4) cookiejar - em-socksify + em-socksify (>= 0.3) + eventmachine (>= 1.0.3) + http_parser.rb (>= 0.6.0.beta.2) + em-socksify (0.3.0) eventmachine (>= 1.0.0.beta.4) - http_parser.rb (>= 0.5.3) - em-socksify (0.2.1) - eventmachine (>= 1.0.0.beta.4) - eventmachine (1.0.1) + erubis (2.7.0) + eventmachine (1.0.3) execjs (1.4.0) multi_json (~> 1.0) - fakeredis (0.4.1) + fakeredis (0.4.2) redis (~> 3.0.0) faye (0.8.9) cookiejar (>= 0.3.0) @@ -31,65 +46,93 @@ GEM faye-websocket (>= 0.4.0) rack (>= 1.0.0) yajl-ruby (>= 1.0.0) - faye-websocket (0.4.7) + faye-websocket (0.6.2) eventmachine (>= 0.12.0) + websocket-driver (>= 0.2.0) + ffi (1.9.0) + font-awesome-rails (3.2.1.2) + railties (>= 3.2, < 5.0) + formatador (0.2.4) growl (1.0.3) - guard (1.6.2) - listen (>= 0.6.0) + guard (1.8.1) + formatador (>= 0.2.4) + listen (>= 1.0.0) lumberjack (>= 1.0.2) pry (>= 0.9.10) - terminal-table (>= 1.4.3) thor (>= 0.14.6) guard-bundler (1.0.0) bundler (~> 1.0) guard (~> 1.1) - guard-rspec (2.4.1) - guard (>= 1.1) - rspec (~> 2.11) - haml (4.0.0) + guard-rspec (3.0.2) + guard (>= 1.8) + rspec (~> 2.13) + haml (4.0.3) tilt - hike (1.2.1) - http_parser.rb (0.5.3) + haml_coffee_assets (1.12.0) + coffee-script (>= 1.0.0) + sprockets (>= 2.0.3) + tilt (>= 1.3.3) + hike (1.2.3) + http_parser.rb (0.6.0.beta.2) + i18n (0.6.4) json (1.8.0) - listen (0.7.3) - lumberjack (1.0.2) + listen (1.2.2) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + rb-kqueue (>= 0.2) + lumberjack (1.0.4) method_source (0.8.1) - multi_json (1.6.1) - pry (0.9.12) + minitest (4.7.5) + multi_json (1.7.7) + pry (0.9.12.2) coderay (~> 1.0.5) method_source (~> 0.8) slop (~> 3.4) rack (1.5.2) + rack-test (0.6.2) + rack (>= 1.0) rack-webconsole-pry (0.1.9) json multi_json (>= 1.0.3) pry rack - rake (10.0.3) + railties (4.0.0) + actionpack (= 4.0.0) + activesupport (= 4.0.0) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (10.1.0) rb-fsevent (0.9.3) - redis (3.0.2) - rspec (2.13.0) - rspec-core (~> 2.13.0) - rspec-expectations (~> 2.13.0) - rspec-mocks (~> 2.13.0) - rspec-core (2.13.0) - rspec-expectations (2.13.0) + rb-inotify (0.9.0) + ffi (>= 0.5.0) + rb-kqueue (0.2.0) + ffi (>= 0.5.0) + redis (3.0.4) + rspec (2.14.1) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + rspec-core (2.14.4) + rspec-expectations (2.14.0) diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.13.0) - sass (3.2.7) - slop (3.4.3) - sprockets (2.9.0) + rspec-mocks (2.14.1) + sass (3.2.9) + slop (3.4.6) + sprockets (2.10.0) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - terminal-table (1.4.5) - thin (1.5.0) + thin (1.5.1) daemons (>= 1.0.9) eventmachine (>= 0.12.6) rack (>= 1.0.0) - thor (0.17.0) - tilt (1.3.5) + thor (0.18.1) + thread_safe (0.1.2) + atomic + tilt (1.4.1) + tzinfo (0.3.37) + websocket-driver (0.2.1) yajl-ruby (1.1.0) PLATFORMS @@ -100,11 +143,13 @@ DEPENDENCIES ejs fakeredis faye + font-awesome-rails growl guard guard-bundler guard-rspec haml + haml_coffee_assets listen pry rack-webconsole-pry diff --git a/app/controllers/code_sync/canvas_controller.rb b/app/controllers/code_sync/canvas_controller.rb new file mode 100644 index 0000000..fefd654 --- /dev/null +++ b/app/controllers/code_sync/canvas_controller.rb @@ -0,0 +1,5 @@ +class CodeSync::CanvasController < ApplicationController + def index + render :layout => false + end +end \ No newline at end of file diff --git a/app/views/code_sync/canvas/index.html.slim b/app/views/code_sync/canvas/index.html.slim new file mode 100644 index 0000000..41b4de6 --- /dev/null +++ b/app/views/code_sync/canvas/index.html.slim @@ -0,0 +1,28 @@ +doctype html +html lang="en" + head + meta charset="utf-8" + meta name="viewport" content="width=device-width, initial-scale=1.0" + meta name="author" content="Jonathan Soeder aka Datapimp" + meta name="keywords" content="asset pipeline tools, coffeescript, sass, codemirror, datapimp, jonathan soeder, soederpop" + title CodeSync: Asset Pipeline Live Reload + == stylesheet_link_tag 'code_sync/dependencies', 'code_sync/code_sync', 'code_sync/canvas' + + body style="padding: 0px; margin: 0px; height: 100%; width: 100%;" + #canvas-application.layer-controller.codesync + #underneath.bottom.layer + #editor.panel + #console.panel + + #canvas.top.layer + .handle.vertical-handle + .handle.horizontal-handle + + #canvas-inner + .drag-shim + iframe.canvas-frame seamless=true src="#{ root_path rescue '/' }" frameborder="0" style="" height="100%" width="100%" + + == javascript_include_tag 'code_sync/dependencies', 'code_sync/codemirror', 'code_sync/index', 'code_sync/canvas' + + javascript: + window.codeSyncClient = new CodeSync.Client() diff --git a/code_sync.gemspec b/code_sync.gemspec index 65f41b8..f3379ba 100644 --- a/code_sync.gemspec +++ b/code_sync.gemspec @@ -17,8 +17,9 @@ Gem::Specification.new do |s| s.add_dependency 'sprockets' s.add_dependency 'pry' s.add_dependency 'thor' - s.add_dependency 'slim' - s.add_dependency 'skim' + s.add_dependency 'slim', '~> 2.0.2' + s.add_dependency 'skim', '~> 0.9.3' + s.add_dependency 'haml_coffee_assets', '~> 1.16.0' s.add_dependency 'rack-webconsole-pry' s.add_dependency 'rb-fsevent', '~> 0.9' @@ -27,4 +28,4 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] -end \ No newline at end of file +end diff --git a/config/routes.rb b/config/routes.rb index c33b0ce..4744048 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -17,7 +17,8 @@ root: root }) - scope "/code-sync" do + scope "/code-sync", :module => "code_sync" do + get "/canvas", :to => "canvas#index" get "/info", :to => server_info match "/source", :to => source_provider end diff --git a/lib/assets/fonts b/lib/assets/fonts new file mode 120000 index 0000000..feed3f9 --- /dev/null +++ b/lib/assets/fonts @@ -0,0 +1 @@ +../../site/source/fonts \ No newline at end of file diff --git a/lib/assets/javascripts b/lib/assets/javascripts new file mode 120000 index 0000000..f73e7fb --- /dev/null +++ b/lib/assets/javascripts @@ -0,0 +1 @@ +../../site/source/javascripts \ No newline at end of file diff --git a/lib/assets/javascripts/canvas/editors.coffee b/lib/assets/javascripts/canvas/editors.coffee deleted file mode 100644 index f07636c..0000000 --- a/lib/assets/javascripts/canvas/editors.coffee +++ /dev/null @@ -1,48 +0,0 @@ -CodeSync.canvasEditors = ()-> - - window.templateEditor = new CodeSync.AssetEditor - hideable: false - autoRender: true - appendTo: "#front-end-editors-wrapper #panel-1" - renderVisible: true - startMode: "skim" - keyBindings: "vim" - position: "static" - document: - localStorageKey: "panel:1" - - plugins:[ - "ModeSelector" - "KeymapSelector" - "ElementSync" - ] - - window.styleEditor = new CodeSync.AssetEditor - hideable: false - autoRender: true - appendTo: "#front-end-editors-wrapper #panel-2" - renderVisible: true - startMode: "scss" - keyBindings: "vim" - position: "static" - plugins:[ - "ModeSelector" - "KeymapSelector" - ] - document: - localStorageKey: "panel:2" - - window.coffeescriptEditor = new CodeSync.AssetEditor - hideable: false - autoRender: true - appendTo: "#front-end-editors-wrapper #panel-3" - renderVisible: true - startMode: "coffeescript" - keyBindings: "vim" - position: "static" - plugins:[ - "ModeSelector" - "KeymapSelector" - ] - document: - localStorageKey: "panel:3" diff --git a/lib/assets/javascripts/canvas/index.coffee b/lib/assets/javascripts/canvas/index.coffee deleted file mode 100644 index ee1ff75..0000000 --- a/lib/assets/javascripts/canvas/index.coffee +++ /dev/null @@ -1,15 +0,0 @@ -#= require_tree . -#= require_self - -CodeSync.Canvas = Backbone.View.extend - className: "codesync-canvas" - -CodeSync.Canvas.startApplication = ()-> - $('body').attr('data-canvas-application',true) - - codeSyncCanvas = new CodeSync.LayerController(applyTo:"#canvas") - - CodeSync.canvasEditors() - - CodeSync.PryConsole.renderSingleton("#backend-console-wrapper") - diff --git a/lib/assets/javascripts/code_sync/client/index.coffee b/lib/assets/javascripts/code_sync/client/index.coffee deleted file mode 100644 index 8b4911a..0000000 --- a/lib/assets/javascripts/code_sync/client/index.coffee +++ /dev/null @@ -1,104 +0,0 @@ -#= require_self -#= require ./util - -class CodeSync.Client - - @_clients: [] - - @get: ()-> - CodeSync.Client._clients[0] - - VERSION: CodeSync.VERSION - - logLevel: 0 - - constructor: (options={})-> - - @logLevel = options.logLevel || 0 - - CodeSync.Client._clients.push(@) - - CodeSync.util.loadScript "#{ CodeSync.get("socketEndpoint") }/client.js", ()=> - return if @clientLoaded is true - - setTimeout ()=> - try - @setupSocket() - catch e - console.log "Error setting up codesync client" - , 25 - - @clientLoaded = true - - subscribeWith: (cb)-> - @socket?.subscribe "/code-sync/outbound", cb - - setupSocket: ()-> - return unless Faye? - - @socket = new Faye.Client(CodeSync.get("socketEndpoint")) - - @subscribeWith (notification)=> - if @logLevel > 0 - console.log "Received notification on outbound channel", notification - - @onNotification?.call?(@, notification) - - if notification.name?.match(/\.js$/) - @onJavascriptNotification.call(@,notification) - - if notification.name?.match(/\.css$/) - @onStylesheetNotification.call(@, notification) - - javascriptCallbacks: [] - - stylesheetCallbacks: [] - - removeJavascriptCallbacks: ()-> - @javascriptCallbacks = [] - - removeStylesheetCallbacks: ()-> - @stylesheetCalbacks = [] - - afterJavascriptChange: (callback, clearExisting=false)-> - @javascriptCallbacks ||= [] - @javascriptCallbacks = [] if clearExisting is true - @javascriptCallbacks.push(callback) - - afterStylesheetChange: (callback, clearExisting=false)-> - @stylesheetCallbacks ||= [] - @stylesheetCallbacks = [] if clearExisting is true - @stylesheetCallbacks.push(callback) - - onJavascriptNotification: (notification)-> - client = @ - - CodeSync.processing = true - - if notification.source - sourceEval.call(window, notification.source) - - for callback in client.javascriptCallbacks when callback.call? - callback.call(client, notification) - - CodeSync.processing = false - - return - - if notification.path - console.log "notification", notification.path - CodeSync.util.loadScript "#{ CodeSync.get("sprocketsEndpoint") }/#{ notification.path }", ()-> - for callback in client.javascriptCallbacks when callback.call? - callback.call(@, notification) - - onStylesheetNotification: (notification)-> - client = @ - - if notification.path && notification.name - CodeSync.util.loadStylesheet "#{ CodeSync.get("sprocketsEndpoint") }/#{ notification.path }", tracker: notification.name, ()-> - for callback in client.stylesheetCallbacks when callback.call? - callback.call(@, notification) - - -sourceEval = (source)-> - eval(source) \ No newline at end of file diff --git a/lib/assets/javascripts/code_sync/codemirror.coffee b/lib/assets/javascripts/code_sync/codemirror.coffee deleted file mode 100644 index 96910f3..0000000 --- a/lib/assets/javascripts/code_sync/codemirror.coffee +++ /dev/null @@ -1,12 +0,0 @@ -#= require ../vendor/vendored_codemirror -#= require ../vendor/codemirror-ruby -#= require ../vendor/codemirror-coffeescript -#= require ../vendor/codemirror-css -#= require ../vendor/codemirror-xml -#= require ../vendor/codemirror-javascript -#= require ../vendor/codemirror-htmlmixed -#= require ../vendor/codemirror-sass -#= require ../vendor/codemirror-haml -#= require ../vendor/codemirror-skim -#= require ../vendor/codemirror-vim -#= require ../vendor/codemirror-markdown diff --git a/lib/assets/javascripts/code_sync/dependencies.coffee b/lib/assets/javascripts/code_sync/dependencies.coffee deleted file mode 100644 index dfcb4d3..0000000 --- a/lib/assets/javascripts/code_sync/dependencies.coffee +++ /dev/null @@ -1,6 +0,0 @@ -#= require ../vendor/keymaster.min -#= require ../vendor/jquery -#= require ../vendor/underscore-min -#= require ../vendor/underscore.string.min -#= require ../vendor/backbone-min -#= require ../vendor/spectrum diff --git a/lib/assets/javascripts/code_sync/editor/datasources/gist_loader.coffee b/lib/assets/javascripts/code_sync/editor/datasources/gist_loader.coffee deleted file mode 100644 index f6c35be..0000000 --- a/lib/assets/javascripts/code_sync/editor/datasources/gist_loader.coffee +++ /dev/null @@ -1,7 +0,0 @@ -CodeSync.Gist = Backbone.Model.extend - initialize: (@attributes={})-> - - url: ()-> - - toDocuments:()-> - diff --git a/lib/assets/javascripts/code_sync/editor/datasources/project_assets.coffee b/lib/assets/javascripts/code_sync/editor/datasources/project_assets.coffee deleted file mode 100644 index ac65624..0000000 --- a/lib/assets/javascripts/code_sync/editor/datasources/project_assets.coffee +++ /dev/null @@ -1,14 +0,0 @@ -CodeSync.ProjectAssets = Backbone.Collection.extend - url: ()-> - CodeSync.get("serverInfoEndpoint") - - parse: (response)-> - models = for path in _.uniq(response.project_assets) - description = path.replace(response.root,'') - {path,description} - - models - - initialize: ()-> - @fetch() - Backbone.Collection::initialize.apply(@, arguments) \ No newline at end of file diff --git a/lib/assets/javascripts/code_sync/editor/plugins/element_sync.coffee b/lib/assets/javascripts/code_sync/editor/plugins/element_sync.coffee deleted file mode 100644 index fb4d2db..0000000 --- a/lib/assets/javascripts/code_sync/editor/plugins/element_sync.coffee +++ /dev/null @@ -1,111 +0,0 @@ -CodeSync.plugins.ElementSync = Backbone.View.extend - - className : "codesync-element-sync toggleable-input" - - action: "html" - - events: - "keyup input" : ()-> - @bindToSelector() - - "change select": (e)-> - @action = @$(e.target).val() - - "click .hide-panel-button" : ()-> - @hide() - - "click .done-button" : ()-> - @clear() - - initialize: (@options={})-> - _.extend(@,@options) - - @bindToSelector = _.debounce ()=> - @selector = @getValue() - @$elementSync = $(@selector) - @status() - , 500 - - - @editor.on "code:sync:template", @syncWithElement, @ - - @editor.on "change:mode", (mode)=> - if mode.isTemplate() - @toggleButton(true) - else - @hide() - @toggleButton(false) - - @visible = false - @$el.hide() - @toggleButton(false) - - syncWithElement: (doc, templateFn)-> - @selector && @$elementSync?[@action || "html"]?(templateFn()) - - getSelectorContents: ()-> - @$(@selector).html() - - getValue: ()-> - @$('input[name="css-selector"]').val() - - clear: ()-> - @$('input[name="css-selector"]').val('') - @$elementSync = undefined - @selector = '' - @$('.element-sync-status').html("") - - existsInDocument: ()-> - @$elementSync?.length > 0 - - status: ()-> - length = @$elementSync?.length - - msg = if length is 0 && @getValue().length > 0 - "CSS Selector not found" - else if length is 1 - "1 total element" - else if length > 0 - "#{ length } total elements" - else - "" - - @$('.element-sync-status').html(msg) - - render: ()-> - @$el.html JST["code_sync/editor/templates/element_sync"]() - @status() - - @ - - show: ()-> - @visible = true - @$el.show() - - hide: ()-> - @visible = false - @$el.hide() - - toggle:()-> - if @visible then @hide() else @show() - - toggleButton: (show=true)-> - if show - @editor.$('.toggle-element-sync').show() - else - @editor.$('.toggle-element-sync').hide() - - -CodeSync.plugins.ElementSync.setup = (editor)-> - @$('.toolbar-wrapper').append "
Sync w/ Element
" - - view = new CodeSync.plugins.ElementSync({editor}) - - editor.views.elementSync = view - - @events["click .toggle-element-sync"] = ()=> - view.toggle() - - @$el.append view.render().el - - diff --git a/lib/assets/javascripts/code_sync/editor/plugins/keymap_selector.coffee b/lib/assets/javascripts/code_sync/editor/plugins/keymap_selector.coffee deleted file mode 100644 index 48e585d..0000000 --- a/lib/assets/javascripts/code_sync/editor/plugins/keymap_selector.coffee +++ /dev/null @@ -1,44 +0,0 @@ -CodeSync.plugins.KeymapSelector = Backbone.View.extend - className: "config-select keymap-selector" - - events: - "change select" : "onSelect" - - initialize: (options={})-> - @editor = options.editor - - @editor.on "change:keymap", (keyMap)=> - @setValue(keyMap) - - Backbone.View::initialize.apply(@, arguments) - - onSelect: ()-> - selected = @$('select').val() - @editor.setKeyMap(selected) - - setValue: (val)-> - @$('select').val(val) - - hideLabel: ()-> - @$('label').hide() - - showLabel: ()-> - @$('label').show() - - render: ()-> - options = "" - - for mode in ["default","vim"] - options += "" - - @$el.html(" ") - - @hideLabel() unless @visibleLabel - - @ - - -CodeSync.plugins.KeymapSelector.setup = (editor)-> - v = @views.keymapSelector = new CodeSync.plugins.KeymapSelector({editor}) - @$('.toolbar-wrapper').append( v.render().el ) - diff --git a/lib/assets/javascripts/code_sync/editor/plugins/mode_selector.coffee b/lib/assets/javascripts/code_sync/editor/plugins/mode_selector.coffee deleted file mode 100644 index ea26b32..0000000 --- a/lib/assets/javascripts/code_sync/editor/plugins/mode_selector.coffee +++ /dev/null @@ -1,53 +0,0 @@ -CodeSync.plugins.ModeSelector = Backbone.View.extend - className: "config-select mode-selector" - - events: - "change select" : "onSelect" - - initialize: (options={})-> - @editor = options.editor - - @modes = @editor.modes - - @modes.on "reset", @render, @ - - @editor.on "change:mode", (modeModel, modeId)=> - @setValue(modeId) - - Backbone.View::initialize.apply(@, arguments) - - onSelect: ()-> - selected = @$('select').val() - mode = @modes.get(selected) - - @editor.setMode(mode) - - setValue: (val)-> - @$('select').val(val) - - hideLabel: ()-> - @$('label').hide() - - showLabel: ()-> - @$('label').show() - - render: ()-> - options = "" - - for mode in @modes.models - options += "" - - @$el.html(" ") - - @hideLabel() unless @visibleLabel - - @ - - -CodeSync.plugins.ModeSelector.setup = (editor)-> - v = @views.modeSelector = new CodeSync.plugins.ModeSelector({editor}) - @$('.toolbar-wrapper').append v.render().el - - editor.on "document:loaded", (doc)-> v.setValue(doc.get('mode')) - - diff --git a/lib/assets/javascripts/code_sync/editor/plugins/preferences.coffee b/lib/assets/javascripts/code_sync/editor/plugins/preferences.coffee deleted file mode 100644 index a8e6c86..0000000 --- a/lib/assets/javascripts/code_sync/editor/plugins/preferences.coffee +++ /dev/null @@ -1,71 +0,0 @@ -CodeSync.plugins.PreferencesPanel = Backbone.View.extend - className: "preferences-panel" - - events: - "change select,input" : ()-> - @trigger "update:preferences" - - renderHidden: true - - initialize: (options)-> - @editor = options.editor - - @$el.html JST["code_sync/editor/templates/preferences_panel"]() - - Backbone.View::initialize.apply(@, arguments) - - values: ()-> - values = {} - - for el in @$('input,select') - input = $(el) - values[input.attr('name')] = input.val() - - values - - toggle: ()-> - @syncWithEditorOptions() - @$el.toggle() - - syncWithEditorOptions: ()-> - @$('select[name="theme"]').val @editor.codeMirror.getOption('theme') - @$('select[name="keyMap"]').val @editor.codeMirror.getOption('keyMap') - @$('input[name="asset_endpoint"]').val CodeSync.get("assetCompilationEndpoint") - @$('input[name="editor_hotkey"]').val CodeSync.get("editorToggleHotKey") - - render: ()-> - @$el.hide() if @renderHidden is true - @ - - -CodeSync.plugins.PreferencesPanel.setup = (editor)-> - panel = new CodeSync.plugins.PreferencesPanel(editor: @) - - @$('.toolbar-wrapper').append "
Preferences
" - - @events["click .toggle-preferences"] = ()=> panel.toggle() - - @$el.append panel.render().el - - panel.on "update:preferences", ()=> - values = panel.values() - - editor.setTheme(values.theme) - editor.setKeyMap(values.keyMap) - - CodeSync.set("assetCompilationEndpoint", values.asset_endpoint) - - CodeSync.AssetEditor.setHotKey(values.editor_hotkey) - - editor.on "codemirror:setup", (cm)-> - cm.on "focus", ()-> - panel.$el.hide() - - panel.on "update:preferences", ()=> - values = panel.values() - if editor.position isnt values.position - editor.setPosition(values.position) - - - - diff --git a/lib/assets/javascripts/code_sync/editor/templates/asset_editor.jst.skim b/lib/assets/javascripts/code_sync/editor/templates/asset_editor.jst.skim deleted file mode 100644 index 24ca619..0000000 --- a/lib/assets/javascripts/code_sync/editor/templates/asset_editor.jst.skim +++ /dev/null @@ -1,2 +0,0 @@ -.toolbar-wrapper -.codesync-asset-editor diff --git a/lib/assets/javascripts/code_sync/editor/templates/element_sync.jst.skim b/lib/assets/javascripts/code_sync/editor/templates/element_sync.jst.skim deleted file mode 100644 index 2a02298..0000000 --- a/lib/assets/javascripts/code_sync/editor/templates/element_sync.jst.skim +++ /dev/null @@ -1,19 +0,0 @@ -.element-sync-panel - .row - .span9 - input name="css-selector" placeholder="Enter a CSS selector to sync with" - .span3 - select name="action" - option value="html" Replace - option value="before" Before - option value="before" After - .row - .span9 - .element-sync-status - input.done-button type="button" value="Done" - input.hide-panel-button type="button" value="Hide" - - - - - diff --git a/lib/assets/javascripts/code_sync/editor/templates/preferences_panel.jst.skim b/lib/assets/javascripts/code_sync/editor/templates/preferences_panel.jst.skim deleted file mode 100644 index 9d2dbba..0000000 --- a/lib/assets/javascripts/code_sync/editor/templates/preferences_panel.jst.skim +++ /dev/null @@ -1,38 +0,0 @@ -form - .control-group - label - | KeyBindings - .controls - select name="keyMap" - option value="default" Default - option value="vim" Vim - - .control-group - label - | Theme - .controls - select name="theme" - option value="ambiance" Ambiance - option value="lesser-dark" Lesser Dark - option value="monokai" Monokai - option value="xq-light" XQ Light - - .control-group - label - | Asset Compiler Endpoint - .controls - input type="text" name="asset_endpoint" value="#{ CodeSync.get('assetCompilationEndpoint') }" - - .control-group - label - | Hotkey - .controls - input type="text" name="editor_hotkey" value="#{ CodeSync.get('editorToggleHotkey') }" - - .control-group - label - | Position - .controls - select name="position" - option value="top" Top - option value="bottom" Bottom diff --git a/lib/assets/javascripts/code_sync/editor/views/asset_selector.coffee b/lib/assets/javascripts/code_sync/editor/views/asset_selector.coffee deleted file mode 100644 index bb8e8b2..0000000 --- a/lib/assets/javascripts/code_sync/editor/views/asset_selector.coffee +++ /dev/null @@ -1,106 +0,0 @@ -CodeSync.AssetSelector = Backbone.View.extend - className: "codesync-asset-selector" - - events: - "keyup input": "keyHandler" - "click .search-result": "selectSearchResult" - - initialize:(options={})-> - Backbone.View::initialize.apply(@, arguments) - - @editor = options.editor - - _.bindAll(@,"keyHandler","loadAsset") - - @selected = new Backbone.Model(index: -1) - - @selected.on "change:index", (model,value)=> - @$('.search-result').removeClass('active') - @$('.search-result').eq(value).addClass('active') - - keyHandler: (e)-> - switch e.keyCode - when 13 - @openCurrentSearchResult() - when 27 - @hide() - when 38 - @previousSearchResult() - when 40 - @nextSearchResult() - else - @filterAssetsBy @$('input').val() - - openCurrentSearchResult: ()-> - {index} = @selected.attributes - - if asset = @searchResults[index] - @selected.set('index',0,silent:true) - - _.delay ()=> - @loadAsset @searchResults[index].get('path') - , 10 - @hide() - - previousSearchResult: ()-> - {index} = @selected.attributes - index -= 1 - index = 0 if index < 0 - @selected.set {index} - - nextSearchResult: ()-> - {index} = @selected.attributes - index += 1 - index = 0 if index > @searchResults.length - @selected.set {index} - - selectSearchResult: (e)-> - @loadAsset $(e.target)?.data('path') - - loadAsset: (path)-> - @trigger "asset:selected", path - - filterAssetsBy: (value)-> - return if value.length <= 1 - - wrapper = @showSearchResults() - wrapper.empty() - - @selected.set('index',-1, silent: true) - - @searchResults = @collection.select (model)-> - regex = new RegExp("#{value}") - model.get("description")?.match(regex) || model.get("path")?.match(regex) - - @searchResults = @searchResults.slice(0,5) - - for model,index in @searchResults - wrapper.append "
#{ model.get('description') }
" - - wrapper.height( @searchResults.length * 40 ) - - showSearchResults: ()-> - @wrapper.show() - - hideSearchResults: ()-> - @wrapper.hide() - - toggle: ()-> - if @visible then @hide() else @show() - - show: ()-> - @wrapper.empty() - @visible = true - @$el.show() - @hideSearchResults() - @$('input').val('').focus() - - hide: ()-> - @$el.hide() - @visible = false - @editor.codeMirror.focus() - - render: ()-> - @$el.html JST["code_sync/editor/templates/asset_selector"]() - @wrapper ||= @$('.search-results-wrapper') - @ \ No newline at end of file diff --git a/lib/assets/javascripts/code_sync/editor/views/color_picker.coffee b/lib/assets/javascripts/code_sync/editor/views/color_picker.coffee deleted file mode 100644 index 40a64b0..0000000 --- a/lib/assets/javascripts/code_sync/editor/views/color_picker.coffee +++ /dev/null @@ -1,76 +0,0 @@ -CodeSync.plugins.ColorPicker = Backbone.View.extend - className: "codesync-color-picker" - - spectrumOptions: - showAlpha: false - preferredFormat: "hex6" - flat: true - showInput: true - chooseText: "Choose" - - initialize: (@options={})-> - _.extend(@,@options) - - @$el.append "" - - @widget = @$('.color-picker-widget') - - remove: ()-> - @widget.spectrum("destroy") - @$el.remove() - - hide: ()-> - @widget.spectrum("hide") - @$el.hide() - - @off "color:change" - - show: ()-> - @widget.spectrum("show") - @$el.show() - - syncWithToken: (token, cursor)-> - - cm = @editor.codeMirror - - cm.addWidget(cursor, @el) - - @show() - - line = cm.getLine(cursor.line) - - startch = token.start - endch = token.end - - @widget.spectrum("set",token.string) - - @on "color:change", _.debounce (colorObject, hexValue)=> - cm.replaceRange("#"+hexValue, {line:cursor.line,ch:startch}, {line:cursor.line,ch:endch}) - @editor.currentDocument?.trigger("change:contents") - - render: ()-> - opts = _.extend @spectrumOptions, - move: _.debounce((color)=> - @trigger "color:change", color, color.toHex() - ,200) - - @widget.spectrum(@spectrumOptions) - - @ - -CodeSync.plugins.ColorPicker.setup = (editor)-> - @colorPicker = new CodeSync.plugins.ColorPicker(editor: editor) - - @$el.append( editor.colorPicker.render().el ) - @colorPicker.hide() - - cm = editor.codeMirror - - cm.on "cursorActivity", -> - cursor = cm.getCursor() - token = cm.getTokenAt(cursor) - - if token.string?.match(/#[a-fA-F0-9]{3,6}/g) and token.string?.length >= 6 - editor.colorPicker.syncWithToken(token, cursor) - else - editor.colorPicker.hide() diff --git a/lib/assets/javascripts/code_sync/editor/views/document_manager.coffee b/lib/assets/javascripts/code_sync/editor/views/document_manager.coffee deleted file mode 100644 index d6933a6..0000000 --- a/lib/assets/javascripts/code_sync/editor/views/document_manager.coffee +++ /dev/null @@ -1,176 +0,0 @@ -CodeSync.plugins.DocumentTabs = Backbone.View.extend - - views: {} - - events: - "click .document-tab.selectable" : "onDocumentTabSelection" - "click .document-tab.closable .close-anchor" : "closeTab" - "click .document-tab.new-document" : "createDocument" - "click .document-tab.save-document" : "saveDocument" - "click .document-tab.open-document": "toggleAssetSelector" - - "dblclick .document-tab.editable" : "onDoubleClickTab" - - "blur .document-tab.editable .contents" : "onEditableTabBlur" - "keydown .document-tab.editable .contents" : "onEditableTabKeyPress" - - initialize: (options={})-> - @editor = options.editor - - @$el.append "
" - - @openDocuments = new CodeSync.Documents() - @openDocuments.on "add", @renderTabs, @ - @openDocuments.on "remove", @renderTabs, @ - @openDocuments.on "change:display", @renderTabs, @ - - @projectAssets = new CodeSync.ProjectAssets() - - @state = new Backbone.Model - currentDocument: undefined - - @state.on "change:currentDocument", @highlightActiveDocumentTab, @ - - @on "editor:hidden", ()=> - @$('.document-tab.hideable').hide() - - @on "editor:visible", ()=> - @$('.document-tab.hideable').show() - - @views.assetSelector = new CodeSync.AssetSelector - collection: @projectAssets - documents: @openDocuments - editor: @editor - - @views.assetSelector.on "asset:selected", @onAssetSelection, @ - - documentInTab: (tabElement)-> - tabElement = tabElement.parents('.document-tab').eq(0) unless tabElement.is('.document-tab') - - if cid = tabElement.data('document-cid') - doc = @openDocuments.detect (model)-> - model.cid == cid - - renderTabs: ()-> - container = @$('.document-tabs-container').empty() - tmpl = JST["code_sync/editor/templates/document_manager_tab"] - - # Render each document into a tab - @openDocuments.each (doc,index)-> container.append tmpl(doc: doc, index: index) - - if @allowNew is true - container.append tmpl(display:"New",cls:"new-document") - - if @allowOpen is true - container.append tmpl(display:"Open",cls:"open-document") - - onAssetSelection: (path)-> - @openDocuments.findOrCreateForPath path, (doc)=> - @openDocument(doc) - - onEditableTabKeyPress: (e)-> - target = @$(e.target).closest('.document-tab') - contents = target.children('.contents') - - if e.keyCode is 13 or e.keyCode is 27 - e.preventDefault() - - contents.attr('contenteditable', false) - - if doc = @documentInTab(target) - if e.keyCode is 13 - doc.set('name', contents.html() ) - - if e.keyCode is 27 and original = target.attr('data-original-value') - contents.html(original) - - @editor.codeMirror.focus() - - onEditableTabBlur: (e)-> - target = @$(e.target).closest('.document-tab') - contents = target.children('.contents') - - console.log "On Editable Tab Blur", @documentInTab(target)?.cid - if doc = @documentInTab(target) - doc.set('name', contents.html() ) - contents.attr('contenteditable', false) - - onDoubleClickTab: (e)-> - target = @$(e.target).closest('.document-tab') - contents = target.children('.contents') - - target.attr('data-original-value', contents.html()) - contents.attr('contenteditable',true) - - onDocumentTabSelection: (e)-> - @trigger "tab:click" - target = @$(e.target).closest('.document-tab') - doc = @documentInTab(target) - - @setCurrentDocument(doc) - - closeTab: (e)-> - target = @$(e.target) - doc = @documentInTab(target) - - index = @openDocuments.indexOf(doc) - @openDocuments.remove(doc) - - @setCurrentDocument( @openDocuments.at(index - 1) || @openDocuments.at(0) ) - - getCurrentDocument: ()-> - @currentDocument - - openDocument: (doc)-> - @openDocuments.add(doc) - @setCurrentDocument(doc) - - setCurrentDocument: (@currentDocument)-> - @editor.loadDocument(@currentDocument) - - saveDocument: ()-> - if CodeSync.get("disableAssetSave") - @editor.showStatusMessage(type: "error", message: "Saving is disabled in this demo.") - else - @currentDocument.saveToDisk() - - createDocument: ()-> - @openDocuments.add - name: "untitled" - display: "Untitled" - mode: CodeSync.get("defaultFileType") - extension: CodeSync.Modes.guessExtensionFor(CodeSync.get("defaultFileType")) - - doc = @openDocuments.last() - - @openDocument(doc) - - toggleAssetSelector: ()-> - @views.assetSelector.toggle() - - render: ()-> - @$el.append( @views.assetSelector.render().el ) - - @ - -CodeSync.plugins.DocumentTabs.setup = (editor)-> - dm = @views.DocumentTabs = new CodeSync.plugins.DocumentTabs(editor: @) - - _.extend editor.codeMirrorKeyBindings, - "Ctrl-T": ()-> - dm.toggleAssetSelector() - - "Ctrl-S": ()-> - dm.getCurrentDocument().save() - - "Ctrl-N": ()-> - dm.createDocument() - - @$el.append(dm.render().el) - - dm.on "tab:click", ()=> - @show() if @visible is false - - CodeSync.AssetEditor::loadDefaultDocument = ()-> - defaultDocument = editor.getDefaultDocument() - dm.openDocument(defaultDocument) diff --git a/lib/assets/javascripts/code_sync/editor/views/keymap_selector.coffee b/lib/assets/javascripts/code_sync/editor/views/keymap_selector.coffee deleted file mode 100644 index ed2655d..0000000 --- a/lib/assets/javascripts/code_sync/editor/views/keymap_selector.coffee +++ /dev/null @@ -1,37 +0,0 @@ -CodeSync.plugins.KeymapSelector = Backbone.View.extend - className: "keymap-selector" - - events: - "change select" : "onSelect" - - initialize: (options={})-> - @editor = options.editor - - @editor.on "change:keymap", (keyMap)=> - @setValue(keyMap) - - Backbone.View::initialize.apply(@, arguments) - - onSelect: ()-> - selected = @$('select').val() - @editor.setKeyMap(selected) - - setValue: (val)-> - @$('select').val(val) - - render: ()-> - options = "" - - for mode in ["default","vim"] - options += "" - - @$el.html("") - - @ - - -CodeSync.plugins.KeymapSelector.setup = (editor)-> - v = @views.keymapSelector = new CodeSync.plugins.KeymapSelector({editor}) - - editor.$('.codesync-asset-editor').append v.render().el - diff --git a/lib/assets/javascripts/code_sync/editor/views/mode_selector.coffee b/lib/assets/javascripts/code_sync/editor/views/mode_selector.coffee deleted file mode 100644 index 504a3e1..0000000 --- a/lib/assets/javascripts/code_sync/editor/views/mode_selector.coffee +++ /dev/null @@ -1,47 +0,0 @@ -CodeSync.plugins.ModeSelector = Backbone.View.extend - className: "mode-selector" - - events: - "change select" : "onSelect" - - initialize: (options={})-> - @editor = options.editor - - @modes = @editor.modes - - @modes.on "reset", @render, @ - - @editor.on "change:mode", (modeModel, modeId)=> - @setValue(modeId) - - Backbone.View::initialize.apply(@, arguments) - - onSelect: ()-> - selected = @$('select').val() - mode = @modes.get(selected) - - @editor.setMode(mode) - - setValue: (val)-> - @$('select').val(val) - - render: ()-> - options = "" - - for mode in @modes.models - options += "" - - @$el.html("") - - @ - - -CodeSync.plugins.ModeSelector.setup = (editor)-> - v = @views.modeSelector = new CodeSync.plugins.ModeSelector({editor}) - - editor.$('.codesync-asset-editor').append v.render().el - - editor.on "document:loaded", (doc)-> - v.setValue(doc.get('mode')) - - diff --git a/lib/assets/javascripts/code_sync/editor/views/name_input.coffee b/lib/assets/javascripts/code_sync/editor/views/name_input.coffee deleted file mode 100644 index 704a834..0000000 --- a/lib/assets/javascripts/code_sync/editor/views/name_input.coffee +++ /dev/null @@ -1,44 +0,0 @@ -CodeSync.NameInput = Backbone.View.extend - className: "asset-name-input" - - events: - "change input" : "updateEditor" - "keyup input": "updateEditor" - "blur input": "toggle" - - initialize: (options={})-> - @editor = options.editor - - _.bindAll(@,"_updateEditor","updateEditor","toggle") - @_updateEditor = _.debounce(CodeSync.NameInput::_updateEditor, 300) - - Backbone.View::initialize.apply(@, arguments) - - render: ()-> - @$el.append("") - @$el.hide() - @ - - updateEditor: ()-> - @_updateEditor() - - _updateEditor: ()-> - assetName = @$('input').val() - - if assetName.match(/\./) - @editor.currentName = assetName - - mode = @editor.determineModeFor(assetName) - - setValue: (value)-> - @$('input').val value - - getValue: ()-> - @$('input').val() - - toggle: ()-> - if @getValue()?.length is 0 - @editor.setDefaultExtension() - @editor.currentName = @editor.currentPath = undefined - - @$el.toggle() diff --git a/lib/assets/javascripts/code_sync/editor/views/preferences.coffee b/lib/assets/javascripts/code_sync/editor/views/preferences.coffee deleted file mode 100644 index a8e6c86..0000000 --- a/lib/assets/javascripts/code_sync/editor/views/preferences.coffee +++ /dev/null @@ -1,71 +0,0 @@ -CodeSync.plugins.PreferencesPanel = Backbone.View.extend - className: "preferences-panel" - - events: - "change select,input" : ()-> - @trigger "update:preferences" - - renderHidden: true - - initialize: (options)-> - @editor = options.editor - - @$el.html JST["code_sync/editor/templates/preferences_panel"]() - - Backbone.View::initialize.apply(@, arguments) - - values: ()-> - values = {} - - for el in @$('input,select') - input = $(el) - values[input.attr('name')] = input.val() - - values - - toggle: ()-> - @syncWithEditorOptions() - @$el.toggle() - - syncWithEditorOptions: ()-> - @$('select[name="theme"]').val @editor.codeMirror.getOption('theme') - @$('select[name="keyMap"]').val @editor.codeMirror.getOption('keyMap') - @$('input[name="asset_endpoint"]').val CodeSync.get("assetCompilationEndpoint") - @$('input[name="editor_hotkey"]').val CodeSync.get("editorToggleHotKey") - - render: ()-> - @$el.hide() if @renderHidden is true - @ - - -CodeSync.plugins.PreferencesPanel.setup = (editor)-> - panel = new CodeSync.plugins.PreferencesPanel(editor: @) - - @$('.toolbar-wrapper').append "
Preferences
" - - @events["click .toggle-preferences"] = ()=> panel.toggle() - - @$el.append panel.render().el - - panel.on "update:preferences", ()=> - values = panel.values() - - editor.setTheme(values.theme) - editor.setKeyMap(values.keyMap) - - CodeSync.set("assetCompilationEndpoint", values.asset_endpoint) - - CodeSync.AssetEditor.setHotKey(values.editor_hotkey) - - editor.on "codemirror:setup", (cm)-> - cm.on "focus", ()-> - panel.$el.hide() - - panel.on "update:preferences", ()=> - values = panel.values() - if editor.position isnt values.position - editor.setPosition(values.position) - - - - diff --git a/lib/assets/javascripts/code_sync/index.coffee b/lib/assets/javascripts/code_sync/index.coffee deleted file mode 100644 index 4a97412..0000000 --- a/lib/assets/javascripts/code_sync/index.coffee +++ /dev/null @@ -1,4 +0,0 @@ -#= require ../vendor/keylauncher -#= require ./config -#= require ./client -#= require ./editor \ No newline at end of file diff --git a/lib/assets/javascripts/code_sync_basic.coffee b/lib/assets/javascripts/code_sync_basic.coffee deleted file mode 100644 index 7f4418d..0000000 --- a/lib/assets/javascripts/code_sync_basic.coffee +++ /dev/null @@ -1 +0,0 @@ -#= require ./code_sync/index \ No newline at end of file diff --git a/lib/assets/javascripts/demos.coffee b/lib/assets/javascripts/demos.coffee deleted file mode 100644 index f113254..0000000 --- a/lib/assets/javascripts/demos.coffee +++ /dev/null @@ -1,48 +0,0 @@ -#= require_tree ./demos -#= require_self - -window.defaultContentFor = (mode)-> - window["#{ mode }Default"] - -window.setupEditors = _.once ()-> - for mode, index in ["scss","skim","coffeescript"] - - window["#{ mode }Editor"] ||= new CodeSync.AssetEditor - hideable: false - autoRender: true - appendTo: ".editor-container" - renderVisible: true - startMode: mode - name: "panel-#{ index + 1 }" - position: "static" - document: - content: "shit" - contents: defaultContentFor(mode) - - plugins:[ - "ModeSelector" - "KeymapSelector" - ] - - scssEditor.addPlugin("ColorPicker") - - -setupEditors() - -window.layoutSelector ||= new LayoutSelector() -$('body').append( layoutSelector.render().el ) unless $('#layout-selector').length > 0 - -CodeSync.onScriptChange ||= (changeObject)-> - if changeObject.mode is "skim" and changeObject.name is "codesync" - $(".canvas-container").html JST["codesync"]() - window.coffeeScriptEditor.currentDocument.trigger "change:contents" - -_.delay ()-> - window.skimEditor.currentDocument.trigger "change:contents" - window.scssEditor.currentDocument.trigger "change:contents" -, 600 - -_.delay ()-> - window.coffeescriptEditor.currentDocument.trigger "change:contents" - window.enableGlobalEditor() -, 1800 diff --git a/lib/assets/javascripts/demos/default-content.coffee b/lib/assets/javascripts/demos/default-content.coffee deleted file mode 100644 index 934562f..0000000 --- a/lib/assets/javascripts/demos/default-content.coffee +++ /dev/null @@ -1,72 +0,0 @@ -window.coffeescriptDefault = """ -# This coffeescript content will be automatically evaluated any time you -# change some stuff. -CodeSync.onScriptChange ||= (changeObject)-> - if changeObject.mode is "skim" and changeObject.name is "codesync" - $(".canvas-container").html JST["codesync"]() - -(CodeSync.tour ||= {}).step = 0 -CodeSync.enableTour(restart: true) -""" - -window.skimDefault = """ -.editor-demos - h1 CodeSync Editor Demos - p - | You can embed as many CodeSync.AssetEditor as you want in any configuration you want, and they will hook right up to the asset pipeline in your project and allow you to use your assets to create a little front end development canvas. - p - | In this example here, I am using a CodeSync.onScriptChange hook to wire up the automatic rendering of a template file whenever it changes, to display the contents of that template as it would be styled in my project. - - h2.tour-button Click Here to take a tour son -""" - -window.scssDefault = """ -/* scss */ - -@import url(http://fonts.googleapis.com/css?family=Lobster|Raleway); - -body { - font-family: "Raleway"; - background: #656892; - color: #ffffff; -} - -.bubble { - width: 250px; - background-color: rgba(30,30,30,0.75); - border-radius: 12px; - padding: 12px; - box-shadow: 0 0 6px #000000; - h4 { - font-family: "Lobster"; - text-align: center; - } - - a.next { - font-family: "Lobster"; - display: block; - text-align: right; - cursor: pointer; - } -} - -.editor-demos { - padding-left: 20px; - p { - max-width: 600px; - } - h1,h2 { - font-family: "Lobster"; - text-shadow: 3px 6px #333333; - font-weight: 400; - } - h1 { - font-size: 88px; - } - h2 { - font-size: 48px; - cursor: pointer; - text-shadow: 2px 4px #333333; - } -} -""" diff --git a/lib/assets/javascripts/demos/layout_selector.coffee b/lib/assets/javascripts/demos/layout_selector.coffee deleted file mode 100644 index 54b7990..0000000 --- a/lib/assets/javascripts/demos/layout_selector.coffee +++ /dev/null @@ -1,19 +0,0 @@ -window.LayoutSelector = Backbone.View.extend - id: "layout-selector" - tagName: "ul" - - events: - "click .opt1": ()-> - $('.editor-container').attr('data-layout','one') - - "click .opt2": ()-> - $('.editor-container').attr('data-layout','two') - - "click .opt3": ()-> - $('.editor-container').attr('data-layout','three') - - render: ()-> - for n in [1,2,3] - @$el.append "
  • #{n}
  • " - - @ \ No newline at end of file diff --git a/lib/assets/javascripts/demos/tour.coffee b/lib/assets/javascripts/demos/tour.coffee deleted file mode 100644 index 5689ca3..0000000 --- a/lib/assets/javascripts/demos/tour.coffee +++ /dev/null @@ -1,70 +0,0 @@ -CodeSync.tour = - step: 0 - -make = (tagName, attributes, content)-> - el = document.createElement(tagName); - if (attributes) - Backbone.$(el).attr(attributes) - if (content != null) - Backbone.$(el).html(content) - - el - -showBubble = (content,position={})-> - positionStyle = "position: absolute;" - - for k,v of position when v? - v = "#{ v }px" unless "#{ v }".match(/px/) - positionStyle += "#{ k }:#{ v };" - - bubble = make("div",{class:"bubble",style:positionStyle}, content) - - $(".next", bubble).on "click", ()-> - $('body .bubble').addClass('animated bounceOutRight') - CodeSync.startTour(next: true) - - $('body').append(bubble) - - $(bubble) - -CodeSync.enableTour = ()-> - $('.tour-button').off "click" - $('.tour-button').on "click", ()-> - $(@).addClass("animated fadeOut") - CodeSync.startTour(restart:true) - -CodeSync.startTour = (options={})-> - if $('.codesync-tour-content').length is 0 - $('body').append JST["demos/tour"]() - - if options.restart is true - CodeSync.tour.step = 0 - - if options.next is true - CodeSync.tour.step = CodeSync.tour.step + 1 - - nextStep = CodeSync.tour.step - tourData = $(".codesync-tour-content .content[data-tour-step=#{ nextStep }]") - - if tourData.length > 0 - bubbleContent = tourData[0].outerHTML - - orientation = tourData.data('position') || "below" - transition = if orientation is "below" then "bounceInDown" else "bounceInUp" - target = tourData.data('target') - - if $(target).length > 0 - currentPos = $(target).position() - if orientation is "below" - top = currentPos.top + $(target).height() + 25 - left = currentPos.left + 80 - else - bottom = "120px" - right = "15px" - else - top = "600px" - left = "600px" - - bubbleElement = showBubble(bubbleContent,{top,left,bottom,right}) - - bubbleElement.addClass("animated #{ transition }") diff --git a/lib/assets/javascripts/demos/tour.jst.skim b/lib/assets/javascripts/demos/tour.jst.skim deleted file mode 100644 index 16cb0fd..0000000 --- a/lib/assets/javascripts/demos/tour.jst.skim +++ /dev/null @@ -1,29 +0,0 @@ -.codesync-tour-content style="display: none" - .content data-tour-step="0" data-target="[data-codesync='panel-1']" - h4 SCSS Editor - p - | This is a SCSS editor. It allows you to use SCSS or SASS to write some CSS to style the contents of the page. - - a.next Next - - - .content data-tour-step="1" data-target="[data-codesync='panel-2']" - h4 Skim Editor - p - | This is a Skim template editor. A CodeSync.onScriptChange hook is wired up so that whenever it changes, the contents will be rendered in the canvas below. - - a.next Next - - .content data-tour-step="2" data-target="[data-codesync='panel-3']" - h4 Coffeescript Editor - p - | This is a Coffeescript editor. The contents of your code will be evaluated and ran as you type. - - a.next Next - - .content data-tour-step="3" data-target="#layout-selector" data-position="above" - h4 Layout Selector - p - | This little widget will control the layout of the editors on this page. - - a.next Cool Homie. \ No newline at end of file diff --git a/lib/assets/stylesheets b/lib/assets/stylesheets new file mode 120000 index 0000000..8127ba9 --- /dev/null +++ b/lib/assets/stylesheets @@ -0,0 +1 @@ +../../site/source/stylesheets \ No newline at end of file diff --git a/lib/assets/stylesheets/canvas.css.scss b/lib/assets/stylesheets/canvas.css.scss deleted file mode 100644 index 58f16e0..0000000 --- a/lib/assets/stylesheets/canvas.css.scss +++ /dev/null @@ -1,101 +0,0 @@ -$dark: #333333; - -html, body { - height: 100%; -} - -body[data-canvas-application] { - overflow: hidden; -} - -.layer-controller { - position: relative; - width: 100%; - height: 100%; - z-index: 1; - - .layer { - position: absolute; - top: 0px; - right: 0px; - left: 0px; - bottom: 0px; - width: 100%; - height: 100%; - } -} - - -#underneath { - background: #333; - background: linear-gradient(135deg, #333333, #000000); -} - -.top.layer[data-draggable-direction="horizontal"] { - box-shadow: -4px 0px 6px rgba(0,0,0,0.9); -} - -.top.layer[data-draggable-direction="vertical"] { - box-shadow: 0px -4px 6px rgba(0,0,0,0.9); -} - -#canvas { - background: #fff; - - .handle { - position: absolute; - background: #333; - margin: 0px; - padding: 0px; - cursor: pointer; - } - - .handle.vertical-handle { - top: 0px; - left: 50%; - height: 15px; - width: 45px; - border-radius: 0px 0px 4px 4px; - box-shadow: 0 0 6px $dark; - } - - .handle.horizontal-handle { - top: 50%; - left: 0%; - height: 45px; - width: 15px; - border-radius: 0px 4px 4px 0px; - box-shadow: 0 0 6px $dark; - } -} - -#front-end-editors-wrapper { - width: 100%; - clear: both; - .panel { - width: 33.33333%; - float: left; - margin: 0px; - padding: 0px; - } - - .codesync-editor { - position: relative; - .toolbar-wrapper { - position: absolute; - top: 0px; - height: 30px; - width: 100%; - - .button,label,.config-select { - padding: 4px 0px; - margin-right: 5px; - } - } - .codesync-asset-editor { - position: absolute; - top: 30px; - width: 100%; - } - } -} \ No newline at end of file diff --git a/lib/assets/stylesheets/code_sync.css.scss b/lib/assets/stylesheets/code_sync.css.scss deleted file mode 100644 index 8c4d03b..0000000 --- a/lib/assets/stylesheets/code_sync.css.scss +++ /dev/null @@ -1,4 +0,0 @@ -/* - *= require_tree ./vendor - *= require ./code_sync/index -*/ \ No newline at end of file diff --git a/lib/assets/stylesheets/code_sync/console.css b/lib/assets/stylesheets/code_sync/console.css deleted file mode 100644 index 0625247..0000000 --- a/lib/assets/stylesheets/code_sync/console.css +++ /dev/null @@ -1,86 +0,0 @@ -#rack-webconsole { - opacity: 0.9; - z-index: 999; - background: #000; - color: #DDD; - font-family: monospace; - height: 40%; - position: fixed; - width: 100%; - bottom: 0px; - left: 0px; - right:0px; - outline-top: 3px solid #DEDEDE; - box-shadow: 0px -4px 5px rgba(0,0,0,0.5); - -moz-box-shadow: 0px -4px 5px rgba(0,0,0,0.5); - -webkit-box-shadow: 0px -4px 5px rgba(0,0,0,0.5); - font-size: 11px; -} -#rack-webconsole div.query{ - margin-top: 10px; - font-weight: bold; - padding-top: 10px; - border-top: 1px dashed #333; - margin-bottom: 5px; -} -#rack-webconsole div.query_multiline{ - font-weight: bold; - margin-bottom: 5px; -} -#rack-webconsole div.query:first-child{ - margin-top: 0px; - padding-top: 0px; - border-top: none; -} -#rack-webconsole div.result{ - font-weight: normal; -} -#rack-webconsole form div, #console form span { - font-size: 14px; - border: 0px; - font-family: monospace; - color: #FFF; -} -#rack-webconsole form div.results_wrapper{ - width: 100%; - position: absolute; - overflow-x: auto; - top: 0; - bottom: 40px; -} -#rack-webconsole form div.results{ - padding: 10px; -} -#rack-webconsole .prompt{ - width: 30px; - text-align: center; - display: block; - float: left; - height: 25px; - line-height: 25px; -} -#rack-webconsole form div.input{ - width: 100%; - position: absolute; - bottom: 0px; - background: #000; -} -#rack-webconsole form div.input input{ - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; - width: 100%; - font-size: 14px; - background: transparent; - border: 0px; - font-family: monospace; - color: #FFF; -} -#rack-webconsole .input .input_box{ - margin-left: 30px; - margin-right: 10px; - display: block; -} diff --git a/lib/assets/stylesheets/code_sync/editor/asset-name-input.css.scss b/lib/assets/stylesheets/code_sync/editor/asset-name-input.css.scss deleted file mode 100644 index 634ad4d..0000000 --- a/lib/assets/stylesheets/code_sync/editor/asset-name-input.css.scss +++ /dev/null @@ -1,12 +0,0 @@ -.codesync-editor { - .asset-name-input { - input { - width: 100%; - } - position: absolute; - width: 420px; - bottom: 20px; - right: 240px; - z-index: 4000; - } -} \ No newline at end of file diff --git a/lib/assets/stylesheets/code_sync/editor/asset-selector.css.scss b/lib/assets/stylesheets/code_sync/editor/asset-selector.css.scss deleted file mode 100644 index 076b4a0..0000000 --- a/lib/assets/stylesheets/code_sync/editor/asset-selector.css.scss +++ /dev/null @@ -1,58 +0,0 @@ -.codesync-editor { - .codesync-asset-selector { - display: none; - position: relative; - width: 700px; - z-index: 100; - background: rgba(0,0,0,0); - border: 0px; - top: 40px; - left: 50%; - margin-left: -350px; - - .search-results-wrapper { - position: absolute; - height: 0px; - top: 30px; - left: 18px; - background-color: rgba(255,255,255,0.19); - border-radius: 0px 0px 4px 4px; - width:95%; - z-index: 1; - color: rgba(255,255,255,1); - - max-height: 200px; - overflow: hidden; - padding-top: 8px; - - .search-results { - padding-top: 24px; - } - - .search-result { - position: relative; - padding: 8px; - cursor:pointer; - border-bottom: 1px solid rgba(255,255,255,0.2); - height: 20px; - &.active { - background-color: rgba(200,200,30,0.4); - } - } - } - - input { - position: absolute; - margin: 0px; - height: 28px; - z-index: 200; - background: rgba(95,95,95,1); - border: 0px; - width: 100%; - color: #fff; - font-size: 18px; - line-height: 24px; - box-shadow: 2px 2px 4px rgba(255,255,255,0.2); - } - } -} \ No newline at end of file diff --git a/lib/assets/stylesheets/code_sync/editor/codesync-color-picker.css.sass b/lib/assets/stylesheets/code_sync/editor/codesync-color-picker.css.sass deleted file mode 100644 index 5639869..0000000 --- a/lib/assets/stylesheets/code_sync/editor/codesync-color-picker.css.sass +++ /dev/null @@ -1,5 +0,0 @@ -.codesync-color-picker - position: absolute - top: 15px - right: 15px - border-radius: 4px \ No newline at end of file diff --git a/lib/assets/stylesheets/code_sync/editor/element-sync.css.scss b/lib/assets/stylesheets/code_sync/editor/element-sync.css.scss deleted file mode 100644 index 8f23119..0000000 --- a/lib/assets/stylesheets/code_sync/editor/element-sync.css.scss +++ /dev/null @@ -1,72 +0,0 @@ -$white: rgba(225,225,225,0.5); - -.codesync-editor { - .codesync-element-sync { - position: absolute; - z-index: 9000; - top: 35px; - right: 15px; - padding: 4px 8px; - width: 400px; - background: none; - input { - width: 95%; - border-radius: 3px; - padding: 4px 8px; - background: none; - color: opacify($white,1); - border: 1px solid $white; - } - select { - margin-top: 4px; - float: right; - width: 60%; - } - .row { - padding: 0px; - margin: 0px; - } - .span9 { - width: 66.666%; - float: left; - margin: 0px; - padding:0px; - } - - .span3 { - width: 33.3333%; - float: left; - margin: 0px; - padding:0px; - } - - .element-sync-status { - color: opacify($white,0.8); - font-size: 14px; - float: left; - width: 50%; - line-height: 20px; - padding-top: 10px; - } - - .done-button, .hide-button { - margin-top: 8px; - float: left; - font-size: 14px; - line-height: 20px; - width: 25%; - } - } -} - -.codesync-editor[data-theme='xq-light'] { - .codesync-element-sync { - - } -} - -.codesync-editor.bottom-positioned, .codesync-editor.static-positioned { - .codesync-element-sync { - top: 75px; - } -} \ No newline at end of file diff --git a/lib/assets/stylesheets/code_sync/editor/preferences-panel.css.scss b/lib/assets/stylesheets/code_sync/editor/preferences-panel.css.scss deleted file mode 100644 index 7a6c524..0000000 --- a/lib/assets/stylesheets/code_sync/editor/preferences-panel.css.scss +++ /dev/null @@ -1,26 +0,0 @@ -.codesync-editor { - .preferences-panel { - margin-bottom: 4px; - margin-right: 4px; - background: rgba(255,255,255,0.2); - padding: 8px; - box-shadow: 0 0 6px rgba(255,255,255,0.2); - border-radius: 3px; - position: absolute; - z-index: 4000; - bottom: 55px; - right: 10px; - - label { - color: #fff; - text-decoration: underline; - display: block - } - } -} - -.codesync-editor[data-theme='xq-light'] { - .preferences-panel { - background: rgba(30,30,30,0.9); - } -} \ No newline at end of file diff --git a/lib/assets/stylesheets/demos.css.scss b/lib/assets/stylesheets/demos.css.scss deleted file mode 100644 index a795c64..0000000 --- a/lib/assets/stylesheets/demos.css.scss +++ /dev/null @@ -1,96 +0,0 @@ -.demos-page { - .canvas-container { - position: absolute; - top: 375px; - left: 0px; - width: 100%; - } - .editor-container { - clear: both; - position: absolute; - top: 0px; - left: 0px; - width: 100%; - margin: 0px; - padding: 0px; - height: 375px; - .codesync-editor { - position: absolute; - .CodeMirror { - font-size: 12px; - line-height: 21px; - } - } - } -} - -#layout-selector { - position: fixed; - top: auto; - bottom: 25px; - right: 25px; - z-index: 15000; - background-color: #333; - border-radius: 3px; - box-shadow: 0 0 6px #000; - margin: 0px; - padding: 0px; - li { - margin: 0px; - display: inline; - cursor: pointer; - color: #fff; - border-right: 1px solid; - padding: 4px 12px; - &:last-child { - border-right: 0px; - } - } -} - -#layout-selector li { - cursor: pointer -} - -.editor-container[data-layout="one"] { - opacity: 1.0; - .codesync-editor[data-codesync="panel-1"] { - width: 100%; - left: 0%; - } - .codesync-editor[data-codesync="panel-2"] { - display: none; - } - .codesync-editor[data-codesync="panel-3"] { - display: none; - } -} - -.editor-container[data-layout="two"] { - .codesync-editor[data-codesync="panel-1"] { - left: 0px; - width: 50%; - } - .codesync-editor[data-codesync="panel-2"] { - display: none; - } - .codesync-editor[data-codesync="panel-3"] { - width: 50% !important; - left: 50%; - } -} - -.editor-container[data-layout="three"] { - .codesync-editor[data-codesync="panel-1"] { - width: 33.333333%; - left: 0px; - } - .codesync-editor[data-codesync="panel-2"] { - width: 33.333333%; - left: 33.33333%; - } - .codesync-editor[data-codesync="panel-3"] { - width: 33.333333%; - left: 66.66666%; - } -} \ No newline at end of file diff --git a/lib/assets/stylesheets/marketing.css.sass b/lib/assets/stylesheets/marketing.css.sass deleted file mode 100644 index 7a347e0..0000000 --- a/lib/assets/stylesheets/marketing.css.sass +++ /dev/null @@ -1,46 +0,0 @@ -//= require_self -//= require_tree ./marketing - -$baseFontSize: 16px -$baseLineHeight: $baseFontSize * 1.65 -$color: #333 -$backgroundColor: lighten($color,45) - -body - font-family: "Helvetica Neue", "Helvetica", Arial, sans-serif - line-height: $baseLineHeight - font-size: $baseFontSize - margin: 0px - padding: 0px - -.wrapper - width: 960px - margin: 40px auto - background: #FFF - border-radius: 3px - box-shadow: 0 0 6px rgba(0,0,0,0.9) - padding: 20px 20px 40px 20px - - p - line-height: $baseLineHeight - margin-bottom: $baseLineHeight * 0.5 - - ul.links - margin: 0px - padding: 0px - margin-bottom: $baseLineHeight * 0.5 - li - display: inline - margin-right: 12px - list-style-type: none - - .codehilite - pre - padding: 10px - border-radius: 8px - max-width: 940px - overflow: scroll - - section - p, ul - width: 80% diff --git a/lib/assets/stylesheets/marketing/syntax.css.scss b/lib/assets/stylesheets/marketing/syntax.css.scss deleted file mode 100644 index 3fbbbfb..0000000 --- a/lib/assets/stylesheets/marketing/syntax.css.scss +++ /dev/null @@ -1 +0,0 @@ -.codehilite code,.codehilite pre{color:#fdce93;background-color:#3f3f3f}.codehilite .hll{background-color:#222}.codehilite .c{color:#7f9f7f}.codehilite .err{color:#e37170;background-color:#3d3535}.codehilite .g{color:#7f9f7f}.codehilite .k{color:#f0dfaf}.codehilite .l{color:#ccc}.codehilite .n{color:#dcdccc}.codehilite .o{color:#f0efd0}.codehilite .x{color:#ccc}.codehilite .p{color:#41706f}.codehilite .cm{color:#7f9f7f}.codehilite .cp{color:#7f9f7f}.codehilite .c1{color:#7f9f7f}.codehilite .cs{color:#cd0000;font-weight:bold}.codehilite .gd{color:#cd0000}.codehilite .ge{color:#ccc;font-style:italic}.codehilite .gr{color:red}.codehilite .gh{color:#dcdccc;font-weight:bold}.codehilite .gi{color:#00cd00}.codehilite .go{color:gray}.codehilite .gp{color:#dcdccc;font-weight:bold}.codehilite .gs{color:#ccc;font-weight:bold}.codehilite .gu{color:purple;font-weight:bold}.codehilite .gt{color:#0040D0}.codehilite .kc{color:#dca3a3}.codehilite .kd{color:#ffff86}.codehilite .kn{color:#dfaf8f;font-weight:bold}.codehilite .kp{color:#cdcf99}.codehilite .kr{color:#cdcd00}.codehilite .kt{color:#00cd00}.codehilite .ld{color:#cc9393}.codehilite .m{color:#8cd0d3}.codehilite .s{color:#cc9393}.codehilite .na{color:#9ac39f}.codehilite .nb{color:#efef8f}.codehilite .nc{color:#efef8f}.codehilite .no{color:#ccc}.codehilite .nd{color:#ccc}.codehilite .ni{color:#c28182}.codehilite .ne{color:#c3bf9f;font-weight:bold}.codehilite .nf{color:#efef8f}.codehilite .nl{color:#ccc}.codehilite .nn{color:#8fbede}.codehilite .nx{color:#ccc}.codehilite .py{color:#ccc}.codehilite .nt{color:#9ac39f}.codehilite .nv{color:#dcdccc}.codehilite .ow{color:#f0efd0}.codehilite .w{color:#ccc}.codehilite .mf{color:#8cd0d3}.codehilite .mh{color:#8cd0d3}.codehilite .mi{color:#8cd0d3}.codehilite .mo{color:#8cd0d3}.codehilite .sb{color:#cc9393}.codehilite .sc{color:#cc9393}.codehilite .sd{color:#cc9393}.codehilite .s2{color:#cc9393}.codehilite .se{color:#cc9393}.codehilite .sh{color:#cc9393}.codehilite .si{color:#cc9393}.codehilite .sx{color:#cc9393}.codehilite .sr{color:#cc9393}.codehilite .s1{color:#cc9393}.codehilite .ss{color:#cc9393}.codehilite .bp{color:#efef8f}.codehilite .vc{color:#efef8f}.codehilite .vg{color:#dcdccc}.codehilite .vi{color:#ffffc7}.codehilite .il{color:#8cd0d3} \ No newline at end of file diff --git a/lib/code_sync.rb b/lib/code_sync.rb index 1d8bc7d..733c1db 100644 --- a/lib/code_sync.rb +++ b/lib/code_sync.rb @@ -4,19 +4,18 @@ module CodeSync require 'code_sync/version' require 'code_sync/manager' require 'code_sync/processors' + require 'middleman_extension' if defined?(Middleman) + require "code_sync/rails" if defined?(::Rails) - if defined?(Middleman) - require 'middleman_extension' - end + mattr_accessor :watch_assets_filter - if defined?(::Rails) - require "code_sync/rails" + def self.watch_assets_filter + @@watch_assets_filter ||= /(\.coffee|\.css|\.jst|\.mustache\.js|\.sass|\.emblem|\.hbs|\.handlebars)/ end def self.gem_assets_root File.join(File.dirname(__FILE__), '..') end - end # When using outside of Rails. @@ -38,4 +37,4 @@ def test? class Engine end end -end \ No newline at end of file +end diff --git a/lib/code_sync/manager.rb b/lib/code_sync/manager.rb index fcdb1dc..b42a609 100644 --- a/lib/code_sync/manager.rb +++ b/lib/code_sync/manager.rb @@ -28,7 +28,6 @@ def self.start options={} rescue puts "Error Manager. #{ $! }" ensure - puts "Clesning up finally" cleanup_stale_processes end end @@ -98,8 +97,6 @@ def exit_gracefully puts "#{ process_map.inspect }" process_map.each do |process_name,pid| - puts "Killing #{ process_name } #{pid}" - Process.kill(9,pid) end end @@ -111,7 +108,6 @@ def initialize options={} create_server() unless options[:disable_watcher] - puts "Listening for changes on the filesystem" listen_for_changes_on_the_filesystem do |changed_assets| changed_assets.each do |asset| notify_clients_of_change_to(asset) @@ -119,12 +115,12 @@ def initialize options={} end end - unless options[:enable_listener] + if options[:enable_listener] listen_for_changes_from_clients do |changed_assets| end end - unless options[:disable_internal_watch] + if options[:enable_internal_watch] listen_for_changes_to_code_sync() end end @@ -166,21 +162,30 @@ def listen_for_changes_from_clients &handler def listen_for_changes_to_code_sync &handler manage_child_process("internal") do - internal.start + internal.respond_to?(:start!) ? internal.start! : internal.start end end def listen_for_changes_on_the_filesystem &handler manage_child_process("watcher") do watcher.change do |modified,added,removed| - begin - handler.call process_changes_to(modified+added) + + processed = begin + process_changes_to(modified+added) rescue - puts "Error handling changes: #{ $! }" + puts "Error Processing Changes: #{ $! }" + nil end + + handler.call(processed) if processed end - watcher.start + # the listen gem api changed + if watcher.respond_to?(:start!) + watcher.start! + else + watcher.start + end end end @@ -194,7 +199,7 @@ def process_changes_to assets end def root - base = options[:root] || options[:assets_directory] || Dir.pwd() + options[:root] || options[:assets_directory] || Dir.pwd() end def internal @@ -212,7 +217,6 @@ def internal end def restart_everything! - end def watcher @@ -221,18 +225,12 @@ def watcher end @watcher ||= Listen.to(root) - .filter(assets_filter) + .filter(CodeSync.watch_assets_filter) .latency(1) end - # TODO - # Provide for configurability - def assets_filter - /(\.coffee|\.css|\.jst|\.mustache\.js|\.sass)/ - end - def method_missing meth, *args, &block puts "Need to implement #{ meth }" end end -end \ No newline at end of file +end diff --git a/lib/code_sync/processors.rb b/lib/code_sync/processors.rb index d67aa72..69a4e62 100644 --- a/lib/code_sync/processors.rb +++ b/lib/code_sync/processors.rb @@ -3,6 +3,8 @@ module CodeSync module Processors Map = { + ".hamlc" => CodeSync::Processors::JstProcessor, + ".jst.hamlc" => CodeSync::Processors::JstProcessor, ".jst.skim" => CodeSync::Processors::JstProcessor } end diff --git a/lib/assets/javascripts/code_sync/editor/advanced.coffee b/lib/code_sync/processors/haml_processor.rb similarity index 100% rename from lib/assets/javascripts/code_sync/editor/advanced.coffee rename to lib/code_sync/processors/haml_processor.rb diff --git a/lib/code_sync/processors/jst_processor.rb b/lib/code_sync/processors/jst_processor.rb index 01c3253..4ade4a3 100644 --- a/lib/code_sync/processors/jst_processor.rb +++ b/lib/code_sync/processors/jst_processor.rb @@ -4,7 +4,7 @@ module CodeSync module Processors class JstProcessor def self.process contents,filename="adhoc",extension=".jst" - contents.match(/this.JST\[(.*)\]/) do |match| + contents.match(/\w+.JST\[(.*)\]/) do |match| if match[1] contents[match[1]] = "\"#{filename}\"" end diff --git a/lib/code_sync/pry_console.rb b/lib/code_sync/pry_console.rb index 91f861e..5604362 100644 --- a/lib/code_sync/pry_console.rb +++ b/lib/code_sync/pry_console.rb @@ -1,8 +1,6 @@ require 'multi_json' require 'pry' -puts "Defining Pry Session Server" - # Thanks to the rack-webconsole-pry project # for showing me the way to handle this module CodeSync diff --git a/lib/code_sync/rails/engine.rb b/lib/code_sync/rails/engine.rb index 1686759..a75f740 100644 --- a/lib/code_sync/rails/engine.rb +++ b/lib/code_sync/rails/engine.rb @@ -5,8 +5,11 @@ class Engine < ::Rails::Engine forbid_saving = (app.config.forbid_code_sync_save) rescue false if enabled && !$rails_rake_task - CodeSync::Manager.start(sprockets: app.assets, forked: true, forbid_saving: !!forbid_saving) + CodeSync::Manager.start(sprockets: app.assets, + forked: true, + root: ::Rails.root.join('app','assets'), + forbid_saving: !!forbid_saving) end end end -end \ No newline at end of file +end diff --git a/lib/code_sync/sprockets_adapter.rb b/lib/code_sync/sprockets_adapter.rb index 1cd3790..b679593 100644 --- a/lib/code_sync/sprockets_adapter.rb +++ b/lib/code_sync/sprockets_adapter.rb @@ -60,22 +60,48 @@ def initialize sprockets, options=nil end def process_changes_to assets=[] - results = Array(assets).map do |path| - asset = env.find_asset(path) - asset && notification = { - asset_path: path, - digest_path:asset.digest_path, - name:asset.logical_path, - source: (asset.to_s rescue nil), - path: path, - content: IO.read(path) - } + if !asset + path = path.split("/").slice(1,25).join("/") + asset = env.find_asset(path) + end + + if !asset + puts "Could not process changes to #{ assets } -- unable to find sprockets asset" + end + + if asset + logical_name = asset.logical_path + basename = File.basename(asset.pathname.to_s) + extension = basename.split('.').slice(1,100).join(".") + + type = "script" if asset.content_type.match(/javascript/) + + type = "template" if ['.jst.skim','.jst','.hamlc','.mustache'].any? do |needle| + !basename[needle].nil? + end + + type = "stylesheet" unless type.present? + + codesync_document_attributes = { + path: path, + extension: "." + extension, + name: basename, + logical_name: logical_name, + compiled: (asset.to_s rescue nil), + content: IO.read(asset.pathname.to_s), + template: type == "template", + type: type + + } + end + + codesync_document_attributes end - Array(results) + Array(results.compact) end def compile content, options={} @@ -87,7 +113,7 @@ def create_asset content, options={} end def project_asset_directories - directories = env.paths.select {|path| path.include?(root) } + env.paths.select {|path| path.include?(root) } end def project_assets @@ -96,9 +122,25 @@ def project_assets end files.reject! {|path| path.match(/\.min\.js/) || path.match(/\-min\.js/) } - files.select! {|path| path.match(/\.jst|\.coffee|\.css|\.js/)} + files.select! {|path| path.match(/\.jst|\.mustache|\.skim|\.hamlc|\.less|\.scss|\.sass|\.coffee|\.css|\.js/)} + + files.map do |file| + asset = env.find_asset(file) + logical_path = asset && asset.logical_path + folder = if asset.content_type == "application/javascript" + "javascripts" + else + "stylesheets" + end - files + { + :path => file, + :name => File.basename(file), + :logical_path => logical_path, + :url => "#{ folder }/#{ logical_path }", + :relative_path => file.gsub(root,'.') + } + end end @@ -142,4 +184,4 @@ def append_asset_paths base_path=nil end end end -end \ No newline at end of file +end diff --git a/lib/code_sync/version.rb b/lib/code_sync/version.rb index 1b78145..2b92da9 100644 --- a/lib/code_sync/version.rb +++ b/lib/code_sync/version.rb @@ -1,3 +1,3 @@ module CodeSync - Version = "0.6.6" -end \ No newline at end of file + Version = "0.6.8" +end diff --git a/site/Gemfile b/site/Gemfile index 9fc892e..fb959e4 100644 --- a/site/Gemfile +++ b/site/Gemfile @@ -1,5 +1,4 @@ -# If you have OpenSSL installed, we recommend updating -# the following line to use "https" +# If you have OpenSSL installed, we recommend updating # the following line to use "https" source 'http://rubygems.org' gem "middleman", "~>3.0.13" @@ -10,4 +9,6 @@ gem "redcarpet" gem "slim" gem "skim" gem "sass" -gem "code_sync", path: File.join("..") \ No newline at end of file +gem "haml_coffee_assets" +gem "code_sync", path: File.join("..") +gem "font-awesome-rails" diff --git a/site/Gemfile.lock b/site/Gemfile.lock index fc8c37a..f3e295c 100644 --- a/site/Gemfile.lock +++ b/site/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - code_sync (0.6.5) + code_sync (0.6.8) faye listen pry @@ -16,10 +16,24 @@ PATH GEM remote: http://rubygems.org/ specs: + actionpack (3.2.13) + activemodel (= 3.2.13) + activesupport (= 3.2.13) + builder (~> 3.0.0) + erubis (~> 2.7.0) + journey (~> 1.0.4) + rack (~> 1.4.5) + rack-cache (~> 1.2) + rack-test (~> 0.6.1) + sprockets (~> 2.2.1) + activemodel (3.2.13) + activesupport (= 3.2.13) + builder (~> 3.0.0) activesupport (3.2.13) i18n (= 0.6.1) multi_json (~> 1.0) - addressable (2.3.4) + addressable (2.3.5) + builder (3.0.4) chunky_png (1.2.8) coderay (1.0.9) coffee-script (2.2.0) @@ -32,14 +46,15 @@ GEM sass (~> 3.1) cookiejar (0.3.0) daemons (1.1.9) - em-http-request (1.0.3) - addressable (>= 2.2.3) + em-http-request (1.1.0) + addressable (>= 2.3.4) cookiejar - em-socksify - eventmachine (>= 1.0.0.beta.4) - http_parser.rb (>= 0.5.3) - em-socksify (0.2.1) + em-socksify (>= 0.3) + eventmachine (>= 1.0.3) + http_parser.rb (>= 0.6.0.beta.2) + em-socksify (0.3.0) eventmachine (>= 1.0.0.beta.4) + erubis (2.7.0) eventmachine (1.0.3) execjs (1.4.0) multi_json (~> 1.0) @@ -50,28 +65,35 @@ GEM faye-websocket (>= 0.4.0) rack (>= 1.0.0) yajl-ruby (>= 1.0.0) - faye-websocket (0.6.1) + faye-websocket (0.6.2) eventmachine (>= 0.12.0) websocket-driver (>= 0.2.0) + font-awesome-rails (3.2.0.0) + railties (>= 3.2, < 5.0) fssm (0.2.10) - haml (4.0.2) + haml (4.0.3) tilt - hike (1.2.2) - http_parser.rb (0.5.3) + haml_coffee_assets (1.12.0) + coffee-script (>= 1.0.0) + sprockets (>= 2.0.3) + tilt (>= 1.3.3) + hike (1.2.3) + http_parser.rb (0.6.0.beta.2) http_router (0.10.2) rack (>= 1.0.0) url_mount (~> 0.2.1) i18n (0.6.1) + journey (1.0.4) json (1.8.0) listen (0.7.3) maruku (0.6.1) syntax (>= 1.0.0) method_source (0.8.1) - middleman (3.0.13) - middleman-core (= 3.0.13) - middleman-more (= 3.0.13) - middleman-sprockets (~> 3.0.8) - middleman-core (3.0.13) + middleman (3.0.14) + middleman-core (= 3.0.14) + middleman-more (= 3.0.14) + middleman-sprockets (~> 3.1.0) + middleman-core (3.0.14) activesupport (~> 3.2.6) bundler (~> 1.1) listen (~> 0.7.3) @@ -80,7 +102,7 @@ GEM rb-fsevent (~> 0.9.3) thor (~> 0.15.4) tilt (~> 1.3.6) - middleman-more (3.0.13) + middleman-more (3.0.14) coffee-script (~> 2.2.0) coffee-script-source (~> 1.3.3) compass (>= 0.12.2) @@ -88,18 +110,20 @@ GEM haml (>= 3.1.6) i18n (~> 0.6.0, < 0.6.2) maruku (~> 0.6.0) - middleman-core (= 3.0.13) + middleman-core (= 3.0.14) padrino-helpers (= 0.10.7) sass (>= 3.1.20) uglifier (~> 1.2.6) - middleman-sprockets (3.0.11) - middleman-more (>= 3.0.11) + middleman-sprockets (3.1.2) + middleman-core (>= 3.0.14) + middleman-more (>= 3.0.14) sprockets (~> 2.1) - sprockets-sass (~> 0.9.1) + sprockets-helpers (~> 1.0.0) + sprockets-sass (~> 1.0.0) middleman-syntax (1.1.1) middleman-core (~> 3.0) pygments.rb (~> 0.3) - multi_json (1.7.3) + multi_json (1.7.7) padrino-core (0.10.7) activesupport (~> 3.2.0) http_router (~> 0.10.2) @@ -118,8 +142,12 @@ GEM posix-spawn (~> 0.3.6) yajl-ruby (~> 1.1.0) rack (1.4.5) + rack-cache (1.2) + rack (>= 0.4) rack-protection (1.5.0) rack + rack-ssl (1.3.3) + rack rack-test (0.6.2) rack (>= 1.0) rack-webconsole-pry (0.1.9) @@ -127,9 +155,19 @@ GEM multi_json (>= 1.0.3) pry rack + railties (3.2.13) + actionpack (= 3.2.13) + activesupport (= 3.2.13) + rack-ssl (~> 1.3.2) + rake (>= 0.8.7) + rdoc (~> 3.4) + thor (>= 0.14.6, < 2.0) + rake (10.0.4) rb-fsevent (0.9.3) - redcarpet (2.2.2) - sass (3.2.8) + rdoc (3.12.2) + json (~> 1.4) + redcarpet (2.3.0) + sass (3.2.9) sinatra (1.3.6) rack (~> 1.4) rack-protection (~> 1.3) @@ -144,13 +182,15 @@ GEM slim (1.2.2) temple (~> 0.4.0) tilt (~> 1.3.3) - slop (3.4.5) - sprockets (2.9.3) + slop (3.4.6) + sprockets (2.2.2) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sprockets-sass (0.9.1) + sprockets-helpers (1.0.1) + sprockets (~> 2.0) + sprockets-sass (1.0.1) sprockets (~> 2.0) tilt (~> 1.1) syntax (1.0.0) @@ -166,7 +206,7 @@ GEM multi_json (~> 1.3) url_mount (0.2.1) rack - websocket-driver (0.2.0) + websocket-driver (0.2.1) yajl-ruby (1.1.0) PLATFORMS @@ -174,6 +214,8 @@ PLATFORMS DEPENDENCIES code_sync! + font-awesome-rails + haml_coffee_assets middleman (~> 3.0.13) middleman-sprockets middleman-syntax (= 1.1.1) diff --git a/site/config.rb b/site/config.rb index 0a9fb99..b5c6869 100644 --- a/site/config.rb +++ b/site/config.rb @@ -13,6 +13,8 @@ activate :directory_indexes +page "/canvas-content", :layout => "canvas-content" + configure :build do activate :minify_css activate :minify_javascript @@ -20,7 +22,7 @@ end after_build do - `cp build/javascripts/code_sync.min.js ../vendor/assets/javascripts` - `cp build/javascripts/code_sync_basic.min.js ../vendor/assets/javascripts` + `cp build/javascripts/code_sync.js ../vendor/assets/javascripts/code_sync.min.js` + `cp build/javascripts/code_sync/reloader.js ../vendor/assets/javascripts/code_sync_reloader.min.js` `cp build/stylesheets/code_sync.css ../vendor/assets/stylesheets` -end \ No newline at end of file +end diff --git a/site/source/canvas-content.html.slim b/site/source/canvas-content.html.slim new file mode 100644 index 0000000..8a6efec --- /dev/null +++ b/site/source/canvas-content.html.slim @@ -0,0 +1,3 @@ +javascript: + window.codeSyncClient = new CodeSync.Client() + window.Canvas = true diff --git a/site/source/canvas.html.slim b/site/source/canvas.html.slim index 4cfd6a7..f55de24 100644 --- a/site/source/canvas.html.slim +++ b/site/source/canvas.html.slim @@ -1,21 +1,20 @@ -#canvas-application.layer-controller +#canvas-application.layer-controller.codesync #underneath.bottom.layer - #front-end-editors-wrapper - #panel-1.panel - #panel-2.panel - #panel-3.panel - #backend-console-wrapper + #editor.panel + #console.panel #canvas.top.layer .handle.vertical-handle .handle.horizontal-handle #canvas-inner + .drag-shim + iframe.canvas-frame seamless=true src="/canvas-content" frameborder="0" style="" height="100%" width="100%" javascript: window.codeSyncClient = new CodeSync.Client() - content_for(:head) do - == stylesheet_link_tag 'vendor/animate', 'canvas' + == stylesheet_link_tag 'canvas' == javascript_include_tag 'canvas' diff --git a/site/source/codepen-style-demo.html.slim b/site/source/codepen-style-demo.html.slim deleted file mode 100644 index 26c5be8..0000000 --- a/site/source/codepen-style-demo.html.slim +++ /dev/null @@ -1,21 +0,0 @@ -javascript: - window.coffeescriptDefault = "CodeSync.onScriptChange ||= (changeObject)->\n" - coffeescriptDefault = coffeescriptDefault + ' if changeObject.mode is "skim" and changeObject.name is "codesync"' - coffeescriptDefault = coffeescriptDefault + "\n" + ' $(".canvas-container").html JST["codesync"]()' - -.demos-page - .editor-container data-layout="three" - .canvas-container - -- if development? - javascript: - window.codeSyncClient = new CodeSync.Client() - -javascript: - CodeSync.AssetEditor.setHotKey('ctrl+j', {position:"bottom"}) - -- content_for(:head) do - == stylesheet_link_tag 'demos', 'vendor/animate' - -== javascript_include_tag 'demos' - diff --git a/site/source/demo.html.slim b/site/source/demo.html.slim deleted file mode 100644 index 6cdeb8a..0000000 --- a/site/source/demo.html.slim +++ /dev/null @@ -1,30 +0,0 @@ - -javascript: - window.coffeescriptDefault = "CodeSync.onScriptChange ||= (changeObject)->\n" - coffeescriptDefault = coffeescriptDefault + ' if changeObject.mode is "skim" and changeObject.name is "codesync"' - coffeescriptDefault = coffeescriptDefault + "\n" + ' $(".canvas-container").html JST["codesync"]()' - -.demos-page - .editor-container data-layout="three" - .canvas-container - -- if development? - javascript: - window.codeSyncClient = new CodeSync.Client() - -javascript: - window.enableGlobalEditor = function(){ - CodeSync.AssetEditor.setHotKey('ctrl+j') - - window.codeSyncEditor = new CodeSync.AssetEditor({ - autoAppend: true, - renderHidden: true, - startMode: 'scss', - position: "bottom" - }) - } - -- content_for(:head) do - == stylesheet_link_tag 'demos', 'vendor/animate' - -== javascript_include_tag 'demos' diff --git a/site/source/editor-panel.html.slim b/site/source/editor-panel.html.slim new file mode 100644 index 0000000..5f00635 --- /dev/null +++ b/site/source/editor-panel.html.slim @@ -0,0 +1,26 @@ +== javascript_include_tag 'code_sync/embeddable' + +- content_for(:head) do + == stylesheet_link_tag 'code_sync/embeddable', 'code_sync/embeddable-utility' + +#editor-container style="" + +javascript: + var codesync = new CodeSync.Client(), + container = $('#editor-container') + + CodeSync.onTemplateChange = function(attributes,options){ + if(options.origin === "watcher") { + CodeSync.Embeddable.createIn(container, {empty: true}); + } + } + + CodeSync.onScriptChange = function(attributes,options){ + if(options.origin === "watcher") { + CodeSync.Embeddable.createIn(container, {empty: true}); + } + } + + $(function(){ + window.embeddable = CodeSync.Embeddable.createIn(container, {width: 960, height: 600, empty: true}); + }) \ No newline at end of file diff --git a/site/source/fonts/entypo.eot b/site/source/fonts/entypo.eot new file mode 100644 index 0000000..d9d7326 Binary files /dev/null and b/site/source/fonts/entypo.eot differ diff --git a/site/source/fonts/entypo.svg b/site/source/fonts/entypo.svg new file mode 100644 index 0000000..e1a95c3 --- /dev/null +++ b/site/source/fonts/entypo.svg @@ -0,0 +1,13 @@ + + + + + + + diff --git a/site/source/fonts/entypo.ttf b/site/source/fonts/entypo.ttf new file mode 100644 index 0000000..fc305d2 Binary files /dev/null and b/site/source/fonts/entypo.ttf differ diff --git a/site/source/fonts/entypo.woff b/site/source/fonts/entypo.woff new file mode 100644 index 0000000..e744a79 Binary files /dev/null and b/site/source/fonts/entypo.woff differ diff --git a/site/source/javascripts b/site/source/javascripts deleted file mode 120000 index 5c5220e..0000000 --- a/site/source/javascripts +++ /dev/null @@ -1 +0,0 @@ -../../lib/assets/javascripts \ No newline at end of file diff --git a/lib/assets/javascripts/code_sync.coffee b/site/source/javascripts/code_sync.coffee similarity index 70% rename from lib/assets/javascripts/code_sync.coffee rename to site/source/javascripts/code_sync.coffee index 0da56a0..21728ab 100644 --- a/lib/assets/javascripts/code_sync.coffee +++ b/site/source/javascripts/code_sync.coffee @@ -1,3 +1,3 @@ #= require ./code_sync/dependencies #= require ./code_sync/codemirror -#= require ./code_sync/index \ No newline at end of file +#= require ./code_sync/index diff --git a/lib/assets/javascripts/code_sync/backends/gist.coffee b/site/source/javascripts/code_sync/backends/gist.coffee similarity index 100% rename from lib/assets/javascripts/code_sync/backends/gist.coffee rename to site/source/javascripts/code_sync/backends/gist.coffee diff --git a/site/source/javascripts/code_sync/canvas/canvas_toolbar.coffee b/site/source/javascripts/code_sync/canvas/canvas_toolbar.coffee new file mode 100644 index 0000000..ff4b0d0 --- /dev/null +++ b/site/source/javascripts/code_sync/canvas/canvas_toolbar.coffee @@ -0,0 +1,70 @@ +CodeSync.toolbars ||= {} + +CodeSync.toolbars.CanvasToolbar = Backbone.View.extend + className: "codesync-canvas-toolbar" + + events: + "click .controls li[data-option]" : "adjustSetting" + "click a.toggle-stylesheet-loader" : "toggleStylesheetLoader" + "click a.toggle-script-loader" : "toggleScriptLoader" + "click .toggle-custom-layout" : "toggleCustomLayout" + "click .toggle-document-browser" : "toggleDocumentBrowser" + + initialize: (@options={})-> + _.extend(@, @options) + Backbone.View::initialize.apply(@, arguments) + + toggleStylesheetLoader: (e)-> + button = @$(e.target) + + @styleLoader ||= new CodeSync.plugins.StylesheetLoader + alignment: "bottom" + + checkAvailabilityInMode: -> + true + + getWindow: ()=> + @editorPanel?.getWindow() + + renderTo: ()=> + @editorPanel.$el + + @styleLoader.toggle(withEffect: true) + + toggleScriptLoader: (e)-> + button = @$(e.target) + + @scriptLoader ||= new CodeSync.plugins.ScriptLoader + alignment: "bottom" + + checkAvailabilityInMode: -> + true + + getWindow: ()=> + @editorPanel?.getWindow() + + renderTo: ()=> + @editorPanel.$el + + @scriptLoader.toggle(withEffect: true) + + toggleCustomLayout: ()-> + + toggleDocumentBrowser: ()-> + + adjustSetting: (e)-> + $target = @$(e.target).closest('li[data-option]') + siblings = $target.siblings('li[data-option]') + control = $target.parents('.controls').eq(0) + value = $target.data('option') + setting = control.data('setting') + + siblings.removeClass('active') + $target.addClass('active') + + @editorPanel.set(setting, value) + + render: ()-> + @$el.html CodeSync.template("canvas_toolbar") + @ + diff --git a/site/source/javascripts/code_sync/canvas/frame_control.coffee b/site/source/javascripts/code_sync/canvas/frame_control.coffee new file mode 100644 index 0000000..83b63b0 --- /dev/null +++ b/site/source/javascripts/code_sync/canvas/frame_control.coffee @@ -0,0 +1,58 @@ +CodeSync.FrameControl = Backbone.View.extend + events: + "click .back-button": "backButton" + "click .forward-button": "forwardButton" + "click .refresh-button": "forwardButton" + "click .toggle-control": "toggleControl" + "keypress .input-wrapper input": "handleInput" + + backButton: ()-> + @frame.contentWindow.history.back() + + forwardButton: ()-> + @frame.contentWindow.history.forward() + + refreshButton: ()-> + @frame.contentWindow.location.reload(true) + + toggleControl: ()-> + if @$('.menu').is(":visible") + @$('.menu').hide() + @$('.button').show() + else + @$('.menu').show() + @$('.button').hide() + + handleInput: (e)-> + url = @getUrlValue() + @setUrlValue(url, true) + + setUrlValue: (value, setLocation=false)-> + @$('.input-wrapper input').val(value) + @frame.contentWindow.location = value if value && setLocation + + getUrlValue: ()-> + @$('.input-wrapper input').val() + + getCanvasUrl: ()-> + location = @frame?.contentWindow.location + url = location.href.replace(location.origin, '') + [url,query] = url.split('?') + + url + + render: ()-> + html = CodeSync.template("url_control",url:"#{ @getCanvasUrl() }") + @$el.html(html) + + @ + + initialize: (options={})-> + @frame = options.frame + @existing = options.el + + throw "Must pass in a frame to the frame control" unless @frame + + @handleInput = _.debounce(@handleInput,500) + + Backbone.View::initialize.apply(@, arguments) diff --git a/site/source/javascripts/code_sync/canvas/index.coffee b/site/source/javascripts/code_sync/canvas/index.coffee new file mode 100644 index 0000000..cdef2d8 --- /dev/null +++ b/site/source/javascripts/code_sync/canvas/index.coffee @@ -0,0 +1,139 @@ +#= require_tree ./templates +#= require ./layer_controller +#= require ./frame_control +#= require ./canvas_toolbar + +#= require_self + +original = CodeSync.processChangeNotification + +CodeSync.Canvas = Backbone.View.extend + className: "codesync-canvas" + + target: "canvas" + + getFrameWindow: ()-> + @getFrame()?.contentWindow + + getFrame: ()-> + $('.canvas-frame')[0] + + refreshEditors: ()-> + @editorPanel.each (editor,index)-> + _.delay ()-> + editor.currentDocument.trigger "change:contents" + , 400 * (index + 1) + + refreshStyleEditor: ()-> + @getEditor("style_editor").currentDocument.trigger "change:contents" + + refreshScriptEditor: ()-> + @getEditor("script_editor").currentDocument.trigger "change:contents" + + refreshTemplateEditor: ()-> + @getEditor("template_editor").currentDocument.trigger "change:contents" + + getEditor:(name)-> + @editorPanel.assetEditors[name] + + routeEditorOutputToGlobal: ()-> + @editorPanel.targetWindow = window + + @editorPanel.each (editor)=> + editor.targetWindow = window + editor.views.elementSync.searchScope = window + editor.views.elementSync.setValue('') + + CodeSync.Document::changeProcessor = window.CodeSync.processChangeNotification + + routeEditorOutputToCanvas: ()-> + @getFrameWindow().name = "CanvasInner" + @getFrameWindow().$('body').attr('data-canvas-inner',true) + + frame = @getFrameWindow() + + @editorPanel.targetWindow = frame + + @editorPanel.each (editor)=> + editor.views.elementSync.searchScope = frame + editor.targetWindow = frame + + if @autoSyncWithElement? + editor.views.elementSync.setValue(@autoSyncWithElement) + + CodeSync.Document::changeProcessor = (a, b)=> + if @target is "app" + original(a,b) + + # If we're routing stuff to the canvas + # we also want to process script code globally + else if @target is "canvas" + if a.type is "script" + original(a,b) + + if a.type is "template" + original(a,b) + + # Now let the canvas process it + @getFrameWindow().CodeSync.processChangeNotification(a,b) + + routeEditorOutput: (@target)-> + if @target is "app" || @target is "global" + @routeEditorOutputToGlobal() + else if @target is "canvas" + @routeEditorOutputToCanvas() + + render: ()-> + @setElement($('#canvas')) + + @codeSyncCanvas = new CodeSync.LayerController(applyTo:"#canvas") + @frameControl = new CodeSync.FrameControl(frame: @getFrame()) + + @editorPanel.renderIn $(@editorContainer) + + $('#canvas-url-control').html @frameControl.render().el + + @ + + initialize: (@options={})-> + _.extend(@, @options) + + canvas = @ + + @editorPanel = new CodeSync.EditorPanel(toolbarClass:"CanvasToolbar") + + @editorPanel.set = (setting, value)-> + if setting is "target" + canvas.routeEditorOutput(value) + + CodeSync.EditorPanel::set.apply(@, arguments) + + @editorPanel.on "target:change", @routeEditorOutput, @ + + @on "editors:routed", @refreshEditors, @ + + @editorPanel.on "editors:loaded", ()-> + _.delay ()-> + canvas.routeEditorOutput(canvas.target) + _.defer ()-> canvas.trigger "editors:routed" + , 1000 + + Backbone.View::initialize.apply(@, arguments) + + +CodeSync.Canvas.startApplication ||= (force=false)-> + window.name = "CanvasApp" + + console.log "Restarting App" if force and App? + window.App = undefined if force and App? + + window.App ||= new CodeSync.Canvas(editorContainer:"#editor") + + console.log "Rendering", App.cid + App.render() + + $('body').attr('data-canvas-application',true) + $('#canvas').css('top','520px') + + +$(CodeSync.Canvas.startApplication) \ No newline at end of file diff --git a/lib/assets/javascripts/canvas/layer_controller.coffee b/site/source/javascripts/code_sync/canvas/layer_controller.coffee similarity index 66% rename from lib/assets/javascripts/canvas/layer_controller.coffee rename to site/source/javascripts/code_sync/canvas/layer_controller.coffee index b9e49c1..16cd9da 100644 --- a/lib/assets/javascripts/canvas/layer_controller.coffee +++ b/site/source/javascripts/code_sync/canvas/layer_controller.coffee @@ -2,6 +2,8 @@ CodeSync.LayerController = Backbone.View.extend events: "dblclick .horizontal-handle" : "snapBackLeft" "dblclick .vertical-handle" : "snapBackUp" + "click .horizontal-handle": "enableHorizontalDragging" + "click .vertical-handle": "enableVerticalDragging" initialize: (@options={})-> _.extend(@,@options) @@ -9,6 +11,10 @@ CodeSync.LayerController = Backbone.View.extend Backbone.View::initialize.apply(@, arguments) @setElement $(@applyTo) + + @enableVerticalDragging = _.debounce(@enableVerticalDragging, 25) + @enableHorizontalDragging = _.debounce(@enableHorizontalDragging, 25) + @render() render: ()-> @@ -17,23 +23,26 @@ CodeSync.LayerController = Backbone.View.extend snapBackLeft: ()-> @$el.animate('left':'0px') + @cancelDraggable() snapBackUp: ()-> @$el.animate('top':'0px') + @cancelDraggable() enableVerticalDragging: ()-> - @makeDraggable("vertical") + @makeDraggable("vertical") unless @direction is "vertical" enableHorizontalDragging: ()-> - @makeDraggable("horizontal") + @makeDraggable("horizontal") unless @direction is "horizontal" cancelDraggable: ()-> @direction = undefined - @$el.draggable('destroy') makeDraggable: (@direction="horizontal")-> @$el.attr('data-draggable-direction', @direction) + return unless @$el.draggable? + if @direction is "horizontal" @$el.draggable axis: "x" diff --git a/site/source/javascripts/code_sync/canvas/templates/canvas_toolbar.jst.skim b/site/source/javascripts/code_sync/canvas/templates/canvas_toolbar.jst.skim new file mode 100644 index 0000000..beb3a0f --- /dev/null +++ b/site/source/javascripts/code_sync/canvas/templates/canvas_toolbar.jst.skim @@ -0,0 +1,35 @@ +.fluid-row + .gspan6 + #canvas-url-control.controls + .gspan6 + .fluid-row + .gspan4 + #resource-loader.controls + ul + li.label + a.btn.toggle-document-browser + | Documents + li.label + a.btn.toggle-script-loader + | Scripts + li.label + a.btn.toggle-stylesheet-loader + | Stylesheets + .gspan4 + #layout-selector.controls data-setting="layout" data-value="3" + ul + li.label Layout + li data-option="1" + i.icon.icon-dot + li data-option="2" + i.icon.icon-two-dots + li.active data-option="3" + i.icon.icon-three-dots + li.toggle-custom-layout-selector + | Custom + .gspan4 + #target-selector.controls data-setting="target" data-value="canvas" + ul + li.label Scope + li data-option="app" Global + li.active data-option="canvas" Canvas diff --git a/site/source/javascripts/code_sync/canvas/templates/url_control.jst.skim b/site/source/javascripts/code_sync/canvas/templates/url_control.jst.skim new file mode 100644 index 0000000..9b965a8 --- /dev/null +++ b/site/source/javascripts/code_sync/canvas/templates/url_control.jst.skim @@ -0,0 +1,19 @@ +.url-control + .button + .controls + ul + li.toggle-control.label Canvas Control + + .menu style="display:none" + .controls + ul + li.back-button + i.icon.icon-left + li.forward-button + i.icon.icon-right + li.refresh-button + i.icon.icon-ccw + li.input-wrapper + input type="text" value="#{ @url }" placeholder="Enter a URL to view in the Canvas" + li.submit.toggle-control + | Hide \ No newline at end of file diff --git a/site/source/javascripts/code_sync/change-handling.coffee b/site/source/javascripts/code_sync/change-handling.coffee new file mode 100644 index 0000000..19275f3 --- /dev/null +++ b/site/source/javascripts/code_sync/change-handling.coffee @@ -0,0 +1,48 @@ +evalRunner = (code, onError) => + try + eval(code) + catch e + onError?(e.message) + throw(e) + +CodeSync.detectGlobalChangeTriggers = (type,attributes={})-> + # TODO + # If we detect changes to important files, respond accordingly. + # for example, if a variables.css change is detected, we'll need to + # load the whole shebang + true + +CodeSync.onScriptChange = CodeSync.onTemplateChange = CodeSync.onStyleChange = ()-> true + +CodeSync.processChangeNotification = (attributes={}, options={})-> + {type,compiled,content} = attributes + + return if CodeSync.beforeChange?(attributes,options) is false + + type ||= "template" if attributes.template is true + + unless type? + if attributes.logical_name?.match('.css') + type = "stylesheet" + if attributes.logical_name.match('.js') + type = "script" + + CodeSync.detectGlobalChangeTriggers(type, attributes) + + switch type + when "stylesheet" + $("head style[data-codesync-document='#{ options.origin }']").remove() + $("head").append "" + hookFn = CodeSync.onStyleChange + when "template" + evalRunner(compiled, attributes.error) + hookFn = CodeSync.onTemplateChange + when "script" + evalRunner(compiled, attributes.error) + hookFn = CodeSync.onScriptChange + + _.delay ()-> + hookFn?(attributes, options) + attributes.complete?(attributes, options) + attributes.success?(attributes, options) + , 150 diff --git a/site/source/javascripts/code_sync/client/index.coffee b/site/source/javascripts/code_sync/client/index.coffee new file mode 100644 index 0000000..b1948ba --- /dev/null +++ b/site/source/javascripts/code_sync/client/index.coffee @@ -0,0 +1,105 @@ +#= require_self +#= require ./util + +class CodeSync.Client + + @_clients: [] + + @get: ()-> + CodeSync.Client._clients[0] + + VERSION: CodeSync.VERSION + + logLevel: 0 + + enablePush: true + + constructor: (options={})-> + @logLevel = options.logLevel || 0 + + CodeSync.Client._clients.push(@) + + if @enablePush is true + @channel = options.channel || getClientChannel() + + @providerLib = "#{ CodeSync.get("socketEndpoint") }/client.js" + + CodeSync.util.loadScript @providerLib, ()=> + return if @clientLoaded is true || !@providerAvailable() + + setTimeout ()=> + try + @setupSocket() + catch e + console.log "Error setting up codesync client: #{ e.message }" + , 25 + + @clientLoaded = true + + @getSprocketsInfo() + + getSprocketsInfo: ()-> + $.ajax + type: "GET" + url: CodeSync.get("serverInfoEndpoint") + success: (response={})=> + CodeSync.set("latestServerInfo", response) + + if response.root + CodeSync.set("projectRoot", response.root) + + if response.project_assets? && CodeSync.ProjectAssets? + @projectAssets = new CodeSync.ProjectAssets(response.project_assets) + + buildStylesheetMap: ()-> + @stylesheetMap = {} + + for styleElement in $('link[rel="stylesheet"]') + if href = $(styleElement).attr('href') + @stylesheetMap[href] = styleElement + + buildScriptMap: ()-> + @scriptMap = {} + + for scriptElement in $('script[type="text/javascript"]') + if src = $(scriptElement).attr('src') + @scriptMap[src] = scriptElement + + @scriptMap + + providerAvailable: ()-> + Faye? + + subscribeWith: (cb)-> + @socket?.subscribe(@channel, cb) + + setupSocket: ()-> + if @socket = new Faye?.Client(CodeSync.get("socketEndpoint")) + @subscribeWith ()=> + @defaultNotificationHandler.apply(@, arguments) + + notificationHandlerOptions: {} + + defaultNotificationHandler: (notification)-> + if doc = @projectAssets?.findDocumentByPath(notification.path) + if notification.contents + doc.set("contents", notification.contents, silent: false) + doc.trigger "contents:synced" + + options = @notificationHandlerOptions + options.origin = "watcher" + + CodeSync.processChangeNotification(notification, options) + +# Allows for hijacking a page which includes the code sync client +# and overriding the notification channel. this allows for sandboxd +# iframes to still interact with the codesync editor components +# in certain apps +getClientChannel = (channel)-> + query = window.location.search.substring(1) + vars = query.split('&') + + for item in vars when item.match(/code_sync_channel/) + [param,channel] = item.split('=') unless channel? + + if channel then decodeURIComponent("/code-sync/#{ channel }") else "/code-sync/outbound" diff --git a/lib/assets/javascripts/code_sync/client/util.coffee b/site/source/javascripts/code_sync/client/util.coffee similarity index 50% rename from lib/assets/javascripts/code_sync/client/util.coffee rename to site/source/javascripts/code_sync/client/util.coffee index 3bd3e31..cb6ab72 100644 --- a/lib/assets/javascripts/code_sync/client/util.coffee +++ b/site/source/javascripts/code_sync/client/util.coffee @@ -1,9 +1,15 @@ CodeSync.util ||= {} -loadedScripts = {} -scriptTimers = {} +window.CodeSyncloadedScripts = {} +window.CodeSyncscriptTimers = {} CodeSync.util.loadStylesheet = (url, options={}, callback)-> + callback ||= options.complete || options.callback + + if typeof(options) is "function" and !callback? + callback = options + options = {} + ss = document.createElement("link") ss.type = "text/css" ss.rel = "stylesheet" @@ -16,11 +22,13 @@ CodeSync.util.loadStylesheet = (url, options={}, callback)-> document.getElementsByTagName("head")[0].appendChild(ss); - callback?.call?(@) + callback?.call?(@, url, options) CodeSync.util.loadScript = (url, options={}, callback) -> - loaded = loadedScripts - timers = scriptTimers + loaded = window.CodeSyncloadedScripts + timers = window.CodeSyncscriptTimers + + callback ||= options.complete || options.callback if typeof(options) is "function" and !callback? callback = options @@ -59,3 +67,44 @@ CodeSync.util.loadScript = (url, options={}, callback) -> onLoad() clearInterval(timers[url]) , 10 + +CodeSync.util.inspectElementsWithin = (options={})-> + {root,el,fn} = options + + root ||= window + + color = (e)-> + $target = $(e.target) + + $target.css 'background-color': '#9FC4E7', 'opacity': .5 + + $target.children().each (i, el)-> + $(el).css 'background-color': '#C2DDB6', 'opacity': .5 + + uncolor = (e)-> + $target = $(e.target) + $target.attr('style', '') + $target.children().each (i,el)-> $(el).attr('style', '') + + disable = ()-> + root.$('*').off(".inspekt") + el + + return disable() if options.disable + + + clickHandler = _.debounce (e)-> + uncolor(e) + root.$(el).trigger "inspekt", e, root.$(e.target) + disable() + , 150 + + elements = root.$(el).find('*') + + elements.off(".inspekt") + + elements.on("mouseover.inspekt", color).on("mouseout.inspekt", uncolor).on "click.inspekt", (e)-> + clickHandler(e) + elements.off(".inspekt") + + root.$(el) diff --git a/site/source/javascripts/code_sync/codemirror.coffee b/site/source/javascripts/code_sync/codemirror.coffee new file mode 100644 index 0000000..8d3186f --- /dev/null +++ b/site/source/javascripts/code_sync/codemirror.coffee @@ -0,0 +1,12 @@ +#= require ./vendor/vendored_codemirror +#= require ./vendor/codemirror-ruby +#= require ./vendor/codemirror-xml +#= require ./vendor/codemirror-htmlmixed +#= require ./vendor/codemirror-coffeescript +#= require ./vendor/codemirror-javascript +#= require ./vendor/codemirror-css +#= require ./vendor/codemirror-sass +#= require ./vendor/codemirror-skim +#= require ./vendor/codemirror-vim +#= require ./vendor/codemirror-haml +#= require ./vendor/codemirror-markdown diff --git a/lib/assets/javascripts/code_sync/config.js.coffee.erb b/site/source/javascripts/code_sync/config.js.coffee.erb similarity index 86% rename from lib/assets/javascripts/code_sync/config.js.coffee.erb rename to site/source/javascripts/code_sync/config.js.coffee.erb index ec70a37..031447d 100644 --- a/lib/assets/javascripts/code_sync/config.js.coffee.erb +++ b/site/source/javascripts/code_sync/config.js.coffee.erb @@ -1,9 +1,7 @@ root = @ -if typeof(exports) isnt "undefined" - CodeSync = exports -else - CodeSync = root.CodeSync = {} +root.CodeSync = CodeSync = ()-> + CodeSync.Client.get() CodeSync.VERSION = "<%= CodeSync::Version %>" @@ -20,6 +18,7 @@ CodeSync._config ||= socketEndpoint: "http://localhost:9295/faye" editorToggleHotkey: "ctrl+j" debugMode: false + defaultKeyBindings: "default" CodeSync.set = (setting, value)-> CodeSync._config[setting] = value @@ -36,3 +35,5 @@ CodeSync.log = (args...)-> console.log args... _originalSetOption = CodeMirror::setOption + +CodeSync.set("defaultKeyBindings", "vim") diff --git a/lib/assets/javascripts/code_sync/console/index.coffee b/site/source/javascripts/code_sync/console/index.coffee similarity index 100% rename from lib/assets/javascripts/code_sync/console/index.coffee rename to site/source/javascripts/code_sync/console/index.coffee diff --git a/lib/assets/javascripts/code_sync/console/templates/console.jst.skim b/site/source/javascripts/code_sync/console/templates/console.jst.skim similarity index 100% rename from lib/assets/javascripts/code_sync/console/templates/console.jst.skim rename to site/source/javascripts/code_sync/console/templates/console.jst.skim diff --git a/lib/assets/javascripts/code_sync/editor/datasources/document.coffee b/site/source/javascripts/code_sync/datasources/document.coffee similarity index 58% rename from lib/assets/javascripts/code_sync/editor/datasources/document.coffee rename to site/source/javascripts/code_sync/datasources/document.coffee index 0e7b47b..04ada34 100644 --- a/lib/assets/javascripts/code_sync/editor/datasources/document.coffee +++ b/site/source/javascripts/code_sync/datasources/document.coffee @@ -4,12 +4,8 @@ # - success CodeSync.Document = Backbone.Model.extend - callbackDelay: 150 initialize: (@attributes,options)-> - if localKey = @attributes.localStorageKey - @attributes.contents ||= localStorage.getItem(localKey) - Backbone.Model::initialize.apply(@, arguments) _.bindAll @, "onContentChange" @@ -23,25 +19,65 @@ CodeSync.Document = Backbone.Model.extend @on "change:mode", ()=> @set('extension', @determineExtension(), silent: true) + if @localStorageKey() + @set("contents", localStorage.getItem(@localStorageKey()), silent: true) + + @saveToLocalStorage = _.debounce(@saveToLocalStorage, 1000) + url: ()-> CodeSync.get("assetCompilationEndpoint") + templateFunction: ()-> + JST[@nameWithoutExtension()] + + folder: ()-> + unless folder = @get("folder") + if path = @get("path") + folder = path = path.replace(@nameWithExtension(), '') + + if projectRoot = CodeSync.get("projectRoot") + folder = path.replace(projectRoot,'') + else + folder = switch @type() + when "script", "template" + "javascripts" + else + "stylesheets" + + unless folder is "undefined" + @set("folder", folder, silent: true) + + folder + + description: ()-> + if path = @get("path") + return path.replace(CodeSync.get('projectRoot'), '') + + return "#{ @folder() }/#{ @nameWithExtension() }" + + newPath: ()-> + "#{ CodeSync.get('projectRoot') }/#{ @folder() }" + saveToDisk: ()-> if @isSaveable() @sendToServer(true, "saveToDisk") + localStorageKey: ()-> + "#{ @get('localStorageKey') }:#{ @get('name') }" if @get("localStorageKey") + saveToLocalStorage: (path)-> - if path? - localStorage.setItem(path, @get("contents")) + localKey = path || @get("path") + localStorage.setItem(localKey, @get("contents")) if localKey? loadSourceFromDisk: (callback)-> $.ajax url: "#{ @url() }?path=#{ @get('path') }" type: "GET" success: (response={})=> + silent = callback? if response.success is true and response.contents? - @set("contents", response.contents, silent: true) - callback(@) + @set("contents", response.contents, silent: silent) + callback?(@) toJSON: ()-> name: @nameWithoutExtension() @@ -49,6 +85,14 @@ CodeSync.Document = Backbone.Model.extend extension: @get('extension') || @determineExtension() contents: @toContent() + nameWithExtension: ()-> + name = @get("name") + + unless name.match(/\./) + name += @get("extension") + + name + nameWithoutExtension: ()-> extension = @get('extension') || @determineExtension() (@get("name") || "untitled").replace(extension,'') @@ -60,6 +104,26 @@ CodeSync.Document = Backbone.Model.extend toCodeMirrorMode: ()-> @toMode()?.get("codeMirrorMode") + toCompiledDocument: ()-> + if @compiledDocument? + @compiledDocument.set "contents", @get("compiled"), silent: true + return @compiledDocument + + switch @type() + when "template", "script" + compileMode = "javascript" + compiledExtension = ".js" + when "stylesheet" + compileMode = "css" + compiledExtension = ".css" + + @compiledDocument = new CodeSync.Document + doNotSave: true + raw: true + extension: compiledExtension + mode: compileMode + contents: @get("compiled") + toCodeMirrorDocument: ()-> CodeMirror.Doc @toContent(), @toCodeMirrorMode(), 0 @@ -67,22 +131,25 @@ CodeSync.Document = Backbone.Model.extend @toMode().get("codeMirrorOptions") toContent: ()-> - "#{ @get("contents") || @toMode()?.get("defaultContent") || " " }" + myContent = "#{ @get("contents") || @toMode()?.get("defaultContent") || " " }" + + if prefix = CodeSync.Document.getPrefixContentFor(@) + myContent = "#{ prefix }\n#{ myContent }"; - onContentChange: ()-> - localKey = @get("localStorageKey") - localKey = if localKey? && _.isFunction(localKey) then localKey.call(@) else localKey - localStorage.setItem(localKey, @get("contents")) + myContent - @sendToServer(false, "onContentChange") + onContentChange: (document, value, options={})-> + if key = @localStorageKey() + @saveToLocalStorage(key) + + if options.liveMode is true + @sendToServer(false, "onContentChange") sendToServer: (allowSaveToDisk=false, reason="")-> allowSaveToDisk = false unless @isSaveable() data = if allowSaveToDisk is true then @toJSON() else _(@toJSON()).pick('name','extension','contents') - CodeSync.log("Sending Data To #{ CodeSync.get("assetCompilationEndpoint") }", data) - $.ajax type: "POST" url: CodeSync.get("assetCompilationEndpoint") @@ -103,14 +170,29 @@ CodeSync.Document = Backbone.Model.extend @set("error", response.error?.message) @trigger "status", type: "error", message: response.error?.message + + changeProcessor: CodeSync.processChangeNotification + loadInPage: (options={})-> - if @type() is "stylesheet" - helpers.processStyleContent.call(@, @get('compiled')) - else if (@type() is "script" or @type() is "template") - helpers.processScriptContent.call(@, @get('compiled')) + doc = @ + + notification = + type: doc.type() + compiled: doc.get("compiled") + complete: options.complete + name: doc.get("name") + path: doc.get("path") + contents: doc.get("contents") + + 1; - if options.complete - _.delay(options.complete, (options.delay||@callbackDelay)) + payload = _.extend notification, + error: (message)-> + doc.trigger "status", type: "error", sticky: "true", message: "JS Error: #{ message }" + success: ()-> + doc.trigger "code:sync:#{ doc.get('type') }" + + @changeProcessor(payload, origin:"document", documentId: doc.cid) # Determines how we will handle the compiled assets when loading in the page type: ()-> @@ -119,7 +201,7 @@ CodeSync.Document = Backbone.Model.extend "stylesheet" when "coffeescript","javascript" "script" - when "skim","mustache","jst","haml","eco" + when "skim","mustache","jst","haml","eco", "html" "template" missingFileName: ()-> @@ -164,16 +246,15 @@ CodeSync.Document.getExtensionFor = (string="")-> if val = rest.length > 0 && rest.join('.') ".#{ val }" +CodeSync.Document.getPrefixContentFor = (doc)-> + "" + CodeSync.Documents = Backbone.Collection.extend model: CodeSync.Document initialize: (models,options)-> Backbone.Collection::initialize.apply(@, arguments) - if client = CodeSync.Client.get() && client?.socket? - client.subscribeWith (notification)-> - console.log "Documents", notification - nextId: ()-> @models.length + 1 @@ -195,18 +276,17 @@ CodeSync.Documents = Backbone.Collection.extend documentModel.loadSourceFromDisk ()=> callback?(documentModel) -helpers = - processStyleContent: (content)-> - $('head style[data-codesync-document]').remove() - $('head').append "" - - processScriptContent: (code)-> - doc = @ - evalRunner = (code)-> - try - eval(code) - catch e - doc.trigger "status", type: "error", message: "JS Error: #{ e.message }", sticky: true - throw(e) - - evalRunner.call(window, code) + +CodeSync.Documents._projectAssets = undefined + +CodeSync.Documents.getProjectAssets = ()-> + collection = CodeSync.Documents._projectAssets ||= new CodeSync.Documents() + + $.ajax + type: "GET" + url: CodeSync.get("serverInfoEndpoint") + success: (response={})=> + if response.project_assets?.length > 0 + collection.reset response.project_assets + + collection \ No newline at end of file diff --git a/site/source/javascripts/code_sync/datasources/project_assets.coffee b/site/source/javascripts/code_sync/datasources/project_assets.coffee new file mode 100644 index 0000000..3c7f7e7 --- /dev/null +++ b/site/source/javascripts/code_sync/datasources/project_assets.coffee @@ -0,0 +1,11 @@ +CodeSync.ProjectAssets = Backbone.Collection.extend + model: CodeSync.Document + + url: CodeSync.get("serverInfoEndpoint") + + parse: (response)-> + response.project_assets + + findDocumentByPath: (path)-> + @detect (model)-> + model.get('path') is path diff --git a/site/source/javascripts/code_sync/datasources/script_packages.coffee b/site/source/javascripts/code_sync/datasources/script_packages.coffee new file mode 100644 index 0000000..e5c53c0 --- /dev/null +++ b/site/source/javascripts/code_sync/datasources/script_packages.coffee @@ -0,0 +1,71 @@ +CodeSync.ScriptPackages = CodeSync.LocalStore.extend + namespace: "script:package" + + initialize: (models=[], @options={})-> + models = CodeSync.ScriptPackages.samples if _(models).isEmpty() + CodeSync.LocalStore::initialize.call(@, models, @options) + + # Create a stylesheet package by passing a name and a list in a block + # of text listing each stylesheet individually on one line. + create: (attributes={}, options={})-> + {text,name,list} = attributes + + list ||= [] + + for line in text.split("\n") + list.push _.str.strip(line) + + model = new @model(list: list, name: name) + + @add(model, options) + + model + + + model: Backbone.Model.extend + + sync: CodeSync.LocalStore::sync + + initialize:(@attributes)-> + Backbone.Model::initialize.apply(@, arguments) + + status = {} + + for item in @attributes.list + status[item] = false + + @set "status", status, silent: true + + pkg = @ + + @updateStatus = (url)=> + console.log "Script Loaded", url + @onLoad.apply(pkg, arguments) + @attributes.status[url] = true + @trigger "resource:loaded", pkg, url + + onLoad: (url)-> + status = @get("status") + status[url] = true + + @set({status}) + + request: (root)-> + name = @get("name") + + root ||= window + + for script, value of @get("status") + console.log "Loading Script", script + root.CodeSync.util.loadScript script, tracker: "#{ name }:#{ script }", complete: @updateStatus + +s = CodeSync.ScriptPackages.samples = [] + +s.push + name: "Backbone + Underscore + jQuery" + list:[ + "//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.1/jquery.min.js" + "//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js" + "//cdnjs.cloudflare.com/ajax/libs/underscore.string/2.3.0/underscore.string.min.js" + "//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js" + ] diff --git a/site/source/javascripts/code_sync/datasources/stylesheet_packages.coffee b/site/source/javascripts/code_sync/datasources/stylesheet_packages.coffee new file mode 100644 index 0000000..7fed817 --- /dev/null +++ b/site/source/javascripts/code_sync/datasources/stylesheet_packages.coffee @@ -0,0 +1,82 @@ +CodeSync.StylesheetPackages = CodeSync.LocalStore.extend + namespace: "stylesheet:package" + + initialize: (models=[], @options={})-> + models = CodeSync.StylesheetPackages.samples if _(models).isEmpty() + CodeSync.LocalStore::initialize.call(@, models, @options) + + # Create a stylesheet package by passing a name and a list in a block + # of text listing each stylesheet individually on one line. + create: (attributes={}, options={})-> + {text,name,list} = attributes + + list ||= [] + + for line in text.split("\n") + list.push _.str.strip(line) + + model = new @model(list: list, name: name) + + @add(model, options) + + model + + + model: Backbone.Model.extend + + sync: CodeSync.LocalStore::sync + + initialize:(@attributes)-> + Backbone.Model::initialize.apply(@, arguments) + + status = {} + + for item in @attributes.list + status[item] = false + + @set "status", status, silent: true + + pkg = @ + + @updateStatus = (url)=> + @onLoad.apply(pkg, arguments) + @attributes.status[url] = true + @trigger "resource:loaded", pkg, url + + onLoad: (url)-> + status = @get("status") + status[url] = true + + @set({status}) + + request: (root)-> + name = @get("name") + + root ||= window + + for script, value of @get("status") + root.CodeSync.util.loadStylesheet script, tracker: "#{ name }:#{ script }", complete: @updateStatus + +s = CodeSync.StylesheetPackages.samples = [] + +s.push + name: "purecss.io" + list:[ + "//yui.yahooapis.com/pure/0.1.0/pure-min.css" + ] + +s.push + name: "Luca" + list:[ + "//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" + "//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" + "//datapimp.github.com/luca/vendor/assets/stylesheets/luca-ui.css" + ] + +s.push + name: "bootstrap / amelia" + list:[ + "//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" + "//netdna.bootstrapcdn.com/bootswatch/2.3.1/amelia/bootstrap.min.css" + "//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.min.css" + ] diff --git a/lib/assets/javascripts/canvas.coffee b/site/source/javascripts/code_sync/dependencies.coffee similarity index 68% rename from lib/assets/javascripts/canvas.coffee rename to site/source/javascripts/code_sync/dependencies.coffee index a76c7ae..d3d729c 100644 --- a/lib/assets/javascripts/canvas.coffee +++ b/site/source/javascripts/code_sync/dependencies.coffee @@ -5,8 +5,8 @@ #= require ./vendor/underscore.string.min #= require ./vendor/backbone-min #= require ./vendor/spectrum -#= require ./code_sync/console -#= require ./canvas/index -#= require_self +#= require ./vendor/css-utilities +#= require ./vendor/css-utilities-selector +#= require hamlcoffee +#= require skim -CodeSync.Canvas.startApplication() \ No newline at end of file diff --git a/site/source/javascripts/code_sync/editor.coffee b/site/source/javascripts/code_sync/editor.coffee new file mode 100644 index 0000000..aec1ca0 --- /dev/null +++ b/site/source/javascripts/code_sync/editor.coffee @@ -0,0 +1,7 @@ +#= require_tree ./editor/templates +#= require_tree ./editor/datasources +#= require ./editor/document_manager +#= require ./editor/component +#= require ./editor/editor_utility +#= require ./editor/plugins/color_picker +#= require ./editor/plugins/draggable diff --git a/lib/assets/javascripts/code_sync/editor/index.coffee b/site/source/javascripts/code_sync/editor/asset_editor.coffee similarity index 83% rename from lib/assets/javascripts/code_sync/editor/index.coffee rename to site/source/javascripts/code_sync/editor/asset_editor.coffee index c3b1cf5..ba4203a 100644 --- a/lib/assets/javascripts/code_sync/editor/index.coffee +++ b/site/source/javascripts/code_sync/editor/asset_editor.coffee @@ -1,13 +1,10 @@ -#= require skim -#= require_tree ./templates -#= require_tree ./datasources -#= require_tree ./plugins -#= require_self CodeSync.AssetEditor = Backbone.View.extend name: "code_sync" className: "codesync-editor" + height: 400 + # Valid options are top, bottom, static position: "top" @@ -28,7 +25,7 @@ CodeSync.AssetEditor = Backbone.View.extend effect: "slide" effectDuration: 400 - editorChangeThrottle: 800 + editorChangeThrottle: 400 visible: false showVisibleTab: true @@ -44,63 +41,68 @@ CodeSync.AssetEditor = Backbone.View.extend "click .hide-button" : "hide" plugins:[ - "DocumentTabs" - "ModeSelector" - "PreferencesPanel" - "ElementSync" - "KeymapSelector" ] pluginOptions: {} - views: {} + toolbarWrapperSelector: '.toolbar-wrapper' + + liveMode: true initialize: (@options={})-> _.extend(@, @options) - Backbone.View::initialize.apply(@, arguments) + @views = {} - console.log "Creatin Instance", @name, @cid, @ + Backbone.View::initialize.apply(@, arguments) CodeSync.AssetEditor.instances[@name || @cid] = @ _.bindAll(@, "editorChangeHandler") @modes = CodeSync.Modes.get() - @documentManager = new CodeSync.DocumentManager(editor: @) + @documentManager = @options.documentManager || new CodeSync.DocumentManager(editor: @) @startMode = @modes.get(@startMode) || CodeSync.Modes.defaultMode() - @on "editor:change", _.debounce(@editorChangeHandler, @editorChangeThrottle), @ - @on "codemirror:setup", ()=> @loadDefaultDocument() - @$el.html JST["code_sync/editor/templates/asset_editor"]() + @enableLiveMode() if @liveMode is true + @setupToolbar() + + @$el.append "
    " @$el.attr('data-codesync', @name) if @name? @loadPlugins() + @setHeight(@height, false) @setPosition(@position, false) @render() unless @autoRender is false + enableLiveMode: (throttle)-> + @liveModeHandler = _.debounce(@editorChangeHandler, throttle || @editorChangeThrottle) + @on "editor:change", @liveModeHandler, @ + + disableLiveMode: ()-> + @off "editor:change", @liveModeHandler + addPlugin: (plugin)-> CodeSync.plugins[plugin]?.setup.call(@,@) loadPlugins: ()-> - for plugin in @plugins when CodeSync.plugins[plugin]? - options = @pluginOptions[plugin] || {} - PluginClass = CodeSync.plugins[plugin] - - PluginClass.setup.call(@,@,options) + editor = @ + _(@plugins).each (plugin)=> + if PluginClass = CodeSync.plugins[plugin] + options = @pluginOptions[plugin] || {} + options.PluginClass = PluginClass + PluginClass.setup.call(editor,editor,options) render: ()-> return @ if @rendered is true - @setupToolbar() - @delegateEvents() @rendered = true @@ -124,7 +126,7 @@ CodeSync.AssetEditor = Backbone.View.extend return if @codeMirror? @height ||= @$el.height() - @codeMirror = CodeMirror(@$('.codesync-asset-editor')[0], @getCodeMirrorOptions()) + @codeMirror = CodeMirror(@$('.codemirror-wrapper')[0], @getCodeMirrorOptions()) @on "initial:document:load", ()=> if @startMode @@ -136,10 +138,7 @@ CodeSync.AssetEditor = Backbone.View.extend if @theme ||= localStorage.getItem("codesync:theme") @setTheme(@theme) - changeHandler = (changeObj)=> - @trigger "editor:change", @codeMirror.getValue(), changeObj - - @codeMirror.on "change", _.debounce(changeHandler, @editorChangeThrottle) + @codeMirror.on "change", _.debounce(((changeObj)=> @trigger "editor:change", @codeMirror.getValue(), changeObj), @editorChangeThrottle) @trigger "codemirror:setup", @codeMirror @@ -169,7 +168,14 @@ CodeSync.AssetEditor = Backbone.View.extend extraKeys: passthrough editorChangeHandler: (editorContents)-> - @currentDocument.set("contents", editorContents) + @currentDocument.set("contents", editorContents, liveMode: @liveMode) + + setHeight: (@height, show=true)-> + if _.isNumber(@height) + @height = "#{ @height }px" + + @$el.css('height', @height) + @$el.addClass('static-height') setPosition: (@position="top", show=true)-> for available in ["top","bottom","static"] when available isnt @position @@ -218,8 +224,12 @@ CodeSync.AssetEditor = Backbone.View.extend for option,value of options @codeMirror.setOption(option,value) + toolbarWrapperElement : ()-> + @$(@toolbarWrapperSelector) + setupToolbar: ()-> - @$('.toolbar-wrapper').hide() unless @enableToolbar + @$el.append CodeSync.template("editor_toolbar") + @toolbarWrapperElement().hide() unless @enableToolbar if @hideable is true @$('.toolbar-wrapper').append "
    Hide
    " @@ -267,15 +277,9 @@ CodeSync.AssetEditor = Backbone.View.extend @setMode @currentDocument.toMode() applyDocumentContentToPage: ()-> + doc = @currentDocument @currentDocument?.loadInPage complete: ()=> - if @currentDocument.type() is "script" or @currentDocument.type() is "template" - CodeSync.onScriptChange?.call(window, @currentDocument.attributes) - - if @currentDocument.type() is "stylesheet" - CodeSync.onStylesheetChange?.call(window, @currentDocument.attributes) - - @trigger "code:sync", @currentDocument - @trigger "code:sync:#{ @currentDocument.type() }", @currentDocument, JST?[@currentDocument.nameWithoutExtension()] + @trigger "code:sync:#{ doc.type() }", doc removeStatusMessages: ()-> @$('.status-message').remove() @@ -305,7 +309,7 @@ CodeSync.AssetEditor = Backbone.View.extend , 1200 hintHeight: ()-> - offset = if @showVisibleTab then @$('.document-tabs-container').height() else 0 + offset = if @showVisibleTab then @$('.document-tabs').height() else 0 visibleStyleSettings: ()-> if @position is "static" @@ -318,7 +322,7 @@ CodeSync.AssetEditor = Backbone.View.extend if @position is "bottom" settings = bottom: '0px' - height: '400px' + height: @height settings @@ -328,13 +332,13 @@ CodeSync.AssetEditor = Backbone.View.extend if @position is "top" settings = - top: ((@$el.height() + 8) * -1 ) + @hintHeight() + top: @$('.codemirror-wrapper').height() * -1 bottom: 'auto' if @position is "bottom" settings = bottom: '0px' - height: "#{ @hintHeight() - 8 }px" + height: @height - @$('.document-tabs').height() settings diff --git a/site/source/javascripts/code_sync/editor/component.coffee b/site/source/javascripts/code_sync/editor/component.coffee new file mode 100644 index 0000000..0bf6b6a --- /dev/null +++ b/site/source/javascripts/code_sync/editor/component.coffee @@ -0,0 +1,233 @@ +# The Editor Component is a barebones wrapper +# around CodeMirror, the DocumentManager, and the +# associated handlers + +CodeSync.EditorComponent = Backbone.View.extend + name: "code_sync" + + className: "codesync-editor-component" + + # Valid options are: true, "all", "success", "error" + enableStatusMessages: true + + startMode: "scss" + + theme: "ambiance" + + keyBindings: "" + + events: + "click .status-message" : "removeStatusMessages" + + liveMode: true + liveModeThrottle: 600 + + initialize: (@options={})-> + _.extend(@, @options) + + @views = {} + + Backbone.View::initialize.apply(@, arguments) + + _.bindAll(@, "editorChangeHandler") + + @modes = CodeSync.Modes.get() + + @documentManager = @options.documentManager || new CodeSync.DocumentManager(editor: @) + + @startMode = @modes.get(@startMode) || CodeSync.Modes.defaultMode() + + @on "codemirror:setup", ()=> @loadDefaultDocument() + + @enableLiveMode(@liveModeThrottle) if @liveMode is true + + @render() unless @autoRender is false + + @setupPlugins() + + enableLiveMode: (throttle)-> + @liveModeHandler = _.debounce(@editorChangeHandler, throttle || @editorChangeThrottle) + @on "editor:change", @liveModeHandler, @ + + disableLiveMode: ()-> + @off "editor:change", @liveModeHandler + + render: ()-> + @setupCodeMirror() + @ + + setupPlugins: ()-> + return if _.isEmpty(@plugins) + + for plugin in @plugins when CodeSync.plugins[plugin]? + options = @pluginOptions?[plugin] || {} + options.PluginClass = CodeSync.plugins[plugin] + CodeSync.plugins[plugin].setup?.call(@, @, options) + + setupCodeMirror: ()-> + return if @codeMirror? + + @$el.append "
    " + + @height ||= @$el.height() + @codeMirror = CodeMirror(@$('.codemirror-wrapper')[0], @getCodeMirrorOptions()) + + @on "initial:document:load", ()=> + if @startMode + @setMode(@startMode) + + if @keyBindings + @setKeyMap(@keyBindings) + + if @theme ||= localStorage.getItem("codesync:theme") + @setTheme(@theme) + + @codeMirror.on "change", _.debounce(((changeObj)=> @trigger "editor:change", @codeMirror.getValue(), changeObj), @editorChangeThrottle) + + @trigger "codemirror:setup", @codeMirror, @ + @onCodeMirrorSetup?(@codeMirror, @) + + @ + + codeMirrorKeyBindings: + "Ctrl+Command+1": ()-> + CodeSync.get("commandOne")?.call?(@) + + "Ctrl+Command+2": ()-> + CodeSync.get("commandTwo")?.call?(@) + + "Ctrl+Command+3": ()-> + CodeSync.get("commandThree")?.call(@) + + getCodeMirrorOptions: ()-> + passthrough = {} + + if key?.call? + for keyCommand, handler of @codeMirrorKeyBindings + passthrough[keyCommand] = false + key(keyCommand,_.bind(handler, @)) + + options = + theme: 'lesser-dark' + lineNumbers: true + mode: (@startMode?.get("codeMirrorMode") || CodeSync.get("defaultFileType")) + extraKeys: passthrough + + editorChangeHandler: (editorContents)-> + @currentDocument.set("contents", editorContents, liveMode: @liveMode) + + setKeyMap: (keyMap)-> + if @keyMap? and keyMap isnt @keyMap + @trigger "change:keyMap", keyMap, @keyMap + @onKeyMapChange?.call(@,keyMap,@keyMap) + + @codeMirror.setOption 'keyMap', @keyMap = keyMap + + setTheme: (theme)-> + if @theme? and theme isnt @theme + @trigger "change:theme", theme, @theme + @onThemeChange?.call(@,theme,@theme) + + @$el.attr("data-codesync-theme", @theme = theme) + @codeMirror.setOption 'theme', @theme = theme + + setMode: (newMode)-> + + if @mode? and (newMode isnt @mode) + @trigger "change:mode", newMode, newMode.id + @onModeChange?.call(@,newMode,@mode) + + @mode = newMode + + @$el.attr("data-codesync-mode", @mode.id) + + if @mode?.get? + @codeMirror.setOption 'mode', @mode.get("codeMirrorMode") + @currentDocument.set('mode', @mode.id) + @currentDocument.set('extension', CodeSync.Modes.guessExtensionFor(@mode.id) ) + + @ + + setCodeMirrorOptions: (options={})-> + for option,value of options + @codeMirror.setOption(option,value) + + getDefaultDocument: ()-> + defaultOptions = + mode: @options.startMode || CodeSync.get("defaultFileType") + sticky: true + doNotSave: true + name: @defaultDocumentName || "codesync" + display: "CodeSync" + + options = _.extend(defaultOptions, @document) + + defaultDocument = new CodeSync.Document(options) + + loadDefaultDocument: ()-> + @documentManager.openDocument(@getDefaultDocument(), @) + + loadDocument: (doc)-> + if current = @currentDocument + current.off "status", @showStatusMessage + current.off "change:compiled", @applyDocumentContentToPage + current.off "change:mode", @applyDocumentContentToPage, @ + + @previousDocument = current + else + @trigger "initial:document:load", @currentDocument = doc + + doc.on "status", @showStatusMessage, @ + doc.on "change:compiled", @applyDocumentContentToPage, @ + doc.on "change:mode", @syncEditorModeWithDocument, @ + + @codeMirror.swapDoc doc.toCodeMirrorDocument() + @trigger "document:loaded", doc, @previousDocument + + @setCodeMirrorOptions doc.toCodeMirrorOptions() + + @currentDocument = doc + + syncEditorModeWithDocument: ()-> + if @currentDocument? && (@currentDocument.toMode() isnt @mode) + @setMode @currentDocument.toMode() + + applyDocumentContentToPage: ()-> + doc = @currentDocument + @currentDocument?.loadInPage complete: ()=> + @trigger "code:sync:#{ doc.type() }", doc + + removeStatusMessages: ()-> + @$('.status-message').remove() + + showError: (message)-> + @showStatusMessage type:"error", message: message + + showStatusMessage:(options={})-> + @removeStatusMessages() + + allowedTypes = switch @enableStatusMessages + when false + [] + when true, "all" + ["success","error","notice"] + else + [@enableStatusMessages] + + return unless _(allowedTypes).indexOf(options.type) >= 0 + + if options.message?.length > 0 + @$el.prepend "
    #{ options.message }
    " + + if options.type is "success" + _.delay ()=> + @$('.status-message.success').animate({opacity:0}, duration: 400, complete: ()=> @$('.status-message.success').remove()) + , 1200 + +CodeSync.EditorComponent.instances = {} + +# Private Helpers +CodeSync.commands = + commandOne: -> + commandTwo: -> + commandThree: -> diff --git a/lib/assets/javascripts/code_sync/editor/datasources/modes.coffee b/site/source/javascripts/code_sync/editor/datasources/modes.coffee similarity index 76% rename from lib/assets/javascripts/code_sync/editor/datasources/modes.coffee rename to site/source/javascripts/code_sync/editor/datasources/modes.coffee index 8449747..0f16044 100644 --- a/lib/assets/javascripts/code_sync/editor/datasources/modes.coffee +++ b/site/source/javascripts/code_sync/editor/datasources/modes.coffee @@ -1,18 +1,34 @@ CodeSync.Modes = Backbone.Collection.extend model: Backbone.Model.extend + type: ()-> + return "template" if @get("template") is true + return "style" if @get("style") is true + return "script" if @get("script") is true + + isOfType: (type="any")-> + @get(type) is true || type is "any" || type is "all" + isTemplate: ()-> @get("template") is true + isStylesheet: ()-> + @get("style") is true + + isScript: ()-> + @get("script") is true + + isBackend: ()-> + @get("backend") is true + + initialize: (models=[], options={})-> models = for key, value of modes - attributes = + attributes = _.extend value, id: key name: value.name || key codeMirrorMode: value.codeMirrorMode || key - extension: value.extension extensionRegex: new RegExp("#{ value.extension }") template: (value.template is true || key is "skim" || value.extension?.match(/jst/)) - defaultContent: value.defaultContent Backbone.Collection::initialize.apply(@, arguments) @@ -55,6 +71,8 @@ CodeSync.Modes.defaultMode = ()-> modes = coffeescript: extension: ".coffee" + script: true + codeMirrorOptions: indentUnit: 2 smartIndent: true @@ -80,6 +98,7 @@ modes = name: "Sass" extension: ".css.sass" defaultContent: "// You are currently in Sass mode." + style: true codeMirrorOptions: indentUnit: 2 @@ -92,6 +111,14 @@ modes = extension: ".css.scss" name: "SCSS" defaultContent: "/* You are currently in SCSS mode. */" + style: true + + haml: + codeMirrorMode: "haml" + extension: ".hamlc" + name: "Haml Coffee" + template: true + defaultContent: "/ HAML Coffeescript Mode " skim: extension: ".jst.skim" @@ -103,15 +130,31 @@ modes = tabSize: 2 indentWithTabs: false + html: + name: "HTML" + codemirrorMode: "html" + extension: ".html" + defaultContent: "" + template: true + raw: true + css: name: "CSS" extension: ".css" + codeMirrorMode: "css" defaultContent: "/* You are currently in raw CSS mode. */" + style: true + raw: true javascript: name: "Javascript" extension: ".js" + codeMirrorMode: "javascript" defaultContent: "/* You are currently in raw JS mode. */" + script: true + raw: true + + diff --git a/site/source/javascripts/code_sync/editor/document_manager.coffee b/site/source/javascripts/code_sync/editor/document_manager.coffee new file mode 100644 index 0000000..861b77f --- /dev/null +++ b/site/source/javascripts/code_sync/editor/document_manager.coffee @@ -0,0 +1,60 @@ +CodeSync.DocumentManager = Backbone.Model.extend + + initialize: (@attributes={})-> + @editor = @attributes.editor + delete @attributes.editor + + if _.isFunction @attributes.getEditor + @getEditor = @attributes.getEditor + delete @attributes.getEditor + + @openDocuments = new CodeSync.Documents() + + for trigger in ["add","remove","change:display","change:sticky"] + @openDocuments.on(trigger, @notify, @) + + Backbone.Model::initialize.apply(@,arguments) + + # In multiple setups with multiple editors + # the DocumentManager can act as a singleton + # and route documents to multiple editors + getEditor: ()-> + @editor || _(CodeSync.AssetEditor.instances).values()[0] + + detect: (iterator)-> + @openDocuments.each(iterator) + + each: (iterator)-> + @openDocuments.each(iterator) + + notify: ()-> + @trigger "document:change" + + openDocument: (doc, editor)-> + editor ||= @getEditor() + + @openDocuments.add(doc) + @setCurrentDocument(doc, editor) + + setCurrentDocument: (@currentDocument, editor)-> + editor ||= @getEditor() + editor.loadDocument(@currentDocument) + + saveDocument: ()-> + if CodeSync.get("disableAssetSave") + @getEditor().showError("Saving is disabled.") + else + @currentDocument.saveToDisk() + + createDocument: (editor)-> + editor ||= @getEditor() + mode = editor.mode?.id || CodeSync.get("defaultFileType") + extension = CodeSync.Modes.guessExtensionFor(mode) + + doc = new CodeSync.Document + name: "untitled" + display: "Untitled" + mode: mode + extension: extension + + @openDocument(doc,editor) diff --git a/site/source/javascripts/code_sync/editor/editor_utility.coffee b/site/source/javascripts/code_sync/editor/editor_utility.coffee new file mode 100644 index 0000000..98adf7c --- /dev/null +++ b/site/source/javascripts/code_sync/editor/editor_utility.coffee @@ -0,0 +1,97 @@ +CodeSync.EditorUtility = Backbone.View.extend + buttonText: undefined + + buttonIcon: undefined + + buttonTemplate: "toolbar_button" + + entranceEffect: "bounceInDown" + + exitEffect: "bounceOutUp" + + visible: false + + panelTemplate: "toolbar_panel" + + availableInModes: "all" + + alignment: undefined + + initialize: (@options)-> + _.extend(@, @options) + + Backbone.View::initialize.apply(@, arguments) + + @editor?.on "change:mode", @checkAvailabilityInMode, @ + @editor?.on "document:loaded", @checkAvailabilityInMode, @ + + @$el.addClass "#{ @alignment }-aligned" if @alignment? + + checkAvailabilityInMode: ()-> + return @buttonElement.show() if @availableInModes is "all" || !@availableInModes? + + type = @editor.mode?.type?() || @editor.currentDocument.type() + + if type is @availableInModes + else + + toggle: (options={})-> + if @visible then @hide(options) else @show(options) + + show: (options={})-> + @removeOtherEditorUtilitys() + @render() + @$el.removeClass(@exitEffect) + @$el.addClass("animated #{ @entranceEffect }") + @visible = true + @ + + hide: (options={})-> + @$el.removeClass(@entranceEffect) + @$el.addClass("animated #{ @exitEffect }") + @visible = false + @ + + removeOtherEditorUtilitys: ()-> + $(@renderTo()).find('.editor-utility').addClass("animated #{ @exitEffect }").attr('data-removed',true) + + templateOptions: -> + @options + + applyTemplate: ()-> + @$el.html CodeSync.template(@panelTemplate, @templateOptions()) + + render: () -> + if @rendered is true + return @ + else + return @ if @beforeRender?() is false + + @$el.addClass("editor-utility") + @applyTemplate() + $(@renderTo()).append(@el) + + @afterRender?() + @rendered = true + @checkAvailabilityInMode() + return @ + +original = CodeSync.EditorUtility.extend + + +CodeSync.EditorUtility.setup = (editor,options={})-> + {PluginClass} = options + + options.editor = editor + + panel = new PluginClass(options) + + if panel.handle + editor.views[panel.handle] = panel + + panel.renderTo = ()-> + editor.$('.codemirror-wrapper') + + editor.on "codemirror:setup", (cm)-> + cm.on "focus", ()-> panel.hide() + diff --git a/lib/assets/javascripts/code_sync/editor/plugins/asset_selector.coffee b/site/source/javascripts/code_sync/editor/plugins/asset_selector.coffee similarity index 55% rename from lib/assets/javascripts/code_sync/editor/plugins/asset_selector.coffee rename to site/source/javascripts/code_sync/editor/plugins/asset_selector.coffee index bb8e8b2..3d4190f 100644 --- a/lib/assets/javascripts/code_sync/editor/plugins/asset_selector.coffee +++ b/site/source/javascripts/code_sync/editor/plugins/asset_selector.coffee @@ -1,16 +1,26 @@ -CodeSync.AssetSelector = Backbone.View.extend +CodeSync.plugins.AssetSelector = CodeSync.EditorUtility.extend className: "codesync-asset-selector" + panelTemplate: "asset_selector" + + buttonIcon: "search" + + entranceEffect: "fadeIn" + + exitEffect: "fadeOut" + + tooltip: "Load a document from this project" + + handle: "assetSelector" + events: "keyup input": "keyHandler" "click .search-result": "selectSearchResult" initialize:(options={})-> - Backbone.View::initialize.apply(@, arguments) + CodeSync.EditorUtility::initialize.apply(@, arguments) - @editor = options.editor - - _.bindAll(@,"keyHandler","loadAsset") + _.bindAll(@,"keyHandler","loadAssetByPath","loadDocument") @selected = new Backbone.Model(index: -1) @@ -38,8 +48,10 @@ CodeSync.AssetSelector = Backbone.View.extend @selected.set('index',0,silent:true) _.delay ()=> - @loadAsset @searchResults[index].get('path') + @loadDocument @searchResults[index] + @hideSearchResults() , 10 + @hide() previousSearchResult: ()-> @@ -55,10 +67,18 @@ CodeSync.AssetSelector = Backbone.View.extend @selected.set {index} selectSearchResult: (e)-> - @loadAsset $(e.target)?.data('path') + target = @$(e.target).closest('.search-result') + @selected.set target.data('index') + @openCurrentSearchResult() - loadAsset: (path)-> + loadAssetByPath: (path)-> @trigger "asset:selected", path + @editor.documentManager?.openDocuments?.findOrCreateForPath path, (doc)=> + @editor.documentManager.openDocument(doc,@editor) + + loadDocument: (doc)-> + doc.loadSourceFromDisk (doc)=> + @editor.documentManager?.openDocument(doc, @editor) filterAssetsBy: (value)-> return if value.length <= 1 @@ -68,39 +88,35 @@ CodeSync.AssetSelector = Backbone.View.extend @selected.set('index',-1, silent: true) - @searchResults = @collection.select (model)-> + @searchResults = @collection.select (doc)-> regex = new RegExp("#{value}") - model.get("description")?.match(regex) || model.get("path")?.match(regex) + doc.nameWithExtension()?.match(regex) || doc.get("description")?.match(regex) || doc.get("path")?.match(regex) @searchResults = @searchResults.slice(0,5) for model,index in @searchResults - wrapper.append "
    #{ model.get('description') }
    " + wrapper.append "
    #{ model.description() }
    " wrapper.height( @searchResults.length * 40 ) - showSearchResults: ()-> - @wrapper.show() + render: ()-> + return @ if @rendered - hideSearchResults: ()-> - @wrapper.hide() + @collection = CodeSync.Documents.getProjectAssets() - toggle: ()-> - if @visible then @hide() else @show() + CodeSync.EditorUtility::render.apply(@, arguments) + @wrapper = @$(".search-results-wrapper") + @ show: ()-> - @wrapper.empty() - @visible = true - @$el.show() - @hideSearchResults() - @$('input').val('').focus() + CodeSync.EditorUtility::show.apply(@, arguments) + @selected.set "index", undefined + @$('input').val() - hide: ()-> - @$el.hide() - @visible = false - @editor.codeMirror.focus() - render: ()-> - @$el.html JST["code_sync/editor/templates/asset_selector"]() - @wrapper ||= @$('.search-results-wrapper') - @ \ No newline at end of file + showSearchResults: ()-> + @wrapper.show() + + hideSearchResults: ()-> + @wrapper.hide() + diff --git a/lib/assets/javascripts/code_sync/editor/plugins/color_picker.coffee b/site/source/javascripts/code_sync/editor/plugins/color_picker.coffee similarity index 78% rename from lib/assets/javascripts/code_sync/editor/plugins/color_picker.coffee rename to site/source/javascripts/code_sync/editor/plugins/color_picker.coffee index ab0e529..3a53c16 100644 --- a/lib/assets/javascripts/code_sync/editor/plugins/color_picker.coffee +++ b/site/source/javascripts/code_sync/editor/plugins/color_picker.coffee @@ -65,19 +65,20 @@ CodeSync.plugins.ColorPicker = Backbone.View.extend @ -CodeSync.plugins.ColorPicker.setup = (editor)-> +CodeSync.plugins.ColorPicker.setup = (editor, options={})-> @colorPicker = new CodeSync.plugins.ColorPicker(editor: editor) @$el.append( editor.colorPicker.render().el ) @colorPicker.hide() - cm = editor.codeMirror + editor.on "codemirror:setup", ()-> + cm = editor.codeMirror - cm.on "cursorActivity", -> - cursor = cm.getCursor() - token = cm.getTokenAt(cursor) + cm.on "cursorActivity", -> + cursor = cm.getCursor() + token = cm.getTokenAt(cursor) - if token.string?.match(/#[a-fA-F0-9]{3,6}/g) and token.string?.length >= 6 - editor.colorPicker.syncWithToken(token, cursor) - else - editor.colorPicker.hide() + if token.string?.match(/#[a-fA-F0-9]{3,6}/g) and token.string?.length >= 6 + editor.colorPicker.syncWithToken(token, cursor) + else + editor.colorPicker.hide() diff --git a/site/source/javascripts/code_sync/editor/plugins/compiled_code_viewer.coffee b/site/source/javascripts/code_sync/editor/plugins/compiled_code_viewer.coffee new file mode 100644 index 0000000..2dbce1d --- /dev/null +++ b/site/source/javascripts/code_sync/editor/plugins/compiled_code_viewer.coffee @@ -0,0 +1,20 @@ +CodeSync.plugins.CompiledCodeViewer = CodeSync.EditorUtility.extend + buttonIcon: "code" + availableInModes: "all" + handle: "compiledCodeViewer" + + hide: ()-> + @visible = false + if @previousDocument + @editor.loadDocument(@previousDocument) + + # Show enables the compiled + show: ()-> + @visible = true + @previousDocument = @editor.currentDocument + @editor.loadDocument @previousDocument.toCompiledDocument() + + render: ()-> + @checkAvailabilityInMode() + @rendered = true + @ \ No newline at end of file diff --git a/lib/assets/javascripts/code_sync/editor/plugins/document_manager.coffee b/site/source/javascripts/code_sync/editor/plugins/document_manager.coffee similarity index 90% rename from lib/assets/javascripts/code_sync/editor/plugins/document_manager.coffee rename to site/source/javascripts/code_sync/editor/plugins/document_manager.coffee index 01147a8..7a470e5 100644 --- a/lib/assets/javascripts/code_sync/editor/plugins/document_manager.coffee +++ b/site/source/javascripts/code_sync/editor/plugins/document_manager.coffee @@ -3,6 +3,10 @@ CodeSync.DocumentManager = Backbone.Model.extend @editor = @attributes.editor delete @attributes.editor + if _.isFunction @attributes.getEditor + @getEditor = @attributes.getEditor + delete @attributes.getEditor + @openDocuments = new CodeSync.Documents() for trigger in ["add","remove","change:display","change:sticky"] @@ -32,7 +36,7 @@ CodeSync.DocumentManager = Backbone.Model.extend @setCurrentDocument(doc, editor) setCurrentDocument: (@currentDocument, editor)-> - editor ||= @editor + editor ||= @getEditor() editor.loadDocument(@currentDocument) saveDocument: ()-> diff --git a/lib/assets/javascripts/code_sync/editor/plugins/document_tabs.coffee b/site/source/javascripts/code_sync/editor/plugins/document_tabs.coffee similarity index 87% rename from lib/assets/javascripts/code_sync/editor/plugins/document_tabs.coffee rename to site/source/javascripts/code_sync/editor/plugins/document_tabs.coffee index 7a3d428..4c008e1 100644 --- a/lib/assets/javascripts/code_sync/editor/plugins/document_tabs.coffee +++ b/site/source/javascripts/code_sync/editor/plugins/document_tabs.coffee @@ -1,5 +1,5 @@ CodeSync.plugins.DocumentTabs = Backbone.View.extend - + className: "document-tabs" # Save, Open, New tabs includeActionTabs: true @@ -14,12 +14,10 @@ CodeSync.plugins.DocumentTabs = Backbone.View.extend "click .closable .close-anchor": "closeTab" "click .new-document" : "createDocument" "click .save-document" : "saveDocument" - "click .open-document": "toggleAssetSelector" "dblclick .editable": "onDoubleClickTab" "blur .editable .contents": "onEditableTabBlur" "keydown .editable .contents": "onEditableTabKeyPress" - tabTemplate: JST["code_sync/editor/templates/document_manager_tab"] views: {} @@ -41,13 +39,6 @@ CodeSync.plugins.DocumentTabs = Backbone.View.extend @on "editor:visible", ()=> @$('.document-tab.hideable').show() - @views.assetSelector = new CodeSync.AssetSelector - collection: @projectAssets - documents: @docs - editor: @editor - - @views.assetSelector.on "asset:selected", @onAssetSelection, @ - Backbone.View::initialize.apply(@, arguments) tabsContainer: ()-> @@ -147,12 +138,8 @@ CodeSync.plugins.DocumentTabs = Backbone.View.extend createDocument: ()-> @manager.createDocument() - toggleAssetSelector: ()-> - @views.assetSelector.toggle() - render: ()-> @$el.append "
    " - @$el.append( @views.assetSelector.render().el ) @ @@ -162,17 +149,11 @@ CodeSync.plugins.DocumentTabs.setup = (editor, options={})-> dm = @views.documentTabs = new CodeSync.plugins.DocumentTabs(options) - # _.extend editor.codeMirrorKeyBindings, - # "Ctrl-T": ()-> - # dm.toggleAssetSelector() - - # "Ctrl-S": ()-> - # dm.getCurrentDocument().save() - - # "Ctrl-N": ()-> - # dm.createDocument() + if editor.position is "top" + @$el.append(dm.render().el) - @$el.append(dm.render().el) + if editor.position is "bottom" + @$el.append(dm.render().el) dm.on "tab:click", ()=> @show() if @visible is false diff --git a/site/source/javascripts/code_sync/editor/plugins/draggable.coffee b/site/source/javascripts/code_sync/editor/plugins/draggable.coffee new file mode 100644 index 0000000..7f540ae --- /dev/null +++ b/site/source/javascripts/code_sync/editor/plugins/draggable.coffee @@ -0,0 +1,3 @@ +CodeSync.plugins.Draggable= setup: (editor)-> + editor.draggableElement ||= editor.$el + editor.draggableElement.draggable(handle: ".drag-handle") diff --git a/site/source/javascripts/code_sync/editor/plugins/file_controls.coffee b/site/source/javascripts/code_sync/editor/plugins/file_controls.coffee new file mode 100644 index 0000000..5067c6b --- /dev/null +++ b/site/source/javascripts/code_sync/editor/plugins/file_controls.coffee @@ -0,0 +1,70 @@ +CodeSync.plugins.FileControls = CodeSync.EditorUtility.extend + buttonIcon: "save" + + handle: "fileControls" + + availableInModes: "all" + + className: "file-controls" + + panelTemplate: "file_controls" + + tooltip: "Open, Save, Create, etc." + + events: + "click .save-to-disk": "saveToDisk" + "click .load-from-disk": "loadFromDisk" + "click .compile": "compileDocument" + + "focus .read-only": (e)-> $(e.target).blur() + + "keyup input.modifiable": "updateDocumentAttributes" + "blur input.modifiable": "updateDocumentAttributes" + + initialize: (@options={})-> + _.extend(@, @options) + CodeSync.EditorUtility::initialize.apply @, arguments + + @updateDocumentAttributes = _.debounce(@updateDocumentAttributes, 400) + + show: ()-> + @syncWithDocument() + CodeSync.EditorUtility::show.apply(@, arguments) + + saveToDisk: ()-> + @doc.set("doNotSave", false) + @doc.saveToDisk() + + loadFromDisk: ()-> + @doc.loadSourceFromDisk() + + compileDocument: ()-> + @doc.set("doNotSave", false) + @doc.sendToServer(false) + + updateDocumentAttributes: ()-> + name = @$('#document_name').val() + folder = @$('#document_folder').val() + path = (CodeSync.get("projectRoot") + "/#{ folder }/#{ name }").replace("//","/") + + @doc.set {path,name,folder} + + templateOptions: ()-> + name: @doc.nameWithExtension() + path: @doc.get("path") + folder: @doc.folder() + newPath: @doc.newPath() + + syncWithDocument: ()-> + if old = @doc + @doc.off "change", @applyTemplate + + if @doc = @editor.currentDocument + @doc.on "change", @applyTemplate, @ + + @applyTemplate() + + + + + diff --git a/site/source/javascripts/code_sync/editor/plugins/keymap_selector.coffee b/site/source/javascripts/code_sync/editor/plugins/keymap_selector.coffee new file mode 100644 index 0000000..1c24c31 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/plugins/keymap_selector.coffee @@ -0,0 +1,54 @@ +CodeSync.plugins.KeymapSelector = Backbone.View.extend + className: "config-select keymap-selector" + + events: + "change select" : "onSelect" + + initialize: (options={})-> + _.extend(@, options) + + throw "Must supply an @editor instance" unless @editor + + @modes = @editor.modes + + @modes.on "reset", @render, @ + + @editor.on "change:mode", (modeModel, modeId)=> @setValue(modeId) + + Backbone.View::initialize.apply(@, arguments) + + onSelect: ()-> + selected = @$('select').val() + @editor.setKeymap(selected) + + setValue: (val)-> + @$('select').val(val) + + hideLabel: ()-> + @$('label').hide() + + showLabel: ()-> + @$('label').show() + + attach: ()-> + @render() + $(@attachTo || @$(".toolbar-wrapper")).html(@el) + + render: ()-> + options = "" + + for mode in ["vim","default"] + options += "" + + @$el.html(" ") + + @hideLabel() unless @visibleLabel + + @ + + +CodeSync.plugins.KeymapSelector.setup = (editor,options)-> + options.editor = editor + + @views.keymapSelector = new CodeSync.plugins.KeymapSelector(options) + @views.keymapSelector.attach() diff --git a/lib/assets/javascripts/marketing.coffee b/site/source/javascripts/code_sync/editor/plugins/mode_selector.coffee similarity index 100% rename from lib/assets/javascripts/marketing.coffee rename to site/source/javascripts/code_sync/editor/plugins/mode_selector.coffee diff --git a/lib/assets/javascripts/code_sync/editor/plugins/name_input.coffee b/site/source/javascripts/code_sync/editor/plugins/name_input.coffee similarity index 100% rename from lib/assets/javascripts/code_sync/editor/plugins/name_input.coffee rename to site/source/javascripts/code_sync/editor/plugins/name_input.coffee diff --git a/site/source/javascripts/code_sync/editor/plugins/preferences_panel.coffee b/site/source/javascripts/code_sync/editor/plugins/preferences_panel.coffee new file mode 100644 index 0000000..e5c7ce5 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/plugins/preferences_panel.coffee @@ -0,0 +1,74 @@ +CodeSync.plugins.PreferencesPanel = CodeSync.EditorUtility.extend + buttonIcon: "cog" + + tooltip: "Set preferences for this editor" + + className: "codesync-preferences-panel" + + panelTemplate: "preferences_panel" + + enableMode: true + + enableKeyBindings: true + + enableTheme: true + + enableEndpoint: false + + enableHotKey: false + + enablePosition: false + + events: + "change select": "updateEditor" + "change input": "updateEditor" + + getValues: ()-> + values = {} + + for field in @$('select,input') + name = $(field).attr('name') + values[name] = $(field).val() + + values + + syncWithEditor: ()-> + @$('select[name="theme"]').val @editor.codeMirror.getOption('theme') + @$('select[name="mode"]').val (@editor.mode?.id || @editor.startMode) + @$('select[name="keyMap"]').val @editor.codeMirror.getOption('keyMap') + + updateEditor: ()-> + values = @getValues() + + if @enableTheme and values.theme? + @editor.setTheme(values.theme) + + if @enableKeyBindings and values.keyMap + @editor.setKeyMap(values.keyMap) + + if @enableMode + @editor.setMode( @modes.get(values.mode) ) + + templateOptions: -> + enableMode: @enableMode + enableTheme: @enableTheme + enableKeyBindings: @enableKeyBindings + enableEndpoint: @enableEndpoint + enableHotKey: @enableHotKey + enablePosition: @enablePosition + + afterRender: ()-> + if @enableMode + @modes = @editor.modes + + select = @$('.mode-selector select') + + options = '' + for mode in @modes.models when mode.isOfType(@showModes) is true + options += "" + + select.empty().html(options) + + select.val(@editor.startMode) + + @syncWithEditor() diff --git a/site/source/javascripts/code_sync/editor/plugins/script_loader.coffee b/site/source/javascripts/code_sync/editor/plugins/script_loader.coffee new file mode 100644 index 0000000..7cb1273 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/plugins/script_loader.coffee @@ -0,0 +1,76 @@ +CodeSync.plugins.ScriptLoader = CodeSync.EditorUtility.extend + buttonIcon: "cloud" + className: "script-loader" + tooltip: "Load external javascripts" + panelTemplate: "script_loader" + availableInModes:"script" + handle: "scriptLoader" + + templateOptions: ()-> + packages: @packages + + initialize:(@options={})-> + @packages = new CodeSync.ScriptPackages() + + @packages.fetch success: ()=> @packages.add(CodeSync.ScriptPackages.samples) if @packages.length is 0 + + CodeSync.EditorUtility::initialize.apply(@, arguments) + + events: + "click .submit" : "loadResources" + "click .save-as-package" : "savePackage" + "click .finished" : "toggle" + "change select" : "loadPackage" + + loadPackage: (e)-> + target = @$(e.target).closest('select') + package_name = target.val() + + model = @packages.detect (model)-> model.get("name") is package_name + + if model? + @$('textarea').val model.get('list').join("\n") + + toggle: ()-> + @$('.card').removeClass('active') + @$('.card.menu').addClass('active') + CodeSync.EditorUtility::toggle.call(@, withEffect: true) + + savePackage: (e)-> + target = @$(e.target).closest('.btn') + panel = @ + + @package?.save success: ()-> + target.html("Success") + + _.delay ()-> + target.html "Save as Package" + panel.reset() + , 1000 + + showRequestStatus: (pkg)-> + container = @$('.results-container').empty() + + for script, loaded of pkg.get('status') + icon = if loaded then 'check' else 'cross' + cls = if loaded then "success" else "danger" + container.append "
  • #{ script }
  • " + + getWindow: ()-> + @editor?.targetWindow || @editorPanel?.targetWindow || window + + loadResources: ()-> + name = @$('select').val() + list = @$('textarea').val() + + if @package? + @package.off "change" + + @package = @packages.create(name:name,text:list) + + @package.on "resource:loaded", @showRequestStatus, @ + + @$('.card').removeClass('active') + @$('.card.results').addClass('active') + + @package.request(@getWindow()) \ No newline at end of file diff --git a/site/source/javascripts/code_sync/editor/plugins/stylesheet_loader.coffee b/site/source/javascripts/code_sync/editor/plugins/stylesheet_loader.coffee new file mode 100644 index 0000000..b9f1c35 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/plugins/stylesheet_loader.coffee @@ -0,0 +1,76 @@ +CodeSync.plugins.StylesheetLoader = CodeSync.EditorUtility.extend + buttonIcon: "cloud" + className: "stylesheet-loader" + tooltip: "Load external stylesheets" + panelTemplate: "stylesheet_loader" + availableInModes:"stylesheet" + handle: "stylesheetLoader" + + templateOptions: ()-> + packages: @packages + + initialize:(@options={})-> + @packages = new CodeSync.StylesheetPackages() + + @packages.fetch success: ()=> @packages.add(CodeSync.StylesheetPackages.samples) if @packages.length is 0 + + CodeSync.EditorUtility::initialize.apply(@, arguments) + + events: + "click .submit" : "loadResources" + "click .save-as-package" : "savePackage" + "click .finished" : "toggle" + "change select" : "loadPackage" + + loadPackage: (e)-> + target = @$(e.target).closest('select') + package_name = target.val() + + model = @packages.detect (model)-> model.get("name") is package_name + + if model? + @$('textarea').val model.get('list').join("\n") + + toggle: ()-> + @$('.card').removeClass('active') + @$('.card.menu').addClass('active') + CodeSync.EditorUtility::toggle.call(@, withEffect: true) + + savePackage: (e)-> + target = @$(e.target).closest('.btn') + panel = @ + + @package?.save success: ()-> + target.html("Success") + + _.delay ()-> + target.html "Save as Package" + panel.reset() + , 1000 + + showRequestStatus: (pkg)-> + container = @$('.results-container').empty() + + for script, loaded of pkg.get('status') + icon = if loaded then 'check' else 'cross' + cls = if loaded then "success" else "danger" + container.append "
  • #{ script }
  • " + + getWindow: ()-> + @editor?.targetWindow || @editorPanel?.targetWindow || window + + loadResources: ()-> + name = @$('select').val() + list = @$('textarea').val() + + if @package? + @package.off "change" + + @package = @packages.create(name:name,text:list) + + @package.on "resource:loaded", @showRequestStatus, @ + + @$('.card').removeClass('active') + @$('.card.results').addClass('active') + + @package.request(@getWindow()) \ No newline at end of file diff --git a/site/source/javascripts/code_sync/editor/subclasses/editor_panel.coffee b/site/source/javascripts/code_sync/editor/subclasses/editor_panel.coffee new file mode 100644 index 0000000..a9356d0 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/subclasses/editor_panel.coffee @@ -0,0 +1,155 @@ +CodeSync.EditorUtility::toolbarEl = ".left" + +plugins = [ + "ElementSync" + "PreferencesPanel" +] + +pluginOptions = + ElementSync: + toolbarEl: ".left" + PreferencesPanel: + showModes: "all" + toolbarEl: ".right" + FileControls: + toolbarEl: ".right" + AssetSelector: + toolbarEl: ".right" + +CodeSync.EditorPanel = Backbone.View.extend + name: "editor-panel" + + className: "codesync-editor-panel" + + layout: "3" + + target: "canvas" + + toolbarClass: undefined + + toolbarContainerSelector: ".editor-panel-toolbar" + + editorContainerSelector: ".editor-wrapper .editor" + + editors:[ + type: "TemplateEditor" + name: "template_editor" + enableStatusMessages: "error" + plugins: plugins + pluginOptions: pluginOptions + , + name: "style_editor" + hideable: false + autoRender: true + renderVisible: true + startMode: "scss" + enableStatusMessages: "error" + keyBindings: CodeSync.get("defaultKeyBindings") + position: "static" + plugins: plugins + pluginOptions: pluginOptions + , + name: "script_editor" + hideable: false + autoRender: true + renderVisible: true + startMode: "coffeescript" + enableStatusMessages: "error" + keyBindings: CodeSync.get("defaultKeyBindings") + position: "static" + plugins: plugins + pluginOptions: pluginOptions + ] + + initialize: (@options = {})-> + _.extend(@, @options) + panel = @ + + @$el.html CodeSync.template("editor_panel") + + @documentManager = new CodeSync.DocumentManager + getEditor: ()-> panel.getCurrentEditor() + + Backbone.View::initialize.apply(arguments) + + set: (setting, value)-> + @$el.attr("data-#{ setting }", value) + @[setting] = value + value + + getCurrentEditor: ()-> + return @currentEditor if @currentEditor + + name = @$el.attr('data-current-editor') + + @assetEditors[name] + + setCurrentEditor: (editor)-> + @$el.attr('data-current-editor', editor.name || editor.cid) + @currentEditor = editor + + render: ()-> + @delegateEvents() + @$el.attr('data-layout',"3") + @ + + renderIn: (containerElement)-> + $(containerElement).html(@render().el) + + @renderEditors() + @setupEditorToolbar() + + @ + + each: (args...)-> + editors = _(@assetEditors).values() + _(editors).each(args...) + + getWindow: ()-> + @targetWindow + + setupEditorToolbar: ()-> + return unless @toolbarClass? + + if CodeSync.toolbars[@toolbarClass]? + options = @toolbarOptions || {} + options.editorPanel = @ + @toolbar = new CodeSync.toolbars[@toolbarClass](options) + + + if @toolbar + @$(@toolbarContainerSelector).append( @toolbar.render().el ) + + @ + + renderEditors: ()-> + @assetEditors ||= {} + + panel = @ + + _(@editors).each (config,index)=> + id = config.name || config.cid + + container = @$(@editorContainerSelector).eq(index) + container.attr('data-editor', index) + + config.appendTo = container + config.documentManager = @documentManager + + EditorClass = CodeSync[config.type] || CodeSync.AssetEditor + + config.document ||= {} + config.document.localStorageKey = panel.name + ':' + index + + editor = @assetEditors[id] = new EditorClass(config) + + @defaultEditor ||= editor + + editor.on "codemirror:setup", (cm)-> + currentEditor = @ + cm.on "focus", ()-> + panel.setCurrentEditor(currentEditor) + + @currentEditor ||= editor + + @trigger "editors:loaded" diff --git a/site/source/javascripts/code_sync/editor/subclasses/template_editor.coffee b/site/source/javascripts/code_sync/editor/subclasses/template_editor.coffee new file mode 100644 index 0000000..9035847 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/subclasses/template_editor.coffee @@ -0,0 +1,15 @@ +CodeSync.TemplateEditor = CodeSync.AssetEditor.extend + hideable: false + autoRender: true + renderVisible: true + startMode: "haml" + keyBindings: CodeSync.get("defaultKeyBindings") || "vim" + position: "static" + + initialize:(@options={})-> + _.extend(@, @options) + + if @options.extraPlugins + @plugins.push(plugin) for plugin in (@options.extraPlugins) + + CodeSync.AssetEditor::initialize.apply(@, arguments) \ No newline at end of file diff --git a/lib/assets/javascripts/code_sync/editor/templates/asset_selector.jst.skim b/site/source/javascripts/code_sync/editor/templates/asset_selector.jst.skim similarity index 100% rename from lib/assets/javascripts/code_sync/editor/templates/asset_selector.jst.skim rename to site/source/javascripts/code_sync/editor/templates/asset_selector.jst.skim diff --git a/lib/assets/javascripts/code_sync/editor/templates/document_manager_tab.jst.skim b/site/source/javascripts/code_sync/editor/templates/document_manager_tab.jst.skim similarity index 100% rename from lib/assets/javascripts/code_sync/editor/templates/document_manager_tab.jst.skim rename to site/source/javascripts/code_sync/editor/templates/document_manager_tab.jst.skim diff --git a/site/source/javascripts/code_sync/editor/templates/editor_panel.jst.skim b/site/source/javascripts/code_sync/editor/templates/editor_panel.jst.skim new file mode 100644 index 0000000..576f110 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/templates/editor_panel.jst.skim @@ -0,0 +1,5 @@ +.editor-wrapper + .editor + .editor + .editor +.editor-panel-toolbar diff --git a/site/source/javascripts/code_sync/editor/templates/editor_toolbar.jst.skim b/site/source/javascripts/code_sync/editor/templates/editor_toolbar.jst.skim new file mode 100644 index 0000000..798e081 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/templates/editor_toolbar.jst.skim @@ -0,0 +1,7 @@ +.toolbar-wrapper.fluid-row + .gspan4 + .controls.left + .gspan4 + .controls.middle + .gspan4 + .controls.right diff --git a/site/source/javascripts/code_sync/editor/templates/element_sync.jst.skim b/site/source/javascripts/code_sync/editor/templates/element_sync.jst.skim new file mode 100644 index 0000000..848547b --- /dev/null +++ b/site/source/javascripts/code_sync/editor/templates/element_sync.jst.skim @@ -0,0 +1,23 @@ +.element-sync-panel + header + h3 Template / DOM Sync + p Use this to compile a template to any part of the DOM + + .fluid-row.selector-info + .gspan9 + input name="css-selector" placeholder="Enter a CSS selector to sync with" + .gspan3 + .btn-group.actions + a.btn.done-button title="Finish syncing with his element" + i.icon.icon-check + a.btn.hide-panel-button title="Hide this panel, continue syncing." + i.icon.icon-export + a.btn.find-button title="Find an element" + i.icon.icon-hair-cross + a.btn.set-template-options title="Specify template code" + i.icon.icon-code + .fluid-row + .gspan9 + .element-sync-status + .gspan3 + .search-scope-description diff --git a/site/source/javascripts/code_sync/editor/templates/file_controls.jst.skim b/site/source/javascripts/code_sync/editor/templates/file_controls.jst.skim new file mode 100644 index 0000000..29ff28f --- /dev/null +++ b/site/source/javascripts/code_sync/editor/templates/file_controls.jst.skim @@ -0,0 +1,35 @@ +.form + .fluid-row + .gspan6 + .field.name.required + label Filename + .controls + input#document_name.modifiable type="text" name="name" placeholder="Enter a name for this file" value="#{ @name }" + .gspan6 + - if @folder? + .field.folder + label Folder + .controls + input#document_folder.modifiable type="text" name="folder" placeholder="Where will this file be stored? Relative to the project root" value="#{ @folder }" + + - if @path?.length > 0 + .field.current-file-location + label Current file location + .controls + input.read-only type="text" name="path" value="#{ @path }" + - else + .field.new-file-location + label New file location + .controls + input#document_path.read-only type="text" name="path" value="#{ @newPath }" + + .field + .btn-group + .btn.compile + | Compile + .btn.save-to-disk + | Save To Disk + + - if @path?.length > 0 + .btn.load-from-disk + | Reload diff --git a/site/source/javascripts/code_sync/editor/templates/preferences_panel.jst.skim b/site/source/javascripts/code_sync/editor/templates/preferences_panel.jst.skim new file mode 100644 index 0000000..5395ed6 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/templates/preferences_panel.jst.skim @@ -0,0 +1,50 @@ +form + - if @enableMode + .field.mode-selector + label + | Language + .controls + select name="mode" + + - if @enableKeyBindings + .field + label + | KeyBindings + .controls + select name="keyMap" + option value="default" Default + option value="vim" Vim + + - if @enableTheme + .field + label + | Theme + .controls + select name="theme" + option value="ambiance" Ambiance + option value="lesser-dark" Lesser Dark + option value="monokai" Monokai + option value="xq-light" XQ Light + + - if @enableEndpoint + .field + label + | Asset Compiler Endpoint + .controls + input type="text" name="asset_endpoint" value="#{ CodeSync.get('assetCompilationEndpoint') }" + + - if @enableHotKey + .field + label + | Hotkey + .controls + input type="text" name="editor_hotkey" value="#{ CodeSync.get('editorToggleHotkey') }" + + - if @enablePosition + .field + label + | Position + .controls + select name="position" + option value="top" Top + option value="bottom" Bottom diff --git a/site/source/javascripts/code_sync/editor/templates/script_loader.jst.hamlc b/site/source/javascripts/code_sync/editor/templates/script_loader.jst.hamlc new file mode 100644 index 0000000..19a93ce --- /dev/null +++ b/site/source/javascripts/code_sync/editor/templates/script_loader.jst.hamlc @@ -0,0 +1,36 @@ +.form + .card-view + .card.menu.active.boom + - if @packages.length >= 1 + .field + %label Select a package + .controls + %select{:name=>"load_package"} + %option{:value=>""} Select One + - for name in @packages.pluck('name') + %option{:value=>name} + #{ name } + + .field + %label + Enter a list of javascript Urls + .controls + %textarea{:name=>"package_text"} + .action-row + %a.btn.btn-primary.submit + Load Resources + %a.btn.finished + Cancel + + .card.results + .field + %label Package Name + %input{:type=>"text",:name=>"package_name"} + + %ul.results-container + + .action-row + %a.btn.btn-primary.save-as-package + Save As Package + %a.btn.finished + Finished diff --git a/site/source/javascripts/code_sync/editor/templates/stylesheet_loader.jst.hamlc b/site/source/javascripts/code_sync/editor/templates/stylesheet_loader.jst.hamlc new file mode 100644 index 0000000..4ce4230 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/templates/stylesheet_loader.jst.hamlc @@ -0,0 +1,36 @@ +.form + .card-view + .card.menu.active.boom + - if @packages.length >= 1 + .field + %label Select a package + .controls + %select{:name=>"load_package"} + %option{:value=>""} Select One + - for name in @packages.pluck('name') + %option{:value=>name} + #{ name } + + .field + %label + Enter a list of stylesheet Urls + .controls + %textarea{:name=>"package_text"} + .action-row + %a.btn.btn-primary.submit + Load Resources + %a.btn.finished + Cancel + + .card.results + .field + %label Package Name + %input{:type=>"text",:name=>"package_name"} + + %ul.results-container + + .action-row + %a.btn.btn-primary.save-as-package + Save As Package + %a.btn.finished + Finished diff --git a/site/source/javascripts/code_sync/editor/templates/toolbar_button.jst.hamlc b/site/source/javascripts/code_sync/editor/templates/toolbar_button.jst.hamlc new file mode 100644 index 0000000..3d82b56 --- /dev/null +++ b/site/source/javascripts/code_sync/editor/templates/toolbar_button.jst.hamlc @@ -0,0 +1,5 @@ +%a.toolbar-button.button{"data-button-id"=>@buttonId,:title=>@tooltip} + - if @icon + %i{:class=>"icon icon-#{ @icon }"} + - if @text + %span #{ @text } diff --git a/site/source/javascripts/code_sync/editor/templates/toolbar_panel.jst.hamlc b/site/source/javascripts/code_sync/editor/templates/toolbar_panel.jst.hamlc new file mode 100644 index 0000000..83acb7d --- /dev/null +++ b/site/source/javascripts/code_sync/editor/templates/toolbar_panel.jst.hamlc @@ -0,0 +1 @@ +.editor-utility \ No newline at end of file diff --git a/site/source/javascripts/code_sync/embeddable/index.coffee b/site/source/javascripts/code_sync/embeddable/index.coffee new file mode 100644 index 0000000..7a3a3bc --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/index.coffee @@ -0,0 +1,44 @@ +#= require_tree ./templates +#= require ./panel +#= require ./view +#= require ./plugins/embeddable_preferences +#= require ./plugins/resizable +#= require ./plugins/file_controls +#= require ./plugins/mode_selector +#= require ./plugins/element_sync +#= require ./plugins/positionable +#= require ./plugins/slide_drawer + + +#= require_self + +CodeSync.Embeddable = + instances: {} + +CodeSync.Embeddable.createIn = (container, options={})-> + container = $(container) + + container.addClass("layout-visualization") + + if options.width + container.css('width', options.width) + + if options.empty + container.empty() + + if existing = container.data('embeddable-instance') + existing = CodeSync.Embeddable.instances[existing] + existing?.remove() + + delete CodeSync.Embeddable.instances[existing] + + embeddable = new CodeSync.EmbeddableView(options) + embeddable.renderIn(container, options) + + embeddable.draggableElement = container unless container.is('body') + embeddable.positionableElement = container unless container.is('body') + + CodeSync.Embeddable.instances[embeddable.cid] = embeddable + + embeddable + diff --git a/site/source/javascripts/code_sync/embeddable/panel.coffee b/site/source/javascripts/code_sync/embeddable/panel.coffee new file mode 100644 index 0000000..67b108f --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/panel.coffee @@ -0,0 +1,167 @@ +# The EditorPanel +# Wraps the EditorComponent and Toolbar + + +CodeSync.EditorPanel = Backbone.View.extend + className: "embeddable-editor-panel" + + template: "embeddable-editor-panel" + + defaultEditorPlugins:[ + "ElementSync" + "ColorPicker" + "LanguageSelector" + ] + + defaultToolbarItems: + top:[ + icon: "comment" + tooltop: "Select the language" + action: "selectLanguage" + section: "left" + , + icon: "fullscreen" + tooltip: "Re-arrange this panel" + action: "rearrange" + section: "right" + eventListener: "mousedown" + , + icon: "expand-editor" + tooltip: "Expand this editor" + action: "expand" + section: "right" + ] + + initialize: (@options)-> + _.extend(@, @options) + + @toolbarItems ||= @defaultToolbarItems || {} + + @editorPlugins ||= @defaultEditorPlugins + + @$el.html CodeSync.template(@template, @) + + @$el.removeClass 'active' + + Backbone.View::initialize.apply(@, arguments) + + addToolbarItem: (item, options={})-> + {position} = options + + itemElement = $(CodeSync.template(item.template || "embeddable-toolbar-item", item)) + container = @$(">.toolbar.#{ position }").removeClass('empty') + + if item.section? + container = container.find('.' + item.section).removeClass('empty, fpo') + + container.append(itemElement) + + if item.action + itemElement.on (item.eventListener || "click"), (e)=> + @handleToolbarClick.call(@, item.action, item, e) + + handleToolbarClick: (action,item,e)-> + @[action]() + + preferences: ()-> + @preferencesPanel = new CodeSync.plugins.PreferencesPanel(editor: @) + @preferencesPanel.show() + + setupCodeMirror: ()-> + @renderEditorComponent().setupCodeMirror() + + renderToolbars: ()-> + for position, items of @toolbarItems + @addToolbarItem(item, {position}) for item in items + + renderEditorComponent: ()-> + @editor ||= new CodeSync.EditorComponent + documentManager: @documentManager || @parent.documentManager + plugins: @editorPlugins + theme: @theme + keyBindings: @keyBindings + startMode: @startMode + restrictMode: true + onCodeMirrorSetup: (codeMirror, component)=> + console.log "Setting up codemirror bindings on", @, component + @setupCodeMirrorBindings(codeMirror, component) + + @editor.parent = @ + + + unless @editor.rendered is true + @$('.editor-component').html(@editor.render().el) + + @editor + + renderIn: (container)-> + $(container).append @render().el + @ + + render: ()-> + @renderToolbars() + @ + + expand: ()-> + @parent.expandPanel(@) + + rearrange: ()-> + el = @$el + parent = @parent + + parentEl = @$el.parents('.codesync-embeddable') + width = @$el.width() + height = @$el.height() + original = @$el.position().left + all = @$el.parent().children('.embeddable-editor-panel') + count = all.length + + if @$el.is(".animating.ui-draggable") + @$el.draggable('destroy').removeClass('animating') + parentEl.removeClass('rearranging') + return + + @$el.addClass('animating').draggable + axis: 'x' + handle: ".icon.icon-fullscreen" + snap: ".embeddable-editor-panel" + containment: ".codesync-embeddable" + start: ()-> + parentEl.addClass 'rearranging' + stop: ()-> + all.removeClass('animating') + _.delay ()-> + parentEl.removeClass('rearranging') + parent?.redraw() + , 400 + + @$el.siblings('.embeddable-editor-panel').droppable + accept: @$el + drop: (e,options)-> + target = $(e.target) + me = $(@) + all.removeClass('animating') + + me.animate(left: "#{ original }px" ) + + _.delay ()-> + parentEl.removeClass('rearranging') + parent?.redraw() + , 400 + + selectLanguage: ()-> + @editor.languageSelector.toggle() + + setOriginalPosition: (settings)-> + @$el.css(settings) + @originalPosition = settings + + setKeyMap: ()-> + @editor.setKeyMap.apply(@editor, arguments) + + setTheme: ()-> + @editor.setTheme.apply(@editor, arguments) + + setupCodeMirrorBindings: (codeMirror, component)-> + codeMirror.on "focus", ()=> + @trigger "focus", @, component, codeMirror diff --git a/site/source/javascripts/code_sync/embeddable/plugins/element_sync.coffee b/site/source/javascripts/code_sync/embeddable/plugins/element_sync.coffee new file mode 100644 index 0000000..7520ec0 --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/plugins/element_sync.coffee @@ -0,0 +1,113 @@ +CodeSync.plugins.ElementSync = CodeSync.EditorUtility.extend + buttonIcon: "loop" + + tooltip: "Sync markup content with the DOM" + + className: "codesync-element-sync" + + action: "html" + + visible: false + + panelTemplate: "element_sync" + + availableInModes: "template" + + handle: "elementSync" + + events: + "keyup input" : (e)-> + if $(e.target).val() is "" + @selectedElement = undefined + + @bindToSelector() + + "change select": (e)-> + @action = @$(e.target).val() + + "click .hide-panel-button" : ()-> + @syncWithElement(@editor.currentDocument) + @editor.currentDocument?.trigger("change:contents") + @hide(withEffect: true) + + "click .find-button" : ()-> + root = @searchScope || window + + el = root.$('body') + + el.on "inspekt", (e, selected)=> + @selectElement $(selected.target) + + CodeSync.util.inspectElementsWithin({root,el}) + + "click .done-button" : ()-> + @clear() + + initialize: (@options={})-> + _.extend(@,@options) + + @bindToSelector = _.debounce ()=> + @selector = @getValue() + @$elementSync = (@searchScope || window).$(@selector) + @status() + , 500 + + @editor.on "code:sync:template", @syncWithElement, @ + + CodeSync.EditorUtility::initialize.apply(@, arguments) + + selectElement: (@selectedElement, display)-> + id = $(@selectedElement).attr('id') + cls = $(@selectedElement).attr('class') + + if !display? && $(@selectedElement).length > 0 + display = $(@selectedElement)[0].tagName + display += "##{ id }" if id? + display += ".#{ cls }" if cls? + + @$('input[name="css-selector"]').val(display) + + @selector = @selectedElement + + @bindToSelector + + syncWithElement: (doc)-> + return unless doc && @selector && tmpl = doc.templateFunction() + vars = CodeSync.plugins.ElementSync.getTemplateVariables?() || {} + + @$elementSync?[@action || "html"](tmpl(vars)) + + getSelectorContents: ()-> + @$elementSync.html() + + getValue: ()-> + @selectedElement || @$('input[name="css-selector"]').val() + + setValue: (@selector)-> + @$('input[name="css-selector"]').val(@selector) + @bindToSelector() + + clear: ()-> + @$('input[name="css-selector"]').val('') + @selector = @selectedElement = @$elementSync = undefined + @$('.element-sync-status').html("") + + existsInDocument: ()-> + @$elementSync?.length > 0 + + status: ()-> + length = @$elementSync?.length + + msg = if length is 0 && @getValue()?.length > 0 + "CSS Selector not found" + else if length is 1 + "1 total element" + else if length > 0 + "#{ length } total elements" + else + "" + + if name = (@searchScope || window)?.name + @$('.search-scope-description').html(name) + + @$('.element-sync-status').html(msg) diff --git a/site/source/javascripts/code_sync/embeddable/plugins/embeddable_preferences.coffee b/site/source/javascripts/code_sync/embeddable/plugins/embeddable_preferences.coffee new file mode 100644 index 0000000..55c34b9 --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/plugins/embeddable_preferences.coffee @@ -0,0 +1,124 @@ +# Preferences Panel which controls the settings of all +# EditorComponent instances inside of an EmbeddableView + +CodeSync.plugins.EmbeddablePreferences = Backbone.View.extend + visible: false + + entranceEffect: "fadeIn" + exitEffect: "fadeOut" + + className: "embeddable-utility-panel bottom-aligned embeddable-preferences" + + events: + "change select": "setOption" + "click .cancel": "hide" + "click .set-default-preferences": "setDefaultPreferences" + + "keyup input" : _.debounce ((e)-> @setOption(e)), 850 + + initialize: (@options={})-> + _.extend(@,@options) + + @embeddable.once "after:render", ()=> + if defaults = localStorage.getItem('codesync-default-preferences') + if _.isString(defaults) + for name, value of JSON.parse(defaults) + @["set#{ _.str.capitalize(name) }"](value) + + Backbone.View::initialize.apply(@, arguments) + + setDefaultPreferences: ()-> + localStorage.setItem 'codesync-default-preferences', JSON.stringify + height: @embeddable.height + width: @embeddable.width + layout: @embeddable.layout + position: @embeddable.position?.value + keyMap: @embeddable.keyMap + theme: @embeddable.theme + + setOption: (e)-> + target = @$(e.target) + value = target.val() + name = target.attr 'name' + + @["set#{ _.str.capitalize(name) }"](value) + + setTheme: (option)-> + @embeddable.theme = option + @embeddable.$el.attr('data-theme', option ) + @embeddable.each (editor)-> editor.editor.setTheme(option) + + setKeyMap: (option)-> + @embeddable.keyMap = option + @embeddable.$el.attr('data-keymap', option ) + @embeddable.each (editor)-> editor.editor.setKeyMap(option) + + # This is a hack until I can get the CSS + # figured out. How to make the editor panel + # and codemirror elements automatically grow vertically. + setHeight: (height)-> + @embeddable.height = height + @embeddable.$el.css('height', height) + @embeddable.redraw() + + setWidth:(width)-> + @embeddable.width = width + @embeddable.$el.css('width', width) + @embeddable.redraw() + + setLayout: (option)-> + @embeddable.layout = option + @embeddable.$el.attr('data-layout', option) + + setPosition:(option)-> + @embeddable.$el.attr('data-position', option) + @embeddable.position.value = option + @embeddable.position.set(option) + + show: ()-> + @visible = true + @render() + @setValues() + @$el.removeClass(@exitEffect).addClass("animated #{ @entranceEffect }") + @ + + hide: ()-> + @visible = false + @$el.removeClass(@entranceEffect).addClass("animated #{ @exitEffect }") + @ + + toggle: ()-> + if @visible then @hide() else @show() + @ + + setValues: ()-> + @$("input[name='height']").val( @embeddable.$el.height() ) + @$("input[name='width']").val( @embeddable.$el.width() ) + @$('.layout-selector').val( @embeddable.$el.attr('data-layout') ) + @$('.theme-selector').val( @embeddable.$el.attr('data-theme') ) + @$('.position-selector').val( @embeddable.$el.attr('data-position') ) + @$('.keymap-selector').val( @embeddable.$el.attr('data-keymap') ) + + render: ()-> + return @ if @rendered + + @embeddable.$el.append( @el ) + + settings = + theme: @embeddable?.theme + keybindings: @embeddable?.keybindings + + @$el.html CodeSync.template("embeddable-preferences", settings) + + @rendered = true + @ + + +CodeSync.plugins.EmbeddablePreferences.setup = (embeddable,options={})-> + options.embeddable = @ + + panel = new CodeSync.plugins.EmbeddablePreferences(options) + panel.embeddable = @ + + console.log @preferencesPanel = panel + diff --git a/site/source/javascripts/code_sync/embeddable/plugins/file_controls.coffee b/site/source/javascripts/code_sync/embeddable/plugins/file_controls.coffee new file mode 100644 index 0000000..5067c6b --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/plugins/file_controls.coffee @@ -0,0 +1,70 @@ +CodeSync.plugins.FileControls = CodeSync.EditorUtility.extend + buttonIcon: "save" + + handle: "fileControls" + + availableInModes: "all" + + className: "file-controls" + + panelTemplate: "file_controls" + + tooltip: "Open, Save, Create, etc." + + events: + "click .save-to-disk": "saveToDisk" + "click .load-from-disk": "loadFromDisk" + "click .compile": "compileDocument" + + "focus .read-only": (e)-> $(e.target).blur() + + "keyup input.modifiable": "updateDocumentAttributes" + "blur input.modifiable": "updateDocumentAttributes" + + initialize: (@options={})-> + _.extend(@, @options) + CodeSync.EditorUtility::initialize.apply @, arguments + + @updateDocumentAttributes = _.debounce(@updateDocumentAttributes, 400) + + show: ()-> + @syncWithDocument() + CodeSync.EditorUtility::show.apply(@, arguments) + + saveToDisk: ()-> + @doc.set("doNotSave", false) + @doc.saveToDisk() + + loadFromDisk: ()-> + @doc.loadSourceFromDisk() + + compileDocument: ()-> + @doc.set("doNotSave", false) + @doc.sendToServer(false) + + updateDocumentAttributes: ()-> + name = @$('#document_name').val() + folder = @$('#document_folder').val() + path = (CodeSync.get("projectRoot") + "/#{ folder }/#{ name }").replace("//","/") + + @doc.set {path,name,folder} + + templateOptions: ()-> + name: @doc.nameWithExtension() + path: @doc.get("path") + folder: @doc.folder() + newPath: @doc.newPath() + + syncWithDocument: ()-> + if old = @doc + @doc.off "change", @applyTemplate + + if @doc = @editor.currentDocument + @doc.on "change", @applyTemplate, @ + + @applyTemplate() + + + + + diff --git a/site/source/javascripts/code_sync/embeddable/plugins/mode_selector.coffee b/site/source/javascripts/code_sync/embeddable/plugins/mode_selector.coffee new file mode 100644 index 0000000..22c449e --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/plugins/mode_selector.coffee @@ -0,0 +1,64 @@ +# Allows a user to select from a list of modes to change +# the editor language +CodeSync.plugins.LanguageSelector = Backbone.View.extend + visible: false + + entranceEffect: "fadeIn" + exitEffect: "fadeOut" + + className: "embeddable-utility-panel top-aligned embeddable-mode-selector" + + events: + "change select": "setOption" + "click .cancel": "hide" + + initialize: (@options={})-> + _.extend(@,@options) + + Backbone.View::initialize.apply(@, arguments) + + @modes = @editor.modes + + restrictedModes: ()-> + editorMode = @editor.startMode || "any" + console.log "Restricting to", editorMode.type() + @modes.select (mode)-> + mode.isOfType editorMode.type() + + setOption: (e)-> + target = @$(e.target) + value = target.val() + name = target.attr 'name' + + @["set#{ _.str.capitalize(name) }"](value) + + show: ()-> + @visible = true + @render() + @setValues() + @$el.removeClass(@exitEffect).addClass("animated #{ @entranceEffect }") + @ + + hide: ()-> + @visible = false + @$el.removeClass(@entranceEffect).addClass("animated #{ @exitEffect }") + @ + + toggle: ()-> + if @visible then @hide() else @show() + @ + + setValues: ()-> + + render: ()-> + return @ if @rendered + + @$el.html CodeSync.template("embeddable-mode-selector", @) + @editor.parent.$el.append(@el) + + @rendered = true + @ + + +CodeSync.plugins.LanguageSelector.setup = (editor,options={})-> + editor.languageSelector = new CodeSync.plugins.LanguageSelector(editor: @) diff --git a/site/source/javascripts/code_sync/embeddable/plugins/positionable.coffee b/site/source/javascripts/code_sync/embeddable/plugins/positionable.coffee new file mode 100644 index 0000000..fb28e3d --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/plugins/positionable.coffee @@ -0,0 +1,39 @@ +CodeSync.plugins.Positionable = + setup: (embeddable, options)-> + embeddable.position = {} + embeddable.$el.addClass('visible') + + set = (option)-> + # fuck it + height = (@positionableElement || @$el).height() + width = (@positionableElement || @$el).width() + + embeddable.$el.attr 'data-position', option + + el = (@positionablElement || @$el) + + switch option + when "bottom" + el.css + position: 'fixed' + bottom: "0px" + left: '50%' + "margin-left": 0.5 * width * -1 + + when "top" + el.css + position: 'fixed' + top: "0px" + left: '50%' + "margin-left": 0.5 * width * -1 + + when "draggable" + el.css + left: '50%' + "margin-left": 0.5 * width * -1 + + (@draggableElement || @positionableElement).draggable(handle: ".drag-handle") + + + embeddable.position.set = (option)-> + set.call(embeddable, option) diff --git a/site/source/javascripts/code_sync/embeddable/plugins/resizable.coffee b/site/source/javascripts/code_sync/embeddable/plugins/resizable.coffee new file mode 100644 index 0000000..b854c03 --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/plugins/resizable.coffee @@ -0,0 +1,4 @@ + +CodeSync.plugins.Resizable= setup: (embeddable)-> + embeddable.on "ready", -> + embeddable.$el.resizable({ handles: "n, e, s, w" }); diff --git a/site/source/javascripts/code_sync/embeddable/plugins/slide_drawer.coffee b/site/source/javascripts/code_sync/embeddable/plugins/slide_drawer.coffee new file mode 100644 index 0000000..7af1c18 --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/plugins/slide_drawer.coffee @@ -0,0 +1,42 @@ +CodeSync.plugins.SlideDrawer = + setup: (embeddable,options)-> + el = embeddable.$el + embeddable.visible = true + + embeddable.height = el.height() + + embeddable.events["click .visibility-handle"] = ()-> + action = if embeddable.visible is true then "hide" else "show" + handler = embeddable.$el.attr('data-position') + helpers[handler].call(embeddable, action) + + embeddable.delegateEvents() + +helpers = + bottom: (action="show")-> + el = @$el + embeddable = @ + + if action is "show" + el.animate {'bottom': 0, height: embeddable.height}, complete: ()-> + embeddable.visible = true + el.addClass('visible') + else if action is "hide" + el.animate {'bottom': 0, height: 0}, complete: ()-> + embeddable.visible = false + el.removeClass('visible') + + top: (action="show")-> + el = @$el + embeddable = @ + + height = el.height() + + if action is "show" + el.animate {'top': 0}, complete: ()-> + embeddable.visible = true + el.addClass('visible') + else if action is "hide" + el.animate {'top': ((height * -1) + 25 )}, complete: ()-> + embeddable.visible = false + el.removeClass('visible') diff --git a/site/source/javascripts/code_sync/embeddable/templates/codesync-embeddable.jst.skim b/site/source/javascripts/code_sync/embeddable/templates/codesync-embeddable.jst.skim new file mode 100644 index 0000000..dfa41ca --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/templates/codesync-embeddable.jst.skim @@ -0,0 +1,20 @@ +.panels-wrapper + +.toolbar.global-toolbar.clearfix + section.left + .button.toggle-preferences + i.icon.icon-cog + + section.center + a.button.drag-handle title="drag this editor around" + i.icon.icon-align-justify + + a.button.visibility-handle title="slide the editor in and out of view" + i.icon.icon-double-angle-down.slide-in + i.icon.icon-double-angle-up.slide-out + + section.right + .button + a.button.toggle-document-loader title="load a document from your project" + i.icon.icon-search + diff --git a/site/source/javascripts/code_sync/embeddable/templates/embeddable-editor-panel.jst.skim b/site/source/javascripts/code_sync/embeddable/templates/embeddable-editor-panel.jst.skim new file mode 100644 index 0000000..3b2b15f --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/templates/embeddable-editor-panel.jst.skim @@ -0,0 +1,10 @@ +.toolbar.top.empty + section.left + |  + section.middle + |  + section.right + |  + .clearfix + +.editor-component diff --git a/site/source/javascripts/code_sync/embeddable/templates/embeddable-mode-selector.jst.skim b/site/source/javascripts/code_sync/embeddable/templates/embeddable-mode-selector.jst.skim new file mode 100644 index 0000000..a20a6bc --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/templates/embeddable-mode-selector.jst.skim @@ -0,0 +1,6 @@ +.field + label Select a language + ul.inline.option-selector + - for mode in @restrictedModes() + li.option data-option=mode.id #{ _.str.capitalize(mode.get('name')) } + diff --git a/site/source/javascripts/code_sync/embeddable/templates/embeddable-preferences.jst.skim b/site/source/javascripts/code_sync/embeddable/templates/embeddable-preferences.jst.skim new file mode 100644 index 0000000..0996928 --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/templates/embeddable-preferences.jst.skim @@ -0,0 +1,57 @@ +.form-control + .fluid-row + .gspan4 + .field + label Theme + .controls + select.theme-selector name="theme" + option value="" Select One + option value="lesser-dark" Lesser Dark + option value="ambiance" Ambiance + option value="xq-light" XQ Light + .field + label Keybindings + .controls + select.keymap-selector name="keyMap" + option value="" Default + option value="vim" Vim + + .gspan4 + .field.layout-selector + label Editors + .controls + select.layout-selector name="layout" + option value="" Select One + option value="3" Three + option value="2" Two + option value="1" One + + + .field.position-selector + label Positioning + .controls + select.position-selector name="position" + option value="" Select One + option value="draggable" Draggable + option value="bottom" Bottom Drawer + option value="top" Top Drawer + + .gspan4 + .field + label Height + .controls + input.input-small type="text" name="height" + + .field + label Width + .controls + input.input-small type="text" name="width" + + + .action-row + a.btn.btn-primary.set-default-preferences + i.icon.icon-save + | Save As Defaults + a.btn.cancel + i.icon.icon-close + | Close diff --git a/site/source/javascripts/code_sync/embeddable/templates/embeddable-toolbar-item.jst.skim b/site/source/javascripts/code_sync/embeddable/templates/embeddable-toolbar-item.jst.skim new file mode 100644 index 0000000..9f1c2bf --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/templates/embeddable-toolbar-item.jst.skim @@ -0,0 +1,2 @@ +a.button title="#{ @tooltip }" + span class="icon icon-#{ @icon }" diff --git a/site/source/javascripts/code_sync/embeddable/view.coffee b/site/source/javascripts/code_sync/embeddable/view.coffee new file mode 100644 index 0000000..6e6e17f --- /dev/null +++ b/site/source/javascripts/code_sync/embeddable/view.coffee @@ -0,0 +1,173 @@ +CodeSync.EmbeddableView = Backbone.View.extend + + className: "codesync-embeddable" + + template: "codesync-embeddable" + + defaultEditorConfig: + template: + startMode: "skim" + + style: + startMode: "scss" + + script: + startMode: "cofeescript" + + + plugins:[ + "Draggable" + "EmbeddablePreferences" + "Resizable" + "Positionable" + "SlideDrawer" + ] + + events: + "click .toggle-preferences" : ()-> + @preferencesPanel.toggle() + + initialize:(@options={})-> + _.extend(@,@options) + @toolbarItems = @defaultToolbarItems || {} + @editorConfig = @defaultEditorConfig || {} + @documentManager = new CodeSync.DocumentManager() + + for plugin in @plugins when CodeSync.plugins[plugin]? + CodeSync.plugins[plugin].setup?.call(@, @, @pluginOptions?[plugin]) + + + addEditorPanel: (editor)-> + @panelCount ||= 0 + @editorPanelWrapper ||= @$('.panels-wrapper') + + panel = new CodeSync.EditorPanel(editor) + panel.parent = @ + + panel.$el.attr("data-panel", @panelCount++) + + panel.renderIn(@editorPanelWrapper) + + @trigger "editor:added", panel + + panel.on "focus", ()=> + panel.$el.siblings('.embeddable-editor-panel').removeClass('active') + panel.$el.addClass('active') + + panel.active = true + for other in @panels when other isnt panel + other.active = false + + panel + + setLayout: (layout)-> + @trigger "layout:change", @layout, @layout=layout + @$el.attr('data-layout', @layout) + + redraw: ()-> + @height ||= @$el.height() + @width ||= @$el.width() + + toolbarHeight = @$('.global-toolbar').height() + @$('.CodeMirror, .editor-compoent, .embeddable-editor-panel').height(@height - toolbarHeight) + + count = @panels.length + itemWidth = @width / count + + @panels = _(@panels).sortBy (panel)-> panel.$el.css('left') + + for panel, index in @panels + el = panel.$el + el.removeClass('first').removeClass('last') + el.addClass('first') if index is 0 + el.addClass('last') if index is count - 1 + el.css('left', itemWidth * index) + + renderEditors: ()-> + @editors ||= {} + + @panels = for name, editor of @editorConfig + @addEditorPanel(_.defaults(editor,{name})) + + for panel, index in @panels + settings = + 'width': "#{ (1/@panels.length) * 100 }%" + 'left':"#{ (1/@panels.length) * 100 * index }%" + + panel.setOriginalPosition(settings) + + @setLayout("#{ @panels.length }") + + each: (args...)-> + _(@panels).each(args...) + + detect: (args...)-> + _(@panels).detect(args...) + + select: (args...)-> + _(@panels).select(args...) + + map: (args...)-> + _(@panels).map(args...) + + activePanel: ()-> + @detect (panel)-> panel.active is true + + render: ()-> + @$el.html(CodeSync.template(@template)) + _.defer ()=> + @redraw() + @trigger "after:render" + @ + + renderIn: (container, options={})-> + container.append( @render().el ).attr('data-embeddable-instance', @cid) + + @renderEditors() + + _(@panels).each (panel)-> + panel.setupCodeMirror() + _.delay ()-> + value = panel.editor.currentDocument.toContent() + panel.editor.codeMirror.setValue(value) + , 5 + + @trigger "ready" + + @ + + expandDelay: 600 + + expandPanel: (panel)-> + @$el.addClass 'animating' + + el = panel.$el + index = el.index() + + if panel.expanded is true + + el.addClass 'animating' + + el.animate panel.originalPosition, complete: ()=> + _.delay ()=> + el.removeClass 'expanded' + @$el.removeClass 'animating' + el.removeClass 'animating' + panel.expanded = false + , @expandDelay + + else + fullSettings = + width: "100%" + left: "0%" + right: "0%" + + el.addClass 'animating' + + _.delay ()=> + el.animate fullSettings, complete: ()=> + panel.expanded = true + el.addClass('expanded') + @$el.removeClass 'animating' + el.removeClass('animating') + , @expandDelay diff --git a/site/source/javascripts/code_sync/index.coffee b/site/source/javascripts/code_sync/index.coffee new file mode 100644 index 0000000..fc5d0e6 --- /dev/null +++ b/site/source/javascripts/code_sync/index.coffee @@ -0,0 +1,13 @@ +#= require ./vendor/keylauncher +#= require ./dependencies +#= require ./codemirror +#= require ./config +#= require_self +#= require ./client +#= require_tree ./lib +#= require_tree ./datasources +#= require ./editor +#= require ./templates +#= require ./change-handling + + diff --git a/site/source/javascripts/code_sync/lib/local_store.coffee b/site/source/javascripts/code_sync/lib/local_store.coffee new file mode 100644 index 0000000..3a39dd1 --- /dev/null +++ b/site/source/javascripts/code_sync/lib/local_store.coffee @@ -0,0 +1,62 @@ +CodeSync.LocalStore = Backbone.Collection.extend + initialize:(models=[],@options={})-> + _.extend(@, options) + throw "LocalStore collections must specify a namespace property" unless @namespace? + + @localStorage = new CodeSync.LocalStorageAdapter(name: @namespace) + + @url = "null" + + Backbone.Collection::initialize.apply(@, arguments) + + +class CodeSync.LocalStorageAdapter + + # think of name the way you would a table in a mysql db + constructor: (@name)-> + store = localStorage.getItem(@name) + @data = ( store && JSON.parse(store) ) || {} + + guid: ()-> + S4 = ()-> (((1+Math.random())*0x10000)|0).toString(16).substring(1) + (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()) + + # serialize the store into JSON and put it in the localStorage + save: ()-> + localStorage.setItem(@name, JSON.stringify(@data) ) + + create: (model)-> + model.id = model.attribtues.id = @guid() unless model.id + @data[ model.id ] = model + @save() + model + + update: (model)-> + @data[model.id] = model + @save() + model + + find: (model)-> @data[ model.id ] + + findAll: ()-> + _.values( @data ) + + destroy: (model)-> + delete @data[ model.id ] + @save() + model + +CodeSync.LocalStore::sync = (method, model, options)-> + store = model.localStorage || model.collection.localStorage + + resp = switch method + when "read" then (if model.id then store.find(model) else store.findAll()) + when "create" then store.create(model) + when "update" then store.update(model) + when "delete" then store.destroy(model) + + if resp + options.success(resp) + else + options.error("Record not found") + diff --git a/site/source/javascripts/code_sync/reloader.coffee b/site/source/javascripts/code_sync/reloader.coffee new file mode 100644 index 0000000..42db533 --- /dev/null +++ b/site/source/javascripts/code_sync/reloader.coffee @@ -0,0 +1,8 @@ +#= require ./config +#= require ./client +#= require ./change-handling +#= require_self +# + +unless _? + throw "CodeSync depends on the underscore library at this time" diff --git a/site/source/javascripts/code_sync/templates.coffee b/site/source/javascripts/code_sync/templates.coffee new file mode 100644 index 0000000..f97d964 --- /dev/null +++ b/site/source/javascripts/code_sync/templates.coffee @@ -0,0 +1,10 @@ +CodeSync.template = (templateIdentifier, variables={})-> + if tmpl = JST[templateIdentifier] + return tmpl(variables) + + regex = new RegExp("#{ templateIdentifier }$") + + for templateName, templateFunction of JST when templateName.match(regex) + return templateFunction(variables) + +#CodeSync.template.namespaces = ["JST"] diff --git a/lib/assets/javascripts/vendor/.DS_Store b/site/source/javascripts/code_sync/vendor/.DS_Store similarity index 100% rename from lib/assets/javascripts/vendor/.DS_Store rename to site/source/javascripts/code_sync/vendor/.DS_Store diff --git a/lib/assets/javascripts/vendor/backbone-events.js b/site/source/javascripts/code_sync/vendor/backbone-events.js similarity index 100% rename from lib/assets/javascripts/vendor/backbone-events.js rename to site/source/javascripts/code_sync/vendor/backbone-events.js diff --git a/lib/assets/javascripts/vendor/backbone-min.js b/site/source/javascripts/code_sync/vendor/backbone-min.js similarity index 100% rename from lib/assets/javascripts/vendor/backbone-min.js rename to site/source/javascripts/code_sync/vendor/backbone-min.js diff --git a/lib/assets/javascripts/vendor/codemirror-coffeescript.js b/site/source/javascripts/code_sync/vendor/codemirror-coffeescript.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-coffeescript.js rename to site/source/javascripts/code_sync/vendor/codemirror-coffeescript.js diff --git a/lib/assets/javascripts/vendor/codemirror-css.js b/site/source/javascripts/code_sync/vendor/codemirror-css.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-css.js rename to site/source/javascripts/code_sync/vendor/codemirror-css.js diff --git a/lib/assets/javascripts/vendor/codemirror-haml.js b/site/source/javascripts/code_sync/vendor/codemirror-haml.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-haml.js rename to site/source/javascripts/code_sync/vendor/codemirror-haml.js diff --git a/lib/assets/javascripts/vendor/codemirror-htmlmixed.js b/site/source/javascripts/code_sync/vendor/codemirror-htmlmixed.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-htmlmixed.js rename to site/source/javascripts/code_sync/vendor/codemirror-htmlmixed.js diff --git a/lib/assets/javascripts/vendor/codemirror-javascript.js b/site/source/javascripts/code_sync/vendor/codemirror-javascript.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-javascript.js rename to site/source/javascripts/code_sync/vendor/codemirror-javascript.js diff --git a/lib/assets/javascripts/vendor/codemirror-markdown.js b/site/source/javascripts/code_sync/vendor/codemirror-markdown.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-markdown.js rename to site/source/javascripts/code_sync/vendor/codemirror-markdown.js diff --git a/lib/assets/javascripts/vendor/codemirror-ruby.js b/site/source/javascripts/code_sync/vendor/codemirror-ruby.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-ruby.js rename to site/source/javascripts/code_sync/vendor/codemirror-ruby.js diff --git a/lib/assets/javascripts/vendor/codemirror-sass.js b/site/source/javascripts/code_sync/vendor/codemirror-sass.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-sass.js rename to site/source/javascripts/code_sync/vendor/codemirror-sass.js diff --git a/lib/assets/javascripts/vendor/codemirror-skim.js b/site/source/javascripts/code_sync/vendor/codemirror-skim.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-skim.js rename to site/source/javascripts/code_sync/vendor/codemirror-skim.js diff --git a/lib/assets/javascripts/vendor/codemirror-vim.js b/site/source/javascripts/code_sync/vendor/codemirror-vim.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-vim.js rename to site/source/javascripts/code_sync/vendor/codemirror-vim.js diff --git a/lib/assets/javascripts/vendor/codemirror-xml.js b/site/source/javascripts/code_sync/vendor/codemirror-xml.js similarity index 100% rename from lib/assets/javascripts/vendor/codemirror-xml.js rename to site/source/javascripts/code_sync/vendor/codemirror-xml.js diff --git a/lib/assets/javascripts/vendor/console.js b/site/source/javascripts/code_sync/vendor/console.js similarity index 100% rename from lib/assets/javascripts/vendor/console.js rename to site/source/javascripts/code_sync/vendor/console.js diff --git a/site/source/javascripts/code_sync/vendor/css-utilities-selector.js b/site/source/javascripts/code_sync/vendor/css-utilities-selector.js new file mode 100644 index 0000000..36cb637 --- /dev/null +++ b/site/source/javascripts/code_sync/vendor/css-utilities-selector.js @@ -0,0 +1,16 @@ +// (C) 2009 henrik.lindqvist@llamalab.com + +new function(){function Selector(p,c){if(!(this instanceof Selector))return new Selector(p).exec(c);if(!qsa)this.exec=cache[p]||(cache[p]=new compile(p));this.pattern=p;} +Selector.prototype={constructor:Selector,exec:function(c){var pe=this.patchElement,pa=this.patchArray,p=this.pattern,r=pe?map.call((c||d).querySelectorAll(p),pe,this):Array.prototype.slice.call((c||d).querySelectorAll(p));return pa?pa.call(this,r):r;},toString:function(){return this.pattern;},toSource:function(){return'new Selector("'+this.pattern+'")';}};window.Selector=Selector;function $(s){var a=arguments;return s.replace(/\$(\d)/g,function(m,i){return a[i]});} +with(navigator.userAgent){var ie=indexOf('MSIE')!=-1&&indexOf('Opera')==-1,mz=indexOf('Gecko')!=-1&&indexOf('KHTML')==-1,wk=indexOf('AppleWebKit')!=-1;} +var d=document,de=d.documentElement,qsa=!!d.querySelectorAll,bcn=!!d.getElementsByClassName,cnl=!!de.children,cnlt=cnl&&de.children.tags&&!wk,ec=!!de.contains,cdp=!!de.compareDocumentPosition,si=typeof de.sourceIndex=='number',cache={},cmp={'=':'if($1($2=="$3")){$5}','^=':'if($1((x=$2)&&!x.indexOf("$3"))){$5}','*=':'if($1((x=$2)&&x.indexOf("$3")!=-1)){$5}','$=':'if($1((x=$2)&&x.indexOf("$3",x.length-$4)!=-1)){$5}','~=':'if($1((x=$2)&&(y=x.indexOf("$3"))!=-1&&(x.charCodeAt(y-1)||32)==32&&(x.charCodeAt(y+$4)||32)==32)){$5}','|=':'if($1((x=$2)&&(x=="$3"||!x.indexOf("$3-")))){$5}'},map=Array.prototype.map||function(fn,tp){var i=this.length,r=new Array(i);while(--i>=0)r[i]=fn.call(tp,this[i],i,this);return r;};with(d.implementation){var me=d.addEventListener&&(hasFeature('MutationEvents','2.0')||hasFeature('Events','2.0')&&hasFeature('Core','2.0'));} +Selector.guid=0;Selector.nthIndex=function(LLi,c,r,tp,tv){var p=c.parentNode,ci='LLi#'+tv,pl='LLi$'+tv;if(!p)return Number.NaN;if(!c[ci]||c.LLi!=LLi){for(var n=p.firstChild,i=0;n;n=n.nextSibling){if(n[tp]==tv){n[ci]=++i;n.LLi=LLi;}} +p[pl]=i;} +return r?1+p[pl]-c[ci]:c[ci];};if(me){function fn(e){with(e.target){if(nodeType!==2) +ownerDocument.LLi=++Selector.guid;}} +d.addEventListener('DOMNodeInserted',fn,false);d.addEventListener('DOMNodeRemoved',fn,false);} +if(ie){var am={acceptcharset:'acceptCharset',accesskey:'accessKey',cellpadding:'cellPadding',cellspacing:'cellSpacing',checked:'defaultChecked',selected:'defaultSelected','class':'className',colspan:'colSpan','for':'htmlFor',frameborder:'frameBorder',hspace:'hSpace',longdesc:'longDesc',marginwidth:'marginWidth',marginheight:'marginHeight',noresize:'noResize',noshade:'noShade',maxlength:'maxLength',readonly:'readOnly',rowspan:'rowSpan',tabindex:'tabIndex',usemap:'useMap',valign:'vAlign',vspace:'vSpace'},ab={compact:1,nowrap:1,ismap:1,declare:1,noshade:1,checked:1,disabled:1,readonly:1,multiple:1,selected:1,noresize:1,defer:1};} +function compile(qp){this.dup=this.srt=this.idx=this.i=this.nqp=0;with(this){var js='';do{i=nqp=0;js+=$('n=c;$1q:do{$2}while(false);',srt?'s=0;':'',type(qp,$(srt?'for(x=r.length;s0?',h={}':'',idx?me?',LLi=d.LLi||(d.LLi=++Selector.guid)':',LLi=++Selector.guid':'',js);return new Function('c',js);}} +compile.prototype={type:function(qp,js,n,s,c){with(this){var m=/^\s*([\w-]+|\*)?(.*)/.exec(qp),t=m[1]||'*';if(!n&&c==' '&&!dup)dup=1;js=pred(m[2],js,n,t,c);switch(c){case'>':return cnlt&&t!='*'?$('for(var n$1=n.children.tags("$2"),i$1=0;n=n$1[i$1++];){$3}',++i,t,js):$(cnl?'for(var n$1=n.children,i$1=0;n=n$1[i$1++];)$2{$3}':'for(n=n.firstChild;n;n=n.nextSibling)$2{$3}',++i,t!='*'?'if(n.nodeName==="'+t.toUpperCase()+'")':!cnl||ie?'if(n.nodeType===1)':'',js);case'+':return $('while(n=n.nextSibling)if(n.node$1){$2break}else if(n.nodeType===1)break;',t=='*'?'Type===1':'Name==="'+t.toUpperCase()+'"',js);case'~':return $('while(n=n.nextSibling)if(n.node$1){$3}else if(n.node$2)break;',t=='*'?'Type===1':'Name==="'+t.toUpperCase()+'"',s=='*'?'Type===1':'Name==="'+s.toUpperCase()+'"',js);default:return(typeof js=='object')?String(js):n?t=='*'?js:$('if(n.nodeName!="$1"){$2}',t.toUpperCase(),js):$('for(var n$1=n.getElementsByTagName("$2"),i$1=0;n=n$1[i$1++];)$3{$4}',++i,t,ie&&t=='*'?'if(n.nodeType===1)':'',js);}}},pred:function(qp,js,n,t,c){with(this){var m=/^([#\.])([\w-]+)(.*)/.exec(qp)||/^(\[)\s*([\w-]+)\s*(?:([~|^$*]?=)\s*(?:(['"])(.*?)\4|([\w-]+)))?\s*\](.*)/.exec(qp)||/^:(first|last|only)-(?:(child)|of-type)(.*)/.exec(qp)||/^:(nth)-(?:(last)-)?(?:(child)|of-type)\(\s*(?:(odd|even)|(-|\d*)n([+-]\d+)?|([1-9]\d*))\s*\)(.*)/.exec(qp)||/^:(active|checked|(?:dis|en)abled|empty|focus|link|root|target)(.*)/.exec(qp)||/^:(lang)\(\s*(['"])?(.*?)\2\s*\)(.*)/.exec(qp)||(!n&&/^:(not)\(\s*(.*)\s*\)(.*)/.exec(qp)),x=0;if(!m){if(m=/^\s*([+>~,\s])\s*(\S.*)/.exec(qp)){if(m[1]!=',')return type(m[2],js,n,t,m[1]);nqp=m[2];dup=2;} +else if(/\S/.test(qp))throw new Error('Illegal query near: '+qp);return dup<1?js:$('if(!h[x=n.LLn||(n.LLn=++Selector.guid)]){h[x]=$1;$2}',!srt||cdp?'true':si?'n.sourceIndex':'Selector.srcIndex(h,n)',js);} +if(!n&&m[1]=='#'&&dup!=2)dup=-1;js=pred(m[m.length-1],js,n,t,1);switch(m[1]){case'#':return uniq(js,n,t,c,ie,'n.id','"'+m[2]+'"','d.getElementById("'+m[2]+'")');case'.':return bcn&&!n&&(!c||c==' ')&&(t=='*'||!mz)?Object($('for(var n$1=n.getElementsByClassName("$2"),i$1=0;n=n$1[i$1++];)$3{$4}',++i,m[2],t=='*'?'':'if(n.nodeName==="'+t.toUpperCase()+'")',js)):$(cmp['~='],n?'!':'','n.className',x=m[2],x.length,js);case'[':return(x=m[3])?$(cmp[x],n?'!':'',ie?(x=m[2].toLowerCase())=='style'?'style.cssText.toLowerCase()':ab[x]?'n.'+x+'&&"'+x+'"':'n.getAttribute("'+(am[x]||x)+'",2)':'n.getAttribute("'+m[2]+'")',x=m[5]||m[6],x.length,js):$(ie?'if($1((x=n.getAttributeNode("$2"))&&x.specified)){$3}':'if($1n.hasAttribute("$2")){$3}',n?'!':'',m[2],js);case'active':case'focus':return uniq(js,n,t,c,0,'n','d.activeElement');case'checked':return $('if($1(n.checked||n.selected)){$2}',n?'!':'',js);case'disabled':x=1;case'enabled':return $('if(n.disabled===$1$2){$3}',!!(x^n),ie?'&&((x=n.nodeName)==="BUTTON"||x==="INPUT"||x==="OPTION"||x==="OPTGROUP"||x==="SELECT"||x==="TEXTAREA"':'',js);case'empty':return $('for(x=n.firstChild;x&&x.nodeType>3;x=x.nextSibling);if($1x){$2}',n?'':'!',js);case'first':return flo(js,n,m[2],'previous');case'lang':return $(cmp['|='],n?'!':'','n.lang',x=m[3],x.length,js);case'last':return flo(js,n,m[2],'next');case'link':return $('if($1(n.nodeName==="A"&&n.href)){$2}',n?'!':'',js);case'nth':var a=m[4]?2:m[5]=='-'?-1:m[7]?0:m[5]?m[5]-0:1,b=m[4]=='odd'?1:(m[6]||m[7])-0||0;if(a==1)return js;if(a==0&&b==1)return flo(js,n,m[3],m[2]?'next':'previous');if(a==b)b=0;if(b<0)b=a+b;idx=1;return $('if($1(Selector.nthIndex(LLi,n,$2,"node$3",$4)$5)){$6}',n?'!':'',!!m[2],m[3]?'Type':'Name',m[3]?'1':'n.nodeName',a<0?'<='+b:a?'%'+a+'==='+b:'==='+b,js);case'not':return type(m[2],js,1,'*');case'only':return flo(js,n,m[2]);case'root':return uniq(js,n,t,c,0,'n','d.documentElement');case'target':x='(d.defaultView||d.parentWindow||window).location.hash.substr(1)';return uniq(js,n,t,c,ie,'n.id',x,'d.getElementById('+x+')');}}},uniq:function(js,n,t,c,d,p,v,w){return(n||(c&&c!=' ')||d)?$(n?'if($1!==$2){$3}':'if($1===$2){$3break q}',p,v,js):Object($(ec?'if((x=$1)===n||!n.contains||n.contains(x))$2':cdp?'if((x=$1)===n||!n.compareDocumentPosition||n.compareDocumentPosition(x)&16)$2':'for(x=y=$1;y;y=y.parentNode)if(y===n)$2',w||v,t=='*'?'{n=x;'+js+'break q}':'{if((n=x).nodeName==="'+t.toUpperCase()+'"){'+js+'}break q}'));},flo:function(js,n,t,s){return $(s?'for($2x=n.$1Sibling;x&&x.node$3;x=x.$1Sibling);if($4x){$5}':'for($2(x=n.parentNode)&&(x=x.firstChild);x&&(x.node$3||x===n);x=x.nextSibling);if($4x){$5}',s,t?'':'y=n.nodeName,',t?'Type!==1':'Name!==y',n?'':'!',js);}};} \ No newline at end of file diff --git a/site/source/javascripts/code_sync/vendor/css-utilities.js b/site/source/javascripts/code_sync/vendor/css-utilities.js new file mode 100644 index 0000000..4d1dae8 --- /dev/null +++ b/site/source/javascripts/code_sync/vendor/css-utilities.js @@ -0,0 +1,15 @@ +/******************************************************************************* + CSS0.99.1B :: CSSUtilities + ------------------------------------------------------------------------------- + Copyright (c) 2010 James Edwards (brothercake) + BSD License See license.txt for licensing information + Info/Docs http://www.brothercake.com/site/resources/scripts/cssutilities/ + ------------------------------------------------------------------------------- + Credits and thanks: + ------------------------------------------------------------------------------- + Henrik Lindqvist [Selector.js] http://llamalab.com/js/selector/ + Dean Edwards [technical help] http://dean.edwards.name/ + Stuart Langridge [technical help] http://www.kryogenix.org/ + ------------------------------------------------------------------------------- +*******************************************************************************/ +function CSSUtilities(){}(function(){var Z=this;Z._N1=false;Z.supported=false;if(typeof document.getElementById=='undefined'||typeof document.styleSheets=='undefined'||typeof document.nodeType=='undefined'){return;}Z.supported=true;var A=false,B='Network Failure or Security Violation',C='Network Failure',D='Security Violation',E='Unspecified Error',F='Data is not CSS',R='unknown',S='OK',U='Discarded Duplicate',T='Stylesheet is disabled',V='Unsupported node type',H='CSSUtilities '+'(Fatal Error):',I=H+' The specified mode is not valid',G=H+' The specified async setting is not valid',J=H+' The specified document is not a Document',K=H+' The specified base is not an absolute URL',L=H+' The specified watch setting is not valid',P=H+' The specified attributes setting is not valid',M=H+' The specified api settings are not valid',O=H+' Your Selectors API is not returning the right data',N=H+' The Selectors API is missing',Q=H+' Unable to communicate with the network',W='CSSUtilities.%method has an invalid Element reference or ID',X='CSSUtilities.%method requires a valid Selector reference',Y='CSSUtilities.%method can only process one Selector at a time',A0='CSSUtilities.%method has an invalid Stylesheet ID',B0=H+' You cannot define "%var" after "api",'+' it must be defined first',B1='all',C1='screen',D1='none',E1='current',F1='aural,braille,embossed,handheld,print,projection,reader,screen,speech,tty,tv',C0={'azimuth':0,'border-collapse':0,'border-spacing':0,'caption-side':0,'color':0,'cursor':0,'direction':0,'elevation':0,'empty-cells':0,'fit':0,'fit-position':0,'font':0,'font-family':0,'font-size':0,'font-size-adjust':0,'font-stretch':0,'font-style':0,'font-variant':0,'font-weight':0,'hanging-punctuation':0,'hyphenate-after':0,'hyphenate-before':0,'hyphenate-character':0,'hyphenate-lines':0,'hyphenate-resource':0,'hyphens':0,'image-resolution':0,'letter-spacing':0,'line-height':0,'line-stacking':0,'line-stacking-ruby':0,'line-stacking-shift':0,'line-stacking-strategy':0,'list-style':0,'list-style-image':0,'list-style-position':0,'list-style-type':0,'marquee-direction':0,'orphans':0,'overflow-style':0,'page':0,'page-break-inside':0,'pitch':0,'pitch-range':0,'presentation-level':0,'punctuation-trim':0,'quotes':0,'richness':0,'ruby-align':0,'ruby-overhang':0,'ruby-position':0,'speak':0,'speak-header':0,'speak-numeral':0,'speak-punctuation':0,'speech-rate':0,'stress':0,'text-align':0,'text-align-last':0,'text-emphasis':0,'text-height':0,'text-indent':0,'text-justify':0,'text-outline':0,'text-replace':0,'text-shadow':0,'text-transform':0,'text-wrap':0,'visibility':0,'voice-balance':0,'voice-family':0,'voice-rate':0,'voice-pitch':0,'voice-pitch-range':0,'voice-stress':0,'voice-volume':0,'volume':0,'white-space':0,'white-space-collapse':0,'widows':0,'word-break':0,'word-spacing':0,'word-wrap':0,'-moz-force-broken-image-icon':0,'-moz-image-region':0,'-moz-stack-sizing':0,'-moz-user-input':0,'-x-system-font':0,'-xv-voice-balance':0,'-xv-voice-pitch':0,'-xv-voice-pitch-range':0,'-xv-voice-rate':0,'-xv-voice-stress':0,'-xv-voice-volume':0,'-ms-text-align-last':0,'-ms-text-justify':0,'-ms-word-break':0,'-ms-word-wrap':0},D0={'margin':['margin-top','margin-right','margin-bottom','margin-left'],'padding':['padding-top','padding-right','padding-bottom','padding-left'],'outline':['outline-width','outline-style','outline-color'],'border':['border-width','border-style','border-color','border-top','border-right','border-bottom','border-left','border-top-width','border-right-width','border-bottom-width','border-left-width','border-top-style','border-right-style','border-bottom-style','border-left-style','border-top-color','border-right-color','border-bottom-color','border-left-color'],'border-width':['border-top-width','border-right-width','border-bottom-width','border-left-width'],'border-style':['border-top-style','border-right-style','border-bottom-style','border-left-style'],'border-color':['border-top-color','border-right-color','border-bottom-color','border-left-color'],'border-top':['border-top-width','border-top-style','border-top-color'],'border-right':['border-right-width','border-right-style','border-right-color'],'border-bottom':['border-bottom-width','border-bottom-style','border-bottom-color'],'border-left':['border-left-width','border-left-style','border-left-color'],'list-style':['list-style-type','list-style-image','list-style-position'],'font':['font-weight','font-style','font-variant','font-size','line-height','font-family'],'background':['background-color','background-image','background-repeat','background-attachment','background-position','background-size','background-clip','background-origin'],'line-stacking':['line-stacking-strategy','line-stacking-ruby','line-stacking-shift'],'column-rule':['column-rule-width','column-rule-style','column-rule-color'],'columns':['column-width','column-count'],'pause':['pause-before','pause-after'],'rest':['rest-before','rest-after'],'cue':['cue-before','cue-after'],'mark':['mark-before','mark-after'],'transition':['transition-property','transition-duration','transition-timing-function','transition-delay'],'animation':['animation-name','animation-duration','animation-timing-function','animation-delay','animation-iteration-count','animation-direction'],'target':['target-name','target-new','target-position']},F0=/[:]{1,2}(?:first\-(letter|line)|before|after|selection|value|choices|repeat\-(item|index)|outside|alternate|(line\-)?marker|slot\([_a-z0-9\-\+\.\\]*\))/i,G0=/([:]{1,2}(?:first\-(letter|line)|before|after|selection|value|choices|repeat\-(item|index)|outside|alternate|(line\-)?marker|slot\([_a-z0-9\-\+\.\\]*\)))/ig,H0=/([:](?:(link|visited|active|hover|focus|lang|root|empty|target|enabled|disabled|checked|default|valid|invalid|required|optional)|((in|out\-of)\-range)|(read\-(only|write))|(first|last|only|nth)(\-last)?\-(child|of\-type))(?:\([_a-z0-9\-\+\.\\]*\))?)/ig,I0=/(\[\s*[_a-z0-9-:\.\|\\]+\s*(?:[~\|\*\^\$]?=\s*[\"\'][^\"\']*[\"\'])?\s*\])/ig,J0=/(#[a-z]+[_a-z0-9-:\\]*)/ig,K0=/(\.[_a-z]+[_a-z0-9-:\\]*)/ig,L0=/\!\s*important\s*$/i,M0='CSSUtilities/.99',N0='undefined',O0='object',P0='string',Q0='function',R0='boolean',S0=true,T0=false,U0=null,V0='browser',W0='author',X0='active',Y0='cancelled',A1='inactive',H1=navigator.vendor=='Apple Computer,'+' Inc.',G1=H1&&/version\/3/i.test(navigator.appVersion),I1=navigator.vendor=='KDE',J1=/applewebkit/i.test(navigator.userAgent),K1=typeof document.uniqueID!=N0,L1=typeof window.opera!=N0,M1=200,mode=V0,async=T0,page=document,base,watch=T0,attributes=S0,api=U0,qsa=U0,B5=T0;Z.define=function(Q6,O5,P5){switch(Q6){case 'mode':if(typeof O5!=P0||!/^(author|browser)$/i.test(O5)){throw(new Error(I));}mode=O5;if(mode==V0&&watch===U0){throw(new Error(L));}break;case 'async':if(typeof O5!=R0){throw(new Error(G));}async=O5;break;case 'page':if(B5==S0){throw(new Error(B0.replace('%var','page')));}if(typeof O5.nodeType==N0||O5.nodeType!=9){throw(new Error(J));}page=O5;break;case 'base':if(B5==S0){throw(new Error(B0.replace('%var','base')));}if(typeof O5!=P0||!/^(((ht|f)tp[s]?)\:)/i.test(O5)){throw(new Error(K));}base=O5;break;case 'attributes':if(typeof O5!=R0){throw(new Error(P));}attributes=O5;break;case 'watch':if(!(typeof O5==R0||(mode==W0&&O5==U0))){throw(new Error(L));}watch=O5;break;case 'api':if(typeof O5!=R0){throw(new Error(M));}if(typeof P5!=N0){if(typeof P5!=Q0){throw(new Error(M));}}if(O5==T0){api=typeof page.querySelectorAll==N0;}else {api=S0;}B5=S0;if(typeof P5==Q0){var D4=P5('*',page);if(typeof D4!=O0||D4==U0||typeof D4.length==N0){throw(new Error(O));}qsa=P5;}break;}};Z.init=function(X5){if(A===S0){return;}A=S0;Z._N1=T0;api=(typeof page.querySelectorAll!=N0&&api!==S0)?T0 :S0;if(base==U0){base=page.location.href;}Z._N5=(L1&&page.documentElement.namespaceURI!=U0)||(!L1&&(typeof page.xmlVersion!=N0&&page.xmlVersion!=U0));Z._Y6=f30();Z._S1=U0;delete Z._S1;Z._T1=U0;delete Z._T1;function Q2(){A=T0;CSSUtilities._N1=S0;if(typeof X5==Q0){CSSUtilities.W1=X5;CSSUtilities.W1();}else{CSSUtilities.W1=U0;delete CSSUtilities.W1;}}Z._S1=[];Z._T1=[];Z.Y4=0;if(mode==W0){f0(Q2);}else {f15(Q2);}};Z.getCSSStyleSheets=function(){var P1=f36(arguments,[]);P1.M6=f40(P1.M6);f35();return f41(P1.M6,function(){return Z._T1;});};Z.getCSSRules=function(){var P1=f36(arguments,['D5','media','F5','S5']);P1.D5=f37(P1.D5,'getCSSRules');P1.media=f38(P1.media);P1.F5=f39(P1.F5);if(P1.S5==U0){P1.S5=T0;}P1.M6=f40(P1.M6);f35();return f41(P1.M6,function(){return f20(P1.D5,P1.media,P1.F5,P1.S5);});};Z.getCSSStyleSheetRules=function(){var P1=f36(arguments,['media','F5','ssid']);P1.media=f38(P1.media);P1.F5=f39(P1.F5);if(typeof P1.F5.properties!=N0&&typeof P1.F5.css==N0){P1.F5.css='';var E4=S0;}if(P1.ssid===U0){P1.ssid=-1;}P1.M6=f40(P1.M6);f35();if(P1.ssid!==-1&&f43(Z._T1,P1.ssid,'ssid')==U0){throw(new Error(A0.replace('%method','getCSSStyleSheetRules')));}return f41(P1.M6,function(){var rules=[];for(var i=0;i0){for(var k=0;k0){for(var j=0;j0){for(var j=0;j0){for(var j=0;j0){f8(E7);}else{E7();}function E7(){var A4=f9();for(var i=0;i0){function f5(F6){f6(E6,F6,J6[F6],function(V1,G6,H6){Z._U1.splice((E6+H6),0,V1);if(H6+1]*>/i);J5.splice(0,1);for(var j=0;j/i)[0];}delete J5;F4();},function(){F4();});}function f9(){var A4=[];var V4=page.childNodes;for(var i=0;i0){var R4=node.sheet.media.mediaText;node.sheet.media.mediaText=Z._Y6;Q4=node.sheet.disabled;node.sheet.media.mediaText=R4;}if(watch!==U0&&Q4){V1.message=T;}if(/xml\-stylesheet/.test(owner)){V1.href=f47(S4.href,base);}else if(/link/i.test(owner)){V1.href=f47(node.getAttribute('href',2),base);}else{if(!Q4||watch===U0){if(K1){if(typeof node.__css==N0){V1.message=C;}else{V1.text+=f13(node.__css,T0);}}else{for(var T4='',V4=node.childNodes,i=0;i';break;case 8:T4+='';break;}}V1.text+=f13(T4,T0);}}}if(/xml\-stylesheet/.test(owner)){V1.media=typeof S4.media!=N0?S4.media:B1;}else{V1.media=node.getAttribute('media')?node.getAttribute('media'):B1;}V1.media=V1.media.split(/,\s*/).join(','+' ');V1.xmedia=V1.media;Z._U1.push(V1);}function f11(href,F4){var T2={'text':'','message':U0};f48(async,href,function(L4,M4){if((typeof M4==P0&&f42(M4)!='')&&!/^(text\/css)/.test(M4)){if(/^(text\/html)/.test(M4)){var C2=L4.match(/([1-9]{1,3}[^<]+)<\/title>/i);if(C2&&C2.length>=2){T2.message=C2[1];}}if(T2.message==U0){T2.message=F;}}else {T2.text=L4;}F4(T2);},function(N4){T2.message=N4;F4(T2);});}function f12(J4){var J6=[];var I4=/@import\s*(?:url\s*\(\s*[\'\"]?|[\'\"])([^\'\"\)]+)(?:[\'\"]|[\'\"]?\s*\))([^;]*)(;|$)/ig;var C2=J4.match(I4);if(C2){for(var i=0;i<C2.length;i++){var href=f47(C2[i].replace(I4,'$1'),base);var media=f42(f42(C2[i].replace(I4,'$2')).replace(/^\)/,''));var V5=S0;if(!media){V5=T0;media=B1;}J6.push({'href':href,'media':media,'V5':V5});}}return J6;}function f13(J4,J6){J4=J4.replace(/(\/\*([^*]|(\*+([^*/])))*\*+\/)/gm,'');if(!Z._N5){J4=J4.replace(/(<\!\[CDATA\[([^\]]|(\]+([^>])))*\]+>)/gm,'');}if(Z._N5&&(!(H1||I1||J1))){J4=J4.replace(/(<\!\-\-([^\-]|(\-+([^>])))*\-+>)/gm,'');}J4=J4.replace(/[\t]+/g,' ').replace(/[ ][ ]/g,' ');J4=J4.replace(/[\r\n]/g,'');J4=J4.replace(/@(charset|namespace)[^;]+;/igm,'');if(typeof J6!=N0&&J6==S0){J4=J4.replace(/@import[^;]+;/igm,'');}else if(/@import[^;]+;/i.test(J4)){var V1=J4.replace(/(@import[^;]+;)/igm,'{SPLIT}$1{SPLIT}').split('{SPLIT}');for(var J4='',A3=U0,i=0;i<V1.length;i++){if(f42(V1[i])==''){continue;}if(/@import[^;]+;/i.test(V1[i])){if(A3===U0){A3=T0;}if(A3===T0){J4+=V1[i];}}else{A3=S0;J4+=V1[i];}}}J4=J4.replace(/@(font\-face|page)[^\}]+\}/igm,'');J4=J4.replace(/(<\!\-\-)|(\-\->)|(<\!\[CDATA\[)|(\]\]>)/gm,'');return f42(J4);}function f14(V1){var T5=V1.text.match(/(content:[^;]+;)/igm);if(T5){for(var g=0;g<T5.length;g++){V1.text=V1.text.replace(T5[g],'[G'+g+']');}}V1.text=f42(f13(V1.text,S0)).split('}');for(var i=0;i<V1.text.length;i++){V1.text[i]=f42(V1.text[i]).split('{');for(var j=0;j<V1.text[i].length;j++){V1.text[i][j]=f42(V1.text[i][j]);}}if(T5){for(var g=0;g<T5.length;g++){for(var i=0;i<V1.text.length;i++){for(var j=0;j<V1.text[i].length;j++){V1.text[i][j]=V1.text[i][j].replace('[G'+g+']',T5[g]);}}}}var P2=0;var V2=V1.media,W2=V1.xmedia;var X2=V1.owner;for(var i=0;i<V1.text.length;i++){if(V1.text[i].length==2){Z._S1.push({'selector':V1.text[i][0],'css':V1.text[i][1],'media':V2,'xmedia':W2,'owner':X2.toLowerCase(),'href':V1.href,'ssid':V1.ssid});P2++;}else if(V1.text[i].length==3){V2=f42(V1.text[i][0].replace('@media','')).toLowerCase();X2='@media';W2=V2;var I2=V1.media;if(I2==''){I2=B1;}V2=f28(I2,V2);Z._S1.push({'selector':V1.text[i][1],'css':V1.text[i][2],'media':V2,'xmedia':W2,'owner':X2,'href':V1.href,'ssid':V1.ssid});P2++;}else if(V1.text[i].length==1){V2=V1.media;W2=V1.xmedia;X2=V1.owner;}}return P2;}function f15(F4){var O2=f44(page.styleSheets);for(var i=0;i<O2.length;i++){O2[i].__ssid=Z.Y4++;if(typeof O2[i].ownerNode!=N0){if(G1&&/xml\-stylesheet/.test(O2[i].ownerNode.nodeName)){Z._T1.push({'ssid':O2[i].__ssid,'href':f47(O2[i].href,base),'owner':'xml-stylesheet','media':R,'stylesheet':U0,'rules':0,'message':V});O2.splice(i,1);i--;}else{try{f16(O2[i],O2[i].ownerNode.nodeName.toLowerCase(),O2[i].media.length>0?f42(O2[i].media.mediaText):B1);}catch(err){Z._T1.push({'ssid':O2[i].__ssid,'href':R,'owner':R,'media':R,'stylesheet':U0,'rules':0,'message':E});O2.splice(i,1);i--;}}}else if(typeof O2[i].owningElement!=N0){f18(O2[i],O2[i].owningElement.nodeName.toLowerCase(),f42(O2[i].media)!=''?f42(O2[i].media):B1);}}Z._T1.sort(function(a,b){return a.ssid-b.ssid;});Z.Y4=U0;delete Z.Y4;if(watch==S0){f31();}if(typeof F4==Q0){F4();}}function f16(sheet,owner,media){if(sheet.href&&sheet.href!=base){var C3=f47(sheet.href,base);if(f43(Z._T1,C3,'href')!=U0){Z._T1.push({'ssid':sheet.__ssid,'href':C3,'owner':owner,'media':media,'stylesheet':U0,'rules':0,'message':U});sheet.disabled=S0;return;}}try{var Q4=sheet.disabled;if(L1&&Q4&&sheet.media.length>0){var R4=sheet.media.mediaText;sheet.media.mediaText=Z._Y6;Q4=sheet.disabled;sheet.media.mediaText=R4;}if(!Q4){for(var rules=sheet.cssRules,P2=0,i=0;i<rules.length;i++){if(rules.item(i).type==1){P2++;}else if(rules.item(i).type==4){for(var B3=rules.item(i).cssRules,j=0;j<B3.length;j++){if(B3.item(j).type==1){P2++;}}}}var message=S;}else{P2=0;message=T;}Z._T1.push({'ssid':sheet.__ssid,'href':(sheet.href&&sheet.href!=base)?f47(sheet.href,base):U0,'owner':owner,'media':media,'stylesheet':sheet,'rules':P2,'message':message});if(!Q4){f17(sheet,sheet.cssRules,owner,media);}}catch(err){Z._T1.push({'ssid':sheet.__ssid,'href':(sheet.href&&sheet.href!=base)?f47(sheet.href,base):U0,'owner':owner,'media':media,'stylesheet':U0,'rules':0,'message':D});}}function f17(sheet,rules,owner,media){for(i=0;i<rules.length;i++){rule=rules.item(i);if(rule.type==3){media=rule.media.mediaText;if(media==''){try{media=rule.parentStyleSheet.media.mediaText;}catch(err){media=rule.parentStyleSheet.ownerRule.media.mediaText;}}if(media==''){media=B1;}media=media.toLowerCase();var parent=rule.parentStyleSheet;while(parent){try{var I2=parent.media.mediaText;}catch(err){I2=parent.ownerRule.media.mediaText;}if(I2==''){I2=B1;}media=f28(I2,media);if((H1||I1||J1)&&!parent.parentStyleSheet&&parent.ownerRule){parent=parent.ownerRule.parentStyleSheet;}else{parent=parent.parentStyleSheet;}}rule.styleSheet.__ssid=Z.Y4++;f16(rule.styleSheet,'@import',media);}}for(var i=0;i<rules.length;i++){var rule=rules.item(i);if(rule.type==1){if(/^(xml\-stylesheet|link|(([a-z]+:)?style))$/i.test(owner)){media=rule.parentStyleSheet.media.mediaText;if(media==''){media=B1;}media=media.toLowerCase();}var J4=rule.style.cssText.replace(/[\r\n]/g,' ');J4=J4.split(';');for(var c=0;c<J4.length;c++){J4[c]=J4[c].split(':');while(J4[c].length>2){J4[c][1]+=':'+J4[c].pop();}if(J4[c].length==1){J4.splice(c,1);c--;continue;}if(rule.style.getPropertyPriority(f42(J4[c][0]))=='important'&&!L0.test(J4[c][1])){J4[c][1]+=' !important';}J4[c]=J4[c].join(':');}J4=J4.join(';');Z._S1.push({'selector':rule.selectorText,'css':J4,'media':media,'owner':owner,'href':sheet.href==U0?U0:f47(sheet.href,base),'ssid':sheet.__ssid});}}for(i=0;i<rules.length;i++){rule=rules.item(i);if(rule.type==4){media=rule.media.mediaText;if(media==''){media=rule.parentStyleSheet.media.mediaText;}if(media==''){media=B1;}media=media.toLowerCase();var parent=rule.parentStyleSheet;while(parent){try{var I2=parent.media.mediaText;}catch(err){I2=parent.ownerRule.media.mediaText;}if(I2==''){I2=B1;}media=f28(I2,media);if((H1||I1||J1)&&!parent.parentStyleSheet&&parent.ownerRule){parent=parent.ownerRule.parentStyleSheet;}else{parent=parent.parentStyleSheet;}}f17(sheet,rule.cssRules,'@media',media);}}}function f18(sheet,owner,media,href){if(sheet.href){var C3=f47(sheet.href,base);if(f43(Z._T1,C3,'href')!=U0){Z._T1.push({'ssid':sheet.__ssid,'href':C3,'owner':owner,'media':media,'stylesheet':U0,'rules':0,'message':U});sheet.disabled=S0;return;}}var J6=[];var Q4=sheet.disabled;if(!Q4){for(var i=0;i<sheet.imports.length;i++){if(sheet.imports[i].rules.length==0){continue;}media=f42(sheet.media);if(media==''){media=B1;}var U4=f47(sheet.imports[i].href,base);J6.push({'sheet':sheet.imports[i],'owner':'@import','media':media,'href':U4});}}if(J6.length>0){for(var i=0;i<J6.length;i++){J6[i].sheet.__ssid=Z.Y4++;f18(J6[i].sheet,J6[i].owner,J6[i].media,J6[i].href);}}try{if(!Q4){var J4=sheet.cssText;J4=J4.replace(/@(import|charset|namespace)[^;]+;/igm,'');J4=J4.replace(/@(font\-face|page)[^\}]+\}/igm,'');var T5=J4.match(/(content\s*:\s*[\'\"].*(;|$))/igm);if(T5){for(var g=0;g<T5.length;g++){J4=J4.replace(T5[g],'[G'+g+']');}}J4=f42(J4).split('}');for(var i=0;i<J4.length;i++){J4[i]=f42(J4[i]).split('{');for(var j=0;j<J4[i].length;j++){J4[i][j]=f42(J4[i][j]);}}if(T5){for(var g=0;g<T5.length;g++){for(var i=0;i<J4.length;i++){for(var j=0;j<J4[i].length;j++){J4[i][j]=J4[i][j].replace('[G'+g+']',T5[g]);}}}}if(typeof href==N0){href=(sheet.href==U0||sheet.href=='')?U0 :f47(sheet.href,base);}var rules=[];var V2=sheet.media;if(V2==''){V2=B1;}var X2=owner;for(var i=0;i<J4.length;i++){if(J4[i].length==2){rules.push({'selector':J4[i][0],'css':J4[i][1],'media':V2,'owner':X2,'href':href,'ssid':sheet.__ssid});}else if(J4[i].length==3){V2=f42(J4[i][0].replace('@media','')).toLowerCase();X2='@media';var I2=sheet.media;if(I2==''){I2=B1;}V2=f28(I2,V2);rules.push({'selector':J4[i][1],'css':J4[i][2],'media':V2,'owner':X2,'href':href,'ssid':sheet.__ssid});}else if(J4[i].length==1){V2=sheet.media;if(V2==''){V2=B1;}X2=owner;}}var message=S;}else{message=T;}if(!Q4){var P2=f19(rules);}Z._T1.push({'ssid':sheet.__ssid,'href':sheet.href ?f47(sheet.href,base):U0,'owner':owner,'media':media,'stylesheet':sheet,'rules':!Q4?P2:0,'message':message});}catch(err){Z._T1.push({'ssid':sheet.__ssid,'href':sheet.href ?f47(sheet.href,base):U0,'owner':owner,'media':media,'stylesheet':U0,'rules':0,'message':D});}}function f19(rules){var P2=0;for(var i=0;i<rules.length;i++){if(rules[i].selector=='' ||rules[i].selector=='UNKNOWN' ||rules[i].selector.indexOf(':unknown')!=-1){continue;}Z._S1.push({'selector':f24(rules[i].selector),'css':f25(rules[i].css),'media':rules[i].media,'owner':rules[i].owner,'href':rules[i].href,'ssid':rules[i].ssid});P2++;}return P2;}function f20(D5,media,F5,S5,rules,B2,F2){F5=f39(F5);if(typeof rules==N0||rules==U0){rules=[];}if(typeof B2==N0||B2==U0){B2=T0;}if(typeof F2==N0||F2==U0){F2=[D5];if(attributes==S0&&D5.getAttribute('style')){var M5=f21(D5);if(M5!=U0){Z._S1.push(M5);}}}else {F2.push(D5);}for(var i=0;i<Z._S1.length;i++){if(!f29(media,Z._S1[i])){continue;}if(Z._S1[i].owner=='@style'&&D5==F2[0]){var D4=[D5],altstate=T0;}else {if(S5==S0){for(var altstate=S0,E2=f33(Z._S1[i].selector),j=0;j<E2.length;j++){if(E2[j]==D5){altstate=T0;break;}}}else {altstate=T0;}D4=f33(S5==S0?Z._S1[i].selector.replace(H0,''):Z._S1[i].selector);}if(D4.length>0){for(var j=0;j<D4.length;j++){if(D4[j]==D5){var inheritance=[];if(B2){for(var a=F2.length-1;a>0;a--){inheritance.push(F2[a]);}}var X1={'selector':Z._S1[i].selector,'css':Z._S1[i].css,'index':i,'specificity':[0,0,0,0],'inheritance':inheritance,'altstate':altstate};for(var G2=['media','xmedia','owner','ssid','href'],k=0;k<G2.length;k++){if(F5=='*'||typeof F5[G2[k]]!=N0){if(typeof Z._S1[i][G2[k]]!=N0){X1[G2[k]]=Z._S1[i][G2[k]];}}}rules.push(X1);break;}}}}if(D5.parentNode&&D5.parentNode.nodeType==1){return f20(D5.parentNode,media,F5,S5,rules,S0,F2);}else{if(rules.length==0){return rules;}for(var i=0;i<rules.length;i++){var K4=rules[i].selector.split(',');for(var L2=[],j=0;j<K4.length;j++){L2.push(rules[i].inheritance.length>0 ?[0,0,0,0] :f23(K4[j]));}L2.sort(function(a,b){if(a[0]!==b[0]){return b[0]-a[0];}if(a[1]!==b[1]){return b[1]-a[1];}if(a[2]!==b[2]){return b[2]-a[2];}return b[3]-a[3];});rules[i].specificity=L2[0];}rules.sort(function(a,b){if(a.specificity.toString()===b.specificity.toString()){if(a.index===b.index){return b.inheritance.length-a.inheritance.length;}return a.index-b.index;}if(a.specificity[0]!==b.specificity[0]){return a.specificity[0]-b.specificity[0];}if(a.specificity[1]!==b.specificity[1]){return a.specificity[1]-b.specificity[1];}if(a.specificity[2]!==b.specificity[2]){return a.specificity[2]-b.specificity[2];}return a.specificity[3]-b.specificity[3];});if(F5==="*"||typeof F5.properties!=N0){rules=f22(rules,S0);}if(F5!=="*"){for(var i=0;i<rules.length;i++){for(var D3=['selector','css','index','specificity','inheritance','altstate'],j=0;j<D3.length;j++){if(typeof F5[D3[j]]==N0){rules[i][D3[j]]=U0;delete rules[i][D3[j]];}}}}if(Z._S1[Z._S1.length-1].owner=='@style'){Z._S1.splice(Z._S1.length-1,1);}return rules;}}function f21(D5){if(K1){try{var C2=D5.outerHTML.split('>')[0].match(/.*style\s*=\s*\"([^\"]*)\".*/im);var J4=C2?f25(C2[1]):'';}catch(err){J4='';}}else {J4=D5.getAttribute('style');}if(J4==''){return U0;}var X1={'selector':'','css':J4,'media':B1,'owner':'@style','href':U0,'ssid':Infinity};if(mode==W0){X1.xmedia=X1.media;}return X1;}function f22(rules,U5){for(var i=0;i<rules.length;i++){rules[i].properties=f27(rules[i].css,{},(typeof rules[i].inheritance!=N0 &&rules[i].inheritance.length>0));rules[i].T6={};for(var j in rules[i].properties){rules[i].T6[j]={'value':rules[i].properties[j].property,'status':X0};}if(U5){if(rules[i].altstate==S0){for(var ip in rules[i].T6){if(!rules[i].T6.hasOwnProperty(ip)){continue;}rules[i].T6[ip].status=A1;}}else{for(var j=0;j<i;j++){for(var jp in rules[j].T6){if(!rules[j].T6.hasOwnProperty(jp)||rules[j].T6[jp].status!=X0){continue;}for(var ip in rules[i].T6){if(!rules[i].T6.hasOwnProperty(ip)||rules[i].T6[ip].status!=X0){continue;}if(jp==ip){rules[j].T6[jp].status=Y0;break;}}}}}}}if(U5){for(var i=0;i<rules.length;i++){if(rules[i].inheritance.length>0){continue;}for(var j in rules[i].T6){if(!rules[i].T6.hasOwnProperty(j)||rules[i].T6[j].status!=Y0){continue;}if(L0.test(rules[i].T6[j].value)){var E3=i;for(var x=i+1;x<rules.length;x++){if(typeof rules[x].T6[j]!=N0&&rules[x].T6[j].status==Y0&&L0.test(rules[x].T6[j].value)){E3=x;}}for(var x=i;x<rules.length;x++){if(x==E3){rules[x].T6[j].status=X0;for(var y=0;y<x;y++){if(typeof rules[y].T6[j]!=N0&&rules[y].T6[j].status==X0){rules[y].T6[j].status=Y0;}}}else{if(typeof rules[x].T6[j]!=N0&&rules[x].T6[j].status==X0){rules[x].T6[j].status=Y0;break;}}}}}}for(var i=0;i<rules.length;i++){for(var j in rules[i].T6){if(!rules[i].T6.hasOwnProperty(j)||rules[i].T6[j].status!=X0){continue;}if(typeof D0[j]!=N0){for(var x=0;x<=i;x++){for(var p=0;p<D0[j].length;p++){var R1=D0[j][p];if(typeof rules[x].T6[R1]!=N0&&rules[x].T6[R1].status==X0){if(x==i){var n=0;for(var q in rules[x].T6){if(!rules[x].T6.hasOwnProperty(q)){continue;}if(q==j){var C7=n;}if(q==R1){var D7=n;}n++;}}if((x<i||D7<C7)&&!L0.test(rules[x].T6[R1].value)){rules[x].T6[R1].status=Y0;}}}}}}}}for(var i=0;i<rules.length;i++){for(var j in rules[i]){if(!rules[i].hasOwnProperty(j)){continue;}if((j=='properties'||j=='T6')&&f46(rules[i][j])==0){rules[i][j]=U0;}}rules[i].properties=rules[i].T6;delete rules[i].T6;if(!U5){for(var k in rules[i].properties){if(!rules[i].properties.hasOwnProperty(k)){continue;}rules[i].properties[k]=rules[i].properties[k].value;}}}return rules;}function f23(selector){var G3=[0,0,0,0];if(selector===''){G3[0]+=1;return G3;}var F3=selector.replace(I0,'');var C2=F3.match(J0);if(C2){G3[1]+=C2.length;}var C2=F3.match(K0);if(C2){G3[2]+=C2.length;}C2=selector.match(I0);if(C2){G3[2]+=C2.length;}var C2=F3.match(H0);if(C2){G3[2]+=C2.length;}var H3=F3.replace(H0,'').replace(G0,'').replace(/(:not)/ig,'').replace(/(^|\()([_a-z0-9-\.\\]+\|)/ig,'$1').replace(J0,'').replace(K0,'');var C2=H3.match(/([_a-z0-9-:\\]+)/ig);if(C2){G3[3]+=C2.length;}var C2=F3.match(G0);if(C2){G3[3]+=C2.length;}return G3;}function f24(Q3){var Q1=Q3.match(/(^|[^\(])(\[[^\]]+\])($|[^\)])/ig);if(Q1){for(var a=0;a<Q1.length;a++){if(Q1[a].charAt(0)!='['){Q1[a]=Q1[a].substr(1,Q1[a].length-1);}if(Q1[a].charAt(Q1[a].length-1)!=']'){Q1[a]=Q1[a].substr(0,Q1[a].length-1);}Q3=Q3.replace(Q1[a],'{a'+a+'}');}}var P3=Q3.match(/([#\.][a-z]+[_a-z0-9-:\\]*)/ig);if(P3){for(var c=0;c<P3.length;c++){Q3=Q3.replace(P3[c],'{c'+c+'}');}}Q3=Q3.replace(/([A-Z1-6]+)/g,function(a){return a.toLowerCase();});if(Q1){for(a=0;a<Q1.length;a++){Q3=Q3.replace('{a'+a+'}',Q1[a]);}}if(P3){for(c=0;c<P3.length;c++){Q3=Q3.replace('{c'+c+'}',P3[c]);}}return Q3;}function f25(J4){J4=J4.split(';');for(var j=0;j<J4.length;j++){var C2=J4[j].split(':');while(C2.length>2){C2[1]+=':'+C2.pop();}if(C2.length==1){J4.splice(j,1);j--;continue;}C2[0]=f42(C2[0]).toLowerCase();C2[1]=f42(C2[1]);J4[j]=C2[0]+':'+C2[1];}return J4.join(';'+' ');}function f26(Q3){var K4=[];if(Q3==''){return K4;}Q3=Q3.split(',');for(var j=0;j<Q3.length;j++){K4.push(f42(Q3[j]));}return K4;}function f27(J4,properties,B2){if(J4==''){return properties;}J4=J4.replace(/[\r\n]/gm,'');J4=J4.split(';');for(var i=0;i<J4.length;i++){J4[i]=f42(J4[i]);if(J4[i]==''){continue;}var C2=J4[i].split(':');while(C2.length>2){C2[1]+=':'+C2.pop();}if(C2.length==1){continue;}var O3=f42(C2[0]);if(!B2||(B2&&typeof C0[O3]!=N0)){if(typeof properties[O3]==N0 ||!L0.test(properties[O3].property)||properties[O3].B2==S0||L0.test(C2[1])){properties[O3]={'property':f42(C2[1]),'B2':B2};}}}return properties;}function f28(I2,W3){var H2=f45(I2,',');var X3=/([ \t]and.*$)/i,C2=W3.match(X3),V3=(C2?C2[0]:'');W3=W3.replace(X3,'').replace(/only[ \t]+/i,'');if(typeof H2['all']!=N0){return W3+V3;}W3=W3.split(',');for(var i=0;i<W3.length;i++){W3[i]=f42(W3[i]);}for(var i=0;i<W3.length;i++){if(W3[i]==B1){for(var m in H2){if(!H2.hasOwnProperty(m)){continue;}if(f43(W3,m)==U0&&!/[\(\)]/.test(m)){W3.push(m);}}}if(typeof H2[W3[i]]==N0){W3.splice(i,1);i--;}}if(W3.length==0){W3.push(D1);}return W3.join(','+' ')+V3;}function f29(media,rule){var D2=f45(rule.media,',');var C2=T0;for(var j=0;j<media.length;j++){if(typeof D2[media[j]]!=N0||(typeof D2[D1]==N0&&media[j]==B1)||(typeof D2[B1]!=N0)&&media[j]!=D1){C2=S0;break;}}return C2;}function f30(){var A7=C1;try{var B7=page.getElementsByTagName('body').item(0);var X6=B7.insertBefore(page.createElement('span'),B7.firstChild);X6.id='cssutilitiestest'+'medianode';X6.style.display='inline';var D2=F1.split(',');D2.splice(0,0,'fake');if(K1){var W6=page.createStyleSheet();W6.addRule('#cssutilitiestest'+'medianode','display:block !important;');}else{var V6=page.getElementsByTagName('head').item(0).appendChild(page.createElement('style'));V6.setAttribute('type','text/css');V6.appendChild(page.createTextNode('#cssutilitiestest'+'medianode{display:block !important;}'));var W6=page.styleSheets[page.styleSheets.length-1];}for(var i=0;i<D2.length;i++){if(K1){W6.media=D2[i];}else{W6.media.mediaText=D2[i];}if((K1&&X6.currentStyle.display=='block')||(!K1&&page.defaultView.getComputedStyle(X6,'').getPropertyValue('display')=='block')){A7=D2[i];break;}}X6.parentNode.removeChild(X6);if(K1){V6=W6.owningElement;}V6.parentNode.removeChild(V6);}catch(err){A7=C1;}if(A7=='fake'){A7=C1;}return A7;}function f31(){for(var U3=[],i=0;i<Z._T1.length;i++){var stylesheet=mode==W0?(Z._T1[i].stylenode==T0||Z._T1[i].stylenode==U0)?U0:(H1||I1||J1)?Z._T1[i].stylenode :Z._T1[i].stylenode[typeof Z._T1[i].stylenode.styleSheet!=N0?'styleSheet':'sheet']:Z._T1[i].stylesheet; if(stylesheet==U0){continue;}U3.push({'stylesheet':stylesheet,'disabled':stylesheet.disabled });}if((H1||I1||J1)&&mode==V0){function f32(){for(var S3=[],T3=page.styleSheets,i=0;i<T3.length;i++){if(typeof T3[i].ownerNode.__R3==N0){T3[i].ownerNode.__R3=new Date().getTime()+''+Math.round(Math.random()*10000);}S3.push(T3[i].ownerNode.__R3);}return S3;}var K2=f32(),J2=window.setInterval(function(){var currentS3=f32();if(K2.join()!=currentS3.join()){window.clearInterval(J2);Z.init(typeof Z.W1!=N0?Z.W1:U0);}},M1);}else{var J2=window.setInterval(function(){for(var i=0;i<U3.length;i++){if(U3[i].stylesheet.disabled!=U3[i].disabled){window.clearInterval(J2);Z.init(typeof Z.W1!=N0?Z.W1:U0);var W4=S0;}if(typeof W4!=N0){break;}}},M1);}}function f33(selector){if(F0.test(selector)){var K4=selector.split(',');for(var i=0;i<K4.length;i++){if(F0.test(K4[i])){K4.splice(i,1);i--;}}selector=K4.join(',');}if(f42(selector)==''){return [];}if(api==T0){try{return page.querySelectorAll(selector);}catch(err){return [];}}if(typeof qsa==Q0){try{return qsa(selector,page);}catch(err){return [];}}try {if(typeof Selector!=Q0){throw(new Error(N));}var r=Selector(selector,page);return typeof r==N0?[]:r;}catch(err){if(err.message==N){throw(err);}return [];}}function f34(tagname){try{var B4=f44(Z._N5?page.getElementsByTagNameNS('*',tagname):page.getElementsByTagName(tagname));}catch(err){B4=[];}if(tagname=='*'){for(var i=0;i<B4.length;i++){if(B4[i].nodeType!=1||B4[i].tagName.charAt(0)=='/'){B4.splice(i--,1);}}}return B4;}function f35(){if(typeof Z._S1==N0){Z.init();}}function f36(O1,N3){N3.push('M6');for(var P1={},i=0;i<N3.length;i++){if(typeof O1[i]==Q0){for(var j=i;j<N3.length;j++){P1[N3[j]]=U0;}P1.M6=O1[i];break;}else if(typeof O1[i]==N0){P1[N3[i]]=U0;}else{P1[N3[i]]=O1[i];}}return P1;}function f37(Y1,E5){if(typeof Y1==P0&&Y1.charAt(0)=='#'){Y1=page.getElementById(Y1.substr(1,Y1.length-1));}if(typeof Y1==N0||Y1==U0 ||typeof Y1.nodeType==N0||Y1.nodeType!=1){throw(new Error(W.replace('%method',E5)));}return Y1;}function f38(C5){if(typeof C5==N0||C5==''||C5==U0){C5=C1;}if(/(^|,)\*(,|$)/.test(C5)){C5='all,none';}C5=C5.split(',');for(var i=0;i<C5.length;i++){C5[i]=f42(C5[i]);if(C5[i]==E1){C5[i]=Z._Y6;}}return C5;}function f39(A2){if(typeof A2==N0 ||A2==''||A2==U0||A2=='null'){A2='*';}else if(typeof A2==P0){A2=f42(A2);if(A2!=='*'){if(/(,\s*\*|\*\s*,)/.test(A2)){A2='*';}else {A2=f45(A2,',');}}}return A2;}function f40(L6){if(typeof L6!=Q0){L6=U0;}return L6;}function f42(str){return str.replace(/^\s+|\s+$/g,'');}function f43(R5,M3,O3){for(var i=0;i<R5.length;i++){if(typeof O3!=N0&&typeof R5[i]==O0){if(R5[i][O3]==M3){return R5[i];}}else if(R5[i]==M3){return R5[i];}}return U0;}function f44(U6){for(var R5=[],i=0;i<U6.length;i++){R5.push(U6[i]);}return R5;}function f45(str,L3){var obj={};str=str.split(L3);var tmp=str[str.length-1];if(/[ \t]and/i.test(tmp)){tmp=tmp.split(/[ \t]and/i);str.splice(str.length-1,1);for(var i=0;i<tmp.length;i++){str.push(tmp[i]);}}for(var i=0;i<str.length;i++){obj[f42(str[i])]='';}return obj;}function f46(obj){var n=0;for(var i in obj){if(!obj.hasOwnProperty(i)){continue;}n++;}return n;}function f47(href,I2){if(typeof href==N0){return '';}var K3=I2.replace('/'+'/','/').split('/');var loc={'protocol':K3[0],'host':K3[1]};K3.splice(0,2);loc.pathname='/'+K3.join('/');var uri=loc.protocol+'/'+'/'+loc.host;if(/^(\.\/)([^\/]?)/.test(href)){href=href.replace(/^(\.\/)([^\/]?)/,'$2');}if(/(^([a-z]+)\:\/\/)/.test(href)){uri=href;}else if(href.substr(0,1)=='/'){uri+=href;}else if(/^((\.\.\/)+)([^\/].*$)/.test(href)){var I3=href.match(/^((\.\.\/)+)([^\/].*$)/);I3=I3[I3.length-1];var J3=href.split('../').length-1;var K3=loc.pathname.split('/');K3=K3.splice(0,K3.length-1);for(var i=0;i<J3;i++){K3=K3.splice(0,K3.length-1);}var path='';for(i=0;i<K3.length;i++){if(K3[i]!=''){path+='/'+K3[i];}}path+='/';path+=I3;uri+=path;}else{path='';K3=loc.pathname.split('/');K3=K3.splice(0,K3.length-1);for(var i=0;i<K3.length;i++){if(K3[i]!=''){path+='/'+K3[i];}}path+='/';uri+=path+href;}return uri;}function f48(async,uri,F4,G4){var W5=U0;if(typeof window.ActiveXObject!=N0){try{W5=new ActiveXObject('Microsoft.XMLHTTP');}catch(err){W5=U0;}}if(W5==U0&&typeof window.XMLHttpRequest!=N0){try{W5=new XMLHttpRequest();}catch(err){W5=U0;}}if(W5==U0){throw(new Error(Q));}W5.open('GET',uri,async);try{W5.setRequestHeader('User-Agent',M0);}catch(err){}function f49(W5){if(/(0|200|304)/.test(W5.status.toString())){F4(W5.responseText,W5.getResponseHeader('Content-Type'));}else{G4(f42(W5.statusText),W5.status);}}if(async==S0){W5.onreadystatechange=function(){if(W5.readyState==4){f49(W5);}};try {W5.send(U0);}catch(err){G4(B);}}else{var S6;try{W5.send(U0);S6=S0;}catch(err){S6=T0;}if(S6===S0){f49(W5);}else{G4(B);}}}}).apply(CSSUtilities); diff --git a/lib/assets/javascripts/vendor/gisted.js b/site/source/javascripts/code_sync/vendor/gisted.js similarity index 100% rename from lib/assets/javascripts/vendor/gisted.js rename to site/source/javascripts/code_sync/vendor/gisted.js diff --git a/lib/assets/stylesheets/code_sync/editor/mode-selector.css.scss b/site/source/javascripts/code_sync/vendor/inspekt.js similarity index 100% rename from lib/assets/stylesheets/code_sync/editor/mode-selector.css.scss rename to site/source/javascripts/code_sync/vendor/inspekt.js diff --git a/lib/assets/javascripts/vendor/jquery-ui-resize-drag.min.js b/site/source/javascripts/code_sync/vendor/jquery-ui-resize-drag.min.js similarity index 99% rename from lib/assets/javascripts/vendor/jquery-ui-resize-drag.min.js rename to site/source/javascripts/code_sync/vendor/jquery-ui-resize-drag.min.js index 781a551..afa0ed4 100755 --- a/lib/assets/javascripts/vendor/jquery-ui-resize-drag.min.js +++ b/site/source/javascripts/code_sync/vendor/jquery-ui-resize-drag.min.js @@ -1,4 +1,4 @@ -/*! jQuery UI - v1.10.3 - 2013-05-18 +/*! jQuery UI - v1.10.3 - 2013-06-04 * http://jqueryui.com * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js * Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ diff --git a/lib/assets/javascripts/vendor/jquery.js b/site/source/javascripts/code_sync/vendor/jquery.js similarity index 100% rename from lib/assets/javascripts/vendor/jquery.js rename to site/source/javascripts/code_sync/vendor/jquery.js diff --git a/lib/assets/javascripts/vendor/keylauncher.js b/site/source/javascripts/code_sync/vendor/keylauncher.js similarity index 100% rename from lib/assets/javascripts/vendor/keylauncher.js rename to site/source/javascripts/code_sync/vendor/keylauncher.js diff --git a/lib/assets/javascripts/vendor/keymaster.min.js b/site/source/javascripts/code_sync/vendor/keymaster.min.js similarity index 100% rename from lib/assets/javascripts/vendor/keymaster.min.js rename to site/source/javascripts/code_sync/vendor/keymaster.min.js diff --git a/lib/assets/javascripts/vendor/spectrum.js b/site/source/javascripts/code_sync/vendor/spectrum.js similarity index 100% rename from lib/assets/javascripts/vendor/spectrum.js rename to site/source/javascripts/code_sync/vendor/spectrum.js diff --git a/lib/assets/javascripts/vendor/underscore-min.js b/site/source/javascripts/code_sync/vendor/underscore-min.js similarity index 100% rename from lib/assets/javascripts/vendor/underscore-min.js rename to site/source/javascripts/code_sync/vendor/underscore-min.js diff --git a/lib/assets/javascripts/vendor/underscore.string.min.js b/site/source/javascripts/code_sync/vendor/underscore.string.min.js similarity index 100% rename from lib/assets/javascripts/vendor/underscore.string.min.js rename to site/source/javascripts/code_sync/vendor/underscore.string.min.js diff --git a/lib/assets/javascripts/vendor/vendored_codemirror.js b/site/source/javascripts/code_sync/vendor/vendored_codemirror.js similarity index 100% rename from lib/assets/javascripts/vendor/vendored_codemirror.js rename to site/source/javascripts/code_sync/vendor/vendored_codemirror.js diff --git a/lib/assets/javascripts/vendor/zepto.js b/site/source/javascripts/code_sync/vendor/zepto.js similarity index 100% rename from lib/assets/javascripts/vendor/zepto.js rename to site/source/javascripts/code_sync/vendor/zepto.js diff --git a/site/source/layouts/canvas-content.slim b/site/source/layouts/canvas-content.slim new file mode 100644 index 0000000..b963550 --- /dev/null +++ b/site/source/layouts/canvas-content.slim @@ -0,0 +1,18 @@ +doctype html +html lang="en" + head + meta charset="utf-8" + meta name="viewport" content="width=device-width, initial-scale=1.0" + meta name="author" content="Jonathan Soeder aka Datapimp" + meta name="keywords" content="asset pipeline tools, coffeescript, sass, codemirror, datapimp, jonathan soeder, soederpop" + title CodeSync: Asset Pipeline Live Reload + == stylesheet_link_tag 'code_sync', 'marketing', 'entypo' + == yield_content(:head) + + body + == javascript_include_tag 'code_sync', 'marketing' + == yield + + + + diff --git a/site/source/layouts/layout.slim b/site/source/layouts/layout.slim index 4e06e74..ff06846 100644 --- a/site/source/layouts/layout.slim +++ b/site/source/layouts/layout.slim @@ -1,16 +1,19 @@ doctype html html lang="en" head + title CodeSync: Asset Pipeline Live Reload meta charset="utf-8" meta name="viewport" content="width=device-width, initial-scale=1.0" meta name="author" content="Jonathan Soeder aka Datapimp" meta name="keywords" content="asset pipeline tools, coffeescript, sass, codemirror, datapimp, jonathan soeder, soederpop" - title CodeSync: Asset Pipeline Live Reload - == stylesheet_link_tag 'code_sync', 'marketing' + link rel="stylesheet" href="//weloveiconfonts.com/api/?family=fontawesome" + + == stylesheet_link_tag 'code_sync' == yield_content(:head) body - == javascript_include_tag 'code_sync', 'marketing' + == yield_content(:javascript_dependencies) + == javascript_include_tag 'code_sync' == yield diff --git a/site/source/stylesheets b/site/source/stylesheets deleted file mode 120000 index 5442ea4..0000000 --- a/site/source/stylesheets +++ /dev/null @@ -1 +0,0 @@ -../../lib/assets/stylesheets \ No newline at end of file diff --git a/site/source/stylesheets/code_sync.css.scss b/site/source/stylesheets/code_sync.css.scss new file mode 100644 index 0000000..31a24da --- /dev/null +++ b/site/source/stylesheets/code_sync.css.scss @@ -0,0 +1,20 @@ +/* + *= require_tree ./code_sync/vendor + *= require ./code_sync/src/codemirror + *= require ./code_sync/src/editor + *= require ./code_sync/src/editor-panel + *= require ./code_sync/src/editor-utility + *= require ./code_sync/src/toolbars + *= require ./code_sync/src/buttons + *= require_tree ./code_sync/src/plugins + *= require_self +*/ + +.card-view { + .card { + display: none; + &.active { + display: block; + } + } +} \ No newline at end of file diff --git a/site/source/stylesheets/code_sync/canvas.css.scss b/site/source/stylesheets/code_sync/canvas.css.scss new file mode 100644 index 0000000..6fea90c --- /dev/null +++ b/site/source/stylesheets/code_sync/canvas.css.scss @@ -0,0 +1,115 @@ +@import "code_sync/variables"; + +html, body { + height: 100%; +} + +body[data-canvas-application] { + overflow: hidden; +} + +.layer-controller { + position: relative; + width: 100%; + height: 100%; + z-index: 1; + + .layer { + position: absolute; + top: 0px; + right: 0px; + left: 0px; + bottom: 0px; + width: 100%; + height: 100%; + + .top[data-draggable-direction="horizontal"] { + box-shadow: -4px 0px 6px rgba(0,0,0,0.9); + } + + .top[data-draggable-direction="vertical"] { + box-shadow: 0px -4px 6px rgba(0,0,0,0.9); + } + } +} + + +#underneath { + background: #333; +} + +#canvas { + background: #fff; + + iframe, .drag-shim { + overflow:hidden; + overflow-x:hidden; + overflow-y:hidden; + height:100%; + width:100%; + position:absolute; + top:0px; + left:0px; + right:0px; + bottom:0px + } + + iframe { + z-index: 3; + } + + .drag-shim { + display: none; + z-index: 2; + } + + &.ui-draggable-dragging { + iframe { + z-index: 2; + } + .drag-shim { + z-index: 3; + display: block; + } + } + + &.ui-draggable[data-draggable-direction="vertical"] { + .handle.horizontal-handle { + background: rgba(30,30,30,0.5); + } + } + + &.ui-draggable[data-draggable-direction="horizontal"] { + .handle.vertical-handle { + background: rgba(30,30,30,0.5); + } + } + + .handle { + position: absolute; + background: rgba(30,30,30,0.9); + margin: 0px; + padding: 0px; + cursor: pointer; + z-index: 10; + } + + .handle.vertical-handle { + top: 0px; + left: 50%; + height: 25px; + width: 65px; + border-radius: 0px 0px 4px 4px; + box-shadow: 0 0 6px $darkBackground; + } + + .handle.horizontal-handle { + top: 50%; + left: 0%; + height: 65px; + width: 25px; + border-radius: 0px 4px 4px 0px; + box-shadow: 0 0 6px $darkBackground; + } +} + diff --git a/site/source/stylesheets/code_sync/code_sync.css.scss b/site/source/stylesheets/code_sync/code_sync.css.scss new file mode 100644 index 0000000..be6c782 --- /dev/null +++ b/site/source/stylesheets/code_sync/code_sync.css.scss @@ -0,0 +1,38 @@ +/* + *= require ./src/codemirror + *= require ./src/editor + *= require ./src/editor-panel + *= require ./src/editor-utility + *= require ./src/toolbars + *= require ./src/buttons + *= require_tree ./src/plugins + *= require_self +*/ + +.card-view { + .card { + display: none; + &.active { + display: block; + } + } +} + +.status-message { + width: 88%; + left: 10%; + bottom: 20%; + border-radius: 4px; + box-shadow: 0 0 6px #fff; + position: absolute; + z-index: 9000; + color: #fff; + background-color: #333; + padding: 8px; + &.error { + color: #ff8080; + } + &.success { + color: #80ff80; + } +} \ No newline at end of file diff --git a/site/source/stylesheets/code_sync/dependencies.css.scss b/site/source/stylesheets/code_sync/dependencies.css.scss new file mode 100644 index 0000000..ffd68ef --- /dev/null +++ b/site/source/stylesheets/code_sync/dependencies.css.scss @@ -0,0 +1,5 @@ +/* + *= require_tree ./vendor + *= require_self + *= require ./src/codemirror +*/ diff --git a/site/source/stylesheets/code_sync/embeddable-utility.css.scss b/site/source/stylesheets/code_sync/embeddable-utility.css.scss new file mode 100644 index 0000000..94366d1 --- /dev/null +++ b/site/source/stylesheets/code_sync/embeddable-utility.css.scss @@ -0,0 +1,99 @@ +@import "code_sync/variables"; + +.embeddable-utility-panel { + position: absolute; + z-index: 10000; + + .toolbar a { + color: $toolbarTextColor !important; + } + + &.bottom-aligned { + bottom: 40px; + right: 10px; + } + + &.top-aligned { + top: 40px; + left: 10px; + } + + background: $darkBackground; + color: $white; + width: 480px; + border-radius: 4px; + box-shadow: 0 0 6px $whiteShadow; + padding: 12px; +} + +.embeddable-utility-panel { + .form-control { + font-family: $baseFont; + font-size: $baseFontSize * 1.2; + line-height: $baseLineHeight * 1.2; + .control-group { + margin-bottom: $baseLineHeight / 2; + } + .controls { + input { + border-radius: 4px; + } + input.input-small { + width: 80px; + } + } + + .form-control-actions { + padding-top: 20px; + .btn { + cursor: pointer; + float: right; + } + } + } +} + +.codesync-embeddable { + ul.inline { + margin: 0px; + padding: 0px; + + li { + display: inline; + list-style-type: none; + padding-left: 6px; + padding-right: 6px; + border-right: 1px solid; + cursor: pointer; + + &:first-child { + padding-left: 0px; + } + + &:last-child { + border: 0px; + } + } + } + + .status-message { + width: 88%; + left: 20%; + bottom: 0%; + border-radius: 4px; + box-shadow: 0 0 6px #fff; + position: absolute; + z-index: 9000; + color: #fff; + background: rgba(25,25,25,0.2); + padding: 8px; + &.error { + color: #ff8080; + } + &.success { + color: #80ff80; + } + } +} + + diff --git a/site/source/stylesheets/code_sync/embeddable.css.scss b/site/source/stylesheets/code_sync/embeddable.css.scss new file mode 100644 index 0000000..4898e3b --- /dev/null +++ b/site/source/stylesheets/code_sync/embeddable.css.scss @@ -0,0 +1,202 @@ +@import "code_sync/variables"; +@import "font-awesome"; + +$embeddableHeight: 400px; +$embeddableWidth: 960px; +$editorCount: 3; + +$toolbarHeight: $baseLineHeight * 1.5; +$toolbarBackground: #343434; + +.codesync-embeddable, .codesync-embeddable * { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +.codesync-embeddable { + height: $embeddableHeight; +} + +.codesync-embeddable, .panels-wrapper, .editor-component, .global-toolbar { + background: $toolbarBackground; + margin: 0px; + padding: 0px; + width: 100%; +} + +.global-toolbar, .embeddable-editor-panel .toolbar { + height: $toolbarHeight; + background: $toolbarBackground; +} + +.global-toolbar { + position: absolute; + bottom: 0px; + z-index: 12000; +} + +// EFFECTS +.codesync-embeddable { + &.ui-draggable-dragging { + opacity: 0.85; + } + + &.animating { + .global-toolbar { + } + } + + .embeddable-editor-panel { + &.expanded { + z-index: 2; + box-shadow: 0px !important; + } + &.animating, &.raised { + z-index: 2; + box-shadow: 0 0 4px 2px $shadowColor; + } + } +} + +.codesync-embeddable { + .panels-wrapper { + height: $embeddableHeight - $toolbarHeight; + } + + .embeddable-editor-panel { + position: absolute; + height: $embeddableHeight - ($toolbarHeight); + width: $embeddableWidth / $editorCount; + z-index: 1; + + .CodeMirror, .editor-component { + width: 100%; + height: $embeddableHeight - ($toolbarHeight * 2); + } + + } + + &.animating { + .CodeMirror { + } + } +} + +.codesync-embeddable { + .toolbar { + color: $toolbarTextColor; + opacity: 1.0; + + &:last-child { + border-right: 0px; + } + + &.empty { + display: none; + } + } +} + +.codesync-embeddable { + .global-toolbar, .toolbar { + display: block; + clear: both; + line-height: $toolbarHeight; + padding-left: 20px; + padding-right: 10px; + + .button { + margin: 0px 8px; + } + + section { + width: 33.33333%; + float: left; + &.center { + text-align: center; + } + &.left { + padding-left: 4px; + clear: left; + .button:first-child { + margin-left: 0px; + } + } + &.right { + padding-right: 4px; + clear: right; + + .button:first-child { + margin-right: 0px; + } + + .button { + float: right; + } + text-align: right; + } + } + } +} + +.codesync-embeddable { + .icon { + &:before { + font-family: 'FontAwesome', sans-serif; + } + } + + .visibility-handle { + .slide-in, .slide-out { + display: none; + } + display: none; + } + + &[data-position="bottom"], &[data-position="top"] { + .drag-handle { + display: none; + } + .visibility-handle { + display: block; + } + &.visible { + .visibility-handle .slide-out { + display: block; + } + .visibility-handle .slide-in { + display: none; + } + } + } + + //down: 103 + //up: 102 + + .icon-expand-editor:before{ + content:"\f065" + } + + &.expanded { + .icon-expand-editor:before { + content:"\f066" + } + } +} + +.codesync-embeddable { + border-radius: 4px !important; + section { + border-radius: 4px !important; + } + .panels-wrapper, .global-toolbar, .toolbar, .editor-component { + border-radius: 4px !important; + } + .embeddable-editor-panel.first { + border-radius: 4px; + } + .embeddable-editor-panel.last { + border-radius: 4px; + } +} diff --git a/site/source/stylesheets/code_sync/src/buttons.css.scss b/site/source/stylesheets/code_sync/src/buttons.css.scss new file mode 100644 index 0000000..ba47fcd --- /dev/null +++ b/site/source/stylesheets/code_sync/src/buttons.css.scss @@ -0,0 +1,26 @@ +@import "code_sync/variables"; + +.btn-primary { + background: linear-gradient($primary,darken($primary,30)) !important; + text-shadow: 1px 1px $darkBackground; +} + +.btn { + border-radius: 4px; + text-align: center; + font-size: $baseFontSize; + line-height: $baseLineHeight; + padding: $baseLineHeight / 2.5; +} + +.btn-group { + margin-top: 12px; + float: left; + width: 100%; + clear: both; + .btn { + float: left; + padding-right: 8px; + cursor: pointer; + } +} diff --git a/lib/assets/stylesheets/code_sync/codemirror.css b/site/source/stylesheets/code_sync/src/codemirror.css similarity index 100% rename from lib/assets/stylesheets/code_sync/codemirror.css rename to site/source/stylesheets/code_sync/src/codemirror.css diff --git a/site/source/stylesheets/code_sync/src/editor-panel.css.scss b/site/source/stylesheets/code_sync/src/editor-panel.css.scss new file mode 100644 index 0000000..3dfa213 --- /dev/null +++ b/site/source/stylesheets/code_sync/src/editor-panel.css.scss @@ -0,0 +1,190 @@ +@import "code_sync/variables"; +.editor-panel-toolbar { + position: absolute; + width: 100%; + font-size: $baseFontSize; + line-height: $baseLineHeight; + .codesync-canvas-toolbar { + width: 98%; + margin: 0px auto; + } +} + +.editor-panel-toolbar, .toolbar-wrapper { + .controls { + color: $fadedWhite; + ul { + line-height: 36px; + } + + ul li { + padding: 8px !important; + } + + ul li.label { + text-decoration: underline; + text-align: center; + font-weight: bold; + } + + ul li[data-option] { + padding: 0px 6px; + } + + ul li:last-child { + border: 0px; + } + } + + #canvas-url-control { + .button .toggle-control { + width: 100% !important; + margin-left: 8px; + } + + .button .controls { + width: 140px; + } + + ul li.input-wrapper { + width: 300px; + input { + width: 50%; + border-radius: 4px; + } + } + + } +} + +.codesync-editor-panel { + .editor-panel-toolbar { + position: absolute; + top: 475px; + width: 100%; + height: 30px; + z-index: 1; + .controls { + margin: 0px; + padding: 0px; + color: $white; + ul { + width: 100%; + display: block; + margin: 0px; + padding: 0px; + li { + display: inline; + margin: 0px; + padding: 0px; + cursor: pointer; + } + + li.active { + font-weight: bold; + } + } + } + } +} + +.codesync-editor-panel { + position: relative; + top: 0px; + left: 0px; + .editor-wrapper { + .editor { + position: absolute; + height: 500px; + width: 33.33333%; + height: 100%; + top: 0px; + .toolbar-wrapper { + width: 100%; + top: 0px; + height: 30px; + padding-left: 30px; + line-height: 30px; + font-size: 15px; + } + .codemirror-wrapper { + height: 470px; + bottom: 0px; + .CodeMirror { + height: 440px; + top: 30px; + bottom: 0px; + width: 100%; + position: absolute; + } + } + } + + .editor[data-editor="0"] { + left: 0px; + } + .editor[data-editor="1"] { + left: 33.333333%; + } + .editor[data-editor="2"] { + left: 66.666666%; + } + } +} + +.codesync-editor-panel { + +} + +.codesync-editor-panel[data-layout="1"] { + .editor-wrapper { + .editor[data-editor="0"]{ + display: block; + width: 100%; + } + .editor[data-editor="1"]{ + display: none; + } + .editor[data-editor="2"]{ + display: none; + } + } +} + + +.codesync-editor-panel[data-layout="2"] { + .editor-wrapper { + .editor[data-editor="0"]{ + display: block; + width: 50%; + } + .editor[data-editor="1"]{ + display: block; + left: 50%; + width: 50%; + } + .editor[data-editor="2"]{ + display: none; + } + } +} + +.codesync-editor-panel[data-layout="3"] { + .editor-wrapper { + .editor[data-editor="0"]{ + display: block; + width: 33.333333%; + } + .editor[data-editor="1"]{ + display: block; + left: 33.333333%; + width: 33.333333%; + } + .editor[data-editor="2"]{ + display: block; + width: 33.333333%; + } + } + +} + diff --git a/site/source/stylesheets/code_sync/src/editor-utility.css.scss b/site/source/stylesheets/code_sync/src/editor-utility.css.scss new file mode 100644 index 0000000..801fee5 --- /dev/null +++ b/site/source/stylesheets/code_sync/src/editor-utility.css.scss @@ -0,0 +1,91 @@ +@import "code_sync/variables"; + +.editor-utility { + min-width: 450px; + max-width: 600px; + .control-group { + textarea { + border-radius: 4px; + } + } +} + +.editor-utility.top-aligned { + top: 40px; + left: 40px; +} + +.editor-utility.bottom-aligned { + top: 140px; + left: 40px; +} + +.editor-utility { + background: $darkBackground; + border-radius: 4px; + box-shadow: 0 0 6px $fadedWhite; + color: $white; + max-width: 600px; + color: $white; + padding: 20px; + position: absolute; + z-index: 9000; + label { + color: $white; + text-decoration: underline; + display: block + } +} + +.editor-utility { + .form-control { + padding: 20px; + .control-group { + label { + margin-bottom: $baseLineHeight / 2; + font-weight: bold; + } + textarea { + width: 80%; + resize: none; + min-height: 100px; + } + } + .form-control-actions { + padding-top: $baseLineHeight / 2; + clear: both; + width: 100%; + .btn { + background-color: $fadedWhite; + font-weight: bold; + cursor: pointer; + } + } + } +} + +.editor-utility { + .form-control-actions { + a.btn { + margin-right: 4px; + } + } +} + +.editor-utility { + .results { + .control-group input { + width: 80%; + } + } + ul.results-container { + padding: 0px; + margin: 20px 0px; + + li { + list-style-type: none; + margin: 0px; + padding: 0px; + } + } +} diff --git a/lib/assets/stylesheets/code_sync/index.css.scss b/site/source/stylesheets/code_sync/src/editor.css.scss similarity index 55% rename from lib/assets/stylesheets/code_sync/index.css.scss rename to site/source/stylesheets/code_sync/src/editor.css.scss index 3a5b841..a857c38 100644 --- a/lib/assets/stylesheets/code_sync/index.css.scss +++ b/site/source/stylesheets/code_sync/src/editor.css.scss @@ -1,55 +1,12 @@ -/* - *= require_tree ./editor - *= require ./console -*/ +@import "code_sync/variables"; -.codesync-editor { - height: 400px; +.codesync-editor.static-height { width: 100%; margin: 0px; padding: 0px; position: relative; z-index: 0; - .document-tabs-container { - position: absolute; - width: 100%; - } - - .codesync-asset-editor { - z-index: 90; - margin: 0px auto; - width: 100%; - position: absolute; - .CodeMirror { - height: 375px; - } - } - - .toolbar-wrapper { - position: absolute; - z-index: 9000; - color: #fff; - top: 10px; - right: 10px; - - .config-select { - float: right; - margin-top: -4px; - } - - .button { - float: left; - margin: 0px 4px; - cursor: pointer; - border-radius: 3px; - border: 1px solid #a3a3a3; - font-size: 12px; - line-height: 18px; - padding: 0px 4px; - } - } - .status-message { position: absolute; top: 50%; @@ -70,31 +27,35 @@ } -.codesync-editor.top-positioned[data-visible] { - .codesync-asset-editor { - box-shadow: 0px 4px 6px rgba(0,0,0,0.8); - } +.codesync-editor.static-height.top-positioned[data-visible] { } -.codesync-editor.top-positioned, .codesync-editor.bottom-positioned { +.codesync-editor.static-height.top-positioned, .codesync-editor.static-height.bottom-positioned { position: fixed; z-index: 30000; width: 100%; + opacity: 0.9; } -.codesync-editor.top-positioned { - border-radius: 0px 0px 4px 4px; +.codesync-editor.static-height.top-positioned { bottom: auto; top: 0px; - .codesync-asset-editor { + .toolbar-wrapper { + top: 10px; + right: 10px; + } + + .codemirror-wrapper { top: 0px; bottom: auto; + position: static; } - .document-tabs-container { + .document-tabs { top: auto; bottom: -8px; + position: static; .document-tab { border-radius: 0px 0px 4px 4px; @@ -102,19 +63,27 @@ } } -.codesync-editor.bottom-positioned { +.codesync-editor.static-height.bottom-positioned { border-radius: 4px 4px 0px 0px; bottom: 0px; - top: auto; - .codesync-asset-editor { - top: 26px; + .codemirror-wrapper { + position: absolute; + top: 34px; + bottom: auto; + width: 100%; } - .document-tabs-container { + .toolbar-wrapper { + top: 45px; + right: 10px; + } + + .document-tabs { + position: absolute; top: 0px; bottom: auto; - + width: 100%; .document-tab { border-radius: 4px 4px 0px 0px; } @@ -139,3 +108,4 @@ color: lighten(red,20); } } + diff --git a/site/source/stylesheets/code_sync/src/plugins/asset-selector.css.scss b/site/source/stylesheets/code_sync/src/plugins/asset-selector.css.scss new file mode 100644 index 0000000..dc0f900 --- /dev/null +++ b/site/source/stylesheets/code_sync/src/plugins/asset-selector.css.scss @@ -0,0 +1,34 @@ +@import "code_sync/variables"; + +.codesync-asset-selector { + background: $darkBackground; + + input { + width: 100%; + border-radius: 4px; + padding: 4px; + } + + + .search-results-wrapper { + width: 100%; + margin: 0px auto; + padding: 0px; + border-radius: 0px 0px 4px 4px; + + .search-result.active { + background-color: $activeHighlightOnDarkBackground; + } + + .search-result { + border-left: 1px solid $fadedWhite; + border-right: 1px solid $fadedWhite; + padding: 8px; + border-bottom: 1px dashed opacify($fadedWhite,0.1); + } + .search-result:last-child { + border-bottom: 1px solid $fadedWhite; + border-radius: 0px 0px 4px 4px; + } + } +} \ No newline at end of file diff --git a/site/source/stylesheets/code_sync/src/plugins/codesync-color-picker.css.scss b/site/source/stylesheets/code_sync/src/plugins/codesync-color-picker.css.scss new file mode 100644 index 0000000..7f992b7 --- /dev/null +++ b/site/source/stylesheets/code_sync/src/plugins/codesync-color-picker.css.scss @@ -0,0 +1,6 @@ +.codesync-color-picker { + position: absolute; + top: 15px; + right: 15px; + border-radius: 4px; +} \ No newline at end of file diff --git a/lib/assets/stylesheets/code_sync/editor/document-tabs.css.scss b/site/source/stylesheets/code_sync/src/plugins/document-tabs.css.scss similarity index 100% rename from lib/assets/stylesheets/code_sync/editor/document-tabs.css.scss rename to site/source/stylesheets/code_sync/src/plugins/document-tabs.css.scss diff --git a/site/source/stylesheets/code_sync/src/plugins/editor-utilities.css.scss b/site/source/stylesheets/code_sync/src/plugins/editor-utilities.css.scss new file mode 100644 index 0000000..3da4db6 --- /dev/null +++ b/site/source/stylesheets/code_sync/src/plugins/editor-utilities.css.scss @@ -0,0 +1,24 @@ +@import "code_sync/variables"; + +.element-sync-panel { + .selector-info { + input { + width: 90%; + border-radius: 4px; + padding: 4px; + } + } +} + + +.file-controls { + color: $white; + height: auto !important; + min-height: auto !important; + .form-control { + padding: 10px; + } + .controls input { + width: 100%; + } +} diff --git a/site/source/stylesheets/code_sync/src/toolbars.css.scss b/site/source/stylesheets/code_sync/src/toolbars.css.scss new file mode 100644 index 0000000..b716452 --- /dev/null +++ b/site/source/stylesheets/code_sync/src/toolbars.css.scss @@ -0,0 +1,10 @@ +.toolbar-wrapper { + .right { + padding-right: 30px; + .button { + float: right; + padding-right: 5px; + cursor: pointer; + } + } +} diff --git a/site/source/stylesheets/code_sync/variables.css.scss b/site/source/stylesheets/code_sync/variables.css.scss new file mode 100644 index 0000000..3487a60 --- /dev/null +++ b/site/source/stylesheets/code_sync/variables.css.scss @@ -0,0 +1,26 @@ +//typography +$baseFont: "Helvetica"; +$baseFontSize: 14px; +$baseLineHeight: 22px; + +//colors +$white: rgba(255,255,255,0.8); +$fadedWhite: rgba(225,225,225,0.6); +$darkBackground: rgba(30,30,30,0.8); +$activeHighlightOnDarkBackground: opacify(#bada55,0.2); +$background: rgba(30,30,30,0.8); +$toolbarTextColor: #fafafa; + +$shadowColor: rgba(20,20,20,0.9); +$whiteShadow: rgba(215,215,215,0.5); + +$errorBackground: #bada55; +$errorText: #ffffff; +$successBackground: #bada55; +$successText: #ffffff; + +$primary: #4067c5; +$alternate: #bada55; + +$toolbarSize: 32px; + diff --git a/lib/assets/stylesheets/vendor/animate.css b/site/source/stylesheets/code_sync/vendor/animate.css similarity index 100% rename from lib/assets/stylesheets/vendor/animate.css rename to site/source/stylesheets/code_sync/vendor/animate.css diff --git a/lib/assets/stylesheets/vendor/codemirror-ambiance.css b/site/source/stylesheets/code_sync/vendor/codemirror-ambiance.css similarity index 99% rename from lib/assets/stylesheets/vendor/codemirror-ambiance.css rename to site/source/stylesheets/code_sync/vendor/codemirror-ambiance.css index 4377caf..58aff56 100644 --- a/lib/assets/stylesheets/vendor/codemirror-ambiance.css +++ b/site/source/stylesheets/code_sync/vendor/codemirror-ambiance.css @@ -41,7 +41,6 @@ .cm-s-ambiance.CodeMirror { line-height: 1.40em; - font-family: Monaco, Menlo,"Andale Mono","lucida console","Courier New",monospace !important; color: #E6E1DC; background-color: #202020; -webkit-box-shadow: inset 0 0 10px black; diff --git a/lib/assets/stylesheets/vendor/codemirror-lesserdark.css b/site/source/stylesheets/code_sync/vendor/codemirror-lesserdark.css similarity index 93% rename from lib/assets/stylesheets/vendor/codemirror-lesserdark.css rename to site/source/stylesheets/code_sync/vendor/codemirror-lesserdark.css index f973834..63935ed 100644 --- a/lib/assets/stylesheets/vendor/codemirror-lesserdark.css +++ b/site/source/stylesheets/code_sync/vendor/codemirror-lesserdark.css @@ -5,9 +5,6 @@ Ported to CodeMirror by Peter Kroon .cm-s-lesser-dark { line-height: 1.3em; } -.cm-s-lesser-dark { - font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important; -} .cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; } .cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/ diff --git a/lib/assets/stylesheets/vendor/codemirror-monokai.css b/site/source/stylesheets/code_sync/vendor/codemirror-monokai.css similarity index 100% rename from lib/assets/stylesheets/vendor/codemirror-monokai.css rename to site/source/stylesheets/code_sync/vendor/codemirror-monokai.css diff --git a/lib/assets/stylesheets/vendor/codemirror-xq-light.css b/site/source/stylesheets/code_sync/vendor/codemirror-xq-light.css similarity index 100% rename from lib/assets/stylesheets/vendor/codemirror-xq-light.css rename to site/source/stylesheets/code_sync/vendor/codemirror-xq-light.css diff --git a/lib/assets/stylesheets/vendor/grid-layout.css b/site/source/stylesheets/code_sync/vendor/grid-layout.css similarity index 78% rename from lib/assets/stylesheets/vendor/grid-layout.css rename to site/source/stylesheets/code_sync/vendor/grid-layout.css index 0f5e325..169a9a9 100644 --- a/lib/assets/stylesheets/vendor/grid-layout.css +++ b/site/source/stylesheets/code_sync/vendor/grid-layout.css @@ -216,7 +216,7 @@ textarea { .row:after { clear: both; } -[class*="span"] { +[class*="gspan"] { float: left; min-height: 1px; margin-left: 20px; @@ -227,40 +227,40 @@ textarea { .navbar-fixed-bottom .container { width: 940px; } -.span12 { +.gspan12 { width: 940px; } -.span11 { +.gspan11 { width: 860px; } -.span10 { +.gspan10 { width: 780px; } -.span9 { +.gspan9 { width: 700px; } -.span8 { +.gspan8 { width: 620px; } -.span7 { +.gspan7 { width: 540px; } -.span6 { +.gspan6 { width: 460px; } -.span5 { +.gspan5 { width: 380px; } -.span4 { +.gspan4 { width: 300px; } -.span3 { +.gspan3 { width: 220px; } -.span2 { +.gspan2 { width: 140px; } -.span1 { +.gspan1 { width: 60px; } .offset12 { @@ -299,20 +299,20 @@ textarea { .offset1 { margin-left: 100px; } -.row-fluid { +.fluid-row { width: 100%; *zoom: 1; } -.row-fluid:before, -.row-fluid:after { +.fluid-row:before, +.fluid-row:after { display: table; content: ""; line-height: 0; } -.row-fluid:after { +.fluid-row:after { clear: both; } -.row-fluid [class*="span"] { +.fluid-row [class*="span"] { display: block; width: 100%; min-height: 30px; @@ -323,162 +323,162 @@ textarea { margin-left: 2.127659574468085%; *margin-left: 2.074468085106383%; } -.row-fluid [class*="span"]:first-child { +.fluid-row [class*="span"]:first-child { margin-left: 0; } -.row-fluid .controls-row [class*="span"] + [class*="span"] { +.fluid-row .controls-row [class*="span"] + [class*="span"] { margin-left: 2.127659574468085%; } -.row-fluid .span12 { +.fluid-row .gspan12 { width: 100%; *width: 99.94680851063829%; } -.row-fluid .span11 { +.fluid-row .gspan11 { width: 91.48936170212765%; *width: 91.43617021276594%; } -.row-fluid .span10 { +.fluid-row .gspan10 { width: 82.97872340425532%; *width: 82.92553191489361%; } -.row-fluid .span9 { +.fluid-row .gspan9 { width: 74.46808510638297%; *width: 74.41489361702126%; } -.row-fluid .span8 { +.fluid-row .gspan8 { width: 65.95744680851064%; *width: 65.90425531914893%; } -.row-fluid .span7 { +.fluid-row .gspan7 { width: 57.44680851063829%; *width: 57.39361702127659%; } -.row-fluid .span6 { +.fluid-row .gspan6 { width: 48.93617021276595%; *width: 48.88297872340425%; } -.row-fluid .span5 { +.fluid-row .gspan5 { width: 40.42553191489362%; *width: 40.37234042553192%; } -.row-fluid .span4 { +.fluid-row .gspan4 { width: 31.914893617021278%; *width: 31.861702127659576%; } -.row-fluid .span3 { +.fluid-row .gspan3 { width: 23.404255319148934%; *width: 23.351063829787233%; } -.row-fluid .span2 { +.fluid-row .gspan2 { width: 14.893617021276595%; *width: 14.840425531914894%; } -.row-fluid .span1 { +.fluid-row .gspan1 { width: 6.382978723404255%; *width: 6.329787234042553%; } -.row-fluid .offset12 { +.fluid-row .offset12 { margin-left: 104.25531914893617%; *margin-left: 104.14893617021275%; } -.row-fluid .offset12:first-child { +.fluid-row .offset12:first-child { margin-left: 102.12765957446808%; *margin-left: 102.02127659574467%; } -.row-fluid .offset11 { +.fluid-row .offset11 { margin-left: 95.74468085106382%; *margin-left: 95.6382978723404%; } -.row-fluid .offset11:first-child { +.fluid-row .offset11:first-child { margin-left: 93.61702127659574%; *margin-left: 93.51063829787232%; } -.row-fluid .offset10 { +.fluid-row .offset10 { margin-left: 87.23404255319149%; *margin-left: 87.12765957446807%; } -.row-fluid .offset10:first-child { +.fluid-row .offset10:first-child { margin-left: 85.1063829787234%; *margin-left: 84.99999999999999%; } -.row-fluid .offset9 { +.fluid-row .offset9 { margin-left: 78.72340425531914%; *margin-left: 78.61702127659572%; } -.row-fluid .offset9:first-child { +.fluid-row .offset9:first-child { margin-left: 76.59574468085106%; *margin-left: 76.48936170212764%; } -.row-fluid .offset8 { +.fluid-row .offset8 { margin-left: 70.2127659574468%; *margin-left: 70.10638297872339%; } -.row-fluid .offset8:first-child { +.fluid-row .offset8:first-child { margin-left: 68.08510638297872%; *margin-left: 67.9787234042553%; } -.row-fluid .offset7 { +.fluid-row .offset7 { margin-left: 61.70212765957446%; *margin-left: 61.59574468085106%; } -.row-fluid .offset7:first-child { +.fluid-row .offset7:first-child { margin-left: 59.574468085106375%; *margin-left: 59.46808510638297%; } -.row-fluid .offset6 { +.fluid-row .offset6 { margin-left: 53.191489361702125%; *margin-left: 53.085106382978715%; } -.row-fluid .offset6:first-child { +.fluid-row .offset6:first-child { margin-left: 51.063829787234035%; *margin-left: 50.95744680851063%; } -.row-fluid .offset5 { +.fluid-row .offset5 { margin-left: 44.68085106382979%; *margin-left: 44.57446808510638%; } -.row-fluid .offset5:first-child { +.fluid-row .offset5:first-child { margin-left: 42.5531914893617%; *margin-left: 42.4468085106383%; } -.row-fluid .offset4 { +.fluid-row .offset4 { margin-left: 36.170212765957444%; *margin-left: 36.06382978723405%; } -.row-fluid .offset4:first-child { +.fluid-row .offset4:first-child { margin-left: 34.04255319148936%; *margin-left: 33.93617021276596%; } -.row-fluid .offset3 { +.fluid-row .offset3 { margin-left: 27.659574468085104%; *margin-left: 27.5531914893617%; } -.row-fluid .offset3:first-child { +.fluid-row .offset3:first-child { margin-left: 25.53191489361702%; *margin-left: 25.425531914893618%; } -.row-fluid .offset2 { +.fluid-row .offset2 { margin-left: 19.148936170212764%; *margin-left: 19.04255319148936%; } -.row-fluid .offset2:first-child { +.fluid-row .offset2:first-child { margin-left: 17.02127659574468%; *margin-left: 16.914893617021278%; } -.row-fluid .offset1 { +.fluid-row .offset1 { margin-left: 10.638297872340425%; *margin-left: 10.53191489361702%; } -.row-fluid .offset1:first-child { +.fluid-row .offset1:first-child { margin-left: 8.51063829787234%; *margin-left: 8.404255319148938%; } [class*="span"].hide, -.row-fluid [class*="span"].hide { +.fluid-row [class*="span"].hide { display: none; } [class*="span"].pull-right, -.row-fluid [class*="span"].pull-right { +.fluid-row [class*="span"].pull-right { float: right; } .container { @@ -593,7 +593,7 @@ textarea { .container { width: auto; } - .row-fluid { + .fluid-row { width: 100%; } .row, @@ -606,7 +606,7 @@ textarea { } [class*="span"], .uneditable-input[class*="span"], - .row-fluid [class*="span"] { + .fluid-row [class*="span"] { float: none; display: block; width: 100%; @@ -615,14 +615,14 @@ textarea { -moz-box-sizing: border-box; box-sizing: border-box; } - .span12, - .row-fluid .span12 { + .gspan12, + .fluid-row .gspan12 { width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } - .row-fluid [class*="offset"]:first-child { + .fluid-row [class*="offset"]:first-child { margin-left: 0; } .input-large, @@ -688,7 +688,7 @@ textarea { .form-horizontal .control-list { padding-top: 0; } - .form-horizontal .form-actions { + .form-horizontal .action-row { padding-left: 10px; padding-right: 10px; } @@ -740,40 +740,40 @@ textarea { .navbar-fixed-bottom .container { width: 724px; } - .span12 { + .gspan12 { width: 724px; } - .span11 { + .gspan11 { width: 662px; } - .span10 { + .gspan10 { width: 600px; } - .span9 { + .gspan9 { width: 538px; } - .span8 { + .gspan8 { width: 476px; } - .span7 { + .gspan7 { width: 414px; } - .span6 { + .gspan6 { width: 352px; } - .span5 { + .gspan5 { width: 290px; } - .span4 { + .gspan4 { width: 228px; } - .span3 { + .gspan3 { width: 166px; } - .span2 { + .gspan2 { width: 104px; } - .span1 { + .gspan1 { width: 42px; } .offset12 { @@ -812,20 +812,20 @@ textarea { .offset1 { margin-left: 82px; } - .row-fluid { + .fluid-row { width: 100%; *zoom: 1; } - .row-fluid:before, - .row-fluid:after { + .fluid-row:before, + .fluid-row:after { display: table; content: ""; line-height: 0; } - .row-fluid:after { + .fluid-row:after { clear: both; } - .row-fluid [class*="span"] { + .fluid-row [class*="span"] { display: block; width: 100%; min-height: 30px; @@ -836,153 +836,153 @@ textarea { margin-left: 2.7624309392265194%; *margin-left: 2.709239449864817%; } - .row-fluid [class*="span"]:first-child { + .fluid-row [class*="span"]:first-child { margin-left: 0; } - .row-fluid .controls-row [class*="span"] + [class*="span"] { + .fluid-row .controls-row [class*="span"] + [class*="span"] { margin-left: 2.7624309392265194%; } - .row-fluid .span12 { + .fluid-row .gspan12 { width: 100%; *width: 99.94680851063829%; } - .row-fluid .span11 { + .fluid-row .gspan11 { width: 91.43646408839778%; *width: 91.38327259903608%; } - .row-fluid .span10 { + .fluid-row .gspan10 { width: 82.87292817679558%; *width: 82.81973668743387%; } - .row-fluid .span9 { + .fluid-row .gspan9 { width: 74.30939226519337%; *width: 74.25620077583166%; } - .row-fluid .span8 { + .fluid-row .gspan8 { width: 65.74585635359117%; *width: 65.69266486422946%; } - .row-fluid .span7 { + .fluid-row .gspan7 { width: 57.18232044198895%; *width: 57.12912895262725%; } - .row-fluid .span6 { + .fluid-row .gspan6 { width: 48.61878453038674%; *width: 48.56559304102504%; } - .row-fluid .span5 { + .fluid-row .gspan5 { width: 40.05524861878453%; *width: 40.00205712942283%; } - .row-fluid .span4 { + .fluid-row .gspan4 { width: 31.491712707182323%; *width: 31.43852121782062%; } - .row-fluid .span3 { + .fluid-row .gspan3 { width: 22.92817679558011%; *width: 22.87498530621841%; } - .row-fluid .span2 { + .fluid-row .gspan2 { width: 14.3646408839779%; *width: 14.311449394616199%; } - .row-fluid .span1 { + .fluid-row .gspan1 { width: 5.801104972375691%; *width: 5.747913483013988%; } - .row-fluid .offset12 { + .fluid-row .offset12 { margin-left: 105.52486187845304%; *margin-left: 105.41847889972962%; } - .row-fluid .offset12:first-child { + .fluid-row .offset12:first-child { margin-left: 102.76243093922652%; *margin-left: 102.6560479605031%; } - .row-fluid .offset11 { + .fluid-row .offset11 { margin-left: 96.96132596685082%; *margin-left: 96.8549429881274%; } - .row-fluid .offset11:first-child { + .fluid-row .offset11:first-child { margin-left: 94.1988950276243%; *margin-left: 94.09251204890089%; } - .row-fluid .offset10 { + .fluid-row .offset10 { margin-left: 88.39779005524862%; *margin-left: 88.2914070765252%; } - .row-fluid .offset10:first-child { + .fluid-row .offset10:first-child { margin-left: 85.6353591160221%; *margin-left: 85.52897613729868%; } - .row-fluid .offset9 { + .fluid-row .offset9 { margin-left: 79.8342541436464%; *margin-left: 79.72787116492299%; } - .row-fluid .offset9:first-child { + .fluid-row .offset9:first-child { margin-left: 77.07182320441989%; *margin-left: 76.96544022569647%; } - .row-fluid .offset8 { + .fluid-row .offset8 { margin-left: 71.2707182320442%; *margin-left: 71.16433525332079%; } - .row-fluid .offset8:first-child { + .fluid-row .offset8:first-child { margin-left: 68.50828729281768%; *margin-left: 68.40190431409427%; } - .row-fluid .offset7 { + .fluid-row .offset7 { margin-left: 62.70718232044199%; *margin-left: 62.600799341718584%; } - .row-fluid .offset7:first-child { + .fluid-row .offset7:first-child { margin-left: 59.94475138121547%; *margin-left: 59.838368402492065%; } - .row-fluid .offset6 { + .fluid-row .offset6 { margin-left: 54.14364640883978%; *margin-left: 54.037263430116376%; } - .row-fluid .offset6:first-child { + .fluid-row .offset6:first-child { margin-left: 51.38121546961326%; *margin-left: 51.27483249088986%; } - .row-fluid .offset5 { + .fluid-row .offset5 { margin-left: 45.58011049723757%; *margin-left: 45.47372751851417%; } - .row-fluid .offset5:first-child { + .fluid-row .offset5:first-child { margin-left: 42.81767955801105%; *margin-left: 42.71129657928765%; } - .row-fluid .offset4 { + .fluid-row .offset4 { margin-left: 37.01657458563536%; *margin-left: 36.91019160691196%; } - .row-fluid .offset4:first-child { + .fluid-row .offset4:first-child { margin-left: 34.25414364640884%; *margin-left: 34.14776066768544%; } - .row-fluid .offset3 { + .fluid-row .offset3 { margin-left: 28.45303867403315%; *margin-left: 28.346655695309746%; } - .row-fluid .offset3:first-child { + .fluid-row .offset3:first-child { margin-left: 25.69060773480663%; *margin-left: 25.584224756083227%; } - .row-fluid .offset2 { + .fluid-row .offset2 { margin-left: 19.88950276243094%; *margin-left: 19.783119783707537%; } - .row-fluid .offset2:first-child { + .fluid-row .offset2:first-child { margin-left: 17.12707182320442%; *margin-left: 17.02068884448102%; } - .row-fluid .offset1 { + .fluid-row .offset1 { margin-left: 11.32596685082873%; *margin-left: 11.219583872105325%; } - .row-fluid .offset1:first-child { + .fluid-row .offset1:first-child { margin-left: 8.56353591160221%; *margin-left: 8.457152932878806%; } @@ -994,64 +994,64 @@ textarea { .controls-row [class*="span"] + [class*="span"] { margin-left: 20px; } - input.span12, - textarea.span12, - .uneditable-input.span12 { + input.gspan12, + textarea.gspan12, + .uneditable-input.gspan12 { width: 710px; } - input.span11, - textarea.span11, - .uneditable-input.span11 { + input.gspan11, + textarea.gspan11, + .uneditable-input.gspan11 { width: 648px; } - input.span10, - textarea.span10, - .uneditable-input.span10 { + input.gspan10, + textarea.gspan10, + .uneditable-input.gspan10 { width: 586px; } - input.span9, - textarea.span9, - .uneditable-input.span9 { + input.gspan9, + textarea.gspan9, + .uneditable-input.gspan9 { width: 524px; } - input.span8, - textarea.span8, - .uneditable-input.span8 { + input.gspan8, + textarea.gspan8, + .uneditable-input.gspan8 { width: 462px; } - input.span7, - textarea.span7, - .uneditable-input.span7 { + input.gspan7, + textarea.gspan7, + .uneditable-input.gspan7 { width: 400px; } - input.span6, - textarea.span6, - .uneditable-input.span6 { + input.gspan6, + textarea.gspan6, + .uneditable-input.gspan6 { width: 338px; } - input.span5, - textarea.span5, - .uneditable-input.span5 { + input.gspan5, + textarea.gspan5, + .uneditable-input.gspan5 { width: 276px; } - input.span4, - textarea.span4, - .uneditable-input.span4 { + input.gspan4, + textarea.gspan4, + .uneditable-input.gspan4 { width: 214px; } - input.span3, - textarea.span3, - .uneditable-input.span3 { + input.gspan3, + textarea.gspan3, + .uneditable-input.gspan3 { width: 152px; } - input.span2, - textarea.span2, - .uneditable-input.span2 { + input.gspan2, + textarea.gspan2, + .uneditable-input.gspan2 { width: 90px; } - input.span1, - textarea.span1, - .uneditable-input.span1 { + input.gspan1, + textarea.gspan1, + .uneditable-input.gspan1 { width: 28px; } } @@ -1080,40 +1080,40 @@ textarea { .navbar-fixed-bottom .container { width: 1170px; } - .span12 { + .gspan12 { width: 1170px; } - .span11 { + .gspan11 { width: 1070px; } - .span10 { + .gspan10 { width: 970px; } - .span9 { + .gspan9 { width: 870px; } - .span8 { + .gspan8 { width: 770px; } - .span7 { + .gspan7 { width: 670px; } - .span6 { + .gspan6 { width: 570px; } - .span5 { + .gspan5 { width: 470px; } - .span4 { + .gspan4 { width: 370px; } - .span3 { + .gspan3 { width: 270px; } - .span2 { + .gspan2 { width: 170px; } - .span1 { + .gspan1 { width: 70px; } .offset12 { @@ -1152,20 +1152,20 @@ textarea { .offset1 { margin-left: 130px; } - .row-fluid { + .fluid-row { width: 100%; *zoom: 1; } - .row-fluid:before, - .row-fluid:after { + .fluid-row:before, + .fluid-row:after { display: table; content: ""; line-height: 0; } - .row-fluid:after { + .fluid-row:after { clear: both; } - .row-fluid [class*="span"] { + .fluid-row [class*="span"] { display: block; width: 100%; min-height: 30px; @@ -1176,153 +1176,153 @@ textarea { margin-left: 2.564102564102564%; *margin-left: 2.5109110747408616%; } - .row-fluid [class*="span"]:first-child { + .fluid-row [class*="span"]:first-child { margin-left: 0; } - .row-fluid .controls-row [class*="span"] + [class*="span"] { + .fluid-row .controls-row [class*="span"] + [class*="span"] { margin-left: 2.564102564102564%; } - .row-fluid .span12 { + .fluid-row .gspan12 { width: 100%; *width: 99.94680851063829%; } - .row-fluid .span11 { + .fluid-row .gspan11 { width: 91.45299145299145%; *width: 91.39979996362975%; } - .row-fluid .span10 { + .fluid-row .gspan10 { width: 82.90598290598291%; *width: 82.8527914166212%; } - .row-fluid .span9 { + .fluid-row .gspan9 { width: 74.35897435897436%; *width: 74.30578286961266%; } - .row-fluid .span8 { + .fluid-row .gspan8 { width: 65.81196581196582%; *width: 65.75877432260411%; } - .row-fluid .span7 { + .fluid-row .gspan7 { width: 57.26495726495726%; *width: 57.21176577559556%; } - .row-fluid .span6 { + .fluid-row .gspan6 { width: 48.717948717948715%; *width: 48.664757228587014%; } - .row-fluid .span5 { + .fluid-row .gspan5 { width: 40.17094017094017%; *width: 40.11774868157847%; } - .row-fluid .span4 { + .fluid-row .gspan4 { width: 31.623931623931625%; *width: 31.570740134569924%; } - .row-fluid .span3 { + .fluid-row .gspan3 { width: 23.076923076923077%; *width: 23.023731587561375%; } - .row-fluid .span2 { + .fluid-row .gspan2 { width: 14.52991452991453%; *width: 14.476723040552828%; } - .row-fluid .span1 { + .fluid-row .gspan1 { width: 5.982905982905983%; *width: 5.929714493544281%; } - .row-fluid .offset12 { + .fluid-row .offset12 { margin-left: 105.12820512820512%; *margin-left: 105.02182214948171%; } - .row-fluid .offset12:first-child { + .fluid-row .offset12:first-child { margin-left: 102.56410256410257%; *margin-left: 102.45771958537915%; } - .row-fluid .offset11 { + .fluid-row .offset11 { margin-left: 96.58119658119658%; *margin-left: 96.47481360247316%; } - .row-fluid .offset11:first-child { + .fluid-row .offset11:first-child { margin-left: 94.01709401709402%; *margin-left: 93.91071103837061%; } - .row-fluid .offset10 { + .fluid-row .offset10 { margin-left: 88.03418803418803%; *margin-left: 87.92780505546462%; } - .row-fluid .offset10:first-child { + .fluid-row .offset10:first-child { margin-left: 85.47008547008548%; *margin-left: 85.36370249136206%; } - .row-fluid .offset9 { + .fluid-row .offset9 { margin-left: 79.48717948717949%; *margin-left: 79.38079650845607%; } - .row-fluid .offset9:first-child { + .fluid-row .offset9:first-child { margin-left: 76.92307692307693%; *margin-left: 76.81669394435352%; } - .row-fluid .offset8 { + .fluid-row .offset8 { margin-left: 70.94017094017094%; *margin-left: 70.83378796144753%; } - .row-fluid .offset8:first-child { + .fluid-row .offset8:first-child { margin-left: 68.37606837606839%; *margin-left: 68.26968539734497%; } - .row-fluid .offset7 { + .fluid-row .offset7 { margin-left: 62.393162393162385%; *margin-left: 62.28677941443899%; } - .row-fluid .offset7:first-child { + .fluid-row .offset7:first-child { margin-left: 59.82905982905982%; *margin-left: 59.72267685033642%; } - .row-fluid .offset6 { + .fluid-row .offset6 { margin-left: 53.84615384615384%; *margin-left: 53.739770867430444%; } - .row-fluid .offset6:first-child { + .fluid-row .offset6:first-child { margin-left: 51.28205128205128%; *margin-left: 51.175668303327875%; } - .row-fluid .offset5 { + .fluid-row .offset5 { margin-left: 45.299145299145295%; *margin-left: 45.1927623204219%; } - .row-fluid .offset5:first-child { + .fluid-row .offset5:first-child { margin-left: 42.73504273504273%; *margin-left: 42.62865975631933%; } - .row-fluid .offset4 { + .fluid-row .offset4 { margin-left: 36.75213675213675%; *margin-left: 36.645753773413354%; } - .row-fluid .offset4:first-child { + .fluid-row .offset4:first-child { margin-left: 34.18803418803419%; *margin-left: 34.081651209310785%; } - .row-fluid .offset3 { + .fluid-row .offset3 { margin-left: 28.205128205128204%; *margin-left: 28.0987452264048%; } - .row-fluid .offset3:first-child { + .fluid-row .offset3:first-child { margin-left: 25.641025641025642%; *margin-left: 25.53464266230224%; } - .row-fluid .offset2 { + .fluid-row .offset2 { margin-left: 19.65811965811966%; *margin-left: 19.551736679396257%; } - .row-fluid .offset2:first-child { + .fluid-row .offset2:first-child { margin-left: 17.094017094017094%; *margin-left: 16.98763411529369%; } - .row-fluid .offset1 { + .fluid-row .offset1 { margin-left: 11.11111111111111%; *margin-left: 11.004728132387708%; } - .row-fluid .offset1:first-child { + .fluid-row .offset1:first-child { margin-left: 8.547008547008547%; *margin-left: 8.440625568285142%; } @@ -1334,64 +1334,64 @@ textarea { .controls-row [class*="span"] + [class*="span"] { margin-left: 30px; } - input.span12, - textarea.span12, - .uneditable-input.span12 { + input.gspan12, + textarea.gspan12, + .uneditable-input.gspan12 { width: 1156px; } - input.span11, - textarea.span11, - .uneditable-input.span11 { + input.gspan11, + textarea.gspan11, + .uneditable-input.gspan11 { width: 1056px; } - input.span10, - textarea.span10, - .uneditable-input.span10 { + input.gspan10, + textarea.gspan10, + .uneditable-input.gspan10 { width: 956px; } - input.span9, - textarea.span9, - .uneditable-input.span9 { + input.gspan9, + textarea.gspan9, + .uneditable-input.gspan9 { width: 856px; } - input.span8, - textarea.span8, - .uneditable-input.span8 { + input.gspan8, + textarea.gspan8, + .uneditable-input.gspan8 { width: 756px; } - input.span7, - textarea.span7, - .uneditable-input.span7 { + input.gspan7, + textarea.gspan7, + .uneditable-input.gspan7 { width: 656px; } - input.span6, - textarea.span6, - .uneditable-input.span6 { + input.gspan6, + textarea.gspan6, + .uneditable-input.gspan6 { width: 556px; } - input.span5, - textarea.span5, - .uneditable-input.span5 { + input.gspan5, + textarea.gspan5, + .uneditable-input.gspan5 { width: 456px; } - input.span4, - textarea.span4, - .uneditable-input.span4 { + input.gspan4, + textarea.gspan4, + .uneditable-input.gspan4 { width: 356px; } - input.span3, - textarea.span3, - .uneditable-input.span3 { + input.gspan3, + textarea.gspan3, + .uneditable-input.gspan3 { width: 256px; } - input.span2, - textarea.span2, - .uneditable-input.span2 { + input.gspan2, + textarea.gspan2, + .uneditable-input.gspan2 { width: 156px; } - input.span1, - textarea.span1, - .uneditable-input.span1 { + input.gspan1, + textarea.gspan1, + .uneditable-input.gspan1 { width: 56px; } .thumbnails { @@ -1400,7 +1400,7 @@ textarea { .thumbnails > li { margin-left: 30px; } - .row-fluid .thumbnails { + .fluid-row .thumbnails { margin-left: 0; } } diff --git a/lib/assets/stylesheets/vendor/spectrum.css b/site/source/stylesheets/code_sync/vendor/spectrum.css similarity index 100% rename from lib/assets/stylesheets/vendor/spectrum.css rename to site/source/stylesheets/code_sync/vendor/spectrum.css diff --git a/lib/assets/stylesheets/vendor/vendored_codemirror.css b/site/source/stylesheets/code_sync/vendor/vendored_codemirror.css similarity index 100% rename from lib/assets/stylesheets/vendor/vendored_codemirror.css rename to site/source/stylesheets/code_sync/vendor/vendored_codemirror.css diff --git a/vendor/assets/javascripts/code_sync.min.js b/vendor/assets/javascripts/code_sync.min.js new file mode 100644 index 0000000..056d664 --- /dev/null +++ b/vendor/assets/javascripts/code_sync.min.js @@ -0,0 +1,19 @@ +// keymaster.js +// (c) 2011-2012 Thomas Fuchs +// keymaster.js may be freely distributed under the MIT license. +function CSSUtilities(){}(function(e){function t(e,t){var n=e.length;while(n--)if(e[n]===t)return n;return-1}function n(e,n){var r,i,o,u,a;r=e.keyCode,t(w,r)==-1&&w.push(r);if(r==93||r==224)r=91;if(r in m){m[r]=!0;for(o in y)y[o]==r&&(s[o]=!0);return}if(!s.filter.call(this,e))return;if(!(r in v))return;for(u=0;u<v[r].length;u++){i=v[r][u];if(i.scope==n||i.scope=="all"){a=i.mods.length>0;for(o in m)if(!m[o]&&t(i.mods,+o)>-1||m[o]&&t(i.mods,+o)==-1)a=!1;(i.mods.length==0&&!m[16]&&!m[18]&&!m[17]&&!m[91]||a)&&i.method(e,i)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function r(e){var n=e.keyCode,r,i=t(w,n);i>=0&&w.splice(i,1);if(n==93||n==224)n=91;if(n in m){m[n]=!1;for(r in y)y[r]==n&&(s[r]=!1)}}function i(){for(d in m)m[d]=!1;for(d in y)s[d]=!1}function s(e,t,n){var r,i,s,o;n===undefined&&(n=t,t="all"),e=e.replace(/\s/g,""),r=e.split(","),r[r.length-1]==""&&(r[r.length-2]+=",");for(s=0;s<r.length;s++){i=[],e=r[s].split("+");if(e.length>1){i=e.slice(0,e.length-1);for(o=0;o<i.length;o++)i[o]=y[i[o]];e=[e[e.length-1]]}e=e[0],e=b[e]||e.toUpperCase().charCodeAt(0),e in v||(v[e]=[]),v[e].push({shortcut:r[s],scope:t,method:n,key:r[s],mods:i})}}function o(e){if(typeof e=="string"){if(e.length!=1)return!1;e=e.toUpperCase().charCodeAt(0)}return t(w,e)!=-1}function u(){return w}function a(e){var t=(e.target||e.srcElement).tagName;return t!="INPUT"&&t!="SELECT"&&t!="TEXTAREA"}function f(e){g=e||"all"}function l(){return g||"all"}function c(e){var t,n,r;for(t in v){n=v[t];for(r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++}}function h(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,function(){n(window.event)})}function p(){var t=e.key;return e.key=E,t}var d,v={},m={16:!1,18:!1,17:!1,91:!1},g="all",y={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},b={backspace:8,tab:9,clear:12,enter:13,"return":13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,"delete":46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},w=[];for(d=1;d<20;d++)y["f"+d]=111+d;for(d in y)s[d]=!1;h(document,"keydown",function(e){n(e,g)}),h(document,"keyup",r),h(window,"focus",i);var E=e.key;e.key=s,e.key.setScope=f,e.key.getScope=l,e.key.deleteScope=c,e.key.filter=a,e.key.isPressed=o,e.key.getPressedKeyCodes=u,e.key.noConflict=p,typeof module!="undefined"&&(module.exports=key)})(this),function(e,t){function P(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function B(e){var t=H[e]={};return b.each(e.match(E)||[],function(e,n){t[n]=!0}),t}function I(e,n,r,i){if(b.acceptData(e)){var s,o,u=b.expando,a="string"==typeof n,f=e.nodeType,c=f?b.cache:e,h=f?e[u]:e[u]&&u;if(h&&c[h]&&(i||c[h].data)||!a||r!==t)return h||(f?e[u]=h=l.pop()||b.guid++:h=u),c[h]||(c[h]={},f||(c[h].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[h]=b.extend(c[h],n):c[h].data=b.extend(c[h].data,n)),s=c[h],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[b.camelCase(n)]=r),a?(o=s[n],null==o&&(o=s[b.camelCase(n)])):o=s,o}}function q(e,t,n){if(b.acceptData(e)){var r,i,s,o=e.nodeType,u=o?b.cache:e,a=o?e[b.expando]:b.expando;if(u[a]){if(t&&(s=n?u[a]:u[a].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in s?t=[t]:(t=b.camelCase(t),t=t in s?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete s[t[r]];if(!(n?U:b.isEmptyObject)(s))return}(n||(delete u[a].data,U(u[a])))&&(o?b.cleanData([e],!0):b.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null)}}}function R(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(F,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:j.test(r)?b.parseJSON(r):r}catch(s){}b.data(e,n,r)}else r=t}return r}function U(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function it(){return!0}function st(){return!1}function ct(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function ht(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(at.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function pt(e){var t=dt.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Mt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function _t(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function Dt(e){var t=Ct.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Pt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function Ht(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,s=b._data(e),o=b._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;i>r;r++)b.event.add(t,n,u[n][r])}o.data&&(o.data=b.extend({},o.data))}}function Bt(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(_t(t).text=e.text,Dt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&xt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function jt(e,n){var r,s,o=0,u=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!u)for(u=[],r=e.childNodes||e;null!=(s=r[o]);o++)!n||b.nodeName(s,n)?u.push(s):b.merge(u,jt(s,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],u):u}function Ft(e){xt.test(e.type)&&(e.defaultChecked=e.checked)}function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,s=[],o=0,u=e.length;for(;u>o;o++)r=e[o],r.style&&(s[o]=b._data(r,"olddisplay"),n=r.style.display,t?(s[o]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(s[o]=b._data(r,"olddisplay",an(r.nodeName)))):s[o]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(o=0;u>o;o++)r=e[o],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?s[o]||"":"none"));return e}function sn(e,t,n){var r=$t.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function on(e,t,n,r,i){var s=n===(r?"border":"content")?4:"width"===t?1:0,o=0;for(;4>s;s+=2)"margin"===n&&(o+=b.css(e,n+Zt[s],!0,i)),r?("content"===n&&(o-=b.css(e,"padding"+Zt[s],!0,i)),"margin"!==n&&(o-=b.css(e,"border"+Zt[s]+"Width",!0,i))):(o+=b.css(e,"padding"+Zt[s],!0,i),"padding"!==n&&(o+=b.css(e,"border"+Zt[s]+"Width",!0,i)));return o}function un(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,s=qt(e),o=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,s);if(0>=i||null==i){if(i=Rt(e,t,s),(0>i||null==i)&&(i=e.style[t]),Jt.test(i))return i;r=o&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+on(e,t,n||(o?"border":"content"),r,s)+"px"}function an(e){var t=s,n=Qt[e];return n||(n=fn(e,t),"none"!==n&&n||(It=(It||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(It[0].contentWindow||It[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=fn(e,t),It.detach()),Qt[e]=n),n}function fn(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}function vn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||cn.test(e)?r(e,i):vn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)vn(e+"["+i+"]",t[i],n,r)}function _n(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(E)||[];if(b.isFunction(n))while(r=s[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Dn(e,n,r,i){function u(a){var f;return s[a]=!0,b.each(e[a]||[],function(e,a){var l=a(n,r,i);return"string"!=typeof l||o||s[l]?o?!(f=l):t:(n.dataTypes.unshift(l),u(l),!1)}),f}var s={},o=e===An;return u(n.dataTypes[0])||!s["*"]&&u("*")}function Pn(e,n){var r,i,s=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((s[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}function Hn(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(u in l)u in r&&(n[l[u]]=r[u]);while("*"===f[0])f.shift(),s===t&&(s=e.mimeType||n.getResponseHeader("Content-Type"));if(s)for(u in a)if(a[u]&&a[u].test(s)){f.unshift(u);break}if(f[0]in r)o=f[0];else{for(u in r){if(!f[0]||e.converters[u+" "+f[0]]){o=u;break}i||(i=u)}o=o||i}return o?(o!==f[0]&&f.unshift(o),r[o]):t}function Bn(e,t){var n,r,i,s,o={},u=0,a=e.dataTypes.slice(),f=a[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a[1])for(i in e.converters)o[i.toLowerCase()]=e.converters[i];for(;r=a[++u];)if("*"!==r){if("*"!==f&&f!==r){if(i=o[f+" "+r]||o["* "+r],!i)for(n in o)if(s=n.split(" "),s[1]===r&&(i=o[f+" "+s[0]]||o["* "+s[0]])){i===!0?i=o[n]:o[n]!==!0&&(r=s[0],a.splice(u--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(l){return{state:"parsererror",error:i?l:"No conversion from "+f+" to "+r}}}f=r}return{state:"success",data:t}}function zn(){try{return new e.XMLHttpRequest}catch(t){}}function Wn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function Yn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Gn[t]||[]).concat(Gn["*"]),i=0,s=r.length;for(;s>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,s=0,o=Qn.length,u=b.Deferred().always(function(){delete a.elem}),a=function(){if(i)return!1;var t=Xn||Yn(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,s=1-r,o=0,a=f.tweens.length;for(;a>o;o++)f.tweens[o].run(s);return u.notifyWith(e,[f,s,n]),1>s&&a?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Yn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(r),r},stop:function(t){var n=0,r=t?f.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;for(tr(l,f.opts.specialEasing);o>s;s++)if(r=Qn[s].call(f,e,l,f.opts))return r;return Zn(f,l),b.isFunction(f.opts.start)&&f.opts.start.call(e,f),b.fx.timer(b.extend(a,{elem:e,anim:f,queue:f.opts.queue})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function tr(e,t){var n,r,i,s,o;for(i in e)if(r=b.camelCase(i),s=t[r],n=e[i],b.isArray(n)&&(s=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),o=b.cssHooks[r],o&&"expand"in o){n=o.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=s)}else t[r]=s}function nr(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},v=[],m=e.nodeType&&nn(e);n.queue||(l=b._queueHooks(e,"fx"),null==l.unqueued&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,b.queue(e,"fx").length||l.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==an(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",b.support.shrinkWrapBlocks||h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in t)if(o=t[i],$n.exec(o)){if(delete t[i],a=a||"toggle"===o,o===(m?"hide":"show"))continue;v.push(i)}if(s=v.length){u=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in u&&(m=u.hidden),a&&(u.hidden=!m),m?b(e).show():h.done(function(){b(e).hide()}),h.done(function(){var t;b._removeData(e,"fxshow");for(t in d)b.style(e,t,d[t])});for(i=0;s>i;i++)r=v[i],f=h.createTween(r,m?u[r]:0),d[r]=u[r]||b.style(e,r),r in u||(u[r]=f.start,m&&(f.end=f.start,f.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function sr(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var n,r,i=typeof t,s=e.document,o=e.location,u=e.jQuery,a=e.$,f={},l=[],c="1.9.1",h=l.concat,p=l.push,d=l.slice,v=l.indexOf,m=f.toString,g=f.hasOwnProperty,y=c.trim,b=function(e,t){return new b.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,E=/\S+/g,S=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,x=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,T=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,N=/^[\],:{}\s]*$/,C=/(?:^|:|,)(?:\s*\[)+/g,k=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,L=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,A=/^-ms-/,O=/-([\da-z])/gi,M=function(e,t){return t.toUpperCase()},_=function(e){(s.addEventListener||"load"===e.type||"complete"===s.readyState)&&(D(),b.ready())},D=function(){s.addEventListener?(s.removeEventListener("DOMContentLoaded",_,!1),e.removeEventListener("load",_,!1)):(s.detachEvent("onreadystatechange",_),e.detachEvent("onload",_))};b.fn=b.prototype={jquery:c,constructor:b,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:x.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:s,!0)),T.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=s.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=s,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:p,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;for("boolean"==typeof u&&(l=u,u=arguments[1]||{},a=2),"object"==typeof u||b.isFunction(u)||(u={}),f===a&&(u=this,--a);f>a;a++)if(null!=(s=arguments[a]))for(i in s)e=u[i],r=s[i],u!==r&&(l&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,o=e&&b.isArray(e)?e:[]):o=e&&b.isPlainObject(e)?e:{},u[i]=b.extend(l,o,r)):r!==t&&(u[i]=r));return u},b.extend({noConflict:function(t){return e.$===b&&(e.$=a),t&&e.jQuery===b&&(e.jQuery=u),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!s.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(s,[b]),b.fn.trigger&&b(s).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!g.call(e,"constructor")&&!g.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||g.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||s;var r=T.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&N.test(n.replace(k,"@").replace(L,"]").replace(C,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(A,"ms-").replace(O,M)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=P(e);if(n){if(o){for(;s>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(o){for(;s>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:y&&!y.call(" ")?function(e){return null==e?"":y.call(e)}:function(e){return null==e?"":(e+"").replace(S,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(P(Object(e))?b.merge(n,"string"==typeof e?[e]:e):p.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(v)return v.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if("number"==typeof r)for(;r>s;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;for(n=!!n;o>s;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,t,n){var r,i=0,s=e.length,o=P(e),u=[];if(o)for(;s>i;i++)r=t(e[i],i,n),null!=r&&(u[u.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(u[u.length]=r);return h.apply([],u)},guid:1,proxy:function(e,n){var r,i,s;return"string"==typeof n&&(s=e[n],n=e,e=s),b.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(n||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,s,o,u){var a=0,f=e.length,l=null==r;if("object"===b.type(r)){s=!0;for(a in r)b.access(e,n,a,r[a],!0,o,u)}else if(i!==t&&(s=!0,b.isFunction(i)||(u=!0),l&&(u?(n.call(e,i),n=null):(l=n,n=function(e,t,n){return l.call(b(e),n)})),n))for(;f>a;a++)n(e[a],r,u?i:i.call(e[a],a,n(e[a],r)));return s?e:l?n.call(e):f?n(e[0],r):o},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===s.readyState)setTimeout(b.ready);else if(s.addEventListener)s.addEventListener("DOMContentLoaded",_,!1),e.addEventListener("load",_,!1);else{s.attachEvent("onreadystatechange",_),e.attachEvent("onload",_);var r=!1;try{r=null==e.frameElement&&s.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}D(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),r=b(s);var H={};b.Callbacks=function(e){e="string"==typeof e?H[e]||B(e):b.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){for(r=e.memory&&t,i=!0,o=u||0,u=0,s=a.length,n=!0;a&&s>o;o++)if(a[o].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,a&&(f?f.length&&l(f.shift()):r?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?s=a.length:r&&(u=t,l(r))}return this},remove:function(){return a&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,a,r))>-1)a.splice(r,1),n&&(s>=r&&s--,o>=r&&o--)}),this},has:function(e){return e?b.inArray(e,a)>-1:!!a&&!!a.length},empty:function(){return a=[],this},disable:function(){return a=f=r=t,this},disabled:function(){return!a},lock:function(){return f=t,r||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!a||i&&!f||(n?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,s){var o=s[0],u=b.isFunction(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===r?n.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[1^e][2].disable,t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,s=1===i?e:b.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1)for(u=Array(r),a=Array(r),f=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i;return i||s.resolveWith(f,n),s.promise()}}),b.support=function(){var t,n,r,o,u,a,f,l,c,h,p=s.createElement("div");if(p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0],!n||!r||!n.length)return{};u=s.createElement("select"),f=u.appendChild(s.createElement("option")),o=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==p.className,leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!o.value,optSelected:f.selected,enctype:!!s.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==s.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===s.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,u.disabled=!0,t.optDisabled=!f.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}o=s.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),a=s.createDocumentFragment(),a.appendChild(o),t.appendChecked=o.checked,t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){t.noCloneEvent=!1}),p.cloneNode(!0).click());for(h in{submit:!0,change:!0,focusin:!0})p.setAttribute(l="on"+h,"t"),t[h+"Bubbles"]=l in e||p.attributes[l].expando===!1;return p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===p.style.backgroundClip,b(function(){var n,r,o,u="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=s.getElementsByTagName("body")[0];a&&(n=s.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(p),p.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=p.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=c&&0===o[0].offsetHeight,p.innerHTML="",p.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===p.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==a.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(p,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(p,null)||{width:"4px"}).width,r=p.appendChild(s.createElement("div")),r.style.cssText=p.style.cssText=u,r.style.marginRight=r.style.width="0",p.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof p.style.zoom!==i&&(p.innerHTML="",p.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===p.offsetWidth,p.style.display="block",p.innerHTML="<div></div>",p.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==p.offsetWidth,t.inlineBlockNeedsLayout&&(a.style.zoom=1)),a.removeChild(n),n=p=o=r=null)}),n=u=a=f=r=o=null,t}();var j=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,F=/([A-Z])/g;b.extend({cache:{},expando:"jQuery"+(c+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!U(e)},data:function(e,t,n){return I(e,t,n)},removeData:function(e,t){return q(e,t)},_data:function(e,t,n){return I(e,t,n,!0)},_removeData:function(e,t){return q(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,s=this[0],o=0,u=null;if(e===t){if(this.length&&(u=b.data(s),1===s.nodeType&&!b._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>o;o++)i=r[o].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),R(s,i,u[i]));b._data(s,"parsedAttrs",!0)}return u}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?s?R(s,e,b.data(s,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}}),b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),s=b._queueHooks(e,t),o=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),s.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=b.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(u--)r=b._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var z,W,X=/[\t\r\n]/g,V=/\r/g,$=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,K=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Q=/^(?:checked|selected)$/i,G=b.support.getSetAttribute,Y=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o=0,u=this.length,a="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(E)||[];u>o;o++)if(n=this[o],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){s=0;while(i=t[s++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(E)||[];u>o;o++)if(n=this[o],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){s=0;while(i=t[s++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var s,o=0,u=b(this),a=t,f=e.match(E)||[];while(s=f[o++])a=r?a:!u.hasClass(s),u[a?"addClass":"removeClass"](s)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(arguments.length)return i=b.isFunction(e),this.each(function(n){var s,o=b(this);1===this.nodeType&&(s=i?e.call(this,n,o.val()):e,null==s?s="":"number"==typeof s?s+="":b.isArray(s)&&(s=b.map(s,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,s,"value")!==t||(this.value=s))});if(s)return r=b.valHooks[s.type]||b.valHooks[s.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(s,"value"))!==t?n:(n=s.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s="select-one"===e.type||0>i,o=s?null:[],u=s?i+1:r.length,a=0>i?u:s?i:0;for(;u>a;a++)if(n=r[a],!(!n.selected&&a!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),s)return t;o.push(t)}return o},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var s,o,u,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return typeof e.getAttribute=== +i?b.prop(e,n,r):(o=1!==a||!b.isXMLDoc(e),o&&(n=n.toLowerCase(),s=b.attrHooks[n]||(K.test(n)?W:z)),r===t?s&&o&&"get"in s&&null!==(u=s.get(e,n))?u:(typeof e.getAttribute!==i&&(u=e.getAttribute(n)),null==u?t:u):null!==r?s&&o&&"set"in s&&(u=s.set(e,r,n))!==t?u:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(E);if(s&&1===e.nodeType)while(n=s[i++])r=b.propFix[n]||n,K.test(n)?!G&&Q.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(G?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return o=1!==u||!b.isXMLDoc(e),o&&(n=b.propFix[n]||n,s=b.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&null!==(i=s.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):$.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:t}}}}),W={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),s="boolean"==typeof r?Y&&G?null!=i:Q.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return s&&s.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):Y&&G||!Q.test(n)?e.setAttribute(!G&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},Y&&G||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),G||(z=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:z.get,set:function(e,t,n){z.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;b.event={global:{},add:function(e,n,r,s,o){var u,a,f,l,c,h,p,d,v,m,g,y=b._data(e);if(y){r.handler&&(l=r,r=l.handler,o=l.selector),r.guid||(r.guid=b.guid++),(a=y.events)||(a=y.events={}),(h=y.handle)||(h=y.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(h.elem,arguments)},h.elem=e),n=(n||"").match(E)||[""],f=n.length;while(f--)u=rt.exec(n[f])||[],v=g=u[1],m=(u[2]||"").split(".").sort(),c=b.event.special[v]||{},v=(o?c.delegateType:c.bindType)||v,c=b.event.special[v]||{},p=b.extend({type:v,origType:g,data:s,handler:r,guid:r.guid,selector:o,needsContext:o&&b.expr.match.needsContext.test(o),namespace:m.join(".")},l),(d=a[v])||(d=a[v]=[],d.delegateCount=0,c.setup&&c.setup.call(e,s,m,h)!==!1||(e.addEventListener?e.addEventListener(v,h,!1):e.attachEvent&&e.attachEvent("on"+v,h))),c.add&&(c.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,p):d.push(p),b.event.global[v]=!0;e=null}},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=b.hasData(e)&&b._data(e);if(m&&(l=m.events)){t=(t||"").match(E)||[""],f=t.length;while(f--)if(u=rt.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort(),p){c=b.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,h=l[p]||[],u=u[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=s=h.length;while(s--)o=h[s],!i&&v!==o.origType||n&&n.guid!==o.guid||u&&!u.test(o.namespace)||r&&r!==o.selector&&("**"!==r||!o.selector)||(h.splice(s,1),o.selector&&h.delegateCount--,c.remove&&c.remove.call(e,o));a&&!h.length&&(c.teardown&&c.teardown.call(e,d,m.handle)!==!1||b.removeEvent(e,p,m.handle),delete l[p])}else for(p in l)b.event.remove(e,p+t[f],n,r,!0);b.isEmptyObject(l)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,o){var u,a,f,l,c,h,p,d=[i||s],v=g.call(n,"type")?n.type:n,m=g.call(n,"namespace")?n.namespace.split("."):[];if(f=h=i=i||s,3!==i.nodeType&&8!==i.nodeType&&!nt.test(v+b.event.triggered)&&(v.indexOf(".")>=0&&(m=v.split("."),v=m.shift(),m.sort()),a=0>v.indexOf(":")&&"on"+v,n=n[b.expando]?n:new b.Event(v,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),c=b.event.special[v]||{},o||!c.trigger||c.trigger.apply(i,r)!==!1)){if(!o&&!c.noBubble&&!b.isWindow(i)){for(l=c.delegateType||v,nt.test(l+v)||(f=f.parentNode);f;f=f.parentNode)d.push(f),h=f;h===(i.ownerDocument||s)&&d.push(h.defaultView||h.parentWindow||e)}p=0;while((f=d[p++])&&!n.isPropagationStopped())n.type=p>1?l:c.bindType||v,u=(b._data(f,"events")||{})[n.type]&&b._data(f,"handle"),u&&u.apply(f,r),u=a&&f[a],u&&b.acceptData(f)&&u.apply&&u.apply(f,r)===!1&&n.preventDefault();if(n.type=v,!(o||n.isDefaultPrevented()||c._default&&c._default.apply(i.ownerDocument,r)!==!1||"click"===v&&b.nodeName(i,"a")||!b.acceptData(i)||!a||!i[v]||b.isWindow(i))){h=i[a],h&&(i[a]=null),b.event.triggered=v;try{i[v]()}catch(y){}b.event.triggered=t,h&&(i[a]=h)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,s,o,u=[],a=d.call(arguments),f=(b._data(this,"events")||{})[e.type]||[],l=b.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){u=b.event.handlers.call(this,e,f),n=0;while((s=u[n++])&&!e.isPropagationStopped()){e.currentTarget=s.elem,o=0;while((i=s.handlers[o++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(s.elem,a),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,s,o,u=[],a=n.delegateCount,f=e.target;if(a&&f.nodeType&&(!e.button||"click"!==e.type))for(;f!=this;f=f.parentNode||this)if(1===f.nodeType&&(f.disabled!==!0||"click"!==e.type)){for(s=[],o=0;a>o;o++)i=n[o],r=i.selector+" ",s[r]===t&&(s[r]=i.needsContext?b(r,this).index(f)>=0:b.find(r,this,null,[f]).length),s[r]&&s.push(i);s.length&&u.push({elem:f,handlers:s})}return n.length>a&&u.push({elem:this,handlers:n.slice(a)}),u},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,o=e,u=this.fixHooks[i];u||(this.fixHooks[i]=u=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=u.props?this.props.concat(u.props):this.props,e=new b.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||s),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,u.filter?u.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,u=n.button,a=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||s,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),e.which||u===t||(e.which=1&u?1:2&u?3:4&u?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==s.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===s.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=s.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:st):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:st,isPropagationStopped:st,isImmediatePropagationStopped:st,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;return(!i||i!==r&&!b.contains(r,i))&&(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&s.addEventListener(e,r,!0)},teardown:function(){0===--n&&s.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,s){var o,u;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(o in e)this.on(o,n,r,e[o],s);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=st;else if(!i)return this;return 1===s&&(u=i,i=function(e){return b().off(e),u.apply(this,arguments)},i.guid=u.guid||(u.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(s in e)this.off(s,n,e[s]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=st),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){function rt(e){return J.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function st(e){return e[w]=!0,e}function ot(e){var t=c.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function ut(e,t,n,r){var i,s,o,u,a,f,h,v,m,y;if((t?t.ownerDocument||t:E)!==c&&l(t),t=t||c,n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=t.nodeType)&&9!==u)return[];if(!p&&!r){if(i=K.exec(e))if(o=i[1]){if(9===u){if(s=t.getElementById(o),!s||!s.parentNode)return n;if(s.id===o)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(o))&&g(t,s)&&s.id===o)return n.push(s),n}else{if(i[2])return _.apply(n,D.call(t.getElementsByTagName(e),0)),n;if((o=i[3])&&S.getByClassName&&t.getElementsByClassName)return _.apply(n,D.call(t.getElementsByClassName(o),0)),n}if(S.qsa&&!d.test(e)){if(h=!0,v=w,m=t,y=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){f=ht(e),(h=t.getAttribute("id"))?v=h.replace(Y,"\\$&"):t.setAttribute("id",v),v="[id='"+v+"'] ",a=f.length;while(a--)f[a]=v+pt(f[a]);m=$.test(e)&&t.parentNode||t,y=f.join(",")}if(y)try{return _.apply(n,D.call(m.querySelectorAll(y),0)),n}catch(b){}finally{h||t.removeAttribute("id")}}}return Et(e.replace(R,"$1"),t,n,r)}function at(e,t){var n=t&&e,r=n&&(~t.sourceIndex||A)-(~e.sourceIndex||A);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ct(e){return st(function(t){return t=+t,st(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ht(e,t){var n,r,s,o,u,a,f,l=C[e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){(!n||(r=U.exec(u)))&&(r&&(u=u.slice(r[0].length)||u),a.push(s=[])),n=!1,(r=z.exec(u))&&(n=r.shift(),s.push({value:n,type:r[0].replace(R," ")}),u=u.slice(n.length));for(o in i.filter)!(r=V[o].exec(u))||f[o]&&!(r=f[o](r))||(n=r.shift(),s.push({value:n,type:o,matches:r}),u=u.slice(n.length));if(!n)break}return t?u.length:u?ut.error(e):C(e,a).slice(0)}function pt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function dt(e,t,n){var i=t.dir,s=n&&"parentNode"===i,o=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||s)return e(t,n,r)}:function(t,n,u){var a,f,l,c=x+" "+o;if(u){while(t=t[i])if((1===t.nodeType||s)&&e(t,n,u))return!0}else while(t=t[i])if(1===t.nodeType||s)if(l=t[w]||(t[w]={}),(f=l[i])&&f[0]===c){if((a=f[1])===!0||a===r)return a===!0}else if(f=l[i]=[c],f[1]=e(t,n,u)||r,f[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=null!=t;for(;a>u;u++)(s=e[u])&&(!n||n(s,r,i))&&(o.push(s),f&&t.push(u));return o}function gt(e,t,n,r,i,s){return r&&!r[w]&&(r=gt(r)),i&&!i[w]&&(i=gt(i,s)),st(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||wt(t||"*",u.nodeType?[u]:u,[]),m=!e||!s&&t?v:mt(v,h,e,u,a),g=n?i||(s?e:d||r)?[]:o:m;if(n&&n(m,g,u,a),r){f=mt(g,p),r(f,[],u,a),l=f.length;while(l--)(c=f[l])&&(g[p[l]]=!(m[p[l]]=c))}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?P.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=mt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):_.apply(o,g)})}function yt(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,l=dt(function(e){return e===t},u,!0),c=dt(function(e){return P.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];for(;s>a;a++)if(n=i.relative[e[a].type])h=[dt(vt(h),n)];else{if(n=i.filter[e[a].type].apply(null,e[a].matches),n[w]){for(r=++a;s>r;r++)if(i.relative[e[r].type])break;return gt(a>1&&vt(h),a>1&&pt(e.slice(0,a-1)).replace(R,"$1"),n,r>a&&yt(e.slice(a,r)),s>r&&yt(e=e.slice(r)),s>r&&pt(e))}h.push(n)}return vt(h)}function bt(e,t){var n=0,s=t.length>0,o=e.length>0,u=function(u,a,l,h,p){var d,v,m,g=[],y=0,b="0",w=u&&[],E=null!=p,S=f,T=u||o&&i.find.TAG("*",p&&a.parentNode||a),N=x+=null==S?1:Math.random()||.1;for(E&&(f=a!==c&&a,r=n);null!=(d=T[b]);b++){if(o&&d){v=0;while(m=e[v++])if(m(d,a,l)){h.push(d);break}E&&(x=N,r=++n)}s&&((d=!m&&d)&&y--,u&&w.push(d))}if(y+=b,s&&b!==y){v=0;while(m=t[v++])m(w,g,a,l);if(u){if(y>0)while(b--)w[b]||g[b]||(g[b]=M.call(h));g=mt(g)}_.apply(h,g),E&&!u&&g.length>0&&y+t.length>1&&ut.uniqueSort(h)}return E&&(x=N,f=S),w};return s?st(u):u}function wt(e,t,n){var r=0,i=t.length;for(;i>r;r++)ut(e,t[r],n);return n}function Et(e,t,n,r){var s,o,a,f,l,c=ht(e);if(!r&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&!p&&i.relative[o[1].type]){if(t=i.find.ID(a.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(o.shift().value.length)}s=V.needsContext.test(e)?0:o.length;while(s--){if(a=o[s],i.relative[f=a.type])break;if((l=i.find[f])&&(r=l(a.matches[0].replace(et,tt),$.test(o[0].type)&&t.parentNode||t))){if(o.splice(s,1),e=r.length&&pt(o),!e)return _.apply(n,D.call(r,0)),n;break}}}return u(e,c)(r,t,p,n,$.test(e)),n}function St(){}var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,w="sizzle"+ -(new Date),E=e.document,S={},x=0,T=0,N=it(),C=it(),k=it(),L=typeof t,A=1<<31,O=[],M=O.pop,_=O.push,D=O.slice,P=O.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},H="[\\x20\\t\\r\\n\\f]",B="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",j=B.replace("w","w#"),F="([*^$|!~]?=)",I="\\["+H+"*("+B+")"+H+"*(?:"+F+H+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+j+")|)|)"+H+"*\\]",q=":("+B+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+I.replace(3,8)+")*)|.*)\\)|)",R=RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),U=RegExp("^"+H+"*,"+H+"*"),z=RegExp("^"+H+"*([\\x20\\t\\r\\n\\f>+~])"+H+"*"),W=RegExp(q),X=RegExp("^"+j+"$"),V={ID:RegExp("^#("+B+")"),CLASS:RegExp("^\\.("+B+")"),NAME:RegExp("^\\[name=['\"]?("+B+")['\"]?\\]"),TAG:RegExp("^("+B.replace("w","w*")+")"),ATTR:RegExp("^"+I),PSEUDO:RegExp("^"+q),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),needsContext:RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},$=/[\x20\t\r\n\f]*[+~]/,J=/^[^{]+\{\s*\[native code/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Y=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{D.call(E.documentElement.childNodes,0)[0].nodeType}catch(nt){D=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}o=ut.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},l=ut.setDocument=function(e){var n=e?e.ownerDocument||e:E;return n!==c&&9===n.nodeType&&n.documentElement?(c=n,h=n.documentElement,p=o(n),S.tagNameNoComments=ot(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),S.attributes=ot(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),S.getByClassName=ot(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),S.getByName=ot(function(e){e.id=w+0,e.innerHTML="<a name='"+w+"'></a><div name='"+w+"'></div>",h.insertBefore(e,h.firstChild);var t=n.getElementsByName&&n.getElementsByName(w).length===2+n.getElementsByName(w+0).length;return S.getIdNotName=!n.getElementById(w),h.removeChild(e),t}),i.attrHandle=ot(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==L&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},S.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==L&&!p){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==L&&!p){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==L&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==L&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=S.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==L?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if("*"===e){while(n=s[i++])1===n.nodeType&&r.push(n);return r}return s},i.find.NAME=S.getByName&&function(e,n){return typeof n.getElementsByName!==L?n.getElementsByName(name):t},i.find.CLASS=S.getByClassName&&function(e,n){return typeof n.getElementsByClassName===L||p?t:n.getElementsByClassName(e)},v=[],d=[":focus"],(S.qsa=rt(n.querySelectorAll))&&(ot(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+H+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||d.push(":checked")}),ot(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&d.push("[*^$]="+H+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(S.matchesSelector=rt(m=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ot(function(e){S.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),v.push("!=",q)}),d=RegExp(d.join("|")),v=RegExp(v.join("|")),g=rt(h.contains)||h.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&1===r.nodeType&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},y=h.compareDocumentPosition?function(e,t){var r;return e===t?(a=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||g(E,e)?-1:t===n||g(E,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,s=e.parentNode,o=t.parentNode,u=[e],f=[t];if(e===t)return a=!0,0;if(!s||!o)return e===n?-1:t===n?1:s?-1:o?1:0;if(s===o)return at(e,t);r=e;while(r=r.parentNode)u.unshift(r);r=t;while(r=r.parentNode)f.unshift(r);while(u[i]===f[i])i++;return i?at(u[i],f[i]):u[i]===E?-1:f[i]===E?1:0},a=!1,[0,0].sort(y),S.detectDuplicates=a,c):c},ut.matches=function(e,t){return ut(e,null,null,t)},ut.matchesSelector=function(e,t){if((e.ownerDocument||e)!==c&&l(e),t=t.replace(Z,"='$1']"),!(!S.matchesSelector||p||v&&v.test(t)||d.test(t)))try{var n=m.call(e,t);if(n||S.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return ut(t,c,null,[e]).length>0},ut.contains=function(e,t){return(e.ownerDocument||e)!==c&&l(e),g(e,t)},ut.attr=function(e,t){var n;return(e.ownerDocument||e)!==c&&l(e),p||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):p||S.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},ut.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ut.uniqueSort=function(e){var t,n=[],r=1,i=0;if(a=!S.detectDuplicates,e.sort(y),a){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},s=ut.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},i=ut.selectors={cacheLength:50,createPseudo:st,match:V,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ut.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ut.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return V.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&W.test(n)&&(t=ht(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+H+")"+e+"("+H+"|$)"))&&N(e,function(e){return t.test(e.className||typeof e.getAttribute!==L&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ut.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;d=v="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&y){l=m[w]||(m[w]={}),f=l[e]||[],p=f[0]===x&&f[1],h=f[0]===x&&f[2],c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if(1===c.nodeType&&++h&&c===t){l[e]=[x,p,h];break}}else if(y&&(f=(t[w]||(t[w]={}))[e])&&f[0]===x)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++h&&(y&&((c[w]||(c[w]={}))[e]=[x,h]),c===t))break;return h-=i,h===r||0===h%r&&h/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ut.error("unsupported pseudo: "+e);return r[w]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?st(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=P.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:st(function(e){var t=[],n=[],r=u(e.replace(R,"$1"));return r[w]?st(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)(s=o[u])&&(e[u]=!(t[u]=s))}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:st(function(e){return function(t){return ut(e,t).length>0}}),contains:st(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),lang:st(function(e){return X.test(e||"")||ut.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=p?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===c.activeElement&&(!c.hasFocus||c.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ct(function(){return[0]}),last:ct(function(e,t){return[t-1]}),eq:ct(function(e,t,n){return[0>n?n+t:n]}),even:ct(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ct(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ct(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ct(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=lt(n);u=ut.compile=function(e,t){var n,r=[],i=[],s=k[e+" "];if(!s){t||(t=ht(e)),n=t.length;while(n--)s=yt(t[n]),s[w]?r.push(s):i.push(s);s=k(e,bt(i,r))}return s},i.pseudos.nth=i.pseudos.eq,i.filters=St.prototype=i.pseudos,i.setFilters=new St,l(),ut.attr=b.attr,b.find=ut,b.expr=ut.selectors,b.expr[":"]=b.expr.pseudos,b.unique=ut.uniqueSort,b.text=ut.getText,b.isXMLDoc=ut.isXML,b.contains=ut.contains}(e);var ot=/Until$/,ut=/^(?:parents|prev(?:Until|All))/,at=/^.[^:#\[\.,]*$/,ft=b.expr.match.needsContext,lt={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ht(this,e,!1))},filter:function(e){return this.pushStack(ht(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?ft.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=ft.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(o?o.index(n)>-1:b.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return this.pushStack(s.length>1?b.unique(s):s)},index:function(e){return e?"string"==typeof +e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack,b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return ct(e,"nextSibling")},prev:function(e){return ct(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return ot.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!lt[e]?b.unique(i):i,this.length>1&&ut.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&9!==s.nodeType&&(r===t||1!==s.nodeType||!b(s).is(r)))1===s.nodeType&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var dt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",vt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+dt+")[\\s/>]","i"),gt=/^\s+/,yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,wt=/<tbody/i,Et=/<|&#?\w+;/,St=/<(?:script|style|link)/i,xt=/^(?:checkbox|radio)$/i,Tt=/checked\s*(?:[^=]|=\s*.checked.)/i,Nt=/^$|\/(?:java|ecma)script/i,Ct=/^true\/(.*)/,kt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Lt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},At=pt(s),Ot=At.appendChild(s.createElement("div"));Lt.optgroup=Lt.option,Lt.tbody=Lt.tfoot=Lt.colgroup=Lt.caption=Lt.thead,Lt.th=Lt.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(jt(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Pt(jt(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(jt(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(vt,""):t;if(!("string"!=typeof e||St.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&>.test(e)||Lt[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(yt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(jt(n,!1)),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=h.apply([],e);var i,s,o,u,a,f,l=0,c=this.length,p=this,d=c-1,v=e[0],m=b.isFunction(v);if(m||!(1>=c||"string"!=typeof v||b.support.checkClone)&&Tt.test(v))return this.each(function(i){var s=p.eq(i);m&&(e[0]=v.call(this,i,n?s.html():t)),s.domManip(e,n,r)});if(c&&(f=b.buildFragment(e,this[0].ownerDocument,!1,this),i=f.firstChild,1===f.childNodes.length&&(f=i),i)){for(n=n&&b.nodeName(i,"tr"),u=b.map(jt(f,"script"),_t),o=u.length;c>l;l++)s=f,l!==d&&(s=b.clone(s,!0,!0),o&&b.merge(u,jt(s,"script"))),r.call(n&&b.nodeName(this[l],"table")?Mt(this[l],"tbody"):this[l],s,l);if(o)for(a=u[u.length-1].ownerDocument,b.map(u,Dt),l=0;o>l;l++)s=u[l],Nt.test(s.type||"")&&!b._data(s,"globalEval")&&b.contains(a,s)&&(s.src?b.ajax({url:s.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((s.text||s.textContent||s.innerHTML||"").replace(kt,"")));f=i=null}return this}}),b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],s=b(e),o=s.length-1;for(;o>=r;r++)n=r===o?this:this.clone(!0),b(s[r])[t](n),p.apply(i,n.get());return this.pushStack(i)}}),b.extend({clone:function(e,t,n){var r,i,s,o,u,a=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(Ot.innerHTML=e.outerHTML,Ot.removeChild(s=Ot.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=jt(s),u=jt(e),o=0;null!=(i=u[o]);++o)r[o]&&Bt(i,r[o]);if(t)if(n)for(u=u||jt(e),r=r||jt(s),o=0;null!=(i=u[o]);o++)Ht(i,r[o]);else Ht(e,s);return r=jt(s,"script"),r.length>0&&Pt(r,!a&&jt(e,"script")),r=u=i=null,s},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l,c=e.length,h=pt(t),p=[],d=0;for(;c>d;d++)if(s=e[d],s||0===s)if("object"===b.type(s))b.merge(p,s.nodeType?[s]:s);else if(Et.test(s)){u=u||h.appendChild(t.createElement("div")),a=(bt.exec(s)||["",""])[1].toLowerCase(),l=Lt[a]||Lt._default,u.innerHTML=l[1]+s.replace(yt,"<$1></$2>")+l[2],i=l[0];while(i--)u=u.lastChild;if(!b.support.leadingWhitespace&>.test(s)&&p.push(t.createTextNode(gt.exec(s)[0])),!b.support.tbody){s="table"!==a||wt.test(s)?"<table>"!==l[1]||wt.test(s)?0:u:u.firstChild,i=s&&s.childNodes.length;while(i--)b.nodeName(f=s.childNodes[i],"tbody")&&!f.childNodes.length&&s.removeChild(f)}b.merge(p,u.childNodes),u.textContent="";while(u.firstChild)u.removeChild(u.firstChild);u=h.lastChild}else p.push(t.createTextNode(s));u&&h.removeChild(u),b.support.appendChecked||b.grep(jt(p,"input"),Ft),d=0;while(s=p[d++])if((!r||-1===b.inArray(s,r))&&(o=b.contains(s.ownerDocument,s),u=jt(h.appendChild(s),"script"),o&&Pt(u),n)){i=0;while(s=u[i++])Nt.test(s.type||"")&&n.push(s)}return u=null,h},cleanData:function(e,t){var n,r,s,o,u=0,a=b.expando,f=b.cache,c=b.support.deleteExpando,h=b.event.special;for(;null!=(n=e[u]);u++)if((t||b.acceptData(n))&&(s=n[a],o=s&&f[s])){if(o.events)for(r in o.events)h[r]?b.event.remove(n,r):b.removeEvent(n,r,o.handle);f[s]&&(delete f[s],c?delete n[a]:typeof n.removeAttribute!==i?n.removeAttribute(a):n[a]=null,l.push(s))}}});var It,qt,Rt,Ut=/alpha\([^)]*\)/i,zt=/opacity\s*=\s*([^)]*)/,Wt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Vt=/^margin/,$t=RegExp("^("+w+")(.*)$","i"),Jt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Kt=RegExp("^([+-])=("+w+")","i"),Qt={BODY:"block"},Gt={position:"absolute",visibility:"hidden",display:"block"},Yt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,s,o={},u=0;if(b.isArray(n)){for(s=qt(e),i=n.length;i>u;u++)o[n[u]]=b.css(e,n[u],!1,s);return o}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Rt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,u,a=b.camelCase(n),f=e.style;if(n=b.cssProps[a]||(b.cssProps[a]=tn(f,a)),u=b.cssHooks[n]||b.cssHooks[a],r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];if(o=typeof r,"string"===o&&(s=Kt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(b.css(e,n)),o="number"),!(null==r||"number"===o&&isNaN(r)||("number"!==o||b.cssNumber[a]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(f[n]="inherit"),u&&"set"in u&&(r=u.set(e,r,i))===t)))try{f[n]=r}catch(l){}}},css:function(e,n,r,i){var s,o,u,a=b.camelCase(n);return n=b.cssProps[a]||(b.cssProps[a]=tn(e.style,a)),u=b.cssHooks[n]||b.cssHooks[a],u&&"get"in u&&(o=u.get(e,!0,r)),o===t&&(o=Rt(e,n,i)),"normal"===o&&n in Yt&&(o=Yt[n]),""===r||r?(s=parseFloat(o),r===!0||b.isNumeric(s)?s||0:o):o},swap:function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i}}),e.getComputedStyle?(qt=function(t){return e.getComputedStyle(t,null)},Rt=function(e,n,r){var i,s,o,u=r||qt(e),a=u?u.getPropertyValue(n)||u[n]:t,f=e.style;return u&&(""!==a||b.contains(e.ownerDocument,e)||(a=b.style(e,n)),Jt.test(a)&&Vt.test(n)&&(i=f.width,s=f.minWidth,o=f.maxWidth,f.minWidth=f.maxWidth=f.width=a,a=u.width,f.width=i,f.minWidth=s,f.maxWidth=o)),a}):s.documentElement.currentStyle&&(qt=function(e){return e.currentStyle},Rt=function(e,n,r){var i,s,o,u=r||qt(e),a=u?u[n]:t,f=e.style;return null==a&&f&&f[n]&&(a=f[n]),Jt.test(a)&&!Wt.test(n)&&(i=f.left,s=e.runtimeStyle,o=s&&s.left,o&&(s.left=e.currentStyle.left),f.left="fontSize"===n?"1em":a,a=f.pixelLeft+"px",f.left=i,o&&(s.left=o)),""===a?"auto":a}),b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Gt,function(){return un(e,n,i)}):un(e,n,i):t},set:function(e,t,r){var i=r&&qt(e);return sn(e,t,r?on(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return zt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",s=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(s.replace(Ut,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=Ut.test(s)?s.replace(Ut,i):s+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Rt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Rt(e,n),Jt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},s="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=s[r]||s[r-2]||s[0];return i}},Vt.test(e)||(b.cssHooks[e+t].set=sn)});var ln=/%20/g,cn=/\[\]$/,hn=/\r?\n/g,pn=/^(?:submit|button|image|reset|file)$/i,dn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&dn.test(this.nodeName)&&!pn.test(e)&&(this.checked||!xt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(hn,"\r\n")}}):{name:t.name,value:n.replace(hn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],s=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){s(this.name,this.value)});else for(r in e)vn(r,e[r],n,s);return i.join("&").replace(ln,"+")},b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,gn,yn=b.now(),bn=/\?/,wn=/#.*$/,En=/([?&])_=[^&]*/,Sn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,xn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tn=/^(?:GET|HEAD)$/,Nn=/^\/\//,Cn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,kn=b.fn.load,Ln={},An={},On="*/".concat("*");try{gn=o.href}catch(Mn){gn=s.createElement("a"),gn.href="",gn=gn.href}mn=Cn.exec(gn.toLowerCase())||[],b.fn.load=function(e,n,r){if("string"!=typeof e&&kn)return kn.apply(this,arguments);var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(o="POST"),u.length>0&&b.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){s=arguments,u.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){u.each(r,s||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,s){return b.isFunction(r)&&(s=s||i,i=r,r=t),b.ajax({url:e,type:n,dataType:s,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:gn,type:"GET",isLocal:xn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":On,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Pn(Pn(e,b.ajaxSettings),t):Pn(b.ajaxSettings,e)},ajaxPrefilter:_n(Ln),ajaxTransport:_n(An),ajax:function(e,n){function N(e,n,r,i){var l,g,y,E,S,T=n;2!==w&&(w=2,u&&clearTimeout(u),f=t,o=i||"",x.readyState=e>0?4:0,r&&(E=Hn(c,x,r)),e>=200&&300>e||304===e?(c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(b.lastModified[s]=S),S=x.getResponseHeader("etag"),S&&(b.etag[s]=S)),204===e?(l=!0,T="nocontent"):304===e?(l=!0,T="notmodified"):(l=Bn(c,E),T=l.state,g=l.data,y=l.error,l=!y)):(y=T,(e||!T)&&(T="error",0>e&&(e=0))),x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[g,T,x]):d.rejectWith(h,[x,T,y]),x.statusCode(m),m=t,a&&p.trigger(l?"ajaxSuccess":"ajaxError",[x,c,l?g:y]),v.fireWith(h,[x,T]),a&&(p.trigger("ajaxComplete",[x,c]),--b.active||b.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=b.ajaxSetup({},n),h=c.context||c,p=c.context&&(h.nodeType||h.jquery)?b(h):b.event,d=b.Deferred(),v=b.Callbacks("once memory"),m=c.statusCode||{},g={},y={},w=0,S="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!l){l={};while(t=Sn.exec(o))l[t[1].toLowerCase()]=t[2]}t=l[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=y[n]=y[n]||e,g[e]=t),this},overrideMimeType:function(e){return w||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>w)for(t in e)m[t]=[m[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||S;return f&&f.abort(t),N(0,t),this}};if(d.promise(x).complete=v.add,x.success=x.done,x.error=x.fail,c.url=((e||c.url||gn)+"").replace(wn,"").replace(Nn,mn[1]+"//"),c.type=n.method||n.type||c.method||c.type,c.dataTypes=b.trim(c.dataType||"*").toLowerCase().match(E)||[""],null==c.crossDomain&&(r=Cn.exec(c.url.toLowerCase()),c.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=b.param(c.data,c.traditional)),Dn(Ln,c,n,x),2===w)return x;a=c.global,a&&0===b.active++&&b.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Tn.test(c.type),s=c.url,c.hasContent||(c.data&&(s=c.url+=(bn.test(s)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=En.test(s)?s.replace(En,"$1_="+yn++):s+(bn.test(s)?"&":"?")+"_="+yn++)),c.ifModified&&(b.lastModified[s]&&x.setRequestHeader("If-Modified-Since",b.lastModified[s]),b.etag[s]&&x.setRequestHeader("If-None-Match",b.etag[s])),(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+On+"; q=0.01":""):c.accepts["*"]);for(i in c.headers)x.setRequestHeader(i,c.headers[i]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&2!==w){S="abort";for(i in{success:1,error:1,complete:1})x[i](c[i]);if(f=Dn(An,c,n,x)){x.readyState=1,a&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{w=1,f.send(g,N)}catch(T){if(!(2>w))throw T;N(-1,T)}}else N(-1,"No Transport");return x}return x.abort()},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}}),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=s.head||b("head")[0]||s.documentElement;return{send:function(t,i){n=s.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var jn=[],Fn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=jn.pop()||b.expando+"_"+yn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.jsonp!==!1&&(Fn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Fn.test(n.data)&&"data");return a||"jsonp"===n.dataTypes[0]?(s=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,a?n[a]=n[a].replace(Fn,"$1"+s):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||b.error(s+" was not called"),u[0]},n.dataTypes[0]="json",o=e[s],e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,jn.push(s)),u&&b.isFunction(o)&&o(u[0]),u=o=t}),"script"):t});var In,qn,Rn=0,Un=e.ActiveXObject&&function(){var e;for(e in In)In[e](t,!0)};b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&zn()||Wn()}:zn,qn=b.ajaxSettings.xhr(),b.support.cors=!!qn&&"withCredentials"in qn,qn=b.support.ajax=!!qn,qn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();if(n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async),n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c;try{if(r&&(i||4===a.readyState))if(r=t,o&&(a.onreadystatechange=b.noop,Un&&delete In[o]),i)4!==a.readyState&&a.abort();else{c={},u=a.status,f=a.getAllResponseHeaders(),"string"==typeof a.responseText&&(c.text=a.responseText);try{l=a.statusText}catch(h){l=""}u||!n.isLocal||n.crossDomain?1223===u&&(u=204):u=c.text?200:404}}catch(p){i||s(-1,p)}c&&s(u,l,c,f)},n.async?4===a.readyState?setTimeout(r):(o=++Rn,Un&&(In||(In={},b(e).unload(Un)),In[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Vn,$n=/^(?:toggle|show|hide)$/,Jn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Kn=/queueHooks$/,Qn=[nr],Gn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=Jn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){if(n=+s[2],r=s[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&u){u=b.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,b.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&1!==a&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Gn[n]=Gn[n]||[],Gn[n].unshift(t)},prefilter:function(e,t){t?Qn.unshift(e):Qn.push(e)}}),b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),s=b.speed(t,n,r),o=function(){var t=er(this,b.extend({},e),s);o.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return o.finish=o,i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",s=b.timers,o=b._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Kn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem!==this||null!=e&&s[n].queue!==e||(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=b.timers,o=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Vn||(Vn=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Vn),Vn=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,s={top:0,left:0},o=this[0],u=o&&o.ownerDocument;if(u)return n=u.documentElement,b.contains(n,o)?(typeof o.getBoundingClientRect!==i&&(s=o.getBoundingClientRect()),r=sr(u),{top:s.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:s.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):s},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),s=i.offset(),o=b.css(e,"top"),u=b.css(e,"left"),a=("absolute"===r||"fixed"===r)&&b.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),b.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+c),null!=t.left&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||s.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,s){var o=sr(e);return s===t?o?n in o?o[n]:o.document.documentElement[i]:e[i]:(o?o.scrollTo(r?b(o).scrollLeft():s,r?s:b(o).scrollTop()):e[i]=s,t)},e,i,arguments.length,null)}}),b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,s){var o=arguments.length&&(r||"boolean"!=typeof i),u=r||(i===!0||s===!0?"margin":"border");return b.access(this,function(n,r,i){var s;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?b.css(n,r,u):b.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})}(window),function(e,t){function n(t,n){var i,s,o,u=t.nodeName.toLowerCase();return"area"===u?(i=t.parentNode,s=i.name,t.href&&s&&"map"===i.nodeName.toLowerCase()?(o=e("img[usemap=#"+s+"]")[0],!!o&&r(o)):!1):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&r(t)}function r(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var i=0,s=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(n,r){return"number"==typeof n?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),r&&r.call(t)},n)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length)for(var r,i,s=e(this[0]);s.length&&s[0]!==document;){if(r=s.css("position"),("absolute"===r||"relative"===r||"fixed"===r)&&(i=parseInt(s.css("zIndex"),10),!isNaN(i)&&0!==i))return i;s=s.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++i)})},removeUniqueId:function(){return this.each(function(){s.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var r=e.attr(t,"tabindex"),i=isNaN(r);return(i||r>=0)&&n(t,!i)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function i(t,n,r,i){return e.each(s,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),i&&(n-=parseFloat(e.css(t,"margin"+this))||0)}),n}var s="Width"===r?["Left","Right"]:["Top","Bottom"],o=r.toLowerCase(),u={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?u["inner"+r].call(this):this.each(function(){e(this).css(o,i(this,n)+"px")})},e.fn["outer"+r]=function(t,n){return"number"!=typeof t?u["outer"+r].call(this,t):this.each(function(){e(this).css(o,i(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e +.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,s=e.ui[t].prototype;for(i in r)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(i&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(r=0;i.length>r;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var r=n&&"left"===n?"scrollLeft":"scrollTop",i=!1;return t[r]>0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)}})}(jQuery),function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n,r=0;null!=(n=t[r]);r++)try{e(n).triggerHandler("remove")}catch(s){}i(t)},e.widget=function(n,r,i){var s,o,u,a,f={},l=n.split(".")[0];n=n.split(".")[1],s=l+"-"+n,i||(i=r,r=e.Widget),e.expr[":"][s.toLowerCase()]=function(t){return!!e.data(t,s)},e[l]=e[l]||{},o=e[l][n],u=e[l][n]=function(e,n){return this._createWidget?(arguments.length&&this._createWidget(e,n),t):new u(e,n)},e.extend(u,o,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),a=new r,a.options=e.widget.extend({},a.options),e.each(i,function(n,i){return e.isFunction(i)?(f[n]=function(){var e=function(){return r.prototype[n].apply(this,arguments)},t=function(e){return r.prototype[n].apply(this,e)};return function(){var n,r=this._super,s=this._superApply;return this._super=e,this._superApply=t,n=i.apply(this,arguments),this._super=r,this._superApply=s,n}}(),t):(f[n]=i,t)}),u.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix:n},f,{constructor:u,namespace:l,widgetName:n,widgetFullName:s}),o?(e.each(o._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,u,n._proto)}),delete o._childConstructors):r._childConstructors.push(u),e.widget.bridge(n,u)},e.widget.extend=function(n){for(var i,o,u=r.call(arguments,1),a=0,f=u.length;f>a;a++)for(i in u[a])o=u[a][i],u[a].hasOwnProperty(i)&&o!==t&&(n[i]=e.isPlainObject(o)?e.isPlainObject(n[i])?e.widget.extend({},n[i],o):e.widget.extend({},o):o);return n},e.widget.bridge=function(n,i){var o=i.prototype.widgetFullName||n;e.fn[n]=function(u){var f="string"==typeof u,l=r.call(arguments,1),c=this;return u=!f&&l.length?e.widget.extend.apply(null,[u].concat(l)):u,f?this.each(function(){var r,i=e.data(this,o);return i?e.isFunction(i[u])&&"_"!==u.charAt(0)?(r=i[u].apply(i,l),r!==i&&r!==t?(c=r&&r.jquery?c.pushStack(r.get()):r,!1):t):e.error("no such method '"+u+"' for "+n+" widget instance"):e.error("cannot call methods on "+n+" prior to initialization; "+"attempted to call method '"+u+"'")}):this.each(function(){var t=e.data(this,o);t?t.option(u||{})._init():e.data(this,o,new i(u,this))}),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i,s,o,u=n;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof n)if(u={},i=n.split("."),n=i.shift(),i.length){for(s=u[n]=e.widget.extend({},this.options[n]),o=0;i.length-1>o;o++)s[i[o]]=s[i[o]]||{},s=s[i[o]];if(n=i.pop(),r===t)return s[n]===t?null:s[n];s[n]=r}else{if(r===t)return this.options[n]===t?null:this.options[n];u[n]=r}return this._setOptions(u),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(n,r,i){var s,o=this;"boolean"!=typeof n&&(i=r,r=n,n=!1),i?(r=s=e(r),this.bindings=this.bindings.add(r)):(i=r,r=this.element,s=this.widget()),e.each(i,function(i,u){function f(){return n||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof u?o[u]:u).apply(o,arguments):t}"string"!=typeof u&&(f.guid=u.guid=u.guid||f.guid||e.guid++);var l=i.match(/^(\w+)\s*(.*)$/),c=l[1]+o.eventNamespace,h=l[2];h?s.delegate(h,c,f):r.bind(c,f)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return("string"==typeof e?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,s,o=this.options[t];if(r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent)for(i in s)i in n||(n[i]=s[i]);return this.element.trigger(n,r),!(e.isFunction(o)&&o.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,s){"string"==typeof i&&(i={effect:i});var o,u=i?i===!0||"number"==typeof i?n:i.effect||n:t;i=i||{},"number"==typeof i&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=s,i.delay&&r.delay(i.delay),o&&e.effects&&e.effects.effect[u]?r[t](i):u!==t&&r[u]?r[u](i.duration,i.easing,s):r.queue(function(n){e(this)[t](),s&&s.call(r[0]),n()})}})}(jQuery),function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){return!0===e.data(n.target,t.widgetName+".preventClickEvent")?(e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!t){this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var r=this,i=1===n.which,s="string"==typeof this.options.cancel&&n.target.nodeName?e(n.target).closest(this.options.cancel).length:!1;return i&&!s&&this._mouseCapture(n)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=this._mouseStart(n)!==!1,!this._mouseStarted)?(n.preventDefault(),!0):(!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(n.iframeFix===!0?"iframe":n.iframeFix).each(function(){e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var n=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,n){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=this,r=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(r=e.ui.ddmanager.drop(this,t)),this.dropped&&(r=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!r||"valid"===this.options.revert&&r||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,r)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",t)!==!1&&n._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,r,i=this.options;return i.containment?"window"===i.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===i.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):i.containment.constructor===Array?(this.containment=i.containment,undefined):("parent"===i.containment&&(i.containment=this.helper[0].parentNode),n=e(i.containment),r=n[0],r&&(t="hidden"!==n.css("overflow"),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(t?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n),undefined):(this.containment=null,undefined)},_convertPositionTo:function(t,n){n||(n=this.position);var r="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:i.scrollTop(),left:i.scrollLeft()}),{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*r}},_generatePosition:function(t){var n,r,i,s,o=this.options,u="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=t.pageX,f=t.pageY;return this.offset.scroll||(this.offset.scroll={top:u.scrollTop(),left:u.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(r=this.relative_container.offset(),n=[this.containment[0]+r.left,this.containment[1]+r.top,this.containment[2]+r.left,this.containment[3]+r.top]):n=this.containment,t.pageX-this.offset.click.left<n[0]&&(a=n[0]+this.offset.click.left),t.pageY-this.offset.click.top<n[1]&&(f=n[1]+this.offset.click.top),t.pageX-this.offset.click.left>n[2]&&(a=n[2]+this.offset.click.left),t.pageY-this.offset.click.top>n[3]&&(f=n[3]+this.offset.click.top)),o.grid&&(i=o.grid[1]?this.originalPageY+Math.round((f-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,f=n?i-this.offset.click.top>=n[1]||i-this.offset.click.top>n[3]?i:i-this.offset.click.top>=n[1]?i-o.grid[1]:i+o.grid[1]:i,s=o.grid[0]?this.originalPageX+Math.round((a-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,a=n?s-this.offset.click.left>=n[0]||s-this.offset.click.left>n[2]?s:s-this.offset.click.left>=n[0]?s-o.grid[0]:s+o.grid[0]:s)),{top:f-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,n,r){return r=r||this._uiHash(),e.ui.plugin.call(this,t,[n,r]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,n,r)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n){var r=e(this).data("ui-draggable"),i=r.options,s=e.extend({},n,{item:r.element});r.sortables=[],e(i.connectToSortable).each(function(){var n=e.data(this,"ui-sortable");n&&!n.options.disabled&&(r.sortables.push({instance:n,shouldRevert:n.options.revert}),n.refreshPositions(),n._trigger("activate",t,s))})},stop:function(t,n){var r=e(this).data("ui-draggable"),i=e.extend({},n,{item:r.element});e.each(r.sortables,function(){this.instance.isOver?(this.instance.isOver=0,r.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===r.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,i))})},drag:function(t,n){var r=e(this).data("ui-draggable"),i=this;e.each(r.sortables,function(){var o=!1,u=this;this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,e.each(r.sortables,function(){return this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this!==u&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(u.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(i).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return n.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=r.offset.click.top,this.instance.offset.click.left=r.offset.click.left,this.instance.offset.parent.left-=r.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=r.offset.parent.top-this.instance.offset.parent.top,r._trigger("toSortable",t),r.dropped=this.instance.element,r.currentItem=r.element,this.instance.fromOutside=r),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),r._trigger("fromSortable",t),r.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),n=e(this).data("ui-draggable").options;t.css("cursor")&&(n._cursor=t.css("cursor")),t.css("cursor",n.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n){var r=e(n.helper),i=e(this).data("ui-draggable").options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(t,n){var r=e(this).data("ui-draggable").options;r._opacity&&e(n.helper).css("opacity",r._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var n=e(this).data("ui-draggable"),r=n.options,i=!1;n.scrollParent[0]!==document&&"HTML"!==n.scrollParent[0].tagName?(r.axis&&"x"===r.axis||(n.overflowOffset.top+n.scrollParent[0].offsetHeight-t.pageY<r.scrollSensitivity?n.scrollParent[0].scrollTop=i=n.scrollParent[0].scrollTop+r.scrollSpeed:t.pageY-n.overflowOffset.top<r.scrollSensitivity&&(n.scrollParent[0].scrollTop=i=n.scrollParent[0].scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(n.overflowOffset.left+n.scrollParent[0].offsetWidth-t.pageX<r.scrollSensitivity?n.scrollParent[0].scrollLeft=i=n.scrollParent[0].scrollLeft+r.scrollSpeed:t.pageX-n.overflowOffset.left<r.scrollSensitivity&&(n.scrollParent[0].scrollLeft=i=n.scrollParent[0].scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(t.pageY-e(document).scrollTop()<r.scrollSensitivity?i=e(document).scrollTop(e(document).scrollTop()-r.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<r.scrollSensitivity&&(i=e(document).scrollTop(e(document).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(t.pageX-e(document).scrollLeft()<r.scrollSensitivity?i=e(document).scrollLeft(e(document).scrollLeft()-r.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<r.scrollSensitivity&&(i=e(document).scrollLeft(e(document).scrollLeft()+r.scrollSpeed)))),i!==!1&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(n,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),n=t.options;t.snapElements=[],e(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var n=e(this),r=n.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:n.outerWidth(),height:n.outerHeight(),top:r.top,left:r.left})})},drag:function(t,n){var r,i,s,o,u,a,f,l,c,h,p=e(this).data("ui-draggable"),d=p.options,v=d.snapTolerance,m=n.offset.left,g=m+p.helperProportions.width,y=n.offset.top,b=y+p.helperProportions.height;for(c=p.snapElements.length-1;c>=0;c--)u=p.snapElements[c].left,a=u+p.snapElements[c].width,f=p.snapElements[c].top,l=f+p.snapElements[c].height,u-v>g||m>a+v||f-v>b||y>l+v||!e.contains(p.snapElements[c].item.ownerDocument,p.snapElements[c].item)?(p.snapElements[c].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=!1):("inner"!==d.snapMode&&(r=v>=Math.abs(f-b),i=v>=Math.abs(l-y),s=v>=Math.abs(u-g),o=v>=Math.abs(a-m),r&&(n.position.top=p._convertPositionTo("relative",{top:f-p.helperProportions.height,left:0}).top-p.margins.top),i&&(n.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),s&&(n.position.left=p._convertPositionTo("relative",{top:0,left:u-p.helperProportions.width}).left-p.margins.left),o&&(n.position.left=p._convertPositionTo("relative",{top:0,left:a}).left-p.margins.left)),h=r||i||s||o,"outer"!==d.snapMode&&(r=v>=Math.abs(f-y),i=v>=Math.abs(l-b),s=v>=Math.abs(u-m),o=v>=Math.abs(a-g),r&&(n.position.top=p._convertPositionTo("relative",{top:f,left:0}).top-p.margins.top),i&&(n.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),s&&(n.position.left=p._convertPositionTo("relative",{top:0,left:u}).left-p.margins.left),o&&(n.position.left=p._convertPositionTo("relative",{top:0,left:a-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[c].snapping&&(r||i||s||o||h)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=r||i||s||o||h)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,n=this.data("ui-draggable").options,r=e.makeArray(e(n.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)});r.length&&(t=parseInt(e(r[0]).css("zIndex"),10)||0,e(r).each(function(n){e(this).css("zIndex",t+n)}),this.css("zIndex",t+r.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n){var r=e(n.helper),i=e(this).data("ui-draggable").options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(t,n){var r=e(this).data("ui-draggable").options;r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}})}(jQuery),function(e){function t(e,t,n){return e>t&&t+n>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,n=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,n=e.ui.ddmanager.droppables[this.options.scope];n.length>t;t++)n[t]===this&&n.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,n){"accept"===t&&(this.accept=e.isFunction(n)?n:function(e){return e.is(n)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var r=n||e.ui.ddmanager.current,i=!1;return r&&(r.currentItem||r.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===r.options.scope&&t.accept.call(t.element[0],r.currentItem||r.element)&&e.ui.intersect(r,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(i=!0,!1):undefined}),i?!1:this.accept.call(this.element[0],r.currentItem||r.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(r)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,n,r){if(!n.offset)return!1;var i,s,o=(e.positionAbs||e.position.absolute).left,u=o+e.helperProportions.width,a=(e.positionAbs||e.position.absolute).top,f=a+e.helperProportions.height,l=n.offset.left,c=l+n.proportions.width,h=n.offset.top,p=h+n.proportions.height;switch(r){case"fit":return o>=l&&c>=u&&a>=h&&p>=f;case"intersect":return o+e.helperProportions.width/2>l&&c>u-e.helperProportions.width/2&&a+e.helperProportions.height/2>h&&p>f-e.helperProportions.height/2;case"pointer":return i=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,s=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(s,h,n.proportions.height)&&t(i,l,n.proportions.width);case"touch":return(a>=h&&p>=a||f>=h&&p>=f||h>a&&f>p)&&(o>=l&&c>=o||u>=l&&c>=u||l>o&&u>c);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var r,i,s=e.ui.ddmanager.droppables[t.options.scope]||[],o=n?n.type:null,u=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(r=0;s.length>r;r++)if(!(s[r].options.disabled||t&&!s[r].accept.call(s[r].element[0],t.currentItem||t.element))){for(i=0;u.length>i;i++)if(u[i]===s[r].element[0]){s[r].proportions.height=0;continue e}s[r].visible="none"!==s[r].element.css("display"),s[r].visible&&("mousedown"===o&&s[r]._activate.call(s[r],n),s[r].offset=s[r].element.offset(),s[r].proportions={width:s[r].element[0].offsetWidth,height:s[r].element[0].offsetHeight})}},drop:function(t,n +){var r=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(r=this._drop.call(this,n)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))}),r},dragStart:function(t,n){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r,s,o,u=e.ui.intersect(t,this,this.options.tolerance),a=!u&&this.isover?"isout":u&&!this.isover?"isover":null;a&&(this.options.greedy&&(s=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===s}),o.length&&(r=e.data(o[0],"ui-droppable"),r.greedyChild="isover"===a)),r&&"isover"===a&&(r.isover=!1,r.isout=!0,r._out.call(r,n)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,n),r&&"isout"===a&&(r.isout=!1,r.isover=!0,r._over.call(r,n)))}})},dragStop:function(t,n){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}}}(jQuery),function(e){function t(e){return parseInt(e,10)||0}function n(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,n,r,i,s,o=this,u=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!u.aspectRatio,aspectRatio:u.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:u.helper||u.ghost||u.animate?u.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=u.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},n=0;t.length>n;n++)r=e.trim(t[n]),s="ui-resizable-"+r,i=e("<div class='ui-resizable-handle "+s+"'></div>"),i.css({zIndex:u.zIndex}),"se"===r&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[r]=".ui-resizable-"+r,this.element.append(i);this._renderAxis=function(t){var n,r,i,s;t=t||this.element;for(n in this.handles)this.handles[n].constructor===String&&(this.handles[n]=e(this.handles[n],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(r=e(this.handles[n],this.element),s=/sw|ne|nw|se|n|s/.test(n)?r.outerHeight():r.outerWidth(),i=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),e(this.handles[n]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=i&&i[1]?i[1]:"se")}),u.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){u.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){u.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,n=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(n(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),n(this.originalElement),this},_mouseCapture:function(t){var n,r,i=!1;for(n in this.handles)r=e(this.handles[n])[0],(r===t.target||e.contains(r,t.target))&&(i=!0);return!this.options.disabled&&i},_mouseStart:function(n){var r,i,s,o=this.options,u=this.element.position(),a=this.element;return this.resizing=!0,/absolute/.test(a.css("position"))?a.css({position:"absolute",top:a.css("top"),left:a.css("left")}):a.is(".ui-draggable")&&a.css({position:"absolute",top:u.top,left:u.left}),this._renderProxy(),r=t(this.helper.css("left")),i=t(this.helper.css("top")),o.containment&&(r+=e(o.containment).scrollLeft()||0,i+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:r,top:i},this.size=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.originalPosition={left:r,top:i},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalMousePosition={left:n.pageX,top:n.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===s?this.axis+"-resize":s),a.addClass("ui-resizable-resizing"),this._propagate("start",n),!0},_mouseDrag:function(t){var n,r=this.helper,i={},s=this.originalMousePosition,o=this.axis,u=this.position.top,a=this.position.left,f=this.size.width,l=this.size.height,c=t.pageX-s.left||0,h=t.pageY-s.top||0,p=this._change[o];return p?(n=p.apply(this,[t,c,h]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(n=this._updateRatio(n,t)),n=this._respectSize(n,t),this._updateCache(n),this._propagate("resize",t),this.position.top!==u&&(i.top=this.position.top+"px"),this.position.left!==a&&(i.left=this.position.left+"px"),this.size.width!==f&&(i.width=this.size.width+"px"),this.size.height!==l&&(i.height=this.size.height+"px"),r.css(i),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(i)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var n,r,i,s,o,u,a,f=this.options,l=this;return this._helper&&(n=this._proportionallyResizeElements,r=n.length&&/textarea/i.test(n[0].nodeName),i=r&&e.ui.hasScroll(n[0],"left")?0:l.sizeDiff.height,s=r?0:l.sizeDiff.width,o={width:l.helper.width()-s,height:l.helper.height()-i},u=parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left)||null,a=parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top)||null,f.animate||this.element.css(e.extend(o,{top:a,left:u})),l.helper.height(l.size.height),l.helper.width(l.size.width),this._helper&&!f.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,r,s,o,u,a=this.options;u={minWidth:n(a.minWidth)?a.minWidth:0,maxWidth:n(a.maxWidth)?a.maxWidth:1/0,minHeight:n(a.minHeight)?a.minHeight:0,maxHeight:n(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||e)&&(t=u.minHeight*this.aspectRatio,s=u.minWidth/this.aspectRatio,r=u.maxHeight*this.aspectRatio,o=u.maxWidth/this.aspectRatio,t>u.minWidth&&(u.minWidth=t),s>u.minHeight&&(u.minHeight=s),u.maxWidth>r&&(u.maxWidth=r),u.maxHeight>o&&(u.maxHeight=o)),this._vBoundaries=u},_updateCache:function(e){this.offset=this.helper.offset(),n(e.left)&&(this.position.left=e.left),n(e.top)&&(this.position.top=e.top),n(e.height)&&(this.size.height=e.height),n(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,r=this.size,s=this.axis;return n(e.height)?e.width=e.height*this.aspectRatio:n(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(r.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(r.height-e.height),e.left=t.left+(r.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,r=this.axis,s=n(e.width)&&t.maxWidth&&t.maxWidth<e.width,o=n(e.height)&&t.maxHeight&&t.maxHeight<e.height,u=n(e.width)&&t.minWidth&&t.minWidth>e.width,a=n(e.height)&&t.minHeight&&t.minHeight>e.height,f=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(r),h=/nw|ne|n/.test(r);return u&&(e.width=t.minWidth),a&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),o&&(e.height=t.maxHeight),u&&c&&(e.left=f-t.minWidth),s&&c&&(e.left=f-t.maxWidth),a&&h&&(e.top=l-t.minHeight),o&&h&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,n,r,i,s=this.helper||this.element;for(e=0;this._proportionallyResizeElements.length>e;e++){if(i=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],n=[i.css("borderTopWidth"),i.css("borderRightWidth"),i.css("borderBottomWidth"),i.css("borderLeftWidth")],r=[i.css("paddingTop"),i.css("paddingRight"),i.css("paddingBottom"),i.css("paddingLeft")],t=0;n.length>t;t++)this.borderDif[t]=(parseInt(n[t],10)||0)+(parseInt(r[t],10)||0);i.css({height:s.height()-this.borderDif[0]-this.borderDif[2]||0,width:s.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,n=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize,r=this.originalPosition;return{left:r.left+t,width:n.width-t}},n:function(e,t,n){var r=this.originalSize,i=this.originalPosition;return{top:i.top+n,height:r.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},sw:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,r]))},ne:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,r]))},nw:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,r]))}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),"resize"!==t&&this._trigger(t,n,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var n=e(this).data("ui-resizable"),r=n.options,i=n._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),o=s&&e.ui.hasScroll(i[0],"left")?0:n.sizeDiff.height,u=s?0:n.sizeDiff.width,a={width:n.size.width-u,height:n.size.height-o},f=parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left)||null,l=parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top)||null;n.element.animate(e.extend(a,l&&f?{top:l,left:f}:{}),{duration:r.animateDuration,easing:r.animateEasing,step:function(){var r={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};i&&i.length&&e(i[0]).css({width:r.width,height:r.height}),n._updateCache(r),n._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var n,r,i,s,o,u,a,f=e(this).data("ui-resizable"),l=f.options,c=f.element,h=l.containment,p=h instanceof e?h.get(0):/parent/.test(h)?c.parent().get(0):h;p&&(f.containerElement=e(p),/document/.test(h)||h===document?(f.containerOffset={left:0,top:0},f.containerPosition={left:0,top:0},f.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(n=e(p),r=[],e(["Top","Right","Left","Bottom"]).each(function(e,i){r[e]=t(n.css("padding"+i))}),f.containerOffset=n.offset(),f.containerPosition=n.position(),f.containerSize={height:n.innerHeight()-r[3],width:n.innerWidth()-r[1]},i=f.containerOffset,s=f.containerSize.height,o=f.containerSize.width,u=e.ui.hasScroll(p,"left")?p.scrollWidth:o,a=e.ui.hasScroll(p)?p.scrollHeight:s,f.parentData={element:p,left:i.left,top:i.top,width:u,height:a}))},resize:function(t){var n,r,i,s,o=e(this).data("ui-resizable"),u=o.options,a=o.containerOffset,f=o.position,l=o._aspectRatio||t.shiftKey,c={top:0,left:0},h=o.containerElement;h[0]!==document&&/static/.test(h.css("position"))&&(c=a),f.left<(o._helper?a.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-a.left:o.position.left-c.left),l&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=u.helper?a.left:0),f.top<(o._helper?a.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-a.top:o.position.top),l&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?a.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,n=Math.abs((o._helper?o.offset.left-c.left:o.offset.left-c.left)+o.sizeDiff.width),r=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-a.top)+o.sizeDiff.height),i=o.containerElement.get(0)===o.element.parent().get(0),s=/relative|absolute/.test(o.containerElement.css("position")),i&&s&&(n-=o.parentData.left),n+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-n,l&&(o.size.height=o.size.width/o.aspectRatio)),r+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-r,l&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),n=t.options,r=t.containerOffset,i=t.containerPosition,s=t.containerElement,o=e(t.helper),u=o.offset(),a=o.outerWidth()-t.sizeDiff.width,f=o.outerHeight()-t.sizeDiff.height;t._helper&&!n.animate&&/relative/.test(s.css("position"))&&e(this).css({left:u.left-i.left-r.left,width:a,height:f}),t._helper&&!n.animate&&/static/.test(s.css("position"))&&e(this).css({left:u.left-i.left-r.left,width:a,height:f})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),n=t.options,r=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof n.alsoResize||n.alsoResize.parentNode?r(n.alsoResize):n.alsoResize.length?(n.alsoResize=n.alsoResize[0],r(n.alsoResize)):e.each(n.alsoResize,function(e){r(e)})},resize:function(t,n){var r=e(this).data("ui-resizable"),i=r.options,s=r.originalSize,o=r.originalPosition,u={height:r.size.height-s.height||0,width:r.size.width-s.width||0,top:r.position.top-o.top||0,left:r.position.left-o.left||0},a=function(t,r){e(t).each(function(){var t=e(this),i=e(this).data("ui-resizable-alsoresize"),s={},o=r&&r.length?r:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var n=(i[t]||0)+(u[t]||0);n&&n>=0&&(s[t]=n||null)}),t.css(s)})};"object"!=typeof i.alsoResize||i.alsoResize.nodeType?a(i.alsoResize):e.each(i.alsoResize,function(e,t){a(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),n=t.options,r=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:r.height,width:r.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof n.ghost?n.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),n=t.options,r=t.size,i=t.originalSize,s=t.originalPosition,o=t.axis,u="number"==typeof n.grid?[n.grid,n.grid]:n.grid,a=u[0]||1,f=u[1]||1,l=Math.round((r.width-i.width)/a)*a,c=Math.round((r.height-i.height)/f)*f,h=i.width+l,p=i.height+c,d=n.maxWidth&&h>n.maxWidth,v=n.maxHeight&&p>n.maxHeight,m=n.minWidth&&n.minWidth>h,g=n.minHeight&&n.minHeight>p;n.grid=u,m&&(h+=a),g&&(p+=f),d&&(h-=a),v&&(p-=f),/^(se|s|e)$/.test(o)?(t.size.width=h,t.size.height=p):/^(ne)$/.test(o)?(t.size.width=h,t.size.height=p,t.position.top=s.top-c):/^(sw)$/.test(o)?(t.size.width=h,t.size.height=p,t.position.left=s.left-l):(t.size.width=h,t.size.height=p,t.position.top=s.top-c,t.position.left=s.left-l)}})}(jQuery),function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.concat,f=i.toString,l=i.hasOwnProperty,c=r.forEach,h=r.map,p=r.reduce,d=r.reduceRight,v=r.filter,m=r.every,g=r.some,y=r.indexOf,b=r.lastIndexOf,w=Array.isArray,E=Object.keys,S=s.bind,x=function(e){return e instanceof x?e:this instanceof x?(this._wrapped=e,void 0):new x(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=x),exports._=x):e._=x,x.VERSION="1.4.4";var T=x.each=x.forEach=function(e,t,r){if(null!=e)if(c&&e.forEach===c)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;s>i;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(x.has(e,o)&&t.call(r,e[o],o,e)===n)return};x.map=x.collect=function(e,t,n){var r=[];return null==e?r:h&&e.map===h?e.map(t,n):(T(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)};var N="Reduce of empty array with no initial value";x.reduce=x.foldl=x.inject=function(e,t,n,r){var i=arguments.length>2;if(null==e&&(e=[]),p&&e.reduce===p)return r&&(t=x.bind(t,r)),i?e.reduce(t,n):e.reduce(t);if(T(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)}),!i)throw new TypeError(N);return n},x.reduceRight=x.foldr=function(e,t,n,r){var i=arguments.length>2;if(null==e&&(e=[]),d&&e.reduceRight===d)return r&&(t=x.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=x.keys(e);s=o.length}if(T(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)}),!i)throw new TypeError(N);return n},x.find=x.detect=function(e,t,n){var r;return C(e,function(e,i,s){return t.call(n,e,i,s)?(r=e,!0):void 0}),r},x.filter=x.select=function(e,t,n){var r=[];return null==e?r:v&&e.filter===v?e.filter(t,n):(T(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},x.reject=function(e,t,n){return x.filter(e,function(e,r,i){return!t.call(n,e,r,i)},n)},x.every=x.all=function(e,t,r){t||(t=x.identity);var i=!0;return null==e?i:m&&e.every===m?e.every(t,r):(T(e,function(e,s,o){return(i=i&&t.call(r,e,s,o))?void 0:n}),!!i)};var C=x.some=x.any=function(e,t,r){t||(t=x.identity);var i=!1;return null==e?i:g&&e.some===g?e.some(t,r):(T(e,function(e,s,o){return i||(i=t.call(r,e,s,o))?n:void 0}),!!i)};x.contains=x.include=function(e,t){return null==e?!1:y&&e.indexOf===y?e.indexOf(t)!=-1:C(e,function(e){return e===t})},x.invoke=function(e,t){var n=u.call(arguments,2),r=x.isFunction(t);return x.map(e,function(e){return(r?t:e[t]).apply(e,n)})},x.pluck=function(e,t){return x.map(e,function(e){return e[t]})},x.where=function(e,t,n){return x.isEmpty(t)?n?null:[]:x[n?"find":"filter"](e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},x.findWhere=function(e,t){return x.where(e,t,!0)},x.max=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&65535>e.length)return Math.max.apply(Math,e);if(!t&&x.isEmpty(e))return-1/0;var r={computed:-1/0,value:-1/0};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.computed&&(r={value:e,computed:o})}),r.value},x.min=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&65535>e.length)return Math.min.apply(Math,e);if(!t&&x.isEmpty(e))return 1/0;var r={computed:1/0,value:1/0};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;r.computed>o&&(r={value:e,computed:o})}),r.value},x.shuffle=function(e){var t,n=0,r=[];return T(e,function(e){t=x.random(n++),r[n-1]=r[t],r[t]=e}),r};var k=function(e){return x.isFunction(e)?e:function(t){return t[e]}};x.sortBy=function(e,t,n){var r=k(t);return x.pluck(x.map(e,function(e,t,i){return{value:e,index:t,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(r>n||r===void 0)return-1}return e.index<t.index?-1:1}),"value")};var L=function(e,t,n,r){var i={},s=k(t||x.identity);return T(e,function(t,o){var u=s.call(n,t,o,e);r(i,u,t)}),i};x.groupBy=function(e,t,n){return L(e,t,n,function(e,t,n){(x.has(e,t)?e[t]:e[t]=[]).push(n)})},x.countBy=function(e,t,n){return L(e,t,n,function(e,t){x.has(e,t)||(e[t]=0),e[t]++})},x.sortedIndex=function(e,t,n,r){n=null==n?x.identity:k(n);for(var i=n.call(r,t),s=0,o=e.length;o>s;){var u=s+o>>>1;i>n.call(r,e[u])?s=u+1:o=u}return s},x.toArray=function(e){return e?x.isArray(e)?u.call(e):e.length===+e.length?x.map(e,x.identity):x.values(e):[]},x.size=function(e){return null==e?0:e.length===+e.length?e.length:x.keys(e).length},x.first=x.head=x.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:u.call(e,0,t)},x.initial=function(e,t,n){return u.call(e,0,e.length-(null==t||n?1:t))},x.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:u.call(e,Math.max(e.length-t,0))},x.rest=x.tail=x.drop=function(e,t,n){return u.call(e,null==t||n?1:t)},x.compact=function(e){return x.filter(e,x.identity)};var A=function(e,t,n){return T(e,function(e){x.isArray(e)?t?o.apply(n,e):A(e,t,n):n.push(e)}),n};x.flatten=function(e,t){return A(e,t,[])},x.without=function(e){return x.difference(e,u.call(arguments,1))},x.uniq=x.unique=function(e,t,n,r){x.isFunction(t)&&(r=n,n=t,t=!1);var i=n?x.map(e,n,r):e,s=[],o=[];return T(i,function(n,r){(t?r&&o[o.length-1]===n:x.contains(o,n))||(o.push(n),s.push(e[r]))}),s},x.union=function(){return x.uniq(a.apply(r,arguments))},x.intersection=function(e){var t=u.call(arguments,1);return x.filter(x.uniq(e),function(e){return x.every(t,function(t){return x.indexOf(t,e)>=0})})},x.difference=function(e){var t=a.apply(r,u.call(arguments,1));return x.filter(e,function(e){return!x.contains(t,e)})},x.zip=function(){for(var e=u.call(arguments),t=x.max(x.pluck(e,"length")),n=Array(t),r=0;t>r;r++)n[r]=x.pluck(e,""+r);return n},x.object=function(e,t){if(null==e)return{};for(var n={},r=0,i=e.length;i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},x.indexOf=function(e,t,n){if(null==e)return-1;var r=0,i=e.length;if(n){if("number"!=typeof n)return r=x.sortedIndex(e,t),e[r]===t?r:-1;r=0>n?Math.max(0,i+n):n}if(y&&e.indexOf===y)return e.indexOf(t,n);for(;i>r;r++)if(e[r]===t)return r;return-1},x.lastIndexOf=function(e,t,n){if(null==e)return-1;var r=null!=n;if(b&&e.lastIndexOf===b)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);for(var i=r?n:e.length;i--;)if(e[i]===t)return i;return-1},x.range=function(e,t,n){1>=arguments.length&&(t=e||0,e=0),n=arguments[2]||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=Array(r);r>i;)s[i++]=e,e+=n;return s},x.bind=function(e,t){if(e.bind===S&&S)return S.apply(e,u.call(arguments,1));var n=u.call(arguments,2);return function(){return e.apply(t,n.concat(u.call(arguments)))}},x.partial=function(e){var t=u.call(arguments,1);return function(){return e.apply(this,t.concat(u.call(arguments)))}},x.bindAll=function(e){var t=u.call(arguments,1);return 0===t.length&&(t=x.functions(e)),T(t,function(t){e[t]=x.bind(e[t],e)}),e},x.memoize=function(e,t){var n={};return t||(t=x.identity),function(){var r=t.apply(this,arguments);return x.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},x.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},x.defer=function(e){return x.delay.apply(x,[e,1].concat(u.call(arguments,1)))},x.throttle=function(e,t){var n,r,i,s,o=0,u=function(){o=new Date,i=null,s=e.apply(n,r)};return function(){var a=new Date,f=t-(a-o);return n=this,r=arguments,0>=f?(clearTimeout(i),i=null,o=a,s=e.apply(n,r)):i||(i=setTimeout(u,f)),s}},x.debounce=function(e,t,n){var r,i;return function(){var s=this,o=arguments,u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r;return clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},x.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},x.wrap=function(e,t){return function(){var n=[e];return o.apply(n,arguments),t.apply(this,n)}},x.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},x.after=function(e,t){return 0>=e?t():function(){return 1>--e?t.apply(this,arguments):void 0}},x.keys=E||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)x.has(e,n)&&(t[t.length]=n);return t},x.values=function(e){var t=[];for(var n in e)x.has(e,n)&&t.push(e[n]);return t},x.pairs=function(e){var t=[];for(var n in e)x.has(e,n)&&t.push([n,e[n]]);return t},x.invert=function(e){var t={};for(var n in e)x.has(e,n)&&(t[e[n]]=n);return t},x.functions=x.methods=function(e){var t=[];for(var n in e)x.isFunction(e[n])&&t.push(n);return t.sort()},x.extend=function(e){return T(u.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},x.pick=function(e){var t={},n=a.apply(r,u.call(arguments,1));return T(n,function(n){n in e&&(t[n]=e[n])}),t},x.omit=function(e){var t={},n=a.apply(r,u.call(arguments,1));for(var i in e)x.contains(n,i)||(t[i]=e[i]);return t},x.defaults=function(e){return T(u.call(arguments,1),function(t){if(t)for(var n in t)null==e[n]&&(e[n]=t[n])}),e},x.clone=function(e){return x.isObject(e)?x.isArray(e)?e.slice():x.extend({},e):e},x.tap=function(e,t){return t(e),e};var O=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof x&&(e=e._wrapped),t instanceof x&&(t=t._wrapped);var i=f.call(e);if(i!=f.call(t))return!1;switch(i){case"[object String]":return e==t+"";case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;for(var s=n.length;s--;)if(n[s]==e)return r[s]==t;n.push(e),r.push(t);var o=0,u=!0;if("[object Array]"==i){if(o=e.length,u=o==t.length)for(;o--&&(u=O(e[o],t[o],n,r)););}else{var a=e.constructor,l=t.constructor;if(a!==l&&!(x.isFunction(a)&&a instanceof a&&x.isFunction(l)&&l instanceof l))return!1;for(var c in e)if(x.has(e,c)&&(o++,!(u=x.has(t,c)&&O(e[c],t[c],n,r))))break;if(u){for(c in t)if(x.has(t,c)&&!(o--))break;u=!o}}return n.pop(),r.pop(),u};x.isEqual=function(e,t){return O(e,t,[],[])},x.isEmpty=function(e){if(null==e)return!0;if(x.isArray(e)||x.isString(e))return 0===e.length;for(var t in e)if(x.has(e,t))return!1;return!0},x.isElement=function(e){return!!e&&1===e.nodeType},x.isArray=w||function(e){return"[object Array]"==f.call(e)},x.isObject=function(e){return e===Object(e)},T(["Arguments","Function","String","Number","Date","RegExp"],function(e){x["is"+e]=function(t){return f.call(t)=="[object "+e+"]"}}),x.isArguments(arguments)||(x.isArguments=function(e){return!!e&&!!x.has(e,"callee")}),"function"!=typeof /./&&(x.isFunction=function(e){return"function"==typeof e}),x.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},x.isNaN=function(e){return x.isNumber(e)&&e!=+e},x.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==f.call(e)},x.isNull=function(e){return null===e},x.isUndefined=function(e){return e===void 0},x.has=function(e,t){return l.call(e,t)},x.noConflict=function(){return e._=t,this},x.identity=function(e){return e},x.times=function(e,t,n){for(var r=Array(e),i=0;e>i;i++)r[i]=t.call(n,i);return r},x.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var M={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};M.unescape=x.invert(M.escape);var _={escape:RegExp("["+x.keys(M.escape).join("")+"]","g"),unescape:RegExp("("+x.keys(M.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(e){x[e]=function(t){return null==t?"":(""+t).replace(_[e],function(t){return M[e][t]})}}),x.result=function(e,t){if(null==e)return null;var n=e[t];return x.isFunction(n)?n.call(e):n},x.mixin=function(e){T(x.functions(e),function(t){var n=x[t]=e[t];x.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),j.call(this,n.apply(x,e))}})};var D=0;x.uniqueId=function(e){var t=++D+"";return e?e+t:t},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var P=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(e,t,n){var r;n=x.defaults({},n,x.templateSettings);var i=RegExp([(n.escape||P).source,(n.interpolate||P).source,(n.evaluate||P).source].join("|")+"|$","g"),s=0,o="__p+='";e.replace(i,function(t,n,r,i,u){return o+=e.slice(s,u).replace(B,function(e){return"\\"+H[e]}),n&&(o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(o+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(o+="';\n"+i+"\n__p+='"),s=u+t.length,t}),o+="';\n",n.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{r=Function(n.variable||"obj","_",o)}catch(u){throw u.source=o,u}if(t)return r(t,x);var a=function(e){return r.call(this,e,x)};return a.source="function("+(n.variable||"obj")+"){\n"+o+"}",a},x.chain=function(e){return x(e).chain()};var j=function(e){return this._chain?x(e).chain():e};x.mixin(x),T(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];x.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!=e&&"splice"!=e||0!==n.length||delete n[0],j.call(this,n)}}),T(["concat","join","slice"],function(e){var t=r[e];x.prototype[e]=function(){return j.call(this,t.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),!function(e,t){"use strict";var n=t.prototype.trim,r=t.prototype.trimRight,i=t.prototype.trimLeft,s=function(e){return e*1||0},o=function(e,t){if(t<1)return"";var n="";while(t>0)t&1&&(n+=e),t>>=1,e+=e;return n},u=[].slice,a=function(e){return e==null?"\\s":e.source?e.source:"["+p.escapeRegExp(e)+"]"},f={lt:"<",gt:">",quot:'"',apos:"'",amp:"&"},l={};for(var c in f)l[f[c]]=c;var h=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var n=o,r=function(){return r.cache.hasOwnProperty(arguments[0])||(r.cache[arguments[0]]=r.parse(arguments[0])),r.format.call(null,r.cache[arguments[0]],arguments)};return r.format=function(r,i){var s=1,o=r.length,u="",a,f=[],l,c,p,d,v,m +;for(l=0;l<o;l++){u=e(r[l]);if(u==="string")f.push(r[l]);else if(u==="array"){p=r[l];if(p[2]){a=i[s];for(c=0;c<p[2].length;c++){if(!a.hasOwnProperty(p[2][c]))throw new Error(h('[_.sprintf] property "%s" does not exist',p[2][c]));a=a[p[2][c]]}}else p[1]?a=i[p[1]]:a=i[s++];if(/[^s]/.test(p[8])&&e(a)!="number")throw new Error(h("[_.sprintf] expecting number but found %s",e(a)));switch(p[8]){case"b":a=a.toString(2);break;case"c":a=t.fromCharCode(a);break;case"d":a=parseInt(a,10);break;case"e":a=p[7]?a.toExponential(p[7]):a.toExponential();break;case"f":a=p[7]?parseFloat(a).toFixed(p[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=t(a))&&p[7]?a.substring(0,p[7]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(p[8])&&p[3]&&a>=0?"+"+a:a,v=p[4]?p[4]=="0"?"0":p[4].charAt(1):" ",m=p[6]-t(a).length,d=p[6]?n(v,m):"",f.push(p[5]?a+d:d+a)}}return f.join("")},r.cache={},r.parse=function(e){var t=e,n=[],r=[],i=0;while(t){if((n=/^[^\x25]+/.exec(t))!==null)r.push(n[0]);else if((n=/^\x25{2}/.exec(t))!==null)r.push("%");else{if((n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))===null)throw new Error("[_.sprintf] huh?");if(n[2]){i|=1;var s=[],o=n[2],u=[];if((u=/^([a-z_][a-z_\d]*)/i.exec(o))===null)throw new Error("[_.sprintf] huh?");s.push(u[1]);while((o=o.substring(u[0].length))!=="")if((u=/^\.([a-z_][a-z_\d]*)/i.exec(o))!==null)s.push(u[1]);else{if((u=/^\[(\d+)\]/.exec(o))===null)throw new Error("[_.sprintf] huh?");s.push(u[1])}n[2]=s}else i|=2;if(i===3)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");r.push(n)}t=t.substring(n[0].length)}return r},r}(),p={VERSION:"2.3.0",isBlank:function(e){return e==null&&(e=""),/^\s*$/.test(e)},stripTags:function(e){return e==null?"":t(e).replace(/<\/?[^>]+>/g,"")},capitalize:function(e){return e=e==null?"":t(e),e.charAt(0).toUpperCase()+e.slice(1)},chop:function(e,n){return e==null?[]:(e=t(e),n=~~n,n>0?e.match(new RegExp(".{1,"+n+"}","g")):[e])},clean:function(e){return p.strip(e).replace(/\s+/g," ")},count:function(e,n){return e==null||n==null?0:t(e).split(n).length-1},chars:function(e){return e==null?[]:t(e).split("")},swapCase:function(e){return e==null?"":t(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})},escapeHTML:function(e){return e==null?"":t(e).replace(/[&<>"']/g,function(e){return"&"+l[e]+";"})},unescapeHTML:function(e){return e==null?"":t(e).replace(/\&([^;]+);/g,function(e,n){var r;return n in f?f[n]:(r=n.match(/^#x([\da-fA-F]+)$/))?t.fromCharCode(parseInt(r[1],16)):(r=n.match(/^#(\d+)$/))?t.fromCharCode(~~r[1]):e})},escapeRegExp:function(e){return e==null?"":t(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(e,t,n,r){var i=p.chars(e);return i.splice(~~t,~~n,r),i.join("")},insert:function(e,t,n){return p.splice(e,t,0,n)},include:function(e,n){return n===""?!0:e==null?!1:t(e).indexOf(n)!==-1},join:function(){var e=u.call(arguments),t=e.shift();return t==null&&(t=""),e.join(t)},lines:function(e){return e==null?[]:t(e).split("\n")},reverse:function(e){return p.chars(e).reverse().join("")},startsWith:function(e,n){return n===""?!0:e==null||n==null?!1:(e=t(e),n=t(n),e.length>=n.length&&e.slice(0,n.length)===n)},endsWith:function(e,n){return n===""?!0:e==null||n==null?!1:(e=t(e),n=t(n),e.length>=n.length&&e.slice(e.length-n.length)===n)},succ:function(e){return e==null?"":(e=t(e),e.slice(0,-1)+t.fromCharCode(e.charCodeAt(e.length-1)+1))},titleize:function(e){return e==null?"":t(e).replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()})},camelize:function(e){return p.trim(e).replace(/[-_\s]+(.)?/g,function(e,t){return t.toUpperCase()})},underscored:function(e){return p.trim(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(e){return p.trim(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(e){return p.titleize(t(e).replace(/_/g," ")).replace(/\s/g,"")},humanize:function(e){return p.capitalize(p.underscored(e).replace(/_id$/,"").replace(/_/g," "))},trim:function(e,r){return e==null?"":!r&&n?n.call(e):(r=a(r),t(e).replace(new RegExp("^"+r+"+|"+r+"+$","g"),""))},ltrim:function(e,n){return e==null?"":!n&&i?i.call(e):(n=a(n),t(e).replace(new RegExp("^"+n+"+"),""))},rtrim:function(e,n){return e==null?"":!n&&r?r.call(e):(n=a(n),t(e).replace(new RegExp(n+"+$"),""))},truncate:function(e,n,r){return e==null?"":(e=t(e),r=r||"...",n=~~n,e.length>n?e.slice(0,n)+r:e)},prune:function(e,n,r){if(e==null)return"";e=t(e),n=~~n,r=r!=null?t(r):"...";if(e.length<=n)return e;var i=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},s=e.slice(0,n+1).replace(/.(?=\W*\w*$)/g,i);return s.slice(s.length-2).match(/\w\w/)?s=s.replace(/\s*\S+$/,""):s=p.rtrim(s.slice(0,s.length-1)),(s+r).length>e.length?e:e.slice(0,s.length)+r},words:function(e,t){return p.isBlank(e)?[]:p.trim(e,t).split(t||/\s+/)},pad:function(e,n,r,i){e=e==null?"":t(e),n=~~n;var s=0;r?r.length>1&&(r=r.charAt(0)):r=" ";switch(i){case"right":return s=n-e.length,e+o(r,s);case"both":return s=n-e.length,o(r,Math.ceil(s/2))+e+o(r,Math.floor(s/2));default:return s=n-e.length,o(r,s)+e}},lpad:function(e,t,n){return p.pad(e,t,n)},rpad:function(e,t,n){return p.pad(e,t,n,"right")},lrpad:function(e,t,n){return p.pad(e,t,n,"both")},sprintf:h,vsprintf:function(e,t){return t.unshift(e),h.apply(null,t)},toNumber:function(e,n){if(e==null||e=="")return 0;e=t(e);var r=s(s(e).toFixed(~~n));return r===0&&!e.match(/^0+$/)?Number.NaN:r},numberFormat:function(e,t,n,r){if(isNaN(e)||e==null)return"";e=e.toFixed(~~t),r=r||",";var i=e.split("."),s=i[0],o=i[1]?(n||".")+i[1]:"";return s.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+r)+o},strRight:function(e,n){if(e==null)return"";e=t(e),n=n!=null?t(n):n;var r=n?e.indexOf(n):-1;return~r?e.slice(r+n.length,e.length):e},strRightBack:function(e,n){if(e==null)return"";e=t(e),n=n!=null?t(n):n;var r=n?e.lastIndexOf(n):-1;return~r?e.slice(r+n.length,e.length):e},strLeft:function(e,n){if(e==null)return"";e=t(e),n=n!=null?t(n):n;var r=n?e.indexOf(n):-1;return~r?e.slice(0,r):e},strLeftBack:function(e,t){if(e==null)return"";e+="",t=t!=null?""+t:t;var n=e.lastIndexOf(t);return~n?e.slice(0,n):e},toSentence:function(e,t,n,r){t=t||", ",n=n||" and ";var i=e.slice(),s=i.pop();return e.length>2&&r&&(n=p.rtrim(t)+n),i.length?i.join(t)+n+s:s},toSentenceSerial:function(){var e=u.call(arguments);return e[3]=!0,p.toSentence.apply(p,e)},slugify:function(e){if(e==null)return"";var n="Ä…Ã áäâãåæćęèéëêìíïîłńòóöôõøùúüûñçżź",r="aaaaaaaaceeeeeiiiilnoooooouuuunczz",i=new RegExp(a(n),"g");return e=t(e).toLowerCase().replace(i,function(e){var t=n.indexOf(e);return r.charAt(t)||"-"}),p.dasherize(e.replace(/[^\w\s-]/g,""))},surround:function(e,t){return[t,e,t].join("")},quote:function(e){return p.surround(e,'"')},exports:function(){var e={};for(var t in this){if(!this.hasOwnProperty(t)||t.match(/^(?:include|contains|reverse)$/))continue;e[t]=this[t]}return e},repeat:function(e,n,r){if(e==null)return"";n=~~n;if(r==null)return o(t(e),n);for(var i=[];n>0;i[--n]=e);return i.join(r)},levenshtein:function(e,n){if(e==null&&n==null)return 0;if(e==null)return t(n).length;if(n==null)return t(e).length;e=t(e),n=t(n);var r=[],i,s;for(var o=0;o<=n.length;o++)for(var u=0;u<=e.length;u++)o&&u?e.charAt(u-1)===n.charAt(o-1)?s=i:s=Math.min(r[u],r[u-1],i)+1:s=o+u,i=r[u],r[u]=s;return r.pop()}};p.strip=p.trim,p.lstrip=p.ltrim,p.rstrip=p.rtrim,p.center=p.lrpad,p.rjust=p.lpad,p.ljust=p.rpad,p.contains=p.include,p.q=p.quote,typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(module.exports=p),exports._s=p):typeof define=="function"&&define.amd?define("underscore.string",[],function(){return p}):(e._=e._||{},e._.string=e._.str=p)}(this,String),function(){var e=this,t=e.Backbone,n=[],r=n.push,i=n.slice,s=n.splice,o;typeof exports!="undefined"?o=exports:o=e.Backbone={},o.VERSION="1.0.0";var u=e._;!u&&typeof require!="undefined"&&(u=require("underscore")),o.$=e.jQuery||e.Zepto||e.ender||e.$,o.noConflict=function(){return e.Backbone=t,this},o.emulateHTTP=!1,o.emulateJSON=!1;var a=o.Events={on:function(e,t,n){if(!l(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var r=this._events[e]||(this._events[e]=[]);return r.push({callback:t,context:n,ctx:n||this}),this},once:function(e,t,n){if(!l(this,"once",e,[t,n])||!t)return this;var r=this,i=u.once(function(){r.off(e,i),t.apply(this,arguments)});return i._callback=t,this.on(e,i,n)},off:function(e,t,n){var r,i,s,o,a,f,c,h;if(!this._events||!l(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events={},this;o=e?[e]:u.keys(this._events);for(a=0,f=o.length;a<f;a++){e=o[a];if(s=this._events[e]){this._events[e]=r=[];if(t||n)for(c=0,h=s.length;c<h;c++)i=s[c],(t&&t!==i.callback&&t!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[e]}}return this},trigger:function(e){if(!this._events)return this;var t=i.call(arguments,1);if(!l(this,"trigger",e,t))return this;var n=this._events[e],r=this._events.all;return n&&c(n,t),r&&c(r,arguments),this},stopListening:function(e,t,n){var r=this._listeners;if(!r)return this;var i=!t&&!n;typeof t=="object"&&(n=this),e&&((r={})[e._listenerId]=e);for(var s in r)r[s].off(t,n,this),i&&delete this._listeners[s];return this}},f=/\s+/,l=function(e,t,n,r){if(!n)return!0;if(typeof n=="object"){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(f.test(n)){var s=n.split(f);for(var o=0,u=s.length;o<u;o++)e[t].apply(e,[s[o]].concat(r));return!1}return!0},c=function(e,t){var n,r=-1,i=e.length,s=t[0],o=t[1],u=t[2];switch(t.length){case 0:while(++r<i)(n=e[r]).callback.call(n.ctx);return;case 1:while(++r<i)(n=e[r]).callback.call(n.ctx,s);return;case 2:while(++r<i)(n=e[r]).callback.call(n.ctx,s,o);return;case 3:while(++r<i)(n=e[r]).callback.call(n.ctx,s,o,u);return;default:while(++r<i)(n=e[r]).callback.apply(n.ctx,t)}},h={listenTo:"on",listenToOnce:"once"};u.each(h,function(e,t){a[t]=function(t,n,r){var i=this._listeners||(this._listeners={}),s=t._listenerId||(t._listenerId=u.uniqueId("l"));return i[s]=t,typeof n=="object"&&(r=this),t[e](n,r,this),this}}),a.bind=a.on,a.unbind=a.off,u.extend(o,a);var p=o.Model=function(e,t){var n,r=e||{};t||(t={}),this.cid=u.uniqueId("c"),this.attributes={},u.extend(this,u.pick(t,d)),t.parse&&(r=this.parse(r,t)||{});if(n=u.result(this,"defaults"))r=u.defaults({},r,n);this.set(r,t),this.changed={},this.initialize.apply(this,arguments)},d=["url","urlRoot","collection"];u.extend(p.prototype,a,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return u.clone(this.attributes)},sync:function(){return o.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return u.escape(this.get(e))},has:function(e){return this.get(e)!=null},set:function(e,t,n){var r,i,s,o,a,f,l,c;if(e==null)return this;typeof e=="object"?(i=e,n=t):(i={})[e]=t,n||(n={});if(!this._validate(i,n))return!1;s=n.unset,a=n.silent,o=[],f=this._changing,this._changing=!0,f||(this._previousAttributes=u.clone(this.attributes),this.changed={}),c=this.attributes,l=this._previousAttributes,this.idAttribute in i&&(this.id=i[this.idAttribute]);for(r in i)t=i[r],u.isEqual(c[r],t)||o.push(r),u.isEqual(l[r],t)?delete this.changed[r]:this.changed[r]=t,s?delete c[r]:c[r]=t;if(!a){o.length&&(this._pending=!0);for(var h=0,p=o.length;h<p;h++)this.trigger("change:"+o[h],this,c[o[h]],n)}if(f)return this;if(!a)while(this._pending)this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,u.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var n in this.attributes)t[n]=void 0;return this.set(t,u.extend({},e,{unset:!0}))},hasChanged:function(e){return e==null?!u.isEmpty(this.changed):u.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?u.clone(this.changed):!1;var t,n=!1,r=this._changing?this._previousAttributes:this.attributes;for(var i in e){if(u.isEqual(r[i],t=e[i]))continue;(n||(n={}))[i]=t}return n},previous:function(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]},previousAttributes:function(){return u.clone(this._previousAttributes)},fetch:function(e){e=e?u.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=this,n=e.success;return e.success=function(r){if(!t.set(t.parse(r,e),e))return!1;n&&n(t,r,e),t.trigger("sync",t,r,e)},j(this,e),this.sync("read",this,e)},save:function(e,t,n){var r,i,s,o=this.attributes;e==null||typeof e=="object"?(r=e,n=t):(r={})[e]=t;if(r&&(!n||!n.wait)&&!this.set(r,n))return!1;n=u.extend({validate:!0},n);if(!this._validate(r,n))return!1;r&&n.wait&&(this.attributes=u.extend({},o,r)),n.parse===void 0&&(n.parse=!0);var a=this,f=n.success;return n.success=function(e){a.attributes=o;var t=a.parse(e,n);n.wait&&(t=u.extend(r||{},t));if(u.isObject(t)&&!a.set(t,n))return!1;f&&f(a,e,n),a.trigger("sync",a,e,n)},j(this,n),i=this.isNew()?"create":n.patch?"patch":"update",i==="patch"&&(n.attrs=r),s=this.sync(i,this,n),r&&n.wait&&(this.attributes=o),s},destroy:function(e){e=e?u.clone(e):{};var t=this,n=e.success,r=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(i){(e.wait||t.isNew())&&r(),n&&n(t,i,e),t.isNew()||t.trigger("sync",t,i,e)};if(this.isNew())return e.success(),!1;j(this,e);var i=this.sync("delete",this,e);return e.wait||r(),i},url:function(){var e=u.result(this,"urlRoot")||u.result(this.collection,"url")||B();return this.isNew()?e:e+(e.charAt(e.length-1)==="/"?"":"/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return this.id==null},isValid:function(e){return this._validate({},u.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=u.extend({},this.attributes,e);var n=this.validationError=this.validate(e,t)||null;return n?(this.trigger("invalid",this,n,u.extend(t||{},{validationError:n})),!1):!0}});var v=["keys","values","pairs","invert","pick","omit"];u.each(v,function(e){p.prototype[e]=function(){var t=i.call(arguments);return t.unshift(this.attributes),u[e].apply(u,t)}});var m=o.Collection=function(e,t){t||(t={}),t.url&&(this.url=t.url),t.model&&(this.model=t.model),t.comparator!==void 0&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,u.extend({silent:!0},t))},g={add:!0,remove:!0,merge:!0},y={add:!0,merge:!1,remove:!1};u.extend(m.prototype,a,{model:p,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return o.sync.apply(this,arguments)},add:function(e,t){return this.set(e,u.defaults(t||{},y))},remove:function(e,t){e=u.isArray(e)?e.slice():[e],t||(t={});var n,r,i,s;for(n=0,r=e.length;n<r;n++){s=this.get(e[n]);if(!s)continue;delete this._byId[s.id],delete this._byId[s.cid],i=this.indexOf(s),this.models.splice(i,1),this.length--,t.silent||(t.index=i,s.trigger("remove",s,this,t)),this._removeReference(s)}return this},set:function(e,t){t=u.defaults(t||{},g),t.parse&&(e=this.parse(e,t)),u.isArray(e)||(e=e?[e]:[]);var n,i,o,a,f,l,c=t.at,h=this.comparator&&c==null&&t.sort!==!1,p=u.isString(this.comparator)?this.comparator:null,d=[],v=[],m={};for(n=0,i=e.length;n<i;n++){if(!(o=this._prepareModel(e[n],t)))continue;(f=this.get(o))?(t.remove&&(m[f.cid]=!0),t.merge&&(f.set(o.attributes,t),h&&!l&&f.hasChanged(p)&&(l=!0))):t.add&&(d.push(o),o.on("all",this._onModelEvent,this),this._byId[o.cid]=o,o.id!=null&&(this._byId[o.id]=o))}if(t.remove){for(n=0,i=this.length;n<i;++n)m[(o=this.models[n]).cid]||v.push(o);v.length&&this.remove(v,t)}d.length&&(h&&(l=!0),this.length+=d.length,c!=null?s.apply(this.models,[c,0].concat(d)):r.apply(this.models,d)),l&&this.sort({silent:!0});if(t.silent)return this;for(n=0,i=d.length;n<i;n++)(o=d[n]).trigger("add",o,this,t);return l&&this.trigger("sort",this,t),this},reset:function(e,t){t||(t={});for(var n=0,r=this.models.length;n<r;n++)this._removeReference(this.models[n]);return t.previousModels=this.models,this._reset(),this.add(e,u.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),this},push:function(e,t){return e=this._prepareModel(e,t),this.add(e,u.extend({at:this.length},t)),e},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return e=this._prepareModel(e,t),this.add(e,u.extend({at:0},t)),e},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(e,t){return this.models.slice(e,t)},get:function(e){return e==null?void 0:this._byId[e.id!=null?e.id:e.cid||e]},at:function(e){return this.models[e]},where:function(e,t){return u.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),u.isString(this.comparator)||this.comparator.length===1?this.models=this.sortBy(this.comparator,this):this.models.sort(u.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},sortedIndex:function(e,t,n){t||(t=this.comparator);var r=u.isFunction(t)?t:function(e){return e.get(t)};return u.sortedIndex(this.models,e,r,n)},pluck:function(e){return u.invoke(this.models,"get",e)},fetch:function(e){e=e?u.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=e.success,n=this;return e.success=function(r){var i=e.reset?"reset":"set";n[i](r,e),t&&t(n,r,e),n.trigger("sync",n,r,e)},j(this,e),this.sync("read",this,e)},create:function(e,t){t=t?u.clone(t):{};if(!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var n=this,r=t.success;return t.success=function(i){t.wait&&n.add(e,t),r&&r(e,i,t)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof p)return e.collection||(e.collection=this),e;t||(t={}),t.collection=this;var n=new this.model(e,t);return n._validate(e,t)?n:(this.trigger("invalid",this,e,t),!1)},_removeReference:function(e){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if((e==="add"||e==="remove")&&n!==this)return;e==="destroy"&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],t.id!=null&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments)}});var b=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];u.each(b,function(e){m.prototype[e]=function(){var t=i.call(arguments);return t.unshift(this.models),u[e].apply(u,t)}});var w=["groupBy","countBy","sortBy"];u.each(w,function(e){m.prototype[e]=function(t,n){var r=u.isFunction(t)?t:function(e){return e.get(t)};return u[e](this.models,r,n)}});var E=o.View=function(e){this.cid=u.uniqueId("view"),this._configure(e||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},S=/^(\S+)\s*(.*)$/,x=["model","collection","el","id","attributes","className","tagName","events"];u.extend(E.prototype,a,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,t){return this.$el&&this.undelegateEvents(),this.$el=e instanceof o.$?e:o.$(e),this.el=this.$el[0],t!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=u.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var n=e[t];u.isFunction(n)||(n=this[e[t]]);if(!n)continue;var r=t.match(S),i=r[1],s=r[2];n=u.bind(n,this),i+=".delegateEvents"+this.cid,s===""?this.$el.on(i,n):this.$el.on(i,s,n)}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(e){this.options&&(e=u.extend({},u.result(this,"options"),e)),u.extend(this,u.pick(e,x)),this.options=e},_ensureElement:function(){if(!this.el){var e=u.extend({},u.result(this,"attributes"));this.id&&(e.id=u.result(this,"id")),this.className&&(e["class"]=u.result(this,"className"));var t=o.$("<"+u.result(this,"tagName")+">").attr(e);this.setElement(t,!1)}else this.setElement(u.result(this,"el"),!1)}}),o.sync=function(e,t,n){var r=T[e];u.defaults(n||(n={}),{emulateHTTP:o.emulateHTTP,emulateJSON:o.emulateJSON});var i={type:r,dataType:"json"};n.url||(i.url=u.result(t,"url")||B()),n.data==null&&t&&(e==="create"||e==="update"||e==="patch")&&(i.contentType="application/json",i.data=JSON.stringify(n.attrs||t.toJSON(n))),n.emulateJSON&&(i.contentType="application/x-www-form-urlencoded",i.data=i.data?{model:i.data}:{});if(n.emulateHTTP&&(r==="PUT"||r==="DELETE"||r==="PATCH")){i.type="POST",n.emulateJSON&&(i.data._method=r);var s=n.beforeSend;n.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",r);if(s)return s.apply(this,arguments)}}i.type!=="GET"&&!n.emulateJSON&&(i.processData=!1),i.type==="PATCH"&&window.ActiveXObject&&(!window.external||!window.external.msActiveXFilteringEnabled)&&(i.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var a=n.xhr=o.ajax(u.extend(i,n));return t.trigger("request",t,a,n),a};var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};o.ajax=function(){return o.$.ajax.apply(o.$,arguments)};var N=o.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},C=/\((.*?)\)/g,k=/(\(\?)?:\w+/g,L=/\*\w+/g,A=/[\-{}\[\]+?.,\\\^$|#\s]/g;u.extend(N.prototype,a,{initialize:function(){},route:function(e,t,n){u.isRegExp(e)||(e=this._routeToRegExp(e)),u.isFunction(t)&&(n=t,t=""),n||(n=this[t]);var r=this;return o.history.route(e,function(i){var s=r._extractParameters(e,i);n&&n.apply(r,s),r.trigger.apply(r,["route:"+t].concat(s)),r.trigger("route",t,s),o.history.trigger("route",r,t,s)}),this},navigate:function(e,t){return o.history.navigate(e,t),this},_bindRoutes:function(){if(!this.routes)return;this.routes=u.result(this,"routes");var e,t=u.keys(this.routes);while((e=t.pop())!=null)this.route(e,this.routes[e])},_routeToRegExp:function(e){return e=e.replace(A,"\\$&").replace(C,"(?:$1)?").replace(k,function(e,t){return t?e:"([^/]+)"}).replace(L,"(.*?)"),new RegExp("^"+e+"$")},_extractParameters:function(e,t){var n=e.exec(t).slice(1);return u.map(n,function(e){return e?decodeURIComponent(e):null})}});var O=o.History=function(){this.handlers=[],u.bindAll(this,"checkUrl"),typeof window!="undefined"&&(this.location=window.location,this.history=window.history)},M=/^[#\/]|\s+$/g,_=/^\/+|\/+$/g,D=/msie [\w.]+/,P=/\/$/;O.started=!1,u.extend(O.prototype,a,{interval:50,getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(e==null)if(this._hasPushState||!this._wantsHashChange||t){e=this.location.pathname;var n=this.root.replace(P,"");e.indexOf(n)||(e=e.substr(n.length))}else e=this.getHash();return e.replace(M,"")},start:function(e){if(O.started)throw new Error("Backbone.history has already been started");O.started=!0,this.options=u.extend({},{root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var t=this.getFragment(),n=document.documentMode,r=D.exec(navigator.userAgent.toLowerCase())&&(!n||n<=7);this.root=("/"+this.root+"/").replace(_,"/"),r&&this._wantsHashChange&&(this.iframe=o.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(t)),this._hasPushState?o.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!r?o.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=t;var i=this.location,s=i.pathname.replace(/[^\/]$/,"$&/")===this.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!s)return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0;this._wantsPushState&&this._hasPushState&&s&&i.hash&&(this.fragment=this.getHash().replace(M,""),this.history.replaceState({},document.title,this.root+this.fragment+i.search));if(!this.options.silent)return this.loadUrl()},stop:function(){o.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),O.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe)));if(t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(e){var t=this.fragment=this.getFragment(e),n=u.any(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0});return n},navigate:function(e,t){if(!O.started)return!1;if(!t||t===!0)t={trigger:t};e=this.getFragment(e||"");if(this.fragment===e)return;this.fragment=e;var n=this.root+e;if(this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}t.trigger&&this.loadUrl(e)},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),o.history=new O;var H=function(e,t){var n=this,r;e&&u.has(e,"constructor")?r=e.constructor:r=function(){return n.apply(this,arguments)},u.extend(r,n,t);var i=function(){this.constructor=r};return i.prototype=n.prototype,r.prototype=new i,e&&u.extend(r.prototype,e),r.__super__=n.prototype,r};p.extend=m.extend=N.extend=E.extend=O.extend=H;var B=function(){throw new Error('A "url" property or function must be specified')},j=function(e,t){var n=t.error;t.error=function(r){n&&n(e,r,t),e.trigger("error",e,r,t)}}}.call(this),function(e,t,n){function f(e,t,n){var r=[];for(var i=0;i<e.length;i++){var s=tinycolor(e[i]),u=s.toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light";u+=tinycolor.equals(t,e[i])?" sp-thumb-active":"";var a=o?"background-color:"+s.toRgbString():"filter:"+s.toFilter();r.push('<span title="'+s.toRgbString()+'" data-color="'+s.toRgbString()+'" class="'+u+'"><span class="sp-thumb-inner" style="'+a+';" /></span>')}return"<div class='sp-cf "+n+"'>"+r.join("")+"</div>"}function l(){for(var e=0;e<i.length;e++)i[e]&&i[e].hide()}function c(e,n){var i=t.extend({},r,e);return i.callbacks={move:m(i.move,n),change:m(i.change,n),show:m(i.show,n),hide:m(i.hide,n),beforeShow:m(i.beforeShow,n)},i}function h(r,h){function mt(){V.toggleClass("sp-flat",m),V.toggleClass("sp-input-disabled",!d.showInput),V.toggleClass("sp-alpha-enabled",d.showAlpha),V.toggleClass("sp-buttons-disabled",!d.showButtons||m),V.toggleClass("sp-palette-disabled",!d.showPalette),V.toggleClass("sp-palette-only",d.showPaletteOnly),V.toggleClass("sp-initial-disabled",!d.showInitial),V.addClass(d.className),Bt()}function gt(){function o(e){return e.data&&e.data.ignore?(At(t(this).data("color")),_t()):(At(t(this).data("color")),Ht(!0),_t(),kt()),!1}s&&V.find("*:not(input)").attr("unselectable","on"),mt(),ut&&W.after(at).hide();if(m)W.after(V).hide();else{var n=d.appendTo==="parent"?W.parent():t(d.appendTo);n.length!==1&&(n=t("body")),n.append(V)}if(w&&e.localStorage){try{var r=e.localStorage[w].split(",#");r.length>1&&(delete e.localStorage[w],t.each(r,function(e,t){yt(t)}))}catch(i){}try{I=e.localStorage[w].split(";")}catch(i){}}ft.bind("click.spectrum touchstart.spectrum",function(e){X||Nt(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()}),(W.is(":disabled")||d.disabled===!0)&&qt(),V.click(v),tt.change(Tt),tt.bind("paste",function(){setTimeout(Tt,1)}),tt.keydown(function(e){e.keyCode==13&&Tt()}),it.text(d.cancelText),it.bind("click.spectrum",function(e){e.stopPropagation(),e.preventDefault(),kt("cancel")}),st.text(d.chooseText),st.bind("click.spectrum",function(e){e.stopPropagation(),e.preventDefault(),Mt()&&(Ht(!0),kt())}),g(Z,function(e,t,n){B=e/O,n.shiftKey&&(B=Math.round(B*10)/10),_t()}),g(Q,function(e,t){D=parseFloat(t/L),_t()},St,xt),g(J,function(e,t){P=parseFloat(e/N),H=parseFloat((C-t)/C),_t()},St,xt),ct?(At(ct),Dt(),dt=pt||tinycolor(ct).format,yt(ct)):Dt(),m&&Ct();var u=s?"mousedown.spectrum":"click.spectrum touchstart.spectrum";nt.delegate(".sp-thumb-el",u,o),rt.delegate(".sp-thumb-el:nth-child(1)",u,{ignore:!0},o)}function yt(n){if(b){var r=tinycolor(n).toRgbString();if(t.inArray(r,I)===-1){I.push(r);while(I.length>q)I.shift()}if(w&&e.localStorage)try{e.localStorage[w]=I.join(";")}catch(i){}}}function bt(){var e=[],t=I,n={},r;if(d.showPalette){for(var i=0;i<F.length;i++)for(var s=0;s<F[i].length;s++)r=tinycolor(F[i][s]).toRgbString(),n[r]=!0;for(i=0;i<t.length;i++)r=tinycolor(t[i]).toRgbString(),n.hasOwnProperty(r)||(e.push(t[i]),n[r]=!0)}return e.reverse().slice(0,d.maxSelectionSize)}function wt(){var e=Ot(),n=t.map(F,function(t,n){return f(t,e,"sp-palette-row sp-palette-row-"+n)});I&&n.push(f(bt(),e,"sp-palette-row sp-palette-row-selection")),nt.html(n.join(""))}function Et(){if(d.showInitial){var e=ht,t=Ot();rt.html(f([e,t],t,"sp-palette-row-initial"))}}function St(){(C<=0||N<=0||L<=0)&&Bt(),V.addClass(R)}function xt(){V.removeClass(R)}function Tt(){var e=tinycolor(tt.val());e.ok?At(e):tt.addClass("sp-validation-error")}function Nt(){T?kt():Ct()}function Ct(){var n=t.Event("beforeShow.spectrum");if(T){Bt();return}W.trigger(n,[Ot()]);if(S.beforeShow(Ot())===!1||n.isDefaultPrevented())return;l(),T=!0,t(U).bind("click.spectrum",kt),t(e).bind("resize.spectrum",x),at.addClass("sp-active"),V.removeClass("sp-hidden"),d.showPalette&&wt(),Bt(),Dt(),ht=Ot(),Et(),S.show(ht),W.trigger("show.spectrum",[ht])}function kt(n){if(n&&n.type=="click"&&n.button==2)return;if(!T||m)return;T=!1,t(U).unbind("click.spectrum",kt),t(e).unbind("resize.spectrum",x),at.removeClass("sp-active"),V.addClass("sp-hidden");var r=!tinycolor.equals(Ot(),ht);r&&(vt&&n!=="cancel"?Ht(!0):Lt()),S.hide(Ot()),W.trigger("hide.spectrum",[Ot()])}function Lt(){At(ht,!0)}function At(e,t){if(tinycolor.equals(e,Ot()))return;var n=tinycolor(e),r=n.toHsv();D=r.h,P=r.s,H=r.v,B=r.a,Dt(),n.ok&&!t&&(dt=pt||n.format)}function Ot(e){return e=e||{},tinycolor.fromRatio({h:D,s:P,v:H,a:Math.round(B*100)/100},{format:e.format||dt})}function Mt(){return!tt.hasClass("sp-validation-error")}function _t(){Dt(),S.move(Ot()),W.trigger("move.spectrum",[Ot()])}function Dt(){tt.removeClass("sp-validation-error"),Pt();var e=tinycolor.fromRatio({h:D,s:1,v:1});J.css("background-color",e.toHexString());var t=dt;B<1&&(t==="hex"||t==="hex3"||t==="hex6"||t==="name")&&(t="rgb");var n=Ot({format:t}),r=n.toHexString(),i=n.toRgbString();o||n.alpha===1?lt.css("background-color",i):(lt.css("background-color","transparent"),lt.css("filter",n.toFilter()));if(d.showAlpha){var u=n.toRgb();u.a=0;var a=tinycolor(u).toRgbString(),f="linear-gradient(left, "+a+", "+r+")";s?Y.css("filter",tinycolor(a).toFilter({gradientType:1},r)):(Y.css("background","-webkit-"+f),Y.css("background","-moz-"+f),Y.css("background","-ms-"+f),Y.css("background",f))}d.showInput&&tt.val(n.toString(t)),d.showPalette&&wt(),Et()}function Pt(){var e=P,t=H,n=e*N,r=C-t*C;n=Math.max(-k,Math.min(N-k,n-k)),r=Math.max(-k,Math.min(C-k,r-k)),K.css({top:r,left:n});var i=B*O;et.css({left:i-M/2});var s=D*L;G.css({top:s-_})}function Ht(e){var t=Ot();ot&&W.val(t.toString(dt)).change();var n=!tinycolor.equals(t,ht);ht=t,yt(t),e&&n&&(S.change(t),W.trigger("change.spectrum",[t]))}function Bt(){N=J.width(),C=J.height(),k=K.height(),A=Q.width(),L=Q.height(),_=G.height(),O=Z.width(),M=et.width(),m||(V.css("position","absolute"),V.offset(p(V,ft))),Pt()}function jt(){W.show(),ft.unbind("click.spectrum touchstart.spectrum"),V.remove(),at.remove(),i[Rt.id]=null}function Ft(e,r){if(e===n)return t.extend({},d);if(r===n)return d[e];d[e]=r,mt()}function It(){X=!1,W.attr("disabled",!1),ft.removeClass("sp-disabled")}function qt(){kt(),X=!0,W.attr("disabled",!0),ft.addClass +("sp-disabled")}var d=c(h,r),m=d.flat,b=d.showSelectionPalette,w=d.localStorageKey,E=d.theme,S=d.callbacks,x=y(Bt,10),T=!1,N=0,C=0,k=0,L=0,A=0,O=0,M=0,_=0,D=0,P=0,H=0,B=1,j=d.palette.slice(0),F=t.isArray(j[0])?j:[j],I=d.selectionPalette.slice(0),q=d.maxSelectionSize,R="sp-dragging",U=r.ownerDocument,z=U.body,W=t(r),X=!1,V=t(a,U).addClass(E),J=V.find(".sp-color"),K=V.find(".sp-dragger"),Q=V.find(".sp-hue"),G=V.find(".sp-slider"),Y=V.find(".sp-alpha-inner"),Z=V.find(".sp-alpha"),et=V.find(".sp-alpha-handle"),tt=V.find(".sp-input"),nt=V.find(".sp-palette"),rt=V.find(".sp-initial"),it=V.find(".sp-cancel"),st=V.find(".sp-choose"),ot=W.is("input"),ut=ot&&!m,at=ut?t(u).addClass(E).addClass(d.className):t([]),ft=ut?at:W,lt=at.find(".sp-preview-inner"),ct=d.color||ot&&W.val(),ht=!1,pt=d.preferredFormat,dt=pt,vt=!d.showButtons||d.clickoutFiresChange;gt();var Rt={show:Ct,hide:kt,toggle:Nt,reflow:Bt,option:Ft,enable:It,disable:qt,set:function(e){At(e),Ht()},get:Ot,destroy:jt,container:V};return Rt.id=i.push(Rt)-1,Rt}function p(e,n){var r=0,i=e.outerWidth(),s=e.outerHeight(),o=n.outerHeight(),u=e[0].ownerDocument,a=u.documentElement,f=a.clientWidth+t(u).scrollLeft(),l=a.clientHeight+t(u).scrollTop(),c=n.offset();return c.top+=o,c.left-=Math.min(c.left,c.left+i>f&&f>i?Math.abs(c.left+i-f):0),c.top-=Math.min(c.top,c.top+s>l&&l>s?Math.abs(s+o-r):r),c}function d(){}function v(e){e.stopPropagation()}function m(e,t){var n=Array.prototype.slice,r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}function g(n,r,i,o){function d(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.returnValue=!1}function v(e){if(a){if(s&&document.documentMode<9&&!e.button)return g();var t=e.originalEvent.touches,i=t?t[0].pageX:e.pageX,o=t?t[0].pageY:e.pageY,u=Math.max(0,Math.min(i-f.left,c)),p=Math.max(0,Math.min(o-f.top,l));h&&d(e),r.apply(n,[u,p,e])}}function m(e){var r=e.which?e.which==3:e.button==2,s=e.originalEvent.touches;!r&&!a&&i.apply(n,arguments)!==!1&&(a=!0,l=t(n).height(),c=t(n).width(),f=t(n).offset(),t(u).bind(p),t(u.body).addClass("sp-dragging"),h||v(e),d(e))}function g(){a&&(t(u).unbind(p),t(u.body).removeClass("sp-dragging"),o.apply(n,arguments)),a=!1}r=r||function(){},i=i||function(){},o=o||function(){};var u=n.ownerDocument||document,a=!1,f={},l=0,c=0,h="ontouchstart"in e,p={};p.selectstart=d,p.dragstart=d,p[h?"touchmove":"mousemove"]=v,p[h?"touchend":"mouseup"]=g,t(n).bind(h?"touchstart":"mousedown",m)}function y(e,t,n){var r;return function(){var i=this,s=arguments,o=function(){r=null,e.apply(i,s)};n&&clearTimeout(r);if(n||!r)r=setTimeout(o,t)}}function w(){e.console&&(w=Function.prototype.bind?Function.prototype.bind.call(console.log,console):function(){Function.prototype.apply.call(console.log,console,arguments)},w.apply(this,arguments))}var r={beforeShow:d,move:d,change:d,show:d,hide:d,color:!1,flat:!1,showInput:!1,showButtons:!0,clickoutFiresChange:!1,showInitial:!1,showPalette:!1,showPaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",preferredFormat:!1,className:"",showAlpha:!1,theme:"sp-light",palette:["fff","000"],selectionPalette:[],disabled:!1},i=[],s=!!/msie/i.exec(e.navigator.userAgent),o=function(){function e(e,t){return!!~(""+e).indexOf(t)}var t=document.createElement("div"),n=t.style;return n.cssText="background-color:rgba(0,0,0,.5)",e(n.backgroundColor,"rgba")||e(n.backgroundColor,"hsla")}(),u=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>▼</div>","</div>"].join(""),a=function(){var e="";if(s)for(var t=1;t<=6;t++)e+="<div class='sp-"+t+"'></div>";return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","</div>","<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>","</div>","</div>","</div>","<div class='sp-hue'>","<div class='sp-slider'></div>",e,"</div>","</div>","<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>","</div>","<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false' />","</div>","<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<a class='sp-cancel' href='#'></a>","<button class='sp-choose'></button>","</div>","</div>","</div>"].join("")}(),b="spectrum.id";t.fn.spectrum=function(e,n){if(typeof e=="string"){var r=this,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=i[t(this).data(b)];if(n){var o=n[e];if(!o)throw new Error("Spectrum: no such method: '"+e+"'");e=="get"?r=n.get():e=="container"?r=n.container:e=="option"?r=n.option.apply(n,s):e=="destroy"?(n.destroy(),t(this).removeData(b)):o.apply(n,s)}}),r}return this.spectrum("destroy").each(function(){var n=h(this,e);t(this).data(b,n.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=g,t.fn.spectrum.defaults=r,t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("<input type='color' value='!' />")[0],n=e.type==="color"&&e.value!="!";n||t("input[type=color]").spectrum({preferredFormat:"hex6"})},function(e){function f(e,t){e=e?e:"",t=t||{};if(typeof e=="object"&&e.hasOwnProperty("_tc_id"))return e;var n=l(e),i=n.r,o=n.g,u=n.b,a=n.a,c=s(100*a)/100,p=t.format||n.format;return i<1&&(i=s(i)),o<1&&(o=s(o)),u<1&&(u=s(u)),{ok:n.ok,format:p,_tc_id:r++,alpha:a,toHsv:function(){var e=d(i,o,u);return{h:e.h*360,s:e.s,v:e.v,a:a}},toHsvString:function(){var e=d(i,o,u),t=s(e.h*360),n=s(e.s*100),r=s(e.v*100);return a==1?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+c+")"},toHsl:function(){var e=h(i,o,u);return{h:e.h*360,s:e.s,l:e.l,a:a}},toHslString:function(){var e=h(i,o,u),t=s(e.h*360),n=s(e.s*100),r=s(e.l*100);return a==1?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+c+")"},toHex:function(e){return m(i,o,u,e)},toHexString:function(e){return"#"+m(i,o,u,e)},toRgb:function(){return{r:s(i),g:s(o),b:s(u),a:a}},toRgbString:function(){return a==1?"rgb("+s(i)+", "+s(o)+", "+s(u)+")":"rgba("+s(i)+", "+s(o)+", "+s(u)+", "+c+")"},toPercentageRgb:function(){return{r:s(w(i,255)*100)+"%",g:s(w(o,255)*100)+"%",b:s(w(u,255)*100)+"%",a:a}},toPercentageRgbString:function(){return a==1?"rgb("+s(w(i,255)*100)+"%, "+s(w(o,255)*100)+"%, "+s(w(u,255)*100)+"%)":"rgba("+s(w(i,255)*100)+"%, "+s(w(o,255)*100)+"%, "+s(w(u,255)*100)+"%, "+c+")"},toName:function(){return y[m(i,o,u,!0)]||!1},toFilter:function(e){var n=m(i,o,u),r=n,s=Math.round(parseFloat(a)*255).toString(16),l=s,c=t&&t.gradientType?"GradientType = 1, ":"";if(e){var h=f(e);r=h.toHex(),l=Math.round(parseFloat(h.alpha)*255).toString(16)}return"progid:DXImageTransform.Microsoft.gradient("+c+"startColorstr=#"+N(s)+n+",endColorstr=#"+N(l)+r+")"},toString:function(e){e=e||this.format;var t=!1;e==="rgb"&&(t=this.toRgbString()),e==="prgb"&&(t=this.toPercentageRgbString());if(e==="hex"||e==="hex6")t=this.toHexString();return e==="hex3"&&(t=this.toHexString(!0)),e==="name"&&(t=this.toName()),e==="hsl"&&(t=this.toHslString()),e==="hsv"&&(t=this.toHsvString()),t||this.toHexString()}}}function l(e){var t={r:0,g:0,b:0},n=1,r=!1,i=!1;typeof e=="string"&&(e=L(e)),typeof e=="object"&&(e.hasOwnProperty("r")&&e.hasOwnProperty("g")&&e.hasOwnProperty("b")?(t=c(e.r,e.g,e.b),r=!0,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):e.hasOwnProperty("h")&&e.hasOwnProperty("s")&&e.hasOwnProperty("v")?(e.s=C(e.s),e.v=C(e.v),t=v(e.h,e.s,e.v),r=!0,i="hsv"):e.hasOwnProperty("h")&&e.hasOwnProperty("s")&&e.hasOwnProperty("l")&&(e.s=C(e.s),e.l=C(e.l),t=p(e.h,e.s,e.l),r=!0,i="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=parseFloat(n);if(isNaN(n)||n<0||n>1)n=1;return{ok:r,format:e.format||i,r:o(255,u(t.r,0)),g:o(255,u(t.g,0)),b:o(255,u(t.b,0)),a:n}}function c(e,t,n){return{r:w(e,255)*255,g:w(t,255)*255,b:w(n,255)*255}}function h(e,t,n){e=w(e,255),t=w(t,255),n=w(n,255);var r=u(e,t,n),i=o(e,t,n),s,a,f=(r+i)/2;if(r==i)s=a=0;else{var l=r-i;a=f>.5?l/(2-r-i):l/(r+i);switch(r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4}s/=6}return{h:s,s:a,l:f}}function p(e,t,n){function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var r,i,s;e=w(e,360),t=w(t,100),n=w(n,100);if(t===0)r=i=s=n;else{var u=n<.5?n*(1+t):n+t-n*t,a=2*n-u;r=o(a,u,e+1/3),i=o(a,u,e),s=o(a,u,e-1/3)}return{r:r*255,g:i*255,b:s*255}}function d(e,t,n){e=w(e,255),t=w(t,255),n=w(n,255);var r=u(e,t,n),i=o(e,t,n),s,a,f=r,l=r-i;a=r===0?0:l/r;if(r==i)s=0;else{switch(r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4}s/=6}return{h:s,s:a,v:f}}function v(e,t,n){e=w(e,360)*6,t=w(t,100),n=w(n,100);var r=i.floor(e),s=e-r,o=n*(1-t),u=n*(1-s*t),a=n*(1-(1-s)*t),f=r%6,l=[n,u,o,o,a,n][f],c=[a,n,n,u,o,o][f],h=[o,o,a,n,n,u][f];return{r:l*255,g:c*255,b:h*255}}function m(e,t,n,r){var i=[N(s(e).toString(16)),N(s(t).toString(16)),N(s(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function b(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function w(e,t){x(e)&&(e="100%");var n=T(e);return e=o(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function E(e){return o(1,u(0,e))}function S(e){return parseInt(e,16)}function x(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function T(e){return typeof e=="string"&&e.indexOf("%")!=-1}function N(e){return e.length==1?"0"+e:""+e}function C(e){return e<=1&&(e=e*100+"%"),e}function L(e){e=e.replace(t,"").replace(n,"").toLowerCase();var r=!1;if(g[e])e=g[e],r=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0};var i;return(i=k.rgb.exec(e))?{r:i[1],g:i[2],b:i[3]}:(i=k.rgba.exec(e))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=k.hsl.exec(e))?{h:i[1],s:i[2],l:i[3]}:(i=k.hsla.exec(e))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=k.hsv.exec(e))?{h:i[1],s:i[2],v:i[3]}:(i=k.hex6.exec(e))?{r:S(i[1]),g:S(i[2]),b:S(i[3]),format:r?"name":"hex"}:(i=k.hex3.exec(e))?{r:S(i[1]+""+i[1]),g:S(i[2]+""+i[2]),b:S(i[3]+""+i[3]),format:r?"name":"hex"}:!1}var t=/^[\s,#]+/,n=/\s+$/,r=0,i=Math,s=i.round,o=i.min,u=i.max,a=i.random;f.fromRatio=function(e,t){if(typeof e=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=C(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!e||!t?!1:f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:a(),g:a(),b:a()})},f.desaturate=function(e,t){var n=f(e).toHsl();return n.s-=(t||10)/100,n.s=E(n.s),f(n)},f.saturate=function(e,t){var n=f(e).toHsl();return n.s+=(t||10)/100,n.s=E(n.s),f(n)},f.greyscale=function(e){return f.desaturate(e,100)},f.lighten=function(e,t){var n=f(e).toHsl();return n.l+=(t||10)/100,n.l=E(n.l),f(n)},f.darken=function(e,t){var n=f(e).toHsl();return n.l-=(t||10)/100,n.l=E(n.l),f(n)},f.complement=function(e){var t=f(e).toHsl();return t.h=(t.h+180)%360,f(t)},f.triad=function(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+120)%360,s:t.s,l:t.l}),f({h:(n+240)%360,s:t.s,l:t.l})]},f.tetrad=function(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+90)%360,s:t.s,l:t.l}),f({h:(n+180)%360,s:t.s,l:t.l}),f({h:(n+270)%360,s:t.s,l:t.l})]},f.splitcomplement=function(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+72)%360,s:t.s,l:t.l}),f({h:(n+216)%360,s:t.s,l:t.l})]},f.analogous=function(e,t,n){t=t||6,n=n||30;var r=f(e).toHsl(),i=360/n,s=[f(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,s.push(f(r));return s},f.monochromatic=function(e,t){t=t||6;var n=f(e).toHsv(),r=n.h,i=n.s,s=n.v,o=[],u=1/t;while(t--)o.push(f({h:r,s:i,v:s})),s=(s+u)%1;return o},f.readability=function(e,t){var n=f(e).toRgb(),r=f(t).toRgb(),i=(n.r*299+n.g*587+n.b*114)/1e3,s=(r.r*299+r.g*587+r.b*114)/1e3,o=Math.max(n.r,r.r)-Math.min(n.r,r.r)+Math.max(n.g,r.g)-Math.min(n.g,r.g)+Math.max(n.b,r.b)-Math.min(n.b,r.b);return{brightness:Math.abs(i-s),color:o}},f.readable=function(e,t){var n=f.readability(e,t);return n.brightness>125&&n.color>500},f.mostReadable=function(e,t){var n=null,r=0,i=!1;for(var s=0;s<t.length;s++){var o=f.readability(e,t[s]),u=o.brightness>125&&o.color>500,a=3*(o.brightness/125)+o.color/500;if(u&&!i||u&&i&&a>r||!u&&!i&&a>r)i=u,r=a,n=f(t[s])}return n};var g=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},y=f.hexNames=b(g),k=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();e.tinycolor=f}(this),t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(window,jQuery),function(){function yt(t,n){if(e._N1!==J&&t==Q)return;if(t==Q)return n();if(e._N1===J)t(n());else var r=window.setInterval(function(){e._N1===J&&(window.clearInterval(r),t(n()))},at)}function bt(t){function n(){function i(t){s(e._U1[t],function(n){e._U1[t]=n,t+1<e._U1.length?i(t+1):u()})}function s(e,t){e.href==Q?t(e):xt(e.href,function(n){if(n.message!=Q){e.message=n.message,e.stylenode=Q;if(e.message==o||/^[1-9]{1,3}/.test(e.message))e.media=O}else e.text=Nt(n.text,K);t(e)})}function u(){function t(n){function r(r){n+1<e._U1.length?t(n+r):c()}if(e._U1[n].D6==J)r(1);else{var i=Tt(e._U1[n].text);e._U1[n].D6=J,e._U1[n].ssid=e.Y4++;if(i.length>0){function s(t){l(n,t,i[t],function(t,o,u){e._U1.splice(n+u,0,t),u+1<i.length?s(u+1):r(0)})}s(0)}else r(1)}}t(0)}function l(t,n,r,i){function l(e){if(e.message!=Q){s.message=e.message,s.stylenode=Q;if(s.message==o||/^[1-9]{1,3}.*$/.test(s.message))s.media=O}else s.text=Nt(e.text,K);i(s,t,n)}var s={D6:K,owner:"@import",media:L,stylenode:e._U1[t].stylenode,href:r.href,text:""};s.media=r.media;var u=t,a=e._U1[u];while(a.href==s.href)a=e._U1[u--];I2=a.media,s.xmedia=r.V5?r.media:L,s.media=qt(I2,s.media),Zt(e._U1,r.href,"href")!=Q?l({text:"",message:f}):xt(r.href,l)}function c(){for(var n=0;n<e._U1.length;n++){if(e._U1[n].href){var r=Zt(e._T1,e._U1[n].href,"href");if(r!=Q&&r.message!=f){e._T1.push({ssid:e._U1[n].ssid,href:e._U1[n].href,owner:e._U1[n].owner,media:e._U1[n].media,xmedia:e._U1[n].xmedia,stylenode:Q,rules:0,message:f}),e._U1[n].stylenode&&(e._U1[n].stylenode.disabled=J);continue}}if(typeof e._U1[n].message!=z){e._T1.push({ssid:e._U1[n].ssid,href:e._U1[n].href,owner:e._U1[n].owner,media:e._U1[n].media,xmedia:e._U1[n].xmedia,stylenode:e._U1[n].stylenode,rules:0,message:e._U1[n].message});continue}var i=Ct(e._U1[n]);e._T1.push({ssid:e._U1[n].ssid,href:e._U1[n].href,owner:e._U1[n].owner,media:e._U1[n].media,xmedia:e._U1[n].xmedia,stylenode:e._U1[n].stylenode,rules:i,message:a})}e._U1=Q,delete e._U1,e._T1.sort(function(e,t){return e.ssid-t.ssid}),e.Y4=Q,delete e.Y4,pt===J&&zt(),typeof t==V&&t()}var n=Et();for(var r=0;r<n.length;r++)St(n[r],n[r].nodeType==7?n[r].target.toLowerCase():n[r].nodeName.toLowerCase());e._U1.length==0?c():i(0)}e._U1=[],ot&&Xt("style").length>0?wt(n):n()}function wt(e){sn(lt,ht,function(t){var n=Xt("style"),r=t.split(/<([^:]+:)?style[^>]*>/i);r.splice(0,1);for(var i=0;i<r.length;i++)n[i].__css=r[i].split(/<\/([^:]+:)?style>/i)[0];delete r,e()},function(){e()})}function Et(){var e=[],t=ct.childNodes;for(var n=0;n<t.length;n++)t[n].nodeType==7&&t[n].target.toLowerCase()=="xml-stylesheet"&&e.push(t[n]);var r=Xt("*");for(var n=0;n<r.length;n++)(/link/i.test(r[n].nodeName)&&/stylesheet/i.test(r[n].getAttribute("rel"))||/style/i.test(r[n].nodeName))&&e.push(r[n]);return e}function St(t,n){var i={D6:K,owner:n,media:L,stylenode:t,href:Q,text:""};if(/xml\-stylesheet/.test(n)){var s={},o=t.data.match(/([a-z]+=[\'\"][^\'\"]*[\'\"])/gm);for(var u=0;u<o.length;u++)o[u]=o[u].split("="),s[o[u][0]]=o[u][1].substr(1,o[u][1].length-2)}if((nt||it||st)&&!/xml\-stylesheet/.test(n))var a=t.disabled;else var f=t[typeof t.styleSheet!=z?"styleSheet":"sheet"],a=f==Q?J:f.disabled;if(ut&&a&&t.sheet.media.length>0){var c=t.sheet.media.mediaText;t.sheet.media.mediaText=e._Y6,a=t.sheet.disabled,t.sheet.media.mediaText=c}pt!==Q&&a&&(i.message=l);if(/xml\-stylesheet/.test(n))i.href=rn(s.href,ht);else if(/link/i.test(n))i.href=rn(t.getAttribute("href",2),ht);else if(!a||pt===Q)if(ot)typeof t.__css==z?i.message=r:i.text+=Nt(t.__css,K);else{for(var o="",h=t.childNodes,u=0;u<h.length;u++)switch(h[u].nodeType){case 3:o+=h[u].nodeValue;break;case 4:o+="<![CDATA["+h[u].nodeValue+"]]>";break;case 8:o+="<!--"+h[u].nodeValue+"-->"}i.text+=Nt(o,K)}/xml\-stylesheet/.test(n)?i.media=typeof s.media!=z?s.media:L:i.media=t.getAttribute("media")?t.getAttribute("media"):L,i.media=i.media.split(/,\s*/).join(", "),i.xmedia=i.media,e._U1.push(i)}function xt(e,t){var n={text:"",message:Q};sn(lt,e,function(e,r){if(typeof r==X&&Yt(r)!=""&&!/^(text\/css)/.test(r)){if(/^(text\/html)/.test(r)){var i=e.match(/<title>([1-9]{1,3}[^<]+)<\/title>/i);i&&i.length>=2&&(n.message=i[1])}n.message==Q&&(n.message=o)}else n.text=e;t(n)},function(e){n.message=e,t(n)})}function Tt(e){var t=[],n=/@import\s*(?:url\s*\(\s*[\'\"]?|[\'\"])([^\'\"\)]+)(?:[\'\"]|[\'\"]?\s*\))([^;]*)(;|$)/ig,r=e.match(n);if(r)for(var i=0;i<r.length;i++){var s=rn(r[i].replace(n,"$1"),ht),o=Yt(Yt(r[i].replace(n,"$2")).replace(/^\)/,"")),u=J;o||(u=K,o=L),t.push({href:s,media:o,V5:u})}return t}function Nt(t,n){t=t.replace(/(\/\*([^*]|(\*+([^*/])))*\*+\/)/gm,""),e._N5||(t=t.replace(/(<\!\[CDATA\[([^\]]|(\]+([^>])))*\]+>)/gm,"")),e._N5&&!(nt||it||st)&&(t=t.replace(/(<\!\-\-([^\-]|(\-+([^>])))*\-+>)/gm,"")),t=t.replace(/[\t]+/g," ").replace(/[ ][ ]/g," "),t=t.replace(/[\r\n]/g,""),t=t.replace(/@(charset|namespace)[^;]+;/igm,"");if(typeof n!=z&&n==J)t=t.replace(/@import[^;]+;/igm,"");else if(/@import[^;]+;/i.test(t)){var r=t.replace(/(@import[^;]+;)/igm,"{SPLIT}$1{SPLIT}").split("{SPLIT}");for(var t="",i=Q,s=0;s<r.length;s++){if(Yt(r[s])=="")continue;/@import[^;]+;/i.test(r[s])?(i===Q&&(i=K),i===K&&(t+=r[s])):(i=J,t+=r[s])}}return t=t.replace(/@(font\-face|page)[^\}]+\}/igm,""),t=t.replace(/(<\!\-\-)|(\-\->)|(<\!\[CDATA\[)|(\]\]>)/gm,""),Yt(t)}function Ct(t){var n=t.text.match(/(content:[^;]+;)/igm);if(n)for(var r=0;r<n.length;r++)t.text=t.text.replace(n[r],"[G"+r+"]");t.text=Yt(Nt(t.text,J)).split("}");for(var i=0;i<t.text.length;i++){t.text[i]=Yt(t.text[i]).split("{");for(var s=0;s<t.text[i].length;s++)t.text[i][s]=Yt(t.text[i][s])}if(n)for(var r=0;r<n.length;r++)for(var i=0;i<t.text.length;i++)for(var s=0;s<t.text[i].length;s++)t.text[i][s]=t.text[i][s].replace("[G"+r+"]",n[r]);var o=0,u=t.media,a=t.xmedia,f=t.owner;for(var i=0;i<t.text.length;i++)if(t.text[i].length==2)e._S1.push({selector:t.text[i][0],css:t.text[i][1],media:u,xmedia:a,owner:f.toLowerCase(),href:t.href,ssid:t.ssid}),o++;else if(t.text[i].length==3){u=Yt(t.text[i][0].replace("@media","")).toLowerCase(),f="@media",a=u;var l=t.media;l==""&&(l=L),u=qt(l,u),e._S1.push({selector:t.text[i][1],css:t.text[i][2],media:u,xmedia:a,owner:f,href:t.href,ssid:t.ssid}),o++}else t.text[i].length==1&&(u=t.media,a=t.xmedia,f=t.owner);return o}function kt(t){var n=en(ct.styleSheets);for(var r=0;r<n.length;r++){n[r].__ssid=e.Y4++;if(typeof n[r].ownerNode!=z)if(rt&&/xml\-stylesheet/.test(n[r].ownerNode.nodeName))e._T1.push({ssid:n[r].__ssid,href:rn(n[r].href,ht),owner:"xml-stylesheet",media:u,stylesheet:Q,rules:0,message:c}),n.splice(r,1),r--;else try{Lt(n[r],n[r].ownerNode.nodeName.toLowerCase(),n[r].media.length>0?Yt(n[r].media.mediaText):L)}catch(i){e._T1.push({ssid:n[r].__ssid,href:u,owner:u,media:u,stylesheet:Q,rules:0,message:s}),n.splice(r,1),r--}else typeof n[r].owningElement!=z&&Ot(n[r],n[r].owningElement.nodeName.toLowerCase(),Yt(n[r].media)!=""?Yt(n[r].media):L)}e._T1.sort(function(e,t){return e.ssid-t.ssid}),e.Y4=Q,delete e.Y4,pt==J&&zt(),typeof t==V&&t()}function Lt(t,n,r){if(t.href&&t.href!=ht){var s=rn(t.href,ht);if(Zt(e._T1,s,"href")!=Q){e._T1.push({ssid:t.__ssid,href:s,owner:n,media:r,stylesheet:Q,rules:0,message:f}),t.disabled=J;return}}try{var o=t.disabled;if(ut&&o&&t.media.length>0){var u=t.media.mediaText;t.media.mediaText=e._Y6,o=t.disabled,t.media.mediaText=u}if(!o){for(var c=t.cssRules,h=0,p=0;p<c.length;p++)if(c.item(p).type==1)h++;else if(c.item(p).type==4)for(var d=c.item(p).cssRules,v=0;v<d.length;v++)d.item(v).type==1&&h++;var m=a}else h=0,m=l;e._T1.push({ssid:t.__ssid,href:t.href&&t.href!=ht?rn(t.href,ht):Q,owner:n,media:r,stylesheet:t,rules:h,message:m}),o||At(t,t.cssRules,n,r)}catch(g){e._T1.push({ssid:t.__ssid,href:t.href&&t.href!=ht?rn(t.href,ht):Q,owner:n,media:r,stylesheet:Q,rules:0,message:i})}}function At(t,n,r,i){for(a=0;a<n.length;a++){f=n.item(a);if(f.type==3){i=f.media.mediaText;if(i=="")try{i=f.parentStyleSheet.media.mediaText}catch(s){i=f.parentStyleSheet.ownerRule.media.mediaText}i==""&&(i=L),i=i.toLowerCase();var o=f.parentStyleSheet;while(o){try{var u=o.media.mediaText}catch(s){u=o.ownerRule.media.mediaText}u==""&&(u=L),i=qt(u,i),(nt||it||st)&&!o.parentStyleSheet&&o.ownerRule?o=o.ownerRule.parentStyleSheet:o=o.parentStyleSheet}f.styleSheet.__ssid=e.Y4++,Lt(f.styleSheet,"@import",i)}}for(var a=0;a<n.length;a++){var f=n.item(a);if(f.type==1){/^(xml\-stylesheet|link|(([a-z]+:)?style))$/i.test(r)&&(i=f.parentStyleSheet.media.mediaText,i==""&&(i=L),i=i.toLowerCase());var l=f.style.cssText.replace(/[\r\n]/g," ");l=l.split(";");for(var c=0;c<l.length;c++){l[c]=l[c].split(":");while(l[c].length>2)l[c][1]+=":"+l[c].pop();if(l[c].length==1){l.splice(c,1),c--;continue}f.style.getPropertyPriority(Yt(l[c][0]))=="important"&&!R.test(l[c][1])&&(l[c][1]+=" !important"),l[c]=l[c].join(":")}l=l.join(";"),e._S1.push({selector:f.selectorText,css:l,media:i,owner:r,href:t.href==Q?Q:rn(t.href,ht),ssid:t.__ssid})}}for(a=0;a<n.length;a++){f=n.item(a);if(f.type==4){i=f.media.mediaText,i==""&&(i=f.parentStyleSheet.media.mediaText),i==""&&(i=L),i=i.toLowerCase();var o=f.parentStyleSheet;while(o){try{var u=o.media.mediaText}catch(s){u=o.ownerRule.media.mediaText}u==""&&(u=L),i=qt(u,i),(nt||it||st)&&!o.parentStyleSheet&&o.ownerRule?o=o.ownerRule.parentStyleSheet:o=o.parentStyleSheet}At(t,f.cssRules,"@media",i)}}}function Ot(t,n,r,s){if(t.href){var o=rn(t.href,ht);if(Zt(e._T1,o,"href")!=Q){e._T1.push({ssid:t.__ssid,href:o,owner:n,media:r,stylesheet:Q,rules:0,message:f}),t.disabled=J;return}}var u=[],c=t.disabled;if(!c)for(var h=0;h<t.imports.length;h++){if(t.imports[h].rules.length==0)continue;r=Yt(t.media),r==""&&(r=L);var p=rn(t.imports[h].href,ht);u.push({sheet:t.imports[h],owner:"@import",media:r,href:p})}if(u.length>0)for(var h=0;h<u.length;h++)u[h].sheet.__ssid=e.Y4++,Ot(u[h].sheet,u[h].owner,u[h].media,u[h].href);try{if(!c){var d=t.cssText;d=d.replace(/@(import|charset|namespace)[^;]+;/igm,""),d=d.replace(/@(font\-face|page)[^\}]+\}/igm,"");var v=d.match(/(content\s*:\s*[\'\"].*(;|$))/igm);if(v)for(var m=0;m<v.length;m++)d=d.replace(v[m],"[G"+m+"]");d=Yt(d).split("}");for(var h=0;h<d.length;h++){d[h]=Yt(d[h]).split("{");for(var g=0;g<d[h].length;g++)d[h][g]=Yt(d[h][g])}if(v)for(var m=0;m<v.length;m++)for(var h=0;h<d.length;h++)for(var g=0;g<d[h].length;g++)d[h][g]=d[h][g].replace("[G"+m+"]",v[m]);typeof s==z&&(s=t.href==Q||t.href==""?Q:rn(t.href,ht));var y=[],b=t.media;b==""&&(b=L);var w=n;for(var h=0;h<d.length;h++)if(d[h].length==2)y.push({selector:d[h][0],css:d[h][1],media:b,owner:w,href:s,ssid:t.__ssid});else if(d[h].length==3){b=Yt(d[h][0].replace("@media","")).toLowerCase(),w="@media";var E=t.media;E==""&&(E=L),b=qt(E,b),y.push({selector:d[h][1],css:d[h][2],media:b,owner:w,href:s,ssid:t.__ssid})}else d[h].length==1&&(b=t.media,b==""&&(b=L),w=n);var S=a}else S=l;if(!c)var x=Mt(y);e._T1.push({ssid:t.__ssid,href:t.href?rn(t.href,ht):Q,owner:n,media:r,stylesheet:t,rules:c?0:x,message:S})}catch(T){e._T1.push({ssid:t.__ssid,href:t.href?rn(t.href,ht):Q,owner:n,media:r,stylesheet:Q,rules:0,message:i})}}function Mt(t){var n=0;for(var r=0;r<t.length;r++){if(t[r].selector==""||t[r].selector=="UNKNOWN"||t[r].selector.indexOf(":unknown")!=-1)continue;e._S1.push({selector:Bt(t[r].selector),css:jt(t[r].css),media:t[r].media,owner:t[r].owner,href:t[r].href,ssid:t[r].ssid}),n++}return n}function _t(t,n,r,i,s,o,u){r=Qt(r);if(typeof s==z||s==Q)s=[];if(typeof o==z||o==Q)o=K;if(typeof u==z||u==Q){u=[t];if(dt==J&&t.getAttribute("style")){var a=Dt(t);a!=Q&&e._S1.push(a)}}else u.push(t);for(var f=0;f<e._S1.length;f++){if(!Rt(n,e._S1[f]))continue;if(e._S1[f].owner=="@style"&&t==u[0])var l=[t],c=K;else{if(i==J){for(var c=J,h=Wt(e._S1[f].selector),p=0;p<h.length;p++)if(h[p]==t){c=K;break}}else c=K;l=Wt(i==J?e._S1[f].selector.replace(j,""):e._S1[f].selector)}if(l.length>0)for(var p=0;p<l.length;p++)if(l[p]==t){var d=[];if(o)for(var v=u.length-1;v>0;v--)d.push(u[v]);var m={selector:e._S1[f].selector,css:e._S1[f].css,index:f,specificity:[0,0,0,0],inheritance:d,altstate:c};for(var g=["media","xmedia","owner","ssid","href"],y=0;y<g.length;y++)(r=="*"||typeof r[g[y]]!=z)&&typeof e._S1[f][g[y]]!=z&&(m[g[y]]=e._S1[f][g[y]]);s.push(m);break}}if(t.parentNode&&t.parentNode.nodeType==1)return _t(t.parentNode,n,r,i,s,J,u);if(s.length==0)return s;for(var f=0;f<s.length;f++){var b=s[f].selector.split(",");for(var w=[],p=0;p<b.length;p++)w.push(s[f].inheritance.length>0?[0,0,0,0]:Ht(b[p]));w.sort(function(e,t){return e[0]!==t[0]?t[0]-e[0]:e[1]!==t[1]?t[1]-e[1]:e[2]!==t[2]?t[2]-e[2]:t[3]-e[3]}),s[f].specificity=w[0]}s.sort(function(e,t){return e.specificity.toString()===t.specificity.toString()?e.index===t.index?t.inheritance.length-e.inheritance.length:e.index-t.index:e.specificity[0]!==t.specificity[0]?e.specificity[0]-t.specificity[0]:e.specificity[1]!==t.specificity[1]?e.specificity[1]-t.specificity[1]:e.specificity[2]!==t.specificity[2]?e.specificity[2]-t.specificity[2]:e.specificity[3]-t.specificity[3]});if(r==="*"||typeof r.properties!=z)s=Pt(s,J);if(r!=="*")for(var f=0;f<s.length;f++)for(var E=["selector","css","index","specificity","inheritance","altstate"],p=0;p<E.length;p++)typeof r[E[p]]==z&&(s[f][E[p]]=Q,delete s[f][E[p]]);return e._S1[e._S1.length-1].owner=="@style"&&e._S1.splice(e._S1.length-1,1),s}function Dt(e){if(ot)try{var t=e.outerHTML.split(">")[0].match(/.*style\s*=\s*\"([^\"]*)\".*/im),n=t?jt(t[1]):""}catch(r){n=""}else n=e.getAttribute("style");if(n=="")return Q;var i={selector:"",css:n,media:L,owner:"@style",href:Q,ssid:Infinity};return ft==Y&&(i.xmedia=i.media),i}function Pt(e,t){for(var n=0;n<e.length;n++){e[n].properties=It(e[n].css,{},typeof e[n].inheritance!=z&&e[n].inheritance.length>0),e[n].T6={};for(var r in e[n].properties)e[n].T6[r]={value:e[n].properties[r].property,status:Z};if(t)if(e[n].altstate==J)for(var i in e[n].T6){if(!e[n].T6.hasOwnProperty(i))continue;e[n].T6[i].status=tt}else for(var r=0;r<n;r++)for(var s in e[r].T6){if(!e[r].T6.hasOwnProperty(s)||e[r].T6[s].status!=Z)continue;for(var i in e[n].T6){if(!e[n].T6.hasOwnProperty(i)||e[n].T6[i].status!=Z)continue;if(s==i){e[r].T6[s].status=et;break}}}}if(t){for(var n=0;n<e.length;n++){if(e[n].inheritance.length>0)continue;for(var r in e[n].T6){if(!e[n].T6.hasOwnProperty(r)||e[n].T6[r].status!=et)continue;if(R.test(e[n].T6[r].value)){var o=n;for(var u=n+1;u<e.length;u++)typeof e[u].T6[r]!=z&&e[u].T6[r].status==et&&R.test(e[u].T6[r].value)&&(o=u);for(var u=n;u<e.length;u++)if(u==o){e[u].T6[r].status=Z;for(var a=0;a<u;a++)typeof e[a].T6[r]!=z&&e[a].T6[r].status==Z&&(e[a].T6[r].status=et)}else if(typeof e[u].T6[r]!=z&&e[u].T6[r].status==Z){e[u].T6[r].status=et;break}}}}for(var n=0;n<e.length;n++)for(var r in e[n].T6){if(!e[n].T6.hasOwnProperty(r)||e[n].T6[r].status!=Z)continue;if(typeof P[r]!=z)for(var u=0;u<=n;u++)for(var f=0;f<P[r].length;f++){var l=P[r][f];if(typeof e[u].T6[l]!=z&&e[u].T6[l].status==Z){if(u==n){var c=0;for(var h in e[u].T6){if(!e[u].T6.hasOwnProperty(h))continue;if(h==r)var p=c;if(h==l)var d=c;c++}}(u<n||d<p)&&!R.test(e[u].T6[l].value)&&(e[u].T6[l].status=et)}}}}for(var n=0;n<e.length;n++){for(var r in e[n]){if(!e[n].hasOwnProperty(r))continue;(r=="properties"||r=="T6")&&nn(e[n][r])==0&&(e[n][r]=Q)}e[n].properties=e[n].T6,delete e[n].T6;if(!t)for(var v in e[n].properties){if(!e[n].properties.hasOwnProperty(v))continue;e[n].properties[v]=e[n].properties[v].value}}return e}function Ht(e){var t=[0,0,0,0];if(e==="")return t[0]+=1,t;var n=e.replace(F,""),r=n.match(I);r&&(t[1]+=r.length);var r=n.match(q);r&&(t[2]+=r.length),r=e.match(F),r&&(t[2]+=r.length);var r=n.match(j);r&&(t[2]+=r.length);var i=n.replace(j,"").replace(B,"").replace(/(:not)/ig,"").replace(/(^|\()([_a-z0-9-\.\\]+\|)/ig,"$1").replace(I,"").replace(q,""),r=i.match(/([_a-z0-9-:\\]+)/ig);r&&(t[3]+=r.length);var r=n.match(B);return r&&(t[3]+=r.length),t}function Bt(e){var t=e.match(/(^|[^\(])(\[[^\]]+\])($|[^\)])/ig);if(t)for(var n=0;n<t.length;n++)t[n].charAt(0)!="["&&(t[n]=t[n].substr(1,t[n].length-1)),t[n].charAt(t[n].length-1)!="]"&&(t[n]=t[n].substr(0,t[n].length-1)),e=e.replace(t[n],"{a"+n+"}");var r=e.match(/([#\.][a-z]+[_a-z0-9-:\\]*)/ig);if(r)for(var i=0;i<r.length;i++)e=e.replace(r[i],"{c"+i+"}");e=e.replace(/([A-Z1-6]+)/g,function(e){return e.toLowerCase()});if(t)for(n=0;n<t.length;n++)e=e.replace("{a"+n+"}",t[n]);if(r)for(i=0;i<r.length;i++)e=e.replace("{c"+i+"}",r[i]);return e}function jt(e){e=e.split(";");for(var t=0;t<e.length;t++){var n=e[t].split(":");while(n.length>2)n[1]+=":"+n.pop();if(n.length==1){e.splice(t,1),t--;continue}n[0]=Yt(n[0]).toLowerCase(),n[1]=Yt(n[1]),e[t]=n[0]+":"+n[1]}return e.join("; ")}function Ft(e){var t=[];if(e=="")return t;e=e.split(",");for(var n=0;n<e.length;n++)t.push(Yt(e[n]));return t}function It(e,t,n){if(e=="")return t;e=e.replace(/[\r\n]/gm,""),e=e.split(";");for(var r=0;r<e.length;r++){e +[r]=Yt(e[r]);if(e[r]=="")continue;var i=e[r].split(":");while(i.length>2)i[1]+=":"+i.pop();if(i.length==1)continue;var s=Yt(i[0]);if(!n||n&&typeof D[s]!=z)if(typeof t[s]==z||!R.test(t[s].property)||t[s].B2==J||R.test(i[1]))t[s]={property:Yt(i[1]),B2:n}}return t}function qt(e,t){var n=tn(e,","),r=/([ \t]and.*$)/i,i=t.match(r),s=i?i[0]:"";t=t.replace(r,"").replace(/only[ \t]+/i,"");if(typeof n["all"]!=z)return t+s;t=t.split(",");for(var o=0;o<t.length;o++)t[o]=Yt(t[o]);for(var o=0;o<t.length;o++){if(t[o]==L)for(var u in n){if(!n.hasOwnProperty(u))continue;Zt(t,u)==Q&&!/[\(\)]/.test(u)&&t.push(u)}typeof n[t[o]]==z&&(t.splice(o,1),o--)}return t.length==0&&t.push(O),t.join(", ")+s}function Rt(e,t){var n=tn(t.media,","),r=K;for(var i=0;i<e.length;i++)if(typeof n[e[i]]!=z||typeof n[O]==z&&e[i]==L||typeof n[L]!=z&&e[i]!=O){r=J;break}return r}function Ut(){var e=A;try{var t=ct.getElementsByTagName("body").item(0),n=t.insertBefore(ct.createElement("span"),t.firstChild);n.id="cssutilitiestestmedianode",n.style.display="inline";var r=_.split(",");r.splice(0,0,"fake");if(ot){var i=ct.createStyleSheet();i.addRule("#cssutilitiestestmedianode","display:block !important;")}else{var s=ct.getElementsByTagName("head").item(0).appendChild(ct.createElement("style"));s.setAttribute("type","text/css"),s.appendChild(ct.createTextNode("#cssutilitiestestmedianode{display:block !important;}"));var i=ct.styleSheets[ct.styleSheets.length-1]}for(var o=0;o<r.length;o++){ot?i.media=r[o]:i.media.mediaText=r[o];if(ot&&n.currentStyle.display=="block"||!ot&&ct.defaultView.getComputedStyle(n,"").getPropertyValue("display")=="block"){e=r[o];break}}n.parentNode.removeChild(n),ot&&(s=i.owningElement),s.parentNode.removeChild(s)}catch(u){e=A}return e=="fake"&&(e=A),e}function zt(){for(var t=[],n=0;n<e._T1.length;n++){var r=ft==Y?e._T1[n].stylenode==K||e._T1[n].stylenode==Q?Q:nt||it||st?e._T1[n].stylenode:e._T1[n].stylenode[typeof e._T1[n].stylenode.styleSheet!=z?"styleSheet":"sheet"]:e._T1[n].stylesheet;if(r==Q)continue;t.push({stylesheet:r,disabled:r.disabled})}if((nt||it||st)&&ft==G){function i(){for(var e=[],t=ct.styleSheets,n=0;n<t.length;n++)typeof t[n].ownerNode.__R3==z&&(t[n].ownerNode.__R3=(new Date).getTime()+""+Math.round(Math.random()*1e4)),e.push(t[n].ownerNode.__R3);return e}var s=i(),o=window.setInterval(function(){var t=i();s.join()!=t.join()&&(window.clearInterval(o),e.init(typeof e.W1!=z?e.W1:Q))},at)}else var o=window.setInterval(function(){for(var n=0;n<t.length;n++){if(t[n].stylesheet.disabled!=t[n].disabled){window.clearInterval(o),e.init(typeof e.W1!=z?e.W1:Q);var r=J}if(typeof r!=z)break}},at)}function Wt(e){if(H.test(e)){var t=e.split(",");for(var n=0;n<t.length;n++)H.test(t[n])&&(t.splice(n,1),n--);e=t.join(",")}if(Yt(e)=="")return[];if(vt==K)try{return ct.querySelectorAll(e)}catch(r){return[]}if(typeof mt==V)try{return mt(e,ct)}catch(r){return[]}try{if(typeof Selector!=V)throw new Error(E);var i=Selector(e,ct);return typeof i==z?[]:i}catch(r){if(r.message==E)throw r;return[]}}function Xt(t){try{var n=en(e._N5?ct.getElementsByTagNameNS("*",t):ct.getElementsByTagName(t))}catch(r){n=[]}if(t=="*")for(var i=0;i<n.length;i++)(n[i].nodeType!=1||n[i].tagName.charAt(0)=="/")&&n.splice(i--,1);return n}function Vt(){typeof e._S1==z&&e.init()}function $t(e,t){t.push("M6");for(var n={},r=0;r<t.length;r++){if(typeof e[r]==V){for(var i=r;i<t.length;i++)n[t[i]]=Q;n.M6=e[r];break}typeof e[r]==z?n[t[r]]=Q:n[t[r]]=e[r]}return n}function Jt(e,t){typeof e==X&&e.charAt(0)=="#"&&(e=ct.getElementById(e.substr(1,e.length-1)));if(typeof e==z||e==Q||typeof e.nodeType==z||e.nodeType!=1)throw new Error(x.replace("%method",t));return e}function Kt(t){if(typeof t==z||t==""||t==Q)t=A;/(^|,)\*(,|$)/.test(t)&&(t="all,none"),t=t.split(",");for(var n=0;n<t.length;n++)t[n]=Yt(t[n]),t[n]==M&&(t[n]=e._Y6);return t}function Qt(e){return typeof e==z||e==""||e==Q||e=="null"?e="*":typeof e==X&&(e=Yt(e),e!=="*"&&(/(,\s*\*|\*\s*,)/.test(e)?e="*":e=tn(e,","))),e}function Gt(e){return typeof e!=V&&(e=Q),e}function Yt(e){return e.replace(/^\s+|\s+$/g,"")}function Zt(e,t,n){for(var r=0;r<e.length;r++)if(typeof n!=z&&typeof e[r]==W){if(e[r][n]==t)return e[r]}else if(e[r]==t)return e[r];return Q}function en(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function tn(e,t){var n={};e=e.split(t);var r=e[e.length-1];if(/[ \t]and/i.test(r)){r=r.split(/[ \t]and/i),e.splice(e.length-1,1);for(var i=0;i<r.length;i++)e.push(r[i])}for(var i=0;i<e.length;i++)n[Yt(e[i])]="";return n}function nn(e){var t=0;for(var n in e){if(!e.hasOwnProperty(n))continue;t++}return t}function rn(e,t){if(typeof e==z)return"";var n=t.replace("//","/").split("/"),r={protocol:n[0],host:n[1]};n.splice(0,2),r.pathname="/"+n.join("/");var i=r.protocol+"/"+"/"+r.host;/^(\.\/)([^\/]?)/.test(e)&&(e=e.replace(/^(\.\/)([^\/]?)/,"$2"));if(/(^([a-z]+)\:\/\/)/.test(e))i=e;else if(e.substr(0,1)=="/")i+=e;else if(/^((\.\.\/)+)([^\/].*$)/.test(e)){var s=e.match(/^((\.\.\/)+)([^\/].*$)/);s=s[s.length-1];var o=e.split("../").length-1,n=r.pathname.split("/");n=n.splice(0,n.length-1);for(var u=0;u<o;u++)n=n.splice(0,n.length-1);var a="";for(u=0;u<n.length;u++)n[u]!=""&&(a+="/"+n[u]);a+="/",a+=s,i+=a}else{a="",n=r.pathname.split("/"),n=n.splice(0,n.length-1);for(var u=0;u<n.length;u++)n[u]!=""&&(a+="/"+n[u]);a+="/",i+=a+e}return i}function sn(e,t,r,i){function u(e){/(0|200|304)/.test(e.status.toString())?r(e.responseText,e.getResponseHeader("Content-Type")):i(Yt(e.statusText),e.status)}var s=Q;if(typeof window.ActiveXObject!=z)try{s=new ActiveXObject("Microsoft.XMLHTTP")}catch(o){s=Q}if(s==Q&&typeof window.XMLHttpRequest!=z)try{s=new XMLHttpRequest}catch(o){s=Q}if(s==Q)throw new Error(S);s.open("GET",t,e);try{s.setRequestHeader("User-Agent",U)}catch(o){}if(e==J){s.onreadystatechange=function(){s.readyState==4&&u(s)};try{s.send(Q)}catch(o){i(n)}}else{var a;try{s.send(Q),a=J}catch(o){a=K}a===J?u(s):i(n)}}var e=this;e._N1=!1,e.supported=!1;if(typeof document.getElementById=="undefined"||typeof document.styleSheets=="undefined"||typeof document.nodeType=="undefined")return;e.supported=!0;var t=!1,n="Network Failure or Security Violation",r="Network Failure",i="Security Violation",s="Unspecified Error",o="Data is not CSS",u="unknown",a="OK",f="Discarded Duplicate",l="Stylesheet is disabled",c="Unsupported node type",h="CSSUtilities (Fatal Error):",p=h+" The specified mode is not valid",d=h+" The specified async setting is not valid",v=h+" The specified document is not a Document",m=h+" The specified base is not an absolute URL",g=h+" The specified watch setting is not valid",y=h+" The specified attributes setting is not valid",b=h+" The specified api settings are not valid",w=h+" Your Selectors API is not returning the right data",E=h+" The Selectors API is missing",S=h+" Unable to communicate with the network",x="CSSUtilities.%method has an invalid Element reference or ID",T="CSSUtilities.%method requires a valid Selector reference",N="CSSUtilities.%method can only process one Selector at a time",C="CSSUtilities.%method has an invalid Stylesheet ID",k=h+' You cannot define "%var" after "api",'+" it must be defined first",L="all",A="screen",O="none",M="current",_="aural,braille,embossed,handheld,print,projection,reader,screen,speech,tty,tv",D={azimuth:0,"border-collapse":0,"border-spacing":0,"caption-side":0,color:0,cursor:0,direction:0,elevation:0,"empty-cells":0,fit:0,"fit-position":0,font:0,"font-family":0,"font-size":0,"font-size-adjust":0,"font-stretch":0,"font-style":0,"font-variant":0,"font-weight":0,"hanging-punctuation":0,"hyphenate-after":0,"hyphenate-before":0,"hyphenate-character":0,"hyphenate-lines":0,"hyphenate-resource":0,hyphens:0,"image-resolution":0,"letter-spacing":0,"line-height":0,"line-stacking":0,"line-stacking-ruby":0,"line-stacking-shift":0,"line-stacking-strategy":0,"list-style":0,"list-style-image":0,"list-style-position":0,"list-style-type":0,"marquee-direction":0,orphans:0,"overflow-style":0,page:0,"page-break-inside":0,pitch:0,"pitch-range":0,"presentation-level":0,"punctuation-trim":0,quotes:0,richness:0,"ruby-align":0,"ruby-overhang":0,"ruby-position":0,speak:0,"speak-header":0,"speak-numeral":0,"speak-punctuation":0,"speech-rate":0,stress:0,"text-align":0,"text-align-last":0,"text-emphasis":0,"text-height":0,"text-indent":0,"text-justify":0,"text-outline":0,"text-replace":0,"text-shadow":0,"text-transform":0,"text-wrap":0,visibility:0,"voice-balance":0,"voice-family":0,"voice-rate":0,"voice-pitch":0,"voice-pitch-range":0,"voice-stress":0,"voice-volume":0,volume:0,"white-space":0,"white-space-collapse":0,widows:0,"word-break":0,"word-spacing":0,"word-wrap":0,"-moz-force-broken-image-icon":0,"-moz-image-region":0,"-moz-stack-sizing":0,"-moz-user-input":0,"-x-system-font":0,"-xv-voice-balance":0,"-xv-voice-pitch":0,"-xv-voice-pitch-range":0,"-xv-voice-rate":0,"-xv-voice-stress":0,"-xv-voice-volume":0,"-ms-text-align-last":0,"-ms-text-justify":0,"-ms-word-break":0,"-ms-word-wrap":0},P={margin:["margin-top","margin-right","margin-bottom","margin-left"],padding:["padding-top","padding-right","padding-bottom","padding-left"],outline:["outline-width","outline-style","outline-color"],border:["border-width","border-style","border-color","border-top","border-right","border-bottom","border-left","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color"],"border-width":["border-top-width","border-right-width","border-bottom-width","border-left-width"],"border-style":["border-top-style","border-right-style","border-bottom-style","border-left-style"],"border-color":["border-top-color","border-right-color","border-bottom-color","border-left-color"],"border-top":["border-top-width","border-top-style","border-top-color"],"border-right":["border-right-width","border-right-style","border-right-color"],"border-bottom":["border-bottom-width","border-bottom-style","border-bottom-color"],"border-left":["border-left-width","border-left-style","border-left-color"],"list-style":["list-style-type","list-style-image","list-style-position"],font:["font-weight","font-style","font-variant","font-size","line-height","font-family"],background:["background-color","background-image","background-repeat","background-attachment","background-position","background-size","background-clip","background-origin"],"line-stacking":["line-stacking-strategy","line-stacking-ruby","line-stacking-shift"],"column-rule":["column-rule-width","column-rule-style","column-rule-color"],columns:["column-width","column-count"],pause:["pause-before","pause-after"],rest:["rest-before","rest-after"],cue:["cue-before","cue-after"],mark:["mark-before","mark-after"],transition:["transition-property","transition-duration","transition-timing-function","transition-delay"],animation:["animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction"],target:["target-name","target-new","target-position"]},H=/[:]{1,2}(?:first\-(letter|line)|before|after|selection|value|choices|repeat\-(item|index)|outside|alternate|(line\-)?marker|slot\([_a-z0-9\-\+\.\\]*\))/i,B=/([:]{1,2}(?:first\-(letter|line)|before|after|selection|value|choices|repeat\-(item|index)|outside|alternate|(line\-)?marker|slot\([_a-z0-9\-\+\.\\]*\)))/ig,j=/([:](?:(link|visited|active|hover|focus|lang|root|empty|target|enabled|disabled|checked|default|valid|invalid|required|optional)|((in|out\-of)\-range)|(read\-(only|write))|(first|last|only|nth)(\-last)?\-(child|of\-type))(?:\([_a-z0-9\-\+\.\\]*\))?)/ig,F=/(\[\s*[_a-z0-9-:\.\|\\]+\s*(?:[~\|\*\^\$]?=\s*[\"\'][^\"\']*[\"\'])?\s*\])/ig,I=/(#[a-z]+[_a-z0-9-:\\]*)/ig,q=/(\.[_a-z]+[_a-z0-9-:\\]*)/ig,R=/\!\s*important\s*$/i,U="CSSUtilities/.99",z="undefined",W="object",X="string",V="function",$="boolean",J=!0,K=!1,Q=null,G="browser",Y="author",Z="active",et="cancelled",tt="inactive",nt=navigator.vendor=="Apple Computer,"+" Inc.",rt=nt&&/version\/3/i.test(navigator.appVersion),it=navigator.vendor=="KDE",st=/applewebkit/i.test(navigator.userAgent),ot=typeof document.uniqueID!=z,ut=typeof window.opera!=z,at=200,ft=G,lt=K,ct=document,ht,pt=K,dt=J,vt=Q,mt=Q,gt=K;e.define=function(e,t,n){switch(e){case"mode":if(typeof t!=X||!/^(author|browser)$/i.test(t))throw new Error(p);ft=t;if(ft==G&&pt===Q)throw new Error(g);break;case"async":if(typeof t!=$)throw new Error(d);lt=t;break;case"page":if(gt==J)throw new Error(k.replace("%var","page"));if(typeof t.nodeType==z||t.nodeType!=9)throw new Error(v);ct=t;break;case"base":if(gt==J)throw new Error(k.replace("%var","base"));if(typeof t!=X||!/^(((ht|f)tp[s]?)\:)/i.test(t))throw new Error(m);ht=t;break;case"attributes":if(typeof t!=$)throw new Error(y);dt=t;break;case"watch":if(typeof t!=$&&(ft!=Y||t!=Q))throw new Error(g);pt=t;break;case"api":if(typeof t!=$)throw new Error(b);if(typeof n!=z&&typeof n!=V)throw new Error(b);t==K?vt=typeof ct.querySelectorAll==z:vt=J,gt=J;if(typeof n==V){var r=n("*",ct);if(typeof r!=W||r==Q||typeof r.length==z)throw new Error(w);mt=n}}},e.init=function(n){function r(){t=K,CSSUtilities._N1=J,typeof n==V?(CSSUtilities.W1=n,CSSUtilities.W1()):(CSSUtilities.W1=Q,delete CSSUtilities.W1)}if(t===J)return;t=J,e._N1=K,vt=typeof ct.querySelectorAll!=z&&vt!==J?K:J,ht==Q&&(ht=ct.location.href),e._N5=ut&&ct.documentElement.namespaceURI!=Q||!ut&&typeof ct.xmlVersion!=z&&ct.xmlVersion!=Q,e._Y6=Ut(),e._S1=Q,delete e._S1,e._T1=Q,delete e._T1,e._S1=[],e._T1=[],e.Y4=0,ft==Y?bt(r):kt(r)},e.getCSSStyleSheets=function(){var t=$t(arguments,[]);return t.M6=Gt(t.M6),Vt(),yt(t.M6,function(){return e._T1})},e.getCSSRules=function(){var e=$t(arguments,["D5","media","F5","S5"]);return e.D5=Jt(e.D5,"getCSSRules"),e.media=Kt(e.media),e.F5=Qt(e.F5),e.S5==Q&&(e.S5=K),e.M6=Gt(e.M6),Vt(),yt(e.M6,function(){return _t(e.D5,e.media,e.F5,e.S5)})},e.getCSSStyleSheetRules=function(){var t=$t(arguments,["media","F5","ssid"]);t.media=Kt(t.media),t.F5=Qt(t.F5);if(typeof t.F5.properties!=z&&typeof t.F5.css==z){t.F5.css="";var n=J}t.ssid===Q&&(t.ssid=-1),t.M6=Gt(t.M6),Vt();if(t.ssid!==-1&&Zt(e._T1,t.ssid,"ssid")==Q)throw new Error(C.replace("%method","getCSSStyleSheetRules"));return yt(t.M6,function(){var r=[];for(var i=0;i<e._S1.length;i++){var s={};if(Rt(t.media,e._S1[i])){if(t.ssid!==-1&&e._S1[i].ssid!==t.ssid)continue;for(var o in e._S1[i]){if(!e._S1[i].hasOwnProperty(o))continue;if(t.F5=="*"||typeof t.F5[o]!=z)s[o]=e._S1[i][o]}if(t.F5=="*"||typeof t.F5.index!=z)s.index=i;r.push(s)}}if(typeof t.F5.properties!=z||t.F5==="*")r=Pt(r,K);if(typeof n!=z)for(var i=0;i<r.length;i++)r[i].css=Q,delete r[i].css;return r})},e.getCSSProperties=function(){var e=$t(arguments,["D5","media"]);return e.D5=Jt(e.D5,"getCSSProperties"),e.media=Kt(e.media),e.M6=Gt(e.M6),Vt(),yt(e.M6,function(){var t={},n=_t(e.D5,e.media,"properties",K);if(n.length==0)return Q;for(var r=0;r<n.length;r++)for(var i in n[r].properties){if(!n[r].properties.hasOwnProperty(i)||n[r].properties[i].status!=Z)continue;t[i]=n[r].properties[i].value}return t})},e.getCSSSelectors=function(){var e=$t(arguments,["D5","media","S2"]);return e.D5=Jt(e.D5,"getCSSSelectors"),e.media=Kt(e.media),e.S2==Q&&(e.S2=J),e.M6=Gt(e.M6),Vt(),yt(e.M6,function(){var t=[],n=_t(e.D5,e.media,"selector",J);for(var r=0;r<n.length;r++){var i=Ft(n[r].selector);for(var s=0;s<i.length;s++)Zt(t,i[s])==Q&&t.push(i[s])}if(e.S2==K){var o=e.D5,u=[o];while(o.parentNode)u.push(o.parentNode),o=o.parentNode;for(var r=0;r<t.length;r++){var a=K;for(var s=0;s<u.length;s++){var f=Wt(t[r].replace(j,""));if(f.length>0)for(var l=0;l<f.length;l++)if(f[l]==u[s]){a=J;break}if(a==J)break}a==K&&(t.splice(r,1),r--)}return t}var i=[];for(var r=0;r<t.length;r++){var f=Wt(t[r].replace(j,""));if(f.length>0)for(var s=0;s<f.length;s++)if(f[s]==e.D5){i.push(t[r]);break}}return i})},e.getCSSSelectorSpecificity=function(){var e=$t(arguments,["selector","D5"]);if(typeof e.selector!=X||e.selector==Q||Yt(e.selector)=="")throw new Error(T.replace("%method","getCSSSelectorSpecificity"));if(e.selector.indexOf(",")!=-1)throw new Error(N.replace("%method","getCSSSelectorSpecificity"));return e.D5!=Q&&(e.D5=Jt(e.D5,"getCSSSelectorSpecificity")),e.M6=Gt(e.M6),Vt(),yt(e.M6,function(){e.selector=Yt(e.selector);if(e.D5!=Q){var t=K,n=Wt(e.selector.replace(j,""));if(n.length>0)for(var r=0;r<n.length;r++)if(n[r]==e.D5){t=J;break}if(t==K){var i=e.D5,s=[i];while(i.parentNode)s.push(i),i=i.parentNode;for(var o=0;o<s.length;o++){if(n.length>0)for(var r=0;r<n.length;r++)if(n[r]==s[o]){t=J;break}if(t==J)break}return t==J?[0,0,0,0]:Q}}return Ht(e.selector)})}}.apply(CSSUtilities),new function(){function Selector(e,t){if(!(this instanceof Selector))return(new Selector(e)).exec(t);qsa||(this.exec=cache[e]||(cache[e]=new compile(e))),this.pattern=e}function $(e){var t=arguments;return e.replace(/\$(\d)/g,function(e,n){return t[n]})}function compile(qp){this.dup=this.srt=this.idx=this.i=this.nqp=0;with(this){var js="";do i=nqp=0,js+=$("n=c;$1q:do{$2}while(false);",srt?"s=0;":"",type(qp,$(srt?"for(x=r.length;s<x;z=s+((x-s)/2)|0,($1)?s=z+1:x=z);if(s<r.length)r.splice(s++,0,$2);else r[s++]=$2;":"r[s++]=$2;",cdp?"r[z].compareDocumentPosition(n)&4":"h[r[z].LLn]<h[n.LLn]","pe?pe.call(this,n):n"),0,"*"));while(qp=nqp);return js=$("var r=[],s=0,n,x,y,z,d=c?c.ownerDocument||c.document||c:c=document,pe=this.patchElement,pa=this.patchArray$1$2;$3return pa?pa.call(this,r):r;",dup>0?",h={}":"",idx?me?",LLi=d.LLi||(d.LLi=++Selector.guid)":",LLi=++Selector.guid":"",js),new Function("c",js)}}Selector.prototype={constructor:Selector,exec:function(e){var t=this.patchElement,n=this.patchArray,r=this.pattern,i=t?map.call((e||d).querySelectorAll(r),t,this):Array.prototype.slice.call((e||d).querySelectorAll(r));return n?n.call(this,i):i},toString:function(){return this.pattern},toSource:function(){return'new Selector("'+this.pattern+'")'}},window.Selector=Selector;with(navigator.userAgent)var ie=indexOf("MSIE")!=-1&&indexOf("Opera")==-1,mz=indexOf("Gecko")!=-1&&indexOf("KHTML")==-1,wk=indexOf("AppleWebKit")!=-1;var d=document,de=d.documentElement,qsa=!!d.querySelectorAll,bcn=!!d.getElementsByClassName,cnl=!!de.children,cnlt=cnl&&de.children.tags&&!wk,ec=!!de.contains,cdp=!!de.compareDocumentPosition,si=typeof de.sourceIndex=="number",cache={},cmp={"=":'if($1($2=="$3")){$5}',"^=":'if($1((x=$2)&&!x.indexOf("$3"))){$5}',"*=":'if($1((x=$2)&&x.indexOf("$3")!=-1)){$5}',"$=":'if($1((x=$2)&&x.indexOf("$3",x.length-$4)!=-1)){$5}',"~=":'if($1((x=$2)&&(y=x.indexOf("$3"))!=-1&&(x.charCodeAt(y-1)||32)==32&&(x.charCodeAt(y+$4)||32)==32)){$5}',"|=":'if($1((x=$2)&&(x=="$3"||!x.indexOf("$3-")))){$5}'},map=Array.prototype.map||function(e,t){var n=this.length,r=new Array(n);while(--n>=0)r[n]=e.call(t,this[n],n,this);return r};with(d.implementation)var me=d.addEventListener&&(hasFeature("MutationEvents","2.0")||hasFeature("Events","2.0")&&hasFeature("Core","2.0"));Selector.guid=0,Selector.nthIndex=function(e,t,n,r,i){var s=t.parentNode,o="LLi#"+i,u="LLi$"+i;if(!s)return Number.NaN;if(!t[o]||t.LLi!=e){for(var a=s.firstChild,f=0;a;a=a.nextSibling)a[r]==i&&(a[o]=++f,a.LLi=e);s[u]=f}return n?1+s[u]-t[o]:t[o]};if(me){function fn(e){with(e.target)nodeType!==2&&(ownerDocument.LLi=++Selector.guid)}d.addEventListener("DOMNodeInserted",fn,!1),d.addEventListener("DOMNodeRemoved",fn,!1)}if(ie)var am={acceptcharset:"acceptCharset",accesskey:"accessKey",cellpadding:"cellPadding",cellspacing:"cellSpacing",checked:"defaultChecked",selected:"defaultSelected","class":"className",colspan:"colSpan","for":"htmlFor",frameborder:"frameBorder",hspace:"hSpace",longdesc:"longDesc",marginwidth:"marginWidth",marginheight:"marginHeight",noresize:"noResize",noshade:"noShade",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",usemap:"useMap",valign:"vAlign",vspace:"vSpace"},ab={compact:1,nowrap:1,ismap:1,declare:1,noshade:1,checked:1,disabled:1,readonly:1,multiple:1,selected:1,noresize:1,defer:1};compile.prototype={type:function(qp,js,n,s,c){with(this){var m=/^\s*([\w-]+|\*)?(.*)/.exec(qp),t=m[1]||"*";!n&&c==" "&&!dup&&(dup=1),js=pred(m[2],js,n,t,c);switch(c){case">":return cnlt&&t!="*"?$('for(var n$1=n.children.tags("$2"),i$1=0;n=n$1[i$1++];){$3}',++i,t,js):$(cnl?"for(var n$1=n.children,i$1=0;n=n$1[i$1++];)$2{$3}":"for(n=n.firstChild;n;n=n.nextSibling)$2{$3}",++i,t!="*"?'if(n.nodeName==="'+t.toUpperCase()+'")':!cnl||ie?"if(n.nodeType===1)":"",js);case"+":return $("while(n=n.nextSibling)if(n.node$1){$2break}else if(n.nodeType===1)break;",t=="*"?"Type===1":'Name==="'+t.toUpperCase()+'"',js);case"~":return $("while(n=n.nextSibling)if(n.node$1){$3}else if(n.node$2)break;",t=="*"?"Type===1":'Name==="'+t.toUpperCase()+'"',s=="*"?"Type===1":'Name==="'+s.toUpperCase()+'"',js);default:return typeof js=="object"?String(js):n?t=="*"?js:$('if(n.nodeName!="$1"){$2}',t.toUpperCase(),js):$('for(var n$1=n.getElementsByTagName("$2"),i$1=0;n=n$1[i$1++];)$3{$4}',++i,t,ie&&t=="*"?"if(n.nodeType===1)":"",js)}}},pred:function(qp,js,n,t,c){with(this){var m=/^([#\.])([\w-]+)(.*)/.exec(qp)||/^(\[)\s*([\w-]+)\s*(?:([~|^$*]?=)\s*(?:(['"])(.*?)\4|([\w-]+)))?\s*\](.*)/.exec(qp)||/^:(first|last|only)-(?:(child)|of-type)(.*)/.exec(qp)||/^:(nth)-(?:(last)-)?(?:(child)|of-type)\(\s*(?:(odd|even)|(-|\d*)n([+-]\d+)?|([1-9]\d*))\s*\)(.*)/.exec(qp)||/^:(active|checked|(?:dis|en)abled|empty|focus|link|root|target)(.*)/.exec(qp)||/^:(lang)\(\s*(['"])?(.*?)\2\s*\)(.*)/.exec(qp)||!n&&/^:(not)\(\s*(.*)\s*\)(.*)/.exec(qp),x=0;if(!m){if(m=/^\s*([+>~,\s])\s*(\S.*)/.exec(qp)){if(m[1]!=",")return type(m[2],js,n,t,m[1]);nqp=m[2],dup=2}else if(/\S/.test(qp))throw new Error("Illegal query near: "+qp);return dup<1?js:$("if(!h[x=n.LLn||(n.LLn=++Selector.guid)]){h[x]=$1;$2}",!srt||cdp?"true":si?"n.sourceIndex":"Selector.srcIndex(h,n)",js)}!n&&m[1]=="#"&&dup!=2&&(dup=-1),js=pred(m[m.length-1],js,n,t,1);switch(m[1]){case"#":return uniq(js,n,t,c,ie,"n.id",'"'+m[2]+'"','d.getElementById("'+m[2]+'")');case".":return bcn&&!n&&(!c||c==" ")&&(t=="*"||!mz)?Object($('for(var n$1=n.getElementsByClassName("$2"),i$1=0;n=n$1[i$1++];)$3{$4}',++i,m[2],t=="*"?"":'if(n.nodeName==="'+t.toUpperCase()+'")',js)):$(cmp["~="],n?"!":"","n.className",x=m[2],x.length,js);case"[":return(x=m[3])?$(cmp[x],n?"!":"",ie?(x=m[2].toLowerCase())=="style"?"style.cssText.toLowerCase()":ab[x]?"n."+x+'&&"'+x+'"':'n.getAttribute("'+(am[x]||x)+'",2)':'n.getAttribute("'+m[2]+'")',x=m[5]||m[6],x.length,js):$(ie?'if($1((x=n.getAttributeNode("$2"))&&x.specified)){$3}':'if($1n.hasAttribute("$2")){$3}',n?"!":"",m[2],js);case"active":case"focus":return uniq(js,n,t,c,0,"n","d.activeElement");case"checked":return $("if($1(n.checked||n.selected)){$2}",n?"!":"",js);case"disabled":x=1;case"enabled":return $("if(n.disabled===$1$2){$3}",!!(x^n),ie?'&&((x=n.nodeName)==="BUTTON"||x==="INPUT"||x==="OPTION"||x==="OPTGROUP"||x==="SELECT"||x==="TEXTAREA"':"",js);case"empty":return $("for(x=n.firstChild;x&&x.nodeType>3;x=x.nextSibling);if($1x){$2}",n?"":"!",js);case"first":return flo(js,n,m[2],"previous");case"lang":return $(cmp["|="],n?"!":"","n.lang",x=m[3],x.length,js);case"last":return flo(js,n,m[2],"next");case"link":return $('if($1(n.nodeName==="A"&&n.href)){$2}',n?"!":"",js);case"nth":var a=m[4]?2:m[5]=="-"?-1:m[7]?0:m[5]?m[5]-0:1,b=m[4]=="odd"?1:(m[6]||m[7])-0||0;if(a==1)return js;if(a==0&&b==1)return flo(js,n,m[3],m[2]?"next":"previous");return a==b&&(b=0),b<0&&(b=a+b),idx=1,$('if($1(Selector.nthIndex(LLi,n,$2,"node$3",$4)$5)){$6}',n?"!":"",!!m[2],m[3]?"Type":"Name",m[3]?"1":"n.nodeName",a<0?"<="+b:a?"%"+a+"==="+b:"==="+b,js);case"not":return type(m[2],js,1,"*");case"only":return flo(js,n,m[2]);case"root":return uniq(js,n,t,c,0,"n","d.documentElement");case"target":return x="(d.defaultView||d.parentWindow||window).location.hash.substr(1)",uniq(js,n,t,c,ie,"n.id",x,"d.getElementById("+x+")")}}},uniq:function(e,t,n,r,i,s,o,u){return t||r&&r!=" "||i?$(t?"if($1!==$2){$3}":"if($1===$2){$3break q}",s,o,e):Object($(ec?"if((x=$1)===n||!n.contains||n.contains(x))$2":cdp?"if((x=$1)===n||!n.compareDocumentPosition||n.compareDocumentPosition(x)&16)$2":"for(x=y=$1;y;y=y.parentNode)if(y===n)$2",u||o,n=="*"?"{n=x;"+e+"break q}":'{if((n=x).nodeName==="'+n.toUpperCase()+'"){'+e+"}break q}"))},flo:function(e,t,n,r){return $(r?"for($2x=n.$1Sibling;x&&x.node$3;x=x.$1Sibling);if($4x){$5}":"for($2(x=n.parentNode)&&(x=x.firstChild);x&&(x.node$3||x===n);x=x.nextSibling);if($4x){$5}",r,n?"":"y=n.nodeName,",n?"Type!==1":"Name!==y",t?"":"!",e)}}},function(){var e=[].slice;window.HAML=function(){function t(){}return t.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},t.cleanValue=function(e){switch(e){case null:case void 0:return"";case!0:case!1:return"“"+e;default:return e}},t.extend=function(){var t,n,r,i,s,o,u;n=arguments[0],i=2<=arguments.length?e.call(arguments,1):[];for(o=0,u=i.length;o<u;o++){r=i[o];for(t in r)s=r[t],n[t]=s}return n},t.globals=function(){return{}},t.context=function(e){return this.extend({},t.globals(),e)},t.preserve=function(e){return e.replace(/\n/g," ")},t.findAndPreserve=function(e){var t;return t="textarea,pre".split(",").join("|"),e=e.replace(RegExp("<("+t+")>([^]*?)<\\/\\1>","g"),function(e,t,n){return"<"+t+">"+window.HAML.preserve(n)+"</"+t+">"})},t.surround=function(e,t,n){var r;return e+((r=n.call(this))!=null?r.replace(/^\s+|\s+$/g,""):void 0)+t},t.succeed=function(e,t){var n;return((n=t.call(this))!=null?n.replace(/\s+$/g,""):void 0)+e},t.precede=function(e,t){var n;return e+((n=t.call(this))!=null?n.replace(/^\s+/g,""):void 0)},t.reference=function(e,t){var n,r,i,s;r=t?t+"_":"",typeof e.hamlObjectRef=="function"?r+=e.hamlObjectRef():r+=(((s=e.constructor)!=null?s.name:void 0)||"object").replace(/\W+/g,"_").replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase(),n=typeof e.to_key=="function"?e.to_key():typeof e.id=="function"?e.id():e.id?e.id:e,i="class='"+r+"'";if(n)return i+=" id='"+r+"_"+n+"'"},t}()}.call(this),function(){this.Skim={access:function(e){var t;return t=this[e],typeof t=="function"&&(t=t.call(this)),t===!0?[this]:t===!1||t==null?!1:Object.prototype.toString.call(t)!=="[object Array]"?[t]:t.length===0?!1:t},withContext:function(e,t){var n;return n=function(e){var t;return t=function(){},t.prototype=e,new t},e=n(e),e.safe||(e.safe=this.safe||function(e){var t;return(e!=null?e.skimSafe:void 0)?e:(t=new String(e!=null?e:""),t.skimSafe=!0,t)}),e.escape||(e.escape=this.escape||function(e){return e==null?"":e.skimSafe?e:this.safe((""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\//g,"/"))}),t.call(e)}}}.call(this),function(){}.call(this),window.CodeMirror=function(){"use strict";function S(e,n){if(!(this instanceof S))return new S(e,n);this.options=n=n||{};for(var r in Xn)!n.hasOwnProperty(r)&&Xn.hasOwnProperty(r)&&(n[r]=Xn[r]);P(n);var i=typeof n.value=="string"?0:n.value.first,s=this.display=x(e,i);s.wrapper.CodeMirror=this,M(this),n.autofocus&&!d&&Dt(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,draggingText:!1,highlight:new ji},A(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap");var o=n.value;typeof o=="string"&&(o=new Gr(n.value,n.mode)),Nt(this,ti)(this,o),t&&setTimeout($i(_t,this,!0),20),Ht(this);var u;try{u=document.activeElement==s.input}catch(a){}u||n.autofocus&&!d?setTimeout($i(rn,this),20):sn(this),Nt(this,function(){for(var e in Wn)Wn.propertyIsEnumerable(e)&&Wn[e](this,n[e],$n);for(var t=0;t<Gn.length;++t)Gn[t](this)})()}function x(e,t){var r={},s=r.input=Yi("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;");i?s.style.width="1000px":s.setAttribute("wrap","off"),p&&(s.style.border="1px solid black"),s.setAttribute("autocorrect","off"),s.setAttribute("autocapitalize","off"),r.inputDiv=Yi("div",[s],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),r.scrollbarH=Yi("div",[Yi("div",null,null,"height: 1px")],"CodeMirror-hscrollbar"),r.scrollbarV=Yi("div",[Yi("div",null,null,"width: 1px")],"CodeMirror-vscrollbar"),r.scrollbarFiller=Yi("div",null,"CodeMirror-scrollbar-filler"),r.lineDiv=Yi("div"),r.selectionDiv=Yi("div",null,null,"position: relative; z-index: 1"),r.cursor=Yi("div"," ","CodeMirror-cursor"),r.otherCursor=Yi("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"),r.measure=Yi("div",null,"CodeMirror-measure"),r.lineSpace=Yi("div",[r.measure,r.selectionDiv,r.lineDiv,r.cursor,r.otherCursor],null,"position: relative; outline: none"),r.mover=Yi("div",[Yi("div",[r.lineSpace],"CodeMirror-lines")],null,"position: relative"),r.sizer=Yi("div",[r.mover],"CodeMirror-sizer"),r.heightForcer=Yi("div",null,null,"position: absolute; height: "+Hi+"px; width: 1px;"),r.gutters=Yi("div",null,"CodeMirror-gutters"),r.lineGutter=null;var o=Yi("div",[r.sizer,r.heightForcer,r.gutters],null,"position: relative; min-height: 100%");return r.scroller=Yi("div",[o],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=Yi("div",[r.inputDiv,r.scrollbarH,r.scrollbarV,r.scrollbarFiller,r.scroller],"CodeMirror"),n&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),e.appendChild?e.appendChild(r.wrapper):e(r.wrapper),p&&(s.style.width="0px"),i||(r.scroller.draggable=!0),f?(r.inputDiv.style.height="1px",r.inputDiv.style.position="absolute"):n&&(r.scrollbarH.style.minWidth=r.scrollbarV.style.minWidth="18px"),r.viewOffset=r.lastSizeC=0,r.showingFrom=r.showingTo=t,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.prevInput="",r.alignWidgets=!1,r.pollingFast=!1,r.poll=new ji,r.draggingText=!1,r.cachedCharWidth=r.cachedTextHeight=null,r.measureLineCache=[],r.measureLineCachePos=0,r.inaccurateSelection=!1,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r}function T(e){e.doc.mode=S.getMode(e.options,e.doc.modeOption),e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Z(e,100),e.state.modeGen++,e.curOp&&Lt(e)}function N(e){e.options.lineWrapping?(e.display.wrapper.className+=" CodeMirror-wrap",e.display.sizer.style.minWidth=""):(e.display.wrapper.className=e.display.wrapper.className.replace(" CodeMirror-wrap",""),D(e)),k(e),Lt(e),ct(e),setTimeout(function(){H(e.display,e.doc.height)},100)}function C(e){var t=wt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Et(e.display)-3);return function(i){return xr(e.doc,i)?0:n?(Math.ceil(i.text.length/r)||1)*t:t}}function k(e){var t=e.doc,n=C(e);t.iter(function(e){var t=n(e);t!=e.height&&si(e,t)})}function L(e){var t=tr[e.options.keyMap].style;e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(t?" cm-keymap-"+t:"")}function A(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ct(e)}function O(e){M(e),Lt(e)}function M(e){var t=e.display.gutters,n=e.options.gutters;Zi(t);for(var r=0;r<n.length;++r){var i=n[r],s=t.appendChild(Yi("div",null,"CodeMirror-gutter "+i));i=="CodeMirror-linenumbers"&&(e.display.lineGutter=s,s.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=r?"":"none"}function _(e,t){if(t.height==0)return 0;var n=t.text.length,r,i=t;while(r=wr(i)){var s=r.find();i=ni(e,s.from.line),n+=s.from.ch-s.to.ch}i=t;while(r=Er(i)){var s=r.find();n-=i.text.length-s.from.ch,i=ni(e,s.to.line),n+=i.text.length-s.to.ch}return n}function D(e){var t=e.display,n=e.doc;t.maxLine=ni(n,n.first),t.maxLineLength=_(n,t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var r=_(n,e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function P(e){var t=!1;for(var n=0;n<e.gutters.length;++n)e.gutters[n]=="CodeMirror-linenumbers"&&(e.lineNumbers?t=!0:e.gutters.splice(n--,1));!t&&e.lineNumbers&&e.gutters.push("CodeMirror-linenumbers")}function H(e,t){var n=t+it(e);e.sizer.style.minHeight=e.heightForcer.style.top=n+"px";var r=Math.max(n,e.scroller.scrollHeight),i=e.scroller.scrollWidth>e.scroller.clientWidth,s=r>e.scroller.clientHeight;s?(e.scrollbarV.style.display="block",e.scrollbarV.style.bottom=i?os(e.measure)+"px":"0",e.scrollbarV.firstChild.style.height=r-e.scroller.clientHeight+e.scrollbarV.clientHeight+"px"):e.scrollbarV.style.display="",i?(e.scrollbarH.style.display="block",e.scrollbarH.style.right=s?os(e.measure)+"px":"0",e.scrollbarH.firstChild.style.width=e.scroller.scrollWidth-e.scroller.clientWidth+e.scrollbarH.clientWidth+"px"):e.scrollbarH.style.display="",i&&s?(e.scrollbarFiller.style.display="block",e.scrollbarFiller +.style.height=e.scrollbarFiller.style.width=os(e.measure)+"px"):e.scrollbarFiller.style.display="",l&&os(e.measure)===0&&(e.scrollbarV.style.minWidth=e.scrollbarH.style.minHeight=c?"18px":"12px")}function B(e,t,n){var r=e.scroller.scrollTop,i=e.wrapper.clientHeight;typeof n=="number"?r=n:n&&(r=n.top,i=n.bottom-n.top),r=Math.floor(r-rt(e));var s=Math.ceil(r+i);return{from:ui(t,r),to:ui(t,s)}}function j(e){var t=e.display;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;var n=q(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,i=n+"px";for(var s=t.lineDiv.firstChild;s;s=s.nextSibling)if(s.alignable)for(var o=0,u=s.alignable;o<u.length;++o)u[o].style.left=i;e.options.fixedGutter&&(t.gutters.style.left=n+r+"px")}function F(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=I(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(Yi("div",[Yi("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),s=i.firstChild.offsetWidth,o=i.offsetWidth-s;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(s,r.lineGutter.offsetWidth-o),r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",!0}return!1}function I(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function q(e){return ns(e.scroller).left-ns(e.sizer).left}function R(e,t,n){var r=e.display.showingFrom,i=e.display.showingTo,s,o=B(e.display,e.doc,n);for(;;){if(!U(e,t,o))break;s=!0,_i(e,"update",e),(e.display.showingFrom!=r||e.display.showingTo!=i)&&_i(e,"viewportChange",e,e.display.showingFrom,e.display.showingTo),K(e),H(e.display,e.doc.height),n&&(n=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,typeof n=="number"?n:n.top)),o=B(e.display,e.doc,n);if(o.from>=e.display.showingFrom&&o.to<=e.display.showingTo)break;t=[]}return s}function U(e,t,r){var i=e.display,s=e.doc;if(!i.wrapper.clientWidth){i.showingFrom=i.showingTo=s.first,i.viewOffset=0;return}if(t.length==0&&r.from>i.showingFrom&&r.to<i.showingTo)return;F(e)&&(t=[{from:s.first,to:s.first+s.size}]);var o=i.sizer.style.marginLeft=i.gutters.offsetWidth+"px";i.scrollbarH.style.left=e.options.fixedGutter?o:"0";var u=Infinity;if(e.options.lineNumbers)for(var a=0;a<t.length;++a)if(t[a].diff){u=t[a].from;break}var f=s.first+s.size,l=Math.max(r.from-e.options.viewportMargin,s.first),c=Math.min(f,r.to+e.options.viewportMargin);i.showingFrom<l&&l-i.showingFrom<20&&(l=Math.max(s.first,i.showingFrom)),i.showingTo>c&&i.showingTo-c<20&&(c=Math.min(f,i.showingTo));if(E){l=oi(Sr(s,ni(s,l)));while(c<f&&xr(s,ni(s,c)))++c}var h=[{from:Math.max(i.showingFrom,s.first),to:Math.min(i.showingTo,f)}];h[0].from>=h[0].to?h=[]:h=W(h,t);if(E)for(var a=0;a<h.length;++a){var p=h[a],d;while(d=Er(ni(s,p.to-1))){var v=d.find().from.line;if(!(v>p.from)){h.splice(a--,1);break}p.to=v}}var m=0;for(var a=0;a<h.length;++a){var p=h[a];p.from<l&&(p.from=l),p.to>c&&(p.to=c),p.from>=p.to?h.splice(a--,1):m+=p.to-p.from}if(m==c-l&&l==i.showingFrom&&c==i.showingTo){z(e);return}h.sort(function(e,t){return e.from-t.from});try{var g=document.activeElement}catch(y){}m<(c-l)*.7&&(i.lineDiv.style.display="none"),V(e,l,c,h,u),i.lineDiv.style.display="",g&&document.activeElement!=g&&g.offsetHeight&&g.focus();var b=l!=i.showingFrom||c!=i.showingTo||i.lastSizeC!=i.wrapper.clientHeight;b&&(i.lastSizeC=i.wrapper.clientHeight),i.showingFrom=l,i.showingTo=c,Z(e,100);var w=i.lineDiv.offsetTop;for(var S=i.lineDiv.firstChild,x;S;S=S.nextSibling)if(S.lineObj){if(n){var T=S.offsetTop+S.offsetHeight;x=T-w,w=T}else{var N=ns(S);x=N.bottom-N.top}var C=S.lineObj.height-x;x<2&&(x=wt(i));if(C>.001||C<-0.001){si(S.lineObj,x);var k=S.lineObj.widgets;if(k)for(var a=0;a<k.length;++a)k[a].height=k[a].node.offsetHeight}}return z(e),!0}function z(e){var t=e.display.viewOffset=ai(e,ni(e.doc,e.display.showingFrom));e.display.mover.style.top=t+"px"}function W(e,t){for(var n=0,r=t.length||0;n<r;++n){var i=t[n],s=[],o=i.diff||0;for(var u=0,a=e.length;u<a;++u){var f=e[u];i.to<=f.from&&i.diff?s.push({from:f.from+o,to:f.to+o}):i.to<=f.from||i.from>=f.to?s.push(f):(i.from>f.from&&s.push({from:f.from,to:i.from}),i.to<f.to&&s.push({from:i.to+o,to:f.to+o}))}e=s}return e}function X(e){var t=e.display,n={},r={};for(var i=t.gutters.firstChild,s=0;i;i=i.nextSibling,++s)n[e.options.gutters[s]]=i.offsetLeft,r[e.options.gutters[s]]=i.offsetWidth;return{fixedPos:q(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function V(e,t,n,r,s){function c(t){var n=t.nextSibling;return i&&v&&e.display.currentWheelTarget==t?(t.style.display="none",t.lineObj=null):t.parentNode.removeChild(t),n}var o=X(e),u=e.display,a=e.options.lineNumbers;!r.length&&(!i||!e.display.currentWheelTarget)&&Zi(u.lineDiv);var f=u.lineDiv,l=f.firstChild,h=r.shift(),p=t;e.doc.iter(t,n,function(t){h&&h.to==p&&(h=r.shift());if(xr(e.doc,t)){t.height!=0&&si(t,0);if(t.widgets&&l.previousSibling)for(var n=0;n<t.widgets.length;++n)if(t.widgets[n].showIfHidden){var i=l.previousSibling;if(/pre/i.test(i.nodeName)){var u=Yi("div",null,null,"position: relative");i.parentNode.replaceChild(u,i),u.appendChild(i),i=u}var d=i.appendChild(Yi("div",[t.widgets[n].node],"CodeMirror-linewidget"));J(t.widgets[n],d,i,o)}}else if(h&&h.from<=p&&h.to>p){while(l.lineObj!=t)l=c(l);a&&s<=p&&l.lineNumber&&ts(l.lineNumber,I(e.options,p)),l=l.nextSibling}else{if(t.widgets)for(var v=0,m=l,g;m&&v<20;++v,m=m.nextSibling)if(m.lineObj==t&&/div/i.test(m.nodeName)){g=m;break}var y=$(e,t,p,o,g);if(y!=g)f.insertBefore(y,l);else{while(l!=g)l=c(l);l=l.nextSibling}y.lineObj=t}++p});while(l)l=c(l)}function $(e,t,r,i,s){var o=qr(e,t),u=t.gutterMarkers,a=e.display,f;if(!e.options.lineNumbers&&!u&&!t.bgClass&&!t.wrapClass&&!t.widgets)return o;if(s){s.alignable=null;var l=!0,c=0;for(var h=s.firstChild,p;h;h=p){p=h.nextSibling;if(!/\bCodeMirror-linewidget\b/.test(h.className))s.removeChild(h);else{for(var d=0,v=!0;d<t.widgets.length;++d){var m=t.widgets[d],g=!1;m.above||(g=v,v=!1);if(m.node==h.firstChild){J(m,h,s,i),++c,g&&s.insertBefore(o,h);break}}if(d==t.widgets.length){l=!1;break}}}l&&c==t.widgets.length&&(f=s,s.className=t.wrapClass||"")}f||(f=Yi("div",null,t.wrapClass,"position: relative"),f.appendChild(o)),t.bgClass&&f.insertBefore(Yi("div",null,t.bgClass+" CodeMirror-linebackground"),f.firstChild);if(e.options.lineNumbers||u){var y=f.insertBefore(Yi("div",null,null,"position: absolute; left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px"),f.firstChild);e.options.fixedGutter&&(f.alignable||(f.alignable=[])).push(y),e.options.lineNumbers&&(!u||!u["CodeMirror-linenumbers"])&&(f.lineNumber=y.appendChild(Yi("div",I(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.lineNumInnerWidth+"px")));if(u)for(var b=0;b<e.options.gutters.length;++b){var w=e.options.gutters[b],E=u.hasOwnProperty(w)&&u[w];E&&y.appendChild(Yi("div",[E],"CodeMirror-gutter-elt","left: "+i.gutterLeft[w]+"px; width: "+i.gutterWidth[w]+"px"))}}n&&(f.style.zIndex=2);if(t.widgets&&f!=s)for(var d=0,S=t.widgets;d<S.length;++d){var m=S[d],x=Yi("div",[m.node],"CodeMirror-linewidget");J(m,x,f,i),m.above?f.insertBefore(x,e.options.lineNumbers&&t.height!=0?y:o):f.appendChild(x),_i(m,"redraw")}return f}function J(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function K(e){var t=e.display,n=wn(e.doc.sel.from,e.doc.sel.to);n||e.options.showCursorWhenSelecting?Q(e):t.cursor.style.display=t.otherCursor.style.display="none",n?t.selectionDiv.style.display="none":G(e);if(e.options.moveInputWithCursor){var r=vt(e,e.doc.sel.head,"div"),i=ns(t.wrapper),s=ns(t.lineDiv);t.inputDiv.style.top=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+s.top-i.top))+"px",t.inputDiv.style.left=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+s.left-i.left))+"px"}}function Q(e){var t=e.display,n=vt(e,e.doc.sel.head,"div");t.cursor.style.left=n.left+"px",t.cursor.style.top=n.top+"px",t.cursor.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",t.cursor.style.display="",n.other?(t.otherCursor.style.display="",t.otherCursor.style.left=n.other.left+"px",t.otherCursor.style.top=n.other.top+"px",t.otherCursor.style.height=(n.other.bottom-n.other.top)*.85+"px"):t.otherCursor.style.display="none"}function G(e){function u(e,t,n,r){t<0&&(t=0),i.appendChild(Yi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(n==null?s-e:n)+"px; height: "+(r-t)+"px"))}function a(t,r,i,a){function h(n){return dt(e,bn(t,n),"div",f)}var f=ni(n,t),l=f.text.length,c=a?Infinity:-Infinity;return ps(fi(f),r||0,i==null?l:i,function(e,t,n){var f=h(n=="rtl"?t-1:e),p=h(n=="rtl"?e:t-1),d=f.left,v=p.right;p.top-f.top>3&&(u(d,f.top,null,f.bottom),d=o,f.bottom<p.top&&u(d,f.bottom,null,p.top)),i==null&&t==l&&(v=s),r==null&&e==0&&(d=o),c=a?Math.min(p.top,c):Math.max(p.bottom,c),d<o+1&&(d=o),u(d,p.top,v-d,p.bottom)}),c}var t=e.display,n=e.doc,r=e.doc.sel,i=document.createDocumentFragment(),s=t.lineSpace.offsetWidth,o=st(e.display);if(r.from.line==r.to.line)a(r.from.line,r.from.ch,r.to.ch);else{var f=ni(n,r.from.line),l=f,c,h=[r.from.line,r.from.ch],p;while(c=Er(l)){var d=c.find();h.push(d.from.ch,d.to.line,d.to.ch);if(d.to.line==r.to.line){h.push(r.to.ch),p=!0;break}l=ni(n,d.to.line)}if(p)for(var v=0;v<h.length;v+=3)a(h[v],h[v+1],h[v+2]);else{var m,g,y=ni(n,r.to.line);r.from.ch?m=a(r.from.line,r.from.ch,null,!1):m=ai(e,f)-t.viewOffset,r.to.ch?g=a(r.to.line,wr(y)?null:0,r.to.ch,!0):g=ai(e,y)-t.viewOffset,m<g&&u(o,m,null,g)}}es(t.selectionDiv,i),t.selectionDiv.style.display=""}function Y(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var n=!0;t.cursor.style.visibility=t.otherCursor.style.visibility="",t.blinker=setInterval(function(){t.cursor.style.visibility=t.otherCursor.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate)}function Z(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.showingTo&&e.state.highlight.set(t,$i(et,e))}function et(e){var t=e.doc;t.frontier<t.first&&(t.frontier=t.first);if(t.frontier>=e.display.showingTo)return;var n=+(new Date)+e.options.workTime,r=Yn(t.mode,nt(e,t.frontier)),i=[],s;t.iter(t.frontier,Math.min(t.first+t.size,e.display.showingTo+500),function(o){if(t.frontier>=e.display.showingFrom){var u=o.styles;o.styles=Hr(e,o,r);var a=!u||u.length!=o.styles.length;for(var f=0;!a&&f<u.length;++f)a=u[f]!=o.styles[f];a&&(s&&s.end==t.frontier?s.end++:i.push(s={start:t.frontier,end:t.frontier+1})),o.stateAfter=Yn(t.mode,r)}else jr(e,o,r),o.stateAfter=t.frontier%5==0?Yn(t.mode,r):null;++t.frontier;if(+(new Date)>n)return Z(e,e.options.workDelay),!0}),i.length&&Nt(e,function(){for(var e=0;e<i.length;++e)Lt(this,i[e].start,i[e].end)})()}function tt(e,t){var n,r,i=e.doc;for(var s=t,o=t-100;s>o;--s){if(s<=i.first)return i.first;var u=ni(i,s-1);if(u.stateAfter)return s;var a=Fi(u.text,null,e.options.tabSize);if(r==null||n>a)r=s-1,n=a}return r}function nt(e,t){var n=e.doc,r=e.display;if(!n.mode.startState)return!0;var i=tt(e,t),s=i>n.first&&ni(n,i-1).stateAfter;return s?s=Yn(n.mode,s):s=Zn(n.mode),n.iter(i,t,function(o){jr(e,o,s);var u=i==t-1||i%5==0||i>=r.showingFrom&&i<r.showingTo;o.stateAfter=u?Yn(n.mode,s):null,++i}),s}function rt(e){return e.lineSpace.offsetTop}function it(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function st(e){var t=es(e.measure,Yi("pre",null,null,"text-align: left")).appendChild(Yi("span","x"));return t.offsetLeft}function ot(e,t,n,r){var i=-1;r=r||at(e,t);for(var s=n;;s+=i){var o=r[s];if(o)break;i<0&&s==0&&(i=1)}return{left:s<n?o.right:o.left,right:s>n?o.left:o.right,top:o.top,bottom:o.bottom}}function ut(e,t){var n=e.display.measureLineCache;for(var r=0;r<n.length;++r){var i=n[r];if(i.text==t.text&&i.markedSpans==t.markedSpans&&e.display.scroller.clientWidth==i.width&&i.classes==t.textClass+"|"+t.bgClass+"|"+t.wrapClass)return i.measure}}function at(e,t){var n=ut(e,t);if(!n){n=ft(e,t);var r=e.display.measureLineCache,i={text:t.text,width:e.display.scroller.clientWidth,markedSpans:t.markedSpans,measure:n,classes:t.textClass+"|"+t.bgClass+"|"+t.wrapClass};r.length==16?r[++e.display.measureLineCachePos%16]=i:r.push(i)}return n}function ft(e,i){var s=e.display,o=Vi(i.text.length),u=qr(e,i,o);if(t&&!n&&!e.options.lineWrapping&&u.childNodes.length>100){var a=document.createDocumentFragment(),f=10,l=u.childNodes.length;for(var c=0,h=Math.ceil(l/f);c<h;++c){var p=Yi("div",null,null,"display: inline-block");for(var d=0;d<f&&l;++d)p.appendChild(u.firstChild),--l;a.appendChild(p)}u.appendChild(a)}es(s.measure,u);var v=ns(s.lineDiv),m=[],g=Vi(i.text.length),y=u.offsetHeight;r&&s.measure.first!=u&&es(s.measure,u);for(var c=0,b;c<o.length;++c)if(b=o[c]){var w=ns(b),E=Math.max(0,w.top-v.top),S=Math.min(w.bottom-v.top,y);for(var d=0;d<m.length;d+=2){var x=m[d],T=m[d+1];if(x>S||T<E)continue;if(x<=E&&T>=S||E<=x&&S>=T||Math.min(S,T)-Math.max(E,x)>=S-E>>1){m[d]=Math.min(E,x),m[d+1]=Math.max(S,T);break}}d==m.length&&m.push(E,S);var N=w.right;b.measureRight&&(N=ns(b.measureRight).left),g[c]={left:w.left-v.left,right:N-v.left,top:d}}for(var c=0,b;c<g.length;++c)if(b=g[c]){var C=b.top;b.top=m[C],b.bottom=m[C+1]}return g}function lt(e,t){var n=!1;if(t.markedSpans)for(var r=0;r<t.markedSpans;++r){var i=t.markedSpans[r];i.collapsed&&(i.to==null||i.to==t.text.length)&&(n=!0)}var s=!n&&ut(e,t);if(s)return ot(e,t,t.text.length,s).right;var o=qr(e,t),u=o.appendChild(as(e.display.measure));return es(e.display.measure,o),ns(u).right-ns(e.display.lineDiv).left}function ct(e){e.display.measureLineCache.length=e.display.measureLineCachePos=0,e.display.cachedCharWidth=e.display.cachedTextHeight=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ht(e,t,n,r){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var s=Ar(t.widgets[i]);n.top+=s,n.bottom+=s}if(r=="line")return n;r||(r="local");var o=ai(e,t);r!="local"&&(o-=e.display.viewOffset);if(r=="page"){var u=ns(e.display.lineSpace);o+=u.top+(window.pageYOffset||(document.documentElement||document.body).scrollTop);var a=u.left+(window.pageXOffset||(document.documentElement||document.body).scrollLeft);n.left+=a,n.right+=a}return n.top+=o,n.bottom+=o,n}function pt(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;n=="page"&&(r-=window.pageXOffset||(document.documentElement||document.body).scrollLeft,i-=window.pageYOffset||(document.documentElement||document.body).scrollTop);var s=ns(e.display.lineSpace);r-=s.left,i-=s.top;if(n=="local"||!n){var o=ns(e.display.wrapper);r+=o.left,i+=o.top}return{left:r,top:i}}function dt(e,t,n,r){return r||(r=ni(e.doc,t.line)),ht(e,r,ot(e,r,t.ch),n)}function vt(e,t,n,r,i){function s(t,s){var o=ot(e,r,t,i);return s?o.left=o.right:o.right=o.left,ht(e,r,o,n)}r=r||ni(e.doc,t.line),i||(i=at(e,r));var o=fi(r),u=t.ch;if(!o)return s(u);var a,f,l=o[0].level;for(var c=0;c<o.length;++c){var h=o[c],p=h.level%2,d,v;if(h.from<u&&h.to>u)return s(u,p);var m=p?h.to:h.from,g=p?h.from:h.to;if(m==u)c&&h.level<(d=o[c-1]).level?v=s(d.level%2?d.from:d.to-1,!0):v=s(p&&h.from!=h.to?u-1:u),p==l?a=v:f=v;else if(g==u){var d=c<o.length-1&&o[c+1];if(!p&&d&&d.from==d.to)continue;d&&h.level<d.level?v=s(d.level%2?d.to-1:d.from):v=s(p?u:u-1,!0),p==l?a=v:f=v}}return l&&!u&&(f=s(o[0].to-1)),a?(f&&(a.other=f),a):f}function mt(e,t,n){var r=new bn(e,t);return n&&(r.outside=!0),r}function gt(e,t,n){var r=e.doc;n+=e.display.viewOffset;if(n<0)return mt(r.first,0,!0);var i=ui(r,n),s=r.first+r.size-1;if(i>s)return mt(r.first+r.size-1,ni(r,s).text.length,!0);t<0&&(t=0);for(;;){var o=ni(r,i),u=yt(e,o,i,t,n),a=Er(o),f=a&&a.find();if(!(a&&u.ch>=f.from.ch))return u;i=f.to.line}}function yt(e,t,n,r,i){function f(r){var i=vt(e,bn(n,r),"line",t,a);return o=!0,s>i.bottom?i.left-u:s<i.top?i.left+u:(o=!1,i.left)}var s=i-ai(e,t),o=!1,u=2*e.display.wrapper.clientWidth,a=at(e,t),l=fi(t),c=t.text.length,h=ms(t),p=gs(t),d=f(h),v=o,m=f(p),g=o;if(r>m)return mt(n,p,g);for(;;){if(l?p==h||p==ws(t,h,1):p-h<=1){var y=r-d<m-r,b=y?h:p;while(Gi.test(t.text.charAt(b)))++b;var w=mt(n,b,y?v:g);return w.after=y,w}var E=Math.ceil(c/2),S=h+E;if(l){S=h;for(var x=0;x<E;++x)S=ws(t,S,1)}var T=f(S);if(T>r){p=S,m=T;if(g=o)m+=1e3;c-=E}else h=S,d=T,v=o,c=E}}function wt(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(bt==null){bt=Yi("pre");for(var t=0;t<49;++t)bt.appendChild(document.createTextNode("x")),bt.appendChild(Yi("br"));bt.appendChild(document.createTextNode("x"))}es(e.measure,bt);var n=bt.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Zi(e.measure),n||1}function Et(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=Yi("span","x"),n=Yi("pre",[t]);es(e.measure,n);var r=t.offsetWidth;return r>2&&(e.cachedCharWidth=r),r||10}function xt(e){e.curOp={changes:[],updateInput:null,userSelChange:null,textChanged:null,selectionChanged:!1,cursorActivity:!1,updateMaxLine:!1,updateScrollPos:!1,id:++St},Mi++||(Oi=[])}function Tt(e){var t=e.curOp,n=e.doc,r=e.display;e.curOp=null,t.updateMaxLine&&D(e);if(r.maxLineChanged&&!e.options.lineWrapping&&r.maxLine){var i=lt(e,r.maxLine);r.sizer.style.minWidth=Math.max(0,i+3+Hi)+"px",r.maxLineChanged=!1;var s=Math.max(0,r.sizer.offsetLeft+r.sizer.offsetWidth-r.scroller.clientWidth);s<n.scrollLeft&&!t.updateScrollPos&&Xt(e,Math.min(r.scroller.scrollLeft,s),!0)}var o,u;if(t.updateScrollPos)o=t.updateScrollPos;else if(t.selectionChanged&&r.scroller.clientHeight){var a=vt(e,n.sel.head);o=Hn(e,a.left,a.top,a.left,a.bottom)}if(t.changes.length||o&&o.scrollTop!=null)u=R(e,t.changes,o&&o.scrollTop),e.display.scroller.offsetHeight&&(e.doc.scrollTop=e.display.scroller.scrollTop);!u&&t.selectionChanged&&K(e),t.updateScrollPos?(r.scroller.scrollTop=r.scrollbarV.scrollTop=n.scrollTop=o.scrollTop,r.scroller.scrollLeft=r.scrollbarH.scrollLeft=n.scrollLeft=o.scrollLeft,j(e),t.scrollToPos&&Dn(e,Tn(e.doc,t.scrollToPos),t.scrollToPosMargin)):o&&_n(e),t.selectionChanged&&Y(e),e.state.focused&&t.updateInput&&_t(e,t.userSelChange);var f=t.maybeHiddenMarkers,l=t.maybeUnhiddenMarkers;if(f)for(var c=0;c<f.length;++c)f[c].lines.length||Ai(f[c],"hide");if(l)for(var c=0;c<l.length;++c)l[c].lines.length&&Ai(l[c],"unhide");var h;--Mi||(h=Oi,Oi=null),t.textChanged&&Ai(e,"change",e,t.textChanged),t.cursorActivity&&Ai(e,"cursorActivity",e);if(h)for(var c=0;c<h.length;++c)h[c]()}function Nt(e,t){return function(){var n=e||this,r=!n.curOp;r&&xt(n);try{var i=t.apply(n,arguments)}finally{r&&Tt(n)}return i}}function Ct(e){return function(){var t=this.cm&&!this.cm.curOp,n;t&&xt(this.cm);try{n=e.apply(this,arguments)}finally{t&&Tt(this.cm)}return n}}function kt(e,t){var n=!e.curOp,r;n&&xt(e);try{r=t()}finally{n&&Tt(e)}return r}function Lt(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),e.curOp.changes.push({from:t,to:n,diff:r})}function At(e){if(e.display.pollingFast)return;e.display.poll.set(e.options.pollInterval,function(){Mt(e),e.state.focused&&At(e)})}function Ot(e){function n(){var r=Mt(e);!r&&!t?(t=!0,e.display.poll.set(60,n)):(e.display.pollingFast=!1,At(e))}var t=!1;e.display.pollingFast=!0,e.display.poll.set(20,n)}function Mt(e){var n=e.display.input,r=e.display.prevInput,i=e.doc,s=i.sel;if(!e.state.focused||ls(n)||Pt(e))return!1;var o=n.value;if(o==r&&wn(s.from,s.to))return!1;if(t&&o&&n.selectionStart===0)return _t(e,!0),!1;var u=!e.curOp;u&&xt(e),s.shift=!1;var a=0,f=Math.min(r.length,o.length);while(a<f&&r[a]==o[a])++a;var l=s.from,c=s.to;a<r.length?l=bn(l.line,l.ch-(r.length-a)):e.state.overwrite&&wn(l,c)&&!e.state.pasteIncoming&&(c=bn(c.line,Math.min(ni(i,c.line).text.length,c.ch+(o.length-a))));var h=e.curOp.updateInput;return hn(e.doc,{from:l,to:c,text:fs(o.slice(a)),origin:e.state.pasteIncoming?"paste":"+input"},"end"),e.curOp.updateInput=h,o.length>1e3||o.indexOf("\n")>-1?n.value=e.display.prevInput="":e.display.prevInput=o,u&&Tt(e),e.state.pasteIncoming=!1,!0}function _t(e,t){var n,r,i=e.doc;wn(i.sel.from,i.sel.to)?t&&(e.display.prevInput=e.display.input.value=""):(e.display.prevInput="",n=cs&&(i.sel.to.line-i.sel.from.line>100||(r=e.getSelection()).length>1e3),n?e.display.input.value="-":e.display.input.value=r||e.getSelection(),e.state.focused&&Ui(e.display.input)),e.display.inaccurateSelection=n}function Dt(e){e.options.readOnly!="nocursor"&&(!d||document.activeElement!=e.display.input)&&e.display.input.focus()}function Pt(e){return e.options.readOnly||e.doc.cantEdit}function Ht(e){function n(){e.state.focused&&setTimeout($i(Dt,e),0)}function r(){t.cachedCharWidth=t.cachedTextHeight=null,ct(e),kt(e,$i(Lt,e))}function i(){for(var e=t.wrapper.parentNode;e&&e!=document.body;e=e.parentNode);e?setTimeout(i,5e3):Li(window,"resize",r)}function s(t){if(e.options.onDragEvent&&e.options.onDragEvent(e,Ei(t)))return;Ti(t)}function o(){t.inaccurateSelection&&(t.prevInput="",t.inaccurateSelection=!1,t.input.value=e.getSelection(),Ui(t.input))}var t=e.display;ki(t.scroller,"mousedown",Nt(e,qt)),ki(t.scroller,"dblclick",Nt(e,Si)),ki(t.lineSpace,"selectstart",function(e){Bt(t,e)||Si(e)}),b||ki(t.scroller,"contextmenu",function(t){un(e,t)}),ki(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Wt(e,t.scroller.scrollTop),Xt(e,t.scroller.scrollLeft,!0),Ai(e,"scroll",e))}),ki(t.scrollbarV,"scroll",function(){t.scroller.clientHeight&&Wt(e,t.scrollbarV.scrollTop)}),ki(t.scrollbarH,"scroll",function(){t.scroller.clientHeight&&Xt(e,t.scrollbarH.scrollLeft)}),ki(t.scroller,"mousewheel",function(t){Jt(e,t)}),ki(t.scroller,"DOMMouseScroll",function(t){Jt(e,t)}),ki(t.scrollbarH,"mousedown",n),ki(t.scrollbarV,"mousedown",n),ki(t.wrapper,"scroll",function(){t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),ki(window,"resize",r),setTimeout(i,5e3),ki(t.input,"keyup",Nt(e,function(t){if(e.options.onKeyEvent&&e.options.onKeyEvent(e,Ei(t)))return;t.keyCode==16&&(e.doc.sel.shift=!1)})),ki(t.input,"input",$i(Ot,e)),ki(t.input,"keydown",Nt(e,tn)),ki(t.input,"keypress",Nt(e,nn)),ki(t.input,"focus",$i(rn,e)),ki(t.input,"blur",$i(sn,e)),e.options.dragDrop&&(ki(t.scroller,"dragstart",function(t){zt(e,t)}),ki(t.scroller,"dragenter",s),ki(t.scroller,"dragover",s),ki(t.scroller,"drop",Nt(e,Rt))),ki(t.scroller,"paste",function(n){if(Bt(t,n))return;Dt(e),Ot(e)}),ki(t.input,"paste",function(){e.state.pasteIncoming=!0,Ot(e)}),ki(t.input,"cut",o),ki(t.input,"copy",o),f&&ki(t.sizer,"mouseup",function(){document.activeElement==t.input&&t.input.blur(),Dt(e)})}function Bt(e,t){for(var n=Ni(t);n!=e.wrapper;n=n.parentNode){if(!n)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(n.className)||n.parentNode==e.sizer&&n!=e.mover)return!0}}function jt(e,t,n){var r=e.display;if(!n){var i=Ni(t);if(i==r.scrollbarH||i==r.scrollbarH.firstChild||i==r.scrollbarV||i==r.scrollbarV.firstChild||i==r.scrollbarFiller)return null}var s,o,u=ns(r.lineSpace);try{s=t.clientX,o=t.clientY}catch(t){return null}return gt(e,s-u.left,o-u.top)}function qt(e){function v(e){if(f=="single"){kn(n.doc,Tn(s,u),e);return}p=Tn(s,p),d=Tn(s,d);if(f=="double"){var t=Un(ni(s,e.line).text,e);En(e,p)?kn(n.doc,t.from,d):kn(n.doc,p,t.to)}else f=="triple"&&(En(e,p)?kn(n.doc,d,Tn(s,bn(e.line,0))):kn(n.doc,p,Tn(s,bn(e.line+1,0))))}function y(e){var t=++g,i=jt(n,e,!0);if(!i)return;if(!wn(i,c)){n.state.focused||rn(n),c=i,v(i);var o=B(r,s);(i.line>=o.to||i.line<o.from)&&setTimeout(Nt(n,function(){g==t&&y(e)}),150)}else{var u=e.clientY<m.top?-20:e.clientY>m.bottom?20:0;u&&setTimeout(Nt(n,function(){if(g!=t)return;r.scroller.scrollTop+=u,y(e)}),50)}}function w(e){g=Infinity;var t=jt(n,e);t&&v(t),Si(e),Dt(n),Li(document,"mousemove",E),Li(document,"mouseup",S)}var n=this,r=n.display,s=n.doc,o=s.sel;o.shift=e.shiftKey;if(Bt(r,e)){i||(r.scroller.draggable=!1,setTimeout(function(){r.scroller.draggable=!0},100));return}if(Ut(n,e))return;var u=jt(n,e);switch(Ci(e)){case 3:b&&un.call(n,n,e);return;case 2:u&&kn(n.doc,u),setTimeout($i(Dt,n),20),Si(e);return}if(!u){Ni(e)==r.scroller&&Si(e);return}n.state.focused||rn(n);var a=+(new Date),f="single";if(It&&It.time>a-400&&wn(It.pos,u))f="triple",Si(e),setTimeout($i(Dt,n),20),zn(n,u.line);else if(Ft&&Ft.time>a-400&&wn(Ft.pos,u)){f="double",It={time:a,pos:u},Si(e);var l=Un(ni(s,u.line).text,u);kn(n.doc,l.from,l.to)}else Ft={time:a,pos:u};var c=u;if(n.options.dragDrop&&rs&&!Pt(n)&&!wn(o.from,o.to)&&!En(u,o.from)&&!En(o.to,u)&&f=="single"){var h=Nt(n,function(t){i&&(r.scroller.draggable=!1),n.state.draggingText=!1,Li(document,"mouseup",h),Li(r.scroller,"drop",h),Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)<10&&(Si(t),kn(n.doc,u),Dt(n))});i&&(r.scroller.draggable=!0),n.state.draggingText=h,r.scroller.dragDrop&&r.scroller.dragDrop(),ki(document,"mouseup",h),ki(r.scroller,"drop",h);return}Si(e),f=="single"&&kn(n.doc,Tn(s,u));var p=o.from,d=o.to,m=ns(r.wrapper),g=0,E=Nt(n,function(e){!t&&!Ci(e)?w(e):y(e)}),S=Nt(n,w);ki(document,"mousemove",E),ki(document,"mouseup",S)}function Rt(e){var t=this;if(Bt(t.display,e)||t.options.onDragEvent&&t.options.onDragEvent(t,Ei(e)))return;Si(e);var n=jt(t,e,!0),r=e.dataTransfer.files;if(!n||Pt(t))return;if(r&&r.length&&window.FileReader&&window.File){var i=r.length,s=Array(i),o=0,u=function(e,r){var u=new FileReader;u.onload=function(){s[r]=u.result,++o==i&&(n=Tn(t.doc,n),hn(t.doc,{from:n,to:n,text:fs(s.join("\n")),origin:"paste"},"around"))},u.readAsText(e)};for(var a=0;a<i;++a)u(r[a],a)}else{if(t.state.draggingText&&!En(n,t.doc.sel.from)&&!En(t.doc.sel.to,n)){t.state.draggingText(e),setTimeout($i(Dt,t),20);return}try{var s=e.dataTransfer.getData("Text");if(s){var f=t.doc.sel.from,l=t.doc.sel.to;An(t.doc,n,n),t.state.draggingText&&yn(t.doc,"",f,l,"paste"),t.replaceSelection(s,null,"paste"),Dt(t),rn(t)}}catch(e){}}}function Ut(e,t){var n=e.display;try{var r=t.clientX,i=t.clientY}catch(t){return!1}if(r>=Math.floor(ns(n.gutters).right))return!1;Si(t);if(!Pi(e,"gutterClick"))return!0;var s=ns(n.lineDiv);if(i>s.bottom)return!0;i-=s.top-n.viewOffset;for(var o=0;o<e.options.gutters.length;++o){var u=n.gutters.childNodes[o];if(u&&ns(u).right>=r){var a=ui(e.doc,i),f=e.options.gutters[o];_i(e,"gutterClick",e,a,f,t);break}}return!0}function zt(e,t){if(Bt(e.display,t))return;var n=e.getSelection();t.dataTransfer.setData("Text",n);if(t.dataTransfer.setDragImage){var r=Yi("img",null,null,"position: fixed; left: 0; top: 0;");u&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),a&&(e.display.dragImg?r=e.display.dragImg:(e.display.dragImg=r,r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",e.display.wrapper.appendChild(r))),t.dataTransfer.setDragImage(r,0,0),u&&r.parentNode.removeChild(r)}}function Wt(t,n){if(Math.abs(t.doc.scrollTop-n)<2)return;t.doc.scrollTop=n,e||R(t,[],n),t.display.scroller.scrollTop!=n&&(t.display.scroller.scrollTop=n),t.display.scrollbarV.scrollTop!=n&&(t.display.scrollbarV.scrollTop=n),e&&R(t,[])}function Xt(e,t,n){if(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)return;t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,j(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbarH.scrollLeft!=t&&(e.display.scrollbarH.scrollLeft=t)}function Jt(t,n){var r=n.wheelDeltaX,s=n.wheelDeltaY;r==null&&n.detail&&n.axis==n.HORIZONTAL_AXIS&&(r=n.detail),s==null&&n.detail&&n.axis==n.VERTICAL_AXIS?s=n.detail:s==null&&(s=n.wheelDelta);var o=t.display,a=o.scroller;if(!(r&&a.scrollWidth>a.clientWidth||s&&a.scrollHeight>a.clientHeight))return;if(s&&v&&i)for(var f=n.target;f!=a;f=f.parentNode)if(f.lineObj){t.display.currentWheelTarget=f;break}if(r&&!e&&!u&&$t!=null){s&&Wt(t,Math.max(0,Math.min(a.scrollTop+s*$t,a.scrollHeight-a.clientHeight))),Xt(t,Math.max(0,Math.min(a.scrollLeft+r*$t,a.scrollWidth-a.clientWidth))),Si(n),o.wheelStartX=null;return}if(s&&$t!=null){var l=s*$t,c=t.doc.scrollTop,h=c+o.wrapper.clientHeight;l<0?c=Math.max(0,c+l-50):h=Math.min(t.doc.height,h+l+50),R(t,[],{top:c,bottom:h})}Vt<20&&(o.wheelStartX==null?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=s,setTimeout(function(){if(o.wheelStartX==null)return;var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null;if(!n)return;$t=($t*Vt+n)/(Vt+1),++Vt},200)):(o.wheelDX+=r,o.wheelDY+=s))}function Kt(e,t,n){if(typeof t=="string"){t=er[t];if(!t)return!1}e.display.pollingFast&&Mt(e)&&(e.display.pollingFast=!1);var r=e.doc,i=r.sel.shift,s=!1;try{Pt(e)&&(e.state.suppressEdits=!0),n&&(r.sel.shift=!1),s=t(e)!=Bi}finally{r.sel.shift=i,e.state.suppressEdits=!1}return s}function Qt(e){var t=e.state.keyMaps.slice(0);return e.options.extraKeys&&t.push(e.options.extraKeys),t.push(e.options.keyMap),t}function Yt(e,t){var n=nr(e.options.keyMap),i=n.auto;clearTimeout(Gt),i&&!ir(t)&&(Gt=setTimeout(function(){nr(e.options.keyMap)==n&&(e.options.keyMap=i.call?i.call(null,e):i)},50));var s=sr(t,!0),o=!1;if(!s)return!1;var u=Qt(e);return t.shiftKey?o=rr("Shift-"+s,u,function(t){return Kt(e,t,!0)})||rr(s,u,function(t){if(typeof t=="string"&&/^go[A-Z]/.test(t))return Kt(e,t)}):o=rr(s,u,function(t){return Kt(e,t)}),o=="stop"&&(o=!1),o&&(Si(t),Y(e),r&&(t.oldKeyCode=t.keyCode,t.keyCode=0)),o}function Zt(e,t,n){var r=rr("'"+n+"'",Qt(e),function(t){return Kt(e,t,!0)});return r&&(Si(t),Y(e)),r}function tn(e){var n=this;n.state.focused||rn(n),t&&e.keyCode==27&&(e.returnValue=!1);if(n.options.onKeyEvent&&n.options.onKeyEvent(n,Ei(e)))return;var r=e.keyCode;n.doc.sel.shift=r==16||e.shiftKey;var i=Yt(n,e);u&&(en=i?r:null,!i&&r==88&&!cs&&(v?e.metaKey:e.ctrlKey)&&n.replaceSelection(""))}function nn(e){var t=this;if(t.options.onKeyEvent&&t.options.onKeyEvent(t,Ei(e)))return;var n=e.keyCode,r=e.charCode;if(u&&n==en){en=null,Si(e);return}if((u&&(!e.which||e.which<10)||f)&&Yt(t,e))return;var i=String.fromCharCode(r==null?n:r);this.options.electricChars&&this.doc.mode.electricChars&&this.options.smartIndent&&!Pt(this)&&this.doc.mode.electricChars.indexOf(i)>-1&&setTimeout(Nt(t,function(){Fn(t,t.doc.sel.to.line,"smart")}),75);if(Zt(t,e,i))return;Ot(t)}function rn(e){if(e.options.readOnly=="nocursor")return;e.state.focused||(Ai(e,"focus",e),e.state.focused=!0,e.display.wrapper.className.search(/\bCodeMirror-focused\b/)==-1&&(e.display.wrapper.className+=" CodeMirror-focused"),_t(e,!0)),At(e),Y(e)}function sn(e){e.state.focused&&(Ai(e,"blur",e),e.state.focused=!1,e.display.wrapper.className=e.display.wrapper.className.replace(" CodeMirror-focused","")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.doc.sel.shift=!1)},150)}function un(e,n){function l(){i.inputDiv.style.position="relative",i.input.style.cssText=f,r&&(i.scrollbarV.scrollTop=i.scroller.scrollTop=a),At(e);if(i.input.selectionStart!=null&&(!t||r)){clearTimeout(on);var n=i.input.value=" "+(wn(s.from,s.to)?"":i.input.value),o=0;i.prevInput=" ",i.input.selectionStart=1,i.input.selectionEnd=n.length;var u=function(){i.prevInput==" "&&i.input.selectionStart==0?Nt(e,er.selectAll)(e):o++<10?on=setTimeout(u,500):_t(e)};on=setTimeout(u,200)}}var i=e.display,s=e.doc.sel;if(Bt(i,n))return;var o=jt(e,n),a=i.scroller.scrollTop;if(!o||u)return;(wn(s.from,s.to)||En(o,s.from)||!En(o,s.to))&&Nt(e,An)(e.doc,o,o);var f=i.input.style.cssText;i.inputDiv.style.position="absolute",i.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(n.clientY-5)+"px; left: "+(n.clientX-5)+"px; z-index: 1000; background: white; outline: none;"+"border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);",Dt(e),_t(e,!0),wn(s.from,s.to)&&(i.input.value=i.prevInput=" ");if(b){Ti(n);var c=function(){Li(window,"mouseup",c),setTimeout(l,20)};ki(window,"mouseup",c)}else setTimeout(l,50)}function an(e){return e.text?bn(e.from.line+e.text.length-1,Ri(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function fn(e,t,n){if(!En(t.from,n))return Tn(e,n);var r=t.text.length-1-(t.to.line-t.from.line);if(n.line>t.to.line+r){var i=n.line-r,s=e.first+e.size-1;return i>s?bn(s,ni(e,s).text.length):Nn(n,ni(e,i).text.length)}if(n.line==t.to.line+r)return Nn(n,Ri(t.text).length+(t.text.length==1?t.from.ch:0)+ni(e,t.to.line).text.length-t.to.ch);var o=n.line-t.from.line;return Nn(n,t.text[o].length+(o?0:t.from.ch))}function ln(e,t,n){if(n&&typeof n=="object")return{anchor:fn(e,t,n.anchor),head:fn(e,t,n.head)};if(n=="start")return{anchor:t.from,head:t.from};var r=an(t);if(n=="around")return{anchor:t.from,head:r};if(n=="end")return{anchor +:r,head:r};var i=function(e){if(En(e,t.from))return e;if(!En(t.to,e))return r;var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=r.ch-t.to.ch),bn(n,i)};return{anchor:i(e.sel.anchor),head:i(e.sel.head)}}function cn(e,t){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,update:function(t,n,r,i){t&&(this.from=Tn(e,t)),n&&(this.to=Tn(e,n)),r&&(this.text=r),i!==undefined&&(this.origin=i)},cancel:function(){this.canceled=!0}};return Ai(e,"beforeChange",e,n),e.cm&&Ai(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function hn(e,t,n,r){if(e.cm){if(!e.cm.curOp)return Nt(e.cm,hn)(e,t,n,r);if(e.cm.state.suppressEdits)return}if(Pi(e,"beforeChange")||e.cm&&Pi(e.cm,"beforeChange")){t=cn(e,t);if(!t)return}var i=w&&!r&&yr(e,t.from,t.to);if(i){for(var s=i.length-1;s>=1;--s)pn(e,{from:i[s].from,to:i[s].to,text:[""]});i.length&&pn(e,{from:i[0].from,to:i[0].to,text:t.text},n)}else pn(e,t,n)}function pn(e,t,n){var r=ln(e,t,n);pi(e,t,r,e.cm?e.cm.curOp.id:NaN),mn(e,t,r,mr(e,t));var i=[];ei(e,function(e,n){!n&&zi(i,e.history)==-1&&(bi(e.history,t),i.push(e.history)),mn(e,t,null,mr(e,t))})}function dn(e,t){if(e.cm&&e.cm.state.suppressEdits)return;var n=e.history,r=(t=="undo"?n.done:n.undone).pop();if(!r)return;n.dirtyCounter+=t=="undo"?-1:1;var i={changes:[],anchorBefore:r.anchorAfter,headBefore:r.headAfter,anchorAfter:r.anchorBefore,headAfter:r.headBefore};(t=="undo"?n.undone:n.done).push(i);for(var s=r.changes.length-1;s>=0;--s){var o=r.changes[s];o.origin=t,i.changes.push(hi(e,o));var u=s?ln(e,o,null):{anchor:r.anchorBefore,head:r.headBefore};mn(e,o,u,gr(e,o));var a=[];ei(e,function(e,t){!t&&zi(a,e.history)==-1&&(bi(e.history,o),a.push(e.history)),mn(e,o,null,gr(e,o))})}}function vn(e,t){function n(e){return bn(e.line+t,e.ch)}e.first+=t,e.cm&&Lt(e.cm,e.first,e.first,t),e.sel.head=n(e.sel.head),e.sel.anchor=n(e.sel.anchor),e.sel.from=n(e.sel.from),e.sel.to=n(e.sel.to)}function mn(e,t,n,r){if(e.cm&&!e.cm.curOp)return Nt(e.cm,mn)(e,t,n,r);if(t.to.line<e.first){vn(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);vn(e,i),t={from:bn(e.first,0),to:bn(t.to.line+i,t.to.ch),text:[Ri(t.text)],origin:t.origin}}var s=e.lastLine();t.to.line>s&&(t={from:t.from,to:bn(s,ni(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ri(e,t.from,t.to),n||(n=ln(e,t,null)),e.cm?gn(e.cm,t,r,n):$r(e,t,r,n)}function gn(e,t,n,r){var i=e.doc,s=e.display,o=t.from,u=t.to,a=!1,f=o.line;e.options.lineWrapping||(f=oi(Sr(i,ni(i,o.line))),i.iter(f,u.line+1,function(e){if(e==s.maxLine)return a=!0,!0})),!En(i.sel.head,t.from)&&!En(t.to,i.sel.head)&&(e.curOp.cursorActivity=!0),$r(i,t,n,r,C(e)),e.options.lineWrapping||(i.iter(f,o.line+t.text.length,function(e){var t=_(i,e);t>s.maxLineLength&&(s.maxLine=e,s.maxLineLength=t,s.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,o.line),Z(e,400);var l=t.text.length-(u.line-o.line)-1;Lt(e,o.line,u.line+1,l);if(Pi(e,"change")){var c={from:o,to:u,text:t.text,removed:t.removed,origin:t.origin};if(e.curOp.textChanged){for(var h=e.curOp.textChanged;h.next;h=h.next);h.next=c}else e.curOp.textChanged=c}}function yn(e,t,n,r,i){r||(r=n);if(En(r,n)){var s=r;r=n,n=s}typeof t=="string"&&(t=fs(t)),hn(e,{from:n,to:r,text:t,origin:i},null)}function bn(e,t){if(!(this instanceof bn))return new bn(e,t);this.line=e,this.ch=t}function wn(e,t){return e.line==t.line&&e.ch==t.ch}function En(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function Sn(e){return bn(e.line,e.ch)}function xn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Tn(e,t){if(t.line<e.first)return bn(e.first,0);var n=e.first+e.size-1;return t.line>n?bn(n,ni(e,n).text.length):Nn(t,ni(e,t.line).text.length)}function Nn(e,t){var n=e.ch;return n==null||n>t?bn(e.line,t):n<0?bn(e.line,0):e}function Cn(e,t){return t>=e.first&&t<e.first+e.size}function kn(e,t,n,r){if(e.sel.shift||e.sel.extend){var i=e.sel.anchor;if(n){var s=En(t,i);s!=En(n,i)?(i=t,t=n):s!=En(t,n)&&(t=n)}An(e,i,t,r)}else An(e,t,n||t,r);e.cm&&(e.cm.curOp.userSelChange=!0)}function Ln(e,t,n){var r={anchor:t,head:n};return Ai(e,"beforeSelectionChange",e,r),e.cm&&Ai(e.cm,"beforeSelectionChange",e.cm,r),r.anchor=Tn(e,r.anchor),r.head=Tn(e,r.head),r}function An(e,t,n,r,i){if(!i&&Pi(e,"beforeSelectionChange")||e.cm&&Pi(e.cm,"beforeSelectionChange")){var s=Ln(e,t,n);n=s.head,t=s.anchor}var o=e.sel;o.goalColumn=null;if(i||!wn(t,o.anchor))t=Mn(e,t,r,i!="push");if(i||!wn(n,o.head))n=Mn(e,n,r,i!="push");if(wn(o.anchor,t)&&wn(o.head,n))return;o.anchor=t,o.head=n;var u=En(n,t);o.from=u?n:t,o.to=u?t:n,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=e.cm.curOp.cursorActivity=!0),_i(e,"cursorActivity",e)}function On(e){An(e.doc,e.doc.sel.from,e.doc.sel.to,null,"push")}function Mn(e,t,n,r){var i=!1,s=t,o=n||1;e.cantEdit=!1;e:for(;;){var u=ni(e,s.line);if(u.markedSpans)for(var a=0;a<u.markedSpans.length;++a){var f=u.markedSpans[a],l=f.marker;if((f.from==null||(l.inclusiveLeft?f.from<=s.ch:f.from<s.ch))&&(f.to==null||(l.inclusiveRight?f.to>=s.ch:f.to>s.ch))){if(r){Ai(l,"beforeCursorEnter");if(l.explicitlyCleared){if(!u.markedSpans)break;--a;continue}}if(!l.atomic)continue;var c=l.find()[o<0?"from":"to"];if(wn(c,s)){c.ch+=o,c.ch<0?c.line>e.first?c=Tn(e,bn(c.line-1)):c=null:c.ch>u.text.length&&(c.line<e.first+e.size-1?c=bn(c.line+1,0):c=null);if(!c){if(i)return r?(e.cantEdit=!0,bn(e.first,0)):Mn(e,t,n,!0);i=!0,c=t,o=-o}}s=c;continue e}}return s}}function _n(e){var t=Dn(e,e.doc.sel.head);if(!e.state.focused)return;var n=e.display,r=ns(n.sizer),i=null,s=rt(e.display);t.top+s+r.top<0?i=!0:t.bottom+s+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1);if(i!=null&&!h){var o=n.cursor.style.display=="none";o&&(n.cursor.style.display="",n.cursor.style.left=t.left+"px",n.cursor.style.top=t.top-n.viewOffset+"px"),n.cursor.scrollIntoView(i),o&&(n.cursor.style.display="none")}}function Dn(e,t,n){n==null&&(n=0);for(;;){var r=!1,i=vt(e,t),s=Hn(e,i.left,i.top-n,i.left,i.bottom+n),o=e.doc.scrollTop,u=e.doc.scrollLeft;s.scrollTop!=null&&(Wt(e,s.scrollTop),Math.abs(e.doc.scrollTop-o)>1&&(r=!0)),s.scrollLeft!=null&&(Xt(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(r=!0));if(!r)return i}}function Pn(e,t,n,r,i){var s=Hn(e,t,n,r,i);s.scrollTop!=null&&Wt(e,s.scrollTop),s.scrollLeft!=null&&Xt(e,s.scrollLeft)}function Hn(e,t,n,r,i){var s=e.display,o=rt(s);n+=o,i+=o,n<0&&(n=0);var u=s.scroller.clientHeight-Hi,a=s.scroller.scrollTop,f={},l=e.doc.height+it(s),c=n<o+10,h=i+o>l-10;if(n<a)f.scrollTop=c?0:n;else if(i>a+u){var p=Math.min(n,(h?l:i)-u);p!=a&&(f.scrollTop=p)}var d=s.scroller.clientWidth-Hi,v=s.scroller.scrollLeft;t+=s.gutters.offsetWidth,r+=s.gutters.offsetWidth;var m=s.gutters.offsetWidth,g=t<m+10;return t<v+m||g?(g&&(t=0),f.scrollLeft=Math.max(0,t-10-m)):r>d+v-3&&(f.scrollLeft=r+10-d),f}function Bn(e,t,n){e.curOp.updateScrollPos={scrollLeft:t==null?e.doc.scrollLeft:t,scrollTop:n==null?e.doc.scrollTop:n}}function jn(e,t,n){var r=e.curOp.updateScrollPos||(e.curOp.updateScrollPos={scrollLeft:e.doc.scrollLeft,scrollTop:e.doc.scrollTop}),i=e.display.scroller;r.scrollTop=Math.max(0,Math.min(i.scrollHeight-i.clientHeight,r.scrollTop+n)),r.scrollLeft=Math.max(0,Math.min(i.scrollWidth-i.clientWidth,r.scrollLeft+t))}function Fn(e,t,n,r){var i=e.doc;n||(n="add");if(n=="smart")if(!e.doc.mode.indent)n="prev";else var s=nt(e,t);var o=e.options.tabSize,u=ni(i,t),a=Fi(u.text,null,o),f=u.text.match(/^\s*/)[0],l;if(n=="smart"){l=e.doc.mode.indent(s,u.text.slice(f.length),u.text);if(l==Bi){if(!r)return;n="prev"}}n=="prev"?t>i.first?l=Fi(ni(i,t-1).text,null,o):l=0:n=="add"?l=a+e.options.indentUnit:n=="subtract"&&(l=a-e.options.indentUnit),l=Math.max(0,l);var c="",h=0;if(e.options.indentWithTabs)for(var p=Math.floor(l/o);p;--p)h+=o,c+=" ";h<l&&(c+=qi(l-h)),c!=f&&yn(e.doc,c,bn(t,0),bn(t,f.length),"+input"),u.stateAfter=null}function In(e,t,n){var r=t,i=t,s=e.doc;return typeof t=="number"?i=ni(s,xn(s,t)):r=oi(t),r==null?null:n(i,r)?(Lt(e,r,r+1),i):null}function qn(e,t,n,r,i){function f(){var t=s+n;return t<e.first||t>=e.first+e.size?a=!1:(s=t,u=ni(e,t))}function l(e){var t=(i?ws:Es)(u,o,n,!0);if(t==null){if(!!e||!f())return a=!1;i?o=(n<0?gs:ms)(u):o=n<0?u.text.length:0}else o=t;return!0}var s=t.line,o=t.ch,u=ni(e,s),a=!0;if(r=="char")l();else if(r=="column")l(!0);else if(r=="word"||r=="group"){var c=null,h=r=="group";for(var p=!0;;p=!1){if(n<0&&!l(!p))break;var d=u.text.charAt(o)||"\n",v=Ki(d)?"w":h?/\s/.test(d)?null:"p":null;if(c&&c!=v){n<0&&(n=1,l());break}v&&(c=v);if(n>0&&!l(!p))break}}var m=Mn(e,bn(s,o),n,!0);return a||(m.hitSide=!0),m}function Rn(e,t,n,r){var i=e.doc,s=t.left,o;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);o=t.top+n*(u-(n<0?1.5:.5)*wt(e.display))}else r=="line"&&(o=n>0?t.bottom+3:t.top-3);for(;;){var a=gt(e,s,o);if(!a.outside)break;if(n<0?o<=0:o>=i.height){a.hitSide=!0;break}o+=n*5}return a}function Un(e,t){var n=t.ch,r=t.ch;if(e){t.after===!1||r==e.length?--n:++r;var i=e.charAt(n),s=Ki(i)?Ki:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!Ki(e)};while(n>0&&s(e.charAt(n-1)))--n;while(r<e.length&&s(e.charAt(r)))++r}return{from:bn(t.line,n),to:bn(t.line,r)}}function zn(e,t){kn(e.doc,bn(t,0),Tn(e.doc,bn(t+1,0)))}function Vn(e,t,n,r){S.defaults[e]=t,n&&(Wn[e]=r?function(e,t,r){r!=$n&&n(e,t,r)}:n)}function Yn(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Zn(e,t,n){return e.startState?e.startState(t,n):!0}function nr(e){return typeof e=="string"?tr[e]:e}function rr(e,t,n){function r(t){t=nr(t);var i=t[e];if(i===!1)return"stop";if(i!=null&&n(i))return!0;if(t.nofallthrough)return"stop";var s=t.fallthrough;if(s==null)return!1;if(Object.prototype.toString.call(s)!="[object Array]")return r(s);for(var o=0,u=s.length;o<u;++o){var a=r(s[o]);if(a)return a}return!1}for(var i=0;i<t.length;++i){var s=r(t[i]);if(s)return s}}function ir(e){var t=hs[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function sr(e,t){if(u&&e.keyCode==34&&e["char"])return!1;var n=hs[e.keyCode];if(n==null||e.altGraphKey)return!1;e.altKey&&(n="Alt-"+n);if(y?e.metaKey:e.ctrlKey)n="Ctrl-"+n;if(y?e.ctrlKey:e.metaKey)n="Cmd-"+n;return!t&&e.shiftKey&&(n="Shift-"+n),n}function or(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0}function ur(e,t){this.lines=[],this.type=t,this.doc=e}function ar(e,t,n,r,i){if(r&&r.shared)return lr(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Nt(e.cm,ar)(e,t,n,r,i);var s=new ur(e,i);if(i=="range"&&!En(t,n))return s;r&&Xi(r,s),s.replacedWith&&(s.collapsed=!0,s.replacedWith=Yi("span",[s.replacedWith],"CodeMirror-widget")),s.collapsed&&(E=!0),s.addToHistory&&pi(e,{from:t,to:n,origin:"markText"},{head:e.sel.head,anchor:e.sel.anchor},NaN);var o=t.line,u=0,a,f,l=e.cm,c;e.iter(o,n.line+1,function(r){l&&s.collapsed&&!l.options.lineWrapping&&Sr(e,r)==l.display.maxLine&&(c=!0);var i={from:null,to:null,marker:s};u+=r.text.length,o==t.line&&(i.from=t.ch,u-=t.ch),o==n.line&&(i.to=n.ch,u-=r.text.length-n.ch),s.collapsed&&(o==n.line&&(f=br(r,n.ch)),o==t.line?a=br(r,t.ch):si(r,0)),pr(r,i),++o}),s.collapsed&&e.iter(t.line,n.line+1,function(t){xr(e,t)&&si(t,0)}),s.clearOnEnter&&ki(s,"beforeCursorEnter",function(){s.clear()}),s.readOnly&&(w=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory());if(s.collapsed){if(a!=f)throw new Error("Inserting collapsed marker overlapping an existing one");s.size=u,s.atomic=!0}return l&&(c&&(l.curOp.updateMaxLine=!0),(s.className||s.startStyle||s.endStyle||s.collapsed)&&Lt(l,t.line,n.line+1),s.atomic&&On(l)),s}function fr(e,t){this.markers=e,this.primary=t;for(var n=0,r=this;n<e.length;++n)e[n].parent=this,ki(e[n],"clear",function(){r.clear()})}function lr(e,t,n,r,i){r=Xi(r),r.shared=!1;var s=[ar(e,t,n,r,i)],o=s[0],u=r.replacedWith;return ei(e,function(e){u&&(r.replacedWith=u.cloneNode(!0)),s.push(ar(e,Tn(e,t),Tn(e,n),r,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;o=Ri(s)}),new fr(s,o)}function cr(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function hr(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function pr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function dr(e,t,n){if(e)for(var r=0,i;r<e.length;++r){var s=e[r],o=s.marker,u=s.from==null||(o.inclusiveLeft?s.from<=t:s.from<t);if(u||o.type=="bookmark"&&s.from==t&&(!n||!s.marker.insertLeft)){var a=s.to==null||(o.inclusiveRight?s.to>=t:s.to>t);(i||(i=[])).push({from:s.from,to:a?null:s.to,marker:o})}}return i}function vr(e,t,n){if(e)for(var r=0,i;r<e.length;++r){var s=e[r],o=s.marker,u=s.to==null||(o.inclusiveRight?s.to>=t:s.to>t);if(u||o.type=="bookmark"&&s.from==t&&(!n||s.marker.insertLeft)){var a=s.from==null||(o.inclusiveLeft?s.from<=t:s.from<t);(i||(i=[])).push({from:a?null:s.from-t,to:s.to==null?null:s.to-t,marker:o})}}return i}function mr(e,t){var n=Cn(e,t.from.line)&&ni(e,t.from.line).markedSpans,r=Cn(e,t.to.line)&&ni(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,s=t.to.ch,o=wn(t.from,t.to),u=dr(n,i,o),a=vr(r,s,o),f=t.text.length==1,l=Ri(t.text).length+(f?i:0);if(u)for(var c=0;c<u.length;++c){var h=u[c];if(h.to==null){var p=cr(a,h.marker);p?f&&(h.to=p.to==null?null:p.to+l):h.to=i}}if(a)for(var c=0;c<a.length;++c){var h=a[c];h.to!=null&&(h.to+=l);if(h.from==null){var p=cr(u,h.marker);p||(h.from=l,f&&(u||(u=[])).push(h))}else h.from+=l,f&&(u||(u=[])).push(h)}var d=[u];if(!f){var v=t.text.length-2,m;if(v>0&&u)for(var c=0;c<u.length;++c)u[c].to==null&&(m||(m=[])).push({from:null,to:null,marker:u[c].marker});for(var c=0;c<v;++c)d.push(m);d.push(a)}return d}function gr(e,t){var n=vi(e,t),r=mr(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var s=n[i],o=r[i];if(s&&o)e:for(var u=0;u<o.length;++u){var a=o[u];for(var f=0;f<s.length;++f)if(s[f].marker==a.marker)continue e;s.push(a)}else o&&(n[i]=o)}return n}function yr(e,t,n){var r=null;e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;n.readOnly&&(!r||zi(r,n)==-1)&&(r||(r=[])).push(n)}});if(!r)return null;var i=[{from:t,to:n}];for(var s=0;s<r.length;++s){var o=r[s],u=o.find();for(var a=0;a<i.length;++a){var f=i[a];if(En(f.to,u.from)||En(u.to,f.from))continue;var l=[a,1];(En(f.from,u.from)||!o.inclusiveLeft&&wn(f.from,u.from))&&l.push({from:f.from,to:u.from}),(En(u.to,f.to)||!o.inclusiveRight&&wn(f.to,u.to))&&l.push({from:u.to,to:f.to}),i.splice.apply(i,l),a+=l.length-1}}return i}function br(e,t){var n=E&&e.markedSpans,r;if(n)for(var i,s=0;s<n.length;++s){i=n[s];if(!i.marker.collapsed)continue;(i.from==null||i.from<t)&&(i.to==null||i.to>t)&&(!r||r.width<i.marker.width)&&(r=i.marker)}return r}function wr(e){return br(e,-1)}function Er(e){return br(e,e.text.length+1)}function Sr(e,t){var n;while(n=wr(t))t=ni(e,n.find().from.line);return t}function xr(e,t){var n=E&&t.markedSpans;if(n)for(var r,i=0;i<n.length;++i){r=n[i];if(!r.marker.collapsed)continue;if(r.from==null)return!0;if(r.from==0&&r.marker.inclusiveLeft&&Tr(e,t,r))return!0}}function Tr(e,t,n){if(n.to==null){var r=n.marker.find().to,i=ni(e,r.line);return Tr(e,i,cr(i.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var s,o=0;o<t.markedSpans.length;++o){s=t.markedSpans[o];if(s.marker.collapsed&&s.from==n.to&&(s.marker.inclusiveLeft||n.marker.inclusiveRight)&&Tr(e,t,s))return!0}}function Nr(e){var t=e.markedSpans;if(!t)return;for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}function Cr(e,t){if(!t)return;for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}function Lr(e){return function(){var t=!this.cm.curOp;t&&xt(this.cm);try{var n=e.apply(this,arguments)}finally{t&&Tt(this.cm)}return n}}function Ar(e){return e.height!=null?e.height:((!e.node.parentNode||e.node.parentNode.nodeType!=1)&&es(e.cm.display.measure,Yi("div",[e.node],null,"position: relative")),e.height=e.node.offsetHeight)}function Or(e,t,n,r){var i=new kr(e,n,r);return i.noHScroll&&(e.display.alignWidgets=!0),In(e,t,function(t){(t.widgets||(t.widgets=[])).push(i),i.line=t;if(!xr(e.doc,t)||i.showIfHidden){var n=ai(e,t)<e.display.scroller.scrollTop;si(t,t.height+Ar(i)),n&&jn(e,0,i.height)}return!0}),i}function Mr(e,t,n){var r={text:e};return Cr(r,t),r.height=n?n(r):1,r}function _r(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Nr(e),Cr(e,n);var i=r?r(e):1;i!=e.height&&si(e,i)}function Dr(e){e.parent=null,Nr(e)}function Pr(e,t,n,r,i){var s=n.flattenSpans;s==null&&(s=e.options.flattenSpans);var o="",u=null,a=new or(t,e.options.tabSize),f;t==""&&n.blankLine&&n.blankLine(r);while(!a.eol()){a.pos>e.options.maxHighlightLength?(s=!1,a.pos=Math.min(t.length,a.start+5e4),f=null):f=n.token(a,r);var l=a.current();a.start=a.pos,!s||u!=f?(o&&i(o,u),o=l,u=f):o+=l}o&&i(o,u)}function Hr(e,t,n){var r=[e.state.modeGen];Pr(e,t.text,e.doc.mode,n,function(e,t){r.push(e,t)});for(var i=0;i<e.state.overlays.length;++i){var s=e.state.overlays[i],o=1;Pr(e,t.text,s.mode,!0,function(e,t){var n=o,i=e.length;while(i){var u=r[o],a=u.length;a<=i?i-=a:(r.splice(o,1,u.slice(0,i),r[o+1],u.slice(i)),i=0),o+=2}if(!t)return;if(s.opaque)r.splice(n,o-n,e,t),o=n+2;else for(;n<o;n+=2){var u=r[n+1];r[n+1]=u?u+" "+t:t}})}return r}function Br(e,t){if(!t.styles||t.styles[0]!=e.state.modeGen)t.styles=Hr(e,t,t.stateAfter=nt(e,oi(t)));return t.styles}function jr(e,t,n){var r=e.doc.mode,i=new or(t.text,e.options.tabSize);t.text==""&&r.blankLine&&r.blankLine(n);while(!i.eol()&&i.pos<=e.options.maxHighlightLength)r.token(i,n),i.start=i.pos}function Ir(e){return e?Fr[e]||(Fr[e]="cm-"+e.replace(/ +/g," cm-")):null}function qr(e,n,r){var s,o=n,u,a,f=!0;while(s=wr(o))f=!1,o=ni(e.doc,s.find().from.line),u||(u=o);var l={pre:Yi("pre"),col:0,pos:0,display:!r,measure:null,addedOne:!1,cm:e};o.textClass&&(l.pre.className=o.textClass);do{l.measure=o==n&&r,l.pos=0,l.addToken=l.measure?zr:Ur,(t||i)&&e.getOption("lineWrapping")&&(l.addToken=Wr(l.addToken)),r&&a&&o!=n&&!l.addedOne&&(r[0]=l.pre.appendChild(as(e.display.measure)),l.addedOne=!0);var c=Vr(o,l,Br(e,o));a=o==u,c&&(o=ni(e.doc,c.to.line),f=!1)}while(c);r&&!l.addedOne&&(r[0]=l.pre.appendChild(f?Yi("span"," "):as(e.display.measure))),!l.pre.firstChild&&!xr(e.doc,n)&&l.pre.appendChild(document.createTextNode(" "));var h;if(r&&t&&(h=fi(o))){var p=h.length-1;h[p].from==h[p].to&&--p;var d=h[p],v=h[p-1];if(d.from+1==d.to&&v&&d.level<v.level){var m=r[l.pos-1];m&&m.parentNode.insertBefore(m.measureRight=as(e.display.measure),m.nextSibling)}}return Ai(e,"renderLine",e,n,l.pre),l.pre}function Ur(e,t,n,r,i){if(!t)return;if(!Rr.test(t)){e.col+=t.length;var s=document.createTextNode(t)}else{var s=document.createDocumentFragment(),o=0;for(;;){Rr.lastIndex=o;var u=Rr.exec(t),a=u?u.index-o:t.length-o;a&&(s.appendChild(document.createTextNode(t.slice(o,o+a))),e.col+=a);if(!u)break;o+=a+1;if(u[0]==" "){var f=e.cm.options.tabSize,l=f-e.col%f;s.appendChild(Yi("span",qi(l),"cm-tab")),e.col+=l}else{var c=Yi("span","•","cm-invalidchar");c.title="\\u"+u[0].charCodeAt(0).toString(16),s.appendChild(c),e.col+=1}}}if(n||r||i||e.measure){var h=n||"";return r&&(h+=r),i&&(h+=i),e.pre.appendChild(Yi("span",[s],h))}e.pre.appendChild(s)}function zr(e,n,r,i,s){var o=e.cm.options.lineWrapping;for(var u=0;u<n.length;++u){var a=n.charAt(u),f=u==0;a>="í €"&&a<"í¯¿"&&u<n.length-1?(a=n.slice(u,u+2),++u):u&&o&&is.test(n.slice(u-1,u+1))&&e.pre.appendChild(Yi("wbr"));var l=e.measure[e.pos]=Ur(e,a,r,f&&i,u==n.length-1&&s);t&&o&&a==" "&&u&&!/\s/.test(n.charAt(u-1))&&u<n.length-1&&!/\s/.test(n.charAt(u+1))&&(l.style.whiteSpace="normal"),e.pos+=a.length}n.length&&(e.addedOne=!0)}function Wr(e){function t(e){var t=" ";for(var n=0;n<e.length-2;++n)t+=n%2?" ":" ";return t+=" ",t}return function(n,r,i,s,o){return e(n,r.replace(/ {3,}/,t),i,s,o)}}function Xr(e,t,n){n&&(e.display||(n=n.cloneNode(!0)),e.pre.appendChild(n),e.measure&&t&&(e.measure[e.pos]=n,e.addedOne=!0)),e.pos+=t}function Vr(e,t,n){var r=e.markedSpans;if(!r){for(var i=1;i<n.length;i+=2)t.addToken(t,n[i],Ir(n[i+1]));return}var s=e.text,o=s.length,u=0,i=1,a="",f,l=0,c,h,p,d;for(;;){if(l==u){c=h=p="",d=null,l=Infinity;var v=null;for(var m=0;m<r.length;++m){var g=r[m],y=g.marker;g.from<=u&&(g.to==null||g.to>u)?(g.to!=null&&l>g.to&&(l=g.to,h=""),y.className&&(c+=" "+y.className),y.startStyle&&g.from==u&&(p+=" "+y.startStyle),y.endStyle&&g.to==l&&(h+=" "+y.endStyle),y.collapsed&&(!d||d.marker.width<y.width)&&(d=g)):g.from>u&&l>g.from&&(l=g.from),y.type=="bookmark"&&g.from==u&&y.replacedWith&&(v=y.replacedWith)}if(d&&(d.from||0)==u){Xr(t,(d.to==null?o:d.to)-u,d.from!=null&&d.marker.replacedWith);if(d.to==null)return d.marker.find()}v&&!d&&Xr(t,0,v)}if(u>=o)break;var b=Math.min(o,l);for(;;){if(a){var w=u+a.length;if(!d){var E=w>b?a.slice(0,b-u):a;t.addToken(t,E,f?f+c:c,p,u+E.length==l?h:"")}if(w>=b){a=a.slice(b-u),u=b;break}u=w,p=""}a=n[i++],f=Ir(n[i++])}}}function $r(e,t,n,r,i){function s(e){return n?n[e]:null}function o(e,n,r){_r(e,n,r,i),_i(e,"change",e,t)}var u=t.from,a=t.to,f=t.text,l=ni(e,u.line),c=ni(e,a.line),h=Ri(f),p=s(f.length-1),d=a.line-u.line;if(u.ch==0&&a.ch==0&&h==""){for(var v=0,m=f.length-1,g=[];v<m;++v)g.push(Mr(f[v],s(v),i));o(c,c.text,p),d&&e.remove(u.line,d),g.length&&e.insert(u.line,g)}else if(l==c)if(f.length==1)o(l,l.text.slice(0,u.ch)+h+l.text.slice(a.ch),p);else{for(var g=[],v=1,m=f.length-1;v<m;++v)g.push(Mr(f[v],s(v),i));g.push(Mr(h+l.text.slice(a.ch),p,i)),o(l,l.text.slice(0,u.ch)+f[0],s(0)),e.insert(u.line+1,g)}else if(f.length==1)o(l,l.text.slice(0,u.ch)+f[0]+c.text.slice(a.ch),s(0)),e.remove(u.line+1,d);else{o(l,l.text.slice(0,u.ch)+f[0],s(0)),o(c,h+c.text.slice(a.ch),p);for(var v=1,m=f.length-1,g=[];v<m;++v)g.push(Mr(f[v],s(v),i));d>1&&e.remove(u.line+1,d-1),e.insert(u.line+1,g)}_i(e,"change",e,t),An(e,r.anchor,r.head,null,!0)}function Jr(e){this.lines=e,this.parent=null;for(var t=0,n=e.length,r=0;t<n;++t)e[t].parent=this,r+=e[t].height;this.height=r}function Kr(e){this.children=e;var t=0,n=0;for(var r=0,i=e.length;r<i;++r){var s=e[r];t+=s.chunkSize(),n+=s.height,s.parent=this}this.size=t,this.height=n,this.parent=null}function ei(e,t,n){function r(e,i,s){if(e.linked)for(var o=0;o<e.linked.length;++o){var u=e.linked[o];if(u.doc==i)continue;var a=s&&u.sharedHist;if(n&&!a)continue;t(u.doc,a),r(u.doc,e,a)}}r(e,null,!0)}function ti(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,k(e),T(e),e.options.lineWrapping||D(e),e.options.mode=t.modeOption,Lt(e)}function ni(e,t){t-=e.first;while(!e.lines)for(var n=0;;++n){var r=e.children[n],i=r.chunkSize();if(t<i){e=r;break}t-=i}return e.lines[t]}function ri(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var s=e.text;i==n.line&&(s=s.slice(0,n.ch)),i==t.line&&(s=s.slice(t.ch)),r.push(s),++i}),r}function ii(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function si(e,t){var n=t-e.height;for(var r=e;r;r=r.parent)r.height+=n}function oi(e){if(e.parent==null)return null;var t=e.parent,n=zi(t.lines,e);for(var r=t.parent;r;t=r,r=r.parent)for(var i=0;;++i){if(r.children[i]==t)break;n+=r.children[i].chunkSize()}return n+t.first}function ui(e,t){var n=e.first;e:do{for(var r=0,i=e.children.length;r<i;++r){var s=e.children[r],o=s.height;if(t<o){e=s;continue e}t-=o,n+=s.chunkSize()}return n}while(!e.lines);for(var r=0,i=e.lines.length;r<i;++r){var u=e.lines[r],a=u.height;if(t<a)break;t-=a}return n+r}function ai(e,t){t=Sr(e.doc,t);var n=0,r=t.parent;for(var i=0;i<r.lines.length;++i){var s=r.lines[i];if(s==t)break;n+=s.height}for(var o=r.parent;o;r=o,o=r.parent)for(var i=0;i<o.children.length;++i){var u=o.children[i];if(u==r)break;n+=u.height}return n}function fi(e){var t=e.order;return t==null&&(t=e.order=Ss(e.text)),t}function li(){return{done:[],undone:[],undoDepth:Infinity,lastTime:0,lastOp:null,lastOrigin:null,dirtyCounter:0}}function ci(e,t,n,r){var i=t["spans_"+e.id],s=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[s]=n.markedSpans),++s})}function hi(e,t){var n={from:t.from,to:an(t),text:ri(e,t.from,t.to)};return ci(e,n,t.from.line,t.to.line+1),ei(e,function(e){ci(e,n,t.from.line,t.to.line+1)},!0),n}function pi(e,t,n,r){var i=e.history;i.undone.length=0;var s=+(new Date),o=Ri(i.done);if(o&&(i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastTime>s-600||t.origin.charAt(0)=="*"))){var u=Ri(o.changes);wn(t.from,t.to)&&wn(t.from,u.to)?u.to=an(t):o.changes.push(hi(e,t)),o.anchorAfter=n.anchor,o.headAfter=n.head}else{o={changes:[hi(e,t)],anchorBefore:e.sel.anchor,headBefore:e.sel.head,anchorAfter:n.anchor,headAfter:n.head},i.done.push(o);while(i.done.length>i.undoDepth)i.done.shift();i.dirtyCounter<0?i.dirtyCounter=NaN:i.dirtyCounter++}i.lastTime=s,i.lastOp=r,i.lastOrigin=t.origin}function di(e){if(!e)return null;for(var t=0,n;t<e.length;++t)e[t].marker.explicitlyCleared?n||(n=e.slice(0,t)):n&&n.push(e[t]);return n?n.length?n:null:e}function vi(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=0,i=[];r<t.text.length;++r)i.push(di(n[r]));return i}function mi(e,t){for(var n=0,r=[];n<e.length;++n){var i=e[n],s=i.changes,o=[];r.push({changes:o,anchorBefore:i.anchorBefore,headBefore:i.headBefore,anchorAfter:i.anchorAfter,headAfter:i.headAfter});for(var u=0;u<s.length;++u){var a=s[u],f;o.push({from:a.from,to:a.to,text:a.text});if(t)for(var l in a)(f=l.match(/^spans_(\d+)$/))&&zi(t,Number(f[1]))>-1&&(Ri(o)[l]=a[l],delete a[l])}}return r}function gi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function yi(e,t,n,r){for(var i=0;i<e.length;++i){var s=e[i],o=!0;for(var u=0;u<s.changes.length;++u){var a=s.changes[u];s.copied||(a.from=Sn(a.from),a.to=Sn(a.to));if(n<a.from.line)a.from.line+=r,a.to.line+=r;else if(t<=a.to.line){o=!1;break}}s.copied||(s.anchorBefore=Sn(s.anchorBefore),s.headBefore=Sn(s.headBefore),s.anchorAfter=Sn(s.anchorAfter),s.readAfter=Sn(s.headAfter),s.copied=!0),o?(gi(s.anchorBefore),gi(s.headBefore),gi(s.anchorAfter),gi(s.headAfter)):(e.splice(0,i+1),i=0)}}function bi(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;yi(e.done,n,r,i),yi(e.undone,n,r,i)}function wi(){Ti(this)}function Ei(e){return e.stop||(e.stop=wi),e}function Si(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xi(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ti(e){Si(e),xi(e)}function Ni(e){return e.target||e.srcElement}function Ci(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),v&&e.ctrlKey&&t==1&&(t=3),t}function ki(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={}),i=r[t]||(r[t]=[]);i.push(n)}}function Li(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers&&e._handlers[t];if(!r)return;for(var i=0;i<r.length;++i)if(r[i]==n){r.splice(i,1);break}}}function Ai(e,t){var n=e._handlers&&e._handlers[t];if(!n)return;var r=Array.prototype.slice.call(arguments,2);for(var i=0;i<n.length;++i)n[i].apply(null,r)}function _i(e,t){function i(e){return function(){e.apply(null,r)}}var n=e._handlers&&e._handlers[t];if(!n)return;var r=Array.prototype.slice.call(arguments,2);Oi||(++Mi,Oi=[],setTimeout(Di,0));for(var s=0;s<n.length;++s)Oi.push(i(n[s]))}function Di(){--Mi;var e=Oi;Oi=null;for(var t=0;t<e.length;++t)e[t]()}function Pi(e,t){var n=e._handlers&&e._handlers[t];return n&&n.length>0}function ji(){this.id=null}function Fi(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var s=r||0,o=i||0;s<t;++s)e.charAt(s)==" "?o+=n-o%n:++o;return o}function qi(e){while(Ii.length<=e)Ii.push(Ri(Ii)+" ");return Ii[e]}function Ri(e){return e[e.length-1]}function Ui(e){p?(e.selectionStart=0,e.selectionEnd=e.value.length):e.select()}function zi(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function Wi(e,t){function n(){}n.prototype=e;var r=new n;return t&&Xi(t,r),r}function Xi(e,t){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Vi(e){for(var t=[],n=0;n<e;++n)t.push(undefined);return t}function $i(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Ki(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Ji.test(e))}function Qi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Yi(e,t,n,r){var i=document.createElement(e);n&&(i.className=n),r&&(i.style.cssText=r);if(typeof t=="string")ts(i,t);else if(t)for(var s=0;s<t.length;++s)i.appendChild(t[s]);return i}function Zi(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function es(e,t){return Zi(e).appendChild(t)}function ts(e,t){r?(e.innerHTML="",e.appendChild(document.createTextNode(t))):e.textContent=t}function ns(e){return e.getBoundingClientRect()}function os(e){if(ss!=null)return ss;var t=Yi("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return es(e,t),t.offsetWidth&&(ss=t.offsetHeight-t.clientHeight),ss||0}function as(e){if(us==null){var t=Yi("span","​");es(e,Yi("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(us=t.offsetWidth<=1&&t.offsetHeight>2&&!n)}return us?Yi("span","​"):Yi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function ps(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=0;i<e.length;++i){var s=e[i];(s.from<n&&s.to>t||t==n&&s.to==t)&&r(Math.max(s.from,t),Math.min(s.to,n),s.level==1?"rtl":"ltr")}}function ds(e){return e.level%2?e.to:e.from}function vs(e){return e.level%2?e.from:e.to}function ms(e){var t=fi(e);return t?ds(t[0]):0}function gs(e){var t=fi(e);return t?vs(Ri(t)):e.text.length}function ys(e,t){var n=ni(e.doc,t),r=Sr(e.doc,n);r!=n&&(t=oi(r));var i=fi(r),s=i?i[0].level%2?gs(r):ms(r):0;return bn(t,s)}function bs(e,t){var n,r;while(n=Er(r=ni(e.doc,t)))t=n.find().to.line;var i=fi(r),s=i?i[0].level%2?ms(r):gs(r):r.text.length;return bn(t,s)}function ws(e,t,n,r){var i=fi(e);if(!i)return Es(e,t,n,r);var s=r?function(t,n){do t+=n;while(t>0&&Gi.test(e.text.charAt(t)));return t}:function(e,t){return e+t},o=i[0].level;for(var u=0;u<i.length;++u){var a=i[u],f=a.level%2==o;if(a.from<t&&a.to>t||f&&(a.from==t||a.to==t))break}var l=s(t,a.level%2?-n:n);while(l!=null)if(a.level%2==o){if(!(l<a.from||l>a.to))break;a=i[u+=n],l=a&&(n>0==a.level%2?s(a.to,-1):s(a.from,1))}else if(l==ds(a))a=i[--u],l=a&&vs(a);else{if(l!=vs(a))break;a=i[++u],l=a&&ds(a)}return l<0||l>e.text.length?null:l}function Es(e,t,n,r){var i=t+n;if(r)while(i>0&&Gi.test(e.text.charAt(i)))i+=n;return i<0||i>e.text.length?null:i}var e=/gecko\/\d/i.test(navigator.userAgent),t=/MSIE \d/.test(navigator.userAgent),n=t&&(document.documentMode==null||document.documentMode<8),r=t&&(document.documentMode==null||document.documentMode<9),i=/WebKit\//.test(navigator.userAgent),s=i&&/Qt\/\d+\.\d+/.test(navigator.userAgent),o=/Chrome\//.test(navigator.userAgent),u=/Opera\//.test(navigator.userAgent),a=/Apple Computer/.test(navigator.vendor),f=/KHTML\//.test(navigator.userAgent),l=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),h=/PhantomJS/.test(navigator.userAgent),p=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),d=p||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),v=p||/Mac/.test(navigator.platform),m=/windows/i.test(navigator.platform),g=u&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);g&&(g=Number(g[1]));var y=v&&(s||u&&(g==null||g<12.11)),b=e||t&&!r,w=!1,E=!1,bt,St=0,Ft,It,Vt=0,$t=null;t?$t=-0.53:e?$t=15:o?$t=-0.7:a&&($t=-1/3);var Gt,en=null,on;S.Pos=bn,S.prototype={focus:function(){window.focus(),Dt(this),rn(this),Ot(this)},setOption:function(e,t){var n=this.options,r=n[e];if(n[e]==t&&e!="mode")return;n[e]=t,Wn.hasOwnProperty(e)&&Nt(this,Wn[e])(this,t,r)},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](e)},removeKeyMap:function(e){var t=this.state.keyMaps;for(var n=0;n<t.length;++n)if((typeof e=="string"?t[n].name:t[n])==e)return t.splice(n,1),!0},addOverlay:Nt(null,function(e,t){var n=e.token?e:S.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");this.state.overlays +.push({mode:n,modeSpec:e,opaque:t&&t.opaque}),this.state.modeGen++,Lt(this)}),removeOverlay:Nt(null,function(e){var t=this.state.overlays;for(var n=0;n<t.length;++n)if(t[n].modeSpec==e){t.splice(n,1),this.state.modeGen++,Lt(this);return}}),indentLine:Nt(null,function(e,t,n){typeof t!="string"&&(t==null?t=this.options.smartIndent?"smart":"prev":t=t?"add":"subtract"),Cn(this.doc,e)&&Fn(this,e,t,n)}),indentSelection:Nt(null,function(e){var t=this.doc.sel;if(wn(t.from,t.to))return Fn(this,t.from.line,e);var n=t.to.line-(t.to.ch?0:1);for(var r=t.from.line;r<=n;++r)Fn(this,r,e)}),getTokenAt:function(e){var t=this.doc;e=Tn(t,e);var n=nt(this,e.line),r=this.doc.mode,i=ni(t,e.line),s=new or(i.text,this.options.tabSize);while(s.pos<e.ch&&!s.eol()){s.start=s.pos;var o=r.token(s,n)}return{start:s.start,end:s.pos,string:s.current(),className:o||null,type:o||null,state:n}},getStateAfter:function(e){var t=this.doc;return e=xn(t,e==null?t.first+t.size-1:e),nt(this,e+1)},cursorCoords:function(e,t){var n,r=this.doc.sel;return e==null?n=r.head:typeof e=="object"?n=Tn(this.doc,e):n=e?r.from:r.to,vt(this,n,t||"page")},charCoords:function(e,t){return dt(this,Tn(this.doc,e),t||"page")},coordsChar:function(e,t){return e=pt(this,e,t||"page"),gt(this,e.left,e.top)},defaultTextHeight:function(){return wt(this.display)},defaultCharWidth:function(){return Et(this.display)},setGutterMarker:Nt(null,function(e,t,n){return In(this,e,function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Qi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Nt(null,function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Lt(t,r,r+1),Qi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),addLineClass:Nt(null,function(e,t,n){return In(this,e,function(e){var r=t=="text"?"textClass":t=="background"?"bgClass":"wrapClass";if(!e[r])e[r]=n;else{if((new RegExp("\\b"+n+"\\b")).test(e[r]))return!1;e[r]+=" "+n}return!0})}),removeLineClass:Nt(null,function(e,t,n){return In(this,e,function(e){var r=t=="text"?"textClass":t=="background"?"bgClass":"wrapClass",i=e[r];if(!i)return!1;if(n==null)e[r]=null;else{var s=i.replace(new RegExp("^"+n+"\\b\\s*|\\s*\\b"+n+"\\b"),"");if(s==i)return!1;e[r]=s||null}return!0})}),addLineWidget:Nt(null,function(e,t,n){return Or(this,e,t,n)}),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if(typeof e=="number"){if(!Cn(this.doc,e))return null;var t=e;e=ni(this.doc,e);if(!e)return null}else{var t=oi(e);if(t==null)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo}},addWidget:function(e,t,n,r,i){var s=this.display;e=vt(this,Tn(this.doc,e));var o=e.bottom,u=e.left;t.style.position="absolute",s.sizer.appendChild(t);if(r=="over")o=e.top;else if(r=="above"||r=="near"){var a=Math.max(s.wrapper.clientHeight,this.doc.height),f=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(r=="above"||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(o=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=o+rt(s)+"px",t.style.left=t.style.right="",i=="right"?(u=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):(i=="left"?u=0:i=="middle"&&(u=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&Pn(this,u,o,u+t.offsetWidth,o+t.offsetHeight)},triggerOnKeyDown:Nt(null,tn),execCommand:function(e){return er[e](this)},findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var s=0,o=Tn(this.doc,e);s<t;++s){o=qn(this.doc,o,i,n,r);if(o.hitSide)break}return o},moveH:Nt(null,function(e,t){var n=this.doc.sel,r;n.shift||n.extend||wn(n.from,n.to)?r=qn(this.doc,n.head,e,t,this.options.rtlMoveVisually):r=e<0?n.from:n.to,kn(this.doc,r,r,e)}),deleteH:Nt(null,function(e,t){var n=this.doc.sel;wn(n.from,n.to)?yn(this.doc,"",n.from,qn(this.doc,n.head,e,t,!1),"+delete"):yn(this.doc,"",n.from,n.to,"+delete"),this.curOp.userSelChange=!0}),findPosV:function(e,t,n,r){var i=1,s=r;t<0&&(i=-1,t=-t);for(var o=0,u=Tn(this.doc,e);o<t;++o){var a=vt(this,u,"div");s==null?s=a.left:a.left=s,u=Rn(this,a,i,n);if(u.hitSide)break}return u},moveV:Nt(null,function(e,t){var n=this.doc.sel,r=vt(this,n.head,"div");n.goalColumn!=null&&(r.left=n.goalColumn);var i=Rn(this,r,e,t);t=="page"&&jn(this,0,dt(this,i,"div").top-r.top),kn(this.doc,i,i,e),n.goalColumn=r.left}),toggleOverwrite:function(){(this.state.overwrite=!this.state.overwrite)?this.display.cursor.className+=" CodeMirror-overwrite":this.display.cursor.className=this.display.cursor.className.replace(" CodeMirror-overwrite","")},hasFocus:function(){return this.state.focused},scrollTo:Nt(null,function(e,t){Bn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller,t=Hi;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-t,width:e.scrollWidth-t,clientHeight:e.clientHeight-t,clientWidth:e.clientWidth-t}},scrollIntoView:Nt(null,function(e,t){typeof e=="number"&&(e=bn(e,0)),t||(t=0);var n=e;if(!e||e.line!=null)this.curOp.scrollToPos=e?Tn(this.doc,e):this.doc.sel.head,this.curOp.scrollToPosMargin=t,n=vt(this,this.curOp.scrollToPos);var r=Hn(this,n.left,n.top-t,n.right,n.bottom+t);Bn(this,r.scrollLeft,r.scrollTop)}),setSize:function(e,t){function n(e){return typeof e=="number"||/^\d+$/.test(String(e))?e+"px":e}e!=null&&(this.display.wrapper.style.width=n(e)),t!=null&&(this.display.wrapper.style.height=n(t)),this.refresh()},on:function(e,t){ki(this,e,t)},off:function(e,t){Li(this,e,t)},operation:function(e){return kt(this,e)},refresh:Nt(null,function(){ct(this),Bn(this,this.doc.scrollLeft,this.doc.scrollTop),Lt(this)}),swapDoc:Nt(null,function(e){var t=this.doc;return t.cm=null,ti(this,e),ct(this),_t(this,!0),Bn(this,e.scrollLeft,e.scrollTop),t}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};var Wn=S.optionHandlers={},Xn=S.defaults={},$n=S.Init={toString:function(){return"CodeMirror.Init"}};Vn("value","",function(e,t){e.setValue(t)},!0),Vn("mode",null,function(e,t){e.doc.modeOption=t,T(e)},!0),Vn("indentUnit",2,T,!0),Vn("indentWithTabs",!1),Vn("smartIndent",!0),Vn("tabSize",4,function(e){T(e),ct(e),Lt(e)},!0),Vn("electricChars",!0),Vn("rtlMoveVisually",!m),Vn("theme","default",function(e){A(e),O(e)},!0),Vn("keyMap","default",L),Vn("extraKeys",null),Vn("onKeyEvent",null),Vn("onDragEvent",null),Vn("lineWrapping",!1,N,!0),Vn("gutters",[],function(e){P(e.options),O(e)},!0),Vn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?q(e.display)+"px":"0",e.refresh()},!0),Vn("lineNumbers",!1,function(e){P(e.options),O(e)},!0),Vn("firstLineNumber",1,O,!0),Vn("lineNumberFormatter",function(e){return e},O,!0),Vn("showCursorWhenSelecting",!1,K,!0),Vn("readOnly",!1,function(e,t){t=="nocursor"?(sn(e),e.display.input.blur()):t||_t(e,!0)}),Vn("dragDrop",!0),Vn("cursorBlinkRate",530),Vn("cursorHeight",1),Vn("workTime",100),Vn("workDelay",100),Vn("flattenSpans",!0),Vn("pollInterval",100),Vn("undoDepth",40,function(e,t){e.doc.history.undoDepth=t}),Vn("viewportMargin",10,function(e){e.refresh()},!0),Vn("maxHighlightLength",1e4,function(e){T(e),e.refresh()},!0),Vn("moveInputWithCursor",!0,function(e,t){t||(e.display.inputDiv.style.top=e.display.inputDiv.style.left=0)}),Vn("tabindex",null,function(e,t){e.display.input.tabIndex=t||""}),Vn("autofocus",null);var Jn=S.modes={},Kn=S.mimeModes={};S.defineMode=function(e,t){!S.defaults.mode&&e!="null"&&(S.defaults.mode=e);if(arguments.length>2){t.dependencies=[];for(var n=2;n<arguments.length;++n)t.dependencies.push(arguments[n])}Jn[e]=t},S.defineMIME=function(e,t){Kn[e]=t},S.resolveMode=function(e){if(typeof e=="string"&&Kn.hasOwnProperty(e))e=Kn[e];else if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return S.resolveMode("application/xml");return typeof e=="string"?{name:e}:e||{name:"null"}},S.getMode=function(e,t){t=S.resolveMode(t);var n=Jn[t.name];if(!n)return S.getMode(e,"text/plain");var r=n(e,t);if(Qn.hasOwnProperty(t.name)){var i=Qn[t.name];for(var s in i){if(!i.hasOwnProperty(s))continue;r.hasOwnProperty(s)&&(r["_"+s]=r[s]),r[s]=i[s]}}return r.name=t.name,r},S.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),S.defineMIME("text/plain","null");var Qn=S.modeExtensions={};S.extendMode=function(e,t){var n=Qn.hasOwnProperty(e)?Qn[e]:Qn[e]={};Xi(t,n)},S.defineExtension=function(e,t){S.prototype[e]=t},S.defineOption=Vn;var Gn=[];S.defineInitHook=function(e){Gn.push(e)},S.copyState=Yn,S.startState=Zn,S.innerMode=function(e,t){while(e.innerMode){var n=e.innerMode(t);t=n.state,e=n.mode}return n||{mode:e,state:t}};var er=S.commands={selectAll:function(e){e.setSelection(bn(e.firstLine(),0),bn(e.lastLine()))},killLine:function(e){var t=e.getCursor(!0),n=e.getCursor(!1),r=!wn(t,n);!r&&e.getLine(t.line).length==t.ch?e.replaceRange("",t,bn(t.line+1,0),"+delete"):e.replaceRange("",t,r?n:bn(t.line),"+delete")},deleteLine:function(e){var t=e.getCursor().line;e.replaceRange("",bn(t,0),bn(t),"+delete")},undo:function(e){e.undo()},redo:function(e){e.redo()},goDocStart:function(e){e.extendSelection(bn(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(bn(e.lastLine()))},goLineStart:function(e){e.extendSelection(ys(e,e.getCursor().line))},goLineStartSmart:function(e){var t=e.getCursor(),n=ys(e,t.line),r=e.getLineHandle(n.line),i=fi(r);if(!i||i[0].level==0){var s=Math.max(0,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=s&&t.ch;e.extendSelection(bn(n.line,o?0:s))}else e.extendSelection(n)},goLineEnd:function(e){e.extendSelection(bs(e,e.getCursor().line))},goLineRight:function(e){var t=e.charCoords(e.getCursor(),"div").top+5;e.extendSelection(e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:t},"div"))},goLineLeft:function(e){var t=e.charCoords(e.getCursor(),"div").top+5;e.extendSelection(e.coordsChar({left:0,top:t},"div"))},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ","end","+input")},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.replaceSelection(" ","end","+input")},transposeChars:function(e){var t=e.getCursor(),n=e.getLine(t.line);t.ch>0&&t.ch<n.length-1&&e.replaceRange(n.charAt(t.ch)+n.charAt(t.ch-1),bn(t.line,t.ch-1),bn(t.line,t.ch+1))},newlineAndIndent:function(e){Nt(e,function(){e.replaceSelection("\n","end","+input"),e.indentLine(e.getCursor().line,null,!0)})()},toggleOverwrite:function(e){e.toggleOverwrite()}},tr=S.keyMap={};tr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"},tr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"},tr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore",fallthrough:["basic","emacsy"]},tr["default"]=v?tr.macDefault:tr.pcDefault,tr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},S.lookupKey=rr,S.isModifierKey=ir,S.keyName=sr,S.fromTextArea=function(e,t){function i(){e.value=a.getValue()}t||(t={}),t.value=e.value,!t.tabindex&&e.tabindex&&(t.tabindex=e.tabindex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder);if(t.autofocus==null){var n=document.body;try{n=document.activeElement}catch(r){}t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}if(e.form){ki(e.form,"submit",i);if(!t.leaveSubmitMethodAlone){var s=e.form,o=s.submit;try{var u=s.submit=function(){i(),s.submit=o,s.submit(),s.submit=u}}catch(r){}}}e.style.display="none";var a=S(function(t){e.parentNode.insertBefore(t,e.nextSibling)},t);return a.save=i,a.getTextArea=function(){return e},a.toTextArea=function(){i(),e.parentNode.removeChild(a.getWrapperElement()),e.style.display="",e.form&&(Li(e.form,"submit",i),typeof e.form.submit=="function"&&(e.form.submit=o))},a},or.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if(typeof e=="string")var n=t==e;else var n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){var t=this.pos;while(this.eat(e));return this.pos>t},eatSpace:function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Fi(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue},indentation:function(){return Fi(this.string,null,this.tabSize)},match:function(e,t,n){if(typeof e!="string"){var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}var r=function(e){return n?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)}},S.StringStream=or,S.TextMarker=ur,ur.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;t&&xt(e);var n=null,r=null;for(var i=0;i<this.lines.length;++i){var s=this.lines[i],o=cr(s.markedSpans,this);o.to!=null&&(r=oi(s)),s.markedSpans=hr(s.markedSpans,o),o.from!=null?n=oi(s):this.collapsed&&!xr(this.doc,s)&&e&&si(s,wt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var i=0;i<this.lines.length;++i){var u=Sr(e.doc,this.lines[i]),a=_(e.doc,u);a>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=a,e.display.maxLineChanged=!0)}n!=null&&e&&Lt(e,n,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.collapsed&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&On(e)),t&&Tt(e),_i(this,"clear")},ur.prototype.find=function(){var e,t;for(var n=0;n<this.lines.length;++n){var r=this.lines[n],i=cr(r.markedSpans,this);if(i.from!=null||i.to!=null){var s=oi(r);i.from!=null&&(e=bn(s,i.from)),i.to!=null&&(t=bn(s,i.to))}}return this.type=="bookmark"?e:e&&{from:e,to:t}},ur.prototype.getOptions=function(e){var t=this.replacedWith;return{className:this.className,inclusiveLeft:this.inclusiveLeft,inclusiveRight:this.inclusiveRight,atomic:this.atomic,collapsed:this.collapsed,replacedWith:e?t&&t.cloneNode(!0):t,readOnly:this.readOnly,startStyle:this.startStyle,endStyle:this.endStyle}},ur.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||zi(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ur.prototype.detachLine=function(e){this.lines.splice(zi(this.lines,e),1);if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},S.SharedTextMarker=fr,fr.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();_i(this,"clear")},fr.prototype.find=function(){return this.primary.find()},fr.prototype.getOptions=function(e){var t=this.primary.getOptions(e);return t.shared=!0,t};var kr=S.LineWidget=function(e,t,n){for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.cm=e,this.node=t};kr.prototype.clear=Lr(function(){var e=this.line.widgets,t=oi(this.line);if(t==null||!e)return;for(var n=0;n<e.length;++n)e[n]==this&&e.splice(n--,1);e.length||(this.line.widgets=null),si(this.line,Math.max(0,this.line.height-Ar(this))),Lt(this.cm,t,t+1)}),kr.prototype.changed=Lr(function(){var e=this.height;this.height=null;var t=Ar(this)-e;if(!t)return;si(this.line,this.line.height+t);var n=oi(this.line);Lt(this.cm,n,n+1)});var Fr={},Rr=/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\uFEFF]/g;Jr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Dr(i),_i(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.splice.apply(e,[e.length,0].concat(this.lines))},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0,i=t.length;r<i;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},Kr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var s=Math.min(t,i-e),o=r.height;r.removeInner(e,s),this.height-=o-r.height,i==s&&(this.children.splice(n--,1),r.parent=null);if((t-=s)==0)break;e=0}else e-=i}if(this.size-t<25){var u=[];this.collapse(u),this.children=[new Jr(u)],this.children[0].parent=this}},collapse:function(e){for(var t=0,n=this.children.length;t<n;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0,i=this.children.length;r<i;++r){var s=this.children[r],o=s.chunkSize();if(e<=o){s.insertInner(e,t,n);if(s.lines&&s.lines.length>50){while(s.lines.length>50){var u=s.lines.splice(s.lines.length-25,25),a=new Jr(u);s.height-=a.height,this.children.splice(r+1,0,a),a.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Kr(t);if(!e.parent){var r=new Kr(e.children);r.parent=e,e.children=[r,n],e=r}else{e.size-=n.size,e.height-=n.height;var i=zi(e.parent.children,e);e.parent.children.splice(i+1,0,n)}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,n){for(var r=0,i=this.children.length;r<i;++r){var s=this.children[r],o=s.chunkSize();if(e<o){var u=Math.min(t,o-e);if(s.iterN(e,u,n))return!0;if((t-=u)==0)break;e=0}else e-=o}}};var Qr=0,Gr=S.Doc=function(e,t,n){if(!(this instanceof Gr))return new Gr(e,t,n);n==null&&(n=0),Kr.call(this,[new Jr([Mr("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.history=li(),this.frontier=n;var r=bn(n,0);this.sel={from:r,to:r,head:r,anchor:r,shift:!1,extend:!1,goalColumn:null},this.id=++Qr,this.modeOption=t,typeof e=="string"&&(e=fs(e)),$r(this,{from:r,to:r,text:e},null,{head:r,anchor:r})};Gr.prototype=Wi(Kr.prototype,{iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){var n=0;for(var r=0,i=t.length;r<i;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ii(this,this.first,this.first+this.size);return e===!1?t:t.join(e||"\n")},setValue:function(e){var t=bn(this.first,0),n=this.first+this.size-1;hn(this,{from:t,to:bn(n,ni(this,n).text.length),text:fs(e),origin:"setValue"},{head:t,anchor:t},!0)},replaceRange:function(e,t,n,r){t=Tn(this,t),n=n?Tn(this,n):t,yn(this,e,t,n,r)},getRange:function(e,t,n){var r=ri(this,Tn(this,e),Tn(this,t));return n===!1?r:r.join(n||"\n")},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},setLine:function(e,t){Cn(this,e)&&yn(this,t,bn(e,0),Tn(this,bn(e)))},removeLine:function(e){e?yn(this,"",Tn(this,bn(e-1)),Tn(this,bn(e))):yn(this,"",bn(0,0),Tn(this,bn(1,0)))},getLineHandle:function(e){if(Cn(this,e))return ni(this,e)},getLineNumber:function(e){return oi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Tn(this,e)},getCursor:function(e){var t=this.sel,n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e===!1?n=t.to:n=t.from,Sn(n)},somethingSelected:function(){return!wn(this.sel.head,this.sel.anchor)},setCursor:Ct(function(e,t,n){var r=Tn(this,typeof e=="number"?bn(e,t||0):e);n?kn(this,r):An(this,r,r)}),setSelection:Ct(function(e,t){An(this,Tn(this,e),Tn(this,t||e))}),extendSelection:Ct(function(e,t){kn(this,Tn(this,e),t&&Tn(this,t))}),getSelection:function(e){return this.getRange(this.sel.from,this.sel.to,e)},replaceSelection:function(e,t,n){hn(this,{from:this.sel.from,to:this.sel.to,text:fs(e),origin:n},t||"around")},undo:Ct(function(){dn(this,"undo")}),redo:Ct(function(){dn(this,"redo")}),setExtending:function(e){this.sel.extend=e},historySize:function(){var e=this.history;return{undo:e.done.length,redo:e.undone.length}},clearHistory:function(){this.history=li()},markClean:function(){this.history.dirtyCounter=0,this.history.lastOp=this.history.lastOrigin=null},isClean:function(){return this.history.dirtyCounter==0},getHistory:function(){return{done:mi(this.history.done),undone:mi(this.history.undone)}},setHistory:function(e){var t=this.history=li();t.done=e.done.slice(0),t.undone=e.undone.slice(0)},markText:function(e,t,n){return ar(this,Tn(this,e),Tn(this,t),n,"range")},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft};return e=Tn(this,e),ar(this,e,e,n,"bookmark")},findMarksAt:function(e){e=Tn(this,e);var t=[],n=ni(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first;return this.iter(function(r){var i=r.text.length+1;if(i>e)return t=e,!0;e-=i,++n}),Tn(this,bn(n,t))},indexFromPos:function(e){e=Tn(this,e);var t=e.ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,function(e){t+=e.text.length+1}),t)},copy:function(e){var t=new Gr(ii(this,this.first,this.first+this.size),this.modeOption,this.first);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel={from:this.sel.from,to:this.sel.to,head:this.sel.head,anchor:this.sel.anchor,shift:this.sel.shift,extend:!1,goalColumn:this.sel.goalColumn},e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new Gr(ii(this,t,n),e.mode||this.modeOption,t);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],r},unlinkDoc:function(e){e instanceof S&&(e=e.doc);if(this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this);break}if(e.history==this.history){var r=[e.id];ei(e,function(e){r.push(e.id)},!0),e.history=li(),e.history.done=mi(this.history.done,r),e.history.undone=mi(this.history.undone,r)}},iterLinkedDocs:function(e){ei(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),Gr.prototype.eachLine=Gr.prototype.iter;var Yr="iter insert remove copy getEditor".split(" ");for(var Zr in Gr.prototype)Gr.prototype.hasOwnProperty(Zr)&&zi(Yr,Zr)<0&&(S.prototype[Zr]=function(e){return function(){return e.apply(this.doc,arguments)}}(Gr.prototype[Zr]));S.e_stop=Ti,S.e_preventDefault=Si,S.e_stopPropagation=xi;var Oi,Mi=0;S.on=ki,S.off=Li,S.signal=Ai;var Hi=30,Bi=S.Pass={toString:function(){return"CodeMirror.Pass"}};ji.prototype={set:function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)}},S.countColumn=Fi;var Ii=[""],Ji=/[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc]/,Gi=/[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff]/;S.replaceGetRect=function(e){ns=e};var rs=function(){if(r)return!1;var e=Yi("div");return"draggable"in e||"dragDrop"in e}(),is=/^$/;e?is=/$'/:a&&!/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent)?is=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/:i&&(is=/[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.]|\?[\w~`@#$%\^&*(_=+{[|><]/);var ss,us,fs="\n\nb".split(/\n/).length!=3?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var s=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=s.indexOf("\r");o!=-1?(n.push(s.slice(0,o)),t+=o+1):(n.push(s),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)};S.splitLines=fs;var ls=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},cs=function(){var e=Yi("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),hs={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",109:"-",107:"=",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};S.keyNames=hs,function(){for(var e=0;e<10;e++)hs[e+48]=String(e);for(var e=65;e<=90;e++)hs[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)hs[e+111]=hs[e+63235]="F"+e}();var Ss=function(){function n(n){return n<=255?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1791?t.charAt(n-1536):1792<=n&&n<=2220?"r":"L"}var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",t="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,s=/[LRr]/,o=/[Lb1n]/,u=/[1n]/,a="L";return function(e){if(!r.test(e))return!1;var t=e.length,f=[];for(var l=0,c;l<t;++l)f.push(c=n(e.charCodeAt(l)));for(var l=0,h=a;l<t;++l){var c=f[l];c=="m"?f[l]=h:h=c}for(var l=0,p=a;l<t;++l){var c=f[l];c=="1"&&p=="r"?f[l]="n":s.test(c)&&(p=c,c=="r"&&(f[l]="R"))}for(var l=1,h=f[0];l<t-1;++l){var c=f[l];c=="+"&&h=="1"&&f[l+1]=="1"?f[l]="1":c==","&&h==f[l+1]&&(h=="1"||h=="n")&&(f[l]=h),h=c}for(var l=0;l<t;++l){var c=f[l];if(c==",")f[l]="N";else if(c=="%"){for(var d=l+1;d<t&&f[d]=="%";++d);var v=l&&f[l-1]=="!"||d<t-1&&f[d]=="1"?"1":"N";for(var m=l;m<d;++m)f[m]=v;l=d-1}}for(var l=0,p=a;l<t;++l){var c=f[l];p=="L"&&c=="1"?f[l]="L":s.test(c)&&(p=c)}for(var l=0;l<t;++l)if(i.test(f[l])){for(var d=l+1;d<t&&i.test(f[d]);++d);var g=(l?f[l-1]:a)=="L",y=(d<t-1?f[d]:a)=="L",v=g||y?"L":"R";for(var m=l;m<d;++m)f[m]=v;l=d-1}var b=[],w;for(var l=0;l<t;)if(o.test(f[l])){var E=l;for(++l;l<t&&o.test(f[l]);++l);b.push({from:E,to:l,level:0})}else{var S=l,x=b.length;for(++l;l<t&&f[l]!="L";++l);for(var m=S;m<l;)if(u.test(f[m])){S<m&&b.splice(x,0,{from:S,to:m,level:1});var T=m;for(++m;m<l&&u.test(f[m]);++m);b.splice(x,0,{from:T,to:m,level:2}),S=m}else++m;S<l&&b.splice(x,0,{from:S,to:l,level:1})}return b[0].level==1&&(w=e.match(/^\s+/))&&(b[0].from=w[0].length,b.unshift({from:0,to:w[0].length,level:0})),Ri(b).level==1&&(w=e.match(/\s+$/))&&(Ri(b).to-=w[0].length,b.push({from:t-w[0].length,to:t,level:0})),b[0].level!=Ri(b).level&&b.push({from:t,to:t,level:b[0].level}),b}}();return S.version="3.11 +",S}(),CodeMirror.defineMode("ruby",function(e){function t(e){var t={};for(var n=0,r=e.length;n<r;++n)t[e[n]]=!0;return t}function u(e,t,n){return n.tokenize.push(e),e(t,n)}function a(e,t){o=null;if(e.sol()&&e.match("=begin")&&e.eol())return t.tokenize.push(h),"comment";if(e.eatSpace())return null;var n=e.next(),r;if(n=="`"||n=="'"||n=='"'||n=="/"&&!e.eol()&&e.peek()!=" ")return u(l(n,"string",n=='"'||n=="`"),e,t);if(n=="%"){var i,a=!1;e.eat("s")?i="atom":e.eat(/[WQ]/)?(i="string",a=!0):e.eat(/[wxqr]/)&&(i="string");var f=e.eat(/[^\w\s]/);return f?(s.propertyIsEnumerable(f)&&(f=s[f]),u(l(f,i,a,!0),e,t)):"operator"}if(n=="#")return e.skipToEnd(),"comment";if(n=="<"&&(r=e.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return u(c(r[1]),e,t);if(n=="0")return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(n))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if(n=="?"){while(e.match(/^\\[CM]-/));return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}return n==":"?e.eat("'")?u(l("'","atom",!1),e,t):e.eat('"')?u(l('"',"atom",!0),e,t):(e.eatWhile(/[\w\?]/),"atom"):n=="@"?(e.eat("@"),e.eatWhile(/[\w\?]/),"variable-2"):n=="$"?(e.next(),e.eatWhile(/[\w\?]/),"variable-3"):/\w/.test(n)?(e.eatWhile(/[\w\?]/),e.eat(":")?"atom":"ident"):n!="|"||!t.varList&&t.lastTok!="{"&&t.lastTok!="do"?/[\(\)\[\]{}\\;]/.test(n)?(o=n,null):n=="-"&&e.eat(">")?"arrow":/[=+\-\/*:\.^%<>~|]/.test(n)?(e.eatWhile(/[=+\-\/*:\.^%<>~|]/),"operator"):null:(o="|",null)}function f(){var e=1;return function(t,n){if(t.peek()=="}"){e--;if(e==0)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)}else t.peek()=="{"&&e++;return a(t,n)}}function l(e,t,n,r){return function(i,s){var o=!1,u;while((u=i.next())!=null){if(u==e&&(r||!o)){s.tokenize.pop();break}if(n&&u=="#"&&!o&&i.eat("{")){s.tokenize.push(f(arguments.callee));break}o=!o&&u=="\\"}return t}}function c(e){return function(t,n){return t.match(e)?n.tokenize.pop():t.skipToEnd(),"string"}}function h(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}var n=t(["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public" +,"protected","private","require","load","require_relative","extend","autoload"]),r=t(["def","class","case","for","while","do","module","then","catch","loop","proc","begin"]),i=t(["end","until"]),s={"[":"]","{":"}","(":")"},o;return{startState:function(){return{tokenize:[a],indented:0,context:{type:"top",indented:-e.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){e.sol()&&(t.indented=e.indentation());var s=t.tokenize[t.tokenize.length-1](e,t),u;if(s=="ident"){var a=e.current();s=n.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(a)?"tag":t.lastTok=="def"||t.lastTok=="class"||t.varList?"def":"variable",r.propertyIsEnumerable(a)?u="indent":i.propertyIsEnumerable(a)?u="dedent":(a=="if"||a=="unless")&&e.column()==e.indentation()&&(u="indent")}if(o||s&&s!="comment")t.lastTok=a||o||s;return o=="|"&&(t.varList=!t.varList),u=="indent"||/[\(\[\{]/.test(o)?t.context={prev:t.context,type:o||s,indented:t.indented}:(u=="dedent"||/[\)\]\}]/.test(o))&&t.context.prev&&(t.context=t.context.prev),e.eol()&&(t.continuedLine=o=="\\"||s=="operator"),s},indent:function(t,n){if(t.tokenize[t.tokenize.length-1]!=a)return 0;var r=n&&n.charAt(0),i=t.context,o=i.type==s[r]||i.type=="keyword"&&/^(?:end|until|else|elsif|when|rescue)\b/.test(n);return i.indented+(o?0:e.indentUnit)+(t.continuedLine?e.indentUnit:0)},electricChars:"}de"}}),CodeMirror.defineMIME("text/x-ruby","ruby"),CodeMirror.defineMode("xml",function(e,t){function a(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if(r=="<"){if(e.eat("!"))return e.eat("[")?e.match("CDATA[")?n(c("atom","]]>")):null:e.match("--")?n(c("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(h(1))):null;if(e.eat("?"))return e.eatWhile(/[\w\._\-]/),t.tokenize=c("meta","?>"),"meta";var i=e.eat("/");o="";var s;while(s=e.eat(/[^\s\u00a0=<>\"\'\/?]/))o+=s;return o?(u=i?"closeTag":"openTag",t.tokenize=f,"tag"):"error"}if(r=="&"){var a;return e.eat("#")?e.eat("x")?a=e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):a=e.eatWhile(/[\d]/)&&e.eat(";"):a=e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),a?"atom":"error"}return e.eatWhile(/[^&<]/),null}function f(e,t){var n=e.next();return n==">"||n=="/"&&e.eat(">")?(t.tokenize=a,u=n==">"?"endTag":"selfcloseTag","tag"):n=="="?(u="equals",null):/[\'\"]/.test(n)?(t.tokenize=l(n),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=<>\"\']/),"word")}function l(e){return function(t,n){while(!t.eol())if(t.next()==e){n.tokenize=f;break}return"string"}}function c(e,t){return function(n,r){while(!n.eol()){if(n.match(t)){r.tokenize=a;break}n.next()}return e}}function h(e){return function(t,n){var r;while((r=t.next())!=null){if(r=="<")return n.tokenize=h(e+1),n.tokenize(t,n);if(r==">"){if(e==1){n.tokenize=a;break}return n.tokenize=h(e-1),n.tokenize(t,n)}}return"meta"}}function m(){for(var e=arguments.length-1;e>=0;e--)p.cc.push(arguments[e])}function g(){return m.apply(null,arguments),!0}function y(e,t){var n=i.doNotIndent.hasOwnProperty(e)||p.context&&p.context.noIndent;p.context={prev:p.context,tagName:e,indent:p.indented,startOfLine:t,noIndent:n}}function b(){p.context&&(p.context=p.context.prev)}function w(e){if(e=="openTag")return p.tagName=o,p.tagStart=d.column(),g(T,E(p.startOfLine));if(e=="closeTag"){var t=!1;return p.context?p.context.tagName!=o&&(i.implicitlyClosed.hasOwnProperty(p.context.tagName.toLowerCase())&&b(),t=!p.context||p.context.tagName!=o):t=!0,t&&(v="error"),g(S(t))}return g()}function E(e){return function(t){var n=p.tagName;return p.tagName=p.tagStart=null,t=="selfcloseTag"||t=="endTag"&&i.autoSelfClosers.hasOwnProperty(n.toLowerCase())?(x(n.toLowerCase()),g()):t=="endTag"?(x(n.toLowerCase()),y(n,e),g()):g()}}function S(e){return function(t){return e&&(v="error"),t=="endTag"?(b(),g()):(v="error",g(arguments.callee))}}function x(e){var t;for(;;){if(!p.context)return;t=p.context.tagName.toLowerCase();if(!i.contextGrabbers.hasOwnProperty(t)||!i.contextGrabbers[t].hasOwnProperty(e))return;b()}}function T(e){return e=="word"?(v="attribute",g(N,T)):e=="endTag"||e=="selfcloseTag"?m():(v="error",g(T))}function N(e){return e=="equals"?g(C,T):(i.allowMissing?e=="word"&&(v="attribute"):v="error",e=="endTag"||e=="selfcloseTag"?m():g())}function C(e){return e=="string"?g(k):e=="word"&&i.allowUnquoted?(v="string",g()):(v="error",e=="endTag"||e=="selfCloseTag"?m():g())}function k(e){return e=="string"?g(k):m()}var n=e.indentUnit,r=t.multilineTagIndentFactor||1,i=t.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},s=t.alignCDATA,o,u,p,d,v;return{startState:function(){return{tokenize:a,cc:[],indented:0,startOfLine:!0,tagName:null,tagStart:null,context:null}},token:function(e,t){!t.tagName&&e.sol()&&(t.startOfLine=!0,t.indented=e.indentation());if(e.eatSpace())return null;v=u=o=null;var n=t.tokenize(e,t);t.type=u;if((n||u)&&n!="comment"){p=t,d=e;for(;;){var r=t.cc.pop()||w;if(r(u||n))break}}return t.startOfLine=!1,v||n},indent:function(e,t,i){var o=e.context;if(e.tokenize!=f&&e.tokenize!=a||o&&o.noIndent)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return e.tagStart+n*r;if(s&&/<!\[CDATA\[/.test(t))return 0;o&&/^<\//.test(t)&&(o=o.prev);while(o&&!o.startOfLine)o=o.prev;return o?o.indent+n:0},electricChars:"/",configuration:t.htmlMode?"html":"xml"}}),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0}),CodeMirror.defineMode("htmlmixed",function(e,t){function a(e,t){var s=t.htmlState.tagName,o=n.token(e,t.htmlState);if(s=="script"&&/\btag\b/.test(o)&&e.current()==">"){var u=e.string.slice(Math.max(0,e.pos-100),e.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);u=u?u[1]:"",u&&/[\"\']/.test(u.charAt(0))&&(u=u.slice(1,u.length-1));for(var a=0;a<i.length;++a){var f=i[a];if(typeof f.matches=="string"?u==f.matches:f.matches.test(u)){f.mode&&(t.token=l,t.localMode=f.mode,t.localState=f.mode.startState&&f.mode.startState(n.indent(t.htmlState,"")));break}}}else s=="style"&&/\btag\b/.test(o)&&e.current()==">"&&(t.token=c,t.localMode=r,t.localState=r.startState(n.indent(t.htmlState,"")));return o}function f(e,t,n){var r=e.current(),i=r.search(t),s;if(i>-1)e.backUp(r.length-i);else if(s=r.match(/<\/?$/))e.backUp(r.length),e.match(t,!1)||e.match(r[0]);return n}function l(e,t){return e.match(/^<\/\s*script\s*>/i,!1)?(t.token=a,t.localState=t.localMode=null,a(e,t)):f(e,/<\/\s*script\s*>/,t.localMode.token(e,t.localState))}function c(e,t){return e.match(/^<\/\s*style\s*>/i,!1)?(t.token=a,t.localState=t.localMode=null,a(e,t)):f(e,/<\/\s*style\s*>/,r.token(e,t.localState))}var n=CodeMirror.getMode(e,{name:"xml",htmlMode:!0}),r=CodeMirror.getMode(e,"css"),i=[],s=t&&t.scriptTypes;i.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(e,"javascript")});if(s)for(var o=0;o<s.length;++o){var u=s[o];i.push({matches:u.matches,mode:u.mode&&CodeMirror.getMode(e,u.mode)})}return i.push({matches:/./,mode:CodeMirror.getMode(e,"text/plain")}),{startState:function(){var e=n.startState();return{token:a,localMode:null,localState:null,htmlState:e}},copyState:function(e){if(e.localState)var t=CodeMirror.copyState(e.localMode,e.localState);return{token:e.token,localMode:e.localMode,localState:t,htmlState:CodeMirror.copyState(n,e.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(e,t){return!e.localMode||/^\s*<\//.test(t)?n.indent(e.htmlState,t):e.localMode.indent?e.localMode.indent(e.localState,t):CodeMirror.Pass},electricChars:"/{}:",innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||n}}}},"xml","javascript","css"),CodeMirror.defineMIME("text/html","htmlmixed"),CodeMirror.defineMode("coffeescript",function(e){function n(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function y(e,n){if(e.sol()){var c=n.scopes[0].offset;if(e.eatSpace()){var h=e.indentation();return h>c?"indent":h<c?"dedent":null}c>0&&S(e,n)}if(e.eatSpace())return null;var m=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return n.tokenize=w,n.tokenize(e,n);if(m==="#")return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var y=!1;e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(y=!0),e.match(/^-?\d+\.\d*/)&&(y=!0),e.match(/^-?\.\d+/)&&(y=!0);if(y)return e.peek()=="."&&e.backUp(1),"number";var E=!1;e.match(/^-?0x[0-9a-f]+/i)&&(E=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(E=!0),e.match(/^-?0(?![\dx])/i)&&(E=!0);if(E)return"number"}if(e.match(d))return n.tokenize=b(e.current(),"string"),n.tokenize(e,n);if(e.match(v)){if(e.current()!="/"||e.match(/^.*\//,!1))return n.tokenize=b(e.current(),"string-2"),n.tokenize(e,n);e.backUp(1)}return e.match(u)||e.match(o)?"punctuation":e.match(s)||e.match(r)||e.match(l)?"operator":e.match(i)?"punctuation":e.match(g)?"atom":e.match(p)?"keyword":e.match(a)?"variable":e.match(f)?"property":(e.next(),t)}function b(n,r){var i=n.length==1;return function(s,o){while(!s.eol()){s.eatWhile(/[^'"\/\\]/);if(s.eat("\\")){s.next();if(i&&s.eol())return r}else{if(s.match(n))return o.tokenize=y,r;s.eat(/['"\/]/)}}return i&&(e.mode.singleLineStringErrors?r=t:o.tokenize=y),r}}function w(e,t){while(!e.eol()){e.eatWhile(/[^#]/);if(e.match("###")){t.tokenize=y;break}e.eatWhile("#")}return"comment"}function E(t,n,r){r=r||"coffee";var i=0;if(r==="coffee"){for(var s=0;s<n.scopes.length;s++)if(n.scopes[s].type==="coffee"){i=n.scopes[s].offset+e.indentUnit;break}}else i=t.column()+t.current().length;n.scopes.unshift({offset:i,type:r})}function S(e,t){if(t.scopes.length==1)return;if(t.scopes[0].type==="coffee"){var n=e.indentation(),r=-1;for(var i=0;i<t.scopes.length;++i)if(n===t.scopes[i].offset){r=i;break}if(r===-1)return!0;while(t.scopes[0].offset!==n)t.scopes.shift();return!1}return t.scopes.shift(),!1}function x(e,n){var r=n.tokenize(e,n),i=e.current();if(i===".")return r=n.tokenize(e,n),i=e.current(),r==="variable"?"variable":t;i==="return"&&(n.dedent+=1),((i==="->"||i==="=>")&&!n.lambda&&n.scopes[0].type=="coffee"&&e.peek()===""||r==="indent")&&E(e,n);var s="[({".indexOf(i);return s!==-1&&E(e,n,"])}".slice(s,s+1)),c.exec(i)&&E(e,n),i=="then"&&S(e,n),r==="dedent"&&S(e,n)?t:(s="])}".indexOf(i),s!==-1&&S(e,n)?t:(n.dedent>0&&e.eol()&&n.scopes[0].type=="coffee"&&(n.scopes.length>1&&n.scopes.shift(),n.dedent-=1),r))}var t="error",r=new RegExp("^[\\+\\-\\*/%&|\\^~<>!?]"),i=new RegExp("^[\\(\\)\\[\\]\\{\\},:`=;\\.]"),s=new RegExp("^((->)|(=>)|(\\+\\+)|(\\+\\=)|(\\-\\-)|(\\-\\=)|(\\*\\*)|(\\*\\=)|(\\/\\/)|(\\/\\=)|(==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//))"),o=new RegExp("^((\\.\\.)|(\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),u=new RegExp("^((\\.\\.\\.)|(//=)|(>>=)|(<<=)|(\\*\\*=))"),a=new RegExp("^[_A-Za-z$][_A-Za-z$0-9]*"),f=new RegExp("^(@|this.)[_A-Za-z$][_A-Za-z$0-9]*"),l=n(["and","or","not","is","isnt","in","instanceof","typeof"]),c=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],h=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","throw","when","until"],p=n(c.concat(h));c=n(c);var d=new RegExp("^('{3}|\"{3}|['\"])"),v=new RegExp("^(/{3}|/)"),m=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],g=n(m),T={startState:function(e){return{tokenize:y,scopes:[{offset:e||0,type:"coffee"}],lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=x(e,t);return t.lastToken={style:n,content:e.current()},e.eol()&&e.lambda&&(t.lambda=!1),n},indent:function(e){return e.tokenize!=y?0:e.scopes[0].offset}};return T}),CodeMirror.defineMIME("text/x-coffeescript","coffeescript"),CodeMirror.defineMode("javascript",function(e,t){function u(e,t,n){return t.tokenize=n,n(e,t)}function a(e,t){var n=!1,r;while((r=e.next())!=null){if(r==t&&!n)return!1;n=!n&&r=="\\"}return n}function c(e,t,n){return f=e,l=n,t}function h(e,t){var n=e.next();if(n=='"'||n=="'")return u(e,t,p(n));if(/[\[\]{}\(\),;\:\.]/.test(n))return c(n);if(n=="0"&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),c("number","number");if(/\d/.test(n)||n=="-"&&e.eat(/\d/))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),c("number","number");if(n=="/")return e.eat("*")?u(e,t,d):e.eat("/")?(e.skipToEnd(),c("comment","comment")):t.lastType=="operator"||t.lastType=="keyword c"||/^[\[{}\(,;:]$/.test(t.lastType)?(a(e,"/"),e.eatWhile(/[gimy]/),c("regexp","string-2")):(e.eatWhile(o),c("operator",null,e.current()));if(n=="#")return e.skipToEnd(),c("error","error");if(o.test(n))return e.eatWhile(o),c("operator",null,e.current());e.eatWhile(/[\w\$_]/);var r=e.current(),i=s.propertyIsEnumerable(r)&&s[r];return i&&t.lastType!="."?c(i.type,i.style,r):c("variable","variable",r)}function p(e){return function(t,n){return a(t,e)||(n.tokenize=h),c("string","string")}}function d(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=h;break}n=r=="*"}return c("comment","comment")}function m(e,t,n,r,i,s){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=s,r!=null&&(this.align=r)}function g(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0}function y(e,t,n,i,s){var o=e.cc;b.state=e,b.stream=s,b.marked=null,b.cc=o,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);for(;;){var u=o.length?o.pop():r?O:A;if(u(n,i)){while(o.length&&o[o.length-1].lex)o.pop()();return b.marked?b.marked:n=="variable"&&g(e,i)?"variable-2":t}}}function w(){for(var e=arguments.length-1;e>=0;e--)b.cc.push(arguments[e])}function E(){return w.apply(null,arguments),!0}function S(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var n=b.state;if(n.context){b.marked="def";if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;n.globalVars={name:e,next:n.globalVars}}}function T(){b.state.context={prev:b.state.context,vars:b.state.localVars},b.state.localVars=x}function N(){b.state.localVars=b.state.context.vars,b.state.context=b.state.context.prev}function C(e,t){var n=function(){var n=b.state;n.lexical=new m(n.indented,b.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function k(){var e=b.state;e.lexical.prev&&(e.lexical.type==")"&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function L(e){return function(t){return t==e?E():e==";"?w():E(arguments.callee)}}function A(e){return e=="var"?E(C("vardef"),W,L(";"),k):e=="keyword a"?E(C("form"),O,A,k):e=="keyword b"?E(C("form"),A,k):e=="{"?E(C("}"),R,k):e==";"?E():e=="if"?E(C("form"),O,A,k,V(b.state.indented)):e=="function"?E(G):e=="for"?E(C("form"),L("("),C(")"),$,L(")"),k,A,k):e=="variable"?E(C("stat"),B):e=="switch"?E(C("form"),O,C("}","switch"),L("{"),R,k,k):e=="case"?E(O,L(":")):e=="default"?E(L(":")):e=="catch"?E(C("form"),T,L("("),Y,L(")"),A,k,N):w(C("stat"),O,L(";"),k)}function O(e){return _(e,P)}function M(e){return _(e,H)}function _(e,t){return v.hasOwnProperty(e)?E(t):e=="function"?E(G):e=="keyword c"?E(D):e=="("?E(C(")"),D,L(")"),k,t):e=="operator"?E(O):e=="["?E(C("]"),q(M,"]"),k,t):e=="{"?E(C("}"),q(F,"}"),k,t):E()}function D(e){return e.match(/[;\}\)\],]/)?w():w(O)}function P(e,t){return e==","?w():H(e,t,P)}function H(e,t,n){n||(n=H);if(e=="operator")return/\+\+|--/.test(t)?E(n):t=="?"?E(O,L(":"),O):E(O);if(e==";")return;if(e=="(")return E(C(")","call"),q(M,")"),k,n);if(e==".")return E(j,n);if(e=="[")return E(C("]"),O,L("]"),k,n)}function B(e){return e==":"?E(k,A):w(P,L(";"),k)}function j(e){if(e=="variable")return b.marked="property",E()}function F(e,t){if(e=="variable"){b.marked="property";if(t=="get"||t=="set")return E(I)}else if(e=="number"||e=="string")b.marked=e+" property";if(v.hasOwnProperty(e))return E(L(":"),M)}function I(e){return e==":"?E(O):e!="variable"?E(L(":"),O):(b.marked="property",E(G))}function q(e,t){function n(r){if(r==","){var i=b.state.lexical;return i.info=="call"&&(i.pos=(i.pos||0)+1),E(e,n)}return r==t?E():E(L(t))}return function(r){return r==t?E():w(e,n)}}function R(e){return e=="}"?E():w(A,R)}function U(e){return e==":"?E(z):w()}function z(e){return e=="variable"?(b.marked="variable-3",E()):w()}function W(e,t){return e=="variable"?(S(t),i?E(U,X):E(X)):w()}function X(e,t){if(t=="=")return E(M,X);if(e==",")return E(W)}function V(e){return function(t,n){return t=="keyword b"&&n=="else"?(b.state.lexical=new m(e,0,"form",null,b.state.lexical),E(A,k)):w()}}function $(e){return e=="var"?E(W,L(";"),K):e==";"?E(K):e=="variable"?E(J):w(O,L(";"),K)}function J(e,t){return t=="in"?E(O):E(P,K)}function K(e,t){return e==";"?E(Q):t=="in"?E(O):w(O,L(";"),Q)}function Q(e){e!=")"&&E(O)}function G(e,t){if(e=="variable")return S(t),E(G);if(e=="(")return E(C(")"),T,q(Y,")"),k,A,N)}function Y(e,t){if(e=="variable")return S(t),i?E(U):E()}var n=e.indentUnit,r=t.json,i=t.typescript,s=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),s=e("operator"),o={type:"atom",style:"atom"},u={"if":e("if"),"while":t,"with":t,"else":n,"do":n,"try":n,"finally":n,"return":r,"break":r,"continue":r,"new":r,"delete":r,"throw":r,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":s,"typeof":s,"instanceof":s,"true":o,"false":o,"null":o,"undefined":o,NaN:o,Infinity:o,"this":e("this")};if(i){var a={type:"variable",style:"variable-3"},f={"interface":e("interface"),"class":e("class"),"extends":e("extends"),constructor:e("constructor"),"public":e("public"),"private":e("private"),"protected":e("protected"),"static":e("static"),"super":e("super"),string:a,number:a,bool:a,any:a};for(var l in f)u[l]=f[l]}return u}(),o=/[+\-*&%=<>!?|~^]/,f,l,v={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0},b={state:null,column:null,marked:null,cc:null},x={name:"this",next:{name:"arguments"}};return k.lex=!0,{startState:function(e){return{tokenize:h,lastType:null,cc:[],lexical:new m((e||0)-n,0,"block",!1),localVars:t.localVars,globalVars:t.globalVars,context:t.localVars&&{vars:t.localVars},indented:0}},token:function(e,t){e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation());if(t.tokenize!=d&&e.eatSpace())return null;var n=t.tokenize(e,t);return f=="comment"?n:(t.lastType=f!="operator"||l!="++"&&l!="--"?f:"incdec",y(t,n,f,l,e))},indent:function(e,r){if(e.tokenize==d)return CodeMirror.Pass;if(e.tokenize!=h)return 0;var i=r&&r.charAt(0),s=e.lexical;s.type=="stat"&&i=="}"&&(s=s.prev);var o=s.type,u=i==o;if(t.statementIndent!=null){o==")"&&s.prev&&s.prev.type=="stat"&&(s=s.prev);if(s.type=="stat")return s.indented+t.statementIndent}return o=="vardef"?s.indented+(e.lastType=="operator"||e.lastType==","?4:0):o=="form"&&i=="{"?s.indented:o=="form"?s.indented+n:o=="stat"?s.indented+(e.lastType=="operator"||e.lastType==","?n:0):s.info=="switch"&&!u?s.indented+(/^(?:case|default)\b/.test(r)?n:2*n):s.align?s.column+(u?0:1):s.indented+(u?0:n)},electricChars:":{}",jsonMode:r}}),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("text/ecmascript","javascript"),CodeMirror.defineMIME("application/javascript","javascript"),CodeMirror.defineMIME("application/ecmascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/x-json",{name:"javascript",json:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMode("css",function(e){return CodeMirror.getMode(e,"text/css")}),CodeMirror.defineMode("css-base",function(e,t){"use strict";function c(e,t){return l=t,e}function h(e,t){var n=e.next();if(r[n]){var i=r[n](e,t);if(i!==!1)return i}if(n=="@")return e.eatWhile(/[\w\\\-]/),c("def",e.current());if(n=="=")c(null,"compare");else{if(!(n!="~"&&n!="|"||!e.eat("=")))return c(null,"compare");if(n=='"'||n=="'")return t.tokenize=p(n),t.tokenize(e,t);if(n=="#")return e.eatWhile(/[\w\\\-]/),c("atom","hash");if(n=="!")return e.match(/^\s*\w*/),c("keyword","important");if(/\d/.test(n))return e.eatWhile(/[\w.%]/),c("number","unit");if(n!=="-")return/[,+>*\/]/.test(n)?c(null,"select-op"):n=="."&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?c("qualifier","qualifier"):n==":"?c("operator",n):/[;{}\[\]\(\)]/.test(n)?c(null,n):n=="u"&&e.match("rl(")?(e.backUp(1),t.tokenize=d,c("property","variable")):(e.eatWhile(/[\w\\\-]/),c("property","variable"));if(/\d/.test(e.peek()))return e.eatWhile(/[\w.%]/),c("number","unit");if(e.match(/^[^-]+-/))return c("meta","meta")}}function p(e,t){return function(n,r){var i=!1,s;while((s=n.next())!=null){if(s==e&&!i)break;i=!i&&s=="\\"}return i||(t&&n.backUp(1),r.tokenize=h),c("string","string")}}function d(e,t){return e.next(),e.match(/\s*[\"\']/,!1)?t.tokenize=h:t.tokenize=p(")",!0),c(null,"(")}var n=e.indentUnit,r=t.hooks||{},i=t.atMediaTypes||{},s=t.atMediaFeatures||{},o=t.propertyKeywords||{},u=t.colorKeywords||{},a=t.valueKeywords||{},f=!!t.allowNested,l=null;return{startState:function(e){return{tokenize:h,baseIndent:e||0,stack:[]}},token:function(e,t){t.tokenize=t.tokenize||h;if(t.tokenize==h&&e.eatSpace())return null;var n=t.tokenize(e,t);n&&typeof n!="string"&&(n=c(n[0],n[1]));var r=t.stack[t.stack.length-1];if(n=="variable")return l=="variable-definition"&&t.stack.push("propertyValue"),"variable-2";if(n=="property"){var p=e.current().toLowerCase();r=="propertyValue"?a.hasOwnProperty(p)?n="string-2":u.hasOwnProperty(p)?n="keyword":n="variable-2":r=="rule"?o.hasOwnProperty(p)||(n+=" error"):r=="block"?o.hasOwnProperty(p)?n="property":u.hasOwnProperty(p)?n="keyword":a.hasOwnProperty(p)?n="string-2":n="tag":!r||r=="@media{"?n="tag":r=="@media"?i[e.current()]?n="attribute":/^(only|not)$/.test(p)?n="keyword":p=="and"?n="error":s.hasOwnProperty(p)?n="error":n="attribute error":r=="@mediaType"?i.hasOwnProperty(p)?n="attribute":p=="and"?n="operator":/^(only|not)$/.test(p)?n="error":n="error":r=="@mediaType("?o.hasOwnProperty(p)||(i.hasOwnProperty(p)?n="error":p=="and"?n="operator":/^(only|not)$/.test(p)?n="error":n+=" error"):r=="@import"?n="tag":n="error"}else n=="atom"?!r||r=="@media{"||r=="block"?n="builtin":r=="propertyValue"?/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(e.current())||(n+=" error"):n="error":r=="@media"&&l=="{"&&(n="error");if(l=="{")if(r=="@media"||r=="@mediaType")t.stack.pop(),t.stack[t.stack.length-1]="@media{";else{var d=f?"block":"rule";t.stack.push(d)}else if(l=="}"){var v=t.stack[t.stack.length-1];v=="interpolation"&&(n="operator"),t.stack.pop(),r=="propertyValue"&&t.stack.pop()}else l=="interpolation"?t.stack.push("interpolation"):l=="@media"?t.stack.push("@media"):l=="@import"?t.stack.push("@import"):r=="@media"&&/\b(keyword|attribute)\b/.test(n)?t.stack.push("@mediaType"):r=="@mediaType"&&e.current()==","?t.stack.pop():r=="@mediaType"&&l=="("?t.stack.push("@mediaType("):r=="@mediaType("&&l==")"?t.stack.pop():r!="rule"&&r!="block"||l!=":"?r=="propertyValue"&&l==";"?t.stack.pop():r=="@import"&&l==";"&&t.stack.pop():t.stack.push("propertyValue");return n},indent:function(e,t){var r=e.stack.length;return/^\}/.test(t)&&(r-=e.stack[e.stack.length-1]=="propertyValue"?2:1),e.baseIndent+r*n},electricChars:"}"}}),function(){function e(e){var t={};for(var n=0;n<e.length;++n)t[e[n]]=!0;return t}function o(e,t){var n=!1,r;while((r=e.next())!=null){if(n&&r=="/"){t.tokenize=null;break}n=r=="*"}return["comment","comment"]}var t=e(["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"]),n=e(["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"]),r=e(["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid-cell","grid-column","grid-column-align","grid-column-sizing","grid-column-span","grid-columns","grid-flow","grid-row","grid-row-align","grid-row-sizing","grid-row-span","grid-rows","grid-template","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-shadow","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"]),i=e(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua"]),s=e(["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix" +,"mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","overlay","overline","padding","padding-box","painted","paused","persian","plus-darker","plus-lighter","pointer","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","white","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"]);CodeMirror.defineMIME("text/css",{atMediaTypes:t,atMediaFeatures:n,propertyKeywords:r,colorKeywords:i,valueKeywords:s,hooks:{"<":function(e,t){function n(e,t){var n=0,r;while((r=e.next())!=null){if(n>=2&&r==">"){t.tokenize=null;break}n=r=="-"?n+1:0}return["comment","comment"]}if(e.eat("!"))return t.tokenize=n,n(e,t)},"/":function(e,t){return e.eat("*")?(t.tokenize=o,o(e,t)):!1}},name:"css-base"}),CodeMirror.defineMIME("text/x-scss",{atMediaTypes:t,atMediaFeatures:n,propertyKeywords:r,colorKeywords:i,valueKeywords:s,allowNested:!0,hooks:{$:function(e){return e.match(/^[\w-]+/),e.peek()==":"?["variable","variable-definition"]:["variable","variable"]},"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=o,o(e,t)):["operator","operator"]},"#":function(e){return e.eat("{")?["operator","interpolation"]:(e.eatWhile(/[\w\\\-]/),["atom","hash"])}},name:"css-base"})}(),CodeMirror.defineMode("sass",function(e){var t=function(e){return new RegExp("^"+e.join("|"))},n=["true","false","null","auto"],r=new RegExp("^"+n.join("|")),i=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not"],s=t(i),o=/^::?[\w\-]+/,u=function(e,t){var n=e.peek();return n===")"?(e.next(),t.tokenizer=p,"operator"):n==="("?(e.next(),e.eatSpace(),"operator"):n==="'"||n==='"'?(t.tokenizer=f(e.next()),"string"):(t.tokenizer=f(")",!1),"string")},a=function(e,t){return e.skipTo("*/")?(e.next(),e.next(),t.tokenizer=p):e.next(),"comment"},f=function(e,t){function n(r,i){var s=r.next(),o=r.peek(),u=r.string.charAt(r.pos-2),a=s!=="\\"&&o===e||s===e&&u!=="\\";return a?(s!==e&&t&&r.next(),i.tokenizer=p,"string"):s==="#"&&o==="{"?(i.tokenizer=l(n),r.next(),"operator"):"string"}return t==null&&(t=!0),n},l=function(e){return function(t,n){return t.peek()==="}"?(t.next(),n.tokenizer=e,"operator"):p(t,n)}},c=function(t){if(t.indentCount==0){t.indentCount++;var n=t.scopes[0].offset,r=n+e.indentUnit;t.scopes.unshift({offset:r})}},h=function(e){if(e.scopes.length==1)return;e.scopes.shift()},p=function(e,t){var n=e.peek();if(e.match("//"))return e.skipToEnd(),"comment";if(e.match("/*"))return t.tokenizer=a,t.tokenizer(e,t);if(e.match("#{"))return t.tokenizer=l(p),"operator";if(n===".")return e.next(),e.match(/^[\w-]+/)?(c(t),"atom"):e.peek()==="#"?(c(t),"atom"):"operator";if(n==="#"){e.next();if(e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))return"number";if(e.match(/^[\w-]+/))return c(t),"atom";if(e.peek()==="#")return c(t),"atom"}return e.match(/^-?[0-9\.]+/)?"number":e.match(/^(px|em|in)\b/)?"unit":e.match(r)?"keyword":e.match(/^url/)&&e.peek()==="("?(t.tokenizer=u,"atom"):n==="$"?(e.next(),e.eatWhile(/[\w-]/),e.peek()===":"?(e.next(),"variable-2"):"variable-3"):n==="!"?(e.next(),e.match(/^[\w]+/)?"keyword":"operator"):n==="="?(e.next(),e.match(/^[\w-]+/)?(c(t),"meta"):"operator"):n==="+"?(e.next(),e.match(/^[\w-]+/)?"variable-3":"operator"):e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)?(c(t),"meta"):n==="@"?(e.next(),e.eatWhile(/[\w-]/),"meta"):n==='"'||n==="'"?(e.next(),t.tokenizer=f(n),"string"):n==":"&&e.match(o)?"keyword":e.eatWhile(/[\w-&]/)?e.peek()===":"&&!e.match(o,!1)?"property":"atom":e.match(s)?"operator":(e.next(),null)},d=function(t,n){t.sol()&&(n.indentCount=0);var r=n.tokenizer(t,n),i=t.current();i==="@return"&&h(n),r==="atom"&&c(n);if(r!==null){var s=t.pos-i.length,o=s+e.indentUnit*n.indentCount,u=[];for(var a=0;a<n.scopes.length;a++){var f=n.scopes[a];f.offset<=o&&u.push(f)}n.scopes=u}return r};return{startState:function(){return{tokenizer:p,scopes:[{offset:0,type:"sass"}],definedVars:[],definedMixins:[]}},token:function(e,t){var n=d(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e){return e.scopes[0].offset}}}),CodeMirror.defineMIME("text/x-sass","sass"),CodeMirror.defineMode("skim",function(e){var t=function(e){return new RegExp("^"+e.join("|"))},n=["true","false","null","auto"],r=new RegExp("^"+n.join("|")),i=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not"],s=t(i),o=/^::?[\w\-]+/,u=function(e,t){var n=e.peek();return n===")"?(e.next(),t.tokenizer=p,"operator"):n==="("?(e.next(),e.eatSpace(),"operator"):n==="'"||n==='"'?(t.tokenizer=f(e.next()),"string"):(t.tokenizer=f(")",!1),"string")},a=function(e,t){return e.skipTo("*/")?(e.next(),e.next(),t.tokenizer=p):e.next(),"comment"},f=function(e,t){function n(r,i){var s=r.next(),o=r.peek(),u=r.string.charAt(r.pos-2),a=s!=="\\"&&o===e||s===e&&u!=="\\";return a?(s!==e&&t&&r.next(),i.tokenizer=p,"string"):s==="#"&&o==="{"?(i.tokenizer=l(n),r.next(),"operator"):"string"}return t==null&&(t=!0),n},l=function(e){return function(t,n){return t.peek()==="}"?(t.next(),n.tokenizer=e,"operator"):p(t,n)}},c=function(t){if(t.indentCount==0){t.indentCount++;var n=t.scopes[0].offset,r=n+e.indentUnit;t.scopes.unshift({offset:r})}},h=function(e){if(e.scopes.length==1)return;e.scopes.shift()},p=function(e,t){var n=e.peek();if(e.match("//"))return e.skipToEnd(),"comment";if(e.match("/*"))return t.tokenizer=a,t.tokenizer(e,t);if(e.match("#{"))return t.tokenizer=l(p),"operator";if(n===".")return e.next(),e.match(/^[\w-]+/)?(c(t),"atom"):e.peek()==="#"?(c(t),"atom"):"operator";if(n==="#"){e.next();if(e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))return"number";if(e.match(/^[\w-]+/))return c(t),"atom";if(e.peek()==="#")return c(t),"atom"}return e.match(/^-?[0-9\.]+/)?"number":e.match(/^(px|em|in)\b/)?"unit":e.match(r)?"keyword":e.match(/^url/)&&e.peek()==="("?(t.tokenizer=u,"atom"):n==="$"?(e.next(),e.eatWhile(/[\w-]/),e.peek()===":"?(e.next(),"variable-2"):"variable-3"):n==="!"?(e.next(),e.match(/^[\w]+/)?"keyword":"operator"):n==="="?(e.next(),e.match(/^[\w-]+/)?(c(t),"meta"):"operator"):n==="+"?(e.next(),e.match(/^[\w-]+/)?"variable-3":"operator"):e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)?(c(t),"meta"):n==="@"?(e.next(),e.eatWhile(/[\w-]/),"meta"):n==='"'||n==="'"?(e.next(),t.tokenizer=f(n),"string"):n==":"&&e.match(o)?"keyword":e.eatWhile(/[\w-&]/)?e.peek()===":"&&!e.match(o,!1)?"property":"atom":e.match(s)?"operator":(e.next(),null)},d=function(t,n){t.sol()&&(n.indentCount=0);var r=n.tokenizer(t,n),i=t.current();i==="@return"&&h(n),r==="atom"&&c(n);if(r!==null){var s=t.pos-i.length,o=s+e.indentUnit*n.indentCount,u=[];for(var a=0;a<n.scopes.length;a++){var f=n.scopes[a];f.offset<=o&&u.push(f)}n.scopes=u}return r};return{startState:function(){return{tokenizer:p,scopes:[{offset:0,type:"skim"}],definedVars:[],definedMixins:[]}},token:function(e,t){var n=d(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e){return e.scopes[0].offset}}}),CodeMirror.defineMIME("text/x-skim","skim"),function(){"use strict";var e=[{keys:["Left"],type:"keyToKey",toKeys:["h"]},{keys:["Right"],type:"keyToKey",toKeys:["l"]},{keys:["Up"],type:"keyToKey",toKeys:["k"]},{keys:["Down"],type:"keyToKey",toKeys:["j"]},{keys:["Space"],type:"keyToKey",toKeys:["l"]},{keys:["Backspace"],type:"keyToKey",toKeys:["h"]},{keys:["Ctrl-Space"],type:"keyToKey",toKeys:["W"]},{keys:["Ctrl-Backspace"],type:"keyToKey",toKeys:["B"]},{keys:["Shift-Space"],type:"keyToKey",toKeys:["w"]},{keys:["Shift-Backspace"],type:"keyToKey",toKeys:["b"]},{keys:["Ctrl-n"],type:"keyToKey",toKeys:["j"]},{keys:["Ctrl-p"],type:"keyToKey",toKeys:["k"]},{keys:["Ctrl-["],type:"keyToKey",toKeys:["Esc"]},{keys:["Ctrl-c"],type:"keyToKey",toKeys:["Esc"]},{keys:["s"],type:"keyToKey",toKeys:["c","l"]},{keys:["S"],type:"keyToKey",toKeys:["c","c"]},{keys:["Home"],type:"keyToKey",toKeys:["0"]},{keys:["End"],type:"keyToKey",toKeys:["$"]},{keys:["PageUp"],type:"keyToKey",toKeys:["Ctrl-b"]},{keys:["PageDown"],type:"keyToKey",toKeys:["Ctrl-f"]},{keys:["H"],type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:["M"],type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:["L"],type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:["h"],type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:["l"],type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:["j"],type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:["k"],type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:["g","j"],type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:["g","k"],type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:["w"],type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:["W"],type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:["e"],type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:["E"],type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:["b"],type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:["B"],type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:["g","e"],type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:["g","E"],type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:["{"],type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:["}"],type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:["Ctrl-f"],type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:["Ctrl-b"],type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:["Ctrl-d"],type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:["Ctrl-u"],type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:["g","g"],type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:["G"],type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:["0"],type:"motion",motion:"moveToStartOfLine"},{keys:["^"],type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:["+"],type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:["-"],type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:["_"],type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:["$"],type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:["%"],type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:["f","character"],type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:["F","character"],type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:["t","character"],type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:["T","character"],type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:[";"],type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:[","],type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:["'","character"],type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:["`","character"],type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:["]","`"],type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:["[","`"],type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:["]","'"],type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:["[","'"],type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:["]","character"],type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:["[","character"],type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:["|"],type:"motion",motion:"moveToColumn",motionArgs:{}},{keys:["d"],type:"operator",operator:"delete"},{keys:["y"],type:"operator",operator:"yank"},{keys:["c"],type:"operator",operator:"change",operatorArgs:{enterInsertMode:!0}},{keys:[">"],type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:["<"],type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:["g","~"],type:"operator",operator:"swapcase"},{keys:["n"],type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:["N"],type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:["x"],type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:["X"],type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:["D"],type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},operatorMotionArgs:{visualLine:!0}},{keys:["Y"],type:"operatorMotion",operator:"yank",motion:"moveToEol",motionArgs:{inclusive:!0},operatorMotionArgs:{visualLine:!0}},{keys:["C"],type:"operatorMotion",operator:"change",operatorArgs:{enterInsertMode:!0},motion:"moveToEol",motionArgs:{inclusive:!0},operatorMotionArgs:{visualLine:!0}},{keys:["~"],type:"operatorMotion",operator:"swapcase",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:["Ctrl-i"],type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:["Ctrl-o"],type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:["a"],type:"action",action:"enterInsertMode",actionArgs:{insertAt:"charAfter"}},{keys:["A"],type:"action",action:"enterInsertMode",actionArgs:{insertAt:"eol"}},{keys:["i"],type:"action",action:"enterInsertMode"},{keys:["I"],type:"action",action:"enterInsertMode",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:["o"],type:"action",action:"newLineAndEnterInsertMode",actionArgs:{after:!0}},{keys:["O"],type:"action",action:"newLineAndEnterInsertMode",actionArgs:{after:!1}},{keys:["v"],type:"action",action:"toggleVisualMode"},{keys:["V"],type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:["J"],type:"action",action:"joinLines"},{keys:["p"],type:"action",action:"paste",actionArgs:{after:!0}},{keys:["P"],type:"action",action:"paste",actionArgs:{after:!1}},{keys:["r","character"],type:"action",action:"replace"},{keys:["R"],type:"action",action:"enterReplaceMode"},{keys:["u"],type:"action",action:"undo"},{keys:["Ctrl-r"],type:"action",action:"redo"},{keys:["m","character"],type:"action",action:"setMark"},{keys:['"',"character"],type:"action",action:"setRegister"},{keys:["z","z"],type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:["z","."],type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:["z","t"],type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:["z","Enter"],type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:["z","-"],type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:["z","b"],type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:["."],type:"action",action:"repeatLastEdit"},{keys:["Ctrl-a"],type:"action",action:"incrementNumberToken",actionArgs:{increase:!0,backtrack:!1}},{keys:["Ctrl-x"],type:"action",action:"incrementNumberToken",actionArgs:{increase:!1,backtrack:!1}},{keys:["a","character"],type:"motion",motion:"textObjectManipulation"},{keys:["i","character"],type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:["/"],type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:["?"],type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:["*"],type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:["#"],type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:[":"],type:"ex"}],t=function(){function a(e,t){var n=[];for(var r=e;r<e+t;r++)n.push(String.fromCharCode(r));return n}function g(e){return r.test(e)}function y(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function b(e){return/^[a-z]$/.test(e)}function w(e){return"()[]{}".indexOf(e)!=-1}function E(e){return i.test(e)}function S(e){return/^[A-Z]$/.test(e)}function x(e){return/^[\w]$/.test(e)}function T(e){return s.test(e)}function N(e){return/^\s*$/.test(e)}function C(e,t,n){return e>=t&&e<=n}function k(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}function O(){return A||(A={searchQuery:null,searchIsReversed:!1,jumpList:L,lastChararacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new H({})}),A}function M(e){return e.vimState||(e.vimState={inputState:new D,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},visualMode:!1,visualLine:!1}),e.vimState}function D(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function P(e,t){this.clear(),e&&this.set(e,t)}function H(e){this.registers=e,this.unamedRegister=e['"']=new P}function R(e,t,n){var r=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),i=Z(e,r)-1;i=n?i+1:i;var s=Math.min(Math.max(0,t.ch),i);return{line:r,ch:s}}function U(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function z(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function W(e,t,n){return{line:e.line+t,ch:e.ch+n}}function X(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function V(e,t){for(var n=0;n<e.length;n++)if(e[n]!=t[n]&&t[n]!="character")return!1;return!0}function $(e,t){for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function J(e,t,n){return function(){for(var r=0;r<n;r++)t(e)}}function K(e){return{line:e.line,ch:e.ch}}function Q(e,t){return e.ch==t.ch&&e.line==t.line}function G(e,t){return e.line<t.line?!0:e.line==t.line&&e.ch<t.ch?!0:!1}function Y(e,t,n){var r=G(e,t),i=G(t,n);return r&&i}function Z(e,t){return e.getLine(t).length}function et(e){return e.split("").reverse().join("")}function tt(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function nt(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function rt(e,t){t.visualMode=!1,t.visualLine=!1;var n=e.getCursor("anchor"),r=e.getCursor("head");Q(n,r)||e.setCursor(R(e,r))}function it(e,t,n){var r=e.getRange(t,n),i=r.split("\n");i.length>1&&N(i.pop())&&(n.line--,n.ch=Z(e,n.line))}function st(e,t,n){t.ch=0,n.ch=0,n.line++}function ot(e){if(!e)return 0;var t=e.search(/\S/);return t==-1?e.length:t}function ut(e,t,n,r,i){var s=e.getCursor(),o=e.getLine(s.line),u=s.ch,a=o.substring(u),f;i?f=a.search(/\w/):f=a.search(/\S/);if(f==-1)return null;u+=f,a=o.substring(u);var l=o.substring(0,u),c;r?c=/^\S+/:/\w/.test(o.charAt(u))?c=/^\w+/:c=/^[^\w\s]+/;var h=c.exec(a),p=u,d=u+h[0].length,v=et(l),m=c.exec(v);m&&(p-=m[0].length);if(t){var g=o.substring(d),y=g.match(/^\s*/)[0].length;if(y>0)d+=y;else{var b=v.length-p,w=v.substring(b),E=w.match(/^\s*/)[0].length;p-=E}}return{start:{line:s.line,ch:p},end:{line:s.line,ch:d}}}function at(e,t,n){Q(t,n)||O().jumpList.add(e,t,n)}function ft(e,t){var n=O();n.lastChararacterSearch.increment=e,n.lastChararacterSearch.forward=t.forward,n.lastChararacterSearch.selectedCharacter=t.selectedCharacter}function ht(e,t,n,r){var i=e.getCursor(),s=n?1:-1,o=n?e.lineCount():-1,u=i.ch,a=i.line,f=e.getLine(a),l={lineText:f,nextCh:f.charAt(u),lastCh:null,index:u,symb:r,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[r],forward:n,depth:0,curMoveThrough:!1},c=lt[r];if(!c)return i;var h=ct[c].init,p=ct[c].isComplete;h&&h(l);while(a!==o&&t){l.index+=s,l.nextCh=l.lineText.charAt(l.index);if(!l.nextCh){a+=s,l.lineText=e.getLine(a)||"";if(s>0)l.index=0;else{var d=l.lineText.length;l.index=d>0?d-1:0}l.nextCh=l.lineText.charAt(l.index)}p(l)&&(i.line=a,i.ch=l.index,t--)}return l.nextCh||l.curMoveThrough?{line:a,ch:l.index}:i}function pt(e,t,n,r){var i=t.line,s=t.ch,a=e.getLine(i),f=n?1:-1,l=r?u:o;for(;;){var c=f>0?a.length:-1,h=c,p=c;while(s!=c){var d=!1;for(var v=0;v<l.length&&!d;++v)if(l[v].test(a.charAt(s))){h=s;while(s!=c&&l[v].test(a.charAt(s)))s+=f;p=s,d=h!=p;if(h==t.ch&&i==t.line&&p==h+f)continue;return{from:Math.min(h,p+1),to:Math.max(h,p),line:i}}d||(s+=f)}i+=f;if(!y(e,i))return null;a=e.getLine(i),s=f>0?0:a.length}throw"The impossible happened."}function dt(e,t,n,r,i){var s=e.getCursor();for(var o=0;o<t;o++){var u=s.ch,a=s.line,f,l=!1;while(!l){f=pt(e,s,n,i),l=!0;if(!f)return n?{line:s.line,ch:Z(e,s.line)}:{line:s.line,ch:0};s.line=f.line,n&&r?s.ch=f.to-1:n&&!r?C(s.ch,f.from,f.to)&&f.line==a?(l=!1,s.ch=f.to-1):s.ch=f.from:!n&&r?C(s.ch,f.from,f.to)&&f.line==a?(l=!1,s.ch=f.from):s.ch=f.to:!n&&!r&&(s.ch=f.from)}}return s}function vt(e,t,n,r){var i=e.getCursor(),s=i.ch,o;for(var u=0;u<t;u++){var a=e.getLine(i.line);o=yt(s,a,r,n,!0);if(o==-1)return null;s=o}return{line:e.getCursor().line,ch:o}}function mt(e,t){var n=e.getCursor().line;return R(e,{line:n,ch:t-1})}function gt(e,t,n,r){if(!k(n,v))return;t.marks[n]&&t.marks[n].clear(),t.marks[n]=e.setBookmark(r)}function yt(e,t,n,r,i){var s;return r?(s=t.indexOf(n,e+1),s!=-1&&!i&&(s-=1)):(s=t.lastIndexOf(n,e-1),s!=-1&&!i&&(s+=1)),s}function bt(e,t,n){var r=t.line;n=n?n:e.getLine(r).charAt(t.ch);var i={"(":")",")":"(","[":"]","]":"[","{":"}","}":"{"}[n];if(!i)return t;var s={"(":1,"{":1,"[":1}[n]||-1,o=s===1?e.lineCount():-1,u=1,a=n,f=t.ch,l=e.getLine(r);while(r!==o&&u>0){f+=s,a=l.charAt(f);if(!a){r+=s,l=e.getLine(r)||"";if(s>0)f=0;else{var c=l.length;f=c>0?c-1:0}a=l.charAt(f)}a===n?u++:a===i&&u--}return a?{line:r,ch:f}:t}function wt(e,t,n){var r=e.getCursor(),i=bt(e,r,t),s=bt(e,i);return s.ch+=n?1:0,i.ch+=n?0:1,{start:s,end:i}}function Et(e,t,n){for(var r=n?n:e.length;r>=0;--r)if(t.test(e.charAt(r)))return r;return-1}function St(e,t,n){var r=e.getCursor(),i=e.getLine(r.line),s=i.split(""),o,u,a,f,l=s.indexOf(t);r.ch<l?r.ch=l:l<r.ch&&s[r.ch]==t&&(u=r.ch,--r.ch);if(s[r.ch]==t&&!u)o=r.ch+1;else for(a=r.ch;a>-1&&!o;a--)s[a]==t&&(o=a+1);if(o&&!u)for(a=o,f=s.length;a<f&&!u;a++)s[a]==t&&(u=a);return!o||!u?{start:r,end:r}:(n&&(--o,++u),{start:{line:r.line,ch:o},end:{line:r.line,ch:u}})}function xt(){}function Tt(e){var t=M(e);return t.searchState_||(t.searchState_=new xt)}function Nt(e,t,n,r,i){e.openDialog?e.openDialog(t,r,{bottom:!0,value:i.value,onKeyDown:i.onKeyDown,onKeyUp:i.onKeyUp}):r(prompt(n,""))}function Ct(e){var t=!1,n=[];for(var r=0;r<e.length;r++){var i=e.charAt(r);!t&&i=="/"&&n.push(r),t=i=="\\"}return n}function kt(e,t,n,r){if(t instanceof RegExp)return t;var i=Ct(t),s,o;if(!i.length)s=t;else{s=t.substring(0,i[0]);var u=t.substring(i[0]);o=u.indexOf("i")!=-1}if(!s)return null;r&&(n=/^[^A-Z]*$/.test(s));var a=new RegExp(s,n||o?"i":undefined);return a}function Lt(e,t){e.openConfirm?e.openConfirm('<span style="color: red">'+t+'</span> <button type="button">OK</button>',function(){},{bottom:!0}):alert(t)}function At(e,t){var n="";return e&&(n+='<span style="font-family: monospace">'+e+"</span>"),n+='<input type="text"/> <span style="color: #888">',t&&(n+='<span style="color: #888">',n+=t,n+="</span>"),n}function Mt(e,t){var n=(t.prefix||"")+" "+(t.desc||""),r=At(t.prefix,t.desc);Nt(e,r,n,t.onClose,t)}function _t(e,t){if(e instanceof RegExp&&t instanceof RegExp){var n=["global","multiline","ignoreCase","source"];for(var r=0;r<n.length;r++){var i=n[r];if(e[i]!==t[i])return!1}return!0}return!1}function Dt(e,t,n,r){if(!t)return;var i=Tt(e),s=kt(e,t,!!n,!!r);if(!s)return;return Ht(e,s),_t(s,i.getQuery())?s:(i.setQuery(s),s)}function Pt(e){if(e.source.charAt(0)=="^")var t=!0;return{token:function(n){if(t&&!n.sol()){n.skipToEnd();return}var r=n.match(e,!1);if(r){if(r[0].length==0){n.next();return}if(!n.sol()){n.backUp(1);if(!e.exec(n.next()+r[0]))return n.next(),null}return n.match(e),"searching"}while(!n.eol()){n.next();if(n.match(e,!1))break}},query:e}}function Ht(e,t){var n=Tt(e).getOverlay();if(!n||t!=n.query)n&&e.removeOverlay(n),n=Pt(t),e.addOverlay(n),Tt(e).setOverlay(n)}function Bt(e,t,n,r){return r===undefined&&(r=1),e.operation(function(){var i=e.getCursor();t||(i.ch+=1);var s=e.getSearchCursor(n,i);for(var o=0;o<r;o++)if(!s.find(t)){s=e.getSearchCursor(n,t?{line:e.lastLine()}:{line:e.firstLine(),ch:0});if(!s.find(t))return}return s.from()})}function jt(e){e.removeOverlay(Tt(e).getOverlay()),Tt(e).setOverlay(null)}function Ft(e,t,n){return typeof e!="number"&&(e=e.line),t instanceof Array?k(e,t):n?e>=t&&e<=n:e==t}function It(e){var t=e.getScrollInfo(),n=6,r=10,i=e.coordsChar({left:0,top:n},"local"),s=t.clientHeight-r,o=e.coordsChar({left:0,top:s},"local");return{top:i.line,bottom:o.line}}function Rt(e){var t=0,n=[];while(t<e.length){if(e.charAt(t)!="<"){n.push(e.charAt(t)),t++;continue}var r=++t;while(e.charAt(t++)!=">");var i=e.substring(r,t-1),s="",o=/^C-(.+)$/.exec(i);o&&(s="Ctrl-",i=o[1]);var u;switch(i){case"BS":u="Backspace";break;case"CR":u="Enter";break;case"Del":u="Delete";break;default:u=i}n.push(s+u)}return n}function Wt(){function e(e,t,r){S(t)&&(r=="Shift"?r=null:t=t.toLowerCase()),r&&(t=r+"-"+t),n.handleKey(e,t)}function t(t,n){return function(r){e(r,t,n)}}function s(e,n){for(var r=0;r<e.length;r++){var s=e[r];!n&&k(s,p)&&(s="'"+s+"'"),n?i[n+"-"+s]=t(e[r],n):i[s]=t(e[r])}}var r=["Shift","Ctrl"],i={nofallthrough:!0,style:"fat-cursor"};return s(f),s(f,"Shift"),s(f,"Ctrl"),s(p),s(p,"Ctrl"),s(c),s(c,"Ctrl"),s(d),s(d,"Ctrl"),i}function Xt(e){e.setCursor(e.getCursor().line,e.getCursor().ch-1,!0),e.setOption("keyMap","vim")}function Vt(e){e.toggleOverwrite(),e.setCursor(e.getCursor().line,e.getCursor().ch-1,!0),e.setOption("keyMap","vim")}var r=/[A-Za-z]/,i=/[\d]/,s=/\s/,o=[/\w/,/[^\w\s]/],u=[/\S/],f=a(65,26),l=a(97,26),c=a(48,10),h="~`!@#$%^&*()_-+=[{}]\\|/?.,<>:;\"'",p=h.split(""),d=["Left","Right","Up","Down","Space","Backspace","Esc","Home","End","PageUp","PageDown","Enter"],v=f.concat(l).concat(c).concat(["<",">"]),m=f.concat(l).concat(c).concat('-"'.split("")),L=function(){function s(s,o,u){function l(n){var r=++t%e,o=i[r];o&&o.clear(),i[r]=s.setBookmark(n)}var a=t%e,f=i[a];(!f||!Q(f.find(),o))&&l(o),l(u),n=t,r=t-e+1,r<0&&(r=0)}function o(s){return t+=s,t>n?t=n:t<r&&(t=r),i[(e+t)%e]}var e=100,t=-1,n=0,r=0,i=new Array(e);return{cachedCursor:undefined,add:s,move:o}}(),A,_={buildKeyMap:function(){},getRegisterController:function(){return O().registerController},clearVimGlobalState_:function(){A=null},map:function(e,t){zt.map(e,t)},defineEx:function(e,t,n){if(e.indexOf(t)!==0)throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered');Ut[e]=n,zt.commandMap_[t]={name:e,shortName:t,type:"api"}},maybeInitState:function(e){M(e)},handleKey:function(t,n){var r,i=M(t);if(n=="Esc"){i.inputState=new D,i.visualMode&&rt(t,i);return}i.visualMode&&Q(t.getCursor("head"),t.getCursor("anchor"))&&rt(t,i),!i.visualMode&&!Q(t.getCursor("head"),t.getCursor("anchor"))&&(i.visualMode=!0,i.visualLine=!1);if(n!="0"||n=="0"&&i.inputState.getRepeat()===0)r=B.matchCommand(n,e,i);if(!r){E(n)&&i.inputState.pushRepeatDigit(n);return}if(r.type=="keyToKey")for(var s=0;s<r.toKeys.length;s++)this.handleKey(t,r.toKeys[s]);else B.processCommand(t,i,r)}};D.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},D.prototype.getRepeat=function(){var e=0;if(this.prefixRepeat.length>0||this.motionRepeat.length>0)e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10));return e},P.prototype={set:function(e,t){this.text=e,this.linewise=!!t},append:function(e,t){t||this.linewise?(this.text+="\n"+e,this.linewise=!0):this.text+=e},clear:function(){this.text="",this.linewise=!1},toString:function(){return this.text}},H.prototype={pushText:function(e,t,n,r){var i=this.isValidRegister(e)?this.getRegister(e):null;if(!i){switch(t){case"yank":this.registers[0]=new P(n,r);break;case"delete":case"change":n.indexOf("\n")==-1?this.registers["-"]=new P(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new P(n,r))}this.unamedRegister.set(n,r);return}var s=S(e);s?(i.append(n,r),this.unamedRegister.append(n,r)):(i.set(n,r),this.unamedRegister.set(n,r))},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new P),this.registers[e]):this.unamedRegister},isValidRegister:function(e){return e&&k(e,m)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}};var B={matchCommand:function(e,t,n){var r=n.inputState,i=r.keyBuffer.concat(e);for(var s=0;s<t.length;s++){var o=t[s];if(V(i,o.keys)){if(i.length<o.keys.length)return r.keyBuffer.push(e),null;if(r.operator&&o.type=="action")continue;if(o.keys[i.length-1]=="character"){r.selectedCharacter=i[i.length-1];if(r.selectedCharacter.length>1)switch(r.selectedCharacter){case"Enter":r.selectedCharacter="\n";break;case"Space":r.selectedCharacter=" ";break;default:continue}}return r.keyBuffer=[],o}}return r.keyBuffer=[],null},processCommand:function(e,t,n){t.inputState.repeatOverride=n.repeatOverride;switch(n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n);break;default:}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=z(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator){r.motion="expandToLine",r.motionArgs={linewise:!0},this.evalInput(e,t);return}t.inputState=new D}r.operator=n.operator,r.operatorArgs=z(n.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=z(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),s=!!i,o=z(n.actionArgs)||{};r.selectedCharacter&&(o.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),o.repeat=i||1,o.repeatIsExplicit=s,o.registerName=r.registerName,t.inputState=new D,t.lastMotion=null,I[n.action](e,o,t)},processSearch:function(e,t,n){function u(r,i,s){try{Dt(e,r,i,s)}catch(o){Lt(e,"Invalid regex: "+regexPart);return} +B.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}function a(t){e.scrollTo(o.left,o.top),u(t,!0,!0)}function f(t,n){var i;try{i=Dt(e,n,!0,!0)}catch(t){}i?e.scrollIntoView(Bt(e,!r,i),30):(jt(e),e.scrollTo(o.left,o.top))}function l(t,n,r){var i=CodeMirror.keyName(t);if(i=="Esc"||i=="Ctrl-C"||i=="Ctrl-[")Dt(e,s),jt(e),e.scrollTo(o.left,o.top),CodeMirror.e_stop(t),r(),e.focus()}if(!e.getSearchCursor)return;var r=n.searchArgs.forward;Tt(e).setReversed(!r);var i=r?"/":"?",s=Tt(e).getQuery(),o=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":Mt(e,{onClose:a,prefix:i,desc:Ot,onKeyUp:f,onKeyDown:l});break;case"wordUnderCursor":var c=ut(e,!1,!0,!1,!0),h=!0;c||(c=ut(e,!1,!0,!1,!1),h=!1);if(!c)return;var p=e.getLine(c.start.line).substring(c.start.ch,c.end.ch);h?p="\\b"+p+"\\b":p=nt(p),O().jumpList.cachedCursor=e.getCursor(),e.setCursor(c.start),u(p,!0,!1)}},processEx:function(e,t,n){function r(t){zt.processCommand(e,t)}function i(t,n,r){var i=CodeMirror.keyName(t);if(i=="Esc"||i=="Ctrl-C"||i=="Ctrl-[")CodeMirror.e_stop(t),r(),e.focus()}n.type=="keyToEx"?zt.processCommand(e,n.exArgs.input):t.visualMode?Mt(e,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:i}):Mt(e,{onClose:r,prefix:":",onKeyDown:i})},evalInput:function(e,t){var n=t.inputState,r=n.motion,i=n.motionArgs||{},s=n.operator,o=n.operatorArgs||{},u=n.registerName,a=e.getCursor("head"),f=e.getCursor("anchor"),l=K(a),c=K(l),h,p;s&&this.recordLastEdit(e,t,n),n.repeatOverride!==undefined?p=n.repeatOverride:p=n.getRepeat();if(p>0&&i.explicitRepeat)i.repeatIsExplicit=!0;else if(i.noRepeat||!i.explicitRepeat&&p===0)p=1,i.repeatIsExplicit=!1;n.selectedCharacter&&(i.selectedCharacter=o.selectedCharacter=n.selectedCharacter),i.repeat=p,t.inputState=new D;if(r){var d=j[r](e,i,t);t.lastMotion=j[r];if(!d)return;if(i.toJumplist){var v=O().jumpList,m=v.cachedCursor;m?(at(e,m,d),delete v.cachedCursor):at(e,c,d)}d instanceof Array?(l=d[0],h=d[1]):h=d,h||(h={ch:l.ch,line:l.line}),t.visualMode?(G(f,a)&&(Q(f,h)||G(h,f))?f.ch+=1:G(a,f)&&(Q(f,h)||G(f,h))&&(f.ch-=1),a=h,t.visualLine&&(G(f,a)?(f.ch=0,a.ch=Z(e,a.line)):(a.ch=0,f.ch=Z(e,f.line))),e.setSelection(f,a),gt(e,t,"<",G(f,a)?f:a),gt(e,t,">",G(f,a)?a:f)):s||(h=R(e,h),e.setCursor(h.line,h.ch))}if(s){var g=!1;t.lastMotion=null,o.repeat=p,t.visualMode&&(l=f,h=a,i.inclusive=!0);if(G(h,l)){var y=l;l=h,h=y,g=!0}i.inclusive&&(!t.visualMode||!g)&&h.ch++;var b=i.linewise||t.visualMode&&t.visualLine;b?st(e,l,h):i.forward&&it(e,l,h),o.registerName=u,o.linewise=b,F[s](e,o,t,l,h,c),t.visualMode&&rt(e,t),o.enterInsertMode&&I.enterInsertMode(e)}},recordLastEdit:function(e,t,n){t.lastEdit=n}},j={moveToTopLine:function(e,t){var n=It(e).top+t.repeat-1;return{line:n,ch:ot(e.getLine(n))}},moveToMiddleLine:function(e){var t=It(e),n=Math.floor((t.top+t.bottom)*.5);return{line:n,ch:ot(e.getLine(n))}},moveToBottomLine:function(e,t){var n=It(e).bottom-t.repeat+1;return{line:n,ch:ot(e.getLine(n))}},expandToLine:function(e,t){var n=e.getCursor();return{line:n.line+t.repeat-1,ch:Infinity}},findNext:function(e,t,n){var r=Tt(e),i=r.getQuery();if(!i)return;var s=!t.forward;return s=r.isReversed()?!s:s,Ht(e,i),Bt(e,s,i,t.repeat)},goToMark:function(e,t,n){var r=n.marks[t.selectedCharacter];return r?r.find():null},jumpToMark:function(e,t,n){var r=e.getCursor();for(var i=0;i<t.repeat;i++){var s=r;for(var o in n.marks){if(!b(o))continue;var u=n.marks[o].find(),a=t.forward?G(u,s):G(s,u);if(a)continue;if(t.linewise&&u.line==s.line)continue;var f=Q(s,r),l=t.forward?Y(s,u,r):Y(r,u,s);if(f||l)r=u}}return t.linewise&&(r.ch=ot(e.getLine(r.line))),r},moveByCharacters:function(e,t){var n=e.getCursor(),r=t.repeat,i=t.forward?n.ch+r:n.ch-r;return{line:n.line,ch:i}},moveByLines:function(e,t,n){var r=e.getCursor(),i=r.ch;switch(n.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:i=n.lastHPos;break;default:n.lastHPos=i}var s=t.repeat+(t.repeatOffset||0),o=t.forward?r.line+s:r.line-s;return o<e.firstLine()||o>e.lastLine()?null:(t.toFirstChar&&(i=ot(e.getLine(o)),n.lastHPos=i),n.lastHSPos=e.charCoords({line:o,ch:i},"div").left,{line:o,ch:i})},moveByDisplayLines:function(e,t,n){var r=e.getCursor();switch(n.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:n.lastHSPos=e.charCoords(r,"div").left}var i=t.repeat,s=e.findPosV(r,t.forward?i:-i,"line",n.lastHSPos);if(s.hitSide)if(t.forward)var o=e.charCoords(s,"div"),u={top:o.top+8,left:n.lastHSPos},s=e.coordsChar(u,"div");else{var a=e.charCoords({line:e.firstLine(),ch:0},"div");a.left=n.lastHSPos,s=e.coordsChar(a,"div")}return n.lastHPos=s.ch,s},moveByPage:function(e,t){var n=e.getCursor(),r=t.repeat;e.moveV(t.forward?r:-r,"page");var i=e.getCursor();return e.setCursor(n),i},moveByParagraph:function(e,t){var n=e.getCursor().line,r=t.repeat,i=t.forward?1:-1;for(var s=0;s<r;s++){if(!t.forward&&n===e.firstLine()||t.forward&&n==e.lastLine())break;n+=i;while(n!==e.firstLine()&&n!=e.lastLine()&&e.getLine(n))n+=i}return{line:n,ch:0}},moveByScroll:function(e,t,n){var r=O(),i=e.getScrollInfo(),s=null,o=t.repeat;o||(o=i.clientHeight/(2*e.defaultTextHeight()));var u=e.charCoords(e.getCursor(),"local");t.repeat=o;var s=j.moveByDisplayLines(e,t,n);if(!s)return null;var a=e.charCoords(s,"local");return e.scrollTo(null,i.top+a.top-u.top),s},moveByWords:function(e,t){return dt(e,t.repeat,!!t.forward,!!t.wordEnd,!!t.bigWord)},moveTillCharacter:function(e,t){var n=t.repeat,r=vt(e,n,t.forward,t.selectedCharacter),i=t.forward?-1:1;return ft(i,t),r?(r.ch+=i,r):e.getCursor()},moveToCharacter:function(e,t){var n=t.repeat;return ft(0,t),vt(e,n,t.forward,t.selectedCharacter)||e.getCursor()},moveToSymbol:function(e,t){var n=t.repeat;return ht(e,n,t.forward,t.selectedCharacter)||e.getCursor()},moveToColumn:function(e,t,n){var r=t.repeat;return n.lastHPos=r-1,n.lastHSPos=e.charCoords(e.getCursor(),"div").left,mt(e,r)},moveToEol:function(e,t,n){var r=e.getCursor();n.lastHPos=Infinity;var i={line:r.line+t.repeat-1,ch:Infinity},s=e.clipPos(i);return s.ch--,n.lastHSPos=e.charCoords(s,"div").left,i},moveToFirstNonWhiteSpaceCharacter:function(e){var t=e.getCursor();return{line:t.line,ch:ot(e.getLine(t.line))}},moveToMatchedSymbol:function(e,t){var n=e.getCursor(),r=e.getLine(n.line).charAt(n.ch);return w(r)?bt(e,e.getCursor(),t.symbol):n},moveToStartOfLine:function(e){var t=e.getCursor();return{line:t.line,ch:0}},moveToLineOrEdgeOfDocument:function(e,t){var n=t.forward?e.lastLine():e.firstLine();return t.repeatIsExplicit&&(n=t.repeat-e.getOption("firstLineNumber")),{line:n,ch:ot(e.getLine(n))}},textObjectManipulation:function(e,t){var n=t.selectedCharacter,r=!t.textObjectInner;if(!q[n])return null;var i=q[n](e,r),s=i.start,o=i.end;return[s,o]},repeatLastCharacterSearch:function(e,t){var n=O().lastChararacterSearch,r=t.repeat,i=t.forward===n.forward,s=(n.increment?1:0)*(i?-1:1);e.moveH(-s,"char"),t.inclusive=i?!0:!1;var o=vt(e,r,i,n.selectedCharacter);return o?(o.ch+=s,o):(e.moveH(s,"char"),e.getCursor())}},F={change:function(e,t,n,r,i){O().registerController.pushText(t.registerName,"change",e.getRange(r,i),t.linewise),t.linewise?(r.ch=ot(e.getLine(r.line)),e.replaceRange("\n",r,i)):e.replaceRange("",r,i),e.setCursor(r)},"delete":function(e,t,n,r,i){O().registerController.pushText(t.registerName,"delete",e.getRange(r,i),t.linewise),e.replaceRange("",r,i),t.linewise?e.setCursor(j.moveToFirstNonWhiteSpaceCharacter(e)):e.setCursor(r)},indent:function(e,t,n,r,i){var s=r.line,o=i.line,u=n.visualMode?t.repeat:1;t.linewise&&o--;for(var a=s;a<=o;a++)for(var f=0;f<u;f++)e.indentLine(a,t.indentRight);e.setCursor(r),e.setCursor(j.moveToFirstNonWhiteSpaceCharacter(e))},swapcase:function(e,t,n,r,i,s){var o=e.getRange(r,i),u="";for(var a=0;a<o.length;a++){var f=o.charAt(a);u+=S(f)?f.toLowerCase():f.toUpperCase()}e.replaceRange(u,r,i),e.setCursor(s)},yank:function(e,t,n,r,i,s){O().registerController.pushText(t.registerName,"yank",e.getRange(r,i),t.linewise),e.setCursor(s)}},I={jumpListWalk:function(e,t,n){if(n.visualMode)return;var r=t.repeat,i=t.forward,s=O().jumpList,o=s.move(i?r:-r),u=o?o.find():e.getCursor();e.setCursor(u)},scrollToCursor:function(e,t){var n=e.getCursor().line,r=window.getComputedStyle(e.getScrollerElement()).getPropertyValue("height"),i=parseInt(r),s=e.charCoords({line:n,ch:0},"local").top,o=parseInt(i)/2;switch(t.position){case"center":s=s-i/2+10;break;case"bottom":s-=i;break;case"top":}e.scrollTo(null,s),e.scrollIntoView()},enterInsertMode:function(e,t){var n=t?t.insertAt:null;if(n=="eol"){var r=e.getCursor();r={line:r.line,ch:Z(e,r.line)},e.setCursor(r)}else n=="charAfter"&&e.setCursor(W(e.getCursor(),0,1));e.setOption("keyMap","vim-insert")},toggleVisualMode:function(e,t,n){var r=t.repeat,i=e.getCursor(),s;n.visualMode?(i=e.getCursor("anchor"),s=e.getCursor("head"),!n.visualLine&&t.linewise?(n.visualLine=!0,i.ch=G(i,s)?0:Z(e,i.line),s.ch=G(i,s)?Z(e,s.line):0,e.setSelection(i,s)):n.visualLine&&!t.linewise?n.visualLine=!1:rt(e,n)):(n.visualMode=!0,n.visualLine=!!t.linewise,n.visualLine?(i.ch=0,s=R(e,{line:i.line+r-1,ch:Z(e,i.line)},!0)):s=R(e,{line:i.line,ch:i.ch+r},!0),!t.repeatIsExplicit&&!n.visualLine?(e.setCursor(s),e.setSelection(s,i)):e.setSelection(i,s)),gt(e,n,"<",G(i,s)?i:s),gt(e,n,">",G(i,s)?s:i)},joinLines:function(e,t,n){var r,i;if(n.visualMode)r=e.getCursor("anchor"),i=e.getCursor("head"),i.ch=Z(e,i.line)-1;else{var s=Math.max(t.repeat,2);r=e.getCursor(),i=R(e,{line:r.line+s-1,ch:Infinity})}var o=0;e.operation(function(){for(var t=r.line;t<i.line;t++){o=Z(e,r.line);var n={line:r.line+1,ch:Z(e,r.line+1)},s=e.getRange(r,n);s=s.replace(/\n\s*/g," "),e.replaceRange(s,r,n)}var u={line:r.line,ch:o};e.setCursor(u)})},newLineAndEnterInsertMode:function(e,t){var n=e.getCursor();if(n.line===e.firstLine()&&!t.after)e.replaceRange("\n",{line:e.firstLine(),ch:0}),e.setCursor(e.firstLine(),0);else{n.line=t.after?n.line:n.line-1,n.ch=Z(e,n.line),e.setCursor(n);var r=CodeMirror.commands.newlineAndIndentContinueComment||CodeMirror.commands.newlineAndIndent;r(e)}this.enterInsertMode(e)},paste:function(e,t,n){var r=e.getCursor(),i=O().registerController.getRegister(t.registerName);if(!i.text)return;for(var s="",o=0;o<t.repeat;o++)s+=i.text;var u=i.linewise;u?t.after?(s="\n"+s.slice(0,s.length-1),r.ch=Z(e,r.line)):r.ch=0:r.ch+=t.after?1:0,e.replaceRange(s,r);var a,f;u&&t.after?a={line:r.line+1,ch:ot(e.getLine(r.line+1))}:u&&!t.after?a={line:r.line,ch:ot(e.getLine(r.line))}:!u&&t.after?(f=e.indexFromPos(r),a=e.posFromIndex(f+s.length-1)):(f=e.indexFromPos(r),a=e.posFromIndex(f+s.length)),e.setCursor(a)},undo:function(e,t){J(e,CodeMirror.commands.undo,t.repeat)()},redo:function(e,t){J(e,CodeMirror.commands.redo,t.repeat)()},setRegister:function(e,t,n){n.inputState.registerName=t.selectedCharacter},setMark:function(e,t,n){var r=t.selectedCharacter;gt(e,n,r,e.getCursor())},replace:function(e,t,n){var r=t.selectedCharacter,i=e.getCursor(),s,o;if(n.visualMode)i=e.getCursor("start"),o=e.getCursor("end"),o=e.clipPos({line:o.line,ch:o.ch+1});else{var u=e.getLine(i.line);s=i.ch+t.repeat,s>u.length&&(s=u.length),o={line:i.line,ch:s}}if(r=="\n")n.visualMode||e.replaceRange("",i,o),(CodeMirror.commands.newlineAndIndentContinueComment||CodeMirror.commands.newlineAndIndent)(e);else{var a=e.getRange(i,o);a=a.replace(/[^\n]/g,r),e.replaceRange(a,i,o),n.visualMode?(e.setCursor(i),rt(e,n)):e.setCursor(W(o,0,-1))}},enterReplaceMode:function(e,t){e.setOption("keyMap","vim-replace"),e.toggleOverwrite()},incrementNumberToken:function(e,t,n){var r=e.getCursor(),i=e.getLine(r.line),s=/-?\d+/g,o,u,a,f,l;while((o=s.exec(i))!==null){l=o[0],u=o.index,a=u+l.length;if(r.ch<a)break}if(!t.backtrack&&a<=r.ch)return;if(!l)return;var c=t.increase?1:-1,h=parseInt(l)+c*t.repeat,p={ch:u,line:r.line},d={ch:a,line:r.line};f=h.toString(),e.replaceRange(f,p,d),e.setCursor({line:r.line,ch:u+f.length-1})},repeatLastEdit:function(e,t,n){var r=n.lastEdit;if(r){t.repeat&&t.repeatIsExplicit&&(n.lastEdit.repeatOverride=t.repeat);var i=n.inputState;n.inputState=n.lastEdit,B.evalInput(e,n),n.inputState=i}}},q={w:function(e,t){return ut(e,t,!0,!1)},W:function(e,t){return ut(e,t,!0,!0)},"{":function(e,t){return wt(e,"}",t)},"(":function(e,t){return wt(e,")",t)},"[":function(e,t){return wt(e,"]",t)},"'":function(e,t){return St(e,"'",t)},'"':function(e,t){return St(e,'"',t)}},lt={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ct={bracket:{isComplete:function(e){if(e.nextCh===e.symb){e.depth++;if(e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return e.index===0&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t=e.lastCh==="*"&&e.nextCh==="/";return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb=e.symb==="m"?"{":"}",e.reverseSymb=e.symb==="{"?"}":"{"},isComplete:function(e){return e.nextCh===e.symb?!0:!1}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if(e.nextCh==="#"){var t=e.lineText.match(/#(\w+)/)[1];if(t==="endif"){if(e.forward&&e.depth===0)return!0;e.depth++}else if(t==="if"){if(!e.forward&&e.depth===0)return!0;e.depth--}if(t==="else"&&e.depth===0)return!0}return!1}}};xt.prototype={getQuery:function(){return O().query},setQuery:function(e){O().query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return O().isReversed},setReversed:function(e){O().isReversed=e}};var Ot="(Javascript regexp)",qt=[{name:"map",type:"builtIn"},{name:"write",shortName:"w",type:"builtIn"},{name:"undo",shortName:"u",type:"builtIn"},{name:"redo",shortName:"red",type:"builtIn"},{name:"substitute",shortName:"s",type:"builtIn"},{name:"nohlsearch",shortName:"noh",type:"builtIn"},{name:"delmarks",shortName:"delm",type:"builtin"}];t.ExCommandDispatcher=function(){this.buildCommandMap_()},t.ExCommandDispatcher.prototype={processCommand:function(e,t){var r=new CodeMirror.StringStream(t),i={};i.input=t;try{this.parseInput_(e,r,i)}catch(s){Lt(e,s);return}var o;if(!i.commandName)i.line!==undefined&&(o="move");else{var u=this.matchCommand_(i.commandName);if(u){o=u.name,this.parseCommandArgs_(r,i,u);if(u.type=="exToKey"){for(var a=0;a<u.toKeys.length;a++)n.handleKey(e,u.toKeys[a]);return}if(u.type=="exToEx"){this.processCommand(e,u.toInput);return}}}if(!o){Lt(e,'Not an editor command ":'+t+'"');return}Ut[o](e,i)},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),n.line!==undefined&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));var r=t.match(/^(\w+)/);return r?n.commandName=r[1]:n.commandName=t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return e.getCursor().line;case"$":return e.lastLine();case"'":var r=M(e).marks[t.next()];if(r&&r.find())return r.find().line;throw"Mark not set";default:return t.backUp(1),e.getCursor().line}},parseCommandArgs_:function(e,t,n){if(e.eol())return;t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=tt(t.argString).split(r);i.length&&i[0]&&(t.args=i)},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(r.name.indexOf(e)===0)return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<qt.length;e++){var t=qt[e],n=t.shortName||t.name;this.commandMap_[n]=t}},map:function(t,n){if(t!=":"&&t.charAt(0)==":"){var r=t.substring(1);n!=":"&&n.charAt(0)==":"?this.commandMap_[r]={name:r,type:"exToEx",toInput:n.substring(1)}:this.commandMap_[r]={name:r,type:"exToKey",toKeys:Rt(n)}}else n!=":"&&n.charAt(0)==":"?e.unshift({keys:Rt(t),type:"keyToEx",exArgs:{input:n.substring(1)}}):e.unshift({keys:Rt(t),type:"keyToKey",toKeys:Rt(n)})}};var Ut={map:function(e,t){var n=t.args;if(!n||n.length<2){e&&Lt(e,"Invalid mapping: "+t.input);return}zt.map(n[0],n[1],e)},move:function(e,t){B.processCommand(e,M(e),{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},substitute:function(e,t){function v(){for(var t=e.getSearchCursor(c,d);t.findNext()&&Ft(t.from(),h,p);){var n=e.getRange(t.from(),t.to()),r=n.replace(c,s);t.replace(r)}var i=M(e);i.visualMode&&rt(e,i)}var n=t.argString,r=Ct(n);if(r[0]!==0){Lt(e,"Substitutions should be of the form :s/pattern/replace/");return}var i=n.substring(r[0]+1,r[1]),s="",o,u;r[1]&&(s=n.substring(r[1]+1,r[2]));if(r[2]){var a=n.substring(r[2]+1).split(" ");o=a[0],u=parseInt(a[1])}o&&(i=i+"/"+o);if(i)try{Dt(e,i,!0,!0)}catch(f){Lt(e,"Invalid regex: "+i);return}var l=Tt(e),c=l.getQuery(),h=t.line||e.firstLine(),p=t.lineEnd||h;u&&(h=p,p=h+u-1);var d=R(e,{line:h,ch:0});e.operation(v)},redo:CodeMirror.commands.redo,undo:CodeMirror.commands.undo,write:function(e){CodeMirror.commands.save?CodeMirror.commands.save(e):e.save()},nohlsearch:function(e){jt(e)},delmarks:function(e,t){if(!t.argString||!t.argString.trim()){Lt(e,"Argument required");return}var n=M(e),r=new CodeMirror.StringStream(t.argString.trim());while(!r.eol()){r.eatSpace();var i=r.pos;if(!r.match(/[a-zA-Z]/,!1)){Lt(e,"Invalid argument: "+t.argString.substring(i));return}var s=r.next();if(r.match("-",!0)){if(!r.match(/[a-zA-Z]/,!1)){Lt(e,"Invalid argument: "+t.argString.substring(i));return}var o=s,u=r.next();if(!(b(o)&&b(u)||S(o)&&S(u))){Lt(e,"Invalid argument: "+o+"-");return}var a=o.charCodeAt(0),f=u.charCodeAt(0);if(a>=f){Lt(e,"Invalid argument: "+t.argString.substring(i));return}for(var l=0;l<=f-a;l++){var c=String.fromCharCode(a+l);delete n.marks[c]}}else delete n.marks[s]}}},zt=new t.ExCommandDispatcher;return CodeMirror.keyMap.vim=Wt(),CodeMirror.keyMap["vim-insert"]={Esc:Xt,"Ctrl-[":Xt,"Ctrl-C":Xt,"Ctrl-N":"autocomplete","Ctrl-P":"autocomplete",Enter:function(e){var t=CodeMirror.commands.newlineAndIndentContinueComment||CodeMirror.commands.newlineAndIndent;t(e)},fallthrough:["default"]},CodeMirror.keyMap["vim-replace"]={Esc:Vt,"Ctrl-[":Vt,"Ctrl-C":Vt,Backspace:"goCharLeft",fallthrough:["default"]},_},n=t();CodeMirror.Vim=n}(),function(){"use strict";CodeMirror.defineMode("haml",function(e){function r(e){return function(t,n){var r=t.peek();return r==e&&n.rubyState.tokenize.length==1?(t.next(),n.tokenize=s,"closeAttributeTag"):i(t,n)}}function i(e,t){return e.match("-#")?(e.skipToEnd(),"comment"):n.token(e,t.rubyState)}function s(e,n){var s=e.peek();if(n.previousToken.style=="comment"&&n.indented>n.previousToken.indented)return e.skipToEnd(),"commentLine";if(n.startOfLine){if(s=="!"&&e.match("!!"))return e.skipToEnd(),"tag";if(e.match(/^%[\w:#\.]+=/))return n.tokenize=i,"hamlTag";if(e.match(/^%[\w:]+/))return"hamlTag";if(s=="/")return e.skipToEnd(),"comment"}if(n.startOfLine||n.previousToken.style=="hamlTag")if(s=="#"||s==".")return e.match(/[\w-#\.]*/),"hamlAttribute";if(n.startOfLine&&!e.match("-->",!1)&&(s=="="||s=="-"))return n.tokenize=i,null;if(n.previousToken.style=="hamlTag"||n.previousToken.style=="closeAttributeTag"||n.previousToken.style=="hamlAttribute"){if(s=="(")return n.tokenize=r(")"),null;if(s=="{")return n.tokenize=r("}"),null}return t.token(e,n.htmlState)}var t=CodeMirror.getMode(e,{name:"htmlmixed"}),n=CodeMirror.getMode(e,"ruby");return{startState:function(){var e=t.startState(),r=n.startState();return{htmlState:e,rubyState:r,indented:0,previousToken:{style:null,indented:0},tokenize:s}},copyState:function(e){return{htmlState:CodeMirror.copyState(t,e.htmlState),rubyState:CodeMirror.copyState(n,e.rubyState),indented:e.indented,previousToken:e.previousToken,tokenize:e.tokenize}},token:function(e,t){e.sol()&&(t.indented=e.indentation(),t.startOfLine=!0);if(e.eatSpace())return null;var n=t.tokenize(e,t);t.startOfLine=!1,n&&n!="commentLine"&&(t.previousToken={style:n,indented:t.indented});if(e.eol()&&t.tokenize==i){e.backUp(1);var r=e.peek();e.next(),r&&r!=","&&(t.tokenize=s)}return n=="hamlTag"?n="tag":n=="commentLine"?n="comment":n=="hamlAttribute"?n="attribute":n=="closeAttributeTag"&&(n=null),n},indent:function(e){return e.indented}}},"htmlmixed","ruby"),CodeMirror.defineMIME("text/x-haml","haml")}(),CodeMirror.defineMode("markdown",function(e,t){function L(e,t,n){return t.f=t.inline=n,n(e,t)}function A(e,t,n){return t.f=t.block=n,n(e,t)}function O(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.quote=0,!n&&e.f==_&&(e.f=B,e.block=M),e.thisLineHasContent=!1,null}function M(e,n){var r=n.list!==!1;n.list!==!1&&n.indentationDiff>=0?(n.indentationDiff<4&&(n.indentation-=n.indentationDiff),n.list=null):n.list!==!1&&n.indentation>0?(n.list=null,n.listDepth=Math.floor(n.indentation/4)):n.list!==!1&&(n.list=!1,n.listDepth=0);if(n.indentationDiff>=4)return n.indentation-=4,e.skipToEnd(),a;if(e.eatSpace())return null;if(e.peek()==="#"||n.prevLineHasContent&&e.match(C))n.header=!0;else if(e.eat(">")){n.indentation++,n.quote=1,e.eatSpace();while(e.eat(">"))e.eatSpace(),n.quote++}else{if(e.peek()==="[")return L(e,n,F);if(e.match(S,!0))return d;if((!n.prevLineHasContent||r)&&(e.match(x,!0)||e.match(T,!0)))n.indentation+=4,n.list=!0,n.listDepth++,t.taskLists&&e.match(N,!1)&&(n.taskList=!0);else if(t.fencedCodeBlocks&&e.match(/^```([\w+#]*)/,!0))return n.localMode=s(RegExp.$1),n.localMode&&(n.localState=n.localMode.startState()),A(e,n,D),a}return L(e,n,n.inline)}function _(e,t){var i=r.token(e,t.htmlState);return n&&i==="tag"&&t.htmlState.type!=="openTag"&&!t.htmlState.context&&(t.f=B,t.block=M),t.md_inside&&e.current().indexOf(">")!=-1&&(t.f=B,t.block=M,t.htmlState.context=undefined),i}function D(e,t){return e.sol()&&e.match(/^```/,!0)?(t.localMode=t.localState=null,t.f=B,t.block=M,a):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),a)}function P(e){var t=[];if(e.taskOpen)return"meta";if(e.taskClosed)return"property";e.strong&&t.push(E),e.em&&t.push(w),e.linkText&&t.push(y),e.code&&t.push(a),e.header&&t.push(u),e.quote&&t.push(e.quote%2?f:l);if(e.list!==!1){var n=(e.listDepth-1)%3;n?n===1?t.push(h):t.push(p):t.push(c)}return t.length?t.join(" "):null}function H(e,t){return e.match(k,!0)?P(t):undefined}function B(e,n){var r=n.text(e,n);if(typeof r!="undefined")return r;if(n.list)return n.list=null,P(n);if(n.taskList){var i=e.match(N,!0)[1]!=="x";return i?n.taskOpen=!0:n.taskClosed=!0,n.taskList=!1,P(n)}n.taskOpen=!1,n.taskClosed=!1;var s=e.next();if(s==="\\")return e.next(),P(n);if(n.linkTitle){n.linkTitle=!1;var u=s;s==="("&&(u=")"),u=(u+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var a="^\\s*(?:[^"+u+"\\\\]+|\\\\\\\\|\\\\.)"+u;if(e.match(new RegExp(a),!0))return b}if(s==="`"){var f=P(n),l=e.pos;e.eatWhile("`");var c=1+e.pos-l;return n.code?c===o?(n.code=!1,f):P(n):(o=c,n.code=!0,P(n))}if(n.code)return P(n);if(s==="!"&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return e.match(/\[[^\]]*\]/),n.inline=n.f=j,v;if(s==="["&&e.match(/.*\](\(| ?\[)/,!1))return n.linkText=!0,P(n);if(s==="]"&&n.linkText){var h=P(n);return n.linkText=!1,n.inline=n.f=j,h}if(s==="<"&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!0))return L(e,n,U(m,">"));if(s==="<"&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!0))return L(e,n,U(g,">"));if(s==="<"&&e.match(/^\w/,!1)){if(e.string.indexOf(">")!=-1){var p=e.string.substring(1,e.string.indexOf(">"));/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(p)&&(n.md_inside=!0)}return e.backUp(1),A(e,n,_)}if(s==="<"&&e.match(/^\/\w*?>/))return n.md_inside=!1,"tag";var d=!1;if(!t.underscoresBreakWords&&s==="_"&&e.peek()!=="_"&&e.match(/(\w)/,!1)){var y=e.pos-2;if(y>=0){var w=e.string.charAt(y);w!=="_"&&w.match(/(\w)/,!1)&&(d=!0)}}var f=P(n);if(s==="*"||s==="_"&&!d){if(n.strong===s&&e.eat(s))return n.strong=!1,f;if(!n.strong&&e.eat(s))return n.strong=s,P(n);if(n.em===s)return n.em=!1,f;if(!n.em)return n.em=s,P(n)}else if(s===" ")if(e.eat("*")||e.eat("_")){if(e.peek()===" ")return P(n);e.backUp(1)}return P(n)}function j(e,t){if(e.eatSpace())return null;var n=e.next();return n==="("||n==="["?L(e,t,U(b,n==="("?")":"]")):"error"}function F(e,t){return e.match(/^[^\]]*\]:/,!0)?(t.f=I,y):L(e,t,B)}function I(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),e.peek()===undefined?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=B,b)}function R(e){return q[e]||(e=(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),q[e]=new RegExp("^(?:[^\\\\]|\\\\.)*?("+e+")")),q[e]}function U(e,t,n){return n=n||B,function(r,i){return r.match(R(t)),i.inline=i.f=n,e}}var n=CodeMirror.modes.hasOwnProperty("xml"),r=CodeMirror.getMode(e,n?{name:"xml",htmlMode:!0}:"text/plain"),i={html:"htmlmixed",js:"javascript",json:"application/json",c:"text/x-csrc","c++":"text/x-c++src",java:"text/x-java",csharp:"text/x-csharp","c#":"text/x-csharp",scala:"text/x-scala"},s=function(){var t,n={},r={},s,o=[];for(var u in CodeMirror.modes)CodeMirror.modes.propertyIsEnumerable(u)&&o.push(u);for(t=0;t<o.length;t++)n[o[t]]=o[t];var a=[];for(var u in CodeMirror.mimeModes)CodeMirror.mimeModes.propertyIsEnumerable(u)&&a.push({mime:u,mode:CodeMirror.mimeModes[u]});for(t=0;t<a.length;t++)s=a[t].mime,r[s]=a[t].mime;for(var f in i)if(i[f]in n||i[f]in r)n[f]=i[f];return function(t){return n[t]?CodeMirror.getMode(e,n[t]):null}}();t.underscoresBreakWords===undefined&&(t.underscoresBreakWords=!0),t.fencedCodeBlocks===undefined&&(t.fencedCodeBlocks=!1),t.taskLists===undefined&&(t.taskLists=!1);var o=0,u="header",a="comment",f="atom",l="number",c="variable-2",h="variable-3",p="keyword",d="hr",v="tag",m="link",g="link",y="link",b="string",w="em",E="strong",S=/^([*\-=_])(?:\s*\1){2,}\s*$/,x=/^[*\-+]\s+/,T=/^[0-9]+\.\s+/,N=/^\[(x| )\](?=\s)/,C=/^(?:\={1,}|-{1,})$/,k=/^[^!\[\]*_\\<>` "'(]+/,q=[];return{startState:function(){return{f:M,prevLineHasContent:!1,thisLineHasContent:!1,block:M,htmlState:CodeMirror.startState(r),indentation:0,inline:B,text:H,linkText:!1,linkTitle:!1,em:!1,strong:!1,header:!1,taskList:!1,list:!1,listDepth:0,quote:0}},copyState:function(e){return{f:e.f,prevLineHasContent:e.prevLineHasContent,thisLineHasContent:e.thisLineHasContent,block:e.block,htmlState:CodeMirror.copyState(r,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?CodeMirror.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,linkTitle:e.linkTitle,em:e.em,strong:e.strong,header:e.header,taskList:e.taskList,list:e.list,listDepth:e.listDepth,quote:e.quote,md_inside:e.md_inside}},token:function(e,t){if(e.sol()){if(e.match(/^\s*$/,!0))return t.prevLineHasContent=!1,O(t);t.prevLineHasContent=t.thisLineHasContent,t.thisLineHasContent=!0,t.header=!1,t.taskList=!1,t.code=!1,t.f=t.block;var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length,r=Math.floor((n-t.indentation)/4)*4;r>4&&(r=4);var i=t.indentation+r;t.indentationDiff=i-t.indentation,t.indentation=i;if(n>0)return null}return t.f(e,t)},blankLine:O,getType:P}},"xml"),CodeMirror.defineMIME("text/x-markdown","markdown"),function(){}.call(this),function(e){function t(e,t){var n=e.length;while(n--)if(e[n]===t)return n;return-1}function n(e,n){var r,i,o,u,a;r=e.keyCode,t(w,r)==-1&&w.push(r);if(r==93||r==224)r=91;if(r in m){m[r]=!0;for(o in y)y[o]==r&&(s[o]=!0);return}if(!s.filter.call(this,e))return;if(!(r in v))return;for(u=0;u<v[r].length;u++){i=v[r][u];if(i.scope==n||i.scope=="all"){a=i.mods.length>0;for(o in m)if(!m[o]&&t(i.mods,+o)>-1||m[o]&&t(i.mods,+o)==-1)a=!1;(i.mods.length==0&&!m[16]&&!m[18]&&!m[17]&&!m[91]||a)&&i.method(e,i)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function r(e){var n=e.keyCode,r,i=t(w,n);i>=0&&w.splice(i,1);if(n==93||n==224)n=91;if(n in m){m[n]=!1;for(r in y)y[r]==n&&(s[r]=!1)}}function i(){for(d in m)m[d]=!1;for(d in y)s[d]=!1}function s(e,t,n){var r,i,s,o;n===undefined&&(n=t,t="all"),e=e.replace(/\s/g,""),r=e.split(","),r[r.length-1]==""&&(r[r.length-2]+=",");for(s=0;s<r.length;s++){i=[],e=r[s].split("+");if(e.length>1){i=e.slice(0,e.length-1);for(o=0;o<i.length;o++)i[o]=y[i[o]];e=[e[e.length-1]]}e=e[0],e=b[e]||e.toUpperCase().charCodeAt(0),e in v||(v[e]=[]),v[e].push({shortcut:r[s],scope:t,method:n,key:r[s],mods:i})}}function o(e){if(typeof e=="string"){if(e.length!=1)return!1;e=e.toUpperCase().charCodeAt(0)}return t(w,e)!=-1}function u(){return w}function a(e){var t=(e.target||e.srcElement).tagName;return t!="INPUT"&&t!="SELECT"&&t!="TEXTAREA"}function f(e){g=e||"all"}function l(){return g||"all"}function c(e){var t,n,r;for(t in v){n=v[t];for(r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++}}function h(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,function(){n(window.event)})}function p(){var t=e.key;return e.key=E,t}var d,v={},m={16:!1,18:!1,17:!1,91:!1},g="all",y={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},b={backspace:8,tab:9,clear:12,enter:13,"return":13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,"delete":46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},w=[];for(d=1;d<20;d++)y["f"+d]=111+d;for(d in y)s[d]=!1;h(document,"keydown",function(e){n(e,g)}),h(document,"keyup",r),h(window,"focus",i);var E=e.key;e.key=s,e.key.setScope=f,e.key.getScope=l,e.key.deleteScope=c,e.key.filter=a,e.key.isPressed=o,e.key.getPressedKeyCodes=u,e.key.noConflict=p,typeof module!="undefined"&&(module.exports=key)}(this),function(){var e;window.KeyLauncher||(window.KeyLauncher={}),(e=window.KeyLauncher).loaders||(e.loaders={}),window.loadedScripts={},window.scriptTimers={},KeyLauncher.loaders.stylesheet=function(e,t,n){var r;return t==null&&(t={}),r=document.createElement("link"),r.type="text/css",r.rel="stylesheet",r.href=e,document.getElementsByTagName("head")[0].appendChild(r),n.call(this)},KeyLauncher.loaders.script=function(e,t,n){var r,i,s,o,u,a;t==null&&(t={}),i=loadedScripts,a=scriptTimers,typeof t=="function"&&n==null&&(n=t,t={}),r=document.getElementsByTagName("head")[0],o=document.createElement("script"),o.src=e,o.type="text/javascript",u=this,s=function(){typeof n=="function"&&n.call(u,e,t,o);try{r.removeChild(o)}catch(s){!0}return i[e]=!0};if(t.once===!0&&i[e])return!1;r.appendChild(o),o.onreadystatechange=function(){if(o.readyState==="loaded"||o.readyState==="complete")return s()},o.onload=s;if(typeof navigator!="undefined"&&navigator!==null?navigator.userAgent.match(/WebKit/):void 0)return a[e]=setInterval(function(){return s(),clearInterval(a[e])},10)}}.call(this),function(){window.KeyLauncher.Launcher=function(){function Launcher(e){var t,n,r;this.options=e!=null?e:{},this.fn=e.fn,this.before=e.before,this.command=e.command,r=this.options.requires;for(t in r)n=r[t],this._dependencies[n]={loaded:!1,provides:t}}return Launcher.prototype._dependencies={},Launcher.prototype.run=function(){var state,type,url,_ref,_ref1,_results,_this=this;this.ran=!1,(_ref=this.before)!=null&&typeof _ref.call=="function"&&_ref.call(this);if(this.isReady())return this.onReady();_ref1=this._dependencies,_results=[];for(url in _ref1){state=_ref1[url];try{state.loaded=eval(state.provides)!=null}catch(e){state.loaded=!1}state.loaded!==!0?(type=url.match(/\.css/)?"stylesheet":"script",_results.push(KeyLauncher.loaders[type](url,function(e){return _this.onDependencyLoad(e)}))):_results.push(void 0)}return _results},Launcher.prototype.requires=function(e){return this._dependencies[e]={loaded:!1}},Launcher.prototype.isReady=function(){var e,t,n,r;t=!0,r=this._dependencies;for(e in r)n=r[e],n.loaded===!1&&(t=!1);return t},Launcher.prototype.onDependencyLoad=function(e){this._dependencies[e].loaded=!0;if(this.isReady())return this.onReady()},Launcher.prototype.onReady=function(){var e=this;if(!this.isReady()||this.ran!==!1)return;return function(){return e.fn.call(e),e.ran=!0}()},Launcher}()}.call(this),function(){var e;KeyLauncher.VERSION="0.0.4",KeyLauncher.on=function(e,t,n){var r;n==null&&(n={});if(e==null)throw"Must specify a valid key command";return r=new KeyLauncher.Launcher({command:e,fn:t||function(){},before:n.before,requires:n.requires||[]}),key(e,function(){return r.run.call(r)}),r},e=function(e,t){var n,r,i,s,o;s=KeyLauncher.currentSequence||"",o=t.shortcut,KeyLauncher.currentSequence=""+s+o,i=function(){var e,t;e=KeyLauncher.sequences,t=[];for(n in e)r=e[n],n.match(KeyLauncher.currentSequence)&&t.push(n);return t}(),i.length>0||(KeyLauncher.currentSequence="");if(i.length===1&&(r=KeyLauncher.sequences[KeyLauncher.currentSequence]))return r.run.call(r),KeyLauncher.currentSequence=""}, +KeyLauncher.onSequence=function(t,n,r){var i,s,o,u,f;r==null&&(r={}),KeyLauncher.sequences||(KeyLauncher.sequences={}),s=KeyLauncher.sequences[t]=new KeyLauncher.Launcher({fn:n||function(){},requires:r.requires||[],before:r.before}),f=t.split("");for(o=0,u=f.length;o<u;o++)i=f[o],key(i,e);return s}}.call(this),function(){var e,t,n,r=[].slice;t=this,t.CodeSync=e=function(){return e.Client.get()},e.VERSION="0.6.8",e.backends={},e.util={},e.plugins={},e._config||(e._config={defaultFileType:"coffeescript",assetCompilationEndpoint:"http://localhost:9295/source",serverInfoEndpoint:"http://localhost:9295/info",sprocketsEndpoint:"http://localhost:9295/assets",socketEndpoint:"http://localhost:9295/faye",editorToggleHotkey:"ctrl+j",debugMode:!1,defaultKeyBindings:"default"}),e.set=function(t,n){return e._config[t]=n},e.get=function(t){return e._config[t]},e.enableLogging=function(){return e.set("debugMode",!0)},e.log=function(){var t;t=1<=arguments.length?r.call(arguments,0):[];if(e.get("debugMode")!==!1)return t.unshift("CodeSync Log:"),console.log.apply(console,t)},n=CodeMirror.prototype.setOption,e.set("defaultKeyBindings","vim")}.call(this),function(){}.call(this),function(){var e;CodeSync.Client=function(){function t(t){var n=this;t==null&&(t={}),this.logLevel=t.logLevel||0,CodeSync.Client._clients.push(this),this.enablePush===!0&&(this.channel=t.channel||e(),this.providerLib=""+CodeSync.get("socketEndpoint")+"/client.js",CodeSync.util.loadScript(this.providerLib,function(){if(n.clientLoaded===!0||!n.providerAvailable())return;return setTimeout(function(){try{return n.setupSocket()}catch(e){return console.log("Error setting up codesync client: "+e.message)}},25),n.clientLoaded=!0})),this.getSprocketsInfo()}return t._clients=[],t.get=function(){return CodeSync.Client._clients[0]},t.prototype.VERSION=CodeSync.VERSION,t.prototype.logLevel=0,t.prototype.enablePush=!0,t.prototype.getSprocketsInfo=function(){var e=this;return $.ajax({type:"GET",url:CodeSync.get("serverInfoEndpoint"),success:function(t){t==null&&(t={}),CodeSync.set("latestServerInfo",t),t.root&&CodeSync.set("projectRoot",t.root);if(t.project_assets!=null&&CodeSync.ProjectAssets!=null)return e.projectAssets=new CodeSync.ProjectAssets(t.project_assets)}})},t.prototype.buildStylesheetMap=function(){var e,t,n,r,i,s;this.stylesheetMap={},i=$('link[rel="stylesheet"]'),s=[];for(n=0,r=i.length;n<r;n++)t=i[n],(e=$(t).attr("href"))?s.push(this.stylesheetMap[e]=t):s.push(void 0);return s},t.prototype.buildScriptMap=function(){var e,t,n,r,i;this.scriptMap={},i=$('script[type="text/javascript"]');for(n=0,r=i.length;n<r;n++){e=i[n];if(t=$(e).attr("src"))this.scriptMap[t]=e}return this.scriptMap},t.prototype.providerAvailable=function(){return typeof Faye!="undefined"&&Faye!==null},t.prototype.subscribeWith=function(e){var t;return(t=this.socket)!=null?t.subscribe(this.channel,e):void 0},t.prototype.setupSocket=function(){var e=this;if(this.socket=typeof Faye!="undefined"&&Faye!==null?new Faye.Client(CodeSync.get("socketEndpoint")):void 0)return this.subscribeWith(function(){return e.defaultNotificationHandler.apply(e,arguments)})},t.prototype.notificationHandlerOptions={},t.prototype.defaultNotificationHandler=function(e){var t,n,r;return(t=(r=this.projectAssets)!=null?r.findDocumentByPath(e.path):void 0)&&e.contents&&(t.set("contents",e.contents,{silent:!1}),t.trigger("contents:synced")),n=this.notificationHandlerOptions,n.origin="watcher",CodeSync.processChangeNotification(e,n)},t}(),e=function(e){var t,n,r,i,s,o,u;r=window.location.search.substring(1),i=r.split("&");for(s=0,o=i.length;s<o;s++)t=i[s],t.match(/code_sync_channel/)&&e==null&&(u=t.split("="),n=u[0],e=u[1]);return e?decodeURIComponent("/code-sync/"+e):"/code-sync/outbound"}}.call(this),function(){CodeSync.util||(CodeSync.util={}),window.CodeSyncloadedScripts={},window.CodeSyncscriptTimers={},CodeSync.util.loadStylesheet=function(e,t,n){var r;return t==null&&(t={}),n||(n=t.complete||t.callback),typeof t=="function"&&n==null&&(n=t,t={}),r=document.createElement("link"),r.type="text/css",r.rel="stylesheet",r.href=e,r.className="code-sync-asset",t.tracker&&($("link[data-tracker='"+t.tracker+"']").remove(),r.setAttribute("data-tracker",t.tracker)),document.getElementsByTagName("head")[0].appendChild(r),n!=null?typeof n.call=="function"?n.call(this,e,t):void 0:void 0},CodeSync.util.loadScript=function(e,t,n){var r,i,s,o,u,a;t==null&&(t={}),i=window.CodeSyncloadedScripts,a=window.CodeSyncscriptTimers,n||(n=t.complete||t.callback),typeof t=="function"&&n==null&&(n=t,t={}),r=document.getElementsByTagName("head")[0],o=document.createElement("script"),o.src=e,o.type="text/javascript",u=this,s=function(){typeof n=="function"&&n.call(u,e,t,o);try{r.removeChild(o)}catch(s){!0}return i[e]=!0};if(t.once===!0&&i[e])return!1;r.appendChild(o),o.onreadystatechange=function(){if(o.readyState==="loaded"||o.readyState==="complete")return s()},o.onload=s;if(typeof navigator!="undefined"&&navigator!==null?navigator.userAgent.match(/WebKit/):void 0)return a[e]=setInterval(function(){return s(),clearInterval(a[e])},10)},CodeSync.util.inspectElementsWithin=function(e){var t,n,r,i,s,o,u,a;return e==null&&(e={}),u=e.root,i=e.el,o=e.fn,u||(u=window),n=function(e){var t;return t=$(e.target),t.css({"background-color":"#9FC4E7",opacity:.5}),t.children().each(function(e,t){return $(t).css({"background-color":"#C2DDB6",opacity:.5})})},a=function(e){var t;return t=$(e.target),t.attr("style",""),t.children().each(function(e,t){return $(t).attr("style","")})},r=function(){return u.$("*").off(".inspekt"),i},e.disable?r():(t=_.debounce(function(e){return a(e),u.$(i).trigger("inspekt",e,u.$(e.target)),r()},150),s=u.$(i).find("*"),s.off(".inspekt"),s.on("mouseover.inspekt",n).on("mouseout.inspekt",a).on("click.inspekt",function(e){return t(e),s.off(".inspekt")}),u.$(i))}}.call(this),function(){CodeSync.LocalStore=Backbone.Collection.extend({initialize:function(e,t){e==null&&(e=[]),this.options=t!=null?t:{},_.extend(this,t);if(this.namespace==null)throw"LocalStore collections must specify a namespace property";return this.localStorage=new CodeSync.LocalStorageAdapter({name:this.namespace}),this.url="null",Backbone.Collection.prototype.initialize.apply(this,arguments)}}),CodeSync.LocalStorageAdapter=function(){function e(e){var t;this.name=e,t=localStorage.getItem(this.name),this.data=t&&JSON.parse(t)||{}}return e.prototype.guid=function(){var e;return e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)},e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},e.prototype.save=function(){return localStorage.setItem(this.name,JSON.stringify(this.data))},e.prototype.create=function(e){return e.id||(e.id=e.attribtues.id=this.guid()),this.data[e.id]=e,this.save(),e},e.prototype.update=function(e){return this.data[e.id]=e,this.save(),e},e.prototype.find=function(e){return this.data[e.id]},e.prototype.findAll=function(){return _.values(this.data)},e.prototype.destroy=function(e){return delete this.data[e.id],this.save(),e},e}(),CodeSync.LocalStore.prototype.sync=function(e,t,n){var r,i;return i=t.localStorage||t.collection.localStorage,r=function(){switch(e){case"read":return t.id?i.find(t):i.findAll();case"create":return i.create(t);case"update":return i.update(t);case"delete":return i.destroy(t)}}(),r?n.success(r):n.error("Record not found")}}.call(this),function(){var e=[].slice;CodeSync.Document=Backbone.Model.extend({initialize:function(e,t){var n=this;return this.attributes=e,Backbone.Model.prototype.initialize.apply(this,arguments),_.bindAll(this,"onContentChange"),this.on("change:contents",this.onContentChange),this.on("change:name",function(){return n.set("mode",n.determineMode()),n.set("display",n.nameWithoutExtension())}),this.on("change:mode",function(){return n.set("extension",n.determineExtension(),{silent:!0})}),this.localStorageKey()&&this.set("contents",localStorage.getItem(this.localStorageKey()),{silent:!0}),this.saveToLocalStorage=_.debounce(this.saveToLocalStorage,1e3)},url:function(){return CodeSync.get("assetCompilationEndpoint")},templateFunction:function(){return JST[this.nameWithoutExtension()]},folder:function(){var e,t,n;if(!(e=this.get("folder")))if(t=this.get("path")){e=t=t.replace(this.nameWithExtension(),"");if(n=CodeSync.get("projectRoot"))e=t.replace(n,"")}else e=function(){switch(this.type()){case"script":case"template":return"javascripts";default:return"stylesheets"}}.call(this);return e!=="undefined"&&this.set("folder",e,{silent:!0}),e},description:function(){var e;return(e=this.get("path"))?e.replace(CodeSync.get("projectRoot"),""):""+this.folder()+"/"+this.nameWithExtension()},newPath:function(){return""+CodeSync.get("projectRoot")+"/"+this.folder()},saveToDisk:function(){if(this.isSaveable())return this.sendToServer(!0,"saveToDisk")},localStorageKey:function(){if(this.get("localStorageKey"))return""+this.get("localStorageKey")+":"+this.get("name")},saveToLocalStorage:function(e){var t;t=e||this.get("path");if(t!=null)return localStorage.setItem(t,this.get("contents"))},loadSourceFromDisk:function(e){var t=this;return $.ajax({url:""+this.url()+"?path="+this.get("path"),type:"GET",success:function(n){var r;n==null&&(n={}),r=e!=null;if(n.success===!0&&n.contents!=null)return t.set("contents",n.contents,{silent:r}),typeof e=="function"?e(t):void 0}})},toJSON:function(){return{name:this.nameWithoutExtension(),path:this.get("path"),extension:this.get("extension")||this.determineExtension(),contents:this.toContent()}},nameWithExtension:function(){var e;return e=this.get("name"),e.match(/\./)||(e+=this.get("extension")),e},nameWithoutExtension:function(){var e;return e=this.get("extension")||this.determineExtension(),(this.get("name")||"untitled").replace(e,"")},toMode:function(){var e,t;return e=this.get("mode")||this.determineMode(),t=CodeSync.Modes.getMode(e)},toCodeMirrorMode:function(){var e;return(e=this.toMode())!=null?e.get("codeMirrorMode"):void 0},toCompiledDocument:function(){var e,t;if(this.compiledDocument!=null)return this.compiledDocument.set("contents",this.get("compiled"),{silent:!0}),this.compiledDocument;switch(this.type()){case"template":case"script":e="javascript",t=".js";break;case"stylesheet":e="css",t=".css"}return this.compiledDocument=new CodeSync.Document({doNotSave:!0,raw:!0,extension:t,mode:e,contents:this.get("compiled")})},toCodeMirrorDocument:function(){return CodeMirror.Doc(this.toContent(),this.toCodeMirrorMode(),0)},toCodeMirrorOptions:function(){return this.toMode().get("codeMirrorOptions")},toContent:function(){var e,t,n;e=""+(this.get("contents")||((n=this.toMode())!=null?n.get("defaultContent"):void 0)||" ");if(t=CodeSync.Document.getPrefixContentFor(this))e=""+t+"\n"+e;return e},onContentChange:function(e,t,n){var r;n==null&&(n={}),(r=this.localStorageKey())&&this.saveToLocalStorage(r);if(n.liveMode===!0)return this.sendToServer(!1,"onContentChange")},sendToServer:function(e,t){var n,r=this;return e==null&&(e=!1),t==null&&(t=""),this.isSaveable()||(e=!1),n=e===!0?this.toJSON():_(this.toJSON()).pick("name","extension","contents"),$.ajax({type:"POST",url:CodeSync.get("assetCompilationEndpoint"),data:JSON.stringify(n),error:function(e){return CodeSync.log("Document Process Error",arguments)},success:function(e){var n,i;CodeSync.log("Document Process Response",e),e.success===!0&&r.trigger("status",{type:"success",message:r.successMessage(t),compiled:e.compiled}),e.success===!0&&e.compiled!=null&&r.set("compiled",e.compiled);if(e.success===!1&&e.error!=null)return r.set("error",(n=e.error)!=null?n.message:void 0),r.trigger("status",{type:"error",message:(i=e.error)!=null?i.message:void 0})}})},changeProcessor:CodeSync.processChangeNotification,loadInPage:function(e){var t,n,r;return e==null&&(e={}),t=this,n={type:t.type(),compiled:t.get("compiled"),complete:e.complete,name:t.get("name"),path:t.get("path"),contents:t.get("contents")},1,r=_.extend(n,{error:function(e){return t.trigger("status",{type:"error",sticky:"true",message:"JS Error: "+e})},success:function(){return t.trigger("code:sync:"+t.get("type"))}}),this.changeProcessor(r,{origin:"document",documentId:t.cid})},type:function(){switch(this.get("mode")){case"css":case"sass":case"scss":case"less":return"stylesheet";case"coffeescript":case"javascript":return"script";case"skim":case"mustache":case"jst":case"haml":case"eco":case"html":return"template"}},missingFileName:function(){var e;return e=this.get("path")||this.get("name"),e==null||e.length===0},determineExtension:function(){var e,t;t=this.get("path")||this.get("name");if(e=CodeSync.Document.getExtensionFor(t))return e;if(this.get("mode")!=null)return CodeSync.Modes.guessExtensionFor(this.get("mode")||CodeSync.get("defaultFileType"))},determineMode:function(){var e;return e=this.get("path")||this.get("name")||this.get("extension"),CodeSync.Modes.guessModeFor(e)},successMessage:function(e){if(this.type()==="template")return'Success. Template will be available as JST["'+this.nameWithoutExtension()+'"]'},isSticky:function(){return this.get("sticky")!=null==1},isSaveable:function(){var e;return((e=this.get("path"))!=null?e.length:void 0)>0&&!this.get("doNotSave")}}),CodeSync.Document.getFileNameFrom=function(e){return e==null&&(e=""),e.split("/").pop()},CodeSync.Document.getExtensionFor=function(t){var n,r,i,s,o;t==null&&(t=""),n=CodeSync.Document.getFileNameFrom(t),o=n.split("."),r=o[0],i=2<=o.length?e.call(o,1):[];if(s=i.length>0&&i.join("."))return"."+s},CodeSync.Document.getPrefixContentFor=function(e){return""},CodeSync.Documents=Backbone.Collection.extend({model:CodeSync.Document,initialize:function(e,t){return Backbone.Collection.prototype.initialize.apply(this,arguments)},nextId:function(){return this.models.length+1},findByPath:function(e){var t;return t=this.detect(function(t){var n;return(n=t.get("path"))!=null?n.match(e):void 0})},findOrCreateForPath:function(e,t){var n,r,i,s,o,u=this;return e==null&&(e=""),(r=this.findByPath(e))?typeof t=="function"?t(r):void 0:(o=CodeSync.Document.getFileNameFrom(e),i=CodeSync.Document.getExtensionFor(o),n=o.replace(i,""),s=this.nextId(),r=new CodeSync.Document({name:o,extension:i,display:n,path:e,id:s}),r.loadSourceFromDisk(function(){return typeof t=="function"?t(r):void 0}))}}),CodeSync.Documents._projectAssets=void 0,CodeSync.Documents.getProjectAssets=function(){var e,t,n=this;return e=(t=CodeSync.Documents)._projectAssets||(t._projectAssets=new CodeSync.Documents),$.ajax({type:"GET",url:CodeSync.get("serverInfoEndpoint"),success:function(t){var n;t==null&&(t={});if(((n=t.project_assets)!=null?n.length:void 0)>0)return e.reset(t.project_assets)}}),e}}.call(this),function(){CodeSync.ProjectAssets=Backbone.Collection.extend({model:CodeSync.Document,url:CodeSync.get("serverInfoEndpoint"),parse:function(e){return e.project_assets},findDocumentByPath:function(e){return this.detect(function(t){return t.get("path")===e})}})}.call(this),function(){var e;CodeSync.ScriptPackages=CodeSync.LocalStore.extend({namespace:"script:package",initialize:function(e,t){return e==null&&(e=[]),this.options=t!=null?t:{},_(e).isEmpty()&&(e=CodeSync.ScriptPackages.samples),CodeSync.LocalStore.prototype.initialize.call(this,e,this.options)},create:function(e,t){var n,r,i,s,o,u,a,f;e==null&&(e={}),t==null&&(t={}),o=e.text,s=e.name,r=e.list,r||(r=[]),f=o.split("\n");for(u=0,a=f.length;u<a;u++)n=f[u],r.push(_.str.strip(n));return i=new this.model({list:r,name:s}),this.add(i,t),i},model:Backbone.Model.extend({sync:CodeSync.LocalStore.prototype.sync,initialize:function(e){var t,n,r,i,s,o,u=this;this.attributes=e,Backbone.Model.prototype.initialize.apply(this,arguments),r={},o=this.attributes.list;for(i=0,s=o.length;i<s;i++)t=o[i],r[t]=!1;return this.set("status",r,{silent:!0}),n=this,this.updateStatus=function(e){return console.log("Script Loaded",e),u.onLoad.apply(n,arguments),u.attributes.status[e]=!0,u.trigger("resource:loaded",n,e)}},onLoad:function(e){var t;return t=this.get("status"),t[e]=!0,this.set({status:t})},request:function(e){var t,n,r,i,s;t=this.get("name"),e||(e=window),i=this.get("status"),s=[];for(n in i)r=i[n],console.log("Loading Script",n),s.push(e.CodeSync.util.loadScript(n,{tracker:""+t+":"+n,complete:this.updateStatus}));return s}})}),e=CodeSync.ScriptPackages.samples=[],e.push({name:"Backbone + Underscore + jQuery",list:["//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.1/jquery.min.js","//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js","//cdnjs.cloudflare.com/ajax/libs/underscore.string/2.3.0/underscore.string.min.js","//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"]})}.call(this),function(){var e;CodeSync.StylesheetPackages=CodeSync.LocalStore.extend({namespace:"stylesheet:package",initialize:function(e,t){return e==null&&(e=[]),this.options=t!=null?t:{},_(e).isEmpty()&&(e=CodeSync.StylesheetPackages.samples),CodeSync.LocalStore.prototype.initialize.call(this,e,this.options)},create:function(e,t){var n,r,i,s,o,u,a,f;e==null&&(e={}),t==null&&(t={}),o=e.text,s=e.name,r=e.list,r||(r=[]),f=o.split("\n");for(u=0,a=f.length;u<a;u++)n=f[u],r.push(_.str.strip(n));return i=new this.model({list:r,name:s}),this.add(i,t),i},model:Backbone.Model.extend({sync:CodeSync.LocalStore.prototype.sync,initialize:function(e){var t,n,r,i,s,o,u=this;this.attributes=e,Backbone.Model.prototype.initialize.apply(this,arguments),r={},o=this.attributes.list;for(i=0,s=o.length;i<s;i++)t=o[i],r[t]=!1;return this.set("status",r,{silent:!0}),n=this,this.updateStatus=function(e){return u.onLoad.apply(n,arguments),u.attributes.status[e]=!0,u.trigger("resource:loaded",n,e)}},onLoad:function(e){var t;return t=this.get("status"),t[e]=!0,this.set({status:t})},request:function(e){var t,n,r,i,s;t=this.get("name"),e||(e=window),i=this.get("status"),s=[];for(n in i)r=i[n],s.push(e.CodeSync.util.loadStylesheet(n,{tracker:""+t+":"+n,complete:this.updateStatus}));return s}})}),e=CodeSync.StylesheetPackages.samples=[],e.push({name:"purecss.io",list:["//yui.yahooapis.com/pure/0.1.0/pure-min.css"]}),e.push({name:"Luca",list:["//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css","//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css","//datapimp.github.com/luca/vendor/assets/stylesheets/luca-ui.css"]}),e.push({name:"bootstrap / amelia",list:["//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css","//netdna.bootstrapcdn.com/bootswatch/2.3.1/amelia/bootstrap.min.css","//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.min.css"]})}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/asset_selector"]=function(){return function(e){return e==null&&(e={}),Skim.withContext.call({},e,function(){var e;return e=[],e.push('<div class="asset-selector-wrapper"><div class="search-input"><input placeholder="Type the name of an asset to open it" type="text" /></div><div class="search-results-wrapper"><div class="search-results"></div></div></div>'),e.join("")})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/document_manager_tab"]=function(){return function(e){return e==null&&(e={}),Skim.withContext.call({},e,function(){var e,t,n,r,i,s,o,u;return n=[],t=this.display||this.doc.get("display")||this.doc.get("name"),e=["document-tab"],this.cls!=null&&e.push(this.cls),this.doc!=null&&e.push("selectable"),this.closable&&((r=this.doc)!=null?!r.isSticky():!void 0)&&e.push("closable"),this.index!==0&&e.push("hideable"),this.doc!=null&&((i=this.doc)!=null?!i.isSticky():!void 0)&&e.push("editable"),n.push("<div"),o=[],o.push(this.escape(e.join(" "))),o.join(""),o.length>0&&(n.push(' class="'),n.push(o),n.push('"')),u=[],u.push(this.escape((s=this.doc)!=null?s.cid:void 0)),u.join(""),u.length>0&&(n.push(' data-document-cid="'),n.push(u),n.push('"')),n.push('><span class="contents">'),n.push(this.escape(t)),n.push('</span><small class="close-anchor">x</small></div>'),n.join("")})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/editor_panel"]=function(){return function(e){return e==null&&(e={}),Skim.withContext.call({},e,function(){var e;return e=[],e.push('<div class="editor-wrapper"><div class="editor"></div><div class="editor"></div><div class="editor"></div></div><div class="editor-panel-toolbar"></div>'),e.join("")})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/editor_toolbar"]=function(){return function(e){return e==null&&(e={}),Skim.withContext.call({},e,function(){var e;return e=[],e.push('<div class="toolbar-wrapper fluid-row"><div class="gspan4"><div class="controls left"></div></div><div class="gspan4"><div class="controls middle"></div></div><div class="gspan4"><div class="controls right"></div></div></div>'),e.join("")})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/element_sync"]=function(){return function(e){return e==null&&(e={}),Skim.withContext.call({},e,function(){var e;return e=[],e.push('<div class="element-sync-panel"><header><h3>Template / DOM Sync</h3><p>Use this to compile a template to any part of the DOM</p></header><div class="fluid-row selector-info"><div class="gspan9"><input name="css-selector" placeholder="Enter a CSS selector to sync with" /></div><div class="gspan3"><div class="btn-group actions"><a class="btn done-button" title="Finish syncing with his element"><i class="icon icon-check"></i></a><a class="btn hide-panel-button" title="Hide this panel, continue syncing."><i class="icon icon-export"></i></a><a class="btn find-button" title="Find an element"><i class="icon icon-hair-cross"></i></a><a class="btn set-template-options" title="Specify template code"><i class="icon icon-code"></i></a></div></div></div><div class="fluid-row"><div class="gspan9"><div class="element-sync-status"></div></div><div class="gspan3"><div class="search-scope-description"></div></div></div></div>'),e.join("")})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/file_controls"]=function(){return function(e){return e==null&&(e={}),Skim.withContext.call({},e,function(){var e,t,n,r,i,s,o;return e=[],e.push('<div class="form"><div class="fluid-row"><div class="gspan6"><div class="field name required"><label>Filename</label><div class="controls"><input class="modifiable" id="document_name" name="name" placeholder="Enter a name for this file" type="text"'),r=[],r.push(this.escape(this.name)),r.join(""),r.length>0&&(e.push(' value="'),e.push(r),e.push('"')),e.push(' /></div></div></div><div class="gspan6">'),this.folder!=null&&(e.push('<div class="field folder"><label>Folder</label><div class="controls"><input class="modifiable" id="document_folder" name="folder" placeholder="Where will this file be stored? Relative to the project root" type="text"'),i=[],i.push(this.escape(this.folder)),i.join(""),i.length>0&&(e.push(' value="'),e.push(i),e.push('"')),e.push(" /></div></div>")),e.push("</div></div>"),((t=this.path)!=null?t.length:void 0)>0?(e.push('<div class="field current-file-location"><label>Current file location</label><div class="controls"><input class="read-only" name="path" type="text"'),s=[],s.push(this.escape(this.path)),s.join(""),s.length>0&&(e.push(' value="'),e.push(s),e.push('"')),e.push(" /></div></div>")):(e.push('<div class="field new-file-location"><label>New file location</label><div class="controls"><input class="read-only" id="document_path" name="path" type="text"'),o=[],o.push(this.escape(this.newPath)),o.join(""),o.length>0&&(e.push(' value="'),e.push(o),e.push('"')),e.push(" /></div></div>")),e.push('<div class="field"><div class="btn-group"><div class="btn compile">Compile</div><div class="btn save-to-disk">Save To Disk</div>'),((n=this.path)!=null?n.length:void 0)>0&&e.push('<div class="btn load-from-disk">Reload</div>'),e.push("</div></div></div>"),e.join("")})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/preferences_panel"]=function(){return function(e){return e==null&&(e={}),Skim.withContext.call({},e,function(){var e,t,n;return e=[],e.push("<form>"),this.enableMode&&e.push('<div class="field mode-selector"><label>Language</label><div class="controls"><select name="mode"></select></div></div>'),this.enableKeyBindings&&e.push('<div class="field"><label>KeyBindings</label><div class="controls"><select name="keyMap"><option value="default">Default</option><option value="vim">Vim</option></select></div></div>'),this.enableTheme&&e.push('<div class="field"><label>Theme</label><div class="controls"><select name="theme"><option value="ambiance">Ambiance</option><option value="lesser-dark">Lesser Dark</option><option value="monokai">Monokai</option><option value="xq-light">XQ Light</option></select></div></div>'),this.enableEndpoint&&(e.push('<div class="field"><label>Asset Compiler Endpoint</label><div class="controls"><input name="asset_endpoint" type="text"'),t=[],t.push(this.escape(CodeSync.get("assetCompilationEndpoint"))),t.join(""),t.length>0&&(e.push(' value="'),e.push(t),e.push('"')),e.push(" /></div></div>")),this.enableHotKey&&(e.push('<div class="field"><label>Hotkey</label><div class="controls"><input name="editor_hotkey" type="text"'),n=[],n.push(this.escape(CodeSync.get("editorToggleHotkey"))),n.join(""),n.length>0&&(e.push(' value="'),e.push(n),e.push('"')),e.push(" /></div></div>")),this.enablePosition&&e.push('<div class="field"><label>Position</label><div class="controls"><select name="position"><option value="top">Top</option><option value="bottom">Bottom</option></select></div></div>'),e.push("</form>"),e.join("")})}}.call(this)}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/script_loader"]=function(e){return function(){var e,t,n,r,i,s,o;t=window.HAML.escape,e=window.HAML.cleanValue,n=[],n.push("<div class='form'>\n <div class='card-view'>\n <div class='active boom card menu'>");if(this.packages.length>=1){n.push(" <div class='field'>\n <label>Select a package</label>\n <div class='controls'>\n <select name='load_package'>\n <option value=''>Select One</option>"),o=this.packages.pluck("name");for(i=0,s=o.length;i<s;i++)r=o[i],n.push(" <option value='"+t(e(r))+"'>\n "+r+"\n </option>");n.push(" </select>\n </div>\n </div>")}return n.push(" <div class='field'>\n <label>\n Enter a list of javascript Urls\n </label>\n <div class='controls'>\n <textarea name='package_text'></textarea>\n </div>\n </div>\n <div class='action-row'>\n <a class='btn btn-primary submit'>\n Load Resources\n </a>\n <a class='btn finished'>\n Cancel\n </a>\n </div>\n </div>\n <div class='card results'>\n <div class='field'>\n <label>Package Name</label>\n <input type='text' name='package_name'>\n </div>\n <ul class='results-container'></ul>\n <div class='action-row'>\n <a class='btn btn-primary save-as-package'>\n Save As Package\n </a>\n <a class='btn finished'>\n Finished\n </a>\n </div>\n </div>\n </div>\n</div>"),n.join("\n").replace(/\s(\w+)='“true'/mg," $1").replace(/\s(\w+)='“false'/mg,"").replace(/\s(?:id|class)=(['"])(\1)/mg,"")}.call(window.HAML.context(e))}}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/stylesheet_loader"]=function(e){return function(){var e,t,n,r,i,s,o;t=window.HAML.escape,e=window.HAML.cleanValue,n=[],n.push("<div class='form'>\n <div class='card-view'>\n <div class='active boom card menu'>");if(this.packages.length>=1){n.push(" <div class='field'>\n <label>Select a package</label>\n <div class='controls'>\n <select name='load_package'>\n <option value=''>Select One</option>"),o=this.packages.pluck("name");for(i=0,s=o.length;i<s;i++)r=o[i],n.push(" <option value='"+t(e(r))+"'>\n "+r+"\n </option>");n.push(" </select>\n </div>\n </div>")}return n.push(" <div class='field'>\n <label>\n Enter a list of stylesheet Urls\n </label>\n <div class='controls'>\n <textarea name='package_text'></textarea>\n </div>\n </div>\n <div class='action-row'>\n <a class='btn btn-primary submit'>\n Load Resources\n </a>\n <a class='btn finished'>\n Cancel\n </a>\n </div>\n </div>\n <div class='card results'>\n <div class='field'>\n <label>Package Name</label>\n <input type='text' name='package_name'>\n </div>\n <ul class='results-container'></ul>\n <div class='action-row'>\n <a class='btn btn-primary save-as-package'>\n Save As Package\n </a>\n <a class='btn finished'>\n Finished\n </a>\n </div>\n </div>\n </div>\n</div>"),n.join("\n").replace(/\s(\w+)='“true'/mg," $1").replace(/\s(\w+)='“false'/mg,"").replace(/\s(?:id|class)=(['"])(\1)/mg,"")}.call(window.HAML.context(e))}}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/toolbar_button"]=function(e){return function(){var e,t,n;return t=window.HAML.escape,e=window.HAML.cleanValue,n=[],n.push("<a class='button toolbar-button' data-button-id='"+t(e(this.buttonId))+"' title='"+t(e(this.tooltip))+"'>"),this.icon&&n.push(" <i class='icon icon-"+this.icon+"'></i>"),this.text&&n.push(" <span>"+this.text+"</span>"),n.push("</a>"),n.join("\n").replace(/\s(\w+)='“true'/mg," $1").replace(/\s(\w+)='“false'/mg,"").replace(/\s(?:id|class)=(['"])(\1)/mg,"")}.call(window.HAML.context(e))}}.call(this),function(){this.JST||(this.JST={}),this.JST["code_sync/editor/templates/toolbar_panel"]=function(e){return function(){var e;return e=[],e.push("<div class='editor-utility'></div>"),e.join("\n").replace(/\s(?:id|class)=(['"])(\1)/mg,"")}.call(window.HAML.context(e))}}.call(this),function(){var e;CodeSync.Modes=Backbone.Collection.extend({model:Backbone.Model.extend({type:function(){if(this.get("template")===!0)return"template";if(this.get("style")===!0)return"style";if(this.get("script")===!0)return"script"},isOfType:function(e){return e==null&&(e="any"),this.get(e)===!0||e==="any"||e==="all"},isTemplate:function(){return this.get("template")===!0},isStylesheet:function(){return this.get("style")===!0},isScript:function(){return this.get("script")===!0},isBackend:function(){return this.get("backend")===!0}}),initialize:function(t,n){var r,i,s;return t==null&&(t=[]),n==null&&(n={}),t=function(){var t,n;n=[];for(i in e)s=e[i],n.push(r=_.extend(s,{id:i,name:s.name||i,codeMirrorMode:s.codeMirrorMode||i,extensionRegex:new RegExp(""+s.extension),template:s.template===!0||i==="skim"||((t=s.extension)!=null?t.match(/jst/):void 0)}));return n}(),Backbone.Collection.prototype.initialize.apply(this,arguments),this.reset(t,{silent:!0})},findModeFor:function(e){var t,n=this;return e==null&&(e=""),e.match(/\./)||(e="."+e),t=this.detect(function(t){var n;return n=t.get("extensionRegex"),n.exec(e)}),t!=null?t.get("codeMirrorMode"):void 0},findExtensionFor:function(e){return e=this.detect(function(t){return t.get("codeMirrorMode")===e||t.get("id")===e}),e!=null?e.get("extension"):void 0},defaultMode:function(){return this.get(CodeSync.get("defaultFileType"))||this.first()}}),CodeSync.Modes.getMode=function(e){return CodeSync.Modes.get().get(e)},CodeSync.Modes.guessModeFor=function(e){return CodeSync.Modes.get().findModeFor(e)},CodeSync.Modes.guessExtensionFor=function(e){return CodeSync.Modes.get().findExtensionFor(e)},CodeSync.Modes.get=function(){var e;return(e=CodeSync.Modes).singleton||(e.singleton=new CodeSync.Modes)},CodeSync.Modes.defaultMode=function(){return CodeSync.Modes.get().defaultMode()},e={coffeescript:{extension:".coffee",script:!0,codeMirrorOptions:{indentUnit:2,smartIndent:!0,tabSize:2,indentWithTabs:!1},defaultContent:'# You are currently in Coffeescript Mode\n#\n# Any coffeescript you type in here will be evaluated.\n#\n# defining this function will allow you to respond\n# to code and template changes that happen in this editor.\n#\n#\n# CodeSync.onScriptChange = (changeObject)->\n# console.log "Detected new code from CodeSync", changeObject\n#\n#'},sass:{name:"Sass",extension:".css.sass",defaultContent:"// You are currently in Sass mode.",style:!0,codeMirrorOptions:{indentUnit:2,smartIndent:!0,tabSize:2,indentWithTabs:!1}},scss:{codeMirrorMode:"css",extension:".css.scss",name:"SCSS",defaultContent:"/* You are currently in SCSS mode. */" +,style:!0},haml:{codeMirrorMode:"haml",extension:".hamlc",name:"Haml Coffee",template:!0,defaultContent:"/ HAML Coffeescript Mode "},skim:{extension:".jst.skim",defaultContent:"// You are currently in Skim mode.\n// The contents of this template will be available on the JST object.",template:!0,codeMirrorOptions:{indentUnit:2,smartIndent:!0,tabSize:2,indentWithTabs:!1}},html:{name:"HTML",codemirrorMode:"html",extension:".html",defaultContent:"<!-- HTML Mode -->",template:!0,raw:!0},css:{name:"CSS",extension:".css",codeMirrorMode:"css",defaultContent:"/* You are currently in raw CSS mode. */",style:!0,raw:!0},javascript:{name:"Javascript",extension:".js",codeMirrorMode:"javascript",defaultContent:"/* You are currently in raw JS mode. */",script:!0,raw:!0}}}.call(this),function(){CodeSync.DocumentManager=Backbone.Model.extend({initialize:function(e){var t,n,r,i;this.attributes=e!=null?e:{},this.editor=this.attributes.editor,delete this.attributes.editor,_.isFunction(this.attributes.getEditor)&&(this.getEditor=this.attributes.getEditor,delete this.attributes.getEditor),this.openDocuments=new CodeSync.Documents,i=["add","remove","change:display","change:sticky"];for(n=0,r=i.length;n<r;n++)t=i[n],this.openDocuments.on(t,this.notify,this);return Backbone.Model.prototype.initialize.apply(this,arguments)},getEditor:function(){return this.editor||_(CodeSync.AssetEditor.instances).values()[0]},detect:function(e){return this.openDocuments.each(e)},each:function(e){return this.openDocuments.each(e)},notify:function(){return this.trigger("document:change")},openDocument:function(e,t){return t||(t=this.getEditor()),this.openDocuments.add(e),this.setCurrentDocument(e,t)},setCurrentDocument:function(e,t){return this.currentDocument=e,t||(t=this.getEditor()),t.loadDocument(this.currentDocument)},saveDocument:function(){return CodeSync.get("disableAssetSave")?this.getEditor().showError("Saving is disabled."):this.currentDocument.saveToDisk()},createDocument:function(e){var t,n,r,i;return e||(e=this.getEditor()),r=((i=e.mode)!=null?i.id:void 0)||CodeSync.get("defaultFileType"),n=CodeSync.Modes.guessExtensionFor(r),t=new CodeSync.Document({name:"untitled",display:"Untitled",mode:r,extension:n}),this.openDocument(t,e)}})}.call(this),function(){CodeSync.EditorComponent=Backbone.View.extend({name:"code_sync",className:"codesync-editor-component",enableStatusMessages:!0,startMode:"scss",theme:"ambiance",keyBindings:"",events:{"click .status-message":"removeStatusMessages"},liveMode:!0,liveModeThrottle:600,initialize:function(e){var t=this;return this.options=e!=null?e:{},_.extend(this,this.options),this.views={},Backbone.View.prototype.initialize.apply(this,arguments),_.bindAll(this,"editorChangeHandler"),this.modes=CodeSync.Modes.get(),this.documentManager=this.options.documentManager||new CodeSync.DocumentManager({editor:this}),this.startMode=this.modes.get(this.startMode)||CodeSync.Modes.defaultMode(),this.on("codemirror:setup",function(){return t.loadDefaultDocument()}),this.liveMode===!0&&this.enableLiveMode(this.liveModeThrottle),this.autoRender!==!1&&this.render(),this.setupPlugins()},enableLiveMode:function(e){return this.liveModeHandler=_.debounce(this.editorChangeHandler,e||this.editorChangeThrottle),this.on("editor:change",this.liveModeHandler,this)},disableLiveMode:function(){return this.off("editor:change",this.liveModeHandler)},render:function(){return this.setupCodeMirror(),this},setupPlugins:function(){var e,t,n,r,i,s,o,u;if(_.isEmpty(this.plugins))return;i=this.plugins,u=[];for(n=0,r=i.length;n<r;n++){t=i[n];if(CodeSync.plugins[t]==null)continue;e=((s=this.pluginOptions)!=null?s[t]:void 0)||{},e.PluginClass=CodeSync.plugins[t],u.push((o=CodeSync.plugins[t].setup)!=null?o.call(this,this,e):void 0)}return u},setupCodeMirror:function(){var e=this;if(this.codeMirror!=null)return;return this.$el.append("<div class='codemirror-wrapper' />"),this.height||(this.height=this.$el.height()),this.codeMirror=CodeMirror(this.$(".codemirror-wrapper")[0],this.getCodeMirrorOptions()),this.on("initial:document:load",function(){e.startMode&&e.setMode(e.startMode),e.keyBindings&&e.setKeyMap(e.keyBindings);if(e.theme||(e.theme=localStorage.getItem("codesync:theme")))return e.setTheme(e.theme)}),this.codeMirror.on("change",_.debounce(function(t){return e.trigger("editor:change",e.codeMirror.getValue(),t)},this.editorChangeThrottle)),this.trigger("codemirror:setup",this.codeMirror,this),typeof this.onCodeMirrorSetup=="function"&&this.onCodeMirrorSetup(this.codeMirror,this),this},codeMirrorKeyBindings:{"Ctrl+Command+1":function(){var e;return(e=CodeSync.get("commandOne"))!=null?typeof e.call=="function"?e.call(this):void 0:void 0},"Ctrl+Command+2":function(){var e;return(e=CodeSync.get("commandTwo"))!=null?typeof e.call=="function"?e.call(this):void 0:void 0},"Ctrl+Command+3":function(){var e;return(e=CodeSync.get("commandThree"))!=null?e.call(this):void 0}},getCodeMirrorOptions:function(){var e,t,n,r,i,s;r={};if((typeof key!=="undefined"&&key!==null?key.call:void 0)!=null){i=this.codeMirrorKeyBindings;for(t in i)e=i[t],r[t]=!1,key(t,_.bind(e,this))}return n={theme:"lesser-dark",lineNumbers:!0,mode:((s=this.startMode)!=null?s.get("codeMirrorMode"):void 0)||CodeSync.get("defaultFileType"),extraKeys:r}},editorChangeHandler:function(e){return this.currentDocument.set("contents",e,{liveMode:this.liveMode})},setKeyMap:function(e){var t;return this.keyMap!=null&&e!==this.keyMap&&(this.trigger("change:keyMap",e,this.keyMap),(t=this.onKeyMapChange)!=null&&t.call(this,e,this.keyMap)),this.codeMirror.setOption("keyMap",this.keyMap=e)},setTheme:function(e){var t;return this.theme!=null&&e!==this.theme&&(this.trigger("change:theme",e,this.theme),(t=this.onThemeChange)!=null&&t.call(this,e,this.theme)),this.$el.attr("data-codesync-theme",this.theme=e),this.codeMirror.setOption("theme",this.theme=e)},setMode:function(e){var t,n;return this.mode!=null&&e!==this.mode&&(this.trigger("change:mode",e,e.id),(t=this.onModeChange)!=null&&t.call(this,e,this.mode)),this.mode=e,this.$el.attr("data-codesync-mode",this.mode.id),((n=this.mode)!=null?n.get:void 0)!=null&&(this.codeMirror.setOption("mode",this.mode.get("codeMirrorMode")),this.currentDocument.set("mode",this.mode.id),this.currentDocument.set("extension",CodeSync.Modes.guessExtensionFor(this.mode.id))),this},setCodeMirrorOptions:function(e){var t,n,r;e==null&&(e={}),r=[];for(t in e)n=e[t],r.push(this.codeMirror.setOption(t,n));return r},getDefaultDocument:function(){var e,t,n;return t={mode:this.options.startMode||CodeSync.get("defaultFileType"),sticky:!0,doNotSave:!0,name:this.defaultDocumentName||"codesync",display:"CodeSync"},n=_.extend(t,this.document),e=new CodeSync.Document(n)},loadDefaultDocument:function(){return this.documentManager.openDocument(this.getDefaultDocument(),this)},loadDocument:function(e){var t;return(t=this.currentDocument)?(t.off("status",this.showStatusMessage),t.off("change:compiled",this.applyDocumentContentToPage),t.off("change:mode",this.applyDocumentContentToPage,this),this.previousDocument=t):this.trigger("initial:document:load",this.currentDocument=e),e.on("status",this.showStatusMessage,this),e.on("change:compiled",this.applyDocumentContentToPage,this),e.on("change:mode",this.syncEditorModeWithDocument,this),this.codeMirror.swapDoc(e.toCodeMirrorDocument()),this.trigger("document:loaded",e,this.previousDocument),this.setCodeMirrorOptions(e.toCodeMirrorOptions()),this.currentDocument=e},syncEditorModeWithDocument:function(){if(this.currentDocument!=null&&this.currentDocument.toMode()!==this.mode)return this.setMode(this.currentDocument.toMode())},applyDocumentContentToPage:function(){var e,t,n=this;return e=this.currentDocument,(t=this.currentDocument)!=null?t.loadInPage({complete:function(){return n.trigger("code:sync:"+e.type(),e)}}):void 0},removeStatusMessages:function(){return this.$(".status-message").remove()},showError:function(e){return this.showStatusMessage({type:"error",message:e})},showStatusMessage:function(e){var t,n,r=this;e==null&&(e={}),this.removeStatusMessages(),t=function(){switch(this.enableStatusMessages){case!1:return[];case!0:case"all":return["success","error","notice"];default:return[this.enableStatusMessages]}}.call(this);if(!(_(t).indexOf(e.type)>=0))return;((n=e.message)!=null?n.length:void 0)>0&&this.$el.prepend("<div class='status-message "+e.type+"'>"+e.message+"</div>");if(e.type==="success")return _.delay(function(){return r.$(".status-message.success").animate({opacity:0},{duration:400,complete:function(){return r.$(".status-message.success").remove()}})},1200)}}),CodeSync.EditorComponent.instances={},CodeSync.commands={commandOne:function(){},commandTwo:function(){},commandThree:function(){}}}.call(this),function(){var e;CodeSync.EditorUtility=Backbone.View.extend({buttonText:void 0,buttonIcon:void 0,buttonTemplate:"toolbar_button",entranceEffect:"bounceInDown",exitEffect:"bounceOutUp",visible:!1,panelTemplate:"toolbar_panel",availableInModes:"all",alignment:void 0,initialize:function(e){var t,n;this.options=e,_.extend(this,this.options),Backbone.View.prototype.initialize.apply(this,arguments),(t=this.editor)!=null&&t.on("change:mode",this.checkAvailabilityInMode,this),(n=this.editor)!=null&&n.on("document:loaded",this.checkAvailabilityInMode,this);if(this.alignment!=null)return this.$el.addClass(""+this.alignment+"-aligned")},checkAvailabilityInMode:function(){var e,t;if(this.availableInModes==="all"||this.availableInModes==null)return this.buttonElement.show();e=((t=this.editor.mode)!=null?typeof t.type=="function"?t.type():void 0:void 0)||this.editor.currentDocument.type(),e===this.availableInModes},toggle:function(e){return e==null&&(e={}),this.visible?this.hide(e):this.show(e)},show:function(e){return e==null&&(e={}),this.removeOtherEditorUtilitys(),this.render(),this.$el.removeClass(this.exitEffect),this.$el.addClass("animated "+this.entranceEffect),this.visible=!0,this},hide:function(e){return e==null&&(e={}),this.$el.removeClass(this.entranceEffect),this.$el.addClass("animated "+this.exitEffect),this.visible=!1,this},removeOtherEditorUtilitys:function(){return $(this.renderTo()).find(".editor-utility").addClass("animated "+this.exitEffect).attr("data-removed",!0)},templateOptions:function(){return this.options},applyTemplate:function(){return this.$el.html(CodeSync.template(this.panelTemplate,this.templateOptions()))},render:function(){return this.rendered===!0?this:(typeof this.beforeRender=="function"?this.beforeRender():void 0)===!1?this:(this.$el.addClass("editor-utility"),this.applyTemplate(),$(this.renderTo()).append(this.el),typeof this.afterRender=="function"&&this.afterRender(),this.rendered=!0,this.checkAvailabilityInMode(),this)}}),e=CodeSync.EditorUtility.extend,CodeSync.EditorUtility.setup=function(e,t){var n,r;return t==null&&(t={}),n=t.PluginClass,t.editor=e,r=new n(t),r.handle&&(e.views[r.handle]=r),r.renderTo=function(){return e.$(".codemirror-wrapper")},e.on("codemirror:setup",function(e){return e.on("focus",function(){return r.hide()})})}}.call(this),function(){CodeSync.plugins.ColorPicker=Backbone.View.extend({className:"codesync-color-picker",widget:!1,spectrumOptions:{showAlpha:!1,preferredFormat:"hex6",flat:!0,showInput:!0,chooseText:"Choose"},initialize:function(e){return this.options=e!=null?e:{},_.extend(this,this.options),this.$el.append("<input type='color' class='color-picker-widget' />"),this.widget=this.$(".color-picker-widget")},remove:function(){return this.widget.spectrum("destroy"),this.$el.remove()},hide:function(){return this.widget.spectrum("hide"),this.$el.hide(),this.off("color:change")},show:function(){return this.widget.spectrum("show"),this.widget||this.$el.addClass("anchored"),this.$el.show()},syncWithToken:function(e,t){var n,r,i,s,o=this;return n=this.editor.codeMirror,this.widget===!0&&(this.$el.removeClass("anchored"),n.addWidget(t,this.el)),this.show(),i=n.getLine(t.line),s=e.start,r=e.end,this.widget.spectrum("set",e.string),this.on("color:change",_.debounce(function(e,i){return n.replaceRange("#"+i,{line:t.line,ch:s},{line:t.line,ch:r})},1200))},render:function(){var e,t=this;return e=_.extend(this.spectrumOptions,{move:_.debounce(function(e){return t.trigger("color:change",e,e.toHex())},200)}),this.widget.spectrum(this.spectrumOptions),this}}),CodeSync.plugins.ColorPicker.setup=function(e,t){return t==null&&(t={}),this.colorPicker=new CodeSync.plugins.ColorPicker({editor:e}),this.$el.append(e.colorPicker.render().el),this.colorPicker.hide(),e.on("codemirror:setup",function(){var t;return t=e.codeMirror,t.on("cursorActivity",function(){var n,r,i,s;return n=t.getCursor(),r=t.getTokenAt(n),((i=r.string)!=null?i.match(/#[a-fA-F0-9]{3,6}/g):void 0)&&((s=r.string)!=null?s.length:void 0)>=6?e.colorPicker.syncWithToken(r,n):e.colorPicker.hide()})})}}.call(this),function(){CodeSync.plugins.Draggable={setup:function(e){return e.draggableElement||(e.draggableElement=e.$el),e.draggableElement.draggable({handle:".drag-handle"})}}}.call(this),function(){}.call(this),function(){CodeSync.template=function(e,t){var n,r,i,s;t==null&&(t={});if(s=JST[e])return s(t);n=new RegExp(""+e+"$");for(i in JST){r=JST[i];if(i.match(n))return r(t)}}}.call(this),function(){var evalRunner,_this=this;evalRunner=function(code,onError){try{return eval(code)}catch(e){throw typeof onError=="function"&&onError(e.message),e}},CodeSync.detectGlobalChangeTriggers=function(e,t){return t==null&&(t={}),!0},CodeSync.onScriptChange=CodeSync.onTemplateChange=CodeSync.onStyleChange=function(){return!0},CodeSync.processChangeNotification=function(e,t){var n,r,i,s,o;e==null&&(e={}),t==null&&(t={}),s=e.type,n=e.compiled,r=e.content;if((typeof CodeSync.beforeChange=="function"?CodeSync.beforeChange(e,t):void 0)===!1)return;e.template===!0&&(s||(s="template"));if(s==null){if((o=e.logical_name)!=null?o.match(".css"):void 0)s="stylesheet";e.logical_name.match(".js")&&(s="script")}CodeSync.detectGlobalChangeTriggers(s,e);switch(s){case"stylesheet":$("head style[data-codesync-document='"+t.origin+"']").remove(),$("head").append("<style type='text/css' data-codesync-document='"+t.origin+"'>"+n+"</style>"),i=CodeSync.onStyleChange;break;case"template":evalRunner(n,e.error),i=CodeSync.onTemplateChange;break;case"script":evalRunner(n,e.error),i=CodeSync.onScriptChange}return _.delay(function(){return typeof i=="function"&&i(e,t),typeof e.complete=="function"&&e.complete(e,t),typeof e.success=="function"?e.success(e,t):void 0},150)}}.call(this),function(){}.call(this); \ No newline at end of file diff --git a/vendor/assets/javascripts/code_sync_reloader.min.js b/vendor/assets/javascripts/code_sync_reloader.min.js new file mode 100644 index 0000000..2623d29 --- /dev/null +++ b/vendor/assets/javascripts/code_sync_reloader.min.js @@ -0,0 +1 @@ +(function(){var e,t,n,r=[].slice;t=this,t.CodeSync=e=function(){return e.Client.get()},e.VERSION="0.6.8",e.backends={},e.util={},e.plugins={},e._config||(e._config={defaultFileType:"coffeescript",assetCompilationEndpoint:"http://localhost:9295/source",serverInfoEndpoint:"http://localhost:9295/info",sprocketsEndpoint:"http://localhost:9295/assets",socketEndpoint:"http://localhost:9295/faye",editorToggleHotkey:"ctrl+j",debugMode:!1,defaultKeyBindings:"default"}),e.set=function(t,n){return e._config[t]=n},e.get=function(t){return e._config[t]},e.enableLogging=function(){return e.set("debugMode",!0)},e.log=function(){var t;t=1<=arguments.length?r.call(arguments,0):[];if(e.get("debugMode")!==!1)return t.unshift("CodeSync Log:"),console.log.apply(console,t)},n=CodeMirror.prototype.setOption,e.set("defaultKeyBindings","vim")}).call(this),function(){var e;CodeSync.Client=function(){function t(t){var n=this;t==null&&(t={}),this.logLevel=t.logLevel||0,CodeSync.Client._clients.push(this),this.enablePush===!0&&(this.channel=t.channel||e(),this.providerLib=""+CodeSync.get("socketEndpoint")+"/client.js",CodeSync.util.loadScript(this.providerLib,function(){if(n.clientLoaded===!0||!n.providerAvailable())return;return setTimeout(function(){try{return n.setupSocket()}catch(e){return console.log("Error setting up codesync client: "+e.message)}},25),n.clientLoaded=!0})),this.getSprocketsInfo()}return t._clients=[],t.get=function(){return CodeSync.Client._clients[0]},t.prototype.VERSION=CodeSync.VERSION,t.prototype.logLevel=0,t.prototype.enablePush=!0,t.prototype.getSprocketsInfo=function(){var e=this;return $.ajax({type:"GET",url:CodeSync.get("serverInfoEndpoint"),success:function(t){t==null&&(t={}),CodeSync.set("latestServerInfo",t),t.root&&CodeSync.set("projectRoot",t.root);if(t.project_assets!=null&&CodeSync.ProjectAssets!=null)return e.projectAssets=new CodeSync.ProjectAssets(t.project_assets)}})},t.prototype.buildStylesheetMap=function(){var e,t,n,r,i,s;this.stylesheetMap={},i=$('link[rel="stylesheet"]'),s=[];for(n=0,r=i.length;n<r;n++)t=i[n],(e=$(t).attr("href"))?s.push(this.stylesheetMap[e]=t):s.push(void 0);return s},t.prototype.buildScriptMap=function(){var e,t,n,r,i;this.scriptMap={},i=$('script[type="text/javascript"]');for(n=0,r=i.length;n<r;n++){e=i[n];if(t=$(e).attr("src"))this.scriptMap[t]=e}return this.scriptMap},t.prototype.providerAvailable=function(){return typeof Faye!="undefined"&&Faye!==null},t.prototype.subscribeWith=function(e){var t;return(t=this.socket)!=null?t.subscribe(this.channel,e):void 0},t.prototype.setupSocket=function(){var e=this;if(this.socket=typeof Faye!="undefined"&&Faye!==null?new Faye.Client(CodeSync.get("socketEndpoint")):void 0)return this.subscribeWith(function(){return e.defaultNotificationHandler.apply(e,arguments)})},t.prototype.notificationHandlerOptions={},t.prototype.defaultNotificationHandler=function(e){var t,n,r;return(t=(r=this.projectAssets)!=null?r.findDocumentByPath(e.path):void 0)&&e.contents&&(t.set("contents",e.contents,{silent:!1}),t.trigger("contents:synced")),n=this.notificationHandlerOptions,n.origin="watcher",CodeSync.processChangeNotification(e,n)},t}(),e=function(e){var t,n,r,i,s,o,u;r=window.location.search.substring(1),i=r.split("&");for(s=0,o=i.length;s<o;s++)t=i[s],t.match(/code_sync_channel/)&&e==null&&(u=t.split("="),n=u[0],e=u[1]);return e?decodeURIComponent("/code-sync/"+e):"/code-sync/outbound"}}.call(this),function(){CodeSync.util||(CodeSync.util={}),window.CodeSyncloadedScripts={},window.CodeSyncscriptTimers={},CodeSync.util.loadStylesheet=function(e,t,n){var r;return t==null&&(t={}),n||(n=t.complete||t.callback),typeof t=="function"&&n==null&&(n=t,t={}),r=document.createElement("link"),r.type="text/css",r.rel="stylesheet",r.href=e,r.className="code-sync-asset",t.tracker&&($("link[data-tracker='"+t.tracker+"']").remove(),r.setAttribute("data-tracker",t.tracker)),document.getElementsByTagName("head")[0].appendChild(r),n!=null?typeof n.call=="function"?n.call(this,e,t):void 0:void 0},CodeSync.util.loadScript=function(e,t,n){var r,i,s,o,u,a;t==null&&(t={}),i=window.CodeSyncloadedScripts,a=window.CodeSyncscriptTimers,n||(n=t.complete||t.callback),typeof t=="function"&&n==null&&(n=t,t={}),r=document.getElementsByTagName("head")[0],o=document.createElement("script"),o.src=e,o.type="text/javascript",u=this,s=function(){typeof n=="function"&&n.call(u,e,t,o);try{r.removeChild(o)}catch(s){!0}return i[e]=!0};if(t.once===!0&&i[e])return!1;r.appendChild(o),o.onreadystatechange=function(){if(o.readyState==="loaded"||o.readyState==="complete")return s()},o.onload=s;if(typeof navigator!="undefined"&&navigator!==null?navigator.userAgent.match(/WebKit/):void 0)return a[e]=setInterval(function(){return s(),clearInterval(a[e])},10)},CodeSync.util.inspectElementsWithin=function(e){var t,n,r,i,s,o,u,a;return e==null&&(e={}),u=e.root,i=e.el,o=e.fn,u||(u=window),n=function(e){var t;return t=$(e.target),t.css({"background-color":"#9FC4E7",opacity:.5}),t.children().each(function(e,t){return $(t).css({"background-color":"#C2DDB6",opacity:.5})})},a=function(e){var t;return t=$(e.target),t.attr("style",""),t.children().each(function(e,t){return $(t).attr("style","")})},r=function(){return u.$("*").off(".inspekt"),i},e.disable?r():(t=_.debounce(function(e){return a(e),u.$(i).trigger("inspekt",e,u.$(e.target)),r()},150),s=u.$(i).find("*"),s.off(".inspekt"),s.on("mouseover.inspekt",n).on("mouseout.inspekt",a).on("click.inspekt",function(e){return t(e),s.off(".inspekt")}),u.$(i))}}.call(this),function(){var evalRunner,_this=this;evalRunner=function(code,onError){try{return eval(code)}catch(e){throw typeof onError=="function"&&onError(e.message),e}},CodeSync.detectGlobalChangeTriggers=function(e,t){return t==null&&(t={}),!0},CodeSync.onScriptChange=CodeSync.onTemplateChange=CodeSync.onStyleChange=function(){return!0},CodeSync.processChangeNotification=function(e,t){var n,r,i,s,o;e==null&&(e={}),t==null&&(t={}),s=e.type,n=e.compiled,r=e.content;if((typeof CodeSync.beforeChange=="function"?CodeSync.beforeChange(e,t):void 0)===!1)return;e.template===!0&&(s||(s="template"));if(s==null){if((o=e.logical_name)!=null?o.match(".css"):void 0)s="stylesheet";e.logical_name.match(".js")&&(s="script")}CodeSync.detectGlobalChangeTriggers(s,e);switch(s){case"stylesheet":$("head style[data-codesync-document='"+t.origin+"']").remove(),$("head").append("<style type='text/css' data-codesync-document='"+t.origin+"'>"+n+"</style>"),i=CodeSync.onStyleChange;break;case"template":evalRunner(n,e.error),i=CodeSync.onTemplateChange;break;case"script":evalRunner(n,e.error),i=CodeSync.onScriptChange}return _.delay(function(){return typeof i=="function"&&i(e,t),typeof e.complete=="function"&&e.complete(e,t),typeof e.success=="function"?e.success(e,t):void 0},150)}}.call(this),function(){if(typeof _=="undefined"||_===null)throw"CodeSync depends on the underscore library at this time"}.call(this); \ No newline at end of file diff --git a/vendor/assets/stylesheets/code_sync.css b/vendor/assets/stylesheets/code_sync.css index 9296bfb..1aa1e88 100644 --- a/vendor/assets/stylesheets/code_sync.css +++ b/vendor/assets/stylesheets/code_sync.css @@ -1 +1 @@ -@charset "UTF-8";body{-webkit-backface-visibility:hidden}.animated{-webkit-animation-duration:1s;-moz-animation-duration:1s;-o-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.animated.hinge{-webkit-animation-duration:2s;-moz-animation-duration:2s;-o-animation-duration:2s;animation-duration:2s}@-webkit-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-moz-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-o-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;-moz-animation-name:flash;-o-animation-name:flash;animation-name:flash}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px)}}@-moz-keyframes shake{0%,100%{-moz-transform:translateX(0)}10%,30%,50%,70%,90%{-moz-transform:translateX(-10px)}20%,40%,60%,80%{-moz-transform:translateX(10px)}}@-o-keyframes shake{0%,100%{-o-transform:translateX(0)}10%,30%,50%,70%,90%{-o-transform:translateX(-10px)}20%,40%,60%,80%{-o-transform:translateX(10px)}}@keyframes shake{0%,100%{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-10px)}20%,40%,60%,80%{transform:translateX(10px)}}.shake{-webkit-animation-name:shake;-moz-animation-name:shake;-o-animation-name:shake;animation-name:shake}@-webkit-keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0)}40%{-webkit-transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px)}}@-moz-keyframes bounce{0%,20%,50%,80%,100%{-moz-transform:translateY(0)}40%{-moz-transform:translateY(-30px)}60%{-moz-transform:translateY(-15px)}}@-o-keyframes bounce{0%,20%,50%,80%,100%{-o-transform:translateY(0)}40%{-o-transform:translateY(-30px)}60%{-o-transform:translateY(-15px)}}@keyframes bounce{0%,20%,50%,80%,100%{transform:translateY(0)}40%{transform:translateY(-30px)}60%{transform:translateY(-15px)}}.bounce{-webkit-animation-name:bounce;-moz-animation-name:bounce;-o-animation-name:bounce;animation-name:bounce}@-webkit-keyframes tada{0%{-webkit-transform:scale(1)}10%,20%{-webkit-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0)}}@-moz-keyframes tada{0%{-moz-transform:scale(1)}10%,20%{-moz-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-moz-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-moz-transform:scale(1.1) rotate(-3deg)}100%{-moz-transform:scale(1) rotate(0)}}@-o-keyframes tada{0%{-o-transform:scale(1)}10%,20%{-o-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-o-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-o-transform:scale(1.1) rotate(-3deg)}100%{-o-transform:scale(1) rotate(0)}}@keyframes tada{0%{transform:scale(1)}10%,20%{transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{transform:scale(1.1) rotate(3deg)}40%,60%,80%{transform:scale(1.1) rotate(-3deg)}100%{transform:scale(1) rotate(0)}}.tada{-webkit-animation-name:tada;-moz-animation-name:tada;-o-animation-name:tada;animation-name:tada}@-webkit-keyframes swing{20%,40%,60%,80%,100%{-webkit-transform-origin:top center}20%{-webkit-transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg)}100%{-webkit-transform:rotate(0deg)}}@-moz-keyframes swing{20%{-moz-transform:rotate(15deg)}40%{-moz-transform:rotate(-10deg)}60%{-moz-transform:rotate(5deg)}80%{-moz-transform:rotate(-5deg)}100%{-moz-transform:rotate(0deg)}}@-o-keyframes swing{20%{-o-transform:rotate(15deg)}40%{-o-transform:rotate(-10deg)}60%{-o-transform:rotate(5deg)}80%{-o-transform:rotate(-5deg)}100%{-o-transform:rotate(0deg)}}@keyframes swing{20%{transform:rotate(15deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(5deg)}80%{transform:rotate(-5deg)}100%{transform:rotate(0deg)}}.swing{-webkit-transform-origin:top center;-moz-transform-origin:top center;-o-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;-moz-animation-name:swing;-o-animation-name:swing;animation-name:swing}@-webkit-keyframes wobble{0%{-webkit-transform:translateX(0%)}15%{-webkit-transform:translateX(-25%) rotate(-5deg)}30%{-webkit-transform:translateX(20%) rotate(3deg)}45%{-webkit-transform:translateX(-15%) rotate(-3deg)}60%{-webkit-transform:translateX(10%) rotate(2deg)}75%{-webkit-transform:translateX(-5%) rotate(-1deg)}100%{-webkit-transform:translateX(0%)}}@-moz-keyframes wobble{0%{-moz-transform:translateX(0%)}15%{-moz-transform:translateX(-25%) rotate(-5deg)}30%{-moz-transform:translateX(20%) rotate(3deg)}45%{-moz-transform:translateX(-15%) rotate(-3deg)}60%{-moz-transform:translateX(10%) rotate(2deg)}75%{-moz-transform:translateX(-5%) rotate(-1deg)}100%{-moz-transform:translateX(0%)}}@-o-keyframes wobble{0%{-o-transform:translateX(0%)}15%{-o-transform:translateX(-25%) rotate(-5deg)}30%{-o-transform:translateX(20%) rotate(3deg)}45%{-o-transform:translateX(-15%) rotate(-3deg)}60%{-o-transform:translateX(10%) rotate(2deg)}75%{-o-transform:translateX(-5%) rotate(-1deg)}100%{-o-transform:translateX(0%)}}@keyframes wobble{0%{transform:translateX(0%)}15%{transform:translateX(-25%) rotate(-5deg)}30%{transform:translateX(20%) rotate(3deg)}45%{transform:translateX(-15%) rotate(-3deg)}60%{transform:translateX(10%) rotate(2deg)}75%{transform:translateX(-5%) rotate(-1deg)}100%{transform:translateX(0%)}}.wobble{-webkit-animation-name:wobble;-moz-animation-name:wobble;-o-animation-name:wobble;animation-name:wobble}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1)}50%{-webkit-transform:scale(1.1)}100%{-webkit-transform:scale(1)}}@-moz-keyframes pulse{0%{-moz-transform:scale(1)}50%{-moz-transform:scale(1.1)}100%{-moz-transform:scale(1)}}@-o-keyframes pulse{0%{-o-transform:scale(1)}50%{-o-transform:scale(1.1)}100%{-o-transform:scale(1)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}.pulse{-webkit-animation-name:pulse;-moz-animation-name:pulse;-o-animation-name:pulse;animation-name:pulse}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) rotateY(0);-webkit-animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(170deg);-webkit-animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-webkit-animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) rotateY(360deg) scale(.95);-webkit-animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px) scale(1);-webkit-animation-timing-function:ease-in}}@-moz-keyframes flip{0%{-moz-transform:perspective(400px) rotateY(0);-moz-animation-timing-function:ease-out}40%{-moz-transform:perspective(400px) translateZ(150px) rotateY(170deg);-moz-animation-timing-function:ease-out}50%{-moz-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-moz-animation-timing-function:ease-in}80%{-moz-transform:perspective(400px) rotateY(360deg) scale(.95);-moz-animation-timing-function:ease-in}100%{-moz-transform:perspective(400px) scale(1);-moz-animation-timing-function:ease-in}}@-o-keyframes flip{0%{-o-transform:perspective(400px) rotateY(0);-o-animation-timing-function:ease-out}40%{-o-transform:perspective(400px) translateZ(150px) rotateY(170deg);-o-animation-timing-function:ease-out}50%{-o-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-o-animation-timing-function:ease-in}80%{-o-transform:perspective(400px) rotateY(360deg) scale(.95);-o-animation-timing-function:ease-in}100%{-o-transform:perspective(400px) scale(1);-o-animation-timing-function:ease-in}}@keyframes flip{0%{transform:perspective(400px) rotateY(0);animation-timing-function:ease-out}40%{transform:perspective(400px) translateZ(150px) rotateY(170deg);animation-timing-function:ease-out}50%{transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);animation-timing-function:ease-in}80%{transform:perspective(400px) rotateY(360deg) scale(.95);animation-timing-function:ease-in}100%{transform:perspective(400px) scale(1);animation-timing-function:ease-in}}.flip{-webkit-backface-visibility:visible!important;-webkit-animation-name:flip;-moz-backface-visibility:visible!important;-moz-animation-name:flip;-o-backface-visibility:visible!important;-o-animation-name:flip;backface-visibility:visible!important;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-10deg)}70%{-webkit-transform:perspective(400px) rotateX(10deg)}100%{-webkit-transform:perspective(400px) rotateX(0deg);opacity:1}}@-moz-keyframes flipInX{0%{-moz-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-moz-transform:perspective(400px) rotateX(-10deg)}70%{-moz-transform:perspective(400px) rotateX(10deg)}100%{-moz-transform:perspective(400px) rotateX(0deg);opacity:1}}@-o-keyframes flipInX{0%{-o-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-o-transform:perspective(400px) rotateX(-10deg)}70%{-o-transform:perspective(400px) rotateX(10deg)}100%{-o-transform:perspective(400px) rotateX(0deg);opacity:1}}@keyframes flipInX{0%{transform:perspective(400px) rotateX(90deg);opacity:0}40%{transform:perspective(400px) rotateX(-10deg)}70%{transform:perspective(400px) rotateX(10deg)}100%{transform:perspective(400px) rotateX(0deg);opacity:1}}.flipInX{-webkit-backface-visibility:visible!important;-webkit-animation-name:flipInX;-moz-backface-visibility:visible!important;-moz-animation-name:flipInX;-o-backface-visibility:visible!important;-o-animation-name:flipInX;backface-visibility:visible!important;animation-name:flipInX}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px) rotateX(0deg);opacity:1}100%{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0}}@-moz-keyframes flipOutX{0%{-moz-transform:perspective(400px) rotateX(0deg);opacity:1}100%{-moz-transform:perspective(400px) rotateX(90deg);opacity:0}}@-o-keyframes flipOutX{0%{-o-transform:perspective(400px) rotateX(0deg);opacity:1}100%{-o-transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{transform:perspective(400px) rotateX(0deg);opacity:1}100%{transform:perspective(400px) rotateX(90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;-webkit-backface-visibility:visible!important;-moz-animation-name:flipOutX;-moz-backface-visibility:visible!important;-o-animation-name:flipOutX;-o-backface-visibility:visible!important;animation-name:flipOutX;backface-visibility:visible!important}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-10deg)}70%{-webkit-transform:perspective(400px) rotateY(10deg)}100%{-webkit-transform:perspective(400px) rotateY(0deg);opacity:1}}@-moz-keyframes flipInY{0%{-moz-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-moz-transform:perspective(400px) rotateY(-10deg)}70%{-moz-transform:perspective(400px) rotateY(10deg)}100%{-moz-transform:perspective(400px) rotateY(0deg);opacity:1}}@-o-keyframes flipInY{0%{-o-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-o-transform:perspective(400px) rotateY(-10deg)}70%{-o-transform:perspective(400px) rotateY(10deg)}100%{-o-transform:perspective(400px) rotateY(0deg);opacity:1}}@keyframes flipInY{0%{transform:perspective(400px) rotateY(90deg);opacity:0}40%{transform:perspective(400px) rotateY(-10deg)}70%{transform:perspective(400px) rotateY(10deg)}100%{transform:perspective(400px) rotateY(0deg);opacity:1}}.flipInY{-webkit-backface-visibility:visible!important;-webkit-animation-name:flipInY;-moz-backface-visibility:visible!important;-moz-animation-name:flipInY;-o-backface-visibility:visible!important;-o-animation-name:flipInY;backface-visibility:visible!important;animation-name:flipInY}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px) rotateY(0deg);opacity:1}100%{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0}}@-moz-keyframes flipOutY{0%{-moz-transform:perspective(400px) rotateY(0deg);opacity:1}100%{-moz-transform:perspective(400px) rotateY(90deg);opacity:0}}@-o-keyframes flipOutY{0%{-o-transform:perspective(400px) rotateY(0deg);opacity:1}100%{-o-transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{transform:perspective(400px) rotateY(0deg);opacity:1}100%{transform:perspective(400px) rotateY(90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;-webkit-animation-name:flipOutY;-moz-backface-visibility:visible!important;-moz-animation-name:flipOutY;-o-backface-visibility:visible!important;-o-animation-name:flipOutY;backface-visibility:visible!important;animation-name:flipOutY}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;-moz-animation-name:fadeIn;-o-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(20px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInUp{0%{opacity:0;-moz-transform:translateY(20px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInUp{0%{opacity:0;-o-transform:translateY(20px)}100%{opacity:1;-o-transform:translateY(0)}}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:translateY(0)}}.fadeInUp{-webkit-animation-name:fadeInUp;-moz-animation-name:fadeInUp;-o-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-20px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInDown{0%{opacity:0;-moz-transform:translateY(-20px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInDown{0%{opacity:0;-o-transform:translateY(-20px)}100%{opacity:1;-o-transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)}100%{opacity:1;transform:translateY(0)}}.fadeInDown{-webkit-animation-name:fadeInDown;-moz-animation-name:fadeInDown;-o-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInLeft{0%{opacity:0;-moz-transform:translateX(-20px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInLeft{0%{opacity:0;-o-transform:translateX(-20px)}100%{opacity:1;-o-transform:translateX(0)}}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-20px)}100%{opacity:1;transform:translateX(0)}}.fadeInLeft{-webkit-animation-name:fadeInLeft;-moz-animation-name:fadeInLeft;-o-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInRight{0%{opacity:0;-moz-transform:translateX(20px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInRight{0%{opacity:0;-o-transform:translateX(20px)}100%{opacity:1;-o-transform:translateX(0)}}@keyframes fadeInRight{0%{opacity:0;transform:translateX(20px)}100%{opacity:1;transform:translateX(0)}}.fadeInRight{-webkit-animation-name:fadeInRight;-moz-animation-name:fadeInRight;-o-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInUpBig{0%{opacity:0;-moz-transform:translateY(2000px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInUpBig{0%{opacity:0;-o-transform:translateY(2000px)}100%{opacity:1;-o-transform:translateY(0)}}@keyframes fadeInUpBig{0%{opacity:0;transform:translateY(2000px)}100%{opacity:1;transform:translateY(0)}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;-moz-animation-name:fadeInUpBig;-o-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translateY(-2000px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInDownBig{0%{opacity:0;-moz-transform:translateY(-2000px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInDownBig{0%{opacity:0;-o-transform:translateY(-2000px)}100%{opacity:1;-o-transform:translateY(0)}}@keyframes fadeInDownBig{0%{opacity:0;transform:translateY(-2000px)}100%{opacity:1;transform:translateY(0)}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;-moz-animation-name:fadeInDownBig;-o-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translateX(-2000px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInLeftBig{0%{opacity:0;-moz-transform:translateX(-2000px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInLeftBig{0%{opacity:0;-o-transform:translateX(-2000px)}100%{opacity:1;-o-transform:translateX(0)}}@keyframes fadeInLeftBig{0%{opacity:0;transform:translateX(-2000px)}100%{opacity:1;transform:translateX(0)}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;-moz-animation-name:fadeInLeftBig;-o-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translateX(2000px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInRightBig{0%{opacity:0;-moz-transform:translateX(2000px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInRightBig{0%{opacity:0;-o-transform:translateX(2000px)}100%{opacity:1;-o-transform:translateX(0)}}@keyframes fadeInRightBig{0%{opacity:0;transform:translateX(2000px)}100%{opacity:1;transform:translateX(0)}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;-moz-animation-name:fadeInRightBig;-o-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-moz-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-o-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;-moz-animation-name:fadeOut;-o-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-20px)}}@-moz-keyframes fadeOutUp{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(-20px)}}@-o-keyframes fadeOutUp{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(-20px)}}@keyframes fadeOutUp{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-20px)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;-moz-animation-name:fadeOutUp;-o-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(20px)}}@-moz-keyframes fadeOutDown{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(20px)}}@-o-keyframes fadeOutDown{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(20px)}}@keyframes fadeOutDown{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(20px)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;-moz-animation-name:fadeOutDown;-o-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-20px)}}@-moz-keyframes fadeOutLeft{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(-20px)}}@-o-keyframes fadeOutLeft{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(-20px)}}@keyframes fadeOutLeft{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-20px)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;-moz-animation-name:fadeOutLeft;-o-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(20px)}}@-moz-keyframes fadeOutRight{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(20px)}}@-o-keyframes fadeOutRight{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(20px)}}@keyframes fadeOutRight{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(20px)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;-moz-animation-name:fadeOutRight;-o-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutUpBig{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px)}}@-moz-keyframes fadeOutUpBig{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(-2000px)}}@-o-keyframes fadeOutUpBig{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(-2000px)}}@keyframes fadeOutUpBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-2000px)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;-moz-animation-name:fadeOutUpBig;-o-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes fadeOutDownBig{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(2000px)}}@-moz-keyframes fadeOutDownBig{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(2000px)}}@-o-keyframes fadeOutDownBig{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(2000px)}}@keyframes fadeOutDownBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(2000px)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;-moz-animation-name:fadeOutDownBig;-o-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px)}}@-moz-keyframes fadeOutLeftBig{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(-2000px)}}@-o-keyframes fadeOutLeftBig{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(-2000px)}}@keyframes fadeOutLeftBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-2000px)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;-moz-animation-name:fadeOutLeftBig;-o-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRightBig{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px)}}@-moz-keyframes fadeOutRightBig{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(2000px)}}@-o-keyframes fadeOutRightBig{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(2000px)}}@keyframes fadeOutRightBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(2000px)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;-moz-animation-name:fadeOutRightBig;-o-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(.3)}50%{opacity:1;-webkit-transform:scale(1.05)}70%{-webkit-transform:scale(.9)}100%{-webkit-transform:scale(1)}}@-moz-keyframes bounceIn{0%{opacity:0;-moz-transform:scale(.3)}50%{opacity:1;-moz-transform:scale(1.05)}70%{-moz-transform:scale(.9)}100%{-moz-transform:scale(1)}}@-o-keyframes bounceIn{0%{opacity:0;-o-transform:scale(.3)}50%{opacity:1;-o-transform:scale(1.05)}70%{-o-transform:scale(.9)}100%{-o-transform:scale(1)}}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.bounceIn{-webkit-animation-name:bounceIn;-moz-animation-name:bounceIn;-o-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInUp{0%{opacity:0;-webkit-transform:translateY(2000px)}60%{opacity:1;-webkit-transform:translateY(-30px)}80%{-webkit-transform:translateY(10px)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes bounceInUp{0%{opacity:0;-moz-transform:translateY(2000px)}60%{opacity:1;-moz-transform:translateY(-30px)}80%{-moz-transform:translateY(10px)}100%{-moz-transform:translateY(0)}}@-o-keyframes bounceInUp{0%{opacity:0;-o-transform:translateY(2000px)}60%{opacity:1;-o-transform:translateY(-30px)}80%{-o-transform:translateY(10px)}100%{-o-transform:translateY(0)}}@keyframes bounceInUp{0%{opacity:0;transform:translateY(2000px)}60%{opacity:1;transform:translateY(-30px)}80%{transform:translateY(10px)}100%{transform:translateY(0)}}.bounceInUp{-webkit-animation-name:bounceInUp;-moz-animation-name:bounceInUp;-o-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceInDown{0%{opacity:0;-webkit-transform:translateY(-2000px)}60%{opacity:1;-webkit-transform:translateY(30px)}80%{-webkit-transform:translateY(-10px)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes bounceInDown{0%{opacity:0;-moz-transform:translateY(-2000px)}60%{opacity:1;-moz-transform:translateY(30px)}80%{-moz-transform:translateY(-10px)}100%{-moz-transform:translateY(0)}}@-o-keyframes bounceInDown{0%{opacity:0;-o-transform:translateY(-2000px)}60%{opacity:1;-o-transform:translateY(30px)}80%{-o-transform:translateY(-10px)}100%{-o-transform:translateY(0)}}@keyframes bounceInDown{0%{opacity:0;transform:translateY(-2000px)}60%{opacity:1;transform:translateY(30px)}80%{transform:translateY(-10px)}100%{transform:translateY(0)}}.bounceInDown{-webkit-animation-name:bounceInDown;-moz-animation-name:bounceInDown;-o-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px)}60%{opacity:1;-webkit-transform:translateX(30px)}80%{-webkit-transform:translateX(-10px)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes bounceInLeft{0%{opacity:0;-moz-transform:translateX(-2000px)}60%{opacity:1;-moz-transform:translateX(30px)}80%{-moz-transform:translateX(-10px)}100%{-moz-transform:translateX(0)}}@-o-keyframes bounceInLeft{0%{opacity:0;-o-transform:translateX(-2000px)}60%{opacity:1;-o-transform:translateX(30px)}80%{-o-transform:translateX(-10px)}100%{-o-transform:translateX(0)}}@keyframes bounceInLeft{0%{opacity:0;transform:translateX(-2000px)}60%{opacity:1;transform:translateX(30px)}80%{transform:translateX(-10px)}100%{transform:translateX(0)}}.bounceInLeft{-webkit-animation-name:bounceInLeft;-moz-animation-name:bounceInLeft;-o-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%{opacity:0;-webkit-transform:translateX(2000px)}60%{opacity:1;-webkit-transform:translateX(-30px)}80%{-webkit-transform:translateX(10px)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes bounceInRight{0%{opacity:0;-moz-transform:translateX(2000px)}60%{opacity:1;-moz-transform:translateX(-30px)}80%{-moz-transform:translateX(10px)}100%{-moz-transform:translateX(0)}}@-o-keyframes bounceInRight{0%{opacity:0;-o-transform:translateX(2000px)}60%{opacity:1;-o-transform:translateX(-30px)}80%{-o-transform:translateX(10px)}100%{-o-transform:translateX(0)}}@keyframes bounceInRight{0%{opacity:0;transform:translateX(2000px)}60%{opacity:1;transform:translateX(-30px)}80%{transform:translateX(10px)}100%{transform:translateX(0)}}.bounceInRight{-webkit-animation-name:bounceInRight;-moz-animation-name:bounceInRight;-o-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceOut{0%{-webkit-transform:scale(1)}25%{-webkit-transform:scale(.95)}50%{opacity:1;-webkit-transform:scale(1.1)}100%{opacity:0;-webkit-transform:scale(.3)}}@-moz-keyframes bounceOut{0%{-moz-transform:scale(1)}25%{-moz-transform:scale(.95)}50%{opacity:1;-moz-transform:scale(1.1)}100%{opacity:0;-moz-transform:scale(.3)}}@-o-keyframes bounceOut{0%{-o-transform:scale(1)}25%{-o-transform:scale(.95)}50%{opacity:1;-o-transform:scale(1.1)}100%{opacity:0;-o-transform:scale(.3)}}@keyframes bounceOut{0%{transform:scale(1)}25%{transform:scale(.95)}50%{opacity:1;transform:scale(1.1)}100%{opacity:0;transform:scale(.3)}}.bounceOut{-webkit-animation-name:bounceOut;-moz-animation-name:bounceOut;-o-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutUp{0%{-webkit-transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(20px)}100%{opacity:0;-webkit-transform:translateY(-2000px)}}@-moz-keyframes bounceOutUp{0%{-moz-transform:translateY(0)}20%{opacity:1;-moz-transform:translateY(20px)}100%{opacity:0;-moz-transform:translateY(-2000px)}}@-o-keyframes bounceOutUp{0%{-o-transform:translateY(0)}20%{opacity:1;-o-transform:translateY(20px)}100%{opacity:0;-o-transform:translateY(-2000px)}}@keyframes bounceOutUp{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(20px)}100%{opacity:0;transform:translateY(-2000px)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;-moz-animation-name:bounceOutUp;-o-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes bounceOutDown{0%{-webkit-transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(-20px)}100%{opacity:0;-webkit-transform:translateY(2000px)}}@-moz-keyframes bounceOutDown{0%{-moz-transform:translateY(0)}20%{opacity:1;-moz-transform:translateY(-20px)}100%{opacity:0;-moz-transform:translateY(2000px)}}@-o-keyframes bounceOutDown{0%{-o-transform:translateY(0)}20%{opacity:1;-o-transform:translateY(-20px)}100%{opacity:0;-o-transform:translateY(2000px)}}@keyframes bounceOutDown{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(-20px)}100%{opacity:0;transform:translateY(2000px)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;-moz-animation-name:bounceOutDown;-o-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{0%{-webkit-transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(20px)}100%{opacity:0;-webkit-transform:translateX(-2000px)}}@-moz-keyframes bounceOutLeft{0%{-moz-transform:translateX(0)}20%{opacity:1;-moz-transform:translateX(20px)}100%{opacity:0;-moz-transform:translateX(-2000px)}}@-o-keyframes bounceOutLeft{0%{-o-transform:translateX(0)}20%{opacity:1;-o-transform:translateX(20px)}100%{opacity:0;-o-transform:translateX(-2000px)}}@keyframes bounceOutLeft{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(20px)}100%{opacity:0;transform:translateX(-2000px)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;-moz-animation-name:bounceOutLeft;-o-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{0%{-webkit-transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(-20px)}100%{opacity:0;-webkit-transform:translateX(2000px)}}@-moz-keyframes bounceOutRight{0%{-moz-transform:translateX(0)}20%{opacity:1;-moz-transform:translateX(-20px)}100%{opacity:0;-moz-transform:translateX(2000px)}}@-o-keyframes bounceOutRight{0%{-o-transform:translateX(0)}20%{opacity:1;-o-transform:translateX(-20px)}100%{opacity:0;-o-transform:translateX(2000px)}}@keyframes bounceOutRight{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(-20px)}100%{opacity:0;transform:translateX(2000px)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;-moz-animation-name:bounceOutRight;-o-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes rotateIn{0%{-webkit-transform-origin:center center;-webkit-transform:rotate(-200deg);opacity:0}100%{-webkit-transform-origin:center center;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateIn{0%{-moz-transform-origin:center center;-moz-transform:rotate(-200deg);opacity:0}100%{-moz-transform-origin:center center;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateIn{0%{-o-transform-origin:center center;-o-transform:rotate(-200deg);opacity:0}100%{-o-transform-origin:center center;-o-transform:rotate(0);opacity:1}}@keyframes rotateIn{0%{transform-origin:center center;transform:rotate(-200deg);opacity:0}100%{transform-origin:center center;transform:rotate(0);opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;-moz-animation-name:rotateIn;-o-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInUpLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(90deg);opacity:0}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInUpLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(90deg);opacity:0}100%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}}@keyframes rotateInUpLeft{0%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;-moz-animation-name:rotateInUpLeft;-o-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInDownLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(-90deg);opacity:0}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInDownLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(-90deg);opacity:0}100%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}}@keyframes rotateInDownLeft{0%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;-moz-animation-name:rotateInDownLeft;-o-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInUpRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(-90deg);opacity:0}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInUpRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(-90deg);opacity:0}100%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}}@keyframes rotateInUpRight{0%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;-moz-animation-name:rotateInUpRight;-o-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInDownRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(90deg);opacity:0}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInDownRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(90deg);opacity:0}100%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}}@keyframes rotateInDownRight{0%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;-moz-animation-name:rotateInDownRight;-o-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateOut{0%{-webkit-transform-origin:center center;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:center center;-webkit-transform:rotate(200deg);opacity:0}}@-moz-keyframes rotateOut{0%{-moz-transform-origin:center center;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:center center;-moz-transform:rotate(200deg);opacity:0}}@-o-keyframes rotateOut{0%{-o-transform-origin:center center;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:center center;-o-transform:rotate(200deg);opacity:0}}@keyframes rotateOut{0%{transform-origin:center center;transform:rotate(0);opacity:1}100%{transform-origin:center center;transform:rotate(200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;-moz-animation-name:rotateOut;-o-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(-90deg);opacity:0}}@-moz-keyframes rotateOutUpLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(-90deg);opacity:0}}@-o-keyframes rotateOutUpLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:left bottom;-o-transform:rotate(-90deg);opacity:0}}@keyframes rotateOutUpLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;-moz-animation-name:rotateOutUpLeft;-o-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(90deg);opacity:0}}@-moz-keyframes rotateOutDownLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(90deg);opacity:0}}@-o-keyframes rotateOutDownLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:left bottom;-o-transform:rotate(90deg);opacity:0}}@keyframes rotateOutDownLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;-moz-animation-name:rotateOutDownLeft;-o-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(90deg);opacity:0}}@-moz-keyframes rotateOutUpRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(90deg);opacity:0}}@-o-keyframes rotateOutUpRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:right bottom;-o-transform:rotate(90deg);opacity:0}}@keyframes rotateOutUpRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;-moz-animation-name:rotateOutUpRight;-o-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(-90deg);opacity:0}}@-moz-keyframes rotateOutDownRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(-90deg);opacity:0}}@-o-keyframes rotateOutDownRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:right bottom;-o-transform:rotate(-90deg);opacity:0}}@keyframes rotateOutDownRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;-moz-animation-name:rotateOutDownRight;-o-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes hinge{0%{-webkit-transform:rotate(0);-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}40%{-webkit-transform:rotate(60deg);-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}80%{-webkit-transform:rotate(60deg) translateY(0);opacity:1;-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}100%{-webkit-transform:translateY(700px);opacity:0}}@-moz-keyframes hinge{0%{-moz-transform:rotate(0);-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}20%,60%{-moz-transform:rotate(80deg);-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}40%{-moz-transform:rotate(60deg);-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}80%{-moz-transform:rotate(60deg) translateY(0);opacity:1;-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}100%{-moz-transform:translateY(700px);opacity:0}}@-o-keyframes hinge{0%{-o-transform:rotate(0);-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}20%,60%{-o-transform:rotate(80deg);-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}40%{-o-transform:rotate(60deg);-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}80%{-o-transform:rotate(60deg) translateY(0);opacity:1;-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}100%{-o-transform:translateY(700px);opacity:0}}@keyframes hinge{0%{transform:rotate(0);transform-origin:top left;animation-timing-function:ease-in-out}20%,60%{transform:rotate(80deg);transform-origin:top left;animation-timing-function:ease-in-out}40%{transform:rotate(60deg);transform-origin:top left;animation-timing-function:ease-in-out}80%{transform:rotate(60deg) translateY(0);opacity:1;transform-origin:top left;animation-timing-function:ease-in-out}100%{transform:translateY(700px);opacity:0}}.hinge{-webkit-animation-name:hinge;-moz-animation-name:hinge;-o-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg)}}@-moz-keyframes rollIn{0%{opacity:0;-moz-transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-moz-transform:translateX(0px) rotate(0deg)}}@-o-keyframes rollIn{0%{opacity:0;-o-transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-o-transform:translateX(0px) rotate(0deg)}}@keyframes rollIn{0%{opacity:0;transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;transform:translateX(0px) rotate(0deg)}}.rollIn{-webkit-animation-name:rollIn;-moz-animation-name:rollIn;-o-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg)}100%{opacity:0;-webkit-transform:translateX(100%) rotate(120deg)}}@-moz-keyframes rollOut{0%{opacity:1;-moz-transform:translateX(0px) rotate(0deg)}100%{opacity:0;-moz-transform:translateX(100%) rotate(120deg)}}@-o-keyframes rollOut{0%{opacity:1;-o-transform:translateX(0px) rotate(0deg)}100%{opacity:0;-o-transform:translateX(100%) rotate(120deg)}}@keyframes rollOut{0%{opacity:1;transform:translateX(0px) rotate(0deg)}100%{opacity:0;transform:translateX(100%) rotate(120deg)}}.rollOut{-webkit-animation-name:rollOut;-moz-animation-name:rollOut;-o-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translateX(100%) skewX(-30deg);opacity:0}60%{-webkit-transform:translateX(-20%) skewX(30deg);opacity:1}80%{-webkit-transform:translateX(0%) skewX(-15deg);opacity:1}100%{-webkit-transform:translateX(0%) skewX(0deg);opacity:1}}@-moz-keyframes lightSpeedIn{0%{-moz-transform:translateX(100%) skewX(-30deg);opacity:0}60%{-moz-transform:translateX(-20%) skewX(30deg);opacity:1}80%{-moz-transform:translateX(0%) skewX(-15deg);opacity:1}100%{-moz-transform:translateX(0%) skewX(0deg);opacity:1}}@-o-keyframes lightSpeedIn{0%{-o-transform:translateX(100%) skewX(-30deg);opacity:0}60%{-o-transform:translateX(-20%) skewX(30deg);opacity:1}80%{-o-transform:translateX(0%) skewX(-15deg);opacity:1}100%{-o-transform:translateX(0%) skewX(0deg);opacity:1}}@keyframes lightSpeedIn{0%{transform:translateX(100%) skewX(-30deg);opacity:0}60%{transform:translateX(-20%) skewX(30deg);opacity:1}80%{transform:translateX(0%) skewX(-15deg);opacity:1}100%{transform:translateX(0%) skewX(0deg);opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;-moz-animation-name:lightSpeedIn;-o-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;-moz-animation-timing-function:ease-out;-o-animation-timing-function:ease-out;animation-timing-function:ease-out}.animated.lightSpeedIn{-webkit-animation-duration:.5s;-moz-animation-duration:.5s;-o-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes lightSpeedOut{0%{-webkit-transform:translateX(0%) skewX(0deg);opacity:1}100%{-webkit-transform:translateX(100%) skewX(-30deg);opacity:0}}@-moz-keyframes lightSpeedOut{0%{-moz-transform:translateX(0%) skewX(0deg);opacity:1}100%{-moz-transform:translateX(100%) skewX(-30deg);opacity:0}}@-o-keyframes lightSpeedOut{0%{-o-transform:translateX(0%) skewX(0deg);opacity:1}100%{-o-transform:translateX(100%) skewX(-30deg);opacity:0}}@keyframes lightSpeedOut{0%{transform:translateX(0%) skewX(0deg);opacity:1}100%{transform:translateX(100%) skewX(-30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;-moz-animation-name:lightSpeedOut;-o-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;-moz-animation-timing-function:ease-in;-o-animation-timing-function:ease-in;animation-timing-function:ease-in}.animated.lightSpeedOut{-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s}@-webkit-keyframes wiggle{0%{-webkit-transform:skewX(9deg)}10%{-webkit-transform:skewX(-8deg)}20%{-webkit-transform:skewX(7deg)}30%{-webkit-transform:skewX(-6deg)}40%{-webkit-transform:skewX(5deg)}50%{-webkit-transform:skewX(-4deg)}60%{-webkit-transform:skewX(3deg)}70%{-webkit-transform:skewX(-2deg)}80%{-webkit-transform:skewX(1deg)}90%{-webkit-transform:skewX(0deg)}100%{-webkit-transform:skewX(0deg)}}@-moz-keyframes wiggle{0%{-moz-transform:skewX(9deg)}10%{-moz-transform:skewX(-8deg)}20%{-moz-transform:skewX(7deg)}30%{-moz-transform:skewX(-6deg)}40%{-moz-transform:skewX(5deg)}50%{-moz-transform:skewX(-4deg)}60%{-moz-transform:skewX(3deg)}70%{-moz-transform:skewX(-2deg)}80%{-moz-transform:skewX(1deg)}90%{-moz-transform:skewX(0deg)}100%{-moz-transform:skewX(0deg)}}@-o-keyframes wiggle{0%{-o-transform:skewX(9deg)}10%{-o-transform:skewX(-8deg)}20%{-o-transform:skewX(7deg)}30%{-o-transform:skewX(-6deg)}40%{-o-transform:skewX(5deg)}50%{-o-transform:skewX(-4deg)}60%{-o-transform:skewX(3deg)}70%{-o-transform:skewX(-2deg)}80%{-o-transform:skewX(1deg)}90%{-o-transform:skewX(0deg)}100%{-o-transform:skewX(0deg)}}@keyframes wiggle{0%{transform:skewX(9deg)}10%{transform:skewX(-8deg)}20%{transform:skewX(7deg)}30%{transform:skewX(-6deg)}40%{transform:skewX(5deg)}50%{transform:skewX(-4deg)}60%{transform:skewX(3deg)}70%{transform:skewX(-2deg)}80%{transform:skewX(1deg)}90%{transform:skewX(0deg)}100%{transform:skewX(0deg)}}.wiggle{-webkit-animation-name:wiggle;-moz-animation-name:wiggle;-o-animation-name:wiggle;animation-name:wiggle;-webkit-animation-timing-function:ease-in;-moz-animation-timing-function:ease-in;-o-animation-timing-function:ease-in;animation-timing-function:ease-in}.animated.wiggle{-webkit-animation-duration:.75s;-moz-animation-duration:.75s;-o-animation-duration:.75s;animation-duration:.75s}.cm-s-ambiance .cm-keyword{color:#cda869}.cm-s-ambiance .cm-atom{color:#CF7EA9}.cm-s-ambiance .cm-number{color:#78CF8A}.cm-s-ambiance .cm-def{color:#aac6e3}.cm-s-ambiance .cm-variable{color:#ffb795}.cm-s-ambiance .cm-variable-2{color:#eed1b3}.cm-s-ambiance .cm-variable-3{color:#faded3}.cm-s-ambiance .cm-property{color:#eed1b3}.cm-s-ambiance .cm-operator{color:#fa8d6a}.cm-s-ambiance .cm-comment{color:#555;font-style:italic}.cm-s-ambiance .cm-string{color:#8f9d6a}.cm-s-ambiance .cm-string-2{color:#9d937c}.cm-s-ambiance .cm-meta{color:#D2A8A1}.cm-s-ambiance .cm-error{color:#AF2018}.cm-s-ambiance .cm-qualifier{color:yellow}.cm-s-ambiance .cm-builtin{color:#9999cc}.cm-s-ambiance .cm-bracket{color:#24C2C7}.cm-s-ambiance .cm-tag{color:#fee4ff}.cm-s-ambiance .cm-attribute{color:#9B859D}.cm-s-ambiance .cm-header{color:blue}.cm-s-ambiance .cm-quote{color:#24C2C7}.cm-s-ambiance .cm-hr{color:pink}.cm-s-ambiance .cm-link{color:#F4C20B}.cm-s-ambiance .cm-special{color:#FF9D00}.cm-s-ambiance .CodeMirror-matchingbracket{color:#0f0}.cm-s-ambiance .CodeMirror-nonmatchingbracket{color:#f22}.cm-s-ambiance .CodeMirror-selected{background:rgba(255,255,255,0.15)}.cm-s-ambiance .CodeMirror-focused .CodeMirror-selected{background:rgba(255,255,255,0.10)}.cm-s-ambiance.CodeMirror{line-height:1.40em;font-family:Monaco,Menlo,"Andale Mono","lucida console","Courier New",monospace !important;color:#E6E1DC;background-color:#202020;-webkit-box-shadow:inset 0 0 10px black;-moz-box-shadow:inset 0 0 10px black;box-shadow:inset 0 0 10px black}.cm-s-ambiance .CodeMirror-gutters{background:#3D3D3D;border-right:1px solid #4D4D4D;box-shadow:0 10px 20px black}.cm-s-ambiance .CodeMirror-linenumber{text-shadow:0 1px 1px #4d4d4d;color:#222;padding:0 5px}.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor{border-left:1px solid #7991E8}.cm-s-ambiance .activeline{background:none repeat scroll 0 0 rgba(255,255,255,0.031)}.cm-s-ambiance.CodeMirror,.cm-s-ambiance .CodeMirror-gutters{background-image:url("data:image/png;base64,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")}.cm-s-lesser-dark{line-height:1.3em}.cm-s-lesser-dark{font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono','Monaco',Courier,monospace !important}.cm-s-lesser-dark.CodeMirror{background:#262626;color:#EBEFE7;text-shadow:0 -1px 1px #262626}.cm-s-lesser-dark div.CodeMirror-selected{background:#45443B !important}.cm-s-lesser-dark .CodeMirror-cursor{border-left:1px solid white !important}.cm-s-lesser-dark pre{padding:0 8px}div.CodeMirror span.CodeMirror-matchingbracket{color:#7EFC7E}.cm-s-lesser-dark .CodeMirror-gutters{background:#262626;border-right:1px solid #aaa}.cm-s-lesser-dark .CodeMirror-linenumber{color:#777}.cm-s-lesser-dark span.cm-keyword{color:#599eff}.cm-s-lesser-dark span.cm-atom{color:#C2B470}.cm-s-lesser-dark span.cm-number{color:#B35E4D}.cm-s-lesser-dark span.cm-def{color:white}.cm-s-lesser-dark span.cm-variable{color:#D9BF8C}.cm-s-lesser-dark span.cm-variable-2{color:#669199}.cm-s-lesser-dark span.cm-variable-3{color:white}.cm-s-lesser-dark span.cm-property{color:#92A75C}.cm-s-lesser-dark span.cm-operator{color:#92A75C}.cm-s-lesser-dark span.cm-comment{color:#666}.cm-s-lesser-dark span.cm-string{color:#BCD279}.cm-s-lesser-dark span.cm-string-2{color:#f50}.cm-s-lesser-dark span.cm-meta{color:#738C73}.cm-s-lesser-dark span.cm-error{color:#9d1e15}.cm-s-lesser-dark span.cm-qualifier{color:#555}.cm-s-lesser-dark span.cm-builtin{color:#ff9e59}.cm-s-lesser-dark span.cm-bracket{color:#EBEFE7}.cm-s-lesser-dark span.cm-tag{color:#669199}.cm-s-lesser-dark span.cm-attribute{color:#30b4d9}.cm-s-lesser-dark span.cm-header{color:#a0a}.cm-s-lesser-dark span.cm-quote{color:#090}.cm-s-lesser-dark span.cm-hr{color:#999}.cm-s-lesser-dark span.cm-link{color:#30b4d9}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483E !important}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0 !important}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom{color:#ae81ff}.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-property,.cm-s-monokai span.cm-attribute{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#a6e22e}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-xq-light span.cm-keyword{line-height:1em;font-weight:700;color:#5A5CAD}.cm-s-xq-light span.cm-atom{color:#6C8CD5}.cm-s-xq-light span.cm-number{color:#164}.cm-s-xq-light span.cm-def{text-decoration:underline}.cm-s-xq-light span.cm-variable{color:black}.cm-s-xq-light span.cm-variable-2{color:black}.cm-s-xq-light span.cm-variable-3{color:black}.cm-s-xq-light span.cm-property{}.cm-s-xq-light span.cm-operator{}.cm-s-xq-light span.cm-comment{color:#0080FF;font-style:italic}.cm-s-xq-light span.cm-string{color:red}.cm-s-xq-light span.cm-meta{color:yellow}.cm-s-xq-light span.cm-error{color:#f00}.cm-s-xq-light span.cm-qualifier{color:grey}.cm-s-xq-light span.cm-builtin{color:#7EA656}.cm-s-xq-light span.cm-bracket{color:#cc7}.cm-s-xq-light span.cm-tag{color:#3F7F7F}.cm-s-xq-light span.cm-attribute{color:#7F007F}.cm-s-xq-light .CodeMirror-activeline-background{background:#e8f2ff !important}.cm-s-xq-light .CodeMirror-matchingbracket{border:1px solid grey;color:black !important;background:yellow}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"] + [class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;content:"";line-height:0}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0}.container-fluid:after{clear:both}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none !important}.visible-tablet{display:none !important}.hidden-desktop{display:none !important}.visible-desktop{display:inherit !important}@media (min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit !important}.visible-desktop{display:none !important}.visible-tablet{display:inherit !important}.hidden-tablet{display:none !important}}@media (max-width:767px){.hidden-desktop{display:inherit !important}.visible-desktop{display:none !important}.visible-phone{display:inherit !important}.hidden-phone{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:inherit !important}.hidden-print{display:none !important}}@media (max-width:767px){body{padding-left:20px;padding-right:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-left:-20px;margin-right:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;clear:none;width:auto;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails > li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{float:none;display:block;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"] + [class*="span"]{margin-left:0}.modal{position:fixed;top:20px;left:20px;right:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-left:10px;padding-right:10px}.media .pull-left,.media .pull-right{float:none;display:block;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;left:10px;right:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"] + [class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"] + [class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"] + [class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"] + [class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails > li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}.sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:2147483647;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear,0 0,100% 0,from(#FFF),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left,#FFF,rgba(204,154,129,0));background-image:-moz-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-o-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-ms-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:linear-gradient(to right,#fff,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1,startColorstr=#FFFFFFFF,endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1,startColorstr='#FFFFFFFF',endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear,0 100%,0 0,from(#000000),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom,#000000,rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-o-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:linear-gradient(to top,#000,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81,endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81',endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top,#ff0000 0,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%);background:-ms-linear-gradient(top,#ff0000 0,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%);background:-o-linear-gradient(top,#ff0000 0,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%);background:-webkit-gradient(linear,left top,left bottom,from(#ff0000),color-stop(0.17,#ffff00),color-stop(0.33,#00ff00),color-stop(0.5,#00ffff),color-stop(0.67,#0000ff),color-stop(0.83,#ff00ff),to(#ff0000));background:-webkit-linear-gradient(top,#ff0000 0,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000',endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00',endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00',endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff',endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff',endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff',endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width:480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue{font:400 12px "Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top,#eeeeee,#cccccc);background-image:-moz-linear-gradient(top,#eeeeee,#cccccc);background-image:-ms-linear-gradient(top,#eeeeee,#cccccc);background-image:-o-linear-gradient(top,#eeeeee,#cccccc);background-image:-ms-linear-gradient(top,#eeeeee,#cccccc);background-image:linear-gradient(to bottom,#eeeeee,#cccccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top,#dddddd,#bbbbbb);background-image:-moz-linear-gradient(top,#dddddd,#bbbbbb);background-image:-ms-linear-gradient(top,#dddddd,#bbbbbb);background-image:-o-linear-gradient(top,#dddddd,#bbbbbb);background-image:-ms-linear-gradient(top,#dddddd,#bbbbbb);background-image:linear-gradient(to bottom,#dddddd,#bbbbbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa,0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa,0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa,0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa,0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa,0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.CodeMirror{font-family:monospace;height:300px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7}.CodeMirror-linenumbers{}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid black;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite{}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:black}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:black}.cm-s-default .cm-operator{color:black}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:#f00}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:#f00}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:white;color:black}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;padding-right:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0;z-index:6}.CodeMirror-gutters{position:absolute;left:0;top:0;height:100%;padding-bottom:30px;z-index:3}.CodeMirror-gutter{height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block;*zoom:1;*display:inline}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-widget{display:inline-block}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-right:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}}.codesync-editor .asset-name-input{position:absolute;width:420px;bottom:20px;right:240px;z-index:4000}.codesync-editor .asset-name-input input{width:100%}.codesync-editor .codesync-asset-selector{display:none;position:relative;width:700px;z-index:100;background:rgba(0,0,0,0);border:0;top:40px;left:50%;margin-left:-350px}.codesync-editor .codesync-asset-selector .search-results-wrapper{position:absolute;height:0;top:30px;left:18px;background-color:rgba(255,255,255,0.19);border-radius:0 0 4px 4px;width:95%;z-index:1;color:white;max-height:200px;overflow:hidden;padding-top:8px}.codesync-editor .codesync-asset-selector .search-results-wrapper .search-results{padding-top:24px}.codesync-editor .codesync-asset-selector .search-results-wrapper .search-result{position:relative;padding:8px;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2);height:20px}.codesync-editor .codesync-asset-selector .search-results-wrapper .search-result.active{background-color:rgba(200,200,30,0.4)}.codesync-editor .codesync-asset-selector input{position:absolute;margin:0;height:28px;z-index:200;background:#5f5f5f;border:0;width:100%;color:#fff;font-size:18px;line-height:24px;box-shadow:2px 2px 4px rgba(255,255,255,0.2)}.codesync-color-picker{position:absolute;top:15px;right:15px;border-radius:4px}.codesync-editor .document-tabs-container .document-tab{font-size:12px;float:left;border:1px solid #777;padding:2px 10px;border-radius:0 0 4px 4px;cursor:pointer;background:rgba(40,40,40,0.9);box-shadow:0 0 3px rgba(0,0,0,0.3);color:#fff;height:28px;margin-right:2px;max-width:200px;overflow:hidden}.codesync-editor .document-tabs-container .document-tab .close-anchor{display:none}.codesync-editor .document-tabs-container .document-tab.closable{min-width:60px}.codesync-editor .document-tabs-container .document-tab.closable .contents{float:left;clear:left;width:80%}.codesync-editor .document-tabs-container .document-tab.closable .close-anchor{display:block;float:right;width:10%;clear:right}.codesync-editor .document-tabs-container .document-tab.new-document{margin-right:0}.codesync-editor .document-tabs-container .document-tab.new-document{float:right}.codesync-editor .document-tabs-container .document-tab.open-document{float:right}.codesync-editor .codesync-element-sync{position:absolute;z-index:9000;top:35px;right:15px;padding:4px 8px;width:400px;background:none}.codesync-editor .codesync-element-sync input{width:95%;border-radius:3px;padding:4px 8px;background:none;color:#e1e1e1;border:1px solid rgba(225,225,225,0.5)}.codesync-editor .codesync-element-sync select{margin-top:4px;float:right;width:60%}.codesync-editor .codesync-element-sync .row{padding:0;margin:0}.codesync-editor .codesync-element-sync .span9{width:66.666%;float:left;margin:0;padding:0}.codesync-editor .codesync-element-sync .span3{width:33.3333%;float:left;margin:0;padding:0}.codesync-editor .codesync-element-sync .element-sync-status{color:#e1e1e1;font-size:14px;float:left;width:50%;line-height:20px;padding-top:10px}.codesync-editor .codesync-element-sync .done-button,.codesync-editor .codesync-element-sync .hide-button{margin-top:8px;float:left;font-size:14px;line-height:20px;width:25%}.codesync-editor.bottom-positioned .codesync-element-sync,.codesync-editor.static-positioned .codesync-element-sync{top:75px}.codesync-editor .preferences-panel{margin-bottom:4px;margin-right:4px;background:rgba(255,255,255,0.2);padding:8px;box-shadow:0 0 6px rgba(255,255,255,0.2);border-radius:3px;position:absolute;z-index:4000;bottom:55px;right:10px}.codesync-editor .preferences-panel label{color:#fff;text-decoration:underline;display:block}.codesync-editor[data-theme='xq-light'] .preferences-panel{background:rgba(30,30,30,0.9)}#rack-webconsole{opacity:.9;z-index:999;background:#000;color:#DDD;font-family:monospace;height:40%;position:fixed;width:100%;bottom:0;left:0;right:0;outline-top:3px solid #DEDEDE;box-shadow:0 -4px 5px rgba(0,0,0,0.5);-moz-box-shadow:0 -4px 5px rgba(0,0,0,0.5);-webkit-box-shadow:0 -4px 5px rgba(0,0,0,0.5);font-size:11px}#rack-webconsole div.query{margin-top:10px;font-weight:700;padding-top:10px;border-top:1px dashed #333;margin-bottom:5px}#rack-webconsole div.query_multiline{font-weight:700;margin-bottom:5px}#rack-webconsole div.query:first-child{margin-top:0;padding-top:0;border-top:none}#rack-webconsole div.result{font-weight:400}#rack-webconsole form div,#console form span{font-size:14px;border:0;font-family:monospace;color:#FFF}#rack-webconsole form div.results_wrapper{width:100%;position:absolute;overflow-x:auto;top:0;bottom:40px}#rack-webconsole form div.results{padding:10px}#rack-webconsole .prompt{width:30px;text-align:center;display:block;float:left;height:25px;line-height:25px}#rack-webconsole form div.input{width:100%;position:absolute;bottom:0;background:#000}#rack-webconsole form div.input input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-top:0;margin-bottom:0;padding:0;width:100%;font-size:14px;background:transparent;border:0;font-family:monospace;color:#FFF}#rack-webconsole .input .input_box{margin-left:30px;margin-right:10px;display:block}.codesync-editor{height:400px;width:100%;margin:0;padding:0;position:relative;z-index:0}.codesync-editor .document-tabs-container{position:absolute;width:100%}.codesync-editor .codesync-asset-editor{z-index:90;margin:0 auto;width:100%;position:absolute}.codesync-editor .codesync-asset-editor .CodeMirror{height:375px}.codesync-editor .toolbar-wrapper{position:absolute;z-index:9000;color:#fff;top:10px;right:10px}.codesync-editor .toolbar-wrapper .config-select{float:right;margin-top:-4px}.codesync-editor .toolbar-wrapper .button{float:left;margin:0 4px;cursor:pointer;border-radius:3px;border:1px solid #a3a3a3;font-size:12px;line-height:18px;padding:0 4px}.codesync-editor .status-message{position:absolute;top:50%;width:50%;margin:0 auto;z-index:8000;padding:6px;border-radius:3px;box-shadow:0 0 3px #fff;color:#fff}.codesync-editor .status-message.error{background-color:rgba(235,90,90,0.3)}.codesync-editor .status-message.success{background-color:rgba(90,235,90,0.3)}.codesync-editor.top-positioned[data-visible] .codesync-asset-editor{box-shadow:0 4px 6px rgba(0,0,0,0.8)}.codesync-editor.top-positioned,.codesync-editor.bottom-positioned{position:fixed;z-index:30000;width:100%}.codesync-editor.top-positioned{border-radius:0 0 4px 4px;bottom:auto;top:0}.codesync-editor.top-positioned .codesync-asset-editor{top:0;bottom:auto}.codesync-editor.top-positioned .document-tabs-container{top:auto;bottom:-8px}.codesync-editor.top-positioned .document-tabs-container .document-tab{border-radius:0 0 4px 4px}.codesync-editor.bottom-positioned{border-radius:4px 4px 0 0;bottom:0;top:auto}.codesync-editor.bottom-positioned .codesync-asset-editor{top:26px}.codesync-editor.bottom-positioned .document-tabs-container{top:0;bottom:auto}.codesync-editor.bottom-positioned .document-tabs-container .document-tab{border-radius:4px 4px 0 0}.codesync-editor[data-theme="xq-light"] .toolbar-wrapper .button{background-color:#777;color:#ffffff}.codesync-editor[data-theme="xq-light"] .document-tabs-container .document-tab{background-color:#fff;color:#777}.codesync-editor[data-theme="xq-light"] .status-message.error{color:#ff6666} \ No newline at end of file +@charset "UTF-8";body{-webkit-backface-visibility:hidden}.animated{-webkit-animation-duration:1s;-moz-animation-duration:1s;-o-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.animated.hinge{-webkit-animation-duration:2s;-moz-animation-duration:2s;-o-animation-duration:2s;animation-duration:2s}@-webkit-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-moz-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-o-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;-moz-animation-name:flash;-o-animation-name:flash;animation-name:flash}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px)}}@-moz-keyframes shake{0%,100%{-moz-transform:translateX(0)}10%,30%,50%,70%,90%{-moz-transform:translateX(-10px)}20%,40%,60%,80%{-moz-transform:translateX(10px)}}@-o-keyframes shake{0%,100%{-o-transform:translateX(0)}10%,30%,50%,70%,90%{-o-transform:translateX(-10px)}20%,40%,60%,80%{-o-transform:translateX(10px)}}@keyframes shake{0%,100%{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-10px)}20%,40%,60%,80%{transform:translateX(10px)}}.shake{-webkit-animation-name:shake;-moz-animation-name:shake;-o-animation-name:shake;animation-name:shake}@-webkit-keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0)}40%{-webkit-transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px)}}@-moz-keyframes bounce{0%,20%,50%,80%,100%{-moz-transform:translateY(0)}40%{-moz-transform:translateY(-30px)}60%{-moz-transform:translateY(-15px)}}@-o-keyframes bounce{0%,20%,50%,80%,100%{-o-transform:translateY(0)}40%{-o-transform:translateY(-30px)}60%{-o-transform:translateY(-15px)}}@keyframes bounce{0%,20%,50%,80%,100%{transform:translateY(0)}40%{transform:translateY(-30px)}60%{transform:translateY(-15px)}}.bounce{-webkit-animation-name:bounce;-moz-animation-name:bounce;-o-animation-name:bounce;animation-name:bounce}@-webkit-keyframes tada{0%{-webkit-transform:scale(1)}10%,20%{-webkit-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0)}}@-moz-keyframes tada{0%{-moz-transform:scale(1)}10%,20%{-moz-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-moz-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-moz-transform:scale(1.1) rotate(-3deg)}100%{-moz-transform:scale(1) rotate(0)}}@-o-keyframes tada{0%{-o-transform:scale(1)}10%,20%{-o-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-o-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-o-transform:scale(1.1) rotate(-3deg)}100%{-o-transform:scale(1) rotate(0)}}@keyframes tada{0%{transform:scale(1)}10%,20%{transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{transform:scale(1.1) rotate(3deg)}40%,60%,80%{transform:scale(1.1) rotate(-3deg)}100%{transform:scale(1) rotate(0)}}.tada{-webkit-animation-name:tada;-moz-animation-name:tada;-o-animation-name:tada;animation-name:tada}@-webkit-keyframes swing{20%,40%,60%,80%,100%{-webkit-transform-origin:top center}20%{-webkit-transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg)}100%{-webkit-transform:rotate(0deg)}}@-moz-keyframes swing{20%{-moz-transform:rotate(15deg)}40%{-moz-transform:rotate(-10deg)}60%{-moz-transform:rotate(5deg)}80%{-moz-transform:rotate(-5deg)}100%{-moz-transform:rotate(0deg)}}@-o-keyframes swing{20%{-o-transform:rotate(15deg)}40%{-o-transform:rotate(-10deg)}60%{-o-transform:rotate(5deg)}80%{-o-transform:rotate(-5deg)}100%{-o-transform:rotate(0deg)}}@keyframes swing{20%{transform:rotate(15deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(5deg)}80%{transform:rotate(-5deg)}100%{transform:rotate(0deg)}}.swing{-webkit-transform-origin:top center;-moz-transform-origin:top center;-o-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;-moz-animation-name:swing;-o-animation-name:swing;animation-name:swing}@-webkit-keyframes wobble{0%{-webkit-transform:translateX(0%)}15%{-webkit-transform:translateX(-25%) rotate(-5deg)}30%{-webkit-transform:translateX(20%) rotate(3deg)}45%{-webkit-transform:translateX(-15%) rotate(-3deg)}60%{-webkit-transform:translateX(10%) rotate(2deg)}75%{-webkit-transform:translateX(-5%) rotate(-1deg)}100%{-webkit-transform:translateX(0%)}}@-moz-keyframes wobble{0%{-moz-transform:translateX(0%)}15%{-moz-transform:translateX(-25%) rotate(-5deg)}30%{-moz-transform:translateX(20%) rotate(3deg)}45%{-moz-transform:translateX(-15%) rotate(-3deg)}60%{-moz-transform:translateX(10%) rotate(2deg)}75%{-moz-transform:translateX(-5%) rotate(-1deg)}100%{-moz-transform:translateX(0%)}}@-o-keyframes wobble{0%{-o-transform:translateX(0%)}15%{-o-transform:translateX(-25%) rotate(-5deg)}30%{-o-transform:translateX(20%) rotate(3deg)}45%{-o-transform:translateX(-15%) rotate(-3deg)}60%{-o-transform:translateX(10%) rotate(2deg)}75%{-o-transform:translateX(-5%) rotate(-1deg)}100%{-o-transform:translateX(0%)}}@keyframes wobble{0%{transform:translateX(0%)}15%{transform:translateX(-25%) rotate(-5deg)}30%{transform:translateX(20%) rotate(3deg)}45%{transform:translateX(-15%) rotate(-3deg)}60%{transform:translateX(10%) rotate(2deg)}75%{transform:translateX(-5%) rotate(-1deg)}100%{transform:translateX(0%)}}.wobble{-webkit-animation-name:wobble;-moz-animation-name:wobble;-o-animation-name:wobble;animation-name:wobble}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1)}50%{-webkit-transform:scale(1.1)}100%{-webkit-transform:scale(1)}}@-moz-keyframes pulse{0%{-moz-transform:scale(1)}50%{-moz-transform:scale(1.1)}100%{-moz-transform:scale(1)}}@-o-keyframes pulse{0%{-o-transform:scale(1)}50%{-o-transform:scale(1.1)}100%{-o-transform:scale(1)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}.pulse{-webkit-animation-name:pulse;-moz-animation-name:pulse;-o-animation-name:pulse;animation-name:pulse}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) rotateY(0);-webkit-animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(170deg);-webkit-animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-webkit-animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) rotateY(360deg) scale(.95);-webkit-animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px) scale(1);-webkit-animation-timing-function:ease-in}}@-moz-keyframes flip{0%{-moz-transform:perspective(400px) rotateY(0);-moz-animation-timing-function:ease-out}40%{-moz-transform:perspective(400px) translateZ(150px) rotateY(170deg);-moz-animation-timing-function:ease-out}50%{-moz-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-moz-animation-timing-function:ease-in}80%{-moz-transform:perspective(400px) rotateY(360deg) scale(.95);-moz-animation-timing-function:ease-in}100%{-moz-transform:perspective(400px) scale(1);-moz-animation-timing-function:ease-in}}@-o-keyframes flip{0%{-o-transform:perspective(400px) rotateY(0);-o-animation-timing-function:ease-out}40%{-o-transform:perspective(400px) translateZ(150px) rotateY(170deg);-o-animation-timing-function:ease-out}50%{-o-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-o-animation-timing-function:ease-in}80%{-o-transform:perspective(400px) rotateY(360deg) scale(.95);-o-animation-timing-function:ease-in}100%{-o-transform:perspective(400px) scale(1);-o-animation-timing-function:ease-in}}@keyframes flip{0%{transform:perspective(400px) rotateY(0);animation-timing-function:ease-out}40%{transform:perspective(400px) translateZ(150px) rotateY(170deg);animation-timing-function:ease-out}50%{transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);animation-timing-function:ease-in}80%{transform:perspective(400px) rotateY(360deg) scale(.95);animation-timing-function:ease-in}100%{transform:perspective(400px) scale(1);animation-timing-function:ease-in}}.flip{-webkit-backface-visibility:visible!important;-webkit-animation-name:flip;-moz-backface-visibility:visible!important;-moz-animation-name:flip;-o-backface-visibility:visible!important;-o-animation-name:flip;backface-visibility:visible!important;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-10deg)}70%{-webkit-transform:perspective(400px) rotateX(10deg)}100%{-webkit-transform:perspective(400px) rotateX(0deg);opacity:1}}@-moz-keyframes flipInX{0%{-moz-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-moz-transform:perspective(400px) rotateX(-10deg)}70%{-moz-transform:perspective(400px) rotateX(10deg)}100%{-moz-transform:perspective(400px) rotateX(0deg);opacity:1}}@-o-keyframes flipInX{0%{-o-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-o-transform:perspective(400px) rotateX(-10deg)}70%{-o-transform:perspective(400px) rotateX(10deg)}100%{-o-transform:perspective(400px) rotateX(0deg);opacity:1}}@keyframes flipInX{0%{transform:perspective(400px) rotateX(90deg);opacity:0}40%{transform:perspective(400px) rotateX(-10deg)}70%{transform:perspective(400px) rotateX(10deg)}100%{transform:perspective(400px) rotateX(0deg);opacity:1}}.flipInX{-webkit-backface-visibility:visible!important;-webkit-animation-name:flipInX;-moz-backface-visibility:visible!important;-moz-animation-name:flipInX;-o-backface-visibility:visible!important;-o-animation-name:flipInX;backface-visibility:visible!important;animation-name:flipInX}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px) rotateX(0deg);opacity:1}100%{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0}}@-moz-keyframes flipOutX{0%{-moz-transform:perspective(400px) rotateX(0deg);opacity:1}100%{-moz-transform:perspective(400px) rotateX(90deg);opacity:0}}@-o-keyframes flipOutX{0%{-o-transform:perspective(400px) rotateX(0deg);opacity:1}100%{-o-transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{transform:perspective(400px) rotateX(0deg);opacity:1}100%{transform:perspective(400px) rotateX(90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;-webkit-backface-visibility:visible!important;-moz-animation-name:flipOutX;-moz-backface-visibility:visible!important;-o-animation-name:flipOutX;-o-backface-visibility:visible!important;animation-name:flipOutX;backface-visibility:visible!important}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-10deg)}70%{-webkit-transform:perspective(400px) rotateY(10deg)}100%{-webkit-transform:perspective(400px) rotateY(0deg);opacity:1}}@-moz-keyframes flipInY{0%{-moz-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-moz-transform:perspective(400px) rotateY(-10deg)}70%{-moz-transform:perspective(400px) rotateY(10deg)}100%{-moz-transform:perspective(400px) rotateY(0deg);opacity:1}}@-o-keyframes flipInY{0%{-o-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-o-transform:perspective(400px) rotateY(-10deg)}70%{-o-transform:perspective(400px) rotateY(10deg)}100%{-o-transform:perspective(400px) rotateY(0deg);opacity:1}}@keyframes flipInY{0%{transform:perspective(400px) rotateY(90deg);opacity:0}40%{transform:perspective(400px) rotateY(-10deg)}70%{transform:perspective(400px) rotateY(10deg)}100%{transform:perspective(400px) rotateY(0deg);opacity:1}}.flipInY{-webkit-backface-visibility:visible!important;-webkit-animation-name:flipInY;-moz-backface-visibility:visible!important;-moz-animation-name:flipInY;-o-backface-visibility:visible!important;-o-animation-name:flipInY;backface-visibility:visible!important;animation-name:flipInY}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px) rotateY(0deg);opacity:1}100%{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0}}@-moz-keyframes flipOutY{0%{-moz-transform:perspective(400px) rotateY(0deg);opacity:1}100%{-moz-transform:perspective(400px) rotateY(90deg);opacity:0}}@-o-keyframes flipOutY{0%{-o-transform:perspective(400px) rotateY(0deg);opacity:1}100%{-o-transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{transform:perspective(400px) rotateY(0deg);opacity:1}100%{transform:perspective(400px) rotateY(90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;-webkit-animation-name:flipOutY;-moz-backface-visibility:visible!important;-moz-animation-name:flipOutY;-o-backface-visibility:visible!important;-o-animation-name:flipOutY;backface-visibility:visible!important;animation-name:flipOutY}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;-moz-animation-name:fadeIn;-o-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(20px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInUp{0%{opacity:0;-moz-transform:translateY(20px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInUp{0%{opacity:0;-o-transform:translateY(20px)}100%{opacity:1;-o-transform:translateY(0)}}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:translateY(0)}}.fadeInUp{-webkit-animation-name:fadeInUp;-moz-animation-name:fadeInUp;-o-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-20px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInDown{0%{opacity:0;-moz-transform:translateY(-20px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInDown{0%{opacity:0;-o-transform:translateY(-20px)}100%{opacity:1;-o-transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)}100%{opacity:1;transform:translateY(0)}}.fadeInDown{-webkit-animation-name:fadeInDown;-moz-animation-name:fadeInDown;-o-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInLeft{0%{opacity:0;-moz-transform:translateX(-20px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInLeft{0%{opacity:0;-o-transform:translateX(-20px)}100%{opacity:1;-o-transform:translateX(0)}}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-20px)}100%{opacity:1;transform:translateX(0)}}.fadeInLeft{-webkit-animation-name:fadeInLeft;-moz-animation-name:fadeInLeft;-o-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInRight{0%{opacity:0;-moz-transform:translateX(20px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInRight{0%{opacity:0;-o-transform:translateX(20px)}100%{opacity:1;-o-transform:translateX(0)}}@keyframes fadeInRight{0%{opacity:0;transform:translateX(20px)}100%{opacity:1;transform:translateX(0)}}.fadeInRight{-webkit-animation-name:fadeInRight;-moz-animation-name:fadeInRight;-o-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInUpBig{0%{opacity:0;-moz-transform:translateY(2000px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInUpBig{0%{opacity:0;-o-transform:translateY(2000px)}100%{opacity:1;-o-transform:translateY(0)}}@keyframes fadeInUpBig{0%{opacity:0;transform:translateY(2000px)}100%{opacity:1;transform:translateY(0)}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;-moz-animation-name:fadeInUpBig;-o-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translateY(-2000px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInDownBig{0%{opacity:0;-moz-transform:translateY(-2000px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInDownBig{0%{opacity:0;-o-transform:translateY(-2000px)}100%{opacity:1;-o-transform:translateY(0)}}@keyframes fadeInDownBig{0%{opacity:0;transform:translateY(-2000px)}100%{opacity:1;transform:translateY(0)}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;-moz-animation-name:fadeInDownBig;-o-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translateX(-2000px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInLeftBig{0%{opacity:0;-moz-transform:translateX(-2000px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInLeftBig{0%{opacity:0;-o-transform:translateX(-2000px)}100%{opacity:1;-o-transform:translateX(0)}}@keyframes fadeInLeftBig{0%{opacity:0;transform:translateX(-2000px)}100%{opacity:1;transform:translateX(0)}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;-moz-animation-name:fadeInLeftBig;-o-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translateX(2000px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInRightBig{0%{opacity:0;-moz-transform:translateX(2000px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInRightBig{0%{opacity:0;-o-transform:translateX(2000px)}100%{opacity:1;-o-transform:translateX(0)}}@keyframes fadeInRightBig{0%{opacity:0;transform:translateX(2000px)}100%{opacity:1;transform:translateX(0)}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;-moz-animation-name:fadeInRightBig;-o-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-moz-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-o-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;-moz-animation-name:fadeOut;-o-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-20px)}}@-moz-keyframes fadeOutUp{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(-20px)}}@-o-keyframes fadeOutUp{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(-20px)}}@keyframes fadeOutUp{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-20px)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;-moz-animation-name:fadeOutUp;-o-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(20px)}}@-moz-keyframes fadeOutDown{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(20px)}}@-o-keyframes fadeOutDown{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(20px)}}@keyframes fadeOutDown{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(20px)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;-moz-animation-name:fadeOutDown;-o-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-20px)}}@-moz-keyframes fadeOutLeft{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(-20px)}}@-o-keyframes fadeOutLeft{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(-20px)}}@keyframes fadeOutLeft{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-20px)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;-moz-animation-name:fadeOutLeft;-o-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(20px)}}@-moz-keyframes fadeOutRight{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(20px)}}@-o-keyframes fadeOutRight{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(20px)}}@keyframes fadeOutRight{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(20px)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;-moz-animation-name:fadeOutRight;-o-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutUpBig{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px)}}@-moz-keyframes fadeOutUpBig{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(-2000px)}}@-o-keyframes fadeOutUpBig{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(-2000px)}}@keyframes fadeOutUpBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-2000px)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;-moz-animation-name:fadeOutUpBig;-o-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes fadeOutDownBig{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(2000px)}}@-moz-keyframes fadeOutDownBig{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(2000px)}}@-o-keyframes fadeOutDownBig{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(2000px)}}@keyframes fadeOutDownBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(2000px)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;-moz-animation-name:fadeOutDownBig;-o-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px)}}@-moz-keyframes fadeOutLeftBig{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(-2000px)}}@-o-keyframes fadeOutLeftBig{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(-2000px)}}@keyframes fadeOutLeftBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-2000px)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;-moz-animation-name:fadeOutLeftBig;-o-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRightBig{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px)}}@-moz-keyframes fadeOutRightBig{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(2000px)}}@-o-keyframes fadeOutRightBig{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(2000px)}}@keyframes fadeOutRightBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(2000px)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;-moz-animation-name:fadeOutRightBig;-o-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(.3)}50%{opacity:1;-webkit-transform:scale(1.05)}70%{-webkit-transform:scale(.9)}100%{-webkit-transform:scale(1)}}@-moz-keyframes bounceIn{0%{opacity:0;-moz-transform:scale(.3)}50%{opacity:1;-moz-transform:scale(1.05)}70%{-moz-transform:scale(.9)}100%{-moz-transform:scale(1)}}@-o-keyframes bounceIn{0%{opacity:0;-o-transform:scale(.3)}50%{opacity:1;-o-transform:scale(1.05)}70%{-o-transform:scale(.9)}100%{-o-transform:scale(1)}}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.bounceIn{-webkit-animation-name:bounceIn;-moz-animation-name:bounceIn;-o-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInUp{0%{opacity:0;-webkit-transform:translateY(2000px)}60%{opacity:1;-webkit-transform:translateY(-30px)}80%{-webkit-transform:translateY(10px)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes bounceInUp{0%{opacity:0;-moz-transform:translateY(2000px)}60%{opacity:1;-moz-transform:translateY(-30px)}80%{-moz-transform:translateY(10px)}100%{-moz-transform:translateY(0)}}@-o-keyframes bounceInUp{0%{opacity:0;-o-transform:translateY(2000px)}60%{opacity:1;-o-transform:translateY(-30px)}80%{-o-transform:translateY(10px)}100%{-o-transform:translateY(0)}}@keyframes bounceInUp{0%{opacity:0;transform:translateY(2000px)}60%{opacity:1;transform:translateY(-30px)}80%{transform:translateY(10px)}100%{transform:translateY(0)}}.bounceInUp{-webkit-animation-name:bounceInUp;-moz-animation-name:bounceInUp;-o-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceInDown{0%{opacity:0;-webkit-transform:translateY(-2000px)}60%{opacity:1;-webkit-transform:translateY(30px)}80%{-webkit-transform:translateY(-10px)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes bounceInDown{0%{opacity:0;-moz-transform:translateY(-2000px)}60%{opacity:1;-moz-transform:translateY(30px)}80%{-moz-transform:translateY(-10px)}100%{-moz-transform:translateY(0)}}@-o-keyframes bounceInDown{0%{opacity:0;-o-transform:translateY(-2000px)}60%{opacity:1;-o-transform:translateY(30px)}80%{-o-transform:translateY(-10px)}100%{-o-transform:translateY(0)}}@keyframes bounceInDown{0%{opacity:0;transform:translateY(-2000px)}60%{opacity:1;transform:translateY(30px)}80%{transform:translateY(-10px)}100%{transform:translateY(0)}}.bounceInDown{-webkit-animation-name:bounceInDown;-moz-animation-name:bounceInDown;-o-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px)}60%{opacity:1;-webkit-transform:translateX(30px)}80%{-webkit-transform:translateX(-10px)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes bounceInLeft{0%{opacity:0;-moz-transform:translateX(-2000px)}60%{opacity:1;-moz-transform:translateX(30px)}80%{-moz-transform:translateX(-10px)}100%{-moz-transform:translateX(0)}}@-o-keyframes bounceInLeft{0%{opacity:0;-o-transform:translateX(-2000px)}60%{opacity:1;-o-transform:translateX(30px)}80%{-o-transform:translateX(-10px)}100%{-o-transform:translateX(0)}}@keyframes bounceInLeft{0%{opacity:0;transform:translateX(-2000px)}60%{opacity:1;transform:translateX(30px)}80%{transform:translateX(-10px)}100%{transform:translateX(0)}}.bounceInLeft{-webkit-animation-name:bounceInLeft;-moz-animation-name:bounceInLeft;-o-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%{opacity:0;-webkit-transform:translateX(2000px)}60%{opacity:1;-webkit-transform:translateX(-30px)}80%{-webkit-transform:translateX(10px)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes bounceInRight{0%{opacity:0;-moz-transform:translateX(2000px)}60%{opacity:1;-moz-transform:translateX(-30px)}80%{-moz-transform:translateX(10px)}100%{-moz-transform:translateX(0)}}@-o-keyframes bounceInRight{0%{opacity:0;-o-transform:translateX(2000px)}60%{opacity:1;-o-transform:translateX(-30px)}80%{-o-transform:translateX(10px)}100%{-o-transform:translateX(0)}}@keyframes bounceInRight{0%{opacity:0;transform:translateX(2000px)}60%{opacity:1;transform:translateX(-30px)}80%{transform:translateX(10px)}100%{transform:translateX(0)}}.bounceInRight{-webkit-animation-name:bounceInRight;-moz-animation-name:bounceInRight;-o-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceOut{0%{-webkit-transform:scale(1)}25%{-webkit-transform:scale(.95)}50%{opacity:1;-webkit-transform:scale(1.1)}100%{opacity:0;-webkit-transform:scale(.3)}}@-moz-keyframes bounceOut{0%{-moz-transform:scale(1)}25%{-moz-transform:scale(.95)}50%{opacity:1;-moz-transform:scale(1.1)}100%{opacity:0;-moz-transform:scale(.3)}}@-o-keyframes bounceOut{0%{-o-transform:scale(1)}25%{-o-transform:scale(.95)}50%{opacity:1;-o-transform:scale(1.1)}100%{opacity:0;-o-transform:scale(.3)}}@keyframes bounceOut{0%{transform:scale(1)}25%{transform:scale(.95)}50%{opacity:1;transform:scale(1.1)}100%{opacity:0;transform:scale(.3)}}.bounceOut{-webkit-animation-name:bounceOut;-moz-animation-name:bounceOut;-o-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutUp{0%{-webkit-transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(20px)}100%{opacity:0;-webkit-transform:translateY(-2000px)}}@-moz-keyframes bounceOutUp{0%{-moz-transform:translateY(0)}20%{opacity:1;-moz-transform:translateY(20px)}100%{opacity:0;-moz-transform:translateY(-2000px)}}@-o-keyframes bounceOutUp{0%{-o-transform:translateY(0)}20%{opacity:1;-o-transform:translateY(20px)}100%{opacity:0;-o-transform:translateY(-2000px)}}@keyframes bounceOutUp{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(20px)}100%{opacity:0;transform:translateY(-2000px)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;-moz-animation-name:bounceOutUp;-o-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes bounceOutDown{0%{-webkit-transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(-20px)}100%{opacity:0;-webkit-transform:translateY(2000px)}}@-moz-keyframes bounceOutDown{0%{-moz-transform:translateY(0)}20%{opacity:1;-moz-transform:translateY(-20px)}100%{opacity:0;-moz-transform:translateY(2000px)}}@-o-keyframes bounceOutDown{0%{-o-transform:translateY(0)}20%{opacity:1;-o-transform:translateY(-20px)}100%{opacity:0;-o-transform:translateY(2000px)}}@keyframes bounceOutDown{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(-20px)}100%{opacity:0;transform:translateY(2000px)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;-moz-animation-name:bounceOutDown;-o-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{0%{-webkit-transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(20px)}100%{opacity:0;-webkit-transform:translateX(-2000px)}}@-moz-keyframes bounceOutLeft{0%{-moz-transform:translateX(0)}20%{opacity:1;-moz-transform:translateX(20px)}100%{opacity:0;-moz-transform:translateX(-2000px)}}@-o-keyframes bounceOutLeft{0%{-o-transform:translateX(0)}20%{opacity:1;-o-transform:translateX(20px)}100%{opacity:0;-o-transform:translateX(-2000px)}}@keyframes bounceOutLeft{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(20px)}100%{opacity:0;transform:translateX(-2000px)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;-moz-animation-name:bounceOutLeft;-o-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{0%{-webkit-transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(-20px)}100%{opacity:0;-webkit-transform:translateX(2000px)}}@-moz-keyframes bounceOutRight{0%{-moz-transform:translateX(0)}20%{opacity:1;-moz-transform:translateX(-20px)}100%{opacity:0;-moz-transform:translateX(2000px)}}@-o-keyframes bounceOutRight{0%{-o-transform:translateX(0)}20%{opacity:1;-o-transform:translateX(-20px)}100%{opacity:0;-o-transform:translateX(2000px)}}@keyframes bounceOutRight{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(-20px)}100%{opacity:0;transform:translateX(2000px)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;-moz-animation-name:bounceOutRight;-o-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes rotateIn{0%{-webkit-transform-origin:center center;-webkit-transform:rotate(-200deg);opacity:0}100%{-webkit-transform-origin:center center;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateIn{0%{-moz-transform-origin:center center;-moz-transform:rotate(-200deg);opacity:0}100%{-moz-transform-origin:center center;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateIn{0%{-o-transform-origin:center center;-o-transform:rotate(-200deg);opacity:0}100%{-o-transform-origin:center center;-o-transform:rotate(0);opacity:1}}@keyframes rotateIn{0%{transform-origin:center center;transform:rotate(-200deg);opacity:0}100%{transform-origin:center center;transform:rotate(0);opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;-moz-animation-name:rotateIn;-o-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInUpLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(90deg);opacity:0}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInUpLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(90deg);opacity:0}100%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}}@keyframes rotateInUpLeft{0%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;-moz-animation-name:rotateInUpLeft;-o-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInDownLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(-90deg);opacity:0}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInDownLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(-90deg);opacity:0}100%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}}@keyframes rotateInDownLeft{0%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;-moz-animation-name:rotateInDownLeft;-o-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInUpRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(-90deg);opacity:0}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInUpRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(-90deg);opacity:0}100%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}}@keyframes rotateInUpRight{0%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;-moz-animation-name:rotateInUpRight;-o-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInDownRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(90deg);opacity:0}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInDownRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(90deg);opacity:0}100%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}}@keyframes rotateInDownRight{0%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;-moz-animation-name:rotateInDownRight;-o-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateOut{0%{-webkit-transform-origin:center center;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:center center;-webkit-transform:rotate(200deg);opacity:0}}@-moz-keyframes rotateOut{0%{-moz-transform-origin:center center;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:center center;-moz-transform:rotate(200deg);opacity:0}}@-o-keyframes rotateOut{0%{-o-transform-origin:center center;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:center center;-o-transform:rotate(200deg);opacity:0}}@keyframes rotateOut{0%{transform-origin:center center;transform:rotate(0);opacity:1}100%{transform-origin:center center;transform:rotate(200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;-moz-animation-name:rotateOut;-o-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(-90deg);opacity:0}}@-moz-keyframes rotateOutUpLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(-90deg);opacity:0}}@-o-keyframes rotateOutUpLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:left bottom;-o-transform:rotate(-90deg);opacity:0}}@keyframes rotateOutUpLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;-moz-animation-name:rotateOutUpLeft;-o-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(90deg);opacity:0}}@-moz-keyframes rotateOutDownLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(90deg);opacity:0}}@-o-keyframes rotateOutDownLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:left bottom;-o-transform:rotate(90deg);opacity:0}}@keyframes rotateOutDownLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;-moz-animation-name:rotateOutDownLeft;-o-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(90deg);opacity:0}}@-moz-keyframes rotateOutUpRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(90deg);opacity:0}}@-o-keyframes rotateOutUpRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:right bottom;-o-transform:rotate(90deg);opacity:0}}@keyframes rotateOutUpRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;-moz-animation-name:rotateOutUpRight;-o-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(-90deg);opacity:0}}@-moz-keyframes rotateOutDownRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(-90deg);opacity:0}}@-o-keyframes rotateOutDownRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:right bottom;-o-transform:rotate(-90deg);opacity:0}}@keyframes rotateOutDownRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;-moz-animation-name:rotateOutDownRight;-o-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes hinge{0%{-webkit-transform:rotate(0);-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}40%{-webkit-transform:rotate(60deg);-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}80%{-webkit-transform:rotate(60deg) translateY(0);opacity:1;-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}100%{-webkit-transform:translateY(700px);opacity:0}}@-moz-keyframes hinge{0%{-moz-transform:rotate(0);-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}20%,60%{-moz-transform:rotate(80deg);-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}40%{-moz-transform:rotate(60deg);-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}80%{-moz-transform:rotate(60deg) translateY(0);opacity:1;-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}100%{-moz-transform:translateY(700px);opacity:0}}@-o-keyframes hinge{0%{-o-transform:rotate(0);-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}20%,60%{-o-transform:rotate(80deg);-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}40%{-o-transform:rotate(60deg);-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}80%{-o-transform:rotate(60deg) translateY(0);opacity:1;-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}100%{-o-transform:translateY(700px);opacity:0}}@keyframes hinge{0%{transform:rotate(0);transform-origin:top left;animation-timing-function:ease-in-out}20%,60%{transform:rotate(80deg);transform-origin:top left;animation-timing-function:ease-in-out}40%{transform:rotate(60deg);transform-origin:top left;animation-timing-function:ease-in-out}80%{transform:rotate(60deg) translateY(0);opacity:1;transform-origin:top left;animation-timing-function:ease-in-out}100%{transform:translateY(700px);opacity:0}}.hinge{-webkit-animation-name:hinge;-moz-animation-name:hinge;-o-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg)}}@-moz-keyframes rollIn{0%{opacity:0;-moz-transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-moz-transform:translateX(0px) rotate(0deg)}}@-o-keyframes rollIn{0%{opacity:0;-o-transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-o-transform:translateX(0px) rotate(0deg)}}@keyframes rollIn{0%{opacity:0;transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;transform:translateX(0px) rotate(0deg)}}.rollIn{-webkit-animation-name:rollIn;-moz-animation-name:rollIn;-o-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg)}100%{opacity:0;-webkit-transform:translateX(100%) rotate(120deg)}}@-moz-keyframes rollOut{0%{opacity:1;-moz-transform:translateX(0px) rotate(0deg)}100%{opacity:0;-moz-transform:translateX(100%) rotate(120deg)}}@-o-keyframes rollOut{0%{opacity:1;-o-transform:translateX(0px) rotate(0deg)}100%{opacity:0;-o-transform:translateX(100%) rotate(120deg)}}@keyframes rollOut{0%{opacity:1;transform:translateX(0px) rotate(0deg)}100%{opacity:0;transform:translateX(100%) rotate(120deg)}}.rollOut{-webkit-animation-name:rollOut;-moz-animation-name:rollOut;-o-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translateX(100%) skewX(-30deg);opacity:0}60%{-webkit-transform:translateX(-20%) skewX(30deg);opacity:1}80%{-webkit-transform:translateX(0%) skewX(-15deg);opacity:1}100%{-webkit-transform:translateX(0%) skewX(0deg);opacity:1}}@-moz-keyframes lightSpeedIn{0%{-moz-transform:translateX(100%) skewX(-30deg);opacity:0}60%{-moz-transform:translateX(-20%) skewX(30deg);opacity:1}80%{-moz-transform:translateX(0%) skewX(-15deg);opacity:1}100%{-moz-transform:translateX(0%) skewX(0deg);opacity:1}}@-o-keyframes lightSpeedIn{0%{-o-transform:translateX(100%) skewX(-30deg);opacity:0}60%{-o-transform:translateX(-20%) skewX(30deg);opacity:1}80%{-o-transform:translateX(0%) skewX(-15deg);opacity:1}100%{-o-transform:translateX(0%) skewX(0deg);opacity:1}}@keyframes lightSpeedIn{0%{transform:translateX(100%) skewX(-30deg);opacity:0}60%{transform:translateX(-20%) skewX(30deg);opacity:1}80%{transform:translateX(0%) skewX(-15deg);opacity:1}100%{transform:translateX(0%) skewX(0deg);opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;-moz-animation-name:lightSpeedIn;-o-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;-moz-animation-timing-function:ease-out;-o-animation-timing-function:ease-out;animation-timing-function:ease-out}.animated.lightSpeedIn{-webkit-animation-duration:.5s;-moz-animation-duration:.5s;-o-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes lightSpeedOut{0%{-webkit-transform:translateX(0%) skewX(0deg);opacity:1}100%{-webkit-transform:translateX(100%) skewX(-30deg);opacity:0}}@-moz-keyframes lightSpeedOut{0%{-moz-transform:translateX(0%) skewX(0deg);opacity:1}100%{-moz-transform:translateX(100%) skewX(-30deg);opacity:0}}@-o-keyframes lightSpeedOut{0%{-o-transform:translateX(0%) skewX(0deg);opacity:1}100%{-o-transform:translateX(100%) skewX(-30deg);opacity:0}}@keyframes lightSpeedOut{0%{transform:translateX(0%) skewX(0deg);opacity:1}100%{transform:translateX(100%) skewX(-30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;-moz-animation-name:lightSpeedOut;-o-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;-moz-animation-timing-function:ease-in;-o-animation-timing-function:ease-in;animation-timing-function:ease-in}.animated.lightSpeedOut{-webkit-animation-duration:.25s;-moz-animation-duration:.25s;-o-animation-duration:.25s;animation-duration:.25s}@-webkit-keyframes wiggle{0%{-webkit-transform:skewX(9deg)}10%{-webkit-transform:skewX(-8deg)}20%{-webkit-transform:skewX(7deg)}30%{-webkit-transform:skewX(-6deg)}40%{-webkit-transform:skewX(5deg)}50%{-webkit-transform:skewX(-4deg)}60%{-webkit-transform:skewX(3deg)}70%{-webkit-transform:skewX(-2deg)}80%{-webkit-transform:skewX(1deg)}90%{-webkit-transform:skewX(0deg)}100%{-webkit-transform:skewX(0deg)}}@-moz-keyframes wiggle{0%{-moz-transform:skewX(9deg)}10%{-moz-transform:skewX(-8deg)}20%{-moz-transform:skewX(7deg)}30%{-moz-transform:skewX(-6deg)}40%{-moz-transform:skewX(5deg)}50%{-moz-transform:skewX(-4deg)}60%{-moz-transform:skewX(3deg)}70%{-moz-transform:skewX(-2deg)}80%{-moz-transform:skewX(1deg)}90%{-moz-transform:skewX(0deg)}100%{-moz-transform:skewX(0deg)}}@-o-keyframes wiggle{0%{-o-transform:skewX(9deg)}10%{-o-transform:skewX(-8deg)}20%{-o-transform:skewX(7deg)}30%{-o-transform:skewX(-6deg)}40%{-o-transform:skewX(5deg)}50%{-o-transform:skewX(-4deg)}60%{-o-transform:skewX(3deg)}70%{-o-transform:skewX(-2deg)}80%{-o-transform:skewX(1deg)}90%{-o-transform:skewX(0deg)}100%{-o-transform:skewX(0deg)}}@keyframes wiggle{0%{transform:skewX(9deg)}10%{transform:skewX(-8deg)}20%{transform:skewX(7deg)}30%{transform:skewX(-6deg)}40%{transform:skewX(5deg)}50%{transform:skewX(-4deg)}60%{transform:skewX(3deg)}70%{transform:skewX(-2deg)}80%{transform:skewX(1deg)}90%{transform:skewX(0deg)}100%{transform:skewX(0deg)}}.wiggle{-webkit-animation-name:wiggle;-moz-animation-name:wiggle;-o-animation-name:wiggle;animation-name:wiggle;-webkit-animation-timing-function:ease-in;-moz-animation-timing-function:ease-in;-o-animation-timing-function:ease-in;animation-timing-function:ease-in}.animated.wiggle{-webkit-animation-duration:.75s;-moz-animation-duration:.75s;-o-animation-duration:.75s;animation-duration:.75s}.cm-s-ambiance .cm-keyword{color:#cda869}.cm-s-ambiance .cm-atom{color:#CF7EA9}.cm-s-ambiance .cm-number{color:#78CF8A}.cm-s-ambiance .cm-def{color:#aac6e3}.cm-s-ambiance .cm-variable{color:#ffb795}.cm-s-ambiance .cm-variable-2{color:#eed1b3}.cm-s-ambiance .cm-variable-3{color:#faded3}.cm-s-ambiance .cm-property{color:#eed1b3}.cm-s-ambiance .cm-operator{color:#fa8d6a}.cm-s-ambiance .cm-comment{color:#555;font-style:italic}.cm-s-ambiance .cm-string{color:#8f9d6a}.cm-s-ambiance .cm-string-2{color:#9d937c}.cm-s-ambiance .cm-meta{color:#D2A8A1}.cm-s-ambiance .cm-error{color:#AF2018}.cm-s-ambiance .cm-qualifier{color:yellow}.cm-s-ambiance .cm-builtin{color:#9999cc}.cm-s-ambiance .cm-bracket{color:#24C2C7}.cm-s-ambiance .cm-tag{color:#fee4ff}.cm-s-ambiance .cm-attribute{color:#9B859D}.cm-s-ambiance .cm-header{color:blue}.cm-s-ambiance .cm-quote{color:#24C2C7}.cm-s-ambiance .cm-hr{color:pink}.cm-s-ambiance .cm-link{color:#F4C20B}.cm-s-ambiance .cm-special{color:#FF9D00}.cm-s-ambiance .CodeMirror-matchingbracket{color:#0f0}.cm-s-ambiance .CodeMirror-nonmatchingbracket{color:#f22}.cm-s-ambiance .CodeMirror-selected{background:rgba(255,255,255,0.15)}.cm-s-ambiance .CodeMirror-focused .CodeMirror-selected{background:rgba(255,255,255,0.10)}.cm-s-ambiance.CodeMirror{line-height:1.40em;color:#E6E1DC;background-color:#202020;-webkit-box-shadow:inset 0 0 10px black;-moz-box-shadow:inset 0 0 10px black;box-shadow:inset 0 0 10px black}.cm-s-ambiance .CodeMirror-gutters{background:#3D3D3D;border-right:1px solid #4D4D4D;box-shadow:0 10px 20px black}.cm-s-ambiance .CodeMirror-linenumber{text-shadow:0 1px 1px #4d4d4d;color:#222;padding:0 5px}.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor{border-left:1px solid #7991E8}.cm-s-ambiance .activeline{background:none repeat scroll 0 0 rgba(255,255,255,0.031)}.cm-s-ambiance.CodeMirror,.cm-s-ambiance .CodeMirror-gutters{background-image:url("data:image/png;base64,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")}.cm-s-lesser-dark{line-height:1.3em}.cm-s-lesser-dark.CodeMirror{background:#262626;color:#EBEFE7;text-shadow:0 -1px 1px #262626}.cm-s-lesser-dark div.CodeMirror-selected{background:#45443B !important}.cm-s-lesser-dark .CodeMirror-cursor{border-left:1px solid white !important}.cm-s-lesser-dark pre{padding:0 8px}div.CodeMirror span.CodeMirror-matchingbracket{color:#7EFC7E}.cm-s-lesser-dark .CodeMirror-gutters{background:#262626;border-right:1px solid #aaa}.cm-s-lesser-dark .CodeMirror-linenumber{color:#777}.cm-s-lesser-dark span.cm-keyword{color:#599eff}.cm-s-lesser-dark span.cm-atom{color:#C2B470}.cm-s-lesser-dark span.cm-number{color:#B35E4D}.cm-s-lesser-dark span.cm-def{color:white}.cm-s-lesser-dark span.cm-variable{color:#D9BF8C}.cm-s-lesser-dark span.cm-variable-2{color:#669199}.cm-s-lesser-dark span.cm-variable-3{color:white}.cm-s-lesser-dark span.cm-property{color:#92A75C}.cm-s-lesser-dark span.cm-operator{color:#92A75C}.cm-s-lesser-dark span.cm-comment{color:#666}.cm-s-lesser-dark span.cm-string{color:#BCD279}.cm-s-lesser-dark span.cm-string-2{color:#f50}.cm-s-lesser-dark span.cm-meta{color:#738C73}.cm-s-lesser-dark span.cm-error{color:#9d1e15}.cm-s-lesser-dark span.cm-qualifier{color:#555}.cm-s-lesser-dark span.cm-builtin{color:#ff9e59}.cm-s-lesser-dark span.cm-bracket{color:#EBEFE7}.cm-s-lesser-dark span.cm-tag{color:#669199}.cm-s-lesser-dark span.cm-attribute{color:#30b4d9}.cm-s-lesser-dark span.cm-header{color:#a0a}.cm-s-lesser-dark span.cm-quote{color:#090}.cm-s-lesser-dark span.cm-hr{color:#999}.cm-s-lesser-dark span.cm-link{color:#30b4d9}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483E !important}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0 !important}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom{color:#ae81ff}.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-property,.cm-s-monokai span.cm-attribute{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#a6e22e}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-xq-light span.cm-keyword{line-height:1em;font-weight:700;color:#5A5CAD}.cm-s-xq-light span.cm-atom{color:#6C8CD5}.cm-s-xq-light span.cm-number{color:#164}.cm-s-xq-light span.cm-def{text-decoration:underline}.cm-s-xq-light span.cm-variable{color:black}.cm-s-xq-light span.cm-variable-2{color:black}.cm-s-xq-light span.cm-variable-3{color:black}.cm-s-xq-light span.cm-property{}.cm-s-xq-light span.cm-operator{}.cm-s-xq-light span.cm-comment{color:#0080FF;font-style:italic}.cm-s-xq-light span.cm-string{color:red}.cm-s-xq-light span.cm-meta{color:yellow}.cm-s-xq-light span.cm-error{color:#f00}.cm-s-xq-light span.cm-qualifier{color:grey}.cm-s-xq-light span.cm-builtin{color:#7EA656}.cm-s-xq-light span.cm-bracket{color:#cc7}.cm-s-xq-light span.cm-tag{color:#3F7F7F}.cm-s-xq-light span.cm-attribute{color:#7F007F}.cm-s-xq-light .CodeMirror-activeline-background{background:#e8f2ff !important}.cm-s-xq-light .CodeMirror-matchingbracket{border:1px solid grey;color:black !important;background:yellow}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}[class*="gspan"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.gspan12{width:940px}.gspan11{width:860px}.gspan10{width:780px}.gspan9{width:700px}.gspan8{width:620px}.gspan7{width:540px}.gspan6{width:460px}.gspan5{width:380px}.gspan4{width:300px}.gspan3{width:220px}.gspan2{width:140px}.gspan1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.fluid-row{width:100%;*zoom:1}.fluid-row:before,.fluid-row:after{display:table;content:"";line-height:0}.fluid-row:after{clear:both}.fluid-row [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%}.fluid-row [class*="span"]:first-child{margin-left:0}.fluid-row .controls-row [class*="span"] + [class*="span"]{margin-left:2.127659574468085%}.fluid-row .gspan12{width:100%;*width:99.94680851063829%}.fluid-row .gspan11{width:91.48936170212765%;*width:91.43617021276594%}.fluid-row .gspan10{width:82.97872340425532%;*width:82.92553191489361%}.fluid-row .gspan9{width:74.46808510638297%;*width:74.41489361702126%}.fluid-row .gspan8{width:65.95744680851064%;*width:65.90425531914893%}.fluid-row .gspan7{width:57.44680851063829%;*width:57.39361702127659%}.fluid-row .gspan6{width:48.93617021276595%;*width:48.88297872340425%}.fluid-row .gspan5{width:40.42553191489362%;*width:40.37234042553192%}.fluid-row .gspan4{width:31.914893617021278%;*width:31.861702127659576%}.fluid-row .gspan3{width:23.404255319148934%;*width:23.351063829787233%}.fluid-row .gspan2{width:14.893617021276595%;*width:14.840425531914894%}.fluid-row .gspan1{width:6.382978723404255%;*width:6.329787234042553%}.fluid-row .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.fluid-row .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.fluid-row .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.fluid-row .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.fluid-row .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.fluid-row .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.fluid-row .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.fluid-row .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.fluid-row .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.fluid-row .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.fluid-row .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.fluid-row .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.fluid-row .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.fluid-row .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.fluid-row .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.fluid-row .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.fluid-row .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.fluid-row .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.fluid-row .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.fluid-row .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.fluid-row .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.fluid-row .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.fluid-row .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.fluid-row .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.fluid-row [class*="span"].hide{display:none}[class*="span"].pull-right,.fluid-row [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;content:"";line-height:0}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0}.container-fluid:after{clear:both}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none !important}.visible-tablet{display:none !important}.hidden-desktop{display:none !important}.visible-desktop{display:inherit !important}@media (min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit !important}.visible-desktop{display:none !important}.visible-tablet{display:inherit !important}.hidden-tablet{display:none !important}}@media (max-width:767px){.hidden-desktop{display:inherit !important}.visible-desktop{display:none !important}.visible-phone{display:inherit !important}.hidden-phone{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:inherit !important}.hidden-print{display:none !important}}@media (max-width:767px){body{padding-left:20px;padding-right:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-left:-20px;margin-right:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;clear:none;width:auto;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.fluid-row{width:100%}.row,.thumbnails{margin-left:0}.thumbnails > li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.fluid-row [class*="span"]{float:none;display:block;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.gspan12,.fluid-row .gspan12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fluid-row [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"] + [class*="span"]{margin-left:0}.modal{position:fixed;top:20px;left:20px;right:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .action-row{padding-left:10px;padding-right:10px}.media .pull-left,.media .pull-right{float:none;display:block;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;left:10px;right:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.gspan12{width:724px}.gspan11{width:662px}.gspan10{width:600px}.gspan9{width:538px}.gspan8{width:476px}.gspan7{width:414px}.gspan6{width:352px}.gspan5{width:290px}.gspan4{width:228px}.gspan3{width:166px}.gspan2{width:104px}.gspan1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.fluid-row{width:100%;*zoom:1}.fluid-row:before,.fluid-row:after{display:table;content:"";line-height:0}.fluid-row:after{clear:both}.fluid-row [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%}.fluid-row [class*="span"]:first-child{margin-left:0}.fluid-row .controls-row [class*="span"] + [class*="span"]{margin-left:2.7624309392265194%}.fluid-row .gspan12{width:100%;*width:99.94680851063829%}.fluid-row .gspan11{width:91.43646408839778%;*width:91.38327259903608%}.fluid-row .gspan10{width:82.87292817679558%;*width:82.81973668743387%}.fluid-row .gspan9{width:74.30939226519337%;*width:74.25620077583166%}.fluid-row .gspan8{width:65.74585635359117%;*width:65.69266486422946%}.fluid-row .gspan7{width:57.18232044198895%;*width:57.12912895262725%}.fluid-row .gspan6{width:48.61878453038674%;*width:48.56559304102504%}.fluid-row .gspan5{width:40.05524861878453%;*width:40.00205712942283%}.fluid-row .gspan4{width:31.491712707182323%;*width:31.43852121782062%}.fluid-row .gspan3{width:22.92817679558011%;*width:22.87498530621841%}.fluid-row .gspan2{width:14.3646408839779%;*width:14.311449394616199%}.fluid-row .gspan1{width:5.801104972375691%;*width:5.747913483013988%}.fluid-row .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.fluid-row .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.fluid-row .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.fluid-row .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.fluid-row .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.fluid-row .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.fluid-row .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.fluid-row .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.fluid-row .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.fluid-row .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.fluid-row .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.fluid-row .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.fluid-row .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.fluid-row .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.fluid-row .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.fluid-row .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.fluid-row .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.fluid-row .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.fluid-row .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.fluid-row .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.fluid-row .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.fluid-row .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.fluid-row .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.fluid-row .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"] + [class*="span"]{margin-left:20px}input.gspan12,textarea.gspan12,.uneditable-input.gspan12{width:710px}input.gspan11,textarea.gspan11,.uneditable-input.gspan11{width:648px}input.gspan10,textarea.gspan10,.uneditable-input.gspan10{width:586px}input.gspan9,textarea.gspan9,.uneditable-input.gspan9{width:524px}input.gspan8,textarea.gspan8,.uneditable-input.gspan8{width:462px}input.gspan7,textarea.gspan7,.uneditable-input.gspan7{width:400px}input.gspan6,textarea.gspan6,.uneditable-input.gspan6{width:338px}input.gspan5,textarea.gspan5,.uneditable-input.gspan5{width:276px}input.gspan4,textarea.gspan4,.uneditable-input.gspan4{width:214px}input.gspan3,textarea.gspan3,.uneditable-input.gspan3{width:152px}input.gspan2,textarea.gspan2,.uneditable-input.gspan2{width:90px}input.gspan1,textarea.gspan1,.uneditable-input.gspan1{width:28px}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;content:"";line-height:0}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.gspan12{width:1170px}.gspan11{width:1070px}.gspan10{width:970px}.gspan9{width:870px}.gspan8{width:770px}.gspan7{width:670px}.gspan6{width:570px}.gspan5{width:470px}.gspan4{width:370px}.gspan3{width:270px}.gspan2{width:170px}.gspan1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.fluid-row{width:100%;*zoom:1}.fluid-row:before,.fluid-row:after{display:table;content:"";line-height:0}.fluid-row:after{clear:both}.fluid-row [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%}.fluid-row [class*="span"]:first-child{margin-left:0}.fluid-row .controls-row [class*="span"] + [class*="span"]{margin-left:2.564102564102564%}.fluid-row .gspan12{width:100%;*width:99.94680851063829%}.fluid-row .gspan11{width:91.45299145299145%;*width:91.39979996362975%}.fluid-row .gspan10{width:82.90598290598291%;*width:82.8527914166212%}.fluid-row .gspan9{width:74.35897435897436%;*width:74.30578286961266%}.fluid-row .gspan8{width:65.81196581196582%;*width:65.75877432260411%}.fluid-row .gspan7{width:57.26495726495726%;*width:57.21176577559556%}.fluid-row .gspan6{width:48.717948717948715%;*width:48.664757228587014%}.fluid-row .gspan5{width:40.17094017094017%;*width:40.11774868157847%}.fluid-row .gspan4{width:31.623931623931625%;*width:31.570740134569924%}.fluid-row .gspan3{width:23.076923076923077%;*width:23.023731587561375%}.fluid-row .gspan2{width:14.52991452991453%;*width:14.476723040552828%}.fluid-row .gspan1{width:5.982905982905983%;*width:5.929714493544281%}.fluid-row .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.fluid-row .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.fluid-row .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.fluid-row .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.fluid-row .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.fluid-row .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.fluid-row .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.fluid-row .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.fluid-row .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.fluid-row .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.fluid-row .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.fluid-row .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.fluid-row .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.fluid-row .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.fluid-row .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.fluid-row .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.fluid-row .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.fluid-row .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.fluid-row .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.fluid-row .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.fluid-row .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.fluid-row .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.fluid-row .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.fluid-row .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"] + [class*="span"]{margin-left:30px}input.gspan12,textarea.gspan12,.uneditable-input.gspan12{width:1156px}input.gspan11,textarea.gspan11,.uneditable-input.gspan11{width:1056px}input.gspan10,textarea.gspan10,.uneditable-input.gspan10{width:956px}input.gspan9,textarea.gspan9,.uneditable-input.gspan9{width:856px}input.gspan8,textarea.gspan8,.uneditable-input.gspan8{width:756px}input.gspan7,textarea.gspan7,.uneditable-input.gspan7{width:656px}input.gspan6,textarea.gspan6,.uneditable-input.gspan6{width:556px}input.gspan5,textarea.gspan5,.uneditable-input.gspan5{width:456px}input.gspan4,textarea.gspan4,.uneditable-input.gspan4{width:356px}input.gspan3,textarea.gspan3,.uneditable-input.gspan3{width:256px}input.gspan2,textarea.gspan2,.uneditable-input.gspan2{width:156px}input.gspan1,textarea.gspan1,.uneditable-input.gspan1{width:56px}.thumbnails{margin-left:-30px}.thumbnails > li{margin-left:30px}.fluid-row .thumbnails{margin-left:0}}.sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:2147483647;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear,0 0,100% 0,from(#FFF),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left,#FFF,rgba(204,154,129,0));background-image:-moz-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-o-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-ms-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:linear-gradient(to right,#fff,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1,startColorstr=#FFFFFFFF,endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1,startColorstr='#FFFFFFFF',endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear,0 100%,0 0,from(#000000),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom,#000000,rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-o-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:linear-gradient(to top,#000,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81,endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81',endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top,#ff0000 0,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%);background:-ms-linear-gradient(top,#ff0000 0,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%);background:-o-linear-gradient(top,#ff0000 0,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%);background:-webkit-gradient(linear,left top,left bottom,from(#ff0000),color-stop(0.17,#ffff00),color-stop(0.33,#00ff00),color-stop(0.5,#00ffff),color-stop(0.67,#0000ff),color-stop(0.83,#ff00ff),to(#ff0000));background:-webkit-linear-gradient(top,#ff0000 0,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000',endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00',endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00',endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff',endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff',endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff',endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width:480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue{font:400 12px "Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top,#eeeeee,#cccccc);background-image:-moz-linear-gradient(top,#eeeeee,#cccccc);background-image:-ms-linear-gradient(top,#eeeeee,#cccccc);background-image:-o-linear-gradient(top,#eeeeee,#cccccc);background-image:-ms-linear-gradient(top,#eeeeee,#cccccc);background-image:linear-gradient(to bottom,#eeeeee,#cccccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top,#dddddd,#bbbbbb);background-image:-moz-linear-gradient(top,#dddddd,#bbbbbb);background-image:-ms-linear-gradient(top,#dddddd,#bbbbbb);background-image:-o-linear-gradient(top,#dddddd,#bbbbbb);background-image:-ms-linear-gradient(top,#dddddd,#bbbbbb);background-image:linear-gradient(to bottom,#dddddd,#bbbbbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa,0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa,0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa,0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa,0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa,0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.CodeMirror{font-family:monospace;height:300px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7}.CodeMirror-linenumbers{}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid black;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite{}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:black}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:black}.cm-s-default .cm-operator{color:black}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-error{color:#f00}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-invalidchar{color:#f00}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:white;color:black}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;padding-right:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0;z-index:6}.CodeMirror-gutters{position:absolute;left:0;top:0;height:100%;padding-bottom:30px;z-index:3}.CodeMirror-gutter{height:100%;padding-bottom:30px;margin-bottom:-32px;display:inline-block;*zoom:1;*display:inline}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-widget{display:inline-block}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-right:none;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}}.codesync-editor.static-height{width:100%;margin:0;padding:0;position:relative;z-index:0}.codesync-editor.static-height .status-message{position:absolute;top:50%;width:50%;margin:0 auto;z-index:8000;padding:6px;border-radius:3px;box-shadow:0 0 3px #fff;color:#fff}.codesync-editor.static-height .status-message.error{background-color:rgba(235,90,90,0.3)}.codesync-editor.static-height .status-message.success{background-color:rgba(90,235,90,0.3)}.codesync-editor.static-height.top-positioned,.codesync-editor.static-height.bottom-positioned{position:fixed;z-index:30000;width:100%;opacity:.9}.codesync-editor.static-height.top-positioned{bottom:auto;top:0}.codesync-editor.static-height.top-positioned .toolbar-wrapper{top:10px;right:10px}.codesync-editor.static-height.top-positioned .codemirror-wrapper{top:0;bottom:auto;position:static}.codesync-editor.static-height.top-positioned .document-tabs{top:auto;bottom:-8px;position:static}.codesync-editor.static-height.top-positioned .document-tabs .document-tab{border-radius:0 0 4px 4px}.codesync-editor.static-height.bottom-positioned{border-radius:4px 4px 0 0;bottom:0}.codesync-editor.static-height.bottom-positioned .codemirror-wrapper{position:absolute;top:34px;bottom:auto;width:100%}.codesync-editor.static-height.bottom-positioned .toolbar-wrapper{top:45px;right:10px}.codesync-editor.static-height.bottom-positioned .document-tabs{position:absolute;top:0;bottom:auto;width:100%}.codesync-editor.static-height.bottom-positioned .document-tabs .document-tab{border-radius:4px 4px 0 0}.codesync-editor[data-theme="xq-light"] .toolbar-wrapper .button{background-color:#777;color:#ffffff}.codesync-editor[data-theme="xq-light"] .document-tabs-container .document-tab{background-color:#fff;color:#777}.codesync-editor[data-theme="xq-light"] .status-message.error{color:#ff6666}.editor-panel-toolbar{position:absolute;width:100%;font-size:14px;line-height:22px}.editor-panel-toolbar .codesync-canvas-toolbar{width:98%;margin:0 auto}.editor-panel-toolbar .controls,.toolbar-wrapper .controls{color:rgba(225,225,225,0.6)}.editor-panel-toolbar .controls ul,.toolbar-wrapper .controls ul{line-height:36px}.editor-panel-toolbar .controls ul li,.toolbar-wrapper .controls ul li{padding:8px !important}.editor-panel-toolbar .controls ul li.label,.toolbar-wrapper .controls ul li.label{text-decoration:underline;text-align:center;font-weight:700}.editor-panel-toolbar .controls ul li[data-option],.toolbar-wrapper .controls ul li[data-option]{padding:0 6px}.editor-panel-toolbar .controls ul li:last-child,.toolbar-wrapper .controls ul li:last-child{border:0}.editor-panel-toolbar #canvas-url-control .button .toggle-control,.toolbar-wrapper #canvas-url-control .button .toggle-control{width:100% !important;margin-left:8px}.editor-panel-toolbar #canvas-url-control .button .controls,.toolbar-wrapper #canvas-url-control .button .controls{width:140px}.editor-panel-toolbar #canvas-url-control ul li.input-wrapper,.toolbar-wrapper #canvas-url-control ul li.input-wrapper{width:300px}.editor-panel-toolbar #canvas-url-control ul li.input-wrapper input,.toolbar-wrapper #canvas-url-control ul li.input-wrapper input{width:50%;border-radius:4px}.codesync-editor-panel .editor-panel-toolbar{position:absolute;top:475px;width:100%;height:30px;z-index:1}.codesync-editor-panel .editor-panel-toolbar .controls{margin:0;padding:0;color:rgba(255,255,255,0.8)}.codesync-editor-panel .editor-panel-toolbar .controls ul{width:100%;display:block;margin:0;padding:0}.codesync-editor-panel .editor-panel-toolbar .controls ul li{display:inline;margin:0;padding:0;cursor:pointer}.codesync-editor-panel .editor-panel-toolbar .controls ul li.active{font-weight:700}.codesync-editor-panel{position:relative;top:0;left:0}.codesync-editor-panel .editor-wrapper .editor{position:absolute;height:500px;width:33.33333%;height:100%;top:0}.codesync-editor-panel .editor-wrapper .editor .toolbar-wrapper{width:100%;top:0;height:30px;padding-left:30px;line-height:30px;font-size:15px}.codesync-editor-panel .editor-wrapper .editor .codemirror-wrapper{height:470px;bottom:0}.codesync-editor-panel .editor-wrapper .editor .codemirror-wrapper .CodeMirror{height:440px;top:30px;bottom:0;width:100%;position:absolute}.codesync-editor-panel .editor-wrapper .editor[data-editor="0"]{left:0}.codesync-editor-panel .editor-wrapper .editor[data-editor="1"]{left:33.333333%}.codesync-editor-panel .editor-wrapper .editor[data-editor="2"]{left:66.666666%}.codesync-editor-panel[data-layout="1"] .editor-wrapper .editor[data-editor="0"]{display:block;width:100%}.codesync-editor-panel[data-layout="1"] .editor-wrapper .editor[data-editor="1"]{display:none}.codesync-editor-panel[data-layout="1"] .editor-wrapper .editor[data-editor="2"]{display:none}.codesync-editor-panel[data-layout="2"] .editor-wrapper .editor[data-editor="0"]{display:block;width:50%}.codesync-editor-panel[data-layout="2"] .editor-wrapper .editor[data-editor="1"]{display:block;left:50%;width:50%}.codesync-editor-panel[data-layout="2"] .editor-wrapper .editor[data-editor="2"]{display:none}.codesync-editor-panel[data-layout="3"] .editor-wrapper .editor[data-editor="0"]{display:block;width:33.333333%}.codesync-editor-panel[data-layout="3"] .editor-wrapper .editor[data-editor="1"]{display:block;left:33.333333%;width:33.333333%}.codesync-editor-panel[data-layout="3"] .editor-wrapper .editor[data-editor="2"]{display:block;width:33.333333%}.editor-utility{min-width:450px;max-width:600px}.editor-utility .control-group textarea{border-radius:4px}.editor-utility.top-aligned{top:40px;left:40px}.editor-utility.bottom-aligned{top:140px;left:40px}.editor-utility{background:rgba(30,30,30,0.8);border-radius:4px;box-shadow:0 0 6px rgba(225,225,225,0.6);color:rgba(255,255,255,0.8);max-width:600px;color:rgba(255,255,255,0.8);padding:20px;position:absolute;z-index:9000}.editor-utility label{color:rgba(255,255,255,0.8);text-decoration:underline;display:block}.editor-utility .form-control{padding:20px}.editor-utility .form-control .control-group label{margin-bottom:11px;font-weight:700}.editor-utility .form-control .control-group textarea{width:80%;resize:none;min-height:100px}.editor-utility .form-control .form-control-actions{padding-top:11px;clear:both;width:100%}.editor-utility .form-control .form-control-actions .btn{background-color:rgba(225,225,225,0.6);font-weight:700;cursor:pointer}.editor-utility .form-control-actions a.btn{margin-right:4px}.editor-utility .results .control-group input{width:80%}.editor-utility ul.results-container{padding:0;margin:20px 0}.editor-utility ul.results-container li{list-style-type:none;margin:0;padding:0}.toolbar-wrapper .right{padding-right:30px}.toolbar-wrapper .right .button{float:right;padding-right:5px;cursor:pointer}.btn-primary{background:linear-gradient(#4067c5,#192a53) !important;text-shadow:1px 1px rgba(30,30,30,0.8)}.btn{border-radius:4px;text-align:center;font-size:14px;line-height:22px;padding:8.8px}.btn-group{margin-top:12px;float:left;width:100%;clear:both}.btn-group .btn{float:left;padding-right:8px;cursor:pointer}.codesync-asset-selector{background:rgba(30,30,30,0.8)}.codesync-asset-selector input{width:100%;border-radius:4px;padding:4px}.codesync-asset-selector .search-results-wrapper{width:100%;margin:0 auto;padding:0;border-radius:0 0 4px 4px}.codesync-asset-selector .search-results-wrapper .search-result.active{background-color:#bada55}.codesync-asset-selector .search-results-wrapper .search-result{border-left:1px solid rgba(225,225,225,0.6);border-right:1px solid rgba(225,225,225,0.6);padding:8px;border-bottom:1px dashed rgba(225,225,225,0.7)}.codesync-asset-selector .search-results-wrapper .search-result:last-child{border-bottom:1px solid rgba(225,225,225,0.6);border-radius:0 0 4px 4px}.codesync-color-picker{position:absolute;top:15px;right:15px;border-radius:4px}.codesync-editor .document-tabs-container .document-tab{font-size:12px;float:left;border:1px solid #777;padding:2px 10px;border-radius:0 0 4px 4px;cursor:pointer;background:rgba(40,40,40,0.9);box-shadow:0 0 3px rgba(0,0,0,0.3);color:#fff;height:28px;margin-right:2px;max-width:200px;overflow:hidden}.codesync-editor .document-tabs-container .document-tab .close-anchor{display:none}.codesync-editor .document-tabs-container .document-tab.closable{min-width:60px}.codesync-editor .document-tabs-container .document-tab.closable .contents{float:left;clear:left;width:80%}.codesync-editor .document-tabs-container .document-tab.closable .close-anchor{display:block;float:right;width:10%;clear:right}.codesync-editor .document-tabs-container .document-tab.new-document{margin-right:0}.codesync-editor .document-tabs-container .document-tab.new-document{float:right}.codesync-editor .document-tabs-container .document-tab.open-document{float:right}.element-sync-panel .selector-info input{width:90%;border-radius:4px;padding:4px}.file-controls{color:rgba(255,255,255,0.8);height:auto !important;min-height:auto !important}.file-controls .form-control{padding:10px}.file-controls .controls input{width:100%}.card-view .card{display:none}.card-view .card.active{display:block} \ No newline at end of file