Slider by Soliloquy – Responsive Image Slider for WordPress - Version 2.5.1

Version Description

  • Fix: PHP optimizations to improve performance.
  • Fix: Cases where Media library images werent being inserted.
  • Fix: Minor bug fixes.
Download this release

Release Info

Developer chrisakelley
Plugin Icon 128x128 Slider by Soliloquy – Responsive Image Slider for WordPress
Version 2.5.1
Comparing to
See all releases

Code changes from version 2.5.2.8 to 2.5.1

Files changed (86) hide show
  1. assets/js/media-insert.js +1 -1
  2. assets/js/min/metabox-min.js +1 -1
  3. includes/global/shortcode.php +26 -25
  4. readme.txt +4 -0
  5. soliloquy-lite.php +6 -6
  6. trunk/assets/css/addons.css +0 -901
  7. trunk/assets/css/attachment-details-modal-support.css +0 -0
  8. trunk/assets/css/chosen-sprite.png +0 -0
  9. trunk/assets/css/chosen-sprite@2x.png +0 -0
  10. trunk/assets/css/codemirror.css +0 -67
  11. trunk/assets/css/fonts.css +0 -51
  12. trunk/assets/css/global.css +0 -0
  13. trunk/assets/css/images/blank.gif +0 -0
  14. trunk/assets/css/images/circle-hover.png +0 -0
  15. trunk/assets/css/images/circle-hover@2x.png +0 -0
  16. trunk/assets/css/images/circle.png +0 -0
  17. trunk/assets/css/images/circle@2x.png +0 -0
  18. trunk/assets/css/images/delete.png +0 -0
  19. trunk/assets/css/images/delete@2x.png +0 -0
  20. trunk/assets/css/images/down.png +0 -0
  21. trunk/assets/css/images/down@2x.png +0 -0
  22. trunk/assets/css/images/editor-icon.png +0 -0
  23. trunk/assets/css/images/editor-icon@2x.png +0 -0
  24. trunk/assets/css/images/holder.gif +0 -0
  25. trunk/assets/css/images/left.png +0 -0
  26. trunk/assets/css/images/left@2x.png +0 -0
  27. trunk/assets/css/images/menu-icon.png +0 -0
  28. trunk/assets/css/images/menu-icon@2x.png +0 -0
  29. trunk/assets/css/images/meta-active.png +0 -0
  30. trunk/assets/css/images/meta-active@2x.png +0 -0
  31. trunk/assets/css/images/meta.png +0 -0
  32. trunk/assets/css/images/meta@2x.png +0 -0
  33. trunk/assets/css/images/modify.png +0 -0
  34. trunk/assets/css/images/modify@2x.png +0 -0
  35. trunk/assets/css/images/pause.png +0 -0
  36. trunk/assets/css/images/pause@2x.png +0 -0
  37. trunk/assets/css/images/play.png +0 -0
  38. trunk/assets/css/images/play@2x.png +0 -0
  39. trunk/assets/css/images/preloader.gif +0 -0
  40. trunk/assets/css/images/preloader@2x.gif +0 -0
  41. trunk/assets/css/images/right.png +0 -0
  42. trunk/assets/css/images/right@2x.png +0 -0
  43. trunk/assets/css/images/up.png +0 -0
  44. trunk/assets/css/images/up@2x.png +0 -0
  45. trunk/assets/css/images/video-mini.png +0 -0
  46. trunk/assets/css/images/video.png +0 -0
  47. trunk/assets/css/images/video@2x.png +0 -0
  48. trunk/assets/css/media-edit.css +0 -4
  49. trunk/assets/css/metabox.css +0 -11
  50. trunk/assets/css/modal.css +0 -1
  51. trunk/assets/css/overview.css +0 -11
  52. trunk/assets/css/settings.css +0 -820
  53. trunk/assets/css/soliloquy.css +0 -334
  54. trunk/assets/fonts/soliloquy.eot +0 -0
  55. trunk/assets/fonts/soliloquy.svg +0 -1
  56. trunk/assets/fonts/soliloquy.ttf +0 -0
  57. trunk/assets/fonts/soliloquy.woff +0 -0
  58. trunk/assets/images/fc.png +0 -0
  59. trunk/assets/images/html.png +0 -0
  60. trunk/assets/images/instagram.png +0 -0
  61. trunk/assets/images/logo-color.png +0 -0
  62. trunk/assets/images/soliloquy-logo.png +0 -0
  63. trunk/assets/images/video.png +0 -0
  64. trunk/assets/images/vimeo.png +0 -0
  65. trunk/assets/images/wistia.png +0 -0
  66. trunk/assets/images/woo.png +0 -0
  67. trunk/assets/images/youtube.png +0 -0
  68. trunk/assets/js/addons.js +0 -432
  69. trunk/assets/js/codemirror.js +0 -12
  70. trunk/assets/js/editor.js +0 -123
  71. trunk/assets/js/lib/bxslider.js +0 -1482
  72. trunk/assets/js/lib/chosen.jquery.js +0 -1284
  73. trunk/assets/js/lib/clipboard.js +0 -736
  74. trunk/assets/js/lib/codemirror.js +0 -12
  75. trunk/assets/js/lib/mousewheel.js +0 -221
  76. trunk/assets/js/media-delete.js +0 -139
  77. trunk/assets/js/media-edit-bulk.js +0 -365
  78. trunk/assets/js/media-edit.js +0 -580
  79. trunk/assets/js/media-insert.js +0 -151
  80. trunk/assets/js/media-manage.js +0 -511
  81. trunk/assets/js/media-upload.js +0 -109
  82. trunk/assets/js/metabox.js +0 -13
  83. trunk/assets/js/min/addons-min.js +0 -1
  84. trunk/assets/js/min/chosen.jquery-min.js +0 -1
  85. trunk/assets/js/min/clipboard-min.js +0 -1
  86. trunk/assets/js/min/codemirror-min.js +0 -8
assets/js/media-insert.js CHANGED
@@ -103,7 +103,7 @@ jQuery( document ).ready( function( $ ) {
103
  action: 'soliloquy_insert_slides',
104
  nonce: soliloquy_metabox.insert_nonce,
105
  post_id: soliloquy_metabox.id,
106
- images: JSON.stringify(images),
107
  },
108
  function( response ) {
109
  // Response should be a JSON success with the HTML for the image grid
103
  action: 'soliloquy_insert_slides',
104
  nonce: soliloquy_metabox.insert_nonce,
105
  post_id: soliloquy_metabox.id,
106
+ images: JSON.stringify( images ),
107
  },
108
  function( response ) {
109
  // Response should be a JSON success with the HTML for the image grid
assets/js/min/metabox-min.js CHANGED
@@ -1 +1 @@
1
- function SoliloquySlidesUpdate(e){SoliloquySlides.reset();var t="ul#soliloquy-output li.soliloquy-slide"+(e?".selected":"");jQuery(t).each(function(){var e=jQuery.parseJSON(jQuery(this).attr("data-soliloquy-image-model"));SoliloquySlides.add(new SoliloquySlide(e))})}var SoliloquySlide=Backbone.Model.extend({defaults:{id:"",title:"",caption:"",alt:"",link:"",type:""}}),SoliloquySlides=new Backbone.Collection,SoliloquyModalWindow=new wp.media.view.Modal({controller:{trigger:function(){}}}),SoliloquyView=wp.Backbone.View.extend({id:"soliloquy-meta-edit",tagName:"div",className:"edit-attachment-frame mode-select hide-menu hide-router",template:wp.template("soliloquy-meta-editor"),events:{"click .edit-media-header .left":"loadPreviousItem","click .edit-media-header .right":"loadNextItem","keyup input":"updateItem","keyup textarea":"updateItem","change input":"updateItem","change textarea":"updateItem","keyup .CodeMirror":"updateCode","blur textarea":"updateItem","change select":"updateItem","click a.soliloquy-meta-submit":"saveItem","keyup input#link-search":"searchLinks","click div.query-results li":"insertLink","click a.soliloquy-thumbnail":"insertThumb","click a.soliloquy-thumbnail-delete":"removeThumb","click button.media-file":"insertMediaFileLink","click button.attachment-page":"insertAttachmentPageLink"},initialize:function(e){this.is_loading=!1,this.collection=e.collection,this.child_views=e.child_views,this.attachment_id=e.attachment_id,this.attachment_index=0,this.search_timer="";var t=0;this.collection.each(function(e){return String(e.get("id"))==String(this.attachment_id)?(this.model=e,this.attachment_index=t,!1):void t++},this)},updateCode:function(e){$model=this.model,$textarea=this.$el.find(".soliloquy-html-slide-code"),$model.set("code",this.editor.getValue(),{silent:!0}),$textarea.text()},insertThumb:function(e){$model=this.model,e.preventDefault();var t=this.$el.data("field"),i=wp.media.frames.soliloquy_media_frame=wp.media({className:"media-frame soliloquy-media-frame",frame:"select",multiple:!1,title:soliloquy_metabox.videoframe,library:{type:"image"},button:{text:soliloquy_metabox.videouse}});i.on("select",function(){var e=i.state().get("selection").first().toJSON();$model.set("src",e.url,{silent:!0}),jQuery("div.thumbnail > img",$parent.find(".media-frame-content")).attr("src",e.url)}),i.open()},removeThumb:function(e){e.preventDefault(),$model=this.model,$parent=this.$el.parent(),jQuery("div.thumbnail > img",$parent.find(".media-frame-content")).attr("src",""),$model.set("src","",{silent:!0})},render:function(){return this.$el.html(this.template(this.model.attributes)),this.child_views.length>0&&this.child_views.forEach(function(e){var t=new e({model:this.model});this.$el.find("div.addons").append(t.render().el)},this),this.$el.find("textarea[name=caption]").val(this.model.get("caption")),setTimeout(function(){quicktags({id:"caption",buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()},500),wpLink.init,0===this.attachment_index&&this.$el.find("button.left").addClass("disabled"),this.attachment_index==this.collection.length-1&&this.$el.find("button.right").addClass("disabled"),textarea=this.$el.find(".soliloquy-html-slide-code"),textarea.length&&(this.editor=CodeMirror.fromTextArea(textarea[0],{enterMode:"keep",indentUnit:4,electricChars:!1,lineNumbers:!0,lineWrapping:!0,matchBrackets:!0,mode:"php",smartIndent:!1,tabMode:"shift",theme:"ttcn"})),this.$el.trigger("soliloquyRenderMeta"),this},loading:function(){this.is_loading=!0,this.$el.find(".spinner").css("visibility","visible")},loaded:function(e){this.is_loading=!1,this.$el.find(".spinner").css("visibility","hidden"),"undefined"!=typeof e&&alert(e)},loadPreviousItem:function(){this.attachment_index--,this.model=this.collection.at(this.attachment_index),this.attachment_id=this.model.get("id"),this.render()},loadNextItem:function(){this.attachment_index++,this.model=this.collection.at(this.attachment_index),this.attachment_id=this.model.get("id"),this.render()},updateItem:function(e){""!=e.target.name&&("checkbox"==e.target.type?value=e.target.checked?1:0:value=e.target.value,this.model.set(e.target.name,value))},saveItem:function(e){e.preventDefault(),this.trigger("loading"),wp.media.ajax("soliloquy_save_meta",{context:this,data:{nonce:soliloquy_metabox.save_nonce,post_id:soliloquy_metabox.id,attach_id:this.model.get("id"),meta:this.model.attributes},success:function(e){this.trigger("loaded loaded:success");var t=JSON.stringify(this.model.attributes);jQuery("ul#soliloquy-output li#"+this.model.get("id")).attr("data-soliloquy-image-model",t);var i=this.$el.find(".saved");i.fadeIn(),setTimeout(function(){i.fadeOut()},1500)},error:function(e){this.trigger("loaded loaded:error",e)}})},searchLinks:function(e){},insertLink:function(e){},insertMediaFileLink:function(e){this.trigger("loading"),wp.media.ajax("soliloquy_get_attachment_links",{context:this,data:{nonce:soliloquy_metabox.save_nonce,attachment_id:this.model.get("id")},success:function(e){this.model.set("link",e.media_link),this.trigger("loaded loaded:success"),this.render()},error:function(e){this.trigger("loaded loaded:error",e)}})},insertAttachmentPageLink:function(e){this.trigger("loading"),wp.media.ajax("soliloquy_get_attachment_links",{context:this,data:{nonce:soliloquy_metabox.save_nonce,attachment_id:this.model.get("id")},success:function(e){this.model.set("link",e.attachment_page),this.trigger("loaded loaded:success"),this.render()},error:function(e){this.trigger("loaded loaded:error",e)}})}}),SoliloquyChildViews=[],SoliloquyContentViews=[];!function($){$(document).ready(function(){soliloquy_edit={init:function(){SoliloquySlidesUpdate(),$("#soliloquy-settings-content").on("click.soliloquyModify",".soliloquy-modify-slide",function(e){e.preventDefault();var t=$(this).parent().data("soliloquy-slide");SoliloquyModalWindow.content(new SoliloquyView({collection:SoliloquySlides,child_views:SoliloquyChildViews,attachment_id:t})),SoliloquyModalWindow.open(),$(".CodeMirror").each(function(e,t){t.CodeMirror.refresh()})})}},soliloquy_edit.init()}),$(document).on("soliloquyUploaded",function(){soliloquy_edit.init()})}(jQuery),jQuery(document).ready(function($){$("a.soliloquy-slides-delete").click(function(e){e.preventDefault();var t=confirm(soliloquy_metabox.remove_multiple);if(!t)return!1;var i=[];$("ul#soliloquy-output > li.selected").each(function(){i.push($(this).attr("id"))});var l={action:"soliloquy_remove_slides",attachment_ids:i,post_id:soliloquy_metabox.id,nonce:soliloquy_metabox.remove_nonce};$.post(soliloquy_metabox.ajax,l,function(e){$("ul#soliloquy-output > li.selected").remove(),$(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-select-all").prop("checked",!1),$(".soliloquy-load-library").attr("data-soliloquy-offset",0).addClass("has-search").trigger("click"),SoliloquySlidesUpdate(!1);var t=$("#soliloquy-output li").length;$(".soliloquy-count").text(t.toString()),0===t&&($(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-slide-header").fadeOut().addClass("soliloquy-hidden"),$("#soliloquy-empty-slider").removeClass("soliloquy-hidden").fadeIn())},"json")}),$("#soliloquy-settings-content ").on("click",".soliloquy-remove-slide",function(e){e.preventDefault();var t=confirm(soliloquy_metabox.remove);if(t){var i=$(this).parent().attr("id"),l={action:"soliloquy_remove_slide",attachment_id:i,post_id:soliloquy_metabox.id,nonce:soliloquy_metabox.remove_nonce};$.post(soliloquy_metabox.ajax,l,function(e){$("#"+i).fadeOut("normal",function(){$(this).remove(),$(".soliloquy-load-library").attr("data-soliloquy-offset",0).addClass("has-search").trigger("click"),SoliloquySlidesUpdate(!1);var e=$("#soliloquy-output li").length;$(".soliloquy-count").text(e.toString()),0===e&&($(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-slide-header").fadeOut().addClass("soliloquy-hidden"),$("#soliloquy-empty-slider").removeClass("soliloquy-hidden").fadeIn())})},"json")}})});var SoliloquyBulkEditImageView=wp.Backbone.View.extend({tagName:"li",className:"attachment",template:wp.template("soliloquy-meta-bulk-editor-slides"),initialize:function(e){this.model=e.model},render:function(){return this.$el.html(this.template(this.model.attributes)),this}}),SoliloquyBulkEditView=wp.Backbone.View.extend({id:"soliloquy-meta-edit-bulk",tagName:"div",className:"edit-attachment-frame mode-select hide-menu hide-router",template:wp.template("soliloquy-meta-bulk-editor"),events:{"keyup input":"updateItem","keyup textarea":"updateItem","change input":"updateItem","change textarea":"updateItem","blur textarea":"updateItem","change select":"updateItem","click .actions a.soliloquy-meta-submit":"saveItem","keyup input#link-search":"searchLinks","click div.query-results li":"insertLink","click button.media-file":"insertMediaFileLink","click button.attachment-page":"insertAttachmentPageLink"},initialize:function(e){this.on("loading",this.loading,this),this.on("loaded",this.loaded,this),this.is_loading=!1,this.collection=e.collection,this.child_views=e.child_views,this.model=new SoliloquySlide},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.collection.forEach(function(e){var t=new SoliloquyBulkEditImageView({model:e});this.$el.find("ul.attachments").append(t.render().el)},this),this.child_views.length>0&&this.child_views.forEach(function(e){var t=new e({model:this.model});this.$el.find("div.addons").append(t.render().el)},this),this.$el.find("textarea[name=caption]").val(this.model.get("caption")),setTimeout(function(){quicktags({id:"caption",buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()},100),wpLink.init,this},renderError:function(e){var t={};t.error=e;var i=new wp.media.view.SoliloquyError({model:t});return i.render().el},loading:function(){this.is_loading=!0,this.$el.find(".spinner").css("visibility","visible")},loaded:function(e){this.is_loading=!1,this.$el.find(".spinner").css("visibility","hidden"),"undefined"!=typeof e&&this.$el.find("ul.attachments").before(this.renderError(e))},updateItem:function(e){""!=e.target.name&&("checkbox"==e.target.type?value=e.target.checked?1:0:value=e.target.value,this.model.set(e.target.name,value))},saveItem:function(){this.trigger("loading");var e=[];this.collection.forEach(function(t){e.push(t.id)},this),wp.media.ajax("soliloquy_bulk_save_meta",{context:this,data:{nonce:soliloquy_metabox.save_nonce,post_id:soliloquy_metabox.id,meta:this.model.attributes,image_ids:e},success:function(e){this.collection.forEach(function(e){for(var t in this.model.attributes)value=this.model.attributes[t],value.length>0&&e.set(t,value);var i=JSON.stringify(e.attributes);jQuery("ul#soliloquy li#"+e.get("id")).attr("data-solioquy-image-model",i),jQuery("ul#soliloquy li#"+e.get("id")+" div.title").text(e.get("title"))},this),this.trigger("loaded loaded:success"),SoliloquyModalWindow.close()},error:function(e){this.trigger("loaded loaded:error",e)}})},insertMediaFileLink:function(e){this.trigger("loading"),this.model.set("link",response.media_link),this.trigger("loaded loaded:success"),this.render()},insertAttachmentPageLink:function(e){this.trigger("loading"),this.model.set("link",response.media_link),this.trigger("loaded loaded:success"),this.render()}});jQuery(document).ready(function($){$("#soliloquy-settings-content").on("click","a.soliloquy-slides-edit",function(e){e.preventDefault(),SoliloquySlidesUpdate(!0),SoliloquyModalWindow.content(new SoliloquyBulkEditView({collection:SoliloquySlides,child_views:SoliloquyChildViews})),SoliloquyModalWindow.open()})}),function($,e,t,i){"use strict";var l={init:function(){this.select_all(),this.sortable(),this.select(),this.display(),this.chosen(),this.slide_size(),this.uploadImage(),this.toggleStatus(),this.tooltip(),this.clear_selected(),new Clipboard(".soliloquy-clipboard"),$("ul#soliloquy-output").on("click","a.check",function(e){e.preventDefault()}),$(".soliloquy-clipboard").on("click",function(e){e.preventDefault()});var e=$("#soliloquy-output li").length;$(".soliloquy-count").text(e.toString()),$("input,select").conditional()},toggleStatus:function(){$("#soliloquy-settings-content").on("click.soliloquyStatus",".soliloquy-slide-status",function(e){if(e.preventDefault(),$(this).hasClass("list-status"))var t=$(this).parent().parent().parent();else var t=$(this).parent();var l=$(this),o=l.data("status"),a=t.find(".soliloquy-slide-status.list-status"),s=t.find(".soliloquy-slide-status.grid-status"),n=l.parent().parent().data("view"),d=l.data("id"),u=s.find("span.dashicons"),r=a.find("span"),c=l.data("soliloquy-tooltip");if("active"===o)var h="pending";else var h="active";var m={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_change_slide_status",post_id:i.id,slide_id:d,status:h,nonce:i.save_nonce},success:function(e){"active"===h?(s.removeClass("soliloquy-draft-slide").addClass("soliloquy-active-slide"),a.removeClass("soliloquy-draft-slide").addClass("soliloquy-active-slide"),u.removeClass("dashicons-hidden").addClass("dashicons-visibility"),r.text(i.active),s.attr("data-soliloquy-tooltip",i.active),a.data("status","active"),s.data("status","active")):(s.removeClass("soliloquy-active-slide").addClass("soliloquy-draft-slide"),a.removeClass("soliloquy-active-slide").addClass("soliloquy-draft-slide"),u.removeClass("dashicons-visibility").addClass("dashicons-hidden"),r.text(i.draft),a.data("status","pending"),s.data("status","pending"),s.attr("data-soliloquy-tooltip",i.draft))},error:function(e,t,i){}};$.ajax(m)})},tooltip:function(){$("[data-soliloquy-tooltip]").on("mouseover",function(e){e.preventDefault();var t=$(this),i=t.data("soliloquy-tooltip")})},select_all:function(){$(".soliloquy-select-all").change(function(){var e=this.checked;if(e){$("ul#soliloquy-output li").addClass("selected"),$(".soliloquy-bulk-actions").fadeIn();var t=$("ul#soliloquy-output li.selected").length;$(".select-all").text(i.selected),$(".soliloquy-count").text(t.toString()),$(".soliloquy-clear-selected").fadeIn()}else{$("ul#soliloquy-output li").removeClass("selected"),$(".soliloquy-bulk-actions").fadeOut();var l=$("ul#soliloquy-output li").length;$(".select-all").text(i.select_all),$(".soliloquy-count").text(l.toString()),$(".soliloquy-clear-selected").fadeOut()}})},sortable:function(){var e=$("#soliloquy-output");e.sortable({containment:"#soliloquy-slider-main",items:"li",cursor:"move",forcePlaceholderSize:!0,placeholder:"dropzone",update:function(t,l){var o={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_sort_images",order:e.sortable("toArray").toString(),post_id:i.id,nonce:i.sort},success:function(e){SoliloquySlidesUpdate()},error:function(e,t,i){}};$.ajax(o)}})},select:function(){var e=!1,l=!1;$("li.soliloquy-slide .soliloquy-item-content, .soliloquy-list li a.check").on("click",function(t){var o=$(this),a=$(this).parent();if(t.preventDefault(),$(a).hasClass("selected")){$(a).removeClass("selected"),l=!1;var s=$("ul#soliloquy-output li.selected").length;if(0!==s)$(".select-all").text(i.selected),$(".soliloquy-count").text(s.toString()),$(".soliloquy-clear-selected").fadeIn();else{var n=$("ul#soliloquy-output li").length;$(".select-all").text(i.select_all),$(".soliloquy-count").text(n.toString()),$(".soliloquy-clear-selected").fadeOut()}}else{if(e&&l!==!1){var d=$("ul#soliloquy-output li").index($(l)),u=$("ul#soliloquy-output li").index($(a)),r=0;if(u>d)for(r=d;u>=r;r++)$("ul#soliloquy-output li:eq( "+r+")").addClass("selected");else for(r=u;d>=r;r++)$("ul#soliloquy-output li:eq( "+r+")").addClass("selected")}$(a).addClass("selected"),l=$(a),s=$("ul#soliloquy-output li.selected").length,$(".soliloquy-clear-selected").fadeIn(),$(".select-all").text(i.selected),$(".soliloquy-count").text(s.toString())}$("ul#soliloquy-output > li.selected").length>0?$(".soliloquy-bulk-actions").fadeIn():$(".soliloquy-bulk-actions").fadeOut()}),$(t).on("keyup keydown",function(t){e=t.shiftKey})},slide_size:function(){$(t).on("change","#soliloquy-config-slider-size",function(){var e=$(this),t=e.val(),l=e.find(":selected").data("soliloquy-width"),o=e.find(":selected").data("soliloquy-height");"default"==t&&($("#soliloquy-config-slider-width").val(i.slide_width),$("#soliloquy-config-slider-height").val(i.slide_height)),l&&$("#soliloquy-config-slider-width").val(l),o&&$("#soliloquy-config-slider-height").val(o)})},clear_selected:function(){$(".soliloquy-clear-selected").on("click",function(e){e.preventDefault();var t=$("#soliloquy-output li").length;$("ul#soliloquy-output li").removeClass("selected"),$(".select-all").text(i.select_all),$(".soliloquy-count").text(t.toString()),$(".soliloquy-select-all").prop("checked",!1),$(".soliloquy-bulk-actions").fadeOut(),$(this).fadeOut()})},display:function(){$("a.soliloquy-display").on("click",function(e){if(e.preventDefault(),!$(this).hasClass("active-display")){var t=$(this),l=t.data("soliloquy-display"),o=$("#soliloquy-output"),a={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_slider_view",post_id:i.id,view:l,nonce:i.save_nonce},success:function(e){}};$.ajax(a),$(".soliloquy-display-toggle").find(".active-display").removeClass("active-display"),t.addClass("active-display"),"grid"===l?o.removeClass("soliloquy-list").addClass("soliloquy-grid"):"list"===l&&o.removeClass("soliloquy-grid").addClass("soliloquy-list")}})},chosen:function(){$(".soliloquy-chosen").each(function(){var e=$(this).data("soliloquy-chosen-options");$(this).chosen(e)})},uploadImage:function(){$(".soliloquy-insert-image").on("click",function(e){var t;e.preventDefault();var l=$(event.currentTarget),o=l.parent().find("input");return t?void t.open():(t=wp.media.frames.soliloquy_image_frame=wp.media({frame:"select",library:{type:"image"},title:i.insert_image,button:{text:i.insert_image},contentUserSetting:!1,multiple:!1}),t.on("select",function(){var e=t.state().get("selection").first().toJSON();o.val(e.url)}),void t.open())})}};$(function(){l.init()}),$(t).on("soliloquyType",function(){l.init()})}(jQuery,window,document,soliloquy_metabox),jQuery(document).ready(function($){$("a.soliloquy-media-library").on("click",function(e){return e.preventDefault(),wp.media.frames.soliloquy?void wp.media.frames.soliloquy.open():(wp.media.frames.soliloquy=new wp.media.view.MediaFrame.Post({title:wp.media.view.l10n.insertIntoPost,button:{text:wp.media.view.l10n.insertIntoPost},multiple:!0,library:{type:"image"}}),wp.media.frames.soliloquy.on("open",function(){var e=wp.media.frames.soliloquy.state().get("selection");$("ul#soliloquy-output li").each(function(){var t=wp.media.attachment($(this).attr("id"));e.add(t?[t]:[])})}),wp.media.frames.soliloquy.on("ready",function(e){}),wp.media.frames.soliloquy.on("insert",function(e){var t=wp.media.frames.soliloquy.state(),i=[];e.each(function(e){var l=t.display(e).toJSON(),o=e.get("type");switch(l.link){case"none":e.set("link","");break;case"file":e.set("link",e.get("url"));break;case"post":break;case"custom":e.set("link",l.linkUrl)}"image"===o&&i.push(e.toJSON())},this),$.post(soliloquy_metabox.ajax,{action:"soliloquy_insert_slides",nonce:soliloquy_metabox.insert_nonce,post_id:soliloquy_metabox.id,images:i},function(e){if(e){$("#soliloquy-output").html(e.data),SoliloquySlidesUpdate();var t=$("#soliloquy-output li").length;$(".soliloquy-count").text(t.toString()),t>0&&($("#soliloquy-empty-slider").fadeOut().addClass("soliloquy-hidden"),$(".soliloquy-slide-header").removeClass("soliloquy-hidden").fadeIn(),$(".soliloquy-bulk-actions").fadeOut())}},"json")}),wp.media.frames.soliloquy.open(),$("div.media-menu a.media-menu-item:nth-child(2)").addClass("hidden"),$("div.media-menu a.media-menu-item:nth-child(4)").addClass("hidden"),void $("div.media-menu a.media-menu-item:nth-child(6)").addClass("hidden"))})}),function($,e,t){"use strict";var i=e.location.hash,l=e.location.hash.replace("!","");if(i&&i.indexOf("soliloquy-tab")>=0){var o=$(l.replace("tab_","")),a=o.parent(),s=o.parent().parent().find("ul.soliloquy-tabs-nav"),n=$("#post").attr("action");a.find(".soliloquy-tab-active").removeClass("soliloquy-tab-active"),o.addClass("soliloquy-tab-active"),s.find(".soliloquy-tab-nav-active").removeClass("soliloquy-tab-nav-active"),s.find('a[href="'+l.replace("tab_","")+'"]').parent().addClass("soliloquy-tab-nav-active"),n&&(n=n.split("#")[0],$("#post").attr("action",n+e.location.hash)),$("body").trigger("SoliloquyTabChange")}$(function(){$("[data-soliloquy-tab]").on("click",function(t){t.preventDefault();var i=$(this),l=i.attr("data-tab-id"),o=i.parent(),a=o.parent(),s=o.attr("data-update-hashbang"),n="undefined"!=typeof i.attr("href")?"tab_"+i.attr("href"):"tab_"+l;if(!i.hasClass("soliloquy-tab-nav-active")){if(a.find(".soliloquy-tab-active").removeClass("soliloquy-tab-active"),o.find(".soliloquy-tab-nav-active").removeClass("soliloquy-tab-nav-active"),i.addClass("soliloquy-tab-nav-active"),$("#"+l).addClass("soliloquy-tab-active"),i.trigger("SoliloquyTabChange"),"soliloquy-native"===l&&$("#soliloquy-type-default").prop("checked")!==!0&&($("#soliloquy-types-nav li").removeClass("soliloquy-active"),$("#soliloquy-type-default").prop("checked",!0).trigger("change")),"1"===s){e.location.hash=n.split("#").join("#!");var d=$("#post").attr("action");d&&(d=d.split("#")[0],$("#post").attr("action",d+e.location.hash))}return!1}})})}(jQuery,window,document);
1
+ function SoliloquySlidesUpdate(e){SoliloquySlides.reset();var t="ul#soliloquy-output li.soliloquy-slide"+(e?".selected":"");jQuery(t).each(function(){var e=jQuery.parseJSON(jQuery(this).attr("data-soliloquy-image-model"));SoliloquySlides.add(new SoliloquySlide(e))})}!function($,e,t,i){"use strict";var l={init:function(){this.select_all(),this.sortable(),this.select(),this.display(),this.chosen(),this.slide_size(),this.uploadImage(),this.toggleStatus(),this.tooltip(),this.clear_selected(),new Clipboard(".soliloquy-clipboard"),$("ul#soliloquy-output").on("click","a.check",function(e){e.preventDefault()}),$(".soliloquy-clipboard").on("click",function(e){e.preventDefault()});var e=$("#soliloquy-output li").length;$(".soliloquy-count").text(e.toString()),$("input,select").conditional()},toggleStatus:function(){$("#soliloquy-settings-content").on("click.soliloquyStatus",".soliloquy-slide-status",function(e){if(e.preventDefault(),$(this).hasClass("list-status"))var t=$(this).parent().parent().parent();else var t=$(this).parent();var l=$(this),o=l.data("status"),a=t.find(".soliloquy-slide-status.list-status"),s=t.find(".soliloquy-slide-status.grid-status"),n=l.parent().parent().data("view"),d=l.data("id"),u=s.find("span.dashicons"),r=a.find("span"),c=l.data("soliloquy-tooltip");if("active"===o)var h="pending";else var h="active";var m={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_change_slide_status",post_id:i.id,slide_id:d,status:h,nonce:i.save_nonce},success:function(e){"active"===h?(s.removeClass("soliloquy-draft-slide").addClass("soliloquy-active-slide"),a.removeClass("soliloquy-draft-slide").addClass("soliloquy-active-slide"),u.removeClass("dashicons-hidden").addClass("dashicons-visibility"),r.text(i.active),s.attr("data-soliloquy-tooltip",i.active),a.data("status","active"),s.data("status","active")):(s.removeClass("soliloquy-active-slide").addClass("soliloquy-draft-slide"),a.removeClass("soliloquy-active-slide").addClass("soliloquy-draft-slide"),u.removeClass("dashicons-visibility").addClass("dashicons-hidden"),r.text(i.draft),a.data("status","pending"),s.data("status","pending"),s.attr("data-soliloquy-tooltip",i.draft))},error:function(e,t,i){}};$.ajax(m)})},tooltip:function(){$("[data-soliloquy-tooltip]").on("mouseover",function(e){e.preventDefault();var t=$(this),i=t.data("soliloquy-tooltip")})},select_all:function(){$(".soliloquy-select-all").change(function(){var e=this.checked;if(e){$("ul#soliloquy-output li").addClass("selected"),$(".soliloquy-bulk-actions").fadeIn();var t=$("ul#soliloquy-output li.selected").length;$(".select-all").text(i.selected),$(".soliloquy-count").text(t.toString()),$(".soliloquy-clear-selected").fadeIn()}else{$("ul#soliloquy-output li").removeClass("selected"),$(".soliloquy-bulk-actions").fadeOut();var l=$("ul#soliloquy-output li").length;$(".select-all").text(i.select_all),$(".soliloquy-count").text(l.toString()),$(".soliloquy-clear-selected").fadeOut()}})},sortable:function(){var e=$("#soliloquy-output");e.sortable({containment:"#soliloquy-slider-main",items:"li",cursor:"move",forcePlaceholderSize:!0,placeholder:"dropzone",update:function(t,l){var o={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_sort_images",order:e.sortable("toArray").toString(),post_id:i.id,nonce:i.sort},success:function(e){SoliloquySlidesUpdate()},error:function(e,t,i){}};$.ajax(o)}})},select:function(){var e=!1,l=!1;$("li.soliloquy-slide .soliloquy-item-content, .soliloquy-list li a.check").on("click",function(t){var o=$(this),a=$(this).parent();if(t.preventDefault(),$(a).hasClass("selected")){$(a).removeClass("selected"),l=!1;var s=$("ul#soliloquy-output li.selected").length;if(0!==s)$(".select-all").text(i.selected),$(".soliloquy-count").text(s.toString()),$(".soliloquy-clear-selected").fadeIn();else{var n=$("ul#soliloquy-output li").length;$(".select-all").text(i.select_all),$(".soliloquy-count").text(n.toString()),$(".soliloquy-clear-selected").fadeOut()}}else{if(e&&l!==!1){var d=$("ul#soliloquy-output li").index($(l)),u=$("ul#soliloquy-output li").index($(a)),r=0;if(d<u)for(r=d;r<=u;r++)$("ul#soliloquy-output li:eq( "+r+")").addClass("selected");else for(r=u;r<=d;r++)$("ul#soliloquy-output li:eq( "+r+")").addClass("selected")}$(a).addClass("selected"),l=$(a),s=$("ul#soliloquy-output li.selected").length,$(".soliloquy-clear-selected").fadeIn(),$(".select-all").text(i.selected),$(".soliloquy-count").text(s.toString())}$("ul#soliloquy-output > li.selected").length>0?$(".soliloquy-bulk-actions").fadeIn():$(".soliloquy-bulk-actions").fadeOut()}),$(t).on("keyup keydown",function(t){e=t.shiftKey})},slide_size:function(){$(t).on("change","#soliloquy-config-slider-size",function(){var e=$(this),t=e.val(),l=e.find(":selected").data("soliloquy-width"),o=e.find(":selected").data("soliloquy-height");"default"==t&&($("#soliloquy-config-slider-width").val(i.slide_width),$("#soliloquy-config-slider-height").val(i.slide_height)),l&&$("#soliloquy-config-slider-width").val(l),o&&$("#soliloquy-config-slider-height").val(o)})},clear_selected:function(){$(".soliloquy-clear-selected").on("click",function(e){e.preventDefault();var t=$("#soliloquy-output li").length;$("ul#soliloquy-output li").removeClass("selected"),$(".select-all").text(i.select_all),$(".soliloquy-count").text(t.toString()),$(".soliloquy-select-all").prop("checked",!1),$(".soliloquy-bulk-actions").fadeOut(),$(this).fadeOut()})},display:function(){$("a.soliloquy-display").on("click",function(e){if(e.preventDefault(),!$(this).hasClass("active-display")){var t=$(this),l=t.data("soliloquy-display"),o=$("#soliloquy-output"),a={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_slider_view",post_id:i.id,view:l,nonce:i.save_nonce},success:function(e){}};$.ajax(a),$(".soliloquy-display-toggle").find(".active-display").removeClass("active-display"),t.addClass("active-display"),"grid"===l?o.removeClass("soliloquy-list").addClass("soliloquy-grid"):"list"===l&&o.removeClass("soliloquy-grid").addClass("soliloquy-list")}})},chosen:function(){$(".soliloquy-chosen").each(function(){var e=$(this).data("soliloquy-chosen-options");$(this).chosen(e)})},uploadImage:function(){$(".soliloquy-insert-image").on("click",function(e){var t;e.preventDefault();var l=$(event.currentTarget),o=l.parent().find("input");return t?void t.open():(t=wp.media.frames.soliloquy_image_frame=wp.media({frame:"select",library:{type:"image"},title:i.insert_image,button:{text:i.insert_image},contentUserSetting:!1,multiple:!1}),t.on("select",function(){var e=t.state().get("selection").first().toJSON();o.val(e.url)}),void t.open())})}};$(function(){l.init()}),$(t).on("soliloquyType",function(){l.init()})}(jQuery,window,document,soliloquy_metabox),function($,e,t,i){$(function(){if("undefined"!=typeof uploader){$("input#plupload-browse-button").val(i.uploader_files_computer),$(".drag-drop-info").text(i.uploader_info_text),$("#soliloquy .drag-drop-inside").append('<div class="soliloquy-progress-bar"><div></div></div>');var e=$("#soliloquy .soliloquy-progress-bar"),l=$("#soliloquy .soliloquy-progress-bar div"),o=$("#soliloquy-output");uploader.bind("FilesAdded",function(t,i){$(e).fadeIn()}),uploader.bind("UploadProgress",function(e,t){$(l).css({width:e.total.percent+"%"})}),uploader.bind("FileUploaded",function(e,l,a){$.post(i.ajax,{action:"soliloquy_load_image",nonce:i.load_image,id:a.response,post_id:i.id},function(e){switch(i.media_position){case"before":$(o).prepend(e);break;case"after":default:$(o).append(e)}$(t).trigger("soliloquyUploaded"),$(e).find(".wp-editor-container").each(function(e,t){var i=$(t).attr("id").split("-")[4];quicktags({id:"soliloquy-caption-"+i,buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()});var l=$("#soliloquy-output li").length;$(".soliloquy-count").text(l.toString()),l>0&&($("#soliloquy-empty-slider").fadeOut().addClass("soliloquy-hidden"),$(".soliloquy-slide-header").removeClass("soliloquy-hidden").fadeIn())},"json")}),uploader.bind("UploadComplete",function(){$(e).fadeOut()}),uploader.bind("Error",function(e,t){$("#soliloquy-upload-error").html('<div class="error fade"><p>'+t.file.name+": "+t.message+"</p></div>"),e.refresh()})}})}(jQuery,window,document,soliloquy_media_uploader),jQuery(document).ready(function($){$("a.soliloquy-media-library").on("click",function(e){return e.preventDefault(),wp.media.frames.soliloquy?void wp.media.frames.soliloquy.open():(wp.media.frames.soliloquy=new wp.media.view.MediaFrame.Post({title:wp.media.view.l10n.insertIntoPost,button:{text:wp.media.view.l10n.insertIntoPost},multiple:!0,library:{type:"image"}}),wp.media.frames.soliloquy.on("open",function(){var e=wp.media.frames.soliloquy.state().get("selection");$("ul#soliloquy-output li").each(function(){var t=wp.media.attachment($(this).attr("id"));e.add(t?[t]:[])})}),wp.media.frames.soliloquy.on("ready",function(e){}),wp.media.frames.soliloquy.on("insert",function(e){var t=wp.media.frames.soliloquy.state(),i=[];e.each(function(e){var l=t.display(e).toJSON(),o=e.get("type");switch(l.link){case"none":e.set("link","");break;case"file":e.set("link",e.get("url"));break;case"post":break;case"custom":e.set("link",l.linkUrl)}"image"===o&&i.push(e.toJSON())},this),$.post(soliloquy_metabox.ajax,{action:"soliloquy_insert_slides",nonce:soliloquy_metabox.insert_nonce,post_id:soliloquy_metabox.id,images:JSON.stringify(i)},function(e){if(e){$("#soliloquy-output").html(e.data),SoliloquySlidesUpdate();var t=$("#soliloquy-output li").length;$(".soliloquy-count").text(t.toString()),t>0&&($("#soliloquy-empty-slider").fadeOut().addClass("soliloquy-hidden"),$(".soliloquy-slide-header").removeClass("soliloquy-hidden").fadeIn(),$(".soliloquy-bulk-actions").fadeOut())}},"json")}),wp.media.frames.soliloquy.open(),$("div.media-menu a.media-menu-item:nth-child(2)").addClass("hidden"),$("div.media-menu a.media-menu-item:nth-child(4)").addClass("hidden"),void $("div.media-menu a.media-menu-item:nth-child(6)").addClass("hidden"))})});var SoliloquySlide=Backbone.Model.extend({defaults:{id:"",title:"",caption:"",alt:"",link:"",type:""}}),SoliloquySlides=new Backbone.Collection,SoliloquyModalWindow=new wp.media.view.Modal({controller:{trigger:function(){}}}),SoliloquyView=wp.Backbone.View.extend({id:"soliloquy-meta-edit",tagName:"div",className:"edit-attachment-frame mode-select hide-menu hide-router",template:wp.template("soliloquy-meta-editor"),events:{"click .edit-media-header .left":"loadPreviousItem","click .edit-media-header .right":"loadNextItem","keyup input":"updateItem","keyup textarea":"updateItem","change input":"updateItem","change textarea":"updateItem","keyup .CodeMirror":"updateCode","blur textarea":"updateItem","change select":"updateItem","click a.soliloquy-meta-submit":"saveItem","keyup input#link-search":"searchLinks","click div.query-results li":"insertLink","click a.soliloquy-thumbnail":"insertThumb","click a.soliloquy-thumbnail-delete":"removeThumb","click button.media-file":"insertMediaFileLink","click button.attachment-page":"insertAttachmentPageLink"},initialize:function(e){this.is_loading=!1,this.collection=e.collection,this.child_views=e.child_views,this.attachment_id=e.attachment_id,this.attachment_index=0,this.search_timer="";var t=0;this.collection.each(function(e){return String(e.get("id"))==String(this.attachment_id)?(this.model=e,this.attachment_index=t,!1):void t++},this)},updateCode:function(e){$model=this.model,$textarea=this.$el.find(".soliloquy-html-slide-code"),$model.set("code",this.editor.getValue(),{silent:!0}),$textarea.text()},insertThumb:function(e){$model=this.model,e.preventDefault();var t=this.$el.data("field"),i=wp.media.frames.soliloquy_media_frame=wp.media({className:"media-frame soliloquy-media-frame",frame:"select",multiple:!1,title:soliloquy_metabox.videoframe,library:{type:"image"},button:{text:soliloquy_metabox.videouse}});i.on("select",function(){var e=i.state().get("selection").first().toJSON();$model.set("src",e.url,{silent:!0}),jQuery("div.thumbnail > img",$parent.find(".media-frame-content")).attr("src",e.url)}),i.open()},removeThumb:function(e){e.preventDefault(),$model=this.model,$parent=this.$el.parent(),jQuery("div.thumbnail > img",$parent.find(".media-frame-content")).attr("src",""),$model.set("src","",{silent:!0})},render:function(){return this.$el.html(this.template(this.model.attributes)),this.child_views.length>0&&this.child_views.forEach(function(e){var t=new e({model:this.model});this.$el.find("div.addons").append(t.render().el)},this),this.$el.find("textarea[name=caption]").val(this.model.get("caption")),setTimeout(function(){quicktags({id:"caption",buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()},500),wpLink.init,0===this.attachment_index&&this.$el.find("button.left").addClass("disabled"),this.attachment_index==this.collection.length-1&&this.$el.find("button.right").addClass("disabled"),textarea=this.$el.find(".soliloquy-html-slide-code"),textarea.length&&(this.editor=CodeMirror.fromTextArea(textarea[0],{enterMode:"keep",indentUnit:4,electricChars:!1,lineNumbers:!0,lineWrapping:!0,matchBrackets:!0,mode:"php",smartIndent:!1,tabMode:"shift",theme:"ttcn"})),this.$el.trigger("soliloquyRenderMeta"),this},loading:function(){this.is_loading=!0,this.$el.find(".spinner").css("visibility","visible")},loaded:function(e){this.is_loading=!1,this.$el.find(".spinner").css("visibility","hidden"),"undefined"!=typeof e&&alert(e)},loadPreviousItem:function(){this.attachment_index--,this.model=this.collection.at(this.attachment_index),this.attachment_id=this.model.get("id"),this.render()},loadNextItem:function(){this.attachment_index++,this.model=this.collection.at(this.attachment_index),this.attachment_id=this.model.get("id"),this.render()},updateItem:function(e){""!=e.target.name&&("checkbox"==e.target.type?value=e.target.checked?1:0:value=e.target.value,this.model.set(e.target.name,value))},saveItem:function(e){e.preventDefault(),this.trigger("loading"),wp.media.ajax("soliloquy_save_meta",{context:this,data:{nonce:soliloquy_metabox.save_nonce,post_id:soliloquy_metabox.id,attach_id:this.model.get("id"),meta:this.model.attributes},success:function(e){this.trigger("loaded loaded:success");var t=JSON.stringify(this.model.attributes);jQuery("ul#soliloquy-output li#"+this.model.get("id")).attr("data-soliloquy-image-model",t);var i=this.$el.find(".saved");i.fadeIn(),setTimeout(function(){i.fadeOut()},1500)},error:function(e){this.trigger("loaded loaded:error",e)}})},searchLinks:function(e){},insertLink:function(e){},insertMediaFileLink:function(e){this.trigger("loading"),wp.media.ajax("soliloquy_get_attachment_links",{context:this,data:{nonce:soliloquy_metabox.save_nonce,attachment_id:this.model.get("id")},success:function(e){this.model.set("link",e.media_link),this.trigger("loaded loaded:success"),this.render()},error:function(e){this.trigger("loaded loaded:error",e)}})},insertAttachmentPageLink:function(e){this.trigger("loading"),wp.media.ajax("soliloquy_get_attachment_links",{context:this,data:{nonce:soliloquy_metabox.save_nonce,attachment_id:this.model.get("id")},success:function(e){this.model.set("link",e.attachment_page),this.trigger("loaded loaded:success"),this.render()},error:function(e){this.trigger("loaded loaded:error",e)}})}}),SoliloquyChildViews=[],SoliloquyContentViews=[];!function($){$(document).ready(function(){soliloquy_edit={init:function(){SoliloquySlidesUpdate(),$("#soliloquy-settings-content").on("click.soliloquyModify",".soliloquy-modify-slide",function(e){e.preventDefault();var t=$(this).parent().data("soliloquy-slide");SoliloquyModalWindow.content(new SoliloquyView({collection:SoliloquySlides,child_views:SoliloquyChildViews,attachment_id:t})),SoliloquyModalWindow.open(),$(document).trigger("soliloquyEditOpen"),$(".CodeMirror").each(function(e,t){t.CodeMirror.refresh()})})}},soliloquy_edit.init()}),$(document).on("soliloquyUploaded",function(){soliloquy_edit.init()})}(jQuery);var SoliloquyBulkEditImageView=wp.Backbone.View.extend({tagName:"li",className:"attachment",template:wp.template("soliloquy-meta-bulk-editor-slides"),initialize:function(e){this.model=e.model},render:function(){return this.$el.html(this.template(this.model.attributes)),this}}),SoliloquyBulkEditView=wp.Backbone.View.extend({id:"soliloquy-meta-edit-bulk",tagName:"div",className:"edit-attachment-frame mode-select hide-menu hide-router",template:wp.template("soliloquy-meta-bulk-editor"),events:{"keyup input":"updateItem","keyup textarea":"updateItem","change input":"updateItem","change textarea":"updateItem","blur textarea":"updateItem","change select":"updateItem","click .actions a.soliloquy-meta-submit":"saveItem","keyup input#link-search":"searchLinks","click div.query-results li":"insertLink","click button.media-file":"insertMediaFileLink","click button.attachment-page":"insertAttachmentPageLink"},initialize:function(e){this.on("loading",this.loading,this),this.on("loaded",this.loaded,this),this.is_loading=!1,this.collection=e.collection,this.child_views=e.child_views,this.model=new SoliloquySlide},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.collection.forEach(function(e){var t=new SoliloquyBulkEditImageView({model:e});this.$el.find("ul.attachments").append(t.render().el)},this),this.child_views.length>0&&this.child_views.forEach(function(e){var t=new e({model:this.model});this.$el.find("div.addons").append(t.render().el)},this),this.$el.find("textarea[name=caption]").val(this.model.get("caption")),setTimeout(function(){quicktags({id:"caption",buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()},100),wpLink.init,this},renderError:function(e){var t={};t.error=e;var i=new wp.media.view.SoliloquyError({model:t});return i.render().el},loading:function(){this.is_loading=!0,this.$el.find(".spinner").css("visibility","visible")},loaded:function(e){this.is_loading=!1,this.$el.find(".spinner").css("visibility","hidden"),"undefined"!=typeof e&&this.$el.find("ul.attachments").before(this.renderError(e))},updateItem:function(e){""!=e.target.name&&("checkbox"==e.target.type?value=e.target.checked?1:0:value=e.target.value,this.model.set(e.target.name,value))},saveItem:function(){this.trigger("loading");var e=[];this.collection.forEach(function(t){e.push(t.id)},this),wp.media.ajax("soliloquy_bulk_save_meta",{context:this,data:{nonce:soliloquy_metabox.save_nonce,post_id:soliloquy_metabox.id,meta:this.model.attributes,image_ids:e},success:function(e){this.collection.forEach(function(e){for(var t in this.model.attributes)value=this.model.attributes[t],value.length>0&&e.set(t,value);var i=JSON.stringify(e.attributes);jQuery("ul#soliloquy li#"+e.get("id")).attr("data-solioquy-image-model",i),jQuery("ul#soliloquy li#"+e.get("id")+" div.title").text(e.get("title"))},this),this.trigger("loaded loaded:success"),SoliloquyModalWindow.close()},error:function(e){this.trigger("loaded loaded:error",e)}})},insertMediaFileLink:function(e){this.trigger("loading"),this.model.set("link",response.media_link),this.trigger("loaded loaded:success"),this.render()},insertAttachmentPageLink:function(e){this.trigger("loading"),this.model.set("link",response.media_link),this.trigger("loaded loaded:success"),this.render()}});jQuery(document).ready(function($){$("#soliloquy-settings-content").on("click","a.soliloquy-slides-edit",function(e){e.preventDefault(),SoliloquySlidesUpdate(!0),SoliloquyModalWindow.content(new SoliloquyBulkEditView({collection:SoliloquySlides,child_views:SoliloquyChildViews})),SoliloquyModalWindow.open()})}),jQuery(document).ready(function($){$("a.soliloquy-slides-delete").click(function(e){e.preventDefault();var t=confirm(soliloquy_metabox.remove_multiple);if(!t)return!1;var i=[];$("ul#soliloquy-output > li.selected").each(function(){i.push($(this).attr("id"))});var l={action:"soliloquy_remove_slides",attachment_ids:i,post_id:soliloquy_metabox.id,nonce:soliloquy_metabox.remove_nonce};$.post(soliloquy_metabox.ajax,l,function(e){$("ul#soliloquy-output > li.selected").remove(),$(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-select-all").prop("checked",!1),$(".soliloquy-load-library").attr("data-soliloquy-offset",0).addClass("has-search").trigger("click"),SoliloquySlidesUpdate(!1);var t=$("#soliloquy-output li").length;$(".soliloquy-count").text(t.toString()),0===t&&($(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-slide-header").fadeOut().addClass("soliloquy-hidden"),$("#soliloquy-empty-slider").removeClass("soliloquy-hidden").fadeIn())},"json")}),$("#soliloquy-settings-content ").on("click",".soliloquy-remove-slide",function(e){e.preventDefault();var t=confirm(soliloquy_metabox.remove);if(t){var i=$(this).parent().attr("id"),l={action:"soliloquy_remove_slide",attachment_id:i,post_id:soliloquy_metabox.id,nonce:soliloquy_metabox.remove_nonce};$.post(soliloquy_metabox.ajax,l,function(e){$("#"+i).fadeOut("normal",function(){$(this).remove(),$(".soliloquy-load-library").attr("data-soliloquy-offset",0).addClass("has-search").trigger("click"),SoliloquySlidesUpdate(!1);var e=$("#soliloquy-output li").length;$(".soliloquy-count").text(e.toString()),0===e&&($(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-slide-header").fadeOut().addClass("soliloquy-hidden"),$("#soliloquy-empty-slider").removeClass("soliloquy-hidden").fadeIn())})},"json")}})}),function($,e,t){"use strict";var i=e.location.hash,l=e.location.hash.replace("!","");if(i&&i.indexOf("soliloquy-tab")>=0){var o=$(l.replace("tab_","")),a=o.parent(),s=o.parent().parent().find("ul.soliloquy-tabs-nav"),n=$("#post").attr("action");a.find(".soliloquy-tab-active").removeClass("soliloquy-tab-active"),o.addClass("soliloquy-tab-active"),s.find(".soliloquy-tab-nav-active").removeClass("soliloquy-tab-nav-active"),s.find('a[href="'+l.replace("tab_","")+'"]').parent().addClass("soliloquy-tab-nav-active"),n&&(n=n.split("#")[0],$("#post").attr("action",n+e.location.hash)),$("body").trigger("SoliloquyTabChange")}$(function(){$("[data-soliloquy-tab]").on("click",function(t){t.preventDefault();var i=$(this),l=i.attr("data-tab-id"),o=i.parent(),a=o.parent(),s=o.attr("data-update-hashbang"),n="undefined"!=typeof i.attr("href")?"tab_"+i.attr("href"):"tab_"+l;if(!i.hasClass("soliloquy-tab-nav-active")){if(a.find(".soliloquy-tab-active").removeClass("soliloquy-tab-active"),o.find(".soliloquy-tab-nav-active").removeClass("soliloquy-tab-nav-active"),i.addClass("soliloquy-tab-nav-active"),$("#"+l).addClass("soliloquy-tab-active"),i.trigger("SoliloquyTabChange"),"soliloquy-native"===l&&$("#soliloquy-type-default").prop("checked")!==!0&&($("#soliloquy-types-nav li").removeClass("soliloquy-active"),$("#soliloquy-type-default").prop("checked",!0).trigger("change")),"1"===s){e.location.hash=n.split("#").join("#!");var d=$("#post").attr("action");d&&(d=d.split("#")[0],$("#post").attr("action",d+e.location.hash))}return!1}})})}(jQuery,window,document);
includes/global/shortcode.php CHANGED
@@ -99,6 +99,7 @@ class Soliloquy_Shortcode_Lite {
99
  */
100
  public $html = false;
101
 
 
102
  /**
103
  * Primary class constructor.
104
  *
@@ -158,26 +159,26 @@ class Soliloquy_Shortcode_Lite {
158
  }
159
 
160
  // Allow the data to be filtered before it is stored and used to create the slider output.
161
- $data = apply_filters( 'soliloquy_pre_data', $data, $slider_id );
162
 
163
  // If there is no data to output or the slider is inactive, do nothing.
164
- if ( ! $data || empty( $data['slider'] ) || isset( $data['status'] ) && 'inactive' == $data['status'] && ! is_preview() ) {
165
  return false;
166
  }
167
 
168
  // If the data is to be randomized, do it now.
169
- if ( $this->get_config( 'random', $data ) ) {
170
- $data = $this->shuffle( $data );
171
  }
172
 
173
  // Prepare variables.
174
- $this->data[$data['id']] = $data;
175
  $slider = '';
176
  $i = 1;
177
 
178
  // If this is a feed view, customize the output and return early.
179
  if ( is_feed() ) {
180
- return $this->do_feed_output( $data );
181
  }
182
 
183
  // Load scripts and styles.
@@ -185,59 +186,59 @@ class Soliloquy_Shortcode_Lite {
185
  wp_enqueue_script( $this->base->plugin_slug . '-script' );
186
 
187
  // Load custom slider themes if necessary.
188
- if ( 'base' !== $this->get_config( 'slider_theme', $data ) ) {
189
- $this->load_slider_theme( $this->get_config( 'slider_theme', $data ) );
190
  }
191
 
192
  // Load slider init code in the footer.
193
  add_action( 'wp_footer', array( $this, 'slider_init' ), 1000 );
194
 
195
  // Run a hook before the slider output begins but after scripts and inits have been set.
196
- do_action( 'soliloquy_before_output', $data );
197
 
198
  // Apply a filter before starting the slider HTML.
199
- $slider = apply_filters( 'soliloquy_output_start', $slider, $data );
200
-
201
  // Build out the slider HTML.
202
- $slider .= '<div aria-live="' . $this->get_config( 'aria_live', $data ) . '" id="soliloquy-container-' . sanitize_html_class( $data['id'] ) . '" class="' . $this->get_slider_classes( $data ) . '" style="max-width:' . $this->get_config( 'slider_width', $data ) . 'px;max-height:' . $this->get_config( 'slider_height', $data ) . 'px;' . apply_filters( 'soliloquy_output_container_style', '', $data ) . '"' . apply_filters( 'soliloquy_output_container_attr', '', $data ) . '>';
203
- $slider .= '<ul id="soliloquy-' . sanitize_html_class( $data['id'] ) . '" class="soliloquy-slider soliloquy-slides soliloquy-wrap soliloquy-clear">';
204
- $slider = apply_filters( 'soliloquy_output_before_container', $slider, $data );
205
 
206
- foreach ( (array) $data['slider'] as $id => $item ) {
207
  // Skip over images that are pending (ignore if in Preview mode).
208
  if ( isset( $item['status'] ) && 'pending' == $item['status'] && ! is_preview() ) {
209
  continue;
210
  }
211
 
212
  // Allow filtering of individual items.
213
- $item = apply_filters( 'soliloquy_output_item_data', $item, $id, $data, $i );
214
 
215
- $slider = apply_filters( 'soliloquy_output_before_item', $slider, $id, $item, $data, $i );
216
- $output = '<li aria-hidden="true" class="' . $this->get_slider_item_classes( $item, $i, $data ) . '"' . apply_filters( 'soliloquy_output_item_attr', '', $id, $item, $data, $i ) . ' draggable="false" style="list-style:none">';
217
- $output .= $this->get_slide( $id, $item, $data, $i );
218
  $output .= '</li>';
219
- $output = apply_filters( 'soliloquy_output_single_item', $output, $id, $item, $data, $i );
220
  $slider .= $output;
221
- $slider = apply_filters( 'soliloquy_output_after_item', $slider, $id, $item, $data, $i );
222
 
223
  // Increment the iterator.
224
  $i++;
225
  }
226
 
227
- $slider = apply_filters( 'soliloquy_output_after_container', $slider, $data );
228
  $slider .= '</ul>';
229
- $slider = apply_filters( 'soliloquy_output_end', $slider, $data );
230
  $slider .= '</div>';
231
 
232
  // Increment the counter.
233
  $this->counter++;
234
 
235
  // Add no JS fallback support.
236
- $no_js = apply_filters( 'soliloquy_output_no_js', '<noscript><style type="text/css">#soliloquy-container-' . sanitize_html_class( $data['id'] ) . '{opacity:1}</style></noscript>', $data );
237
  $slider .= $no_js;
238
 
239
  // Return the slider HTML.
240
- return apply_filters( 'soliloquy_output', $slider, $data );
241
 
242
  }
243
 
99
  */
100
  public $html = false;
101
 
102
+ public $slider_data;
103
  /**
104
  * Primary class constructor.
105
  *
159
  }
160
 
161
  // Allow the data to be filtered before it is stored and used to create the slider output.
162
+ $this->slider_data = apply_filters( 'soliloquy_pre_data', $data, $slider_id );
163
 
164
  // If there is no data to output or the slider is inactive, do nothing.
165
+ if ( ! $this->slider_data || empty( $this->slider_data['slider'] ) || isset( $this->slider_data['status'] ) && 'inactive' == $this->slider_data['status'] && ! is_preview() ) {
166
  return false;
167
  }
168
 
169
  // If the data is to be randomized, do it now.
170
+ if ( $this->get_config( 'random', $this->slider_data ) ) {
171
+ $this->slider_data = $this->shuffle( $this->slider_data );
172
  }
173
 
174
  // Prepare variables.
175
+ $this->data[$this->slider_data['id']] = $this->slider_data;
176
  $slider = '';
177
  $i = 1;
178
 
179
  // If this is a feed view, customize the output and return early.
180
  if ( is_feed() ) {
181
+ return $this->do_feed_output( $this->slider_data );
182
  }
183
 
184
  // Load scripts and styles.
186
  wp_enqueue_script( $this->base->plugin_slug . '-script' );
187
 
188
  // Load custom slider themes if necessary.
189
+ if ( 'base' !== $this->get_config( 'slider_theme', $this->slider_data ) ) {
190
+ $this->load_slider_theme( $this->get_config( 'slider_theme', $this->slider_data ) );
191
  }
192
 
193
  // Load slider init code in the footer.
194
  add_action( 'wp_footer', array( $this, 'slider_init' ), 1000 );
195
 
196
  // Run a hook before the slider output begins but after scripts and inits have been set.
197
+ do_action( 'soliloquy_before_output', $this->slider_data );
198
 
199
  // Apply a filter before starting the slider HTML.
200
+ $slider = apply_filters( 'soliloquy_output_start', $slider, $this->slider_data );
201
+
202
  // Build out the slider HTML.
203
+ $slider .= '<div aria-live="' . $this->get_config( 'aria_live', $this->slider_data ) . '" id="soliloquy-container-' . sanitize_html_class( $this->slider_data['id'] ) . '" class="' . $this->get_slider_classes( $this->slider_data ) . '" style="max-width:' . $this->get_config( 'slider_width', $data ) . 'px;max-height:' . $this->get_config( 'slider_height', $this->slider_data ) . 'px;' . apply_filters( 'soliloquy_output_container_style', '', $this->slider_data ) . '"' . apply_filters( 'soliloquy_output_container_attr', '', $this->slider_data ) . '>';
204
+ $slider .= '<ul id="soliloquy-' . sanitize_html_class( $this->slider_data['id'] ) . '" class="soliloquy-slider soliloquy-slides soliloquy-wrap soliloquy-clear">';
205
+ $slider = apply_filters( 'soliloquy_output_before_container', $slider, $this->slider_data );
206
 
207
+ foreach ( (array) $this->slider_data['slider'] as $id => $item ) {
208
  // Skip over images that are pending (ignore if in Preview mode).
209
  if ( isset( $item['status'] ) && 'pending' == $item['status'] && ! is_preview() ) {
210
  continue;
211
  }
212
 
213
  // Allow filtering of individual items.
214
+ $item = apply_filters( 'soliloquy_output_item_data', $item, $id, $this->slider_data, $i );
215
 
216
+ $slider = apply_filters( 'soliloquy_output_before_item', $slider, $id, $item, $this->slider_data, $i );
217
+ $output = '<li aria-hidden="true" class="' . $this->get_slider_item_classes( $item, $i, $this->slider_data ) . '"' . apply_filters( 'soliloquy_output_item_attr', '', $id, $item, $this->slider_data, $i ) . ' draggable="false" style="list-style:none">';
218
+ $output .= $this->get_slide( $id, $item, $this->slider_data, $i );
219
  $output .= '</li>';
220
+ $output = apply_filters( 'soliloquy_output_single_item', $output, $id, $item, $this->slider_data, $i );
221
  $slider .= $output;
222
+ $slider = apply_filters( 'soliloquy_output_after_item', $slider, $id, $item, $this->slider_data, $i );
223
 
224
  // Increment the iterator.
225
  $i++;
226
  }
227
 
228
+ $slider = apply_filters( 'soliloquy_output_after_container', $slider, $this->slider_data );
229
  $slider .= '</ul>';
230
+ $slider = apply_filters( 'soliloquy_output_end', $slider, $this->slider_data );
231
  $slider .= '</div>';
232
 
233
  // Increment the counter.
234
  $this->counter++;
235
 
236
  // Add no JS fallback support.
237
+ $no_js = apply_filters( 'soliloquy_output_no_js', '<noscript><style type="text/css">#soliloquy-container-' . sanitize_html_class( $this->slider_data['id'] ) . '{opacity:1}</style></noscript>', $this->slider_data );
238
  $slider .= $no_js;
239
 
240
  // Return the slider HTML.
241
+ return apply_filters( 'soliloquy_output', $slider, $this->slider_data );
242
 
243
  }
244
 
readme.txt CHANGED
@@ -90,6 +90,10 @@ Soliloquy has many Addons that extend its default functionality to make it do in
90
 
91
 
92
  == Changelog ==
 
 
 
 
93
 
94
  = 2.5.0.8 =
95
  * Fix: Minor Bug fixes
90
 
91
 
92
  == Changelog ==
93
+ = 2.5.1 =
94
+ * Fix: PHP optimizations to improve performance.
95
+ * Fix: Cases where Media library images weren’t being inserted.
96
+ * Fix: Minor bug fixes.
97
 
98
  = 2.5.0.8 =
99
  * Fix: Minor Bug fixes
soliloquy-lite.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Soliloquy is best responsive WordPress slider plugin. This is the lite version.
6
  * Author: Soliloquy Team
7
  * Author URI: https://soliloquywp.com
8
- * Version: 2.5.0.8
9
  * Text Domain: soliloquy
10
  * Domain Path: languages
11
  *
@@ -54,7 +54,7 @@ class Soliloquy_Lite {
54
  *
55
  * @var string
56
  */
57
- public $version = '2.5.0.8';
58
 
59
  /**
60
  * The name of the plugin.
@@ -107,7 +107,7 @@ class Soliloquy_Lite {
107
 
108
  // Load the plugin.
109
  add_action( 'init', array( $this, 'init' ), 0 );
110
-
111
  add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
112
 
113
 
@@ -289,7 +289,7 @@ class Soliloquy_Lite {
289
 
290
  // Attempt to return the transient first, otherwise generate the new query to retrieve the data.
291
  if ( false === ( $sliders = get_transient( '_sol_cache_all' ) ) ) {
292
-
293
  $sliders = $this->_get_sliders();
294
  if ( $sliders ) {
295
  set_transient( '_sol_cache_all', $sliders, DAY_IN_SECONDS );
@@ -330,7 +330,7 @@ class Soliloquy_Lite {
330
  // Now loop through all the sliders found and only use sliders that have images in them.
331
  $ret = array();
332
  foreach ( $sliders->posts as $id ) {
333
-
334
  $data = get_post_meta( $id, '_sol_slider_data', true );
335
  if ( empty( $data['slider'] ) && 'default' == Soliloquy_Shortcode_Lite::get_instance()->get_config( 'type', $data ) || 'dynamic' == Soliloquy_Shortcode_Lite::get_instance()->get_config( 'type', $data ) ) {
336
  continue;
@@ -412,7 +412,7 @@ class Soliloquy_Lite {
412
  global $current_screen;
413
  if ( !empty( $current_screen->id ) && strpos( $current_screen->id, 'soliloquy' ) !== false ) {
414
  $url = 'https://wordpress.org/support/view/plugin-reviews/soliloquy-lite?filter=5';
415
- $text = sprintf( __( 'Please rate <strong>SoliloquyWP</strong> <a href="%s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the WPForms team!', 'wpforms' ), $url, $url );
416
  }
417
  return $text;
418
  }
5
  * Description: Soliloquy is best responsive WordPress slider plugin. This is the lite version.
6
  * Author: Soliloquy Team
7
  * Author URI: https://soliloquywp.com
8
+ * Version: 2.5.1
9
  * Text Domain: soliloquy
10
  * Domain Path: languages
11
  *
54
  *
55
  * @var string
56
  */
57
+ public $version = '2.5.1';
58
 
59
  /**
60
  * The name of the plugin.
107
 
108
  // Load the plugin.
109
  add_action( 'init', array( $this, 'init' ), 0 );
110
+
111
  add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
112
 
113
 
289
 
290
  // Attempt to return the transient first, otherwise generate the new query to retrieve the data.
291
  if ( false === ( $sliders = get_transient( '_sol_cache_all' ) ) ) {
292
+
293
  $sliders = $this->_get_sliders();
294
  if ( $sliders ) {
295
  set_transient( '_sol_cache_all', $sliders, DAY_IN_SECONDS );
330
  // Now loop through all the sliders found and only use sliders that have images in them.
331
  $ret = array();
332
  foreach ( $sliders->posts as $id ) {
333
+
334
  $data = get_post_meta( $id, '_sol_slider_data', true );
335
  if ( empty( $data['slider'] ) && 'default' == Soliloquy_Shortcode_Lite::get_instance()->get_config( 'type', $data ) || 'dynamic' == Soliloquy_Shortcode_Lite::get_instance()->get_config( 'type', $data ) ) {
336
  continue;
412
  global $current_screen;
413
  if ( !empty( $current_screen->id ) && strpos( $current_screen->id, 'soliloquy' ) !== false ) {
414
  $url = 'https://wordpress.org/support/view/plugin-reviews/soliloquy-lite?filter=5';
415
+ $text = sprintf( __( 'Please rate <strong>SoliloquyWP</strong> <a href="%s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the Soliloquy team!', 'wpforms' ), $url, $url );
416
  }
417
  return $text;
418
  }
trunk/assets/css/addons.css DELETED
@@ -1,901 +0,0 @@
1
- /* ==========================================================================
2
- Icon Font
3
- ========================================================================== */
4
- @font-face {
5
- font-family: 'soliloquy';
6
- src: url("../fonts/soliloquy.eot");
7
- src: url("../fonts/soliloquy.eot?#iefix") format("embedded-opentype"), url("../fonts/soliloquy.woff") format("woff"), url("../fonts/soliloquy.ttf") format("truetype"), url("../fonts/soliloquy.svg#soliloquy") format("svg");
8
- font-weight: normal;
9
- font-style: normal; }
10
- [class*='soliloquy-icon-']:before {
11
- display: inline-block;
12
- font-family: 'soliloquy';
13
- font-style: normal;
14
- font-weight: normal;
15
- font-size: 13px;
16
- line-height: 1.5;
17
- margin-right: 8px;
18
- -webkit-font-smoothing: antialiased;
19
- -moz-osx-font-smoothing: grayscale; }
20
-
21
- .soliloquy-icon-configuration:before {
22
- content: '\0041'; }
23
-
24
- .soliloquy-icon-soliloquy:before {
25
- content: '\0042'; }
26
-
27
- .soliloquy-icon-pinterest:before {
28
- content: '\0043'; }
29
-
30
- .soliloquy-icon-lightbox:before {
31
- content: '\0044'; }
32
-
33
- .soliloquy-icon-misc:before {
34
- content: '\0045'; }
35
-
36
- .soliloquy-icon-mobile:before {
37
- content: '\0046'; }
38
-
39
- .soliloquy-icon-pagination:before {
40
- content: '\0047'; }
41
-
42
- .soliloquy-icon-proofing:before {
43
- content: '\0048'; }
44
-
45
- .soliloquy-icon-slideshow:before {
46
- content: '\0049'; }
47
-
48
- .soliloquy-icon-tags:before {
49
- content: '\004a'; }
50
-
51
- .soliloquy-icon-thumbnails:before {
52
- content: '\004b'; }
53
-
54
- .soliloquy-icon-video:before {
55
- content: '\004c'; }
56
-
57
- .soliloquy-icon-watermark:before {
58
- content: '\004d'; }
59
-
60
- .soliloquy-icon-cloud-download:before {
61
- content: '\004e'; }
62
-
63
- .soliloquy-icon-toggle-on:before {
64
- content: '\004f'; }
65
-
66
- .soliloquy-icon-plus-circle:before {
67
- content: '\0050'; }
68
-
69
- .soliloquy-icon-list:before {
70
- content: '\0052'; }
71
-
72
- .soliloquy-icon-grid:before {
73
- content: '\0053'; }
74
-
75
- .soliloquy-icon-pencil:before {
76
- content: '\0055'; }
77
-
78
- .soliloquy-icon-close:before {
79
- content: '\0056'; }
80
-
81
- .soliloquy-icon-check:before {
82
- content: '\0057'; }
83
-
84
- .soliloquy-icon-schedule:before {
85
- content: '\0058'; }
86
-
87
- .soliloquy-icon-carousel:before {
88
- content: '\0059'; }
89
-
90
- /* ==========================================================================
91
- Header Styles
92
- ========================================================================== */
93
- #soliloquy-header {
94
- background-color: #ff3700;
95
- height: 120px;
96
- margin-left: -20px; }
97
- #soliloquy-header #soliloquy-logo {
98
- margin: 0;
99
- padding-top: 25px;
100
- line-height: 120px;
101
- margin-left: 20px; }
102
- #soliloquy-header #soliloquy-logo img {
103
- max-width: 288px; }
104
-
105
- /* ==========================================================================
106
- Global Styles
107
- ========================================================================== */
108
- .wp-core-ui .button-soliloquy {
109
- background: #ff3700;
110
- border-color: #ff3700;
111
- -webkit-box-shadow: none;
112
- box-shadow: none;
113
- color: white;
114
- text-decoration: none;
115
- font-weight: 500;
116
- text-shadow: none;
117
- line-height: 15px;
118
- height: 35px;
119
- font-size: 13px;
120
- padding: 0 20px 1px; }
121
- .wp-core-ui .button-soliloquy:hover {
122
- background: #ff3700;
123
- border-color: #ff3700;
124
- color: white;
125
- opacity: .8; }
126
- .wp-core-ui .button-soliloquy-secondary {
127
- background: #f7f7f7;
128
- border: 1px solid;
129
- border-color: #dddddd;
130
- -webkit-box-shadow: none;
131
- box-shadow: none;
132
- color: #23282d;
133
- text-decoration: none;
134
- text-shadow: none;
135
- font-weight: bold;
136
- height: 35px;
137
- font-size: 13px;
138
- padding: 0 20px 1px; }
139
- .wp-core-ui .button-soliloquy-secondary:hover {
140
- background: #f7f7f7;
141
- border-color: #999999;
142
- color: #23282d; }
143
- .wp-core-ui .button-soliloquy-delete {
144
- background: #e3231b;
145
- border: 1px solid;
146
- border-color: #e3231b;
147
- -webkit-box-shadow: none;
148
- box-shadow: none;
149
- color: white;
150
- text-decoration: none;
151
- text-shadow: none;
152
- font-weight: bold;
153
- height: 35px;
154
- font-size: 13px;
155
- padding: 0 20px 1px; }
156
- .wp-core-ui .button-soliloquy-delete:hover {
157
- background: #e3231b;
158
- color: white;
159
- opacity: .8; }
160
- .wp-core-ui a.button-soliloquy,
161
- .wp-core-ui a.button-soliloquy-secondary,
162
- .wp-core-ui a.button-soliloquy-delete {
163
- line-height: 32px; }
164
-
165
- #soliloquy-settings-content input:not([type=checkbox]) {
166
- background-color: white;
167
- border: 1px solid #ddd;
168
- -webkit-box-shadow: none;
169
- box-shadow: none;
170
- color: #32373c;
171
- height: 35px;
172
- outline: none;
173
- -webkit-transition: 0.05s border-color ease-in-out;
174
- transition: 0.05s border-color ease-in-out; }
175
- #soliloquy-settings-content input[type=checkbox]:checked {
176
- -color: #ff3700; }
177
- #soliloquy-settings-content textarea {
178
- width: 100%; }
179
- #soliloquy-settings-content input[type="password"].soliloquy-input {
180
- background-color: white;
181
- border: 1px solid #ddd;
182
- -webkit-box-shadow: none;
183
- box-shadow: none;
184
- color: #32373c;
185
- outline: none;
186
- -webkit-transition: 0.05s border-color ease-in-out;
187
- transition: 0.05s border-color ease-in-out; }
188
-
189
- input[type="password"].soliloquy-input {
190
- background-color: white;
191
- border: 1px solid #ddd;
192
- -webkit-box-shadow: none;
193
- box-shadow: none;
194
- height: 35px;
195
- color: #32373c;
196
- outline: none;
197
- -webkit-transition: 0.05s border-color ease-in-out;
198
- transition: 0.05s border-color ease-in-out; }
199
-
200
- pre.soliloquy-code {
201
- background-color: #dddddd;
202
- border-radius: 3px;
203
- padding: 15px; }
204
-
205
- .soliloquy-clipboard {
206
- display: block;
207
- text-decoration: underline !important;
208
- padding-top: 8px;
209
- font-size: 11px;
210
- outline: 0 !important; }
211
- .soliloquy-clipboard:focus {
212
- outline-style: none;
213
- box-shadow: none;
214
- border-color: transparent; }
215
-
216
- .soliloquy-code {
217
- display: block;
218
- background-color: #f7f7f7;
219
- border-radius: 3px;
220
- padding: 10px !important; }
221
-
222
- /* ==========================================================================
223
- Utilities
224
- ========================================================================== */
225
- .soliloquy-list-inline {
226
- margin: 0;
227
- list-style: none; }
228
- .soliloquy-list-inline li {
229
- display: inline-block;
230
- margin-right: 5px; }
231
- .soliloquy-list-inline li:last-child {
232
- margin-right: 0 !important; }
233
-
234
- .soliloquy-yt iframe {
235
- max-width: 100%;
236
- height: auto; }
237
-
238
- .soliloquy-hidden {
239
- display: none !important; }
240
-
241
- .soliloquy-hideme {
242
- visibility: hidden; }
243
-
244
- .soliloquy-no-border {
245
- border: none !important; }
246
-
247
- .soliloquy-right {
248
- float: right; }
249
-
250
- .soliloquy-left {
251
- float: left; }
252
-
253
- .soliloquy-clearfix {
254
- clear: both;
255
- display: block;
256
- height: 0;
257
- overflow: hidden;
258
- visibility: hidden;
259
- width: 0; }
260
-
261
- .no-margin {
262
- margin: 0 !important; }
263
-
264
- .no-margin-top {
265
- margin-top: 0 !important; }
266
-
267
- .no-margin-bottom {
268
- margin-bottom: 0 !important; }
269
-
270
- /* Add this attribute to the element that needs a tooltip */
271
- [data-soliloquy-tooltip] {
272
- position: relative;
273
- z-index: 2;
274
- cursor: pointer; }
275
-
276
- /* Hide the tooltip content by default */
277
- [data-soliloquy-tooltip]:before,
278
- [data-soliloquy-tooltip]:after {
279
- visibility: hidden;
280
- opacity: 0;
281
- pointer-events: none; }
282
-
283
- /* Position tooltip above the element */
284
- [data-soliloquy-tooltip]:before {
285
- position: absolute;
286
- bottom: 120%;
287
- left: 50%;
288
- margin-bottom: 5px;
289
- margin-left: -35px;
290
- padding: 7px;
291
- width: 60px;
292
- -webkit-border-radius: 3px;
293
- -moz-border-radius: 3px;
294
- border-radius: 3px;
295
- background-color: #000;
296
- color: #fff;
297
- content: attr(data-soliloquy-tooltip);
298
- text-align: center;
299
- font-size: 12px;
300
- line-height: 1.2; }
301
-
302
- /* Triangle hack to make tooltip look like a speech bubble */
303
- [data-soliloquy-tooltip]:after {
304
- position: absolute;
305
- bottom: 120%;
306
- left: 50%;
307
- width: 0;
308
- margin-left: -5px;
309
- border-top: 5px solid #000;
310
- border-right: 5px solid transparent;
311
- border-left: 5px solid transparent;
312
- content: " ";
313
- font-size: 0;
314
- line-height: 0; }
315
-
316
- /* Show tooltip content on hover */
317
- [data-soliloquy-tooltip]:hover:before,
318
- [data-soliloquy-tooltip]:hover:after {
319
- visibility: visible;
320
- opacity: 1; }
321
-
322
- .soliloquy-alert {
323
- position: relative;
324
- margin: 0 0 20px 0;
325
- padding: 20px;
326
- -webkit-border-radius: 2px;
327
- -moz-border-radius: 2px;
328
- -o-border-radius: 2px;
329
- border-radius: 2px;
330
- background: #fcf8e3; }
331
-
332
- [class*=soliloquy-grid-] {
333
- float: left;
334
- margin-left: 2%; }
335
- [class*=soliloquy-grid-] input[type=text] {
336
- width: 100% !important; }
337
-
338
- .soliloquy-grid-1 {
339
- width: 6.5%; }
340
-
341
- .soliloquy-grid-2 {
342
- width: 15%; }
343
-
344
- .soliloquy-grid-3 {
345
- width: 23.5%; }
346
-
347
- .soliloquy-grid-4 {
348
- width: 32%; }
349
-
350
- .soliloquy-grid-5 {
351
- width: 40.5%; }
352
-
353
- .soliloquy-grid-6 {
354
- width: 49%; }
355
-
356
- .soliloquy-grid-7 {
357
- width: 57.5%; }
358
-
359
- .soliloquy-grid-8 {
360
- width: 66%; }
361
-
362
- .soliloquy-grid-9 {
363
- width: 74.5%; }
364
-
365
- .soliloquy-grid-10 {
366
- width: 83%; }
367
-
368
- .soliloquy-grid-11 {
369
- width: 91.5%; }
370
-
371
- .soliloquy-grid-12 {
372
- width: 100%; }
373
-
374
- .soliloquy-first {
375
- margin-left: 0px; }
376
-
377
- /*!
378
- Chosen, a Select Box Enhancer for jQuery and Prototype
379
- by Patrick Filler for Harvest, http://getharvest.com
380
-
381
- Version 1.5.1
382
- Full source at https://github.com/harvesthq/chosen
383
- Copyright (c) 2011-2016 Harvest http://getharvest.com
384
-
385
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
386
- This file is generated by `grunt build`, do not edit it by hand.
387
- */
388
- .soliloquy-select {
389
- /* @group Base */
390
- /* @end */
391
- /* @group Single Chosen */
392
- /* @end */
393
- /* @group Results */
394
- /* @end */
395
- /* @group Multi Chosen */
396
- /* @end */
397
- /* @group Active */
398
- /* @end */
399
- /* @group Disabled Support */
400
- /* @end */
401
- /* @group Right to Left */
402
- /* @end */
403
- /* @group Retina compatibility */
404
- /* @end */ }
405
- .soliloquy-select * {
406
- box-shadow: none !important;
407
- background-image: none !important; }
408
- .soliloquy-select *:after {
409
- background-image: none !important; }
410
- .soliloquy-select .soliloquy-chosen {
411
- height: 35px;
412
- max-width: 350px;
413
- width: 100%; }
414
- .soliloquy-select .chosen-container {
415
- position: relative;
416
- display: inline-block;
417
- vertical-align: middle;
418
- font-size: 13px;
419
- -webkit-user-select: none;
420
- -moz-user-select: none;
421
- user-select: none;
422
- max-width: 350px;
423
- font-weight: 600; }
424
- .soliloquy-select .chosen-container * {
425
- -webkit-box-sizing: border-box;
426
- -moz-box-sizing: border-box;
427
- box-sizing: border-box; }
428
- .soliloquy-select .chosen-container .chosen-drop {
429
- position: absolute;
430
- top: 100%;
431
- left: -9999px;
432
- z-index: 1010;
433
- width: 100%;
434
- border: 1px solid #dddddd;
435
- border-top: 0;
436
- background: white; }
437
- .soliloquy-select .chosen-container.chosen-with-drop .chosen-drop {
438
- left: 0; }
439
- .soliloquy-select .chosen-container a {
440
- cursor: pointer; }
441
- .soliloquy-select .chosen-container .search-choice .group-name, .soliloquy-select .chosen-container .chosen-single .group-name {
442
- margin-right: 4px;
443
- overflow: hidden;
444
- white-space: nowrap;
445
- text-overflow: ellipsis;
446
- font-weight: normal;
447
- color: #999999; }
448
- .soliloquy-select .chosen-container .search-choice .group-name:after, .soliloquy-select .chosen-container .chosen-single .group-name:after {
449
- content: ":";
450
- padding-left: 2px;
451
- vertical-align: top; }
452
- .soliloquy-select .chosen-container-single .chosen-single {
453
- position: relative;
454
- display: block;
455
- overflow: hidden;
456
- padding: 0 0 0 8px;
457
- height: 35px;
458
- border: 1px solid #dddddd;
459
- border-radius: 3px;
460
- background: white;
461
- background-clip: padding-box;
462
- color: #444;
463
- text-decoration: none;
464
- white-space: nowrap;
465
- line-height: 35px; }
466
- .soliloquy-select .chosen-container-single .chosen-default {
467
- color: #999; }
468
- .soliloquy-select .chosen-container-single .chosen-single span {
469
- display: block;
470
- overflow: hidden;
471
- margin-right: 26px;
472
- text-overflow: ellipsis;
473
- white-space: nowrap; }
474
- .soliloquy-select .chosen-container-single .chosen-single-with-deselect span {
475
- margin-right: 38px; }
476
- .soliloquy-select .chosen-container-single .chosen-single abbr {
477
- position: absolute;
478
- top: 6px;
479
- right: 26px;
480
- display: block;
481
- width: 12px;
482
- height: 12px;
483
- font-size: 1px; }
484
- .soliloquy-select .chosen-container-single .chosen-single abbr:hover {
485
- background-position: -42px -10px; }
486
- .soliloquy-select .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
487
- background-position: -42px -10px; }
488
- .soliloquy-select .chosen-container-single .chosen-single div {
489
- border-left: 1px solid #dddddd;
490
- position: absolute;
491
- top: 0;
492
- right: 0;
493
- display: block;
494
- width: 30px;
495
- height: 100%;
496
- padding-left: 9px; }
497
- .soliloquy-select .chosen-container-single .chosen-single div b {
498
- display: block;
499
- width: 100%;
500
- height: 100%;
501
- line-height: 35px; }
502
- .soliloquy-select .chosen-container-single .chosen-single div b:before {
503
- content: "\0051";
504
- display: block;
505
- font-weight: normal;
506
- font-size: 8px !important;
507
- font-family: 'soliloquy';
508
- position: absolute;
509
- text-align: center; }
510
- .soliloquy-select .chosen-container-single .chosen-search {
511
- position: relative;
512
- z-index: 1010;
513
- margin: 0;
514
- padding: 3px 4px;
515
- white-space: nowrap; }
516
- .soliloquy-select .chosen-container-single .chosen-search input[type="text"] {
517
- margin: 1px 0;
518
- padding: 4px 20px 4px 5px;
519
- width: 100%;
520
- height: auto;
521
- outline: 0;
522
- border: 1px solid #dddddd;
523
- background: white url("chosen-sprite.png") no-repeat 100% -20px;
524
- background: url("chosen-sprite.png") no-repeat 100% -20px;
525
- font-size: 1em;
526
- font-family: sans-serif;
527
- line-height: normal;
528
- border-radius: 0; }
529
- .soliloquy-select .chosen-container-single .chosen-drop {
530
- margin-top: -1px;
531
- border-radius: 0 0 2px 2px;
532
- background-clip: padding-box; }
533
- .soliloquy-select .chosen-container-single.chosen-container-single-nosearch .chosen-search {
534
- position: absolute;
535
- left: -9999px; }
536
- .soliloquy-select .chosen-container .chosen-results {
537
- color: #444;
538
- position: relative;
539
- overflow-x: hidden;
540
- overflow-y: auto;
541
- margin: 0 4px 4px 0;
542
- padding: 0 0 0 4px;
543
- max-height: 240px;
544
- -webkit-overflow-scrolling: touch; }
545
- .soliloquy-select .chosen-container .chosen-results li {
546
- display: none;
547
- margin: 0;
548
- padding: 5px 6px;
549
- list-style: none;
550
- line-height: 15px;
551
- word-wrap: break-word;
552
- -webkit-touch-callout: none; }
553
- .soliloquy-select .chosen-container .chosen-results li.active-result {
554
- display: list-item;
555
- cursor: pointer; }
556
- .soliloquy-select .chosen-container .chosen-results li.disabled-result {
557
- display: list-item;
558
- color: #ccc;
559
- cursor: default; }
560
- .soliloquy-select .chosen-container .chosen-results li.highlighted {
561
- background: #ff3700;
562
- color: white; }
563
- .soliloquy-select .chosen-container .chosen-results li.no-results {
564
- color: #777;
565
- display: list-item;
566
- background: #f4f4f4; }
567
- .soliloquy-select .chosen-container .chosen-results li.group-result {
568
- display: list-item;
569
- font-weight: bold;
570
- cursor: default; }
571
- .soliloquy-select .chosen-container .chosen-results li.group-option {
572
- padding-left: 15px; }
573
- .soliloquy-select .chosen-container .chosen-results li em {
574
- font-style: normal;
575
- text-decoration: underline; }
576
- .soliloquy-select .chosen-container-multi .chosen-choices {
577
- position: relative;
578
- overflow: hidden;
579
- margin: 0;
580
- padding: 0 5px;
581
- width: 100%;
582
- height: auto !important;
583
- height: 1%;
584
- border: 1px solid #dddddd;
585
- background: white;
586
- cursor: text; }
587
- .soliloquy-select .chosen-container-multi .chosen-choices li {
588
- float: left;
589
- list-style: none; }
590
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-field {
591
- margin: 0;
592
- padding: 0;
593
- white-space: nowrap; }
594
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
595
- margin: 1px 0;
596
- padding: 0;
597
- height: 25px;
598
- outline: 0;
599
- border: 0 !important;
600
- background: transparent !important;
601
- box-shadow: none;
602
- color: #999;
603
- font-size: 100%;
604
- font-family: sans-serif;
605
- line-height: normal;
606
- border-radius: 0; }
607
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice {
608
- position: relative;
609
- margin: 3px 5px 3px 0;
610
- padding: 3px 20px 3px 5px;
611
- border: 1px solid #dddddd;
612
- max-width: 100%;
613
- border-radius: 2px;
614
- background: white;
615
- background-size: 100% 19px;
616
- background-repeat: repeat-x;
617
- background-clip: padding-box;
618
- box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
619
- color: #333;
620
- line-height: 13px;
621
- cursor: default; }
622
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice span {
623
- word-wrap: break-word; }
624
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
625
- position: absolute;
626
- top: 4px;
627
- right: 3px;
628
- display: block;
629
- width: 12px;
630
- height: 12px;
631
- background: url("chosen-sprite.png") -42px 1px no-repeat;
632
- font-size: 1px; }
633
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
634
- background-position: -42px -10px; }
635
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-disabled {
636
- padding-right: 5px;
637
- border: 1px solid #dddddd;
638
- background: #e4e4e4;
639
- color: #666; }
640
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus {
641
- background: #d4d4d4; }
642
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
643
- background-position: -42px -10px; }
644
- .soliloquy-select .chosen-container-multi .chosen-results {
645
- margin: 0;
646
- padding: 0; }
647
- .soliloquy-select .chosen-container-multi .chosen-drop .result-selected {
648
- display: list-item;
649
- color: #ccc;
650
- cursor: default; }
651
- .soliloquy-select .chosen-container-active .chosen-single {
652
- border: 1px solid #dddddd; }
653
- .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single {
654
- border: 1px solid #dddddd;
655
- -moz-border-radius-bottomright: 0;
656
- border-bottom-right-radius: 0;
657
- -moz-border-radius-bottomleft: 0;
658
- border-bottom-left-radius: 0;
659
- background: white; }
660
- .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div {
661
- border-left: 1px solid transparent;
662
- background: transparent; }
663
- .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div b {
664
- background-position: -18px 2px; }
665
- .soliloquy-select .chosen-container-active .chosen-choices {
666
- border: 1px solid #5897fb;
667
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); }
668
- .soliloquy-select .chosen-container-active .chosen-choices li.search-field input[type="text"] {
669
- color: #222 !important; }
670
- .soliloquy-select .chosen-disabled {
671
- opacity: 0.5 !important;
672
- cursor: default; }
673
- .soliloquy-select .chosen-disabled .chosen-single {
674
- cursor: default; }
675
- .soliloquy-select .chosen-disabled .chosen-choices .search-choice .search-choice-close {
676
- cursor: default; }
677
- .soliloquy-select .chosen-rtl {
678
- text-align: right; }
679
- .soliloquy-select .chosen-rtl .chosen-single {
680
- overflow: visible;
681
- padding: 0 8px 0 0; }
682
- .soliloquy-select .chosen-rtl .chosen-single span {
683
- margin-right: 0;
684
- margin-left: 26px;
685
- direction: rtl; }
686
- .soliloquy-select .chosen-rtl .chosen-single-with-deselect span {
687
- margin-left: 38px; }
688
- .soliloquy-select .chosen-rtl .chosen-single div {
689
- right: auto;
690
- left: 3px; }
691
- .soliloquy-select .chosen-rtl .chosen-single abbr {
692
- right: auto;
693
- left: 26px; }
694
- .soliloquy-select .chosen-rtl .chosen-choices li {
695
- float: right; }
696
- .soliloquy-select .chosen-rtl .chosen-choices li.search-field input[type="text"] {
697
- direction: rtl; }
698
- .soliloquy-select .chosen-rtl .chosen-choices li.search-choice {
699
- margin: 3px 5px 3px 0;
700
- padding: 3px 5px 3px 19px; }
701
- .soliloquy-select .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
702
- right: auto;
703
- left: 4px; }
704
- .soliloquy-select .chosen-rtl.chosen-container-single-nosearch .chosen-search,
705
- .soliloquy-select .chosen-rtl .chosen-drop {
706
- left: 9999px; }
707
- .soliloquy-select .chosen-rtl.chosen-container-single .chosen-results {
708
- margin: 0 0 4px 4px;
709
- padding: 0 4px 0 0; }
710
- .soliloquy-select .chosen-rtl .chosen-results li.group-option {
711
- padding-right: 15px;
712
- padding-left: 0; }
713
- .soliloquy-select .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
714
- border-right: none; }
715
- .soliloquy-select .chosen-rtl .chosen-search input[type="text"] {
716
- padding: 4px 5px 4px 20px;
717
- background: white url("chosen-sprite.png") no-repeat -30px -20px;
718
- background: url("chosen-sprite.png") no-repeat -30px -20px;
719
- direction: rtl; }
720
- .soliloquy-select .chosen-rtl.chosen-container-single .chosen-single div b {
721
- background-position: 6px 2px; }
722
- .soliloquy-select .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
723
- background-position: -12px 2px; }
724
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
725
- .soliloquy-select .chosen-rtl .chosen-search input[type="text"],
726
- .soliloquy-select .chosen-container-single .chosen-single abbr,
727
- .soliloquy-select .chosen-container-single .chosen-search input[type="text"],
728
- .soliloquy-select .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
729
- .soliloquy-select .chosen-container .chosen-results-scroll-down span,
730
- .soliloquy-select .chosen-container .chosen-results-scroll-up span {
731
- background-image: none !important;
732
- background-size: 52px 37px !important;
733
- background-repeat: no-repeat !important; } }
734
- .soliloquy-select select.soliloquy-chosen + .chosen-container.chosen-container-single .chosen-single {
735
- padding-right: 35px; }
736
-
737
- /* ==========================================================================
738
- Addons Styles
739
- ========================================================================== */
740
- /* Heading */
741
- #soliloquy-heading {
742
- background-color: white;
743
- height: 45px;
744
- margin-left: -20px; }
745
- #soliloquy-heading h1 {
746
- margin: 0;
747
- padding-left: 20px;
748
- line-height: 45px;
749
- font-size: 20px;
750
- font-weight: 400; }
751
-
752
- #soliloquy-settings-refresh-addons-form {
753
- float: left; }
754
- #soliloquy-settings-refresh-addons-form p {
755
- font-size: 14px; }
756
-
757
- .soliloquy-addon-filter {
758
- font-weight: 600;
759
- margin-right: 10px; }
760
-
761
- #soliloquy-addons-area {
762
- margin-top: 20px; }
763
-
764
- #soliloquy-addons-upgrade-area {
765
- padding-top: 0;
766
- margin-top: 0;
767
- border-top: none; }
768
- #soliloquy-addons-upgrade-area h2.soliloquy-addons-upgrade {
769
- font-size: 23px; }
770
- #soliloquy-addons-upgrade-area .soliloquy-unlock-text {
771
- font-size: 14px;
772
- margin-bottom: 30px; }
773
- #soliloquy-addons-upgrade-area .soliloquy-addon-unlock {
774
- max-width: 125px;
775
- margin: auto;
776
- text-align: center; }
777
-
778
- .soliloquy-addon {
779
- position: relative;
780
- border: 1px solid #dddddd;
781
- background: white;
782
- border-radius: 3px;
783
- float: left;
784
- margin: 0 2% 2% 0;
785
- height: 510px;
786
- text-align: center;
787
- width: 32%;
788
- box-sizing: border-box;
789
- -webkit-box-sizing: border-box;
790
- -moz-box-sizing: border-box; }
791
- .soliloquy-addon .soliloquy-addon-thumb {
792
- border-radius: 3px;
793
- height: auto;
794
- margin: 0 auto;
795
- max-width: 100%;
796
- width: auto; }
797
- .soliloquy-addon.last {
798
- margin-right: 0; }
799
- .soliloquy-addon .soliloquy-addon-content {
800
- padding: 20px; }
801
- .soliloquy-addon .soliloquy-addon-footer {
802
- position: absolute;
803
- width: 100%;
804
- bottom: 0;
805
- height: 75px;
806
- line-height: 75px;
807
- border-top: 1px solid #dddddd;
808
- background-color: #f7f7f7; }
809
- .soliloquy-addon .soliloquy-addon-footer .soliloquy-unlock-addon {
810
- vertical-align: middle; }
811
- .soliloquy-addon .soliloquy-addon-action-button:before {
812
- font-size: 18px;
813
- vertical-align: middle;
814
- margin-top: -1px; }
815
- .soliloquy-addon .soliloquy-icon-cloud-download.soliloquy-addon-action-button:before {
816
- color: #999999; }
817
- .soliloquy-addon .soliloquy-icon-toggle-on.soliloquy-activate-addon:before {
818
- -webkit-transform: rotate(180deg);
819
- -moz-transform: rotate(180deg);
820
- -ms-transform: rotate(180deg);
821
- -o-transform: rotate(180deg);
822
- transform: rotate(180deg);
823
- color: #e3231b; }
824
- .soliloquy-addon .soliloquy-icon-toggle-on.soliloquy-deactivate-addon:before {
825
- color: #72b63d; }
826
- .soliloquy-addon .soliloquy-addon-message,
827
- .soliloquy-addon .soliloquy-addon-error {
828
- -moz-border-radius: 3px;
829
- -webkit-border-radius: 3px;
830
- border-radius: 3px;
831
- text-align: left; }
832
- .soliloquy-addon .soliloquy-addon-inactive .addon-status span {
833
- color: #e3231b; }
834
- .soliloquy-addon .addon-status-not-installed span {
835
- color: #999999; }
836
- .soliloquy-addon .soliloquy-addon-active .addon-status span {
837
- color: #72b63d; }
838
- .soliloquy-addon .soliloquy-addon-message span {
839
- font-weight: bold; }
840
- .soliloquy-addon .soliloquy-addon-action {
841
- display: inline;
842
- float: right;
843
- margin-top: 20px;
844
- margin-right: 15px; }
845
- .soliloquy-addon .soliloquy-addon-message {
846
- margin-left: 15px; }
847
- .soliloquy-addon .soliloquy-addon-error {
848
- margin-top: 10px; }
849
- .soliloquy-addon .soliloquy-addon-error .wrap {
850
- margin: 0; }
851
- .soliloquy-addon .soliloquy-addon-error .icon32 {
852
- display: none; }
853
- .soliloquy-addon .soliloquy-addon-error h2 {
854
- padding: 0; }
855
- .soliloquy-addon .soliloquy-addon-error .form-table th {
856
- padding: 10px 0;
857
- width: 30% !important; }
858
- .soliloquy-addon .soliloquy-addon-error .form-table input[type="text"],
859
- .soliloquy-addon .soliloquy-addon-error .form-table input[type="password"] {
860
- width: 100% !important; }
861
- .soliloquy-addon .soliloquy-addon-error p.submit {
862
- padding: 0; }
863
- .soliloquy-addon p {
864
- color: #2f2f2f;
865
- font-size: 13px;
866
- margin: 30px 40px; }
867
-
868
- @media screen and (min-width: 1751px) {
869
- .soliloquy-addon {
870
- margin: 0 2% 2% 0;
871
- height: 720px;
872
- width: 32%; } }
873
- @media screen and (max-width: 1750px) {
874
- .soliloquy-addon {
875
- margin: 0 2% 2% 0;
876
- height: 620px;
877
- width: 32%; } }
878
- @media screen and (max-width: 1549px) {
879
- .soliloquy-addon {
880
- margin: 0 2% 2% 0;
881
- height: 500px;
882
- width: 32%; } }
883
- @media screen and (max-width: 1200px) {
884
- .soliloquy-addon {
885
- margin: 0 2% 2% 0;
886
- min-height: 460px;
887
- width: 48%; }
888
- .soliloquy-addon.last {
889
- margin: 0 2% 2% 0; }
890
- .soliloquy-addon:nth-child(2) {
891
- margin-right: 0; } }
892
- @media screen and (max-width: 568px) {
893
- .soliloquy-addon {
894
- margin: 0 1% 1% 0;
895
- min-height: 530px;
896
- margin-bottom: 30px;
897
- width: 98%; }
898
- .soliloquy-addon.last {
899
- margin: 0 1% 1% 0; }
900
- .soliloquy-addon .soliloquy-addon-action {
901
- margin-top: 0; } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/css/attachment-details-modal-support.css DELETED
File without changes
trunk/assets/css/chosen-sprite.png DELETED
Binary file
trunk/assets/css/chosen-sprite@2x.png DELETED
Binary file
trunk/assets/css/codemirror.css DELETED
@@ -1,67 +0,0 @@
1
- /* Base CodeMirror CSS */
2
- .CodeMirror{font-family:monospace;height:300px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror div.CodeMirror-cursor{border-left:1px solid black}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.cm-tab{display:inline-block}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.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-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.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-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:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:white;color:black}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-sizer{position:relative;border-right:30px solid transparent;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-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}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;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-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;border-right:0;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:1}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}
3
- /* ttcn theme */
4
- .cm-s-ttcn .cm-quote { color: #090; }
5
- .cm-s-ttcn .cm-negative { color: #d44; }
6
- .cm-s-ttcn .cm-positive { color: #292; }
7
- .cm-s-ttcn .cm-header, .cm-strong { font-weight: bold; }
8
- .cm-s-ttcn .cm-em { font-style: italic; }
9
- .cm-s-ttcn .cm-link { text-decoration: underline; }
10
- .cm-s-ttcn .cm-strikethrough { text-decoration: line-through; }
11
- .cm-s-ttcn .cm-header { color: #00f; font-weight: bold; }
12
-
13
- .cm-s-ttcn .cm-atom { color: #219; }
14
- .cm-s-ttcn .cm-attribute { color: #00c; }
15
- .cm-s-ttcn .cm-bracket { color: #997; }
16
- .cm-s-ttcn .cm-comment { color: #333333; }
17
- .cm-s-ttcn .cm-def { color: #00f; }
18
- .cm-s-ttcn .cm-em { font-style: italic; }
19
- .cm-s-ttcn .cm-error { color: #f00; }
20
- .cm-s-ttcn .cm-hr { color: #999; }
21
- .cm-s-ttcn .cm-invalidchar { color: #f00; }
22
- .cm-s-ttcn .cm-keyword { font-weight:bold; }
23
- .cm-s-ttcn .cm-link { color: #00c; text-decoration: underline; }
24
- .cm-s-ttcn .cm-meta { color: #555; }
25
- .cm-s-ttcn .cm-negative { color: #d44; }
26
- .cm-s-ttcn .cm-positive { color: #292; }
27
- .cm-s-ttcn .cm-qualifier { color: #555; }
28
- .cm-s-ttcn .cm-strikethrough { text-decoration: line-through; }
29
- .cm-s-ttcn .cm-string { color: #006400; }
30
- .cm-s-ttcn .cm-string-2 { color: #f50; }
31
- .cm-s-ttcn .cm-strong { font-weight: bold; }
32
- .cm-s-ttcn .cm-tag { color: #170; }
33
- .cm-s-ttcn .cm-variable { color: #8B2252; }
34
- .cm-s-ttcn .cm-variable-2 { color: #05a; }
35
- .cm-s-ttcn .cm-variable-3 { color: #085; }
36
-
37
- .cm-s-ttcn .cm-invalidchar { color: #f00; }
38
-
39
- /* ASN */
40
- .cm-s-ttcn .cm-accessTypes,
41
- .cm-s-ttcn .cm-compareTypes { color: #27408B; }
42
- .cm-s-ttcn .cm-cmipVerbs { color: #8B2252; }
43
- .cm-s-ttcn .cm-modifier { color:#D2691E; }
44
- .cm-s-ttcn .cm-status { color:#8B4545; }
45
- .cm-s-ttcn .cm-storage { color:#A020F0; }
46
- .cm-s-ttcn .cm-tags { color:#006400; }
47
-
48
- /* CFG */
49
- .cm-s-ttcn .cm-externalCommands { color: #8B4545; font-weight:bold; }
50
- .cm-s-ttcn .cm-fileNCtrlMaskOptions,
51
- .cm-s-ttcn .cm-sectionTitle { color: #2E8B57; font-weight:bold; }
52
-
53
- /* TTCN */
54
- .cm-s-ttcn .cm-booleanConsts,
55
- .cm-s-ttcn .cm-otherConsts,
56
- .cm-s-ttcn .cm-verdictConsts { color: #006400; }
57
- .cm-s-ttcn .cm-configOps,
58
- .cm-s-ttcn .cm-functionOps,
59
- .cm-s-ttcn .cm-portOps,
60
- .cm-s-ttcn .cm-sutOps,
61
- .cm-s-ttcn .cm-timerOps,
62
- .cm-s-ttcn .cm-verdictOps { color: #0000FF; }
63
- .cm-s-ttcn .cm-preprocessor,
64
- .cm-s-ttcn .cm-templateMatch,
65
- .cm-s-ttcn .cm-ttcn3Macros { color: #27408B; }
66
- .cm-s-ttcn .cm-types { color: #A52A2A; font-weight:bold; }
67
- .cm-s-ttcn .cm-visibilityModifiers { font-weight:bold; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/css/fonts.css DELETED
@@ -1,51 +0,0 @@
1
- /* Generated by soliloquy (http://www.soliloquy.com) on Mon Mar 21 2016*/
2
- @font-face {
3
- font-family: 'soliloquy';
4
- src: url("../fonts/soliloquy.eot");
5
- src: url("../fonts/soliloquy.eot?#iefix") format("embedded-opentype"), url("../fonts/soliloquy.woff") format("woff"), url("../fonts/soliloquy.ttf") format("truetype"), url("../fonts/soliloquy.svg#soliloquy") format("svg");
6
- font-weight: normal;
7
- font-style: normal; }
8
- [class*='soliloquy-']:before {
9
- display: inline-block;
10
- font-family: 'soliloquy';
11
- font-style: normal;
12
- font-weight: normal;
13
- line-height: 1;
14
- -webkit-font-smoothing: antialiased;
15
- -moz-osx-font-smoothing: grayscale; }
16
-
17
- .soliloquy-configuration:before {
18
- content: '\0042'; }
19
-
20
- .soliloquy-leaf:before {
21
- content: '\0043'; }
22
-
23
- .soliloquy-lightbox:before {
24
- content: '\0044'; }
25
-
26
- .soliloquy-misc:before {
27
- content: '\0045'; }
28
-
29
- .soliloquy-mobile:before {
30
- content: '\0046'; }
31
-
32
- .soliloquy-pagination:before {
33
- content: '\0047'; }
34
-
35
- .soliloquy-proofing:before {
36
- content: '\0048'; }
37
-
38
- .soliloquy-slideshow:before {
39
- content: '\0049'; }
40
-
41
- .soliloquy-tags:before {
42
- content: '\004a'; }
43
-
44
- .soliloquy-thumbnails:before {
45
- content: '\004b'; }
46
-
47
- .soliloquy-video:before {
48
- content: '\004c'; }
49
-
50
- .soliloquy-watermark:before {
51
- content: '\004d'; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/css/global.css DELETED
File without changes
trunk/assets/css/images/blank.gif DELETED
Binary file
trunk/assets/css/images/circle-hover.png DELETED
Binary file
trunk/assets/css/images/circle-hover@2x.png DELETED
Binary file
trunk/assets/css/images/circle.png DELETED
Binary file
trunk/assets/css/images/circle@2x.png DELETED
Binary file
trunk/assets/css/images/delete.png DELETED
Binary file
trunk/assets/css/images/delete@2x.png DELETED
Binary file
trunk/assets/css/images/down.png DELETED
Binary file
trunk/assets/css/images/down@2x.png DELETED
Binary file
trunk/assets/css/images/editor-icon.png DELETED
Binary file
trunk/assets/css/images/editor-icon@2x.png DELETED
Binary file
trunk/assets/css/images/holder.gif DELETED
Binary file
trunk/assets/css/images/left.png DELETED
Binary file
trunk/assets/css/images/left@2x.png DELETED
Binary file
trunk/assets/css/images/menu-icon.png DELETED
Binary file
trunk/assets/css/images/menu-icon@2x.png DELETED
Binary file
trunk/assets/css/images/meta-active.png DELETED
Binary file
trunk/assets/css/images/meta-active@2x.png DELETED
Binary file
trunk/assets/css/images/meta.png DELETED
Binary file
trunk/assets/css/images/meta@2x.png DELETED
Binary file
trunk/assets/css/images/modify.png DELETED
Binary file
trunk/assets/css/images/modify@2x.png DELETED
Binary file
trunk/assets/css/images/pause.png DELETED
Binary file
trunk/assets/css/images/pause@2x.png DELETED
Binary file
trunk/assets/css/images/play.png DELETED
Binary file
trunk/assets/css/images/play@2x.png DELETED
Binary file
trunk/assets/css/images/preloader.gif DELETED
Binary file
trunk/assets/css/images/preloader@2x.gif DELETED
Binary file
trunk/assets/css/images/right.png DELETED
Binary file
trunk/assets/css/images/right@2x.png DELETED
Binary file
trunk/assets/css/images/up.png DELETED
Binary file
trunk/assets/css/images/up@2x.png DELETED
Binary file
trunk/assets/css/images/video-mini.png DELETED
Binary file
trunk/assets/css/images/video.png DELETED
Binary file
trunk/assets/css/images/video@2x.png DELETED
Binary file
trunk/assets/css/media-edit.css DELETED
@@ -1,4 +0,0 @@
1
- #soliloquy-meta-edit .attachment-details .settings span {
2
- min-width: 0; }
3
- #soliloquy-meta-edit .attachment-details .settings input[type=text] {
4
- width: 100%; }
 
 
 
 
trunk/assets/css/metabox.css DELETED
@@ -1,11 +0,0 @@
1
- @font-face{font-family:'soliloquy';src:url("../fonts/soliloquy.eot");src:url("../fonts/soliloquy.eot?#iefix") format("embedded-opentype"),url("../fonts/soliloquy.woff") format("woff"),url("../fonts/soliloquy.ttf") format("truetype"),url("../fonts/soliloquy.svg#soliloquy") format("svg");font-weight:normal;font-style:normal}[class*='soliloquy-icon-']:before{display:inline-block;font-family:'soliloquy';font-style:normal;font-weight:normal;font-size:13px;line-height:1.5;margin-right:8px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.soliloquy-icon-configuration:before{content:'\0041'}.soliloquy-icon-soliloquy:before{content:'\0042'}.soliloquy-icon-pinterest:before{content:'\0043'}.soliloquy-icon-lightbox:before{content:'\0044'}.soliloquy-icon-misc:before{content:'\0045'}.soliloquy-icon-mobile:before{content:'\0046'}.soliloquy-icon-pagination:before{content:'\0047'}.soliloquy-icon-proofing:before{content:'\0048'}.soliloquy-icon-slideshow:before{content:'\0049'}.soliloquy-icon-tags:before{content:'\004a'}.soliloquy-icon-thumbnails:before{content:'\004b'}.soliloquy-icon-video:before{content:'\004c'}.soliloquy-icon-watermark:before{content:'\004d'}.soliloquy-icon-cloud-download:before{content:'\004e'}.soliloquy-icon-toggle-on:before{content:'\004f'}.soliloquy-icon-plus-circle:before{content:'\0050'}.soliloquy-icon-list:before{content:'\0052'}.soliloquy-icon-grid:before{content:'\0053'}.soliloquy-icon-pencil:before{content:'\0055'}.soliloquy-icon-close:before{content:'\0056'}.soliloquy-icon-check:before{content:'\0057'}.soliloquy-icon-schedule:before{content:'\0058'}.soliloquy-icon-carousel:before{content:'\0059'}#soliloquy-header{background-color:#ff3700;height:120px;margin-left:-20px}#soliloquy-header #soliloquy-logo{margin:0;padding-top:25px;line-height:120px;margin-left:20px}#soliloquy-header #soliloquy-logo img{max-width:288px}.wp-core-ui .button-soliloquy{background:#ff3700;border-color:#ff3700;-webkit-box-shadow:none;box-shadow:none;color:#fff;text-decoration:none;font-weight:500;text-shadow:none;line-height:15px;height:35px;font-size:13px;padding:0 20px 1px}.wp-core-ui .button-soliloquy:hover{background:#ff3700;border-color:#ff3700;color:#fff;opacity:.8}.wp-core-ui .button-soliloquy-secondary{background:#f7f7f7;border:1px solid;border-color:#ddd;-webkit-box-shadow:none;box-shadow:none;color:#23282d;text-decoration:none;text-shadow:none;font-weight:bold;height:35px;font-size:13px;padding:0 20px 1px}.wp-core-ui .button-soliloquy-secondary:hover{background:#f7f7f7;border-color:#999;color:#23282d}.wp-core-ui .button-soliloquy-delete{background:#e3231b;border:1px solid;border-color:#e3231b;-webkit-box-shadow:none;box-shadow:none;color:#fff;text-decoration:none;text-shadow:none;font-weight:bold;height:35px;font-size:13px;padding:0 20px 1px}.wp-core-ui .button-soliloquy-delete:hover{background:#e3231b;color:#fff;opacity:.8}.wp-core-ui a.button-soliloquy,.wp-core-ui a.button-soliloquy-secondary,.wp-core-ui a.button-soliloquy-delete{line-height:32px}#soliloquy-settings-content input:not([type=checkbox]){background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;color:#32373c;height:35px;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out}#soliloquy-settings-content input[type=checkbox]:checked{-color:#ff3700}#soliloquy-settings-content textarea{width:100%}#soliloquy-settings-content input[type="password"].soliloquy-input{background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;color:#32373c;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out}input[type="password"].soliloquy-input{background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;height:35px;color:#32373c;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out}pre.soliloquy-code{background-color:#ddd;border-radius:3px;padding:15px}.soliloquy-clipboard{display:block;text-decoration:underline !important;padding-top:8px;font-size:11px;outline:0 !important}.soliloquy-clipboard:focus{outline-style:none;box-shadow:none;border-color:transparent}.soliloquy-code{display:block;background-color:#f7f7f7;border-radius:3px;padding:10px !important}.soliloquy-list-inline{margin:0;list-style:none}.soliloquy-list-inline li{display:inline-block;margin-right:5px}.soliloquy-list-inline li:last-child{margin-right:0 !important}.soliloquy-yt iframe{max-width:100%;height:auto}.soliloquy-hidden{display:none !important}.soliloquy-hideme{visibility:hidden}.soliloquy-no-border{border:none !important}.soliloquy-right{float:right}.soliloquy-left{float:left}.soliloquy-clearfix{clear:both;display:block;height:0;overflow:hidden;visibility:hidden;width:0}.no-margin{margin:0 !important}.no-margin-top{margin-top:0 !important}.no-margin-bottom{margin-bottom:0 !important}[data-soliloquy-tooltip]{position:relative;z-index:2;cursor:pointer}[data-soliloquy-tooltip]:before,[data-soliloquy-tooltip]:after{visibility:hidden;opacity:0;pointer-events:none}[data-soliloquy-tooltip]:before{position:absolute;bottom:120%;left:50%;margin-bottom:5px;margin-left:-35px;padding:7px;width:60px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background-color:#000;color:#fff;content:attr(data-soliloquy-tooltip);text-align:center;font-size:12px;line-height:1.2}[data-soliloquy-tooltip]:after{position:absolute;bottom:120%;left:50%;width:0;margin-left:-5px;border-top:5px solid #000;border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}[data-soliloquy-tooltip]:hover:before,[data-soliloquy-tooltip]:hover:after{visibility:visible;opacity:1}[class*=soliloquy-grid-]{float:left;margin-left:2%}[class*=soliloquy-grid-] input[type=text]{width:100% !important}.soliloquy-grid-1{width:6.5%}.soliloquy-grid-2{width:15%}.soliloquy-grid-3{width:23.5%}.soliloquy-grid-4{width:32%}.soliloquy-grid-5{width:40.5%}.soliloquy-grid-6{width:49%}.soliloquy-grid-7{width:57.5%}.soliloquy-grid-8{width:66%}.soliloquy-grid-9{width:74.5%}.soliloquy-grid-10{width:83%}.soliloquy-grid-11{width:91.5%}.soliloquy-grid-12{width:100%}.soliloquy-first{margin-left:0px}/*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.5.1
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2016 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */.soliloquy-select *{box-shadow:none !important;background-image:none !important}.soliloquy-select *:after{background-image:none !important}.soliloquy-select .soliloquy-chosen{height:35px;max-width:350px;width:100%}.soliloquy-select .chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none;max-width:350px;font-weight:600}.soliloquy-select .chosen-container *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.soliloquy-select .chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;width:100%;border:1px solid #ddd;border-top:0;background:#fff}.soliloquy-select .chosen-container.chosen-with-drop .chosen-drop{left:0}.soliloquy-select .chosen-container a{cursor:pointer}.soliloquy-select .chosen-container .search-choice .group-name,.soliloquy-select .chosen-container .chosen-single .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:normal;color:#999999}.soliloquy-select .chosen-container .search-choice .group-name:after,.soliloquy-select .chosen-container .chosen-single .group-name:after{content:":";padding-left:2px;vertical-align:top}.soliloquy-select .chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:35px;border:1px solid #ddd;border-radius:3px;background:#fff;background-clip:padding-box;color:#444;text-decoration:none;white-space:nowrap;line-height:35px}.soliloquy-select .chosen-container-single .chosen-default{color:#999}.soliloquy-select .chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.soliloquy-select .chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.soliloquy-select .chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;font-size:1px}.soliloquy-select .chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.soliloquy-select .chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.soliloquy-select .chosen-container-single .chosen-single div{border-left:1px solid #ddd;position:absolute;top:0;right:0;display:block;width:30px;height:100%;padding-left:9px}.soliloquy-select .chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;line-height:35px}.soliloquy-select .chosen-container-single .chosen-single div b:before{content:"\0051";display:block;font-weight:normal;font-size:8px !important;font-family:'soliloquy';position:absolute;text-align:center}.soliloquy-select .chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.soliloquy-select .chosen-container-single .chosen-search input[type="text"]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #ddd;background:#fff url("chosen-sprite.png") no-repeat 100% -20px;background:url("chosen-sprite.png") no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.soliloquy-select .chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 2px 2px;background-clip:padding-box}.soliloquy-select .chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.soliloquy-select .chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.soliloquy-select .chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.soliloquy-select .chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.soliloquy-select .chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.soliloquy-select .chosen-container .chosen-results li.highlighted{background:#ff3700;color:#fff}.soliloquy-select .chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.soliloquy-select .chosen-container .chosen-results li.group-result{display:list-item;font-weight:bold;cursor:default}.soliloquy-select .chosen-container .chosen-results li.group-option{padding-left:15px}.soliloquy-select .chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.soliloquy-select .chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto !important;height:1%;border:1px solid #ddd;background:#fff;cursor:text}.soliloquy-select .chosen-container-multi .chosen-choices li{float:left;list-style:none}.soliloquy-select .chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.soliloquy-select .chosen-container-multi .chosen-choices li.search-field input[type="text"]{margin:1px 0;padding:0;height:25px;outline:0;border:0 !important;background:transparent !important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #ddd;max-width:100%;border-radius:2px;background:#fff;background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);color:#333;line-height:13px;cursor:default}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url("chosen-sprite.png") -42px 1px no-repeat;font-size:1px}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ddd;background:#e4e4e4;color:#666}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.soliloquy-select .chosen-container-multi .chosen-results{margin:0;padding:0}.soliloquy-select .chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.soliloquy-select .chosen-container-active .chosen-single{border:1px solid #ddd}.soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #ddd;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background:#fff}.soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div{border-left:1px solid transparent;background:transparent}.soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.soliloquy-select .chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,0.3)}.soliloquy-select .chosen-container-active .chosen-choices li.search-field input[type="text"]{color:#222 !important}.soliloquy-select .chosen-disabled{opacity:0.5 !important;cursor:default}.soliloquy-select .chosen-disabled .chosen-single{cursor:default}.soliloquy-select .chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.soliloquy-select .chosen-rtl{text-align:right}.soliloquy-select .chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.soliloquy-select .chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.soliloquy-select .chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.soliloquy-select .chosen-rtl .chosen-single div{right:auto;left:3px}.soliloquy-select .chosen-rtl .chosen-single abbr{right:auto;left:26px}.soliloquy-select .chosen-rtl .chosen-choices li{float:right}.soliloquy-select .chosen-rtl .chosen-choices li.search-field input[type="text"]{direction:rtl}.soliloquy-select .chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.soliloquy-select .chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.soliloquy-select .chosen-rtl.chosen-container-single-nosearch .chosen-search,.soliloquy-select .chosen-rtl .chosen-drop{left:9999px}.soliloquy-select .chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.soliloquy-select .chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.soliloquy-select .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.soliloquy-select .chosen-rtl .chosen-search input[type="text"]{padding:4px 5px 4px 20px;background:#fff url("chosen-sprite.png") no-repeat -30px -20px;background:url("chosen-sprite.png") no-repeat -30px -20px;direction:rtl}.soliloquy-select .chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.soliloquy-select .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx){.soliloquy-select .chosen-rtl .chosen-search input[type="text"],.soliloquy-select .chosen-container-single .chosen-single abbr,.soliloquy-select .chosen-container-single .chosen-search input[type="text"],.soliloquy-select .chosen-container-multi .chosen-choices .search-choice .search-choice-close,.soliloquy-select .chosen-container .chosen-results-scroll-down span,.soliloquy-select .chosen-container .chosen-results-scroll-up span{background-image:none !important;background-size:52px 37px !important;background-repeat:no-repeat !important}}.soliloquy-select select.soliloquy-chosen+.chosen-container.chosen-container-single .chosen-single{padding-right:35px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info,#soliloquy-meta-edit .attachment-details .attachment-info{padding:16px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings,#soliloquy-meta-edit .attachment-details .attachment-info .settings{margin:0;padding:0;border:none}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .soliloquy-meta.code,#soliloquy-meta-edit .attachment-details .attachment-info .settings .soliloquy-meta.code{margin:0 0 20px 0;padding:0 0 20px 0;border-bottom:1px solid #ddd}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .soliloquy-meta.code span.name,#soliloquy-meta-edit .attachment-details .attachment-info .settings .soliloquy-meta.code span.name{display:block;width:100%;min-width:100%;margin:0;padding:0;text-align:left;font-weight:700;font-size:14px;margin-bottom:3px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting{margin:0 0 20px 0;padding:0 0 20px 0;border-bottom:1px solid #ddd}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting .check-label,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting .check-label{font-style:italic}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting input[type="text"],#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting textarea,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting input[type="text"],#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting textarea{display:block;width:100%;min-width:100%;margin:0}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting input[type="checkbox"],#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting input[type="checkbox"]{float:left;margin:7px 3px 0 0}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting select,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting select{margin:0}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting span.name,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting span.name{display:block;width:100%;min-width:100%;margin:0;padding:0;text-align:left;font-weight:700;font-size:14px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting span.description,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting span.description{text-align:left;font-style:normal;font-size:13px;font-style:italic;color:#666;margin:0px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting div.description,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting div.description{text-align:left;font-style:normal;font-size:13px;font-style:italic;color:#666;margin-top:4px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info div.actions a.button,#soliloquy-meta-edit .attachment-details .attachment-info div.actions a.button{display:inline-block}#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit-bulk .mce-window,#soliloquy-meta-edit #wp-link-wrap,#soliloquy-meta-edit .mce-window{-webkit-box-shadow:0 3px 6px rgba(0,0,0,0.3)}#soliloquy-meta-edit-bulk .wp-editor-tools,#soliloquy-meta-edit .wp-editor-tools{z-index:1}#soliloquy-meta-edit-bulk .wp-editor-tools:after,#soliloquy-meta-edit .wp-editor-tools:after{clear:both;content:"";display:table}#soliloquy-meta-edit-bulk .wp-editor-container,#soliloquy-meta-edit .wp-editor-container{clear:both}#soliloquy-meta-edit-bulk .wp-editor-area,#soliloquy-meta-edit .wp-editor-area{font-family:Consolas, Monaco, monospace;font-size:13px;padding:10px;margin:1px 0 0;line-height:150%;border:0;outline:0;display:block;resize:vertical;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#soliloquy-meta-edit-bulk .rtl .wp-editor-area,#soliloquy-meta-edit .rtl .wp-editor-area{font-family:Tahoma, Monaco, monospace}#soliloquy-meta-edit-bulk .locale-he-il .wp-editor-area,#soliloquy-meta-edit .locale-he-il .wp-editor-area{font-family:Arial, Monaco, monospace}#soliloquy-meta-edit-bulk .wp-editor-container textarea.wp-editor-area,#soliloquy-meta-edit .wp-editor-container textarea.wp-editor-area{width:100%;margin:0;-webkit-box-shadow:none;box-shadow:none}#soliloquy-meta-edit-bulk .wp-editor-tabs,#soliloquy-meta-edit .wp-editor-tabs{float:right}#soliloquy-meta-edit-bulk .wp-switch-editor,#soliloquy-meta-edit .wp-switch-editor{float:left;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;top:1px;background:#ebebeb;color:#666;cursor:pointer;font-size:13px;line-height:19px;height:20px;margin:5px 0 0 5px;padding:3px 8px 4px;border:1px solid #e5e5e5}#soliloquy-meta-edit-bulk .wp-switch-editor:focus,#soliloquy-meta-edit .wp-switch-editor:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8);outline:0;color:#23282d}#soliloquy-meta-edit-bulk .html-active .switch-html:focus,#soliloquy-meta-edit-bulk .tmce-active .switch-tmce:focus,#soliloquy-meta-edit-bulk .wp-switch-editor:active,#soliloquy-meta-edit .html-active .switch-html:focus,#soliloquy-meta-edit .tmce-active .switch-tmce:focus,#soliloquy-meta-edit .wp-switch-editor:active{-webkit-box-shadow:none;box-shadow:none}#soliloquy-meta-edit-bulk .wp-switch-editor:active,#soliloquy-meta-edit .wp-switch-editor:active{background-color:#f5f5f5;-webkit-box-shadow:none;box-shadow:none}#soliloquy-meta-edit-bulk .js .tmce-active .wp-editor-area,#soliloquy-meta-edit .js .tmce-active .wp-editor-area{color:#fff}#soliloquy-meta-edit-bulk .tmce-active .quicktags-toolbar,#soliloquy-meta-edit .tmce-active .quicktags-toolbar{display:none}#soliloquy-meta-edit-bulk .html-active .switch-html,#soliloquy-meta-edit-bulk .tmce-active .switch-tmce,#soliloquy-meta-edit .html-active .switch-html,#soliloquy-meta-edit .tmce-active .switch-tmce{background:#f5f5f5;color:#555;border-bottom-color:#f5f5f5}#soliloquy-meta-edit-bulk .wp-media-buttons,#soliloquy-meta-edit .wp-media-buttons{float:left}#soliloquy-meta-edit-bulk .wp-media-buttons .button,#soliloquy-meta-edit .wp-media-buttons .button{margin-right:5px;margin-bottom:4px;padding-left:7px;padding-right:7px}#soliloquy-meta-edit-bulk .wp-media-buttons .button:active,#soliloquy-meta-edit .wp-media-buttons .button:active{position:relative;top:1px;margin-top:-1px;margin-bottom:1px}#soliloquy-meta-edit-bulk .wp-media-buttons .insert-media,#soliloquy-meta-edit .wp-media-buttons .insert-media{padding-left:5px}#soliloquy-meta-edit-bulk .wp-media-buttons a,#soliloquy-meta-edit .wp-media-buttons a{text-decoration:none;color:#444;font-size:12px}#soliloquy-meta-edit-bulk .wp-media-buttons img,#soliloquy-meta-edit .wp-media-buttons img{padding:0 4px;vertical-align:middle}#soliloquy-meta-edit-bulk .wp-media-buttons span.wp-media-buttons-icon,#soliloquy-meta-edit .wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:18px;height:18px;vertical-align:text-top;margin:0 2px}#soliloquy-meta-edit-bulk .wp-media-buttons .add_media span.wp-media-buttons-icon,#soliloquy-meta-edit .wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}#soliloquy-meta-edit-bulk .wp-media-buttons .add_media span.wp-media-buttons-icon:before,#soliloquy-meta-edit .wp-media-buttons .add_media span.wp-media-buttons-icon:before{font:400 18px / 1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f104"}#soliloquy-meta-edit-bulk .quicktags-toolbar,#soliloquy-meta-edit .quicktags-toolbar{padding:3px;border-bottom:1px solid #ddd;background:#f5f5f5;min-height:30px}#soliloquy-meta-edit-bulk .has-dfw .quicktags-toolbar,#soliloquy-meta-edit .has-dfw .quicktags-toolbar{padding-right:35px}#soliloquy-meta-edit-bulk .wp-core-ui .quicktags-toolbar input.button.button-small,#soliloquy-meta-edit .wp-core-ui .quicktags-toolbar input.button.button-small{margin:2px}#soliloquy-meta-edit-bulk .quicktags-toolbar input[value=link],#soliloquy-meta-edit .quicktags-toolbar input[value=link]{text-decoration:underline}#soliloquy-meta-edit-bulk .quicktags-toolbar input[value=del],#soliloquy-meta-edit .quicktags-toolbar input[value=del]{text-decoration:line-through}#soliloquy-meta-edit-bulk .quicktags-toolbar input[value="i"],#soliloquy-meta-edit .quicktags-toolbar input[value="i"]{font-style:italic}#soliloquy-meta-edit-bulk .quicktags-toolbar input[value="b"],#soliloquy-meta-edit .quicktags-toolbar input[value="b"]{font-weight:700}#soliloquy-meta-edit-bulk .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,#soliloquy-meta-edit-bulk .qt-dfw,#soliloquy-meta-edit .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,#soliloquy-meta-edit .qt-dfw{position:absolute;top:0;right:0;margin:5px 5px 0 0}#soliloquy-meta-edit-bulk .qt-fullscreen,#soliloquy-meta-edit .qt-fullscreen{position:static;margin:2px}@media screen and (max-width: 782px){#soliloquy-meta-edit-bulk .mce-toolbar .mce-btn button,#soliloquy-meta-edit-bulk .qt-dfw,#soliloquy-meta-edit .mce-toolbar .mce-btn button,#soliloquy-meta-edit .qt-dfw{padding:6px 7px}#soliloquy-meta-edit-bulk .mce-toolbar .mce-btn-group .mce-btn.mce-primary button,#soliloquy-meta-edit .mce-toolbar .mce-btn-group .mce-btn.mce-primary button{padding:6px 7px 5px}#soliloquy-meta-edit-bulk .mce-toolbar .mce-btn-group .mce-btn,#soliloquy-meta-edit .mce-toolbar .mce-btn-group .mce-btn{margin:1px}#soliloquy-meta-edit-bulk .qt-dfw,#soliloquy-meta-edit .qt-dfw{width:36px;height:34px}#soliloquy-meta-edit-bulk .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,#soliloquy-meta-edit .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw{margin:4px 4px 0 0}#soliloquy-meta-edit-bulk .mce-toolbar .mce-colorbutton .mce-preview,#soliloquy-meta-edit .mce-toolbar .mce-colorbutton .mce-preview{left:8px;bottom:6px}#soliloquy-meta-edit-bulk .mce-window .mce-btn,#soliloquy-meta-edit .mce-window .mce-btn{padding:2px 0}#soliloquy-meta-edit-bulk .has-dfw .quicktags-toolbar,#soliloquy-meta-edit-bulk .has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first,#soliloquy-meta-edit .has-dfw .quicktags-toolbar,#soliloquy-meta-edit .has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-right:40px}}@media screen and (min-width: 782px){#soliloquy-meta-edit-bulk .wp-core-ui .quicktags-toolbar input.button.button-small,#soliloquy-meta-edit .wp-core-ui .quicktags-toolbar input.button.button-small{font-size:12px;height:26px;line-height:24px}}#soliloquy-meta-edit-bulk #wp_editbtns,#soliloquy-meta-edit-bulk #wp_gallerybtns,#soliloquy-meta-edit #wp_editbtns,#soliloquy-meta-edit #wp_gallerybtns{padding:2px;position:absolute;display:none;z-index:100020}#soliloquy-meta-edit-bulk #wp_delgallery,#soliloquy-meta-edit-bulk #wp_delimgbtn,#soliloquy-meta-edit-bulk #wp_editgallery,#soliloquy-meta-edit-bulk #wp_editimgbtn,#soliloquy-meta-edit #wp_delgallery,#soliloquy-meta-edit #wp_delimgbtn,#soliloquy-meta-edit #wp_editgallery,#soliloquy-meta-edit #wp_editimgbtn{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#soliloquy-meta-edit-bulk #wp_delgallery:hover,#soliloquy-meta-edit-bulk #wp_delimgbtn:hover,#soliloquy-meta-edit-bulk #wp_editgallery:hover,#soliloquy-meta-edit-bulk #wp_editimgbtn:hover,#soliloquy-meta-edit #wp_delgallery:hover,#soliloquy-meta-edit #wp_delimgbtn:hover,#soliloquy-meta-edit #wp_editgallery:hover,#soliloquy-meta-edit #wp_editimgbtn:hover{border-color:#555;background-color:#ccc}#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit #wp-link-wrap{display:none;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,0.3);width:500px;overflow:hidden;margin-left:-250px;position:fixed;top:50%;left:50%;z-index:100105;-webkit-transition:height .2s, margin-top .2s;transition:height .2s, margin-top .2s;height:500px;margin-top:-250px}#soliloquy-meta-edit-bulk #wp-link-backdrop,#soliloquy-meta-edit #wp-link-backdrop{display:none;position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100100}#soliloquy-meta-edit-bulk #wp-link,#soliloquy-meta-edit #wp-link{position:relative;height:100%}#soliloquy-meta-edit-bulk #wp-link-wrap .wp-link-text-field,#soliloquy-meta-edit #wp-link-wrap .wp-link-text-field{display:none}#soliloquy-meta-edit-bulk #wp-link-wrap.has-text-field .wp-link-text-field,#soliloquy-meta-edit #wp-link-wrap.has-text-field .wp-link-text-field{display:block}#soliloquy-meta-edit-bulk #link-modal-title,#soliloquy-meta-edit #link-modal-title{background:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}#soliloquy-meta-edit-bulk #wp-link-close,#soliloquy-meta-edit #wp-link-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}#soliloquy-meta-edit-bulk #wp-link-close:before,#soliloquy-meta-edit #wp-link-close:before{font:400 20px / 36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:36px;height:36px;content:"\f158"}#soliloquy-meta-edit-bulk #wp-link-close:focus,#soliloquy-meta-edit-bulk #wp-link-close:hover,#soliloquy-meta-edit #wp-link-close:focus,#soliloquy-meta-edit #wp-link-close:hover{color:#00a0d2}#soliloquy-meta-edit-bulk #wp-link-close:focus,#soliloquy-meta-edit #wp-link-close:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8)}#soliloquy-meta-edit-bulk #wp-link-wrap #link-selector,#soliloquy-meta-edit #wp-link-wrap #link-selector{-webkit-overflow-scrolling:touch;padding:0 16px;position:absolute;top:37px;left:0;right:0;bottom:44px}#soliloquy-meta-edit-bulk #wp-link ol,#soliloquy-meta-edit-bulk #wp-link ul,#soliloquy-meta-edit #wp-link ol,#soliloquy-meta-edit #wp-link ul{list-style:none;margin:0;padding:0}#soliloquy-meta-edit-bulk #wp-link input[type=text],#soliloquy-meta-edit #wp-link input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#soliloquy-meta-edit-bulk #wp-link #link-options,#soliloquy-meta-edit #wp-link #link-options{padding:8px 0 12px}#soliloquy-meta-edit-bulk #wp-link p.howto,#soliloquy-meta-edit #wp-link p.howto{margin:3px 0}#soliloquy-meta-edit-bulk #wp-link p.howto a,#soliloquy-meta-edit #wp-link p.howto a{text-decoration:none;color:inherit}#soliloquy-meta-edit-bulk #wp-link label input[type=text],#soliloquy-meta-edit #wp-link label input[type=text]{margin-top:5px;width:70%}#soliloquy-meta-edit-bulk #wp-link #link-options label span,#soliloquy-meta-edit-bulk #wp-link #search-panel label span.search-label,#soliloquy-meta-edit #wp-link #link-options label span,#soliloquy-meta-edit #wp-link #search-panel label span.search-label{display:inline-block;width:80px;text-align:right;padding-right:5px;max-width:24%;vertical-align:middle;word-wrap:break-word}#soliloquy-meta-edit-bulk #wp-link .link-search-field,#soliloquy-meta-edit #wp-link .link-search-field{float:left;width:250px;max-width:70%}#soliloquy-meta-edit-bulk #wp-link .link-search-wrapper,#soliloquy-meta-edit #wp-link .link-search-wrapper{margin:5px 0 9px;display:block;overflow:hidden}#soliloquy-meta-edit-bulk #wp-link .link-search-wrapper span,#soliloquy-meta-edit #wp-link .link-search-wrapper span{float:left;margin-top:4px}#soliloquy-meta-edit-bulk #wp-link .link-search-wrapper .spinner,#soliloquy-meta-edit #wp-link .link-search-wrapper .spinner{margin-top:5px}#soliloquy-meta-edit-bulk #wp-link .link-target,#soliloquy-meta-edit #wp-link .link-target{padding:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#soliloquy-meta-edit-bulk #wp-link .link-target label,#soliloquy-meta-edit #wp-link .link-target label{max-width:70%}#soliloquy-meta-edit-bulk #wp-link .query-results,#soliloquy-meta-edit #wp-link .query-results{border:1px solid #dfdfdf;margin:0 0 12px;background:#fff;overflow:auto;position:absolute;left:16px;right:16px;bottom:0;top:166px}#soliloquy-meta-edit-bulk .has-text-field #wp-link .query-results,#soliloquy-meta-edit .has-text-field #wp-link .query-results{top:200px}#soliloquy-meta-edit-bulk #wp-link li,#soliloquy-meta-edit #wp-link li{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#32373c;padding:4px 6px 4px 10px;cursor:pointer;position:relative}#soliloquy-meta-edit-bulk #wp-link .query-notice,#soliloquy-meta-edit-bulk #wp-link li.unselectable,#soliloquy-meta-edit #wp-link .query-notice,#soliloquy-meta-edit #wp-link li.unselectable{border-bottom:1px solid #dfdfdf}#soliloquy-meta-edit-bulk #wp-link .query-notice,#soliloquy-meta-edit #wp-link .query-notice{padding:0;background-color:#f7fcfe;color:#000}#soliloquy-meta-edit-bulk #wp-link .query-notice .query-notice-default,#soliloquy-meta-edit-bulk #wp-link .query-notice .query-notice-hint,#soliloquy-meta-edit #wp-link .query-notice .query-notice-default,#soliloquy-meta-edit #wp-link .query-notice .query-notice-hint{display:block;padding:6px;border-left:4px solid #00a0d2}#soliloquy-meta-edit-bulk #wp-link .unselectable.no-matches-found,#soliloquy-meta-edit #wp-link .unselectable.no-matches-found{padding:0;border-bottom:1px solid #dfdfdf;background-color:#fef7f1}#soliloquy-meta-edit-bulk #wp-link .no-matches-found .item-title,#soliloquy-meta-edit #wp-link .no-matches-found .item-title{display:block;padding:6px;border-left:4px solid #d54e21}#soliloquy-meta-edit-bulk #wp-link .query-results em,#soliloquy-meta-edit #wp-link .query-results em{font-style:normal}#soliloquy-meta-edit-bulk #wp-link li:hover,#soliloquy-meta-edit #wp-link li:hover{background:#eaf2fa;color:#151515}#soliloquy-meta-edit-bulk #wp-link li.unselectable:hover,#soliloquy-meta-edit #wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#32373c}#soliloquy-meta-edit-bulk #wp-link li.selected,#soliloquy-meta-edit #wp-link li.selected{background:#ddd;color:#32373c}#soliloquy-meta-edit-bulk #wp-link li.selected .item-title,#soliloquy-meta-edit #wp-link li.selected .item-title{font-weight:700}#soliloquy-meta-edit-bulk #wp-link li:last-child,#soliloquy-meta-edit #wp-link li:last-child{border:none}#soliloquy-meta-edit-bulk #wp-link .item-title,#soliloquy-meta-edit #wp-link .item-title{display:inline-block;width:80%;width:-webkit-calc(100% - 68px);width:calc(100% - 68px);word-wrap:break-word}#soliloquy-meta-edit-bulk #wp-link .item-info,#soliloquy-meta-edit #wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;right:5px;top:5px}#soliloquy-meta-edit-bulk #wp-link .river-waiting,#soliloquy-meta-edit #wp-link .river-waiting{display:none;padding:10px 0}#soliloquy-meta-edit-bulk #wp-link .submitbox,#soliloquy-meta-edit #wp-link .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #ddd;position:absolute;bottom:0;left:0;right:0}#soliloquy-meta-edit-bulk #wp-link-cancel,#soliloquy-meta-edit #wp-link-cancel{line-height:25px;float:left}#soliloquy-meta-edit-bulk #wp-link-update,#soliloquy-meta-edit #wp-link-update{line-height:23px;float:right}#soliloquy-meta-edit-bulk #wp-link-submit,#soliloquy-meta-edit #wp-link-submit{float:right}@media screen and (max-width: 782px){#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit #wp-link-wrap{margin-top:-140px}#soliloquy-meta-edit-bulk #wp-link-wrap .query-results,#soliloquy-meta-edit #wp-link-wrap .query-results{top:195px}#soliloquy-meta-edit-bulk #wp-link-wrap.has-text-field .query-results,#soliloquy-meta-edit #wp-link-wrap.has-text-field .query-results{top:235px}#soliloquy-meta-edit-bulk #link-selector,#soliloquy-meta-edit #link-selector{padding:0 16px 60px}#soliloquy-meta-edit-bulk #wp-link-wrap #link-selector,#soliloquy-meta-edit #wp-link-wrap #link-selector{bottom:52px}#soliloquy-meta-edit-bulk #wp-link-cancel,#soliloquy-meta-edit #wp-link-cancel{line-height:32px}#soliloquy-meta-edit-bulk #wp-link .link-target,#soliloquy-meta-edit #wp-link .link-target{padding-top:10px}#soliloquy-meta-edit-bulk #wp-link .submitbox .button,#soliloquy-meta-edit #wp-link .submitbox .button{margin-bottom:0}}@media screen and (max-width: 520px){#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit #wp-link-wrap{width:auto;margin-left:0;left:10px;right:10px;max-width:500px}}@media screen and (max-height: 520px){#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit #wp-link-wrap{-webkit-transition:none;transition:none;height:auto;margin-top:0;top:10px;bottom:10px}#soliloquy-meta-edit-bulk #link-selector,#soliloquy-meta-edit #link-selector{overflow:auto}#soliloquy-meta-edit-bulk #search-panel .query-results,#soliloquy-meta-edit #search-panel .query-results{position:static}}@media screen and (max-height: 290px){#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit #wp-link-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#soliloquy-meta-edit-bulk #link-selector,#soliloquy-meta-edit #link-selector{overflow:auto;height:-webkit-calc(100% - 92px);height:calc(100% - 92px);padding-bottom:2px}#soliloquy-meta-edit-bulk #search-panel .query-results,#soliloquy-meta-edit #search-panel .query-results{position:static}}#soliloquy-meta-edit-bulk div.wp-link-preview,#soliloquy-meta-edit div.wp-link-preview{float:left;margin:5px;max-width:694px;overflow:hidden;text-overflow:ellipsis}#soliloquy-meta-edit-bulk div.wp-link-preview a,#soliloquy-meta-edit div.wp-link-preview a{color:#0073aa;text-decoration:underline;-webkit-transition-property:border, background, color;transition-property:border, background, color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;cursor:pointer}#soliloquy-meta-edit-bulk div.wp-link-input,#soliloquy-meta-edit div.wp-link-input{float:left;margin:2px;max-width:694px}#soliloquy-meta-edit-bulk div.wp-link-input input,#soliloquy-meta-edit div.wp-link-input input{width:300px;padding:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#soliloquy-meta-edit-bulk .mce-toolbar div.wp-link-input ~ .mce-btn,#soliloquy-meta-edit-bulk .mce-toolbar div.wp-link-preview ~ .mce-btn,#soliloquy-meta-edit .mce-toolbar div.wp-link-input ~ .mce-btn,#soliloquy-meta-edit .mce-toolbar div.wp-link-preview ~ .mce-btn{margin:2px 1px}#soliloquy-meta-edit-bulk .mce-inline-toolbar-grp .mce-btn-group .mce-btn:last-child,#soliloquy-meta-edit .mce-inline-toolbar-grp .mce-btn-group .mce-btn:last-child{margin-right:2px}#soliloquy-meta-edit-bulk .ui-autocomplete.wplink-autocomplete,#soliloquy-meta-edit .ui-autocomplete.wplink-autocomplete{z-index:100110;max-height:200px;overflow-y:auto;padding:0;margin:0;list-style:none;position:absolute;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,0.8);box-shadow:0 1px 2px rgba(30,140,190,0.8);background-color:#fff}#soliloquy-meta-edit-bulk .ui-autocomplete.wplink-autocomplete li,#soliloquy-meta-edit .ui-autocomplete.wplink-autocomplete li{margin-bottom:0;padding:4px 10px;clear:both;white-space:normal;text-align:left}#soliloquy-meta-edit-bulk .ui-autocomplete.wplink-autocomplete li .wp-editor-float-right,#soliloquy-meta-edit .ui-autocomplete.wplink-autocomplete li .wp-editor-float-right{float:right}#soliloquy-meta-edit-bulk .ui-autocomplete.wplink-autocomplete li.ui-state-focus,#soliloquy-meta-edit .ui-autocomplete.wplink-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}@media screen and (max-width: 782px){#soliloquy-meta-edit-bulk div.wp-link-input,#soliloquy-meta-edit-bulk div.wp-link-preview,#soliloquy-meta-edit div.wp-link-input,#soliloquy-meta-edit div.wp-link-preview{max-width:70%;max-width:-webkit-calc(100% - 86px);max-width:calc(100% - 86px)}#soliloquy-meta-edit-bulk div.wp-link-preview,#soliloquy-meta-edit div.wp-link-preview{margin:8px 0 8px 5px}#soliloquy-meta-edit-bulk div.wp-link-input,#soliloquy-meta-edit div.wp-link-input{width:300px}#soliloquy-meta-edit-bulk div.wp-link-input input,#soliloquy-meta-edit div.wp-link-input input{width:100%;font-size:16px;padding:5px}}#soliloquy-meta-edit-bulk .mce-fullscreen,#soliloquy-meta-edit .mce-fullscreen{z-index:100010}#soliloquy-meta-edit-bulk .rtl .quicktags-toolbar input,#soliloquy-meta-edit-bulk .rtl .wp-switch-editor,#soliloquy-meta-edit .rtl .quicktags-toolbar input,#soliloquy-meta-edit .rtl .wp-switch-editor{font-family:Tahoma, sans-serif}#soliloquy-meta-edit-bulk .mce-rtl .mce-flow-layout .mce-flow-layout-item>div,#soliloquy-meta-edit .mce-rtl .mce-flow-layout .mce-flow-layout-item>div{direction:rtl}#soliloquy-meta-edit-bulk .mce-rtl .mce-listbox i.mce-caret,#soliloquy-meta-edit .mce-rtl .mce-listbox i.mce-caret{left:6px}#soliloquy-meta-edit-bulk html:lang(he-il) .rtl .quicktags-toolbar input,#soliloquy-meta-edit-bulk html:lang(he-il) .rtl .wp-switch-editor,#soliloquy-meta-edit html:lang(he-il) .rtl .quicktags-toolbar input,#soliloquy-meta-edit html:lang(he-il) .rtl .wp-switch-editor{font-family:Arial, sans-serif}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi){#soliloquy-meta-edit-bulk .wp-media-buttons .add_media span.wp-media-buttons-icon,#soliloquy-meta-edit .wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}}.soliloquy-tab{display:none}.soliloquy-tab-active{display:block}.branch-4-7 .wrap h1.wp-heading-inline{display:block;margin:0;width:100%;padding-left:20px;padding-right:20px;line-height:45px;font-size:20px;font-weight:400;background-color:#fff;height:45px;margin-left:-20px;margin-bottom:20px}.branch-4-7 .page-title-action{margin-left:4px;padding:4px 8px;position:relative;top:-55px;left:180px;text-decoration:none;border:none;color:#ff3700;border-radius:0;background:none;text-shadow:none;font-weight:600;font-size:13px}.branch-4-7 .page-title-action:hover{background:none;color:#999}.branch-4-7 .page-title-action:before{display:inline-block;font-family:'soliloquy';content:'\0050';margin-top:-3px;margin-right:8px;vertical-align:middle}.post-type-soliloquy #wp-link-wrap{z-index:180105 !important}.post-type-soliloquy #wp-link-backdrop{z-index:160105 !important}.post-type-soliloquy #wpbody-content h1{display:block;margin:0;padding-left:20px;padding-right:20px;line-height:45px;font-size:20px;font-weight:400;background-color:#fff;height:45px;margin-left:-20px;margin-right:-20px;margin-bottom:20px}.post-type-soliloquy #wpbody-content h1 .page-title-action{margin-left:4px;padding:4px 8px;position:relative;top:-3px;text-decoration:none;border:none;color:#ff3700;border-radius:0;background:none;text-shadow:none;font-weight:600;font-size:13px}.post-type-soliloquy #wpbody-content h1 .page-title-action:hover{background:none;color:#999}.post-type-soliloquy #wpbody-content h1 .page-title-action:before{display:inline-block;font-family:'soliloquy';content:'\0050';margin-top:-3px;margin-right:8px;vertical-align:middle}.post-type-soliloquy .wrap{margin-top:0px !important}.soliloquy-spinner{float:none;display:inline-block;margin-top:0}#soliloquy-uploader{margin-top:20px;box-sizing:border-box}#soliloquy-uploader #soliloquy-slider-type-tabs{margin-bottom:-1px;box-sizing:border-box}#soliloquy-uploader #soliloquy-slider-type-tabs:after{content:"";display:table;clear:both}#soliloquy-uploader .soliloquy-type-tab{position:relative;z-index:2;width:49.8%;display:block;text-align:center;text-decoration:none;font-size:16px;font-weight:600;line-height:55px;margin:0;height:55px;color:#999;background-color:#f7f7f7;border:1px solid #e5e5e5;box-sizing:border-box;border-top-left-radius:3px;border-top-right-radius:3px}#soliloquy-uploader .soliloquy-type-tab input{display:none}#soliloquy-uploader .soliloquy-type-tab:first-child{float:left;border-left:1px solid #e5e5e5}#soliloquy-uploader .soliloquy-type-tab:last-child{border-right:1px solid #e5e5e5;float:right}#soliloquy-uploader .soliloquy-type-tab.soliloquy-tab-nav-active{background-color:white;color:#23282d;border-bottom:none}#soliloquy-uploader .soliloquy-type-tab.soliloquy-tab-nav-active:before{color:#ff3700}#soliloquy-uploader .soliloquy-tab-container{padding:20px;position:relative;min-width:255px;min-height:245px;border:1px solid #e5e5e5;background:#fff}#soliloquy-uploader h2.soliloquy-type-label{text-align:center;padding:0;margin:20px 0}#soliloquy-uploader h2.soliloquy-type-label span{font-size:24px}#soliloquy-uploader ul#soliloquy-types-nav{text-align:center}#soliloquy-uploader ul#soliloquy-types-nav li{display:inline-block;margin:0 20px 0 0;vertical-align:top}#soliloquy-uploader ul#soliloquy-types-nav li:last-child{margin:0}#soliloquy-uploader ul#soliloquy-types-nav li label{float:left;width:110px}#soliloquy-uploader ul#soliloquy-types-nav li label input{display:none}#soliloquy-uploader ul#soliloquy-types-nav li label div.icon{width:110px;height:110px;margin:0 0 10px 0;border:1px solid #ddd;background-size:64px 64px;background-position:center;background-repeat:no-repeat}#soliloquy-uploader ul#soliloquy-types-nav li label div.title{font-weight:700}#soliloquy-uploader ul#soliloquy-types-nav li:hover label div.icon,#soliloquy-uploader ul#soliloquy-types-nav li.soliloquy-active label div.icon{background-color:#f7fcf3;border-color:#7cc048}#soliloquy-uploader ul#soliloquy-types-nav li#soliloquy-type-fc label div.icon{background-image:url(../images/fc.png)}#soliloquy-uploader ul#soliloquy-types-nav li#soliloquy-type-instagram label div.icon{background-image:url(../images/instagram.png)}#soliloquy-uploader ul#soliloquy-types-nav li#soliloquy-type-wc label div.icon{background-image:url(../images/woo.png)}#soliloquy-uploader #plupload-upload-ui{display:block;display:block}#soliloquy-uploader #plupload-upload-ui #drag-drop-area{border:3px dashed #d7d7d7;border-radius:6px}#soliloquy-uploader #plupload-upload-ui .drag-drop-info{font-size:24px;color:#23282d}#soliloquy-uploader #plupload-upload-ui .drag-drop-inside{width:520px;margin-top:40px}#soliloquy-uploader #plupload-upload-ui .drag-drop-inside p.drag-drop-buttons{text-align:left}#soliloquy-uploader #plupload-upload-ui .drag-drop-inside .soliloquy-progress-bar{display:none;width:100%;position:relative;height:10px;width:100%;margin:10px auto;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,0.1)}#soliloquy-uploader #plupload-upload-ui .drag-drop-inside .soliloquy-progress-bar div{height:10px;min-width:20px;width:0;background:#aaa;background:rgba(0,0,0,0.2);border-radius:10px;-webkit-transition:width 300ms;-moz-transition:width 300ms;-ms-transition:width 300ms;-o-transition:width 300ms;transition:width 300ms}#soliloquy-uploader #plupload-upload-ui .button{background:#f7f7f7;border:1px solid;border-color:#ddd;-webkit-box-shadow:none;box-shadow:none;color:#7f7f7f;text-decoration:none;text-shadow:none;font-weight:bold;height:35px;font-size:13px;padding:0 20px 1px}#soliloquy-uploader #plupload-upload-ui .button:hover{background:#f7f7f7;border-color:#999;color:#23282d}#soliloquy-uploader #plupload-upload-ui a.soliloquy-media-library.button{display:block;position:absolute;margin:0 auto;left:250px;right:0;line-height:32px;width:240px;top:110px;text-align:center}#soliloquy-uploader #plupload-upload-ui p.upload-flash-bypass{display:none}#soliloquy-uploader p.max-upload-size{margin-bottom:0}#soliloquy-codepanel .soliloquy-clipboard{text-align:right}#soliloquy-slider-settings{margin-top:20px;position:relative;min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);background:#f7f7f7;width:100%}#soliloquy-slider-settings a{text-decoration:none}#soliloquy-slider-settings:after{content:"";display:table;clear:both}#soliloquy-slider-settings #soliloquy-settings-tabs{width:150px;margin:0;padding:0;border-right:1px solid #ddd}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab{float:left;width:100%;margin:0;padding:0}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab a{float:left;width:110px;margin:0 20px;padding:20px 0;text-decoration:none;color:#999;border-bottom:1px solid #ddd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;transition:none;-webkit-transition:none}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab a:focus{outline-style:none;box-shadow:none;border-color:transparent}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab a:before{display:inline-block;font-family:'soliloquy';font-style:normal;font-weight:normal;font-size:15px;line-height:1.5;vertical-align:middle;margin-right:8px;padding-left:4px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab:hover,#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab.soliloquy-tab-nav-active{background-color:#fff;margin-right:-1px;margin-top:-1px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab:hover a,#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab.soliloquy-tab-nav-active a{border-bottom:none}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab:hover a:before,#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab.soliloquy-tab-nav-active a:before{color:#ff3700}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-slider a:before{content:'\0042'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-config a:before{content:'\0041'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-mobile a:before{content:'\0046'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-pinterest a:before{content:'\0043'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-thumbnails a:before{content:'\004b'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-schedule a:before{content:'\0058'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-misc a:before{content:'\0045'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-lightbox a:before{content:'\0044'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-carousel a:before{content:'\0059'}#soliloquy-slider-settings #soliloquy-settings-content{margin:0 0 0 150px;padding:20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-empty-slider{position:relative;background-color:#f7f7f7;min-height:350px;width:100%;text-align:center;border-radius:3px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-empty-slider div{max-width:450px;max-height:150px;margin:auto;position:absolute;top:0;left:0;bottom:0;right:0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-empty-slider img{max-width:336px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-external-req{border:1px solid #ff3700;border-radius:3px;padding:30px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-external-req h2{font-size:20px;margin:0;padding:0}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-slide-header label{font-weight:600}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-slide-header .soliloquy-clear-selected{display:none;margin-left:15px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-help{font-size:14px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-help a{margin-left:5px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-bulk-actions{display:none;margin-bottom:20px}#soliloquy-slider-settings #soliloquy-settings-content table.form-table{clear:none}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-config-header{border-bottom:1px solid #ddd;padding-bottom:30px;margin-bottom:30px}#soliloquy-slider-settings #soliloquy-settings-content h2.soliloquy-intro{margin:0 !important;padding:0;border-bottom:none}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-intro{font-size:16px !important;font-weight:bold;margin:0}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle{position:absolute;right:20px;top:20px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle [data-soliloquy-tooltip]:before{position:absolute;bottom:120%;left:50%;margin-bottom:5px;margin-left:-35px;padding:7px;width:120px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background-color:#000;color:#fff;content:attr(data-soliloquy-tooltip);text-align:center;font-size:12px;line-height:1.2}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle li.helper .dashicons{font-size:24px;margin-top:-5px;color:#ddd}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle li.helper .dashicons:hover{color:#23282d}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle li.soliloquy-select{width:200px;margin-right:15px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle li.soliloquy-select .chosen-container{margin-top:-10px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle li:not(.soliloquy-select) a{color:#ddd}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle li:not(.soliloquy-select) a i:before{font-size:16px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle li:not(.soliloquy-select) a.active-display{color:#23282d}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-select-all{margin:20px 8px 20px 0px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-slides-delete{margin-right:10px}#soliloquy-slider-settings #soliloquy-settings-content input[type=checkbox]{background-color:#fff;border:1px solid #ddd;box-shadow:none;margin-right:10px}#soliloquy-slider-settings #soliloquy-settings-content input[type=checkbox]:checked{background-color:#72b63d;border-color:#72b63d}#soliloquy-slider-settings #soliloquy-settings-content input[type=checkbox]:checked:before{color:#fff !important}#soliloquy-slider-settings #soliloquy-settings-content input[type="text"],#soliloquy-slider-settings #soliloquy-settings-content input[type="number"],#soliloquy-slider-settings #soliloquy-settings-content input[type="password"]{background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;color:#32373c;height:35px;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out;min-width:210px;max-width:350px;width:92%;border-radius:3px;padding-right:0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-config-mobile-width,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-config-mobile-height,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-config-slider-height,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-config-slider-width{max-width:166px;min-width:75px}#soliloquy-slider-settings #soliloquy-settings-content th{padding-right:0}#soliloquy-slider-settings #soliloquy-settings-content .description{font-size:13px;line-height:1.5}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output{margin:0 0 10px;padding:0;list-style:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li{background-color:#fff;margin:0;list-style:none;border:1px solid #cecece;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-moz-box-shadow:0 1px 2px rgba(0,0,0,0.06);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.06);box-shadow:0 1px 2px rgba(0,0,0,0.06);cursor:move;position:relative}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li h3{display:block;margin:0;padding:0;text-overflow:ellipsis}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li.ui-sortable-helper{border:2px solid #1e8cbe}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-draft-slide.grid-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-active-slide.grid-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-remove-slide,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-modify-slide{display:block;height:25px;outline:none;position:absolute;width:25px;z-index:20;color:#fff;text-align:center;line-height:25px;vertical-align:middle;border-radius:3px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-draft-slide.grid-status i:before,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-active-slide.grid-status i:before,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-remove-slide i:before,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-modify-slide i:before{margin:0;font-size:10px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-draft-slide.grid-status span:before,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-active-slide.grid-status span:before{font-size:16px;vertical-align:middle}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-active-slide.grid-status{background-color:#74b445}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-draft-slide.grid-status{background-color:#ffa93b}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-remove-slide{background-color:#e3231b}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-modify-slide{background-color:#0072ac}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li.dropzone{background:transparent;border:2px dashed #ddd;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li{display:inline-block;width:150px;margin:0 30px 30px 0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-item-img{display:block;margin:0 auto auto auto;top:0;left:0;right:0;bottom:0;max-width:150px;max-height:150px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-video-wrap,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-html-wrap{position:relative;width:150px;height:150px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-video-inside,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-html-inside{width:150px;height:150px;display:table;position:absolute;max-width:100%;max-height:100%;cursor:move}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-video-table,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-html-table{display:table-cell;vertical-align:middle;text-align:center;cursor:move}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li span.overlay{max-height:15px;max-width:40px;display:block;position:absolute;top:0;left:0;right:0;bottom:10px;margin:auto;padding:4px 8px;background:rgba(255,255,255,0.8);z-index:2;text-align:center;border-radius:3px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-item-info h3{display:block;border-top:1px solid #ddd;background-color:#f7f7f7;margin:0;padding:8px 4px;text-align:center;font-size:13px;max-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-item-info img{display:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li a.check{display:none;position:absolute;margin:auto;top:0;left:0;bottom:0;right:0;width:24px;height:24px;background-color:#72b63d;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #72b63d;box-shadow:0 0 0 1px #fff,0 0 0 2px #72b63d;z-index:10}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li a.check div.media-modal-icon{width:15px;height:15px;margin:5px 0 0 5px;background-position:-21px 0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li.selected{border:1px solid #72b63d}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li.selected a.check{display:block}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-active-slide.grid-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-draft-slide.grid-status{display:block;bottom:40px;left:5px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-active-slide.list-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-draft-slide.list-status{display:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-remove-slide{left:5px;top:5px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-modify-slide{right:5px;top:5px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li{display:inline-block;min-height:100px;padding:20px;margin-bottom:10px;width:100%;box-sizing:border-box}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li span.overlay{display:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-video-wrap{float:left;height:75px;width:75px;margin-left:20px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-video-wrap .soliloquy-item-img{float:none;margin-left:0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-item-img{margin-left:20px;position:relative;float:left;max-width:75px;max-height:75px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-item-info{position:absolute;margin:auto 0;top:0;bottom:0;left:160px;height:30px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-item-info img{margin-top:-20px;max-width:100px;margin-bottom:10px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li a.check{display:block;position:relative;float:left;margin:auto 0;width:25px;height:25px;margin-top:25px;background-color:#fff;border:1px solid #ddd}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li a.check div.media-modal-icon{width:15px;display:none;height:15px;margin:5px 0 0 5px;background-position:-21px 0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li.selected{border:1px solid #72b63d}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li.selected a.check{background-color:#72b63d;display:block}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li.selected a.check div.media-modal-icon{display:block}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-active-slide.grid-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-draft-slide.grid-status{display:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-active-slide.list-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-draft-slide.list-status{display:block;margin-top:10px;font-weight:600;color:black}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-active-slide.list-status:hover,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-draft-slide.list-status:hover{text-decoration:none;color:black}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-active-slide.list-status span{margin-left:5px;border-radius:3px;padding:3px 5px;background-color:#74b445;color:white}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-draft-slide.list-status span{margin-left:5px;border-radius:3px;padding:3px 5px;background-color:#ffa93b;color:white}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-remove-slide{right:8px;top:8px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-modify-slide{right:40px;top:8px}#soliloquy-slider-settings #soliloquy-settings-content:after{content:"";display:table;clear:both}#soliloquy-plupload-upload-ui{position:relative}#soliloquy-drag-drop-area{border:4px dashed #bbb;height:200px}#soliloquy-plupload-upload-ui.drag-over #soliloquy-drag-drop-area{border-color:#83b4d8}#soliloquy-slider-settings .soliloquy-progress-bar{display:none;width:100%;position:relative;height:10px;width:100%;margin:10px auto;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,0.1)}#soliloquy-slider-settings .soliloquy-progress-bar div{height:10px;min-width:20px;width:0;background:#aaa;background:rgba(0,0,0,0.2);border-radius:10px;-webkit-transition:width 300ms;-moz-transition:width 300ms;-ms-transition:width 300ms;-o-transition:width 300ms;transition:width 300ms}#soliloquy .upload-flash-bypass{display:none}#soliloquy .max-upload-size{display:block;margin:10px 0}.soliloquy-media-frame .soliloquy-accepted-urls{clear:both;overflow:hidden}.soliloquy-media-frame .soliloquy-accepted-urls span{display:block}.soliloquy-media-frame .soliloquy-column{float:left;width:32%;margin-right:2%}.soliloquy-media-frame .soliloquy-column.soliloquy-last{margin-right:0}.soliloquy-media-frame .soliloquy-video-info{background-color:#ffffe0;border:1px solid #e6db55;padding:15px;margin-bottom:16px}.soliloquy-media-frame .soliloquy-video-info p{margin-top:0}#soliloquy-html-slides .soliloquy-delete-html-slide,#soliloquy-video-slides .soliloquy-delete-video-slide{float:right}.attachments-browser.soliloquy-videos a.soliloquy-item-collapse,.attachments-browser.soliloquy-html a.soliloquy-item-collapse{position:absolute;top:10px;right:20px;font-size:13px;color:black;font-weight:600;text-decoration:none}.attachments-browser.soliloquy-videos .button-soliloquy-delete,.attachments-browser.soliloquy-html .button-soliloquy-delete{color:#fff}.attachments-browser.soliloquy-videos .soliloquy-item-setting,.attachments-browser.soliloquy-html .soliloquy-item-setting{clear:both;text-align:left !important;margin-bottom:15px}.attachments-browser.soliloquy-videos .soliloquy-item-setting .code-title,.attachments-browser.soliloquy-html .soliloquy-item-setting .code-title{text-align:left !important}.attachments-browser.soliloquy-videos .soliloquy-item-setting label,.attachments-browser.soliloquy-html .soliloquy-item-setting label{clear:both;width:100%;text-align:left}.attachments-browser.soliloquy-videos .soliloquy-item-setting label strong,.attachments-browser.soliloquy-html .soliloquy-item-setting label strong{text-align:left}.attachments-browser.soliloquy-videos .soliloquy-item-setting .soliloquy-media-button a,.attachments-browser.soliloquy-html .soliloquy-item-setting .soliloquy-media-button a{float:right;clear:both}.attachments-browser.soliloquy-videos .soliloquy-item-setting input[type=text],.attachments-browser.soliloquy-videos .soliloquy-item-setting textarea,.attachments-browser.soliloquy-html .soliloquy-item-setting input[type=text],.attachments-browser.soliloquy-html .soliloquy-item-setting textarea{width:100%;clear:both}.attachments-browser.soliloquy-videos .soliloquy-item-setting .soliloquy-input-group input[type=text],.attachments-browser.soliloquy-videos .soliloquy-item-setting .soliloquy-input-group textarea,.attachments-browser.soliloquy-html .soliloquy-item-setting .soliloquy-input-group input[type=text],.attachments-browser.soliloquy-html .soliloquy-item-setting .soliloquy-input-group textarea{width:87%;clear:both}.attachments-browser.soliloquy-videos .soliloquy-item-footer,.attachments-browser.soliloquy-html .soliloquy-item-footer{display:block;margin-top:20px}.attachments-browser.soliloquy-videos .soliloquy-item-footer a,.attachments-browser.soliloquy-html .soliloquy-item-footer a{float:right}.attachments-browser.soliloquy-videos div.media-toolbar{border-bottom:1px solid #ddd}.attachments-browser.soliloquy-videos div.media-toolbar div.media-toolbar-primary button.soliloquy-videos-add{float:right;margin-top:10px}.attachments-browser.soliloquy-videos .soliloquy-video-items{position:relative;margin-right:300px;width:100%;height:100%}.attachments-browser.soliloquy-videos ul.soliloquy-videos-attachments{top:70px;padding:2px 20px 20px}.attachments-browser.soliloquy-videos ul.soliloquy-videos-attachments li.soliloquy-videos-attachment{width:100%;background-color:#f1f1f1;border:1px solid #ddd;padding:20px;margin-bottom:2em;padding-top:2em}.attachments-browser.soliloquy-videos .soliloquy-gallery-accepted-urls{clear:both;overflow:hidden}.attachments-browser.soliloquy-videos .soliloquy-gallery-accepted-urls span{display:block}.attachments-browser.soliloquy-html div.media-toolbar{border-bottom:1px solid #ddd}.attachments-browser.soliloquy-html div.media-toolbar div.media-toolbar-primary button.soliloquy-html-add{float:right;margin-top:10px}.attachments-browser.soliloquy-html .soliloquy-html-items{position:relative;margin-right:300px;width:100%;height:100%}.attachments-browser.soliloquy-html ul.soliloquy-html-attachments{top:70px;padding:2px 20px 20px}.attachments-browser.soliloquy-html ul.soliloquy-html-attachments li.soliloquy-html-attachment{width:100%;background-color:#f1f1f1;border:1px solid #ddd;padding:20px;margin-bottom:2em;padding-top:2em}.attachments-browser.soliloquy-html ul.soliloquy-html-attachments li.soliloquy-html-attachment .CodeMirror{border:1px solid #ddd;text-align:left !important}.attachments-browser .soliloquy-accepted-urls{clear:both;overflow:hidden}.attachments-browser .soliloquy-accepted-urls .title{margin-bottom:-15px}.attachments-browser .soliloquy-accepted-urls span{display:block}#soliloquy-meta-edit .right{border-right:1px solid #ccc !important}.soliloquy-meta-container .media-modal-backdrop{z-index:15999}.soliloquy-meta-container .media-modal{z-index:16000}.soliloquy-meta-container .media-modal button.right{border-right:1px solid #ddd !important}.soliloquy-meta-container .media-modal .attachment-media-view div.thumbnail-image img.details-image{max-width:50%;max-height:70%}.soliloquy-meta-container .media-modal .setting{margin:0 0 20px 0;padding:0 0 20px 0;border-bottom:1px solid #ddd}.soliloquy-meta-container .media-modal .setting span.name{font-size:14px;font-weight:600;min-width:20%;text-align:left}.soliloquy-meta-container .media-modal .setting input[type=text]{width:75%}.soliloquy-meta-container .media-modal .setting textarea{height:150px}.soliloquy-meta-container .media-modal .setting .wp-editor-wrap{float:right;width:75%}.soliloquy-meta-container .media-modal .code{margin-bottom:20px}.soliloquy-meta-container .media-modal div.actions a.button{display:inline-block}@media only screen and (max-width: 959px){.soliloquy-meta-container .setting span.name{width:100%;max-width:100%;min-width:100%}.soliloquy-meta-container .setting input[type=text]{width:100%}.soliloquy-meta-container .setting input[type=checkbox]{clear:both}.soliloquy-meta-container .setting .wp-editor-wrap{float:left;width:100%}}body.rtl #soliloquy .soliloquy-meta-icon{right:auto;left:0}body.rtl #soliloquy #soliloquy-tabs-nav li{float:right;margin:0 0 -1px 10px}body.rtl #soliloquy #soliloquy-output li{float:right;margin:0 0 10px 10px}@media screen and (max-width: 1100px){#soliloquy-uploader #plupload-upload-ui #drag-drop-area{height:208px}#soliloquy-uploader #plupload-upload-ui .drag-drop-inside{width:100%;margin-top:20px}#soliloquy-uploader #plupload-upload-ui .drag-drop-inside p.drag-drop-buttons{margin-top:10px;text-align:center}#soliloquy-uploader #plupload-upload-ui a.soliloquy-media-library.button{left:0;right:0;width:235px;top:145px}}@media screen and (max-width: 768px){.media-sidebar{display:none}#soliloquy-slider-settings #soliloquy-settings-content{margin:0 0 0 50px;padding:20px}#soliloquy-slider-settings #soliloquy-settings-tabs{width:50px;margin:0;padding:0;border-right:1px solid #ddd}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab a{width:30px;margin:0 10px;padding:10px 0}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab a span{display:none}}@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi){a.check .media-modal-icon{background-image:url("../../../../../wp-includes/images/uploader-icons-2x.png") !important;-webkit-background-size:134px 15px;background-size:134px 15px}}
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/css/modal.css DELETED
@@ -1 +0,0 @@
1
- body.branch-4-3 div.media-modal a.media-modal-close,body.branch-4-4 div.media-modal a.media-modal-close{text-align:center;text-decoration:none;display:inline-block}body.branch-4-3 div.media-modal a.media-modal-close span,body.branch-4-4 div.media-modal a.media-modal-close span{display:inline-block;margin-top:17px}.soliloquy-meta.attachments .attachment{width:200px;height:200px;border:none !important}.soliloquy-meta.attachments .attachment.selected{width:200px;height:200px}.soliloquy-meta.attachments .attachment .attachment-preview{width:100%;height:100%;border:none !important}.soliloquy-meta.attachments .attachment .attachment-preview:before{padding-top:0;border:none !important}.soliloquy-meta.attachments .attachment .attachment-preview .thumbnail{display:table;position:relative;top:auto;right:auto;bottom:auto;left:auto;border:none !important}.soliloquy-meta.attachments .attachment .attachment-preview .thumbnail:after{box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none}.soliloquy-meta.attachments .attachment .attachment-preview .thumbnail .inside{display:table-cell;width:200px;height:200px;text-align:center;vertical-align:middle;border:none !important}
 
trunk/assets/css/overview.css DELETED
@@ -1,11 +0,0 @@
1
- @font-face{font-family:'soliloquy';src:url("../fonts/soliloquy.eot");src:url("../fonts/soliloquy.eot?#iefix") format("embedded-opentype"),url("../fonts/soliloquy.woff") format("woff"),url("../fonts/soliloquy.ttf") format("truetype"),url("../fonts/soliloquy.svg#soliloquy") format("svg");font-weight:normal;font-style:normal}[class*='soliloquy-icon-']:before{display:inline-block;font-family:'soliloquy';font-style:normal;font-weight:normal;font-size:13px;line-height:1.5;margin-right:8px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.soliloquy-icon-configuration:before{content:'\0041'}.soliloquy-icon-soliloquy:before{content:'\0042'}.soliloquy-icon-pinterest:before{content:'\0043'}.soliloquy-icon-lightbox:before{content:'\0044'}.soliloquy-icon-misc:before{content:'\0045'}.soliloquy-icon-mobile:before{content:'\0046'}.soliloquy-icon-pagination:before{content:'\0047'}.soliloquy-icon-proofing:before{content:'\0048'}.soliloquy-icon-slideshow:before{content:'\0049'}.soliloquy-icon-tags:before{content:'\004a'}.soliloquy-icon-thumbnails:before{content:'\004b'}.soliloquy-icon-video:before{content:'\004c'}.soliloquy-icon-watermark:before{content:'\004d'}.soliloquy-icon-cloud-download:before{content:'\004e'}.soliloquy-icon-toggle-on:before{content:'\004f'}.soliloquy-icon-plus-circle:before{content:'\0050'}.soliloquy-icon-list:before{content:'\0052'}.soliloquy-icon-grid:before{content:'\0053'}.soliloquy-icon-pencil:before{content:'\0055'}.soliloquy-icon-close:before{content:'\0056'}.soliloquy-icon-check:before{content:'\0057'}.soliloquy-icon-schedule:before{content:'\0058'}.soliloquy-icon-carousel:before{content:'\0059'}#soliloquy-header{background-color:#ff3700;height:120px;margin-left:-20px}#soliloquy-header #soliloquy-logo{margin:0;padding-top:25px;line-height:120px;margin-left:20px}#soliloquy-header #soliloquy-logo img{max-width:288px}.wp-core-ui .button-soliloquy{background:#ff3700;border-color:#ff3700;-webkit-box-shadow:none;box-shadow:none;color:#fff;text-decoration:none;font-weight:500;text-shadow:none;line-height:15px;height:35px;font-size:13px;padding:0 20px 1px}.wp-core-ui .button-soliloquy:hover{background:#ff3700;border-color:#ff3700;color:#fff;opacity:.8}.wp-core-ui .button-soliloquy-secondary{background:#f7f7f7;border:1px solid;border-color:#ddd;-webkit-box-shadow:none;box-shadow:none;color:#23282d;text-decoration:none;text-shadow:none;font-weight:bold;height:35px;font-size:13px;padding:0 20px 1px}.wp-core-ui .button-soliloquy-secondary:hover{background:#f7f7f7;border-color:#999;color:#23282d}.wp-core-ui .button-soliloquy-delete{background:#e3231b;border:1px solid;border-color:#e3231b;-webkit-box-shadow:none;box-shadow:none;color:#fff;text-decoration:none;text-shadow:none;font-weight:bold;height:35px;font-size:13px;padding:0 20px 1px}.wp-core-ui .button-soliloquy-delete:hover{background:#e3231b;color:#fff;opacity:.8}.wp-core-ui a.button-soliloquy,.wp-core-ui a.button-soliloquy-secondary,.wp-core-ui a.button-soliloquy-delete{line-height:32px}#soliloquy-settings-content input:not([type=checkbox]){background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;color:#32373c;height:35px;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out}#soliloquy-settings-content input[type=checkbox]:checked{-color:#ff3700}#soliloquy-settings-content textarea{width:100%}#soliloquy-settings-content input[type="password"].soliloquy-input{background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;color:#32373c;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out}input[type="password"].soliloquy-input{background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;height:35px;color:#32373c;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out}pre.soliloquy-code{background-color:#ddd;border-radius:3px;padding:15px}.soliloquy-clipboard{display:block;text-decoration:underline !important;padding-top:8px;font-size:11px;outline:0 !important}.soliloquy-clipboard:focus{outline-style:none;box-shadow:none;border-color:transparent}.soliloquy-code{display:block;background-color:#f7f7f7;border-radius:3px;padding:10px !important}.soliloquy-list-inline{margin:0;list-style:none}.soliloquy-list-inline li{display:inline-block;margin-right:5px}.soliloquy-list-inline li:last-child{margin-right:0 !important}.soliloquy-yt iframe{max-width:100%;height:auto}.soliloquy-hidden{display:none !important}.soliloquy-hideme{visibility:hidden}.soliloquy-no-border{border:none !important}.soliloquy-right{float:right}.soliloquy-left{float:left}.soliloquy-clearfix{clear:both;display:block;height:0;overflow:hidden;visibility:hidden;width:0}.no-margin{margin:0 !important}.no-margin-top{margin-top:0 !important}.no-margin-bottom{margin-bottom:0 !important}[data-soliloquy-tooltip]{position:relative;z-index:2;cursor:pointer}[data-soliloquy-tooltip]:before,[data-soliloquy-tooltip]:after{visibility:hidden;opacity:0;pointer-events:none}[data-soliloquy-tooltip]:before{position:absolute;bottom:120%;left:50%;margin-bottom:5px;margin-left:-35px;padding:7px;width:60px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background-color:#000;color:#fff;content:attr(data-soliloquy-tooltip);text-align:center;font-size:12px;line-height:1.2}[data-soliloquy-tooltip]:after{position:absolute;bottom:120%;left:50%;width:0;margin-left:-5px;border-top:5px solid #000;border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}[data-soliloquy-tooltip]:hover:before,[data-soliloquy-tooltip]:hover:after{visibility:visible;opacity:1}[class*=soliloquy-grid-]{float:left;margin-left:2%}[class*=soliloquy-grid-] input[type=text]{width:100% !important}.soliloquy-grid-1{width:6.5%}.soliloquy-grid-2{width:15%}.soliloquy-grid-3{width:23.5%}.soliloquy-grid-4{width:32%}.soliloquy-grid-5{width:40.5%}.soliloquy-grid-6{width:49%}.soliloquy-grid-7{width:57.5%}.soliloquy-grid-8{width:66%}.soliloquy-grid-9{width:74.5%}.soliloquy-grid-10{width:83%}.soliloquy-grid-11{width:91.5%}.soliloquy-grid-12{width:100%}.soliloquy-first{margin-left:0px}/*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.5.1
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2016 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */.soliloquy-select *{box-shadow:none !important;background-image:none !important}.soliloquy-select *:after{background-image:none !important}.soliloquy-select .soliloquy-chosen{height:35px;max-width:350px;width:100%}.soliloquy-select .chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none;max-width:350px;font-weight:600}.soliloquy-select .chosen-container *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.soliloquy-select .chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;width:100%;border:1px solid #ddd;border-top:0;background:#fff}.soliloquy-select .chosen-container.chosen-with-drop .chosen-drop{left:0}.soliloquy-select .chosen-container a{cursor:pointer}.soliloquy-select .chosen-container .search-choice .group-name,.soliloquy-select .chosen-container .chosen-single .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:normal;color:#999999}.soliloquy-select .chosen-container .search-choice .group-name:after,.soliloquy-select .chosen-container .chosen-single .group-name:after{content:":";padding-left:2px;vertical-align:top}.soliloquy-select .chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:35px;border:1px solid #ddd;border-radius:3px;background:#fff;background-clip:padding-box;color:#444;text-decoration:none;white-space:nowrap;line-height:35px}.soliloquy-select .chosen-container-single .chosen-default{color:#999}.soliloquy-select .chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.soliloquy-select .chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.soliloquy-select .chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;font-size:1px}.soliloquy-select .chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.soliloquy-select .chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.soliloquy-select .chosen-container-single .chosen-single div{border-left:1px solid #ddd;position:absolute;top:0;right:0;display:block;width:30px;height:100%;padding-left:9px}.soliloquy-select .chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;line-height:35px}.soliloquy-select .chosen-container-single .chosen-single div b:before{content:"\0051";display:block;font-weight:normal;font-size:8px !important;font-family:'soliloquy';position:absolute;text-align:center}.soliloquy-select .chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.soliloquy-select .chosen-container-single .chosen-search input[type="text"]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #ddd;background:#fff url("chosen-sprite.png") no-repeat 100% -20px;background:url("chosen-sprite.png") no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.soliloquy-select .chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 2px 2px;background-clip:padding-box}.soliloquy-select .chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.soliloquy-select .chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.soliloquy-select .chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.soliloquy-select .chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.soliloquy-select .chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.soliloquy-select .chosen-container .chosen-results li.highlighted{background:#ff3700;color:#fff}.soliloquy-select .chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.soliloquy-select .chosen-container .chosen-results li.group-result{display:list-item;font-weight:bold;cursor:default}.soliloquy-select .chosen-container .chosen-results li.group-option{padding-left:15px}.soliloquy-select .chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.soliloquy-select .chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto !important;height:1%;border:1px solid #ddd;background:#fff;cursor:text}.soliloquy-select .chosen-container-multi .chosen-choices li{float:left;list-style:none}.soliloquy-select .chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.soliloquy-select .chosen-container-multi .chosen-choices li.search-field input[type="text"]{margin:1px 0;padding:0;height:25px;outline:0;border:0 !important;background:transparent !important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #ddd;max-width:100%;border-radius:2px;background:#fff;background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);color:#333;line-height:13px;cursor:default}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url("chosen-sprite.png") -42px 1px no-repeat;font-size:1px}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ddd;background:#e4e4e4;color:#666}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.soliloquy-select .chosen-container-multi .chosen-results{margin:0;padding:0}.soliloquy-select .chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.soliloquy-select .chosen-container-active .chosen-single{border:1px solid #ddd}.soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #ddd;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background:#fff}.soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div{border-left:1px solid transparent;background:transparent}.soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.soliloquy-select .chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,0.3)}.soliloquy-select .chosen-container-active .chosen-choices li.search-field input[type="text"]{color:#222 !important}.soliloquy-select .chosen-disabled{opacity:0.5 !important;cursor:default}.soliloquy-select .chosen-disabled .chosen-single{cursor:default}.soliloquy-select .chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.soliloquy-select .chosen-rtl{text-align:right}.soliloquy-select .chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.soliloquy-select .chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.soliloquy-select .chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.soliloquy-select .chosen-rtl .chosen-single div{right:auto;left:3px}.soliloquy-select .chosen-rtl .chosen-single abbr{right:auto;left:26px}.soliloquy-select .chosen-rtl .chosen-choices li{float:right}.soliloquy-select .chosen-rtl .chosen-choices li.search-field input[type="text"]{direction:rtl}.soliloquy-select .chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.soliloquy-select .chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.soliloquy-select .chosen-rtl.chosen-container-single-nosearch .chosen-search,.soliloquy-select .chosen-rtl .chosen-drop{left:9999px}.soliloquy-select .chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.soliloquy-select .chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.soliloquy-select .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.soliloquy-select .chosen-rtl .chosen-search input[type="text"]{padding:4px 5px 4px 20px;background:#fff url("chosen-sprite.png") no-repeat -30px -20px;background:url("chosen-sprite.png") no-repeat -30px -20px;direction:rtl}.soliloquy-select .chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.soliloquy-select .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx){.soliloquy-select .chosen-rtl .chosen-search input[type="text"],.soliloquy-select .chosen-container-single .chosen-single abbr,.soliloquy-select .chosen-container-single .chosen-search input[type="text"],.soliloquy-select .chosen-container-multi .chosen-choices .search-choice .search-choice-close,.soliloquy-select .chosen-container .chosen-results-scroll-down span,.soliloquy-select .chosen-container .chosen-results-scroll-up span{background-image:none !important;background-size:52px 37px !important;background-repeat:no-repeat !important}}.soliloquy-select select.soliloquy-chosen+.chosen-container.chosen-container-single .chosen-single{padding-right:35px}.branch-4-7 .wrap h1.wp-heading-inline{display:block;margin:0;width:100%;padding-left:20px;padding-right:20px;line-height:45px;font-size:20px;font-weight:400;background-color:#fff;height:45px;margin-left:-20px;margin-bottom:20px}.branch-4-7 .page-title-action{margin-left:4px;padding:4px 8px;position:relative;top:-55px;left:180px;text-decoration:none;border:none;color:#ff3700;border-radius:0;background:none;text-shadow:none;font-weight:600;font-size:13px}.branch-4-7 .page-title-action:hover{background:none;color:#999}.branch-4-7 .page-title-action:before{display:inline-block;font-family:'soliloquy';content:'\0050';margin-top:-3px;margin-right:8px;vertical-align:middle}.post-type-soliloquy #wpbody-content h1{display:block;margin:0;padding-left:20px;padding-right:20px;line-height:45px;font-size:20px;font-weight:400;background-color:#fff;height:45px;margin-left:-20px;margin-right:-20px;margin-bottom:20px}.post-type-soliloquy #wpbody-content h1 .page-title-action{margin-left:4px;padding:4px 8px;position:relative;top:-3px;text-decoration:none;border:none;color:#ff3700;border-radius:0;background:none;text-shadow:none;font-weight:600;font-size:13px}.post-type-soliloquy #wpbody-content h1 .page-title-action:hover{background:none;color:#999}.post-type-soliloquy #wpbody-content h1 .page-title-action:before{display:inline-block;font-family:'soliloquy';content:'\0050';margin-top:-3px;margin-right:8px;vertical-align:middle}.post-type-soliloquy .wrap{margin-top:0px !important}.post-type-soliloquy input[type=checkbox]{background-color:#fff;border:1px solid #ddd;box-shadow:none;margin-right:10px}.post-type-soliloquy input[type=checkbox]:checked{background-color:#72b63d;border-color:#72b63d}.post-type-soliloquy input[type=checkbox]:checked:before{color:#fff !important}.post-type-soliloquy ul.subsubsub{margin:0 0 20px 0;padding-left:0px}.post-type-soliloquy .column-image{width:85px !important}.post-type-soliloquy form#posts-filter div.tablenav.top{margin:0 0 8px 0}.post-type-soliloquy form#posts-filter .button{height:28px;line-height:26px}.post-type-soliloquy #wpbody-content .inline-edit-row fieldset input[type="text"],.post-type-soliloquy #wpbody-content .inline-edit-row fieldset input[type="number"],.post-type-soliloquy #wpbody-content .inline-edit-row fieldset input[type="password"]{background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;color:#32373c;height:35px;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out;min-width:210px;max-width:350px;width:100%;border-radius:3px;padding-right:0}.post-type-soliloquy #wpbody-content .inline-edit-row fieldset select{min-width:275px}.post-type-soliloquy #wpbody-content .inline-edit-row fieldset span.title{font-style:normal;font-weight:600;font-size:13px;min-width:140px}.post-type-soliloquy #wpbody-content td.colspanchange fieldset.inline-edit-col-left fieldset.inline-edit-date{display:none}.post-type-soliloquy #wpbody-content td.colspanchange fieldset.inline-edit-col-left div.inline-edit-group:last-child{display:none}tr.type-soliloquy th{padding:20px inherit !important}tr.type-soliloquy td{padding:20px inherit}.soliloquy-count{display:none}
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/css/settings.css DELETED
@@ -1,820 +0,0 @@
1
- /* ==========================================================================
2
- Soliloquy Icons
3
- ========================================================================== */
4
- @font-face {
5
- font-family: 'soliloquy';
6
- src: url("../fonts/soliloquy.eot");
7
- src: url("../fonts/soliloquy.eot?#iefix") format("embedded-opentype"), url("../fonts/soliloquy.woff") format("woff"), url("../fonts/soliloquy.ttf") format("truetype"), url("../fonts/soliloquy.svg#soliloquy") format("svg");
8
- font-weight: normal;
9
- font-style: normal; }
10
- [class*='soliloquy-icon-']:before {
11
- display: inline-block;
12
- font-family: 'soliloquy';
13
- font-style: normal;
14
- font-weight: normal;
15
- font-size: 13px;
16
- line-height: 1.5;
17
- margin-right: 8px;
18
- -webkit-font-smoothing: antialiased;
19
- -moz-osx-font-smoothing: grayscale; }
20
-
21
- .soliloquy-icon-configuration:before {
22
- content: '\0041'; }
23
-
24
- .soliloquy-icon-soliloquy:before {
25
- content: '\0042'; }
26
-
27
- .soliloquy-icon-pinterest:before {
28
- content: '\0043'; }
29
-
30
- .soliloquy-icon-lightbox:before {
31
- content: '\0044'; }
32
-
33
- .soliloquy-icon-misc:before {
34
- content: '\0045'; }
35
-
36
- .soliloquy-icon-mobile:before {
37
- content: '\0046'; }
38
-
39
- .soliloquy-icon-pagination:before {
40
- content: '\0047'; }
41
-
42
- .soliloquy-icon-proofing:before {
43
- content: '\0048'; }
44
-
45
- .soliloquy-icon-slideshow:before {
46
- content: '\0049'; }
47
-
48
- .soliloquy-icon-tags:before {
49
- content: '\004a'; }
50
-
51
- .soliloquy-icon-thumbnails:before {
52
- content: '\004b'; }
53
-
54
- .soliloquy-icon-video:before {
55
- content: '\004c'; }
56
-
57
- .soliloquy-icon-watermark:before {
58
- content: '\004d'; }
59
-
60
- .soliloquy-icon-cloud-download:before {
61
- content: '\004e'; }
62
-
63
- .soliloquy-icon-toggle-on:before {
64
- content: '\004f'; }
65
-
66
- .soliloquy-icon-plus-circle:before {
67
- content: '\0050'; }
68
-
69
- .soliloquy-icon-list:before {
70
- content: '\0052'; }
71
-
72
- .soliloquy-icon-grid:before {
73
- content: '\0053'; }
74
-
75
- .soliloquy-icon-pencil:before {
76
- content: '\0055'; }
77
-
78
- .soliloquy-icon-close:before {
79
- content: '\0056'; }
80
-
81
- .soliloquy-icon-check:before {
82
- content: '\0057'; }
83
-
84
- .soliloquy-icon-schedule:before {
85
- content: '\0058'; }
86
-
87
- .soliloquy-icon-carousel:before {
88
- content: '\0059'; }
89
-
90
- /* ==========================================================================
91
- Header Styles
92
- ========================================================================== */
93
- #soliloquy-header {
94
- background-color: #ff3700;
95
- height: 120px;
96
- margin-left: -20px; }
97
- #soliloquy-header #soliloquy-logo {
98
- margin: 0;
99
- padding-top: 25px;
100
- line-height: 120px;
101
- margin-left: 20px; }
102
- #soliloquy-header #soliloquy-logo img {
103
- max-width: 288px; }
104
-
105
- /* ==========================================================================
106
- Global Styles
107
- ========================================================================== */
108
- .wp-core-ui .button-soliloquy {
109
- background: #ff3700;
110
- border-color: #ff3700;
111
- -webkit-box-shadow: none;
112
- box-shadow: none;
113
- color: white;
114
- text-decoration: none;
115
- font-weight: 500;
116
- text-shadow: none;
117
- line-height: 15px;
118
- height: 35px;
119
- font-size: 13px;
120
- padding: 0 20px 1px; }
121
- .wp-core-ui .button-soliloquy:hover {
122
- background: #ff3700;
123
- border-color: #ff3700;
124
- color: white;
125
- opacity: .8; }
126
- .wp-core-ui .button-soliloquy-secondary {
127
- background: #f7f7f7;
128
- border: 1px solid;
129
- border-color: #dddddd;
130
- -webkit-box-shadow: none;
131
- box-shadow: none;
132
- color: #23282d;
133
- text-decoration: none;
134
- text-shadow: none;
135
- font-weight: bold;
136
- height: 35px;
137
- font-size: 13px;
138
- padding: 0 20px 1px; }
139
- .wp-core-ui .button-soliloquy-secondary:hover {
140
- background: #f7f7f7;
141
- border-color: #999999;
142
- color: #23282d; }
143
- .wp-core-ui .button-soliloquy-delete {
144
- background: #e3231b;
145
- border: 1px solid;
146
- border-color: #e3231b;
147
- -webkit-box-shadow: none;
148
- box-shadow: none;
149
- color: white;
150
- text-decoration: none;
151
- text-shadow: none;
152
- font-weight: bold;
153
- height: 35px;
154
- font-size: 13px;
155
- padding: 0 20px 1px; }
156
- .wp-core-ui .button-soliloquy-delete:hover {
157
- background: #e3231b;
158
- color: white;
159
- opacity: .8; }
160
- .wp-core-ui a.button-soliloquy,
161
- .wp-core-ui a.button-soliloquy-secondary,
162
- .wp-core-ui a.button-soliloquy-delete {
163
- line-height: 32px; }
164
-
165
- #soliloquy-settings-content input:not([type=checkbox]) {
166
- background-color: white;
167
- border: 1px solid #ddd;
168
- -webkit-box-shadow: none;
169
- box-shadow: none;
170
- color: #32373c;
171
- height: 35px;
172
- outline: none;
173
- -webkit-transition: 0.05s border-color ease-in-out;
174
- transition: 0.05s border-color ease-in-out; }
175
- #soliloquy-settings-content input[type=checkbox]:checked {
176
- -color: #ff3700; }
177
- #soliloquy-settings-content textarea {
178
- width: 100%; }
179
- #soliloquy-settings-content input[type="password"].soliloquy-input {
180
- background-color: white;
181
- border: 1px solid #ddd;
182
- -webkit-box-shadow: none;
183
- box-shadow: none;
184
- color: #32373c;
185
- outline: none;
186
- -webkit-transition: 0.05s border-color ease-in-out;
187
- transition: 0.05s border-color ease-in-out; }
188
-
189
- input[type="password"].soliloquy-input {
190
- background-color: white;
191
- border: 1px solid #ddd;
192
- -webkit-box-shadow: none;
193
- box-shadow: none;
194
- height: 35px;
195
- color: #32373c;
196
- outline: none;
197
- -webkit-transition: 0.05s border-color ease-in-out;
198
- transition: 0.05s border-color ease-in-out; }
199
-
200
- pre.soliloquy-code {
201
- background-color: #dddddd;
202
- border-radius: 3px;
203
- padding: 15px; }
204
-
205
- .soliloquy-clipboard {
206
- display: block;
207
- text-decoration: underline !important;
208
- padding-top: 8px;
209
- font-size: 11px;
210
- outline: 0 !important; }
211
- .soliloquy-clipboard:focus {
212
- outline-style: none;
213
- box-shadow: none;
214
- border-color: transparent; }
215
-
216
- .soliloquy-code {
217
- display: block;
218
- background-color: #f7f7f7;
219
- border-radius: 3px;
220
- padding: 10px !important; }
221
-
222
- /* ==========================================================================
223
- Utilities
224
- ========================================================================== */
225
- .soliloquy-list-inline {
226
- margin: 0;
227
- list-style: none; }
228
- .soliloquy-list-inline li {
229
- display: inline-block;
230
- margin-right: 5px; }
231
- .soliloquy-list-inline li:last-child {
232
- margin-right: 0 !important; }
233
-
234
- .soliloquy-yt iframe {
235
- max-width: 100%;
236
- height: auto; }
237
-
238
- .soliloquy-hidden {
239
- display: none !important; }
240
-
241
- .soliloquy-hideme {
242
- visibility: hidden; }
243
-
244
- .soliloquy-no-border {
245
- border: none !important; }
246
-
247
- .soliloquy-right {
248
- float: right; }
249
-
250
- .soliloquy-left {
251
- float: left; }
252
-
253
- .soliloquy-clearfix {
254
- clear: both;
255
- display: block;
256
- height: 0;
257
- overflow: hidden;
258
- visibility: hidden;
259
- width: 0; }
260
-
261
- .no-margin {
262
- margin: 0 !important; }
263
-
264
- .no-margin-top {
265
- margin-top: 0 !important; }
266
-
267
- .no-margin-bottom {
268
- margin-bottom: 0 !important; }
269
-
270
- /* Add this attribute to the element that needs a tooltip */
271
- [data-soliloquy-tooltip] {
272
- position: relative;
273
- z-index: 2;
274
- cursor: pointer; }
275
-
276
- /* Hide the tooltip content by default */
277
- [data-soliloquy-tooltip]:before,
278
- [data-soliloquy-tooltip]:after {
279
- visibility: hidden;
280
- opacity: 0;
281
- pointer-events: none; }
282
-
283
- /* Position tooltip above the element */
284
- [data-soliloquy-tooltip]:before {
285
- position: absolute;
286
- bottom: 120%;
287
- left: 50%;
288
- margin-bottom: 5px;
289
- margin-left: -35px;
290
- padding: 7px;
291
- width: 60px;
292
- -webkit-border-radius: 3px;
293
- -moz-border-radius: 3px;
294
- border-radius: 3px;
295
- background-color: #000;
296
- color: #fff;
297
- content: attr(data-soliloquy-tooltip);
298
- text-align: center;
299
- font-size: 12px;
300
- line-height: 1.2; }
301
-
302
- /* Triangle hack to make tooltip look like a speech bubble */
303
- [data-soliloquy-tooltip]:after {
304
- position: absolute;
305
- bottom: 120%;
306
- left: 50%;
307
- width: 0;
308
- margin-left: -5px;
309
- border-top: 5px solid #000;
310
- border-right: 5px solid transparent;
311
- border-left: 5px solid transparent;
312
- content: " ";
313
- font-size: 0;
314
- line-height: 0; }
315
-
316
- /* Show tooltip content on hover */
317
- [data-soliloquy-tooltip]:hover:before,
318
- [data-soliloquy-tooltip]:hover:after {
319
- visibility: visible;
320
- opacity: 1; }
321
-
322
- .soliloquy-alert {
323
- position: relative;
324
- margin: 0 0 20px 0;
325
- padding: 20px;
326
- -webkit-border-radius: 2px;
327
- -moz-border-radius: 2px;
328
- -o-border-radius: 2px;
329
- border-radius: 2px;
330
- background: #fcf8e3; }
331
-
332
- [class*=soliloquy-grid-] {
333
- float: left;
334
- margin-left: 2%; }
335
- [class*=soliloquy-grid-] input[type=text] {
336
- width: 100% !important; }
337
-
338
- .soliloquy-grid-1 {
339
- width: 6.5%; }
340
-
341
- .soliloquy-grid-2 {
342
- width: 15%; }
343
-
344
- .soliloquy-grid-3 {
345
- width: 23.5%; }
346
-
347
- .soliloquy-grid-4 {
348
- width: 32%; }
349
-
350
- .soliloquy-grid-5 {
351
- width: 40.5%; }
352
-
353
- .soliloquy-grid-6 {
354
- width: 49%; }
355
-
356
- .soliloquy-grid-7 {
357
- width: 57.5%; }
358
-
359
- .soliloquy-grid-8 {
360
- width: 66%; }
361
-
362
- .soliloquy-grid-9 {
363
- width: 74.5%; }
364
-
365
- .soliloquy-grid-10 {
366
- width: 83%; }
367
-
368
- .soliloquy-grid-11 {
369
- width: 91.5%; }
370
-
371
- .soliloquy-grid-12 {
372
- width: 100%; }
373
-
374
- .soliloquy-first {
375
- margin-left: 0px; }
376
-
377
- /*!
378
- Chosen, a Select Box Enhancer for jQuery and Prototype
379
- by Patrick Filler for Harvest, http://getharvest.com
380
-
381
- Version 1.5.1
382
- Full source at https://github.com/harvesthq/chosen
383
- Copyright (c) 2011-2016 Harvest http://getharvest.com
384
-
385
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
386
- This file is generated by `grunt build`, do not edit it by hand.
387
- */
388
- .soliloquy-select {
389
- /* @group Base */
390
- /* @end */
391
- /* @group Single Chosen */
392
- /* @end */
393
- /* @group Results */
394
- /* @end */
395
- /* @group Multi Chosen */
396
- /* @end */
397
- /* @group Active */
398
- /* @end */
399
- /* @group Disabled Support */
400
- /* @end */
401
- /* @group Right to Left */
402
- /* @end */
403
- /* @group Retina compatibility */
404
- /* @end */ }
405
- .soliloquy-select * {
406
- box-shadow: none !important;
407
- background-image: none !important; }
408
- .soliloquy-select *:after {
409
- background-image: none !important; }
410
- .soliloquy-select .soliloquy-chosen {
411
- height: 35px;
412
- max-width: 350px;
413
- width: 100%; }
414
- .soliloquy-select .chosen-container {
415
- position: relative;
416
- display: inline-block;
417
- vertical-align: middle;
418
- font-size: 13px;
419
- -webkit-user-select: none;
420
- -moz-user-select: none;
421
- user-select: none;
422
- max-width: 350px;
423
- font-weight: 600; }
424
- .soliloquy-select .chosen-container * {
425
- -webkit-box-sizing: border-box;
426
- -moz-box-sizing: border-box;
427
- box-sizing: border-box; }
428
- .soliloquy-select .chosen-container .chosen-drop {
429
- position: absolute;
430
- top: 100%;
431
- left: -9999px;
432
- z-index: 1010;
433
- width: 100%;
434
- border: 1px solid #dddddd;
435
- border-top: 0;
436
- background: white; }
437
- .soliloquy-select .chosen-container.chosen-with-drop .chosen-drop {
438
- left: 0; }
439
- .soliloquy-select .chosen-container a {
440
- cursor: pointer; }
441
- .soliloquy-select .chosen-container .search-choice .group-name, .soliloquy-select .chosen-container .chosen-single .group-name {
442
- margin-right: 4px;
443
- overflow: hidden;
444
- white-space: nowrap;
445
- text-overflow: ellipsis;
446
- font-weight: normal;
447
- color: #999999; }
448
- .soliloquy-select .chosen-container .search-choice .group-name:after, .soliloquy-select .chosen-container .chosen-single .group-name:after {
449
- content: ":";
450
- padding-left: 2px;
451
- vertical-align: top; }
452
- .soliloquy-select .chosen-container-single .chosen-single {
453
- position: relative;
454
- display: block;
455
- overflow: hidden;
456
- padding: 0 0 0 8px;
457
- height: 35px;
458
- border: 1px solid #dddddd;
459
- border-radius: 3px;
460
- background: white;
461
- background-clip: padding-box;
462
- color: #444;
463
- text-decoration: none;
464
- white-space: nowrap;
465
- line-height: 35px; }
466
- .soliloquy-select .chosen-container-single .chosen-default {
467
- color: #999; }
468
- .soliloquy-select .chosen-container-single .chosen-single span {
469
- display: block;
470
- overflow: hidden;
471
- margin-right: 26px;
472
- text-overflow: ellipsis;
473
- white-space: nowrap; }
474
- .soliloquy-select .chosen-container-single .chosen-single-with-deselect span {
475
- margin-right: 38px; }
476
- .soliloquy-select .chosen-container-single .chosen-single abbr {
477
- position: absolute;
478
- top: 6px;
479
- right: 26px;
480
- display: block;
481
- width: 12px;
482
- height: 12px;
483
- font-size: 1px; }
484
- .soliloquy-select .chosen-container-single .chosen-single abbr:hover {
485
- background-position: -42px -10px; }
486
- .soliloquy-select .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
487
- background-position: -42px -10px; }
488
- .soliloquy-select .chosen-container-single .chosen-single div {
489
- border-left: 1px solid #dddddd;
490
- position: absolute;
491
- top: 0;
492
- right: 0;
493
- display: block;
494
- width: 30px;
495
- height: 100%;
496
- padding-left: 9px; }
497
- .soliloquy-select .chosen-container-single .chosen-single div b {
498
- display: block;
499
- width: 100%;
500
- height: 100%;
501
- line-height: 35px; }
502
- .soliloquy-select .chosen-container-single .chosen-single div b:before {
503
- content: "\0051";
504
- display: block;
505
- font-weight: normal;
506
- font-size: 8px !important;
507
- font-family: 'soliloquy';
508
- position: absolute;
509
- text-align: center; }
510
- .soliloquy-select .chosen-container-single .chosen-search {
511
- position: relative;
512
- z-index: 1010;
513
- margin: 0;
514
- padding: 3px 4px;
515
- white-space: nowrap; }
516
- .soliloquy-select .chosen-container-single .chosen-search input[type="text"] {
517
- margin: 1px 0;
518
- padding: 4px 20px 4px 5px;
519
- width: 100%;
520
- height: auto;
521
- outline: 0;
522
- border: 1px solid #dddddd;
523
- background: white url("chosen-sprite.png") no-repeat 100% -20px;
524
- background: url("chosen-sprite.png") no-repeat 100% -20px;
525
- font-size: 1em;
526
- font-family: sans-serif;
527
- line-height: normal;
528
- border-radius: 0; }
529
- .soliloquy-select .chosen-container-single .chosen-drop {
530
- margin-top: -1px;
531
- border-radius: 0 0 2px 2px;
532
- background-clip: padding-box; }
533
- .soliloquy-select .chosen-container-single.chosen-container-single-nosearch .chosen-search {
534
- position: absolute;
535
- left: -9999px; }
536
- .soliloquy-select .chosen-container .chosen-results {
537
- color: #444;
538
- position: relative;
539
- overflow-x: hidden;
540
- overflow-y: auto;
541
- margin: 0 4px 4px 0;
542
- padding: 0 0 0 4px;
543
- max-height: 240px;
544
- -webkit-overflow-scrolling: touch; }
545
- .soliloquy-select .chosen-container .chosen-results li {
546
- display: none;
547
- margin: 0;
548
- padding: 5px 6px;
549
- list-style: none;
550
- line-height: 15px;
551
- word-wrap: break-word;
552
- -webkit-touch-callout: none; }
553
- .soliloquy-select .chosen-container .chosen-results li.active-result {
554
- display: list-item;
555
- cursor: pointer; }
556
- .soliloquy-select .chosen-container .chosen-results li.disabled-result {
557
- display: list-item;
558
- color: #ccc;
559
- cursor: default; }
560
- .soliloquy-select .chosen-container .chosen-results li.highlighted {
561
- background: #ff3700;
562
- color: white; }
563
- .soliloquy-select .chosen-container .chosen-results li.no-results {
564
- color: #777;
565
- display: list-item;
566
- background: #f4f4f4; }
567
- .soliloquy-select .chosen-container .chosen-results li.group-result {
568
- display: list-item;
569
- font-weight: bold;
570
- cursor: default; }
571
- .soliloquy-select .chosen-container .chosen-results li.group-option {
572
- padding-left: 15px; }
573
- .soliloquy-select .chosen-container .chosen-results li em {
574
- font-style: normal;
575
- text-decoration: underline; }
576
- .soliloquy-select .chosen-container-multi .chosen-choices {
577
- position: relative;
578
- overflow: hidden;
579
- margin: 0;
580
- padding: 0 5px;
581
- width: 100%;
582
- height: auto !important;
583
- height: 1%;
584
- border: 1px solid #dddddd;
585
- background: white;
586
- cursor: text; }
587
- .soliloquy-select .chosen-container-multi .chosen-choices li {
588
- float: left;
589
- list-style: none; }
590
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-field {
591
- margin: 0;
592
- padding: 0;
593
- white-space: nowrap; }
594
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
595
- margin: 1px 0;
596
- padding: 0;
597
- height: 25px;
598
- outline: 0;
599
- border: 0 !important;
600
- background: transparent !important;
601
- box-shadow: none;
602
- color: #999;
603
- font-size: 100%;
604
- font-family: sans-serif;
605
- line-height: normal;
606
- border-radius: 0; }
607
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice {
608
- position: relative;
609
- margin: 3px 5px 3px 0;
610
- padding: 3px 20px 3px 5px;
611
- border: 1px solid #dddddd;
612
- max-width: 100%;
613
- border-radius: 2px;
614
- background: white;
615
- background-size: 100% 19px;
616
- background-repeat: repeat-x;
617
- background-clip: padding-box;
618
- box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
619
- color: #333;
620
- line-height: 13px;
621
- cursor: default; }
622
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice span {
623
- word-wrap: break-word; }
624
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
625
- position: absolute;
626
- top: 4px;
627
- right: 3px;
628
- display: block;
629
- width: 12px;
630
- height: 12px;
631
- background: url("chosen-sprite.png") -42px 1px no-repeat;
632
- font-size: 1px; }
633
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
634
- background-position: -42px -10px; }
635
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-disabled {
636
- padding-right: 5px;
637
- border: 1px solid #dddddd;
638
- background: #e4e4e4;
639
- color: #666; }
640
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus {
641
- background: #d4d4d4; }
642
- .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
643
- background-position: -42px -10px; }
644
- .soliloquy-select .chosen-container-multi .chosen-results {
645
- margin: 0;
646
- padding: 0; }
647
- .soliloquy-select .chosen-container-multi .chosen-drop .result-selected {
648
- display: list-item;
649
- color: #ccc;
650
- cursor: default; }
651
- .soliloquy-select .chosen-container-active .chosen-single {
652
- border: 1px solid #dddddd; }
653
- .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single {
654
- border: 1px solid #dddddd;
655
- -moz-border-radius-bottomright: 0;
656
- border-bottom-right-radius: 0;
657
- -moz-border-radius-bottomleft: 0;
658
- border-bottom-left-radius: 0;
659
- background: white; }
660
- .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div {
661
- border-left: 1px solid transparent;
662
- background: transparent; }
663
- .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div b {
664
- background-position: -18px 2px; }
665
- .soliloquy-select .chosen-container-active .chosen-choices {
666
- border: 1px solid #5897fb;
667
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); }
668
- .soliloquy-select .chosen-container-active .chosen-choices li.search-field input[type="text"] {
669
- color: #222 !important; }
670
- .soliloquy-select .chosen-disabled {
671
- opacity: 0.5 !important;
672
- cursor: default; }
673
- .soliloquy-select .chosen-disabled .chosen-single {
674
- cursor: default; }
675
- .soliloquy-select .chosen-disabled .chosen-choices .search-choice .search-choice-close {
676
- cursor: default; }
677
- .soliloquy-select .chosen-rtl {
678
- text-align: right; }
679
- .soliloquy-select .chosen-rtl .chosen-single {
680
- overflow: visible;
681
- padding: 0 8px 0 0; }
682
- .soliloquy-select .chosen-rtl .chosen-single span {
683
- margin-right: 0;
684
- margin-left: 26px;
685
- direction: rtl; }
686
- .soliloquy-select .chosen-rtl .chosen-single-with-deselect span {
687
- margin-left: 38px; }
688
- .soliloquy-select .chosen-rtl .chosen-single div {
689
- right: auto;
690
- left: 3px; }
691
- .soliloquy-select .chosen-rtl .chosen-single abbr {
692
- right: auto;
693
- left: 26px; }
694
- .soliloquy-select .chosen-rtl .chosen-choices li {
695
- float: right; }
696
- .soliloquy-select .chosen-rtl .chosen-choices li.search-field input[type="text"] {
697
- direction: rtl; }
698
- .soliloquy-select .chosen-rtl .chosen-choices li.search-choice {
699
- margin: 3px 5px 3px 0;
700
- padding: 3px 5px 3px 19px; }
701
- .soliloquy-select .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
702
- right: auto;
703
- left: 4px; }
704
- .soliloquy-select .chosen-rtl.chosen-container-single-nosearch .chosen-search,
705
- .soliloquy-select .chosen-rtl .chosen-drop {
706
- left: 9999px; }
707
- .soliloquy-select .chosen-rtl.chosen-container-single .chosen-results {
708
- margin: 0 0 4px 4px;
709
- padding: 0 4px 0 0; }
710
- .soliloquy-select .chosen-rtl .chosen-results li.group-option {
711
- padding-right: 15px;
712
- padding-left: 0; }
713
- .soliloquy-select .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
714
- border-right: none; }
715
- .soliloquy-select .chosen-rtl .chosen-search input[type="text"] {
716
- padding: 4px 5px 4px 20px;
717
- background: white url("chosen-sprite.png") no-repeat -30px -20px;
718
- background: url("chosen-sprite.png") no-repeat -30px -20px;
719
- direction: rtl; }
720
- .soliloquy-select .chosen-rtl.chosen-container-single .chosen-single div b {
721
- background-position: 6px 2px; }
722
- .soliloquy-select .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
723
- background-position: -12px 2px; }
724
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
725
- .soliloquy-select .chosen-rtl .chosen-search input[type="text"],
726
- .soliloquy-select .chosen-container-single .chosen-single abbr,
727
- .soliloquy-select .chosen-container-single .chosen-search input[type="text"],
728
- .soliloquy-select .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
729
- .soliloquy-select .chosen-container .chosen-results-scroll-down span,
730
- .soliloquy-select .chosen-container .chosen-results-scroll-up span {
731
- background-image: none !important;
732
- background-size: 52px 37px !important;
733
- background-repeat: no-repeat !important; } }
734
- .soliloquy-select select.soliloquy-chosen + .chosen-container.chosen-container-single .chosen-single {
735
- padding-right: 35px; }
736
-
737
- /* ==========================================================================
738
- Settings Styles
739
- ========================================================================== */
740
- #soliloquy-tabs-nav {
741
- background-color: white;
742
- padding: 0;
743
- margin: 0;
744
- height: 50px;
745
- box-sizing: border-box;
746
- margin-left: -20px; }
747
- #soliloquy-tabs-nav .nav-tab {
748
- margin: 0;
749
- background-color: white;
750
- border: none;
751
- line-height: 40px;
752
- border-right: 1px solid #dddddd; }
753
- #soliloquy-tabs-nav .nav-tab:first-child {
754
- margin-left: 20px;
755
- border-left: 1px solid #dddddd; }
756
- #soliloquy-tabs-nav .nav-tab:focus {
757
- outline-style: none;
758
- box-shadow: none;
759
- border-color: transparent; }
760
- #soliloquy-tabs-nav .nav-tab-active {
761
- background-color: #f1f1f1;
762
- border: none; }
763
-
764
- .soliloquy-settings-table tr {
765
- border-bottom: 1px solid #dddddd; }
766
- .soliloquy-settings-table tr th {
767
- padding-top: 40px; }
768
- .soliloquy-settings-table tr td {
769
- padding: 40px 0; }
770
-
771
- #soliloquy-settings .soliloquy {
772
- margin: 15px 0 20px; }
773
- #soliloquy-settings .soliloquy-tab {
774
- display: none; }
775
- #soliloquy-settings .soliloquy-tab.soliloquy-active {
776
- display: block; }
777
- #soliloquy-settings .soliloquy-tab th {
778
- width: 210px;
779
- padding-right: 0; }
780
- #soliloquy-settings input[type="text"],
781
- #soliloquy-settings input[type="number"],
782
- #soliloquy-settings input[type="password"],
783
- #soliloquy-settings select,
784
- #soliloquy-settings textarea {
785
- width: 350px;
786
- padding-right: 0; }
787
- #soliloquy-settings .soliloquy-clear {
788
- clear: both; }
789
- #soliloquy-settings .soliloquy-clear:after {
790
- clear: both;
791
- content: '.';
792
- display: block;
793
- height: 0;
794
- line-height: 0;
795
- overflow: auto;
796
- visibility: hidden;
797
- zoom: 1; }
798
-
799
- #soliloquy-refresh-submit {
800
- margin-top: -10px; }
801
-
802
- .soliloquy-external-req {
803
- border: 1px solid #ff3700;
804
- border-radius: 3px;
805
- padding: 30px; }
806
- .soliloquy-external-req h2 {
807
- font-size: 20px;
808
- margin: 0;
809
- padding: 0; }
810
-
811
- .soliloquy-external-req-active {
812
- border: 1px solid #72b63d;
813
- background-color: white;
814
- border-radius: 3px;
815
- padding: 30px; }
816
- .soliloquy-external-req-active h2 {
817
- font-size: 20px;
818
- font-weight: 600;
819
- margin: 0;
820
- padding: 0; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/css/soliloquy.css DELETED
@@ -1,334 +0,0 @@
1
- .soliloquy-container,
2
- .soliloquy-container * {
3
- background: none;
4
- border: 0 none;
5
- border-radius: 0;
6
- -webkit-border-radius: 0;
7
- -moz-border-radius: 0;
8
- float: none;
9
- font-size: 100%;
10
- height: auto;
11
- letter-spacing: normal;
12
- list-style: none;
13
- outline: none;
14
- position: static;
15
- text-decoration: none;
16
- text-indent: 0;
17
- text-shadow: none;
18
- text-transform: none;
19
- width: auto;
20
- visibility: visible;
21
- overflow: visible;
22
- margin: 0;
23
- padding: 0;
24
- line-height: 1;
25
- box-sizing: border-box;
26
- -webkit-box-sizing: border-box;
27
- -moz-box-sizing: border-box;
28
- -webkit-box-shadow: none;
29
- -moz-box-shadow: none;
30
- -ms-box-shadow: none;
31
- -o-box-shadow: none;
32
- box-shadow: none;
33
- -webkit-appearance: none; }
34
-
35
- .soliloquy-container {
36
- position: relative;
37
- background: transparent url("images/preloader.gif") no-repeat scroll 50% 50%;
38
- z-index: 0;
39
- width: 100%;
40
- max-width: 100%; }
41
-
42
- .soliloquy-container:after {
43
- display: none;
44
- height: 0;
45
- line-height: 0;
46
- visibility: hidden;
47
- content: url("images/left.png") url("images/right.png") url("images/circle.png") url("images/circle-hover.png") url("images/pause.png") url("images/play.png") url("images/video.png"); }
48
-
49
- .soliloquy-container .soliloquy-wrap {
50
- width: 100%;
51
- position: relative;
52
- margin: 0;
53
- padding: 0;
54
- list-style: none !important;
55
- height: 100%;
56
- zoom: 1;
57
- *zoom: 1; }
58
-
59
- .soliloquy-container .soliloquy-viewport {
60
- -webkit-transform: translatez(0);
61
- -moz-transform: translatez(0);
62
- -ms-transform: translatez(0);
63
- -o-transform: translatez(0);
64
- transform: translatez(0); }
65
-
66
- .soliloquy-clear {
67
- clear: both; }
68
-
69
- .soliloquy-clear:after {
70
- clear: both;
71
- content: '.';
72
- display: block;
73
- height: 0;
74
- line-height: 0;
75
- overflow: auto;
76
- visibility: hidden;
77
- zoom: 1; }
78
-
79
- .soliloquy-hide {
80
- display: none; }
81
-
82
- .soliloquy-container a {
83
- outline: none; }
84
-
85
- .soliloquy-container .soliloquy-wrapper,
86
- .soliloquy-container .soliloquy-item {
87
- width: 100%;
88
- position: relative;
89
- margin: 0;
90
- padding: 0;
91
- list-style: none !important; }
92
-
93
- .soliloquy-container .soliloquy-item {
94
- min-height: 1px;
95
- min-width: 1px;
96
- display: none; }
97
-
98
- .no-js .soliloquy-container .soliloquy-slides > li:first-child {
99
- display: block; }
100
-
101
- .soliloquy-container .soliloquy-item:after {
102
- content: '.';
103
- position: absolute;
104
- bottom: 0;
105
- left: 0;
106
- z-index: -1000;
107
- visibility: hidden;
108
- opacity: 0;
109
- height: 0;
110
- line-height: 0; }
111
-
112
- .soliloquy-container .soliloquy-item > a {
113
- display: block;
114
- outline: none;
115
- width: 100%;
116
- position: relative;
117
- border: none; }
118
-
119
- .soliloquy-container .soliloquy-image {
120
- max-width: 100%;
121
- height: auto;
122
- display: block;
123
- margin: 0 auto;
124
- -webkit-user-drag: none;
125
- -moz-user-select: none;
126
- -ms-user-select: none; }
127
-
128
- .soliloquy-container .soliloquy-prev {
129
- display: block;
130
- width: 32px;
131
- height: 32px;
132
- position: absolute;
133
- top: 50%;
134
- margin-top: -16px;
135
- left: 10px;
136
- z-index: 1320;
137
- background: rgba(0, 0, 0, 0.7) url("images/left.png") no-repeat scroll 50% 50%; }
138
-
139
- .soliloquy-container .soliloquy-next {
140
- display: block;
141
- width: 32px;
142
- height: 32px;
143
- position: absolute;
144
- top: 50%;
145
- margin-top: -16px;
146
- right: 10px;
147
- z-index: 1320;
148
- background: rgba(0, 0, 0, 0.7) url("images/right.png") no-repeat scroll 50% 50%; }
149
-
150
- .soliloquy-container .soliloquy-prev.disabled,
151
- .soliloquy-container .soliloquy-next.disabled {
152
- cursor: default;
153
- pointer-events: none;
154
- opacity: 0.3; }
155
-
156
- .soliloquy-container .soliloquy-pager {
157
- width: 100%;
158
- margin: 0 auto;
159
- text-align: center;
160
- position: absolute;
161
- bottom: 10px;
162
- height: 14px; }
163
-
164
- .soliloquy-container .soliloquy-pager-item {
165
- display: inline-block;
166
- margin: 0 0 0 7px;
167
- position: relative;
168
- z-index: 1320; }
169
-
170
- .soliloquy-container .soliloquy-pager-item:first-child {
171
- margin-left: 0; }
172
-
173
- .soliloquy-container .soliloquy-pager-link {
174
- background: url("images/circle.png") no-repeat scroll 0 0;
175
- width: 14px;
176
- height: 14px;
177
- display: block;
178
- outline: none;
179
- text-indent: -9999px;
180
- text-decoration: none;
181
- border: none; }
182
-
183
- .soliloquy-container .soliloquy-pager-link:hover,
184
- .soliloquy-container .soliloquy-pager-link.active {
185
- background-image: url("images/circle-hover.png"); }
186
-
187
- .soliloquy-container .soliloquy-controls-auto-item {
188
- display: block;
189
- width: 32px;
190
- height: 32px;
191
- position: absolute;
192
- bottom: 10px;
193
- right: 10px;
194
- z-index: 1220; }
195
-
196
- .soliloquy-container .soliloquy-stop {
197
- display: block;
198
- width: 32px;
199
- height: 32px;
200
- background: rgba(0, 0, 0, 0.7) url("images/pause.png") no-repeat scroll 50% 50%; }
201
-
202
- .soliloquy-container .soliloquy-start {
203
- display: block;
204
- width: 32px;
205
- height: 32px;
206
- background: rgba(0, 0, 0, 0.7) url("images/play.png") no-repeat scroll 50% 50%; }
207
-
208
- .soliloquy-container .soliloquy-caption {
209
- position: absolute;
210
- bottom: 0;
211
- left: 0;
212
- width: 100%;
213
- z-index: 1120;
214
- padding-bottom: 25px;
215
- background: rgba(0, 0, 0, 0.5); }
216
-
217
- .soliloquy-container .soliloquy-caption-inside {
218
- font-size: 1em;
219
- line-height: 1.25;
220
- display: block;
221
- color: #fff;
222
- text-shadow: 0 1px 1px #000;
223
- text-align: center;
224
- padding: 10px; }
225
-
226
- .soliloquy-container .soliloquy-caption-inside a {
227
- color: #fff; }
228
-
229
- .soliloquy-container .soliloquy-controls {
230
- opacity: 0; }
231
-
232
- /**
233
- * RTL
234
- */
235
- .soliloquy-rtl {
236
- /**
237
- * Pager
238
- * - add margin to first child
239
- * - remove margin from last child
240
- */
241
- /**
242
- * Direction Controls
243
- * - swap left + right controls over
244
- */
245
- /**
246
- * Thumbnails
247
- * - float right so they display
248
- */ }
249
- .soliloquy-rtl .soliloquy-pager-item:first-child {
250
- margin-left: 7px; }
251
- .soliloquy-rtl .soliloquy-pager-item:last-child {
252
- margin-left: 0; }
253
- .soliloquy-rtl .soliloquy-next {
254
- left: 10px;
255
- right: auto;
256
- background-image: url(images/left.png); }
257
- .soliloquy-rtl .soliloquy-prev {
258
- right: 10px;
259
- left: auto;
260
- background-image: url(images/right.png); }
261
- .soliloquy-rtl .soliloquy-thumbnails-item {
262
- float: right !important; }
263
-
264
- .rtl {
265
- /**
266
- * Pager
267
- * - add margin to first child
268
- * - remove margin from last child
269
- */
270
- /**
271
- * Direction Controls
272
- * - swap left + right controls over
273
- */
274
- /**
275
- * Thumbnails
276
- * - float right so they display
277
- */ }
278
- .rtl .soliloquy-pager-item:first-child {
279
- margin-left: 7px; }
280
- .rtl .soliloquy-pager-item:last-child {
281
- margin-left: 0; }
282
- .rtl .soliloquy-next {
283
- left: 10px;
284
- right: auto;
285
- background-image: url(images/left.png); }
286
- .rtl .soliloquy-prev {
287
- right: 10px;
288
- left: auto;
289
- background-image: url(images/right.png); }
290
- .rtl .soliloquy-thumbnails-item {
291
- float: right !important; }
292
-
293
- @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
294
- .soliloquy-container {
295
- background-image: url("images/preloader@2x.gif");
296
- background-size: 16px 16px; }
297
-
298
- .soliloquy-container .soliloquy-prev {
299
- background-image: url("images/left@2x.png");
300
- background-size: 10px 14px; }
301
-
302
- .soliloquy-container .soliloquy-next {
303
- background-image: url("images/right@2x.png");
304
- background-size: 10px 14px; }
305
-
306
- .soliloquy-container .soliloquy-pager-link {
307
- background-image: url("images/circle@2x.png");
308
- background-size: 14px 14px; }
309
-
310
- .soliloquy-container .soliloquy-pager-link:hover,
311
- .soliloquy-container .soliloquy-pager-link.active {
312
- background-image: url("images/circle-hover@2x.png");
313
- background-size: 14px 14px; }
314
-
315
- .soliloquy-container .soliloquy-stop {
316
- background-image: url("images/pause@2x.png");
317
- background-size: 9px 14px; }
318
-
319
- .soliloquy-container .soliloquy-start {
320
- background-image: url("images/play@2x.png");
321
- background-size: 14px 14px; }
322
-
323
- .soliloquy-container .soliloquy-video-icon {
324
- background-image: url("images/video@2x.png");
325
- background-size: 50px 50px; } }
326
- @media (max-width: 600px) {
327
- .soliloquy-container .soliloquy-pager,
328
- .soliloquy-container .soliloquy-caption,
329
- .soliloquy-container .soliloquy-controls-auto {
330
- display: none; } }
331
- @media only screen and (max-width: 600px) and (-webkit-min-device-pixel-ratio: 2), only screen and (max-width: 600px) and (min--moz-device-pixel-ratio: 2), only screen and (max-width: 600px) and (-o-min-device-pixel-ratio: 2 / 1), only screen and (max-width: 600px) and (min-device-pixel-ratio: 2), only screen and (max-width: 600px) and (min-resolution: 192dpi), only screen and (max-width: 600px) and (min-resolution: 2dppx) {
332
- .soliloquy-container .soliloquy-video-icon {
333
- background-image: url("images/video.png");
334
- background-size: 25px 25px; } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/fonts/soliloquy.eot DELETED
Binary file
trunk/assets/fonts/soliloquy.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" ><svg xmlns="http://www.w3.org/2000/svg"><metadata>Generated by Glyphter</metadata><defs><font id="soliloquy" horiz-adv-x="0"><font-face units-per-em="1024" ascent="1024" descent="0" font-family="soliloquy" font-weight="normal" /><missing-glyph horiz-adv-x="0" /><glyph unicode="&#x0041;" d="M960,416C960,416,878.4,401.6,878.4,401.6C870.4,376,860.8,352,848,329.6C848,329.6,896,262.4,896,262.4C921.6,236.8,921.6,196.8,896,171.2C896,171.2,851.2,128,851.2,128C825.6,102.4,785.6,102.4,760,128C760,128,692.8,176,692.8,176C670.4,163.2,646.4,153.6,620.8,145.6C620.8,145.6,608,64,608,64C608,28.8,579.2,0,544,0C544,0,480,0,480,0C444.8,0,416,28.8,416,64C416,64,401.6,145.6,401.6,145.6C376,153.6,352,163.2,329.6,176C329.6,176,262.4,128,262.4,128C236.8,102.4,196.8,102.4,171.2,128C171.2,128,128,172.8,128,172.8C102.4,198.4,102.4,238.4,128,264C128,264,176,331.2,176,331.2C163.2,353.6,153.6,377.6,145.6,403.2C145.6,403.2,64,416,64,416C28.8,416,0,444.8,0,480C0,480,0,544,0,544C0,579.2,28.8,608,64,608C64,608,145.6,622.4,145.6,622.4C153.6,648,163.2,672,176,694.4C176,694.4,128,761.6,128,761.6C102.4,787.2,102.4,827.2,128,852.8C128,852.8,172.8,896,172.8,896C198.4,921.6,238.4,921.6,264,896C264,896,331.2,848,331.2,848C353.6,860.8,377.6,870.4,403.2,878.4C403.2,878.4,416,960,416,960C416,995.2,444.8,1024,480,1024C480,1024,544,1024,544,1024C579.2,1024,608,995.2,608,960C608,960,622.4,878.4,622.4,878.4C648,870.4,672,860.8,694.4,848C694.4,848,761.6,896,761.6,896C787.2,921.6,827.2,921.6,852.8,896C852.8,896,897.6,851.2,897.6,851.2C923.2,825.6,923.2,785.6,897.6,760C897.6,760,849.6,692.8,849.6,692.8C862.4,670.4,872,646.4,880,620.8C880,620.8,960,608,960,608C995.2,608,1024,579.2,1024,544C1024,544,1024,480,1024,480C1024,444.8,995.2,416,960,416C960,416,960,416,960,416M928,544C928,544,827.2,560,827.2,560C819.2,611.2,798.4,659.2,769.6,699.2C769.6,699.2,828.8,782.4,828.8,782.4C841.6,795.2,841.6,814.4,828.8,827.2C816,840,796.8,840,784,827.2C784,827.2,700.8,768,700.8,768C660.8,796.8,612.8,817.6,561.6,825.6C561.6,825.6,544,928,544,928C544,945.6,529.6,960,512,960C494.4,960,480,945.6,480,928C480,928,462.4,827.2,462.4,827.2C411.2,819.2,363.2,798.4,323.2,769.6C323.2,769.6,240,828.8,240,828.8C227.2,841.6,208,841.6,195.2,828.8C182.4,816,182.4,796.8,195.2,784C195.2,784,254.4,700.8,254.4,700.8C224,660.8,204.8,612.8,196.8,561.6C196.8,561.6,96,544,96,544C78.4,544,64,529.6,64,512C64,494.4,78.4,480,96,480C96,480,196.8,464,196.8,464C204.8,412.8,225.6,364.8,254.4,324.8C254.4,324.8,195.2,240,195.2,240C182.4,227.2,182.4,208,195.2,195.2C208,182.4,227.2,182.4,240,195.2C240,195.2,323.2,254.4,323.2,254.4C363.2,225.6,411.2,204.8,462.4,196.8C462.4,196.8,480,96,480,96C480,78.4,494.4,64,512,64C529.6,64,544,78.4,544,96C544,96,560,196.8,560,196.8C611.2,204.8,659.2,225.6,699.2,254.4C699.2,254.4,782.4,195.2,782.4,195.2C795.2,182.4,814.4,182.4,827.2,195.2C840,208,840,227.2,827.2,240C827.2,240,768,323.2,768,323.2C798.4,363.2,817.6,411.2,825.6,462.4C825.6,462.4,926.4,478.4,926.4,478.4C944,478.4,958.4,492.8,958.4,510.4C958.4,528,945.6,544,928,544C928,544,928,544,928,544M512,352C424,352,352,424,352,512C352,600,424,672,512,672C600,672,672,600,672,512C672,424,600,352,512,352C512,352,512,352,512,352M512,608C459.2,608,416,564.8,416,512C416,459.2,459.2,416,512,416C564.8,416,608,459.2,608,512C608,564.8,564.8,608,512,608C512,608,512,608,512,608" class="soliloquy-icon-configuration"/><glyph unicode="&#x0042;" d="M292.83,323.704C292.83,323.704,229.999,386.471,229.999,386.471C160.688,455.782,160.704,568.196,229.999,637.523C229.999,637.523,261.358,668.899,261.358,668.899C261.358,668.899,261.358,794.449,261.358,794.449C261.358,794.449,135.92,794.449,135.92,794.449C135.92,794.449,104.449,763.074,104.449,763.074C-34.158,624.403,-34.142,399.623,104.449,260.984C104.449,260.984,167.168,198.201,167.168,198.201C167.168,198.201,167.136,323.72,167.136,323.72C167.136,323.72,292.83,323.72,292.83,323.72C292.83,323.72,292.83,323.704,292.83,323.704M700.76,292.328C700.76,292.328,637.977,229.529,637.977,229.529C568.666,160.266,456.204,160.266,386.957,229.545C386.957,229.545,355.533,260.952,355.533,260.952C355.533,260.952,229.999,260.952,229.999,260.952C229.999,260.952,230.015,135.37,230.015,135.37C230.015,135.37,261.358,104.027,261.358,104.027C400.061,-34.676,624.873,-34.676,763.48,104.027C763.48,104.027,826.247,166.762,826.247,166.762C826.247,166.762,700.76,166.762,700.76,166.762C700.76,166.762,700.76,292.328,700.76,292.328C700.76,292.328,700.76,292.328,700.76,292.328M732.12,700.29C732.12,700.29,794.903,637.539,794.903,637.539C864.182,568.196,864.182,455.782,794.903,386.455C794.903,386.455,763.48,355.095,763.48,355.095C763.48,355.095,763.512,229.545,763.512,229.545C763.512,229.545,889.046,229.529,889.046,229.529C889.046,229.529,920.421,260.936,920.421,260.936C1059.092,399.607,1059.124,624.387,920.421,763.074C920.421,763.074,857.686,825.793,857.686,825.793C857.686,825.793,857.67,700.274,857.67,700.274C857.67,700.274,732.12,700.29,732.12,700.29C732.12,700.29,732.12,700.29,732.12,700.29M261.342,919.983C261.342,919.983,198.607,857.232,198.607,857.232C198.607,857.232,324.078,857.232,324.078,857.232C324.078,857.232,324.094,731.714,324.094,731.714C324.094,731.714,386.957,794.449,386.957,794.449C456.188,863.76,568.666,863.776,637.961,794.465C637.961,794.465,669.337,763.09,669.337,763.09C669.337,763.09,794.903,763.09,794.903,763.09C794.903,763.09,794.903,888.64,794.903,888.64C794.903,888.64,763.48,919.999,763.48,919.999C624.857,1058.67,400.045,1058.67,261.342,919.983C261.342,919.983,261.342,919.983,261.342,919.983" class="soliloquy-icon-soliloquy"/><glyph unicode="&#x0043;" d="M536.954,1024.5C730.179,1024.5,906.182,891.573,906.182,687.882C906.182,496.506,808.352,284.179,590.498,284.179C538.802,284.179,473.565,310.019,448.347,358.035C401.574,172.808,405.27,145.104,301.879,3.575C301.879,3.575,293.261,0.5,293.261,0.5C293.261,0.5,287.717,6.633,287.717,6.633C284.021,45.409,278.493,83.579,278.493,122.322C278.493,247.89,336.338,429.404,364.647,551.259C349.257,582.643,344.956,620.797,344.956,655.256C344.956,717.418,388.033,796.179,458.176,796.179C509.872,796.179,537.559,756.799,537.559,708.178C537.559,628.173,483.394,553.107,483.394,475.572C483.394,422.65,527.093,385.722,578.167,385.722C719.696,385.722,763.394,590.035,763.394,698.954C763.394,844.8,660.019,924.184,520.322,924.184C357.86,924.184,232.325,807.268,232.325,642.336C232.325,562.953,280.93,522.345,280.93,503.26C280.93,487.266,269.236,430.631,248.925,430.631C245.85,430.631,241.532,431.874,238.458,432.479C150.505,458.989,118.5,576.51,118.5,657.12C118.5,884.198,326.492,1024.5,536.954,1024.5C536.954,1024.5,536.954,1024.5,536.954,1024.5" class="soliloquy-icon-pinterest"/><glyph unicode="&#x0044;" d="M64,128C64,128,64,832,64,832C64,832,0,832,0,832C0,832,0,128,0,128C0,57.6,60.8,0,136,0C136,0,896,0,896,0C896,0,896,64,896,64C896,64,132.8,64,132.8,64C94.4,64,64,92.8,64,128C64,128,64,128,64,128M864,896C864,896,288,896,288,896C270.4,896,256,881.6,256,864C256,864,256,352,256,352C256,334.4,270.4,320,288,320C288,320,864,320,864,320C881.6,320,896,334.4,896,352C896,352,896,864,896,864C896,881.6,881.6,896,864,896C864,896,864,896,864,896M832,416C832,398.4,817.6,384,800,384C800,384,352,384,352,384C334.4,384,320,398.4,320,416C320,416,320,800,320,800C320,817.6,334.4,832,352,832C352,832,800,832,800,832C817.6,832,832,817.6,832,800C832,800,832,416,832,416C832,416,832,416,832,416M960,1024C960,1024,192,1024,192,1024C156.8,1024,128,995.2,128,960C128,960,128,192,128,192C128,156.8,156.8,128,192,128C192,128,960,128,960,128C995.2,128,1024,156.8,1024,192C1024,192,1024,960,1024,960C1024,995.2,995.2,1024,960,1024C960,1024,960,1024,960,1024M960,224C960,206.4,945.6,192,928,192C928,192,224,192,224,192C206.4,192,192,206.4,192,224C192,224,192,928,192,928C192,945.6,206.4,960,224,960C224,960,928,960,928,960C945.6,960,960,945.6,960,928C960,928,960,224,960,224C960,224,960,224,960,224" class="soliloquy-icon-lightbox"/><glyph unicode="&#x0045;" d="M991.932,835.643C991.932,835.643,849.542,693.253,849.542,693.253C849.542,693.253,719.951,720.451,719.951,720.451C719.951,720.451,694.352,850.042,694.352,850.042C694.352,850.042,835.143,992.432,835.143,992.432C790.346,1013.231,740.749,1024.43,691.153,1024.43C607.958,1024.43,523.164,992.432,459.169,928.436C367.975,837.243,342.377,704.452,380.774,589.26C380.774,589.26,43.197,251.683,43.197,251.683C-14.399,194.087,-14.399,101.293,43.197,43.697C71.995,14.899,108.793,0.5,147.19,0.5C185.587,0.5,222.385,14.899,251.183,43.697C251.183,43.697,588.76,381.274,588.76,381.274C623.957,370.075,659.155,363.675,695.952,363.675C780.746,363.675,863.941,395.673,927.936,459.669C1030.329,562.062,1049.528,712.451,991.932,835.643C991.932,835.643,991.932,835.643,991.932,835.643M876.74,512.465C828.743,464.468,764.748,437.27,695.952,437.27C667.154,437.27,639.956,442.07,612.758,450.069C612.758,450.069,569.561,464.468,569.561,464.468C569.561,464.468,537.563,432.47,537.563,432.47C537.563,432.47,199.986,94.894,199.986,94.894C185.587,80.495,167.988,72.495,147.19,72.495C127.991,72.495,108.793,80.495,94.394,94.894C79.995,109.293,71.995,126.891,71.995,147.69C71.995,166.889,79.995,186.087,94.394,200.486C94.394,200.486,431.97,538.063,431.97,538.063C431.97,538.063,463.968,570.061,463.968,570.061C463.968,570.061,449.569,613.258,449.569,613.258C417.571,707.652,441.57,808.445,510.365,877.24C558.362,925.237,622.357,952.435,691.153,952.435C691.153,952.435,641.556,902.838,641.556,902.838C641.556,902.838,614.358,875.64,614.358,875.64C614.358,875.64,622.357,837.243,622.357,837.243C622.357,837.243,647.956,707.652,647.956,707.652C647.956,707.652,657.555,659.655,657.555,659.655C657.555,659.655,705.552,650.055,705.552,650.055C705.552,650.055,835.143,624.457,835.143,624.457C835.143,624.457,873.54,616.458,873.54,616.458C873.54,616.458,900.738,643.656,900.738,643.656C900.738,643.656,950.335,693.253,950.335,693.253C950.335,626.057,924.737,560.462,876.74,512.465C876.74,512.465,876.74,512.465,876.74,512.465" class="soliloquy-icon-misc"/><glyph unicode="&#x0046;" d="M704,1024C704,1024,320,1024,320,1024C249.6,1024,192,966.4,192,896C192,896,192,128,192,128C192,57.6,249.6,0,320,0C320,0,704,0,704,0C774.4,0,832,57.6,832,128C832,128,832,896,832,896C832,966.4,774.4,1024,704,1024C704,1024,704,1024,704,1024M768,128C768,92.8,739.2,64,704,64C704,64,320,64,320,64C284.8,64,256,92.8,256,128C256,128,256,320,256,320C256,320,768,320,768,320C768,320,768,128,768,128C768,128,768,128,768,128M768,384C768,384,256,384,256,384C256,384,256,768,256,768C256,768,768,768,768,768C768,768,768,384,768,384C768,384,768,384,768,384M768,832C768,832,256,832,256,832C256,832,256,896,256,896C256,931.2,284.8,960,320,960C320,960,704,960,704,960C739.2,960,768,931.2,768,896C768,896,768,832,768,832C768,832,768,832,768,832M512,128C547.2,128,576,156.8,576,192C576,227.2,547.2,256,512,256C476.8,256,448,227.2,448,192C448,156.8,476.8,128,512,128C512,128,512,128,512,128" class="soliloquy-icon-mobile"/><glyph unicode="&#x0047;" d="M416,960C416,960,416,1024,416,1024C416,1024,1024,1024,1024,1024C1024,1024,1024,960,1024,960C1024,960,416,960,416,960C416,960,416,960,416,960C416,960,416,960,416,960M640,720C640,720,640,784,640,784C640,784,896,784,896,784C896,784,896,720,896,720C896,720,640,720,640,720C640,720,640,720,640,720C640,720,640,720,640,720M640,592C640,592,640,656,640,656C640,656,896,656,896,656C896,656,896,592,896,592C896,592,640,592,640,592C640,592,640,592,640,592C640,592,640,592,640,592M640,464C640,464,640,528,640,528C640,528,896,528,896,528C896,528,896,464,896,464C896,464,640,464,640,464C640,464,640,464,640,464C640,464,640,464,640,464M608,224C608,224,608,288,608,288C608,288,1024,288,1024,288C1024,288,1024,224,1024,224C1024,224,608,224,608,224C608,224,608,224,608,224C608,224,608,224,608,224M960,288C960,288,960,960,960,960C960,960,1024,960,1024,960C1024,960,1024,288,1024,288C1024,288,960,288,960,288C960,288,960,288,960,288C960,288,960,288,960,288M416,800C416,800,416,960,416,960C416,960,480,960,480,960C480,960,480,800,480,800C480,800,416,800,416,800C416,800,416,800,416,800C416,800,416,800,416,800M0,736C0,736,0,800,0,800C0,800,608,800,608,800C608,800,608,736,608,736C608,736,0,736,0,736C0,736,0,736,0,736C0,736,0,736,0,736M128,496C128,496,128,560,128,560C128,560,480,560,480,560C480,560,480,496,480,496C480,496,128,496,128,496C128,496,128,496,128,496C128,496,128,496,128,496M128,368C128,368,128,432,128,432C128,432,480,432,480,432C480,432,480,368,480,368C480,368,128,368,128,368C128,368,128,368,128,368C128,368,128,368,128,368M128,240C128,240,128,304,128,304C128,304,480,304,480,304C480,304,480,240,480,240C480,240,128,240,128,240C128,240,128,240,128,240C128,240,128,240,128,240M0,0C0,0,0,64,0,64C0,64,608,64,608,64C608,64,608,0,608,0C608,0,0,0,0,0C0,0,0,0,0,0C0,0,0,0,0,0M544,64C544,64,544,736,544,736C544,736,608,736,608,736C608,736,608,64,608,64C608,64,544,64,544,64C544,64,544,64,544,64C544,64,544,64,544,64M0,64C0,64,0,736,0,736C0,736,64,736,64,736C64,736,64,64,64,64C64,64,0,64,0,64C0,64,0,64,0,64C0,64,0,64,0,64" class="soliloquy-icon-pagination"/><glyph unicode="&#x0048;" d="M969.6,0C969.6,0,198.4,0,198.4,0C168,0,144,24,144,54.4C144,54.4,144,192,144,192C144,193.6,144,195.2,144,196.8C144,196.8,144,825.6,144,825.6C144,856,168,880,198.4,880C198.4,880,968,880,968,880C998.4,880,1022.4,856,1022.4,825.6C1022.4,825.6,1022.4,56,1022.4,56C1024,24,1000,0,969.6,0C969.6,0,969.6,0,969.6,0M198.4,83.2C198.4,68.8,211.2,56,225.6,56C225.6,56,713.6,56,713.6,56C713.6,56,440,371.2,440,371.2C440,371.2,198.4,176,198.4,176C198.4,176,198.4,83.2,198.4,83.2C198.4,83.2,198.4,83.2,198.4,83.2M969.6,796.8C969.6,811.2,956.8,824,942.4,824C942.4,824,227.2,824,227.2,824C212.8,824,200,811.2,200,796.8C200,796.8,200,251.2,200,251.2C200,251.2,420.8,432,420.8,432C425.6,435.2,430.4,436.8,435.2,438.4C436.8,438.4,436.8,438.4,438.4,440C440,440,443.2,441.6,444.8,441.6C452.8,443.2,462.4,440,467.2,433.6C467.2,433.6,552,334.4,552,334.4C552,334.4,809.6,544,809.6,544C816,550.4,824,552,832,550.4C841.6,550.4,849.6,548.8,857.6,544C857.6,544,969.6,422.4,969.6,422.4C969.6,422.4,969.6,796.8,969.6,796.8C969.6,796.8,969.6,796.8,969.6,796.8M969.6,337.6C968,337.6,968,337.6,969.6,337.6C969.6,337.6,828.8,488,828.8,488C828.8,488,587.2,291.2,587.2,291.2C587.2,291.2,792,54.4,792,54.4C792,54.4,940.8,54.4,940.8,54.4C955.2,54.4,968,67.2,968,81.6C968,81.6,968,337.6,968,337.6C968,337.6,969.6,337.6,969.6,337.6M364.8,550.4C304,550.4,254.4,600,254.4,660.8C254.4,721.6,304,771.2,364.8,771.2C425.6,771.2,475.2,721.6,475.2,660.8C473.6,600,425.6,550.4,364.8,550.4C364.8,550.4,364.8,550.4,364.8,550.4M364.8,715.2C334.4,715.2,310.4,691.2,310.4,660.8C310.4,630.4,334.4,606.4,364.8,606.4C395.2,606.4,419.2,630.4,419.2,660.8C419.2,689.6,395.2,715.2,364.8,715.2C364.8,715.2,364.8,715.2,364.8,715.2M256,960C256,960,192,960,192,960C192,960,192,1024,192,1024C192,1024,256,1024,256,1024C256,1024,256,960,256,960C256,960,256,960,256,960M448,960C448,960,384,960,384,960C384,960,384,1024,384,1024C384,1024,448,1024,448,1024C448,1024,448,960,448,960C448,960,448,960,448,960M640,960C640,960,576,960,576,960C576,960,576,1024,576,1024C576,1024,640,1024,640,1024C640,1024,640,960,640,960C640,960,640,960,640,960M832,960C832,960,768,960,768,960C768,960,768,1024,768,1024C768,1024,832,1024,832,1024C832,1024,832,960,832,960C832,960,832,960,832,960M1024,960C1024,960,960,960,960,960C960,960,960,1024,960,1024C960,1024,1024,1024,1024,1024C1024,1024,1024,960,1024,960C1024,960,1024,960,1024,960M64,960C64,960,0,960,0,960C0,960,0,1024,0,1024C0,1024,64,1024,64,1024C64,1024,64,960,64,960C64,960,64,960,64,960M64,768C64,768,0,768,0,768C0,768,0,832,0,832C0,832,64,832,64,832C64,832,64,768,64,768C64,768,64,768,64,768M64,576C64,576,0,576,0,576C0,576,0,640,0,640C0,640,64,640,64,640C64,640,64,576,64,576C64,576,64,576,64,576M64,384C64,384,0,384,0,384C0,384,0,448,0,448C0,448,64,448,64,448C64,448,64,384,64,384C64,384,64,384,64,384M64,192C64,192,0,192,0,192C0,192,0,256,0,256C0,256,64,256,64,256C64,256,64,192,64,192C64,192,64,192,64,192M64,0C64,0,0,0,0,0C0,0,0,64,0,64C0,64,64,64,64,64C64,64,64,0,64,0C64,0,64,0,64,0" class="soliloquy-icon-proofing"/><glyph unicode="&#x0049;" d="M992,960.654C992,960.654,32,960.654,32,960.654C14.4,960.654,0,946.254,0,928.654C0,911.054,14.4,896.654,32,896.654C32,896.654,64,896.654,64,896.654C64,896.654,64,320.654,64,320.654C64,285.454,92.8,256.654,128,256.654C128,256.654,404.8,256.654,404.8,256.654C404.8,256.654,324.8,109.454,324.8,109.454C315.2,95.054,321.6,75.854,337.6,67.854C355.2,59.854,376,64.654,385.6,79.054C385.6,79.054,475.2,242.254,475.2,242.254C478.4,247.054,480,250.254,480,255.054C480,255.054,544,255.054,544,255.054C544,250.254,545.6,245.454,548.8,242.254C548.8,242.254,638.4,79.054,638.4,79.054C648,64.654,670.4,59.854,686.4,67.854C704,75.854,708.8,95.054,699.2,109.454C699.2,109.454,619.2,256.654,619.2,256.654C619.2,256.654,896,256.654,896,256.654C931.2,256.654,960,285.454,960,320.654C960,320.654,960,896.654,960,896.654C960,896.654,992,896.654,992,896.654C1009.6,896.654,1024,911.054,1024,928.654C1024,946.254,1009.6,960.654,992,960.654C992,960.654,992,960.654,992,960.654M896,832.654C896,832.654,896,832.654,896,832.654C896,832.654,896,352.654,896,352.654C896,335.054,881.6,320.654,864,320.654C864,320.654,160,320.654,160,320.654C142.4,320.654,128,335.054,128,352.654C128,352.654,128,864.654,128,864.654C128,864.654,128,864.654,128,864.654C128,864.654,128,896.654,128,896.654C128,896.654,160,896.654,160,896.654C160,896.654,160,896.654,160,896.654C160,896.654,864,896.654,864,896.654C864,896.654,864,896.654,864,896.654C864,896.654,896,896.654,896,896.654C896,896.654,896,832.654,896,832.654C896,832.654,896,832.654,896,832.654M816,770.254C800,779.854,780.8,773.454,772.8,759.054C772.8,759.054,574.4,578.254,574.4,578.254C574.4,578.254,417.6,690.254,417.6,690.254C409.6,701.454,393.6,707.854,379.2,704.654C376,704.654,374.4,703.054,371.2,703.054C371.2,703.054,369.6,703.054,369.6,703.054C369.6,703.054,368,703.054,368,701.454C366.4,699.854,363.2,698.254,361.6,696.654C360,695.054,358.4,693.454,356.8,691.854C356.8,691.854,356.8,691.854,355.2,690.254C355.2,690.254,195.2,498.254,195.2,498.254C185.6,482.254,192,463.054,206.4,453.454C220.8,443.854,241.6,450.254,249.6,464.654C249.6,464.654,390.4,632.654,390.4,632.654C390.4,632.654,539.2,527.054,539.2,527.054C542.4,522.254,547.2,519.054,553.6,515.854C555.2,514.254,555.2,511.054,558.4,509.454C574.4,501.454,593.6,506.254,601.6,520.654C601.6,520.654,825.6,725.454,825.6,725.454C836.8,743.054,832,762.254,816,770.254C816,770.254,816,770.254,816,770.254" class="soliloquy-icon-slideshow"/><glyph unicode="&#x004a;" d="M195.829,420.092C195.829,420.092,420.092,195.829,420.092,195.829C420.092,195.829,464.945,240.682,464.945,240.682C464.945,240.682,240.682,464.945,240.682,464.945C240.682,464.945,195.829,420.092,195.829,420.092C195.829,420.092,195.829,420.092,195.829,420.092M532.224,1024C532.224,1024,18.021,509.797,18.021,509.797C-6.007,485.769,-6.007,445.722,18.021,420.092C18.021,420.092,420.092,18.021,420.092,18.021C444.12,-6.007,484.167,-6.007,509.797,18.021C509.797,18.021,1024,532.224,1024,532.224C1024,532.224,1024,1024,1024,1024C1024,1024,532.224,1024,532.224,1024C532.224,1024,532.224,1024,532.224,1024M956.721,554.65C956.721,554.65,487.371,83.698,487.371,83.698C474.556,70.883,455.334,70.883,442.519,83.698C442.519,83.698,83.698,442.519,83.698,442.519C70.883,455.334,70.883,474.556,83.698,487.371C83.698,487.371,554.65,956.721,554.65,956.721C554.65,956.721,959.925,959.925,959.925,959.925C959.925,959.925,956.721,554.65,956.721,554.65C956.721,554.65,956.721,554.65,956.721,554.65M859.007,676.393C908.665,726.051,908.665,807.747,859.007,857.405C809.348,907.063,727.653,907.063,677.995,857.405C628.336,807.747,628.336,726.051,677.995,676.393C726.051,626.734,807.747,626.734,859.007,676.393C859.007,676.393,859.007,676.393,859.007,676.393M722.847,814.154C748.477,839.784,788.524,839.784,814.154,814.154C839.784,788.524,839.784,748.477,814.154,722.847C788.524,697.217,748.477,697.217,722.847,722.847C697.217,748.477,697.217,788.524,722.847,814.154C722.847,814.154,722.847,814.154,722.847,814.154" class="soliloquy-icon-tags"/><glyph unicode="&#x004b;" d="M960,1024C960,1024,64,1024,64,1024C28.8,1024,0,995.2,0,960C0,960,0,228.8,0,228.8C0,227.2,0,225.6,0,224C0,224,0,64,0,64C0,28.8,28.8,0,64,0C64,0,960,0,960,0C995.2,0,1024,28.8,1024,64C1024,64,1024,960,1024,960C1024,995.2,995.2,1024,960,1024C960,1024,960,1024,960,1024M96,64C78.4,64,64,78.4,64,96C64,96,64,204.8,64,204.8C64,204.8,345.6,432,345.6,432C345.6,432,664,64,664,64C664,64,96,64,96,64C96,64,96,64,96,64M960,96C960,78.4,945.6,64,928,64C928,64,755.2,64,755.2,64C755.2,64,516.8,339.2,516.8,339.2C516.8,339.2,796.8,568,796.8,568C796.8,568,958.4,392,958.4,392C958.4,392,958.4,392,960,392C960,392,960,96,960,96C960,96,960,96,960,96M960,491.2C960,491.2,830.4,632,830.4,632C822.4,638.4,811.2,640,800,640C790.4,640,780.8,638.4,774.4,632C774.4,632,475.2,387.2,475.2,387.2C475.2,387.2,376,502.4,376,502.4C368,510.4,358.4,513.6,348.8,512C345.6,512,344,510.4,340.8,510.4C339.2,510.4,339.2,510.4,337.6,508.8C331.2,507.2,324.8,507.2,320,502.4C320,502.4,64,292.8,64,292.8C64,292.8,64,928,64,928C64,945.6,78.4,960,96,960C96,960,928,960,928,960C945.6,960,960,945.6,960,928C960,928,960,491.2,960,491.2C960,491.2,960,491.2,960,491.2M256,896C185.6,896,128,838.4,128,768C128,697.6,185.6,640,256,640C326.4,640,384,697.6,384,768C384,838.4,326.4,896,256,896C256,896,256,896,256,896M256,704C220.8,704,192,732.8,192,768C192,803.2,220.8,832,256,832C291.2,832,320,803.2,320,768C320,732.8,291.2,704,256,704C256,704,256,704,256,704" class="soliloquy-icon-thumbnails"/><glyph unicode="&#x004c;" d="M992,768C992,768,768,619.2,768,619.2C768,619.2,768,704,768,704C768,774.4,710.4,832,640,832C640,832,128,832,128,832C57.6,832,0,774.4,0,704C0,704,0,320,0,320C0,249.6,57.6,192,128,192C128,192,640,192,640,192C710.4,192,768,249.6,768,320C768,320,768,404.8,768,404.8C768,404.8,992,256,992,256C1009.6,256,1024,270.4,1024,288C1024,288,1024,736,1024,736C1024,753.6,1009.6,768,992,768C992,768,992,768,992,768M704,320C704,284.8,675.2,256,640,256C640,256,128,256,128,256C92.8,256,64,284.8,64,320C64,320,64,704,64,704C64,739.2,92.8,768,128,768C128,768,640,768,640,768C675.2,768,704,739.2,704,704C704,704,704,320,704,320C704,320,704,320,704,320M960,353.6C960,353.6,768,481.6,768,481.6C768,481.6,768,540.8,768,540.8C768,540.8,960,668.8,960,668.8C960,668.8,960,353.6,960,353.6C960,353.6,960,353.6,960,353.6" class="soliloquy-icon-video"/><glyph unicode="&#x004d;" d="M800,640C800,640,800,736,800,736C800,894.4,670.4,1024,512,1024C353.6,1024,224,894.4,224,736C224,736,224,640,224,640C224,640,224,640,224,640C153.6,640,96,582.4,96,512C96,512,96,128,96,128C96,57.6,153.6,0,224,0C224,0,800,0,800,0C870.4,0,928,57.6,928,128C928,128,928,512,928,512C928,582.4,870.4,640,800,640C800,640,800,640,800,640M288,736C288,859.2,388.8,960,512,960C635.2,960,736,859.2,736,736C736,736,736,640,736,640C736,640,288,640,288,640C288,640,288,736,288,736C288,736,288,736,288,736M864,128C864,92.8,835.2,64,800,64C800,64,224,64,224,64C188.8,64,160,92.8,160,128C160,128,160,512,160,512C160,547.2,188.8,576,224,576C224,576,800,576,800,576C835.2,576,864,547.2,864,512C864,512,864,128,864,128C864,128,864,128,864,128M512,448C494.4,448,480,433.6,480,416C480,416,480,224,480,224C480,206.4,494.4,192,512,192C529.6,192,544,206.4,544,224C544,224,544,416,544,416C544,433.6,529.6,448,512,448C512,448,512,448,512,448" class="soliloquy-icon-watermark"/><glyph unicode="&#x004e;" d="M682.667,461.267C682.667,466.244,681.067,470.333,677.867,473.533C674.667,476.733,670.578,478.333,665.6,478.333C665.6,478.333,546.133,478.333,546.133,478.333C546.133,478.333,546.133,666.067,546.133,666.067C546.133,670.689,544.444,674.689,541.067,678.067C537.689,681.444,533.689,683.133,529.067,683.133C529.067,683.133,426.667,683.133,426.667,683.133C422.044,683.133,418.044,681.444,414.667,678.067C411.289,674.689,409.6,670.689,409.6,666.067C409.6,666.067,409.6,478.333,409.6,478.333C409.6,478.333,290.133,478.333,290.133,478.333C285.511,478.333,281.511,476.644,278.133,473.267C274.756,469.889,273.067,465.889,273.067,461.267C273.067,456.289,274.667,452.2,277.867,449C277.867,449,465.6,261.267,465.6,261.267C468.8,258.067,472.889,256.467,477.867,256.467C482.844,256.467,486.933,258.067,490.133,261.267C490.133,261.267,677.333,448.467,677.333,448.467C680.889,452.733,682.667,457,682.667,461.267C682.667,461.267,682.667,461.267,682.667,461.267M1024,341.8C1024,285.267,1004,237,964,197C924,157,875.733,137,819.2,137C819.2,137,238.933,137,238.933,137C173.156,137,116.889,160.378,70.133,207.133C23.378,253.889,0,310.156,0,375.933C0,422.156,12.444,464.822,37.333,503.933C62.222,543.044,95.644,572.378,137.6,591.933C136.889,602.6,136.533,610.244,136.533,614.867C136.533,690.244,163.2,754.6,216.533,807.933C269.867,861.267,334.222,887.933,409.6,887.933C465.067,887.933,515.822,872.467,561.867,841.533C607.911,810.6,641.422,769.533,662.4,718.333C687.644,740.378,717.156,751.4,750.933,751.4C788.622,751.4,820.8,738.067,847.467,711.4C874.133,684.733,887.467,652.556,887.467,614.867C887.467,587.844,880.178,563.311,865.6,541.267C911.822,530.244,949.778,506.156,979.467,469C1009.156,431.844,1024,389.444,1024,341.8C1024,341.8,1024,341.8,1024,341.8" class="soliloquy-icon-cloud-download"/><glyph unicode="&#x004f;" d="M0,512C0,555.333,8.5,596.75,25.5,636.25C42.5,675.75,65.25,709.75,93.75,738.25C122.25,766.75,156.25,789.5,195.75,806.5C235.25,823.5,276.667,832,320,832C320,832,704,832,704,832C747.333,832,788.75,823.5,828.25,806.5C867.75,789.5,901.75,766.75,930.25,738.25C958.75,709.75,981.5,675.75,998.5,636.25C1015.5,596.75,1024,555.333,1024,512C1024,468.667,1015.5,427.25,998.5,387.75C981.5,348.25,958.75,314.25,930.25,285.75C901.75,257.25,867.75,234.5,828.25,217.5C788.75,200.5,747.333,192,704,192C704,192,320,192,320,192C276.667,192,235.25,200.5,195.75,217.5C156.25,234.5,122.25,257.25,93.75,285.75C65.25,314.25,42.5,348.25,25.5,387.75C8.5,427.25,0,468.667,0,512C0,512,0,512,0,512M704,256C738.667,256,771.75,262.75,803.25,276.25C834.75,289.75,862,308,885,331C908,354,926.25,381.25,939.75,412.75C953.25,444.25,960,477.333,960,512C960,546.667,953.25,579.75,939.75,611.25C926.25,642.75,908,670,885,693C862,716,834.75,734.25,803.25,747.75C771.75,761.25,738.667,768,704,768C669.333,768,636.25,761.25,604.75,747.75C573.25,734.25,546,716,523,693C500,670,481.75,642.75,468.25,611.25C454.75,579.75,448,546.667,448,512C448,477.333,454.75,444.25,468.25,412.75C481.75,381.25,500,354,523,331C546,308,573.25,289.75,604.75,276.25C636.25,262.75,669.333,256,704,256C704,256,704,256,704,256" class="soliloquy-icon-toggle-on"/><glyph unicode="&#x0050;" d="M810.667,469.333C810.667,469.333,810.667,554.667,810.667,554.667C810.667,566.222,806.445,576.222,798,584.667C789.555,593.111,779.555,597.333,768,597.333C768,597.333,597.333,597.333,597.333,597.333C597.333,597.333,597.333,768,597.333,768C597.333,779.555,593.111,789.555,584.667,798C576.222,806.445,566.222,810.667,554.667,810.667C554.667,810.667,469.333,810.667,469.333,810.667C457.778,810.667,447.778,806.445,439.333,798C430.889,789.555,426.667,779.555,426.667,768C426.667,768,426.667,597.333,426.667,597.333C426.667,597.333,256,597.333,256,597.333C244.445,597.333,234.445,593.111,226,584.667C217.555,576.222,213.333,566.222,213.333,554.667C213.333,554.667,213.333,469.333,213.333,469.333C213.333,457.778,217.555,447.778,226,439.333C234.445,430.889,244.445,426.667,256,426.667C256,426.667,426.667,426.667,426.667,426.667C426.667,426.667,426.667,256,426.667,256C426.667,244.445,430.889,234.445,439.333,226C447.778,217.555,457.778,213.333,469.333,213.333C469.333,213.333,554.667,213.333,554.667,213.333C566.222,213.333,576.222,217.555,584.667,226C593.111,234.445,597.333,244.445,597.333,256C597.333,256,597.333,426.667,597.333,426.667C597.333,426.667,768,426.667,768,426.667C779.555,426.667,789.555,430.889,798,439.333C806.445,447.778,810.667,457.778,810.667,469.333C810.667,469.333,810.667,469.333,810.667,469.333M1024,512C1024,419.111,1001.111,333.445,955.333,255C909.555,176.555,847.445,114.445,769,68.667C690.555,22.889,604.889,0,512,0C419.111,0,333.445,22.889,255,68.667C176.555,114.445,114.445,176.555,68.667,255C22.889,333.445,0,419.111,0,512C0,604.889,22.889,690.555,68.667,769C114.445,847.445,176.555,909.555,255,955.333C333.445,1001.111,419.111,1024,512,1024C604.889,1024,690.555,1001.111,769,955.333C847.445,909.555,909.555,847.445,955.333,769C1001.111,690.555,1024,604.889,1024,512C1024,512,1024,512,1024,512" class="soliloquy-icon-plus-circle"/><glyph unicode="&#x0051;" d="M1024,957.296C1024,957.296,0,957.435,0,957.435C0,957.435,512,67,512,67C512,67,1024,957.296,1024,957.296" /><glyph unicode="&#x0052;" d="M292.553,274.581C292.553,274.581,292.553,164.85,292.553,164.85C292.553,149.617,287.209,136.657,276.553,126.001C265.896,115.344,252.936,110,237.703,110C237.703,110,54.85,110,54.85,110C39.617,110,26.657,115.344,16.001,126.001C5.344,136.657,0,149.617,0,164.85C0,164.85,0,274.581,0,274.581C0,289.814,5.344,302.774,16.001,313.43C26.657,324.087,39.617,329.431,54.85,329.431C54.85,329.431,237.703,329.431,237.703,329.431C252.936,329.431,265.896,324.087,276.553,313.43C287.209,302.774,292.553,289.814,292.553,274.581C292.553,274.581,292.553,274.581,292.553,274.581M292.553,567.166C292.553,567.166,292.553,457.435,292.553,457.435C292.553,442.202,287.209,429.242,276.553,418.586C265.896,407.929,252.936,402.585,237.703,402.585C237.703,402.585,54.85,402.585,54.85,402.585C39.617,402.585,26.657,407.929,16.001,418.586C5.344,429.242,0,442.202,0,457.435C0,457.435,0,567.166,0,567.166C0,582.399,5.344,595.359,16.001,606.016C26.657,616.672,39.617,622.016,54.85,622.016C54.85,622.016,237.703,622.016,237.703,622.016C252.936,622.016,265.896,616.672,276.553,606.016C287.209,595.359,292.553,582.399,292.553,567.166C292.553,567.166,292.553,567.166,292.553,567.166M1024,274.581C1024,274.581,1024,164.85,1024,164.85C1024,149.617,1018.656,136.657,1007.999,126.001C997.343,115.344,984.383,110,969.15,110C969.15,110,420.557,110,420.557,110C405.325,110,392.364,115.344,381.708,126.001C371.052,136.657,365.707,149.617,365.707,164.85C365.707,164.85,365.707,274.581,365.707,274.581C365.707,289.814,371.052,302.774,381.708,313.43C392.364,324.087,405.325,329.431,420.557,329.431C420.557,329.431,969.15,329.431,969.15,329.431C984.383,329.431,997.343,324.087,1007.999,313.43C1018.656,302.774,1024,289.814,1024,274.581C1024,274.581,1024,274.581,1024,274.581M292.553,859.751C292.553,859.751,292.553,750.02,292.553,750.02C292.553,734.788,287.209,721.827,276.553,711.171C265.896,700.514,252.936,695.17,237.703,695.17C237.703,695.17,54.85,695.17,54.85,695.17C39.617,695.17,26.657,700.514,16.001,711.171C5.344,721.827,0,734.788,0,750.02C0,750.02,0,859.751,0,859.751C0,874.984,5.344,887.944,16.001,898.601C26.657,909.257,39.617,914.601,54.85,914.601C54.85,914.601,237.703,914.601,237.703,914.601C252.936,914.601,265.896,909.257,276.553,898.601C287.209,887.944,292.553,874.984,292.553,859.751C292.553,859.751,292.553,859.751,292.553,859.751M1024,567.166C1024,567.166,1024,457.435,1024,457.435C1024,442.202,1018.656,429.242,1007.999,418.586C997.343,407.929,984.383,402.585,969.15,402.585C969.15,402.585,420.557,402.585,420.557,402.585C405.325,402.585,392.364,407.929,381.708,418.586C371.052,429.242,365.707,442.202,365.707,457.435C365.707,457.435,365.707,567.166,365.707,567.166C365.707,582.399,371.052,595.359,381.708,606.016C392.364,616.672,405.325,622.016,420.557,622.016C420.557,622.016,969.15,622.016,969.15,622.016C984.383,622.016,997.343,616.672,1007.999,606.016C1018.656,595.359,1024,582.399,1024,567.166C1024,567.166,1024,567.166,1024,567.166M1024,859.751C1024,859.751,1024,750.02,1024,750.02C1024,734.788,1018.656,721.827,1007.999,711.171C997.343,700.514,984.383,695.17,969.15,695.17C969.15,695.17,420.557,695.17,420.557,695.17C405.325,695.17,392.364,700.514,381.708,711.171C371.052,721.827,365.707,734.788,365.707,750.02C365.707,750.02,365.707,859.751,365.707,859.751C365.707,874.984,371.052,887.944,381.708,898.601C392.364,909.257,405.325,914.601,420.557,914.601C420.557,914.601,969.15,914.601,969.15,914.601C984.383,914.601,997.343,909.257,1007.999,898.601C1018.656,887.944,1024,874.984,1024,859.751C1024,859.751,1024,859.751,1024,859.751" class="soliloquy-icon-list"/><glyph unicode="&#x0053;" d="M292.553,274.581C292.553,274.581,292.553,164.85,292.553,164.85C292.553,149.617,287.209,136.657,276.553,126.001C265.896,115.344,252.936,110,237.703,110C237.703,110,54.85,110,54.85,110C39.617,110,26.657,115.344,16.001,126.001C5.344,136.657,0,149.617,0,164.85C0,164.85,0,274.581,0,274.581C0,289.814,5.344,302.774,16.001,313.43C26.657,324.087,39.617,329.431,54.85,329.431C54.85,329.431,237.703,329.431,237.703,329.431C252.936,329.431,265.896,324.087,276.553,313.43C287.209,302.774,292.553,289.814,292.553,274.581C292.553,274.581,292.553,274.581,292.553,274.581M292.553,567.166C292.553,567.166,292.553,457.435,292.553,457.435C292.553,442.202,287.209,429.242,276.553,418.586C265.896,407.929,252.936,402.585,237.703,402.585C237.703,402.585,54.85,402.585,54.85,402.585C39.617,402.585,26.657,407.929,16.001,418.586C5.344,429.242,0,442.202,0,457.435C0,457.435,0,567.166,0,567.166C0,582.399,5.344,595.359,16.001,606.016C26.657,616.672,39.617,622.016,54.85,622.016C54.85,622.016,237.703,622.016,237.703,622.016C252.936,622.016,265.896,616.672,276.553,606.016C287.209,595.359,292.553,582.399,292.553,567.166C292.553,567.166,292.553,567.166,292.553,567.166M658.261,274.581C658.261,274.581,658.261,164.85,658.261,164.85C658.261,149.617,652.916,136.657,642.26,126.001C631.604,115.344,618.643,110,603.411,110C603.411,110,420.557,110,420.557,110C405.325,110,392.364,115.344,381.708,126.001C371.052,136.657,365.707,149.617,365.707,164.85C365.707,164.85,365.707,274.581,365.707,274.581C365.707,289.814,371.052,302.774,381.708,313.43C392.364,324.087,405.325,329.431,420.557,329.431C420.557,329.431,603.411,329.431,603.411,329.431C618.643,329.431,631.604,324.087,642.26,313.43C652.916,302.774,658.261,289.814,658.261,274.581C658.261,274.581,658.261,274.581,658.261,274.581M292.553,859.751C292.553,859.751,292.553,750.02,292.553,750.02C292.553,734.788,287.209,721.827,276.553,711.171C265.896,700.514,252.936,695.17,237.703,695.17C237.703,695.17,54.85,695.17,54.85,695.17C39.617,695.17,26.657,700.514,16.001,711.171C5.344,721.827,0,734.788,0,750.02C0,750.02,0,859.751,0,859.751C0,874.984,5.344,887.944,16.001,898.601C26.657,909.257,39.617,914.601,54.85,914.601C54.85,914.601,237.703,914.601,237.703,914.601C252.936,914.601,265.896,909.257,276.553,898.601C287.209,887.944,292.553,874.984,292.553,859.751C292.553,859.751,292.553,859.751,292.553,859.751M658.261,567.166C658.261,567.166,658.261,457.435,658.261,457.435C658.261,442.202,652.916,429.242,642.26,418.586C631.604,407.929,618.643,402.585,603.411,402.585C603.411,402.585,420.557,402.585,420.557,402.585C405.325,402.585,392.364,407.929,381.708,418.586C371.052,429.242,365.707,442.202,365.707,457.435C365.707,457.435,365.707,567.166,365.707,567.166C365.707,582.399,371.052,595.359,381.708,606.016C392.364,616.672,405.325,622.016,420.557,622.016C420.557,622.016,603.411,622.016,603.411,622.016C618.643,622.016,631.604,616.672,642.26,606.016C652.916,595.359,658.261,582.399,658.261,567.166C658.261,567.166,658.261,567.166,658.261,567.166M1024,274.581C1024,274.581,1024,164.85,1024,164.85C1024,149.617,1018.656,136.657,1007.999,126.001C997.343,115.344,984.383,110,969.15,110C969.15,110,786.297,110,786.297,110C771.064,110,758.104,115.344,747.447,126.001C736.791,136.657,731.447,149.617,731.447,164.85C731.447,164.85,731.447,274.581,731.447,274.581C731.447,289.814,736.791,302.774,747.447,313.43C758.104,324.087,771.064,329.431,786.297,329.431C786.297,329.431,969.15,329.431,969.15,329.431C984.383,329.431,997.343,324.087,1007.999,313.43C1018.656,302.774,1024,289.814,1024,274.581C1024,274.581,1024,274.581,1024,274.581M658.261,859.751C658.261,859.751,658.261,750.02,658.261,750.02C658.261,734.788,652.916,721.827,642.26,711.171C631.604,700.514,618.643,695.17,603.411,695.17C603.411,695.17,420.557,695.17,420.557,695.17C405.325,695.17,392.364,700.514,381.708,711.171C371.052,721.827,365.707,734.788,365.707,750.02C365.707,750.02,365.707,859.751,365.707,859.751C365.707,874.984,371.052,887.944,381.708,898.601C392.364,909.257,405.325,914.601,420.557,914.601C420.557,914.601,603.411,914.601,603.411,914.601C618.643,914.601,631.604,909.257,642.26,898.601C652.916,887.944,658.261,874.984,658.261,859.751C658.261,859.751,658.261,859.751,658.261,859.751M1024,567.166C1024,567.166,1024,457.435,1024,457.435C1024,442.202,1018.656,429.242,1007.999,418.586C997.343,407.929,984.383,402.585,969.15,402.585C969.15,402.585,786.297,402.585,786.297,402.585C771.064,402.585,758.104,407.929,747.447,418.586C736.791,429.242,731.447,442.202,731.447,457.435C731.447,457.435,731.447,567.166,731.447,567.166C731.447,582.399,736.791,595.359,747.447,606.016C758.104,616.672,771.064,622.016,786.297,622.016C786.297,622.016,969.15,622.016,969.15,622.016C984.383,622.016,997.343,616.672,1007.999,606.016C1018.656,595.359,1024,582.399,1024,567.166C1024,567.166,1024,567.166,1024,567.166M1024,859.751C1024,859.751,1024,750.02,1024,750.02C1024,734.788,1018.656,721.827,1007.999,711.171C997.343,700.514,984.383,695.17,969.15,695.17C969.15,695.17,786.297,695.17,786.297,695.17C771.064,695.17,758.104,700.514,747.447,711.171C736.791,721.827,731.447,734.788,731.447,750.02C731.447,750.02,731.447,859.751,731.447,859.751C731.447,874.984,736.791,887.944,747.447,898.601C758.104,909.257,771.064,914.601,786.297,914.601C786.297,914.601,969.15,914.601,969.15,914.601C984.383,914.601,997.343,909.257,1007.999,898.601C1018.656,887.944,1024,874.984,1024,859.751C1024,859.751,1024,859.751,1024,859.751" class="soliloquy-icon-grid"/><glyph unicode="&#x0055;" d="M245.354,86.516C245.354,86.516,306.862,148.024,306.862,148.024C306.862,148.024,148.024,306.862,148.024,306.862C148.024,306.862,86.516,245.354,86.516,245.354C86.516,245.354,86.516,173.032,86.516,173.032C86.516,173.032,173.032,173.032,173.032,173.032C173.032,173.032,173.032,86.516,173.032,86.516C173.032,86.516,245.354,86.516,245.354,86.516C245.354,86.516,245.354,86.516,245.354,86.516M598.854,713.758C598.854,723.672,593.898,728.628,583.984,728.628C579.478,728.628,575.648,727.051,572.494,723.897C572.494,723.897,206.152,357.555,206.152,357.555C202.997,354.401,201.42,350.571,201.42,346.065C201.42,336.151,206.377,331.195,216.29,331.195C220.797,331.195,224.626,332.772,227.781,335.926C227.781,335.926,594.123,702.268,594.123,702.268C597.277,705.422,598.854,709.252,598.854,713.758C598.854,713.758,598.854,713.758,598.854,713.758M562.355,843.533C562.355,843.533,843.533,562.355,843.533,562.355C843.533,562.355,281.178,0,281.178,0C281.178,0,0,0,0,0C0,0,0,281.178,0,281.178C0,281.178,562.355,843.533,562.355,843.533M1024,778.646C1024,754.764,1015.664,734.486,998.991,717.814C998.991,717.814,886.791,605.613,886.791,605.613C886.791,605.613,605.613,886.791,605.613,886.791C605.613,886.791,717.814,998.316,717.814,998.316C734.036,1015.438,754.313,1024,778.646,1024C802.527,1024,823.03,1015.438,840.153,998.316C840.153,998.316,998.991,840.153,998.991,840.153C1015.664,822.58,1024,802.077,1024,778.646C1024,778.646,1024,778.646,1024,778.646" class="soliloquy-icon-pencil"/><glyph unicode="&#x0056;" d="M1024.5,200.473C1024.5,177.487,1016.455,157.95,1000.365,141.86C1000.365,141.86,883.14,24.635,883.14,24.635C867.05,8.545,847.513,0.5,824.527,0.5C801.541,0.5,782.004,8.545,765.914,24.635C765.914,24.635,512.5,278.049,512.5,278.049C512.5,278.049,259.086,24.635,259.086,24.635C242.996,8.545,223.459,0.5,200.473,0.5C177.487,0.5,157.95,8.545,141.86,24.635C141.86,24.635,24.635,141.86,24.635,141.86C8.545,157.95,0.5,177.487,0.5,200.473C0.5,223.459,8.545,242.996,24.635,259.086C24.635,259.086,278.049,512.5,278.049,512.5C278.049,512.5,24.635,765.914,24.635,765.914C8.545,782.004,0.5,801.541,0.5,824.527C0.5,847.513,8.545,867.05,24.635,883.14C24.635,883.14,141.86,1000.365,141.86,1000.365C157.95,1016.455,177.487,1024.5,200.473,1024.5C223.459,1024.5,242.996,1016.455,259.086,1000.365C259.086,1000.365,512.5,746.951,512.5,746.951C512.5,746.951,765.914,1000.365,765.914,1000.365C782.004,1016.455,801.541,1024.5,824.527,1024.5C847.513,1024.5,867.05,1016.455,883.14,1000.365C883.14,1000.365,1000.365,883.14,1000.365,883.14C1016.455,867.05,1024.5,847.513,1024.5,824.527C1024.5,801.541,1016.455,782.004,1000.365,765.914C1000.365,765.914,746.951,512.5,746.951,512.5C746.951,512.5,1000.365,259.086,1000.365,259.086C1016.455,242.996,1024.5,223.459,1024.5,200.473C1024.5,200.473,1024.5,200.473,1024.5,200.473" class="soliloquy-icon-close"/><glyph unicode="&#x0057;" d="M1024,751.577C1024,733.959,1017.834,718.985,1005.502,706.653C1005.502,706.653,527.195,228.346,527.195,228.346C527.195,228.346,437.347,138.498,437.347,138.498C425.015,126.166,410.041,120,392.423,120C374.806,120,359.832,126.166,347.499,138.498C347.499,138.498,257.652,228.346,257.652,228.346C257.652,228.346,18.498,467.499,18.498,467.499C6.166,479.832,0,494.806,0,512.423C0,530.041,6.166,545.015,18.498,557.347C18.498,557.347,108.346,647.195,108.346,647.195C120.678,659.527,135.652,665.693,153.27,665.693C170.887,665.693,185.861,659.527,198.194,647.195C198.194,647.195,392.423,452.305,392.423,452.305C392.423,452.305,825.806,886.348,825.806,886.348C838.139,898.681,853.113,904.846,870.73,904.846C888.348,904.846,903.322,898.681,915.654,886.348C915.654,886.348,1005.502,796.501,1005.502,796.501C1017.834,784.168,1024,769.194,1024,751.577C1024,751.577,1024,751.577,1024,751.577" class="soliloquy-icon-check"/><glyph unicode="&#x0058;" d="M927.988,0C927.988,0,96.006,0,96.006,0C60.675,0,32,28.659,32,63.99C32,63.99,32,703.954,32,703.954C32,703.954,32,767.96,32,767.96C32,767.96,32,895.972,32,895.972C32,931.319,60.659,959.978,96.006,959.978C96.006,959.978,288.008,959.978,288.008,959.978C288.008,959.978,288.008,1024,288.008,1024C288.008,1024,352.014,1024,352.014,1024C352.014,1024,352.014,959.978,352.014,959.978C352.014,959.978,672.028,959.978,672.028,959.978C672.028,959.978,672.028,1024,672.028,1024C672.028,1024,736.018,1024,736.018,1024C736.018,1024,736.018,959.978,736.018,959.978C736.018,959.978,960.023,959.978,960.023,959.978C995.37,959.978,992.026,931.319,992.026,895.972C992.026,895.972,992.026,767.944,992.026,767.944C992.026,767.944,992.026,703.938,992.026,703.938C992.026,703.938,992.026,63.974,992.026,63.974C992.01,28.659,963.351,0,927.988,0C927.988,0,927.988,0,927.988,0M927.988,863.953C927.988,881.699,913.651,895.972,895.985,895.972C895.985,895.972,736.002,895.972,736.002,895.972C736.002,895.972,736.002,831.95,736.002,831.95C736.002,831.95,672.012,831.95,672.012,831.95C672.012,831.95,672.012,895.972,672.012,895.972C672.012,895.972,351.998,895.972,351.998,895.972C351.998,895.972,351.998,831.95,351.998,831.95C351.998,831.95,287.992,831.95,287.992,831.95C287.992,831.95,287.992,895.972,287.992,895.972C287.992,895.972,128.025,895.972,128.025,895.972C110.343,895.972,96.006,881.699,96.006,863.953C96.006,863.953,96.006,767.944,96.006,767.944C96.006,767.944,928.004,767.944,928.004,767.944C928.004,767.944,928.004,863.953,928.004,863.953C928.004,863.953,927.988,863.953,927.988,863.953M927.988,703.954C927.988,703.954,96.006,703.954,96.006,703.954C96.006,703.954,96.006,96.025,96.006,96.025C96.006,78.311,110.343,63.99,128.025,63.99C128.025,63.99,896.001,63.99,896.001,63.99C913.667,63.99,928.004,78.311,928.004,96.025C928.004,96.025,928.004,703.954,928.004,703.954C928.004,703.954,927.988,703.954,927.988,703.954M672.012,320.014C672.012,320.014,863.998,320.014,863.998,320.014C863.998,320.014,863.998,127.996,863.998,127.996C863.998,127.996,672.012,127.996,672.012,127.996C672.012,127.996,672.012,320.014,672.012,320.014C672.012,320.014,672.012,320.014,672.012,320.014M736.002,191.97C736.002,191.97,799.992,191.97,799.992,191.97C799.992,191.97,799.992,256.04,799.992,256.04C799.992,256.04,736.002,256.04,736.002,256.04C736.002,256.04,736.002,191.97,736.002,191.97C736.002,191.97,736.002,191.97,736.002,191.97M672.012,575.958C672.012,575.958,863.998,575.958,863.998,575.958C863.998,575.958,863.998,384.02,863.998,384.02C863.998,384.02,672.012,384.02,672.012,384.02C672.012,384.02,672.012,575.958,672.012,575.958C672.012,575.958,672.012,575.958,672.012,575.958M736.002,447.994C736.002,447.994,799.992,447.994,799.992,447.994C799.992,447.994,799.992,512,799.992,512C799.992,512,736.002,512,736.002,512C736.002,512,736.002,447.994,736.002,447.994C736.002,447.994,736.002,447.994,736.002,447.994M415.988,320.014C415.988,320.014,607.99,320.014,607.99,320.014C607.99,320.014,607.99,127.996,607.99,127.996C607.99,127.996,415.988,127.996,415.988,127.996C415.988,127.996,415.988,320.014,415.988,320.014C415.988,320.014,415.988,320.014,415.988,320.014M479.994,191.97C479.994,191.97,544,191.97,544,191.97C544,191.97,544,256.04,544,256.04C544,256.04,479.994,256.04,479.994,256.04C479.994,256.04,479.994,191.97,479.994,191.97C479.994,191.97,479.994,191.97,479.994,191.97M415.988,575.958C415.988,575.958,607.99,575.958,607.99,575.958C607.99,575.958,607.99,384.02,607.99,384.02C607.99,384.02,415.988,384.02,415.988,384.02C415.988,384.02,415.988,575.958,415.988,575.958C415.988,575.958,415.988,575.958,415.988,575.958M479.994,447.994C479.994,447.994,544,447.994,544,447.994C544,447.994,544,512,544,512C544,512,479.994,512,479.994,512C479.994,512,479.994,447.994,479.994,447.994C479.994,447.994,479.994,447.994,479.994,447.994M160.028,320.014C160.028,320.014,352.014,320.014,352.014,320.014C352.014,320.014,352.014,127.996,352.014,127.996C352.014,127.996,160.028,127.996,160.028,127.996C160.028,127.996,160.028,320.014,160.028,320.014C160.028,320.014,160.028,320.014,160.028,320.014M224.002,191.97C224.002,191.97,288.008,191.97,288.008,191.97C288.008,191.97,288.008,256.04,288.008,256.04C288.008,256.04,224.002,256.04,224.002,256.04C224.002,256.04,224.002,191.97,224.002,191.97C224.002,191.97,224.002,191.97,224.002,191.97M160.028,575.958C160.028,575.958,352.014,575.958,352.014,575.958C352.014,575.958,352.014,384.02,352.014,384.02C352.014,384.02,160.028,384.02,160.028,384.02C160.028,384.02,160.028,575.958,160.028,575.958C160.028,575.958,160.028,575.958,160.028,575.958M224.002,447.994C224.002,447.994,288.008,447.994,288.008,447.994C288.008,447.994,288.008,512,288.008,512C288.008,512,224.002,512,224.002,512C224.002,512,224.002,447.994,224.002,447.994C224.002,447.994,224.002,447.994,224.002,447.994" class="soliloquy-icon-schedule"/><glyph unicode="&#x0059;" d="M827.008,152.5C827.008,152.5,197.088,152.5,197.088,152.5C172.192,152.5,152.096,172.772,152.096,197.492C152.096,197.492,152.096,309.412,152.096,309.412C151.952,310.724,151.952,311.94,152.096,313.316C152.096,313.316,152.096,827.412,152.096,827.412C152.096,852.228,172.176,872.388,197.088,872.388C197.088,872.388,826.992,872.388,826.992,872.388C851.76,872.388,871.984,852.228,871.984,827.412C871.984,827.412,871.984,197.492,871.984,197.492C872,172.772,851.76,152.5,827.008,152.5C827.008,152.5,827.008,152.5,827.008,152.5M197.088,219.956C197.088,207.62,207.152,197.492,219.6,197.492C219.6,197.492,618.592,197.492,618.592,197.492C618.592,197.492,394.48,456.708,394.48,456.708C394.48,456.708,197.088,296.02,197.088,296.02C197.088,296.02,197.088,219.956,197.088,219.956C197.088,219.956,197.088,219.956,197.088,219.956M827.008,804.9C827.008,817.316,816.912,827.396,804.528,827.396C804.528,827.396,219.616,827.396,219.616,827.396C207.168,827.396,197.104,817.316,197.104,804.9C197.104,804.9,197.104,358.804,197.104,358.804C197.104,358.804,377.872,505.94,377.872,505.94C381.232,508.98,385.728,509.556,389.984,510.516C390.656,510.852,391.312,511.012,391.984,511.268C393.84,511.604,395.312,512.42,397.184,512.356C403.968,513.06,410.944,511.012,416.096,505.444C416.096,505.444,486.128,424.532,486.128,424.532C486.128,424.532,696.48,596.5,696.48,596.5C701.584,601.124,708.224,602.644,714.944,602.084C722.288,602.644,729.792,601.172,735.456,596.66C735.456,596.66,826.992,497.62,826.992,497.62C826.992,497.62,826.992,804.9,826.992,804.9C826.992,804.9,827.008,804.9,827.008,804.9M827.008,428.628C826.8,428.804,826.352,428.74,826.288,428.9C826.288,428.9,712.368,552.084,712.368,552.084C712.368,552.084,515.2,390.964,515.2,390.964C515.2,390.964,682.528,197.492,682.528,197.492C682.528,197.492,804.528,197.492,804.528,197.492C816.912,197.492,827.008,207.62,827.008,219.956C827.008,219.956,827.008,428.628,827.008,428.628C827.008,428.628,827.008,428.628,827.008,428.628M332.08,602.436C282.352,602.436,242.08,642.756,242.08,692.42C242.08,742.18,282.352,782.436,332.08,782.436C381.744,782.436,422.032,742.18,422.032,692.42C422.032,642.756,381.744,602.436,332.08,602.436C332.08,602.436,332.08,602.436,332.08,602.436M332.08,737.332C307.216,737.332,287.088,717.236,287.088,692.34C287.088,667.508,307.216,647.348,332.08,647.348C356.912,647.348,377.056,667.524,377.056,692.34C377.056,717.236,356.928,737.332,332.08,737.332C332.08,737.332,332.08,737.332,332.08,737.332M976,512.42C976.08,511.172,975.6,509.924,974.688,508.948C974.416,508.74,974.08,508.804,973.872,508.628C973.872,508.628,914.848,455.316,914.848,455.316C913.056,453.492,910.016,453.492,908.224,455.316C906.336,457.124,906.336,460.068,908.224,461.876C908.224,461.876,964.16,512.436,964.16,512.436C964.16,512.436,908.224,562.996,908.224,562.996C906.32,564.804,906.32,567.748,908.224,569.572C910.016,571.38,913.056,571.38,914.848,569.572C914.848,569.572,973.856,516.26,973.856,516.26C974.064,516.084,974.416,516.148,974.688,515.924C975.632,514.964,976.08,513.684,976,512.42C976,512.42,976,512.42,976,512.42M1024,232.436C1024,214.772,1009.664,200.436,992,200.436C992,200.436,864,200.436,864,200.436C846.336,200.436,832,214.772,832,232.436C832,232.436,832,792.436,832,792.436C832,810.1,846.336,824.436,864,824.436C864,824.436,992,824.436,992,824.436C1009.664,824.436,1024,810.1,1024,792.436C1024,792.436,1024,232.436,1024,232.436C1024,232.436,1024,232.436,1024,232.436M192,232.436C192,214.772,177.664,200.436,160,200.436C160,200.436,32,200.436,32,200.436C14.336,200.436,0,214.772,0,232.436C0,232.436,0,792.436,0,792.436C0,810.1,14.336,824.436,32,824.436C32,824.436,160,824.436,160,824.436C177.664,824.436,192,810.1,192,792.436C192,792.436,192,232.436,192,232.436C192,232.436,192,232.436,192,232.436" class="soliloquy-icon-carousel"/></font></defs></svg>
 
trunk/assets/fonts/soliloquy.ttf DELETED
Binary file
trunk/assets/fonts/soliloquy.woff DELETED
Binary file
trunk/assets/images/fc.png DELETED
Binary file
trunk/assets/images/html.png DELETED
Binary file
trunk/assets/images/instagram.png DELETED
Binary file
trunk/assets/images/logo-color.png DELETED
Binary file
trunk/assets/images/soliloquy-logo.png DELETED
Binary file
trunk/assets/images/video.png DELETED
Binary file
trunk/assets/images/vimeo.png DELETED
Binary file
trunk/assets/images/wistia.png DELETED
Binary file
trunk/assets/images/woo.png DELETED
Binary file
trunk/assets/images/youtube.png DELETED
Binary file
trunk/assets/js/addons.js DELETED
@@ -1,432 +0,0 @@
1
- /* global soliloquy_addons, ajaxurl */
2
- /* exported e */
3
- /*jshint unused:false*/
4
- /* ==========================================================
5
- * settings.js
6
- * https://soliloquywp.com/
7
- * ==========================================================
8
- * Copyright 2014 Thomas Griffin.
9
- *
10
- * Licensed under the GPL License, Version 2.0 or later (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * http://www.gnu.org/licenses/gpl-2.0.html
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- * ========================================================== */
22
- // jshint ignore:line
23
- ;(function($, window, document, soliloquy_addons) {
24
-
25
- //DOM Ready
26
- $(function() {
27
-
28
- //Create the Select boxes
29
- $('.soliloquy-chosen').each(function() {
30
-
31
- $(this).chosen({
32
- disable_search: true
33
- });
34
-
35
- });
36
-
37
- //Sort Filter for addons
38
- $('#soliloquy-addon-filter').on('change', function() {
39
-
40
- var $select = $(this),
41
- $value = $select.val(),
42
- $container = $('#soliloquy-addons-area'),
43
- container_data = $container.data('soliloquy-filter'),
44
- $addon = $('#soliloquy-addons-area .soliloquy-addon');
45
-
46
- //Make sure the addons are visible.
47
- $addon.show();
48
-
49
- switch ($value) {
50
-
51
- case 'asc':
52
-
53
- $addon.sort(function(a, b) {
54
-
55
- return $(a).data('addon-title').localeCompare($(b).data('addon-title'));
56
-
57
- }).each(function(_, addon) {
58
-
59
- $(addon).removeClass('last');
60
-
61
- $container.append(addon).hide().fadeIn(100);
62
-
63
- });
64
-
65
- $("#soliloquy-addons-area .soliloquy-addon:nth-child(3n)").addClass('last');
66
-
67
- break;
68
- case 'desc':
69
-
70
- $addon.sort(function(a, b) {
71
-
72
- return $(b).data('addon-title').localeCompare($(a).data('addon-title'));
73
-
74
- }).each(function(_, addon) {
75
-
76
- $(addon).removeClass('last');
77
- $container.append(addon).hide().fadeIn(100);
78
-
79
- });
80
-
81
- $("#soliloquy-addons-area .soliloquy-addon:nth-child(3n)").addClass('last');
82
-
83
- break;
84
- case 'active':
85
-
86
- $addon.hide().filter('[data-addon-status="active"]').show();
87
-
88
- $addon.removeClass('last');
89
-
90
- $('#soliloquy-addons-area .soliloquy-addon:visible').each(function(i) {
91
-
92
- if ((i + 1) % 3 === 0) {
93
-
94
- $(this).addClass('last');
95
- }
96
-
97
- });
98
-
99
- break;
100
- case 'inactive':
101
-
102
- $addon.hide().filter('[data-addon-status="inactive"]').show();
103
- $addon.removeClass('last');
104
-
105
- $('#soliloquy-addons-area .soliloquy-addon:visible').each(function(i) {
106
-
107
- if ((i + 1) % 3 === 0) {
108
- $(this).addClass('last');
109
- }
110
- });
111
-
112
- break;
113
- case 'installed':
114
- var i = 0;
115
- $addon.hide().filter('[data-addon-status="not_installed"]').show();
116
- $addon.removeClass('last');
117
- $('#soliloquy-addons-area .soliloquy-addon:visible').each(function(i) {
118
- if ((i + 1) % 3 === 0) {
119
- $(this).addClass('last');
120
- }
121
- });
122
- break;
123
-
124
- }
125
-
126
- });
127
-
128
- // Re-enable install button if user clicks on it, needs creds but tries to install another addon instead.
129
- $('#soliloquy-addons-area').on('click.refreshInstallAddon', '.soliloquy-addon-action-button', function(e) {
130
-
131
- e.preventDefault();
132
-
133
- var $el = $(this),
134
- buttons = $('#soliloquy-addons-area').find('.soliloquy-addon-action-button');
135
-
136
- $.each(buttons, function(i, element) {
137
-
138
- if ( $el === element ) {
139
-
140
- return true;
141
-
142
- }
143
-
144
- soliloquyAddonRefresh(element);
145
-
146
- });
147
- });
148
-
149
- // Process Addon activations for those currently installed but not yet active.
150
- $('#soliloquy-addons-area').on('click.activateAddon', '.soliloquy-activate-addon', function(e) {
151
-
152
- e.preventDefault();
153
-
154
- var $button = $(this),
155
- plugin = $button.attr('rel'),
156
- $el = $button.parent().parent(),
157
- $message = $button.parent().parent().find('.addon-status').children('span');
158
-
159
- // Remove any leftover error messages, output an icon and get the plugin basename that needs to be activated.
160
- $('.soliloquy-addon-error').remove();
161
-
162
- $button.text(soliloquy_addons.activating);
163
- $button.next().css({
164
- 'display': 'inline-block',
165
- 'margin-top': '0px'
166
- });
167
-
168
- // Process the Ajax to perform the activation.
169
- var opts = {
170
- url: ajaxurl,
171
- type: 'post',
172
- async: true,
173
- cache: false,
174
- dataType: 'json',
175
- data: {
176
- action: 'soliloquy_activate_addon',
177
- nonce: soliloquy_addons.activate_nonce,
178
- plugin: plugin
179
- },
180
- success: function(response) {
181
- // If there is a WP Error instance, output it here and quit the script.
182
- if (response && true !== response) {
183
- $el.slideDown('normal', function() {
184
- $(this)
185
- .after('<div class="soliloquy-addon-error"><strong>' + response.error + '</strong></div>');
186
- $button.next()
187
- .hide();
188
- $('.soliloquy-addon-error')
189
- .delay(3000)
190
- .slideUp();
191
- });
192
- return;
193
- }
194
- // The Ajax request was successful, so let's update the output.
195
- $button.text(soliloquy_addons.deactivate).removeClass('soliloquy-activate-addon').addClass('soliloquy-deactivate-addon');
196
- $message.text(soliloquy_addons.active);
197
- $el.removeClass('soliloquy-addon-inactive').addClass('soliloquy-addon-active');
198
- $button.next().hide();
199
- },
200
- error: function(xhr, textStatus, e) {
201
- $button.next()
202
- .hide();
203
- return;
204
- }
205
- };
206
- $.ajax(opts);
207
- });
208
-
209
- // Process Addon deactivations for those currently active.
210
- $('#soliloquy-addons-area').on('click.deactivateAddon', '.soliloquy-deactivate-addon', function(e) {
211
-
212
- e.preventDefault();
213
-
214
- var $button = $(this),
215
- plugin = $button.attr('rel'),
216
- $el = $button.parent().parent(),
217
- $message = $button.parent().parent().find('.addon-status').children('span');
218
-
219
- // Remove any leftover error messages, output an icon and get the plugin basename that needs to be activated.
220
- $('.soliloquy-addon-error').remove();
221
-
222
- $button.text(soliloquy_addons.deactivating);
223
- $button.next().css({
224
- 'display': 'inline-block',
225
- 'margin-top': '0px'
226
- });
227
-
228
- // Process the Ajax to perform the activation.
229
- var opts = {
230
- url: ajaxurl,
231
- type: 'post',
232
- async: true,
233
- cache: false,
234
- dataType: 'json',
235
- data: {
236
- action: 'soliloquy_deactivate_addon',
237
- nonce: soliloquy_addons.deactivate_nonce,
238
- plugin: plugin
239
- },
240
- success: function(response) {
241
- // If there is a WP Error instance, output it here and quit the script.
242
- if (response && true !== response) {
243
-
244
- $el.slideDown('normal', function() {
245
- $(this).after('<div class="soliloquy-addon-error"><strong>' + response.error + '</strong></div>');
246
- $button.next().hide();
247
- $('.soliloquy-addon-error').delay(3000).slideUp();
248
- });
249
-
250
- return;
251
- }
252
-
253
- // The Ajax request was successful, so let's update the output.
254
- $button.text(soliloquy_addons.activate).removeClass('soliloquy-deactivate-addon').addClass('soliloquy-activate-addon');
255
- $message.text(soliloquy_addons.inactive);
256
- $el.removeClass('soliloquy-addon-active').addClass('soliloquy-addon-inactive');
257
- $button.next().hide();
258
- },
259
- error: function(xhr, textStatus, e) {
260
- $button.next().hide();
261
- return;
262
- }
263
- };
264
- $.ajax(opts);
265
- });
266
-
267
- // Process Addon installations.
268
- $('#soliloquy-addons-area').on('click.installAddon', '.soliloquy-install-addon', function(e) {
269
-
270
- e.preventDefault();
271
-
272
- var $button = $(this),
273
- plugin = $button.attr('rel'),
274
- $el = $button.parent().parent(),
275
- $message = $button.parent().parent().find('.addon-status').children('span');
276
-
277
- // Remove any leftover error messages, output an icon and get the plugin basename that needs to be activated.
278
- $('.soliloquy-addon-error').remove();
279
-
280
- $button.text(soliloquy_addons.installing);
281
- $button.next().css({
282
- 'display': 'inline-block',
283
- 'margin-top': '0px'
284
- });
285
-
286
- // Process the Ajax to perform the activation.
287
- var opts = {
288
- url: ajaxurl,
289
- type: 'post',
290
- async: true,
291
- cache: false,
292
- dataType: 'json',
293
- data: {
294
- action: 'soliloquy_install_addon',
295
- nonce: soliloquy_addons.install_nonce,
296
- plugin: plugin
297
- },
298
- success: function(response) {
299
- // If there is a WP Error instance, output it here and quit the script.
300
- if (response.error) {
301
- $el.slideDown('normal', function() {
302
- $button.parent().parent().after('<div class="soliloquy-addon-error"><strong>' + response.error + '</strong></div>');
303
- $button.text(soliloquy_addons.install);
304
- $button.next().hide();
305
- $('.soliloquy-addon-error').delay(4000)
306
- .slideUp();
307
- });
308
- return;
309
- }
310
-
311
- // If we need more credentials, output the form sent back to us.
312
- if (response.form) {
313
- // Display the form to gather the users credentials.
314
- $el.slideDown('normal', function() {
315
- $(this).after('<div class="soliloquy-addon-error">' + response.form + '</div>');
316
- $button.next().hide();
317
- });
318
-
319
- // Add a disabled attribute the install button if the creds are needed.
320
- $button.attr('disabled', true);
321
-
322
- $('#soliloquy-addons-area').on('click.installCredsAddon', '#upgrade', function(e) {
323
- // Prevent the default action, let the user know we are attempting to install again and go with it.
324
- e.preventDefault();
325
- $button.next().hide();
326
- $(this)
327
- .val(soliloquy_addons.installing);
328
- $(this)
329
- .next()
330
- .css({
331
- 'display': 'inline-block',
332
- 'margin-top': '0px'
333
- });
334
-
335
- // Now let's make another Ajax request once the user has submitted their credentials.
336
- var hostname = $(this).parent().parent().find('#hostname').val(),
337
- username = $(this).parent().parent().find('#username').val(),
338
- password = $(this).parent().parent().find('#password').val(),
339
- proceed = $(this),
340
- connect = $(this).parent().parent().parent().parent();
341
- var cred_opts = {
342
- url: ajaxurl,
343
- type: 'post',
344
- async: true,
345
- cache: false,
346
- dataType: 'json',
347
- data: {
348
- action: 'soliloquy_install_addon',
349
- nonce: soliloquy_addons.install_nonce,
350
- plugin: plugin,
351
- hostname: hostname,
352
- username: username,
353
- password: password
354
- },
355
- success: function(response) {
356
- // If there is a WP Error instance, output it here and quit the script.
357
- if (response.error) {
358
- $el.slideDown('normal', function() {
359
- $button.parent().parent().after('<div class="soliloquy-addon-error"><strong>' + response.error + '</strong></div>');
360
- $button.text(soliloquy_addons.install);
361
- $button.next().hide();
362
- $('.soliloquy-addon-error').delay(4000).slideUp();
363
- });
364
-
365
- return;
366
- }
367
-
368
- if (response.form) {
369
- $button.next().hide();
370
- $('.soliloquy-inline-error').remove();
371
- $(proceed)
372
- .val(soliloquy_addons.proceed);
373
- $(proceed)
374
- .after('<span class="soliloquy-inline-error">' + soliloquy_addons.connect_error + '</span>');
375
- return;
376
- }
377
-
378
- // The Ajax request was successful, so let's update the output.
379
- $(connect)
380
- .remove();
381
- $button.show();
382
- $button.text(soliloquy_addons.activate).removeClass('soliloquy-install-addon').addClass('soliloquy-activate-addon');
383
- $button.attr('rel', response.plugin);
384
- $button.removeAttr('disabled');
385
- $message.text(soliloquy_addons.inactive);
386
- $el.removeClass('soliloquy-addon-not-installed').addClass('soliloquy-addon-inactive');
387
- $button.next().hide();
388
- },
389
- error: function(xhr, textStatus, e) {
390
- $button.next().hide();
391
- return;
392
- }
393
- };
394
- $.ajax(cred_opts);
395
- });
396
-
397
- // No need to move further if we need to enter our creds.
398
- return;
399
- }
400
-
401
- // The Ajax request was successful, so let's update the output.
402
- $button.text(soliloquy_addons.activate).removeClass('soliloquy-install-addon').addClass('soliloquy-activate-addon');
403
- $button.attr('rel', response.plugin);
404
- $message.text(soliloquy_addons.inactive);
405
- $el.removeClass('soliloquy-addon-not-installed').addClass('soliloquy-addon-inactive');
406
- $button.next().hide();
407
- },
408
-
409
- error: function(xhr, textStatus, e) {
410
- $button.next()
411
- .hide();
412
- return;
413
- }
414
- };
415
- $.ajax(opts);
416
- });
417
-
418
- // Function to clear any disabled buttons and extra text if the user needs to add creds but instead tries to install a different addon.
419
- function soliloquyAddonRefresh(element) {
420
- if ($(element).attr('disabled')){
421
- $(element)
422
- .removeAttr('disabled');
423
- }
424
- if ( $(element).parent().parent().hasClass('soliloquy-addon-not-installed') ){
425
-
426
- $(element).text(soliloquy_addons.install);
427
-
428
- }
429
- }
430
- });
431
-
432
- })(jQuery, window, document, soliloquy_addons);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/codemirror.js DELETED
@@ -1,12 +0,0 @@
1
- // CodeMirror base.
2
- window.CodeMirror=(function(){var bI=/gecko\/\d/i.test(navigator.userAgent);var cf=/MSIE \d/.test(navigator.userAgent);var bF=cf&&(document.documentMode==null||document.documentMode<8);var bE=cf&&(document.documentMode==null||document.documentMode<9);var dC=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent);var cA=cf||dC;var b8=/WebKit\//.test(navigator.userAgent);var cD=b8&&/Qt\/\d+\.\d+/.test(navigator.userAgent);var cg=/Chrome\//.test(navigator.userAgent);var d1=/Opera\//.test(navigator.userAgent);var ag=/Apple Computer/.test(navigator.vendor);var aH=/KHTML\//.test(navigator.userAgent);var bT=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent);var cc=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);var dY=/PhantomJS/.test(navigator.userAgent);var dy=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var cV=dy||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);var bq=dy||/Mac/.test(navigator.platform);var ao=/win/i.test(navigator.platform);var c8=d1&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);if(c8){c8=Number(c8[1])}if(c8&&c8>=15){d1=false;b8=true}var be=bq&&(cD||d1&&(c8==null||c8<12.11));var bX=bI||(cf&&!bE);var eq=false,aD=false;function B(ew,ex){if(!(this instanceof B)){return new B(ew,ex)}this.options=ex=ex||{};for(var ey in dA){if(!ex.hasOwnProperty(ey)&&dA.hasOwnProperty(ey)){ex[ey]=dA[ey]}}by(ex);var eC=typeof ex.value=="string"?0:ex.value.first;var eB=this.display=f(ew,eC);eB.wrapper.CodeMirror=this;cR(this);if(ex.autofocus&&!cV){db(this)}this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,focused:false,suppressEdits:false,pasteIncoming:false,cutIncoming:false,draggingText:false,highlight:new ev()};b2(this);if(ex.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}var eA=ex.value;if(typeof eA=="string"){eA=new aa(ex.value,ex.mode)}b9(this,cQ)(this,eA);if(cf){setTimeout(bO(dU,this,true),20)}ee(this);var eD;try{eD=(document.activeElement==eB.input)}catch(ez){}if(eD||(ex.autofocus&&!cV)){setTimeout(bO(bS,this),20)}else{au(this)}b9(this,function(){for(var eF in aK){if(aK.propertyIsEnumerable(eF)){aK[eF](this,ex[eF],bw)}}for(var eE=0;eE<aE.length;++eE){aE[eE](this)}})()}function f(ew,ey){var ez={};var ex=ez.input=ej("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;");if(b8){ex.style.width="1000px"}else{ex.setAttribute("wrap","off")}if(dy){ex.style.border="1px solid black"}ex.setAttribute("autocorrect","off");ex.setAttribute("autocapitalize","off");ex.setAttribute("spellcheck","false");ez.inputDiv=ej("div",[ex],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");ez.scrollbarH=ej("div",[ej("div",null,null,"height: 1px")],"CodeMirror-hscrollbar");ez.scrollbarV=ej("div",[ej("div",null,null,"width: 1px")],"CodeMirror-vscrollbar");ez.scrollbarFiller=ej("div",null,"CodeMirror-scrollbar-filler");ez.gutterFiller=ej("div",null,"CodeMirror-gutter-filler");ez.lineDiv=ej("div",null,"CodeMirror-code");ez.selectionDiv=ej("div",null,null,"position: relative; z-index: 1");ez.cursor=ej("div","\u00a0","CodeMirror-cursor");ez.otherCursor=ej("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor");ez.measure=ej("div",null,"CodeMirror-measure");ez.lineSpace=ej("div",[ez.measure,ez.selectionDiv,ez.lineDiv,ez.cursor,ez.otherCursor],null,"position: relative; outline: none");ez.mover=ej("div",[ej("div",[ez.lineSpace],"CodeMirror-lines")],null,"position: relative");ez.sizer=ej("div",[ez.mover],"CodeMirror-sizer");ez.heightForcer=ej("div",null,null,"position: absolute; height: "+aO+"px; width: 1px;");ez.gutters=ej("div",null,"CodeMirror-gutters");ez.lineGutter=null;ez.scroller=ej("div",[ez.sizer,ez.heightForcer,ez.gutters],"CodeMirror-scroll");ez.scroller.setAttribute("tabIndex","-1");ez.wrapper=ej("div",[ez.inputDiv,ez.scrollbarH,ez.scrollbarV,ez.scrollbarFiller,ez.gutterFiller,ez.scroller],"CodeMirror");if(bF){ez.gutters.style.zIndex=-1;ez.scroller.style.paddingRight=0}if(ew.appendChild){ew.appendChild(ez.wrapper)}else{ew(ez.wrapper)}if(dy){ex.style.width="0px"}if(!b8){ez.scroller.draggable=true}if(aH){ez.inputDiv.style.height="1px";ez.inputDiv.style.position="absolute"}else{if(bF){ez.scrollbarH.style.minWidth=ez.scrollbarV.style.minWidth="18px"}}ez.viewOffset=ez.lastSizeC=0;ez.showingFrom=ez.showingTo=ey;ez.lineNumWidth=ez.lineNumInnerWidth=ez.lineNumChars=null;ez.prevInput="";ez.alignWidgets=false;ez.pollingFast=false;ez.poll=new ev();ez.cachedCharWidth=ez.cachedTextHeight=null;ez.measureLineCache=[];ez.measureLineCachePos=0;ez.inaccurateSelection=false;ez.maxLine=null;ez.maxLineLength=0;ez.maxLineChanged=false;ez.wheelDX=ez.wheelDY=ez.wheelStartX=ez.wheelStartY=null;return ez}function aW(ew){ew.doc.mode=B.getMode(ew.options,ew.doc.modeOption);cZ(ew)}function cZ(ew){ew.doc.iter(function(ex){if(ex.stateAfter){ex.stateAfter=null}if(ex.styles){ex.styles=null}});ew.doc.frontier=ew.doc.first;cU(ew,100);ew.state.modeGen++;if(ew.curOp){Q(ew)}}function dj(ew){if(ew.options.lineWrapping){ew.display.wrapper.className+=" CodeMirror-wrap";ew.display.sizer.style.minWidth=""}else{ew.display.wrapper.className=ew.display.wrapper.className.replace(" CodeMirror-wrap","");em(ew)}L(ew);Q(ew);T(ew);setTimeout(function(){dw(ew)},100)}function aJ(ew){var ey=aw(ew.display),ex=ew.options.lineWrapping;var ez=ex&&Math.max(5,ew.display.scroller.clientWidth/cy(ew.display)-3);return function(eA){if(dZ(ew.doc,eA)){return 0}else{if(ex){return(Math.ceil(eA.text.length/ez)||1)*ey}else{return ey}}}}function L(ew){var ey=ew.doc,ex=aJ(ew);ey.iter(function(ez){var eA=ex(ez);if(eA!=ez.height){eo(ez,eA)}})}function et(ew){var ey=dF[ew.options.keyMap],ex=ey.style;ew.display.wrapper.className=ew.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(ex?" cm-keymap-"+ex:"")}function b2(ew){ew.display.wrapper.className=ew.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ew.options.theme.replace(/(^|\s)\s*/g," cm-s-");T(ew)}function ct(ew){cR(ew);Q(ew);setTimeout(function(){df(ew)},20)}function cR(ew){var ex=ew.display.gutters,eB=ew.options.gutters;cK(ex);for(var ey=0;ey<eB.length;++ey){var ez=eB[ey];var eA=ex.appendChild(ej("div",null,"CodeMirror-gutter "+ez));if(ez=="CodeMirror-linenumbers"){ew.display.lineGutter=eA;eA.style.width=(ew.display.lineNumWidth||1)+"px"}}ex.style.display=ey?"":"none"}function c0(eA,ey){if(ey.height==0){return 0}var ex=ey.text.length,ew,eB=ey;while(ew=dn(eB)){var ez=ew.find();eB=dJ(eA,ez.from.line);ex+=ez.from.ch-ez.to.ch}eB=ey;while(ew=c5(eB)){var ez=ew.find();ex-=eB.text.length-ez.from.ch;eB=dJ(eA,ez.to.line);ex+=eB.text.length-ez.to.ch}return ex}function em(ew){var ey=ew.display,ex=ew.doc;ey.maxLine=dJ(ex,ex.first);ey.maxLineLength=c0(ex,ey.maxLine);ey.maxLineChanged=true;ex.iter(function(eA){var ez=c0(ex,eA);if(ez>ey.maxLineLength){ey.maxLineLength=ez;ey.maxLine=eA}})}function by(ew){var ex=cl(ew.gutters,"CodeMirror-linenumbers");if(ex==-1&&ew.lineNumbers){ew.gutters=ew.gutters.concat(["CodeMirror-linenumbers"])}else{if(ex>-1&&!ew.lineNumbers){ew.gutters=ew.gutters.slice(0);ew.gutters.splice(ex,1)}}}function dw(ew){var eC=ew.display,ex=ew.doc.height;var ez=ex+a7(eC);eC.sizer.style.minHeight=eC.heightForcer.style.top=ez+"px";eC.gutters.style.height=Math.max(ez,eC.scroller.clientHeight-aO)+"px";var eA=Math.max(ez,eC.scroller.scrollHeight);var eB=eC.scroller.scrollWidth>(eC.scroller.clientWidth+1);var ey=eA>(eC.scroller.clientHeight+1);if(ey){eC.scrollbarV.style.display="block";eC.scrollbarV.style.bottom=eB?i(eC.measure)+"px":"0";eC.scrollbarV.firstChild.style.height=(eA-eC.scroller.clientHeight+eC.scrollbarV.clientHeight)+"px"}else{eC.scrollbarV.style.display="";eC.scrollbarV.firstChild.style.height="0"}if(eB){eC.scrollbarH.style.display="block";eC.scrollbarH.style.right=ey?i(eC.measure)+"px":"0";eC.scrollbarH.firstChild.style.width=(eC.scroller.scrollWidth-eC.scroller.clientWidth+eC.scrollbarH.clientWidth)+"px"}else{eC.scrollbarH.style.display="";eC.scrollbarH.firstChild.style.width="0"}if(eB&&ey){eC.scrollbarFiller.style.display="block";eC.scrollbarFiller.style.height=eC.scrollbarFiller.style.width=i(eC.measure)+"px"}else{eC.scrollbarFiller.style.display=""}if(eB&&ew.options.coverGutterNextToScrollbar&&ew.options.fixedGutter){eC.gutterFiller.style.display="block";eC.gutterFiller.style.height=i(eC.measure)+"px";eC.gutterFiller.style.width=eC.gutters.offsetWidth+"px"}else{eC.gutterFiller.style.display=""}if(bT&&i(eC.measure)===0){eC.scrollbarV.style.minWidth=eC.scrollbarH.style.minHeight=cc?"18px":"12px";eC.scrollbarV.style.pointerEvents=eC.scrollbarH.style.pointerEvents="none"}}function bp(eB,eA,ez){var ey=eB.scroller.scrollTop,ew=eB.wrapper.clientHeight;if(typeof ez=="number"){ey=ez}else{if(ez){ey=ez.top;ew=ez.bottom-ez.top}}ey=Math.floor(ey-dD(eB));var ex=Math.ceil(ey+ew);return{from:a5(eA,ey),to:a5(eA,ex)}}function df(ew){var eC=ew.display;if(!eC.alignWidgets&&(!eC.gutters.firstChild||!ew.options.fixedGutter)){return}var ez=cJ(eC)-eC.scroller.scrollLeft+ew.doc.scrollLeft;var eB=eC.gutters.offsetWidth,ey=ez+"px";for(var eD=eC.lineDiv.firstChild;eD;eD=eD.nextSibling){if(eD.alignable){for(var eA=0,ex=eD.alignable;eA<ex.length;++eA){ex[eA].style.left=ey}}}if(ew.options.fixedGutter){eC.gutters.style.left=(ez+eB)+"px"}}function cM(ew){if(!ew.options.lineNumbers){return false}var eB=ew.doc,ex=c3(ew.options,eB.first+eB.size-1),eA=ew.display;if(ex.length!=eA.lineNumChars){var eC=eA.measure.appendChild(ej("div",[ej("div",ex)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var ey=eC.firstChild.offsetWidth,ez=eC.offsetWidth-ey;eA.lineGutter.style.width="";eA.lineNumInnerWidth=Math.max(ey,eA.lineGutter.offsetWidth-ez);eA.lineNumWidth=eA.lineNumInnerWidth+ez;eA.lineNumChars=eA.lineNumInnerWidth?ex.length:-1;eA.lineGutter.style.width=eA.lineNumWidth+"px";return true}return false}function c3(ew,ex){return String(ew.lineNumberFormatter(ex+ew.firstLineNumber))}function cJ(ew){return an(ew.scroller).left-an(ew.sizer).left}function cB(eB,eA,eE,eF){var eD=eB.display.showingFrom,eC=eB.display.showingTo,ez;var ew=bp(eB.display,eB.doc,eE);for(var ey=true;;ey=false){var ex=eB.display.scroller.clientWidth;if(!cj(eB,eA,ew,eF)){break}ez=true;eA=[];a2(eB);dw(eB);if(ey&&eB.options.lineWrapping&&ex!=eB.display.scroller.clientWidth){eF=true;continue}eF=false;if(eE){eE=Math.min(eB.display.scroller.scrollHeight-eB.display.scroller.clientHeight,typeof eE=="number"?eE:eE.top)}ew=bp(eB.display,eB.doc,eE);if(ew.from>=eB.display.showingFrom&&ew.to<=eB.display.showingTo){break}}if(ez){O(eB,"update",eB);if(eB.display.showingFrom!=eD||eB.display.showingTo!=eC){O(eB,"viewportChange",eB,eB.display.showingFrom,eB.display.showingTo)}}return ez}function cj(eA,eO,ex,eM){var eG=eA.display,eP=eA.doc;if(!eG.wrapper.offsetWidth){eG.showingFrom=eG.showingTo=eP.first;eG.viewOffset=0;return}if(!eM&&eO.length==0&&ex.from>eG.showingFrom&&ex.to<eG.showingTo){return}if(cM(eA)){eO=[{from:eP.first,to:eP.first+eP.size}]}var eL=eG.sizer.style.marginLeft=eG.gutters.offsetWidth+"px";eG.scrollbarH.style.left=eA.options.fixedGutter?eL:"0";var ey=Infinity;if(eA.options.lineNumbers){for(var eH=0;eH<eO.length;++eH){if(eO[eH].diff&&eO[eH].from<ey){ey=eO[eH].from}}}var ez=eP.first+eP.size;var eF=Math.max(ex.from-eA.options.viewportMargin,eP.first);var ew=Math.min(ez,ex.to+eA.options.viewportMargin);if(eG.showingFrom<eF&&eF-eG.showingFrom<20){eF=Math.max(eP.first,eG.showingFrom)}if(eG.showingTo>ew&&eG.showingTo-ew<20){ew=Math.min(ez,eG.showingTo)}if(aD){eF=bc(u(eP,dJ(eP,eF)));while(ew<ez&&dZ(eP,dJ(eP,ew))){++ew}}var eJ=[{from:Math.max(eG.showingFrom,eP.first),to:Math.min(eG.showingTo,ez)}];if(eJ[0].from>=eJ[0].to){eJ=[]}else{eJ=dT(eJ,eO)}if(aD){for(var eH=0;eH<eJ.length;++eH){var eC=eJ[eH],eK;while(eK=c5(dJ(eP,eC.to-1))){var eN=eK.find().from.line;if(eN>eC.from){eC.to=eN}else{eJ.splice(eH--,1);break}}}}var eE=0;for(var eH=0;eH<eJ.length;++eH){var eC=eJ[eH];if(eC.from<eF){eC.from=eF}if(eC.to>ew){eC.to=ew}if(eC.from>=eC.to){eJ.splice(eH--,1)}else{eE+=eC.to-eC.from}}if(!eM&&eE==ew-eF&&eF==eG.showingFrom&&ew==eG.showingTo){h(eA);return}eJ.sort(function(eR,eQ){return eR.from-eQ.from});try{var eB=document.activeElement}catch(eI){}if(eE<(ew-eF)*0.7){eG.lineDiv.style.display="none"}bG(eA,eF,ew,eJ,ey);eG.lineDiv.style.display="";if(eB&&document.activeElement!=eB&&eB.offsetHeight){eB.focus()}var eD=eF!=eG.showingFrom||ew!=eG.showingTo||eG.lastSizeC!=eG.wrapper.clientHeight;if(eD){eG.lastSizeC=eG.wrapper.clientHeight;cU(eA,400)}eG.showingFrom=eF;eG.showingTo=ew;eG.gutters.style.height="";aF(eA);h(eA);return true}function aF(eE){var eB=eE.display;var ex=eB.lineDiv.offsetTop;for(var ew=eB.lineDiv.firstChild,eF;ew;ew=ew.nextSibling){if(ew.lineObj){if(bF){var eA=ew.offsetTop+ew.offsetHeight;eF=eA-ex;ex=eA}else{var ez=an(ew);eF=ez.bottom-ez.top}var eD=ew.lineObj.height-eF;if(eF<2){eF=aw(eB)}if(eD>0.001||eD<-0.001){eo(ew.lineObj,eF);var eC=ew.lineObj.widgets;if(eC){for(var ey=0;ey<eC.length;++ey){eC[ey].height=eC[ey].node.offsetHeight}}}}}}function h(ew){var ex=ew.display.viewOffset=bb(ew,dJ(ew.doc,ew.display.showingFrom));ew.display.mover.style.top=ex+"px"}function dT(eF,eD){for(var eA=0,ey=eD.length||0;eA<ey;++eA){var eC=eD[eA],ew=[],eE=eC.diff||0;for(var ez=0,ex=eF.length;ez<ex;++ez){var eB=eF[ez];if(eC.to<=eB.from&&eC.diff){ew.push({from:eB.from+eE,to:eB.to+eE})}else{if(eC.to<=eB.from||eC.from>=eB.to){ew.push(eB)}else{if(eC.from>eB.from){ew.push({from:eB.from,to:eC.from})}if(eC.to<eB.to){ew.push({from:eC.to+eE,to:eB.to+eE})}}}}eF=ew}return eF}function dG(ew){var eA=ew.display,ez={},ey={};for(var eB=eA.gutters.firstChild,ex=0;eB;eB=eB.nextSibling,++ex){ez[ew.options.gutters[ex]]=eB.offsetLeft;ey[ew.options.gutters[ex]]=eB.offsetWidth}return{fixedPos:cJ(eA),gutterTotalWidth:eA.gutters.offsetWidth,gutterLeft:ez,gutterWidth:ey,wrapperWidth:eA.wrapper.clientWidth}}function bG(eF,eC,eD,eI,ex){var eE=dG(eF);var eB=eF.display,eH=eF.options.lineNumbers;if(!eI.length&&(!b8||!eF.display.currentWheelTarget)){cK(eB.lineDiv)}var ew=eB.lineDiv,eG=ew.firstChild;function eA(eK){var eJ=eK.nextSibling;if(b8&&bq&&eF.display.currentWheelTarget==eK){eK.style.display="none";eK.lineObj=null}else{eK.parentNode.removeChild(eK)}return eJ}var ey=eI.shift(),ez=eC;eF.doc.iter(eC,eD,function(eS){if(ey&&ey.to==ez){ey=eI.shift()}if(dZ(eF.doc,eS)){if(eS.height!=0){eo(eS,0)}if(eS.widgets&&eG&&eG.previousSibling){for(var eN=0;eN<eS.widgets.length;++eN){var eP=eS.widgets[eN];if(eP.showIfHidden){var eL=eG.previousSibling;if(/pre/i.test(eL.nodeName)){var eK=ej("div",null,null,"position: relative");eL.parentNode.replaceChild(eK,eL);eK.appendChild(eL);eL=eK}var eQ=eL.appendChild(ej("div",[eP.node],"CodeMirror-linewidget"));if(!eP.handleMouseEvents){eQ.ignoreEvents=true}a4(eP,eQ,eL,eE)}}}}else{if(ey&&ey.from<=ez&&ey.to>ez){while(eG.lineObj!=eS){eG=eA(eG)}if(eH&&ex<=ez&&eG.lineNumber){l(eG.lineNumber,c3(eF.options,ez))}eG=eG.nextSibling}else{if(eS.widgets){for(var eM=0,eR=eG,eO;eR&&eM<20;++eM,eR=eR.nextSibling){if(eR.lineObj==eS&&/div/i.test(eR.nodeName)){eO=eR;break}}}var eJ=ai(eF,eS,ez,eE,eO);if(eJ!=eO){ew.insertBefore(eJ,eG)}else{while(eG!=eO){eG=eA(eG)}eG=eG.nextSibling}eJ.lineObj=eS}}++ez});while(eG){eG=eA(eG)}}function ai(eD,eF,eG,eJ,ey){var eC=dq(eD,eF),eP=eC.pre;var eS=eF.gutterMarkers,eQ=eD.display,eE;var ex=eC.bgClass?eC.bgClass+" "+(eF.bgClass||""):eF.bgClass;if(!eD.options.lineNumbers&&!eS&&!ex&&!eF.wrapClass&&!eF.widgets){return eP}if(ey){ey.alignable=null;var eT=true,eB=0,ez=null;for(var eL=ey.firstChild,eK;eL;eL=eK){eK=eL.nextSibling;if(!/\bCodeMirror-linewidget\b/.test(eL.className)){ey.removeChild(eL)}else{for(var eR=0;eR<eF.widgets.length;++eR){var eA=eF.widgets[eR];if(eA.node==eL.firstChild){if(!eA.above&&!ez){ez=eL}a4(eA,eL,ey,eJ);++eB;break}}if(eR==eF.widgets.length){eT=false;break}}}ey.insertBefore(eP,ez);if(eT&&eB==eF.widgets.length){eE=ey;ey.className=eF.wrapClass||""}}if(!eE){eE=ej("div",null,eF.wrapClass,"position: relative");eE.appendChild(eP)}if(ex){eE.insertBefore(ej("div",null,ex+" CodeMirror-linebackground"),eE.firstChild)}if(eD.options.lineNumbers||eS){var eN=eE.insertBefore(ej("div",null,"CodeMirror-gutter-wrapper","position: absolute; left: "+(eD.options.fixedGutter?eJ.fixedPos:-eJ.gutterTotalWidth)+"px"),eP);if(eD.options.fixedGutter){(eE.alignable||(eE.alignable=[])).push(eN)}if(eD.options.lineNumbers&&(!eS||!eS["CodeMirror-linenumbers"])){eE.lineNumber=eN.appendChild(ej("div",c3(eD.options,eG),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+eJ.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+eQ.lineNumInnerWidth+"px"))}if(eS){for(var eO=0;eO<eD.options.gutters.length;++eO){var eI=eD.options.gutters[eO],eH=eS.hasOwnProperty(eI)&&eS[eI];if(eH){eN.appendChild(ej("div",[eH],"CodeMirror-gutter-elt","left: "+eJ.gutterLeft[eI]+"px; width: "+eJ.gutterWidth[eI]+"px"))}}}}if(bF){eE.style.zIndex=2}if(eF.widgets&&eE!=ey){for(var eR=0,ew=eF.widgets;eR<ew.length;++eR){var eA=ew[eR],eM=ej("div",[eA.node],"CodeMirror-linewidget");if(!eA.handleMouseEvents){eM.ignoreEvents=true}a4(eA,eM,eE,eJ);if(eA.above){eE.insertBefore(eM,eD.options.lineNumbers&&eF.height!=0?eN:eP)}else{eE.appendChild(eM)}O(eA,"redraw")}}return eE}function a4(ez,ey,ex,eA){if(ez.noHScroll){(ex.alignable||(ex.alignable=[])).push(ey);var ew=eA.wrapperWidth;ey.style.left=eA.fixedPos+"px";if(!ez.coverGutter){ew-=eA.gutterTotalWidth;ey.style.paddingLeft=eA.gutterTotalWidth+"px"}ey.style.width=ew+"px"}if(ez.coverGutter){ey.style.zIndex=5;ey.style.position="relative";if(!ez.noHScroll){ey.style.marginLeft=-eA.gutterTotalWidth+"px"}}}function a2(ew){var ez=ew.display;var eA=d8(ew.doc.sel.from,ew.doc.sel.to);if(eA||ew.options.showCursorWhenSelecting){C(ew)}else{ez.cursor.style.display=ez.otherCursor.style.display="none"}if(!eA){V(ew)}else{ez.selectionDiv.style.display="none"}if(ew.options.moveInputWithCursor){var eB=cH(ew,ew.doc.sel.head,"div");var ex=an(ez.wrapper),ey=an(ez.lineDiv);ez.inputDiv.style.top=Math.max(0,Math.min(ez.wrapper.clientHeight-10,eB.top+ey.top-ex.top))+"px";ez.inputDiv.style.left=Math.max(0,Math.min(ez.wrapper.clientWidth-10,eB.left+ey.left-ex.left))+"px"}}function C(ew){var ex=ew.display,ey=cH(ew,ew.doc.sel.head,"div");ex.cursor.style.left=ey.left+"px";ex.cursor.style.top=ey.top+"px";ex.cursor.style.height=Math.max(0,ey.bottom-ey.top)*ew.options.cursorHeight+"px";ex.cursor.style.display="";if(ey.other){ex.otherCursor.style.display="";ex.otherCursor.style.left=ey.other.left+"px";ex.otherCursor.style.top=ey.other.top+"px";ex.otherCursor.style.height=(ey.other.bottom-ey.other.top)*0.85+"px"}else{ex.otherCursor.style.display="none"}}function V(eH){var eC=eH.display,eG=eH.doc,ew=eH.doc.sel;var eA=document.createDocumentFragment();var eF=eC.lineSpace.offsetWidth,ey=av(eH.display);function eJ(eN,eM,eL,eK){if(eM<0){eM=0}eA.appendChild(ej("div",null,"CodeMirror-selected","position: absolute; left: "+eN+"px; top: "+eM+"px; width: "+(eL==null?eF-eN:eL)+"px; height: "+(eK-eM)+"px"))}function eE(eL,eN,eQ){var eM=dJ(eG,eL);var eO=eM.text.length;var eR,eK;function eP(eT,eS){return bZ(eH,K(eL,eT),"div",eM,eS)}cL(a(eM),eN||0,eQ==null?eO:eQ,function(eZ,eY,eS){var eV=eP(eZ,"left"),eW,eX,eU;if(eZ==eY){eW=eV;eX=eU=eV.left}else{eW=eP(eY-1,"right");if(eS=="rtl"){var eT=eV;eV=eW;eW=eT}eX=eV.left;eU=eW.right}if(eN==null&&eZ==0){eX=ey}if(eW.top-eV.top>3){eJ(eX,eV.top,null,eV.bottom);eX=ey;if(eV.bottom<eW.top){eJ(eX,eV.bottom,null,eW.top)}}if(eQ==null&&eY==eO){eU=eF}if(!eR||eV.top<eR.top||eV.top==eR.top&&eV.left<eR.left){eR=eV}if(!eK||eW.bottom>eK.bottom||eW.bottom==eK.bottom&&eW.right>eK.right){eK=eW}if(eX<ey+1){eX=ey}eJ(eX,eW.top,eU-eX,eW.bottom)});return{start:eR,end:eK}}if(ew.from.line==ew.to.line){eE(ew.from.line,ew.from.ch,ew.to.ch)}else{var ez=dJ(eG,ew.from.line),ex=dJ(eG,ew.to.line);var eB=u(eG,ez)==u(eG,ex);var eI=eE(ew.from.line,ew.from.ch,eB?ez.text.length:null).end;var eD=eE(ew.to.line,eB?0:null,ew.to.ch).start;if(eB){if(eI.top<eD.top-2){eJ(eI.right,eI.top,null,eI.bottom);eJ(ey,eD.top,eD.left,eD.bottom)}else{eJ(eI.right,eI.top,eD.left-eI.right,eI.bottom)}}if(eI.bottom<eD.top){eJ(ey,eI.bottom,null,eD.top)}}bf(eC.selectionDiv,eA);eC.selectionDiv.style.display=""}function k(ew){if(!ew.state.focused){return}var ey=ew.display;clearInterval(ey.blinker);var ex=true;ey.cursor.style.visibility=ey.otherCursor.style.visibility="";if(ew.options.cursorBlinkRate>0){ey.blinker=setInterval(function(){ey.cursor.style.visibility=ey.otherCursor.style.visibility=(ex=!ex)?"":"hidden"},ew.options.cursorBlinkRate)}}function cU(ew,ex){if(ew.doc.mode.startState&&ew.doc.frontier<ew.display.showingTo){ew.state.highlight.set(ex,bO(b3,ew))}}function b3(ew){var ez=ew.doc;if(ez.frontier<ez.first){ez.frontier=ez.first}if(ez.frontier>=ew.display.showingTo){return}var ex=+new Date+ew.options.workTime;var ey=bo(ez.mode,cw(ew,ez.frontier));var eB=[],eA;ez.iter(ez.frontier,Math.min(ez.first+ez.size,ew.display.showingTo+500),function(eC){if(ez.frontier>=ew.display.showingFrom){var eE=eC.styles;eC.styles=d4(ew,eC,ey,true);var eF=!eE||eE.length!=eC.styles.length;for(var eD=0;!eF&&eD<eE.length;++eD){eF=eE[eD]!=eC.styles[eD]}if(eF){if(eA&&eA.end==ez.frontier){eA.end++}else{eB.push(eA={start:ez.frontier,end:ez.frontier+1})}}eC.stateAfter=bo(ez.mode,ey)}else{cu(ew,eC.text,ey);eC.stateAfter=ez.frontier%5==0?bo(ez.mode,ey):null}++ez.frontier;if(+new Date>ex){cU(ew,ew.options.workDelay);return true}});if(eB.length){b9(ew,function(){for(var eC=0;eC<eB.length;++eC){Q(this,eB[eC].start,eB[eC].end)}})()}}function bQ(eC,ew,ez){var ex,eA,eB=eC.doc;var ey=ez?-1:ew-(eC.doc.mode.innerMode?1000:100);for(var eF=ew;eF>ey;--eF){if(eF<=eB.first){return eB.first}var eE=dJ(eB,eF-1);if(eE.stateAfter&&(!ez||eF<=eB.frontier)){return eF}var eD=bg(eE.text,null,eC.options.tabSize);if(eA==null||ex>eD){eA=eF-1;ex=eD}}return eA}function cw(ew,eC,ex){var eA=ew.doc,ez=ew.display;if(!eA.mode.startState){return true}var eB=bQ(ew,eC,ex),ey=eB>eA.first&&dJ(eA,eB-1).stateAfter;if(!ey){ey=bm(eA.mode)}else{ey=bo(eA.mode,ey)}eA.iter(eB,eC,function(eD){cu(ew,eD.text,ey);var eE=eB==eC-1||eB%5==0||eB>=ez.showingFrom&&eB<ez.showingTo;eD.stateAfter=eE?bo(eA.mode,ey):null;++eB});if(ex){eA.frontier=eB}return ey}function dD(ew){return ew.lineSpace.offsetTop}function a7(ew){return ew.mover.offsetHeight-ew.lineSpace.offsetHeight}function av(ex){var ew=bf(ex.measure,ej("pre",null,null,"text-align: left")).appendChild(ej("span","x"));return ew.offsetLeft}function cW(eD,eE,ex,eA,eB){var ez=-1;eA=eA||a8(eD,eE);if(eA.crude){var ey=eA.left+ex*eA.width;return{left:ey,right:ey+eA.width,top:eA.top,bottom:eA.bottom}}for(var eC=ex;;eC+=ez){var ew=eA[eC];if(ew){break}if(ez<0&&eC==0){ez=1}}eB=eC>ex?"left":eC<ex?"right":eB;if(eB=="left"&&ew.leftSide){ew=ew.leftSide}else{if(eB=="right"&&ew.rightSide){ew=ew.rightSide}}return{left:eC<ex?ew.right:ew.left,right:eC>ex?ew.left:ew.right,top:ew.top,bottom:ew.bottom}}function dB(ew,ex){var ez=ew.display.measureLineCache;for(var eA=0;eA<ez.length;++eA){var ey=ez[eA];if(ey.text==ex.text&&ey.markedSpans==ex.markedSpans&&ew.display.scroller.clientWidth==ey.width&&ey.classes==ex.textClass+"|"+ex.wrapClass){return ey}}}function ec(ew,ex){var ey=dB(ew,ex);if(ey){ey.text=ey.measure=ey.markedSpans=null}}function a8(ew,ex){var eB=dB(ew,ex);if(eB){return eB.measure}var eA=ci(ew,ex);var ez=ew.display.measureLineCache;var ey={text:ex.text,width:ew.display.scroller.clientWidth,markedSpans:ex.markedSpans,measure:eA,classes:ex.textClass+"|"+ex.wrapClass};if(ez.length==16){ez[++ew.display.measureLineCachePos%16]=ey}else{ez.push(ey)}return eA}function ci(eD,eF){if(!eD.options.lineWrapping&&eF.text.length>=eD.options.crudeMeasuringFrom){return ek(eD,eF)}var eL=eD.display,eB=U(eF.text.length);var eI=dq(eD,eF,eB,true).pre;if(cf&&!bF&&!eD.options.lineWrapping&&eI.childNodes.length>100){var ey=document.createDocumentFragment();var eG=10,eJ=eI.childNodes.length;for(var eN=0,eH=Math.ceil(eJ/eG);eN<eH;++eN){var eE=ej("div",null,null,"display: inline-block");for(var eM=0;eM<eG&&eJ;++eM){eE.appendChild(eI.firstChild);--eJ}ey.appendChild(eE)}eI.appendChild(ey)}bf(eL.measure,eI);var ex=an(eL.lineDiv);var ew=[],eQ=U(eF.text.length),eP=eI.offsetHeight;if(bE&&eL.measure.first!=eI){bf(eL.measure,eI)}function eO(eT){var eV=eT.top-ex.top,eX=eT.bottom-ex.top;if(eX>eP){eX=eP}if(eV<0){eV=0}for(var eS=ew.length-2;eS>=0;eS-=2){var eU=ew[eS],eW=ew[eS+1];if(eU>eX||eW<eV){continue}if(eU<=eV&&eW>=eX||eV<=eU&&eX>=eW||Math.min(eX,eW)-Math.max(eV,eU)>=(eX-eV)>>1){ew[eS]=Math.min(eV,eU);ew[eS+1]=Math.max(eX,eW);break}}if(eS<0){eS=ew.length;ew.push(eV,eX)}return{left:eT.left-ex.left,right:eT.right-ex.left,top:eS,bottom:null}}function eR(eS){eS.bottom=ew[eS.top+1];eS.top=ew[eS.top]}for(var eN=0,eA;eN<eB.length;++eN){if(eA=eB[eN]){var eK=eA,ez=null;if(/\bCodeMirror-widget\b/.test(eA.className)&&eA.getClientRects){if(eA.firstChild.nodeType==1){eK=eA.firstChild}var eC=eK.getClientRects();if(eC.length>1){ez=eQ[eN]=eO(eC[0]);ez.rightSide=eO(eC[eC.length-1])}}if(!ez){ez=eQ[eN]=eO(an(eK))}if(eA.measureRight){ez.right=an(eA.measureRight).left-ex.left}if(eA.leftSide){ez.leftSide=eO(an(eA.leftSide))}}}cK(eD.display.measure);for(var eN=0,eA;eN<eQ.length;++eN){if(eA=eQ[eN]){eR(eA);if(eA.leftSide){eR(eA.leftSide)}if(eA.rightSide){eR(eA.rightSide)}}}return eQ}function ek(ew,ex){var eB=new en(ex.text.slice(0,100),null);if(ex.textClass){eB.textClass=ex.textClass}var ez=ci(ew,eB);var eA=cW(ew,eB,0,ez,"left");var ey=cW(ew,eB,99,ez,"right");return{crude:true,top:eA.top,left:eA.left,bottom:eA.bottom,width:(ey.right-eA.left)/100}}function dg(ew,ey){var eD=false;if(ey.markedSpans){for(var ez=0;ez<ey.markedSpans;++ez){var eB=ey.markedSpans[ez];if(eB.collapsed&&(eB.to==null||eB.to==ey.text.length)){eD=true}}}var eA=!eD&&dB(ew,ey);if(eA||ey.text.length>=ew.options.crudeMeasuringFrom){return cW(ew,ey,ey.text.length,eA&&eA.measure,"right").right}var eC=dq(ew,ey,null,true).pre;var ex=eC.appendChild(aS(ew.display.measure));bf(ew.display.measure,eC);return an(ex).right-an(ew.display.lineDiv).left}function T(ew){ew.display.measureLineCache.length=ew.display.measureLineCachePos=0;ew.display.cachedCharWidth=ew.display.cachedTextHeight=null;if(!ew.options.lineWrapping){ew.display.maxLineChanged=true}ew.display.lineNumChars=null}function bN(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function bM(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function dp(eC,ez,eB,ex){if(ez.widgets){for(var ey=0;ey<ez.widgets.length;++ey){if(ez.widgets[ey].above){var eE=b6(ez.widgets[ey]);eB.top+=eE;eB.bottom+=eE}}}if(ex=="line"){return eB}if(!ex){ex="local"}var eA=bb(eC,ez);if(ex=="local"){eA+=dD(eC.display)}else{eA-=eC.display.viewOffset}if(ex=="page"||ex=="window"){var ew=an(eC.display.lineSpace);eA+=ew.top+(ex=="window"?0:bM());var eD=ew.left+(ex=="window"?0:bN());eB.left+=eD;eB.right+=eD}eB.top+=eA;eB.bottom+=eA;return eB}function es(ex,eA,ey){if(ey=="div"){return eA}var eC=eA.left,eB=eA.top;if(ey=="page"){eC-=bN();eB-=bM()}else{if(ey=="local"||!ey){var ez=an(ex.display.sizer);eC+=ez.left;eB+=ez.top}}var ew=an(ex.display.lineSpace);return{left:eC-ew.left,top:eB-ew.top}}function bZ(ew,eA,ez,ey,ex){if(!ey){ey=dJ(ew.doc,eA.line)}return dp(ew,ey,cW(ew,ey,eA.ch,null,ex),ez)}function cH(eF,eE,ey,eD,eB){eD=eD||dJ(eF.doc,eE.line);if(!eB){eB=a8(eF,eD)}function eA(eJ,eI){var eH=cW(eF,eD,eJ,eB,eI?"right":"left");if(eI){eH.left=eH.right}else{eH.right=eH.left}return dp(eF,eD,eH,ey)}function eG(eK,eH){var eI=eC[eH],eJ=eI.level%2;if(eK==cv(eI)&&eH&&eI.level<eC[eH-1].level){eI=eC[--eH];eK=er(eI)-(eI.level%2?0:1);eJ=true}else{if(eK==er(eI)&&eH<eC.length-1&&eI.level<eC[eH+1].level){eI=eC[++eH];eK=cv(eI)-eI.level%2;eJ=false}}if(eJ&&eK==eI.to&&eK>eI.from){return eA(eK-1)}return eA(eK,eJ)}var eC=a(eD),ew=eE.ch;if(!eC){return eA(ew)}var ex=aj(eC,ew);var ez=eG(ew,ex);if(dz!=null){ez.other=eG(ew,dz)}return ez}function ei(ew,ex,ey,eA){var ez=new K(ew,ex);ez.xRel=eA;if(ey){ez.outside=true}return ez}function ed(eD,eA,ez){var eC=eD.doc;ez+=eD.display.viewOffset;if(ez<0){return ei(eC.first,0,true,-1)}var ex=a5(eC,ez),eE=eC.first+eC.size-1;if(ex>eE){return ei(eC.first+eC.size-1,dJ(eC,eE).text.length,true,1)}if(eA<0){eA=0}for(;;){var ey=dJ(eC,ex);var eF=b7(eD,ey,ex,eA,ez);var eB=c5(ey);var ew=eB&&eB.find();if(eB&&(eF.ch>ew.from.ch||eF.ch==ew.from.ch&&eF.xRel>0)){ex=ew.to.line}else{return eF}}}function b7(eG,ey,eJ,eI,eH){var eF=eH-bb(eG,ey);var eC=false,eP=2*eG.display.wrapper.clientWidth;var eO=a8(eG,ey);function eT(eV){var eW=cH(eG,K(eJ,eV),"line",ey,eO);eC=true;if(eF>eW.bottom){return eW.left-eP}else{if(eF<eW.top){return eW.left+eP}else{eC=false}}return eW.left}var eL=a(ey),eN=ey.text.length;var eQ=bU(ey),ez=b4(ey);var eM=eT(eQ),ew=eC,ex=eT(ez),eB=eC;if(eI>ex){return ei(eJ,ez,eB,1)}for(;;){if(eL?ez==eQ||ez==q(ey,eQ,1):ez-eQ<=1){var eK=eI<eM||eI-eM<=ex-eI?eQ:ez;var eS=eI-(eK==eQ?eM:ex);while(dV(ey.text.charAt(eK))){++eK}var eE=ei(eJ,eK,eK==eQ?ew:eB,eS<0?-1:eS?1:0);return eE}var eD=Math.ceil(eN/2),eU=eQ+eD;if(eL){eU=eQ;for(var eR=0;eR<eD;++eR){eU=q(ey,eU,1)}}var eA=eT(eU);if(eA>eI){ez=eU;ex=eA;if(eB=eC){ex+=1000}eN=eD}else{eQ=eU;eM=eA;ew=eC;eN-=eD}}}var ak;function aw(ey){if(ey.cachedTextHeight!=null){return ey.cachedTextHeight}if(ak==null){ak=ej("pre");for(var ex=0;ex<49;++ex){ak.appendChild(document.createTextNode("x"));ak.appendChild(ej("br"))}ak.appendChild(document.createTextNode("x"))}bf(ey.measure,ak);var ew=ak.offsetHeight/50;if(ew>3){ey.cachedTextHeight=ew}cK(ey.measure);return ew||1}function cy(ez){if(ez.cachedCharWidth!=null){return ez.cachedCharWidth}var ew=ej("span","x");var ey=ej("pre",[ew]);bf(ez.measure,ey);var ex=ew.offsetWidth;if(ex>2){ez.cachedCharWidth=ex}return ex||10}var cO=0;function bY(ew){ew.curOp={changes:[],forceUpdate:false,updateInput:null,userSelChange:null,textChanged:null,selectionChanged:false,cursorActivity:false,updateMaxLine:false,updateScrollPos:false,id:++cO};if(!bL++){aT=[]}}function W(eK){var eE=eK.curOp,eJ=eK.doc,eF=eK.display;eK.curOp=null;if(eE.updateMaxLine){em(eK)}if(eF.maxLineChanged&&!eK.options.lineWrapping&&eF.maxLine){var ex=dg(eK,eF.maxLine);eF.sizer.style.minWidth=Math.max(0,ex+3+aO)+"px";eF.maxLineChanged=false;var eH=Math.max(0,eF.sizer.offsetLeft+eF.sizer.offsetWidth-eF.scroller.clientWidth);if(eH<eJ.scrollLeft&&!eE.updateScrollPos){a3(eK,Math.min(eF.scroller.scrollLeft,eH),true)}}var ey,eC;if(eE.updateScrollPos){ey=eE.updateScrollPos}else{if(eE.selectionChanged&&eF.scroller.clientHeight){var eI=cH(eK,eJ.sel.head);ey=A(eK,eI.left,eI.top,eI.left,eI.bottom)}}if(eE.changes.length||eE.forceUpdate||ey&&ey.scrollTop!=null){eC=cB(eK,eE.changes,ey&&ey.scrollTop,eE.forceUpdate);if(eK.display.scroller.offsetHeight){eK.doc.scrollTop=eK.display.scroller.scrollTop}}if(!eC&&eE.selectionChanged){a2(eK)}if(eE.updateScrollPos){var eG=Math.max(0,Math.min(eF.scroller.scrollHeight-eF.scroller.clientHeight,ey.scrollTop));var ez=Math.max(0,Math.min(eF.scroller.scrollWidth-eF.scroller.clientWidth,ey.scrollLeft));eF.scroller.scrollTop=eF.scrollbarV.scrollTop=eJ.scrollTop=eG;eF.scroller.scrollLeft=eF.scrollbarH.scrollLeft=eJ.scrollLeft=ez;df(eK);if(eE.scrollToPos){x(eK,d9(eK.doc,eE.scrollToPos.from),d9(eK.doc,eE.scrollToPos.to),eE.scrollToPos.margin)}}else{if(ey){ae(eK)}}if(eE.selectionChanged){k(eK)}if(eK.state.focused&&eE.updateInput){dU(eK,eE.userSelChange)}var eD=eE.maybeHiddenMarkers,ew=eE.maybeUnhiddenMarkers;if(eD){for(var eB=0;eB<eD.length;++eB){if(!eD[eB].lines.length){ah(eD[eB],"hide")}}}if(ew){for(var eB=0;eB<ew.length;++eB){if(ew[eB].lines.length){ah(ew[eB],"unhide")}}}var eA;if(!--bL){eA=aT;aT=null}if(eE.textChanged){ah(eK,"change",eK,eE.textChanged)}if(eE.cursorActivity){ah(eK,"cursorActivity",eK)}if(eA){for(var eB=0;eB<eA.length;++eB){eA[eB]()}}}function b9(ew,ex){return function(){var ez=ew||this,eA=!ez.curOp;if(eA){bY(ez)}try{var ey=ex.apply(ez,arguments)}finally{if(eA){W(ez)}}return ey}}function d3(ew){return function(){var ey=this.cm&&!this.cm.curOp,ex;if(ey){bY(this.cm)}try{ex=ew.apply(this,arguments)}finally{if(ey){W(this.cm)}}return ex}}function b1(ex,ez){var ey=!ex.curOp,ew;if(ey){bY(ex)}try{ew=ez()}finally{if(ey){W(ex)}}return ew}function Q(ew,ez,ey,ex){if(ez==null){ez=ew.doc.first}if(ey==null){ey=ew.doc.first+ew.doc.size}ew.curOp.changes.push({from:ez,to:ey,diff:ex})}function aR(ew){if(ew.display.pollingFast){return}ew.display.poll.set(ew.options.pollInterval,function(){bB(ew);if(ew.state.focused){aR(ew)}})}function w(ew){var ex=false;ew.display.pollingFast=true;function ey(){var ez=bB(ew);if(!ez&&!ex){ex=true;ew.display.poll.set(60,ey)}else{ew.display.pollingFast=false;aR(ew)}}ew.display.poll.set(20,ey)}function bB(eK){var eF=eK.display.input,eC=eK.display.prevInput,eJ=eK.doc,ew=eJ.sel;if(!eK.state.focused||aX(eF)||S(eK)||eK.options.disableInput){return false}if(eK.state.pasteIncoming&&eK.state.fakedLastChar){eF.value=eF.value.substring(0,eF.value.length-1);eK.state.fakedLastChar=false}var eL=eF.value;if(eL==eC&&d8(ew.from,ew.to)){return false}if(cA&&!bE&&eK.display.inputHasSelection===eL){dU(eK,true);return false}var ey=!eK.curOp;if(ey){bY(eK)}ew.shift=false;var eE=0,ex=Math.min(eC.length,eL.length);while(eE<ex&&eC.charCodeAt(eE)==eL.charCodeAt(eE)){++eE}var eI=ew.from,eH=ew.to;var eA=eL.slice(eE);if(eE<eC.length){eI=K(eI.line,eI.ch-(eC.length-eE))}else{if(eK.state.overwrite&&d8(eI,eH)&&!eK.state.pasteIncoming){eH=K(eH.line,Math.min(dJ(eJ,eH.line).text.length,eH.ch+eA.length))}}var eD=eK.curOp.updateInput;var eG={from:eI,to:eH,text:ay(eA),origin:eK.state.pasteIncoming?"paste":eK.state.cutIncoming?"cut":"+input"};aL(eK.doc,eG,"end");eK.curOp.updateInput=eD;O(eK,"inputRead",eK,eG);if(eA&&!eK.state.pasteIncoming&&eK.options.electricChars&&eK.options.smartIndent&&ew.head.ch<100){var ez=eK.getModeAt(ew.head).electricChars;if(ez){for(var eB=0;eB<ez.length;eB++){if(eA.indexOf(ez.charAt(eB))>-1){N(eK,ew.head.line,"smart");break}}}}if(eL.length>1000||eL.indexOf("\n")>-1){eF.value=eK.display.prevInput=""}else{eK.display.prevInput=eL}if(ey){W(eK)}eK.state.pasteIncoming=eK.state.cutIncoming=false;return true}function dU(ew,ey){var ex,ez,eB=ew.doc;if(!d8(eB.sel.from,eB.sel.to)){ew.display.prevInput="";ex=ce&&(eB.sel.to.line-eB.sel.from.line>100||(ez=ew.getSelection()).length>1000);var eA=ex?"-":ez||ew.getSelection();ew.display.input.value=eA;if(ew.state.focused){cC(ew.display.input)}if(cA&&!bE){ew.display.inputHasSelection=eA}}else{if(ey){ew.display.prevInput=ew.display.input.value="";if(cA&&!bE){ew.display.inputHasSelection=null}}}ew.display.inaccurateSelection=ex}function db(ew){if(ew.options.readOnly!="nocursor"&&(!cV||document.activeElement!=ew.display.input)){ew.display.input.focus()}}function S(ew){return ew.options.readOnly||ew.doc.cantEdit}function ee(ex){var eC=ex.display;bk(eC.scroller,"mousedown",b9(ex,c4));if(cf){bk(eC.scroller,"dblclick",b9(ex,function(eF){if(ar(ex,eF)){return}var eG=bH(ex,eF);if(!eG||j(ex,eF)||aG(ex.display,eF)){return}bV(eF);var eE=ab(dJ(ex.doc,eG.line).text,eG);eg(ex.doc,eE.from,eE.to)}))}else{bk(eC.scroller,"dblclick",function(eE){ar(ex,eE)||bV(eE)})}bk(eC.lineSpace,"selectstart",function(eE){if(!aG(eC,eE)){bV(eE)}});if(!bX){bk(eC.scroller,"contextmenu",function(eE){ad(ex,eE)})}bk(eC.scroller,"scroll",function(){if(eC.scroller.clientHeight){F(ex,eC.scroller.scrollTop);a3(ex,eC.scroller.scrollLeft,true);ah(ex,"scroll",ex)}});bk(eC.scrollbarV,"scroll",function(){if(eC.scroller.clientHeight){F(ex,eC.scrollbarV.scrollTop)}});bk(eC.scrollbarH,"scroll",function(){if(eC.scroller.clientHeight){a3(ex,eC.scrollbarH.scrollLeft)}});bk(eC.scroller,"mousewheel",function(eE){b(ex,eE)});bk(eC.scroller,"DOMMouseScroll",function(eE){b(ex,eE)});function eD(){if(ex.state.focused){setTimeout(bO(db,ex),0)}}bk(eC.scrollbarH,"mousedown",eD);bk(eC.scrollbarV,"mousedown",eD);bk(eC.wrapper,"scroll",function(){eC.wrapper.scrollTop=eC.wrapper.scrollLeft=0});var ew;function eA(){if(ew==null){ew=setTimeout(function(){ew=null;eC.cachedCharWidth=eC.cachedTextHeight=c6=null;T(ex);b1(ex,bO(Q,ex))},100)}}bk(window,"resize",eA);function ez(){for(var eE=eC.wrapper.parentNode;eE&&eE!=document.body;eE=eE.parentNode){}if(eE){setTimeout(ez,5000)}else{cT(window,"resize",eA)}}setTimeout(ez,5000);bk(eC.input,"keyup",b9(ex,function(eE){if(ar(ex,eE)||ex.options.onKeyEvent&&ex.options.onKeyEvent(ex,Y(eE))){return}if(eE.keyCode==16){ex.doc.sel.shift=false}}));bk(eC.input,"input",function(){if(cA&&!bE&&ex.display.inputHasSelection){ex.display.inputHasSelection=null}w(ex)});bk(eC.input,"keydown",b9(ex,m));bk(eC.input,"keypress",b9(ex,bP));bk(eC.input,"focus",bO(bS,ex));bk(eC.input,"blur",bO(au,ex));function ey(eE){if(ar(ex,eE)||ex.options.onDragEvent&&ex.options.onDragEvent(ex,Y(eE))){return}c2(eE)}if(ex.options.dragDrop){bk(eC.scroller,"dragstart",function(eE){I(ex,eE)});bk(eC.scroller,"dragenter",ey);bk(eC.scroller,"dragover",ey);bk(eC.scroller,"drop",b9(ex,aN))}bk(eC.scroller,"paste",function(eE){if(aG(eC,eE)){return}db(ex);w(ex)});bk(eC.input,"paste",function(){if(b8&&!ex.state.fakedLastChar&&!(new Date-ex.state.lastMiddleDown<200)){var eF=eC.input.selectionStart,eE=eC.input.selectionEnd;eC.input.value+="$";eC.input.selectionStart=eF;eC.input.selectionEnd=eE;ex.state.fakedLastChar=true}ex.state.pasteIncoming=true;w(ex)});function eB(eE){if(eC.inaccurateSelection){eC.prevInput="";eC.inaccurateSelection=false;eC.input.value=ex.getSelection();cC(eC.input)}if(eE.type=="cut"){ex.state.cutIncoming=true}}bk(eC.input,"cut",eB);bk(eC.input,"copy",eB);if(aH){bk(eC.sizer,"mouseup",function(){if(document.activeElement==eC.input){eC.input.blur()}db(ex)})}}function aG(ex,ew){for(var ey=D(ew);ey!=ex.wrapper;ey=ey.parentNode){if(!ey||ey.ignoreEvents||ey.parentNode==ex.sizer&&ey!=ex.mover){return true}}}function bH(ex,eC,ez){var eB=ex.display;if(!ez){var eA=D(eC);if(eA==eB.scrollbarH||eA==eB.scrollbarH.firstChild||eA==eB.scrollbarV||eA==eB.scrollbarV.firstChild||eA==eB.scrollbarFiller||eA==eB.gutterFiller){return null}}var ew,eD,ey=an(eB.lineSpace);try{ew=eC.clientX;eD=eC.clientY}catch(eC){return null}return ed(ex,ew-ey.left,eD-ey.top)}var cn,ch;function c4(eO){if(ar(this,eO)){return}var ez=this,eJ=ez.display,eQ=ez.doc,eH=eQ.sel;eH.shift=eO.shiftKey;if(aG(eJ,eO)){if(!b8){eJ.scroller.draggable=false;setTimeout(function(){eJ.scroller.draggable=true},100)}return}if(j(ez,eO)){return}var ey=bH(ez,eO);switch(eb(eO)){case 3:if(bX){ad.call(ez,ez,eO)}return;case 2:if(b8){ez.state.lastMiddleDown=+new Date}if(ey){eg(ez.doc,ey)}setTimeout(bO(db,ez),20);bV(eO);return}if(!ey){if(D(eO)==eJ.scroller){bV(eO)}return}if(!ez.state.focused){bS(ez)}var ew=+new Date,ex="single";if(ch&&ch.time>ew-400&&d8(ch.pos,ey)){ex="triple";bV(eO);setTimeout(bO(db,ez),20);aQ(ez,ey.line)}else{if(cn&&cn.time>ew-400&&d8(cn.pos,ey)){ex="double";ch={time:ew,pos:ey};bV(eO);var eL=ab(dJ(eQ,ey.line).text,ey);eg(ez.doc,eL.from,eL.to)}else{cn={time:ew,pos:ey}}}var eA=ey;if(ez.options.dragDrop&&dm&&!S(ez)&&!d8(eH.from,eH.to)&&!dK(ey,eH.from)&&!dK(eH.to,ey)&&ex=="single"){var eK=b9(ez,function(eR){if(b8){eJ.scroller.draggable=false}ez.state.draggingText=false;cT(document,"mouseup",eK);cT(eJ.scroller,"drop",eK);if(Math.abs(eO.clientX-eR.clientX)+Math.abs(eO.clientY-eR.clientY)<10){bV(eR);eg(ez.doc,ey);db(ez);if(cf&&!bE){setTimeout(function(){document.body.focus();db(ez)},20)}}});if(b8){eJ.scroller.draggable=true}ez.state.draggingText=eK;if(eJ.scroller.dragDrop){eJ.scroller.dragDrop()}bk(document,"mouseup",eK);bk(eJ.scroller,"drop",eK);return}bV(eO);if(ex=="single"){eg(ez.doc,d9(eQ,ey))}var eP=eH.from,eE=eH.to,eI=ey;function eM(eS){if(d8(eI,eS)){return}eI=eS;if(ex=="single"){eg(ez.doc,d9(eQ,ey),eS);return}eP=d9(eQ,eP);eE=d9(eQ,eE);if(ex=="double"){var eR=ab(dJ(eQ,eS.line).text,eS);if(dK(eS,eP)){eg(ez.doc,eR.from,eE)}else{eg(ez.doc,eP,eR.to)}}else{if(ex=="triple"){if(dK(eS,eP)){eg(ez.doc,eE,d9(eQ,K(eS.line,0)))}else{eg(ez.doc,eP,d9(eQ,K(eS.line+1,0)))}}}}var eF=an(eJ.wrapper);var eB=0;function eN(eT){var eR=++eB;var eV=bH(ez,eT,true);if(!eV){return}if(!d8(eV,eA)){if(!ez.state.focused){bS(ez)}eA=eV;eM(eV);var eU=bp(eJ,eQ);if(eV.line>=eU.to||eV.line<eU.from){setTimeout(b9(ez,function(){if(eB==eR){eN(eT)}}),150)}}else{var eS=eT.clientY<eF.top?-20:eT.clientY>eF.bottom?20:0;if(eS){setTimeout(b9(ez,function(){if(eB!=eR){return}eJ.scroller.scrollTop+=eS;eN(eT)}),50)}}}function eD(eR){eB=Infinity;bV(eR);db(ez);cT(document,"mousemove",eG);cT(document,"mouseup",eC)}var eG=b9(ez,function(eR){if(!cf&&!eb(eR)){eD(eR)}else{eN(eR)}});var eC=b9(ez,eD);bk(document,"mousemove",eG);bk(document,"mouseup",eC)}function eu(eH,eD,eF,eG,ez){try{var ex=eD.clientX,ew=eD.clientY}catch(eD){return false}if(ex>=Math.floor(an(eH.display.gutters).right)){return false}if(eG){bV(eD)}var eE=eH.display;var eC=an(eE.lineDiv);if(ew>eC.bottom||!dP(eH,eF)){return ba(eD)}ew-=eC.top-eE.viewOffset;for(var eA=0;eA<eH.options.gutters.length;++eA){var eB=eE.gutters.childNodes[eA];if(eB&&an(eB).right>=ex){var eI=a5(eH.doc,ew);var ey=eH.options.gutters[eA];ez(eH,eF,eH,eI,ey,eD);return ba(eD)}}}function ck(ew,ex){if(!dP(ew,"gutterContextMenu")){return false}return eu(ew,ex,"gutterContextMenu",false,ah)}function j(ew,ex){return eu(ew,ex,"gutterClick",true,O)}var P=0;function aN(eC){var eE=this;if(ar(eE,eC)||aG(eE.display,eC)||(eE.options.onDragEvent&&eE.options.onDragEvent(eE,Y(eC)))){return}bV(eC);if(cA){P=+new Date}var eD=bH(eE,eC,true),ew=eC.dataTransfer.files;if(!eD||S(eE)){return}if(ew&&ew.length&&window.FileReader&&window.File){var ey=ew.length,eG=Array(ey),ex=0;var ez=function(eJ,eI){var eH=new FileReader;eH.onload=function(){eG[eI]=eH.result;if(++ex==ey){eD=d9(eE.doc,eD);aL(eE.doc,{from:eD,to:eD,text:ay(eG.join("\n")),origin:"paste"},"around")}};eH.readAsText(eJ)};for(var eA=0;eA<ey;++eA){ez(ew[eA],eA)}}else{if(eE.state.draggingText&&!(dK(eD,eE.doc.sel.from)||dK(eE.doc.sel.to,eD))){eE.state.draggingText(eC);setTimeout(bO(db,eE),20);return}try{var eG=eC.dataTransfer.getData("Text");if(eG){var eF=eE.doc.sel.from,eB=eE.doc.sel.to;bh(eE.doc,eD,eD);if(eE.state.draggingText){az(eE.doc,"",eF,eB,"paste")}eE.replaceSelection(eG,null,"paste");db(eE)}}catch(eC){}}}function I(ex,ez){if(cA&&(!ex.state.draggingText||+new Date-P<100)){c2(ez);return}if(ar(ex,ez)||aG(ex.display,ez)){return}var ew=ex.getSelection();ez.dataTransfer.setData("Text",ew);if(ez.dataTransfer.setDragImage&&!ag){var ey=ej("img",null,null,"position: fixed; left: 0; top: 0;");ey.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(d1){ey.width=ey.height=1;ex.display.wrapper.appendChild(ey);ey._top=ey.offsetTop}ez.dataTransfer.setDragImage(ey,0,0);if(d1){ey.parentNode.removeChild(ey)}}}function F(ew,ex){if(Math.abs(ew.doc.scrollTop-ex)<2){return}ew.doc.scrollTop=ex;if(!bI){cB(ew,[],ex)}if(ew.display.scroller.scrollTop!=ex){ew.display.scroller.scrollTop=ex}if(ew.display.scrollbarV.scrollTop!=ex){ew.display.scrollbarV.scrollTop=ex}if(bI){cB(ew,[])}cU(ew,100)}function a3(ew,ey,ex){if(ex?ey==ew.doc.scrollLeft:Math.abs(ew.doc.scrollLeft-ey)<2){return}ey=Math.min(ey,ew.display.scroller.scrollWidth-ew.display.scroller.clientWidth);ew.doc.scrollLeft=ey;df(ew);if(ew.display.scroller.scrollLeft!=ey){ew.display.scroller.scrollLeft=ey}if(ew.display.scrollbarH.scrollLeft!=ey){ew.display.scrollbarH.scrollLeft=ey}}var dQ=0,bA=null;if(cf){bA=-0.53}else{if(bI){bA=15}else{if(cg){bA=-0.7}else{if(ag){bA=-1/3}}}}function b(eC,ex){var eF=ex.wheelDeltaX,eE=ex.wheelDeltaY;if(eF==null&&ex.detail&&ex.axis==ex.HORIZONTAL_AXIS){eF=ex.detail}if(eE==null&&ex.detail&&ex.axis==ex.VERTICAL_AXIS){eE=ex.detail}else{if(eE==null){eE=ex.wheelDelta}}var ez=eC.display,eB=ez.scroller;if(!(eF&&eB.scrollWidth>eB.clientWidth||eE&&eB.scrollHeight>eB.clientHeight)){return}if(eE&&bq&&b8){for(var eD=ex.target;eD!=eB;eD=eD.parentNode){if(eD.lineObj){eC.display.currentWheelTarget=eD;break}}}if(eF&&!bI&&!d1&&bA!=null){if(eE){F(eC,Math.max(0,Math.min(eB.scrollTop+eE*bA,eB.scrollHeight-eB.clientHeight)))}a3(eC,Math.max(0,Math.min(eB.scrollLeft+eF*bA,eB.scrollWidth-eB.clientWidth)));bV(ex);ez.wheelStartX=null;return}if(eE&&bA!=null){var ew=eE*bA;var eA=eC.doc.scrollTop,ey=eA+ez.wrapper.clientHeight;if(ew<0){eA=Math.max(0,eA+ew-50)}else{ey=Math.min(eC.doc.height,ey+ew+50)}cB(eC,[],{top:eA,bottom:ey})}if(dQ<20){if(ez.wheelStartX==null){ez.wheelStartX=eB.scrollLeft;ez.wheelStartY=eB.scrollTop;ez.wheelDX=eF;ez.wheelDY=eE;setTimeout(function(){if(ez.wheelStartX==null){return}var eG=eB.scrollLeft-ez.wheelStartX;var eI=eB.scrollTop-ez.wheelStartY;var eH=(eI&&ez.wheelDY&&eI/ez.wheelDY)||(eG&&ez.wheelDX&&eG/ez.wheelDX);ez.wheelStartX=ez.wheelStartY=null;if(!eH){return}bA=(bA*dQ+eH)/(dQ+1);++dQ},200)}else{ez.wheelDX+=eF;ez.wheelDY+=eE}}}function ef(ex,eA,ew){if(typeof eA=="string"){eA=dd[eA];if(!eA){return false}}if(ex.display.pollingFast&&bB(ex)){ex.display.pollingFast=false}var eB=ex.doc,ez=eB.sel.shift,ey=false;try{if(S(ex)){ex.state.suppressEdits=true}if(ew){eB.sel.shift=false}ey=eA(ex)!=bv}finally{eB.sel.shift=ez;ex.state.suppressEdits=false}return ey}function cr(ew){var ex=ew.state.keyMaps.slice(0);if(ew.options.extraKeys){ex.push(ew.options.extraKeys)}ex.push(ew.options.keyMap);return ex}var Z;function dN(ew,eC){var ex=eh(ew.options.keyMap),eA=ex.auto;clearTimeout(Z);if(eA&&!dc(eC)){Z=setTimeout(function(){if(eh(ew.options.keyMap)==ex){ew.options.keyMap=(eA.call?eA.call(null,ew):eA);et(ew)}},50)}var ez=dW(eC,true),eB=false;if(!ez){return false}var ey=cr(ew);if(eC.shiftKey){eB=g("Shift-"+ez,ey,function(eD){return ef(ew,eD,true)})||g(ez,ey,function(eD){if(typeof eD=="string"?/^go[A-Z]/.test(eD):eD.motion){return ef(ew,eD)}})}else{eB=g(ez,ey,function(eD){return ef(ew,eD)})}if(eB){bV(eC);k(ew);if(bE){eC.oldKeyCode=eC.keyCode;eC.keyCode=0}O(ew,"keyHandled",ew,ez,eC)}return eB}function cX(ew,ez,ex){var ey=g("'"+ex+"'",cr(ew),function(eA){return ef(ew,eA,true)});if(ey){bV(ez);k(ew);O(ew,"keyHandled",ew,"'"+ex+"'",ez)}return ey}var cm=null;function m(ez){var ew=this;if(!ew.state.focused){bS(ew)}if(ar(ew,ez)||ew.options.onKeyEvent&&ew.options.onKeyEvent(ew,Y(ez))){return}if(cf&&ez.keyCode==27){ez.returnValue=false}var ex=ez.keyCode;ew.doc.sel.shift=ex==16||ez.shiftKey;var ey=dN(ew,ez);if(d1){cm=ey?ex:null;if(!ey&&ex==88&&!ce&&(bq?ez.metaKey:ez.ctrlKey)){ew.replaceSelection("")}}}function bP(eA){var ew=this;if(ar(ew,eA)||ew.options.onKeyEvent&&ew.options.onKeyEvent(ew,Y(eA))){return}var ez=eA.keyCode,ex=eA.charCode;if(d1&&ez==cm){cm=null;bV(eA);return}if(((d1&&(!eA.which||eA.which<10))||aH)&&dN(ew,eA)){return}var ey=String.fromCharCode(ex==null?ez:ex);if(cX(ew,eA,ey)){return}if(cA&&!bE){ew.display.inputHasSelection=null}w(ew)}function bS(ew){if(ew.options.readOnly=="nocursor"){return}if(!ew.state.focused){ah(ew,"focus",ew);ew.state.focused=true;if(ew.display.wrapper.className.search(/\bCodeMirror-focused\b/)==-1){ew.display.wrapper.className+=" CodeMirror-focused"}if(!ew.curOp){dU(ew,true);if(b8){setTimeout(bO(dU,ew,true),0)}}}aR(ew);k(ew)}function au(ew){if(ew.state.focused){ah(ew,"blur",ew);ew.state.focused=false;ew.display.wrapper.className=ew.display.wrapper.className.replace(" CodeMirror-focused","")}clearInterval(ew.display.blinker);setTimeout(function(){if(!ew.state.focused){ew.doc.sel.shift=false}},150)}var d5;function ad(eG,eB){if(ar(eG,eB,"contextmenu")){return}var eD=eG.display,ex=eG.doc.sel;if(aG(eD,eB)||ck(eG,eB)){return}var eF=bH(eG,eB),ew=eD.scroller.scrollTop;if(!eF||d1){return}var eA=eG.options.resetSelectionOnContextMenu;if(eA&&(d8(ex.from,ex.to)||dK(eF,ex.from)||!dK(eF,ex.to))){b9(eG,bh)(eG.doc,eF,eF)}var eC=eD.input.style.cssText;eD.inputDiv.style.position="absolute";eD.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(eB.clientY-5)+"px; left: "+(eB.clientX-5)+"px; z-index: 1000; background: transparent; outline: none;border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);";db(eG);dU(eG,true);if(d8(ex.from,ex.to)){eD.input.value=eD.prevInput=" "}function ez(){if(eD.input.selectionStart!=null){var eH=eD.input.value="\u200b"+(d8(ex.from,ex.to)?"":eD.input.value);eD.prevInput="\u200b";eD.input.selectionStart=1;eD.input.selectionEnd=eH.length}}function eE(){eD.inputDiv.style.position="relative";eD.input.style.cssText=eC;if(bE){eD.scrollbarV.scrollTop=eD.scroller.scrollTop=ew}aR(eG);if(eD.input.selectionStart!=null){if(!cf||bE){ez()}clearTimeout(d5);var eH=0,eI=function(){if(eD.prevInput=="\u200b"&&eD.input.selectionStart==0){b9(eG,dd.selectAll)(eG)}else{if(eH++<10){d5=setTimeout(eI,500)}else{dU(eG)}}};d5=setTimeout(eI,200)}}if(cf&&!bE){ez()}if(bX){c2(eB);var ey=function(){cT(window,"mouseup",ey);setTimeout(eE,20)};bk(window,"mouseup",ey)}else{setTimeout(eE,50)}}var b5=B.changeEnd=function(ew){if(!ew.text){return ew.to}return K(ew.from.line+ew.text.length-1,d7(ew.text).length+(ew.text.length==1?ew.from.ch:0))};function de(eA,eC,eB){if(!dK(eC.from,eB)){return d9(eA,eB)}var ez=(eC.text.length-1)-(eC.to.line-eC.from.line);if(eB.line>eC.to.line+ez){var ey=eB.line-ez,ex=eA.first+eA.size-1;if(ey>ex){return K(ex,dJ(eA,ex).text.length)}return dX(eB,dJ(eA,ey).text.length)}if(eB.line==eC.to.line+ez){return dX(eB,d7(eC.text).length+(eC.text.length==1?eC.from.ch:0)+dJ(eA,eC.to.line).text.length-eC.to.ch)}var ew=eB.line-eC.from.line;return dX(eB,eC.text[ew].length+(ew?0:eC.from.ch))}function dO(ex,eA,ey){if(ey&&typeof ey=="object"){return{anchor:de(ex,eA,ey.anchor),head:de(ex,eA,ey.head)}}if(ey=="start"){return{anchor:eA.from,head:eA.from}}var ew=b5(eA);if(ey=="around"){return{anchor:eA.from,head:ew}}if(ey=="end"){return{anchor:ew,head:ew}}var ez=function(eD){if(dK(eD,eA.from)){return eD}if(!dK(eA.to,eD)){return ew}var eB=eD.line+eA.text.length-(eA.to.line-eA.from.line)-1,eC=eD.ch;if(eD.line==eA.to.line){eC+=ew.ch-eA.to.ch}return K(eB,eC)};return{anchor:ez(ex.sel.anchor),head:ez(ex.sel.head)}}function cG(ex,ez,ey){var ew={canceled:false,from:ez.from,to:ez.to,text:ez.text,origin:ez.origin,cancel:function(){this.canceled=true}};if(ey){ew.update=function(eD,eC,eB,eA){if(eD){this.from=d9(ex,eD)}if(eC){this.to=d9(ex,eC)}if(eB){this.text=eB}if(eA!==undefined){this.origin=eA}}}ah(ex,"beforeChange",ex,ew);if(ex.cm){ah(ex.cm,"beforeChange",ex.cm,ew)}if(ew.canceled){return null}return{from:ew.from,to:ew.to,text:ew.text,origin:ew.origin}}function aL(ez,eB,eA,ey){if(ez.cm){if(!ez.cm.curOp){return b9(ez.cm,aL)(ez,eB,eA,ey)}if(ez.cm.state.suppressEdits){return}}if(dP(ez,"beforeChange")||ez.cm&&dP(ez.cm,"beforeChange")){eB=cG(ez,eB,true);if(!eB){return}}var ex=eq&&!ey&&bW(ez,eB.from,eB.to);if(ex){for(var ew=ex.length-1;ew>=1;--ew){ap(ez,{from:ex[ew].from,to:ex[ew].to,text:[""]})}if(ex.length){ap(ez,{from:ex[0].from,to:ex[0].to,text:eB.text},eA)}}else{ap(ez,eB,eA)}}function ap(ey,eA,ez){if(eA.text.length==1&&eA.text[0]==""&&d8(eA.from,eA.to)){return}var ex=dO(ey,eA,ez);di(ey,eA,ex,ey.cm?ey.cm.curOp.id:NaN);cS(ey,eA,ex,cY(ey,eA));var ew=[];cN(ey,function(eC,eB){if(!eB&&cl(ew,eC.history)==-1){cz(eC.history,eA);ew.push(eC.history)}cS(eC,eA,null,cY(eC,eA))})}function bs(eF,eC){if(eF.cm&&eF.cm.state.suppressEdits){return}var eB=eF.history;var ex=(eC=="undo"?eB.done:eB.undone).pop();if(!ex){return}var eD={changes:[],anchorBefore:ex.anchorAfter,headBefore:ex.headAfter,anchorAfter:ex.anchorBefore,headAfter:ex.headBefore,generation:eB.generation};(eC=="undo"?eB.undone:eB.done).push(eD);eB.generation=ex.generation||++eB.maxGeneration;var ey=dP(eF,"beforeChange")||eF.cm&&dP(eF.cm,"beforeChange");for(var ez=ex.changes.length-1;ez>=0;--ez){var eE=ex.changes[ez];eE.origin=eC;if(ey&&!cG(eF,eE,false)){(eC=="undo"?eB.done:eB.undone).length=0;return}eD.changes.push(cs(eF,eE));var ew=ez?dO(eF,eE,null):{anchor:ex.anchorBefore,head:ex.headBefore};cS(eF,eE,ew,cP(eF,eE));var eA=[];cN(eF,function(eH,eG){if(!eG&&cl(eA,eH.history)==-1){cz(eH.history,eE);eA.push(eH.history)}cS(eH,eE,null,cP(eH,eE))})}}function dR(ew,ey){function ex(ez){return K(ez.line+ey,ez.ch)}ew.first+=ey;if(ew.cm){Q(ew.cm,ew.first,ew.first,ey)}ew.sel.head=ex(ew.sel.head);ew.sel.anchor=ex(ew.sel.anchor);ew.sel.from=ex(ew.sel.from);ew.sel.to=ex(ew.sel.to)}function cS(eA,eB,ez,ex){if(eA.cm&&!eA.cm.curOp){return b9(eA.cm,cS)(eA,eB,ez,ex)}if(eB.to.line<eA.first){dR(eA,eB.text.length-1-(eB.to.line-eB.from.line));return}if(eB.from.line>eA.lastLine()){return}if(eB.from.line<eA.first){var ew=eB.text.length-1-(eA.first-eB.from.line);dR(eA,ew);eB={from:K(eA.first,0),to:K(eB.to.line+ew,eB.to.ch),text:[d7(eB.text)],origin:eB.origin}}var ey=eA.lastLine();if(eB.to.line>ey){eB={from:eB.from,to:K(ey,dJ(eA,ey).text.length),text:[eB.text[0]],origin:eB.origin}}eB.removed=el(eA,eB.from,eB.to);if(!ez){ez=dO(eA,eB,null)}if(eA.cm){al(eA.cm,eB,ex,ez)}else{d2(eA,eB,ex,ez)}}function al(eG,eC,ez,ew){var eF=eG.doc,eB=eG.display,eD=eC.from,eE=eC.to;var ex=false,ey=eD.line;if(!eG.options.lineWrapping){ey=bc(u(eF,dJ(eF,eD.line)));eF.iter(ey,eE.line+1,function(eJ){if(eJ==eB.maxLine){ex=true;return true}})}if(!dK(eF.sel.head,eC.from)&&!dK(eC.to,eF.sel.head)){eG.curOp.cursorActivity=true}d2(eF,eC,ez,ew,aJ(eG));if(!eG.options.lineWrapping){eF.iter(ey,eD.line+eC.text.length,function(eK){var eJ=c0(eF,eK);if(eJ>eB.maxLineLength){eB.maxLine=eK;eB.maxLineLength=eJ;eB.maxLineChanged=true;ex=false}});if(ex){eG.curOp.updateMaxLine=true}}eF.frontier=Math.min(eF.frontier,eD.line);cU(eG,400);var eI=eC.text.length-(eE.line-eD.line)-1;Q(eG,eD.line,eE.line+1,eI);if(dP(eG,"change")){var eA={from:eD,to:eE,text:eC.text,removed:eC.removed,origin:eC.origin};if(eG.curOp.textChanged){for(var eH=eG.curOp.textChanged;eH.next;eH=eH.next){}eH.next=eA}else{eG.curOp.textChanged=eA}}}function az(ez,ey,eB,eA,ew){if(!eA){eA=eB}if(dK(eA,eB)){var ex=eA;eA=eB;eB=ex}if(typeof ey=="string"){ey=ay(ey)}aL(ez,{from:eB,to:eA,text:ey,origin:ew},null)}function K(ew,ex){if(!(this instanceof K)){return new K(ew,ex)}this.line=ew;this.ch=ex}B.Pos=K;function d8(ex,ew){return ex.line==ew.line&&ex.ch==ew.ch}function dK(ex,ew){return ex.line<ew.line||(ex.line==ew.line&&ex.ch<ew.ch)}function bz(ex,ew){return ex.line-ew.line||ex.ch-ew.ch}function bC(ew){return K(ew.line,ew.ch)}function cb(ew,ex){return Math.max(ew.first,Math.min(ex,ew.first+ew.size-1))}function d9(ex,ey){if(ey.line<ex.first){return K(ex.first,0)}var ew=ex.first+ex.size-1;if(ey.line>ew){return K(ew,dJ(ex,ew).text.length)}return dX(ey,dJ(ex,ey.line).text.length)}function dX(ey,ex){var ew=ey.ch;if(ew==null||ew>ex){return K(ey.line,ex)}else{if(ew<0){return K(ey.line,0)}else{return ey}}}function bt(ex,ew){return ew>=ex.first&&ew<ex.first+ex.size}function eg(eA,eB,ew,ex){if(eA.sel.shift||eA.sel.extend){var ez=eA.sel.anchor;if(ew){var ey=dK(eB,ez);if(ey!=dK(ew,ez)){ez=eB;eB=ew}else{if(ey!=dK(eB,ew)){eB=ew}}}bh(eA,ez,eB,ex)}else{bh(eA,eB,ew||eB,ex)}if(eA.cm){eA.cm.curOp.userSelChange=true}}function c(ez,ew,ex){var ey={anchor:ew,head:ex};ah(ez,"beforeSelectionChange",ez,ey);if(ez.cm){ah(ez.cm,"beforeSelectionChange",ez.cm,ey)}ey.anchor=d9(ez,ey.anchor);ey.head=d9(ez,ey.head);return ey}function bh(eD,eA,eB,ey,ex){if(!ex&&dP(eD,"beforeSelectionChange")||eD.cm&&dP(eD.cm,"beforeSelectionChange")){var ez=c(eD,eA,eB);eB=ez.head;eA=ez.anchor}var eC=eD.sel;eC.goalColumn=null;if(ey==null){ey=dK(eB,eC.head)?-1:1}if(ex||!d8(eA,eC.anchor)){eA=bi(eD,eA,ey,ex!="push")}if(ex||!d8(eB,eC.head)){eB=bi(eD,eB,ey,ex!="push")}if(d8(eC.anchor,eA)&&d8(eC.head,eB)){return}eC.anchor=eA;eC.head=eB;var ew=dK(eB,eA);eC.from=ew?eB:eA;eC.to=ew?eA:eB;if(eD.cm){eD.cm.curOp.updateInput=eD.cm.curOp.selectionChanged=eD.cm.curOp.cursorActivity=true}O(eD,"cursorActivity",eD)}function c7(ew){bh(ew.doc,ew.doc.sel.from,ew.doc.sel.to,null,"push")}function bi(eF,eE,eB,eC){var eG=false,ey=eE;var ez=eB||1;eF.cantEdit=false;search:for(;;){var eH=dJ(eF,ey.line);if(eH.markedSpans){for(var eA=0;eA<eH.markedSpans.length;++eA){var ew=eH.markedSpans[eA],ex=ew.marker;if((ew.from==null||(ex.inclusiveLeft?ew.from<=ey.ch:ew.from<ey.ch))&&(ew.to==null||(ex.inclusiveRight?ew.to>=ey.ch:ew.to>ey.ch))){if(eC){ah(ex,"beforeCursorEnter");if(ex.explicitlyCleared){if(!eH.markedSpans){break}else{--eA;continue}}}if(!ex.atomic){continue}var eD=ex.find()[ez<0?"from":"to"];if(d8(eD,ey)){eD.ch+=ez;if(eD.ch<0){if(eD.line>eF.first){eD=d9(eF,K(eD.line-1))}else{eD=null}}else{if(eD.ch>eH.text.length){if(eD.line<eF.first+eF.size-1){eD=K(eD.line+1,0)}else{eD=null}}}if(!eD){if(eG){if(!eC){return bi(eF,eE,eB,true)}eF.cantEdit=true;return K(eF.first,0)}eG=true;eD=eE;ez=-ez}}ey=eD;continue search}}}return ey}}function ae(ex){var eA=x(ex,ex.doc.sel.head,null,ex.options.cursorScrollMargin);if(!ex.state.focused){return}var eB=ex.display,ey=an(eB.sizer),ew=null;if(eA.top+ey.top<0){ew=true}else{if(eA.bottom+ey.top>(window.innerHeight||document.documentElement.clientHeight)){ew=false}}if(ew!=null&&!dY){var ez=ej("div","\u200b",null,"position: absolute; top: "+(eA.top-eB.viewOffset)+"px; height: "+(eA.bottom-eA.top+aO)+"px; left: "+eA.left+"px; width: 2px;");ex.display.lineSpace.appendChild(ez);ez.scrollIntoView(ew);ex.display.lineSpace.removeChild(ez)}}function x(eF,eD,eA,ez){if(ez==null){ez=0}for(;;){var eB=false,eE=cH(eF,eD);var ew=!eA||eA==eD?eE:cH(eF,eA);var ey=A(eF,Math.min(eE.left,ew.left),Math.min(eE.top,ew.top)-ez,Math.max(eE.left,ew.left),Math.max(eE.bottom,ew.bottom)+ez);var eC=eF.doc.scrollTop,ex=eF.doc.scrollLeft;if(ey.scrollTop!=null){F(eF,ey.scrollTop);if(Math.abs(eF.doc.scrollTop-eC)>1){eB=true}}if(ey.scrollLeft!=null){a3(eF,ey.scrollLeft);if(Math.abs(eF.doc.scrollLeft-ex)>1){eB=true}}if(!eB){return eE}}}function z(ew,ey,eA,ex,ez){var eB=A(ew,ey,eA,ex,ez);if(eB.scrollTop!=null){F(ew,eB.scrollTop)}if(eB.scrollLeft!=null){a3(ew,eB.scrollLeft)}}function A(eC,eK,ez,eJ,ey){var eH=eC.display,eG=aw(eC.display);if(ez<0){ez=0}var ex=eH.scroller.clientHeight-aO,eF=eH.scroller.scrollTop,eE={};var eM=eC.doc.height+a7(eH);var eN=ez<eG,eI=ey>eM-eG;if(ez<eF){eE.scrollTop=eN?0:ez}else{if(ey>eF+ex){var eD=Math.min(ez,(eI?eM:ey)-ex);if(eD!=eF){eE.scrollTop=eD}}}var eB=eH.scroller.clientWidth-aO,ew=eH.scroller.scrollLeft;eK+=eH.gutters.offsetWidth;eJ+=eH.gutters.offsetWidth;var eA=eH.gutters.offsetWidth;var eL=eK<eA+10;if(eK<ew+eA||eL){if(eL){eK=0}eE.scrollLeft=Math.max(0,eK-10-eA)}else{if(eJ>eB+ew-3){eE.scrollLeft=eJ+10-eB}}return eE}function y(ew,ey,ex){ew.curOp.updateScrollPos={scrollLeft:ey==null?ew.doc.scrollLeft:ey,scrollTop:ex==null?ew.doc.scrollTop:ex}}function b0(ex,ez,ey){var eA=ex.curOp.updateScrollPos||(ex.curOp.updateScrollPos={scrollLeft:ex.doc.scrollLeft,scrollTop:ex.doc.scrollTop});var ew=ex.display.scroller;eA.scrollTop=Math.max(0,Math.min(ew.scrollHeight-ew.clientHeight,eA.scrollTop+ey));eA.scrollLeft=Math.max(0,Math.min(ew.scrollWidth-ew.clientWidth,eA.scrollLeft+ez))}function N(eI,ez,eH,ey){var eG=eI.doc;if(eH==null){eH="add"}if(eH=="smart"){if(!eI.doc.mode.indent){eH="prev"}else{var ex=cw(eI,ez)}}var eC=eI.options.tabSize;var eJ=dJ(eG,ez),eB=bg(eJ.text,null,eC);var ew=eJ.text.match(/^\s*/)[0],eE;if(!ey&&!/\S/.test(eJ.text)){eE=0;eH="not"}else{if(eH=="smart"){eE=eI.doc.mode.indent(ex,eJ.text.slice(ew.length),eJ.text);if(eE==bv){if(!ey){return}eH="prev"}}}if(eH=="prev"){if(ez>eG.first){eE=bg(dJ(eG,ez-1).text,null,eC)}else{eE=0}}else{if(eH=="add"){eE=eB+eI.options.indentUnit}else{if(eH=="subtract"){eE=eB-eI.options.indentUnit}else{if(typeof eH=="number"){eE=eB+eH}}}}eE=Math.max(0,eE);var eF="",eD=0;if(eI.options.indentWithTabs){for(var eA=Math.floor(eE/eC);eA;--eA){eD+=eC;eF+="\t"}}if(eD<eE){eF+=bJ(eE-eD)}if(eF!=ew){az(eI.doc,eF,K(ez,0),K(ez,ew.length),"+input")}else{if(eG.sel.head.line==ez&&eG.sel.head.ch<ew.length){bh(eG,K(ez,ew.length),K(ez,ew.length),1)}}eJ.stateAfter=null}function c9(ew,ey,eB){var eA=ey,ex=ey,ez=ew.doc;if(typeof ey=="number"){ex=dJ(ez,cb(ez,ey))}else{eA=bc(ey)}if(eA==null){return null}if(eB(ex,eA)){Q(ew,eA,eA+1)}else{return null}return ex}function aZ(eN,ez,eH,eG,eB){var eE=ez.line,eF=ez.ch,eM=eH;var ew=dJ(eN,eE);var eK=true;function eL(){var eO=eE+eH;if(eO<eN.first||eO>=eN.first+eN.size){return(eK=false)}eE=eO;return ew=dJ(eN,eO)}function eJ(eP){var eO=(eB?q:R)(ew,eF,eH,true);if(eO==null){if(!eP&&eL()){if(eB){eF=(eH<0?b4:bU)(ew)}else{eF=eH<0?ew.text.length:0}}else{return(eK=false)}}else{eF=eO}return true}if(eG=="char"){eJ()}else{if(eG=="column"){eJ(true)}else{if(eG=="word"||eG=="group"){var eI=null,eC=eG=="group";for(var eA=true;;eA=false){if(eH<0&&!eJ(!eA)){break}var ex=ew.text.charAt(eF)||"\n";var ey=bR(ex)?"w":!eC?null:/\s/.test(ex)?null:"p";if(eI&&eI!=ey){if(eH<0){eH=1;eJ()}break}if(ey){eI=ey}if(eH>0&&!eJ(!eA)){break}}}}}var eD=bi(eN,K(eE,eF),eM,true);if(!eK){eD.hitSide=true}return eD}function aV(eE,ez,ew,eD){var eC=eE.doc,eB=ez.left,eA;if(eD=="page"){var ey=Math.min(eE.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);eA=ez.top+ew*(ey-(ew<0?1.5:0.5)*aw(eE.display))}else{if(eD=="line"){eA=ew>0?ez.bottom+3:ez.top-3}}for(;;){var ex=ed(eE,eB,eA);if(!ex.outside){break}if(ew<0?eA<=0:eA>=eC.height){ex.hitSide=true;break}eA+=ew*5}return ex}function ab(ez,eB){var eA=eB.ch,ey=eB.ch;if(ez){if((eB.xRel<0||ey==ez.length)&&eA){--eA}else{++ey}var ex=ez.charAt(eA);var ew=bR(ex)?bR:/\s/.test(ex)?function(eC){return/\s/.test(eC)}:function(eC){return !/\s/.test(eC)&&!bR(eC)};while(eA>0&&ew(ez.charAt(eA-1))){--eA}while(ey<ez.length&&ew(ez.charAt(ey))){++ey}}return{from:K(eB.line,eA),to:K(eB.line,ey)}}function aQ(ew,ex){eg(ew.doc,K(ex,0),d9(ew.doc,K(ex+1,0)))}B.prototype={constructor:B,focus:function(){window.focus();db(this);w(this)},setOption:function(ey,ez){var ex=this.options,ew=ex[ey];if(ex[ey]==ez&&ey!="mode"){return}ex[ey]=ez;if(aK.hasOwnProperty(ey)){b9(this,aK[ey])(this,ez,ew)}},getOption:function(ew){return this.options[ew]},getDoc:function(){return this.doc},addKeyMap:function(ex,ew){this.state.keyMaps[ew?"push":"unshift"](ex)},removeKeyMap:function(ex){var ey=this.state.keyMaps;for(var ew=0;ew<ey.length;++ew){if(ey[ew]==ex||(typeof ey[ew]!="string"&&ey[ew].name==ex)){ey.splice(ew,1);return true}}},addOverlay:b9(null,function(ew,ex){var ey=ew.token?ew:B.getMode(this.options,ew);if(ey.startState){throw new Error("Overlays may not be stateful.")}this.state.overlays.push({mode:ey,modeSpec:ew,opaque:ex&&ex.opaque});this.state.modeGen++;Q(this)}),removeOverlay:b9(null,function(ew){var ey=this.state.overlays;for(var ex=0;ex<ey.length;++ex){var ez=ey[ex].modeSpec;if(ez==ew||typeof ew=="string"&&ez.name==ew){ey.splice(ex,1);this.state.modeGen++;Q(this);return}}}),indentLine:b9(null,function(ey,ew,ex){if(typeof ew!="string"&&typeof ew!="number"){if(ew==null){ew=this.options.smartIndent?"smart":"prev"}else{ew=ew?"add":"subtract"}}if(bt(this.doc,ey)){N(this,ey,ew,ex)}}),indentSelection:b9(null,function(ex){var ey=this.doc.sel;if(d8(ey.from,ey.to)){return N(this,ey.from.line,ex,true)}var ez=ey.to.line-(ey.to.ch?0:1);for(var ew=ey.from.line;ew<=ez;++ew){N(this,ew,ex)}}),getTokenAt:function(eD,ex){var eA=this.doc;eD=d9(eA,eD);var ez=cw(this,eD.line,ex),eC=this.doc.mode;var ew=dJ(eA,eD.line);var eB=new ds(ew.text,this.options.tabSize);while(eB.pos<eD.ch&&!eB.eol()){eB.start=eB.pos;var ey=eC.token(eB,ez)}return{start:eB.start,end:eB.pos,string:eB.current(),className:ey||null,type:ey||null,state:ez}},getTokenTypeAt:function(eB){eB=d9(this.doc,eB);var ey=cd(this,dJ(this.doc,eB.line));var ez=0,eA=(ey.length-1)/2,ex=eB.ch;if(ex==0){return ey[2]}for(;;){var ew=(ez+eA)>>1;if((ew?ey[ew*2-1]:0)>=ex){eA=ew}else{if(ey[ew*2+1]<ex){ez=ew+1}else{return ey[ew*2+2]}}}},getModeAt:function(ex){var ew=this.doc.mode;if(!ew.innerMode){return ew}return B.innerMode(ew,this.getTokenAt(ex).state).mode},getHelper:function(ex,ew){return this.getHelpers(ex,ew)[0]},getHelpers:function(eD,ey){var ez=[];if(!dS.hasOwnProperty(ey)){return dS}var ew=dS[ey],eC=this.getModeAt(eD);if(typeof eC[ey]=="string"){if(ew[eC[ey]]){ez.push(ew[eC[ey]])}}else{if(eC[ey]){for(var ex=0;ex<eC[ey].length;ex++){var eB=ew[eC[ey][ex]];if(eB){ez.push(eB)}}}else{if(eC.helperType&&ew[eC.helperType]){ez.push(ew[eC.helperType])}else{if(ew[eC.name]){ez.push(ew[eC.name])}}}}for(var ex=0;ex<ew._global.length;ex++){var eA=ew._global[ex];if(eA.pred(eC,this)&&cl(ez,eA.val)==-1){ez.push(eA.val)}}return ez},getStateAfter:function(ex,ew){var ey=this.doc;ex=cb(ey,ex==null?ey.first+ey.size-1:ex);return cw(this,ex+1,ew)},cursorCoords:function(ez,ex){var ey,ew=this.doc.sel;if(ez==null){ey=ew.head}else{if(typeof ez=="object"){ey=d9(this.doc,ez)}else{ey=ez?ew.from:ew.to}}return cH(this,ey,ex||"page")},charCoords:function(ex,ew){return bZ(this,d9(this.doc,ex),ew||"page")},coordsChar:function(ew,ex){ew=es(this,ew,ex||"page");return ed(this,ew.left,ew.top)},lineAtHeight:function(ew,ex){ew=es(this,{top:ew,left:0},ex||"page").top;return a5(this.doc,ew+this.display.viewOffset)},heightAtLine:function(ex,eA){var ew=false,ez=this.doc.first+this.doc.size-1;if(ex<this.doc.first){ex=this.doc.first}else{if(ex>ez){ex=ez;ew=true}}var ey=dJ(this.doc,ex);return dp(this,dJ(this.doc,ex),{top:0,left:0},eA||"page").top+(ew?ey.height:0)},defaultTextHeight:function(){return aw(this.display)},defaultCharWidth:function(){return cy(this.display)},setGutterMarker:b9(null,function(ew,ex,ey){return c9(this,ew,function(ez){var eA=ez.gutterMarkers||(ez.gutterMarkers={});eA[ex]=ey;if(!ey&&dt(eA)){ez.gutterMarkers=null}return true})}),clearGutter:b9(null,function(ey){var ew=this,ez=ew.doc,ex=ez.first;ez.iter(function(eA){if(eA.gutterMarkers&&eA.gutterMarkers[ey]){eA.gutterMarkers[ey]=null;Q(ew,ex,ex+1);if(dt(eA.gutterMarkers)){eA.gutterMarkers=null}}++ex})}),addLineClass:b9(null,function(ey,ex,ew){return c9(this,ey,function(ez){var eA=ex=="text"?"textClass":ex=="background"?"bgClass":"wrapClass";if(!ez[eA]){ez[eA]=ew}else{if(new RegExp("(?:^|\\s)"+ew+"(?:$|\\s)").test(ez[eA])){return false}else{ez[eA]+=" "+ew}}return true})}),removeLineClass:b9(null,function(ey,ex,ew){return c9(this,ey,function(eA){var eD=ex=="text"?"textClass":ex=="background"?"bgClass":"wrapClass";var eC=eA[eD];if(!eC){return false}else{if(ew==null){eA[eD]=null}else{var eB=eC.match(new RegExp("(?:^|\\s+)"+ew+"(?:$|\\s+)"));if(!eB){return false}var ez=eB.index+eB[0].length;eA[eD]=eC.slice(0,eB.index)+(!eB.index||ez==eC.length?"":" ")+eC.slice(ez)||null}}return true})}),addLineWidget:b9(null,function(ey,ex,ew){return a6(this,ey,ex,ew)}),removeLineWidget:function(ew){ew.clear()},lineInfo:function(ew){if(typeof ew=="number"){if(!bt(this.doc,ew)){return null}var ex=ew;ew=dJ(this.doc,ew);if(!ew){return null}}else{var ex=bc(ew);if(ex==null){return null}}return{line:ex,handle:ew,text:ew.text,gutterMarkers:ew.gutterMarkers,textClass:ew.textClass,bgClass:ew.bgClass,wrapClass:ew.wrapClass,widgets:ew.widgets}},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo}},addWidget:function(eB,ey,eD,ez,eF){var eA=this.display;eB=cH(this,d9(this.doc,eB));var eC=eB.bottom,ex=eB.left;ey.style.position="absolute";eA.sizer.appendChild(ey);if(ez=="over"){eC=eB.top}else{if(ez=="above"||ez=="near"){var ew=Math.max(eA.wrapper.clientHeight,this.doc.height),eE=Math.max(eA.sizer.clientWidth,eA.lineSpace.clientWidth);if((ez=="above"||eB.bottom+ey.offsetHeight>ew)&&eB.top>ey.offsetHeight){eC=eB.top-ey.offsetHeight}else{if(eB.bottom+ey.offsetHeight<=ew){eC=eB.bottom}}if(ex+ey.offsetWidth>eE){ex=eE-ey.offsetWidth}}}ey.style.top=eC+"px";ey.style.left=ey.style.right="";if(eF=="right"){ex=eA.sizer.clientWidth-ey.offsetWidth;ey.style.right="0px"}else{if(eF=="left"){ex=0}else{if(eF=="middle"){ex=(eA.sizer.clientWidth-ey.offsetWidth)/2}}ey.style.left=ex+"px"}if(eD){z(this,ex,eC,ex+ey.offsetWidth,eC+ey.offsetHeight)}},triggerOnKeyDown:b9(null,m),execCommand:function(ew){if(dd.hasOwnProperty(ew)){return dd[ew](this)}},findPosH:function(eC,ez,eA,ex){var ew=1;if(ez<0){ew=-1;ez=-ez}for(var ey=0,eB=d9(this.doc,eC);ey<ez;++ey){eB=aZ(this.doc,eB,ew,eA,ex);if(eB.hitSide){break}}return eB},moveH:b9(null,function(ew,ex){var ey=this.doc.sel,ez;if(ey.shift||ey.extend||d8(ey.from,ey.to)){ez=aZ(this.doc,ey.head,ew,ex,this.options.rtlMoveVisually)}else{ez=ew<0?ey.from:ey.to}eg(this.doc,ez,ez,ew)}),deleteH:b9(null,function(ew,ex){var ey=this.doc.sel;if(!d8(ey.from,ey.to)){az(this.doc,"",ey.from,ey.to,"+delete")}else{az(this.doc,"",ey.from,aZ(this.doc,ey.head,ew,ex,false),"+delete")}this.curOp.userSelChange=true}),findPosV:function(eB,ey,eC,eE){var ew=1,eA=eE;if(ey<0){ew=-1;ey=-ey}for(var ex=0,eD=d9(this.doc,eB);ex<ey;++ex){var ez=cH(this,eD,"div");if(eA==null){eA=ez.left}else{ez.left=eA}eD=aV(this,ez,ew,eC);if(eD.hitSide){break}}return eD},moveV:b9(null,function(ex,ey){var ez=this.doc.sel,eA,ew;if(ez.shift||ez.extend||d8(ez.from,ez.to)){var eB=cH(this,ez.head,"div");if(ez.goalColumn!=null){eB.left=ez.goalColumn}eA=aV(this,eB,ex,ey);if(ey=="page"){b0(this,0,bZ(this,eA,"div").top-eB.top)}ew=eB.left}else{eA=ex<0?ez.from:ez.to}eg(this.doc,eA,eA,ex);if(ew!=null){ez.goalColumn=ew}}),toggleOverwrite:function(ew){if(ew!=null&&ew==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){this.display.cursor.className+=" CodeMirror-overwrite"}else{this.display.cursor.className=this.display.cursor.className.replace(" CodeMirror-overwrite","")}},hasFocus:function(){return this.state.focused},scrollTo:b9(null,function(ew,ex){y(this,ew,ex)}),getScrollInfo:function(){var ew=this.display.scroller,ex=aO;return{left:ew.scrollLeft,top:ew.scrollTop,height:ew.scrollHeight-ex,width:ew.scrollWidth-ex,clientHeight:ew.clientHeight-ex,clientWidth:ew.clientWidth-ex}},scrollIntoView:b9(null,function(ex,ez){if(ex==null){ex={from:this.doc.sel.head,to:null}}else{if(typeof ex=="number"){ex={from:K(ex,0),to:null}}else{if(ex.from==null){ex={from:ex,to:null}}}}if(!ex.to){ex.to=ex.from}if(!ez){ez=0}var ey=ex;if(ex.from.line!=null){this.curOp.scrollToPos={from:ex.from,to:ex.to,margin:ez};ey={from:cH(this,ex.from),to:cH(this,ex.to)}}var ew=A(this,Math.min(ey.from.left,ey.to.left),Math.min(ey.from.top,ey.to.top)-ez,Math.max(ey.from.right,ey.to.right),Math.max(ey.from.bottom,ey.to.bottom)+ez);y(this,ew.scrollLeft,ew.scrollTop)}),setSize:b9(null,function(ey,ew){function ex(ez){return typeof ez=="number"||/^\d+$/.test(String(ez))?ez+"px":ez}if(ey!=null){this.display.wrapper.style.width=ex(ey)}if(ew!=null){this.display.wrapper.style.height=ex(ew)}if(this.options.lineWrapping){this.display.measureLineCache.length=this.display.measureLineCachePos=0}this.curOp.forceUpdate=true}),operation:function(ew){return b1(this,ew)},refresh:b9(null,function(){var ew=this.display.cachedTextHeight==null;T(this);y(this,this.doc.scrollLeft,this.doc.scrollTop);Q(this);if(ew){L(this)}}),swapDoc:b9(null,function(ex){var ew=this.doc;ew.cm=null;cQ(this,ex);T(this);dU(this,true);y(this,ex.scrollLeft,ex.scrollTop);O(this,"swapDoc",this,ew);return ew}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};a0(B);var aK=B.optionHandlers={};var dA=B.defaults={};function o(ew,ez,ey,ex){B.defaults[ew]=ez;if(ey){aK[ew]=ex?function(eA,eC,eB){if(eB!=bw){ey(eA,eC,eB)}}:ey}}var bw=B.Init={toString:function(){return"CodeMirror.Init"}};o("value","",function(ew,ex){ew.setValue(ex)},true);o("mode",null,function(ew,ex){ew.doc.modeOption=ex;aW(ew)},true);o("indentUnit",2,aW,true);o("indentWithTabs",false);o("smartIndent",true);o("tabSize",4,function(ew){cZ(ew);T(ew);Q(ew)},true);o("specialChars",/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g,function(ew,ex){ew.options.specialChars=new RegExp(ex.source+(ex.test("\t")?"":"|\t"),"g");ew.refresh()},true);o("specialCharPlaceholder",dH,function(ew){ew.refresh()},true);o("electricChars",true);o("rtlMoveVisually",!ao);o("wholeLineUpdateBefore",true);o("theme","default",function(ew){b2(ew);ct(ew)},true);o("keyMap","default",et);o("extraKeys",null);o("onKeyEvent",null);o("onDragEvent",null);o("lineWrapping",false,dj,true);o("gutters",[],function(ew){by(ew.options);ct(ew)},true);o("fixedGutter",true,function(ew,ex){ew.display.gutters.style.left=ex?cJ(ew.display)+"px":"0";ew.refresh()},true);o("coverGutterNextToScrollbar",false,dw,true);o("lineNumbers",false,function(ew){by(ew.options);ct(ew)},true);o("firstLineNumber",1,ct,true);o("lineNumberFormatter",function(ew){return ew},ct,true);o("showCursorWhenSelecting",false,a2,true);o("resetSelectionOnContextMenu",true);o("readOnly",false,function(ew,ex){if(ex=="nocursor"){au(ew);ew.display.input.blur();ew.display.disabled=true}else{ew.display.disabled=false;if(!ex){dU(ew,true)}}});o("disableInput",false,function(ew,ex){if(!ex){dU(ew,true)}},true);o("dragDrop",true);o("cursorBlinkRate",530);o("cursorScrollMargin",0);o("cursorHeight",1);o("workTime",100);o("workDelay",100);o("flattenSpans",true,cZ,true);o("addModeClass",false,cZ,true);o("pollInterval",100);o("undoDepth",40,function(ew,ex){ew.doc.history.undoDepth=ex});o("historyEventDelay",500);o("viewportMargin",10,function(ew){ew.refresh()},true);o("maxHighlightLength",10000,cZ,true);o("crudeMeasuringFrom",10000);o("moveInputWithCursor",true,function(ew,ex){if(!ex){ew.display.inputDiv.style.top=ew.display.inputDiv.style.left=0}});o("tabindex",null,function(ew,ex){ew.display.input.tabIndex=ex||""});o("autofocus",null);var cq=B.modes={},at=B.mimeModes={};B.defineMode=function(ew,ey){if(!B.defaults.mode&&ew!="null"){B.defaults.mode=ew}if(arguments.length>2){ey.dependencies=[];for(var ex=2;ex<arguments.length;++ex){ey.dependencies.push(arguments[ex])}}cq[ew]=ey};B.defineMIME=function(ex,ew){at[ex]=ew};B.resolveMode=function(ew){if(typeof ew=="string"&&at.hasOwnProperty(ew)){ew=at[ew]}else{if(ew&&typeof ew.name=="string"&&at.hasOwnProperty(ew.name)){var ex=at[ew.name];ew=bD(ex,ew);ew.name=ex.name}else{if(typeof ew=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ew)){return B.resolveMode("application/xml")}}}if(typeof ew=="string"){return{name:ew}}else{return ew||{name:"null"}}};B.getMode=function(ex,ew){var ew=B.resolveMode(ew);var ez=cq[ew.name];if(!ez){return B.getMode(ex,"text/plain")}var eA=ez(ex,ew);if(co.hasOwnProperty(ew.name)){var ey=co[ew.name];for(var eB in ey){if(!ey.hasOwnProperty(eB)){continue}if(eA.hasOwnProperty(eB)){eA["_"+eB]=eA[eB]}eA[eB]=ey[eB]}}eA.name=ew.name;if(ew.helperType){eA.helperType=ew.helperType}if(ew.modeProps){for(var eB in ew.modeProps){eA[eB]=ew.modeProps[eB]}}return eA};B.defineMode("null",function(){return{token:function(ew){ew.skipToEnd()}}});B.defineMIME("text/plain","null");var co=B.modeExtensions={};B.extendMode=function(ey,ex){var ew=co.hasOwnProperty(ey)?co[ey]:(co[ey]={});am(ex,ew)};B.defineExtension=function(ew,ex){B.prototype[ew]=ex};B.defineDocExtension=function(ew,ex){aa.prototype[ew]=ex};B.defineOption=o;var aE=[];B.defineInitHook=function(ew){aE.push(ew)};var dS=B.helpers={};B.registerHelper=function(ex,ew,ey){if(!dS.hasOwnProperty(ex)){dS[ex]=B[ex]={_global:[]}}dS[ex][ew]=ey};B.registerGlobalHelper=function(ey,ex,ew,ez){B.registerHelper(ey,ex,ez);dS[ey]._global.push({pred:ew,val:ez})};B.isWordChar=bR;function bo(ez,ew){if(ew===true){return ew}if(ez.copyState){return ez.copyState(ew)}var ey={};for(var eA in ew){var ex=ew[eA];if(ex instanceof Array){ex=ex.concat([])}ey[eA]=ex}return ey}B.copyState=bo;function bm(ey,ex,ew){return ey.startState?ey.startState(ex,ew):true}B.startState=bm;B.innerMode=function(ey,ew){while(ey.innerMode){var ex=ey.innerMode(ew);if(!ex||ex.mode==ey){break}ew=ex.state;ey=ex.mode}return ex||{mode:ey,state:ew}};var dd=B.commands={selectAll:function(ew){ew.setSelection(K(ew.firstLine(),0),K(ew.lastLine()))},killLine:function(ew){var ez=ew.getCursor(true),ey=ew.getCursor(false),ex=!d8(ez,ey);if(!ex&&ew.getLine(ez.line).length==ez.ch){ew.replaceRange("",ez,K(ez.line+1,0),"+delete")}else{ew.replaceRange("",ez,ex?ey:K(ez.line),"+delete")}},deleteLine:function(ew){var ex=ew.getCursor().line;ew.replaceRange("",K(ex,0),K(ex),"+delete")},delLineLeft:function(ew){var ex=ew.getCursor();ew.replaceRange("",K(ex.line,0),ex,"+delete")},undo:function(ew){ew.undo()},redo:function(ew){ew.redo()},goDocStart:function(ew){ew.extendSelection(K(ew.firstLine(),0))},goDocEnd:function(ew){ew.extendSelection(K(ew.lastLine()))},goLineStart:function(ew){ew.extendSelection(aY(ew,ew.getCursor().line))},goLineStartSmart:function(ex){var eB=ex.getCursor(),eC=aY(ex,eB.line);var ey=ex.getLineHandle(eC.line);var ew=a(ey);if(!ew||ew[0].level==0){var eA=Math.max(0,ey.text.search(/\S/));var ez=eB.line==eC.line&&eB.ch<=eA&&eB.ch;ex.extendSelection(K(eC.line,ez?0:eA))}else{ex.extendSelection(eC)}},goLineEnd:function(ew){ew.extendSelection(cE(ew,ew.getCursor().line))},goLineRight:function(ew){var ex=ew.charCoords(ew.getCursor(),"div").top+5;ew.extendSelection(ew.coordsChar({left:ew.display.lineDiv.offsetWidth+100,top:ex},"div"))},goLineLeft:function(ew){var ex=ew.charCoords(ew.getCursor(),"div").top+5;ew.extendSelection(ew.coordsChar({left:0,top:ex},"div"))},goLineUp:function(ew){ew.moveV(-1,"line")},goLineDown:function(ew){ew.moveV(1,"line")},goPageUp:function(ew){ew.moveV(-1,"page")},goPageDown:function(ew){ew.moveV(1,"page")},goCharLeft:function(ew){ew.moveH(-1,"char")},goCharRight:function(ew){ew.moveH(1,"char")},goColumnLeft:function(ew){ew.moveH(-1,"column")},goColumnRight:function(ew){ew.moveH(1,"column")},goWordLeft:function(ew){ew.moveH(-1,"word")},goGroupRight:function(ew){ew.moveH(1,"group")},goGroupLeft:function(ew){ew.moveH(-1,"group")},goWordRight:function(ew){ew.moveH(1,"word")},delCharBefore:function(ew){ew.deleteH(-1,"char")},delCharAfter:function(ew){ew.deleteH(1,"char")},delWordBefore:function(ew){ew.deleteH(-1,"word")},delWordAfter:function(ew){ew.deleteH(1,"word")},delGroupBefore:function(ew){ew.deleteH(-1,"group")},delGroupAfter:function(ew){ew.deleteH(1,"group")},indentAuto:function(ew){ew.indentSelection("smart")},indentMore:function(ew){ew.indentSelection("add")},indentLess:function(ew){ew.indentSelection("subtract")},insertTab:function(ew){ew.replaceSelection("\t","end","+input")},defaultTab:function(ew){if(ew.somethingSelected()){ew.indentSelection("add")}else{ew.replaceSelection("\t","end","+input")}},transposeChars:function(ew){var ey=ew.getCursor(),ex=ew.getLine(ey.line);if(ey.ch>0&&ey.ch<ex.length-1){ew.replaceRange(ex.charAt(ey.ch)+ex.charAt(ey.ch-1),K(ey.line,ey.ch-1),K(ey.line,ey.ch+1))}},newlineAndIndent:function(ew){b9(ew,function(){ew.replaceSelection("\n","end","+input");ew.indentLine(ew.getCursor().line,null,true)})()},toggleOverwrite:function(ew){ew.toggleOverwrite()}};var dF=B.keyMap={};dF.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"};dF.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"};dF.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","Cmd-Backspace":"delLineLeft",fallthrough:["basic","emacsy"]};dF["default"]=bq?dF.macDefault:dF.pcDefault;dF.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"};function eh(ew){if(typeof ew=="string"){return dF[ew]}else{return ew}}function g(ex,eB,ez){function eA(eH){eH=eh(eH);var eF=eH[ex];if(eF===false){return"stop"}if(eF!=null&&ez(eF)){return true}if(eH.nofallthrough){return"stop"}var eE=eH.fallthrough;if(eE==null){return false}if(Object.prototype.toString.call(eE)!="[object Array]"){return eA(eE)}for(var eD=0,eG=eE.length;eD<eG;++eD){var eC=eA(eE[eD]);if(eC){return eC}}return false}for(var ey=0;ey<eB.length;++ey){var ew=eA(eB[ey]);if(ew){return ew!="stop"}}}function dc(ex){var ew=dL[ex.keyCode];return ew=="Ctrl"||ew=="Alt"||ew=="Shift"||ew=="Mod"}function dW(ex,ey){if(d1&&ex.keyCode==34&&ex["char"]){return false}var ew=dL[ex.keyCode];if(ew==null||ex.altGraphKey){return false}if(ex.altKey){ew="Alt-"+ew}if(be?ex.metaKey:ex.ctrlKey){ew="Ctrl-"+ew}if(be?ex.ctrlKey:ex.metaKey){ew="Cmd-"+ew}if(!ey&&ex.shiftKey){ew="Shift-"+ew}return ew}B.lookupKey=g;B.isModifierKey=dc;B.keyName=dW;B.fromTextArea=function(eD,eE){if(!eE){eE={}}eE.value=eD.value;if(!eE.tabindex&&eD.tabindex){eE.tabindex=eD.tabindex}if(!eE.placeholder&&eD.placeholder){eE.placeholder=eD.placeholder}if(eE.autofocus==null){var ew=document.body;try{ew=document.activeElement}catch(ey){}eE.autofocus=ew==eD||eD.getAttribute("autofocus")!=null&&ew==document.body}function eA(){eD.value=eC.getValue()}if(eD.form){bk(eD.form,"submit",eA);if(!eE.leaveSubmitMethodAlone){var ex=eD.form,eB=ex.submit;try{var ez=ex.submit=function(){eA();ex.submit=eB;ex.submit();ex.submit=ez}}catch(ey){}}}eD.style.display="none";var eC=B(function(eF){eD.parentNode.insertBefore(eF,eD.nextSibling)},eE);eC.save=eA;eC.getTextArea=function(){return eD};eC.toTextArea=function(){eA();eD.parentNode.removeChild(eC.getWrapperElement());eD.style.display="";if(eD.form){cT(eD.form,"submit",eA);if(typeof eD.form.submit=="function"){eD.form.submit=eB}}};return eC};function ds(ew,ex){this.pos=this.start=0;this.string=ew;this.tabSize=ex||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0}ds.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},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(ew){var ey=this.string.charAt(this.pos);if(typeof ew=="string"){var ex=ey==ew}else{var ex=ey&&(ew.test?ew.test(ey):ew(ey))}if(ex){++this.pos;return ey}},eatWhile:function(ew){var ex=this.pos;while(this.eat(ew)){}return this.pos>ex},eatSpace:function(){var ew=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>ew},skipToEnd:function(){this.pos=this.string.length},skipTo:function(ew){var ex=this.string.indexOf(ew,this.pos);if(ex>-1){this.pos=ex;return true}},backUp:function(ew){this.pos-=ew},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=bg(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?bg(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return bg(this.string,null,this.tabSize)-(this.lineStart?bg(this.string,this.lineStart,this.tabSize):0)},match:function(eA,ex,ew){if(typeof eA=="string"){var eB=function(eC){return ew?eC.toLowerCase():eC};var ez=this.string.substr(this.pos,eA.length);if(eB(ez)==eB(eA)){if(ex!==false){this.pos+=eA.length}return true}}else{var ey=this.string.slice(this.pos).match(eA);if(ey&&ey.index>0){return null}if(ey&&ex!==false){this.pos+=ey[0].length}return ey}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(ex,ew){this.lineStart+=ex;try{return ew()}finally{this.lineStart-=ex}}};B.StringStream=ds;function H(ex,ew){this.lines=[];this.type=ew;this.doc=ex}B.TextMarker=H;a0(H);H.prototype.clear=function(){if(this.explicitlyCleared){return}var eD=this.doc.cm,ex=eD&&!eD.curOp;if(ex){bY(eD)}if(dP(this,"clear")){var eE=this.find();if(eE){O(this,"clear",eE.from,eE.to)}}var ey=null,eB=null;for(var ez=0;ez<this.lines.length;++ez){var eF=this.lines[ez];var eC=dE(eF.markedSpans,this);if(eC.to!=null){eB=bc(eF)}eF.markedSpans=dk(eF.markedSpans,eC);if(eC.from!=null){ey=bc(eF)}else{if(this.collapsed&&!dZ(this.doc,eF)&&eD){eo(eF,aw(eD.display))}}}if(eD&&this.collapsed&&!eD.options.lineWrapping){for(var ez=0;ez<this.lines.length;++ez){var ew=u(eD.doc,this.lines[ez]),eA=c0(eD.doc,ew);if(eA>eD.display.maxLineLength){eD.display.maxLine=ew;eD.display.maxLineLength=eA;eD.display.maxLineChanged=true}}}if(ey!=null&&eD){Q(eD,ey,eB+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(eD){c7(eD)}}if(ex){W(eD)}};H.prototype.find=function(eA){var eC,eB;for(var ex=0;ex<this.lines.length;++ex){var ew=this.lines[ex];var ey=dE(ew.markedSpans,this);if(ey.from!=null||ey.to!=null){var ez=bc(ew);if(ey.from!=null){eC=K(ez,ey.from)}if(ey.to!=null){eB=K(ez,ey.to)}}}if(this.type=="bookmark"&&!eA){return eC}return eC&&{from:eC,to:eB}};H.prototype.changed=function(){var ez=this.find(),ew=this.doc.cm;if(!ez||!ew){return}if(this.type!="bookmark"){ez=ez.from}var ex=dJ(this.doc,ez.line);ec(ew,ex);if(ez.line>=ew.display.showingFrom&&ez.line<ew.display.showingTo){for(var ey=ew.display.lineDiv.firstChild;ey;ey=ey.nextSibling){if(ey.lineObj==ex){if(ey.offsetHeight!=ex.height){eo(ex,ey.offsetHeight)}break}}b1(ew,function(){ew.curOp.selectionChanged=ew.curOp.forceUpdate=ew.curOp.updateMaxLine=true})}};H.prototype.attachLine=function(ew){if(!this.lines.length&&this.doc.cm){var ex=this.doc.cm.curOp;if(!ex.maybeHiddenMarkers||cl(ex.maybeHiddenMarkers,this)==-1){(ex.maybeUnhiddenMarkers||(ex.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(ew)};H.prototype.detachLine=function(ew){this.lines.splice(cl(this.lines,ew),1);if(!this.lines.length&&this.doc.cm){var ex=this.doc.cm.curOp;(ex.maybeHiddenMarkers||(ex.maybeHiddenMarkers=[])).push(this)}};var aB=0;function dh(eC,eA,eB,eE,ez){if(eE&&eE.shared){return G(eC,eA,eB,eE,ez)}if(eC.cm&&!eC.cm.curOp){return b9(eC.cm,dh)(eC,eA,eB,eE,ez)}var ey=new H(eC,ez);if(eE){am(eE,ey)}if(dK(eB,eA)||d8(eA,eB)&&ey.clearWhenEmpty!==false){return ey}if(ey.replacedWith){ey.collapsed=true;ey.replacedWith=ej("span",[ey.replacedWith],"CodeMirror-widget");if(!eE.handleMouseEvents){ey.replacedWith.ignoreEvents=true}}if(ey.collapsed){if(v(eC,eA.line,eA,eB,ey)||eA.line!=eB.line&&v(eC,eB.line,eA,eB,ey)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}aD=true}if(ey.addToHistory){di(eC,{from:eA,to:eB,origin:"markText"},{head:eC.sel.head,anchor:eC.sel.anchor},NaN)}var ex=eA.line,eD=eC.cm,ew;eC.iter(ex,eB.line+1,function(eF){if(eD&&ey.collapsed&&!eD.options.lineWrapping&&u(eC,eF)==eD.display.maxLine){ew=true}var eG={from:null,to:null,marker:ey};if(ex==eA.line){eG.from=eA.ch}if(ex==eB.line){eG.to=eB.ch}if(ey.collapsed&&ex!=eA.line){eo(eF,0)}bx(eF,eG);++ex});if(ey.collapsed){eC.iter(eA.line,eB.line+1,function(eF){if(dZ(eC,eF)){eo(eF,0)}})}if(ey.clearOnEnter){bk(ey,"beforeCursorEnter",function(){ey.clear()})}if(ey.readOnly){eq=true;if(eC.history.done.length||eC.history.undone.length){eC.clearHistory()}}if(ey.collapsed){ey.id=++aB;ey.atomic=true}if(eD){if(ew){eD.curOp.updateMaxLine=true}if(ey.className||ey.title||ey.startStyle||ey.endStyle||ey.collapsed){Q(eD,eA.line,eB.line+1)}if(ey.atomic){c7(eD)}}return ey}function t(ez,ex){this.markers=ez;this.primary=ex;for(var ew=0,ey=this;ew<ez.length;++ew){ez[ew].parent=this;bk(ez[ew],"clear",function(){ey.clear()})}}B.SharedTextMarker=t;a0(t);t.prototype.clear=function(){if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var ew=0;ew<this.markers.length;++ew){this.markers[ew].clear()}O(this,"clear")};t.prototype.find=function(){return this.primary.find()};function G(eA,eD,eC,ew,ey){ew=am(ew);ew.shared=false;var eB=[dh(eA,eD,eC,ew,ey)],ex=eB[0];var ez=ew.replacedWith;cN(eA,function(eF){if(ez){ew.replacedWith=ez.cloneNode(true)}eB.push(dh(eF,d9(eF,eD),d9(eF,eC),ew,ey));for(var eE=0;eE<eF.linked.length;++eE){if(eF.linked[eE].isParent){return}}ex=d7(eB)});return new t(eB,ex)}function dE(ey,ew){if(ey){for(var ex=0;ex<ey.length;++ex){var ez=ey[ex];if(ez.marker==ew){return ez}}}}function dk(ex,ey){for(var ez,ew=0;ew<ex.length;++ew){if(ex[ew]!=ey){(ez||(ez=[])).push(ex[ew])}}return ez}function bx(ew,ex){ew.markedSpans=ew.markedSpans?ew.markedSpans.concat([ex]):[ex];ex.marker.attachLine(ew)}function aq(ex,ey,eC){if(ex){for(var eA=0,eD;eA<ex.length;++eA){var eE=ex[eA],eB=eE.marker;var ew=eE.from==null||(eB.inclusiveLeft?eE.from<=ey:eE.from<ey);if(ew||eE.from==ey&&eB.type=="bookmark"&&(!eC||!eE.marker.insertLeft)){var ez=eE.to==null||(eB.inclusiveRight?eE.to>=ey:eE.to>ey);(eD||(eD=[])).push({from:eE.from,to:ez?null:eE.to,marker:eB})}}}return eD}function af(ex,ez,eC){if(ex){for(var eA=0,eD;eA<ex.length;++eA){var eE=ex[eA],eB=eE.marker;var ey=eE.to==null||(eB.inclusiveRight?eE.to>=ez:eE.to>ez);if(ey||eE.from==ez&&eB.type=="bookmark"&&(!eC||eE.marker.insertLeft)){var ew=eE.from==null||(eB.inclusiveLeft?eE.from<=ez:eE.from<ez);(eD||(eD=[])).push({from:ew?null:eE.from-ez,to:eE.to==null?null:eE.to-ez,marker:eB})}}}return eD}function cY(eI,eF){var eE=bt(eI,eF.from.line)&&dJ(eI,eF.from.line).markedSpans;var eL=bt(eI,eF.to.line)&&dJ(eI,eF.to.line).markedSpans;if(!eE&&!eL){return null}var ex=eF.from.ch,eA=eF.to.ch,eD=d8(eF.from,eF.to);var eC=aq(eE,ex,eD);var eK=af(eL,eA,eD);var eJ=eF.text.length==1,ey=d7(eF.text).length+(eJ?ex:0);if(eC){for(var ez=0;ez<eC.length;++ez){var eH=eC[ez];if(eH.to==null){var eM=dE(eK,eH.marker);if(!eM){eH.to=ex}else{if(eJ){eH.to=eM.to==null?null:eM.to+ey}}}}}if(eK){for(var ez=0;ez<eK.length;++ez){var eH=eK[ez];if(eH.to!=null){eH.to+=ey}if(eH.from==null){var eM=dE(eC,eH.marker);if(!eM){eH.from=ey;if(eJ){(eC||(eC=[])).push(eH)}}}else{eH.from+=ey;if(eJ){(eC||(eC=[])).push(eH)}}}}if(eC){eC=n(eC)}if(eK&&eK!=eC){eK=n(eK)}var eB=[eC];if(!eJ){var eG=eF.text.length-2,ew;if(eG>0&&eC){for(var ez=0;ez<eC.length;++ez){if(eC[ez].to==null){(ew||(ew=[])).push({from:null,to:null,marker:eC[ez].marker})}}}for(var ez=0;ez<eG;++ez){eB.push(ew)}eB.push(eK)}return eB}function n(ex){for(var ew=0;ew<ex.length;++ew){var ey=ex[ew];if(ey.from!=null&&ey.from==ey.to&&ey.marker.clearWhenEmpty!==false){ex.splice(ew--,1)}}if(!ex.length){return null}return ex}function cP(eE,eC){var ew=br(eE,eC);var eF=cY(eE,eC);if(!ew){return eF}if(!eF){return ew}for(var ez=0;ez<ew.length;++ez){var eA=ew[ez],eB=eF[ez];if(eA&&eB){spans:for(var ey=0;ey<eB.length;++ey){var eD=eB[ey];for(var ex=0;ex<eA.length;++ex){if(eA[ex].marker==eD.marker){continue spans}}eA.push(eD)}}else{if(eB){ew[ez]=eB}}}return ew}function bW(eG,eE,eF){var ez=null;eG.iter(eE.line,eF.line+1,function(eH){if(eH.markedSpans){for(var eI=0;eI<eH.markedSpans.length;++eI){var eJ=eH.markedSpans[eI].marker;if(eJ.readOnly&&(!ez||cl(ez,eJ)==-1)){(ez||(ez=[])).push(eJ)}}}});if(!ez){return null}var eA=[{from:eE,to:eF}];for(var eB=0;eB<ez.length;++eB){var eC=ez[eB],ex=eC.find();for(var ey=0;ey<eA.length;++ey){var ew=eA[ey];if(dK(ew.to,ex.from)||dK(ex.to,ew.from)){continue}var eD=[ey,1];if(dK(ew.from,ex.from)||!eC.inclusiveLeft&&d8(ew.from,ex.from)){eD.push({from:ew.from,to:ex.from})}if(dK(ex.to,ew.to)||!eC.inclusiveRight&&d8(ew.to,ex.to)){eD.push({from:ex.to,to:ew.to})}eA.splice.apply(eA,eD);ey+=eD.length-1}}return eA}function r(ew){return ew.inclusiveLeft?-1:0}function bj(ew){return ew.inclusiveRight?1:0}function cF(ez,ex){var eB=ez.lines.length-ex.lines.length;if(eB!=0){return eB}var ey=ez.find(),eC=ex.find();var ew=bz(ey.from,eC.from)||r(ez)-r(ex);if(ew){return -ew}var eA=bz(ey.to,eC.to)||bj(ez)-bj(ex);if(eA){return eA}return ex.id-ez.id}function aC(ex,eB){var ew=aD&&ex.markedSpans,eA;if(ew){for(var ez,ey=0;ey<ew.length;++ey){ez=ew[ey];if(ez.marker.collapsed&&(eB?ez.from:ez.to)==null&&(!eA||cF(eA,ez.marker)<0)){eA=ez.marker}}}return eA}function dn(ew){return aC(ew,true)}function c5(ew){return aC(ew,false)}function v(eE,ey,eC,eD,eA){var eH=dJ(eE,ey);var ew=aD&&eH.markedSpans;if(ew){for(var ez=0;ez<ew.length;++ez){var ex=ew[ez];if(!ex.marker.collapsed){continue}var eG=ex.marker.find(true);var eF=bz(eG.from,eC)||r(ex.marker)-r(eA);var eB=bz(eG.to,eD)||bj(ex.marker)-bj(eA);if(eF>=0&&eB<=0||eF<=0&&eB>=0){continue}if(eF<=0&&(bz(eG.to,eC)||bj(ex.marker)-r(eA))>0||eF>=0&&(bz(eG.from,eD)||r(ex.marker)-bj(eA))<0){return true}}}}function u(ey,ex){var ew;while(ew=dn(ex)){ex=dJ(ey,ew.find().from.line)}return ex}function dZ(eA,ex){var ew=aD&&ex.markedSpans;if(ew){for(var ez,ey=0;ey<ew.length;++ey){ez=ew[ey];if(!ez.marker.collapsed){continue}if(ez.from==null){return true}if(ez.marker.replacedWith){continue}if(ez.from==0&&ez.marker.inclusiveLeft&&J(eA,ex,ez)){return true}}}}function J(eC,ex,ez){if(ez.to==null){var ew=ez.marker.find().to,eA=dJ(eC,ew.line);return J(eC,eA,dE(eA.markedSpans,ez.marker))}if(ez.marker.inclusiveRight&&ez.to==ex.text.length){return true}for(var eB,ey=0;ey<ex.markedSpans.length;++ey){eB=ex.markedSpans[ey];if(eB.marker.collapsed&&!eB.marker.replacedWith&&eB.from==ez.to&&(eB.to==null||eB.to!=ez.from)&&(eB.marker.inclusiveLeft||ez.marker.inclusiveRight)&&J(eC,ex,eB)){return true}}}function ep(ew){var ey=ew.markedSpans;if(!ey){return}for(var ex=0;ex<ey.length;++ex){ey[ex].marker.detachLine(ew)}ew.markedSpans=null}function ca(ew,ey){if(!ey){return}for(var ex=0;ex<ey.length;++ex){ey[ex].marker.attachLine(ew)}ew.markedSpans=ey}var cx=B.LineWidget=function(ew,ez,ex){if(ex){for(var ey in ex){if(ex.hasOwnProperty(ey)){this[ey]=ex[ey]}}}this.cm=ew;this.node=ez};a0(cx);function E(ew){return function(){var ey=!this.cm.curOp;if(ey){bY(this.cm)}try{var ex=ew.apply(this,arguments)}finally{if(ey){W(this.cm)}}return ex}}cx.prototype.clear=E(function(){var ex=this.line.widgets,ez=bc(this.line);if(ez==null||!ex){return}for(var ey=0;ey<ex.length;++ey){if(ex[ey]==this){ex.splice(ey--,1)}}if(!ex.length){this.line.widgets=null}var ew=bb(this.cm,this.line)<this.cm.doc.scrollTop;eo(this.line,Math.max(0,this.line.height-b6(this)));if(ew){b0(this.cm,0,-this.height)}Q(this.cm,ez,ez+1)});cx.prototype.changed=E(function(){var ew=this.height;this.height=null;var ex=b6(this)-ew;if(!ex){return}eo(this.line,this.line.height+ex);var ey=bc(this.line);Q(this.cm,ey,ey+1)});function b6(ew){if(ew.height!=null){return ew.height}if(!ew.node.parentNode||ew.node.parentNode.nodeType!=1){bf(ew.cm.display.measure,ej("div",[ew.node],null,"position: relative"))}return ew.height=ew.node.offsetHeight}function a6(ew,eA,ey,ex){var ez=new cx(ew,ey,ex);if(ez.noHScroll){ew.display.alignWidgets=true}c9(ew,eA,function(eC){var eD=eC.widgets||(eC.widgets=[]);if(ez.insertAt==null){eD.push(ez)}else{eD.splice(Math.min(eD.length-1,Math.max(0,ez.insertAt)),0,ez)}ez.line=eC;if(!dZ(ew.doc,eC)||ez.showIfHidden){var eB=bb(ew,eC)<ew.doc.scrollTop;eo(eC,eC.height+b6(ez));if(eB){b0(ew,0,ez.height)}}return true});return ez}var en=B.Line=function(ey,ex,ew){this.text=ey;ca(this,ex);this.height=ew?ew(this):1};a0(en);en.prototype.lineNo=function(){return bc(this)};function c1(ex,eA,ey,ew){ex.text=eA;if(ex.stateAfter){ex.stateAfter=null}if(ex.styles){ex.styles=null}if(ex.order!=null){ex.order=null}ep(ex);ca(ex,ey);var ez=ew?ew(ex):1;if(ez!=ex.height){eo(ex,ez)}}function a1(ew){ew.parent=null;ep(ew)}function s(eF,eH,eA,ex,eB,ez){var ey=eA.flattenSpans;if(ey==null){ey=eF.options.flattenSpans}var eD=0,eC=null;var eG=new ds(eH,eF.options.tabSize),ew;if(eH==""&&eA.blankLine){eA.blankLine(ex)}while(!eG.eol()){if(eG.pos>eF.options.maxHighlightLength){ey=false;if(ez){cu(eF,eH,ex,eG.pos)}eG.pos=eH.length;ew=null}else{ew=eA.token(eG,ex)}if(eF.options.addModeClass){var eI=B.innerMode(eA,ex).mode.name;if(eI){ew="m-"+(ew?eI+" "+ew:eI)}}if(!ey||eC!=ew){if(eD<eG.start){eB(eG.start,eC)}eD=eG.start;eC=ew}eG.start=eG.pos}while(eD<eG.pos){var eE=Math.min(eG.pos,eD+50000);eB(eE,eC);eD=eE}}function d4(eC,eE,ew,ez){var eD=[eC.state.modeGen];s(eC,eE.text,eC.doc.mode,ew,function(eF,eG){eD.push(eF,eG)},ez);for(var ex=0;ex<eC.state.overlays.length;++ex){var eA=eC.state.overlays[ex],eB=1,ey=0;s(eC,eE.text,eA.mode,true,function(eF,eH){var eJ=eB;while(ey<eF){var eG=eD[eB];if(eG>eF){eD.splice(eB,1,eF,eD[eB+1],eG)}eB+=2;ey=Math.min(eF,eG)}if(!eH){return}if(eA.opaque){eD.splice(eJ,eB-eJ,eF,eH);eB=eJ+2}else{for(;eJ<eB;eJ+=2){var eI=eD[eJ+1];eD[eJ+1]=eI?eI+" "+eH:eH}}})}return eD}function cd(ew,ex){if(!ex.styles||ex.styles[0]!=ew.state.modeGen){ex.styles=d4(ew,ex,ex.stateAfter=cw(ew,bc(ex)))}return ex.styles}function cu(ew,eB,ey,ex){var eA=ew.doc.mode;var ez=new ds(eB,ew.options.tabSize);ez.start=ez.pos=ex||0;if(eB==""&&eA.blankLine){eA.blankLine(ey)}while(!ez.eol()&&ez.pos<=ew.options.maxHighlightLength){eA.token(ez,ey);ez.start=ez.pos}}var cI={},bn={};function du(ez,ey){if(!ez){return null}for(;;){var ex=ez.match(/(?:^|\s)line-(background-)?(\S+)/);if(!ex){break}ez=ez.slice(0,ex.index)+ez.slice(ex.index+ex[0].length);var eA=ex[1]?"bgClass":"textClass";if(ey[eA]==null){ey[eA]=ex[2]}else{if(!(new RegExp("(?:^|s)"+ex[2]+"(?:$|s)")).test(ey[eA])){ey[eA]+=" "+ex[2]}}}var ew=ey.cm.options.addModeClass?bn:cI;return ew[ez]||(ew[ez]="cm-"+ez.replace(/ +/g," cm-"))}function dq(eF,eJ,ew,eI){var eG,eK=eJ,eB=true;while(eG=dn(eK)){eK=dJ(eF.doc,eG.find().from.line)}var eC={pre:ej("pre"),col:0,pos:0,measure:null,measuredSomething:false,cm:eF,copyWidgets:eI};do{if(eK.text){eB=false}eC.measure=eK==eJ&&ew;eC.pos=0;eC.addToken=eC.measure?e:p;if((cf||b8)&&eF.getOption("lineWrapping")){eC.addToken=d6(eC.addToken)}var eA=aU(eK,eC,cd(eF,eK));if(ew&&eK==eJ&&!eC.measuredSomething){ew[0]=eC.pre.appendChild(aS(eF.display.measure));eC.measuredSomething=true}if(eA){eK=dJ(eF.doc,eA.to.line)}}while(eA);if(ew&&!eC.measuredSomething&&!ew[0]){ew[0]=eC.pre.appendChild(eB?ej("span","\u00a0"):aS(eF.display.measure))}if(!eC.pre.firstChild&&!dZ(eF.doc,eJ)){eC.pre.appendChild(document.createTextNode("\u00a0"))}var ex;if(ew&&cA&&(ex=a(eK))){var ez=ex.length-1;if(ex[ez].from==ex[ez].to){--ez}var eH=ex[ez],ey=ex[ez-1];if(eH.from+1==eH.to&&ey&&eH.level<ey.level){var eE=ew[eC.pos-1];if(eE){eE.parentNode.insertBefore(eE.measureRight=aS(eF.display.measure),eE.nextSibling)}}}var eD=eC.textClass?eC.textClass+" "+(eJ.textClass||""):eJ.textClass;if(eD){eC.pre.className=eD}ah(eF,"renderLine",eF,eJ,eC.pre);return eC}function dH(ex){var ew=ej("span","\u2022","cm-invalidchar");ew.title="\\u"+ex.charCodeAt(0).toString(16);return ew}function p(eA,eJ,ew,ez,eK,eI){if(!eJ){return}var eE=eA.cm.options.specialChars;if(!eE.test(eJ)){eA.col+=eJ.length;var eD=document.createTextNode(eJ)}else{var eD=document.createDocumentFragment(),eG=0;while(true){eE.lastIndex=eG;var ex=eE.exec(eJ);var eC=ex?ex.index-eG:eJ.length-eG;if(eC){eD.appendChild(document.createTextNode(eJ.slice(eG,eG+eC)));eA.col+=eC}if(!ex){break}eG+=eC+1;if(ex[0]=="\t"){var eB=eA.cm.options.tabSize,eF=eB-eA.col%eB;eD.appendChild(ej("span",bJ(eF),"cm-tab"));eA.col+=eF}else{var ey=eA.cm.options.specialCharPlaceholder(ex[0]);eD.appendChild(ey);eA.col+=1}}}if(ew||ez||eK||eA.measure){var eH=ew||"";if(ez){eH+=ez}if(eK){eH+=eK}var ey=ej("span",[eD],eH);if(eI){ey.title=eI}return eA.pre.appendChild(ey)}eA.pre.appendChild(eD)}function e(eD,eG,ex,eA,eH){var eC=eD.cm.options.lineWrapping;for(var eB=0;eB<eG.length;++eB){var ey=eB==0,eF=eB+1;while(eF<eG.length&&dV(eG.charAt(eF))){++eF}var ew=eG.slice(eB,eF);eB=eF-1;if(eB&&eC&&bu(eG,eB)){eD.pre.appendChild(ej("wbr"))}var ez=eD.measure[eD.pos];var eE=eD.measure[eD.pos]=p(eD,ew,ex,ey&&eA,eB==eG.length-1&&eH);if(ez){eE.leftSide=ez.leftSide||ez}if(cf&&eC&&ew==" "&&eB&&!/\s/.test(eG.charAt(eB-1))&&eB<eG.length-1&&!/\s/.test(eG.charAt(eB+1))){eE.style.whiteSpace="normal"}eD.pos+=ew.length}if(eG.length){eD.measuredSomething=true}}function d6(ew){function ex(ey){var ez=" ";for(var eA=0;eA<ey.length-2;++eA){ez+=eA%2?" ":"\u00a0"}ez+=" ";return ez}return function(ez,eD,eA,ey,eC,eB){return ew(ez,eD.replace(/ {3,}/g,ex),eA,ey,eC,eB)}}function M(ex,eA,ew,ez){var eB=!ez&&ew.replacedWith;if(eB){if(ex.copyWidgets){eB=eB.cloneNode(true)}ex.pre.appendChild(eB);if(ex.measure){if(eA){ex.measure[ex.pos]=eB}else{var ey=aS(ex.cm.display.measure);if(ew.type=="bookmark"&&!ew.insertLeft){ex.measure[ex.pos]=ex.pre.appendChild(ey)}else{if(ex.measure[ex.pos]){return}else{ex.measure[ex.pos]=ex.pre.insertBefore(ey,eB)}}}ex.measuredSomething=true}}ex.pos+=eA}function aU(eF,eL,eE){var eB=eF.markedSpans,eD=eF.text,eJ=0;if(!eB){for(var eO=1;eO<eE.length;eO+=2){eL.addToken(eL,eD.slice(eJ,eJ=eE[eO]),du(eE[eO+1],eL))}return}var eP=eD.length,eA=0,eO=1,eH="",eQ;var eS=0,ew,eR,eI,eT,ey;for(;;){if(eS==eA){ew=eR=eI=eT="";ey=null;eS=Infinity;var eC=[];for(var eM=0;eM<eB.length;++eM){var eN=eB[eM],eK=eN.marker;if(eN.from<=eA&&(eN.to==null||eN.to>eA)){if(eN.to!=null&&eS>eN.to){eS=eN.to;eR=""}if(eK.className){ew+=" "+eK.className}if(eK.startStyle&&eN.from==eA){eI+=" "+eK.startStyle}if(eK.endStyle&&eN.to==eS){eR+=" "+eK.endStyle}if(eK.title&&!eT){eT=eK.title}if(eK.collapsed&&(!ey||cF(ey.marker,eK)<0)){ey=eN}}else{if(eN.from>eA&&eS>eN.from){eS=eN.from}}if(eK.type=="bookmark"&&eN.from==eA&&eK.replacedWith){eC.push(eK)}}if(ey&&(ey.from||0)==eA){M(eL,(ey.to==null?eP:ey.to)-eA,ey.marker,ey.from==null);if(ey.to==null){return ey.marker.find()}}if(!ey&&eC.length){for(var eM=0;eM<eC.length;++eM){M(eL,0,eC[eM])}}}if(eA>=eP){break}var eG=Math.min(eP,eS);while(true){if(eH){var ex=eA+eH.length;if(!ey){var ez=ex>eG?eH.slice(0,eG-eA):eH;eL.addToken(eL,ez,eQ?eQ+ew:ew,eI,eA+ez.length==eS?eR:"",eT)}if(ex>=eG){eH=eH.slice(eG-eA);eA=eG;break}eA=ex;eI=""}eH=eD.slice(eJ,eJ=eE[eO++]);eQ=du(eE[eO++],eL)}}}function d2(eN,eE,eA,eI,eC){function ez(eO){return eA?eA[eO]:null}function eD(eO,eQ,eP){c1(eO,eQ,eP,eC);O(eO,"change",eO,eE)}var eJ=eE.from,ex=eE.to,eG=eE.text;var eF=dJ(eN,eJ.line),ew=dJ(eN,ex.line);var ey=d7(eG),eL=ez(eG.length-1),eH=ex.line-eJ.line;if(eJ.ch==0&&ex.ch==0&&ey==""&&(!eN.cm||eN.cm.options.wholeLineUpdateBefore)){for(var eK=0,eM=eG.length-1,eB=[];eK<eM;++eK){eB.push(new en(eG[eK],ez(eK),eC))}eD(ew,ew.text,eL);if(eH){eN.remove(eJ.line,eH)}if(eB.length){eN.insert(eJ.line,eB)}}else{if(eF==ew){if(eG.length==1){eD(eF,eF.text.slice(0,eJ.ch)+ey+eF.text.slice(ex.ch),eL)}else{for(var eB=[],eK=1,eM=eG.length-1;eK<eM;++eK){eB.push(new en(eG[eK],ez(eK),eC))}eB.push(new en(ey+eF.text.slice(ex.ch),eL,eC));eD(eF,eF.text.slice(0,eJ.ch)+eG[0],ez(0));eN.insert(eJ.line+1,eB)}}else{if(eG.length==1){eD(eF,eF.text.slice(0,eJ.ch)+eG[0]+ew.text.slice(ex.ch),ez(0));eN.remove(eJ.line+1,eH)}else{eD(eF,eF.text.slice(0,eJ.ch)+eG[0],ez(0));eD(ew,ey+ew.text.slice(ex.ch),eL);for(var eK=1,eM=eG.length-1,eB=[];eK<eM;++eK){eB.push(new en(eG[eK],ez(eK),eC))}if(eH>1){eN.remove(eJ.line+1,eH-1)}eN.insert(eJ.line+1,eB)}}}O(eN,"change",eN,eE);bh(eN,eI.anchor,eI.head,null,true)}function dx(ex){this.lines=ex;this.parent=null;for(var ey=0,ez=ex.length,ew=0;ey<ez;++ey){ex[ey].parent=this;ew+=ex[ey].height}this.height=ew}dx.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ew,eA){for(var ey=ew,ez=ew+eA;ey<ez;++ey){var ex=this.lines[ey];this.height-=ex.height;a1(ex);O(ex,"delete")}this.lines.splice(ew,eA)},collapse:function(ew){ew.splice.apply(ew,[ew.length,0].concat(this.lines))},insertInner:function(ex,ey,ew){this.height+=ew;this.lines=this.lines.slice(0,ex).concat(ey).concat(this.lines.slice(ex));for(var ez=0,eA=ey.length;ez<eA;++ez){ey[ez].parent=this}},iterN:function(ew,ez,ey){for(var ex=ew+ez;ew<ex;++ew){if(ey(this.lines[ew])){return true}}}};function d0(ez){this.children=ez;var ey=0,ew=0;for(var ex=0,eB=ez.length;ex<eB;++ex){var eA=ez[ex];ey+=eA.chunkSize();ew+=eA.height;eA.parent=this}this.size=ey;this.height=ew;this.parent=null}d0.prototype={chunkSize:function(){return this.size},removeInner:function(ew,eD){this.size-=eD;for(var ey=0;ey<this.children.length;++ey){var eC=this.children[ey],eA=eC.chunkSize();if(ew<eA){var ez=Math.min(eD,eA-ew),eB=eC.height;eC.removeInner(ew,ez);this.height-=eB-eC.height;if(eA==ez){this.children.splice(ey--,1);eC.parent=null}if((eD-=ez)==0){break}ew=0}else{ew-=eA}}if(this.size-eD<25){var ex=[];this.collapse(ex);this.children=[new dx(ex)];this.children[0].parent=this}},collapse:function(ew){for(var ex=0,ey=this.children.length;ex<ey;++ex){this.children[ex].collapse(ew)}},insertInner:function(ex,eE,eD){this.size+=eE.length;this.height+=eD;for(var ey=0,eA=this.children.length;ey<eA;++ey){var ew=this.children[ey],eB=ew.chunkSize();if(ex<=eB){ew.insertInner(ex,eE,eD);if(ew.lines&&ew.lines.length>50){while(ew.lines.length>50){var ez=ew.lines.splice(ew.lines.length-25,25);var eC=new dx(ez);ew.height-=eC.height;this.children.splice(ey+1,0,eC);eC.parent=this}this.maybeSpill()}break}ex-=eB}},maybeSpill:function(){if(this.children.length<=10){return}var ez=this;do{var ex=ez.children.splice(ez.children.length-5,5);var ey=new d0(ex);if(!ez.parent){var eA=new d0(ez.children);eA.parent=ez;ez.children=[eA,ey];ez=eA}else{ez.size-=ey.size;ez.height-=ey.height;var ew=cl(ez.parent.children,ez);ez.parent.children.splice(ew+1,0,ey)}ey.parent=ez.parent}while(ez.children.length>10);ez.parent.maybeSpill()},iterN:function(ew,eD,eC){for(var ex=0,eA=this.children.length;ex<eA;++ex){var eB=this.children[ex],ez=eB.chunkSize();if(ew<ez){var ey=Math.min(eD,ez-ew);if(eB.iterN(ew,ey,eC)){return true}if((eD-=ey)==0){break}ew=0}else{ew-=ez}}}};var bK=0;var aa=B.Doc=function(ey,ex,ew){if(!(this instanceof aa)){return new aa(ey,ex,ew)}if(ew==null){ew=0}d0.call(this,[new dx([new en("",null)])]);this.first=ew;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.history=ac();this.cleanGeneration=1;this.frontier=ew;var ez=K(ew,0);this.sel={from:ez,to:ez,head:ez,anchor:ez,shift:false,extend:false,goalColumn:null};this.id=++bK;this.modeOption=ex;if(typeof ey=="string"){ey=ay(ey)}d2(this,{from:ez,to:ez,text:ey},null,{head:ez,anchor:ez})};aa.prototype=bD(d0.prototype,{constructor:aa,iter:function(ey,ex,ew){if(ew){this.iterN(ey-this.first,ex-ey,ew)}else{this.iterN(this.first,this.first+this.size,ey)}},insert:function(ex,ey){var ew=0;for(var ez=0,eA=ey.length;ez<eA;++ez){ew+=ey[ez].height}this.insertInner(ex-this.first,ey,ew)},remove:function(ew,ex){this.removeInner(ew-this.first,ex)},getValue:function(ex){var ew=aA(this,this.first,this.first+this.size);if(ex===false){return ew}return ew.join(ex||"\n")},setValue:function(ex){var ey=K(this.first,0),ew=this.first+this.size-1;aL(this,{from:ey,to:K(ew,dJ(this,ew).text.length),text:ay(ex),origin:"setValue"},{head:ey,anchor:ey},true)},replaceRange:function(ex,ez,ey,ew){ez=d9(this,ez);ey=ey?d9(this,ey):ez;az(this,ex,ez,ey,ew)},getRange:function(ez,ey,ex){var ew=el(this,d9(this,ez),d9(this,ey));if(ex===false){return ew}return ew.join(ex||"\n")},getLine:function(ex){var ew=this.getLineHandle(ex);return ew&&ew.text},setLine:function(ew,ex){if(bt(this,ew)){az(this,ex,K(ew,0),d9(this,K(ew)))}},removeLine:function(ew){if(ew){az(this,"",d9(this,K(ew-1)),d9(this,K(ew)))}else{az(this,"",K(0,0),d9(this,K(1,0)))}},getLineHandle:function(ew){if(bt(this,ew)){return dJ(this,ew)}},getLineNumber:function(ew){return bc(ew)},getLineHandleVisualStart:function(ew){if(typeof ew=="number"){ew=dJ(this,ew)}return u(this,ew)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ew){return d9(this,ew)},getCursor:function(ey){var ew=this.sel,ex;if(ey==null||ey=="head"){ex=ew.head}else{if(ey=="anchor"){ex=ew.anchor}else{if(ey=="end"||ey===false){ex=ew.to}else{ex=ew.from}}}return bC(ex)},somethingSelected:function(){return !d8(this.sel.head,this.sel.anchor)},setCursor:d3(function(ew,ex,ez){var ey=d9(this,typeof ew=="number"?K(ew,ex||0):ew);if(ez){eg(this,ey)}else{bh(this,ey,ey)}}),setSelection:d3(function(ex,ey,ew){bh(this,d9(this,ex),d9(this,ey||ex),ew)}),extendSelection:d3(function(ey,ex,ew){eg(this,d9(this,ey),ex&&d9(this,ex),ew)}),getSelection:function(ew){return this.getRange(this.sel.from,this.sel.to,ew)},replaceSelection:function(ex,ey,ew){aL(this,{from:this.sel.from,to:this.sel.to,text:ay(ex),origin:ew},ey||"around")},undo:d3(function(){bs(this,"undo")}),redo:d3(function(){bs(this,"redo")}),setExtending:function(ew){this.sel.extend=ew},historySize:function(){var ew=this.history;return{undo:ew.done.length,redo:ew.undone.length}},clearHistory:function(){this.history=ac(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(ew){if(ew){this.history.lastOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(ew){return this.history.generation==(ew||this.cleanGeneration)},getHistory:function(){return{done:bd(this.history.done),undone:bd(this.history.undone)}},setHistory:function(ex){var ew=this.history=ac(this.history.maxGeneration);ew.done=ex.done.slice(0);ew.undone=ex.undone.slice(0)},markText:function(ey,ex,ew){return dh(this,d9(this,ey),d9(this,ex),ew,"range")},setBookmark:function(ey,ew){var ex={replacedWith:ew&&(ew.nodeType==null?ew.widget:ew),insertLeft:ew&&ew.insertLeft,clearWhenEmpty:false};ey=d9(this,ey);return dh(this,ey,ey,ex,"bookmark")},findMarksAt:function(eA){eA=d9(this,eA);var ez=[],ex=dJ(this,eA.line).markedSpans;if(ex){for(var ew=0;ew<ex.length;++ew){var ey=ex[ew];if((ey.from==null||ey.from<=eA.ch)&&(ey.to==null||ey.to>=eA.ch)){ez.push(ey.marker.parent||ey.marker)}}}return ez},getAllMarks:function(){var ew=[];this.iter(function(ey){var ex=ey.markedSpans;if(ex){for(var ez=0;ez<ex.length;++ez){if(ex[ez].from!=null){ew.push(ex[ez].marker)}}}});return ew},posFromIndex:function(ex){var ew,ey=this.first;this.iter(function(ez){var eA=ez.text.length+1;if(eA>ex){ew=ex;return true}ex-=eA;++ey});return d9(this,K(ey,ew))},indexFromPos:function(ex){ex=d9(this,ex);var ew=ex.ch;if(ex.line<this.first||ex.ch<0){return 0}this.iter(this.first,ex.line,function(ey){ew+=ey.text.length+1});return ew},copy:function(ew){var ex=new aa(aA(this,this.first,this.first+this.size),this.modeOption,this.first);ex.scrollTop=this.scrollTop;ex.scrollLeft=this.scrollLeft;ex.sel={from:this.sel.from,to:this.sel.to,head:this.sel.head,anchor:this.sel.anchor,shift:this.sel.shift,extend:false,goalColumn:this.sel.goalColumn};if(ew){ex.history.undoDepth=this.history.undoDepth;ex.setHistory(this.getHistory())}return ex},linkedDoc:function(ew){if(!ew){ew={}}var ez=this.first,ey=this.first+this.size;if(ew.from!=null&&ew.from>ez){ez=ew.from}if(ew.to!=null&&ew.to<ey){ey=ew.to}var ex=new aa(aA(this,ez,ey),ew.mode||this.modeOption,ez);if(ew.sharedHist){ex.history=this.history}(this.linked||(this.linked=[])).push({doc:ex,sharedHist:ew.sharedHist});ex.linked=[{doc:this,isParent:true,sharedHist:ew.sharedHist}];return ex},unlinkDoc:function(ex){if(ex instanceof B){ex=ex.doc}if(this.linked){for(var ey=0;ey<this.linked.length;++ey){var ez=this.linked[ey];if(ez.doc!=ex){continue}this.linked.splice(ey,1);ex.unlinkDoc(this);break}}if(ex.history==this.history){var ew=[ex.id];cN(ex,function(eA){ew.push(eA.id)},true);ex.history=ac();ex.history.done=bd(this.history.done,ew);ex.history.undone=bd(this.history.undone,ew)}},iterLinkedDocs:function(ew){cN(this,ew)},getMode:function(){return this.mode},getEditor:function(){return this.cm}});aa.prototype.eachLine=aa.prototype.iter;var d="iter insert remove copy getEditor".split(" ");for(var a9 in aa.prototype){if(aa.prototype.hasOwnProperty(a9)&&cl(d,a9)<0){B.prototype[a9]=(function(ew){return function(){return ew.apply(this.doc,arguments)}})(aa.prototype[a9])}}a0(aa);function cN(ez,ey,ex){function ew(eF,eD,eB){if(eF.linked){for(var eC=0;eC<eF.linked.length;++eC){var eA=eF.linked[eC];if(eA.doc==eD){continue}var eE=eB&&eA.sharedHist;if(ex&&!eE){continue}ey(eA.doc,eE);ew(eA.doc,eF,eE)}}}ew(ez,null,true)}function cQ(ew,ex){if(ex.cm){throw new Error("This document is already in use.")}ew.doc=ex;ex.cm=ew;L(ew);aW(ew);if(!ew.options.lineWrapping){em(ew)}ew.options.mode=ex.modeOption;Q(ew)}function dJ(ew,eA){eA-=ew.first;while(!ew.lines){for(var ex=0;;++ex){var ez=ew.children[ex],ey=ez.chunkSize();if(eA<ey){ew=ez;break}eA-=ey}}return ew.lines[eA]}function el(ey,eA,ew){var ex=[],ez=eA.line;ey.iter(eA.line,ew.line+1,function(eB){var eC=eB.text;if(ez==ew.line){eC=eC.slice(0,ew.ch)}if(ez==eA.line){eC=eC.slice(eA.ch)}ex.push(eC);++ez});return ex}function aA(ex,ez,ey){var ew=[];ex.iter(ez,ey,function(eA){ew.push(eA.text)});return ew}function eo(ex,ew){var ey=ew-ex.height;for(var ez=ex;ez;ez=ez.parent){ez.height+=ey}}function bc(ew){if(ew.parent==null){return null}var eA=ew.parent,ez=cl(eA.lines,ew);for(var ex=eA.parent;ex;eA=ex,ex=ex.parent){for(var ey=0;;++ey){if(ex.children[ey]==eA){break}ez+=ex.children[ey].chunkSize()}}return ez+eA.first}function a5(eC,eA){var ey=eC.first;outer:do{for(var ez=0,eB=eC.children.length;ez<eB;++ez){var ex=eC.children[ez],ew=ex.height;if(eA<ew){eC=ex;continue outer}eA-=ew;ey+=ex.chunkSize()}return ey}while(!eC.lines);for(var ez=0,eB=eC.lines.length;ez<eB;++ez){var eE=eC.lines[ez],eD=eE.height;if(eA<eD){break}eA-=eD}return ey+ez}function bb(ew,ez){ez=u(ew.doc,ez);var eB=0,ey=ez.parent;for(var eA=0;eA<ey.lines.length;++eA){var ex=ey.lines[eA];if(ex==ez){break}else{eB+=ex.height}}for(var eC=ey.parent;eC;ey=eC,eC=ey.parent){for(var eA=0;eA<eC.children.length;++eA){var eD=eC.children[eA];if(eD==ey){break}else{eB+=eD.height}}}return eB}function a(ex){var ew=ex.order;if(ew==null){ew=ex.order=aM(ex.text)}return ew}function ac(ew){return{done:[],undone:[],undoDepth:Infinity,lastTime:0,lastOp:null,lastOrigin:null,generation:ew||1,maxGeneration:ew||1}}function bl(ex,eB,eA,ez){var ew=eB["spans_"+ex.id],ey=0;ex.iter(Math.max(ex.first,eA),Math.min(ex.first+ex.size,ez),function(eC){if(eC.markedSpans){(ew||(ew=eB["spans_"+ex.id]={}))[ey]=eC.markedSpans}++ey})}function cs(ew,ez){var ey={line:ez.from.line,ch:ez.from.ch};var ex={from:ey,to:b5(ez),text:el(ew,ez.from,ez.to)};bl(ew,ex,ez.from.line,ez.to.line+1);cN(ew,function(eA){bl(eA,ex,ez.from.line,ez.to.line+1)},true);return ex}function di(eB,eD,eA,ew){var ez=eB.history;ez.undone.length=0;var ey=+new Date,eC=d7(ez.done);if(eC&&(ez.lastOp==ew||ez.lastOrigin==eD.origin&&eD.origin&&((eD.origin.charAt(0)=="+"&&eB.cm&&ez.lastTime>ey-eB.cm.options.historyEventDelay)||eD.origin.charAt(0)=="*"))){var ex=d7(eC.changes);if(d8(eD.from,eD.to)&&d8(eD.from,ex.to)){ex.to=b5(eD)}else{eC.changes.push(cs(eB,eD))}eC.anchorAfter=eA.anchor;eC.headAfter=eA.head}else{eC={changes:[cs(eB,eD)],generation:ez.generation,anchorBefore:eB.sel.anchor,headBefore:eB.sel.head,anchorAfter:eA.anchor,headAfter:eA.head};ez.done.push(eC);while(ez.done.length>ez.undoDepth){ez.done.shift()}}ez.generation=++ez.maxGeneration;ez.lastTime=ey;ez.lastOp=ew;ez.lastOrigin=eD.origin}function aP(ey){if(!ey){return null}for(var ex=0,ew;ex<ey.length;++ex){if(ey[ex].marker.explicitlyCleared){if(!ew){ew=ey.slice(0,ex)}}else{if(ew){ew.push(ey[ex])}}}return !ew?ey:ew.length?ew:null}function br(ez,eA){var ey=eA["spans_"+ez.id];if(!ey){return null}for(var ex=0,ew=[];ex<eA.text.length;++ex){ew.push(aP(ey[ex]))}return ew}function bd(eG,ez){for(var eC=0,ex=[];eC<eG.length;++eC){var ey=eG[eC],eE=ey.changes,eF=[];ex.push({changes:eF,anchorBefore:ey.anchorBefore,headBefore:ey.headBefore,anchorAfter:ey.anchorAfter,headAfter:ey.headAfter});for(var eB=0;eB<eE.length;++eB){var eD=eE[eB],eA;eF.push({from:eD.from,to:eD.to,text:eD.text});if(ez){for(var ew in eD){if(eA=ew.match(/^spans_(\d+)$/)){if(cl(ez,Number(eA[1]))>-1){d7(eF)[ew]=eD[ew];delete eD[ew]}}}}}}return ex}function dv(ez,ey,ex,ew){if(ex<ez.line){ez.line+=ew}else{if(ey<ez.line){ez.line=ey;ez.ch=0}}}function dM(ez,eB,eC,eD){for(var ey=0;ey<ez.length;++ey){var ew=ez[ey],eA=true;for(var ex=0;ex<ew.changes.length;++ex){var eE=ew.changes[ex];if(!ew.copied){eE.from=bC(eE.from);eE.to=bC(eE.to)}if(eC<eE.from.line){eE.from.line+=eD;eE.to.line+=eD}else{if(eB<=eE.to.line){eA=false;break}}}if(!ew.copied){ew.anchorBefore=bC(ew.anchorBefore);ew.headBefore=bC(ew.headBefore);ew.anchorAfter=bC(ew.anchorAfter);ew.readAfter=bC(ew.headAfter);ew.copied=true}if(!eA){ez.splice(0,ey+1);ey=0}else{dv(ew.anchorBefore);dv(ew.headBefore);dv(ew.anchorAfter);dv(ew.headAfter)}}}function cz(ex,eA){var ez=eA.from.line,ey=eA.to.line,ew=eA.text.length-(ey-ez)-1;dM(ex.done,ez,ey,ew);dM(ex.undone,ez,ey,ew)}function dr(){c2(this)}function Y(ew){if(!ew.stop){ew.stop=dr}return ew}function bV(ew){if(ew.preventDefault){ew.preventDefault()}else{ew.returnValue=false}}function cp(ew){if(ew.stopPropagation){ew.stopPropagation()}else{ew.cancelBubble=true}}function ba(ew){return ew.defaultPrevented!=null?ew.defaultPrevented:ew.returnValue==false}function c2(ew){bV(ew);cp(ew)}B.e_stop=c2;B.e_preventDefault=bV;B.e_stopPropagation=cp;function D(ew){return ew.target||ew.srcElement}function eb(ex){var ew=ex.which;if(ew==null){if(ex.button&1){ew=1}else{if(ex.button&2){ew=3}else{if(ex.button&4){ew=2}}}}if(bq&&ex.ctrlKey&&ew==1){ew=3}return ew}function bk(ez,ex,ey){if(ez.addEventListener){ez.addEventListener(ex,ey,false)}else{if(ez.attachEvent){ez.attachEvent("on"+ex,ey)}else{var eA=ez._handlers||(ez._handlers={});var ew=eA[ex]||(eA[ex]=[]);ew.push(ey)}}}function cT(eA,ey,ez){if(eA.removeEventListener){eA.removeEventListener(ey,ez,false)}else{if(eA.detachEvent){eA.detachEvent("on"+ey,ez)}else{var ew=eA._handlers&&eA._handlers[ey];if(!ew){return}for(var ex=0;ex<ew.length;++ex){if(ew[ex]==ez){ew.splice(ex,1);break}}}}}function ah(eA,ez){var ew=eA._handlers&&eA._handlers[ez];if(!ew){return}var ex=Array.prototype.slice.call(arguments,2);for(var ey=0;ey<ew.length;++ey){ew[ey].apply(null,ex)}}var aT,bL=0;function O(eB,eA){var ew=eB._handlers&&eB._handlers[eA];if(!ew){return}var ey=Array.prototype.slice.call(arguments,2);if(!aT){++bL;aT=[];setTimeout(da,0)}function ex(eC){return function(){eC.apply(null,ey)}}for(var ez=0;ez<ew.length;++ez){aT.push(ex(ew[ez]))}}function ar(ew,ey,ex){ah(ew,ex||ey.type,ew,ey);return ba(ey)||ey.codemirrorIgnore}function da(){--bL;var ew=aT;aT=null;for(var ex=0;ex<ew.length;++ex){ew[ex]()}}function dP(ey,ex){var ew=ey._handlers&&ey._handlers[ex];return ew&&ew.length>0}B.on=bk;B.off=cT;B.signal=ah;function a0(ew){ew.prototype.on=function(ex,ey){bk(this,ex,ey)};ew.prototype.off=function(ex,ey){cT(this,ex,ey)}}var aO=30;var bv=B.Pass={toString:function(){return"CodeMirror.Pass"}};function ev(){this.id=null}ev.prototype={set:function(ew,ex){clearTimeout(this.id);this.id=setTimeout(ex,ew)}};function bg(ey,ew,eA,eB,ex){if(ew==null){ew=ey.search(/[^\s\u00a0]/);if(ew==-1){ew=ey.length}}for(var ez=eB||0,eC=ex||0;ez<ew;++ez){if(ey.charAt(ez)=="\t"){eC+=eA-(eC%eA)}else{++eC}}return eC}B.countColumn=bg;var ax=[""];function bJ(ew){while(ax.length<=ew){ax.push(d7(ax)+" ")}return ax[ew]}function d7(ew){return ew[ew.length-1]}function cC(ex){if(dy){ex.selectionStart=0;ex.selectionEnd=ex.value.length}else{try{ex.select()}catch(ew){}}}function cl(ez,ew){if(ez.indexOf){return ez.indexOf(ew)}for(var ex=0,ey=ez.length;ex<ey;++ex){if(ez[ex]==ew){return ex}}return -1}function bD(ez,ex){function ew(){}ew.prototype=ez;var ey=new ew();if(ex){am(ex,ey)}return ey}function am(ex,ew){if(!ew){ew={}}for(var ey in ex){if(ex.hasOwnProperty(ey)){ew[ey]=ex[ey]}}return ew}function U(ey){for(var ew=[],ex=0;ex<ey;++ex){ew.push(undefined)}return ew}function bO(ex){var ew=Array.prototype.slice.call(arguments,1);return function(){return ex.apply(null,ew)}}var aI=/[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function bR(ew){return/\w/.test(ew)||ew>"\x80"&&(ew.toUpperCase()!=ew.toLowerCase()||aI.test(ew))}function dt(ew){for(var ex in ew){if(ew.hasOwnProperty(ex)&&ew[ex]){return false}}return true}var dl=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function dV(ew){return ew.charCodeAt(0)>=768&&dl.test(ew)}function ej(ew,eA,ez,ey){var eB=document.createElement(ew);if(ez){eB.className=ez}if(ey){eB.style.cssText=ey}if(typeof eA=="string"){l(eB,eA)}else{if(eA){for(var ex=0;ex<eA.length;++ex){eB.appendChild(eA[ex])}}}return eB}function cK(ex){for(var ew=ex.childNodes.length;ew>0;--ew){ex.removeChild(ex.firstChild)}return ex}function bf(ew,ex){return cK(ew).appendChild(ex)}function l(ew,ex){if(bE){ew.innerHTML="";ew.appendChild(document.createTextNode(ex))}else{ew.textContent=ex}}function an(ew){return ew.getBoundingClientRect()}B.replaceGetRect=function(ew){an=ew};var dm=function(){if(bE){return false}var ew=ej("div");return"draggable" in ew||"dragDrop" in ew}();function bu(){return false}if(bI){bu=function(ex,ew){return ex.charCodeAt(ew-1)==36&&ex.charCodeAt(ew)==39}}else{if(ag&&!/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent)){bu=function(ex,ew){return/\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(ex.slice(ew-1,ew+1))}}else{if(b8&&/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent)){bu=function(ey,ew){var ex=ey.charCodeAt(ew-1);return ex>=8208&&ex<=8212}}else{if(b8){bu=function(ex,ew){if(ew>1&&ex.charCodeAt(ew-1)==45){if(/\w/.test(ex.charAt(ew-2))&&/[^\-?\.]/.test(ex.charAt(ew))){return true}if(ew>2&&/[\d\.,]/.test(ex.charAt(ew-2))&&/[\d\.,]/.test(ex.charAt(ew))){return false}}return/[~!#%&*)=+}\]\\|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|\u2026[\w~`@#$%\^&*(_=+{[><]/.test(ex.slice(ew-1,ew+1))}}}}}var c6;function i(ew){if(c6!=null){return c6}var ex=ej("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");bf(ew,ex);if(ex.offsetWidth){c6=ex.offsetHeight-ex.clientHeight}return c6||0}var ea;function aS(ew){if(ea==null){var ex=ej("span","\u200b");bf(ew,ej("span",[ex,document.createTextNode("x")]));if(ew.firstChild.offsetHeight!=0){ea=ex.offsetWidth<=1&&ex.offsetHeight>2&&!bF}}if(ea){return ej("span","\u200b")}else{return ej("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px")}}var ay="\n\nb".split(/\n/).length!=3?function(eB){var eC=0,ew=[],eA=eB.length;while(eC<=eA){var ez=eB.indexOf("\n",eC);if(ez==-1){ez=eB.length}var ey=eB.slice(eC,eB.charAt(ez-1)=="\r"?ez-1:ez);var ex=ey.indexOf("\r");if(ex!=-1){ew.push(ey.slice(0,ex));eC+=ex+1}else{ew.push(ey);eC=ez+1}}return ew}:function(ew){return ew.split(/\r\n?|\n/)};B.splitLines=ay;var aX=window.getSelection?function(ex){try{return ex.selectionStart!=ex.selectionEnd}catch(ew){return false}}:function(ey){try{var ew=ey.ownerDocument.selection.createRange()}catch(ex){}if(!ew||ew.parentElement()!=ey){return false}return ew.compareEndPoints("StartToEnd",ew)!=0};var ce=(function(){var ew=ej("div");if("oncopy" in ew){return true}ew.setAttribute("oncopy","return;");return typeof ew.oncopy=="function"})();var dL={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:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};B.keyNames=dL;(function(){for(var ew=0;ew<10;ew++){dL[ew+48]=dL[ew+96]=String(ew)}for(var ew=65;ew<=90;ew++){dL[ew]=String.fromCharCode(ew)}for(var ew=1;ew<=12;ew++){dL[ew+111]=dL[ew+63235]="F"+ew}})();function cL(ew,eC,eB,eA){if(!ew){return eA(eC,eB,"ltr")}var ez=false;for(var ey=0;ey<ew.length;++ey){var ex=ew[ey];if(ex.from<eB&&ex.to>eC||eC==eB&&ex.to==eC){eA(Math.max(ex.from,eC),Math.min(ex.to,eB),ex.level==1?"rtl":"ltr");ez=true}}if(!ez){eA(eC,eB,"ltr")}}function cv(ew){return ew.level%2?ew.to:ew.from}function er(ew){return ew.level%2?ew.from:ew.to}function bU(ex){var ew=a(ex);return ew?cv(ew[0]):0}function b4(ex){var ew=a(ex);if(!ew){return ex.text.length}return er(d7(ew))}function aY(ex,eA){var ey=dJ(ex.doc,eA);var eB=u(ex.doc,ey);if(eB!=ey){eA=bc(eB)}var ew=a(eB);var ez=!ew?0:ew[0].level%2?b4(eB):bU(eB);return K(eA,ez)}function cE(ey,eB){var ex,ez;while(ex=c5(ez=dJ(ey.doc,eB))){eB=ex.find().to.line}var ew=a(ez);var eA=!ew?ez.text.length:ew[0].level%2?bU(ez):b4(ez);return K(eB,eA)}function X(ex,ey,ew){var ez=ex[0].level;if(ey==ez){return true}if(ew==ez){return false}return ey<ew}var dz;function aj(ew,eA){dz=null;for(var ex=0,ey;ex<ew.length;++ex){var ez=ew[ex];if(ez.from<eA&&ez.to>eA){return ex}if((ez.from==eA||ez.to==eA)){if(ey==null){ey=ex}else{if(X(ew,ez.level,ew[ey].level)){if(ez.from!=ez.to){dz=ey}return ex}else{if(ez.from!=ez.to){dz=ex}return ey}}}}return ey}function dI(ew,ez,ex,ey){if(!ey){return ez+ex}do{ez+=ex}while(ez>0&&dV(ew.text.charAt(ez)));return ez}function q(ew,eD,ey,ez){var eA=a(ew);if(!eA){return R(ew,eD,ey,ez)}var eC=aj(eA,eD),ex=eA[eC];var eB=dI(ew,eD,ex.level%2?-ey:ey,ez);for(;;){if(eB>ex.from&&eB<ex.to){return eB}if(eB==ex.from||eB==ex.to){if(aj(eA,eB)==eC){return eB}ex=eA[eC+=ey];return(ey>0)==ex.level%2?ex.to:ex.from}else{ex=eA[eC+=ey];if(!ex){return null}if((ey>0)==ex.level%2){eB=dI(ew,ex.to,-1,ez)}else{eB=dI(ew,ex.from,1,ez)}}}}function R(ew,eA,ex,ey){var ez=eA+ex;if(ey){while(ez>0&&dV(ew.text.charAt(ez))){ez+=ex}}return ez<0||ez>ew.text.length?null:ez}var aM=(function(){var eC="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL";var eA="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr";function ez(eF){if(eF<=255){return eC.charAt(eF)}else{if(1424<=eF&&eF<=1524){return"R"}else{if(1536<=eF&&eF<=1791){return eA.charAt(eF-1536)}else{if(1792<=eF&&eF<=2220){return"r"}else{return"L"}}}}}var ew=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var eE=/[stwN]/,ey=/[LRr]/,ex=/[Lb1n]/,eB=/[1n]/;var eD="L";return function(eP){if(!ew.test(eP)){return false}var eV=eP.length,eL=[];for(var eU=0,eH;eU<eV;++eU){eL.push(eH=ez(eP.charCodeAt(eU)))}for(var eU=0,eO=eD;eU<eV;++eU){var eH=eL[eU];if(eH=="m"){eL[eU]=eO}else{eO=eH}}for(var eU=0,eF=eD;eU<eV;++eU){var eH=eL[eU];if(eH=="1"&&eF=="r"){eL[eU]="n"}else{if(ey.test(eH)){eF=eH;if(eH=="r"){eL[eU]="R"}}}}for(var eU=1,eO=eL[0];eU<eV-1;++eU){var eH=eL[eU];if(eH=="+"&&eO=="1"&&eL[eU+1]=="1"){eL[eU]="1"}else{if(eH==","&&eO==eL[eU+1]&&(eO=="1"||eO=="n")){eL[eU]=eO}}eO=eH}for(var eU=0;eU<eV;++eU){var eH=eL[eU];if(eH==","){eL[eU]="N"}else{if(eH=="%"){for(var eI=eU+1;eI<eV&&eL[eI]=="%";++eI){}var eW=(eU&&eL[eU-1]=="!")||(eI<eV&&eL[eI]=="1")?"1":"N";for(var eS=eU;eS<eI;++eS){eL[eS]=eW}eU=eI-1}}}for(var eU=0,eF=eD;eU<eV;++eU){var eH=eL[eU];if(eF=="L"&&eH=="1"){eL[eU]="L"}else{if(ey.test(eH)){eF=eH}}}for(var eU=0;eU<eV;++eU){if(eE.test(eL[eU])){for(var eI=eU+1;eI<eV&&eE.test(eL[eI]);++eI){}var eM=(eU?eL[eU-1]:eD)=="L";var eG=(eI<eV?eL[eI]:eD)=="L";var eW=eM||eG?"L":"R";for(var eS=eU;eS<eI;++eS){eL[eS]=eW}eU=eI-1}}var eT=[],eQ;for(var eU=0;eU<eV;){if(ex.test(eL[eU])){var eJ=eU;for(++eU;eU<eV&&ex.test(eL[eU]);++eU){}eT.push({from:eJ,to:eU,level:0})}else{var eK=eU,eN=eT.length;for(++eU;eU<eV&&eL[eU]!="L";++eU){}for(var eS=eK;eS<eU;){if(eB.test(eL[eS])){if(eK<eS){eT.splice(eN,0,{from:eK,to:eS,level:1})}var eR=eS;for(++eS;eS<eU&&eB.test(eL[eS]);++eS){}eT.splice(eN,0,{from:eR,to:eS,level:2});eK=eS}else{++eS}}if(eK<eU){eT.splice(eN,0,{from:eK,to:eU,level:1})}}}if(eT[0].level==1&&(eQ=eP.match(/^\s+/))){eT[0].from=eQ[0].length;eT.unshift({from:0,to:eQ[0].length,level:0})}if(d7(eT).level==1&&(eQ=eP.match(/\s+$/))){d7(eT).to-=eQ[0].length;eT.push({from:eV-eQ[0].length,to:eV,level:0})}if(eT[0].level!=d7(eT).level){eT.push({from:eV,to:eV,level:eT[0].level})}return eT}})();B.version="3.21.0";return B})();
3
- // CodeMirror XML.
4
- CodeMirror.defineMode("xml",function(w,j){var p=w.indentUnit;var v=j.multilineTagIndentFactor||1;var b=j.multilineTagIndentPastTag||true;var u=j.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var a=j.alignCDATA;var d,e,f;function m(E,D){function B(G){D.tokenize=G;return G(E,D)}var C=E.next();if(C=="<"){if(E.eat("!")){if(E.eat("[")){if(E.match("CDATA[")){return B(t("atom","]]>"))}else{return null}}else{if(E.match("--")){return B(t("comment","-->"))}else{if(E.match("DOCTYPE",true,true)){E.eatWhile(/[\w\._\-]/);return B(x(1))}else{return null}}}}else{if(E.eat("?")){E.eatWhile(/[\w\._\-]/);D.tokenize=t("meta","?>");return"meta"}else{var z=E.eat("/");d="";var F;while((F=E.eat(/[^\s\u00a0=<>\"\'\/?]/))){d+=F}if(!d){return"tag error"}e=z?"closeTag":"openTag";D.tokenize=l;return"tag"}}}else{if(C=="&"){var A;if(E.eat("#")){if(E.eat("x")){A=E.eatWhile(/[a-fA-F\d]/)&&E.eat(";")}else{A=E.eatWhile(/[\d]/)&&E.eat(";")}}else{A=E.eatWhile(/[\w\.\-:]/)&&E.eat(";")}return A?"atom":"error"}else{E.eatWhile(/[^&<]/);return null}}}function l(C,B){var A=C.next();if(A==">"||(A=="/"&&C.eat(">"))){B.tokenize=m;e=A==">"?"endTag":"selfcloseTag";return"tag"}else{if(A=="="){e="equals";return null}else{if(A=="<"){B.tokenize=m;B.state=k;B.tagName=B.tagStart=null;var z=B.tokenize(C,B);return z?z+" error":"error"}else{if(/[\'\"]/.test(A)){B.tokenize=i(A);B.stringStartCol=C.column();return B.tokenize(C,B)}else{C.eatWhile(/[^\s\u00a0=<>\"\']/);return"word"}}}}}function i(z){var A=function(C,B){while(!C.eol()){if(C.next()==z){B.tokenize=l;break}}return"string"};A.isInAttribute=true;return A}function t(A,z){return function(C,B){while(!C.eol()){if(C.match(z)){B.tokenize=m;break}C.next()}return A}}function x(z){return function(C,B){var A;while((A=C.next())!=null){if(A=="<"){B.tokenize=x(z+1);return B.tokenize(C,B)}else{if(A==">"){if(z==1){B.tokenize=m;break}else{B.tokenize=x(z-1);return B.tokenize(C,B)}}}}return"meta"}}function q(A,z,B){this.prev=A.context;this.tagName=z;this.indent=A.indented;this.startOfLine=B;if(u.doNotIndent.hasOwnProperty(z)||(A.context&&A.context.noIndent)){this.noIndent=true}}function s(z){if(z.context){z.context=z.context.prev}}function o(B,A){var z;while(true){if(!B.context){return}z=B.context.tagName.toLowerCase();if(!u.contextGrabbers.hasOwnProperty(z)||!u.contextGrabbers[z].hasOwnProperty(A)){return}s(B)}}function k(z,C,B){if(z=="openTag"){B.tagName=d;B.tagStart=C.column();return c}else{if(z=="closeTag"){var A=false;if(B.context){if(B.context.tagName!=d){if(u.implicitlyClosed.hasOwnProperty(B.context.tagName.toLowerCase())){s(B)}A=!B.context||B.context.tagName!=d}}else{A=true}if(A){f="error"}return A?y:r}else{return k}}}function r(A,z,B){if(A!="endTag"){f="error";return r}s(B);return k}function y(z,B,A){f="error";return r(z,B,A)}function c(C,A,D){if(C=="word"){f="attribute";return h}else{if(C=="endTag"||C=="selfcloseTag"){var B=D.tagName,z=D.tagStart;D.tagName=D.tagStart=null;if(C=="selfcloseTag"||u.autoSelfClosers.hasOwnProperty(B.toLowerCase())){o(D,B.toLowerCase())}else{o(D,B.toLowerCase());D.context=new q(D,B,z==D.indented)}return k}}f="error";return c}function h(z,B,A){if(z=="equals"){return n}if(!u.allowMissing){f="error"}return c(z,B,A)}function n(z,B,A){if(z=="string"){return g}if(z=="word"&&u.allowUnquoted){f="string";return c}f="error";return c(z,B,A)}function g(z,B,A){if(z=="string"){return g}return c(z,B,A)}return{startState:function(){return{tokenize:m,state:k,indented:0,tagName:null,tagStart:null,context:null}},token:function(B,A){if(!A.tagName&&B.sol()){A.indented=B.indentation()}if(B.eatSpace()){return null}d=e=null;var z=A.tokenize(B,A);if((z||e)&&z!="comment"){f=null;A.state=A.state(e||z,B,A);if(f){z=f=="error"?z+" error":f}}return z},indent:function(C,z,B){var A=C.context;if(C.tokenize.isInAttribute){return C.stringStartCol+1}if(A&&A.noIndent){return CodeMirror.Pass}if(C.tokenize!=l&&C.tokenize!=m){return B?B.match(/^(\s*)/)[0].length:0}if(C.tagName){if(b){return C.tagStart+C.tagName.length+2}else{return C.tagStart+p*v}}if(a&&/<!\[CDATA\[/.test(z)){return 0}if(A&&/^<\//.test(z)){A=A.prev}while(A&&!A.startOfLine){A=A.prev}if(A){return A.indent+p}else{return 0}},electricChars:"/",blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:j.htmlMode?"html":"xml",helperType:j.htmlMode?"html":"xml"}});CodeMirror.defineMIME("text/xml","xml");CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")){CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true})};
5
- // CodeMirror JS.
6
- CodeMirror.defineMode("javascript",function(W,ag){var i=W.indentUnit;var w=ag.statementIndent;var v=ag.json;var e=ag.typescript;var am=function(){function aJ(aL){return{type:aL,style:"keyword"}}var aE=aJ("keyword a"),aC=aJ("keyword b"),aB=aJ("keyword c");var aD=aJ("operator"),aH={type:"atom",style:"atom"};var aF={"if":aJ("if"),"while":aE,"with":aE,"else":aC,"do":aC,"try":aC,"finally":aC,"return":aB,"break":aB,"continue":aB,"new":aB,"delete":aB,"throw":aB,"debugger":aB,"var":aJ("var"),"const":aJ("var"),let:aJ("var"),"function":aJ("function"),"catch":aJ("catch"),"for":aJ("for"),"switch":aJ("switch"),"case":aJ("case"),"default":aJ("default"),"in":aD,"typeof":aD,"instanceof":aD,"true":aH,"false":aH,"null":aH,"undefined":aH,"NaN":aH,"Infinity":aH,"this":aJ("this"),module:aJ("module"),"class":aJ("class"),"super":aJ("atom"),yield:aB,"export":aJ("export"),"import":aJ("import"),"extends":aB};if(e){var aK={type:"variable",style:"variable-3"};var aG={"interface":aJ("interface"),"extends":aJ("extends"),constructor:aJ("constructor"),"public":aJ("public"),"private":aJ("private"),"protected":aJ("protected"),"static":aJ("static"),string:aK,number:aK,bool:aK,any:aK};for(var aI in aG){aF[aI]=aG[aI]}}return aF}();var L=/[+\-*&%=<>!?|~^]/;function B(aE){var aC=false,aB,aD=false;while((aB=aE.next())!=null){if(!aC){if(aB=="/"&&!aD){return}if(aB=="["){aD=true}else{if(aD&&aB=="]"){aD=false}}}aC=!aC&&aB=="\\"}}var O,C;function H(aD,aC,aB){O=aD;C=aB;return aC}function Q(aF,aD){var aB=aF.next();if(aB=='"'||aB=="'"){aD.tokenize=N(aB);return aD.tokenize(aF,aD)}else{if(aB=="."&&aF.match(/^\d+(?:[eE][+\-]?\d+)?/)){return H("number","number")}else{if(aB=="."&&aF.match("..")){return H("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aB)){return H(aB)}else{if(aB=="="&&aF.eat(">")){return H("=>","operator")}else{if(aB=="0"&&aF.eat(/x/i)){aF.eatWhile(/[\da-f]/i);return H("number","number")}else{if(/\d/.test(aB)){aF.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return H("number","number")}else{if(aB=="/"){if(aF.eat("*")){aD.tokenize=at;return at(aF,aD)}else{if(aF.eat("/")){aF.skipToEnd();return H("comment","comment")}else{if(aD.lastType=="operator"||aD.lastType=="keyword c"||aD.lastType=="sof"||/^[\[{}\(,;:]$/.test(aD.lastType)){B(aF);aF.eatWhile(/[gimy]/);return H("regexp","string-2")}else{aF.eatWhile(L);return H("operator","operator",aF.current())}}}}else{if(aB=="`"){aD.tokenize=au;return au(aF,aD)}else{if(aB=="#"){aF.skipToEnd();return H("error","error")}else{if(L.test(aB)){aF.eatWhile(L);return H("operator","operator",aF.current())}else{aF.eatWhile(/[\w\$_]/);var aE=aF.current(),aC=am.propertyIsEnumerable(aE)&&am[aE];return(aC&&aD.lastType!=".")?H(aC.type,aC.style,aE):H("variable","variable",aE)}}}}}}}}}}}}function N(aB){return function(aF,aD){var aE=false,aC;while((aC=aF.next())!=null){if(aC==aB&&!aE){break}aE=!aE&&aC=="\\"}if(!aE){aD.tokenize=Q}return H("string","string")}}function at(aE,aD){var aB=false,aC;while(aC=aE.next()){if(aC=="/"&&aB){aD.tokenize=Q;break}aB=(aC=="*")}return H("comment","comment")}function au(aE,aC){var aD=false,aB;while((aB=aE.next())!=null){if(!aD&&(aB=="`"||aB=="$"&&aE.eat("{"))){aC.tokenize=Q;break}aD=!aD&&aB=="\\"}return H("quasi","string-2",aE.current())}var j="([{}])";function ap(aH,aE){if(aE.fatArrowAt){aE.fatArrowAt=null}var aD=aH.string.indexOf("=>",aH.start);if(aD<0){return}var aG=0,aC=false;for(var aI=aD-1;aI>=0;--aI){var aB=aH.string.charAt(aI);var aF=j.indexOf(aB);if(aF>=0&&aF<3){if(!aG){++aI;break}if(--aG==0){break}}else{if(aF>=3&&aF<6){++aG}else{if(/[$\w]/.test(aB)){aC=true}else{if(aC&&!aG){++aI;break}}}}}if(aC&&!aG){aE.fatArrowAt=aI}}var a={atom:true,number:true,variable:true,string:true,regexp:true,"this":true};function F(aG,aC,aB,aF,aD,aE){this.indented=aG;this.column=aC;this.type=aB;this.prev=aD;this.info=aE;if(aF!=null){this.align=aF}}function o(aE,aD){for(var aC=aE.localVars;aC;aC=aC.next){if(aC.name==aD){return true}}for(var aB=aE.context;aB;aB=aB.prev){for(var aC=aB.vars;aC;aC=aC.next){if(aC.name==aD){return true}}}}function d(aF,aC,aB,aE,aG){var aH=aF.cc;z.state=aF;z.stream=aG;z.marked=null,z.cc=aH;if(!aF.lexical.hasOwnProperty("align")){aF.lexical.align=true}while(true){var aD=aH.length?aH.pop():v?ak:az;if(aD(aB,aE)){while(aH.length&&aH[aH.length-1].lex){aH.pop()()}if(z.marked){return z.marked}if(aB=="variable"&&o(aF,aE)){return"variable-2"}return aC}}}var z={state:null,column:null,marked:null,cc:null};function X(){for(var aB=arguments.length-1;aB>=0;aB--){z.cc.push(arguments[aB])}}function ab(){X.apply(null,arguments);return true}function ao(aC){function aB(aF){for(var aE=aF;aE;aE=aE.next){if(aE.name==aC){return true}}return false}var aD=z.state;if(aD.context){z.marked="def";if(aB(aD.localVars)){return}aD.localVars={name:aC,next:aD.localVars}}else{if(aB(aD.globalVars)){return}if(ag.globalVars){aD.globalVars={name:aC,next:aD.globalVars}}}}var m={name:"this",next:{name:"arguments"}};function s(){z.state.context={prev:z.state.context,vars:z.state.localVars};z.state.localVars=m}function t(){z.state.localVars=z.state.context.vars;z.state.context=z.state.context.prev}function ax(aC,aD){var aB=function(){var aF=z.state,aE=aF.indented;if(aF.lexical.type=="stat"){aE=aF.lexical.indented}aF.lexical=new F(aE,z.stream.column(),aC,null,aF.lexical,aD)};aB.lex=true;return aB}function f(){var aB=z.state;if(aB.lexical.prev){if(aB.lexical.type==")"){aB.indented=aB.lexical.indented}aB.lexical=aB.lexical.prev}}f.lex=true;function n(aB){return function(aC){if(aC==aB){return ab()}else{if(aB==";"){return X()}else{return ab(arguments.callee)}}}}function az(aB,aC){if(aB=="var"){return ab(ax("vardef",aC.length),b,n(";"),f)}if(aB=="keyword a"){return ab(ax("form"),ak,az,f)}if(aB=="keyword b"){return ab(ax("form"),az,f)}if(aB=="{"){return ab(ax("}"),u,f)}if(aB==";"){return ab()}if(aB=="if"){return ab(ax("form"),ak,az,f,c)}if(aB=="function"){return ab(I)}if(aB=="for"){return ab(ax("form"),q,az,f)}if(aB=="variable"){return ab(ax("stat"),aA)}if(aB=="switch"){return ab(ax("form"),ak,ax("}","switch"),n("{"),u,f,f)}if(aB=="case"){return ab(ak,n(":"))}if(aB=="default"){return ab(n(":"))}if(aB=="catch"){return ab(ax("form"),s,n("("),ac,n(")"),az,f,t)}if(aB=="module"){return ab(ax("form"),s,D,t,f)}if(aB=="class"){return ab(ax("form"),S,R,f)}if(aB=="export"){return ab(ax("form"),ay,f)}if(aB=="import"){return ab(ax("form"),ad,f)}return X(ax("stat"),ak,n(";"),f)}function ak(aB){return V(aB,false)}function aw(aB){return V(aB,true)}function V(aC,aE){if(z.state.fatArrowAt==z.stream.start){var aB=aE?J:T;if(aC=="("){return ab(s,ax(")"),an(g,")"),f,n("=>"),aB,t)}else{if(aC=="variable"){return X(s,g,n("=>"),aB,t)}}}var aD=aE?h:Y;if(a.hasOwnProperty(aC)){return ab(aD)}if(aC=="function"){return ab(I)}if(aC=="keyword c"){return ab(aE?ah:af)}if(aC=="("){return ab(ax(")"),af,ar,n(")"),f,aD)}if(aC=="operator"||aC=="spread"){return ab(aE?aw:ak)}if(aC=="["){return ab(ax("]"),k,f,aD)}if(aC=="{"){return aq(p,"}",null,aD)}return ab()}function af(aB){if(aB.match(/[;\}\)\],]/)){return X()}return X(ak)}function ah(aB){if(aB.match(/[;\}\)\],]/)){return X()}return X(aw)}function Y(aB,aC){if(aB==","){return ab(ak)}return h(aB,aC,false)}function h(aB,aD,aF){var aC=aF==false?Y:h;var aE=aF==false?ak:aw;if(aD=="=>"){return ab(s,aF?J:T,t)}if(aB=="operator"){if(/\+\+|--/.test(aD)){return ab(aC)}if(aD=="?"){return ab(ak,n(":"),aE)}return ab(aE)}if(aB=="quasi"){z.cc.push(aC);return M(aD)}if(aB==";"){return}if(aB=="("){return aq(aw,")","call",aC)}if(aB=="."){return ab(ai,aC)}if(aB=="["){return ab(ax("]"),af,n("]"),f,aC)}}function M(aB){if(aB.slice(aB.length-2)!="${"){return ab()}return ab(ak,l)}function l(aB){if(aB=="}"){z.marked="string-2";z.state.tokenize=au;return ab()}}function T(aB){ap(z.stream,z.state);if(aB=="{"){return X(az)}return X(ak)}function J(aB){ap(z.stream,z.state);if(aB=="{"){return X(az)}return X(aw)}function aA(aB){if(aB==":"){return ab(f,az)}return X(Y,n(";"),f)}function ai(aB){if(aB=="variable"){z.marked="property";return ab()}}function p(aB,aC){if(aB=="variable"){z.marked="property";if(aC=="get"||aC=="set"){return ab(E)}}else{if(aB=="number"||aB=="string"){z.marked=aB+" property"}else{if(aB=="["){return ab(ak,n("]"),G)}}}if(a.hasOwnProperty(aB)){return ab(G)}}function E(aB){if(aB!="variable"){return X(G)}z.marked="property";return ab(I)}function G(aB){if(aB==":"){return ab(aw)}if(aB=="("){return X(I)}}function an(aD,aB){function aC(aF){if(aF==","){var aE=z.state.lexical;if(aE.info=="call"){aE.pos=(aE.pos||0)+1}return ab(aD,aC)}if(aF==aB){return ab()}return ab(n(aB))}return function(aE){if(aE==aB){return ab()}return X(aD,aC)}}function aq(aE,aB,aD){for(var aC=3;aC<arguments.length;aC++){z.cc.push(arguments[aC])}return ab(ax(aB,aD),an(aE,aB),f)}function u(aB){if(aB=="}"){return ab()}return X(az,u)}function P(aB){if(e&&aB==":"){return ab(aa)}}function aa(aB){if(aB=="variable"){z.marked="variable-3";return ab()}}function b(){return X(g,P,Z,U)}function g(aB,aC){if(aB=="variable"){ao(aC);return ab()}if(aB=="["){return aq(g,"]")}if(aB=="{"){return aq(av,"}")}}function av(aB,aC){if(aB=="variable"&&!z.stream.match(/^\s*:/,false)){ao(aC);return ab(Z)}if(aB=="variable"){z.marked="property"}return ab(n(":"),g,Z)}function Z(aB,aC){if(aC=="="){return ab(aw)}}function U(aB){if(aB==","){return ab(b)}}function c(aB,aC){if(aB=="keyword b"&&aC=="else"){return ab(ax("form"),az,f)}}function q(aB){if(aB=="("){return ab(ax(")"),A,n(")"),f)}}function A(aB){if(aB=="var"){return ab(b,n(";"),y)}if(aB==";"){return ab(y)}if(aB=="variable"){return ab(r)}return X(ak,n(";"),y)}function r(aB,aC){if(aC=="in"||aC=="of"){z.marked="keyword";return ab(ak)}return ab(Y,y)}function y(aB,aC){if(aB==";"){return ab(x)}if(aC=="in"||aC=="of"){z.marked="keyword";return ab(ak)}return X(ak,n(";"),x)}function x(aB){if(aB!=")"){ab(ak)}}function I(aB,aC){if(aC=="*"){z.marked="keyword";return ab(I)}if(aB=="variable"){ao(aC);return ab(I)}if(aB=="("){return ab(s,ax(")"),an(ac,")"),f,az,t)}}function ac(aB){if(aB=="spread"){return ab(ac)}return X(g,P)}function S(aB,aC){if(aB=="variable"){ao(aC);return ab(K)}}function K(aB,aC){if(aC=="extends"){return ab(ak)}}function R(aB){if(aB=="{"){return aq(p,"}")}}function D(aB,aC){if(aB=="string"){return ab(az)}if(aB=="variable"){ao(aC);return ab(ae)}}function ay(aB,aC){if(aC=="*"){z.marked="keyword";return ab(ae,n(";"))}if(aC=="default"){z.marked="keyword";return ab(ak,n(";"))}return X(az)}function ad(aB){if(aB=="string"){return ab()}return X(al,ae)}function al(aB,aC){if(aB=="{"){return aq(al,"}")}if(aB=="variable"){ao(aC)}return ab()}function ae(aB,aC){if(aC=="from"){z.marked="keyword";return ab(ak)}}function k(aB){if(aB=="]"){return ab()}return X(aw,aj)}function aj(aB){if(aB=="for"){return X(ar,n("]"))}if(aB==","){return ab(an(aw,"]"))}return X(an(aw,"]"))}function ar(aB){if(aB=="for"){return ab(q,ar)}if(aB=="if"){return ab(ak,ar)}}return{startState:function(aC){var aB={tokenize:Q,lastType:"sof",cc:[],lexical:new F((aC||0)-i,0,"block",false),localVars:ag.localVars,context:ag.localVars&&{vars:ag.localVars},indented:0};if(ag.globalVars){aB.globalVars=ag.globalVars}return aB},token:function(aD,aC){if(aD.sol()){if(!aC.lexical.hasOwnProperty("align")){aC.lexical.align=false}aC.indented=aD.indentation();ap(aD,aC)}if(aC.tokenize!=at&&aD.eatSpace()){return null}var aB=aC.tokenize(aD,aC);if(O=="comment"){return aB}aC.lastType=O=="operator"&&(C=="++"||C=="--")?"incdec":O;return d(aC,aB,O,C,aD)},indent:function(aH,aB){if(aH.tokenize==at){return CodeMirror.Pass}if(aH.tokenize!=Q){return 0}var aG=aB&&aB.charAt(0),aE=aH.lexical;for(var aD=aH.cc.length-1;aD>=0;--aD){var aI=aH.cc[aD];if(aI==f){aE=aE.prev}else{if(aI!=c){break}}}if(aE.type=="stat"&&aG=="}"){aE=aE.prev}if(w&&aE.type==")"&&aE.prev.type=="stat"){aE=aE.prev}var aF=aE.type,aC=aG==aF;if(aF=="vardef"){return aE.indented+(aH.lastType=="operator"||aH.lastType==","?aE.info+1:0)}else{if(aF=="form"&&aG=="{"){return aE.indented}else{if(aF=="form"){return aE.indented+i}else{if(aF=="stat"){return aE.indented+(aH.lastType=="operator"||aH.lastType==","?w||i:0)}else{if(aE.info=="switch"&&!aC&&ag.doubleIndentSwitch!=false){return aE.indented+(/^(?:case|default)\b/.test(aB)?i:2*i)}else{if(aE.align){return aE.column+(aC?0:1)}else{return aE.indented+(aC?0:i)}}}}}}},electricChars:":{}",blockCommentStart:v?null:"/*",blockCommentEnd:v?null:"*/",lineComment:v?null:"//",fold:"brace",helperType:v?"json":"javascript",jsonMode:v}});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:true});CodeMirror.defineMIME("application/x-json",{name:"javascript",json:true});CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:true});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:true});
7
- // CodeMirror CSS.
8
- CodeMirror.defineMode("css",function(u,i){if(!i.propertyKeywords){i=CodeMirror.resolveMode("text/css")}var o=u.indentUnit,b=i.tokenHooks,t=i.mediaTypes||{},k=i.mediaFeatures||{},h=i.propertyKeywords||{},n=i.colorKeywords||{},q=i.valueKeywords||{},d=i.fontProperties||{},l=i.allowNested;var c,m;function v(y,z){c=z;return y}function x(B,A){var z=B.next();if(b[z]){var y=b[z](B,A);if(y!==false){return y}}if(z=="@"){B.eatWhile(/[\w\\\-]/);return v("def",B.current())}else{if(z=="="||(z=="~"||z=="|")&&B.eat("=")){return v(null,"compare")}else{if(z=='"'||z=="'"){A.tokenize=j(z);return A.tokenize(B,A)}else{if(z=="#"){B.eatWhile(/[\w\\\-]/);return v("atom","hash")}else{if(z=="!"){B.match(/^\s*\w*/);return v("keyword","important")}else{if(/\d/.test(z)||z=="."&&B.eat(/\d/)){B.eatWhile(/[\w.%]/);return v("number","unit")}else{if(z==="-"){if(/[\d.]/.test(B.peek())){B.eatWhile(/[\w.%]/);return v("number","unit")}else{if(B.match(/^[^-]+-/)){return v("meta","meta")}}}else{if(/[,+>*\/]/.test(z)){return v(null,"select-op")}else{if(z=="."&&B.match(/^-?[_a-z][_a-z0-9-]*/i)){return v("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(z)){return v(null,z)}else{if(z=="u"&&B.match("rl(")){B.backUp(1);A.tokenize=w;return v("property","word")}else{if(/[\w\\\-]/.test(z)){B.eatWhile(/[\w\\\-]/);return v("property","word")}else{return v(null,null)}}}}}}}}}}}}}function j(y){return function(C,A){var B=false,z;while((z=C.next())!=null){if(z==y&&!B){if(y==")"){C.backUp(1)}break}B=!B&&z=="\\"}if(z==y||!B&&y!=")"){A.tokenize=null}return v("string","string")}}function w(z,y){z.next();if(!z.match(/\s*[\"\']/,false)){y.tokenize=j(")")}else{y.tokenize=null}return v(null,"(")}function p(z,y,A){this.type=z;this.indent=y;this.prev=A}function f(z,A,y){z.context=new p(y,A.indentation()+o,z.context);return y}function r(y){y.context=y.context.prev;return y.context.type}function a(y,A,z){return e[z.context.type](y,A,z)}function s(z,B,A,C){for(var y=C||1;y>0;y--){A.context=A.context.prev}return a(z,B,A)}function g(z){var y=z.current().toLowerCase();if(q.hasOwnProperty(y)){m="atom"}else{if(n.hasOwnProperty(y)){m="keyword"}else{m="variable"}}}var e={};e.top=function(y,A,z){if(y=="{"){return f(z,A,"block")}else{if(y=="}"&&z.context.prev){return r(z)}else{if(y=="@media"){return f(z,A,"media")}else{if(y=="@font-face"){return"font_face_before"}else{if(y&&y.charAt(0)=="@"){return f(z,A,"at")}else{if(y=="hash"){m="builtin"}else{if(y=="word"){m="tag"}else{if(y=="variable-definition"){return"maybeprop"}else{if(y=="interpolation"){return f(z,A,"interpolation")}else{if(y==":"){return"pseudo"}else{if(l&&y=="("){return f(z,A,"params")}}}}}}}}}}}return z.context.type};e.block=function(y,A,z){if(y=="word"){if(h.hasOwnProperty(A.current().toLowerCase())){m="property";return"maybeprop"}else{if(l){m=A.match(/^\s*:/,false)?"property":"tag";return"block"}else{m+=" error";return"maybeprop"}}}else{if(y=="meta"){return"block"}else{if(!l&&(y=="hash"||y=="qualifier")){m="error";return"block"}else{return e.top(y,A,z)}}}};e.maybeprop=function(y,A,z){if(y==":"){return f(z,A,"prop")}return a(y,A,z)};e.prop=function(y,A,z){if(y==";"){return r(z)}if(y=="{"&&l){return f(z,A,"propBlock")}if(y=="}"||y=="{"){return s(y,A,z)}if(y=="("){return f(z,A,"parens")}if(y=="hash"&&!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(A.current())){m+=" error"}else{if(y=="word"){g(A)}else{if(y=="interpolation"){return f(z,A,"interpolation")}}}return"prop"};e.propBlock=function(z,y,A){if(z=="}"){return r(A)}if(z=="word"){m="property";return"maybeprop"}return A.context.type};e.parens=function(y,A,z){if(y=="{"||y=="}"){return s(y,A,z)}if(y==")"){return r(z)}return"parens"};e.pseudo=function(y,A,z){if(y=="word"){m="variable-3";return z.context.type}return a(y,A,z)};e.media=function(y,B,z){if(y=="("){return f(z,B,"media_parens")}if(y=="}"){return s(y,B,z)}if(y=="{"){return r(z)&&f(z,B,l?"block":"top")}if(y=="word"){var A=B.current().toLowerCase();if(A=="only"||A=="not"||A=="and"){m="keyword"}else{if(t.hasOwnProperty(A)){m="attribute"}else{if(k.hasOwnProperty(A)){m="property"}else{m="error"}}}}return z.context.type};e.media_parens=function(y,A,z){if(y==")"){return r(z)}if(y=="{"||y=="}"){return s(y,A,z,2)}return e.media(y,A,z)};e.font_face_before=function(y,A,z){if(y=="{"){return f(z,A,"font_face")}return a(y,A,z)};e.font_face=function(y,A,z){if(y=="}"){return r(z)}if(y=="word"){if(!d.hasOwnProperty(A.current().toLowerCase())){m="error"}else{m="property"}return"maybeprop"}return"font_face"};e.at=function(y,A,z){if(y==";"){return r(z)}if(y=="{"||y=="}"){return s(y,A,z)}if(y=="word"){m="tag"}else{if(y=="hash"){m="builtin"}}return"at"};e.interpolation=function(y,A,z){if(y=="}"){return r(z)}if(y=="{"||y==";"){return s(y,A,z)}if(y!="variable"){m="error"}return"interpolation"};e.params=function(y,A,z){if(y==")"){return r(z)}if(y=="{"||y=="}"){return s(y,A,z)}if(y=="word"){g(A)}return"params"};return{startState:function(y){return{tokenize:null,state:"top",context:new p("top",y||0,null)}},token:function(A,z){if(!z.tokenize&&A.eatSpace()){return null}var y=(z.tokenize||x)(A,z);if(y&&typeof y=="object"){c=y[1];y=y[0]}m=y;z.state=e[z.state](c,A,z);return m},indent:function(C,A){var z=C.context,B=A&&A.charAt(0);var y=z.indent;if(z.prev&&(B=="}"&&(z.type=="block"||z.type=="top"||z.type=="interpolation"||z.type=="font_face")||B==")"&&(z.type=="parens"||z.type=="params"||z.type=="media_parens")||B=="{"&&(z.type=="at"||z.type=="media"))){y=z.indent-o;z=z.prev}return y},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});(function(){function d(s){var r={};for(var q=0;q<s.length;++q){r[s[q]]=true}return r}var m=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],f=d(m);var g=["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"],l=d(g);var 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","flow-from","flow-into","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","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-inside","shape-outside","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-overflow","text-shadow","text-size-adjust","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","zoom","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-profile","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","kerning","text-anchor","writing-mode"],n=d(e);var k=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],o=d(k);var b=["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","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","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","column","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","ellipse","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","keep-all","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","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","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","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],h=d(b);var j=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],a=d(j);var i=m.concat(g).concat(e).concat(k).concat(b);CodeMirror.registerHelper("hintWords","css",i);function p(t,s){var q=false,r;while((r=t.next())!=null){if(q&&r=="/"){s.tokenize=null;break}q=(r=="*")}return["comment","comment"]}function c(r,q){if(r.skipTo("-->")){r.match("-->");q.tokenize=null}else{r.skipToEnd()}return["comment","comment"]}CodeMirror.defineMIME("text/css",{mediaTypes:f,mediaFeatures:l,propertyKeywords:n,colorKeywords:o,valueKeywords:h,fontProperties:a,tokenHooks:{"<":function(r,q){if(!r.match("!--")){return false}q.tokenize=c;return c(r,q)},"/":function(r,q){if(!r.eat("*")){return false}q.tokenize=p;return p(r,q)}},name:"css"});CodeMirror.defineMIME("text/x-scss",{mediaTypes:f,mediaFeatures:l,propertyKeywords:n,colorKeywords:o,valueKeywords:h,fontProperties:a,allowNested:true,tokenHooks:{"/":function(r,q){if(r.eat("/")){r.skipToEnd();return["comment","comment"]}else{if(r.eat("*")){q.tokenize=p;return p(r,q)}else{return["operator","operator"]}}},":":function(q){if(q.match(/\s*{/)){return[null,"{"]}return false},"$":function(q){q.match(/^[\w-]+/);if(q.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(q){if(!q.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});CodeMirror.defineMIME("text/x-less",{mediaTypes:f,mediaFeatures:l,propertyKeywords:n,colorKeywords:o,valueKeywords:h,fontProperties:a,allowNested:true,tokenHooks:{"/":function(r,q){if(r.eat("/")){r.skipToEnd();return["comment","comment"]}else{if(r.eat("*")){q.tokenize=p;return p(r,q)}else{return["operator","operator"]}}},"@":function(q){if(q.match(/^(charset|document|font-face|import|keyframes|media|namespace|page|supports)\b/,false)){return false}q.eatWhile(/[\w\\\-]/);if(q.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})})();
9
- // CodeMirror HTML.
10
- CodeMirror.defineMode("htmlmixed",function(b,c){var a=CodeMirror.getMode(b,{name:"xml",htmlMode:true});var m=CodeMirror.getMode(b,"css");var k=[],j=c&&c.scriptTypes;k.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(b,"javascript")});if(j){for(var d=0;d<j.length;++d){var h=j[d];k.push({matches:h.matches,mode:h.mode&&CodeMirror.getMode(b,h.mode)})}}k.push({matches:/./,mode:CodeMirror.getMode(b,"text/plain")});function e(s,q){var o=q.htmlState.tagName;var p=a.token(s,q.htmlState);if(o=="script"&&/\btag\b/.test(p)&&s.current()==">"){var t=s.string.slice(Math.max(0,s.pos-100),s.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);t=t?t[1]:"";if(t&&/[\"\']/.test(t.charAt(0))){t=t.slice(1,t.length-1)}for(var n=0;n<k.length;++n){var r=k[n];if(typeof r.matches=="string"?t==r.matches:r.matches.test(t)){if(r.mode){q.token=l;q.localMode=r.mode;q.localState=r.mode.startState&&r.mode.startState(a.indent(q.htmlState,""))}break}}}else{if(o=="style"&&/\btag\b/.test(p)&&s.current()==">"){q.token=f;q.localMode=m;q.localState=m.startState(a.indent(q.htmlState,""))}}return p}function g(r,n,o){var q=r.current();var p=q.search(n),i;if(p>-1){r.backUp(q.length-p)}else{if(i=q.match(/<\/?$/)){r.backUp(q.length);if(!r.match(n,false)){r.match(q)}}}return o}function l(n,i){if(n.match(/^<\/\s*script\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*script\s*>/,i.localMode.token(n,i.localState))}function f(n,i){if(n.match(/^<\/\s*style\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*style\s*>/,m.token(n,i.localState))}return{startState:function(){var i=a.startState();return{token:e,localMode:null,localState:null,htmlState:i}},copyState:function(n){if(n.localState){var i=CodeMirror.copyState(n.localMode,n.localState)}return{token:n.token,localMode:n.localMode,localState:i,htmlState:CodeMirror.copyState(a,n.htmlState)}},token:function(n,i){return i.token(n,i)},indent:function(n,i){if(!n.localMode||/^\s*<\//.test(i)){return a.indent(n.htmlState,i)}else{if(n.localMode.indent){return n.localMode.indent(n.localState,i)}else{return CodeMirror.Pass}}},innerMode:function(i){return{state:i.localState||i.htmlState,mode:i.localMode||a}}}},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed");
11
- // CodeMirror PHP.
12
- (function(){function c(g){var e={},f=g.split(" ");for(var d=0;d<f.length;++d){e[f[d]]=true}return e}function a(d){return function(f,e){if(f.match(d)){e.tokenize=null}else{f.skipToEnd()}return"string"}}var b={name:"clike",keywords:c("abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally"),blockKeywords:c("catch do else elseif for foreach if switch try while finally"),atoms:c("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"),builtin:c("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once"),multiLineStrings:true,hooks:{"$":function(d){d.eatWhile(/[\w\$_]/);return"variable-2"},"<":function(e,d){if(e.match(/<</)){e.eatWhile(/[\w\.]/);d.tokenize=a(e.current().slice(3));return d.tokenize(e,d)}return false},"#":function(d){while(!d.eol()&&!d.match("?>",false)){d.next()}return"comment"},"/":function(d){if(d.eat("/")){while(!d.eol()&&!d.match("?>",false)){d.next()}return"comment"}return false}}};CodeMirror.defineMode("php",function(f,g){var h=CodeMirror.getMode(f,"text/html");var d=CodeMirror.getMode(f,b);function e(p,n){var l=n.curMode==d;if(p.sol()&&n.pending&&n.pending!='"'&&n.pending!="'"){n.pending=null}if(!l){if(p.match(/^<\?\w*/)){n.curMode=d;n.curState=n.php;return"meta"}if(n.pending=='"'||n.pending=="'"){while(!p.eol()&&p.next()!=n.pending){}var k="string"}else{if(n.pending&&p.pos<n.pending.end){p.pos=n.pending.end;var k=n.pending.style}else{var k=h.token(p,n.curState)}}if(n.pending){n.pending=null}var o=p.current(),j=o.search(/<\?/),i;if(j!=-1){if(k=="string"&&(i=o.match(/[\'\"]$/))&&!/\?>/.test(o)){n.pending=i[0]}else{n.pending={end:p.pos,style:k}}p.backUp(o.length-j)}return k}else{if(l&&n.php.tokenize==null&&p.match("?>")){n.curMode=h;n.curState=n.html;return"meta"}else{return d.token(p,n.curState)}}}return{startState:function(){var i=CodeMirror.startState(h),j=CodeMirror.startState(d);return{html:i,php:j,curMode:g.startOpen?d:h,curState:g.startOpen?j:i,pending:null}},copyState:function(l){var j=l.html,k=CodeMirror.copyState(h,j),n=l.php,i=CodeMirror.copyState(d,n),m;if(l.curMode==h){m=k}else{m=i}return{html:k,php:i,curMode:l.curMode,curState:m,pending:l.pending}},token:e,indent:function(j,i){if((j.curMode!=d&&/^\s*<\//.test(i))||(j.curMode==d&&/^\?>/.test(i))){return h.indent(j.html,i)}return j.curMode.indent(j.curState,i)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(i){return{state:i.curState,mode:i.curMode}}}},"htmlmixed","clike");CodeMirror.defineMIME("application/x-httpd-php","php");CodeMirror.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:true});CodeMirror.defineMIME("text/x-php",b)})();
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/editor.js DELETED
@@ -1,123 +0,0 @@
1
- /* ==========================================================
2
- * editor.js
3
- * http://soliloquywp.com/
4
- *
5
- * This file can be used by 3rd party plugins to integrate
6
- * with their custom field systems. It allows the selection
7
- * process to be standardized so that 3rd party plugins can
8
- * trigger modal selection windows and receive the corresponding
9
- * selected data objects.
10
- *
11
- * Using this file requires three actions for the 3rd party plugin.
12
- *
13
- * 1. The media modal HTML output needs to be inserted directly
14
- * after the option/dropdown/button that is to be used to
15
- * trigger the modal. This can be done by placing the following
16
- * code after the output (first to return, latter to echo):
17
- *
18
- * Soliloquy_Editor::get_instance()->slider_selection_modal();
19
- *
20
- * 2. This file should be enqueued on the page where the field resides.
21
- * You should add the class ".soliloquy-modal-trigger" to the
22
- * option/dropdown/button that will trigger the modal. This will
23
- * be used as a reference point for showing, hiding and passing data
24
- * between the modal and your plugin.
25
- *
26
- * 3. Attaching to a global event that is fired once the data for the
27
- * selection has been retrieved. You should listen on the document
28
- * object for the "soliloquySliderModalData" event, like this:
29
- *
30
- * $(document).on("soliloquySliderModalData", function(e){
31
- * //console.log(e.slider);
32
- * });
33
- *
34
- * This will give you access to the entire array of slider data that
35
- * the user has selected, including ID, title, slug and settings.
36
- * ==========================================================
37
- * Copyright 2013 Thomas Griffin.
38
- *
39
- * Licensed under the GPL License, Version 2.0 or later (the "License");
40
- * you may not use this file except in compliance with the License.
41
- * You may obtain a copy of the License at
42
- *
43
- * http://www.gnu.org/licenses/gpl-2.0.html
44
- *
45
- * Unless required by applicable law or agreed to in writing, software
46
- * distributed under the License is distributed on an "AS IS" BASIS,
47
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
48
- * See the License for the specific language governing permissions and
49
- * limitations under the License.
50
- * ========================================================== */
51
- ;(function($){
52
- $(function(){
53
- // Close the modal window on user action.
54
- var soliloquy_trigger_target = soliloquy_editor_frame = false;
55
- var soliloquy_append_and_hide = function(e){
56
- e.preventDefault();
57
- $('.soliloquy-default-ui .selected').removeClass('details selected');
58
- $('.soliloquy-default-ui').appendTo('.soliloquy-default-ui-wrapper').hide();
59
- soliloquy_trigger_target = soliloquy_editor_frame = false;
60
- };
61
-
62
- $(document).on('click', '.soliloquy-choose-slider, .soliloquy-modal-trigger', function(e){
63
- e.preventDefault();
64
-
65
- // Store the trigger target.
66
- soliloquy_trigger_target = e.target;
67
-
68
- // Show the modal.
69
- soliloquy_editor_frame = true;
70
- $('.soliloquy-default-ui').appendTo('body').show();
71
-
72
- $(document).on('click', '.media-modal-close, .media-modal-backdrop, .soliloquy-cancel-insertion', soliloquy_append_and_hide);
73
- $(document).on('keydown', function(e){
74
- if ( 27 == e.keyCode && soliloquy_editor_frame ) {
75
- soliloquy_append_and_hide(e);
76
- }
77
- });
78
- });
79
-
80
- $(document).on('click', '.soliloquy-default-ui .thumbnail, .soliloquy-default-ui .check, .soliloquy-default-ui .media-modal-icon', function(e){
81
- e.preventDefault();
82
- if ( $(this).parent().parent().hasClass('selected') ) {
83
- $(this).parent().parent().removeClass('details selected');
84
- $('.soliloquy-insert-slider').attr('disabled', 'disabled');
85
- } else {
86
- $(this).parent().parent().parent().find('.selected').removeClass('details selected');
87
- $(this).parent().parent().addClass('details selected');
88
- $('.soliloquy-insert-slider').removeAttr('disabled');
89
- }
90
- });
91
-
92
- $(document).on('click', '.soliloquy-default-ui .check', function(e){
93
- e.preventDefault();
94
- $(this).parent().parent().removeClass('details selected');
95
- $('.soliloquy-insert-slider').attr('disabled', 'disabled');
96
- });
97
-
98
- $(document).on('click', '.soliloquy-default-ui .soliloquy-insert-slider', function(e){
99
- e.preventDefault();
100
-
101
- // Either insert into an editor or make an ajax request.
102
- if ( $(soliloquy_trigger_target).hasClass('soliloquy-choose-slider') ) {
103
- wp.media.editor.insert('[soliloquy id="' + $('.soliloquy-default-ui .selected').data('soliloquy-id') + '"]');
104
- } else {
105
- // Make the ajax request.
106
- var req_data = {
107
- action: 'soliloquy_load_slider_data',
108
- post_id: $('.soliloquy-default-ui:first .selected').data('soliloquy-id')
109
- };
110
- $.post(ajaxurl, req_data, function(res){
111
- // Trigger the event.
112
- $(document).trigger({ type: 'soliloquySliderModalData', slider: res });
113
-
114
- // Close the modal.
115
- soliloquy_append_and_hide(e);
116
- }, 'json');
117
- }
118
-
119
- // Hide the modal.
120
- soliloquy_append_and_hide(e);
121
- });
122
- });
123
- }(jQuery));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/lib/bxslider.js DELETED
@@ -1,1482 +0,0 @@
1
- ;
2
- (function($, window, document, undefined) {
3
-
4
- var plugin = {};
5
-
6
- var defaults = {
7
-
8
- // Added by Thomas
9
- keyboard: false,
10
-
11
- // GENERAL
12
- mode: 'horizontal',
13
- slideSelector: '',
14
- infiniteLoop: true,
15
- hideControlOnEnd: false,
16
- speed: 500,
17
- captionSpeed: 0,
18
- easing: null,
19
- slideMargin: 0,
20
- startSlide: 0,
21
- randomStart: false,
22
- captions: false,
23
- ticker: false,
24
- tickerHover: false,
25
- adaptiveHeight: false,
26
- adaptiveHeightSpeed: 500,
27
- video: false,
28
- useCSS: true,
29
- preloadImages: 'visible',
30
- responsive: true,
31
- slideZIndex: 50,
32
- wrapperClass: 'soliloquy-wrapper',
33
-
34
- // TOUCH
35
- touchEnabled: true,
36
- swipeThreshold: 50,
37
- oneToOneTouch: true,
38
- preventDefaultSwipeX: true,
39
- preventDefaultSwipeY: false,
40
-
41
- // PAGER
42
- pager: true,
43
- pagerType: 'full',
44
- pagerShortSeparator: ' / ',
45
- pagerSelector: null,
46
- buildPager: null,
47
- pagerCustom: null,
48
-
49
- // CONTROLS
50
- controls: true,
51
- nextText: 'Next',
52
- prevText: 'Prev',
53
- nextSelector: null,
54
- prevSelector: null,
55
- autoControls: false,
56
- startText: 'Start',
57
- stopText: 'Stop',
58
- autoControlsCombine: false,
59
- autoControlsSelector: null,
60
-
61
- // AUTO
62
- auto: false,
63
- pause: 4000,
64
- autoStart: true,
65
- autoDirection: 'next',
66
- autoHover: false,
67
- autoDelay: 0,
68
- autoSlideForOnePage: false,
69
-
70
- // CAROUSEL
71
- minSlides: 1,
72
- maxSlides: 1,
73
- moveSlides: 0,
74
- slideWidth: 0,
75
-
76
- // CALLBACKS
77
- onSliderLoad: function() {},
78
- onSlideBefore: function() {},
79
- onSlideAfter: function() {},
80
- onSlideNext: function() {},
81
- onSlidePrev: function() {},
82
- onSliderResize: function() {}
83
- };
84
-
85
- $.fn.soliloquy = function(options){
86
-
87
- if(this.length === 0) {
88
- return this;
89
- }
90
-
91
- // support mutltiple elements
92
- if(this.length > 1){
93
- this.each(function(){$(this).soliloquy(options)});
94
- return this;
95
- }
96
-
97
- // create a namespace to be used throughout the plugin
98
- var slider = {},
99
- // set a reference to our slider element
100
- el = this,
101
- // first get the original window dimens (thanks alot IE)
102
- windowWidth = $(window).width(),
103
- windowHeight = $(window).height();
104
-
105
- /**
106
- * ===================================================================================
107
- * = PRIVATE FUNCTIONS
108
- * ===================================================================================
109
- */
110
-
111
- /**
112
- * Initializes namespace settings to be used throughout plugin
113
- */
114
- var init = function(){
115
- // merge user-supplied options with the defaults
116
- slider.settings = $.extend({}, defaults, options);
117
- // parse slideWidth setting
118
- slider.settings.slideWidth = parseInt(slider.settings.slideWidth);
119
- // store the original children
120
- slider.children = el.children(slider.settings.slideSelector);
121
- // check if actual number of slides is less than minSlides / maxSlides
122
- if(slider.children.length < slider.settings.minSlides) {
123
- slider.settings.minSlides = slider.children.length;
124
- }
125
- if(slider.children.length < slider.settings.maxSlides) {
126
- slider.settings.maxSlides = slider.children.length;
127
- }
128
- // if random start, set the startSlide setting to random number
129
- if(slider.settings.randomStart) slider.settings.startSlide = Math.floor(Math.random() * slider.children.length);
130
- // store active slide information
131
- slider.active = { index: slider.settings.startSlide }
132
- // store if the slider is in carousel mode (displaying / moving multiple slides)
133
- slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
134
- // if carousel, force preloadImages = 'all'
135
- if(slider.carousel) slider.settings.preloadImages = 'all';
136
- // calculate the min / max width thresholds based on min / max number of slides
137
- // used to setup and update carousel slides dimensions
138
- slider.minThreshold = (slider.settings.minSlides * slider.settings.slideWidth) + ((slider.settings.minSlides - 1) * slider.settings.slideMargin);
139
- slider.maxThreshold = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
140
- // store the current state of the slider (if currently animating, working is true)
141
- slider.working = false;
142
- // initialize the controls object
143
- slider.controls = {};
144
- // initialize an auto interval
145
- slider.interval = null;
146
- // determine which property to use for transitions
147
- slider.animProp = slider.settings.mode == 'vertical' ? 'top' : 'left';
148
- // determine if hardware acceleration can be used
149
- slider.usingCSS = slider.settings.useCSS && slider.settings.mode != 'fade' && (function(){
150
- // create our test div element
151
- var div = document.createElement('div');
152
- // css transition properties
153
- var props = ['WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
154
- // test for each property
155
- for(var i in props){
156
- if(div.style[props[i]] !== undefined){
157
- slider.cssPrefix = props[i].replace('Perspective', '').toLowerCase();
158
- slider.animProp = '-' + slider.cssPrefix + '-transform';
159
- return true;
160
- }
161
- }
162
- return false;
163
- }());
164
- // if vertical mode always make maxSlides and minSlides equal
165
- if(slider.settings.mode == 'vertical') slider.settings.maxSlides = slider.settings.minSlides;
166
- // save original style data
167
- el.data("origStyle", el.attr("style"));
168
- el.children(slider.settings.slideSelector).each(function() {
169
- $(this).data("origStyle", $(this).attr("style"));
170
- });
171
- // perform all DOM / CSS modifications
172
- setup();
173
- };
174
-
175
- /**
176
- * Performs all DOM and CSS modifications
177
- */
178
- var setup = function(){
179
- // wrap el in a wrapper
180
- el.wrap('<div class="' + slider.settings.wrapperClass + '"><div class="soliloquy-viewport"></div></div>');
181
- // store a namspace reference to .soliloquy-viewport
182
- slider.viewport = el.parent();
183
- // add a loading div to display while images are loading
184
- slider.loader = $('<div class="soliloquy-loading" />');
185
- slider.viewport.prepend(slider.loader);
186
- // set el to a massive width, to hold any needed slides
187
- // also strip any margin and padding from el
188
- el.css({
189
- width: slider.settings.mode == 'horizontal' ? (slider.children.length * 100 + 215) + '%' : 'auto',
190
- position: 'relative'
191
- });
192
- // if using CSS, add the easing property
193
- if(slider.usingCSS && slider.settings.easing){
194
- el.css('-' + slider.cssPrefix + '-transition-timing-function', slider.settings.easing);
195
- // if not using CSS and no easing value was supplied, use the default JS animation easing (swing)
196
- }else if(!slider.settings.easing){
197
- slider.settings.easing = 'swing';
198
- }
199
- var slidesShowing = getNumberSlidesShowing();
200
- // make modifications to the viewport (.soliloquy-viewport)
201
- slider.viewport.css({
202
- width: '100%',
203
- position: 'relative'
204
- });
205
- if(slider.settings.mode != 'fade'){
206
- slider.viewport.css({overflow:'hidden'});
207
- }
208
- slider.viewport.parent().css({
209
- maxWidth: getViewportMaxWidth()
210
- });
211
- // make modification to the wrapper (.soliloquy-wrapper)
212
- if(!slider.settings.pager) {
213
- slider.viewport.parent().css({
214
- margin: '0 auto 0px'
215
- });
216
- }
217
- // apply css to all slider children
218
- slider.children.css({
219
- 'float': 'left',
220
- listStyle: 'none',
221
- position: 'relative'
222
- });
223
- // apply the calculated width after the float is applied to prevent scrollbar interference
224
- slider.children.css('width', getSlideWidth());
225
- // if slideMargin is supplied, add the css
226
- if(slider.settings.mode == 'horizontal' && slider.settings.slideMargin > 0) slider.children.css('marginRight', slider.settings.slideMargin);
227
- if(slider.settings.mode == 'vertical' && slider.settings.slideMargin > 0) slider.children.css('marginBottom', slider.settings.slideMargin);
228
- // if "fade" mode, add positioning and z-index CSS
229
- if(slider.settings.mode == 'fade'){
230
- slider.children.css({
231
- zIndex: 0,
232
- display: 'none',
233
- marginRight: '-100%',
234
- width: '100%'
235
- });
236
- // prepare the z-index on the showing element
237
- slider.children.eq(slider.settings.startSlide).css({zIndex: slider.settings.slideZIndex, display: 'block'});
238
- }
239
- // create an element to contain all slider controls (pager, start / stop, etc)
240
- slider.controls.el = $('<div class="soliloquy-controls" />');
241
- // if captions are requested, add them
242
- if(slider.settings.captions) {
243
- appendCaptions();
244
- }
245
- // check if startSlide is last slide
246
- slider.active.last = slider.settings.startSlide == getPagerQty() - 1;
247
- // Added by Thomas - removed fitVids support, no need.
248
- // set the default preload selector (visible)
249
- var preloadSelector = slider.children.eq(slider.settings.startSlide);
250
- if (slider.settings.preloadImages == "all") {
251
- preloadSelector = slider.children;
252
- }
253
- // only check for control addition if not in "ticker" mode
254
- if(!slider.settings.ticker){
255
- // if pager is requested, add it
256
- if(slider.settings.pager) {
257
- appendPager();
258
- }
259
- // if controls are requested, add them
260
- if(slider.settings.controls) {
261
- appendControls();
262
- }
263
- // if auto is true, and auto controls are requested, add them
264
- if(slider.settings.auto && slider.settings.autoControls) {
265
- appendControlsAuto();
266
- }
267
- // if any control option is requested, add the controls wrapper
268
- if(slider.settings.controls || slider.settings.autoControls || slider.settings.pager) {
269
- slider.viewport.after(slider.controls.el);
270
- }
271
- // if ticker mode, do not allow a pager
272
- }else{
273
- slider.settings.pager = false;
274
- }
275
- // preload all images, then perform final DOM / CSS modifications that depend on images being loaded
276
- loadElements(preloadSelector, start);
277
- };
278
-
279
- var loadElements = function(selector, callback) {
280
- var total = selector.find('img:not([src=""]), iframe').length,
281
- count = 0;
282
- if (total === 0) {
283
- callback();
284
- return;
285
- }
286
- selector.find('img:not([src=""]), iframe').each(function() {
287
- $(this).one('load error', function() {
288
- if (++count === total) { callback(); }
289
- }).each(function() {
290
- if (this.complete) { $(this).load(); }
291
- });
292
- });
293
- };
294
-
295
- /**
296
- * Start the slider
297
- */
298
- var start = function(){
299
-
300
- // if infinite loop, prepare additional slides
301
- if(slider.settings.infiniteLoop && slider.settings.mode != 'fade' && !slider.settings.ticker && slider.children.length > 1){
302
- var slice = slider.settings.mode == 'vertical' ? slider.settings.minSlides : slider.settings.maxSlides;
303
- var sliceAppend = slider.children.slice(0, slice).clone(true).addClass('soliloquy-clone');
304
- var slicePrepend = slider.children.slice(-slice).clone(true).addClass('soliloquy-clone');
305
- el.append(sliceAppend).prepend(slicePrepend);
306
- }
307
-
308
- // remove the loading DOM element
309
- slider.loader.remove();
310
- // set the left / top position of "el"
311
- setSlidePosition();
312
- // if "vertical" mode, always use adaptiveHeight to prevent odd behavior
313
- if (slider.settings.mode == 'vertical') slider.settings.adaptiveHeight = true;
314
- // set the viewport height
315
- slider.viewport.height(getViewportHeight());
316
- // make sure everything is positioned just right (same as a window resize)
317
- el.redrawSlider();
318
- // onSliderLoad callback
319
- slider.settings.onSliderLoad(slider.active.index);
320
- // slider has been fully initialized
321
- slider.initialized = true;
322
- // bind the resize call to the window
323
- if (slider.settings.responsive) {
324
- $(window).bind('resize', resizeWindow);
325
- }
326
- // if auto is true and has more than 1 page, start the show
327
- if (slider.settings.auto && slider.settings.autoStart && (getPagerQty() > 1 || slider.settings.autoSlideForOnePage)) {
328
- initAuto();
329
- }
330
- // if ticker is true, start the ticker
331
- if (slider.settings.ticker) {
332
- initTicker();
333
- }
334
- // if pager is requested, make the appropriate pager link active
335
- if (slider.settings.pager) {
336
- updatePagerActive(slider.settings.startSlide);
337
- }
338
- // check for any updates to the controls (like hideControlOnEnd updates)
339
- if (slider.settings.controls) {
340
- updateDirectionControls();
341
- }
342
- // if touchEnabled is true, setup the touch events
343
- if (slider.settings.touchEnabled && !slider.settings.ticker) {
344
- initTouch();
345
- }
346
- // Added by Thomas
347
- if (slider.settings.keyboard && !slider.settings.ticker) {
348
- $( 'body' ).on('keydown', function(e) {
349
- // Added by Tim
350
- // Check the target (focused) element - if it's an input or textarea, don't do anything
351
- // otherwise the user can't use arrow keys within inputs or textareas
352
- if ( e.target.type == 'textarea' || e.target.type == 'input' ) {
353
- return;
354
- }
355
-
356
- // If here, OK to change slide
357
- if ( e.keyCode == 39 ) {
358
- clickNextBind( e );
359
- return false;
360
- } else if ( e.keyCode == 37 ) {
361
- clickPrevBind( e );
362
- return false;
363
- }
364
- });
365
- }
366
- };
367
-
368
- /**
369
- * Returns the calculated height of the viewport, used to determine either adaptiveHeight or the maxHeight value
370
- */
371
- var getViewportHeight = function(){
372
- var height = 0;
373
- // first determine which children (slides) should be used in our height calculation
374
- var children = $();
375
- // if mode is not "vertical" and adaptiveHeight is false, include all children
376
- if(slider.settings.mode != 'vertical' && !slider.settings.adaptiveHeight){
377
- children = slider.children;
378
- }else{
379
- // if not carousel, return the single active child
380
- if(!slider.carousel){
381
- children = slider.children.eq(slider.active.index);
382
- // if carousel, return a slice of children
383
- }else{
384
- // get the individual slide index
385
- var currentIndex = slider.settings.moveSlides == 1 ? slider.active.index : slider.active.index * getMoveBy();
386
- // add the current slide to the children
387
- children = slider.children.eq(currentIndex);
388
- // cycle through the remaining "showing" slides
389
- for (i = 1; i <= slider.settings.maxSlides - 1; i++){
390
- // if looped back to the start
391
- if(currentIndex + i >= slider.children.length){
392
- children = children.add(slider.children.eq(i - 1));
393
- }else{
394
- children = children.add(slider.children.eq(currentIndex + i));
395
- }
396
- }
397
- }
398
- }
399
- // if "vertical" mode, calculate the sum of the heights of the children
400
- if(slider.settings.mode == 'vertical'){
401
- children.each(function(index) {
402
- height += $(this).outerHeight();
403
- });
404
- // add user-supplied margins
405
- if(slider.settings.slideMargin > 0){
406
- height += slider.settings.slideMargin * (slider.settings.minSlides - 1);
407
- }
408
- // if not "vertical" mode, calculate the max height of the children
409
- }else{
410
- height = Math.max.apply(Math, children.map(function(){
411
- return $(this).outerHeight(false);
412
- }).get());
413
- }
414
-
415
- if(slider.viewport.css('box-sizing') == 'border-box'){
416
- height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom')) +
417
- parseFloat(slider.viewport.css('border-top-width')) + parseFloat(slider.viewport.css('border-bottom-width'));
418
- }else if(slider.viewport.css('box-sizing') == 'padding-box'){
419
- height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom'));
420
- }
421
-
422
- return height;
423
- };
424
-
425
- /**
426
- * Returns the calculated width to be used for the outer wrapper / viewport
427
- */
428
- var getViewportMaxWidth = function(){
429
- var width = '100%';
430
- if(slider.settings.slideWidth > 0){
431
- if(slider.settings.mode == 'horizontal'){
432
- width = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
433
- }else{
434
- width = slider.settings.slideWidth;
435
- }
436
- }
437
- return (slider.settings.mode == 'fade') ? '100%' : width;
438
- };
439
-
440
- /**
441
- * Returns the calculated width to be applied to each slide
442
- */
443
- var getSlideWidth = function(){
444
- // start with any user-supplied slide width
445
- var newElWidth = slider.settings.slideWidth;
446
- // get the current viewport width
447
- var wrapWidth = slider.viewport.width();
448
- // if slide width was not supplied, or is larger than the viewport use the viewport width
449
- if(slider.settings.slideWidth === 0 ||
450
- (slider.settings.slideWidth > wrapWidth && !slider.carousel) ||
451
- slider.settings.mode === 'vertical'){
452
- newElWidth = wrapWidth;
453
- // if carousel, use the thresholds to determine the width
454
- }else if(slider.settings.maxSlides > 1 && slider.settings.mode === 'horizontal'){
455
- if(wrapWidth > slider.maxThreshold){
456
- // newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.maxSlides - 1))) / slider.settings.maxSlides;
457
- }else if(wrapWidth < slider.minThreshold){
458
- newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.minSlides - 1))) / slider.settings.minSlides;
459
- }
460
- }
461
- return (slider.settings.mode == 'fade') ? '100%' : newElWidth;
462
- };
463
-
464
- /**
465
- * Returns the number of slides currently visible in the viewport (includes partially visible slides)
466
- */
467
- var getNumberSlidesShowing = function(){
468
- var slidesShowing = 1;
469
- if(slider.settings.mode === 'horizontal' && slider.settings.slideWidth > 0){
470
- // if viewport is smaller than minThreshold, return minSlides
471
- if(slider.viewport.width() < slider.minThreshold){
472
- slidesShowing = slider.settings.minSlides;
473
- // if viewport is larger than minThreshold, return maxSlides
474
- }else if(slider.viewport.width() > slider.maxThreshold){
475
- slidesShowing = slider.settings.maxSlides;
476
- // if viewport is between min / max thresholds, divide viewport width by first child width
477
- }else{
478
- var childWidth = slider.children.first().width() + slider.settings.slideMargin;
479
- slidesShowing = Math.floor((slider.viewport.width() +
480
- slider.settings.slideMargin) / childWidth);
481
- }
482
- // if "vertical" mode, slides showing will always be minSlides
483
- }else if(slider.settings.mode === 'vertical'){
484
- slidesShowing = slider.settings.minSlides;
485
- }
486
- return slidesShowing;
487
- };
488
-
489
- /**
490
- * Returns the number of pages (one full viewport of slides is one "page")
491
- */
492
- var getPagerQty = function(){
493
- var pagerQty = 0;
494
- // if moveSlides is specified by the user
495
- if(slider.settings.moveSlides > 0){
496
- if(slider.settings.infiniteLoop){
497
- pagerQty = Math.ceil(slider.children.length / getMoveBy());
498
- }else{
499
- // use a while loop to determine pages
500
- var breakPoint = 0;
501
- var counter = 0
502
- // when breakpoint goes above children length, counter is the number of pages
503
- while (breakPoint < slider.children.length){
504
- ++pagerQty;
505
- breakPoint = counter + getNumberSlidesShowing();
506
- counter += slider.settings.moveSlides <= getNumberSlidesShowing() ? slider.settings.moveSlides : getNumberSlidesShowing();
507
- }
508
- }
509
- // if moveSlides is 0 (auto) divide children length by sides showing, then round up
510
- }else{
511
- pagerQty = Math.ceil(slider.children.length / getNumberSlidesShowing());
512
- }
513
- return pagerQty;
514
- };
515
-
516
- /**
517
- * Returns the number of indivual slides by which to shift the slider
518
- */
519
- var getMoveBy = function(){
520
- // if moveSlides was set by the user and moveSlides is less than number of slides showing
521
- if(slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing()){
522
- return slider.settings.moveSlides;
523
- }
524
- // if moveSlides is 0 (auto)
525
- return getNumberSlidesShowing();
526
- };
527
-
528
- /**
529
- * Sets the slider's (el) left or top position
530
- */
531
- var setSlidePosition = function(){
532
-
533
- // if last slide, not infinite loop, and number of children is larger than specified maxSlides
534
- if (slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) {
535
-
536
- if (slider.settings.mode === 'horizontal') {
537
-
538
- // get the last child's position
539
- var lastChild = slider.children.last(),
540
- position = lastChild.position();
541
-
542
- // set the left position
543
- setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.outerWidth())), 'reset', 0);
544
-
545
- } else if (slider.settings.mode === 'vertical') {
546
-
547
- // get the last showing index's position
548
- var lastShowingIndex = slider.children.length - slider.settings.minSlides;
549
- var position = slider.children.eq(lastShowingIndex)
550
- .position();
551
-
552
- // set the top position
553
- setPositionProperty(-position.top, 'reset', 0);
554
- }
555
-
556
- //If its not infinite loop
557
- } else if (!slider.settings.infiniteLoop) {
558
- var firstIndex = slider.active.index,
559
- position = slider.children.eq(firstIndex)
560
- .position();
561
- // check for last slide
562
- if (slider.active.index === getPagerQty() - 1) {
563
- slider.active.last = true;
564
- }
565
- // set the repective position
566
- if (position != undefined) {
567
-
568
- if (slider.settings.mode === 'horizontal' && !slider.carousel) {
569
- position.left = (slider.active.index) * slider.children.eq(firstIndex)
570
- .outerWidth(true);
571
- setPositionProperty(-position.left, 'reset', 0);
572
- } else if (slider.settings.mode === 'vertical') {
573
- position.top = (slider.active.index) * slider.children.eq(firstIndex)
574
- .outerHeight(true);
575
- setPositionProperty(-position.top, 'reset', 0);
576
- }
577
- }
578
- } else {
579
- var firstIndex = slider.active.index * getMoveBy(),
580
- position = slider.children.eq(firstIndex)
581
- .position();
582
- // check for last slide
583
- if (slider.active.index === getPagerQty() - 1) {
584
- slider.active.last = true;
585
- }
586
- // set the repective position
587
- if (position != undefined) {
588
- if (slider.settings.mode === 'horizontal' && slider.children.length <= 1 ){
589
- position.left = (slider.active.index ) * slider.children.eq(firstIndex)
590
- .outerWidth(true);
591
- setPositionProperty(-position.left, 'reset', 0);
592
- }
593
- else if (slider.settings.mode === 'horizontal' && !slider.carousel) {
594
- position.left = (slider.active.index + 1) * slider.children.eq(firstIndex)
595
- .outerWidth(true);
596
- setPositionProperty(-position.left, 'reset', 0);
597
-
598
- } else if (slider.settings.mode === 'vertical') {
599
- position.top = (slider.active.index + 1) * slider.children.eq(firstIndex)
600
- .outerHeight(true);
601
- setPositionProperty(-position.top, 'reset', 0);
602
- } else if (slider.carousel && slider.settings.mode === 'horizontal' && slider.settings.infiniteLoop) {
603
- position.left = (slider.active.index + 1) * slider.children.eq(firstIndex)
604
- .outerWidth(true);
605
- setPositionProperty(-position.left * slider.settings.maxSlides, 'reset', 0);
606
- }
607
- }
608
- }
609
-
610
-
611
- };
612
-
613
- /**
614
- * Sets the el's animating property position (which in turn will sometimes animate el).
615
- * If using CSS, sets the transform property. If not using CSS, sets the top / left property.
616
- *
617
- * @param value (int)
618
- * - the animating property's value
619
- *
620
- * @param type (string) 'slider', 'reset', 'ticker'
621
- * - the type of instance for which the function is being
622
- *
623
- * @param duration (int)
624
- * - the amount of time (in ms) the transition should occupy
625
- *
626
- * @param params (array) optional
627
- * - an optional parameter containing any variables that need to be passed in
628
- */
629
- var setPositionProperty = function(value, type, duration, params){
630
- // use CSS transform
631
- if(slider.usingCSS){
632
- // determine the translate3d value
633
- var propValue = slider.settings.mode === 'vertical' ? 'translate3d(0, ' + value + 'px, 0)' : 'translate3d(' + value + 'px, 0, 0)';
634
- // add the CSS transition-duration
635
- el.css('-' + slider.cssPrefix + '-transition-duration', duration / 1000 + 's');
636
- if(type === 'slide'){
637
- // set the property value
638
- el.css(slider.animProp, propValue);
639
- // bind a callback method - executes when CSS transition completes
640
- el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(){
641
- // unbind the callback
642
- el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
643
- updateAfterSlideTransition();
644
- });
645
- }else if(type === 'reset'){
646
- el.css(slider.animProp, propValue);
647
- }else if(type === 'ticker'){
648
- // make the transition use 'linear'
649
- el.css('-' + slider.cssPrefix + '-transition-timing-function', 'linear');
650
- el.css(slider.animProp, propValue);
651
- // bind a callback method - executes when CSS transition completes
652
- el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(){
653
- // unbind the callback
654
- el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
655
- // reset the position
656
- setPositionProperty(params['resetValue'], 'reset', 0);
657
- // start the loop again
658
- tickerLoop();
659
- });
660
- }
661
- // use JS animate
662
- }else{
663
- var animateObj = {};
664
- animateObj[slider.animProp] = value;
665
- if(type === 'slide'){
666
- el.animate(animateObj, duration, slider.settings.easing, function(){
667
- updateAfterSlideTransition();
668
- });
669
- }else if(type === 'reset'){
670
- el.css(slider.animProp, value)
671
- }else if(type === 'ticker'){
672
- el.animate(animateObj, speed, 'linear', function(){
673
- setPositionProperty(params['resetValue'], 'reset', 0);
674
- // run the recursive loop after animation
675
- tickerLoop();
676
- });
677
- }
678
- }
679
- };
680
-
681
- /**
682
- * Populates the pager with proper amount of pages
683
- */
684
- var populatePager = function(){
685
- var pagerHtml = '';
686
- var pagerQty = getPagerQty();
687
- // loop through each pager item
688
- for(var i=0; i < pagerQty; i++){
689
- var linkContent = '';
690
- // if a buildPager function is supplied, use it to get pager link value, else use index + 1
691
- if(slider.settings.buildPager && $.isFunction(slider.settings.buildPager)){
692
- linkContent = slider.settings.buildPager(i);
693
- slider.pagerEl.addClass('soliloquy-custom-pager');
694
- }else{
695
- linkContent = i + 1;
696
- slider.pagerEl.addClass('soliloquy-default-pager');
697
- }
698
- // var linkContent = slider.settings.buildPager && $.isFunction(slider.settings.buildPager) ? slider.settings.buildPager(i) : i + 1;
699
- // add the markup to the string
700
- pagerHtml += '<div class="soliloquy-pager-item"><a href="" data-slide-index="' + i + '" class="soliloquy-pager-link" tabindex="0"><span>' + linkContent + '</span></a></div>';
701
- };
702
- // populate the pager element with pager links
703
- slider.pagerEl.html(pagerHtml);
704
- };
705
-
706
- /**
707
- * Appends the pager to the controls element
708
- */
709
- var appendPager = function(){
710
- // Create container for pager
711
- if (!slider.settings.pagerCustom) {
712
- // Auto generated pager - create container
713
- slider.pagerEl = $('<div class="soliloquy-pager" />');
714
- } else {
715
- // Manually specified pager - insert
716
- slider.pagerEl = $(slider.settings.pagerCustom);
717
- }
718
-
719
- // If a pager selector was supplied, populate it with the pager
720
- if (slider.settings.pagerSelector) {
721
- $(slider.settings.pagerSelector).html(slider.pagerEl);
722
- } else {
723
- slider.controls.el.addClass('soliloquy-has-pager').append(slider.pagerEl);
724
- }
725
-
726
- // If we are not using a custom pager, automatically populated slider.pagerEl
727
- if (!slider.settings.pagerCustom) {
728
- populatePager();
729
- }
730
-
731
- // Assign the clickPagerBind event
732
- slider.pagerEl.on('click', 'a', clickPagerBind);
733
- };
734
-
735
- /**
736
- * Appends prev / next controls to the controls element
737
- */
738
- var appendControls = function(){
739
- slider.controls.next = $('<a class="soliloquy-next" href="" tabindex="0"><span>' + slider.settings.nextText + '</span></a>');
740
- slider.controls.prev = $('<a class="soliloquy-prev" href="" tabindex="0"><span>' + slider.settings.prevText + '</span></a>');
741
- // bind click actions to the controls
742
- slider.controls.next.bind('click', clickNextBind);
743
- slider.controls.prev.bind('click', clickPrevBind);
744
- // if nextSlector was supplied, populate it
745
- if(slider.settings.nextSelector){
746
- $(slider.settings.nextSelector).append(slider.controls.next);
747
- }
748
- // if prevSlector was supplied, populate it
749
- if(slider.settings.prevSelector){
750
- $(slider.settings.prevSelector).append(slider.controls.prev);
751
- }
752
- // if no custom selectors were supplied
753
- if(!slider.settings.nextSelector && !slider.settings.prevSelector){
754
- // add the controls to the DOM
755
- slider.controls.directionEl = $('<div class="soliloquy-controls-direction" />');
756
- // add the control elements to the directionEl
757
- slider.controls.directionEl.append(slider.controls.prev).append(slider.controls.next);
758
- // slider.viewport.append(slider.controls.directionEl);
759
- slider.controls.el.addClass('soliloquy-has-controls-direction').append(slider.controls.directionEl);
760
- }
761
- };
762
-
763
- /**
764
- * Appends start / stop auto controls to the controls element
765
- */
766
- var appendControlsAuto = function(){
767
- slider.controls.start = $('<div class="soliloquy-controls-auto-item"><a class="soliloquy-start" href="" aria-label="play" tabindex="0"><span>' + slider.settings.startText + '</span></a></div>');
768
- slider.controls.stop = $('<div class="soliloquy-controls-auto-item"><a class="soliloquy-stop" href="" aria-label="pause" tabindex="0"><span>' + slider.settings.stopText + '</span></a></div>');
769
- // add the controls to the DOM
770
- slider.controls.autoEl = $('<div class="soliloquy-controls-auto" />');
771
- // bind click actions to the controls
772
- slider.controls.autoEl.on('click', '.soliloquy-start', clickStartBind);
773
- slider.controls.autoEl.on('click', '.soliloquy-stop', clickStopBind);
774
- // if autoControlsCombine, insert only the "start" control
775
- if(slider.settings.autoControlsCombine){
776
- slider.controls.autoEl.append(slider.controls.start);
777
- // if autoControlsCombine is false, insert both controls
778
- }else{
779
- slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop);
780
- }
781
- // if auto controls selector was supplied, populate it with the controls
782
- if(slider.settings.autoControlsSelector){
783
- $(slider.settings.autoControlsSelector).html(slider.controls.autoEl);
784
- // if auto controls selector was not supplied, add it after the wrapper
785
- }else{
786
- slider.controls.el.addClass('soliloquy-has-controls-auto').append(slider.controls.autoEl);
787
- }
788
- // update the auto controls
789
- updateAutoControls(slider.settings.autoStart ? 'stop' : 'start');
790
- };
791
-
792
- /**
793
- * Appends image captions to the DOM
794
- */
795
- var appendCaptions = function(){
796
- // cycle through each child
797
- slider.children.each(function(index){
798
- // get the image title attribute
799
- var title = $(this).find('img:first').attr('title');
800
- // append the caption
801
- if (title != undefined && ('' + title).length) {
802
- $(this).append('<div class="soliloquy-caption"><span>' + title + '</span></div>');
803
- }
804
- });
805
- };
806
-
807
- /**
808
- * Click next binding
809
- *
810
- * @param e (event)
811
- * - DOM event object
812
- */
813
- var clickNextBind = function(e){
814
- // if auto show is running, stop it
815
- if (slider.settings.auto) el.stopAuto();
816
- el.goToNextSlide();
817
- e.preventDefault();
818
- };
819
-
820
- /**
821
- * Click prev binding
822
- *
823
- * @param e (event)
824
- * - DOM event object
825
- */
826
- var clickPrevBind = function(e){
827
- // if auto show is running, stop it
828
- if (slider.settings.auto) el.stopAuto();
829
- el.goToPrevSlide();
830
- e.preventDefault();
831
- };
832
-
833
- /**
834
- * Click start binding
835
- *
836
- * @param e (event)
837
- * - DOM event object
838
- */
839
- var clickStartBind = function(e){
840
- el.startAuto();
841
- e.preventDefault();
842
- };
843
-
844
- /**
845
- * Click stop binding
846
- *
847
- * @param e (event)
848
- * - DOM event object
849
- */
850
- var clickStopBind = function(e){
851
- el.stopAuto();
852
- e.preventDefault();
853
- };
854
-
855
- /**
856
- * Click pager binding
857
- *
858
- * @param e (event)
859
- * - DOM event object
860
- */
861
- var clickPagerBind = function(e){
862
- // if auto show is running, stop it
863
- if (slider.settings.auto) el.stopAuto();
864
- var pagerLink = $(e.currentTarget);
865
- if(pagerLink.attr('data-slide-index') !== undefined){
866
- var pagerIndex = parseInt(pagerLink.attr('data-slide-index'));
867
- // if clicked pager link is not active, continue with the goToSlide call
868
- if(pagerIndex != slider.active.index) el.goToSlide(pagerIndex);
869
- e.preventDefault();
870
- }
871
- };
872
-
873
- /**
874
- * Updates the pager links with an active class
875
- *
876
- * @param slideIndex (int)
877
- * - index of slide to make active
878
- */
879
- var updatePagerActive = function(slideIndex){
880
- // if "short" pager type
881
- var len = slider.children.length; // nb of children
882
- if(slider.settings.pagerType === 'short'){
883
- if(slider.settings.maxSlides > 1) {
884
- len = Math.ceil(slider.children.length/slider.settings.maxSlides);
885
- }
886
- slider.pagerEl.html( (slideIndex + 1) + slider.settings.pagerShortSeparator + len);
887
- return;
888
- }
889
- // remove all pager active classes
890
- slider.pagerEl.find('a').removeClass('active');
891
- // apply the active class for all pagers
892
- slider.pagerEl.each(function(i, el) { $(el).find('a').eq(slideIndex).addClass('active'); });
893
- };
894
-
895
- /**
896
- * Performs needed actions after a slide transition
897
- */
898
- var updateAfterSlideTransition = function(){
899
- // if infinte loop is true
900
- if(slider.settings.infiniteLoop){
901
- var position = '';
902
- // first slide
903
- if(slider.active.index === 0){
904
- // set the new position
905
- position = slider.children.eq(0).position();
906
- // carousel, last slide
907
- }else if(slider.active.index == getPagerQty() - 1 && slider.carousel){
908
- position = slider.children.eq((getPagerQty() - 1) * getMoveBy()).position();
909
- // last slide
910
- }else if(slider.active.index == slider.children.length - 1){
911
- position = slider.children.eq(slider.children.length - 1).position();
912
- }
913
- if(position){
914
- if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
915
- else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
916
- }
917
- }
918
- // declare that the transition is complete
919
- slider.working = false;
920
- // Added by Thomas
921
- if(slider.settings.mode == 'fade'){
922
- slider.viewport.css({overflow:''});
923
- }
924
- // onSlideAfter callback
925
- slider.settings.onSlideAfter(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
926
- };
927
-
928
- /**
929
- * Updates the auto controls state (either active, or combined switch)
930
- *
931
- * @param state (string) "start", "stop"
932
- * - the new state of the auto show
933
- */
934
- var updateAutoControls = function(state){
935
- // if autoControlsCombine is true, replace the current control with the new state
936
- if(slider.settings.autoControlsCombine){
937
- if ( slider.controls.autoEl ) {
938
- slider.controls.autoEl.html(slider.controls[state]);
939
- }
940
- // if autoControlsCombine is false, apply the "active" class to the appropriate control
941
- }else{
942
- slider.controls.autoEl.find('a').removeClass('active');
943
- slider.controls.autoEl.find('a:not(.soliloquy-' + state + ')').addClass('active');
944
- }
945
- };
946
-
947
- /**
948
- * Updates the direction controls (checks if either should be hidden)
949
- */
950
- var updateDirectionControls = function(){
951
- if(getPagerQty() == 1){
952
- slider.controls.prev.addClass('disabled');
953
- slider.controls.next.addClass('disabled');
954
- }else if(!slider.settings.infiniteLoop && slider.settings.hideControlOnEnd){
955
- // if first slide
956
- if (slider.active.index == 0){
957
- slider.controls.prev.addClass('disabled');
958
- slider.controls.next.removeClass('disabled');
959
- // if last slide
960
- }else if(slider.active.index == getPagerQty() - 1){
961
- slider.controls.next.addClass('disabled');
962
- slider.controls.prev.removeClass('disabled');
963
- // if any slide in the middle
964
- }else{
965
- slider.controls.prev.removeClass('disabled');
966
- slider.controls.next.removeClass('disabled');
967
- }
968
- }
969
- };
970
-
971
- /**
972
- * Initialzes the auto process
973
- */
974
- var initAuto = function(){
975
- // if autoDelay was supplied, launch the auto show using a setTimeout() call
976
- if(slider.settings.autoDelay > 0){
977
- var timeout = setTimeout(el.startAuto, slider.settings.autoDelay);
978
- // if autoDelay was not supplied, start the auto show normally
979
- }else{
980
- el.startAuto();
981
- }
982
- // if autoHover is requested
983
- if(slider.settings.autoHover){
984
- // on el hover
985
- el.hover(function(){
986
- // if the auto show is currently playing (has an active interval)
987
- if(slider.interval){
988
- // stop the auto show and pass true agument which will prevent control update
989
- el.stopAuto(true);
990
- // create a new autoPaused value which will be used by the relative "mouseout" event
991
- slider.autoPaused = true;
992
- }
993
- }, function(){
994
- // if the autoPaused value was created be the prior "mouseover" event
995
- if(slider.autoPaused){
996
- // start the auto show and pass true agument which will prevent control update
997
- el.startAuto(true);
998
- // reset the autoPaused value
999
- slider.autoPaused = null;
1000
- }
1001
- });
1002
- }
1003
- };
1004
-
1005
- /**
1006
- * Initialzes the ticker process
1007
- */
1008
- var initTicker = function(){
1009
- var startPosition = 0;
1010
- // if autoDirection is "next", append a clone of the entire slider
1011
- if(slider.settings.autoDirection == 'next'){
1012
- el.append(slider.children.clone().addClass('soliloquy-clone'));
1013
- // if autoDirection is "prev", prepend a clone of the entire slider, and set the left position
1014
- }else{
1015
- el.prepend(slider.children.clone().addClass('soliloquy-clone'));
1016
- var position = slider.children.first().position();
1017
- startPosition = slider.settings.mode == 'horizontal' ? -position.left : -position.top;
1018
- }
1019
- setPositionProperty(startPosition, 'reset', 0);
1020
- // do not allow controls in ticker mode
1021
- slider.settings.pager = false;
1022
- slider.settings.controls = false;
1023
- slider.settings.autoControls = false;
1024
- // if autoHover is requested
1025
- if(slider.settings.tickerHover && !slider.usingCSS){
1026
- // on el hover
1027
- slider.viewport.hover(function(){
1028
- el.stop();
1029
- }, function(){
1030
- // calculate the total width of children (used to calculate the speed ratio)
1031
- var totalDimens = 0;
1032
- slider.children.each(function(index){
1033
- totalDimens += slider.settings.mode == 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);
1034
- });
1035
- // calculate the speed ratio (used to determine the new speed to finish the paused animation)
1036
- var ratio = slider.settings.speed / totalDimens;
1037
- // determine which property to use
1038
- var property = slider.settings.mode == 'horizontal' ? 'left' : 'top';
1039
- // calculate the new speed
1040
- var newSpeed = ratio * (totalDimens - (Math.abs(parseInt(el.css(property)))));
1041
- tickerLoop(newSpeed);
1042
- });
1043
- }
1044
- // start the ticker loop
1045
- tickerLoop();
1046
- };
1047
-
1048
- /**
1049
- * Runs a continuous loop, news ticker-style
1050
- */
1051
- var tickerLoop = function(resumeSpeed){
1052
- speed = resumeSpeed ? resumeSpeed : slider.settings.speed;
1053
- var position = {left: 0, top: 0};
1054
- var reset = {left: 0, top: 0};
1055
- // if "next" animate left position to last child, then reset left to 0
1056
- if(slider.settings.autoDirection == 'next'){
1057
- position = el.find('.soliloquy-clone').first().position();
1058
- // if "prev" animate left position to 0, then reset left to first non-clone child
1059
- }else{
1060
- reset = slider.children.first().position();
1061
- }
1062
- var animateProperty = slider.settings.mode == 'horizontal' ? -position.left : -position.top;
1063
- var resetValue = slider.settings.mode == 'horizontal' ? -reset.left : -reset.top;
1064
- var params = {resetValue: resetValue};
1065
- setPositionProperty(animateProperty, 'ticker', speed, params);
1066
- };
1067
-
1068
- /**
1069
- * Initializes touch events
1070
- */
1071
- var initTouch = function(){
1072
- // initialize object to contain all touch values
1073
- slider.touch = {
1074
- start: {x: 0, y: 0},
1075
- end: {x: 0, y: 0}
1076
- }
1077
- slider.viewport.bind('touchstart', onTouchStart);
1078
- };
1079
-
1080
- /**
1081
- * Event handler for "touchstart"
1082
- *
1083
- * @param e (event)
1084
- * - DOM event object
1085
- */
1086
- var onTouchStart = function(e){
1087
- if(slider.working){
1088
- e.preventDefault();
1089
- }else{
1090
- // record the original position when touch starts
1091
- slider.touch.originalPos = el.position();
1092
- var orig = e.originalEvent;
1093
- // record the starting touch x, y coordinates
1094
- slider.touch.start.x = orig.changedTouches[0].pageX;
1095
- slider.touch.start.y = orig.changedTouches[0].pageY;
1096
- // bind a "touchmove" event to the viewport
1097
- slider.viewport.bind('touchmove', onTouchMove);
1098
- // bind a "touchend" event to the viewport
1099
- slider.viewport.bind('touchend', onTouchEnd);
1100
- }
1101
- };
1102
-
1103
- /**
1104
- * Event handler for "touchmove"
1105
- *
1106
- * @param e (event)
1107
- * - DOM event object
1108
- */
1109
- var onTouchMove = function(e){
1110
- var orig = e.originalEvent;
1111
- // if scrolling on y axis, do not prevent default
1112
- var xMovement = Math.abs(orig.changedTouches[0].pageX - slider.touch.start.x);
1113
- var yMovement = Math.abs(orig.changedTouches[0].pageY - slider.touch.start.y);
1114
- // x axis swipe
1115
- if((xMovement * 3) > yMovement && slider.settings.preventDefaultSwipeX){
1116
- e.preventDefault();
1117
- // y axis swipe
1118
- }else if((yMovement * 3) > xMovement && slider.settings.preventDefaultSwipeY){
1119
- e.preventDefault();
1120
- }
1121
- if(slider.settings.mode != 'fade' && slider.settings.oneToOneTouch){
1122
- var value = 0;
1123
- // if horizontal, drag along x axis
1124
- if(slider.settings.mode == 'horizontal'){
1125
- var change = orig.changedTouches[0].pageX - slider.touch.start.x;
1126
- value = slider.touch.originalPos.left + change;
1127
- // if vertical, drag along y axis
1128
- }else{
1129
- var change = orig.changedTouches[0].pageY - slider.touch.start.y;
1130
- value = slider.touch.originalPos.top + change;
1131
- }
1132
- setPositionProperty(value, 'reset', 0);
1133
- }
1134
- };
1135
-
1136
- /**
1137
- * Event handler for "touchend"
1138
- *
1139
- * @param e (event)
1140
- * - DOM event object
1141
- */
1142
- var onTouchEnd = function(e){
1143
- slider.viewport.unbind('touchmove', onTouchMove);
1144
- var orig = e.originalEvent;
1145
- var value = 0;
1146
- // record end x, y positions
1147
- slider.touch.end.x = orig.changedTouches[0].pageX;
1148
- slider.touch.end.y = orig.changedTouches[0].pageY;
1149
- // if fade mode, check if absolute x distance clears the threshold
1150
- if(slider.settings.mode == 'fade'){
1151
- var distance = Math.abs(slider.touch.start.x - slider.touch.end.x);
1152
- if(distance >= slider.settings.swipeThreshold){
1153
- slider.touch.start.x > slider.touch.end.x ? el.goToNextSlide() : el.goToPrevSlide();
1154
- el.stopAuto();
1155
- }
1156
- // not fade mode
1157
- }else{
1158
- var distance = 0;
1159
- // calculate distance and el's animate property
1160
- if(slider.settings.mode == 'horizontal'){
1161
- distance = slider.touch.end.x - slider.touch.start.x;
1162
- value = slider.touch.originalPos.left;
1163
- }else{
1164
- distance = slider.touch.end.y - slider.touch.start.y;
1165
- value = slider.touch.originalPos.top;
1166
- }
1167
- // if not infinite loop and first / last slide, do not attempt a slide transition
1168
- if(!slider.settings.infiniteLoop && ((slider.active.index == 0 && distance > 0) || (slider.active.last && distance < 0))){
1169
- setPositionProperty(value, 'reset', 200);
1170
- }else{
1171
- // check if distance clears threshold
1172
- if(Math.abs(distance) >= slider.settings.swipeThreshold){
1173
- distance < 0 ? el.goToNextSlide() : el.goToPrevSlide();
1174
- el.stopAuto();
1175
- }else{
1176
- // el.animate(property, 200);
1177
- setPositionProperty(value, 'reset', 200);
1178
- }
1179
- }
1180
- }
1181
- slider.viewport.unbind('touchend', onTouchEnd);
1182
- };
1183
-
1184
- /**
1185
- * Window resize event callback
1186
- */
1187
- var resizeWindow = function(e){
1188
- // don't do anything if slider isn't initialized.
1189
- if(!slider.initialized) return;
1190
- // get the new window dimens (again, thank you IE)
1191
- var windowWidthNew = $(window).width();
1192
- var windowHeightNew = $(window).height();
1193
- // make sure that it is a true window resize
1194
- // *we must check this because our dinosaur friend IE fires a window resize event when certain DOM elements
1195
- // are resized. Can you just die already?*
1196
- if(windowWidth != windowWidthNew || windowHeight != windowHeightNew){
1197
- // set the new window dimens
1198
- windowWidth = windowWidthNew;
1199
- windowHeight = windowHeightNew;
1200
- // update all dynamic elements
1201
- el.redrawSlider();
1202
- // Call user resize handler
1203
- slider.settings.onSliderResize.call(el, slider.active.index);
1204
- }
1205
- };
1206
-
1207
- /**
1208
- * ===================================================================================
1209
- * = PUBLIC FUNCTIONS
1210
- * ===================================================================================
1211
- */
1212
-
1213
- /**
1214
- * Performs slide transition to the specified slide
1215
- *
1216
- * @param slideIndex (int)
1217
- * - the destination slide's index (zero-based)
1218
- *
1219
- * @param direction (string)
1220
- * - INTERNAL USE ONLY - the direction of travel ("prev" / "next")
1221
- */
1222
- el.goToSlide = function(slideIndex, direction){
1223
- // if plugin is currently in motion, ignore request
1224
- if(slider.working || slider.active.index == slideIndex) return;
1225
- // declare that plugin is in motion
1226
- slider.working = true;
1227
- // store the old index
1228
- slider.oldIndex = slider.active.index;
1229
- // if slideIndex is less than zero, set active index to last child (this happens during infinite loop)
1230
- if(slideIndex < 0){
1231
- slider.active.index = getPagerQty() - 1;
1232
- // if slideIndex is greater than children length, set active index to 0 (this happens during infinite loop)
1233
- }else if(slideIndex >= getPagerQty()){
1234
- slider.active.index = 0;
1235
- // set active index to requested slide
1236
- }else{
1237
- slider.active.index = slideIndex;
1238
- }
1239
- // onSlideBefore, onSlideNext, onSlidePrev callbacks
1240
- slider.settings.onSlideBefore(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index, slider.children.eq(slider.oldIndex));
1241
- if(direction == 'next'){
1242
- slider.settings.onSlideNext(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1243
- }else if(direction == 'prev'){
1244
- slider.settings.onSlidePrev(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1245
- }
1246
- // check if last slide
1247
- slider.active.last = slider.active.index >= getPagerQty() - 1;
1248
- // update the pager with active class
1249
- if(slider.settings.pager) updatePagerActive(slider.active.index);
1250
- // // check for direction control update
1251
- if(slider.settings.controls) updateDirectionControls();
1252
- // if slider is set to mode: "fade"
1253
- if(slider.settings.mode == 'fade'){
1254
- // Added by Thomas
1255
- slider.viewport.css({overflow:'hidden'});
1256
- // if adaptiveHeight is true and next height is different from current height, animate to the new height
1257
- if(slider.settings.adaptiveHeight && slider.viewport.height() != getViewportHeight()){
1258
- slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
1259
- }
1260
- // fade out the visible child and reset its z-index value
1261
- slider.children.filter(':visible').fadeOut(slider.settings.speed).css({zIndex: 0});
1262
- // fade in the newly requested slide
1263
- slider.children.eq(slider.active.index).css('zIndex', slider.settings.slideZIndex+1).fadeIn(slider.settings.speed, function(){
1264
- $(this).css('zIndex', slider.settings.slideZIndex);
1265
- updateAfterSlideTransition();
1266
- });
1267
- // slider mode is not "fade"
1268
- }else{
1269
- // if adaptiveHeight is true and next height is different from current height, animate to the new height
1270
- if(slider.settings.adaptiveHeight && slider.viewport.height() != getViewportHeight()){
1271
- slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
1272
- }
1273
- var moveBy = 0;
1274
- var position = {left: 0, top: 0};
1275
- // if carousel and not infinite loop
1276
- if(!slider.settings.infiniteLoop && slider.carousel && slider.active.last){
1277
- if(slider.settings.mode == 'horizontal'){
1278
- // get the last child position
1279
- var lastChild = slider.children.eq(slider.children.length - 1);
1280
- position = lastChild.position();
1281
- // calculate the position of the last slide
1282
- moveBy = slider.viewport.width() - lastChild.outerWidth();
1283
- }else{
1284
- // get last showing index position
1285
- var lastShowingIndex = slider.children.length - slider.settings.minSlides;
1286
- position = slider.children.eq(lastShowingIndex).position();
1287
- }
1288
- // horizontal carousel, going previous while on first slide (infiniteLoop mode)
1289
- }else if(slider.carousel && slider.active.last && direction == 'prev'){
1290
- // get the last child position
1291
- var eq = slider.settings.moveSlides == 1 ? slider.settings.maxSlides - getMoveBy() : ((getPagerQty() - 1) * getMoveBy()) - (slider.children.length - slider.settings.maxSlides);
1292
- var lastChild = el.children('.soliloquy-clone').eq(eq);
1293
- position = lastChild.position();
1294
- // if infinite loop and "Next" is clicked on the last slide
1295
- }else if(direction == 'next' && slider.active.index == 0){
1296
- // get the last clone position
1297
- position = el.find('> .soliloquy-clone').eq(slider.settings.maxSlides).position();
1298
- slider.active.last = false;
1299
- // normal non-zero requests
1300
- }else if(slideIndex >= 0){
1301
- var requestEl = slideIndex * getMoveBy();
1302
- position = slider.children.eq(requestEl).position();
1303
- }
1304
-
1305
- /* If the position doesn't exist
1306
- * (e.g. if you destroy the slider on a next click),
1307
- * it doesn't throw an error.
1308
- */
1309
- if ("undefined" !== typeof(position)) {
1310
- var value = slider.settings.mode == 'horizontal' ? -(position.left - moveBy) : -position.top;
1311
- // plugin values to be animated
1312
- setPositionProperty(value, 'slide', slider.settings.speed);
1313
- }
1314
- }
1315
- };
1316
-
1317
- /**
1318
- * Transitions to the next slide in the show
1319
- */
1320
- el.goToNextSlide = function(){
1321
- // if infiniteLoop is false and last page is showing, disregard call
1322
- if (!slider.settings.infiniteLoop && slider.active.last) return;
1323
- var pagerIndex = parseInt(slider.active.index) + 1;
1324
- el.goToSlide(pagerIndex, 'next');
1325
- };
1326
-
1327
- /**
1328
- * Transitions to the prev slide in the show
1329
- */
1330
- el.goToPrevSlide = function(){
1331
- // if infiniteLoop is false and last page is showing, disregard call
1332
- if (!slider.settings.infiniteLoop && slider.active.index == 0) return;
1333
- var pagerIndex = parseInt(slider.active.index) - 1;
1334
- el.goToSlide(pagerIndex, 'prev');
1335
- };
1336
-
1337
- /**
1338
- * Starts the auto show
1339
- *
1340
- * @param preventControlUpdate (boolean)
1341
- * - if true, auto controls state will not be updated
1342
- */
1343
- el.startAuto = function(preventControlUpdate){
1344
- // if an interval already exists, disregard call
1345
- if(slider.interval) return;
1346
- // create an interval
1347
- slider.interval = setInterval(function(){
1348
- slider.settings.autoDirection == 'next' ? el.goToNextSlide() : el.goToPrevSlide();
1349
- }, slider.settings.pause);
1350
- // if auto controls are displayed and preventControlUpdate is not true
1351
- if (slider.settings.autoControls && preventControlUpdate != true) updateAutoControls('stop');
1352
- };
1353
-
1354
- /**
1355
- * Stops the auto show
1356
- *
1357
- * @param preventControlUpdate (boolean)
1358
- * - if true, auto controls state will not be updated
1359
- */
1360
- el.stopAuto = function(preventControlUpdate){
1361
- // if no interval exists, disregard call
1362
- if(!slider.interval) return;
1363
- // clear the interval
1364
- clearInterval(slider.interval);
1365
- slider.interval = null;
1366
- // if auto controls are displayed and preventControlUpdate is not true
1367
- if (slider.settings.autoControls && preventControlUpdate != true) updateAutoControls('start');
1368
- };
1369
-
1370
- /**
1371
- * Returns current slide index (zero-based)
1372
- */
1373
- el.getCurrentSlide = function(){
1374
- return slider.active.index;
1375
- };
1376
-
1377
- /**
1378
- * Returns current slide element
1379
- */
1380
- el.getCurrentSlideElement = function(){
1381
- return slider.children.eq(slider.active.index);
1382
- };
1383
-
1384
- /**
1385
- * Returns number of slides in show
1386
- */
1387
- el.getSlideCount = function(){
1388
- return slider.children.length;
1389
- };
1390
-
1391
- /**
1392
- * Update all dynamic slider elements
1393
- */
1394
- el.redrawSlider = function(){
1395
- // resize all children in ratio to new screen size
1396
- slider.children.add(el.find('.soliloquy-clone')).width(getSlideWidth());
1397
- // adjust the height
1398
- slider.viewport.css('height', getViewportHeight());
1399
- // update the slide position
1400
- if(!slider.settings.ticker) {
1401
- setSlidePosition();
1402
- }
1403
- // if active.last was true before the screen resize, we want
1404
- // to keep it last no matter what screen size we end on
1405
- if (slider.active.last) {
1406
- slider.active.index = getPagerQty() - 1;
1407
- }
1408
- // if the active index (page) no longer exists due to the resize, simply set the index as last
1409
- if (slider.active.index >= getPagerQty()) {
1410
- slider.active.last = true;
1411
- }
1412
- // if a pager is being displayed and a custom pager is not being used, update it
1413
- if(slider.settings.pager && !slider.settings.pagerCustom){
1414
- populatePager();
1415
- updatePagerActive(slider.active.index);
1416
- }
1417
- };
1418
-
1419
- /**
1420
- * Destroy the current instance of the slider (revert everything back to original state)
1421
- */
1422
- el.destroySlider = function(){
1423
- // don't do anything if slider has already been destroyed
1424
- if(!slider.initialized) {
1425
- return;
1426
- }
1427
- slider.initialized = false;
1428
- $('.soliloquy-clone', this).remove();
1429
- slider.children.each(function() {
1430
- $(this).data("origStyle") !== undefined ? $(this).attr("style", $(this).data("origStyle")) : $(this).removeAttr('style');
1431
- });
1432
- $(this).data("origStyle") !== undefined ? this.attr("style", $(this).data("origStyle")) : $(this).removeAttr('style');
1433
- $(this).unwrap().unwrap();
1434
- if(slider.controls.el) {
1435
- slider.controls.el.remove();
1436
- }
1437
- if(slider.controls.next) {
1438
- slider.controls.next.remove();
1439
- }
1440
- if(slider.controls.prev) {
1441
- slider.controls.prev.remove();
1442
- }
1443
- if(slider.pagerEl && slider.settings.controls) {
1444
- slider.pagerEl.remove();
1445
- }
1446
- $('.soliloquy-caption', this).remove();
1447
- if(slider.controls.autoEl) {
1448
- slider.controls.autoEl.remove();
1449
- }
1450
- clearInterval(slider.interval);
1451
-
1452
- if(slider.settings.responsive) {
1453
- $(window).unbind('resize', resizeWindow);
1454
- }
1455
- };
1456
-
1457
- /**
1458
- * Reload the slider (revert all DOM changes, and re-initialize)
1459
- */
1460
- el.reloadSlider = function(settings){
1461
- if (settings !== undefined) {
1462
- options = settings;
1463
- }
1464
- el.destroySlider();
1465
- init();
1466
- };
1467
-
1468
- el.getSetting = function(setting){
1469
- if ( slider.settings[setting] ) {
1470
- return slider.settings[setting];
1471
- } else {
1472
- return false;
1473
- }
1474
- };
1475
-
1476
- init();
1477
-
1478
- // returns the current jQuery object
1479
- return this;
1480
- };
1481
-
1482
- })(jQuery, window, document);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/lib/chosen.jquery.js DELETED
@@ -1,1284 +0,0 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.5.1
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2016 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */
12
-
13
- (function() {
14
- var $, AbstractChosen, Chosen, SelectParser, _ref,
15
- __hasProp = {}.hasOwnProperty,
16
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
17
-
18
- SelectParser = (function() {
19
- function SelectParser() {
20
- this.options_index = 0;
21
- this.parsed = [];
22
- }
23
-
24
- SelectParser.prototype.add_node = function(child) {
25
- if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
- return this.add_group(child);
27
- } else {
28
- return this.add_option(child);
29
- }
30
- };
31
-
32
- SelectParser.prototype.add_group = function(group) {
33
- var group_position, option, _i, _len, _ref, _results;
34
- group_position = this.parsed.length;
35
- this.parsed.push({
36
- array_index: group_position,
37
- group: true,
38
- label: this.escapeExpression(group.label),
39
- title: group.title ? group.title : void 0,
40
- children: 0,
41
- disabled: group.disabled,
42
- classes: group.className
43
- });
44
- _ref = group.childNodes;
45
- _results = [];
46
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
47
- option = _ref[_i];
48
- _results.push(this.add_option(option, group_position, group.disabled));
49
- }
50
- return _results;
51
- };
52
-
53
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
54
- if (option.nodeName.toUpperCase() === "OPTION") {
55
- if (option.text !== "") {
56
- if (group_position != null) {
57
- this.parsed[group_position].children += 1;
58
- }
59
- this.parsed.push({
60
- array_index: this.parsed.length,
61
- options_index: this.options_index,
62
- value: option.value,
63
- text: option.text,
64
- html: option.innerHTML,
65
- title: option.title ? option.title : void 0,
66
- selected: option.selected,
67
- disabled: group_disabled === true ? group_disabled : option.disabled,
68
- group_array_index: group_position,
69
- group_label: group_position != null ? this.parsed[group_position].label : null,
70
- classes: option.className,
71
- style: option.style.cssText
72
- });
73
- } else {
74
- this.parsed.push({
75
- array_index: this.parsed.length,
76
- options_index: this.options_index,
77
- empty: true
78
- });
79
- }
80
- return this.options_index += 1;
81
- }
82
- };
83
-
84
- SelectParser.prototype.escapeExpression = function(text) {
85
- var map, unsafe_chars;
86
- if ((text == null) || text === false) {
87
- return "";
88
- }
89
- if (!/[\&\<\>\"\'\`]/.test(text)) {
90
- return text;
91
- }
92
- map = {
93
- "<": "&lt;",
94
- ">": "&gt;",
95
- '"': "&quot;",
96
- "'": "&#x27;",
97
- "`": "&#x60;"
98
- };
99
- unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
100
- return text.replace(unsafe_chars, function(chr) {
101
- return map[chr] || "&amp;";
102
- });
103
- };
104
-
105
- return SelectParser;
106
-
107
- })();
108
-
109
- SelectParser.select_to_array = function(select) {
110
- var child, parser, _i, _len, _ref;
111
- parser = new SelectParser();
112
- _ref = select.childNodes;
113
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
114
- child = _ref[_i];
115
- parser.add_node(child);
116
- }
117
- return parser.parsed;
118
- };
119
-
120
- AbstractChosen = (function() {
121
- function AbstractChosen(form_field, options) {
122
- this.form_field = form_field;
123
- this.options = options != null ? options : {};
124
- if (!AbstractChosen.browser_is_supported()) {
125
- return;
126
- }
127
- this.is_multiple = this.form_field.multiple;
128
- this.set_default_text();
129
- this.set_default_values();
130
- this.setup();
131
- this.set_up_html();
132
- this.register_observers();
133
- this.on_ready();
134
- }
135
-
136
- AbstractChosen.prototype.set_default_values = function() {
137
- var _this = this;
138
- this.click_test_action = function(evt) {
139
- return _this.test_active_click(evt);
140
- };
141
- this.activate_action = function(evt) {
142
- return _this.activate_field(evt);
143
- };
144
- this.active_field = false;
145
- this.mouse_on_container = false;
146
- this.results_showing = false;
147
- this.result_highlighted = null;
148
- this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
149
- this.disable_search_threshold = this.options.disable_search_threshold || 0;
150
- this.disable_search = this.options.disable_search || false;
151
- this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
152
- this.group_search = this.options.group_search != null ? this.options.group_search : true;
153
- this.search_contains = this.options.search_contains || false;
154
- this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
155
- this.max_selected_options = this.options.max_selected_options || Infinity;
156
- this.inherit_select_classes = this.options.inherit_select_classes || false;
157
- this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
158
- this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
159
- this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
160
- return this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
161
- };
162
-
163
- AbstractChosen.prototype.set_default_text = function() {
164
- if (this.form_field.getAttribute("data-placeholder")) {
165
- this.default_text = this.form_field.getAttribute("data-placeholder");
166
- } else if (this.is_multiple) {
167
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
168
- } else {
169
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
170
- }
171
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
172
- };
173
-
174
- AbstractChosen.prototype.choice_label = function(item) {
175
- if (this.include_group_label_in_selected && (item.group_label != null)) {
176
- return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
177
- } else {
178
- return item.html;
179
- }
180
- };
181
-
182
- AbstractChosen.prototype.mouse_enter = function() {
183
- return this.mouse_on_container = true;
184
- };
185
-
186
- AbstractChosen.prototype.mouse_leave = function() {
187
- return this.mouse_on_container = false;
188
- };
189
-
190
- AbstractChosen.prototype.input_focus = function(evt) {
191
- var _this = this;
192
- if (this.is_multiple) {
193
- if (!this.active_field) {
194
- return setTimeout((function() {
195
- return _this.container_mousedown();
196
- }), 50);
197
- }
198
- } else {
199
- if (!this.active_field) {
200
- return this.activate_field();
201
- }
202
- }
203
- };
204
-
205
- AbstractChosen.prototype.input_blur = function(evt) {
206
- var _this = this;
207
- if (!this.mouse_on_container) {
208
- this.active_field = false;
209
- return setTimeout((function() {
210
- return _this.blur_test();
211
- }), 100);
212
- }
213
- };
214
-
215
- AbstractChosen.prototype.results_option_build = function(options) {
216
- var content, data, data_content, shown_results, _i, _len, _ref;
217
- content = '';
218
- shown_results = 0;
219
- _ref = this.results_data;
220
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
221
- data = _ref[_i];
222
- data_content = '';
223
- if (data.group) {
224
- data_content = this.result_add_group(data);
225
- } else {
226
- data_content = this.result_add_option(data);
227
- }
228
- if (data_content !== '') {
229
- shown_results++;
230
- content += data_content;
231
- }
232
- if (options != null ? options.first : void 0) {
233
- if (data.selected && this.is_multiple) {
234
- this.choice_build(data);
235
- } else if (data.selected && !this.is_multiple) {
236
- this.single_set_selected_text(this.choice_label(data));
237
- }
238
- }
239
- if (shown_results >= this.max_shown_results) {
240
- break;
241
- }
242
- }
243
- return content;
244
- };
245
-
246
- AbstractChosen.prototype.result_add_option = function(option) {
247
- var classes, option_el;
248
- if (!option.search_match) {
249
- return '';
250
- }
251
- if (!this.include_option_in_results(option)) {
252
- return '';
253
- }
254
- classes = [];
255
- if (!option.disabled && !(option.selected && this.is_multiple)) {
256
- classes.push("active-result");
257
- }
258
- if (option.disabled && !(option.selected && this.is_multiple)) {
259
- classes.push("disabled-result");
260
- }
261
- if (option.selected) {
262
- classes.push("result-selected");
263
- }
264
- if (option.group_array_index != null) {
265
- classes.push("group-option");
266
- }
267
- if (option.classes !== "") {
268
- classes.push(option.classes);
269
- }
270
- option_el = document.createElement("li");
271
- option_el.className = classes.join(" ");
272
- option_el.style.cssText = option.style;
273
- option_el.setAttribute("data-option-array-index", option.array_index);
274
- option_el.innerHTML = option.search_text;
275
- if (option.title) {
276
- option_el.title = option.title;
277
- }
278
- return this.outerHTML(option_el);
279
- };
280
-
281
- AbstractChosen.prototype.result_add_group = function(group) {
282
- var classes, group_el;
283
- if (!(group.search_match || group.group_match)) {
284
- return '';
285
- }
286
- if (!(group.active_options > 0)) {
287
- return '';
288
- }
289
- classes = [];
290
- classes.push("group-result");
291
- if (group.classes) {
292
- classes.push(group.classes);
293
- }
294
- group_el = document.createElement("li");
295
- group_el.className = classes.join(" ");
296
- group_el.innerHTML = group.search_text;
297
- if (group.title) {
298
- group_el.title = group.title;
299
- }
300
- return this.outerHTML(group_el);
301
- };
302
-
303
- AbstractChosen.prototype.results_update_field = function() {
304
- this.set_default_text();
305
- if (!this.is_multiple) {
306
- this.results_reset_cleanup();
307
- }
308
- this.result_clear_highlight();
309
- this.results_build();
310
- if (this.results_showing) {
311
- return this.winnow_results();
312
- }
313
- };
314
-
315
- AbstractChosen.prototype.reset_single_select_options = function() {
316
- var result, _i, _len, _ref, _results;
317
- _ref = this.results_data;
318
- _results = [];
319
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
320
- result = _ref[_i];
321
- if (result.selected) {
322
- _results.push(result.selected = false);
323
- } else {
324
- _results.push(void 0);
325
- }
326
- }
327
- return _results;
328
- };
329
-
330
- AbstractChosen.prototype.results_toggle = function() {
331
- if (this.results_showing) {
332
- return this.results_hide();
333
- } else {
334
- return this.results_show();
335
- }
336
- };
337
-
338
- AbstractChosen.prototype.results_search = function(evt) {
339
- if (this.results_showing) {
340
- return this.winnow_results();
341
- } else {
342
- return this.results_show();
343
- }
344
- };
345
-
346
- AbstractChosen.prototype.winnow_results = function() {
347
- var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
348
- this.no_results_clear();
349
- results = 0;
350
- searchText = this.get_search_text();
351
- escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
352
- zregex = new RegExp(escapedSearchText, 'i');
353
- regex = this.get_search_regex(escapedSearchText);
354
- _ref = this.results_data;
355
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
356
- option = _ref[_i];
357
- option.search_match = false;
358
- results_group = null;
359
- if (this.include_option_in_results(option)) {
360
- if (option.group) {
361
- option.group_match = false;
362
- option.active_options = 0;
363
- }
364
- if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
365
- results_group = this.results_data[option.group_array_index];
366
- if (results_group.active_options === 0 && results_group.search_match) {
367
- results += 1;
368
- }
369
- results_group.active_options += 1;
370
- }
371
- option.search_text = option.group ? option.label : option.html;
372
- if (!(option.group && !this.group_search)) {
373
- option.search_match = this.search_string_match(option.search_text, regex);
374
- if (option.search_match && !option.group) {
375
- results += 1;
376
- }
377
- if (option.search_match) {
378
- if (searchText.length) {
379
- startpos = option.search_text.search(zregex);
380
- text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
381
- option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
382
- }
383
- if (results_group != null) {
384
- results_group.group_match = true;
385
- }
386
- } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
387
- option.search_match = true;
388
- }
389
- }
390
- }
391
- }
392
- this.result_clear_highlight();
393
- if (results < 1 && searchText.length) {
394
- this.update_results_content("");
395
- return this.no_results(searchText);
396
- } else {
397
- this.update_results_content(this.results_option_build());
398
- return this.winnow_results_set_highlight();
399
- }
400
- };
401
-
402
- AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
403
- var regex_anchor;
404
- regex_anchor = this.search_contains ? "" : "^";
405
- return new RegExp(regex_anchor + escaped_search_string, 'i');
406
- };
407
-
408
- AbstractChosen.prototype.search_string_match = function(search_string, regex) {
409
- var part, parts, _i, _len;
410
- if (regex.test(search_string)) {
411
- return true;
412
- } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
413
- parts = search_string.replace(/\[|\]/g, "").split(" ");
414
- if (parts.length) {
415
- for (_i = 0, _len = parts.length; _i < _len; _i++) {
416
- part = parts[_i];
417
- if (regex.test(part)) {
418
- return true;
419
- }
420
- }
421
- }
422
- }
423
- };
424
-
425
- AbstractChosen.prototype.choices_count = function() {
426
- var option, _i, _len, _ref;
427
- if (this.selected_option_count != null) {
428
- return this.selected_option_count;
429
- }
430
- this.selected_option_count = 0;
431
- _ref = this.form_field.options;
432
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
433
- option = _ref[_i];
434
- if (option.selected) {
435
- this.selected_option_count += 1;
436
- }
437
- }
438
- return this.selected_option_count;
439
- };
440
-
441
- AbstractChosen.prototype.choices_click = function(evt) {
442
- evt.preventDefault();
443
- if (!(this.results_showing || this.is_disabled)) {
444
- return this.results_show();
445
- }
446
- };
447
-
448
- AbstractChosen.prototype.keyup_checker = function(evt) {
449
- var stroke, _ref;
450
- stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
451
- this.search_field_scale();
452
- switch (stroke) {
453
- case 8:
454
- if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
455
- return this.keydown_backstroke();
456
- } else if (!this.pending_backstroke) {
457
- this.result_clear_highlight();
458
- return this.results_search();
459
- }
460
- break;
461
- case 13:
462
- evt.preventDefault();
463
- if (this.results_showing) {
464
- return this.result_select(evt);
465
- }
466
- break;
467
- case 27:
468
- if (this.results_showing) {
469
- this.results_hide();
470
- }
471
- return true;
472
- case 9:
473
- case 38:
474
- case 40:
475
- case 16:
476
- case 91:
477
- case 17:
478
- case 18:
479
- break;
480
- default:
481
- return this.results_search();
482
- }
483
- };
484
-
485
- AbstractChosen.prototype.clipboard_event_checker = function(evt) {
486
- var _this = this;
487
- return setTimeout((function() {
488
- return _this.results_search();
489
- }), 50);
490
- };
491
-
492
- AbstractChosen.prototype.container_width = function() {
493
- if (this.options.width != null) {
494
- return this.options.width;
495
- } else {
496
- return "" + this.form_field.offsetWidth + "px";
497
- }
498
- };
499
-
500
- AbstractChosen.prototype.include_option_in_results = function(option) {
501
- if (this.is_multiple && (!this.display_selected_options && option.selected)) {
502
- return false;
503
- }
504
- if (!this.display_disabled_options && option.disabled) {
505
- return false;
506
- }
507
- if (option.empty) {
508
- return false;
509
- }
510
- return true;
511
- };
512
-
513
- AbstractChosen.prototype.search_results_touchstart = function(evt) {
514
- this.touch_started = true;
515
- return this.search_results_mouseover(evt);
516
- };
517
-
518
- AbstractChosen.prototype.search_results_touchmove = function(evt) {
519
- this.touch_started = false;
520
- return this.search_results_mouseout(evt);
521
- };
522
-
523
- AbstractChosen.prototype.search_results_touchend = function(evt) {
524
- if (this.touch_started) {
525
- return this.search_results_mouseup(evt);
526
- }
527
- };
528
-
529
- AbstractChosen.prototype.outerHTML = function(element) {
530
- var tmp;
531
- if (element.outerHTML) {
532
- return element.outerHTML;
533
- }
534
- tmp = document.createElement("div");
535
- tmp.appendChild(element);
536
- return tmp.innerHTML;
537
- };
538
-
539
- AbstractChosen.browser_is_supported = function() {
540
- if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
541
- return false;
542
- }
543
- if (/Android/i.test(window.navigator.userAgent)) {
544
- if (/Mobile/i.test(window.navigator.userAgent)) {
545
- return false;
546
- }
547
- }
548
- if (/IEMobile/i.test(window.navigator.userAgent)) {
549
- return false;
550
- }
551
- if (/Windows Phone/i.test(window.navigator.userAgent)) {
552
- return false;
553
- }
554
- if (/BlackBerry/i.test(window.navigator.userAgent)) {
555
- return false;
556
- }
557
- if (/BB10/i.test(window.navigator.userAgent)) {
558
- return false;
559
- }
560
- if (window.navigator.appName === "Microsoft Internet Explorer") {
561
- return document.documentMode >= 8;
562
- }
563
- return true;
564
- };
565
-
566
- AbstractChosen.default_multiple_text = "Select Some Options";
567
-
568
- AbstractChosen.default_single_text = "Select an Option";
569
-
570
- AbstractChosen.default_no_result_text = "No results match";
571
-
572
- return AbstractChosen;
573
-
574
- })();
575
-
576
- $ = jQuery;
577
-
578
- $.fn.extend({
579
- chosen: function(options) {
580
- if (!AbstractChosen.browser_is_supported()) {
581
- return this;
582
- }
583
- return this.each(function(input_field) {
584
- var $this, chosen;
585
- $this = $(this);
586
- chosen = $this.data('chosen');
587
- if (options === 'destroy') {
588
- if (chosen instanceof Chosen) {
589
- chosen.destroy();
590
- }
591
- return;
592
- }
593
- if (!(chosen instanceof Chosen)) {
594
- $this.data('chosen', new Chosen(this, options));
595
- }
596
- });
597
- }
598
- });
599
-
600
- Chosen = (function(_super) {
601
- __extends(Chosen, _super);
602
-
603
- function Chosen() {
604
- _ref = Chosen.__super__.constructor.apply(this, arguments);
605
- return _ref;
606
- }
607
-
608
- Chosen.prototype.setup = function() {
609
- this.form_field_jq = $(this.form_field);
610
- this.current_selectedIndex = this.form_field.selectedIndex;
611
- return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
612
- };
613
-
614
- Chosen.prototype.set_up_html = function() {
615
- var container_classes, container_props;
616
- container_classes = ["chosen-container"];
617
- container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
618
- if (this.inherit_select_classes && this.form_field.className) {
619
- container_classes.push(this.form_field.className);
620
- }
621
- if (this.is_rtl) {
622
- container_classes.push("chosen-rtl");
623
- }
624
- container_props = {
625
- 'class': container_classes.join(' '),
626
- 'style': "width: " + (this.container_width()) + ";",
627
- 'title': this.form_field.title
628
- };
629
- if (this.form_field.id.length) {
630
- container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
631
- }
632
- this.container = $("<div />", container_props);
633
- if (this.is_multiple) {
634
- this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
635
- } else {
636
- this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
637
- }
638
- this.form_field_jq.hide().after(this.container);
639
- this.dropdown = this.container.find('div.chosen-drop').first();
640
- this.search_field = this.container.find('input').first();
641
- this.search_results = this.container.find('ul.chosen-results').first();
642
- this.search_field_scale();
643
- this.search_no_results = this.container.find('li.no-results').first();
644
- if (this.is_multiple) {
645
- this.search_choices = this.container.find('ul.chosen-choices').first();
646
- this.search_container = this.container.find('li.search-field').first();
647
- } else {
648
- this.search_container = this.container.find('div.chosen-search').first();
649
- this.selected_item = this.container.find('.chosen-single').first();
650
- }
651
- this.results_build();
652
- this.set_tab_index();
653
- return this.set_label_behavior();
654
- };
655
-
656
- Chosen.prototype.on_ready = function() {
657
- return this.form_field_jq.trigger("chosen:ready", {
658
- chosen: this
659
- });
660
- };
661
-
662
- Chosen.prototype.register_observers = function() {
663
- var _this = this;
664
- this.container.bind('touchstart.chosen', function(evt) {
665
- _this.container_mousedown(evt);
666
- return evt.preventDefault();
667
- });
668
- this.container.bind('touchend.chosen', function(evt) {
669
- _this.container_mouseup(evt);
670
- return evt.preventDefault();
671
- });
672
- this.container.bind('mousedown.chosen', function(evt) {
673
- _this.container_mousedown(evt);
674
- });
675
- this.container.bind('mouseup.chosen', function(evt) {
676
- _this.container_mouseup(evt);
677
- });
678
- this.container.bind('mouseenter.chosen', function(evt) {
679
- _this.mouse_enter(evt);
680
- });
681
- this.container.bind('mouseleave.chosen', function(evt) {
682
- _this.mouse_leave(evt);
683
- });
684
- this.search_results.bind('mouseup.chosen', function(evt) {
685
- _this.search_results_mouseup(evt);
686
- });
687
- this.search_results.bind('mouseover.chosen', function(evt) {
688
- _this.search_results_mouseover(evt);
689
- });
690
- this.search_results.bind('mouseout.chosen', function(evt) {
691
- _this.search_results_mouseout(evt);
692
- });
693
- this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
694
- _this.search_results_mousewheel(evt);
695
- });
696
- this.search_results.bind('touchstart.chosen', function(evt) {
697
- _this.search_results_touchstart(evt);
698
- });
699
- this.search_results.bind('touchmove.chosen', function(evt) {
700
- _this.search_results_touchmove(evt);
701
- });
702
- this.search_results.bind('touchend.chosen', function(evt) {
703
- _this.search_results_touchend(evt);
704
- });
705
- this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
706
- _this.results_update_field(evt);
707
- });
708
- this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
709
- _this.activate_field(evt);
710
- });
711
- this.form_field_jq.bind("chosen:open.chosen", function(evt) {
712
- _this.container_mousedown(evt);
713
- });
714
- this.form_field_jq.bind("chosen:close.chosen", function(evt) {
715
- _this.input_blur(evt);
716
- });
717
- this.search_field.bind('blur.chosen', function(evt) {
718
- _this.input_blur(evt);
719
- });
720
- this.search_field.bind('keyup.chosen', function(evt) {
721
- _this.keyup_checker(evt);
722
- });
723
- this.search_field.bind('keydown.chosen', function(evt) {
724
- _this.keydown_checker(evt);
725
- });
726
- this.search_field.bind('focus.chosen', function(evt) {
727
- _this.input_focus(evt);
728
- });
729
- this.search_field.bind('cut.chosen', function(evt) {
730
- _this.clipboard_event_checker(evt);
731
- });
732
- this.search_field.bind('paste.chosen', function(evt) {
733
- _this.clipboard_event_checker(evt);
734
- });
735
- if (this.is_multiple) {
736
- return this.search_choices.bind('click.chosen', function(evt) {
737
- _this.choices_click(evt);
738
- });
739
- } else {
740
- return this.container.bind('click.chosen', function(evt) {
741
- evt.preventDefault();
742
- });
743
- }
744
- };
745
-
746
- Chosen.prototype.destroy = function() {
747
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
748
- if (this.search_field[0].tabIndex) {
749
- this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
750
- }
751
- this.container.remove();
752
- this.form_field_jq.removeData('chosen');
753
- return this.form_field_jq.show();
754
- };
755
-
756
- Chosen.prototype.search_field_disabled = function() {
757
- this.is_disabled = this.form_field_jq[0].disabled;
758
- if (this.is_disabled) {
759
- this.container.addClass('chosen-disabled');
760
- this.search_field[0].disabled = true;
761
- if (!this.is_multiple) {
762
- this.selected_item.unbind("focus.chosen", this.activate_action);
763
- }
764
- return this.close_field();
765
- } else {
766
- this.container.removeClass('chosen-disabled');
767
- this.search_field[0].disabled = false;
768
- if (!this.is_multiple) {
769
- return this.selected_item.bind("focus.chosen", this.activate_action);
770
- }
771
- }
772
- };
773
-
774
- Chosen.prototype.container_mousedown = function(evt) {
775
- if (!this.is_disabled) {
776
- if (evt && evt.type === "mousedown" && !this.results_showing) {
777
- evt.preventDefault();
778
- }
779
- if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
780
- if (!this.active_field) {
781
- if (this.is_multiple) {
782
- this.search_field.val("");
783
- }
784
- $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
785
- this.results_show();
786
- } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
787
- evt.preventDefault();
788
- this.results_toggle();
789
- }
790
- return this.activate_field();
791
- }
792
- }
793
- };
794
-
795
- Chosen.prototype.container_mouseup = function(evt) {
796
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
797
- return this.results_reset(evt);
798
- }
799
- };
800
-
801
- Chosen.prototype.search_results_mousewheel = function(evt) {
802
- var delta;
803
- if (evt.originalEvent) {
804
- delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
805
- }
806
- if (delta != null) {
807
- evt.preventDefault();
808
- if (evt.type === 'DOMMouseScroll') {
809
- delta = delta * 40;
810
- }
811
- return this.search_results.scrollTop(delta + this.search_results.scrollTop());
812
- }
813
- };
814
-
815
- Chosen.prototype.blur_test = function(evt) {
816
- if (!this.active_field && this.container.hasClass("chosen-container-active")) {
817
- return this.close_field();
818
- }
819
- };
820
-
821
- Chosen.prototype.close_field = function() {
822
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
823
- this.active_field = false;
824
- this.results_hide();
825
- this.container.removeClass("chosen-container-active");
826
- this.clear_backstroke();
827
- this.show_search_field_default();
828
- return this.search_field_scale();
829
- };
830
-
831
- Chosen.prototype.activate_field = function() {
832
- this.container.addClass("chosen-container-active");
833
- this.active_field = true;
834
- this.search_field.val(this.search_field.val());
835
- return this.search_field.focus();
836
- };
837
-
838
- Chosen.prototype.test_active_click = function(evt) {
839
- var active_container;
840
- active_container = $(evt.target).closest('.chosen-container');
841
- if (active_container.length && this.container[0] === active_container[0]) {
842
- return this.active_field = true;
843
- } else {
844
- return this.close_field();
845
- }
846
- };
847
-
848
- Chosen.prototype.results_build = function() {
849
- this.parsing = true;
850
- this.selected_option_count = null;
851
- this.results_data = SelectParser.select_to_array(this.form_field);
852
- if (this.is_multiple) {
853
- this.search_choices.find("li.search-choice").remove();
854
- } else if (!this.is_multiple) {
855
- this.single_set_selected_text();
856
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
857
- this.search_field[0].readOnly = true;
858
- this.container.addClass("chosen-container-single-nosearch");
859
- } else {
860
- this.search_field[0].readOnly = false;
861
- this.container.removeClass("chosen-container-single-nosearch");
862
- }
863
- }
864
- this.update_results_content(this.results_option_build({
865
- first: true
866
- }));
867
- this.search_field_disabled();
868
- this.show_search_field_default();
869
- this.search_field_scale();
870
- return this.parsing = false;
871
- };
872
-
873
- Chosen.prototype.result_do_highlight = function(el) {
874
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
875
- if (el.length) {
876
- this.result_clear_highlight();
877
- this.result_highlight = el;
878
- this.result_highlight.addClass("highlighted");
879
- maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
880
- visible_top = this.search_results.scrollTop();
881
- visible_bottom = maxHeight + visible_top;
882
- high_top = this.result_highlight.position().top + this.search_results.scrollTop();
883
- high_bottom = high_top + this.result_highlight.outerHeight();
884
- if (high_bottom >= visible_bottom) {
885
- return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
886
- } else if (high_top < visible_top) {
887
- return this.search_results.scrollTop(high_top);
888
- }
889
- }
890
- };
891
-
892
- Chosen.prototype.result_clear_highlight = function() {
893
- if (this.result_highlight) {
894
- this.result_highlight.removeClass("highlighted");
895
- }
896
- return this.result_highlight = null;
897
- };
898
-
899
- Chosen.prototype.results_show = function() {
900
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
901
- this.form_field_jq.trigger("chosen:maxselected", {
902
- chosen: this
903
- });
904
- return false;
905
- }
906
- this.container.addClass("chosen-with-drop");
907
- this.results_showing = true;
908
- this.search_field.focus();
909
- this.search_field.val(this.search_field.val());
910
- this.winnow_results();
911
- return this.form_field_jq.trigger("chosen:showing_dropdown", {
912
- chosen: this
913
- });
914
- };
915
-
916
- Chosen.prototype.update_results_content = function(content) {
917
- return this.search_results.html(content);
918
- };
919
-
920
- Chosen.prototype.results_hide = function() {
921
- if (this.results_showing) {
922
- this.result_clear_highlight();
923
- this.container.removeClass("chosen-with-drop");
924
- this.form_field_jq.trigger("chosen:hiding_dropdown", {
925
- chosen: this
926
- });
927
- }
928
- return this.results_showing = false;
929
- };
930
-
931
- Chosen.prototype.set_tab_index = function(el) {
932
- var ti;
933
- if (this.form_field.tabIndex) {
934
- ti = this.form_field.tabIndex;
935
- this.form_field.tabIndex = -1;
936
- return this.search_field[0].tabIndex = ti;
937
- }
938
- };
939
-
940
- Chosen.prototype.set_label_behavior = function() {
941
- var _this = this;
942
- this.form_field_label = this.form_field_jq.parents("label");
943
- if (!this.form_field_label.length && this.form_field.id.length) {
944
- this.form_field_label = $("label[for='" + this.form_field.id + "']");
945
- }
946
- if (this.form_field_label.length > 0) {
947
- return this.form_field_label.bind('click.chosen', function(evt) {
948
- if (_this.is_multiple) {
949
- return _this.container_mousedown(evt);
950
- } else {
951
- return _this.activate_field();
952
- }
953
- });
954
- }
955
- };
956
-
957
- Chosen.prototype.show_search_field_default = function() {
958
- if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
959
- this.search_field.val(this.default_text);
960
- return this.search_field.addClass("default");
961
- } else {
962
- this.search_field.val("");
963
- return this.search_field.removeClass("default");
964
- }
965
- };
966
-
967
- Chosen.prototype.search_results_mouseup = function(evt) {
968
- var target;
969
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
970
- if (target.length) {
971
- this.result_highlight = target;
972
- this.result_select(evt);
973
- return this.search_field.focus();
974
- }
975
- };
976
-
977
- Chosen.prototype.search_results_mouseover = function(evt) {
978
- var target;
979
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
980
- if (target) {
981
- return this.result_do_highlight(target);
982
- }
983
- };
984
-
985
- Chosen.prototype.search_results_mouseout = function(evt) {
986
- if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
987
- return this.result_clear_highlight();
988
- }
989
- };
990
-
991
- Chosen.prototype.choice_build = function(item) {
992
- var choice, close_link,
993
- _this = this;
994
- choice = $('<li />', {
995
- "class": "search-choice"
996
- }).html("<span>" + (this.choice_label(item)) + "</span>");
997
- if (item.disabled) {
998
- choice.addClass('search-choice-disabled');
999
- } else {
1000
- close_link = $('<a />', {
1001
- "class": 'search-choice-close',
1002
- 'data-option-array-index': item.array_index
1003
- });
1004
- close_link.bind('click.chosen', function(evt) {
1005
- return _this.choice_destroy_link_click(evt);
1006
- });
1007
- choice.append(close_link);
1008
- }
1009
- return this.search_container.before(choice);
1010
- };
1011
-
1012
- Chosen.prototype.choice_destroy_link_click = function(evt) {
1013
- evt.preventDefault();
1014
- evt.stopPropagation();
1015
- if (!this.is_disabled) {
1016
- return this.choice_destroy($(evt.target));
1017
- }
1018
- };
1019
-
1020
- Chosen.prototype.choice_destroy = function(link) {
1021
- if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1022
- this.show_search_field_default();
1023
- if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
1024
- this.results_hide();
1025
- }
1026
- link.parents('li').first().remove();
1027
- return this.search_field_scale();
1028
- }
1029
- };
1030
-
1031
- Chosen.prototype.results_reset = function() {
1032
- this.reset_single_select_options();
1033
- this.form_field.options[0].selected = true;
1034
- this.single_set_selected_text();
1035
- this.show_search_field_default();
1036
- this.results_reset_cleanup();
1037
- this.form_field_jq.trigger("change");
1038
- if (this.active_field) {
1039
- return this.results_hide();
1040
- }
1041
- };
1042
-
1043
- Chosen.prototype.results_reset_cleanup = function() {
1044
- this.current_selectedIndex = this.form_field.selectedIndex;
1045
- return this.selected_item.find("abbr").remove();
1046
- };
1047
-
1048
- Chosen.prototype.result_select = function(evt) {
1049
- var high, item;
1050
- if (this.result_highlight) {
1051
- high = this.result_highlight;
1052
- this.result_clear_highlight();
1053
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1054
- this.form_field_jq.trigger("chosen:maxselected", {
1055
- chosen: this
1056
- });
1057
- return false;
1058
- }
1059
- if (this.is_multiple) {
1060
- high.removeClass("active-result");
1061
- } else {
1062
- this.reset_single_select_options();
1063
- }
1064
- high.addClass("result-selected");
1065
- item = this.results_data[high[0].getAttribute("data-option-array-index")];
1066
- item.selected = true;
1067
- this.form_field.options[item.options_index].selected = true;
1068
- this.selected_option_count = null;
1069
- if (this.is_multiple) {
1070
- this.choice_build(item);
1071
- } else {
1072
- this.single_set_selected_text(this.choice_label(item));
1073
- }
1074
- if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1075
- this.results_hide();
1076
- }
1077
- this.show_search_field_default();
1078
- if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1079
- this.form_field_jq.trigger("change", {
1080
- 'selected': this.form_field.options[item.options_index].value
1081
- });
1082
- }
1083
- this.current_selectedIndex = this.form_field.selectedIndex;
1084
- evt.preventDefault();
1085
- return this.search_field_scale();
1086
- }
1087
- };
1088
-
1089
- Chosen.prototype.single_set_selected_text = function(text) {
1090
- if (text == null) {
1091
- text = this.default_text;
1092
- }
1093
- if (text === this.default_text) {
1094
- this.selected_item.addClass("chosen-default");
1095
- } else {
1096
- this.single_deselect_control_build();
1097
- this.selected_item.removeClass("chosen-default");
1098
- }
1099
- return this.selected_item.find("span").html(text);
1100
- };
1101
-
1102
- Chosen.prototype.result_deselect = function(pos) {
1103
- var result_data;
1104
- result_data = this.results_data[pos];
1105
- if (!this.form_field.options[result_data.options_index].disabled) {
1106
- result_data.selected = false;
1107
- this.form_field.options[result_data.options_index].selected = false;
1108
- this.selected_option_count = null;
1109
- this.result_clear_highlight();
1110
- if (this.results_showing) {
1111
- this.winnow_results();
1112
- }
1113
- this.form_field_jq.trigger("change", {
1114
- deselected: this.form_field.options[result_data.options_index].value
1115
- });
1116
- this.search_field_scale();
1117
- return true;
1118
- } else {
1119
- return false;
1120
- }
1121
- };
1122
-
1123
- Chosen.prototype.single_deselect_control_build = function() {
1124
- if (!this.allow_single_deselect) {
1125
- return;
1126
- }
1127
- if (!this.selected_item.find("abbr").length) {
1128
- this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1129
- }
1130
- return this.selected_item.addClass("chosen-single-with-deselect");
1131
- };
1132
-
1133
- Chosen.prototype.get_search_text = function() {
1134
- return $('<div/>').text($.trim(this.search_field.val())).html();
1135
- };
1136
-
1137
- Chosen.prototype.winnow_results_set_highlight = function() {
1138
- var do_high, selected_results;
1139
- selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1140
- do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1141
- if (do_high != null) {
1142
- return this.result_do_highlight(do_high);
1143
- }
1144
- };
1145
-
1146
- Chosen.prototype.no_results = function(terms) {
1147
- var no_results_html;
1148
- no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1149
- no_results_html.find("span").first().html(terms);
1150
- this.search_results.append(no_results_html);
1151
- return this.form_field_jq.trigger("chosen:no_results", {
1152
- chosen: this
1153
- });
1154
- };
1155
-
1156
- Chosen.prototype.no_results_clear = function() {
1157
- return this.search_results.find(".no-results").remove();
1158
- };
1159
-
1160
- Chosen.prototype.keydown_arrow = function() {
1161
- var next_sib;
1162
- if (this.results_showing && this.result_highlight) {
1163
- next_sib = this.result_highlight.nextAll("li.active-result").first();
1164
- if (next_sib) {
1165
- return this.result_do_highlight(next_sib);
1166
- }
1167
- } else {
1168
- return this.results_show();
1169
- }
1170
- };
1171
-
1172
- Chosen.prototype.keyup_arrow = function() {
1173
- var prev_sibs;
1174
- if (!this.results_showing && !this.is_multiple) {
1175
- return this.results_show();
1176
- } else if (this.result_highlight) {
1177
- prev_sibs = this.result_highlight.prevAll("li.active-result");
1178
- if (prev_sibs.length) {
1179
- return this.result_do_highlight(prev_sibs.first());
1180
- } else {
1181
- if (this.choices_count() > 0) {
1182
- this.results_hide();
1183
- }
1184
- return this.result_clear_highlight();
1185
- }
1186
- }
1187
- };
1188
-
1189
- Chosen.prototype.keydown_backstroke = function() {
1190
- var next_available_destroy;
1191
- if (this.pending_backstroke) {
1192
- this.choice_destroy(this.pending_backstroke.find("a").first());
1193
- return this.clear_backstroke();
1194
- } else {
1195
- next_available_destroy = this.search_container.siblings("li.search-choice").last();
1196
- if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1197
- this.pending_backstroke = next_available_destroy;
1198
- if (this.single_backstroke_delete) {
1199
- return this.keydown_backstroke();
1200
- } else {
1201
- return this.pending_backstroke.addClass("search-choice-focus");
1202
- }
1203
- }
1204
- }
1205
- };
1206
-
1207
- Chosen.prototype.clear_backstroke = function() {
1208
- if (this.pending_backstroke) {
1209
- this.pending_backstroke.removeClass("search-choice-focus");
1210
- }
1211
- return this.pending_backstroke = null;
1212
- };
1213
-
1214
- Chosen.prototype.keydown_checker = function(evt) {
1215
- var stroke, _ref1;
1216
- stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1217
- this.search_field_scale();
1218
- if (stroke !== 8 && this.pending_backstroke) {
1219
- this.clear_backstroke();
1220
- }
1221
- switch (stroke) {
1222
- case 8:
1223
- this.backstroke_length = this.search_field.val().length;
1224
- break;
1225
- case 9:
1226
- if (this.results_showing && !this.is_multiple) {
1227
- this.result_select(evt);
1228
- }
1229
- this.mouse_on_container = false;
1230
- break;
1231
- case 13:
1232
- if (this.results_showing) {
1233
- evt.preventDefault();
1234
- }
1235
- break;
1236
- case 32:
1237
- if (this.disable_search) {
1238
- evt.preventDefault();
1239
- }
1240
- break;
1241
- case 38:
1242
- evt.preventDefault();
1243
- this.keyup_arrow();
1244
- break;
1245
- case 40:
1246
- evt.preventDefault();
1247
- this.keydown_arrow();
1248
- break;
1249
- }
1250
- };
1251
-
1252
- Chosen.prototype.search_field_scale = function() {
1253
- var div, f_width, h, style, style_block, styles, w, _i, _len;
1254
- if (this.is_multiple) {
1255
- h = 0;
1256
- w = 0;
1257
- style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1258
- styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1259
- for (_i = 0, _len = styles.length; _i < _len; _i++) {
1260
- style = styles[_i];
1261
- style_block += style + ":" + this.search_field.css(style) + ";";
1262
- }
1263
- div = $('<div />', {
1264
- 'style': style_block
1265
- });
1266
- div.text(this.search_field.val());
1267
- $('body').append(div);
1268
- w = div.width() + 25;
1269
- div.remove();
1270
- f_width = this.container.outerWidth();
1271
- if (w > f_width - 10) {
1272
- w = f_width - 10;
1273
- }
1274
- return this.search_field.css({
1275
- 'width': w + 'px'
1276
- });
1277
- }
1278
- };
1279
-
1280
- return Chosen;
1281
-
1282
- })(AbstractChosen);
1283
-
1284
- }).call(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/lib/clipboard.js DELETED
@@ -1,736 +0,0 @@
1
- /*!
2
- * clipboard.js v1.5.9
3
- * https://zenorocha.github.io/clipboard.js
4
- *
5
- * Licensed MIT © Zeno Rocha
6
- */
7
- (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Clipboard = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
8
- var matches = require('matches-selector')
9
-
10
- module.exports = function (element, selector, checkYoSelf) {
11
- var parent = checkYoSelf ? element : element.parentNode
12
-
13
- while (parent && parent !== document) {
14
- if (matches(parent, selector)) return parent;
15
- parent = parent.parentNode
16
- }
17
- }
18
-
19
- },{"matches-selector":5}],2:[function(require,module,exports){
20
- var closest = require('closest');
21
-
22
- /**
23
- * Delegates event to a selector.
24
- *
25
- * @param {Element} element
26
- * @param {String} selector
27
- * @param {String} type
28
- * @param {Function} callback
29
- * @param {Boolean} useCapture
30
- * @return {Object}
31
- */
32
- function delegate(element, selector, type, callback, useCapture) {
33
- var listenerFn = listener.apply(this, arguments);
34
-
35
- element.addEventListener(type, listenerFn, useCapture);
36
-
37
- return {
38
- destroy: function() {
39
- element.removeEventListener(type, listenerFn, useCapture);
40
- }
41
- }
42
- }
43
-
44
- /**
45
- * Finds closest match and invokes callback.
46
- *
47
- * @param {Element} element
48
- * @param {String} selector
49
- * @param {String} type
50
- * @param {Function} callback
51
- * @return {Function}
52
- */
53
- function listener(element, selector, type, callback) {
54
- return function(e) {
55
- e.delegateTarget = closest(e.target, selector, true);
56
-
57
- if (e.delegateTarget) {
58
- callback.call(element, e);
59
- }
60
- }
61
- }
62
-
63
- module.exports = delegate;
64
-
65
- },{"closest":1}],3:[function(require,module,exports){
66
- /**
67
- * Check if argument is a HTML element.
68
- *
69
- * @param {Object} value
70
- * @return {Boolean}
71
- */
72
- exports.node = function(value) {
73
- return value !== undefined
74
- && value instanceof HTMLElement
75
- && value.nodeType === 1;
76
- };
77
-
78
- /**
79
- * Check if argument is a list of HTML elements.
80
- *
81
- * @param {Object} value
82
- * @return {Boolean}
83
- */
84
- exports.nodeList = function(value) {
85
- var type = Object.prototype.toString.call(value);
86
-
87
- return value !== undefined
88
- && (type === '[object NodeList]' || type === '[object HTMLCollection]')
89
- && ('length' in value)
90
- && (value.length === 0 || exports.node(value[0]));
91
- };
92
-
93
- /**
94
- * Check if argument is a string.
95
- *
96
- * @param {Object} value
97
- * @return {Boolean}
98
- */
99
- exports.string = function(value) {
100
- return typeof value === 'string'
101
- || value instanceof String;
102
- };
103
-
104
- /**
105
- * Check if argument is a function.
106
- *
107
- * @param {Object} value
108
- * @return {Boolean}
109
- */
110
- exports.fn = function(value) {
111
- var type = Object.prototype.toString.call(value);
112
-
113
- return type === '[object Function]';
114
- };
115
-
116
- },{}],4:[function(require,module,exports){
117
- var is = require('./is');
118
- var delegate = require('delegate');
119
-
120
- /**
121
- * Validates all params and calls the right
122
- * listener function based on its target type.
123
- *
124
- * @param {String|HTMLElement|HTMLCollection|NodeList} target
125
- * @param {String} type
126
- * @param {Function} callback
127
- * @return {Object}
128
- */
129
- function listen(target, type, callback) {
130
- if (!target && !type && !callback) {
131
- throw new Error('Missing required arguments');
132
- }
133
-
134
- if (!is.string(type)) {
135
- throw new TypeError('Second argument must be a String');
136
- }
137
-
138
- if (!is.fn(callback)) {
139
- throw new TypeError('Third argument must be a Function');
140
- }
141
-
142
- if (is.node(target)) {
143
- return listenNode(target, type, callback);
144
- }
145
- else if (is.nodeList(target)) {
146
- return listenNodeList(target, type, callback);
147
- }
148
- else if (is.string(target)) {
149
- return listenSelector(target, type, callback);
150
- }
151
- else {
152
- throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
153
- }
154
- }
155
-
156
- /**
157
- * Adds an event listener to a HTML element
158
- * and returns a remove listener function.
159
- *
160
- * @param {HTMLElement} node
161
- * @param {String} type
162
- * @param {Function} callback
163
- * @return {Object}
164
- */
165
- function listenNode(node, type, callback) {
166
- node.addEventListener(type, callback);
167
-
168
- return {
169
- destroy: function() {
170
- node.removeEventListener(type, callback);
171
- }
172
- }
173
- }
174
-
175
- /**
176
- * Add an event listener to a list of HTML elements
177
- * and returns a remove listener function.
178
- *
179
- * @param {NodeList|HTMLCollection} nodeList
180
- * @param {String} type
181
- * @param {Function} callback
182
- * @return {Object}
183
- */
184
- function listenNodeList(nodeList, type, callback) {
185
- Array.prototype.forEach.call(nodeList, function(node) {
186
- node.addEventListener(type, callback);
187
- });
188
-
189
- return {
190
- destroy: function() {
191
- Array.prototype.forEach.call(nodeList, function(node) {
192
- node.removeEventListener(type, callback);
193
- });
194
- }
195
- }
196
- }
197
-
198
- /**
199
- * Add an event listener to a selector
200
- * and returns a remove listener function.
201
- *
202
- * @param {String} selector
203
- * @param {String} type
204
- * @param {Function} callback
205
- * @return {Object}
206
- */
207
- function listenSelector(selector, type, callback) {
208
- return delegate(document.body, selector, type, callback);
209
- }
210
-
211
- module.exports = listen;
212
-
213
- },{"./is":3,"delegate":2}],5:[function(require,module,exports){
214
-
215
- /**
216
- * Element prototype.
217
- */
218
-
219
- var proto = Element.prototype;
220
-
221
- /**
222
- * Vendor function.
223
- */
224
-
225
- var vendor = proto.matchesSelector
226
- || proto.webkitMatchesSelector
227
- || proto.mozMatchesSelector
228
- || proto.msMatchesSelector
229
- || proto.oMatchesSelector;
230
-
231
- /**
232
- * Expose `match()`.
233
- */
234
-
235
- module.exports = match;
236
-
237
- /**
238
- * Match `el` to `selector`.
239
- *
240
- * @param {Element} el
241
- * @param {String} selector
242
- * @return {Boolean}
243
- * @api public
244
- */
245
-
246
- function match(el, selector) {
247
- if (vendor) return vendor.call(el, selector);
248
- var nodes = el.parentNode.querySelectorAll(selector);
249
- for (var i = 0; i < nodes.length; ++i) {
250
- if (nodes[i] == el) return true;
251
- }
252
- return false;
253
- }
254
- },{}],6:[function(require,module,exports){
255
- function select(element) {
256
- var selectedText;
257
-
258
- if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
259
- element.focus();
260
- element.setSelectionRange(0, element.value.length);
261
-
262
- selectedText = element.value;
263
- }
264
- else {
265
- if (element.hasAttribute('contenteditable')) {
266
- element.focus();
267
- }
268
-
269
- var selection = window.getSelection();
270
- var range = document.createRange();
271
-
272
- range.selectNodeContents(element);
273
- selection.removeAllRanges();
274
- selection.addRange(range);
275
-
276
- selectedText = selection.toString();
277
- }
278
-
279
- return selectedText;
280
- }
281
-
282
- module.exports = select;
283
-
284
- },{}],7:[function(require,module,exports){
285
- function E () {
286
- // Keep this empty so it's easier to inherit from
287
- // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
288
- }
289
-
290
- E.prototype = {
291
- on: function (name, callback, ctx) {
292
- var e = this.e || (this.e = {});
293
-
294
- (e[name] || (e[name] = [])).push({
295
- fn: callback,
296
- ctx: ctx
297
- });
298
-
299
- return this;
300
- },
301
-
302
- once: function (name, callback, ctx) {
303
- var self = this;
304
- function listener () {
305
- self.off(name, listener);
306
- callback.apply(ctx, arguments);
307
- };
308
-
309
- listener._ = callback
310
- return this.on(name, listener, ctx);
311
- },
312
-
313
- emit: function (name) {
314
- var data = [].slice.call(arguments, 1);
315
- var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
316
- var i = 0;
317
- var len = evtArr.length;
318
-
319
- for (i; i < len; i++) {
320
- evtArr[i].fn.apply(evtArr[i].ctx, data);
321
- }
322
-
323
- return this;
324
- },
325
-
326
- off: function (name, callback) {
327
- var e = this.e || (this.e = {});
328
- var evts = e[name];
329
- var liveEvents = [];
330
-
331
- if (evts && callback) {
332
- for (var i = 0, len = evts.length; i < len; i++) {
333
- if (evts[i].fn !== callback && evts[i].fn._ !== callback)
334
- liveEvents.push(evts[i]);
335
- }
336
- }
337
-
338
- // Remove event from queue to prevent memory leak
339
- // Suggested by https://github.com/lazd
340
- // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
341
-
342
- (liveEvents.length)
343
- ? e[name] = liveEvents
344
- : delete e[name];
345
-
346
- return this;
347
- }
348
- };
349
-
350
- module.exports = E;
351
-
352
- },{}],8:[function(require,module,exports){
353
- (function (global, factory) {
354
- if (typeof define === "function" && define.amd) {
355
- define(['module', 'select'], factory);
356
- } else if (typeof exports !== "undefined") {
357
- factory(module, require('select'));
358
- } else {
359
- var mod = {
360
- exports: {}
361
- };
362
- factory(mod, global.select);
363
- global.clipboardAction = mod.exports;
364
- }
365
- })(this, function (module, _select) {
366
- 'use strict';
367
-
368
- var _select2 = _interopRequireDefault(_select);
369
-
370
- function _interopRequireDefault(obj) {
371
- return obj && obj.__esModule ? obj : {
372
- default: obj
373
- };
374
- }
375
-
376
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
377
- return typeof obj;
378
- } : function (obj) {
379
- return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
380
- };
381
-
382
- function _classCallCheck(instance, Constructor) {
383
- if (!(instance instanceof Constructor)) {
384
- throw new TypeError("Cannot call a class as a function");
385
- }
386
- }
387
-
388
- var _createClass = function () {
389
- function defineProperties(target, props) {
390
- for (var i = 0; i < props.length; i++) {
391
- var descriptor = props[i];
392
- descriptor.enumerable = descriptor.enumerable || false;
393
- descriptor.configurable = true;
394
- if ("value" in descriptor) descriptor.writable = true;
395
- Object.defineProperty(target, descriptor.key, descriptor);
396
- }
397
- }
398
-
399
- return function (Constructor, protoProps, staticProps) {
400
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
401
- if (staticProps) defineProperties(Constructor, staticProps);
402
- return Constructor;
403
- };
404
- }();
405
-
406
- var ClipboardAction = function () {
407
- /**
408
- * @param {Object} options
409
- */
410
-
411
- function ClipboardAction(options) {
412
- _classCallCheck(this, ClipboardAction);
413
-
414
- this.resolveOptions(options);
415
- this.initSelection();
416
- }
417
-
418
- /**
419
- * Defines base properties passed from constructor.
420
- * @param {Object} options
421
- */
422
-
423
-
424
- ClipboardAction.prototype.resolveOptions = function resolveOptions() {
425
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
426
-
427
- this.action = options.action;
428
- this.emitter = options.emitter;
429
- this.target = options.target;
430
- this.text = options.text;
431
- this.trigger = options.trigger;
432
-
433
- this.selectedText = '';
434
- };
435
-
436
- ClipboardAction.prototype.initSelection = function initSelection() {
437
- if (this.text && this.target) {
438
- throw new Error('Multiple attributes declared, use either "target" or "text"');
439
- } else if (this.text) {
440
- this.selectFake();
441
- } else if (this.target) {
442
- this.selectTarget();
443
- } else {
444
- throw new Error('Missing required attributes, use either "target" or "text"');
445
- }
446
- };
447
-
448
- ClipboardAction.prototype.selectFake = function selectFake() {
449
- var _this = this;
450
-
451
- var isRTL = document.documentElement.getAttribute('dir') == 'rtl';
452
-
453
- this.removeFake();
454
-
455
- this.fakeHandler = document.body.addEventListener('click', function () {
456
- return _this.removeFake();
457
- });
458
-
459
- this.fakeElem = document.createElement('textarea');
460
- // Prevent zooming on iOS
461
- this.fakeElem.style.fontSize = '12pt';
462
- // Reset box model
463
- this.fakeElem.style.border = '0';
464
- this.fakeElem.style.padding = '0';
465
- this.fakeElem.style.margin = '0';
466
- // Move element out of screen horizontally
467
- this.fakeElem.style.position = 'fixed';
468
- this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';
469
- // Move element to the same position vertically
470
- this.fakeElem.style.top = (window.pageYOffset || document.documentElement.scrollTop) + 'px';
471
- this.fakeElem.setAttribute('readonly', '');
472
- this.fakeElem.value = this.text;
473
-
474
- document.body.appendChild(this.fakeElem);
475
-
476
- this.selectedText = (0, _select2.default)(this.fakeElem);
477
- this.copyText();
478
- };
479
-
480
- ClipboardAction.prototype.removeFake = function removeFake() {
481
- if (this.fakeHandler) {
482
- document.body.removeEventListener('click');
483
- this.fakeHandler = null;
484
- }
485
-
486
- if (this.fakeElem) {
487
- document.body.removeChild(this.fakeElem);
488
- this.fakeElem = null;
489
- }
490
- };
491
-
492
- ClipboardAction.prototype.selectTarget = function selectTarget() {
493
- this.selectedText = (0, _select2.default)(this.target);
494
- this.copyText();
495
- };
496
-
497
- ClipboardAction.prototype.copyText = function copyText() {
498
- var succeeded = undefined;
499
-
500
- try {
501
- succeeded = document.execCommand(this.action);
502
- } catch (err) {
503
- succeeded = false;
504
- }
505
-
506
- this.handleResult(succeeded);
507
- };
508
-
509
- ClipboardAction.prototype.handleResult = function handleResult(succeeded) {
510
- if (succeeded) {
511
- this.emitter.emit('success', {
512
- action: this.action,
513
- text: this.selectedText,
514
- trigger: this.trigger,
515
- clearSelection: this.clearSelection.bind(this)
516
- });
517
- } else {
518
- this.emitter.emit('error', {
519
- action: this.action,
520
- trigger: this.trigger,
521
- clearSelection: this.clearSelection.bind(this)
522
- });
523
- }
524
- };
525
-
526
- ClipboardAction.prototype.clearSelection = function clearSelection() {
527
- if (this.target) {
528
- this.target.blur();
529
- }
530
-
531
- window.getSelection().removeAllRanges();
532
- };
533
-
534
- ClipboardAction.prototype.destroy = function destroy() {
535
- this.removeFake();
536
- };
537
-
538
- _createClass(ClipboardAction, [{
539
- key: 'action',
540
- set: function set() {
541
- var action = arguments.length <= 0 || arguments[0] === undefined ? 'copy' : arguments[0];
542
-
543
- this._action = action;
544
-
545
- if (this._action !== 'copy' && this._action !== 'cut') {
546
- throw new Error('Invalid "action" value, use either "copy" or "cut"');
547
- }
548
- },
549
- get: function get() {
550
- return this._action;
551
- }
552
- }, {
553
- key: 'target',
554
- set: function set(target) {
555
- if (target !== undefined) {
556
- if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) {
557
- this._target = target;
558
- } else {
559
- throw new Error('Invalid "target" value, use a valid Element');
560
- }
561
- }
562
- },
563
- get: function get() {
564
- return this._target;
565
- }
566
- }]);
567
-
568
- return ClipboardAction;
569
- }();
570
-
571
- module.exports = ClipboardAction;
572
- });
573
-
574
- },{"select":6}],9:[function(require,module,exports){
575
- (function (global, factory) {
576
- if (typeof define === "function" && define.amd) {
577
- define(['module', './clipboard-action', 'tiny-emitter', 'good-listener'], factory);
578
- } else if (typeof exports !== "undefined") {
579
- factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener'));
580
- } else {
581
- var mod = {
582
- exports: {}
583
- };
584
- factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener);
585
- global.clipboard = mod.exports;
586
- }
587
- })(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) {
588
- 'use strict';
589
-
590
- var _clipboardAction2 = _interopRequireDefault(_clipboardAction);
591
-
592
- var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter);
593
-
594
- var _goodListener2 = _interopRequireDefault(_goodListener);
595
-
596
- function _interopRequireDefault(obj) {
597
- return obj && obj.__esModule ? obj : {
598
- default: obj
599
- };
600
- }
601
-
602
- function _classCallCheck(instance, Constructor) {
603
- if (!(instance instanceof Constructor)) {
604
- throw new TypeError("Cannot call a class as a function");
605
- }
606
- }
607
-
608
- function _possibleConstructorReturn(self, call) {
609
- if (!self) {
610
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
611
- }
612
-
613
- return call && (typeof call === "object" || typeof call === "function") ? call : self;
614
- }
615
-
616
- function _inherits(subClass, superClass) {
617
- if (typeof superClass !== "function" && superClass !== null) {
618
- throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
619
- }
620
-
621
- subClass.prototype = Object.create(superClass && superClass.prototype, {
622
- constructor: {
623
- value: subClass,
624
- enumerable: false,
625
- writable: true,
626
- configurable: true
627
- }
628
- });
629
- if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
630
- }
631
-
632
- var Clipboard = function (_Emitter) {
633
- _inherits(Clipboard, _Emitter);
634
-
635
- /**
636
- * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
637
- * @param {Object} options
638
- */
639
-
640
- function Clipboard(trigger, options) {
641
- _classCallCheck(this, Clipboard);
642
-
643
- var _this = _possibleConstructorReturn(this, _Emitter.call(this));
644
-
645
- _this.resolveOptions(options);
646
- _this.listenClick(trigger);
647
- return _this;
648
- }
649
-
650
- /**
651
- * Defines if attributes would be resolved using internal setter functions
652
- * or custom functions that were passed in the constructor.
653
- * @param {Object} options
654
- */
655
-
656
-
657
- Clipboard.prototype.resolveOptions = function resolveOptions() {
658
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
659
-
660
- this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
661
- this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
662
- this.text = typeof options.text === 'function' ? options.text : this.defaultText;
663
- };
664
-
665
- Clipboard.prototype.listenClick = function listenClick(trigger) {
666
- var _this2 = this;
667
-
668
- this.listener = (0, _goodListener2.default)(trigger, 'click', function (e) {
669
- return _this2.onClick(e);
670
- });
671
- };
672
-
673
- Clipboard.prototype.onClick = function onClick(e) {
674
- var trigger = e.delegateTarget || e.currentTarget;
675
-
676
- if (this.clipboardAction) {
677
- this.clipboardAction = null;
678
- }
679
-
680
- this.clipboardAction = new _clipboardAction2.default({
681
- action: this.action(trigger),
682
- target: this.target(trigger),
683
- text: this.text(trigger),
684
- trigger: trigger,
685
- emitter: this
686
- });
687
- };
688
-
689
- Clipboard.prototype.defaultAction = function defaultAction(trigger) {
690
- return getAttributeValue('action', trigger);
691
- };
692
-
693
- Clipboard.prototype.defaultTarget = function defaultTarget(trigger) {
694
- var selector = getAttributeValue('target', trigger);
695
-
696
- if (selector) {
697
- return document.querySelector(selector);
698
- }
699
- };
700
-
701
- Clipboard.prototype.defaultText = function defaultText(trigger) {
702
- return getAttributeValue('text', trigger);
703
- };
704
-
705
- Clipboard.prototype.destroy = function destroy() {
706
- this.listener.destroy();
707
-
708
- if (this.clipboardAction) {
709
- this.clipboardAction.destroy();
710
- this.clipboardAction = null;
711
- }
712
- };
713
-
714
- return Clipboard;
715
- }(_tinyEmitter2.default);
716
-
717
- /**
718
- * Helper function to retrieve attribute value.
719
- * @param {String} suffix
720
- * @param {Element} element
721
- */
722
- function getAttributeValue(suffix, element) {
723
- var attribute = 'data-clipboard-' + suffix;
724
-
725
- if (!element.hasAttribute(attribute)) {
726
- return;
727
- }
728
-
729
- return element.getAttribute(attribute);
730
- }
731
-
732
- module.exports = Clipboard;
733
- });
734
-
735
- },{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)
736
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/lib/codemirror.js DELETED
@@ -1,12 +0,0 @@
1
- // CodeMirror base.
2
- (function(a){if(typeof exports=="object"&&typeof module=="object"){module.exports=a()}else{if(typeof define=="function"&&define.amd){return define([],a)}else{this.CodeMirror=a()}}})(function(){var ce=/gecko\/\d/i.test(navigator.userAgent);var eo=/MSIE \d/.test(navigator.userAgent);var b1=eo&&(document.documentMode==null||document.documentMode<8);var bY=eo&&(document.documentMode==null||document.documentMode<9);var bX=eo&&(document.documentMode==null||document.documentMode<10);var by=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent);var dn=eo||by;var cJ=/WebKit\//.test(navigator.userAgent);var dr=cJ&&/Qt\/\d+\.\d+/.test(navigator.userAgent);var cV=/Chrome\//.test(navigator.userAgent);var dF=/Opera\//.test(navigator.userAgent);var ay=/Apple Computer/.test(navigator.vendor);var a1=/KHTML\//.test(navigator.userAgent);var cP=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);var e5=/PhantomJS/.test(navigator.userAgent);var eD=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var dS=eD||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);var bU=eD||/Mac/.test(navigator.platform);var aG=/win/i.test(navigator.platform);var aO=dF&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);if(aO){aO=Number(aO[1])}if(aO&&aO>=15){dF=false;cJ=true}var bF=bU&&(dr||dF&&(aO==null||aO<12.11));var fE=ce||(dn&&!bY);var fH=false,aX=false;function I(fO,fP){if(!(this instanceof I)){return new I(fO,fP)}this.options=fP=fP||{};aE(eF,fP,false);b4(fP);var fR=fP.value;if(typeof fR=="string"){fR=new ao(fR,fP.mode)}this.doc=fR;var fQ=this.display=new em(fO,fR);fQ.wrapper.CodeMirror=this;dO(this);cB(this);if(fP.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}if(fP.autofocus&&!dS){ed(this)}this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,focused:false,suppressEdits:false,pasteIncoming:false,cutIncoming:false,draggingText:false,highlight:new fM()};if(eo){setTimeout(cl(eZ,this,true),20)}fp(this);a8();var fN=this;cz(this,function(){fN.curOp.forceUpdate=true;dN(fN,fR);if((fP.autofocus&&!dS)||ds()==fQ.input){setTimeout(cl(cq,fN),20)}else{aL(fN)}for(var fT in a4){if(a4.hasOwnProperty(fT)){a4[fT](fN,fP[fT],b2)}}for(var fS=0;fS<aY.length;++fS){aY[fS](fN)}})}function em(fN,fP){var fQ=this;var fO=fQ.input=fw("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");if(cJ){fO.style.width="1000px"}else{fO.setAttribute("wrap","off")}if(eD){fO.style.border="1px solid black"}fO.setAttribute("autocorrect","off");fO.setAttribute("autocapitalize","off");fO.setAttribute("spellcheck","false");fQ.inputDiv=fw("div",[fO],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");fQ.scrollbarH=fw("div",[fw("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fQ.scrollbarV=fw("div",[fw("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");fQ.scrollbarFiller=fw("div",null,"CodeMirror-scrollbar-filler");fQ.gutterFiller=fw("div",null,"CodeMirror-gutter-filler");fQ.lineDiv=fw("div",null,"CodeMirror-code");fQ.selectionDiv=fw("div",null,null,"position: relative; z-index: 1");fQ.cursorDiv=fw("div",null,"CodeMirror-cursors");fQ.measure=fw("div",null,"CodeMirror-measure");fQ.lineMeasure=fw("div",null,"CodeMirror-measure");fQ.lineSpace=fw("div",[fQ.measure,fQ.lineMeasure,fQ.selectionDiv,fQ.cursorDiv,fQ.lineDiv],null,"position: relative; outline: none");fQ.mover=fw("div",[fw("div",[fQ.lineSpace],"CodeMirror-lines")],null,"position: relative");fQ.sizer=fw("div",[fQ.mover],"CodeMirror-sizer");fQ.heightForcer=fw("div",null,null,"position: absolute; height: "+ba+"px; width: 1px;");fQ.gutters=fw("div",null,"CodeMirror-gutters");fQ.lineGutter=null;fQ.scroller=fw("div",[fQ.sizer,fQ.heightForcer,fQ.gutters],"CodeMirror-scroll");fQ.scroller.setAttribute("tabIndex","-1");fQ.wrapper=fw("div",[fQ.inputDiv,fQ.scrollbarH,fQ.scrollbarV,fQ.scrollbarFiller,fQ.gutterFiller,fQ.scroller],"CodeMirror");if(b1){fQ.gutters.style.zIndex=-1;fQ.scroller.style.paddingRight=0}if(eD){fO.style.width="0px"}if(!cJ){fQ.scroller.draggable=true}if(a1){fQ.inputDiv.style.height="1px";fQ.inputDiv.style.position="absolute"}if(b1){fQ.scrollbarH.style.minHeight=fQ.scrollbarV.style.minWidth="18px"}if(fN.appendChild){fN.appendChild(fQ.wrapper)}else{fN(fQ.wrapper)}fQ.viewFrom=fQ.viewTo=fP.first;fQ.view=[];fQ.externalMeasured=null;fQ.viewOffset=0;fQ.lastSizeC=0;fQ.updateLineNumbers=null;fQ.lineNumWidth=fQ.lineNumInnerWidth=fQ.lineNumChars=null;fQ.prevInput="";fQ.alignWidgets=false;fQ.pollingFast=false;fQ.poll=new fM();fQ.cachedCharWidth=fQ.cachedTextHeight=fQ.cachedPaddingH=null;fQ.inaccurateSelection=false;fQ.maxLine=null;fQ.maxLineLength=0;fQ.maxLineChanged=false;fQ.wheelDX=fQ.wheelDY=fQ.wheelStartX=fQ.wheelStartY=null;fQ.shift=false;fQ.selForContextMenu=null}function bh(fN){fN.doc.mode=I.getMode(fN.options,fN.doc.modeOption);dX(fN)}function dX(fN){fN.doc.iter(function(fO){if(fO.stateAfter){fO.stateAfter=null}if(fO.styles){fO.styles=null}});fN.doc.frontier=fN.doc.first;dR(fN,100);fN.state.modeGen++;if(fN.curOp){af(fN)}}function ek(fN){if(fN.options.lineWrapping){fb(fN.display.wrapper,"CodeMirror-wrap");fN.display.sizer.style.minWidth=""}else{g(fN.display.wrapper,"CodeMirror-wrap");h(fN)}X(fN);af(fN);ai(fN);setTimeout(function(){eB(fN)},100)}function a3(fN){var fP=aN(fN.display),fO=fN.options.lineWrapping;var fQ=fO&&Math.max(5,fN.display.scroller.clientWidth/di(fN.display)-3);return function(fS){if(e7(fN.doc,fS)){return 0}var fR=0;if(fS.widgets){for(var fT=0;fT<fS.widgets.length;fT++){if(fS.widgets[fT].height){fR+=fS.widgets[fT].height}}}if(fO){return fR+(Math.ceil(fS.text.length/fQ)||1)*fP}else{return fR+fP}}}function X(fN){var fP=fN.doc,fO=a3(fN);fP.iter(function(fQ){var fR=fO(fQ);if(fR!=fQ.height){fA(fQ,fR)}})}function fK(fN){var fP=eK[fN.options.keyMap],fO=fP.style;fN.display.wrapper.className=fN.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(fO?" cm-keymap-"+fO:"")}function cB(fN){fN.display.wrapper.className=fN.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+fN.options.theme.replace(/(^|\s)\s*/g," cm-s-");ai(fN)}function db(fN){dO(fN);af(fN);setTimeout(function(){ei(fN)},20)}function dO(fN){var fO=fN.display.gutters,fS=fN.options.gutters;dE(fO);for(var fP=0;fP<fS.length;++fP){var fQ=fS[fP];var fR=fO.appendChild(fw("div",null,"CodeMirror-gutter "+fQ));if(fQ=="CodeMirror-linenumbers"){fN.display.lineGutter=fR;fR.style.width=(fN.display.lineNumWidth||1)+"px"}}fO.style.display=fP?"":"none";cN(fN)}function cN(fN){var fO=fN.display.gutters.offsetWidth;fN.display.sizer.style.marginLeft=fO+"px";fN.display.scrollbarH.style.left=fN.options.fixedGutter?fO+"px":0}function dY(fP){if(fP.height==0){return 0}var fO=fP.text.length,fN,fR=fP;while(fN=er(fR)){var fQ=fN.find(0,true);fR=fQ.from.line;fO+=fQ.from.ch-fQ.to.ch}fR=fP;while(fN=d7(fR)){var fQ=fN.find(0,true);fO-=fR.text.length-fQ.from.ch;fR=fQ.to.line;fO+=fR.text.length-fQ.to.ch}return fO}function h(fN){var fP=fN.display,fO=fN.doc;fP.maxLine=eP(fO,fO.first);fP.maxLineLength=dY(fP.maxLine);fP.maxLineChanged=true;fO.iter(function(fR){var fQ=dY(fR);if(fQ>fP.maxLineLength){fP.maxLineLength=fQ;fP.maxLine=fR}})}function b4(fN){var fO=c1(fN.gutters,"CodeMirror-linenumbers");if(fO==-1&&fN.lineNumbers){fN.gutters=fN.gutters.concat(["CodeMirror-linenumbers"])}else{if(fO>-1&&!fN.lineNumbers){fN.gutters=fN.gutters.slice(0);fN.gutters.splice(fO,1)}}}function df(fO){var fN=fO.display.scroller;return{clientHeight:fN.clientHeight,barHeight:fO.display.scrollbarV.clientHeight,scrollWidth:fN.scrollWidth,clientWidth:fN.clientWidth,barWidth:fO.display.scrollbarH.clientWidth,docHeight:Math.round(fO.doc.height+bx(fO.display))}}function eB(fN,fS){if(!fS){fS=df(fN)}var fU=fN.display;var fR=fS.docHeight+ba;var fT=fS.scrollWidth>fS.clientWidth;var fP=fR>fS.clientHeight;if(fP){fU.scrollbarV.style.display="block";fU.scrollbarV.style.bottom=fT?l(fU.measure)+"px":"0";fU.scrollbarV.firstChild.style.height=Math.max(0,fR-fS.clientHeight+(fS.barHeight||fU.scrollbarV.clientHeight))+"px"}else{fU.scrollbarV.style.display="";fU.scrollbarV.firstChild.style.height="0"}if(fT){fU.scrollbarH.style.display="block";fU.scrollbarH.style.right=fP?l(fU.measure)+"px":"0";fU.scrollbarH.firstChild.style.width=(fS.scrollWidth-fS.clientWidth+(fS.barWidth||fU.scrollbarH.clientWidth))+"px"}else{fU.scrollbarH.style.display="";fU.scrollbarH.firstChild.style.width="0"}if(fT&&fP){fU.scrollbarFiller.style.display="block";fU.scrollbarFiller.style.height=fU.scrollbarFiller.style.width=l(fU.measure)+"px"}else{fU.scrollbarFiller.style.display=""}if(fT&&fN.options.coverGutterNextToScrollbar&&fN.options.fixedGutter){fU.gutterFiller.style.display="block";fU.gutterFiller.style.height=l(fU.measure)+"px";fU.gutterFiller.style.width=fU.gutters.offsetWidth+"px"}else{fU.gutterFiller.style.display=""}if(!fN.state.checkedOverlayScrollbar&&fS.clientHeight>0){if(l(fU.measure)===0){var fO=bU&&!cP?"12px":"18px";fU.scrollbarV.style.minWidth=fU.scrollbarH.style.minHeight=fO;var fQ=function(fV){if(L(fV)!=fU.scrollbarV&&L(fV)!=fU.scrollbarH){cL(fN,d5)(fV)}};bM(fU.scrollbarV,"mousedown",fQ);bM(fU.scrollbarH,"mousedown",fQ)}fN.state.checkedOverlayScrollbar=true}}function bT(fP,fT,fV){var fQ=fV&&fV.top!=null?fV.top:fP.scroller.scrollTop;fQ=Math.floor(fQ-eI(fP));var fN=fV&&fV.bottom!=null?fV.bottom:fQ+fP.wrapper.clientHeight;var fR=bv(fT,fQ),fS=bv(fT,fN);if(fV&&fV.ensure){var fO=fV.ensure.from.line,fU=fV.ensure.to.line;if(fO<fR){return{from:fO,to:bv(fT,bB(eP(fT,fO))+fP.wrapper.clientHeight)}}if(Math.min(fU,fT.lastLine())>=fS){return{from:bv(fT,bB(eP(fT,fU))-fP.wrapper.clientHeight),to:fU}}}return{from:fR,to:fS}}function ei(fV){var fT=fV.display,fU=fT.view;if(!fT.alignWidgets&&(!fT.gutters.firstChild||!fV.options.fixedGutter)){return}var fR=dA(fT)-fT.scroller.scrollLeft+fV.doc.scrollLeft;var fN=fT.gutters.offsetWidth,fO=fR+"px";for(var fQ=0;fQ<fU.length;fQ++){if(!fU[fQ].hidden){if(fV.options.fixedGutter&&fU[fQ].gutter){fU[fQ].gutter.style.left=fO}var fS=fU[fQ].alignable;if(fS){for(var fP=0;fP<fS.length;fP++){fS[fP].style.left=fO}}}}if(fV.options.fixedGutter){fT.gutters.style.left=(fR+fN)+"px"}}function dI(fN){if(!fN.options.lineNumbers){return false}var fS=fN.doc,fO=d4(fN.options,fS.first+fS.size-1),fR=fN.display;if(fO.length!=fR.lineNumChars){var fT=fR.measure.appendChild(fw("div",[fw("div",fO)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var fP=fT.firstChild.offsetWidth,fQ=fT.offsetWidth-fP;fR.lineGutter.style.width="";fR.lineNumInnerWidth=Math.max(fP,fR.lineGutter.offsetWidth-fQ);fR.lineNumWidth=fR.lineNumInnerWidth+fQ;fR.lineNumChars=fR.lineNumInnerWidth?fO.length:-1;fR.lineGutter.style.width=fR.lineNumWidth+"px";cN(fN);return true}return false}function d4(fN,fO){return String(fN.lineNumberFormatter(fO+fN.firstLineNumber))}function dA(fN){return fN.scroller.getBoundingClientRect().left-fN.sizer.getBoundingClientRect().left}function dp(fS,fV,fW){var fU=fS.display.viewFrom,fT=fS.display.viewTo,fQ;var fN=bT(fS.display,fS.doc,fV);for(var fP=true;;fP=false){var fO=fS.display.scroller.clientWidth;if(!cZ(fS,fN,fW)){break}fQ=true;if(fS.display.maxLineChanged&&!fS.options.lineWrapping){b(fS)}var fR=df(fS);br(fS);de(fS,fR);eB(fS,fR);if(cJ&&fS.options.lineWrapping){fz(fS,fR)}if(fP&&fS.options.lineWrapping&&fO!=fS.display.scroller.clientWidth){fW=true;continue}fW=false;if(fV&&fV.top!=null){fV={top:Math.min(fR.docHeight-ba-fR.clientHeight,fV.top)}}fN=bT(fS.display,fS.doc,fV);if(fN.from>=fS.display.viewFrom&&fN.to<=fS.display.viewTo){break}}fS.display.updateLineNumbers=null;if(fQ){ac(fS,"update",fS);if(fS.display.viewFrom!=fU||fS.display.viewTo!=fT){ac(fS,"viewportChange",fS,fS.display.viewFrom,fS.display.viewTo)}}return fQ}function cZ(fX,fP,fY){var fR=fX.display,fW=fX.doc;if(!fR.wrapper.offsetWidth){d9(fX);return}if(!fY&&fP.from>=fR.viewFrom&&fP.to<=fR.viewTo&&cU(fX)==0){return}if(dI(fX)){d9(fX)}var fV=eM(fX);var fQ=fW.first+fW.size;var fU=Math.max(fP.from-fX.options.viewportMargin,fW.first);var fT=Math.min(fQ,fP.to+fX.options.viewportMargin);if(fR.viewFrom<fU&&fU-fR.viewFrom<20){fU=Math.max(fW.first,fR.viewFrom)}if(fR.viewTo>fT&&fR.viewTo-fT<20){fT=Math.min(fQ,fR.viewTo)}if(aX){fU=aM(fX.doc,fU);fT=dG(fX.doc,fT)}var fO=fU!=fR.viewFrom||fT!=fR.viewTo||fR.lastSizeC!=fR.wrapper.clientHeight;cD(fX,fU,fT);fR.viewOffset=bB(eP(fX.doc,fR.viewFrom));fX.display.mover.style.top=fR.viewOffset+"px";var fN=cU(fX);if(!fO&&fN==0&&!fY){return}var fS=ds();if(fN>4){fR.lineDiv.style.display="none"}cc(fX,fR.updateLineNumbers,fV);if(fN>4){fR.lineDiv.style.display=""}if(fS&&ds()!=fS&&fS.offsetHeight){fS.focus()}dE(fR.cursorDiv);dE(fR.selectionDiv);if(fO){fR.lastSizeC=fR.wrapper.clientHeight;dR(fX,400)}aZ(fX);return true}function b(fN){var fR=fN.display;var fP=dT(fN,fR.maxLine,fR.maxLine.text.length).left;fR.maxLineChanged=false;var fO=Math.max(0,fP+3);var fQ=Math.max(0,fR.sizer.offsetLeft+fO+ba-fR.scroller.clientWidth);fR.sizer.style.minWidth=fO+"px";if(fQ<fN.doc.scrollLeft){bt(fN,Math.min(fR.scroller.scrollLeft,fQ),true)}}function de(fN,fO){fN.display.sizer.style.minHeight=fN.display.heightForcer.style.top=fO.docHeight+"px";fN.display.gutters.style.height=Math.max(fO.docHeight,fO.clientHeight-ba)+"px"}function fz(fN,fO){if(fN.display.sizer.offsetWidth+fN.display.gutters.offsetWidth<fN.display.scroller.clientWidth-1){fN.display.sizer.style.minHeight=fN.display.heightForcer.style.top="0px";fN.display.gutters.style.height=fO.docHeight+"px"}}function aZ(fU){var fS=fU.display;var fO=fS.lineDiv.offsetTop;for(var fP=0;fP<fS.view.length;fP++){var fV=fS.view[fP],fW;if(fV.hidden){continue}if(b1){var fR=fV.node.offsetTop+fV.node.offsetHeight;fW=fR-fO;fO=fR}else{var fQ=fV.node.getBoundingClientRect();fW=fQ.bottom-fQ.top}var fT=fV.line.height-fW;if(fW<2){fW=aN(fS)}if(fT>0.001||fT<-0.001){fA(fV.line,fW);b0(fV.line);if(fV.rest){for(var fN=0;fN<fV.rest.length;fN++){b0(fV.rest[fN])}}}}}function b0(fN){if(fN.widgets){for(var fO=0;fO<fN.widgets.length;++fO){fN.widgets[fO].height=fN.widgets[fO].node.offsetHeight}}}function eM(fN){var fR=fN.display,fQ={},fP={};for(var fS=fR.gutters.firstChild,fO=0;fS;fS=fS.nextSibling,++fO){fQ[fN.options.gutters[fO]]=fS.offsetLeft;fP[fN.options.gutters[fO]]=fS.offsetWidth}return{fixedPos:dA(fR),gutterTotalWidth:fR.gutters.offsetWidth,gutterLeft:fQ,gutterWidth:fP,wrapperWidth:fR.wrapper.clientWidth}}function cc(fY,fP,fX){var fU=fY.display,f0=fY.options.lineNumbers;var fN=fU.lineDiv,fZ=fN.firstChild;function fT(f2){var f1=f2.nextSibling;if(cJ&&bU&&fY.display.currentWheelTarget==f2){f2.style.display="none"}else{f2.parentNode.removeChild(f2)}return f1}var fV=fU.view,fS=fU.viewFrom;for(var fQ=0;fQ<fV.length;fQ++){var fR=fV[fQ];if(fR.hidden){}else{if(!fR.node){var fO=aA(fY,fR,fS,fX);fN.insertBefore(fO,fZ)}else{while(fZ!=fR.node){fZ=fT(fZ)}var fW=f0&&fP!=null&&fP<=fS&&fR.lineNumber;if(fR.changes){if(c1(fR.changes,"gutter")>-1){fW=false}Z(fY,fR,fS,fX)}if(fW){dE(fR.lineNumber);fR.lineNumber.appendChild(document.createTextNode(d4(fY.options,fS)))}fZ=fR.node.nextSibling}}fS+=fR.size}while(fZ){fZ=fT(fZ)}}function Z(fN,fP,fR,fS){for(var fO=0;fO<fP.changes.length;fO++){var fQ=fP.changes[fO];if(fQ=="text"){eV(fN,fP)}else{if(fQ=="gutter"){cY(fN,fP,fR,fS)}else{if(fQ=="class"){dl(fP)}else{if(fQ=="widget"){al(fP,fS)}}}}}fP.changes=null}function fi(fN){if(fN.node==fN.text){fN.node=fw("div",null,null,"position: relative");if(fN.text.parentNode){fN.text.parentNode.replaceChild(fN.node,fN.text)}fN.node.appendChild(fN.text);if(b1){fN.node.style.zIndex=2}}return fN.node}function d6(fO){var fN=fO.bgClass?fO.bgClass+" "+(fO.line.bgClass||""):fO.line.bgClass;if(fN){fN+=" CodeMirror-linebackground"}if(fO.background){if(fN){fO.background.className=fN}else{fO.background.parentNode.removeChild(fO.background);fO.background=null}}else{if(fN){var fP=fi(fO);fO.background=fP.insertBefore(fw("div",null,fN),fP.firstChild)}}}function dy(fN,fO){var fP=fN.display.externalMeasured;if(fP&&fP.line==fO.line){fN.display.externalMeasured=null;fO.measure=fP.measure;return fP.built}return ev(fN,fO)}function eV(fN,fQ){var fO=fQ.text.className;var fP=dy(fN,fQ);if(fQ.text==fQ.node){fQ.node=fP.pre}fQ.text.parentNode.replaceChild(fP.pre,fQ.text);fQ.text=fP.pre;if(fP.bgClass!=fQ.bgClass||fP.textClass!=fQ.textClass){fQ.bgClass=fP.bgClass;fQ.textClass=fP.textClass;dl(fQ)}else{if(fO){fQ.text.className=fO}}}function dl(fO){d6(fO);if(fO.line.wrapClass){fi(fO).className=fO.line.wrapClass}else{if(fO.node!=fO.text){fO.node.className=""}}var fN=fO.textClass?fO.textClass+" "+(fO.line.textClass||""):fO.line.textClass;fO.text.className=fN||""}function cY(fV,fT,fS,fU){if(fT.gutter){fT.node.removeChild(fT.gutter);fT.gutter=null}var fQ=fT.line.gutterMarkers;if(fV.options.lineNumbers||fQ){var fO=fi(fT);var fR=fT.gutter=fO.insertBefore(fw("div",null,"CodeMirror-gutter-wrapper","position: absolute; left: "+(fV.options.fixedGutter?fU.fixedPos:-fU.gutterTotalWidth)+"px"),fT.text);if(fV.options.lineNumbers&&(!fQ||!fQ["CodeMirror-linenumbers"])){fT.lineNumber=fR.appendChild(fw("div",d4(fV.options,fS),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fU.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+fV.display.lineNumInnerWidth+"px"))}if(fQ){for(var fP=0;fP<fV.options.gutters.length;++fP){var fN=fV.options.gutters[fP],fW=fQ.hasOwnProperty(fN)&&fQ[fN];if(fW){fR.appendChild(fw("div",[fW],"CodeMirror-gutter-elt","left: "+fU.gutterLeft[fN]+"px; width: "+fU.gutterWidth[fN]+"px"))}}}}}function al(fN,fQ){if(fN.alignable){fN.alignable=null}for(var fP=fN.node.firstChild,fO;fP;fP=fO){var fO=fP.nextSibling;if(fP.className=="CodeMirror-linewidget"){fN.node.removeChild(fP)}}e4(fN,fQ)}function aA(fN,fP,fQ,fR){var fO=dy(fN,fP);fP.text=fP.node=fO.pre;if(fO.bgClass){fP.bgClass=fO.bgClass}if(fO.textClass){fP.textClass=fO.textClass}dl(fP);cY(fN,fP,fQ,fR);e4(fP,fR);return fP.node}function e4(fO,fP){fB(fO.line,fO,fP,true);if(fO.rest){for(var fN=0;fN<fO.rest.length;fN++){fB(fO.rest[fN],fO,fP,false)}}}function fB(fV,fS,fU,fQ){if(!fV.widgets){return}var fN=fi(fS);for(var fP=0,fT=fV.widgets;fP<fT.length;++fP){var fR=fT[fP],fO=fw("div",[fR.node],"CodeMirror-linewidget");if(!fR.handleMouseEvents){fO.ignoreEvents=true}bu(fR,fO,fS,fU);if(fQ&&fR.above){fN.insertBefore(fO,fS.gutter||fS.text)}else{fN.appendChild(fO)}ac(fR,"redraw")}}function bu(fQ,fP,fN,fR){if(fQ.noHScroll){(fN.alignable||(fN.alignable=[])).push(fP);var fO=fR.wrapperWidth;fP.style.left=fR.fixedPos+"px";if(!fQ.coverGutter){fO-=fR.gutterTotalWidth;fP.style.paddingLeft=fR.gutterTotalWidth+"px"}fP.style.width=fO+"px"}if(fQ.coverGutter){fP.style.zIndex=5;fP.style.position="relative";if(!fQ.noHScroll){fP.style.marginLeft=-fR.gutterTotalWidth+"px"}}}var W=I.Pos=function(fN,fO){if(!(this instanceof W)){return new W(fN,fO)}this.line=fN;this.ch=fO};var b5=I.cmpPos=function(fO,fN){return fO.line-fN.line||fO.ch-fN.ch};function b9(fN){return W(fN.line,fN.ch)}function bn(fO,fN){return b5(fO,fN)<0?fN:fO}function am(fO,fN){return b5(fO,fN)<0?fO:fN}function fx(fN,fO){this.ranges=fN;this.primIndex=fO}fx.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(fN){if(fN==this){return true}if(fN.primIndex!=this.primIndex||fN.ranges.length!=this.ranges.length){return false}for(var fP=0;fP<this.ranges.length;fP++){var fO=this.ranges[fP],fQ=fN.ranges[fP];if(b5(fO.anchor,fQ.anchor)!=0||b5(fO.head,fQ.head)!=0){return false}}return true},deepCopy:function(){for(var fN=[],fO=0;fO<this.ranges.length;fO++){fN[fO]=new dB(b9(this.ranges[fO].anchor),b9(this.ranges[fO].head))}return new fx(fN,this.primIndex)},somethingSelected:function(){for(var fN=0;fN<this.ranges.length;fN++){if(!this.ranges[fN].empty()){return true}}return false},contains:function(fQ,fN){if(!fN){fN=fQ}for(var fP=0;fP<this.ranges.length;fP++){var fO=this.ranges[fP];if(b5(fN,fO.from())>=0&&b5(fQ,fO.to())<=0){return fP}}return -1}};function dB(fN,fO){this.anchor=fN;this.head=fO}dB.prototype={from:function(){return am(this.anchor,this.head)},to:function(){return bn(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};function cm(fN,fU){var fP=fN[fU];fN.sort(function(fX,fW){return b5(fX.from(),fW.from())});fU=c1(fN,fP);for(var fR=1;fR<fN.length;fR++){var fV=fN[fR],fO=fN[fR-1];if(b5(fO.to(),fV.from())>=0){var fS=am(fO.from(),fV.from()),fT=bn(fO.to(),fV.to());var fQ=fO.empty()?fV.from()==fV.head:fO.from()==fO.head;if(fR<=fU){--fU}fN.splice(--fR,2,new dB(fQ?fT:fS,fQ?fS:fT))}}return new fx(fN,fU)}function eu(fN,fO){return new fx([new dB(fN,fO||fN)],0)}function cO(fN,fO){return Math.max(fN.first,Math.min(fO,fN.first+fN.size-1))}function fj(fO,fP){if(fP.line<fO.first){return W(fO.first,0)}var fN=fO.first+fO.size-1;if(fP.line>fN){return W(fN,eP(fO,fN).text.length)}return e3(fP,eP(fO,fP.line).text.length)}function e3(fP,fO){var fN=fP.ch;if(fN==null||fN>fO){return W(fP.line,fO)}else{if(fN<0){return W(fP.line,0)}else{return fP}}}function bW(fO,fN){return fN>=fO.first&&fN<fO.first+fO.size}function dC(fP,fQ){for(var fN=[],fO=0;fO<fQ.length;fO++){fN[fO]=fj(fP,fQ[fO])}return fN}function e6(fS,fO,fR,fN){if(fS.cm&&fS.cm.display.shift||fS.extend){var fQ=fO.anchor;if(fN){var fP=b5(fR,fQ)<0;if(fP!=(b5(fN,fQ)<0)){fQ=fR;fR=fN}else{if(fP!=(b5(fR,fN)<0)){fR=fN}}}return new dB(fQ,fR)}else{return new dB(fN||fR,fR)}}function ft(fQ,fP,fN,fO){bJ(fQ,new fx([e6(fQ,fQ.sel.primary(),fP,fN)],0),fO)}function at(fS,fR,fP){for(var fO=[],fQ=0;fQ<fS.sel.ranges.length;fQ++){fO[fQ]=e6(fS,fS.sel.ranges[fQ],fR[fQ],null)}var fN=cm(fO,fS.sel.primIndex);bJ(fS,fN,fP)}function f(fR,fQ,fO,fP){var fN=fR.sel.ranges.slice(0);fN[fQ]=fO;bJ(fR,cm(fN,fR.sel.primIndex),fP)}function G(fQ,fO,fP,fN){bJ(fQ,eu(fO,fP),fN)}function d(fP,fN){var fO={ranges:fN.ranges,update:function(fQ){this.ranges=[];for(var fR=0;fR<fQ.length;fR++){this.ranges[fR]=new dB(fj(fP,fQ[fR].anchor),fj(fP,fQ[fR].head))}}};az(fP,"beforeSelectionChange",fP,fO);if(fP.cm){az(fP.cm,"beforeSelectionChange",fP.cm,fO)}if(fO.ranges!=fN.ranges){return cm(fO.ranges,fO.ranges.length-1)}else{return fN}}function eH(fR,fQ,fO){var fN=fR.history.done,fP=fh(fN);if(fP&&fP.ranges){fN[fN.length-1]=fQ;d1(fR,fQ,fO)}else{bJ(fR,fQ,fO)}}function bJ(fP,fO,fN){d1(fP,fO,fN);fG(fP,fP.sel,fP.cm?fP.cm.curOp.id:NaN,fN)}function d1(fQ,fP,fO){if(eS(fQ,"beforeSelectionChange")||fQ.cm&&eS(fQ.cm,"beforeSelectionChange")){fP=d(fQ,fP)}var fN=b5(fP.primary().head,fQ.sel.primary().head)<0?-1:1;cS(fQ,o(fQ,fP,fN,true));if(!(fO&&fO.scroll===false)&&fQ.cm){fg(fQ.cm)}}function cS(fO,fN){if(fN.equals(fO.sel)){return}fO.sel=fN;if(fO.cm){fO.cm.curOp.updateInput=fO.cm.curOp.selectionChanged=true;V(fO.cm)}ac(fO,"cursorActivity",fO)}function ea(fN){cS(fN,o(fN,fN.sel,null,false),Y)}function o(fV,fN,fS,fT){var fP;for(var fQ=0;fQ<fN.ranges.length;fQ++){var fR=fN.ranges[fQ];var fU=bK(fV,fR.anchor,fS,fT);var fO=bK(fV,fR.head,fS,fT);if(fP||fU!=fR.anchor||fO!=fR.head){if(!fP){fP=fN.ranges.slice(0,fQ)}fP[fQ]=new dB(fU,fO)}}return fP?cm(fP,fN.primIndex):fN}function bK(fW,fV,fS,fT){var fX=false,fP=fV;var fQ=fS||1;fW.cantEdit=false;search:for(;;){var fY=eP(fW,fP.line);if(fY.markedSpans){for(var fR=0;fR<fY.markedSpans.length;++fR){var fN=fY.markedSpans[fR],fO=fN.marker;if((fN.from==null||(fO.inclusiveLeft?fN.from<=fP.ch:fN.from<fP.ch))&&(fN.to==null||(fO.inclusiveRight?fN.to>=fP.ch:fN.to>fP.ch))){if(fT){az(fO,"beforeCursorEnter");if(fO.explicitlyCleared){if(!fY.markedSpans){break}else{--fR;continue}}}if(!fO.atomic){continue}var fU=fO.find(fQ<0?-1:1);if(b5(fU,fP)==0){fU.ch+=fQ;if(fU.ch<0){if(fU.line>fW.first){fU=fj(fW,W(fU.line-1))}else{fU=null}}else{if(fU.ch>fY.text.length){if(fU.line<fW.first+fW.size-1){fU=W(fU.line+1,0)}else{fU=null}}}if(!fU){if(fX){if(!fT){return bK(fW,fV,fS,true)}fW.cantEdit=true;return W(fW.first,0)}fX=true;fU=fV;fQ=-fQ}}fP=fU;continue search}}}return fP}}function br(fZ){var fU=fZ.display,fY=fZ.doc;var fW=document.createDocumentFragment();var fQ=document.createDocumentFragment();for(var fS=0;fS<fY.sel.ranges.length;fS++){var fT=fY.sel.ranges[fS];var fR=fT.empty();if(fR||fZ.options.showCursorWhenSelecting){B(fZ,fT,fW)}if(!fR){bs(fZ,fT,fQ)}}if(fZ.options.moveInputWithCursor){var fV=dx(fZ,fY.sel.primary().head,"div");var fN=fU.wrapper.getBoundingClientRect(),fP=fU.lineDiv.getBoundingClientRect();var fX=Math.max(0,Math.min(fU.wrapper.clientHeight-10,fV.top+fP.top-fN.top));var fO=Math.max(0,Math.min(fU.wrapper.clientWidth-10,fV.left+fP.left-fN.left));fU.inputDiv.style.top=fX+"px";fU.inputDiv.style.left=fO+"px"}bG(fU.cursorDiv,fW);bG(fU.selectionDiv,fQ)}function B(fN,fQ,fP){var fS=dx(fN,fQ.head,"div");var fR=fP.appendChild(fw("div","\u00a0","CodeMirror-cursor"));fR.style.left=fS.left+"px";fR.style.top=fS.top+"px";fR.style.height=Math.max(0,fS.bottom-fS.top)*fN.options.cursorHeight+"px";if(fS.other){var fO=fP.appendChild(fw("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"));fO.style.display="";fO.style.left=fS.other.left+"px";fO.style.top=fS.other.top+"px";fO.style.height=(fS.other.bottom-fS.other.top)*0.85+"px"}}function bs(fR,fX,fS){var f0=fR.display,f4=fR.doc;var fN=document.createDocumentFragment();var fW=eG(fR.display),fQ=fW.left,f1=f0.lineSpace.offsetWidth-fW.right;function fY(f8,f7,f6,f5){if(f7<0){f7=0}f7=Math.round(f7);f5=Math.round(f5);fN.appendChild(fw("div",null,"CodeMirror-selected","position: absolute; left: "+f8+"px; top: "+f7+"px; width: "+(f6==null?f1-f8:f6)+"px; height: "+(f5-f7)+"px"))}function fO(f6,f8,gb){var f7=eP(f4,f6);var f9=f7.text.length;var gc,f5;function ga(ge,gd){return cx(fR,W(f6,ge),"div",f7,gd)}dH(a(f7),f8||0,gb==null?f9:gb,function(gk,gj,gd){var gg=ga(gk,"left"),gh,gi,gf;if(gk==gj){gh=gg;gi=gf=gg.left}else{gh=ga(gj-1,"right");if(gd=="rtl"){var ge=gg;gg=gh;gh=ge}gi=gg.left;gf=gh.right}if(f8==null&&gk==0){gi=fQ}if(gh.top-gg.top>3){fY(gi,gg.top,null,gg.bottom);gi=fQ;if(gg.bottom<gh.top){fY(gi,gg.bottom,null,gh.top)}}if(gb==null&&gj==f9){gf=f1}if(!gc||gg.top<gc.top||gg.top==gc.top&&gg.left<gc.left){gc=gg}if(!f5||gh.bottom>f5.bottom||gh.bottom==f5.bottom&&gh.right>f5.right){f5=gh}if(gi<fQ+1){gi=fQ}fY(gi,gh.top,gf-gi,gh.bottom)});return{start:gc,end:f5}}var f3=fX.from(),f2=fX.to();if(f3.line==f2.line){fO(f3.line,f3.ch,f2.ch)}else{var fP=eP(f4,f3.line),fU=eP(f4,f2.line);var fT=z(fP)==z(fU);var fV=fO(f3.line,f3.ch,fT?fP.text.length+1:null).end;var fZ=fO(f2.line,fT?0:null,f2.ch).start;if(fT){if(fV.top<fZ.top-2){fY(fV.right,fV.top,null,fV.bottom);fY(fQ,fZ.top,fZ.left,fZ.bottom)}else{fY(fV.right,fV.top,fZ.left-fV.right,fV.bottom)}}if(fV.bottom<fZ.top){fY(fQ,fV.bottom,null,fZ.top)}}fS.appendChild(fN)}function p(fN){if(!fN.state.focused){return}var fP=fN.display;clearInterval(fP.blinker);var fO=true;fP.cursorDiv.style.visibility="";if(fN.options.cursorBlinkRate>0){fP.blinker=setInterval(function(){fP.cursorDiv.style.visibility=(fO=!fO)?"":"hidden"},fN.options.cursorBlinkRate)}}function dR(fN,fO){if(fN.doc.mode.startState&&fN.doc.frontier<fN.display.viewTo){fN.state.highlight.set(fO,cl(cC,fN))}}function cC(fN){var fQ=fN.doc;if(fQ.frontier<fQ.first){fQ.frontier=fQ.first}if(fQ.frontier>=fN.display.viewTo){return}var fO=+new Date+fN.options.workTime;var fP=bR(fQ.mode,dg(fN,fQ.frontier));cz(fN,function(){fQ.iter(fQ.frontier,Math.min(fQ.first+fQ.size,fN.display.viewTo+500),function(fR){if(fQ.frontier>=fN.display.viewFrom){var fT=fR.styles;var fU=fa(fN,fR,fP,true);fR.styles=fU.styles;if(fU.classes){fR.styleClasses=fU.classes}else{if(fR.styleClasses){fR.styleClasses=null}}var fV=!fT||fT.length!=fR.styles.length;for(var fS=0;!fV&&fS<fT.length;++fS){fV=fT[fS]!=fR.styles[fS]}if(fV){R(fN,fQ.frontier,"text")}fR.stateAfter=bR(fQ.mode,fP)}else{dc(fN,fR.text,fP);fR.stateAfter=fQ.frontier%5==0?bR(fQ.mode,fP):null}++fQ.frontier;if(+new Date>fO){dR(fN,fN.options.workDelay);return true}})})}function co(fT,fN,fQ){var fO,fR,fS=fT.doc;var fP=fQ?-1:fN-(fT.doc.mode.innerMode?1000:100);for(var fW=fN;fW>fP;--fW){if(fW<=fS.first){return fS.first}var fV=eP(fS,fW-1);if(fV.stateAfter&&(!fQ||fW<=fS.frontier)){return fW}var fU=bI(fV.text,null,fT.options.tabSize);if(fR==null||fO>fU){fR=fW-1;fO=fU}}return fR}function dg(fN,fT,fO){var fR=fN.doc,fQ=fN.display;if(!fR.mode.startState){return true}var fS=co(fN,fT,fO),fP=fS>fR.first&&eP(fR,fS-1).stateAfter;if(!fP){fP=bP(fR.mode)}else{fP=bR(fR.mode,fP)}fR.iter(fS,fT,function(fU){dc(fN,fU.text,fP);var fV=fS==fT-1||fS%5==0||fS>=fQ.viewFrom&&fS<fQ.viewTo;fU.stateAfter=fV?bR(fR.mode,fP):null;++fS});if(fO){fR.frontier=fS}return fP}function eI(fN){return fN.lineSpace.offsetTop}function bx(fN){return fN.mover.offsetHeight-fN.lineSpace.offsetHeight}function eG(fQ){if(fQ.cachedPaddingH){return fQ.cachedPaddingH}var fP=bG(fQ.measure,fw("pre","x"));var fN=window.getComputedStyle?window.getComputedStyle(fP):fP.currentStyle;var fO={left:parseInt(fN.paddingLeft),right:parseInt(fN.paddingRight)};if(!isNaN(fO.left)&&!isNaN(fO.right)){fQ.cachedPaddingH=fO}return fO}function b8(fU,fQ,fT){var fP=fU.options.lineWrapping;var fR=fP&&fU.display.scroller.clientWidth;if(!fQ.measure.heights||fP&&fQ.measure.width!=fR){var fS=fQ.measure.heights=[];if(fP){fQ.measure.width=fR;var fW=fQ.text.firstChild.getClientRects();for(var fN=0;fN<fW.length-1;fN++){var fV=fW[fN],fO=fW[fN+1];if(Math.abs(fV.bottom-fO.bottom)>2){fS.push((fV.bottom+fO.top)/2-fT.top)}}}fS.push(fT.bottom-fT.top)}}function cj(fP,fN,fQ){if(fP.line==fN){return{map:fP.measure.map,cache:fP.measure.cache}}for(var fO=0;fO<fP.rest.length;fO++){if(fP.rest[fO]==fN){return{map:fP.measure.maps[fO],cache:fP.measure.caches[fO]}}}for(var fO=0;fO<fP.rest.length;fO++){if(bC(fP.rest[fO])>fQ){return{map:fP.measure.maps[fO],cache:fP.measure.caches[fO],before:true}}}}function cK(fN,fP){fP=z(fP);var fR=bC(fP);var fO=fN.display.externalMeasured=new bl(fN.doc,fP,fR);fO.lineN=fR;var fQ=fO.built=ev(fN,fO);fO.text=fQ.pre;bG(fN.display.lineMeasure,fQ.pre);return fO}function dT(fN,fO,fQ,fP){return D(fN,aU(fN,fO),fQ,fP)}function eL(fN,fP){if(fP>=fN.display.viewFrom&&fP<fN.display.viewTo){return fN.display.view[c7(fN,fP)]}var fO=fN.display.externalMeasured;if(fO&&fP>=fO.lineN&&fP<fO.lineN+fO.size){return fO}}function aU(fN,fP){var fQ=bC(fP);var fO=eL(fN,fQ);if(fO&&!fO.text){fO=null}else{if(fO&&fO.changes){Z(fN,fO,fQ,eM(fN))}}if(!fO){fO=cK(fN,fP)}var fR=cj(fO,fP,fQ);return{line:fP,view:fO,rect:null,map:fR.map,cache:fR.cache,before:fR.before,hasHeights:false}}function D(fN,fS,fQ,fO){if(fS.before){fQ=-1}var fP=fQ+(fO||""),fR;if(fS.cache.hasOwnProperty(fP)){fR=fS.cache[fP]}else{if(!fS.rect){fS.rect=fS.view.text.getBoundingClientRect()}if(!fS.hasHeights){b8(fN,fS.view,fS.rect);fS.hasHeights=true}fR=k(fN,fS,fQ,fO);if(!fR.bogus){fS.cache[fP]=fR}}return{left:fR.left,right:fR.right,top:fR.top,bottom:fR.bottom}}var ee={left:0,right:0,top:0,bottom:0};function k(fU,f2,fW,fS){var f5=f2.map;var fZ,fR,fQ,fN;for(var f1=0;f1<f5.length;f1+=3){var f4=f5[f1],f0=f5[f1+1];if(fW<f4){fR=0;fQ=1;fN="left"}else{if(fW<f0){fR=fW-f4;fQ=fR+1}else{if(f1==f5.length-3||fW==f0&&f5[f1+3]>fW){fQ=f0-f4;fR=fQ-1;if(fW>=f0){fN="right"}}}}if(fR!=null){fZ=f5[f1+2];if(f4==f0&&fS==(fZ.insertLeft?"left":"right")){fN=fS}if(fS=="left"&&fR==0){while(f1&&f5[f1-2]==f5[f1-3]&&f5[f1-1].insertLeft){fZ=f5[(f1-=3)+2];fN="left"}}if(fS=="right"&&fR==f0-f4){while(f1<f5.length-3&&f5[f1+3]==f5[f1+4]&&!f5[f1+5].insertLeft){fZ=f5[(f1+=3)+2];fN="right"}}break}}var fO;if(fZ.nodeType==3){while(fR&&e0(f2.line.text.charAt(f4+fR))){--fR}while(f4+fQ<f0&&e0(f2.line.text.charAt(f4+fQ))){++fQ}if(bY&&fR==0&&fQ==f0-f4){fO=fZ.parentNode.getBoundingClientRect()}else{if(dn&&fU.options.lineWrapping){var fP=cb(fZ,fR,fQ).getClientRects();if(fP.length){fO=fP[fS=="right"?fP.length-1:0]}else{fO=ee}}else{fO=cb(fZ,fR,fQ).getBoundingClientRect()||ee}}}else{if(fR>0){fN=fS="right"}var fP;if(fU.options.lineWrapping&&(fP=fZ.getClientRects()).length>1){fO=fP[fS=="right"?fP.length-1:0]}else{fO=fZ.getBoundingClientRect()}}if(bY&&!fR&&(!fO||!fO.left&&!fO.right)){var fT=fZ.parentNode.getClientRects()[0];if(fT){fO={left:fT.left,right:fT.left+di(fU.display),top:fT.top,bottom:fT.bottom}}else{fO=ee}}var fY,fX=(fO.bottom+fO.top)/2-f2.rect.top;var f3=f2.view.measure.heights;for(var f1=0;f1<f3.length-1;f1++){if(fX<f3[f1]){break}}fY=f1?f3[f1-1]:0;fX=f3[f1];var fV={left:(fN=="right"?fO.right:fO.left)-f2.rect.left,right:(fN=="left"?fO.left:fO.right)-f2.rect.left,top:fY,bottom:fX};if(!fO.left&&!fO.right){fV.bogus=true}return fV}function ap(fO){if(fO.measure){fO.measure.cache={};fO.measure.heights=null;if(fO.rest){for(var fN=0;fN<fO.rest.length;fN++){fO.measure.caches[fN]={}}}}}function aF(fN){fN.display.externalMeasure=null;dE(fN.display.lineMeasure);for(var fO=0;fO<fN.display.view.length;fO++){ap(fN.display.view[fO])}}function ai(fN){aF(fN);fN.display.cachedCharWidth=fN.display.cachedTextHeight=fN.display.cachedPaddingH=null;if(!fN.options.lineWrapping){fN.display.maxLineChanged=true}fN.display.lineNumChars=null}function ck(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ci(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function et(fT,fQ,fS,fO){if(fQ.widgets){for(var fP=0;fP<fQ.widgets.length;++fP){if(fQ.widgets[fP].above){var fV=cH(fQ.widgets[fP]);fS.top+=fV;fS.bottom+=fV}}}if(fO=="line"){return fS}if(!fO){fO="local"}var fR=bB(fQ);if(fO=="local"){fR+=eI(fT.display)}else{fR-=fT.display.viewOffset}if(fO=="page"||fO=="window"){var fN=fT.display.lineSpace.getBoundingClientRect();fR+=fN.top+(fO=="window"?0:ci());var fU=fN.left+(fO=="window"?0:ck());fS.left+=fU;fS.right+=fU}fS.top+=fR;fS.bottom+=fR;return fS}function fJ(fO,fR,fP){if(fP=="div"){return fR}var fT=fR.left,fS=fR.top;if(fP=="page"){fT-=ck();fS-=ci()}else{if(fP=="local"||!fP){var fQ=fO.display.sizer.getBoundingClientRect();fT+=fQ.left;fS+=fQ.top}}var fN=fO.display.lineSpace.getBoundingClientRect();return{left:fT-fN.left,top:fS-fN.top}}function cx(fN,fR,fQ,fP,fO){if(!fP){fP=eP(fN.doc,fR.line)}return et(fN,fP,dT(fN,fP,fR.ch,fO),fQ)}function dx(fV,fU,fP,fT,fX){fT=fT||eP(fV.doc,fU.line);if(!fX){fX=aU(fV,fT)}function fR(f0,fZ){var fY=D(fV,fX,f0,fZ?"right":"left");if(fZ){fY.left=fY.right}else{fY.right=fY.left}return et(fV,fT,fY,fP)}function fW(f1,fY){var fZ=fS[fY],f0=fZ.level%2;if(f1==dd(fZ)&&fY&&fZ.level<fS[fY-1].level){fZ=fS[--fY];f1=fI(fZ)-(fZ.level%2?0:1);f0=true}else{if(f1==fI(fZ)&&fY<fS.length-1&&fZ.level<fS[fY+1].level){fZ=fS[++fY];f1=dd(fZ)-fZ.level%2;f0=false}}if(f0&&f1==fZ.to&&f1>fZ.from){return fR(f1-1)}return fR(f1,f0)}var fS=a(fT),fN=fU.ch;if(!fS){return fR(fN)}var fO=aB(fS,fN);var fQ=fW(fN,fO);if(eE!=null){fQ.other=fW(fN,eE)}return fQ}function dm(fN,fR){var fQ=0,fR=fj(fN.doc,fR);if(!fN.options.lineWrapping){fQ=di(fN.display)*fR.ch}var fO=eP(fN.doc,fR.line);var fP=bB(fO)+eI(fN.display);return{left:fQ,right:fQ,top:fP,bottom:fP+fO.height}}function fv(fN,fO,fP,fR){var fQ=W(fN,fO);fQ.xRel=fR;if(fP){fQ.outside=true}return fQ}function fo(fU,fR,fQ){var fT=fU.doc;fQ+=fU.display.viewOffset;if(fQ<0){return fv(fT.first,0,true,-1)}var fP=bv(fT,fQ),fV=fT.first+fT.size-1;if(fP>fV){return fv(fT.first+fT.size-1,eP(fT,fV).text.length,true,1)}if(fR<0){fR=0}var fO=eP(fT,fP);for(;;){var fW=cI(fU,fO,fP,fR,fQ);var fS=d7(fO);var fN=fS&&fS.find(0,true);if(fS&&(fW.ch>fN.from.ch||fW.ch==fN.from.ch&&fW.xRel>0)){fP=bC(fO=fN.to.line)}else{return fW}}}function cI(fX,fP,f0,fZ,fY){var fW=fY-bB(fP);var fT=false,f6=2*fX.display.wrapper.clientWidth;var f3=aU(fX,fP);function ga(gc){var gd=dx(fX,W(f0,gc),"line",fP,f3);fT=true;if(fW>gd.bottom){return gd.left-f6}else{if(fW<gd.top){return gd.left+f6}else{fT=false}}return gd.left}var f2=a(fP),f5=fP.text.length;var f7=ct(fP),fQ=cE(fP);var f4=ga(f7),fN=fT,fO=ga(fQ),fS=fT;if(fZ>fO){return fv(f0,fQ,fS,1)}for(;;){if(f2?fQ==f7||fQ==v(fP,f7,1):fQ-f7<=1){var f1=fZ<f4||fZ-f4<=fO-fZ?f7:fQ;var f9=fZ-(f1==f7?f4:fO);while(e0(fP.text.charAt(f1))){++f1}var fV=fv(f0,f1,f1==f7?fN:fS,f9<-1?-1:f9>1?1:0);return fV}var fU=Math.ceil(f5/2),gb=f7+fU;if(f2){gb=f7;for(var f8=0;f8<fU;++f8){gb=v(fP,gb,1)}}var fR=ga(gb);if(fR>fZ){fQ=gb;fO=fR;if(fS=fT){fO+=1000}f5=fU}else{f7=gb;f4=fR;fN=fT;f5-=fU}}}var aC;function aN(fP){if(fP.cachedTextHeight!=null){return fP.cachedTextHeight}if(aC==null){aC=fw("pre");for(var fO=0;fO<49;++fO){aC.appendChild(document.createTextNode("x"));aC.appendChild(fw("br"))}aC.appendChild(document.createTextNode("x"))}bG(fP.measure,aC);var fN=aC.offsetHeight/50;if(fN>3){fP.cachedTextHeight=fN}dE(fP.measure);return fN||1}function di(fR){if(fR.cachedCharWidth!=null){return fR.cachedCharWidth}var fN=fw("span","xxxxxxxxxx");var fQ=fw("pre",[fN]);bG(fR.measure,fQ);var fP=fN.getBoundingClientRect(),fO=(fP.right-fP.left)/10;if(fO>2){fR.cachedCharWidth=fO}return fO||10}var dL=0;function cw(fN){fN.curOp={viewChanged:false,startHeight:fN.doc.height,forceUpdate:false,updateInput:null,typing:false,changeObjs:null,cursorActivityHandlers:null,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++dL};if(!ch++){be=[]}}function aj(fY){var fT=fY.curOp,fX=fY.doc,fU=fY.display;fY.curOp=null;if(fT.updateMaxLine){h(fY)}if(fT.viewChanged||fT.forceUpdate||fT.scrollTop!=null||fT.scrollToPos&&(fT.scrollToPos.from.line<fU.viewFrom||fT.scrollToPos.to.line>=fU.viewTo)||fU.maxLineChanged&&fY.options.lineWrapping){var fR=dp(fY,{top:fT.scrollTop,ensure:fT.scrollToPos},fT.forceUpdate);if(fY.display.scroller.offsetHeight){fY.doc.scrollTop=fY.display.scroller.scrollTop}}if(!fR&&fT.selectionChanged){br(fY)}if(!fR&&fT.startHeight!=fY.doc.height){eB(fY)}if(fT.scrollTop!=null&&fU.scroller.scrollTop!=fT.scrollTop){var fV=Math.max(0,Math.min(fU.scroller.scrollHeight-fU.scroller.clientHeight,fT.scrollTop));fU.scroller.scrollTop=fU.scrollbarV.scrollTop=fX.scrollTop=fV}if(fT.scrollLeft!=null&&fU.scroller.scrollLeft!=fT.scrollLeft){var fO=Math.max(0,Math.min(fU.scroller.scrollWidth-fU.scroller.clientWidth,fT.scrollLeft));fU.scroller.scrollLeft=fU.scrollbarH.scrollLeft=fX.scrollLeft=fO;ei(fY)}if(fT.scrollToPos){var fW=E(fY,fj(fY.doc,fT.scrollToPos.from),fj(fY.doc,fT.scrollToPos.to),fT.scrollToPos.margin);if(fT.scrollToPos.isCursor&&fY.state.focused){dJ(fY,fW)}}if(fT.selectionChanged){p(fY)}if(fY.state.focused&&fT.updateInput){eZ(fY,fT.typing)}var fS=fT.maybeHiddenMarkers,fN=fT.maybeUnhiddenMarkers;if(fS){for(var fQ=0;fQ<fS.length;++fQ){if(!fS[fQ].lines.length){az(fS[fQ],"hide")}}}if(fN){for(var fQ=0;fQ<fN.length;++fQ){if(fN[fQ].lines.length){az(fN[fQ],"unhide")}}}var fP;if(!--ch){fP=be;be=null}if(fT.changeObjs){az(fY,"changes",fY,fT.changeObjs)}if(fP){for(var fQ=0;fQ<fP.length;++fQ){fP[fQ]()}}if(fT.cursorActivityHandlers){for(var fQ=0;fQ<fT.cursorActivityHandlers.length;fQ++){fT.cursorActivityHandlers[fQ](fY)}}}function cz(fN,fO){if(fN.curOp){return fO()}cw(fN);try{return fO()}finally{aj(fN)}}function cL(fN,fO){return function(){if(fN.curOp){return fO.apply(fN,arguments)}cw(fN);try{return fO.apply(fN,arguments)}finally{aj(fN)}}}function cR(fN){return function(){if(this.curOp){return fN.apply(this,arguments)}cw(this);try{return fN.apply(this,arguments)}finally{aj(this)}}}function cs(fN){return function(){var fO=this.cm;if(!fO||fO.curOp){return fN.apply(this,arguments)}cw(fO);try{return fN.apply(this,arguments)}finally{aj(fO)}}}function bl(fP,fN,fO){this.line=fN;this.rest=i(fN);this.size=this.rest?bC(fh(this.rest))-fO+1:1;this.node=this.text=null;this.hidden=e7(fP,fN)}function ey(fN,fT,fS){var fR=[],fP;for(var fQ=fT;fQ<fS;fQ=fP){var fO=new bl(fN.doc,eP(fN.doc,fQ),fQ);fP=fQ+fO.size;fR.push(fO)}return fR}function af(fU,fS,fT,fV){if(fS==null){fS=fU.doc.first}if(fT==null){fT=fU.doc.first+fU.doc.size}if(!fV){fV=0}var fP=fU.display;if(fV&&fT<fP.viewTo&&(fP.updateLineNumbers==null||fP.updateLineNumbers>fS)){fP.updateLineNumbers=fS}fU.curOp.viewChanged=true;if(fS>=fP.viewTo){if(aX&&aM(fU.doc,fS)<fP.viewTo){d9(fU)}}else{if(fT<=fP.viewFrom){if(aX&&dG(fU.doc,fT+fV)>fP.viewFrom){d9(fU)}else{fP.viewFrom+=fV;fP.viewTo+=fV}}else{if(fS<=fP.viewFrom&&fT>=fP.viewTo){d9(fU)}else{if(fS<=fP.viewFrom){var fR=cX(fU,fT,fT+fV,1);if(fR){fP.view=fP.view.slice(fR.index);fP.viewFrom=fR.lineN;fP.viewTo+=fV}else{d9(fU)}}else{if(fT>=fP.viewTo){var fR=cX(fU,fS,fS,-1);if(fR){fP.view=fP.view.slice(0,fR.index);fP.viewTo=fR.lineN}else{d9(fU)}}else{var fQ=cX(fU,fS,fS,-1);var fO=cX(fU,fT,fT+fV,1);if(fQ&&fO){fP.view=fP.view.slice(0,fQ.index).concat(ey(fU,fQ.lineN,fO.lineN)).concat(fP.view.slice(fO.index));fP.viewTo+=fV}else{d9(fU)}}}}}}var fN=fP.externalMeasured;if(fN){if(fT<fN.lineN){fN.lineN+=fV}else{if(fS<fN.lineN+fN.size){fP.externalMeasured=null}}}}function R(fO,fP,fS){fO.curOp.viewChanged=true;var fT=fO.display,fR=fO.display.externalMeasured;if(fR&&fP>=fR.lineN&&fP<fR.lineN+fR.size){fT.externalMeasured=null}if(fP<fT.viewFrom||fP>=fT.viewTo){return}var fQ=fT.view[c7(fO,fP)];if(fQ.node==null){return}var fN=fQ.changes||(fQ.changes=[]);if(c1(fN,fS)==-1){fN.push(fS)}}function d9(fN){fN.display.viewFrom=fN.display.viewTo=fN.doc.first;fN.display.view=[];fN.display.viewOffset=0}function c7(fN,fQ){if(fQ>=fN.display.viewTo){return null}fQ-=fN.display.viewFrom;if(fQ<0){return null}var fO=fN.display.view;for(var fP=0;fP<fO.length;fP++){fQ-=fO[fP].size;if(fQ<0){return fP}}}function cX(fV,fP,fR,fO){var fS=c7(fV,fP),fU,fT=fV.display.view;if(!aX){return{index:fS,lineN:fR}}for(var fQ=0,fN=fV.display.viewFrom;fQ<fS;fQ++){fN+=fT[fQ].size}if(fN!=fP){if(fO>0){if(fS==fT.length-1){return null}fU=(fN+fT[fS].size)-fP;fS++}else{fU=fN-fP}fP+=fU;fR+=fU}while(aM(fV.doc,fR)!=fR){if(fS==(fO<0?0:fT.length-1)){return null}fR+=fO*fT[fS-(fO<0?1:0)].size;fS+=fO}return{index:fS,lineN:fR}}function cD(fN,fR,fQ){var fP=fN.display,fO=fP.view;if(fO.length==0||fR>=fP.viewTo||fQ<=fP.viewFrom){fP.view=ey(fN,fR,fQ);fP.viewFrom=fR}else{if(fP.viewFrom>fR){fP.view=ey(fN,fR,fP.viewFrom).concat(fP.view)}else{if(fP.viewFrom<fR){fP.view=fP.view.slice(c7(fN,fR))}}fP.viewFrom=fR;if(fP.viewTo<fQ){fP.view=fP.view.concat(ey(fN,fP.viewTo,fQ))}else{if(fP.viewTo>fQ){fP.view=fP.view.slice(0,c7(fN,fQ))}}}fP.viewTo=fQ}function cU(fN){var fO=fN.display.view,fR=0;for(var fQ=0;fQ<fO.length;fQ++){var fP=fO[fQ];if(!fP.hidden&&(!fP.node||fP.changes)){++fR}}return fR}function bc(fN){if(fN.display.pollingFast){return}fN.display.poll.set(fN.options.pollInterval,function(){b7(fN);if(fN.state.focused){bc(fN)}})}function C(fN){var fO=false;fN.display.pollingFast=true;function fP(){var fQ=b7(fN);if(!fQ&&!fO){fO=true;fN.display.poll.set(60,fP)}else{fN.display.pollingFast=false;bc(fN)}}fN.display.poll.set(20,fP)}function b7(fR){var fS=fR.display.input,fV=fR.display.prevInput,f6=fR.doc;if(!fR.state.focused||(bi(fS)&&!fV)||ah(fR)||fR.options.disableInput){return false}if(fR.state.pasteIncoming&&fR.state.fakedLastChar){fS.value=fS.value.substring(0,fS.value.length-1);fR.state.fakedLastChar=false}var fU=fS.value;if(fU==fV&&!fR.somethingSelected()){return false}if(dn&&!bY&&fR.display.inputHasSelection===fU){eZ(fR);return false}var f2=!fR.curOp;if(f2){cw(fR)}fR.display.shift=false;if(fU.charCodeAt(0)==8203&&f6.sel==fR.display.selForContextMenu&&!fV){fV="\u200b"}var f1=0,fY=Math.min(fV.length,fU.length);while(f1<fY&&fV.charCodeAt(f1)==fU.charCodeAt(f1)){++f1}var fO=fU.slice(f1),fW=aQ(fO);var f5=fR.state.pasteIncoming&&fW.length>1&&f6.sel.ranges.length==fW.length;for(var f3=f6.sel.ranges.length-1;f3>=0;f3--){var fX=f6.sel.ranges[f3];var fZ=fX.from(),fN=fX.to();if(f1<fV.length){fZ=W(fZ.line,fZ.ch-(fV.length-f1))}else{if(fR.state.overwrite&&fX.empty()&&!fR.state.pasteIncoming){fN=W(fN.line,Math.min(eP(f6,fN.line).text.length,fN.ch+fh(fW).length))}}var fQ=fR.curOp.updateInput;var f4={from:fZ,to:fN,text:f5?[fW[f3]]:fW,origin:fR.state.pasteIncoming?"paste":fR.state.cutIncoming?"cut":"+input"};a5(fR.doc,f4);ac(fR,"inputRead",fR,f4);if(fO&&!fR.state.pasteIncoming&&fR.options.electricChars&&fR.options.smartIndent&&fX.head.ch<100&&(!f3||f6.sel.ranges[f3-1].head.line!=fX.head.line)){var fT=fR.getModeAt(fX.head);if(fT.electricChars){for(var f0=0;f0<fT.electricChars.length;f0++){if(fO.indexOf(fT.electricChars.charAt(f0))>-1){ab(fR,fX.head.line,"smart");break}}}else{if(fT.electricInput){var fP=cG(f4);if(fT.electricInput.test(eP(f6,fP.line).text.slice(0,fP.ch))){ab(fR,fX.head.line,"smart")}}}}}fg(fR);fR.curOp.updateInput=fQ;fR.curOp.typing=true;if(fU.length>1000||fU.indexOf("\n")>-1){fS.value=fR.display.prevInput=""}else{fR.display.prevInput=fU}if(f2){aj(fR)}fR.state.pasteIncoming=fR.state.cutIncoming=false;return true}function eZ(fN,fR){var fO,fQ,fT=fN.doc;if(fN.somethingSelected()){fN.display.prevInput="";var fP=fT.sel.primary();fO=cT&&(fP.to().line-fP.from().line>100||(fQ=fN.getSelection()).length>1000);var fS=fO?"-":fQ||fN.getSelection();fN.display.input.value=fS;if(fN.state.focused){dq(fN.display.input)}if(dn&&!bY){fN.display.inputHasSelection=fS}}else{if(!fR){fN.display.prevInput=fN.display.input.value="";if(dn&&!bY){fN.display.inputHasSelection=null}}}fN.display.inaccurateSelection=fO}function ed(fN){if(fN.options.readOnly!="nocursor"&&(!dS||ds()!=fN.display.input)){fN.display.input.focus()}}function s(fN){if(!fN.state.focused){ed(fN);cq(fN)}}function ah(fN){return fN.options.readOnly||fN.doc.cantEdit}function fp(fN){var fP=fN.display;bM(fP.scroller,"mousedown",cL(fN,d5));if(eo){bM(fP.scroller,"dblclick",cL(fN,function(fT){if(aI(fN,fT)){return}var fU=cd(fN,fT);if(!fU||m(fN,fT)||a0(fN.display,fT)){return}cu(fT);var fS=ar(fN.doc,fU);ft(fN.doc,fS.anchor,fS.head)}))}else{bM(fP.scroller,"dblclick",function(fS){aI(fN,fS)||cu(fS)})}bM(fP.lineSpace,"selectstart",function(fS){if(!a0(fP,fS)){cu(fS)}});if(!fE){bM(fP.scroller,"contextmenu",function(fS){av(fN,fS)})}bM(fP.scroller,"scroll",function(){if(fP.scroller.clientHeight){N(fN,fP.scroller.scrollTop);bt(fN,fP.scroller.scrollLeft,true);az(fN,"scroll",fN)}});bM(fP.scrollbarV,"scroll",function(){if(fP.scroller.clientHeight){N(fN,fP.scrollbarV.scrollTop)}});bM(fP.scrollbarH,"scroll",function(){if(fP.scroller.clientHeight){bt(fN,fP.scrollbarH.scrollLeft)}});bM(fP.scroller,"mousewheel",function(fS){c(fN,fS)});bM(fP.scroller,"DOMMouseScroll",function(fS){c(fN,fS)});function fR(){if(fN.state.focused){setTimeout(cl(ed,fN),0)}}bM(fP.scrollbarH,"mousedown",fR);bM(fP.scrollbarV,"mousedown",fR);bM(fP.wrapper,"scroll",function(){fP.wrapper.scrollTop=fP.wrapper.scrollLeft=0});bM(fP.input,"keyup",cL(fN,a7));bM(fP.input,"input",function(){if(dn&&!bY&&fN.display.inputHasSelection){fN.display.inputHasSelection=null}C(fN)});bM(fP.input,"keydown",cL(fN,q));bM(fP.input,"keypress",cL(fN,cn));bM(fP.input,"focus",cl(cq,fN));bM(fP.input,"blur",cl(aL,fN));function fO(fS){if(!aI(fN,fS)){d3(fS)}}if(fN.options.dragDrop){bM(fP.scroller,"dragstart",function(fS){Q(fN,fS)});bM(fP.scroller,"dragenter",fO);bM(fP.scroller,"dragover",fO);bM(fP.scroller,"drop",cL(fN,a9))}bM(fP.scroller,"paste",function(fS){if(a0(fP,fS)){return}fN.state.pasteIncoming=true;ed(fN);C(fN)});bM(fP.input,"paste",function(){if(cJ&&!fN.state.fakedLastChar&&!(new Date-fN.state.lastMiddleDown<200)){var fT=fP.input.selectionStart,fS=fP.input.selectionEnd;fP.input.value+="$";fP.input.selectionStart=fT;fP.input.selectionEnd=fS;fN.state.fakedLastChar=true}fN.state.pasteIncoming=true;C(fN)});function fQ(fW){if(fN.somethingSelected()){if(fP.inaccurateSelection){fP.prevInput="";fP.inaccurateSelection=false;fP.input.value=fN.getSelection();dq(fP.input)}}else{var fX="",fT=[];for(var fU=0;fU<fN.doc.sel.ranges.length;fU++){var fS=fN.doc.sel.ranges[fU].head.line;var fV={anchor:W(fS,0),head:W(fS+1,0)};fT.push(fV);fX+=fN.getRange(fV.anchor,fV.head)}if(fW.type=="cut"){fN.setSelections(fT,null,Y)}else{fP.prevInput="";fP.input.value=fX;dq(fP.input)}}if(fW.type=="cut"){fN.state.cutIncoming=true}}bM(fP.input,"cut",fQ);bM(fP.input,"copy",fQ);if(a1){bM(fP.sizer,"mouseup",function(){if(ds()==fP.input){fP.input.blur()}ed(fN)})}}function aK(fN){var fO=fN.display;fO.cachedCharWidth=fO.cachedTextHeight=fO.cachedPaddingH=null;fN.setSize()}function a0(fO,fN){for(var fP=L(fN);fP!=fO.wrapper;fP=fP.parentNode){if(!fP||fP.ignoreEvents||fP.parentNode==fO.sizer&&fP!=fO.mover){return true}}}function cd(fX,fR,fO,fP){var fT=fX.display;if(!fO){var fS=L(fR);if(fS==fT.scrollbarH||fS==fT.scrollbarV||fS==fT.scrollbarFiller||fS==fT.gutterFiller){return null}}var fW,fU,fN=fT.lineSpace.getBoundingClientRect();try{fW=fR.clientX-fN.left;fU=fR.clientY-fN.top}catch(fR){return null}var fV=fo(fX,fW,fU),fY;if(fP&&fV.xRel==1&&(fY=eP(fX.doc,fV.line).text).length==fV.ch){var fQ=bI(fY,fY.length,fX.options.tabSize)-fY.length;fV=W(fV.line,Math.max(0,Math.round((fW-eG(fX.display).left)/di(fX.display))-fQ))}return fV}function d5(fP){if(aI(this,fP)){return}var fN=this,fO=fN.display;fO.shift=fP.shiftKey;if(a0(fO,fP)){if(!cJ){fO.scroller.draggable=false;setTimeout(function(){fO.scroller.draggable=true},100)}return}if(m(fN,fP)){return}var fQ=cd(fN,fP);window.focus();switch(fn(fP)){case 1:if(fQ){au(fN,fP,fQ)}else{if(L(fP)==fO.scroller){cu(fP)}}break;case 2:if(cJ){fN.state.lastMiddleDown=+new Date}if(fQ){ft(fN.doc,fQ)}setTimeout(cl(ed,fN),20);cu(fP);break;case 3:if(fE){av(fN,fP)}break}}var c4,cW;function au(fN,fS,fT){setTimeout(cl(s,fN),0);var fO=+new Date,fP;if(cW&&cW.time>fO-400&&b5(cW.pos,fT)==0){fP="triple"}else{if(c4&&c4.time>fO-400&&b5(c4.pos,fT)==0){fP="double";cW={time:fO,pos:fT}}else{fP="single";c4={time:fO,pos:fT}}}var fQ=fN.doc.sel,fR=bU?fS.metaKey:fS.ctrlKey;if(fN.options.dragDrop&&ep&&!fR&&!ah(fN)&&fP=="single"&&fQ.contains(fT)>-1&&fQ.somethingSelected()){aT(fN,fS,fT)}else{n(fN,fS,fT,fP,fR)}}function aT(fO,fQ,fR){var fP=fO.display;var fN=cL(fO,function(fS){if(cJ){fP.scroller.draggable=false}fO.state.draggingText=false;dP(document,"mouseup",fN);dP(fP.scroller,"drop",fN);if(Math.abs(fQ.clientX-fS.clientX)+Math.abs(fQ.clientY-fS.clientY)<10){cu(fS);ft(fO.doc,fR);ed(fO);if(eo&&!bY){setTimeout(function(){document.body.focus();ed(fO)},20)}}});if(cJ){fP.scroller.draggable=true}fO.state.draggingText=fN;if(fP.scroller.dragDrop){fP.scroller.dragDrop()}bM(document,"mouseup",fN);bM(fP.scroller,"drop",fN)}function n(fQ,f4,fP,fN,fS){var f1=fQ.display,f6=fQ.doc;cu(f4);var fO,f5,fR=f6.sel;if(fS&&!f4.shiftKey){f5=f6.sel.contains(fP);if(f5>-1){fO=f6.sel.ranges[f5]}else{fO=new dB(fP,fP)}}else{fO=f6.sel.primary()}if(f4.altKey){fN="rect";if(!fS){fO=new dB(fP,fP)}fP=cd(fQ,f4,true,true);f5=-1}else{if(fN=="double"){var f2=ar(f6,fP);if(fQ.display.shift||f6.extend){fO=e6(f6,fO,f2.anchor,f2.head)}else{fO=f2}}else{if(fN=="triple"){var fV=new dB(W(fP.line,0),fj(f6,W(fP.line+1,0)));if(fQ.display.shift||f6.extend){fO=e6(f6,fO,fV.anchor,fV.head)}else{fO=fV}}else{fO=e6(f6,fO,fP)}}}if(!fS){f5=0;bJ(f6,new fx([fO],0),M);fR=f6.sel}else{if(f5>-1){f(f6,f5,fO,M)}else{f5=f6.sel.ranges.length;bJ(f6,cm(f6.sel.ranges.concat([fO]),f5),{scroll:false,origin:"*mouse"})}}var f0=fP;function fZ(gh){if(b5(f0,gh)==0){return}f0=gh;if(fN=="rect"){var f8=[],ge=fQ.options.tabSize;var f7=bI(eP(f6,fP.line).text,fP.ch,ge);var gk=bI(eP(f6,gh.line).text,gh.ch,ge);var f9=Math.min(f7,gk),gi=Math.max(f7,gk);for(var gl=Math.min(fP.line,gh.line),gb=Math.min(fQ.lastLine(),Math.max(fP.line,gh.line));gl<=gb;gl++){var gj=eP(f6,gl).text,ga=d2(gj,f9,ge);if(f9==gi){f8.push(new dB(W(gl,ga),W(gl,ga)))}else{if(gj.length>ga){f8.push(new dB(W(gl,ga),W(gl,d2(gj,gi,ge))))}}}if(!f8.length){f8.push(new dB(fP,fP))}bJ(f6,cm(fR.ranges.slice(0,f5).concat(f8),f5),M)}else{var gf=fO;var gc=gf.anchor,gg=gh;if(fN!="single"){if(fN=="double"){var gd=ar(f6,gh)}else{var gd=new dB(W(gh.line,0),fj(f6,W(gh.line+1,0)))}if(b5(gd.anchor,gc)>0){gg=gd.head;gc=am(gf.from(),gd.anchor)}else{gg=gd.anchor;gc=bn(gf.to(),gd.head)}}var f8=fR.ranges.slice(0);f8[f5]=new dB(fj(f6,gc),gg);bJ(f6,cm(f8,f5),M)}}var fX=f1.wrapper.getBoundingClientRect();var fT=0;function f3(f9){var f7=++fT;var gb=cd(fQ,f9,true,fN=="rect");if(!gb){return}if(b5(gb,f0)!=0){s(fQ);fZ(gb);var ga=bT(f1,f6);if(gb.line>=ga.to||gb.line<ga.from){setTimeout(cL(fQ,function(){if(fT==f7){f3(f9)}}),150)}}else{var f8=f9.clientY<fX.top?-20:f9.clientY>fX.bottom?20:0;if(f8){setTimeout(cL(fQ,function(){if(fT!=f7){return}f1.scroller.scrollTop+=f8;f3(f9)}),50)}}}function fW(f7){fT=Infinity;cu(f7);ed(fQ);dP(document,"mousemove",fY);dP(document,"mouseup",fU);f6.history.lastSelOrigin=null}var fY=cL(fQ,function(f7){if((dn&&!bX)?!f7.buttons:!fn(f7)){fW(f7)}else{f3(f7)}});var fU=cL(fQ,fW);bM(document,"mousemove",fY);bM(document,"mouseup",fU)}function fL(fY,fU,fW,fX,fQ){try{var fO=fU.clientX,fN=fU.clientY}catch(fU){return false}if(fO>=Math.floor(fY.display.gutters.getBoundingClientRect().right)){return false}if(fX){cu(fU)}var fV=fY.display;var fT=fV.lineDiv.getBoundingClientRect();if(fN>fT.bottom||!eS(fY,fW)){return bA(fU)}fN-=fT.top-fV.viewOffset;for(var fR=0;fR<fY.options.gutters.length;++fR){var fS=fV.gutters.childNodes[fR];if(fS&&fS.getBoundingClientRect().right>=fO){var fZ=bv(fY.doc,fN);var fP=fY.options.gutters[fR];fQ(fY,fW,fY,fZ,fP,fU);return bA(fU)}}}function m(fN,fO){return fL(fN,fO,"gutterClick",true,ac)}var ae=0;function a9(fT){var fV=this;if(aI(fV,fT)||a0(fV.display,fT)){return}cu(fT);if(dn){ae=+new Date}var fU=cd(fV,fT,true),fN=fT.dataTransfer.files;if(!fU||ah(fV)){return}if(fN&&fN.length&&window.FileReader&&window.File){var fP=fN.length,fW=Array(fP),fO=0;var fR=function(fZ,fY){var fX=new FileReader;fX.onload=cL(fV,function(){fW[fY]=fX.result;if(++fO==fP){fU=fj(fV.doc,fU);var f0={from:fU,to:fU,text:aQ(fW.join("\n")),origin:"paste"};a5(fV.doc,f0);eH(fV.doc,eu(fU,cG(f0)))}});fX.readAsText(fZ)};for(var fS=0;fS<fP;++fS){fR(fN[fS],fS)}}else{if(fV.state.draggingText&&fV.doc.sel.contains(fU)>-1){fV.state.draggingText(fT);setTimeout(cl(ed,fV),20);return}try{var fW=fT.dataTransfer.getData("Text");if(fW){var fQ=fV.state.draggingText&&fV.listSelections();d1(fV.doc,eu(fU,fU));if(fQ){for(var fS=0;fS<fQ.length;++fS){aR(fV.doc,"",fQ[fS].anchor,fQ[fS].head,"drag")}}fV.replaceSelection(fW,"around","paste");ed(fV)}}catch(fT){}}}function Q(fN,fP){if(dn&&(!fN.state.draggingText||+new Date-ae<100)){d3(fP);return}if(aI(fN,fP)||a0(fN.display,fP)){return}fP.dataTransfer.setData("Text",fN.getSelection());if(fP.dataTransfer.setDragImage&&!ay){var fO=fw("img",null,null,"position: fixed; left: 0; top: 0;");fO.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(dF){fO.width=fO.height=1;fN.display.wrapper.appendChild(fO);fO._top=fO.offsetTop}fP.dataTransfer.setDragImage(fO,0,0);if(dF){fO.parentNode.removeChild(fO)}}}function N(fN,fO){if(Math.abs(fN.doc.scrollTop-fO)<2){return}fN.doc.scrollTop=fO;if(!ce){dp(fN,{top:fO})}if(fN.display.scroller.scrollTop!=fO){fN.display.scroller.scrollTop=fO}if(fN.display.scrollbarV.scrollTop!=fO){fN.display.scrollbarV.scrollTop=fO}if(ce){dp(fN)}dR(fN,100)}function bt(fN,fP,fO){if(fO?fP==fN.doc.scrollLeft:Math.abs(fN.doc.scrollLeft-fP)<2){return}fP=Math.min(fP,fN.display.scroller.scrollWidth-fN.display.scroller.clientWidth);fN.doc.scrollLeft=fP;ei(fN);if(fN.display.scroller.scrollLeft!=fP){fN.display.scroller.scrollLeft=fP}if(fN.display.scrollbarH.scrollLeft!=fP){fN.display.scrollbarH.scrollLeft=fP}}var eW=0,b6=null;if(dn){b6=-0.53}else{if(ce){b6=15}else{if(cV){b6=-0.7}else{if(ay){b6=-1/3}}}}function c(fV,fP){var fY=fP.wheelDeltaX,fX=fP.wheelDeltaY;if(fY==null&&fP.detail&&fP.axis==fP.HORIZONTAL_AXIS){fY=fP.detail}if(fX==null&&fP.detail&&fP.axis==fP.VERTICAL_AXIS){fX=fP.detail}else{if(fX==null){fX=fP.wheelDelta}}var fR=fV.display,fU=fR.scroller;if(!(fY&&fU.scrollWidth>fU.clientWidth||fX&&fU.scrollHeight>fU.clientHeight)){return}if(fX&&bU&&cJ){outer:for(var fW=fP.target,fT=fR.view;fW!=fU;fW=fW.parentNode){for(var fO=0;fO<fT.length;fO++){if(fT[fO].node==fW){fV.display.currentWheelTarget=fW;break outer}}}}if(fY&&!ce&&!dF&&b6!=null){if(fX){N(fV,Math.max(0,Math.min(fU.scrollTop+fX*b6,fU.scrollHeight-fU.clientHeight)))}bt(fV,Math.max(0,Math.min(fU.scrollLeft+fY*b6,fU.scrollWidth-fU.clientWidth)));cu(fP);fR.wheelStartX=null;return}if(fX&&b6!=null){var fN=fX*b6;var fS=fV.doc.scrollTop,fQ=fS+fR.wrapper.clientHeight;if(fN<0){fS=Math.max(0,fS+fN-50)}else{fQ=Math.min(fV.doc.height,fQ+fN+50)}dp(fV,{top:fS,bottom:fQ})}if(eW<20){if(fR.wheelStartX==null){fR.wheelStartX=fU.scrollLeft;fR.wheelStartY=fU.scrollTop;fR.wheelDX=fY;fR.wheelDY=fX;setTimeout(function(){if(fR.wheelStartX==null){return}var fZ=fU.scrollLeft-fR.wheelStartX;var f1=fU.scrollTop-fR.wheelStartY;var f0=(f1&&fR.wheelDY&&f1/fR.wheelDY)||(fZ&&fR.wheelDX&&fZ/fR.wheelDX);fR.wheelStartX=fR.wheelStartY=null;if(!f0){return}b6=(b6*eW+f0)/(eW+1);++eW},200)}else{fR.wheelDX+=fY;fR.wheelDY+=fX}}}function fq(fO,fR,fN){if(typeof fR=="string"){fR=eh[fR];if(!fR){return false}}if(fO.display.pollingFast&&b7(fO)){fO.display.pollingFast=false}var fQ=fO.display.shift,fP=false;try{if(ah(fO)){fO.state.suppressEdits=true}if(fN){fO.display.shift=false}fP=fR(fO)!=bZ}finally{fO.display.shift=fQ;fO.state.suppressEdits=false}return fP}function c9(fN){var fO=fN.state.keyMaps.slice(0);if(fN.options.extraKeys){fO.push(fN.options.extraKeys)}fO.push(fN.options.keyMap);return fO}var an;function eT(fN,fT){var fO=fu(fN.options.keyMap),fR=fO.auto;clearTimeout(an);if(fR&&!eg(fT)){an=setTimeout(function(){if(fu(fN.options.keyMap)==fO){fN.options.keyMap=(fR.call?fR.call(null,fN):fR);fK(fN)}},50)}var fQ=e2(fT,true),fS=false;if(!fQ){return false}var fP=c9(fN);if(fT.shiftKey){fS=j("Shift-"+fQ,fP,function(fU){return fq(fN,fU,true)})||j(fQ,fP,function(fU){if(typeof fU=="string"?/^go[A-Z]/.test(fU):fU.motion){return fq(fN,fU)}})}else{fS=j(fQ,fP,function(fU){return fq(fN,fU)})}if(fS){cu(fT);p(fN);ac(fN,"keyHandled",fN,fQ,fT)}return fS}function dV(fN,fQ,fO){var fP=j("'"+fO+"'",c9(fN),function(fR){return fq(fN,fR,true)});if(fP){cu(fQ);p(fN);ac(fN,"keyHandled",fN,"'"+fO+"'",fQ)}return fP}var c3=null;function q(fQ){var fN=this;s(fN);if(aI(fN,fQ)){return}if(eo&&fQ.keyCode==27){fQ.returnValue=false}var fO=fQ.keyCode;fN.display.shift=fO==16||fQ.shiftKey;var fP=eT(fN,fQ);if(dF){c3=fP?fO:null;if(!fP&&fO==88&&!cT&&(bU?fQ.metaKey:fQ.ctrlKey)){fN.replaceSelection("",null,"cut")}}if(fO==18&&!/\bCodeMirror-crosshair\b/.test(fN.display.lineDiv.className)){aq(fN)}}function aq(fO){var fP=fO.display.lineDiv;fb(fP,"CodeMirror-crosshair");function fN(fQ){if(fQ.keyCode==18||!fQ.altKey){g(fP,"CodeMirror-crosshair");dP(document,"keyup",fN);dP(document,"mouseover",fN)}}bM(document,"keyup",fN);bM(document,"mouseover",fN)}function a7(fN){if(aI(this,fN)){return}if(fN.keyCode==16){this.doc.sel.shift=false}}function cn(fR){var fN=this;if(aI(fN,fR)){return}var fQ=fR.keyCode,fO=fR.charCode;if(dF&&fQ==c3){c3=null;cu(fR);return}if(((dF&&(!fR.which||fR.which<10))||a1)&&eT(fN,fR)){return}var fP=String.fromCharCode(fO==null?fQ:fO);if(dV(fN,fR,fP)){return}if(dn&&!bY){fN.display.inputHasSelection=null}C(fN)}function cq(fN){if(fN.options.readOnly=="nocursor"){return}if(!fN.state.focused){az(fN,"focus",fN);fN.state.focused=true;fb(fN.display.wrapper,"CodeMirror-focused");if(!fN.curOp&&fN.display.selForContextMenu!=fN.doc.sel){eZ(fN);if(cJ){setTimeout(cl(eZ,fN,true),0)}}}bc(fN);p(fN)}function aL(fN){if(fN.state.focused){az(fN,"blur",fN);fN.state.focused=false;g(fN.display.wrapper,"CodeMirror-focused")}clearInterval(fN.display.blinker);setTimeout(function(){if(!fN.state.focused){fN.display.shift=false}},150)}function av(fW,fR){if(aI(fW,fR,"contextmenu")){return}var fT=fW.display;if(a0(fT,fR)||c0(fW,fR)){return}var fV=cd(fW,fR),fN=fT.scroller.scrollTop;if(!fV||dF){return}var fP=fW.options.resetSelectionOnContextMenu;if(fP&&fW.doc.sel.contains(fV)==-1){cL(fW,bJ)(fW.doc,eu(fV),Y)}var fS=fT.input.style.cssText;fT.inputDiv.style.position="absolute";fT.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(fR.clientY-5)+"px; left: "+(fR.clientX-5)+"px; z-index: 1000; background: "+(dn?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";ed(fW);eZ(fW);if(!fW.somethingSelected()){fT.input.value=fT.prevInput=" "}fT.selForContextMenu=fW.doc.sel;clearTimeout(fT.detectingSelectAll);function fQ(){if(fT.input.selectionStart!=null){var fX=fW.somethingSelected();var fY=fT.input.value="\u200b"+(fX?fT.input.value:"");fT.prevInput=fX?"":"\u200b";fT.input.selectionStart=1;fT.input.selectionEnd=fY.length}}function fU(){fT.inputDiv.style.position="relative";fT.input.style.cssText=fS;if(bY){fT.scrollbarV.scrollTop=fT.scroller.scrollTop=fN}bc(fW);if(fT.input.selectionStart!=null){if(!dn||bY){fQ()}var fX=0,fY=function(){if(fT.selForContextMenu==fW.doc.sel&&fT.input.selectionStart==0){cL(fW,eh.selectAll)(fW)}else{if(fX++<10){fT.detectingSelectAll=setTimeout(fY,500)}else{eZ(fW)}}};fT.detectingSelectAll=setTimeout(fY,200)}}if(dn&&!bY){fQ()}if(fE){d3(fR);var fO=function(){dP(window,"mouseup",fO);setTimeout(fU,20)};bM(window,"mouseup",fO)}else{setTimeout(fU,50)}}function c0(fN,fO){if(!eS(fN,"gutterContextMenu")){return false}return fL(fN,fO,"gutterContextMenu",false,az)}var cG=I.changeEnd=function(fN){if(!fN.text){return fN.to}return W(fN.from.line+fN.text.length-1,fh(fN.text).length+(fN.text.length==1?fN.from.ch:0))};function bO(fQ,fP){if(b5(fQ,fP.from)<0){return fQ}if(b5(fQ,fP.to)<=0){return cG(fP)}var fN=fQ.line+fP.text.length-(fP.to.line-fP.from.line)-1,fO=fQ.ch;if(fQ.line==fP.to.line){fO+=cG(fP).ch-fP.to.ch}return W(fN,fO)}function eU(fQ,fR){var fO=[];for(var fP=0;fP<fQ.sel.ranges.length;fP++){var fN=fQ.sel.ranges[fP];fO.push(new dB(bO(fN.anchor,fR),bO(fN.head,fR)))}return cm(fO,fQ.sel.primIndex)}function bk(fP,fO,fN){if(fP.line==fO.line){return W(fN.line,fP.ch-fO.ch+fN.ch)}else{return W(fN.line+(fP.line-fO.line),fP.ch)}}function ad(fX,fU,fO){var fP=[];var fN=W(fX.first,0),fY=fN;for(var fR=0;fR<fU.length;fR++){var fT=fU[fR];var fW=bk(fT.from,fN,fY);var fV=bk(cG(fT),fN,fY);fN=fT.to;fY=fV;if(fO=="around"){var fS=fX.sel.ranges[fR],fQ=b5(fS.head,fS.anchor)<0;fP[fR]=new dB(fQ?fV:fW,fQ?fW:fV)}else{fP[fR]=new dB(fW,fW)}}return new fx(fP,fX.sel.primIndex)}function dv(fO,fQ,fP){var fN={canceled:false,from:fQ.from,to:fQ.to,text:fQ.text,origin:fQ.origin,cancel:function(){this.canceled=true}};if(fP){fN.update=function(fU,fT,fS,fR){if(fU){this.from=fj(fO,fU)}if(fT){this.to=fj(fO,fT)}if(fS){this.text=fS}if(fR!==undefined){this.origin=fR}}}az(fO,"beforeChange",fO,fN);if(fO.cm){az(fO.cm,"beforeChange",fO.cm,fN)}if(fN.canceled){return null}return{from:fN.from,to:fN.to,text:fN.text,origin:fN.origin}}function a5(fQ,fR,fP){if(fQ.cm){if(!fQ.cm.curOp){return cL(fQ.cm,a5)(fQ,fR,fP)}if(fQ.cm.state.suppressEdits){return}}if(eS(fQ,"beforeChange")||fQ.cm&&eS(fQ.cm,"beforeChange")){fR=dv(fQ,fR,true);if(!fR){return}}var fO=fH&&!fP&&cv(fQ,fR.from,fR.to);if(fO){for(var fN=fO.length-1;fN>=0;--fN){K(fQ,{from:fO[fN].from,to:fO[fN].to,text:fN?[""]:fR.text})}}else{K(fQ,fR)}}function K(fP,fQ){if(fQ.text.length==1&&fQ.text[0]==""&&b5(fQ.from,fQ.to)==0){return}var fO=eU(fP,fQ);fm(fP,fQ,fO,fP.cm?fP.cm.curOp.id:NaN);dQ(fP,fQ,fO,dW(fP,fQ));var fN=[];dK(fP,function(fS,fR){if(!fR&&c1(fN,fS.history)==-1){dj(fS.history,fQ);fN.push(fS.history)}dQ(fS,fQ,null,dW(fS,fQ))})}function bV(fY,fW,f0){if(fY.cm&&fY.cm.state.suppressEdits){return}var fV=fY.history,fP,fR=fY.sel;var fN=fW=="undo"?fV.done:fV.undone,fZ=fW=="undo"?fV.undone:fV.done;for(var fS=0;fS<fN.length;fS++){fP=fN[fS];if(f0?fP.ranges&&!fP.equals(fY.sel):!fP.ranges){break}}if(fS==fN.length){return}fV.lastOrigin=fV.lastSelOrigin=null;for(;;){fP=fN.pop();if(fP.ranges){cA(fP,fZ);if(f0&&!fP.equals(fY.sel)){bJ(fY,fP,{clearRedo:false});return}fR=fP}else{break}}var fU=[];cA(fR,fZ);fZ.push({changes:fU,generation:fV.generation});fV.generation=fP.generation||++fV.maxGeneration;var fQ=eS(fY,"beforeChange")||fY.cm&&eS(fY.cm,"beforeChange");for(var fS=fP.changes.length-1;fS>=0;--fS){var fX=fP.changes[fS];fX.origin=fW;if(fQ&&!dv(fY,fX,false)){fN.length=0;return}fU.push(da(fY,fX));var fO=fS?eU(fY,fX,null):fh(fN);dQ(fY,fX,fO,dM(fY,fX));if(!fS&&fY.cm){fY.cm.scrollIntoView(fX)}var fT=[];dK(fY,function(f2,f1){if(!f1&&c1(fT,f2.history)==-1){dj(f2.history,fX);fT.push(f2.history)}dQ(f2,fX,null,dM(f2,fX))})}}function eX(fO,fQ){if(fQ==0){return}fO.first+=fQ;fO.sel=new fx(bH(fO.sel.ranges,function(fR){return new dB(W(fR.anchor.line+fQ,fR.anchor.ch),W(fR.head.line+fQ,fR.head.ch))}),fO.sel.primIndex);if(fO.cm){af(fO.cm,fO.first,fO.first-fQ,fQ);for(var fP=fO.cm.display,fN=fP.viewFrom;fN<fP.viewTo;fN++){R(fO.cm,fN,"gutter")}}}function dQ(fR,fS,fQ,fO){if(fR.cm&&!fR.cm.curOp){return cL(fR.cm,dQ)(fR,fS,fQ,fO)}if(fS.to.line<fR.first){eX(fR,fS.text.length-1-(fS.to.line-fS.from.line));return}if(fS.from.line>fR.lastLine()){return}if(fS.from.line<fR.first){var fN=fS.text.length-1-(fR.first-fS.from.line);eX(fR,fN);fS={from:W(fR.first,0),to:W(fS.to.line+fN,fS.to.ch),text:[fh(fS.text)],origin:fS.origin}}var fP=fR.lastLine();if(fS.to.line>fP){fS={from:fS.from,to:W(fP,eP(fR,fP).text.length),text:[fS.text[0]],origin:fS.origin}}fS.removed=fy(fR,fS.from,fS.to);if(!fQ){fQ=eU(fR,fS,null)}if(fR.cm){aD(fR.cm,fS,fO)}else{e9(fR,fS,fO)}d1(fR,fQ,Y)}function aD(fY,fU,fS){var fX=fY.doc,fT=fY.display,fV=fU.from,fW=fU.to;var fN=false,fR=fV.line;if(!fY.options.lineWrapping){fR=bC(z(eP(fX,fV.line)));fX.iter(fR,fW.line+1,function(f0){if(f0==fT.maxLine){fN=true;return true}})}if(fX.sel.contains(fU.from,fU.to)>-1){V(fY)}e9(fX,fU,fS,a3(fY));if(!fY.options.lineWrapping){fX.iter(fR,fV.line+fU.text.length,function(f1){var f0=dY(f1);if(f0>fT.maxLineLength){fT.maxLine=f1;fT.maxLineLength=f0;fT.maxLineChanged=true;fN=false}});if(fN){fY.curOp.updateMaxLine=true}}fX.frontier=Math.min(fX.frontier,fV.line);dR(fY,400);var fZ=fU.text.length-(fW.line-fV.line)-1;if(fV.line==fW.line&&fU.text.length==1&&!dw(fY.doc,fU)){R(fY,fV.line,"text")}else{af(fY,fV.line,fW.line+1,fZ)}var fP=eS(fY,"changes"),fQ=eS(fY,"change");if(fQ||fP){var fO={from:fV,to:fW,text:fU.text,removed:fU.removed,origin:fU.origin};if(fQ){ac(fY,"change",fY,fO)}if(fP){(fY.curOp.changeObjs||(fY.curOp.changeObjs=[])).push(fO)}}fY.display.selForContextMenu=null}function aR(fQ,fP,fS,fR,fN){if(!fR){fR=fS}if(b5(fR,fS)<0){var fO=fR;fR=fS;fS=fO}if(typeof fP=="string"){fP=aQ(fP)}a5(fQ,{from:fS,to:fR,text:fP,origin:fN})}function dJ(fO,fR){var fS=fO.display,fP=fS.sizer.getBoundingClientRect(),fN=null;if(fR.top+fP.top<0){fN=true}else{if(fR.bottom+fP.top>(window.innerHeight||document.documentElement.clientHeight)){fN=false}}if(fN!=null&&!e5){var fQ=fw("div","\u200b",null,"position: absolute; top: "+(fR.top-fS.viewOffset-eI(fO.display))+"px; height: "+(fR.bottom-fR.top+ba)+"px; left: "+fR.left+"px; width: 2px;");fO.display.lineSpace.appendChild(fQ);fQ.scrollIntoView(fN);fO.display.lineSpace.removeChild(fQ)}}function E(fW,fU,fR,fQ){if(fQ==null){fQ=0}for(;;){var fS=false,fV=dx(fW,fU);var fN=!fR||fR==fU?fV:dx(fW,fR);var fP=H(fW,Math.min(fV.left,fN.left),Math.min(fV.top,fN.top)-fQ,Math.max(fV.left,fN.left),Math.max(fV.bottom,fN.bottom)+fQ);var fT=fW.doc.scrollTop,fO=fW.doc.scrollLeft;if(fP.scrollTop!=null){N(fW,fP.scrollTop);if(Math.abs(fW.doc.scrollTop-fT)>1){fS=true}}if(fP.scrollLeft!=null){bt(fW,fP.scrollLeft);if(Math.abs(fW.doc.scrollLeft-fO)>1){fS=true}}if(!fS){return fV}}}function F(fN,fP,fR,fO,fQ){var fS=H(fN,fP,fR,fO,fQ);if(fS.scrollTop!=null){N(fN,fS.scrollTop)}if(fS.scrollLeft!=null){bt(fN,fS.scrollLeft)}}function H(fT,f1,fQ,f0,fP){var fY=fT.display,fX=aN(fT.display);if(fQ<0){fQ=0}var fW=fT.curOp&&fT.curOp.scrollTop!=null?fT.curOp.scrollTop:fY.scroller.scrollTop;var fO=fY.scroller.clientHeight-ba,fV={};var f3=fT.doc.height+bx(fY);var f4=fQ<fX,fZ=fP>f3-fX;if(fQ<fW){fV.scrollTop=f4?0:fQ}else{if(fP>fW+fO){var fU=Math.min(fQ,(fZ?f3:fP)-fO);if(fU!=fW){fV.scrollTop=fU}}}var fN=fT.curOp&&fT.curOp.scrollLeft!=null?fT.curOp.scrollLeft:fY.scroller.scrollLeft;var fS=fY.scroller.clientWidth-ba;f1+=fY.gutters.offsetWidth;f0+=fY.gutters.offsetWidth;var fR=fY.gutters.offsetWidth;var f2=f1<fR+10;if(f1<fN+fR||f2){if(f2){f1=0}fV.scrollLeft=Math.max(0,f1-10-fR)}else{if(f0>fS+fN-3){fV.scrollLeft=f0+10-fS}}return fV}function cy(fN,fP,fO){if(fP!=null||fO!=null){fd(fN)}if(fP!=null){fN.curOp.scrollLeft=(fN.curOp.scrollLeft==null?fN.doc.scrollLeft:fN.curOp.scrollLeft)+fP}if(fO!=null){fN.curOp.scrollTop=(fN.curOp.scrollTop==null?fN.doc.scrollTop:fN.curOp.scrollTop)+fO}}function fg(fN){fd(fN);var fO=fN.getCursor(),fQ=fO,fP=fO;if(!fN.options.lineWrapping){fQ=fO.ch?W(fO.line,fO.ch-1):fO;fP=W(fO.line,fO.ch+1)}fN.curOp.scrollToPos={from:fQ,to:fP,margin:fN.options.cursorScrollMargin,isCursor:true}}function fd(fN){var fP=fN.curOp.scrollToPos;if(fP){fN.curOp.scrollToPos=null;var fR=dm(fN,fP.from),fQ=dm(fN,fP.to);var fO=H(fN,Math.min(fR.left,fQ.left),Math.min(fR.top,fQ.top)-fP.margin,Math.max(fR.right,fQ.right),Math.max(fR.bottom,fQ.bottom)+fP.margin);fN.scrollTo(fO.scrollLeft,fO.scrollTop)}}function ab(f0,fQ,fZ,fP){var fY=f0.doc,fO;if(fZ==null){fZ="add"}if(fZ=="smart"){if(!f0.doc.mode.indent){fZ="prev"}else{fO=dg(f0,fQ)}}var fU=f0.options.tabSize;var f1=eP(fY,fQ),fT=bI(f1.text,null,fU);if(f1.stateAfter){f1.stateAfter=null}var fN=f1.text.match(/^\s*/)[0],fW;if(!fP&&!/\S/.test(f1.text)){fW=0;fZ="not"}else{if(fZ=="smart"){fW=f0.doc.mode.indent(fO,f1.text.slice(fN.length),f1.text);if(fW==bZ){if(!fP){return}fZ="prev"}}}if(fZ=="prev"){if(fQ>fY.first){fW=bI(eP(fY,fQ-1).text,null,fU)}else{fW=0}}else{if(fZ=="add"){fW=fT+f0.options.indentUnit}else{if(fZ=="subtract"){fW=fT-f0.options.indentUnit}else{if(typeof fZ=="number"){fW=fT+fZ}}}}fW=Math.max(0,fW);var fX="",fV=0;if(f0.options.indentWithTabs){for(var fR=Math.floor(fW/fU);fR;--fR){fV+=fU;fX+="\t"}}if(fV<fW){fX+=cf(fW-fV)}if(fX!=fN){aR(f0.doc,fX,W(fQ,0),W(fQ,fN.length),"+input")}else{for(var fR=0;fR<fY.sel.ranges.length;fR++){var fS=fY.sel.ranges[fR];if(fS.head.line==fQ&&fS.head.ch<fN.length){var fV=W(fQ,fN.length);f(fY,fR,new dB(fV,fV));break}}}f1.stateAfter=null}function eb(fO,fQ,fN,fT){var fS=fQ,fP=fQ,fR=fO.doc;if(typeof fQ=="number"){fP=eP(fR,cO(fR,fQ))}else{fS=bC(fQ)}if(fS==null){return null}if(fT(fP,fS)){R(fO,fS,fN)}return fP}function eA(fN,fT){var fO=fN.doc.sel.ranges,fR=[];for(var fQ=0;fQ<fO.length;fQ++){var fP=fT(fO[fQ]);while(fR.length&&b5(fP.from,fh(fR).to)<=0){var fS=fR.pop();if(b5(fS.from,fP.from)<0){fP.from=fS.from;break}}fR.push(fP)}cz(fN,function(){for(var fU=fR.length-1;fU>=0;fU--){aR(fN.doc,"",fR[fU].from,fR[fU].to,"+delete")}fg(fN)})}function bm(f4,fQ,fY,fX,fS){var fV=fQ.line,fW=fQ.ch,f3=fY;var fN=eP(f4,fV);var f1=true;function f2(){var f5=fV+fY;if(f5<f4.first||f5>=f4.first+f4.size){return(f1=false)}fV=f5;return fN=eP(f4,f5)}function f0(f6){var f5=(fS?v:ag)(fN,fW,fY,true);if(f5==null){if(!f6&&f2()){if(fS){fW=(fY<0?cE:ct)(fN)}else{fW=fY<0?fN.text.length:0}}else{return(f1=false)}}else{fW=f5}return true}if(fX=="char"){f0()}else{if(fX=="column"){f0(true)}else{if(fX=="word"||fX=="group"){var fZ=null,fT=fX=="group";for(var fR=true;;fR=false){if(fY<0&&!f0(!fR)){break}var fO=fN.text.charAt(fW)||"\n";var fP=cp(fO)?"w":fT&&fO=="\n"?"n":!fT||/\s/.test(fO)?null:"p";if(fT&&!fR&&!fP){fP="s"}if(fZ&&fZ!=fP){if(fY<0){fY=1;f0()}break}if(fP){fZ=fP}if(fY>0&&!f0(!fR)){break}}}}}var fU=bK(f4,W(fV,fW),f3,true);if(!f1){fU.hitSide=true}return fU}function bg(fV,fQ,fN,fU){var fT=fV.doc,fS=fQ.left,fR;if(fU=="page"){var fP=Math.min(fV.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);fR=fQ.top+fN*(fP-(fN<0?1.5:0.5)*aN(fV.display))}else{if(fU=="line"){fR=fN>0?fQ.bottom+3:fQ.top-3}}for(;;){var fO=fo(fV,fS,fR);if(!fO.outside){break}if(fN<0?fR<=0:fR>=fT.height){fO.hitSide=true;break}fR+=fN*5}return fO}function ar(fR,fT){var fQ=eP(fR,fT.line).text;var fS=fT.ch,fP=fT.ch;if(fQ){if((fT.xRel<0||fP==fQ.length)&&fS){--fS}else{++fP}var fO=fQ.charAt(fS);var fN=cp(fO)?cp:/\s/.test(fO)?function(fU){return/\s/.test(fU)}:function(fU){return !/\s/.test(fU)&&!cp(fU)};while(fS>0&&fN(fQ.charAt(fS-1))){--fS}while(fP<fQ.length&&fN(fQ.charAt(fP))){++fP}}return new dB(W(fT.line,fS),W(fT.line,fP))}I.prototype={constructor:I,focus:function(){window.focus();ed(this);C(this)},setOption:function(fP,fQ){var fO=this.options,fN=fO[fP];if(fO[fP]==fQ&&fP!="mode"){return}fO[fP]=fQ;if(a4.hasOwnProperty(fP)){cL(this,a4[fP])(this,fQ,fN)}},getOption:function(fN){return this.options[fN]},getDoc:function(){return this.doc},addKeyMap:function(fO,fN){this.state.keyMaps[fN?"push":"unshift"](fO)},removeKeyMap:function(fO){var fP=this.state.keyMaps;for(var fN=0;fN<fP.length;++fN){if(fP[fN]==fO||(typeof fP[fN]!="string"&&fP[fN].name==fO)){fP.splice(fN,1);return true}}},addOverlay:cR(function(fN,fO){var fP=fN.token?fN:I.getMode(this.options,fN);if(fP.startState){throw new Error("Overlays may not be stateful.")}this.state.overlays.push({mode:fP,modeSpec:fN,opaque:fO&&fO.opaque});this.state.modeGen++;af(this)}),removeOverlay:cR(function(fN){var fP=this.state.overlays;for(var fO=0;fO<fP.length;++fO){var fQ=fP[fO].modeSpec;if(fQ==fN||typeof fN=="string"&&fQ.name==fN){fP.splice(fO,1);this.state.modeGen++;af(this);return}}}),indentLine:cR(function(fP,fN,fO){if(typeof fN!="string"&&typeof fN!="number"){if(fN==null){fN=this.options.smartIndent?"smart":"prev"}else{fN=fN?"add":"subtract"}}if(bW(this.doc,fP)){ab(this,fP,fN,fO)}}),indentSelection:cR(function(fS){var fO=this.doc.sel.ranges,fN=-1;for(var fR=0;fR<fO.length;fR++){var fP=fO[fR];if(!fP.empty()){var fU=Math.max(fN,fP.from().line);var fT=fP.to();fN=Math.min(this.lastLine(),fT.line-(fT.ch?0:1))+1;for(var fQ=fU;fQ<fN;++fQ){ab(this,fQ,fS)}}else{if(fP.head.line>fN){ab(this,fP.head.line,fS,true);fN=fP.head.line;if(fR==this.doc.sel.primIndex){fg(this)}}}}}),getTokenAt:function(fU,fO){var fR=this.doc;fU=fj(fR,fU);var fQ=dg(this,fU.line,fO),fT=this.doc.mode;var fN=eP(fR,fU.line);var fS=new ew(fN.text,this.options.tabSize);while(fS.pos<fU.ch&&!fS.eol()){fS.start=fS.pos;var fP=ef(fT,fS,fQ)}return{start:fS.start,end:fS.pos,string:fS.current(),type:fP||null,state:fQ}},getTokenTypeAt:function(fU){fU=fj(this.doc,fU);var fQ=cQ(this,eP(this.doc,fU.line));var fS=0,fT=(fQ.length-1)/2,fP=fU.ch;var fO;if(fP==0){fO=fQ[2]}else{for(;;){var fN=(fS+fT)>>1;if((fN?fQ[fN*2-1]:0)>=fP){fT=fN}else{if(fQ[fN*2+1]<fP){fS=fN+1}else{fO=fQ[fN*2+2];break}}}}var fR=fO?fO.indexOf("cm-overlay "):-1;return fR<0?fO:fR==0?null:fO.slice(0,fR-1)},getModeAt:function(fO){var fN=this.doc.mode;if(!fN.innerMode){return fN}return I.innerMode(fN,this.getTokenAt(fO).state).mode},getHelper:function(fO,fN){return this.getHelpers(fO,fN)[0]},getHelpers:function(fU,fP){var fQ=[];if(!eY.hasOwnProperty(fP)){return eY}var fN=eY[fP],fT=this.getModeAt(fU);if(typeof fT[fP]=="string"){if(fN[fT[fP]]){fQ.push(fN[fT[fP]])}}else{if(fT[fP]){for(var fO=0;fO<fT[fP].length;fO++){var fS=fN[fT[fP][fO]];if(fS){fQ.push(fS)}}}else{if(fT.helperType&&fN[fT.helperType]){fQ.push(fN[fT.helperType])}else{if(fN[fT.name]){fQ.push(fN[fT.name])}}}}for(var fO=0;fO<fN._global.length;fO++){var fR=fN._global[fO];if(fR.pred(fT,this)&&c1(fQ,fR.val)==-1){fQ.push(fR.val)}}return fQ},getStateAfter:function(fO,fN){var fP=this.doc;fO=cO(fP,fO==null?fP.first+fP.size-1:fO);return dg(this,fO+1,fN)},cursorCoords:function(fQ,fO){var fP,fN=this.doc.sel.primary();if(fQ==null){fP=fN.head}else{if(typeof fQ=="object"){fP=fj(this.doc,fQ)}else{fP=fQ?fN.from():fN.to()}}return dx(this,fP,fO||"page")},charCoords:function(fO,fN){return cx(this,fj(this.doc,fO),fN||"page")},coordsChar:function(fN,fO){fN=fJ(this,fN,fO||"page");return fo(this,fN.left,fN.top)},lineAtHeight:function(fN,fO){fN=fJ(this,{top:fN,left:0},fO||"page").top;return bv(this.doc,fN+this.display.viewOffset)},heightAtLine:function(fO,fR){var fN=false,fQ=this.doc.first+this.doc.size-1;if(fO<this.doc.first){fO=this.doc.first}else{if(fO>fQ){fO=fQ;fN=true}}var fP=eP(this.doc,fO);return et(this,fP,{top:0,left:0},fR||"page").top+(fN?this.doc.height-bB(fP):0)},defaultTextHeight:function(){return aN(this.display)},defaultCharWidth:function(){return di(this.display)},setGutterMarker:cR(function(fN,fO,fP){return eb(this,fN,"gutter",function(fQ){var fR=fQ.gutterMarkers||(fQ.gutterMarkers={});fR[fO]=fP;if(!fP&&ex(fR)){fQ.gutterMarkers=null}return true})}),clearGutter:cR(function(fP){var fN=this,fQ=fN.doc,fO=fQ.first;fQ.iter(function(fR){if(fR.gutterMarkers&&fR.gutterMarkers[fP]){fR.gutterMarkers[fP]=null;R(fN,fO,"gutter");if(ex(fR.gutterMarkers)){fR.gutterMarkers=null}}++fO})}),addLineClass:cR(function(fP,fO,fN){return eb(this,fP,"class",function(fQ){var fR=fO=="text"?"textClass":fO=="background"?"bgClass":"wrapClass";if(!fQ[fR]){fQ[fR]=fN}else{if(new RegExp("(?:^|\\s)"+fN+"(?:$|\\s)").test(fQ[fR])){return false}else{fQ[fR]+=" "+fN}}return true})}),removeLineClass:cR(function(fP,fO,fN){return eb(this,fP,"class",function(fR){var fU=fO=="text"?"textClass":fO=="background"?"bgClass":"wrapClass";var fT=fR[fU];if(!fT){return false}else{if(fN==null){fR[fU]=null}else{var fS=fT.match(new RegExp("(?:^|\\s+)"+fN+"(?:$|\\s+)"));if(!fS){return false}var fQ=fS.index+fS[0].length;fR[fU]=fT.slice(0,fS.index)+(!fS.index||fQ==fT.length?"":" ")+fT.slice(fQ)||null}}return true})}),addLineWidget:cR(function(fP,fO,fN){return bw(this,fP,fO,fN)}),removeLineWidget:function(fN){fN.clear()},lineInfo:function(fN){if(typeof fN=="number"){if(!bW(this.doc,fN)){return null}var fO=fN;fN=eP(this.doc,fN);if(!fN){return null}}else{var fO=bC(fN);if(fO==null){return null}}return{line:fO,handle:fN,text:fN.text,gutterMarkers:fN.gutterMarkers,textClass:fN.textClass,bgClass:fN.bgClass,wrapClass:fN.wrapClass,widgets:fN.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fS,fP,fU,fQ,fW){var fR=this.display;fS=dx(this,fj(this.doc,fS));var fT=fS.bottom,fO=fS.left;fP.style.position="absolute";fR.sizer.appendChild(fP);if(fQ=="over"){fT=fS.top}else{if(fQ=="above"||fQ=="near"){var fN=Math.max(fR.wrapper.clientHeight,this.doc.height),fV=Math.max(fR.sizer.clientWidth,fR.lineSpace.clientWidth);if((fQ=="above"||fS.bottom+fP.offsetHeight>fN)&&fS.top>fP.offsetHeight){fT=fS.top-fP.offsetHeight}else{if(fS.bottom+fP.offsetHeight<=fN){fT=fS.bottom}}if(fO+fP.offsetWidth>fV){fO=fV-fP.offsetWidth}}}fP.style.top=fT+"px";fP.style.left=fP.style.right="";if(fW=="right"){fO=fR.sizer.clientWidth-fP.offsetWidth;fP.style.right="0px"}else{if(fW=="left"){fO=0}else{if(fW=="middle"){fO=(fR.sizer.clientWidth-fP.offsetWidth)/2}}fP.style.left=fO+"px"}if(fU){F(this,fO,fT,fO+fP.offsetWidth,fT+fP.offsetHeight)}},triggerOnKeyDown:cR(q),triggerOnKeyPress:cR(cn),triggerOnKeyUp:cR(a7),execCommand:function(fN){if(eh.hasOwnProperty(fN)){return eh[fN](this)}},findPosH:function(fT,fQ,fR,fO){var fN=1;if(fQ<0){fN=-1;fQ=-fQ}for(var fP=0,fS=fj(this.doc,fT);fP<fQ;++fP){fS=bm(this.doc,fS,fN,fR,fO);if(fS.hitSide){break}}return fS},moveH:cR(function(fO,fP){var fN=this;fN.extendSelectionsBy(function(fQ){if(fN.display.shift||fN.doc.extend||fQ.empty()){return bm(fN.doc,fQ.head,fO,fP,fN.options.rtlMoveVisually)}else{return fO<0?fQ.from():fQ.to()}},cF)}),deleteH:cR(function(fN,fO){var fP=this.doc.sel,fQ=this.doc;if(fP.somethingSelected()){fQ.replaceSelection("",null,"+delete")}else{eA(this,function(fS){var fR=bm(fQ,fS.head,fN,fO,false);return fN<0?{from:fR,to:fS.head}:{from:fS.head,to:fR}})}}),findPosV:function(fS,fP,fT,fV){var fN=1,fR=fV;if(fP<0){fN=-1;fP=-fP}for(var fO=0,fU=fj(this.doc,fS);fO<fP;++fO){var fQ=dx(this,fU,"div");if(fR==null){fR=fQ.left}else{fQ.left=fR}fU=bg(this,fQ,fN,fT);if(fU.hitSide){break}}return fU},moveV:cR(function(fO,fQ){var fN=this,fS=this.doc,fR=[];var fT=!fN.display.shift&&!fS.extend&&fS.sel.somethingSelected();fS.extendSelectionsBy(function(fU){if(fT){return fO<0?fU.from():fU.to()}var fW=dx(fN,fU.head,"div");if(fU.goalColumn!=null){fW.left=fU.goalColumn}fR.push(fW.left);var fV=bg(fN,fW,fO,fQ);if(fQ=="page"&&fU==fS.sel.primary()){cy(fN,null,cx(fN,fV,"div").top-fW.top)}return fV},cF);if(fR.length){for(var fP=0;fP<fS.sel.ranges.length;fP++){fS.sel.ranges[fP].goalColumn=fR[fP]}}}),toggleOverwrite:function(fN){if(fN!=null&&fN==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){fb(this.display.cursorDiv,"CodeMirror-overwrite")}else{g(this.display.cursorDiv,"CodeMirror-overwrite")}az(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return ds()==this.display.input},scrollTo:cR(function(fN,fO){if(fN!=null||fO!=null){fd(this)}if(fN!=null){this.curOp.scrollLeft=fN}if(fO!=null){this.curOp.scrollTop=fO}}),getScrollInfo:function(){var fN=this.display.scroller,fO=ba;return{left:fN.scrollLeft,top:fN.scrollTop,height:fN.scrollHeight-fO,width:fN.scrollWidth-fO,clientHeight:fN.clientHeight-fO,clientWidth:fN.clientWidth-fO}},scrollIntoView:cR(function(fO,fP){if(fO==null){fO={from:this.doc.sel.primary().head,to:null};if(fP==null){fP=this.options.cursorScrollMargin}}else{if(typeof fO=="number"){fO={from:W(fO,0),to:null}}else{if(fO.from==null){fO={from:fO,to:null}}}}if(!fO.to){fO.to=fO.from}fO.margin=fP||0;if(fO.from.line!=null){fd(this);this.curOp.scrollToPos=fO}else{var fN=H(this,Math.min(fO.from.left,fO.to.left),Math.min(fO.from.top,fO.to.top)-fO.margin,Math.max(fO.from.right,fO.to.right),Math.max(fO.from.bottom,fO.to.bottom)+fO.margin);this.scrollTo(fN.scrollLeft,fN.scrollTop)}}),setSize:cR(function(fP,fN){function fO(fQ){return typeof fQ=="number"||/^\d+$/.test(String(fQ))?fQ+"px":fQ}if(fP!=null){this.display.wrapper.style.width=fO(fP)}if(fN!=null){this.display.wrapper.style.height=fO(fN)}if(this.options.lineWrapping){aF(this)}this.curOp.forceUpdate=true;az(this,"refresh",this)}),operation:function(fN){return cz(this,fN)},refresh:cR(function(){var fN=this.display.cachedTextHeight;af(this);this.curOp.forceUpdate=true;ai(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);cN(this);if(fN==null||Math.abs(fN-aN(this.display))>0.5){X(this)}az(this,"refresh",this)}),swapDoc:cR(function(fO){var fN=this.doc;fN.cm=null;dN(this,fO);ai(this);eZ(this);this.scrollTo(fO.scrollLeft,fO.scrollTop);ac(this,"swapDoc",this,fN);return fN}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};bo(I);var eF=I.defaults={};var a4=I.optionHandlers={};function t(fN,fQ,fP,fO){I.defaults[fN]=fQ;if(fP){a4[fN]=fO?function(fR,fT,fS){if(fS!=b2){fP(fR,fT,fS)}}:fP}}var b2=I.Init={toString:function(){return"CodeMirror.Init"}};t("value","",function(fN,fO){fN.setValue(fO)},true);t("mode",null,function(fN,fO){fN.doc.modeOption=fO;bh(fN)},true);t("indentUnit",2,bh,true);t("indentWithTabs",false);t("smartIndent",true);t("tabSize",4,function(fN){dX(fN);ai(fN);af(fN)},true);t("specialChars",/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g,function(fN,fO){fN.options.specialChars=new RegExp(fO.source+(fO.test("\t")?"":"|\t"),"g");fN.refresh()},true);t("specialCharPlaceholder",eN,function(fN){fN.refresh()},true);t("electricChars",true);t("rtlMoveVisually",!aG);t("wholeLineUpdateBefore",true);t("theme","default",function(fN){cB(fN);db(fN)},true);t("keyMap","default",fK);t("extraKeys",null);t("lineWrapping",false,ek,true);t("gutters",[],function(fN){b4(fN.options);db(fN)},true);t("fixedGutter",true,function(fN,fO){fN.display.gutters.style.left=fO?dA(fN.display)+"px":"0";fN.refresh()},true);t("coverGutterNextToScrollbar",false,eB,true);t("lineNumbers",false,function(fN){b4(fN.options);db(fN)},true);t("firstLineNumber",1,db,true);t("lineNumberFormatter",function(fN){return fN},db,true);t("showCursorWhenSelecting",false,br,true);t("resetSelectionOnContextMenu",true);t("readOnly",false,function(fN,fO){if(fO=="nocursor"){aL(fN);fN.display.input.blur();fN.display.disabled=true}else{fN.display.disabled=false;if(!fO){eZ(fN)}}});t("disableInput",false,function(fN,fO){if(!fO){eZ(fN)}},true);t("dragDrop",true);t("cursorBlinkRate",530);t("cursorScrollMargin",0);t("cursorHeight",1);t("workTime",100);t("workDelay",100);t("flattenSpans",true,dX,true);t("addModeClass",false,dX,true);t("pollInterval",100);t("undoDepth",200,function(fN,fO){fN.doc.history.undoDepth=fO});t("historyEventDelay",1250);t("viewportMargin",10,function(fN){fN.refresh()},true);t("maxHighlightLength",10000,dX,true);t("moveInputWithCursor",true,function(fN,fO){if(!fO){fN.display.inputDiv.style.top=fN.display.inputDiv.style.left=0}});t("tabindex",null,function(fN,fO){fN.display.input.tabIndex=fO||""});t("autofocus",null);var c8=I.modes={},aJ=I.mimeModes={};I.defineMode=function(fN,fP){if(!I.defaults.mode&&fN!="null"){I.defaults.mode=fN}if(arguments.length>2){fP.dependencies=[];for(var fO=2;fO<arguments.length;++fO){fP.dependencies.push(arguments[fO])}}c8[fN]=fP};I.defineMIME=function(fO,fN){aJ[fO]=fN};I.resolveMode=function(fN){if(typeof fN=="string"&&aJ.hasOwnProperty(fN)){fN=aJ[fN]}else{if(fN&&typeof fN.name=="string"&&aJ.hasOwnProperty(fN.name)){var fO=aJ[fN.name];if(typeof fO=="string"){fO={name:fO}}fN=ca(fO,fN);fN.name=fO.name}else{if(typeof fN=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(fN)){return I.resolveMode("application/xml")}}}if(typeof fN=="string"){return{name:fN}}else{return fN||{name:"null"}}};I.getMode=function(fO,fN){var fN=I.resolveMode(fN);var fQ=c8[fN.name];if(!fQ){return I.getMode(fO,"text/plain")}var fR=fQ(fO,fN);if(c5.hasOwnProperty(fN.name)){var fP=c5[fN.name];for(var fS in fP){if(!fP.hasOwnProperty(fS)){continue}if(fR.hasOwnProperty(fS)){fR["_"+fS]=fR[fS]}fR[fS]=fP[fS]}}fR.name=fN.name;if(fN.helperType){fR.helperType=fN.helperType}if(fN.modeProps){for(var fS in fN.modeProps){fR[fS]=fN.modeProps[fS]}}return fR};I.defineMode("null",function(){return{token:function(fN){fN.skipToEnd()}}});I.defineMIME("text/plain","null");var c5=I.modeExtensions={};I.extendMode=function(fP,fO){var fN=c5.hasOwnProperty(fP)?c5[fP]:(c5[fP]={});aE(fO,fN)};I.defineExtension=function(fN,fO){I.prototype[fN]=fO};I.defineDocExtension=function(fN,fO){ao.prototype[fN]=fO};I.defineOption=t;var aY=[];I.defineInitHook=function(fN){aY.push(fN)};var eY=I.helpers={};I.registerHelper=function(fO,fN,fP){if(!eY.hasOwnProperty(fO)){eY[fO]=I[fO]={_global:[]}}eY[fO][fN]=fP};I.registerGlobalHelper=function(fP,fO,fN,fQ){I.registerHelper(fP,fO,fQ);eY[fP]._global.push({pred:fN,val:fQ})};var bR=I.copyState=function(fQ,fN){if(fN===true){return fN}if(fQ.copyState){return fQ.copyState(fN)}var fP={};for(var fR in fN){var fO=fN[fR];if(fO instanceof Array){fO=fO.concat([])}fP[fR]=fO}return fP};var bP=I.startState=function(fP,fO,fN){return fP.startState?fP.startState(fO,fN):true};I.innerMode=function(fP,fN){while(fP.innerMode){var fO=fP.innerMode(fN);if(!fO||fO.mode==fP){break}fN=fO.state;fP=fO.mode}return fO||{mode:fP,state:fN}};var eh=I.commands={selectAll:function(fN){fN.setSelection(W(fN.firstLine(),0),W(fN.lastLine()),Y)},singleSelection:function(fN){fN.setSelection(fN.getCursor("anchor"),fN.getCursor("head"),Y)},killLine:function(fN){eA(fN,function(fP){if(fP.empty()){var fO=eP(fN.doc,fP.head.line).text.length;if(fP.head.ch==fO&&fP.head.line<fN.lastLine()){return{from:fP.head,to:W(fP.head.line+1,0)}}else{return{from:fP.head,to:W(fP.head.line,fO)}}}else{return{from:fP.from(),to:fP.to()}}})},deleteLine:function(fN){eA(fN,function(fO){return{from:W(fO.from().line,0),to:fj(fN.doc,W(fO.to().line+1,0))}})},delLineLeft:function(fN){eA(fN,function(fO){return{from:W(fO.from().line,0),to:fO.from()}})},undo:function(fN){fN.undo()},redo:function(fN){fN.redo()},undoSelection:function(fN){fN.undoSelection()},redoSelection:function(fN){fN.redoSelection()},goDocStart:function(fN){fN.extendSelection(W(fN.firstLine(),0))},goDocEnd:function(fN){fN.extendSelection(W(fN.lastLine()))},goLineStart:function(fN){fN.extendSelectionsBy(function(fO){return bj(fN,fO.head.line)},cF)},goLineStartSmart:function(fN){fN.extendSelectionsBy(function(fQ){var fT=bj(fN,fQ.head.line);var fP=fN.getLineHandle(fT.line);var fO=a(fP);if(!fO||fO[0].level==0){var fS=Math.max(0,fP.text.search(/\S/));var fR=fQ.head.line==fT.line&&fQ.head.ch<=fS&&fQ.head.ch;return W(fT.line,fR?0:fS)}return fT},cF)},goLineEnd:function(fN){fN.extendSelectionsBy(function(fO){return dt(fN,fO.head.line)},cF)},goLineRight:function(fN){fN.extendSelectionsBy(function(fO){var fP=fN.charCoords(fO.head,"div").top+5;return fN.coordsChar({left:fN.display.lineDiv.offsetWidth+100,top:fP},"div")},cF)},goLineLeft:function(fN){fN.extendSelectionsBy(function(fO){var fP=fN.charCoords(fO.head,"div").top+5;return fN.coordsChar({left:0,top:fP},"div")},cF)},goLineUp:function(fN){fN.moveV(-1,"line")},goLineDown:function(fN){fN.moveV(1,"line")},goPageUp:function(fN){fN.moveV(-1,"page")},goPageDown:function(fN){fN.moveV(1,"page")},goCharLeft:function(fN){fN.moveH(-1,"char")},goCharRight:function(fN){fN.moveH(1,"char")},goColumnLeft:function(fN){fN.moveH(-1,"column")},goColumnRight:function(fN){fN.moveH(1,"column")},goWordLeft:function(fN){fN.moveH(-1,"word")},goGroupRight:function(fN){fN.moveH(1,"group")},goGroupLeft:function(fN){fN.moveH(-1,"group")},goWordRight:function(fN){fN.moveH(1,"word")},delCharBefore:function(fN){fN.deleteH(-1,"char")},delCharAfter:function(fN){fN.deleteH(1,"char")},delWordBefore:function(fN){fN.deleteH(-1,"word")},delWordAfter:function(fN){fN.deleteH(1,"word")},delGroupBefore:function(fN){fN.deleteH(-1,"group")},delGroupAfter:function(fN){fN.deleteH(1,"group")},indentAuto:function(fN){fN.indentSelection("smart")},indentMore:function(fN){fN.indentSelection("add")},indentLess:function(fN){fN.indentSelection("subtract")},insertTab:function(fN){fN.replaceSelection("\t")},insertSoftTab:function(fN){var fP=[],fO=fN.listSelections(),fS=fN.options.tabSize;for(var fR=0;fR<fO.length;fR++){var fT=fO[fR].from();var fQ=bI(fN.getLine(fT.line),fT.ch,fS);fP.push(new Array(fS-fQ%fS+1).join(" "))}fN.replaceSelections(fP)},defaultTab:function(fN){if(fN.somethingSelected()){fN.indentSelection("add")}else{fN.execCommand("insertTab")}},transposeChars:function(fN){cz(fN,function(){var fP=fN.listSelections();for(var fQ=0;fQ<fP.length;fQ++){var fR=fP[fQ].head,fO=eP(fN.doc,fR.line).text;if(fR.ch>0&&fR.ch<fO.length-1){fN.replaceRange(fO.charAt(fR.ch)+fO.charAt(fR.ch-1),W(fR.line,fR.ch-1),W(fR.line,fR.ch+1))}}})},newlineAndIndent:function(fN){cz(fN,function(){var fO=fN.listSelections().length;for(var fQ=0;fQ<fO;fQ++){var fP=fN.listSelections()[fQ];fN.replaceRange("\n",fP.anchor,fP.head,"+input");fN.indentLine(fP.from().line+1,null,true);fg(fN)}})},toggleOverwrite:function(fN){fN.toggleOverwrite()}};var eK=I.keyMap={};eK.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"};eK.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-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","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"};eK.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","Cmd-Backspace":"delLineLeft","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection",fallthrough:["basic","emacsy"]};eK.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"};eK["default"]=bU?eK.macDefault:eK.pcDefault;function fu(fN){if(typeof fN=="string"){return eK[fN]}else{return fN}}var j=I.lookupKey=function(fO,fS,fQ){function fR(fX){fX=fu(fX);var fW=fX[fO];if(fW===false){return"stop"}if(fW!=null&&fQ(fW)){return true}if(fX.nofallthrough){return"stop"}var fV=fX.fallthrough;if(fV==null){return false}if(Object.prototype.toString.call(fV)!="[object Array]"){return fR(fV)}for(var fU=0;fU<fV.length;++fU){var fT=fR(fV[fU]);if(fT){return fT}}return false}for(var fP=0;fP<fS.length;++fP){var fN=fR(fS[fP]);if(fN){return fN!="stop"}}};var eg=I.isModifierKey=function(fO){var fN=eQ[fO.keyCode];return fN=="Ctrl"||fN=="Alt"||fN=="Shift"||fN=="Mod"};var e2=I.keyName=function(fO,fP){if(dF&&fO.keyCode==34&&fO["char"]){return false}var fN=eQ[fO.keyCode];if(fN==null||fO.altGraphKey){return false}if(fO.altKey){fN="Alt-"+fN}if(bF?fO.metaKey:fO.ctrlKey){fN="Ctrl-"+fN}if(bF?fO.ctrlKey:fO.metaKey){fN="Cmd-"+fN}if(!fP&&fO.shiftKey){fN="Shift-"+fN}return fN};I.fromTextArea=function(fU,fV){if(!fV){fV={}}fV.value=fU.value;if(!fV.tabindex&&fU.tabindex){fV.tabindex=fU.tabindex}if(!fV.placeholder&&fU.placeholder){fV.placeholder=fU.placeholder}if(fV.autofocus==null){var fN=ds();fV.autofocus=fN==fU||fU.getAttribute("autofocus")!=null&&fN==document.body}function fR(){fU.value=fT.getValue()}if(fU.form){bM(fU.form,"submit",fR);if(!fV.leaveSubmitMethodAlone){var fO=fU.form,fS=fO.submit;try{var fQ=fO.submit=function(){fR();fO.submit=fS;fO.submit();fO.submit=fQ}}catch(fP){}}}fU.style.display="none";var fT=I(function(fW){fU.parentNode.insertBefore(fW,fU.nextSibling)},fV);fT.save=fR;fT.getTextArea=function(){return fU};fT.toTextArea=function(){fR();fU.parentNode.removeChild(fT.getWrapperElement());fU.style.display="";if(fU.form){dP(fU.form,"submit",fR);if(typeof fU.form.submit=="function"){fU.form.submit=fS}}};return fT};var ew=I.StringStream=function(fN,fO){this.pos=this.start=0;this.string=fN;this.tabSize=fO||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0};ew.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},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(fN){var fP=this.string.charAt(this.pos);if(typeof fN=="string"){var fO=fP==fN}else{var fO=fP&&(fN.test?fN.test(fP):fN(fP))}if(fO){++this.pos;return fP}},eatWhile:function(fN){var fO=this.pos;while(this.eat(fN)){}return this.pos>fO},eatSpace:function(){var fN=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>fN},skipToEnd:function(){this.pos=this.string.length},skipTo:function(fN){var fO=this.string.indexOf(fN,this.pos);if(fO>-1){this.pos=fO;return true}},backUp:function(fN){this.pos-=fN},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=bI(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?bI(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return bI(this.string,null,this.tabSize)-(this.lineStart?bI(this.string,this.lineStart,this.tabSize):0)},match:function(fR,fO,fN){if(typeof fR=="string"){var fS=function(fT){return fN?fT.toLowerCase():fT};var fQ=this.string.substr(this.pos,fR.length);if(fS(fQ)==fS(fR)){if(fO!==false){this.pos+=fR.length}return true}}else{var fP=this.string.slice(this.pos).match(fR);if(fP&&fP.index>0){return null}if(fP&&fO!==false){this.pos+=fP[0].length}return fP}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(fO,fN){this.lineStart+=fO;try{return fN()}finally{this.lineStart-=fO}}};var P=I.TextMarker=function(fO,fN){this.lines=[];this.type=fN;this.doc=fO};bo(P);P.prototype.clear=function(){if(this.explicitlyCleared){return}var fU=this.doc.cm,fO=fU&&!fU.curOp;if(fO){cw(fU)}if(eS(this,"clear")){var fV=this.find();if(fV){ac(this,"clear",fV.from,fV.to)}}var fP=null,fS=null;for(var fQ=0;fQ<this.lines.length;++fQ){var fW=this.lines[fQ];var fT=eJ(fW.markedSpans,this);if(fU&&!this.collapsed){R(fU,bC(fW),"text")}else{if(fU){if(fT.to!=null){fS=bC(fW)}if(fT.from!=null){fP=bC(fW)}}}fW.markedSpans=el(fW.markedSpans,fT);if(fT.from==null&&this.collapsed&&!e7(this.doc,fW)&&fU){fA(fW,aN(fU.display))}}if(fU&&this.collapsed&&!fU.options.lineWrapping){for(var fQ=0;fQ<this.lines.length;++fQ){var fN=z(this.lines[fQ]),fR=dY(fN);if(fR>fU.display.maxLineLength){fU.display.maxLine=fN;fU.display.maxLineLength=fR;fU.display.maxLineChanged=true}}}if(fP!=null&&fU&&this.collapsed){af(fU,fP,fS+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(fU){ea(fU.doc)}}if(fU){ac(fU,"markerCleared",fU,this)}if(fO){aj(fU)}if(this.parent){this.parent.clear()}};P.prototype.find=function(fQ,fO){if(fQ==null&&this.type=="bookmark"){fQ=1}var fT,fS;for(var fP=0;fP<this.lines.length;++fP){var fN=this.lines[fP];var fR=eJ(fN.markedSpans,this);if(fR.from!=null){fT=W(fO?fN:bC(fN),fR.from);if(fQ==-1){return fT}}if(fR.to!=null){fS=W(fO?fN:bC(fN),fR.to);if(fQ==1){return fS}}}return fT&&{from:fT,to:fS}};P.prototype.changed=function(){var fP=this.find(-1,true),fO=this,fN=this.doc.cm;if(!fP||!fN){return}cz(fN,function(){var fR=fP.line,fS=bC(fP.line);var fQ=eL(fN,fS);if(fQ){ap(fQ);fN.curOp.selectionChanged=fN.curOp.forceUpdate=true}fN.curOp.updateMaxLine=true;if(!e7(fO.doc,fR)&&fO.height!=null){var fU=fO.height;fO.height=null;var fT=cH(fO)-fU;if(fT){fA(fR,fR.height+fT)}}})};P.prototype.attachLine=function(fN){if(!this.lines.length&&this.doc.cm){var fO=this.doc.cm.curOp;if(!fO.maybeHiddenMarkers||c1(fO.maybeHiddenMarkers,this)==-1){(fO.maybeUnhiddenMarkers||(fO.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(fN)};P.prototype.detachLine=function(fN){this.lines.splice(c1(this.lines,fN),1);if(!this.lines.length&&this.doc.cm){var fO=this.doc.cm.curOp;(fO.maybeHiddenMarkers||(fO.maybeHiddenMarkers=[])).push(this)}};var aV=0;function ej(fV,fT,fU,fX,fR){if(fX&&fX.shared){return O(fV,fT,fU,fX,fR)}if(fV.cm&&!fV.cm.curOp){return cL(fV.cm,ej)(fV,fT,fU,fX,fR)}var fQ=new P(fV,fR),fW=b5(fT,fU);if(fX){aE(fX,fQ,false)}if(fW>0||fW==0&&fQ.clearWhenEmpty!==false){return fQ}if(fQ.replacedWith){fQ.collapsed=true;fQ.widgetNode=fw("span",[fQ.replacedWith],"CodeMirror-widget");if(!fX.handleMouseEvents){fQ.widgetNode.ignoreEvents=true}if(fX.insertLeft){fQ.widgetNode.insertLeft=true}}if(fQ.collapsed){if(A(fV,fT.line,fT,fU,fQ)||fT.line!=fU.line&&A(fV,fU.line,fT,fU,fQ)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}aX=true}if(fQ.addToHistory){fm(fV,{from:fT,to:fU,origin:"markText"},fV.sel,NaN)}var fO=fT.line,fS=fV.cm,fN;fV.iter(fO,fU.line+1,function(fY){if(fS&&fQ.collapsed&&!fS.options.lineWrapping&&z(fY)==fS.display.maxLine){fN=true}if(fQ.collapsed&&fO!=fT.line){fA(fY,0)}b3(fY,new dU(fQ,fO==fT.line?fT.ch:null,fO==fU.line?fU.ch:null));++fO});if(fQ.collapsed){fV.iter(fT.line,fU.line+1,function(fY){if(e7(fV,fY)){fA(fY,0)}})}if(fQ.clearOnEnter){bM(fQ,"beforeCursorEnter",function(){fQ.clear()})}if(fQ.readOnly){fH=true;if(fV.history.done.length||fV.history.undone.length){fV.clearHistory()}}if(fQ.collapsed){fQ.id=++aV;fQ.atomic=true}if(fS){if(fN){fS.curOp.updateMaxLine=true}if(fQ.collapsed){af(fS,fT.line,fU.line+1)}else{if(fQ.className||fQ.title||fQ.startStyle||fQ.endStyle){for(var fP=fT.line;fP<=fU.line;fP++){R(fS,fP,"text")}}}if(fQ.atomic){ea(fS.doc)}ac(fS,"markerAdded",fS,fQ)}return fQ}var y=I.SharedTextMarker=function(fP,fO){this.markers=fP;this.primary=fO;for(var fN=0;fN<fP.length;++fN){fP[fN].parent=this}};bo(y);y.prototype.clear=function(){if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var fN=0;fN<this.markers.length;++fN){this.markers[fN].clear()}ac(this,"clear")};y.prototype.find=function(fO,fN){return this.primary.find(fO,fN)};function O(fR,fU,fT,fN,fP){fN=aE(fN);fN.shared=false;var fS=[ej(fR,fU,fT,fN,fP)],fO=fS[0];var fQ=fN.widgetNode;dK(fR,function(fW){if(fQ){fN.widgetNode=fQ.cloneNode(true)}fS.push(ej(fW,fj(fW,fU),fj(fW,fT),fN,fP));for(var fV=0;fV<fW.linked.length;++fV){if(fW.linked[fV].isParent){return}}fO=fh(fS)});return new y(fS,fO)}function es(fN){return fN.findMarks(W(fN.first,0),fN.clipPos(W(fN.lastLine())),function(fO){return fO.parent})}function dk(fS,fT){for(var fQ=0;fQ<fT.length;fQ++){var fO=fT[fQ],fU=fO.find();var fN=fS.clipPos(fU.from),fR=fS.clipPos(fU.to);if(b5(fN,fR)){var fP=ej(fS,fN,fR,fO.primary,fO.primary.type);fO.markers.push(fP);fP.parent=fO}}}function d0(fQ){for(var fP=0;fP<fQ.length;fP++){var fN=fQ[fP],fS=[fN.primary.doc];dK(fN.primary.doc,function(fT){fS.push(fT)});for(var fO=0;fO<fN.markers.length;fO++){var fR=fN.markers[fO];if(c1(fS,fR.doc)==-1){fR.parent=null;fN.markers.splice(fO--,1)}}}}function dU(fN,fP,fO){this.marker=fN;this.from=fP;this.to=fO}function eJ(fP,fN){if(fP){for(var fO=0;fO<fP.length;++fO){var fQ=fP[fO];if(fQ.marker==fN){return fQ}}}}function el(fO,fP){for(var fQ,fN=0;fN<fO.length;++fN){if(fO[fN]!=fP){(fQ||(fQ=[])).push(fO[fN])}}return fQ}function b3(fN,fO){fN.markedSpans=fN.markedSpans?fN.markedSpans.concat([fO]):[fO];fO.marker.attachLine(fN)}function aH(fO,fP,fT){if(fO){for(var fR=0,fU;fR<fO.length;++fR){var fV=fO[fR],fS=fV.marker;var fN=fV.from==null||(fS.inclusiveLeft?fV.from<=fP:fV.from<fP);if(fN||fV.from==fP&&fS.type=="bookmark"&&(!fT||!fV.marker.insertLeft)){var fQ=fV.to==null||(fS.inclusiveRight?fV.to>=fP:fV.to>fP);(fU||(fU=[])).push(new dU(fS,fV.from,fQ?null:fV.to))}}}return fU}function ax(fO,fQ,fT){if(fO){for(var fR=0,fU;fR<fO.length;++fR){var fV=fO[fR],fS=fV.marker;var fP=fV.to==null||(fS.inclusiveRight?fV.to>=fQ:fV.to>fQ);if(fP||fV.from==fQ&&fS.type=="bookmark"&&(!fT||fV.marker.insertLeft)){var fN=fV.from==null||(fS.inclusiveLeft?fV.from<=fQ:fV.from<fQ);(fU||(fU=[])).push(new dU(fS,fN?null:fV.from-fQ,fV.to==null?null:fV.to-fQ))}}}return fU}function dW(fZ,fW){var fV=bW(fZ,fW.from.line)&&eP(fZ,fW.from.line).markedSpans;var f2=bW(fZ,fW.to.line)&&eP(fZ,fW.to.line).markedSpans;if(!fV&&!f2){return null}var fO=fW.from.ch,fR=fW.to.ch,fU=b5(fW.from,fW.to)==0;var fT=aH(fV,fO,fU);var f1=ax(f2,fR,fU);var f0=fW.text.length==1,fP=fh(fW.text).length+(f0?fO:0);if(fT){for(var fQ=0;fQ<fT.length;++fQ){var fY=fT[fQ];if(fY.to==null){var f3=eJ(f1,fY.marker);if(!f3){fY.to=fO}else{if(f0){fY.to=f3.to==null?null:f3.to+fP}}}}}if(f1){for(var fQ=0;fQ<f1.length;++fQ){var fY=f1[fQ];if(fY.to!=null){fY.to+=fP}if(fY.from==null){var f3=eJ(fT,fY.marker);if(!f3){fY.from=fP;if(f0){(fT||(fT=[])).push(fY)}}}else{fY.from+=fP;if(f0){(fT||(fT=[])).push(fY)}}}}if(fT){fT=r(fT)}if(f1&&f1!=fT){f1=r(f1)}var fS=[fT];if(!f0){var fX=fW.text.length-2,fN;if(fX>0&&fT){for(var fQ=0;fQ<fT.length;++fQ){if(fT[fQ].to==null){(fN||(fN=[])).push(new dU(fT[fQ].marker,null,null))}}}for(var fQ=0;fQ<fX;++fQ){fS.push(fN)}fS.push(f1)}return fS}function r(fO){for(var fN=0;fN<fO.length;++fN){var fP=fO[fN];if(fP.from!=null&&fP.from==fP.to&&fP.marker.clearWhenEmpty!==false){fO.splice(fN--,1)}}if(!fO.length){return null}return fO}function dM(fV,fT){var fN=bS(fV,fT);var fW=dW(fV,fT);if(!fN){return fW}if(!fW){return fN}for(var fQ=0;fQ<fN.length;++fQ){var fR=fN[fQ],fS=fW[fQ];if(fR&&fS){spans:for(var fP=0;fP<fS.length;++fP){var fU=fS[fP];for(var fO=0;fO<fR.length;++fO){if(fR[fO].marker==fU.marker){continue spans}}fR.push(fU)}}else{if(fS){fN[fQ]=fS}}}return fN}function cv(fZ,fX,fY){var fR=null;fZ.iter(fX.line,fY.line+1,function(f0){if(f0.markedSpans){for(var f1=0;f1<f0.markedSpans.length;++f1){var f2=f0.markedSpans[f1].marker;if(f2.readOnly&&(!fR||c1(fR,f2)==-1)){(fR||(fR=[])).push(f2)}}}});if(!fR){return null}var fS=[{from:fX,to:fY}];for(var fT=0;fT<fR.length;++fT){var fU=fR[fT],fP=fU.find(0);for(var fQ=0;fQ<fS.length;++fQ){var fO=fS[fQ];if(b5(fO.to,fP.from)<0||b5(fO.from,fP.to)>0){continue}var fW=[fQ,1],fN=b5(fO.from,fP.from),fV=b5(fO.to,fP.to);if(fN<0||!fU.inclusiveLeft&&!fN){fW.push({from:fO.from,to:fP.from})}if(fV>0||!fU.inclusiveRight&&!fV){fW.push({from:fP.to,to:fO.to})}fS.splice.apply(fS,fW);fQ+=fW.length-1}}return fS}function fD(fN){var fP=fN.markedSpans;if(!fP){return}for(var fO=0;fO<fP.length;++fO){fP[fO].marker.detachLine(fN)}fN.markedSpans=null}function cM(fN,fP){if(!fP){return}for(var fO=0;fO<fP.length;++fO){fP[fO].marker.attachLine(fN)}fN.markedSpans=fP}function w(fN){return fN.inclusiveLeft?-1:0}function bL(fN){return fN.inclusiveRight?1:0}function du(fQ,fO){var fS=fQ.lines.length-fO.lines.length;if(fS!=0){return fS}var fP=fQ.find(),fT=fO.find();var fN=b5(fP.from,fT.from)||w(fQ)-w(fO);if(fN){return -fN}var fR=b5(fP.to,fT.to)||bL(fQ)-bL(fO);if(fR){return fR}return fO.id-fQ.id}function aW(fO,fS){var fN=aX&&fO.markedSpans,fR;if(fN){for(var fQ,fP=0;fP<fN.length;++fP){fQ=fN[fP];if(fQ.marker.collapsed&&(fS?fQ.from:fQ.to)==null&&(!fR||du(fR,fQ.marker)<0)){fR=fQ.marker}}}return fR}function er(fN){return aW(fN,true)}function d7(fN){return aW(fN,false)}function A(fV,fP,fT,fU,fR){var fY=eP(fV,fP);var fN=aX&&fY.markedSpans;if(fN){for(var fQ=0;fQ<fN.length;++fQ){var fO=fN[fQ];if(!fO.marker.collapsed){continue}var fX=fO.marker.find(0);var fW=b5(fX.from,fT)||w(fO.marker)-w(fR);var fS=b5(fX.to,fU)||bL(fO.marker)-bL(fR);if(fW>=0&&fS<=0||fW<=0&&fS>=0){continue}if(fW<=0&&(b5(fX.to,fT)||bL(fO.marker)-w(fR))>0||fW>=0&&(b5(fX.from,fU)||w(fO.marker)-bL(fR))<0){return true}}}}function z(fO){var fN;while(fN=er(fO)){fO=fN.find(-1,true).line}return fO}function i(fP){var fN,fO;while(fN=d7(fP)){fP=fN.find(1,true).line;(fO||(fO=[])).push(fP)}return fO}function aM(fQ,fO){var fN=eP(fQ,fO),fP=z(fN);if(fN==fP){return fO}return bC(fP)}function dG(fQ,fP){if(fP>fQ.lastLine()){return fP}var fO=eP(fQ,fP),fN;if(!e7(fQ,fO)){return fP}while(fN=d7(fO)){fO=fN.find(1,true).line}return bC(fO)+1}function e7(fR,fO){var fN=aX&&fO.markedSpans;if(fN){for(var fQ,fP=0;fP<fN.length;++fP){fQ=fN[fP];if(!fQ.marker.collapsed){continue}if(fQ.from==null){return true}if(fQ.marker.widgetNode){continue}if(fQ.from==0&&fQ.marker.inclusiveLeft&&T(fR,fO,fQ)){return true}}}}function T(fS,fO,fQ){if(fQ.to==null){var fN=fQ.marker.find(1,true);return T(fS,fN.line,eJ(fN.line.markedSpans,fQ.marker))}if(fQ.marker.inclusiveRight&&fQ.to==fO.text.length){return true}for(var fR,fP=0;fP<fO.markedSpans.length;++fP){fR=fO.markedSpans[fP];if(fR.marker.collapsed&&!fR.marker.widgetNode&&fR.from==fQ.to&&(fR.to==null||fR.to!=fQ.from)&&(fR.marker.inclusiveLeft||fQ.marker.inclusiveRight)&&T(fS,fO,fR)){return true}}}var dh=I.LineWidget=function(fN,fQ,fO){if(fO){for(var fP in fO){if(fO.hasOwnProperty(fP)){this[fP]=fO[fP]}}}this.cm=fN;this.node=fQ};bo(dh);function dD(fN,fO,fP){if(bB(fO)<((fN.curOp&&fN.curOp.scrollTop)||fN.doc.scrollTop)){cy(fN,null,fP)}}dh.prototype.clear=function(){var fO=this.cm,fQ=this.line.widgets,fP=this.line,fS=bC(fP);if(fS==null||!fQ){return}for(var fR=0;fR<fQ.length;++fR){if(fQ[fR]==this){fQ.splice(fR--,1)}}if(!fQ.length){fP.widgets=null}var fN=cH(this);cz(fO,function(){dD(fO,fP,-fN);R(fO,fS,"widget");fA(fP,Math.max(0,fP.height-fN))})};dh.prototype.changed=function(){var fO=this.height,fN=this.cm,fP=this.line;this.height=null;var fQ=cH(this)-fO;if(!fQ){return}cz(fN,function(){fN.curOp.forceUpdate=true;dD(fN,fP,fQ);fA(fP,fP.height+fQ)})};function cH(fN){if(fN.height!=null){return fN.height}if(!fF(document.body,fN.node)){bG(fN.cm.display.measure,fw("div",[fN.node],null,"position: relative"))}return fN.height=fN.node.offsetHeight}function bw(fN,fR,fP,fO){var fQ=new dh(fN,fP,fO);if(fQ.noHScroll){fN.display.alignWidgets=true}eb(fN,fR,"widget",function(fT){var fU=fT.widgets||(fT.widgets=[]);if(fQ.insertAt==null){fU.push(fQ)}else{fU.splice(Math.min(fU.length-1,Math.max(0,fQ.insertAt)),0,fQ)}fQ.line=fT;if(!e7(fN.doc,fT)){var fS=bB(fT)<fN.doc.scrollTop;fA(fT,fT.height+cH(fQ));if(fS){cy(fN,null,fQ.height)}fN.curOp.forceUpdate=true}return true});return fQ}var fC=I.Line=function(fP,fO,fN){this.text=fP;cM(this,fO);this.height=fN?fN(this):1};bo(fC);fC.prototype.lineNo=function(){return bC(this)};function dZ(fO,fR,fP,fN){fO.text=fR;if(fO.stateAfter){fO.stateAfter=null}if(fO.styles){fO.styles=null}if(fO.order!=null){fO.order=null}fD(fO);cM(fO,fP);var fQ=fN?fN(fO):1;if(fQ!=fO.height){fA(fO,fQ)}}function bq(fN){fN.parent=null;fD(fN)}function c2(fP,fO){if(fP){for(;;){var fN=fP.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!fN){break}fP=fP.slice(0,fN.index)+fP.slice(fN.index+fN[0].length);var fQ=fN[1]?"bgClass":"textClass";if(fO[fQ]==null){fO[fQ]=fN[2]}else{if(!(new RegExp("(?:^|s)"+fN[2]+"(?:$|s)")).test(fO[fQ])){fO[fQ]+=" "+fN[2]}}}}return fP}function e1(fP,fO){if(fP.blankLine){return fP.blankLine(fO)}if(!fP.innerMode){return}var fN=I.innerMode(fP,fO);if(fN.mode.blankLine){return fN.mode.blankLine(fN.state)}}function ef(fR,fQ,fP){for(var fN=0;fN<10;fN++){var fO=fR.token(fQ,fP);if(fQ.pos>fQ.start){return fO}}throw new Error("Mode "+fR.name+" failed to advance stream.")}function x(fX,fZ,fS,fO,fT,fQ,fR){var fP=fS.flattenSpans;if(fP==null){fP=fX.options.flattenSpans}var fV=0,fU=null;var fY=new ew(fZ,fX.options.tabSize),fN;if(fZ==""){c2(e1(fS,fO),fQ)}while(!fY.eol()){if(fY.pos>fX.options.maxHighlightLength){fP=false;if(fR){dc(fX,fZ,fO,fY.pos)}fY.pos=fZ.length;fN=null}else{fN=c2(ef(fS,fY,fO),fQ)}if(fX.options.addModeClass){var f0=I.innerMode(fS,fO).mode.name;if(f0){fN="m-"+(fN?f0+" "+fN:f0)}}if(!fP||fU!=fN){if(fV<fY.start){fT(fY.start,fU)}fV=fY.start;fU=fN}fY.start=fY.pos}while(fV<fY.pos){var fW=Math.min(fY.pos,fV+50000);fT(fW,fU);fV=fW}}function fa(fU,fW,fN,fR){var fV=[fU.state.modeGen],fQ={};x(fU,fW.text,fU.doc.mode,fN,function(fX,fY){fV.push(fX,fY)},fQ,fR);for(var fO=0;fO<fU.state.overlays.length;++fO){var fS=fU.state.overlays[fO],fT=1,fP=0;x(fU,fW.text,fS.mode,true,function(fX,fZ){var f1=fT;while(fP<fX){var fY=fV[fT];if(fY>fX){fV.splice(fT,1,fX,fV[fT+1],fY)}fT+=2;fP=Math.min(fX,fY)}if(!fZ){return}if(fS.opaque){fV.splice(f1,fT-f1,fX,"cm-overlay "+fZ);fT=f1+2}else{for(;f1<fT;f1+=2){var f0=fV[f1+1];fV[f1+1]=(f0?f0+" ":"")+"cm-overlay "+fZ}}},fQ)}return{styles:fV,classes:fQ.bgClass||fQ.textClass?fQ:null}}function cQ(fO,fP){if(!fP.styles||fP.styles[0]!=fO.state.modeGen){var fN=fa(fO,fP,fP.stateAfter=dg(fO,bC(fP)));fP.styles=fN.styles;if(fN.classes){fP.styleClasses=fN.classes}else{if(fP.styleClasses){fP.styleClasses=null}}}return fP.styles}function dc(fN,fS,fP,fO){var fR=fN.doc.mode;var fQ=new ew(fS,fN.options.tabSize);fQ.start=fQ.pos=fO||0;if(fS==""){e1(fR,fP)}while(!fQ.eol()&&fQ.pos<=fN.options.maxHighlightLength){ef(fR,fQ,fP);fQ.start=fQ.pos}}var dz={},bQ={};function ez(fP,fO){if(!fP||/^\s*$/.test(fP)){return null}var fN=fO.addModeClass?bQ:dz;return fN[fP]||(fN[fP]=fP.replace(/\S+/g,"cm-$&"))}function ev(fO,fS){var fT=fw("span",null,null,cJ?"padding-right: .1px":null);var fQ={pre:fw("pre",[fT]),content:fT,col:0,pos:0,cm:fO};fS.measure={};for(var fR=0;fR<=(fS.rest?fS.rest.length:0);fR++){var fP=fR?fS.rest[fR-1]:fS.line,fN;fQ.pos=0;fQ.addToken=u;if((dn||cJ)&&fO.getOption("lineWrapping")){fQ.addToken=ff(fQ.addToken)}if(bD(fO.display.measure)&&(fN=a(fP))){fQ.addToken=U(fQ.addToken,fN)}fQ.map=[];bf(fP,fQ,cQ(fO,fP));if(fP.styleClasses){if(fP.styleClasses.bgClass){fQ.bgClass=fr(fP.styleClasses.bgClass,fQ.bgClass||"")}if(fP.styleClasses.textClass){fQ.textClass=fr(fP.styleClasses.textClass,fQ.textClass||"")}}if(fQ.map.length==0){fQ.map.push(0,0,fQ.content.appendChild(bd(fO.display.measure)))}if(fR==0){fS.measure.map=fQ.map;fS.measure.cache={}}else{(fS.measure.maps||(fS.measure.maps=[])).push(fQ.map);(fS.measure.caches||(fS.measure.caches=[])).push({})}}az(fO,"renderLine",fO,fS.line,fQ.pre);return fQ}function eN(fO){var fN=fw("span","\u2022","cm-invalidchar");fN.title="\\u"+fO.charCodeAt(0).toString(16);return fN}function u(fS,f2,fN,fQ,f3,f1){if(!f2){return}var fX=fS.cm.options.specialChars,fW=false;if(!fX.test(f2)){fS.col+=f2.length;var fV=document.createTextNode(f2);fS.map.push(fS.pos,fS.pos+f2.length,fV);if(bY){fW=true}fS.pos+=f2.length}else{var fV=document.createDocumentFragment(),fZ=0;while(true){fX.lastIndex=fZ;var fO=fX.exec(f2);var fU=fO?fO.index-fZ:f2.length-fZ;if(fU){var fR=document.createTextNode(f2.slice(fZ,fZ+fU));if(bY){fV.appendChild(fw("span",[fR]))}else{fV.appendChild(fR)}fS.map.push(fS.pos,fS.pos+fU,fR);fS.col+=fU;fS.pos+=fU}if(!fO){break}fZ+=fU+1;if(fO[0]=="\t"){var fT=fS.cm.options.tabSize,fY=fT-fS.col%fT;var fR=fV.appendChild(fw("span",cf(fY),"cm-tab"));fS.col+=fY}else{var fR=fS.cm.options.specialCharPlaceholder(fO[0]);if(bY){fV.appendChild(fw("span",[fR]))}else{fV.appendChild(fR)}fS.col+=1}fS.map.push(fS.pos,fS.pos+1,fR);fS.pos++}}if(fN||fQ||f3||fW){var f0=fN||"";if(fQ){f0+=fQ}if(f3){f0+=f3}var fP=fw("span",[fV],f0);if(f1){fP.title=f1}return fS.content.appendChild(fP)}fS.content.appendChild(fV)}function ff(fN){function fO(fP){var fQ=" ";for(var fR=0;fR<fP.length-2;++fR){fQ+=fR%2?" ":"\u00a0"}fQ+=" ";return fQ}return function(fQ,fU,fR,fP,fT,fS){fN(fQ,fU.replace(/ {3,}/g,fO),fR,fP,fT,fS)}}function U(fO,fN){return function(fV,fX,fP,fT,fY,fW){fP=fP?fP+" cm-force-border":"cm-force-border";var fQ=fV.pos,fS=fQ+fX.length;for(;;){for(var fU=0;fU<fN.length;fU++){var fR=fN[fU];if(fR.to>fQ&&fR.from<=fQ){break}}if(fR.to>=fS){return fO(fV,fX,fP,fT,fY,fW)}fO(fV,fX.slice(0,fR.to-fQ),fP,fT,null,fW);fT=null;fX=fX.slice(fR.to-fQ);fQ=fR.to}}}function aa(fO,fQ,fN,fP){var fR=!fP&&fN.widgetNode;if(fR){fO.map.push(fO.pos,fO.pos+fQ,fR);fO.content.appendChild(fR)}fO.pos+=fQ}function bf(fW,f2,fV){var fS=fW.markedSpans,fU=fW.text,f0=0;if(!fS){for(var f5=1;f5<fV.length;f5+=2){f2.addToken(f2,fU.slice(f0,f0=fV[f5]),ez(fV[f5+1],f2.cm.options))}return}var f6=fU.length,fR=0,f5=1,fY="",f7;var f9=0,fN,f8,fZ,ga,fP;for(;;){if(f9==fR){fN=f8=fZ=ga="";fP=null;f9=Infinity;var fT=[];for(var f3=0;f3<fS.length;++f3){var f4=fS[f3],f1=f4.marker;if(f4.from<=fR&&(f4.to==null||f4.to>fR)){if(f4.to!=null&&f9>f4.to){f9=f4.to;f8=""}if(f1.className){fN+=" "+f1.className}if(f1.startStyle&&f4.from==fR){fZ+=" "+f1.startStyle}if(f1.endStyle&&f4.to==f9){f8+=" "+f1.endStyle}if(f1.title&&!ga){ga=f1.title}if(f1.collapsed&&(!fP||du(fP.marker,f1)<0)){fP=f4}}else{if(f4.from>fR&&f9>f4.from){f9=f4.from}}if(f1.type=="bookmark"&&f4.from==fR&&f1.widgetNode){fT.push(f1)}}if(fP&&(fP.from||0)==fR){aa(f2,(fP.to==null?f6+1:fP.to)-fR,fP.marker,fP.from==null);if(fP.to==null){return}}if(!fP&&fT.length){for(var f3=0;f3<fT.length;++f3){aa(f2,0,fT[f3])}}}if(fR>=f6){break}var fX=Math.min(f6,f9);while(true){if(fY){var fO=fR+fY.length;if(!fP){var fQ=fO>fX?fY.slice(0,fX-fR):fY;f2.addToken(f2,fQ,f7?f7+fN:fN,fZ,fR+fQ.length==f9?f8:"",ga)}if(fO>=fX){fY=fY.slice(fX-fR);fR=fX;break}fR=fO;fZ=""}fY=fU.slice(f0,f0=fV[f5++]);f7=ez(fV[f5++],f2.cm.options)}}}function dw(fN,fO){return fO.from.ch==0&&fO.to.ch==0&&fh(fO.text)==""&&(!fN.cm||fN.cm.options.wholeLineUpdateBefore)}function e9(f0,fV,fN,fR){function f1(f3){return fN?fN[f3]:null}function fO(f3,f5,f4){dZ(f3,f5,f4,fR);ac(f3,"change",f3,fV)}var fY=fV.from,fZ=fV.to,f2=fV.text;var fW=eP(f0,fY.line),fX=eP(f0,fZ.line);var fU=fh(f2),fQ=f1(f2.length-1),fT=fZ.line-fY.line;if(dw(f0,fV)){for(var fP=0,fS=[];fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}fO(fX,fX.text,fQ);if(fT){f0.remove(fY.line,fT)}if(fS.length){f0.insert(fY.line,fS)}}else{if(fW==fX){if(f2.length==1){fO(fW,fW.text.slice(0,fY.ch)+fU+fW.text.slice(fZ.ch),fQ)}else{for(var fS=[],fP=1;fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}fS.push(new fC(fU+fW.text.slice(fZ.ch),fQ,fR));fO(fW,fW.text.slice(0,fY.ch)+f2[0],f1(0));f0.insert(fY.line+1,fS)}}else{if(f2.length==1){fO(fW,fW.text.slice(0,fY.ch)+f2[0]+fX.text.slice(fZ.ch),f1(0));f0.remove(fY.line+1,fT)}else{fO(fW,fW.text.slice(0,fY.ch)+f2[0],f1(0));fO(fX,fU+fX.text.slice(fZ.ch),fQ);for(var fP=1,fS=[];fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}if(fT>1){f0.remove(fY.line+1,fT-1)}f0.insert(fY.line+1,fS)}}}ac(f0,"change",f0,fV)}function eC(fO){this.lines=fO;this.parent=null;for(var fP=0,fN=0;fP<fO.length;++fP){fO[fP].parent=this;fN+=fO[fP].height}this.height=fN}eC.prototype={chunkSize:function(){return this.lines.length},removeInner:function(fN,fR){for(var fP=fN,fQ=fN+fR;fP<fQ;++fP){var fO=this.lines[fP];this.height-=fO.height;bq(fO);ac(fO,"delete")}this.lines.splice(fN,fR)},collapse:function(fN){fN.push.apply(fN,this.lines)},insertInner:function(fO,fP,fN){this.height+=fN;this.lines=this.lines.slice(0,fO).concat(fP).concat(this.lines.slice(fO));for(var fQ=0;fQ<fP.length;++fQ){fP[fQ].parent=this}},iterN:function(fN,fQ,fP){for(var fO=fN+fQ;fN<fO;++fN){if(fP(this.lines[fN])){return true}}}};function e8(fQ){this.children=fQ;var fP=0,fN=0;for(var fO=0;fO<fQ.length;++fO){var fR=fQ[fO];fP+=fR.chunkSize();fN+=fR.height;fR.parent=this}this.size=fP;this.height=fN;this.parent=null}e8.prototype={chunkSize:function(){return this.size},removeInner:function(fN,fU){this.size-=fU;for(var fP=0;fP<this.children.length;++fP){var fT=this.children[fP],fR=fT.chunkSize();if(fN<fR){var fQ=Math.min(fU,fR-fN),fS=fT.height;fT.removeInner(fN,fQ);this.height-=fS-fT.height;if(fR==fQ){this.children.splice(fP--,1);fT.parent=null}if((fU-=fQ)==0){break}fN=0}else{fN-=fR}}if(this.size-fU<25&&(this.children.length>1||!(this.children[0] instanceof eC))){var fO=[];this.collapse(fO);this.children=[new eC(fO)];this.children[0].parent=this}},collapse:function(fN){for(var fO=0;fO<this.children.length;++fO){this.children[fO].collapse(fN)}},insertInner:function(fO,fP,fN){this.size+=fP.length;this.height+=fN;for(var fS=0;fS<this.children.length;++fS){var fU=this.children[fS],fT=fU.chunkSize();if(fO<=fT){fU.insertInner(fO,fP,fN);if(fU.lines&&fU.lines.length>50){while(fU.lines.length>50){var fR=fU.lines.splice(fU.lines.length-25,25);var fQ=new eC(fR);fU.height-=fQ.height;this.children.splice(fS+1,0,fQ);fQ.parent=this}this.maybeSpill()}break}fO-=fT}},maybeSpill:function(){if(this.children.length<=10){return}var fQ=this;do{var fO=fQ.children.splice(fQ.children.length-5,5);var fP=new e8(fO);if(!fQ.parent){var fR=new e8(fQ.children);fR.parent=fQ;fQ.children=[fR,fP];fQ=fR}else{fQ.size-=fP.size;fQ.height-=fP.height;var fN=c1(fQ.parent.children,fQ);fQ.parent.children.splice(fN+1,0,fP)}fP.parent=fQ.parent}while(fQ.children.length>10);fQ.parent.maybeSpill()},iterN:function(fN,fT,fS){for(var fO=0;fO<this.children.length;++fO){var fR=this.children[fO],fQ=fR.chunkSize();if(fN<fQ){var fP=Math.min(fT,fQ-fN);if(fR.iterN(fN,fP,fS)){return true}if((fT-=fP)==0){break}fN=0}else{fN-=fQ}}}};var cg=0;var ao=I.Doc=function(fP,fO,fN){if(!(this instanceof ao)){return new ao(fP,fO,fN)}if(fN==null){fN=0}e8.call(this,[new eC([new fC("",null)])]);this.first=fN;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.frontier=fN;var fQ=W(fN,0);this.sel=eu(fQ);this.history=new fs(null);this.id=++cg;this.modeOption=fO;if(typeof fP=="string"){fP=aQ(fP)}e9(this,{from:fQ,to:fQ,text:fP});bJ(this,eu(fQ),Y)};ao.prototype=ca(e8.prototype,{constructor:ao,iter:function(fP,fO,fN){if(fN){this.iterN(fP-this.first,fO-fP,fN)}else{this.iterN(this.first,this.first+this.size,fP)}},insert:function(fO,fP){var fN=0;for(var fQ=0;fQ<fP.length;++fQ){fN+=fP[fQ].height}this.insertInner(fO-this.first,fP,fN)},remove:function(fN,fO){this.removeInner(fN-this.first,fO)},getValue:function(fO){var fN=aS(this,this.first,this.first+this.size);if(fO===false){return fN}return fN.join(fO||"\n")},setValue:cs(function(fO){var fP=W(this.first,0),fN=this.first+this.size-1;a5(this,{from:fP,to:W(fN,eP(this,fN).text.length),text:aQ(fO),origin:"setValue"},true);bJ(this,eu(fP))}),replaceRange:function(fO,fQ,fP,fN){fQ=fj(this,fQ);fP=fP?fj(this,fP):fQ;aR(this,fO,fQ,fP,fN)},getRange:function(fQ,fP,fO){var fN=fy(this,fj(this,fQ),fj(this,fP));if(fO===false){return fN}return fN.join(fO||"\n")},getLine:function(fO){var fN=this.getLineHandle(fO);return fN&&fN.text},getLineHandle:function(fN){if(bW(this,fN)){return eP(this,fN)}},getLineNumber:function(fN){return bC(fN)},getLineHandleVisualStart:function(fN){if(typeof fN=="number"){fN=eP(this,fN)}return z(fN)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(fN){return fj(this,fN)},getCursor:function(fP){var fN=this.sel.primary(),fO;if(fP==null||fP=="head"){fO=fN.head}else{if(fP=="anchor"){fO=fN.anchor}else{if(fP=="end"||fP=="to"||fP===false){fO=fN.to()}else{fO=fN.from()}}}return fO},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:cs(function(fN,fP,fO){G(this,fj(this,typeof fN=="number"?W(fN,fP||0):fN),null,fO)}),setSelection:cs(function(fO,fP,fN){G(this,fj(this,fO),fj(this,fP||fO),fN)}),extendSelection:cs(function(fP,fN,fO){ft(this,fj(this,fP),fN&&fj(this,fN),fO)}),extendSelections:cs(function(fO,fN){at(this,dC(this,fO,fN))}),extendSelectionsBy:cs(function(fO,fN){at(this,bH(this.sel.ranges,fO),fN)}),setSelections:cs(function(fN,fR,fP){if(!fN.length){return}for(var fQ=0,fO=[];fQ<fN.length;fQ++){fO[fQ]=new dB(fj(this,fN[fQ].anchor),fj(this,fN[fQ].head))}if(fR==null){fR=Math.min(fN.length-1,this.sel.primIndex)}bJ(this,cm(fO,fR),fP)}),addSelection:cs(function(fP,fQ,fO){var fN=this.sel.ranges.slice(0);fN.push(new dB(fj(this,fP),fj(this,fQ||fP)));bJ(this,cm(fN,fN.length-1),fO)}),getSelection:function(fR){var fO=this.sel.ranges,fN;for(var fP=0;fP<fO.length;fP++){var fQ=fy(this,fO[fP].from(),fO[fP].to());fN=fN?fN.concat(fQ):fQ}if(fR===false){return fN}else{return fN.join(fR||"\n")}},getSelections:function(fR){var fQ=[],fN=this.sel.ranges;for(var fO=0;fO<fN.length;fO++){var fP=fy(this,fN[fO].from(),fN[fO].to());if(fR!==false){fP=fP.join(fR||"\n")}fQ[fO]=fP}return fQ},replaceSelection:function(fP,fR,fN){var fQ=[];for(var fO=0;fO<this.sel.ranges.length;fO++){fQ[fO]=fP}this.replaceSelections(fQ,fR,fN||"+input")},replaceSelections:cs(function(fS,fU,fP){var fR=[],fT=this.sel;for(var fQ=0;fQ<fT.ranges.length;fQ++){var fO=fT.ranges[fQ];fR[fQ]={from:fO.from(),to:fO.to(),text:aQ(fS[fQ]),origin:fP}}var fN=fU&&fU!="end"&&ad(this,fR,fU);for(var fQ=fR.length-1;fQ>=0;fQ--){a5(this,fR[fQ])}if(fN){eH(this,fN)}else{if(this.cm){fg(this.cm)}}}),undo:cs(function(){bV(this,"undo")}),redo:cs(function(){bV(this,"redo")}),undoSelection:cs(function(){bV(this,"undo",true)}),redoSelection:cs(function(){bV(this,"redo",true)}),setExtending:function(fN){this.extend=fN},getExtending:function(){return this.extend},historySize:function(){var fQ=this.history,fN=0,fP=0;for(var fO=0;fO<fQ.done.length;fO++){if(!fQ.done[fO].ranges){++fN}}for(var fO=0;fO<fQ.undone.length;fO++){if(!fQ.undone[fO].ranges){++fP}}return{undo:fN,redo:fP}},clearHistory:function(){this.history=new fs(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(fN){if(fN){this.history.lastOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(fN){return this.history.generation==(fN||this.cleanGeneration)},getHistory:function(){return{done:bE(this.history.done),undone:bE(this.history.undone)}},setHistory:function(fO){var fN=this.history=new fs(this.history.maxGeneration);fN.done=bE(fO.done.slice(0),null,true);fN.undone=bE(fO.undone.slice(0),null,true)},markText:function(fP,fO,fN){return ej(this,fj(this,fP),fj(this,fO),fN,"range")},setBookmark:function(fP,fN){var fO={replacedWith:fN&&(fN.nodeType==null?fN.widget:fN),insertLeft:fN&&fN.insertLeft,clearWhenEmpty:false,shared:fN&&fN.shared};fP=fj(this,fP);return ej(this,fP,fP,fO,"bookmark")},findMarksAt:function(fR){fR=fj(this,fR);var fQ=[],fO=eP(this,fR.line).markedSpans;if(fO){for(var fN=0;fN<fO.length;++fN){var fP=fO[fN];if((fP.from==null||fP.from<=fR.ch)&&(fP.to==null||fP.to>=fR.ch)){fQ.push(fP.marker.parent||fP.marker)}}}return fQ},findMarks:function(fR,fQ,fN){fR=fj(this,fR);fQ=fj(this,fQ);var fO=[],fP=fR.line;this.iter(fR.line,fQ.line+1,function(fS){var fU=fS.markedSpans;if(fU){for(var fT=0;fT<fU.length;fT++){var fV=fU[fT];if(!(fP==fR.line&&fR.ch>fV.to||fV.from==null&&fP!=fR.line||fP==fQ.line&&fV.from>fQ.ch)&&(!fN||fN(fV.marker))){fO.push(fV.marker.parent||fV.marker)}}}++fP});return fO},getAllMarks:function(){var fN=[];this.iter(function(fP){var fO=fP.markedSpans;if(fO){for(var fQ=0;fQ<fO.length;++fQ){if(fO[fQ].from!=null){fN.push(fO[fQ].marker)}}}});return fN},posFromIndex:function(fO){var fN,fP=this.first;this.iter(function(fQ){var fR=fQ.text.length+1;if(fR>fO){fN=fO;return true}fO-=fR;++fP});return fj(this,W(fP,fN))},indexFromPos:function(fO){fO=fj(this,fO);var fN=fO.ch;if(fO.line<this.first||fO.ch<0){return 0}this.iter(this.first,fO.line,function(fP){fN+=fP.text.length+1});return fN},copy:function(fN){var fO=new ao(aS(this,this.first,this.first+this.size),this.modeOption,this.first);fO.scrollTop=this.scrollTop;fO.scrollLeft=this.scrollLeft;fO.sel=this.sel;fO.extend=false;if(fN){fO.history.undoDepth=this.history.undoDepth;fO.setHistory(this.getHistory())}return fO},linkedDoc:function(fN){if(!fN){fN={}}var fQ=this.first,fP=this.first+this.size;if(fN.from!=null&&fN.from>fQ){fQ=fN.from}if(fN.to!=null&&fN.to<fP){fP=fN.to}var fO=new ao(aS(this,fQ,fP),fN.mode||this.modeOption,fQ);if(fN.sharedHist){fO.history=this.history}(this.linked||(this.linked=[])).push({doc:fO,sharedHist:fN.sharedHist});fO.linked=[{doc:this,isParent:true,sharedHist:fN.sharedHist}];dk(fO,es(this));return fO},unlinkDoc:function(fO){if(fO instanceof I){fO=fO.doc}if(this.linked){for(var fP=0;fP<this.linked.length;++fP){var fQ=this.linked[fP];if(fQ.doc!=fO){continue}this.linked.splice(fP,1);fO.unlinkDoc(this);d0(es(this));break}}if(fO.history==this.history){var fN=[fO.id];dK(fO,function(fR){fN.push(fR.id)},true);fO.history=new fs(null);fO.history.done=bE(this.history.done,fN);fO.history.undone=bE(this.history.undone,fN)}},iterLinkedDocs:function(fN){dK(this,fN)},getMode:function(){return this.mode},getEditor:function(){return this.cm}});ao.prototype.eachLine=ao.prototype.iter;var e="iter insert remove copy getEditor".split(" ");for(var bz in ao.prototype){if(ao.prototype.hasOwnProperty(bz)&&c1(e,bz)<0){I.prototype[bz]=(function(fN){return function(){return fN.apply(this.doc,arguments)}})(ao.prototype[bz])}}bo(ao);function dK(fQ,fP,fO){function fN(fW,fU,fS){if(fW.linked){for(var fT=0;fT<fW.linked.length;++fT){var fR=fW.linked[fT];if(fR.doc==fU){continue}var fV=fS&&fR.sharedHist;if(fO&&!fV){continue}fP(fR.doc,fV);fN(fR.doc,fW,fV)}}}fN(fQ,null,true)}function dN(fN,fO){if(fO.cm){throw new Error("This document is already in use.")}fN.doc=fO;fO.cm=fN;X(fN);bh(fN);if(!fN.options.lineWrapping){h(fN)}fN.options.mode=fO.modeOption;af(fN)}function eP(fQ,fS){fS-=fQ.first;if(fS<0||fS>=fQ.size){throw new Error("There is no line "+(fS+fQ.first)+" in the document.")}for(var fN=fQ;!fN.lines;){for(var fO=0;;++fO){var fR=fN.children[fO],fP=fR.chunkSize();if(fS<fP){fN=fR;break}fS-=fP}}return fN.lines[fS]}function fy(fP,fR,fN){var fO=[],fQ=fR.line;fP.iter(fR.line,fN.line+1,function(fS){var fT=fS.text;if(fQ==fN.line){fT=fT.slice(0,fN.ch)}if(fQ==fR.line){fT=fT.slice(fR.ch)}fO.push(fT);++fQ});return fO}function aS(fO,fQ,fP){var fN=[];fO.iter(fQ,fP,function(fR){fN.push(fR.text)});return fN}function fA(fO,fN){var fP=fN-fO.height;if(fP){for(var fQ=fO;fQ;fQ=fQ.parent){fQ.height+=fP}}}function bC(fN){if(fN.parent==null){return null}var fR=fN.parent,fQ=c1(fR.lines,fN);for(var fO=fR.parent;fO;fR=fO,fO=fO.parent){for(var fP=0;;++fP){if(fO.children[fP]==fR){break}fQ+=fO.children[fP].chunkSize()}}return fQ+fR.first}function bv(fP,fS){var fU=fP.first;outer:do{for(var fQ=0;fQ<fP.children.length;++fQ){var fT=fP.children[fQ],fR=fT.height;if(fS<fR){fP=fT;continue outer}fS-=fR;fU+=fT.chunkSize()}return fU}while(!fP.lines);for(var fQ=0;fQ<fP.lines.length;++fQ){var fO=fP.lines[fQ],fN=fO.height;if(fS<fN){break}fS-=fN}return fU+fQ}function bB(fP){fP=z(fP);var fR=0,fO=fP.parent;for(var fQ=0;fQ<fO.lines.length;++fQ){var fN=fO.lines[fQ];if(fN==fP){break}else{fR+=fN.height}}for(var fS=fO.parent;fS;fO=fS,fS=fO.parent){for(var fQ=0;fQ<fS.children.length;++fQ){var fT=fS.children[fQ];if(fT==fO){break}else{fR+=fT.height}}}return fR}function a(fO){var fN=fO.order;if(fN==null){fN=fO.order=a6(fO.text)}return fN}function fs(fN){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=fN||1}function da(fN,fP){var fO={from:b9(fP.from),to:cG(fP),text:fy(fN,fP.from,fP.to)};bN(fN,fO,fP.from.line,fP.to.line+1);dK(fN,function(fQ){bN(fQ,fO,fP.from.line,fP.to.line+1)},true);return fO}function fc(fO){while(fO.length){var fN=fh(fO);if(fN.ranges){fO.pop()}else{break}}}function eq(fO,fN){if(fN){fc(fO.done);return fh(fO.done)}else{if(fO.done.length&&!fh(fO.done).ranges){return fh(fO.done)}else{if(fO.done.length>1&&!fO.done[fO.done.length-2].ranges){fO.done.pop();return fh(fO.done)}}}}function fm(fT,fR,fN,fQ){var fP=fT.history;fP.undone.length=0;var fO=+new Date,fU;if((fP.lastOp==fQ||fP.lastOrigin==fR.origin&&fR.origin&&((fR.origin.charAt(0)=="+"&&fT.cm&&fP.lastModTime>fO-fT.cm.options.historyEventDelay)||fR.origin.charAt(0)=="*"))&&(fU=eq(fP,fP.lastOp==fQ))){var fV=fh(fU.changes);if(b5(fR.from,fR.to)==0&&b5(fR.from,fV.to)==0){fV.to=cG(fR)}else{fU.changes.push(da(fT,fR))}}else{var fS=fh(fP.done);if(!fS||!fS.ranges){cA(fT.sel,fP.done)}fU={changes:[da(fT,fR)],generation:fP.generation};fP.done.push(fU);while(fP.done.length>fP.undoDepth){fP.done.shift();if(!fP.done[0].ranges){fP.done.shift()}}}fP.done.push(fN);fP.generation=++fP.maxGeneration;fP.lastModTime=fP.lastSelTime=fO;fP.lastOp=fQ;fP.lastOrigin=fP.lastSelOrigin=fR.origin;if(!fV){az(fT,"historyAdded")}}function bp(fR,fN,fP,fQ){var fO=fN.charAt(0);return fO=="*"||fO=="+"&&fP.ranges.length==fQ.ranges.length&&fP.somethingSelected()==fQ.somethingSelected()&&new Date-fR.history.lastSelTime<=(fR.cm?fR.cm.options.historyEventDelay:500)}function fG(fS,fQ,fN,fP){var fR=fS.history,fO=fP&&fP.origin;if(fN==fR.lastOp||(fO&&fR.lastSelOrigin==fO&&(fR.lastModTime==fR.lastSelTime&&fR.lastOrigin==fO||bp(fS,fO,fh(fR.done),fQ)))){fR.done[fR.done.length-1]=fQ}else{cA(fQ,fR.done)}fR.lastSelTime=+new Date;fR.lastSelOrigin=fO;fR.lastOp=fN;if(fP&&fP.clearRedo!==false){fc(fR.undone)}}function cA(fO,fN){var fP=fh(fN);if(!(fP&&fP.ranges&&fP.equals(fO))){fN.push(fO)}}function bN(fO,fS,fR,fQ){var fN=fS["spans_"+fO.id],fP=0;fO.iter(Math.max(fO.first,fR),Math.min(fO.first+fO.size,fQ),function(fT){if(fT.markedSpans){(fN||(fN=fS["spans_"+fO.id]={}))[fP]=fT.markedSpans}++fP})}function bb(fP){if(!fP){return null}for(var fO=0,fN;fO<fP.length;++fO){if(fP[fO].marker.explicitlyCleared){if(!fN){fN=fP.slice(0,fO)}}else{if(fN){fN.push(fP[fO])}}}return !fN?fP:fN.length?fN:null}function bS(fQ,fR){var fP=fR["spans_"+fQ.id];if(!fP){return null}for(var fO=0,fN=[];fO<fR.text.length;++fO){fN.push(bb(fP[fO]))}return fN}function bE(fY,fQ,fX){for(var fT=0,fO=[];fT<fY.length;++fT){var fP=fY[fT];if(fP.ranges){fO.push(fX?fx.prototype.deepCopy.call(fP):fP);continue}var fV=fP.changes,fW=[];fO.push({changes:fW});for(var fS=0;fS<fV.length;++fS){var fU=fV[fS],fR;fW.push({from:fU.from,to:fU.to,text:fU.text});if(fQ){for(var fN in fU){if(fR=fN.match(/^spans_(\d+)$/)){if(c1(fQ,Number(fR[1]))>-1){fh(fW)[fN]=fU[fN];delete fU[fN]}}}}}}return fO}function J(fQ,fP,fO,fN){if(fO<fQ.line){fQ.line+=fN}else{if(fP<fQ.line){fQ.line=fP;fQ.ch=0}}}function eR(fQ,fS,fT,fU){for(var fP=0;fP<fQ.length;++fP){var fN=fQ[fP],fR=true;if(fN.ranges){if(!fN.copied){fN=fQ[fP]=fN.deepCopy();fN.copied=true}for(var fO=0;fO<fN.ranges.length;fO++){J(fN.ranges[fO].anchor,fS,fT,fU);J(fN.ranges[fO].head,fS,fT,fU)}continue}for(var fO=0;fO<fN.changes.length;++fO){var fV=fN.changes[fO];if(fT<fV.from.line){fV.from=W(fV.from.line+fU,fV.from.ch);fV.to=W(fV.to.line+fU,fV.to.ch)}else{if(fS<=fV.to.line){fR=false;break}}}if(!fR){fQ.splice(0,fP+1);fP=0}}}function dj(fO,fR){var fQ=fR.from.line,fP=fR.to.line,fN=fR.text.length-(fP-fQ)-1;eR(fO.done,fQ,fP,fN);eR(fO.undone,fQ,fP,fN)}var cu=I.e_preventDefault=function(fN){if(fN.preventDefault){fN.preventDefault()}else{fN.returnValue=false}};var c6=I.e_stopPropagation=function(fN){if(fN.stopPropagation){fN.stopPropagation()}else{fN.cancelBubble=true}};function bA(fN){return fN.defaultPrevented!=null?fN.defaultPrevented:fN.returnValue==false}var d3=I.e_stop=function(fN){cu(fN);c6(fN)};function L(fN){return fN.target||fN.srcElement}function fn(fO){var fN=fO.which;if(fN==null){if(fO.button&1){fN=1}else{if(fO.button&2){fN=3}else{if(fO.button&4){fN=2}}}}if(bU&&fO.ctrlKey&&fN==1){fN=3}return fN}var bM=I.on=function(fQ,fO,fP){if(fQ.addEventListener){fQ.addEventListener(fO,fP,false)}else{if(fQ.attachEvent){fQ.attachEvent("on"+fO,fP)}else{var fR=fQ._handlers||(fQ._handlers={});var fN=fR[fO]||(fR[fO]=[]);fN.push(fP)}}};var dP=I.off=function(fR,fP,fQ){if(fR.removeEventListener){fR.removeEventListener(fP,fQ,false)}else{if(fR.detachEvent){fR.detachEvent("on"+fP,fQ)}else{var fN=fR._handlers&&fR._handlers[fP];if(!fN){return}for(var fO=0;fO<fN.length;++fO){if(fN[fO]==fQ){fN.splice(fO,1);break}}}}};var az=I.signal=function(fR,fQ){var fN=fR._handlers&&fR._handlers[fQ];if(!fN){return}var fO=Array.prototype.slice.call(arguments,2);for(var fP=0;fP<fN.length;++fP){fN[fP].apply(null,fO)}};var be,ch=0;function ac(fS,fR){var fN=fS._handlers&&fS._handlers[fR];if(!fN){return}var fP=Array.prototype.slice.call(arguments,2);if(!be){++ch;be=[];setTimeout(ec,0)}function fO(fT){return function(){fT.apply(null,fP)}}for(var fQ=0;fQ<fN.length;++fQ){be.push(fO(fN[fQ]))}}function ec(){--ch;var fN=be;be=null;for(var fO=0;fO<fN.length;++fO){fN[fO]()}}function aI(fN,fP,fO){az(fN,fO||fP.type,fN,fP);return bA(fP)||fP.codemirrorIgnore}function V(fO){var fN=fO._handlers&&fO._handlers.cursorActivity;if(!fN){return}var fQ=fO.curOp.cursorActivityHandlers||(fO.curOp.cursorActivityHandlers=[]);for(var fP=0;fP<fN.length;++fP){if(c1(fQ,fN[fP])==-1){fQ.push(fN[fP])}}}function eS(fP,fO){var fN=fP._handlers&&fP._handlers[fO];return fN&&fN.length>0}function bo(fN){fN.prototype.on=function(fO,fP){bM(this,fO,fP)};fN.prototype.off=function(fO,fP){dP(this,fO,fP)}}var ba=30;var bZ=I.Pass={toString:function(){return"CodeMirror.Pass"}};var Y={scroll:false},M={origin:"*mouse"},cF={origin:"+move"};function fM(){this.id=null}fM.prototype.set=function(fN,fO){clearTimeout(this.id);this.id=setTimeout(fO,fN)};var bI=I.countColumn=function(fQ,fO,fS,fT,fP){if(fO==null){fO=fQ.search(/[^\s\u00a0]/);if(fO==-1){fO=fQ.length}}for(var fR=fT||0,fU=fP||0;;){var fN=fQ.indexOf("\t",fR);if(fN<0||fN>=fO){return fU+(fO-fR)}fU+=fN-fR;fU+=fS-(fU%fS);fR=fN+1}};function d2(fR,fQ,fS){for(var fT=0,fP=0;;){var fO=fR.indexOf("\t",fT);if(fO==-1){fO=fR.length}var fN=fO-fT;if(fO==fR.length||fP+fN>=fQ){return fT+Math.min(fN,fQ-fP)}fP+=fO-fT;fP+=fS-(fP%fS);fT=fO+1;if(fP>=fQ){return fT}}}var aP=[""];function cf(fN){while(aP.length<=fN){aP.push(fh(aP)+" ")}return aP[fN]}function fh(fN){return fN[fN.length-1]}var dq=function(fN){fN.select()};if(eD){dq=function(fN){fN.selectionStart=0;fN.selectionEnd=fN.value.length}}else{if(dn){dq=function(fO){try{fO.select()}catch(fN){}}}}function c1(fP,fN){for(var fO=0;fO<fP.length;++fO){if(fP[fO]==fN){return fO}}return -1}if([].indexOf){c1=function(fO,fN){return fO.indexOf(fN)}}function bH(fQ,fP){var fN=[];for(var fO=0;fO<fQ.length;fO++){fN[fO]=fP(fQ[fO],fO)}return fN}if([].map){bH=function(fO,fN){return fO.map(fN)}}function ca(fQ,fN){var fP;if(Object.create){fP=Object.create(fQ)}else{var fO=function(){};fO.prototype=fQ;fP=new fO()}if(fN){aE(fN,fP)}return fP}function aE(fP,fO,fN){if(!fO){fO={}}for(var fQ in fP){if(fP.hasOwnProperty(fQ)&&(fN!==false||!fO.hasOwnProperty(fQ))){fO[fQ]=fP[fQ]}}return fO}function cl(fO){var fN=Array.prototype.slice.call(arguments,1);return function(){return fO.apply(null,fN)}}var a2=/[\u00df\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;var cp=I.isWordChar=function(fN){return/\w/.test(fN)||fN>"\x80"&&(fN.toUpperCase()!=fN.toLowerCase()||a2.test(fN))};function ex(fN){for(var fO in fN){if(fN.hasOwnProperty(fO)&&fN[fO]){return false}}return true}var en=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function e0(fN){return fN.charCodeAt(0)>=768&&en.test(fN)}function fw(fN,fR,fQ,fP){var fS=document.createElement(fN);if(fQ){fS.className=fQ}if(fP){fS.style.cssText=fP}if(typeof fR=="string"){fS.appendChild(document.createTextNode(fR))}else{if(fR){for(var fO=0;fO<fR.length;++fO){fS.appendChild(fR[fO])}}}return fS}var cb;if(document.createRange){cb=function(fP,fQ,fN){var fO=document.createRange();fO.setEnd(fP,fN);fO.setStart(fP,fQ);return fO}}else{cb=function(fP,fQ,fN){var fO=document.body.createTextRange();fO.moveToElementText(fP.parentNode);fO.collapse(true);fO.moveEnd("character",fN);fO.moveStart("character",fQ);return fO}}function dE(fO){for(var fN=fO.childNodes.length;fN>0;--fN){fO.removeChild(fO.firstChild)}return fO}function bG(fN,fO){return dE(fN).appendChild(fO)}function fF(fN,fO){if(fN.contains){return fN.contains(fO)}while(fO=fO.parentNode){if(fO==fN){return true}}}function ds(){return document.activeElement}if(eo){ds=function(){try{return document.activeElement}catch(fN){return document.body}}}function S(fN){return new RegExp("\\b"+fN+"\\b\\s*")}function g(fO,fN){var fP=S(fN);if(fP.test(fO.className)){fO.className=fO.className.replace(fP,"")}}function fb(fO,fN){if(!S(fN).test(fO.className)){fO.className+=" "+fN}}function fr(fP,fN){var fO=fP.split(" ");for(var fQ=0;fQ<fO.length;fQ++){if(fO[fQ]&&!S(fO[fQ]).test(fN)){fN+=" "+fO[fQ]}}return fN}function aw(fQ){if(!document.body.getElementsByClassName){return}var fP=document.body.getElementsByClassName("CodeMirror");for(var fO=0;fO<fP.length;fO++){var fN=fP[fO].CodeMirror;if(fN){fQ(fN)}}}var cr=false;function a8(){if(cr){return}fe();cr=true}function fe(){var fN;bM(window,"resize",function(){if(fN==null){fN=setTimeout(function(){fN=null;d8=null;aw(aK)},100)}});bM(window,"blur",function(){aw(aL)})}var ep=function(){if(bY){return false}var fN=fw("div");return"draggable" in fN||"dragDrop" in fN}();var d8;function l(fN){if(d8!=null){return d8}var fO=fw("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");bG(fN,fO);if(fO.offsetWidth){d8=fO.offsetHeight-fO.clientHeight}return d8||0}var fl;function bd(fN){if(fl==null){var fO=fw("span","\u200b");bG(fN,fw("span",[fO,document.createTextNode("x")]));if(fN.firstChild.offsetHeight!=0){fl=fO.offsetWidth<=1&&fO.offsetHeight>2&&!b1}}if(fl){return fw("span","\u200b")}else{return fw("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px")}}var fk;function bD(fQ){if(fk!=null){return fk}var fN=bG(fQ,document.createTextNode("A\u062eA"));var fP=cb(fN,0,1).getBoundingClientRect();if(fP.left==fP.right){return false}var fO=cb(fN,1,2).getBoundingClientRect();return fk=(fO.right-fP.right<3)}var aQ=I.splitLines="\n\nb".split(/\n/).length!=3?function(fS){var fT=0,fN=[],fR=fS.length;while(fT<=fR){var fQ=fS.indexOf("\n",fT);if(fQ==-1){fQ=fS.length}var fP=fS.slice(fT,fS.charAt(fQ-1)=="\r"?fQ-1:fQ);var fO=fP.indexOf("\r");if(fO!=-1){fN.push(fP.slice(0,fO));fT+=fO+1}else{fN.push(fP);fT=fQ+1}}return fN}:function(fN){return fN.split(/\r\n?|\n/)};var bi=window.getSelection?function(fO){try{return fO.selectionStart!=fO.selectionEnd}catch(fN){return false}}:function(fP){try{var fN=fP.ownerDocument.selection.createRange()}catch(fO){}if(!fN||fN.parentElement()!=fP){return false}return fN.compareEndPoints("StartToEnd",fN)!=0};var cT=(function(){var fN=fw("div");if("oncopy" in fN){return true}fN.setAttribute("oncopy","return;");return typeof fN.oncopy=="function"})();var eQ={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:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};I.keyNames=eQ;(function(){for(var fN=0;fN<10;fN++){eQ[fN+48]=eQ[fN+96]=String(fN)}for(var fN=65;fN<=90;fN++){eQ[fN]=String.fromCharCode(fN)}for(var fN=1;fN<=12;fN++){eQ[fN+111]=eQ[fN+63235]="F"+fN}})();function dH(fN,fT,fS,fR){if(!fN){return fR(fT,fS,"ltr")}var fQ=false;for(var fP=0;fP<fN.length;++fP){var fO=fN[fP];if(fO.from<fS&&fO.to>fT||fT==fS&&fO.to==fT){fR(Math.max(fO.from,fT),Math.min(fO.to,fS),fO.level==1?"rtl":"ltr");fQ=true}}if(!fQ){fR(fT,fS,"ltr")}}function dd(fN){return fN.level%2?fN.to:fN.from}function fI(fN){return fN.level%2?fN.from:fN.to}function ct(fO){var fN=a(fO);return fN?dd(fN[0]):0}function cE(fO){var fN=a(fO);if(!fN){return fO.text.length}return fI(fh(fN))}function bj(fO,fR){var fP=eP(fO.doc,fR);var fS=z(fP);if(fS!=fP){fR=bC(fS)}var fN=a(fS);var fQ=!fN?0:fN[0].level%2?cE(fS):ct(fS);return W(fR,fQ)}function dt(fP,fS){var fO,fQ=eP(fP.doc,fS);while(fO=d7(fQ)){fQ=fO.find(1,true).line;fS=null}var fN=a(fQ);var fR=!fN?fQ.text.length:fN[0].level%2?ct(fQ):cE(fQ);return W(fS==null?bC(fQ):fS,fR)}function ak(fO,fP,fN){var fQ=fO[0].level;if(fP==fQ){return true}if(fN==fQ){return false}return fP<fN}var eE;function aB(fN,fR){eE=null;for(var fO=0,fP;fO<fN.length;++fO){var fQ=fN[fO];if(fQ.from<fR&&fQ.to>fR){return fO}if((fQ.from==fR||fQ.to==fR)){if(fP==null){fP=fO}else{if(ak(fN,fQ.level,fN[fP].level)){if(fQ.from!=fQ.to){eE=fP}return fO}else{if(fQ.from!=fQ.to){eE=fO}return fP}}}}return fP}function eO(fN,fQ,fO,fP){if(!fP){return fQ+fO}do{fQ+=fO}while(fQ>0&&e0(fN.text.charAt(fQ)));return fQ}function v(fN,fU,fP,fQ){var fR=a(fN);if(!fR){return ag(fN,fU,fP,fQ)}var fT=aB(fR,fU),fO=fR[fT];var fS=eO(fN,fU,fO.level%2?-fP:fP,fQ);for(;;){if(fS>fO.from&&fS<fO.to){return fS}if(fS==fO.from||fS==fO.to){if(aB(fR,fS)==fT){return fS}fO=fR[fT+=fP];return(fP>0)==fO.level%2?fO.to:fO.from}else{fO=fR[fT+=fP];if(!fO){return null}if((fP>0)==fO.level%2){fS=eO(fN,fO.to,-1,fQ)}else{fS=eO(fN,fO.from,1,fQ)}}}}function ag(fN,fR,fO,fP){var fQ=fR+fO;if(fP){while(fQ>0&&e0(fN.text.charAt(fQ))){fQ+=fO}}return fQ<0||fQ>fN.text.length?null:fQ}var a6=(function(){var fT="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var fR="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm";function fQ(fX){if(fX<=247){return fT.charAt(fX)}else{if(1424<=fX&&fX<=1524){return"R"}else{if(1536<=fX&&fX<=1773){return fR.charAt(fX-1536)}else{if(1774<=fX&&fX<=2220){return"r"}else{if(8192<=fX&&fX<=8203){return"w"}else{if(fX==8204){return"b"}else{return"L"}}}}}}}var fN=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var fW=/[stwN]/,fP=/[LRr]/,fO=/[Lb1n]/,fS=/[1n]/;var fV="L";function fU(fZ,fY,fX){this.level=fZ;this.from=fY;this.to=fX}return function(f7){if(!fN.test(f7)){return false}var gd=f7.length,f3=[];for(var gc=0,fZ;gc<gd;++gc){f3.push(fZ=fQ(f7.charCodeAt(gc)))}for(var gc=0,f6=fV;gc<gd;++gc){var fZ=f3[gc];if(fZ=="m"){f3[gc]=f6}else{f6=fZ}}for(var gc=0,fX=fV;gc<gd;++gc){var fZ=f3[gc];if(fZ=="1"&&fX=="r"){f3[gc]="n"}else{if(fP.test(fZ)){fX=fZ;if(fZ=="r"){f3[gc]="R"}}}}for(var gc=1,f6=f3[0];gc<gd-1;++gc){var fZ=f3[gc];if(fZ=="+"&&f6=="1"&&f3[gc+1]=="1"){f3[gc]="1"}else{if(fZ==","&&f6==f3[gc+1]&&(f6=="1"||f6=="n")){f3[gc]=f6}}f6=fZ}for(var gc=0;gc<gd;++gc){var fZ=f3[gc];if(fZ==","){f3[gc]="N"}else{if(fZ=="%"){for(var f0=gc+1;f0<gd&&f3[f0]=="%";++f0){}var ge=(gc&&f3[gc-1]=="!")||(f0<gd&&f3[f0]=="1")?"1":"N";for(var ga=gc;ga<f0;++ga){f3[ga]=ge}gc=f0-1}}}for(var gc=0,fX=fV;gc<gd;++gc){var fZ=f3[gc];if(fX=="L"&&fZ=="1"){f3[gc]="L"}else{if(fP.test(fZ)){fX=fZ}}}for(var gc=0;gc<gd;++gc){if(fW.test(f3[gc])){for(var f0=gc+1;f0<gd&&fW.test(f3[f0]);++f0){}var f4=(gc?f3[gc-1]:fV)=="L";var fY=(f0<gd?f3[f0]:fV)=="L";var ge=f4||fY?"L":"R";for(var ga=gc;ga<f0;++ga){f3[ga]=ge}gc=f0-1}}var gb=[],f8;for(var gc=0;gc<gd;){if(fO.test(f3[gc])){var f1=gc;for(++gc;gc<gd&&fO.test(f3[gc]);++gc){}gb.push(new fU(0,f1,gc))}else{var f2=gc,f5=gb.length;for(++gc;gc<gd&&f3[gc]!="L";++gc){}for(var ga=f2;ga<gc;){if(fS.test(f3[ga])){if(f2<ga){gb.splice(f5,0,new fU(1,f2,ga))}var f9=ga;for(++ga;ga<gc&&fS.test(f3[ga]);++ga){}gb.splice(f5,0,new fU(2,f9,ga));f2=ga}else{++ga}}if(f2<gc){gb.splice(f5,0,new fU(1,f2,gc))}}}if(gb[0].level==1&&(f8=f7.match(/^\s+/))){gb[0].from=f8[0].length;gb.unshift(new fU(0,0,f8[0].length))}if(fh(gb).level==1&&(f8=f7.match(/\s+$/))){fh(gb).to-=f8[0].length;gb.push(new fU(0,gd-f8[0].length,gd))}if(gb[0].level!=fh(gb).level){gb.push(new fU(gb[0].level,gd,gd))}return gb}})();I.version="4.1.1";return I});
3
- // CodeMirror XML.
4
- (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("xml",function(y,k){var p=y.indentUnit;var x=k.multilineTagIndentFactor||1;var d=k.multilineTagIndentPastTag;if(d==null){d=true}var w=k.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};var c=k.alignCDATA;var f,g;function n(F,E){function C(G){E.tokenize=G;return G(F,E)}var D=F.next();if(D=="<"){if(F.eat("!")){if(F.eat("[")){if(F.match("CDATA[")){return C(v("atom","]]>"))}else{return null}}else{if(F.match("--")){return C(v("comment","-->"))}else{if(F.match("DOCTYPE",true,true)){F.eatWhile(/[\w\._\-]/);return C(z(1))}else{return null}}}}else{if(F.eat("?")){F.eatWhile(/[\w\._\-]/);E.tokenize=v("meta","?>");return"meta"}else{f=F.eat("/")?"closeTag":"openTag";E.tokenize=m;return"tag bracket"}}}else{if(D=="&"){var B;if(F.eat("#")){if(F.eat("x")){B=F.eatWhile(/[a-fA-F\d]/)&&F.eat(";")}else{B=F.eatWhile(/[\d]/)&&F.eat(";")}}else{B=F.eatWhile(/[\w\.\-:]/)&&F.eat(";")}return B?"atom":"error"}else{F.eatWhile(/[^&<]/);return null}}}function m(E,D){var C=E.next();if(C==">"||(C=="/"&&E.eat(">"))){D.tokenize=n;f=C==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(C=="="){f="equals";return null}else{if(C=="<"){D.tokenize=n;D.state=l;D.tagName=D.tagStart=null;var B=D.tokenize(E,D);return B?B+" error":"error"}else{if(/[\'\"]/.test(C)){D.tokenize=j(C);D.stringStartCol=E.column();return D.tokenize(E,D)}else{E.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function j(B){var C=function(E,D){while(!E.eol()){if(E.next()==B){D.tokenize=m;break}}return"string"};C.isInAttribute=true;return C}function v(C,B){return function(E,D){while(!E.eol()){if(E.match(B)){D.tokenize=n;break}E.next()}return C}}function z(B){return function(E,D){var C;while((C=E.next())!=null){if(C=="<"){D.tokenize=z(B+1);return D.tokenize(E,D)}else{if(C==">"){if(B==1){D.tokenize=n;break}else{D.tokenize=z(B-1);return D.tokenize(E,D)}}}}return"meta"}}function r(C,B,D){this.prev=C.context;this.tagName=B;this.indent=C.indented;this.startOfLine=D;if(w.doNotIndent.hasOwnProperty(B)||(C.context&&C.context.noIndent)){this.noIndent=true}}function u(B){if(B.context){B.context=B.context.prev}}function q(D,C){var B;while(true){if(!D.context){return}B=D.context.tagName;if(!w.contextGrabbers.hasOwnProperty(B)||!w.contextGrabbers[B].hasOwnProperty(C)){return}u(D)}}function l(B,D,C){if(B=="openTag"){C.tagStart=D.column();return b}else{if(B=="closeTag"){return t}else{return l}}}function b(B,D,C){if(B=="word"){C.tagName=D.current();g="tag";return e}else{g="error";return b}}function t(C,E,D){if(C=="word"){var B=E.current();if(D.context&&D.context.tagName!=B&&w.implicitlyClosed.hasOwnProperty(D.context.tagName)){u(D)}if(D.context&&D.context.tagName==B){g="tag";return s}else{g="tag error";return A}}else{g="error";return A}}function s(C,B,D){if(C!="endTag"){g="error";return s}u(D);return l}function A(B,D,C){g="error";return s(B,D,C)}function e(E,C,F){if(E=="word"){g="attribute";return i}else{if(E=="endTag"||E=="selfcloseTag"){var D=F.tagName,B=F.tagStart;F.tagName=F.tagStart=null;if(E=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(D)){q(F,D)}else{q(F,D);F.context=new r(F,D,B==F.indented)}return l}}g="error";return e}function i(B,D,C){if(B=="equals"){return o}if(!w.allowMissing){g="error"}return e(B,D,C)}function o(B,D,C){if(B=="string"){return h}if(B=="word"&&w.allowUnquoted){g="string";return e}g="error";return e(B,D,C)}function h(B,D,C){if(B=="string"){return h}return e(B,D,C)}return{startState:function(){return{tokenize:n,state:l,indented:0,tagName:null,tagStart:null,context:null}},token:function(D,C){if(!C.tagName&&D.sol()){C.indented=D.indentation()}if(D.eatSpace()){return null}f=null;var B=C.tokenize(D,C);if((B||f)&&B!="comment"){g=null;C.state=C.state(f||B,D,C);if(g){B=g=="error"?B+" error":g}}return B},indent:function(G,C,F){var E=G.context;if(G.tokenize.isInAttribute){if(G.tagStart==G.indented){return G.stringStartCol+1}else{return G.indented+p}}if(E&&E.noIndent){return a.Pass}if(G.tokenize!=m&&G.tokenize!=n){return F?F.match(/^(\s*)/)[0].length:0}if(G.tagName){if(d){return G.tagStart+G.tagName.length+2}else{return G.tagStart+p*x}}if(c&&/<!\[CDATA\[/.test(C)){return 0}var B=C&&/^<(\/)?([\w_:\.-]*)/.exec(C);if(B&&B[1]){while(E){if(E.tagName==B[2]){E=E.prev;break}else{if(w.implicitlyClosed.hasOwnProperty(E.tagName)){E=E.prev}else{break}}}}else{if(B){while(E){var D=w.contextGrabbers[E.tagName];if(D&&D.hasOwnProperty(B[2])){E=E.prev}else{break}}}}while(E&&!E.startOfLine){E=E.prev}if(E){return E.indent+p}else{return 0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml"}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});
5
- // CodeMirror JS.
6
- (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(X,ah){var j=X.indentUnit;var x=ah.statementIndent;var aw=ah.jsonld;var w=ah.json||aw;var f=ah.typescript;var ao=function(){function aM(aO){return{type:aO,style:"keyword"}}var aH=aM("keyword a"),aF=aM("keyword b"),aE=aM("keyword c");var aG=aM("operator"),aK={type:"atom",style:"atom"};var aI={"if":aM("if"),"while":aH,"with":aH,"else":aF,"do":aF,"try":aF,"finally":aF,"return":aE,"break":aE,"continue":aE,"new":aE,"delete":aE,"throw":aE,"debugger":aE,"var":aM("var"),"const":aM("var"),let:aM("var"),"function":aM("function"),"catch":aM("catch"),"for":aM("for"),"switch":aM("switch"),"case":aM("case"),"default":aM("default"),"in":aG,"typeof":aG,"instanceof":aG,"true":aK,"false":aK,"null":aK,"undefined":aK,"NaN":aK,"Infinity":aK,"this":aM("this"),module:aM("module"),"class":aM("class"),"super":aM("atom"),yield:aE,"export":aM("export"),"import":aM("import"),"extends":aE};if(f){var aN={type:"variable",style:"variable-3"};var aJ={"interface":aM("interface"),"extends":aM("extends"),constructor:aM("constructor"),"public":aM("public"),"private":aM("private"),"protected":aM("protected"),"static":aM("static"),string:aN,number:aN,bool:aN,any:aN};for(var aL in aJ){aI[aL]=aJ[aL]}}return aI}();var M=/[+\-*&%=<>!?|~^]/;var an=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function C(aH){var aF=false,aE,aG=false;while((aE=aH.next())!=null){if(!aF){if(aE=="/"&&!aG){return}if(aE=="["){aG=true}else{if(aG&&aE=="]"){aG=false}}}aF=!aF&&aE=="\\"}}var P,D;function I(aG,aF,aE){P=aG;D=aE;return aF}function R(aI,aG){var aE=aI.next();if(aE=='"'||aE=="'"){aG.tokenize=O(aE);return aG.tokenize(aI,aG)}else{if(aE=="."&&aI.match(/^\d+(?:[eE][+\-]?\d+)?/)){return I("number","number")}else{if(aE=="."&&aI.match("..")){return I("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aE)){return I(aE)}else{if(aE=="="&&aI.eat(">")){return I("=>","operator")}else{if(aE=="0"&&aI.eat(/x/i)){aI.eatWhile(/[\da-f]/i);return I("number","number")}else{if(/\d/.test(aE)){aI.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return I("number","number")}else{if(aE=="/"){if(aI.eat("*")){aG.tokenize=av;return av(aI,aG)}else{if(aI.eat("/")){aI.skipToEnd();return I("comment","comment")}else{if(aG.lastType=="operator"||aG.lastType=="keyword c"||aG.lastType=="sof"||/^[\[{}\(,;:]$/.test(aG.lastType)){C(aI);aI.eatWhile(/[gimy]/);return I("regexp","string-2")}else{aI.eatWhile(M);return I("operator","operator",aI.current())}}}}else{if(aE=="`"){aG.tokenize=ax;return ax(aI,aG)}else{if(aE=="#"){aI.skipToEnd();return I("error","error")}else{if(M.test(aE)){aI.eatWhile(M);return I("operator","operator",aI.current())}else{aI.eatWhile(/[\w\$_]/);var aH=aI.current(),aF=ao.propertyIsEnumerable(aH)&&ao[aH];return(aF&&aG.lastType!=".")?I(aF.type,aF.style,aH):I("variable","variable",aH)}}}}}}}}}}}}function O(aE){return function(aI,aG){var aH=false,aF;if(aw&&aI.peek()=="@"&&aI.match(an)){aG.tokenize=R;return I("jsonld-keyword","meta")}while((aF=aI.next())!=null){if(aF==aE&&!aH){break}aH=!aH&&aF=="\\"}if(!aH){aG.tokenize=R}return I("string","string")}}function av(aH,aG){var aE=false,aF;while(aF=aH.next()){if(aF=="/"&&aE){aG.tokenize=R;break}aE=(aF=="*")}return I("comment","comment")}function ax(aH,aF){var aG=false,aE;while((aE=aH.next())!=null){if(!aG&&(aE=="`"||aE=="$"&&aH.eat("{"))){aF.tokenize=R;break}aG=!aG&&aE=="\\"}return I("quasi","string-2",aH.current())}var k="([{}])";function ar(aK,aH){if(aH.fatArrowAt){aH.fatArrowAt=null}var aG=aK.string.indexOf("=>",aK.start);if(aG<0){return}var aJ=0,aF=false;for(var aL=aG-1;aL>=0;--aL){var aE=aK.string.charAt(aL);var aI=k.indexOf(aE);if(aI>=0&&aI<3){if(!aJ){++aL;break}if(--aJ==0){break}}else{if(aI>=3&&aI<6){++aJ}else{if(/[$\w]/.test(aE)){aF=true}else{if(aF&&!aJ){++aL;break}}}}}if(aF&&!aJ){aH.fatArrowAt=aL}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function G(aJ,aF,aE,aI,aG,aH){this.indented=aJ;this.column=aF;this.type=aE;this.prev=aG;this.info=aH;if(aI!=null){this.align=aI}}function p(aH,aG){for(var aF=aH.localVars;aF;aF=aF.next){if(aF.name==aG){return true}}for(var aE=aH.context;aE;aE=aE.prev){for(var aF=aE.vars;aF;aF=aF.next){if(aF.name==aG){return true}}}}function e(aI,aF,aE,aH,aJ){var aK=aI.cc;A.state=aI;A.stream=aJ;A.marked=null,A.cc=aK;if(!aI.lexical.hasOwnProperty("align")){aI.lexical.align=true}while(true){var aG=aK.length?aK.pop():w?al:aC;if(aG(aE,aH)){while(aK.length&&aK[aK.length-1].lex){aK.pop()()}if(A.marked){return A.marked}if(aE=="variable"&&p(aI,aH)){return"variable-2"}return aF}}}var A={state:null,column:null,marked:null,cc:null};function Y(){for(var aE=arguments.length-1;aE>=0;aE--){A.cc.push(arguments[aE])}}function ac(){Y.apply(null,arguments);return true}function aq(aF){function aE(aI){for(var aH=aI;aH;aH=aH.next){if(aH.name==aF){return true}}return false}var aG=A.state;if(aG.context){A.marked="def";if(aE(aG.localVars)){return}aG.localVars={name:aF,next:aG.localVars}}else{if(aE(aG.globalVars)){return}if(ah.globalVars){aG.globalVars={name:aF,next:aG.globalVars}}}}var n={name:"this",next:{name:"arguments"}};function t(){A.state.context={prev:A.state.context,vars:A.state.localVars};A.state.localVars=n}function u(){A.state.localVars=A.state.context.vars;A.state.context=A.state.context.prev}function aA(aF,aG){var aE=function(){var aI=A.state,aH=aI.indented;if(aI.lexical.type=="stat"){aH=aI.lexical.indented}aI.lexical=new G(aH,A.stream.column(),aF,null,aI.lexical,aG)};aE.lex=true;return aE}function g(){var aE=A.state;if(aE.lexical.prev){if(aE.lexical.type==")"){aE.indented=aE.lexical.indented}aE.lexical=aE.lexical.prev}}g.lex=true;function o(aE){function aF(aG){if(aG==aE){return ac()}else{if(aE==";"){return Y()}else{return ac(aF)}}}return aF}function aC(aE,aF){if(aE=="var"){return ac(aA("vardef",aF.length),c,o(";"),g)}if(aE=="keyword a"){return ac(aA("form"),al,aC,g)}if(aE=="keyword b"){return ac(aA("form"),aC,g)}if(aE=="{"){return ac(aA("}"),v,g)}if(aE==";"){return ac()}if(aE=="if"){if(A.state.lexical.info=="else"&&A.state.cc[A.state.cc.length-1]==g){A.state.cc.pop()()}return ac(aA("form"),al,aC,g,d)}if(aE=="function"){return ac(J)}if(aE=="for"){return ac(aA("form"),r,aC,g)}if(aE=="variable"){return ac(aA("stat"),aD)}if(aE=="switch"){return ac(aA("form"),al,aA("}","switch"),o("{"),v,g,g)}if(aE=="case"){return ac(al,o(":"))}if(aE=="default"){return ac(o(":"))}if(aE=="catch"){return ac(aA("form"),t,o("("),ad,o(")"),aC,g,u)}if(aE=="module"){return ac(aA("form"),t,E,u,g)}if(aE=="class"){return ac(aA("form"),T,S,g)}if(aE=="export"){return ac(aA("form"),aB,g)}if(aE=="import"){return ac(aA("form"),ae,g)}return Y(aA("stat"),al,o(";"),g)}function al(aE){return W(aE,false)}function az(aE){return W(aE,true)}function W(aF,aH){if(A.state.fatArrowAt==A.stream.start){var aE=aH?K:U;if(aF=="("){return ac(t,aA(")"),ap(h,")"),g,o("=>"),aE,u)}else{if(aF=="variable"){return Y(t,h,o("=>"),aE,u)}}}var aG=aH?i:Z;if(b.hasOwnProperty(aF)){return ac(aG)}if(aF=="function"){return ac(J,aG)}if(aF=="keyword c"){return ac(aH?ai:ag)}if(aF=="("){return ac(aA(")"),ag,au,o(")"),g,aG)}if(aF=="operator"||aF=="spread"){return ac(aH?az:al)}if(aF=="["){return ac(aA("]"),l,g,aG)}if(aF=="{"){return at(q,"}",null,aG)}if(aF=="quasi"){return Y(N,aG)}return ac()}function ag(aE){if(aE.match(/[;\}\)\],]/)){return Y()}return Y(al)}function ai(aE){if(aE.match(/[;\}\)\],]/)){return Y()}return Y(az)}function Z(aE,aF){if(aE==","){return ac(al)}return i(aE,aF,false)}function i(aE,aG,aI){var aF=aI==false?Z:i;var aH=aI==false?al:az;if(aG=="=>"){return ac(t,aI?K:U,u)}if(aE=="operator"){if(/\+\+|--/.test(aG)){return ac(aF)}if(aG=="?"){return ac(al,o(":"),aH)}return ac(aH)}if(aE=="quasi"){return Y(N,aF)}if(aE==";"){return}if(aE=="("){return at(az,")","call",aF)}if(aE=="."){return ac(aj,aF)}if(aE=="["){return ac(aA("]"),ag,o("]"),g,aF)}}function N(aE,aF){if(aE!="quasi"){return Y()}if(aF.slice(aF.length-2)!="${"){return ac(N)}return ac(al,m)}function m(aE){if(aE=="}"){A.marked="string-2";A.state.tokenize=ax;return ac(N)}}function U(aE){ar(A.stream,A.state);if(aE=="{"){return Y(aC)}return Y(al)}function K(aE){ar(A.stream,A.state);if(aE=="{"){return Y(aC)}return Y(az)}function aD(aE){if(aE==":"){return ac(g,aC)}return Y(Z,o(";"),g)}function aj(aE){if(aE=="variable"){A.marked="property";return ac()}}function q(aE,aF){if(aE=="variable"){A.marked="property";if(aF=="get"||aF=="set"){return ac(F)}}else{if(aE=="number"||aE=="string"){A.marked=aw?"property":(aE+" property")}else{if(aE=="["){return ac(al,o("]"),H)}}}if(b.hasOwnProperty(aE)){return ac(H)}}function F(aE){if(aE!="variable"){return Y(H)}A.marked="property";return ac(J)}function H(aE){if(aE==":"){return ac(az)}if(aE=="("){return Y(J)}}function ap(aG,aE){function aF(aI){if(aI==","){var aH=A.state.lexical;if(aH.info=="call"){aH.pos=(aH.pos||0)+1}return ac(aG,aF)}if(aI==aE){return ac()}return ac(o(aE))}return function(aH){if(aH==aE){return ac()}return Y(aG,aF)}}function at(aH,aE,aG){for(var aF=3;aF<arguments.length;aF++){A.cc.push(arguments[aF])}return ac(aA(aE,aG),ap(aH,aE),g)}function v(aE){if(aE=="}"){return ac()}return Y(aC,v)}function Q(aE){if(f&&aE==":"){return ac(ab)}}function ab(aE){if(aE=="variable"){A.marked="variable-3";return ac()}}function c(){return Y(h,Q,aa,V)}function h(aE,aF){if(aE=="variable"){aq(aF);return ac()}if(aE=="["){return at(h,"]")}if(aE=="{"){return at(ay,"}")}}function ay(aE,aF){if(aE=="variable"&&!A.stream.match(/^\s*:/,false)){aq(aF);return ac(aa)}if(aE=="variable"){A.marked="property"}return ac(o(":"),h,aa)}function aa(aE,aF){if(aF=="="){return ac(az)}}function V(aE){if(aE==","){return ac(c)}}function d(aE,aF){if(aE=="keyword b"&&aF=="else"){return ac(aA("form","else"),aC,g)}}function r(aE){if(aE=="("){return ac(aA(")"),B,o(")"),g)}}function B(aE){if(aE=="var"){return ac(c,o(";"),z)}if(aE==";"){return ac(z)}if(aE=="variable"){return ac(s)}return Y(al,o(";"),z)}function s(aE,aF){if(aF=="in"||aF=="of"){A.marked="keyword";return ac(al)}return ac(Z,z)}function z(aE,aF){if(aE==";"){return ac(y)}if(aF=="in"||aF=="of"){A.marked="keyword";return ac(al)}return Y(al,o(";"),y)}function y(aE){if(aE!=")"){ac(al)}}function J(aE,aF){if(aF=="*"){A.marked="keyword";return ac(J)}if(aE=="variable"){aq(aF);return ac(J)}if(aE=="("){return ac(t,aA(")"),ap(ad,")"),g,aC,u)}}function ad(aE){if(aE=="spread"){return ac(ad)}return Y(h,Q)}function T(aE,aF){if(aE=="variable"){aq(aF);return ac(L)}}function L(aE,aF){if(aF=="extends"){return ac(al)}}function S(aE){if(aE=="{"){return at(q,"}")}}function E(aE,aF){if(aE=="string"){return ac(aC)}if(aE=="variable"){aq(aF);return ac(af)}}function aB(aE,aF){if(aF=="*"){A.marked="keyword";return ac(af,o(";"))}if(aF=="default"){A.marked="keyword";return ac(al,o(";"))}return Y(aC)}function ae(aE){if(aE=="string"){return ac()}return Y(am,af)}function am(aE,aF){if(aE=="{"){return at(am,"}")}if(aE=="variable"){aq(aF)}return ac()}function af(aE,aF){if(aF=="from"){A.marked="keyword";return ac(al)}}function l(aE){if(aE=="]"){return ac()}return Y(az,ak)}function ak(aE){if(aE=="for"){return Y(au,o("]"))}if(aE==","){return ac(ap(az,"]"))}return Y(ap(az,"]"))}function au(aE){if(aE=="for"){return ac(r,au)}if(aE=="if"){return ac(al,au)}}return{startState:function(aF){var aE={tokenize:R,lastType:"sof",cc:[],lexical:new G((aF||0)-j,0,"block",false),localVars:ah.localVars,context:ah.localVars&&{vars:ah.localVars},indented:0};if(ah.globalVars&&typeof ah.globalVars=="object"){aE.globalVars=ah.globalVars}return aE},token:function(aG,aF){if(aG.sol()){if(!aF.lexical.hasOwnProperty("align")){aF.lexical.align=false}aF.indented=aG.indentation();ar(aG,aF)}if(aF.tokenize!=av&&aG.eatSpace()){return null}var aE=aF.tokenize(aG,aF);if(P=="comment"){return aE}aF.lastType=P=="operator"&&(D=="++"||D=="--")?"incdec":P;return e(aF,aE,P,D,aG)},indent:function(aK,aE){if(aK.tokenize==av){return a.Pass}if(aK.tokenize!=R){return 0}var aJ=aE&&aE.charAt(0),aH=aK.lexical;if(!/^\s*else\b/.test(aE)){for(var aG=aK.cc.length-1;aG>=0;--aG){var aL=aK.cc[aG];if(aL==g){aH=aH.prev}else{if(aL!=d){break}}}}if(aH.type=="stat"&&aJ=="}"){aH=aH.prev}if(x&&aH.type==")"&&aH.prev.type=="stat"){aH=aH.prev}var aI=aH.type,aF=aJ==aI;if(aI=="vardef"){return aH.indented+(aK.lastType=="operator"||aK.lastType==","?aH.info+1:0)}else{if(aI=="form"&&aJ=="{"){return aH.indented}else{if(aI=="form"){return aH.indented+j}else{if(aI=="stat"){return aH.indented+(aK.lastType=="operator"||aK.lastType==","?x||j:0)}else{if(aH.info=="switch"&&!aF&&ah.doubleIndentSwitch!=false){return aH.indented+(/^(?:case|default)\b/.test(aE)?j:2*j)}else{if(aH.align){return aH.column+(aF?0:1)}else{return aH.indented+(aF?0:j)}}}}}}},electricChars:":{}",blockCommentStart:w?null:"/*",blockCommentEnd:w?null:"*/",lineComment:w?null:"//",fold:"brace",helperType:w?"json":"javascript",jsonldMode:aw,jsonMode:w}});a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});
7
- // CodeMirror CSS.
8
- (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(m){m.defineMode("css",function(N,B){if(!B.propertyKeywords){B=m.resolveMode("text/css")}var H=N.indentUnit,t=B.tokenHooks,M=B.mediaTypes||{},D=B.mediaFeatures||{},A=B.propertyKeywords||{},u=B.nonStandardPropertyKeywords||{},G=B.colorKeywords||{},J=B.valueKeywords||{},w=B.fontProperties||{},E=B.allowNested;var v,F;function O(R,S){v=S;return R}function Q(U,T){var S=U.next();if(t[S]){var R=t[S](U,T);if(R!==false){return R}}if(S=="@"){U.eatWhile(/[\w\\\-]/);return O("def",U.current())}else{if(S=="="||(S=="~"||S=="|")&&U.eat("=")){return O(null,"compare")}else{if(S=='"'||S=="'"){T.tokenize=C(S);return T.tokenize(U,T)}else{if(S=="#"){U.eatWhile(/[\w\\\-]/);return O("atom","hash")}else{if(S=="!"){U.match(/^\s*\w*/);return O("keyword","important")}else{if(/\d/.test(S)||S=="."&&U.eat(/\d/)){U.eatWhile(/[\w.%]/);return O("number","unit")}else{if(S==="-"){if(/[\d.]/.test(U.peek())){U.eatWhile(/[\w.%]/);return O("number","unit")}else{if(U.match(/^[^-]+-/)){return O("meta","meta")}}}else{if(/[,+>*\/]/.test(S)){return O(null,"select-op")}else{if(S=="."&&U.match(/^-?[_a-z][_a-z0-9-]*/i)){return O("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(S)){return O(null,S)}else{if(S=="u"&&U.match("rl(")){U.backUp(1);T.tokenize=P;return O("property","word")}else{if(/[\w\\\-]/.test(S)){U.eatWhile(/[\w\\\-]/);return O("property","word")}else{return O(null,null)}}}}}}}}}}}}}function C(R){return function(V,T){var U=false,S;while((S=V.next())!=null){if(S==R&&!U){if(R==")"){V.backUp(1)}break}U=!U&&S=="\\"}if(S==R||!U&&R!=")"){T.tokenize=null}return O("string","string")}}function P(S,R){S.next();if(!S.match(/\s*[\"\')]/,false)){R.tokenize=C(")")}else{R.tokenize=null}return O(null,"(")}function I(S,R,T){this.type=S;this.indent=R;this.prev=T}function y(S,T,R){S.context=new I(R,T.indentation()+H,S.context);return R}function K(R){R.context=R.context.prev;return R.context.type}function s(R,T,S){return x[S.context.type](R,T,S)}function L(S,U,T,V){for(var R=V||1;R>0;R--){T.context=T.context.prev}return s(S,U,T)}function z(S){var R=S.current().toLowerCase();if(J.hasOwnProperty(R)){F="atom"}else{if(G.hasOwnProperty(R)){F="keyword"}else{F="variable"}}}var x={};x.top=function(R,T,S){if(R=="{"){return y(S,T,"block")}else{if(R=="}"&&S.context.prev){return K(S)}else{if(R=="@media"){return y(S,T,"media")}else{if(R=="@font-face"){return"font_face_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(R)){return"keyframes"}else{if(R&&R.charAt(0)=="@"){return y(S,T,"at")}else{if(R=="hash"){F="builtin"}else{if(R=="word"){F="tag"}else{if(R=="variable-definition"){return"maybeprop"}else{if(R=="interpolation"){return y(S,T,"interpolation")}else{if(R==":"){return"pseudo"}else{if(E&&R=="("){return y(S,T,"params")}}}}}}}}}}}}return S.context.type};x.block=function(R,U,S){if(R=="word"){var T=U.current().toLowerCase();if(A.hasOwnProperty(T)){F="property";return"maybeprop"}else{if(u.hasOwnProperty(T)){F="string-2";return"maybeprop"}else{if(E){F=U.match(/^\s*:/,false)?"property":"tag";return"block"}else{F+=" error";return"maybeprop"}}}}else{if(R=="meta"){return"block"}else{if(!E&&(R=="hash"||R=="qualifier")){F="error";return"block"}else{return x.top(R,U,S)}}}};x.maybeprop=function(R,T,S){if(R==":"){return y(S,T,"prop")}return s(R,T,S)};x.prop=function(R,T,S){if(R==";"){return K(S)}if(R=="{"&&E){return y(S,T,"propBlock")}if(R=="}"||R=="{"){return L(R,T,S)}if(R=="("){return y(S,T,"parens")}if(R=="hash"&&!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(T.current())){F+=" error"}else{if(R=="word"){z(T)}else{if(R=="interpolation"){return y(S,T,"interpolation")}}}return"prop"};x.propBlock=function(S,R,T){if(S=="}"){return K(T)}if(S=="word"){F="property";return"maybeprop"}return T.context.type};x.parens=function(R,T,S){if(R=="{"||R=="}"){return L(R,T,S)}if(R==")"){return K(S)}return"parens"};x.pseudo=function(R,T,S){if(R=="word"){F="variable-3";return S.context.type}return s(R,T,S)};x.media=function(R,U,S){if(R=="("){return y(S,U,"media_parens")}if(R=="}"){return L(R,U,S)}if(R=="{"){return K(S)&&y(S,U,E?"block":"top")}if(R=="word"){var T=U.current().toLowerCase();if(T=="only"||T=="not"||T=="and"){F="keyword"}else{if(M.hasOwnProperty(T)){F="attribute"}else{if(D.hasOwnProperty(T)){F="property"}else{F="error"}}}}return S.context.type};x.media_parens=function(R,T,S){if(R==")"){return K(S)}if(R=="{"||R=="}"){return L(R,T,S,2)}return x.media(R,T,S)};x.font_face_before=function(R,T,S){if(R=="{"){return y(S,T,"font_face")}return s(R,T,S)};x.font_face=function(R,T,S){if(R=="}"){return K(S)}if(R=="word"){if(!w.hasOwnProperty(T.current().toLowerCase())){F="error"}else{F="property"}return"maybeprop"}return"font_face"};x.keyframes=function(R,T,S){if(R=="word"){F="variable";return"keyframes"}if(R=="{"){return y(S,T,"top")}return s(R,T,S)};x.at=function(R,T,S){if(R==";"){return K(S)}if(R=="{"||R=="}"){return L(R,T,S)}if(R=="word"){F="tag"}else{if(R=="hash"){F="builtin"}}return"at"};x.interpolation=function(R,T,S){if(R=="}"){return K(S)}if(R=="{"||R==";"){return L(R,T,S)}if(R!="variable"){F="error"}return"interpolation"};x.params=function(R,T,S){if(R==")"){return K(S)}if(R=="{"||R=="}"){return L(R,T,S)}if(R=="word"){z(T)}return"params"};return{startState:function(R){return{tokenize:null,state:"top",context:new I("top",R||0,null)}},token:function(T,S){if(!S.tokenize&&T.eatSpace()){return null}var R=(S.tokenize||Q)(T,S);if(R&&typeof R=="object"){v=R[1];R=R[0]}F=R;S.state=x[S.state](v,T,S);return F},indent:function(V,T){var S=V.context,U=T&&T.charAt(0);var R=S.indent;if(S.type=="prop"&&U=="}"){S=S.prev}if(S.prev&&(U=="}"&&(S.type=="block"||S.type=="top"||S.type=="interpolation"||S.type=="font_face")||U==")"&&(S.type=="parens"||S.type=="params"||S.type=="media_parens")||U=="{"&&(S.type=="at"||S.type=="media"))){R=S.indent-H;S=S.prev}return R},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});function f(u){var t={};for(var s=0;s<u.length;++s){t[u[s]]=true}return t}var a=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],p=f(a);var r=["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"],i=f(r);var c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","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","flow-from","flow-into","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","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","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","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-inside","shape-outside","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-overflow","text-shadow","text-size-adjust","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","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=f(c);var d=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],d=f(d);var b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],k=f(b);var j=["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","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","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","column","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","ellipse","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","keep-all","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","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","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","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],n=f(j);var o=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],e=f(o);var l=a.concat(r).concat(c).concat(d).concat(b).concat(j);m.registerHelper("hintWords","css",l);function q(v,u){var s=false,t;while((t=v.next())!=null){if(s&&t=="/"){u.tokenize=null;break}s=(t=="*")}return["comment","comment"]}function g(t,s){if(t.skipTo("-->")){t.match("-->");s.tokenize=null}else{t.skipToEnd()}return["comment","comment"]}m.defineMIME("text/css",{mediaTypes:p,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:d,colorKeywords:k,valueKeywords:n,fontProperties:e,tokenHooks:{"<":function(t,s){if(!t.match("!--")){return false}s.tokenize=g;return g(t,s)},"/":function(t,s){if(!t.eat("*")){return false}s.tokenize=q;return q(t,s)}},name:"css"});m.defineMIME("text/x-scss",{mediaTypes:p,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:d,colorKeywords:k,valueKeywords:n,fontProperties:e,allowNested:true,tokenHooks:{"/":function(t,s){if(t.eat("/")){t.skipToEnd();return["comment","comment"]}else{if(t.eat("*")){s.tokenize=q;return q(t,s)}else{return["operator","operator"]}}},":":function(s){if(s.match(/\s*{/)){return[null,"{"]}return false},"$":function(s){s.match(/^[\w-]+/);if(s.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(s){if(!s.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});m.defineMIME("text/x-less",{mediaTypes:p,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:d,colorKeywords:k,valueKeywords:n,fontProperties:e,allowNested:true,tokenHooks:{"/":function(t,s){if(t.eat("/")){t.skipToEnd();return["comment","comment"]}else{if(t.eat("*")){s.tokenize=q;return q(t,s)}else{return["operator","operator"]}}},"@":function(s){if(s.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,false)){return false}s.eatWhile(/[\w\\\-]/);if(s.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})});
9
- // CodeMirror HTML.
10
- (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("htmlmixed",function(c,d){var b=a.getMode(c,{name:"xml",htmlMode:true,multilineTagIndentFactor:d.multilineTagIndentFactor,multilineTagIndentPastTag:d.multilineTagIndentPastTag});var n=a.getMode(c,"css");var l=[],k=d&&d.scriptTypes;l.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:a.getMode(c,"javascript")});if(k){for(var e=0;e<k.length;++e){var j=k[e];l.push({matches:j.matches,mode:j.mode&&a.getMode(c,j.mode)})}}l.push({matches:/./,mode:a.getMode(c,"text/plain")});function f(t,r){var p=r.htmlState.tagName;var q=b.token(t,r.htmlState);if(p=="script"&&/\btag\b/.test(q)&&t.current()==">"){var u=t.string.slice(Math.max(0,t.pos-100),t.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);u=u?u[1]:"";if(u&&/[\"\']/.test(u.charAt(0))){u=u.slice(1,u.length-1)}for(var o=0;o<l.length;++o){var s=l[o];if(typeof s.matches=="string"?u==s.matches:s.matches.test(u)){if(s.mode){r.token=m;r.localMode=s.mode;r.localState=s.mode.startState&&s.mode.startState(b.indent(r.htmlState,""))}break}}}else{if(p=="style"&&/\btag\b/.test(q)&&t.current()==">"){r.token=g;r.localMode=n;r.localState=n.startState(b.indent(r.htmlState,""))}}return q}function h(s,o,p){var r=s.current();var q=r.search(o),i;if(q>-1){s.backUp(r.length-q)}else{if(i=r.match(/<\/?$/)){s.backUp(r.length);if(!s.match(o,false)){s.match(r)}}}return p}function m(o,i){if(o.match(/^<\/\s*script\s*>/i,false)){i.token=f;i.localState=i.localMode=null;return f(o,i)}return h(o,/<\/\s*script\s*>/,i.localMode.token(o,i.localState))}function g(o,i){if(o.match(/^<\/\s*style\s*>/i,false)){i.token=f;i.localState=i.localMode=null;return f(o,i)}return h(o,/<\/\s*style\s*>/,n.token(o,i.localState))}return{startState:function(){var i=b.startState();return{token:f,localMode:null,localState:null,htmlState:i}},copyState:function(o){if(o.localState){var i=a.copyState(o.localMode,o.localState)}return{token:o.token,localMode:o.localMode,localState:i,htmlState:a.copyState(b,o.htmlState)}},token:function(o,i){return i.token(o,i)},indent:function(o,i){if(!o.localMode||/^\s*<\//.test(i)){return b.indent(o.htmlState,i)}else{if(o.localMode.indent){return o.localMode.indent(o.localState,i)}else{return a.Pass}}},innerMode:function(i){return{state:i.localState||i.htmlState,mode:i.localMode||b}}}},"xml","javascript","css");a.defineMIME("text/html","htmlmixed")});
11
- // CodeMirror PHP.
12
- (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],a)}else{a(CodeMirror)}}})(function(b){function d(m){var k={},l=m.split(" ");for(var j=0;j<l.length;++j){k[l[j]]=true}return k}function i(j){return function(l,k){if(l.match(j)){k.tokenize=null}else{l.skipToEnd()}return"string"}}function c(j){if(j.length==0){return f}return function(n,m){var l=j[0];for(var k=0;k<l.length;k++){if(n.match(l[k][0])){m.tokenize=c(j.slice(1));return l[k][1]}}m.tokenize=f;return"string"}}function f(n,l){var m=false,k,j=false;if(n.current()=='"'){return"string"}if(n.match("${",false)||n.match("{$",false)){l.tokenize=null;return"string"}if(n.match(/\$[a-zA-Z_][a-zA-Z0-9_]*/)){if(n.match("[",false)){l.tokenize=c([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]])}if(n.match(/\-\>\w/,false)){l.tokenize=c([[["->",null]],[[/[\w]+/,"variable"]]])}return"variable-2"}while(!n.eol()&&(!n.match("{$",false))&&(!n.match(/(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,false)||m)){k=n.next();if(!m&&k=='"'){j=true;break}m=!m&&k=="\\"}if(j){l.tokenize=null;l.phpEncapsStack.pop()}return"string"}var g="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally";var h="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";var a="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once";b.registerHelper("hintWords","php",[g,h,a].join(" ").split(" "));var e={name:"clike",helperType:"php",keywords:d(g),blockKeywords:d("catch do else elseif for foreach if switch try while finally"),atoms:d(h),builtin:d(a),multiLineStrings:true,hooks:{"$":function(j){j.eatWhile(/[\w\$_]/);return"variable-2"},"<":function(k,j){if(k.match(/<</)){k.eatWhile(/[\w\.]/);j.tokenize=i(k.current().slice(3));return j.tokenize(k,j)}return false},"#":function(j){while(!j.eol()&&!j.match("?>",false)){j.next()}return"comment"},"/":function(j){if(j.eat("/")){while(!j.eol()&&!j.match("?>",false)){j.next()}return"comment"}return false},'"':function(k,j){if(!j.phpEncapsStack){j.phpEncapsStack=[]}j.phpEncapsStack.push(0);j.tokenize=f;return j.tokenize(k,j)},"{":function(j,k){if(k.phpEncapsStack&&k.phpEncapsStack.length>0){k.phpEncapsStack[k.phpEncapsStack.length-1]++}return false},"}":function(j,k){if(k.phpEncapsStack&&k.phpEncapsStack.length>0){if(--k.phpEncapsStack[k.phpEncapsStack.length-1]==0){k.tokenize=f}}return false}}};b.defineMode("php",function(l,m){var n=b.getMode(l,"text/html");var j=b.getMode(l,e);function k(u,s){var r=s.curMode==j;if(u.sol()&&s.pending&&s.pending!='"'&&s.pending!="'"){s.pending=null}if(!r){if(u.match(/^<\?\w*/)){s.curMode=j;s.curState=s.php;return"meta"}if(s.pending=='"'||s.pending=="'"){while(!u.eol()&&u.next()!=s.pending){}var q="string"}else{if(s.pending&&u.pos<s.pending.end){u.pos=s.pending.end;var q=s.pending.style}else{var q=n.token(u,s.curState)}}if(s.pending){s.pending=null}var t=u.current(),p=t.search(/<\?/),o;if(p!=-1){if(q=="string"&&(o=t.match(/[\'\"]$/))&&!/\?>/.test(t)){s.pending=o[0]}else{s.pending={end:u.pos,style:q}}u.backUp(t.length-p)}return q}else{if(r&&s.php.tokenize==null&&u.match("?>")){s.curMode=n;s.curState=s.html;return"meta"}else{return j.token(u,s.curState)}}}return{startState:function(){var o=b.startState(n),p=b.startState(j);return{html:o,php:p,curMode:m.startOpen?j:n,curState:m.startOpen?p:o,pending:null}},copyState:function(r){var p=r.html,q=b.copyState(n,p),t=r.php,o=b.copyState(j,t),s;if(r.curMode==n){s=q}else{s=o}return{html:q,php:o,curMode:r.curMode,curState:s,pending:r.pending}},token:k,indent:function(p,o){if((p.curMode!=j&&/^\s*<\//.test(o))||(p.curMode==j&&/^\?>/.test(o))){return n.indent(p.html,o)}return p.curMode.indent(p.curState,o)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(o){return{state:o.curState,mode:o.curMode}}}},"htmlmixed","clike");b.defineMIME("application/x-httpd-php","php");b.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:true});b.defineMIME("text/x-php",e)});
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/lib/mousewheel.js DELETED
@@ -1,221 +0,0 @@
1
- /*!
2
- * jQuery Mousewheel 3.1.12
3
- *
4
- * Copyright 2014 jQuery Foundation and other contributors
5
- * Released under the MIT license.
6
- * http://jquery.org/license
7
- */
8
-
9
- (function (factory) {
10
- if ( typeof define === 'function' && define.amd ) {
11
- // AMD. Register as an anonymous module.
12
- define(['jquery'], factory);
13
- } else if (typeof exports === 'object') {
14
- // Node/CommonJS style for Browserify
15
- module.exports = factory;
16
- } else {
17
- // Browser globals
18
- factory(jQuery);
19
- }
20
- }(function ($) {
21
-
22
- var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
23
- toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
24
- ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
25
- slice = Array.prototype.slice,
26
- nullLowestDeltaTimeout, lowestDelta;
27
-
28
- if ( $.event.fixHooks ) {
29
- for ( var i = toFix.length; i; ) {
30
- $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
31
- }
32
- }
33
-
34
- var special = $.event.special.mousewheel = {
35
- version: '3.1.12',
36
-
37
- setup: function() {
38
- if ( this.addEventListener ) {
39
- for ( var i = toBind.length; i; ) {
40
- this.addEventListener( toBind[--i], handler, false );
41
- }
42
- } else {
43
- this.onmousewheel = handler;
44
- }
45
- // Store the line height and page height for this particular element
46
- $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
47
- $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
48
- },
49
-
50
- teardown: function() {
51
- if ( this.removeEventListener ) {
52
- for ( var i = toBind.length; i; ) {
53
- this.removeEventListener( toBind[--i], handler, false );
54
- }
55
- } else {
56
- this.onmousewheel = null;
57
- }
58
- // Clean up the data we added to the element
59
- $.removeData(this, 'mousewheel-line-height');
60
- $.removeData(this, 'mousewheel-page-height');
61
- },
62
-
63
- getLineHeight: function(elem) {
64
- var $elem = $(elem),
65
- $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
66
- if (!$parent.length) {
67
- $parent = $('body');
68
- }
69
- return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
70
- },
71
-
72
- getPageHeight: function(elem) {
73
- return $(elem).height();
74
- },
75
-
76
- settings: {
77
- adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
78
- normalizeOffset: true // calls getBoundingClientRect for each event
79
- }
80
- };
81
-
82
- $.fn.extend({
83
- mousewheel: function(fn) {
84
- return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
85
- },
86
-
87
- unmousewheel: function(fn) {
88
- return this.unbind('mousewheel', fn);
89
- }
90
- });
91
-
92
-
93
- function handler(event) {
94
- var orgEvent = event || window.event,
95
- args = slice.call(arguments, 1),
96
- delta = 0,
97
- deltaX = 0,
98
- deltaY = 0,
99
- absDelta = 0,
100
- offsetX = 0,
101
- offsetY = 0;
102
- event = $.event.fix(orgEvent);
103
- event.type = 'mousewheel';
104
-
105
- // Old school scrollwheel delta
106
- if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
107
- if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
108
- if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
109
- if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
110
-
111
- // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
112
- if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
113
- deltaX = deltaY * -1;
114
- deltaY = 0;
115
- }
116
-
117
- // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
118
- delta = deltaY === 0 ? deltaX : deltaY;
119
-
120
- // New school wheel delta (wheel event)
121
- if ( 'deltaY' in orgEvent ) {
122
- deltaY = orgEvent.deltaY * -1;
123
- delta = deltaY;
124
- }
125
- if ( 'deltaX' in orgEvent ) {
126
- deltaX = orgEvent.deltaX;
127
- if ( deltaY === 0 ) { delta = deltaX * -1; }
128
- }
129
-
130
- // No change actually happened, no reason to go any further
131
- if ( deltaY === 0 && deltaX === 0 ) { return; }
132
-
133
- // Need to convert lines and pages to pixels if we aren't already in pixels
134
- // There are three delta modes:
135
- // * deltaMode 0 is by pixels, nothing to do
136
- // * deltaMode 1 is by lines
137
- // * deltaMode 2 is by pages
138
- if ( orgEvent.deltaMode === 1 ) {
139
- var lineHeight = $.data(this, 'mousewheel-line-height');
140
- delta *= lineHeight;
141
- deltaY *= lineHeight;
142
- deltaX *= lineHeight;
143
- } else if ( orgEvent.deltaMode === 2 ) {
144
- var pageHeight = $.data(this, 'mousewheel-page-height');
145
- delta *= pageHeight;
146
- deltaY *= pageHeight;
147
- deltaX *= pageHeight;
148
- }
149
-
150
- // Store lowest absolute delta to normalize the delta values
151
- absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
152
-
153
- if ( !lowestDelta || absDelta < lowestDelta ) {
154
- lowestDelta = absDelta;
155
-
156
- // Adjust older deltas if necessary
157
- if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
158
- lowestDelta /= 40;
159
- }
160
- }
161
-
162
- // Adjust older deltas if necessary
163
- if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
164
- // Divide all the things by 40!
165
- delta /= 40;
166
- deltaX /= 40;
167
- deltaY /= 40;
168
- }
169
-
170
- // Get a whole, normalized value for the deltas
171
- delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
172
- deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
173
- deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
174
-
175
- // Normalise offsetX and offsetY properties
176
- if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
177
- var boundingRect = this.getBoundingClientRect();
178
- offsetX = event.clientX - boundingRect.left;
179
- offsetY = event.clientY - boundingRect.top;
180
- }
181
-
182
- // Add information to the event object
183
- event.deltaX = deltaX;
184
- event.deltaY = deltaY;
185
- event.deltaFactor = lowestDelta;
186
- event.offsetX = offsetX;
187
- event.offsetY = offsetY;
188
- // Go ahead and set deltaMode to 0 since we converted to pixels
189
- // Although this is a little odd since we overwrite the deltaX/Y
190
- // properties with normalized deltas.
191
- event.deltaMode = 0;
192
-
193
- // Add event and delta to the front of the arguments
194
- args.unshift(event, delta, deltaX, deltaY);
195
-
196
- // Clearout lowestDelta after sometime to better
197
- // handle multiple device types that give different
198
- // a different lowestDelta
199
- // Ex: trackpad = 3 and mouse wheel = 120
200
- if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
201
- nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
202
-
203
- return ($.event.dispatch || $.event.handle).apply(this, args);
204
- }
205
-
206
- function nullLowestDelta() {
207
- lowestDelta = null;
208
- }
209
-
210
- function shouldAdjustOldDeltas(orgEvent, absDelta) {
211
- // If this is an older event and the delta is divisable by 120,
212
- // then we are assuming that the browser is treating this as an
213
- // older mouse wheel event and that we should divide the deltas
214
- // by 40 to try and get a more usable deltaFactor.
215
- // Side note, this actually impacts the reported scroll distance
216
- // in older browsers and can cause scrolling to be slower than native.
217
- // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
218
- return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
219
- }
220
-
221
- }));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/media-delete.js DELETED
@@ -1,139 +0,0 @@
1
- /* global document, confirm */
2
- /* jshint unused:false, newcap: false */
3
- jQuery( document ).ready( function( $ ) {
4
-
5
- // Delete multiple images from slider
6
- $('a.soliloquy-slides-delete').click(function(e) {
7
-
8
- //Prevent Default
9
- e.preventDefault();
10
-
11
- // Bail out if the user does not actually want to remove the image.
12
- var confirm_delete = confirm(soliloquy_metabox.remove_multiple);
13
- if ( ! confirm_delete ) {
14
- return false;
15
- }
16
-
17
-
18
- // Build array of image attachment IDs
19
- var attach_ids = [];
20
-
21
- //Get all selectd Images
22
- $('ul#soliloquy-output > li.selected').each(function() {
23
-
24
- attach_ids.push($(this).attr('id'));
25
-
26
- });
27
-
28
- // Prepare our data to be sent via Ajax.
29
- var remove = {
30
- action: 'soliloquy_remove_slides',
31
- attachment_ids:attach_ids,
32
- post_id: soliloquy_metabox.id,
33
- nonce: soliloquy_metabox.remove_nonce
34
- };
35
-
36
- // Process the Ajax response and output all the necessary data.
37
- $.post(
38
- soliloquy_metabox.ajax,
39
- remove,
40
- function(response) {
41
-
42
- // Remove each image
43
- $('ul#soliloquy-output > li.selected').remove();
44
-
45
- //Hide Bulk Actions
46
- $( '.soliloquy-bulk-actions' ).fadeOut();
47
-
48
- //Uncheck the checkbox
49
- $('.soliloquy-select-all').prop('checked', false);
50
-
51
- // Refresh the modal view to ensure no items are still checked if they have been removed.
52
- $('.soliloquy-load-library').attr('data-soliloquy-offset', 0).addClass('has-search').trigger('click');
53
-
54
- // Repopulate the Soliloquy Slide Collection
55
- SoliloquySlidesUpdate( false );
56
-
57
- //Get Slide Count
58
- var list = $('#soliloquy-output li').length;
59
-
60
- //Update the slide count text
61
- $('.soliloquy-count').text( list.toString() );
62
-
63
- //If there are no slides
64
- if ( list === 0 ){
65
-
66
- //Make sure bulk actions are out of view
67
- $( '.soliloquy-bulk-actions' ).fadeOut();
68
-
69
- //Fade out Settings header
70
- $('.soliloquy-slide-header').fadeOut().addClass('soliloquy-hidden');
71
-
72
- //Add Empty Slider Content
73
- $('#soliloquy-empty-slider').removeClass('soliloquy-hidden').fadeIn();
74
-
75
- }
76
-
77
- },
78
- 'json'
79
- );
80
- });
81
-
82
- // Process image removal from a gallery.
83
- $('#soliloquy-settings-content ').on('click', '.soliloquy-remove-slide', function(e){
84
- e.preventDefault();
85
-
86
- // Bail out if the user does not actually want to remove the image.
87
- var confirm_delete = confirm(soliloquy_metabox.remove);
88
- if ( ! confirm_delete ){
89
-
90
- return;
91
- }
92
-
93
- // Prepare our data to be sent via Ajax.
94
- var attach_id = $(this).parent().attr('id'),
95
- remove = {
96
- action: 'soliloquy_remove_slide',
97
- attachment_id: attach_id,
98
- post_id: soliloquy_metabox.id,
99
- nonce: soliloquy_metabox.remove_nonce
100
- };
101
-
102
- // Process the Ajax response and output all the necessary data.
103
- $.post(
104
- soliloquy_metabox.ajax,
105
- remove,
106
- function(response) {
107
- $('#' + attach_id).fadeOut('normal', function() {
108
- $(this).remove();
109
-
110
- // Refresh the modal view to ensure no items are still checked if they have been removed.
111
- $('.soliloquy-load-library').attr('data-soliloquy-offset', 0).addClass('has-search').trigger('click');
112
-
113
- // Repopulate the Soliloquy Image Collection
114
- SoliloquySlidesUpdate( false );
115
-
116
- //Get the slide count
117
- var list = $('#soliloquy-output li').length;
118
-
119
- //Update Slide Count
120
- $('.soliloquy-count').text( list.toString() );
121
-
122
- if ( list === 0 ){
123
-
124
- //Make sure bulk actions are out of view
125
- $( '.soliloquy-bulk-actions' ).fadeOut();
126
-
127
- //Fade out Settings header
128
- $('.soliloquy-slide-header').fadeOut().addClass('soliloquy-hidden');
129
-
130
- //Add Empty Slider Content
131
- $('#soliloquy-empty-slider').removeClass('soliloquy-hidden').fadeIn();
132
- }
133
-
134
- });
135
- },
136
- 'json'
137
- );
138
- });
139
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/media-edit-bulk.js DELETED
@@ -1,365 +0,0 @@
1
- /**
2
- * Single Image View
3
- * - Renders an <li> element within the bulk edit view
4
- */
5
- var SoliloquyBulkEditImageView = wp.Backbone.View.extend( {
6
-
7
- /**
8
- * The Tag Name and Tag's Class(es)
9
- */
10
-
11
- tagName: 'li',
12
- className: 'attachment',
13
-
14
- /**
15
- * Template
16
- * - The template to load inside the above tagName element
17
- */
18
- template: wp.template( 'soliloquy-meta-bulk-editor-slides' ),
19
-
20
- /**
21
- * Initialize
22
- *
23
- * @param object model SoliloquyImage Backbone Model
24
- */
25
- initialize: function( args ) {
26
-
27
- // Assign the model to this view
28
- this.model = args.model;
29
-
30
- },
31
-
32
- /**
33
- * Render
34
- * - Binds the model to the view, so we populate the view's fields and data
35
- */
36
- render: function() {
37
-
38
- // Get HTML
39
- this.$el.html( this.template( this.model.attributes ) );
40
- return this;
41
-
42
- }
43
-
44
- } );
45
-
46
- /**
47
- * Bulk Edit View
48
- */
49
- var SoliloquyBulkEditView = wp.Backbone.View.extend( {
50
-
51
- /**
52
- * The Tag Name and Tag's Class(es)
53
- */
54
- id: 'soliloquy-meta-edit-bulk',
55
- tagName: 'div',
56
- className: 'edit-attachment-frame mode-select hide-menu hide-router',
57
-
58
- /**
59
- * Template
60
- * - The template to load inside the above tagName element
61
- */
62
- template: wp.template( 'soliloquy-meta-bulk-editor' ),
63
-
64
- /**
65
- * Events
66
- * - Functions to call when specific events occur
67
- */
68
- events: {
69
- 'keyup input': 'updateItem',
70
- 'keyup textarea': 'updateItem',
71
- 'change input': 'updateItem',
72
- 'change textarea': 'updateItem',
73
- 'blur textarea': 'updateItem',
74
- 'change select': 'updateItem',
75
-
76
- 'click .actions a.soliloquy-meta-submit': 'saveItem',
77
-
78
- 'keyup input#link-search': 'searchLinks',
79
- 'click div.query-results li': 'insertLink',
80
-
81
- 'click button.media-file': 'insertMediaFileLink',
82
- 'click button.attachment-page': 'insertAttachmentPageLink',
83
- },
84
-
85
- /**
86
- * Initialize
87
- *
88
- * @param object model SoliloquyImage Backbone Model
89
- */
90
- initialize: function( args ) {
91
-
92
- // Define loading and loaded events, which update the UI with what's happening.
93
- this.on( 'loading', this.loading, this );
94
- this.on( 'loaded', this.loaded, this );
95
-
96
- // Set some flags
97
- this.is_loading = false;
98
- this.collection = args.collection;
99
- this.child_views = args.child_views;
100
-
101
- // The model will be blank, as we want the user's settings for each
102
- // option to then apply to the entire collection
103
- this.model = new SoliloquySlide();
104
-
105
- },
106
-
107
- /**
108
- * Render
109
- * - Binds the collection to the view, so we populate the view's attachments grid
110
- */
111
- render: function() {
112
-
113
- // Get HTML
114
- this.$el.html( this.template( this.model.toJSON() ) );
115
-
116
- // Render selected items
117
- this.collection.forEach( function( model ) {
118
- // Init with model
119
- var child_view = new SoliloquyBulkEditImageView( {
120
- model: model
121
- } );
122
-
123
- // Render view within our main view
124
- this.$el.find( 'ul.attachments' ).append( child_view.render().el );
125
- }, this );
126
-
127
- // If any child views exist, render them now
128
- if ( this.child_views.length > 0 ) {
129
- this.child_views.forEach( function( view ) {
130
- // Init with model
131
- var child_view = new view( {
132
- model: this.model
133
- } );
134
-
135
- // Render view within our main view
136
- this.$el.find( 'div.addons' ).append( child_view.render().el );
137
- }, this );
138
- }
139
-
140
- // Set caption
141
- this.$el.find( 'textarea[name=caption]' ).val( this.model.get( 'caption' ) );
142
-
143
- // Init QuickTags on the caption editor
144
- // Delay is required for the first load for some reason
145
- setTimeout( function() {
146
- quicktags( {
147
- id: 'caption',
148
- buttons:'strong,em,link,ul,ol,li,close'
149
- } );
150
- QTags._buttonsInit();
151
- }, 100 );
152
-
153
- // Init Link Searching
154
- wpLink.init;
155
-
156
- // Return
157
- return this;
158
-
159
- },
160
-
161
- /**
162
- * Renders an error using
163
- * wp.media.view.SoliloquyError
164
- */
165
- renderError: function( error ) {
166
-
167
- // Define model
168
- var model = {};
169
- model.error = error;
170
-
171
- // Define view
172
- var view = new wp.media.view.SoliloquyError( {
173
- model: model
174
- } );
175
-
176
- // Return rendered view
177
- return view.render().el;
178
-
179
- },
180
-
181
- /**
182
- * Tells the view we're loading by displaying a spinner
183
- */
184
- loading: function() {
185
-
186
- // Set a flag so we know we're loading data
187
- this.is_loading = true;
188
-
189
- // Show the spinner
190
- this.$el.find( '.spinner' ).css( 'visibility', 'visible' );
191
-
192
- },
193
-
194
- /**
195
- * Hides the loading spinner
196
- */
197
- loaded: function( response ) {
198
-
199
- // Set a flag so we know we're not loading anything now
200
- this.is_loading = false;
201
-
202
- // Hide the spinner
203
- this.$el.find( '.spinner' ).css( 'visibility', 'hidden' );
204
-
205
- // Display the error message, if it's provided
206
- if ( typeof response !== 'undefined' ) {
207
- this.$el.find( 'ul.attachments' ).before( this.renderError( response ) );
208
- }
209
-
210
- },
211
-
212
- /**
213
- * Updates the model based on the changed view data
214
- */
215
- updateItem: function( event ) {
216
-
217
- // Check if the target has a name. If not, it's not a model value we want to store
218
- if ( event.target.name == '' ) {
219
- return;
220
- }
221
-
222
- // Update the model's value, depending on the input type
223
- if ( event.target.type == 'checkbox' ) {
224
- value = ( event.target.checked ? 1 : 0 );
225
- } else {
226
- value = event.target.value;
227
- }
228
-
229
- // Update the model
230
- this.model.set( event.target.name, value );
231
-
232
- },
233
-
234
- /**
235
- * Saves the image metadata
236
- */
237
- saveItem: function() {
238
-
239
- // Tell the View we're loading
240
- this.trigger( 'loading' );
241
-
242
- // Build an array of image IDs
243
- var image_ids = [];
244
- this.collection.forEach( function( model ) {
245
- image_ids.push( model.id );
246
- }, this );
247
-
248
- // Make an AJAX request to save the image metadata for the collection's images
249
- wp.media.ajax( 'soliloquy_bulk_save_meta', {
250
- context: this,
251
- data: {
252
- nonce: soliloquy_metabox.save_nonce,
253
- post_id: soliloquy_metabox.id,
254
- meta: this.model.attributes,
255
- image_ids: image_ids,
256
- },
257
- success: function( response ) {
258
-
259
- // For each image, update the model based on the edited information before inserting it as JSON
260
- // into the underlying image.
261
- this.collection.forEach( function( model ) {
262
-
263
- for ( var key in this.model.attributes ) {
264
- value = this.model.attributes[ key ];
265
-
266
- // If the value is not blank, assign the value to the image model
267
- if ( value.length > 0 ) {
268
- model.set( key, value );
269
- }
270
- }
271
-
272
- // Assign the model to the underlying image item in the DOM
273
- var item = JSON.stringify( model.attributes );
274
- jQuery( 'ul#soliloquy li#' + model.get( 'id' ) ).attr( 'data-solioquy-image-model', item );
275
- jQuery( 'ul#soliloquy li#' + model.get( 'id' ) + ' div.title' ).text( model.get( 'title' ) );
276
-
277
- }, this );
278
-
279
- // Tell the view we've finished successfully
280
- this.trigger( 'loaded loaded:success' );
281
-
282
- // Close the modal
283
- SoliloquyModalWindow.close();
284
- },
285
- error: function( error_message ) {
286
-
287
- // Tell wp.media we've finished, but there was an error
288
- this.trigger( 'loaded loaded:error', error_message );
289
-
290
- }
291
- } );
292
-
293
- },
294
-
295
- /**
296
- * Inserts the direct media link for the Media Library item
297
- *
298
- * The button triggering this event is only displayed if we are editing a
299
- * Media Library item, so there's no need to perform further checks
300
- */
301
- insertMediaFileLink: function( event ) {
302
-
303
- // Tell the View we're loading
304
- this.trigger( 'loading' );
305
-
306
- // Update model
307
- this.model.set( 'link', response.media_link );
308
-
309
- // Tell the view we've finished successfully
310
- this.trigger( 'loaded loaded:success' );
311
-
312
- // Re-render the view
313
- this.render();
314
-
315
- },
316
-
317
- /**
318
- * Inserts the attachment page link for the Media Library item
319
- *
320
- * The button triggering this event is only displayed if we are editing a
321
- * Media Library item, so there's no need to perform further checks
322
- */
323
- insertAttachmentPageLink: function( event ) {
324
-
325
- // Tell the View we're loading
326
- this.trigger( 'loading' );
327
-
328
- // Update model
329
- this.model.set( 'link', response.media_link );
330
-
331
- // Tell the view we've finished successfully
332
- this.trigger( 'loaded loaded:success' );
333
-
334
- // Re-render the view
335
- this.render();
336
-
337
- }
338
-
339
- } );
340
-
341
- jQuery( document ).ready( function( $ ) {
342
-
343
- // Bulk Edit Slides
344
- $( '#soliloquy-settings-content' ).on( 'click', 'a.soliloquy-slides-edit', function( e ) {
345
-
346
- // Prevent default action
347
- e.preventDefault();
348
-
349
- // (Re)populate the collection
350
- // The collection can change based on whether the user previously selected specific slides
351
- SoliloquySlidesUpdate( true ); // true = only selected images
352
-
353
- // Pass the collection of images for this gallery to the modal view, as well
354
- // as the selected attachment
355
- SoliloquyModalWindow.content( new SoliloquyBulkEditView( {
356
- collection: SoliloquySlides,
357
- child_views: SoliloquyChildViews,
358
- } ) );
359
-
360
- // Open the modal window
361
- SoliloquyModalWindow.open();
362
-
363
- } );
364
-
365
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/media-edit.js DELETED
@@ -1,580 +0,0 @@
1
- /* global document, Backbone */
2
- /* jshint unused:false, newcap: false */
3
- /**
4
- * Slide Model
5
- */
6
- var SoliloquySlide = Backbone.Model.extend( {
7
-
8
- /**
9
- * Defaults
10
- * As we always populate this model with existing data, we
11
- * leave these blank to just show how this model is structured.
12
- */
13
- defaults: {
14
- 'id': '',
15
- 'title': '',
16
- 'caption': '',
17
- 'alt': '',
18
- 'link': '',
19
- 'type': '',
20
-
21
- },
22
-
23
- } );
24
-
25
- /**
26
- * Images Collection
27
- * - Comprises of all slides in an Soliloquy Slider
28
- * - Each image is represented by an SoliloquySlides Model
29
- */
30
- var SoliloquySlides = new Backbone.Collection;
31
-
32
- /**
33
- * Modal Window
34
- */
35
- var SoliloquyModalWindow = new wp.media.view.Modal( {
36
- controller: {
37
- trigger: function() {
38
-
39
- }
40
- }
41
- } );
42
-
43
- /**
44
- * View
45
- */
46
- var SoliloquyView = wp.Backbone.View.extend( {
47
-
48
- /**
49
- * The Tag Name and Tag's Class(es)
50
- */
51
- id: 'soliloquy-meta-edit',
52
- tagName: 'div',
53
- className: 'edit-attachment-frame mode-select hide-menu hide-router',
54
-
55
- /**
56
- * Template
57
- * - The template to load inside the above tagName element
58
- */
59
- template: wp.template( 'soliloquy-meta-editor' ),
60
-
61
- /**
62
- * Events
63
- * - Functions to call when specific events occur
64
- */
65
- events: {
66
- 'click .edit-media-header .left': 'loadPreviousItem',
67
- 'click .edit-media-header .right': 'loadNextItem',
68
-
69
- 'keyup input': 'updateItem',
70
- 'keyup textarea': 'updateItem',
71
- 'change input': 'updateItem',
72
- 'change textarea': 'updateItem',
73
- 'keyup .CodeMirror': 'updateCode',
74
- 'blur textarea': 'updateItem',
75
-
76
- 'change select': 'updateItem',
77
-
78
- 'click a.soliloquy-meta-submit': 'saveItem',
79
-
80
- 'keyup input#link-search': 'searchLinks',
81
- 'click div.query-results li': 'insertLink',
82
-
83
- 'click a.soliloquy-thumbnail': 'insertThumb',
84
- 'click a.soliloquy-thumbnail-delete': 'removeThumb',
85
-
86
- 'click button.media-file': 'insertMediaFileLink',
87
- 'click button.attachment-page': 'insertAttachmentPageLink',
88
- },
89
-
90
- /**
91
- * Initialize
92
- *
93
- * @param object model SoliloquyImage Backbone Model
94
- */
95
- initialize: function( args ) {
96
-
97
- // Set some flags
98
- this.is_loading = false;
99
- this.collection = args.collection;
100
- this.child_views = args.child_views;
101
- this.attachment_id = args.attachment_id;
102
- this.attachment_index = 0;
103
- this.search_timer = '';
104
-
105
- // Get the model from the collection
106
- var count = 0;
107
- this.collection.each( function( model ) {
108
-
109
- // If this model's id matches the attachment id, this is the model we want, also make sure both are int
110
- if ( String( model.get( 'id' ) ) == String( this.attachment_id ) ) {
111
- this.model = model;
112
- this.attachment_index = count;
113
-
114
- return false;
115
- }
116
-
117
- // Increment the index count
118
- count++;
119
- }, this );
120
-
121
- },
122
- updateCode: function( e ){
123
-
124
- $model = this.model;
125
-
126
- $textarea = this.$el.find('.soliloquy-html-slide-code');
127
-
128
- $model.set( 'code', this.editor.getValue(), { silent: true } );
129
-
130
- $textarea.text();
131
-
132
- },
133
- insertThumb: function( e ){
134
-
135
- $model = this.model;
136
-
137
- e.preventDefault();
138
-
139
- // Get input field class name
140
- var fieldClassName = this.$el.data('field');
141
-
142
- var soliloquy_media_frame = wp.media.frames.soliloquy_media_frame = wp.media({
143
- className: 'media-frame soliloquy-media-frame',
144
- frame: 'select',
145
- multiple: false,
146
- title: soliloquy_metabox.videoframe,
147
- library: {
148
- type: 'image'
149
- },
150
- button: {
151
- text: soliloquy_metabox.videouse
152
- }
153
- });
154
-
155
- soliloquy_media_frame.on('select', function(){
156
-
157
- // Grab our attachment selection and construct a JSON representation of the model.
158
- var thumbnail = soliloquy_media_frame.state().get('selection').first().toJSON();
159
-
160
- $model.set( 'src', thumbnail.url, { silent: true } );
161
- jQuery('div.thumbnail > img', $parent.find('.media-frame-content') ).attr('src', thumbnail.url );
162
-
163
- });
164
-
165
- // Now that everything has been set, let's open up the frame.
166
- soliloquy_media_frame.open();
167
- },
168
-
169
- removeThumb: function(e){
170
-
171
- e.preventDefault();
172
-
173
- $model = this.model;
174
- $parent = this.$el.parent();
175
-
176
- jQuery('div.thumbnail > img', $parent.find('.media-frame-content') ).attr('src','' );
177
-
178
- $model.set( 'src', '', { silent: true } );
179
-
180
- },
181
- /**
182
- * Render
183
- * - Binds the model to the view, so we populate the view's fields and data
184
- */
185
- render: function() {
186
-
187
- // Get HTML
188
- this.$el.html( this.template( this.model.attributes ) );
189
- // If any child views exist, render them now
190
- if ( this.child_views.length > 0 ) {
191
- this.child_views.forEach( function( view ) {
192
- // Init with model
193
- var child_view = new view( {
194
- model: this.model
195
- } );
196
-
197
- // Render view within our main view
198
- this.$el.find( 'div.addons' ).append( child_view.render().el );
199
-
200
- }, this );
201
- }
202
-
203
- // Set caption
204
- this.$el.find( 'textarea[name=caption]' ).val( this.model.get( 'caption' ) );
205
-
206
- // Init QuickTags on the caption editor
207
- // Delay is required for the first load for some reason
208
- setTimeout( function() {
209
- quicktags( {
210
- id: 'caption',
211
- buttons:'strong,em,link,ul,ol,li,close'
212
- } );
213
- QTags._buttonsInit();
214
- }, 500 );
215
-
216
- // Init Link Searching
217
- wpLink.init;
218
-
219
- // Enable / disable the buttons depending on the index
220
- if ( this.attachment_index === 0 ) {
221
- // Disable left button
222
- this.$el.find( 'button.left' ).addClass( 'disabled' );
223
- }
224
- if ( this.attachment_index == ( this.collection.length - 1 ) ) {
225
- // Disable right button
226
- this.$el.find( 'button.right' ).addClass( 'disabled' );
227
- }
228
-
229
- textarea = this.$el.find('.soliloquy-html-slide-code');
230
-
231
- if (textarea.length) {
232
-
233
- this.editor = CodeMirror.fromTextArea( textarea[0] , {
234
- enterMode: 'keep',
235
- indentUnit: 4,
236
- electricChars: false,
237
- lineNumbers: true,
238
- lineWrapping: true,
239
- matchBrackets: true,
240
- mode: 'php',
241
- smartIndent: false,
242
- tabMode: 'shift',
243
- theme: 'ttcn'
244
- });
245
-
246
- }
247
-
248
- this.$el.trigger( 'soliloquyRenderMeta' );
249
-
250
- // Return
251
- return this;
252
-
253
- },
254
-
255
- /**
256
- * Tells the view we're loading by displaying a spinner
257
- */
258
- loading: function() {
259
-
260
- // Set a flag so we know we're loading data
261
- this.is_loading = true;
262
-
263
- // Show the spinner
264
- this.$el.find( '.spinner' ).css( 'visibility', 'visible' );
265
-
266
- },
267
-
268
- /**
269
- * Hides the loading spinner
270
- */
271
- loaded: function( response ) {
272
-
273
- // Set a flag so we know we're not loading anything now
274
- this.is_loading = false;
275
-
276
- // Hide the spinner
277
- this.$el.find( '.spinner' ).css( 'visibility', 'hidden' );
278
-
279
- // Display the error message, if it's provided
280
- if ( typeof response !== 'undefined' ) {
281
- alert( response );
282
- }
283
-
284
- },
285
-
286
- /**
287
- * Load the previous model in the collection
288
- */
289
- loadPreviousItem: function() {
290
-
291
- // Decrement the index
292
- this.attachment_index--;
293
-
294
- // Get the model at the new index from the collection
295
- this.model = this.collection.at( this.attachment_index );
296
-
297
- // Update the attachment_id
298
- this.attachment_id = this.model.get( 'id' );
299
-
300
- // Re-render the view
301
- this.render();
302
-
303
- },
304
-
305
- /**
306
- * Load the next model in the collection
307
- */
308
- loadNextItem: function() {
309
-
310
- // Increment the index
311
- this.attachment_index++;
312
-
313
- // Get the model at the new index from the collection
314
- this.model = this.collection.at( this.attachment_index );
315
-
316
- // Update the attachment_id
317
- this.attachment_id = this.model.get( 'id' );
318
-
319
- // Re-render the view
320
- this.render();
321
-
322
-
323
- },
324
-
325
- /**
326
- * Updates the model based on the changed view data
327
- */
328
- updateItem: function( event ) {
329
-
330
- // Check if the target has a name. If not, it's not a model value we want to store
331
- if ( event.target.name == '' ) {
332
- return;
333
- }
334
-
335
- // Update the model's value, depending on the input type
336
- if ( event.target.type == 'checkbox' ) {
337
- value = ( event.target.checked ? 1 : 0 );
338
- } else {
339
- value = event.target.value;
340
- }
341
-
342
- // Update the model
343
- this.model.set( event.target.name, value );
344
-
345
- },
346
-
347
- /**
348
- * Saves the image metadata
349
- */
350
- saveItem: function( event ) {
351
-
352
- event.preventDefault();
353
-
354
- // Tell the View we're loading
355
- this.trigger( 'loading' );
356
-
357
- // Make an AJAX request to save the image metadata
358
- wp.media.ajax( 'soliloquy_save_meta', {
359
- context: this,
360
- data: {
361
- nonce: soliloquy_metabox.save_nonce,
362
- post_id: soliloquy_metabox.id,
363
- attach_id: this.model.get( 'id' ),
364
- meta: this.model.attributes,
365
- },
366
- success: function( response ) {
367
-
368
- // Tell the view we've finished successfully
369
- this.trigger( 'loaded loaded:success' );
370
-
371
- // Assign the model's JSON string back to the underlying item
372
- var item = JSON.stringify( this.model.attributes );
373
- jQuery( 'ul#soliloquy-output li#' + this.model.get( 'id' ) ).attr( 'data-soliloquy-image-model', item );
374
- // Show the user the 'saved' notice for 1.5 seconds
375
- var saved = this.$el.find( '.saved' );
376
- saved.fadeIn();
377
- setTimeout( function() {
378
- saved.fadeOut();
379
- }, 1500 );
380
-
381
- },
382
- error: function( error_message ) {
383
-
384
- // Tell wp.media we've finished, but there was an error
385
- this.trigger( 'loaded loaded:error', error_message );
386
-
387
- }
388
- } );
389
-
390
- },
391
-
392
- /**
393
- * Searches Links
394
- */
395
- searchLinks: function( event ) {
396
-
397
-
398
- },
399
-
400
- /**
401
- * Inserts the clicked link into the URL field
402
- */
403
- insertLink: function( event ) {
404
-
405
-
406
-
407
- },
408
-
409
- /**
410
- * Inserts the direct media link for the Media Library item
411
- *
412
- * The button triggering this event is only displayed if we are editing a
413
- * Media Library item, so there's no need to perform further checks
414
- */
415
- insertMediaFileLink: function( event ) {
416
-
417
- // Tell the View we're loading
418
- this.trigger( 'loading' );
419
-
420
- // Make an AJAX request to get the media link
421
- wp.media.ajax( 'soliloquy_get_attachment_links', {
422
- context: this,
423
- data: {
424
- nonce: soliloquy_metabox.save_nonce,
425
- attachment_id: this.model.get( 'id' ),
426
- },
427
- success: function( response ) {
428
-
429
- // Update model
430
- this.model.set( 'link', response.media_link );
431
-
432
- // Tell the view we've finished successfully
433
- this.trigger( 'loaded loaded:success' );
434
-
435
- // Re-render the view
436
- this.render();
437
-
438
- },
439
- error: function( error_message ) {
440
-
441
- // Tell wp.media we've finished, but there was an error
442
- this.trigger( 'loaded loaded:error', error_message );
443
-
444
- }
445
- } );
446
-
447
- },
448
-
449
- /**
450
- * Inserts the attachment page link for the Media Library item
451
- *
452
- * The button triggering this event is only displayed if we are editing a
453
- * Media Library item, so there's no need to perform further checks
454
- */
455
- insertAttachmentPageLink: function( event ) {
456
-
457
- // Tell the View we're loading
458
- this.trigger( 'loading' );
459
-
460
- // Make an AJAX request to get the media link
461
- wp.media.ajax( 'soliloquy_get_attachment_links', {
462
- context: this,
463
- data: {
464
- nonce: soliloquy_metabox.save_nonce,
465
- attachment_id: this.model.get( 'id' ),
466
- },
467
- success: function( response ) {
468
-
469
- // Update model
470
- this.model.set( 'link', response.attachment_page );
471
-
472
- // Tell the view we've finished successfully
473
- this.trigger( 'loaded loaded:success' );
474
-
475
- // Re-render the view
476
- this.render();
477
-
478
- },
479
- error: function( error_message ) {
480
-
481
- // Tell wp.media we've finished, but there was an error
482
- this.trigger( 'loaded loaded:error', error_message );
483
-
484
- }
485
- } );
486
-
487
- }
488
-
489
- } );
490
-
491
- /**
492
- * Sub Views
493
- * - Addons must populate this array with their own Backbone Views, which will be appended
494
- * to the settings region
495
- */
496
- var SoliloquyChildViews = [];
497
- var SoliloquyContentViews = [];
498
-
499
- /**
500
- * DOM
501
- */
502
- ;(function($) {
503
-
504
- $( document ).ready( function() {
505
-
506
- soliloquy_edit = {
507
-
508
- init: function(){
509
-
510
- // Populate the collection
511
- SoliloquySlidesUpdate();
512
-
513
- // Edit Image
514
- $( '#soliloquy-settings-content' ).on( 'click.soliloquyModify', '.soliloquy-modify-slide', function( e ) {
515
-
516
- // Prevent default action
517
- e.preventDefault();
518
- // Get the selected attachment
519
- var attachment_id = $( this ).parent().data( 'soliloquy-slide' );
520
-
521
- // Pass the collection of images for this gallery to the modal view, as well
522
- // as the selected attachment
523
- SoliloquyModalWindow.content( new SoliloquyView( {
524
- collection: SoliloquySlides,
525
- child_views: SoliloquyChildViews,
526
- attachment_id: attachment_id,
527
- } ) );
528
-
529
- // Open the modal window
530
- SoliloquyModalWindow.open();
531
-
532
- $( document ).trigger('soliloquyEditOpen');
533
-
534
- $('.CodeMirror').each(function(i, el){
535
- el.CodeMirror.refresh();
536
- });
537
-
538
-
539
-
540
- } );
541
-
542
- }
543
- }
544
-
545
- soliloquy_edit.init();
546
-
547
- } );
548
-
549
- $(document).on('soliloquyUploaded', function() {
550
-
551
- soliloquy_edit.init();
552
-
553
- });
554
-
555
- })(jQuery);
556
-
557
- /**
558
- * Populates the SoliloquySlides Backbone collection
559
- *
560
- * Called when images are added, deleted or reordered
561
- * Doesn't need to be called when an image is edited, as the model will be updated automatically in the collection
562
- */
563
- function SoliloquySlidesUpdate( selected ) {
564
-
565
- // Clear the collection
566
- SoliloquySlides.reset();
567
-
568
- var $items = 'ul#soliloquy-output li.soliloquy-slide' + ( selected ? '.selected' : '' );
569
-
570
- // Iterate through the gallery images in the DOM, adding them to the collection
571
- jQuery( $items ).each( function() {
572
- // Build an SoliloquyImage Backbone Model from the JSON supplied in the element
573
- var soliloquy_slide = jQuery.parseJSON( jQuery( this ).attr( 'data-soliloquy-image-model' ) );
574
-
575
- // Add the model to the collection
576
- SoliloquySlides.add( new SoliloquySlide( soliloquy_slide ) );
577
-
578
- } );
579
-
580
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/media-insert.js DELETED
@@ -1,151 +0,0 @@
1
- /* global soliloquy_metabox, wp, QTags, quicktags */
2
- /*jshint unused: true*/
3
- /**
4
- * Creates and handles a wp.media instance for soliloquy Galleries, allowing
5
- * the user to insert images from the Media Library into their Gallery
6
- */
7
- jQuery( document ).ready( function( $ ) {
8
-
9
- // Add Images
10
- $( 'a.soliloquy-media-library' ).on( 'click', function( e ) {
11
-
12
- // Prevent default action
13
- e.preventDefault();
14
-
15
- // If the wp.media.frames.soliloquy instance already exists, reopen it
16
- if ( wp.media.frames.soliloquy ) {
17
- wp.media.frames.soliloquy.open();
18
-
19
- return;
20
-
21
- } else {
22
-
23
- // Create the wp.media.frames.soliloquy instance (one time)
24
- wp.media.frames.soliloquy = new wp.media.view.MediaFrame.Post( {
25
-
26
- title: wp.media.view.l10n.insertIntoPost,
27
- button: {
28
- text: wp.media.view.l10n.insertIntoPost,
29
- },
30
- multiple: true,
31
- // Library WordPress query arguments.
32
- library: {
33
- // mime type. e.g. 'image', 'image/jpeg'
34
- type: 'image',
35
-
36
- }
37
- } );
38
- }
39
-
40
- // Mark existing Gallery images as selected when the modal is opened
41
- wp.media.frames.soliloquy.on( 'open', function() {
42
-
43
- // Get any previously selected images
44
- var selection = wp.media.frames.soliloquy.state().get( 'selection' );
45
-
46
- // Get images that already exist in the gallery, and select each one in the modal
47
- $( 'ul#soliloquy-output li' ).each( function() {
48
-
49
- var attachment = wp.media.attachment( $( this ).attr( 'id' ) );
50
-
51
- selection.add( attachment ? [ attachment ] : [] );
52
-
53
- } );
54
-
55
- } );
56
-
57
- //Trigger Event when the frame is ready.
58
- wp.media.frames.soliloquy.on( 'ready', function(e){
59
-
60
- });
61
- // Insert into Gallery Button Clicked
62
- wp.media.frames.soliloquy.on( 'insert', function( selection ) {
63
-
64
- // Get state
65
- var state = wp.media.frames.soliloquy.state(),
66
- images = [];
67
-
68
- // Iterate through selected images, building an images array
69
- selection.each( function( attachment ) {
70
-
71
- // Get the chosen options for this image (size, alignment, link type, link URL)
72
- var display = state.display( attachment ).toJSON(),
73
- type = attachment.get( 'type' );
74
-
75
- // Change the image link parameter based on the "Link To" setting the user chose in the media view
76
- switch ( display.link ) {
77
- case 'none':
78
- attachment.set( 'link', '' );
79
- break;
80
- case 'file':
81
- attachment.set( 'link', attachment.get( 'url' ) );
82
- break;
83
- case 'post':
84
- // Already linked to post by default
85
- break;
86
- case 'custom':
87
- attachment.set( 'link', display.linkUrl );
88
- break;
89
- }
90
-
91
- //Only allow images selections to be inserted
92
- if ( type === 'image' ){
93
-
94
- // Add the image to the images array
95
- images.push( attachment.toJSON() );
96
- }
97
-
98
- }, this );
99
- // Send the ajax request with our data to be processed.
100
- $.post(
101
- soliloquy_metabox.ajax,
102
- {
103
- action: 'soliloquy_insert_slides',
104
- nonce: soliloquy_metabox.insert_nonce,
105
- post_id: soliloquy_metabox.id,
106
- images: JSON.stringify(images),
107
- },
108
- function( response ) {
109
- // Response should be a JSON success with the HTML for the image grid
110
- if ( response ) {
111
-
112
-
113
- // Set the image grid to the HTML we received
114
- $( '#soliloquy-output' ).html( response.data );
115
-
116
- // Repopulate the Soliloquy Slide Collection
117
- SoliloquySlidesUpdate();
118
-
119
- var list = $('#soliloquy-output li').length;
120
-
121
- //update the count value
122
- $('.soliloquy-count').text( list.toString() );
123
-
124
- if ( list > 0 ){
125
-
126
- $('#soliloquy-empty-slider').fadeOut().addClass('soliloquy-hidden');
127
- $('.soliloquy-slide-header').removeClass('soliloquy-hidden').fadeIn();
128
- $( '.soliloquy-bulk-actions' ).fadeOut();
129
-
130
- }
131
- }
132
-
133
- },
134
- 'json'
135
- );
136
-
137
- } );
138
-
139
- // Open the media frame
140
- wp.media.frames.soliloquy.open();
141
- // Remove the 'Create Gallery' left hand menu item in the modal, as we don't
142
- // want users inserting galleries!
143
- $( 'div.media-menu a.media-menu-item:nth-child(2)' ).addClass( 'hidden' );
144
- $( 'div.media-menu a.media-menu-item:nth-child(4)' ).addClass( 'hidden' );
145
- $( 'div.media-menu a.media-menu-item:nth-child(6)' ).addClass( 'hidden' );
146
-
147
- return;
148
-
149
- } );
150
-
151
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/media-manage.js DELETED
@@ -1,511 +0,0 @@
1
- /**
2
- * Handles Mangement functions, deselection and sorting of media in an Soliloquy slider
3
- */
4
- ;(function ($, window, document, soliloquy_metabox ) {
5
-
6
- "use strict";
7
-
8
- var soliloquy_manage = {
9
-
10
- //Init, Triggers all functions, used as callback on JS events.
11
- init: function(){
12
-
13
- this.select_all();
14
-
15
- this.sortable();
16
-
17
- this.select();
18
-
19
- this.display();
20
-
21
- this.chosen();
22
-
23
- this.slide_size();
24
-
25
- this.uploadImage();
26
-
27
- this.toggleStatus();
28
-
29
- this.tooltip();
30
-
31
- this.clear_selected();
32
-
33
- //Init the Clipboard
34
- new Clipboard('.soliloquy-clipboard');
35
-
36
- //Prevent Default Action on check
37
- $('ul#soliloquy-output').on('click', 'a.check', function(e){
38
-
39
- e.preventDefault();
40
-
41
- });
42
-
43
- //Prevent Default on Clipboard
44
- $('.soliloquy-clipboard').on( 'click', function(e){
45
- e.preventDefault();
46
- });
47
-
48
- //How many slides are in the list
49
- var list = $('#soliloquy-output li').length;
50
-
51
- //Set the Count
52
- $('.soliloquy-count').text( list.toString() );
53
-
54
- // Initialise conditional fields
55
- $('input,select').conditional();
56
-
57
- },
58
-
59
- //Toggles slides status
60
- toggleStatus: function(){
61
-
62
- $( '#soliloquy-settings-content' ).on( 'click.soliloquyStatus', '.soliloquy-slide-status', function( e ) {
63
- // Prevent default action
64
- e.preventDefault();
65
- if ( $(this).hasClass('list-status') ){
66
-
67
- var $parent = $(this).parent().parent().parent();
68
-
69
- }else{
70
- var $parent = $(this).parent();
71
-
72
- }
73
-
74
- var $this = $(this),
75
- $data = $this.data('status'),
76
- $list_view = $parent.find('.soliloquy-slide-status.list-status'),
77
- $grid_view = $parent.find('.soliloquy-slide-status.grid-status'),
78
- $view = $this.parent().parent().data('view'),
79
- id = $this.data('id'),
80
- $icon = $grid_view.find('span.dashicons'),
81
- $text = $list_view.find('span'),
82
- $tooltip = $this.data('soliloquy-tooltip');
83
-
84
- //Set the slider sta
85
- if ( $data === 'active' ){
86
- var $status = 'pending';
87
- } else{
88
- var $status = 'active';
89
-
90
- }
91
-
92
-
93
- var opts = {
94
- url: soliloquy_metabox.ajax,
95
- type: 'post',
96
- async: true,
97
- cache: false,
98
- dataType: 'json',
99
- data: {
100
- action: 'soliloquy_change_slide_status',
101
- post_id: soliloquy_metabox.id,
102
- slide_id: id,
103
- status: $status,
104
- nonce: soliloquy_metabox.save_nonce
105
- },
106
- success: function(response) {
107
-
108
- if( $status === 'active' ){
109
- //Toggle Classes
110
- $grid_view.removeClass('soliloquy-draft-slide').addClass('soliloquy-active-slide');
111
- $list_view.removeClass('soliloquy-draft-slide').addClass('soliloquy-active-slide');
112
-
113
- //Set the proper icons
114
- $icon.removeClass('dashicons-hidden').addClass('dashicons-visibility');
115
-
116
- //Set the Text
117
- $text.text( soliloquy_metabox.active );
118
- $grid_view.attr('data-soliloquy-tooltip', soliloquy_metabox.active );
119
-
120
- //Set the Data
121
- $list_view.data('status','active');
122
- $grid_view.data('status','active');
123
-
124
- }else{
125
-
126
- //Toggle Classes
127
- $grid_view.removeClass('soliloquy-active-slide').addClass('soliloquy-draft-slide');
128
- $list_view.removeClass('soliloquy-active-slide').addClass('soliloquy-draft-slide');
129
-
130
- //Set the proper icons
131
- $icon.removeClass('dashicons-visibility').addClass('dashicons-hidden');
132
-
133
- //Set the text
134
- $text.text( soliloquy_metabox.draft );
135
- //Set the Data
136
- $list_view.data('status','pending');
137
- $grid_view.data('status','pending');
138
- $grid_view.attr('data-soliloquy-tooltip', soliloquy_metabox.draft );
139
-
140
- }
141
-
142
- },
143
- error: function(xhr, textStatus ,e) {
144
- return;
145
- }
146
- };
147
- $.ajax( opts );
148
-
149
-
150
- });
151
- },
152
- tooltip: function(){
153
- $('[data-soliloquy-tooltip]').on( 'mouseover', function(e){
154
- e.preventDefault();
155
- var $this = $(this),
156
- $data = $this.data('soliloquy-tooltip');
157
-
158
-
159
- });
160
- },
161
- //Select all slides
162
- select_all: function(){
163
-
164
- //Select all
165
- $('.soliloquy-select-all').change( function() {
166
-
167
- var checked = this.checked;
168
-
169
- if ( checked ){
170
- $('ul#soliloquy-output li').addClass( 'selected' );
171
- $( '.soliloquy-bulk-actions' ).fadeIn();
172
-
173
- var selected = $('ul#soliloquy-output li.selected').length;
174
-
175
- $('.select-all').text( soliloquy_metabox.selected );
176
- $('.soliloquy-count').text( selected.toString() );
177
- $('.soliloquy-clear-selected').fadeIn();
178
-
179
-
180
- }else{
181
-
182
- $('ul#soliloquy-output li').removeClass( 'selected' );
183
- $( '.soliloquy-bulk-actions' ).fadeOut();
184
-
185
- var list = $('ul#soliloquy-output li').length;
186
-
187
- $('.select-all').text( soliloquy_metabox.select_all );
188
- $('.soliloquy-count').text( list.toString() );
189
- $('.soliloquy-clear-selected').fadeOut();
190
-
191
- }
192
-
193
- });
194
- },
195
-
196
- //Makes Slides Sortable
197
- sortable: function(){
198
- // Make slider items sortable.
199
- var slider = $('#soliloquy-output');
200
-
201
- slider.sortable({
202
- containment: '#soliloquy-slider-main',
203
- items: 'li',
204
- cursor: 'move',
205
- forcePlaceholderSize: true,
206
- placeholder: 'dropzone',
207
- update: function(event, ui) {
208
- // Make ajax request to sort out items.
209
- var opts = {
210
- url: soliloquy_metabox.ajax,
211
- type: 'post',
212
- async: true,
213
- cache: false,
214
- dataType: 'json',
215
- data: {
216
- action: 'soliloquy_sort_images',
217
- order: slider.sortable('toArray').toString(),
218
- post_id: soliloquy_metabox.id,
219
- nonce: soliloquy_metabox.sort
220
- },
221
- success: function(response) {
222
- // Repopulate the Soliloquy slider Slide Collection
223
- SoliloquySlidesUpdate();
224
-
225
- return;
226
- },
227
- error: function(xhr, textStatus ,e) {
228
- return;
229
- }
230
- };
231
- $.ajax( opts );
232
- }
233
- });
234
- },
235
-
236
- //Select a slide
237
- select: function(){
238
-
239
- // Select / deselect images
240
- var soliloquy_shift_key_pressed = false,
241
- soliloquy_last_selected_image = false;
242
-
243
- $( 'li.soliloquy-slide .soliloquy-item-content, .soliloquy-list li a.check' ).on( 'click', function(e) {
244
-
245
- var $this = $(this),
246
- slider_item = $( this ).parent();
247
-
248
-
249
- e.preventDefault();
250
-
251
- if ( $( slider_item ).hasClass( 'selected' ) ) {
252
-
253
- $( slider_item ).removeClass( 'selected' );
254
-
255
- soliloquy_last_selected_image = false;
256
-
257
- var selected = $('ul#soliloquy-output li.selected').length;
258
-
259
- if( selected !== 0 ){
260
-
261
- $('.select-all').text( soliloquy_metabox.selected );
262
- $('.soliloquy-count').text( selected.toString() );
263
- $('.soliloquy-clear-selected').fadeIn();
264
-
265
-
266
- } else{
267
-
268
- var list = $('ul#soliloquy-output li').length;
269
-
270
- $('.select-all').text( soliloquy_metabox.select_all );
271
- $('.soliloquy-count').text( list.toString() );
272
- $('.soliloquy-clear-selected').fadeOut();
273
-
274
- }
275
-
276
- } else {
277
-
278
- // If the shift key is being held down, and there's another image selected, select every image between this clicked image
279
- // and the other selected image
280
- if ( soliloquy_shift_key_pressed && soliloquy_last_selected_image !== false ) {
281
-
282
- // Get index of the selected image and the last image
283
- var start_index = $( 'ul#soliloquy-output li' ).index( $( soliloquy_last_selected_image ) ),
284
- end_index = $( 'ul#soliloquy-output li' ).index( $( slider_item ) ),
285
- i = 0;
286
-
287
- // Select images within the range
288
- if ( start_index < end_index ) {
289
- for ( i = start_index; i <= end_index; i++ ) {
290
- $( 'ul#soliloquy-output li:eq( ' + i + ')' ).addClass( 'selected' );
291
- }
292
- } else {
293
- for ( i = end_index; i <= start_index; i++ ) {
294
- $( 'ul#soliloquy-output li:eq( ' + i + ')' ).addClass( 'selected' );
295
- }
296
- }
297
- }
298
-
299
- // Select the clicked image
300
- $( slider_item ).addClass( 'selected' );
301
- soliloquy_last_selected_image = $( slider_item );
302
-
303
- selected = $('ul#soliloquy-output li.selected').length;
304
- $('.soliloquy-clear-selected').fadeIn();
305
-
306
- $('.select-all').text( soliloquy_metabox.selected );
307
- $('.soliloquy-count').text( selected.toString() );
308
- }
309
-
310
- // Show/hide 'Deleted Selected Images from Slider' button depending on whether
311
- // any slides have been selected
312
- if ( $( 'ul#soliloquy-output > li.selected' ).length > 0 ) {
313
-
314
- $( '.soliloquy-bulk-actions' ).fadeIn();
315
-
316
- } else {
317
-
318
- $( '.soliloquy-bulk-actions' ).fadeOut();
319
- }
320
-
321
- } );
322
-
323
- // Determine whether the shift key is pressed or not
324
- $( document ).on( 'keyup keydown', function( e ) {
325
-
326
- soliloquy_shift_key_pressed = e.shiftKey;
327
-
328
- } );
329
- },
330
-
331
- //Updates slider dimenisons on Config screen
332
- slide_size: function(){
333
- // Set size of slider dimension fields when changing size type.
334
- $(document).on('change', '#soliloquy-config-slider-size', function(){
335
- var $this = $(this),
336
- value = $this.val(),
337
- width = $this.find(':selected').data('soliloquy-width'),
338
- height = $this.find(':selected').data('soliloquy-height');
339
-
340
- // Do nothing if the default value is the new value.
341
- if ( 'default' == value ) {
342
-
343
- $('#soliloquy-config-slider-width').val(soliloquy_metabox.slide_width);
344
- $('#soliloquy-config-slider-height').val(soliloquy_metabox.slide_height);
345
- }
346
-
347
- // Otherwise, attempt to grab width/height data and apply it to dimensions.
348
- if ( width ) {
349
- $('#soliloquy-config-slider-width').val(width);
350
- }
351
-
352
- if ( height ) {
353
- $('#soliloquy-config-slider-height').val(height);
354
- }
355
- });
356
- },
357
- //Clear Selected Slides
358
- clear_selected: function(){
359
-
360
- $('.soliloquy-clear-selected').on('click', function(e){
361
-
362
- e.preventDefault();
363
-
364
- var list = $('#soliloquy-output li').length;
365
-
366
- $('ul#soliloquy-output li').removeClass( 'selected' );
367
-
368
- $('.select-all').text( soliloquy_metabox.select_all );
369
- $('.soliloquy-count').text( list.toString() );
370
- $('.soliloquy-select-all').prop('checked', false);
371
- $( '.soliloquy-bulk-actions' ).fadeOut();
372
-
373
- $( this ).fadeOut();
374
-
375
- });
376
- },
377
-
378
- //Change ul#soliloquy-output display type. Uses ajax to store data for each slider
379
- display: function(){
380
-
381
- //Toggle Grid/List Display
382
- $( 'a.soliloquy-display' ).on( 'click', function(e){
383
-
384
- //Prevent Default
385
- e.preventDefault();
386
-
387
- //Don't do anything is its already active.
388
- if ( $(this).hasClass('active-display') ){
389
- return;
390
- }
391
-
392
- var $this = $(this),
393
- $view = $this.data('soliloquy-display'),
394
- $output = $('#soliloquy-output'),
395
- opts = {
396
- url: soliloquy_metabox.ajax,
397
- type: 'post',
398
- async: true,
399
- cache: false,
400
- dataType: 'json',
401
- data: {
402
- action: 'soliloquy_slider_view',
403
- post_id: soliloquy_metabox.id,
404
- view: $view,
405
- nonce: soliloquy_metabox.save_nonce
406
- },
407
- success: function(response) {
408
-
409
- }
410
- };
411
-
412
- $.ajax( opts );
413
-
414
-
415
- //Find the current active button and remove class
416
- $('.soliloquy-display-toggle').find('.active-display').removeClass('active-display');
417
-
418
- //Add the active class to $this
419
- $this.addClass('active-display');
420
-
421
- if( $view === 'grid' ){
422
-
423
- $output.removeClass('soliloquy-list').addClass('soliloquy-grid');
424
-
425
- }else if ( $view === 'list' ){
426
-
427
- $output.removeClass('soliloquy-grid').addClass('soliloquy-list');
428
-
429
- }
430
-
431
- });
432
-
433
- },
434
-
435
- //Chosen Select Boxes Init
436
- chosen: function(){
437
-
438
- //Create the Select boxes
439
- $('.soliloquy-chosen').each(function (){
440
-
441
- //Get the options from the data.
442
- var data_options = $(this).data('soliloquy-chosen-options');
443
-
444
- $(this).chosen( data_options );
445
-
446
- });
447
-
448
- },
449
-
450
- //Upload Image functioned Used in Woo and FC addons fallback.
451
- uploadImage: function(){
452
-
453
- $('.soliloquy-insert-image').on('click', function(e){
454
-
455
- var soliloquy_image_frame;
456
-
457
- e.preventDefault();
458
-
459
- var $button = $( event.currentTarget ),
460
- input_box = $button.parent().find('input');
461
- if ( soliloquy_image_frame ) {
462
-
463
- soliloquy_image_frame.open();
464
-
465
- return;
466
-
467
- };
468
-
469
- soliloquy_image_frame = wp.media.frames.soliloquy_image_frame = wp.media({
470
-
471
- frame: 'select',
472
- library: {
473
- type: 'image'
474
- },
475
- title: soliloquy_metabox.insert_image,
476
- button: {
477
- text: soliloquy_metabox.insert_image,
478
- },
479
- contentUserSetting: false,
480
- multiple: false
481
- });
482
-
483
- soliloquy_image_frame.on( 'select', function() {
484
-
485
- var attachment = soliloquy_image_frame.state().get('selection').first().toJSON();
486
-
487
- input_box.val( attachment.url );
488
-
489
- });
490
-
491
- soliloquy_image_frame.open();
492
-
493
- });
494
- }
495
- };
496
-
497
- //DOM ready
498
- $(function(){
499
-
500
- soliloquy_manage.init();
501
-
502
- });
503
-
504
- //Re init on type change
505
- $(document).on( 'soliloquyType', function(){
506
-
507
- soliloquy_manage.init();
508
-
509
- });
510
-
511
- })( jQuery , window, document, soliloquy_metabox );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/media-upload.js DELETED
@@ -1,109 +0,0 @@
1
- /**
2
- * Hooks into the global Plupload instance ('uploader'), which is set when includes/admin/metaboxes.php calls media_form()
3
- * We hook into this global instance and apply our own changes during and after the upload.
4
- *
5
- * @since 1.3.1.3
6
- */
7
- ;(function ($, window, document, soliloquy_media_uploader ) {
8
- $(function() {
9
-
10
- if ( typeof uploader !== 'undefined' ) {
11
-
12
- //soliloquy_media_uploader.uploader_files_computer
13
- $( 'input#plupload-browse-button' ).val( soliloquy_media_uploader.uploader_files_computer );
14
- $('.drag-drop-info').text( soliloquy_media_uploader.uploader_info_text );
15
-
16
- // Set a custom progress bar
17
- $('#soliloquy .drag-drop-inside').append( '<div class="soliloquy-progress-bar"><div></div></div>' );
18
- var soliloquy_bar = $('#soliloquy .soliloquy-progress-bar'),
19
- soliloquy_progress = $('#soliloquy .soliloquy-progress-bar div'),
20
- soliloquy_output = $('#soliloquy-output');
21
-
22
- // Files Added for Uploading
23
- uploader.bind( 'FilesAdded', function ( up, files ) {
24
- $( soliloquy_bar ).fadeIn();
25
- });
26
-
27
- // File Uploading - show progress bar
28
- uploader.bind( 'UploadProgress', function( up, file ) {
29
- $( soliloquy_progress ).css({
30
- 'width': up.total.percent + '%'
31
- });
32
- });
33
-
34
- // File Uploaded - AJAX call to process image and add to screen.
35
- uploader.bind( 'FileUploaded', function( up, file, info ) {
36
-
37
- // AJAX call to soliloquy to store the newly uploaded image in the meta against this Gallery
38
- $.post(
39
- soliloquy_media_uploader.ajax,
40
- {
41
- action: 'soliloquy_load_image',
42
- nonce: soliloquy_media_uploader.load_image,
43
- id: info.response,
44
- post_id: soliloquy_media_uploader.id
45
- },
46
- function(res){
47
-
48
- // Prepend or append the new image to the existing grid of images,
49
- // depending on the media_position setting
50
- switch ( soliloquy_media_uploader.media_position ) {
51
- case 'before':
52
- $(soliloquy_output).prepend(res);
53
- break;
54
- case 'after':
55
- default:
56
- $(soliloquy_output).append(res);
57
- break;
58
- }
59
-
60
- $( document ).trigger('soliloquyUploaded');
61
-
62
- $(res).find('.wp-editor-container').each(function(i, el){
63
-
64
- var id = $(el).attr('id').split('-')[4];
65
- quicktags({id: 'soliloquy-caption-' + id, buttons: 'strong,em,link,ul,ol,li,close'});
66
- QTags._buttonsInit(); // Force buttons to initialize.
67
-
68
- });
69
-
70
- //How many slides are inserted into slider
71
- var list = $('#soliloquy-output li').length;
72
-
73
- //update the count value
74
- $('.soliloquy-count').text( list.toString() );
75
-
76
- //Hides empty slider screen
77
- if ( list > 0 ){
78
-
79
- $('#soliloquy-empty-slider').fadeOut().addClass('soliloquy-hidden');
80
- $('.soliloquy-slide-header').removeClass('soliloquy-hidden').fadeIn();
81
-
82
- }
83
-
84
- },
85
- 'json'
86
- );
87
- });
88
-
89
- // Files Uploaded
90
- uploader.bind( 'UploadComplete', function() {
91
-
92
- // Hide Progress Bar
93
- $( soliloquy_bar ).fadeOut();
94
-
95
- });
96
-
97
- // File Upload Error
98
- uploader.bind('Error', function(up, err) {
99
-
100
- // Show message
101
- $('#soliloquy-upload-error').html( '<div class="error fade"><p>' + err.file.name + ': ' + err.message + '</p></div>' );
102
- up.refresh();
103
-
104
- });
105
-
106
- }
107
-
108
- });
109
- })( jQuery , window, document, soliloquy_media_uploader );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/metabox.js DELETED
@@ -1,13 +0,0 @@
1
- /* global soliloquy_metabox, uploader, QTags, quicktags */
2
- /**
3
- * You'll need to use CodeKit or similar, as this file is a placeholder to combine
4
- * the following JS files into min/metabox-min.js:
5
- *
6
- * - slider-helper.js
7
- * - slider-types.js
8
- * - media-delete.js
9
- * - media-edit.js
10
- * - media-insert.js
11
- * - media-manage.js
12
- * - media-upload.js
13
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/assets/js/min/addons-min.js DELETED
@@ -1 +0,0 @@
1
- !function($,a,o,e){$(function(){function a(a){$(a).attr("disabled")&&$(a).removeAttr("disabled"),$(a).parent().parent().hasClass("soliloquy-addon-not-installed")&&$(a).text(e.install)}$(".soliloquy-chosen").each(function(){$(this).chosen({disable_search:!0})}),$("#soliloquy-addon-filter").on("change",function(){var a=$(this),o=a.val(),e=$("#soliloquy-addons-area"),n=e.data("soliloquy-filter"),t=$("#soliloquy-addons-area .soliloquy-addon");switch(t.show(),o){case"asc":t.sort(function(a,o){return $(a).data("addon-title").localeCompare($(o).data("addon-title"))}).each(function(a,o){$(o).removeClass("last"),e.append(o).hide().fadeIn(100)}),$("#soliloquy-addons-area .soliloquy-addon:nth-child(3n)").addClass("last");break;case"desc":t.sort(function(a,o){return $(o).data("addon-title").localeCompare($(a).data("addon-title"))}).each(function(a,o){$(o).removeClass("last"),e.append(o).hide().fadeIn(100)}),$("#soliloquy-addons-area .soliloquy-addon:nth-child(3n)").addClass("last");break;case"active":t.hide().filter('[data-addon-status="active"]').show(),t.removeClass("last"),$("#soliloquy-addons-area .soliloquy-addon:visible").each(function(a){(a+1)%3===0&&$(this).addClass("last")});break;case"inactive":t.hide().filter('[data-addon-status="inactive"]').show(),t.removeClass("last"),$("#soliloquy-addons-area .soliloquy-addon:visible").each(function(a){(a+1)%3===0&&$(this).addClass("last")});break;case"installed":var l=0;t.hide().filter('[data-addon-status="not_installed"]').show(),t.removeClass("last"),$("#soliloquy-addons-area .soliloquy-addon:visible").each(function(a){(a+1)%3===0&&$(this).addClass("last")})}}),$("#soliloquy-addons-area").on("click.refreshInstallAddon",".soliloquy-addon-action-button",function(o){o.preventDefault();var e=$(this),n=$("#soliloquy-addons-area").find(".soliloquy-addon-action-button");$.each(n,function(o,n){return e===n?!0:void a(n)})}),$("#soliloquy-addons-area").on("click.activateAddon",".soliloquy-activate-addon",function(a){a.preventDefault();var o=$(this),n=o.attr("rel"),t=o.parent().parent(),l=o.parent().parent().find(".addon-status").children("span");$(".soliloquy-addon-error").remove(),o.text(e.activating),o.next().css({display:"inline-block","margin-top":"0px"});var i={url:ajaxurl,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_activate_addon",nonce:e.activate_nonce,plugin:n},success:function(a){return a&&!0!==a?void t.slideDown("normal",function(){$(this).after('<div class="soliloquy-addon-error"><strong>'+a.error+"</strong></div>"),o.next().hide(),$(".soliloquy-addon-error").delay(3e3).slideUp()}):(o.text(e.deactivate).removeClass("soliloquy-activate-addon").addClass("soliloquy-deactivate-addon"),l.text(e.active),t.removeClass("soliloquy-addon-inactive").addClass("soliloquy-addon-active"),void o.next().hide())},error:function(a,e,n){o.next().hide()}};$.ajax(i)}),$("#soliloquy-addons-area").on("click.deactivateAddon",".soliloquy-deactivate-addon",function(a){a.preventDefault();var o=$(this),n=o.attr("rel"),t=o.parent().parent(),l=o.parent().parent().find(".addon-status").children("span");$(".soliloquy-addon-error").remove(),o.text(e.deactivating),o.next().css({display:"inline-block","margin-top":"0px"});var i={url:ajaxurl,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_deactivate_addon",nonce:e.deactivate_nonce,plugin:n},success:function(a){return a&&!0!==a?void t.slideDown("normal",function(){$(this).after('<div class="soliloquy-addon-error"><strong>'+a.error+"</strong></div>"),o.next().hide(),$(".soliloquy-addon-error").delay(3e3).slideUp()}):(o.text(e.activate).removeClass("soliloquy-deactivate-addon").addClass("soliloquy-activate-addon"),l.text(e.inactive),t.removeClass("soliloquy-addon-active").addClass("soliloquy-addon-inactive"),void o.next().hide())},error:function(a,e,n){o.next().hide()}};$.ajax(i)}),$("#soliloquy-addons-area").on("click.installAddon",".soliloquy-install-addon",function(a){a.preventDefault();var o=$(this),n=o.attr("rel"),t=o.parent().parent(),l=o.parent().parent().find(".addon-status").children("span");$(".soliloquy-addon-error").remove(),o.text(e.installing),o.next().css({display:"inline-block","margin-top":"0px"});var i={url:ajaxurl,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_install_addon",nonce:e.install_nonce,plugin:n},success:function(a){return a.error?void t.slideDown("normal",function(){o.parent().parent().after('<div class="soliloquy-addon-error"><strong>'+a.error+"</strong></div>"),o.text(e.install),o.next().hide(),$(".soliloquy-addon-error").delay(4e3).slideUp()}):a.form?(t.slideDown("normal",function(){$(this).after('<div class="soliloquy-addon-error">'+a.form+"</div>"),o.next().hide()}),o.attr("disabled",!0),void $("#soliloquy-addons-area").on("click.installCredsAddon","#upgrade",function(a){a.preventDefault(),o.next().hide(),$(this).val(e.installing),$(this).next().css({display:"inline-block","margin-top":"0px"});var i=$(this).parent().parent().find("#hostname").val(),s=$(this).parent().parent().find("#username").val(),d=$(this).parent().parent().find("#password").val(),r=$(this),c=$(this).parent().parent().parent().parent(),u={url:ajaxurl,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_install_addon",nonce:e.install_nonce,plugin:n,hostname:i,username:s,password:d},success:function(a){return a.error?void t.slideDown("normal",function(){o.parent().parent().after('<div class="soliloquy-addon-error"><strong>'+a.error+"</strong></div>"),o.text(e.install),o.next().hide(),$(".soliloquy-addon-error").delay(4e3).slideUp()}):a.form?(o.next().hide(),$(".soliloquy-inline-error").remove(),$(r).val(e.proceed),void $(r).after('<span class="soliloquy-inline-error">'+e.connect_error+"</span>")):($(c).remove(),o.show(),o.text(e.activate).removeClass("soliloquy-install-addon").addClass("soliloquy-activate-addon"),o.attr("rel",a.plugin),o.removeAttr("disabled"),l.text(e.inactive),t.removeClass("soliloquy-addon-not-installed").addClass("soliloquy-addon-inactive"),void o.next().hide())},error:function(a,e,n){o.next().hide()}};$.ajax(u)})):(o.text(e.activate).removeClass("soliloquy-install-addon").addClass("soliloquy-activate-addon"),o.attr("rel",a.plugin),l.text(e.inactive),t.removeClass("soliloquy-addon-not-installed").addClass("soliloquy-addon-inactive"),void o.next().hide())},error:function(a,e,n){o.next().hide()}};$.ajax(i)})})}(jQuery,window,document,soliloquy_addons);
 
trunk/assets/js/min/chosen.jquery-min.js DELETED
@@ -1 +0,0 @@
1
- (function(){var $,t,e,s,i,r={}.hasOwnProperty,o=function(t,e){function s(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t};s=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,r,o,n;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:this.escapeExpression(t.label),title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),o=t.childNodes,n=[],i=0,r=o.length;r>i;i++)s=o[i],n.push(this.add_option(s,e,t.disabled));return n},t.prototype.add_option=function(t,e,s){return"OPTION"===t.nodeName.toUpperCase()?(""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:s===!0?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},t.prototype.escapeExpression=function(t){var e,s;return null==t||t===!1?"":/[\&\<\>\"\'\`]/.test(t)?(e={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},s=/&(?!\w+;)|[\<\>\"\'\`]/g,t.replace(s,function(t){return e[t]||"&amp;"})):t},t}(),s.select_to_array=function(t){var e,i,r,o,n;for(i=new s,n=t.childNodes,r=0,o=n.length;o>r;r++)e=n[r],i.add_node(e);return i.parsed},t=function(){function t(e,s){this.form_field=e,this.options=null!=s?s:{},t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){var t=this;return this.click_test_action=function(e){return t.test_active_click(e)},this.activate_action=function(e){return t.activate_field(e)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+t.group_label+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){var e=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return e.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){var e=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return e.blur_test()},100))},t.prototype.results_option_build=function(t){var e,s,i,r,o,n,l;for(e="",r=0,l=this.results_data,o=0,n=l.length;n>o&&(s=l[o],i="",i=s.group?this.result_add_group(s):this.result_add_option(s),""!==i&&(r++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(r>=this.max_shown_results));o++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.style.cssText=t.style,s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.search_text,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?(e=[],e.push("group-result"),t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.innerHTML=t.search_text,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},t.prototype.reset_single_select_options=function(){var t,e,s,i,r;for(i=this.results_data,r=[],e=0,s=i.length;s>e;e++)t=i[e],t.selected?r.push(t.selected=!1):r.push(void 0);return r},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(){var t,e,s,i,r,o,n,l,h,c,a,_;for(this.no_results_clear(),i=0,o=this.get_search_text(),t=o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),h=new RegExp(t,"i"),s=this.get_search_regex(t),_=this.results_data,c=0,a=_.length;a>c;c++)e=_[c],e.search_match=!1,r=null,this.include_option_in_results(e)&&(e.group&&(e.group_match=!1,e.active_options=0),null!=e.group_array_index&&this.results_data[e.group_array_index]&&(r=this.results_data[e.group_array_index],0===r.active_options&&r.search_match&&(i+=1),r.active_options+=1),e.search_text=e.group?e.label:e.html,(!e.group||this.group_search)&&(e.search_match=this.search_string_match(e.search_text,s),e.search_match&&!e.group&&(i+=1),e.search_match?(o.length&&(n=e.search_text.search(h),l=e.search_text.substr(0,n+o.length)+"</em>"+e.search_text.substr(n+o.length),e.search_text=l.substr(0,n)+"<em>"+l.substr(n)),null!=r&&(r.group_match=!0)):null!=e.group_array_index&&this.results_data[e.group_array_index].search_match&&(e.search_match=!0)));return this.result_clear_highlight(),1>i&&o.length?(this.update_results_content(""),this.no_results(o)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e;return e=this.search_contains?"":"^",new RegExp(e+t,"i")},t.prototype.search_string_match=function(t,e){var s,i,r,o;if(e.test(t))return!0;if(this.enable_split_word_search&&(t.indexOf(" ")>=0||0===t.indexOf("["))&&(i=t.replace(/\[|\]/g,"").split(" "),i.length))for(r=0,o=i.length;o>r;r++)if(s=i[r],e.test(s))return!0},t.prototype.choices_count=function(){var t,e,s,i;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,i=this.form_field.options,e=0,s=i.length;s>e;e++)t=i[e],t.selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){return t.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},t.prototype.keyup_checker=function(t){var e,s;switch(e=null!=(s=t.which)?s:t.keyCode,this.search_field_scale(),e){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(t.preventDefault(),this.results_showing)return this.result_select(t);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},t.prototype.clipboard_event_checker=function(t){var e=this;return setTimeout(function(){return e.results_search()},50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return this.is_multiple&&!this.display_selected_options&&t.selected?!1:!this.display_disabled_options&&t.disabled?!1:t.empty?!1:!0},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){return this.touch_started?this.search_results_mouseup(t):void 0},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:(e=document.createElement("div"),e.appendChild(t),e.innerHTML)},t.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),$=jQuery,$.fn.extend({chosen:function(s){return t.browser_is_supported()?this.each(function(t){var i,r;return i=$(this),r=i.data("chosen"),"destroy"===s?void(r instanceof e&&r.destroy()):void(r instanceof e||i.data("chosen",new e(this,s)))}):this}}),e=function(t){function e(){return i=e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.setup=function(){return this.form_field_jq=$(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},e.prototype.set_up_html=function(){var t,e;return t=["chosen-container"],t.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chosen-rtl"),e={"class":t.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(e.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=$("<div />",e),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},e.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},e.prototype.register_observers=function(){var t=this;return this.container.bind("touchstart.chosen",function(e){return t.container_mousedown(e),e.preventDefault()}),this.container.bind("touchend.chosen",function(e){return t.container_mouseup(e),e.preventDefault()}),this.container.bind("mousedown.chosen",function(e){t.container_mousedown(e)}),this.container.bind("mouseup.chosen",function(e){t.container_mouseup(e)}),this.container.bind("mouseenter.chosen",function(e){t.mouse_enter(e)}),this.container.bind("mouseleave.chosen",function(e){t.mouse_leave(e)}),this.search_results.bind("mouseup.chosen",function(e){t.search_results_mouseup(e)}),this.search_results.bind("mouseover.chosen",function(e){t.search_results_mouseover(e)}),this.search_results.bind("mouseout.chosen",function(e){t.search_results_mouseout(e)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(e){t.search_results_mousewheel(e)}),this.search_results.bind("touchstart.chosen",function(e){t.search_results_touchstart(e)}),this.search_results.bind("touchmove.chosen",function(e){t.search_results_touchmove(e)}),this.search_results.bind("touchend.chosen",function(e){t.search_results_touchend(e)}),this.form_field_jq.bind("chosen:updated.chosen",function(e){t.results_update_field(e)}),this.form_field_jq.bind("chosen:activate.chosen",function(e){t.activate_field(e)}),this.form_field_jq.bind("chosen:open.chosen",function(e){t.container_mousedown(e)}),this.form_field_jq.bind("chosen:close.chosen",function(e){t.input_blur(e)}),this.search_field.bind("blur.chosen",function(e){t.input_blur(e)}),this.search_field.bind("keyup.chosen",function(e){t.keyup_checker(e)}),this.search_field.bind("keydown.chosen",function(e){t.keydown_checker(e)}),this.search_field.bind("focus.chosen",function(e){t.input_focus(e)}),this.search_field.bind("cut.chosen",function(e){t.clipboard_event_checker(e)}),this.search_field.bind("paste.chosen",function(e){t.clipboard_event_checker(e)}),this.is_multiple?this.search_choices.bind("click.chosen",function(e){t.choices_click(e)}):this.container.bind("click.chosen",function(t){t.preventDefault()})},e.prototype.destroy=function(){return $(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},e.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},e.prototype.container_mousedown=function(t){return this.is_disabled||(t&&"mousedown"===t.type&&!this.results_showing&&t.preventDefault(),null!=t&&$(t.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!t||$(t.target)[0]!==this.selected_item[0]&&!$(t.target).parents("a.chosen-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),$(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},e.prototype.container_mouseup=function(t){return"ABBR"!==t.target.nodeName||this.is_disabled?void 0:this.results_reset(t)},e.prototype.search_results_mousewheel=function(t){var e;return t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e?(t.preventDefault(),"DOMMouseScroll"===t.type&&(e=40*e),this.search_results.scrollTop(e+this.search_results.scrollTop())):void 0},e.prototype.blur_test=function(t){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},e.prototype.close_field=function(){return $(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},e.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},e.prototype.test_active_click=function(t){var e;return e=$(t.target).closest(".chosen-container"),e.length&&this.container[0]===e[0]?this.active_field=!0:this.close_field()},e.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},e.prototype.result_do_highlight=function(t){var e,s,i,r,o;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),o=this.search_results.scrollTop(),r=i+o,s=this.result_highlight.position().top+this.search_results.scrollTop(),e=s+this.result_highlight.outerHeight(),e>=r)return this.search_results.scrollTop(e-i>0?e-i:0);if(o>s)return this.search_results.scrollTop(s)}},e.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},e.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},e.prototype.update_results_content=function(t){return this.search_results.html(t)},e.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},e.prototype.set_tab_index=function(t){var e;return this.form_field.tabIndex?(e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e):void 0},e.prototype.set_label_behavior=function(){var t=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=$("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(e){return t.is_multiple?t.container_mousedown(e):t.activate_field()}):void 0},e.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},e.prototype.search_results_mouseup=function(t){var e;return e=$(t.target).hasClass("active-result")?$(t.target):$(t.target).parents(".active-result").first(),e.length?(this.result_highlight=e,this.result_select(t),this.search_field.focus()):void 0},e.prototype.search_results_mouseover=function(t){var e;return e=$(t.target).hasClass("active-result")?$(t.target):$(t.target).parents(".active-result").first(),e?this.result_do_highlight(e):void 0},e.prototype.search_results_mouseout=function(t){return $(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},e.prototype.choice_build=function(t){var e,s,i=this;return e=$("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(t)+"</span>"),t.disabled?e.addClass("search-choice-disabled"):(s=$("<a />",{"class":"search-choice-close","data-option-array-index":t.array_index}),s.bind("click.chosen",function(t){return i.choice_destroy_link_click(t)}),e.append(s)),this.search_container.before(e)},e.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),t.stopPropagation(),this.is_disabled?void 0:this.choice_destroy($(t.target))},e.prototype.choice_destroy=function(t){return this.result_deselect(t[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()):void 0},e.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},e.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},e.prototype.result_select=function(t){var e,s;return this.result_highlight?(e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),s=this.results_data[e[0].getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())):void 0},e.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},e.prototype.result_deselect=function(t){var e;return e=this.results_data[t],this.form_field.options[e.options_index].disabled?!1:(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},e.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},e.prototype.get_search_text=function(){return $("<div/>").text($.trim(this.search_field.val())).html()},e.prototype.winnow_results_set_highlight=function(){var t,e;return e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),t=e.length?e.first():this.search_results.find(".active-result").first(),null!=t?this.result_do_highlight(t):void 0},e.prototype.no_results=function(t){var e;return e=$('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),e.find("span").first().html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},e.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},e.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},e.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result"),t.length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},e.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last(),t.length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},e.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},e.prototype.keydown_checker=function(t){var e,s;switch(e=null!=(s=t.which)?s:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},e.prototype.search_field_scale=function(){var t,e,s,i,r,o,n,l,h;if(this.is_multiple){for(s=0,n=0,r="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],l=0,h=o.length;h>l;l++)i=o[l],r+=i+":"+this.search_field.css(i)+";";return t=$("<div />",{style:r}),t.text(this.search_field.val()),$("body").append(t),n=t.width()+25,t.remove(),e=this.container.outerWidth(),n>e-10&&(n=e-10),this.search_field.css({width:n+"px"})}},e}(t)}).call(this);
 
trunk/assets/js/min/clipboard-min.js DELETED
@@ -1 +0,0 @@
1
- !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function o(t,e,n){function r(c,s){if(!e[c]){if(!t[c]){var a="function"==typeof require&&require;if(!s&&a)return a(c,!0);if(i)return i(c,!0);var u=new Error("Cannot find module '"+c+"'");throw u.code="MODULE_NOT_FOUND",u}var l=e[c]={exports:{}};t[c][0].call(l.exports,function(e){var n=t[c][1][e];return r(n?n:e)},l,l.exports,o,t,e,n)}return e[c].exports}for(var i="function"==typeof require&&require,c=0;c<n.length;c++)r(n[c]);return r}({1:[function(t,e,n){var o=t("matches-selector");e.exports=function(t,e,n){for(var r=n?t:t.parentNode;r&&r!==document;){if(o(r,e))return r;r=r.parentNode}}},{"matches-selector":5}],2:[function(t,e,n){function o(t,e,n,o,i){var c=r.apply(this,arguments);return t.addEventListener(n,c,i),{destroy:function(){t.removeEventListener(n,c,i)}}}function r(t,e,n,o){return function(n){n.delegateTarget=i(n.target,e,!0),n.delegateTarget&&o.call(t,n)}}var i=t("closest");e.exports=o},{closest:1}],3:[function(t,e,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){var e=Object.prototype.toString.call(t);return"[object Function]"===e}},{}],4:[function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!s.string(e))throw new TypeError("Second argument must be a String");if(!s.fn(n))throw new TypeError("Third argument must be a Function");if(s.node(t))return r(t,e,n);if(s.nodeList(t))return i(t,e,n);if(s.string(t))return c(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function c(t,e,n){return a(document.body,t,e,n)}var s=t("./is"),a=t("delegate");e.exports=o},{"./is":3,delegate:2}],5:[function(t,e,n){function o(t,e){if(i)return i.call(t,e);for(var n=t.parentNode.querySelectorAll(e),o=0;o<n.length;++o)if(n[o]==t)return!0;return!1}var r=Element.prototype,i=r.matchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector;e.exports=o},{}],6:[function(t,e,n){function o(t){var e;if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o),e=n.toString()}return e}e.exports=o},{}],7:[function(t,e,n){function o(){}o.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){r.off(t,o),e.apply(n,arguments)}var r=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;for(o;r>o;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,c=o.length;c>i;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},e.exports=o},{}],8:[function(e,n,o){!function(r,i){if("function"==typeof t&&t.amd)t(["module","select"],i);else if("undefined"!=typeof o)i(n,e("select"));else{var c={exports:{}};i(c,r.select),r.clipboardAction=c.exports}}(this,function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=n(e),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=function(){function t(e){o(this,t),this.resolveOptions(e),this.initSelection()}return t.prototype.resolveOptions=function e(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action=t.action,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""},t.prototype.initSelection=function n(){if(this.text&&this.target)throw new Error('Multiple attributes declared, use either "target" or "text"');if(this.text)this.selectFake();else{if(!this.target)throw new Error('Missing required attributes, use either "target" or "text"');this.selectTarget()}},t.prototype.selectFake=function s(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandler=document.body.addEventListener("click",function(){return t.removeFake()}),this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="fixed",this.fakeElem.style[e?"right":"left"]="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,r["default"])(this.fakeElem),this.copyText()},t.prototype.removeFake=function a(){this.fakeHandler&&(document.body.removeEventListener("click"),this.fakeHandler=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},t.prototype.selectTarget=function u(){this.selectedText=(0,r["default"])(this.target),this.copyText()},t.prototype.copyText=function l(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)},t.prototype.handleResult=function f(t){t?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},t.prototype.clearSelection=function d(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},t.prototype.destroy=function p(){this.removeFake()},c(t,[{key:"action",set:function h(){var t=arguments.length<=0||void 0===arguments[0]?"copy":arguments[0];if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function g(){return this._action}},{key:"target",set:function y(t){if(void 0!==t){if(!t||"object"!==("undefined"==typeof t?"undefined":i(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');this._target=t}},get:function m(){return this._target}}]),t}();t.exports=s})},{select:6}],9:[function(e,n,o){!function(r,i){if("function"==typeof t&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],i);else if("undefined"!=typeof o)i(n,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var c={exports:{}};i(c,r.clipboardAction,r.tinyEmitter,r.goodListener),r.clipboard=c.exports}}(this,function(t,e,n,o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var u=r(e),l=r(n),f=r(o),d=function(t){function e(n,o){i(this,e);var r=c(this,t.call(this));return r.resolveOptions(o),r.listenClick(n),r}return s(e,t),e.prototype.resolveOptions=function n(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText},e.prototype.listenClick=function o(t){var e=this;this.listener=(0,f["default"])(t,"click",function(t){return e.onClick(t)})},e.prototype.onClick=function r(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new u["default"]({action:this.action(e),target:this.target(e),text:this.text(e),trigger:e,emitter:this})},e.prototype.defaultAction=function l(t){return a("action",t)},e.prototype.defaultTarget=function d(t){var e=a("target",t);return e?document.querySelector(e):void 0},e.prototype.defaultText=function p(t){return a("text",t)},e.prototype.destroy=function h(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},e}(l["default"]);t.exports=d})},{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)});
 
trunk/assets/js/min/codemirror-min.js DELETED
@@ -1,13 +0,0 @@
1
- // CodeMirror base.
2
- (function(a){if(typeof exports=="object"&&typeof module=="object"){module.exports=a()}else{if(typeof define=="function"&&define.amd){return define([],a)}else{this.CodeMirror=a()}}})(function(){var ce=/gecko\/\d/i.test(navigator.userAgent);var eo=/MSIE \d/.test(navigator.userAgent);var b1=eo&&(document.documentMode==null||document.documentMode<8);var bY=eo&&(document.documentMode==null||document.documentMode<9);var bX=eo&&(document.documentMode==null||document.documentMode<10);var by=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent);var dn=eo||by;var cJ=/WebKit\//.test(navigator.userAgent);var dr=cJ&&/Qt\/\d+\.\d+/.test(navigator.userAgent);var cV=/Chrome\//.test(navigator.userAgent);var dF=/Opera\//.test(navigator.userAgent);var ay=/Apple Computer/.test(navigator.vendor);var a1=/KHTML\//.test(navigator.userAgent);var cP=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);var e5=/PhantomJS/.test(navigator.userAgent);var eD=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var dS=eD||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);var bU=eD||/Mac/.test(navigator.platform);var aG=/win/i.test(navigator.platform);var aO=dF&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);if(aO){aO=Number(aO[1])}if(aO&&aO>=15){dF=false;cJ=true}var bF=bU&&(dr||dF&&(aO==null||aO<12.11));var fE=ce||(dn&&!bY);var fH=false,aX=false;function I(fO,fP){if(!(this instanceof I)){return new I(fO,fP)}this.options=fP=fP||{};aE(eF,fP,false);b4(fP);var fR=fP.value;if(typeof fR=="string"){fR=new ao(fR,fP.mode)}this.doc=fR;var fQ=this.display=new em(fO,fR);fQ.wrapper.CodeMirror=this;dO(this);cB(this);if(fP.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}if(fP.autofocus&&!dS){ed(this)}this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,focused:false,suppressEdits:false,pasteIncoming:false,cutIncoming:false,draggingText:false,highlight:new fM()};if(eo){setTimeout(cl(eZ,this,true),20)}fp(this);a8();var fN=this;cz(this,function(){fN.curOp.forceUpdate=true;dN(fN,fR);if((fP.autofocus&&!dS)||ds()==fQ.input){setTimeout(cl(cq,fN),20)}else{aL(fN)}for(var fT in a4){if(a4.hasOwnProperty(fT)){a4[fT](fN,fP[fT],b2)}}for(var fS=0;fS<aY.length;++fS){aY[fS](fN)}})}function em(fN,fP){var fQ=this;var fO=fQ.input=fw("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");if(cJ){fO.style.width="1000px"}else{fO.setAttribute("wrap","off")}if(eD){fO.style.border="1px solid black"}fO.setAttribute("autocorrect","off");fO.setAttribute("autocapitalize","off");fO.setAttribute("spellcheck","false");fQ.inputDiv=fw("div",[fO],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");fQ.scrollbarH=fw("div",[fw("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fQ.scrollbarV=fw("div",[fw("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");fQ.scrollbarFiller=fw("div",null,"CodeMirror-scrollbar-filler");fQ.gutterFiller=fw("div",null,"CodeMirror-gutter-filler");fQ.lineDiv=fw("div",null,"CodeMirror-code");fQ.selectionDiv=fw("div",null,null,"position: relative; z-index: 1");fQ.cursorDiv=fw("div",null,"CodeMirror-cursors");fQ.measure=fw("div",null,"CodeMirror-measure");fQ.lineMeasure=fw("div",null,"CodeMirror-measure");fQ.lineSpace=fw("div",[fQ.measure,fQ.lineMeasure,fQ.selectionDiv,fQ.cursorDiv,fQ.lineDiv],null,"position: relative; outline: none");fQ.mover=fw("div",[fw("div",[fQ.lineSpace],"CodeMirror-lines")],null,"position: relative");fQ.sizer=fw("div",[fQ.mover],"CodeMirror-sizer");fQ.heightForcer=fw("div",null,null,"position: absolute; height: "+ba+"px; width: 1px;");fQ.gutters=fw("div",null,"CodeMirror-gutters");fQ.lineGutter=null;fQ.scroller=fw("div",[fQ.sizer,fQ.heightForcer,fQ.gutters],"CodeMirror-scroll");fQ.scroller.setAttribute("tabIndex","-1");fQ.wrapper=fw("div",[fQ.inputDiv,fQ.scrollbarH,fQ.scrollbarV,fQ.scrollbarFiller,fQ.gutterFiller,fQ.scroller],"CodeMirror");if(b1){fQ.gutters.style.zIndex=-1;fQ.scroller.style.paddingRight=0}if(eD){fO.style.width="0px"}if(!cJ){fQ.scroller.draggable=true}if(a1){fQ.inputDiv.style.height="1px";fQ.inputDiv.style.position="absolute"}if(b1){fQ.scrollbarH.style.minHeight=fQ.scrollbarV.style.minWidth="18px"}if(fN.appendChild){fN.appendChild(fQ.wrapper)}else{fN(fQ.wrapper)}fQ.viewFrom=fQ.viewTo=fP.first;fQ.view=[];fQ.externalMeasured=null;fQ.viewOffset=0;fQ.lastSizeC=0;fQ.updateLineNumbers=null;fQ.lineNumWidth=fQ.lineNumInnerWidth=fQ.lineNumChars=null;fQ.prevInput="";fQ.alignWidgets=false;fQ.pollingFast=false;fQ.poll=new fM();fQ.cachedCharWidth=fQ.cachedTextHeight=fQ.cachedPaddingH=null;fQ.inaccurateSelection=false;fQ.maxLine=null;fQ.maxLineLength=0;fQ.maxLineChanged=false;fQ.wheelDX=fQ.wheelDY=fQ.wheelStartX=fQ.wheelStartY=null;fQ.shift=false;fQ.selForContextMenu=null}function bh(fN){fN.doc.mode=I.getMode(fN.options,fN.doc.modeOption);dX(fN)}function dX(fN){fN.doc.iter(function(fO){if(fO.stateAfter){fO.stateAfter=null}if(fO.styles){fO.styles=null}});fN.doc.frontier=fN.doc.first;dR(fN,100);fN.state.modeGen++;if(fN.curOp){af(fN)}}function ek(fN){if(fN.options.lineWrapping){fb(fN.display.wrapper,"CodeMirror-wrap");fN.display.sizer.style.minWidth=""}else{g(fN.display.wrapper,"CodeMirror-wrap");h(fN)}X(fN);af(fN);ai(fN);setTimeout(function(){eB(fN)},100)}function a3(fN){var fP=aN(fN.display),fO=fN.options.lineWrapping;var fQ=fO&&Math.max(5,fN.display.scroller.clientWidth/di(fN.display)-3);return function(fS){if(e7(fN.doc,fS)){return 0}var fR=0;if(fS.widgets){for(var fT=0;fT<fS.widgets.length;fT++){if(fS.widgets[fT].height){fR+=fS.widgets[fT].height}}}if(fO){return fR+(Math.ceil(fS.text.length/fQ)||1)*fP}else{return fR+fP}}}function X(fN){var fP=fN.doc,fO=a3(fN);fP.iter(function(fQ){var fR=fO(fQ);if(fR!=fQ.height){fA(fQ,fR)}})}function fK(fN){var fP=eK[fN.options.keyMap],fO=fP.style;fN.display.wrapper.className=fN.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(fO?" cm-keymap-"+fO:"")}function cB(fN){fN.display.wrapper.className=fN.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+fN.options.theme.replace(/(^|\s)\s*/g," cm-s-");ai(fN)}function db(fN){dO(fN);af(fN);setTimeout(function(){ei(fN)},20)}function dO(fN){var fO=fN.display.gutters,fS=fN.options.gutters;dE(fO);for(var fP=0;fP<fS.length;++fP){var fQ=fS[fP];var fR=fO.appendChild(fw("div",null,"CodeMirror-gutter "+fQ));if(fQ=="CodeMirror-linenumbers"){fN.display.lineGutter=fR;fR.style.width=(fN.display.lineNumWidth||1)+"px"}}fO.style.display=fP?"":"none";cN(fN)}function cN(fN){var fO=fN.display.gutters.offsetWidth;fN.display.sizer.style.marginLeft=fO+"px";fN.display.scrollbarH.style.left=fN.options.fixedGutter?fO+"px":0}function dY(fP){if(fP.height==0){return 0}var fO=fP.text.length,fN,fR=fP;while(fN=er(fR)){var fQ=fN.find(0,true);fR=fQ.from.line;fO+=fQ.from.ch-fQ.to.ch}fR=fP;while(fN=d7(fR)){var fQ=fN.find(0,true);fO-=fR.text.length-fQ.from.ch;fR=fQ.to.line;fO+=fR.text.length-fQ.to.ch}return fO}function h(fN){var fP=fN.display,fO=fN.doc;fP.maxLine=eP(fO,fO.first);fP.maxLineLength=dY(fP.maxLine);fP.maxLineChanged=true;fO.iter(function(fR){var fQ=dY(fR);if(fQ>fP.maxLineLength){fP.maxLineLength=fQ;fP.maxLine=fR}})}function b4(fN){var fO=c1(fN.gutters,"CodeMirror-linenumbers");if(fO==-1&&fN.lineNumbers){fN.gutters=fN.gutters.concat(["CodeMirror-linenumbers"])}else{if(fO>-1&&!fN.lineNumbers){fN.gutters=fN.gutters.slice(0);fN.gutters.splice(fO,1)}}}function df(fO){var fN=fO.display.scroller;return{clientHeight:fN.clientHeight,barHeight:fO.display.scrollbarV.clientHeight,scrollWidth:fN.scrollWidth,clientWidth:fN.clientWidth,barWidth:fO.display.scrollbarH.clientWidth,docHeight:Math.round(fO.doc.height+bx(fO.display))}}function eB(fN,fS){if(!fS){fS=df(fN)}var fU=fN.display;var fR=fS.docHeight+ba;var fT=fS.scrollWidth>fS.clientWidth;var fP=fR>fS.clientHeight;if(fP){fU.scrollbarV.style.display="block";fU.scrollbarV.style.bottom=fT?l(fU.measure)+"px":"0";fU.scrollbarV.firstChild.style.height=Math.max(0,fR-fS.clientHeight+(fS.barHeight||fU.scrollbarV.clientHeight))+"px"}else{fU.scrollbarV.style.display="";fU.scrollbarV.firstChild.style.height="0"}if(fT){fU.scrollbarH.style.display="block";fU.scrollbarH.style.right=fP?l(fU.measure)+"px":"0";fU.scrollbarH.firstChild.style.width=(fS.scrollWidth-fS.clientWidth+(fS.barWidth||fU.scrollbarH.clientWidth))+"px"}else{fU.scrollbarH.style.display="";fU.scrollbarH.firstChild.style.width="0"}if(fT&&fP){fU.scrollbarFiller.style.display="block";fU.scrollbarFiller.style.height=fU.scrollbarFiller.style.width=l(fU.measure)+"px"}else{fU.scrollbarFiller.style.display=""}if(fT&&fN.options.coverGutterNextToScrollbar&&fN.options.fixedGutter){fU.gutterFiller.style.display="block";fU.gutterFiller.style.height=l(fU.measure)+"px";fU.gutterFiller.style.width=fU.gutters.offsetWidth+"px"}else{fU.gutterFiller.style.display=""}if(!fN.state.checkedOverlayScrollbar&&fS.clientHeight>0){if(l(fU.measure)===0){var fO=bU&&!cP?"12px":"18px";fU.scrollbarV.style.minWidth=fU.scrollbarH.style.minHeight=fO;var fQ=function(fV){if(L(fV)!=fU.scrollbarV&&L(fV)!=fU.scrollbarH){cL(fN,d5)(fV)}};bM(fU.scrollbarV,"mousedown",fQ);bM(fU.scrollbarH,"mousedown",fQ)}fN.state.checkedOverlayScrollbar=true}}function bT(fP,fT,fV){var fQ=fV&&fV.top!=null?fV.top:fP.scroller.scrollTop;fQ=Math.floor(fQ-eI(fP));var fN=fV&&fV.bottom!=null?fV.bottom:fQ+fP.wrapper.clientHeight;var fR=bv(fT,fQ),fS=bv(fT,fN);if(fV&&fV.ensure){var fO=fV.ensure.from.line,fU=fV.ensure.to.line;if(fO<fR){return{from:fO,to:bv(fT,bB(eP(fT,fO))+fP.wrapper.clientHeight)}}if(Math.min(fU,fT.lastLine())>=fS){return{from:bv(fT,bB(eP(fT,fU))-fP.wrapper.clientHeight),to:fU}}}return{from:fR,to:fS}}function ei(fV){var fT=fV.display,fU=fT.view;if(!fT.alignWidgets&&(!fT.gutters.firstChild||!fV.options.fixedGutter)){return}var fR=dA(fT)-fT.scroller.scrollLeft+fV.doc.scrollLeft;var fN=fT.gutters.offsetWidth,fO=fR+"px";for(var fQ=0;fQ<fU.length;fQ++){if(!fU[fQ].hidden){if(fV.options.fixedGutter&&fU[fQ].gutter){fU[fQ].gutter.style.left=fO}var fS=fU[fQ].alignable;if(fS){for(var fP=0;fP<fS.length;fP++){fS[fP].style.left=fO}}}}if(fV.options.fixedGutter){fT.gutters.style.left=(fR+fN)+"px"}}function dI(fN){if(!fN.options.lineNumbers){return false}var fS=fN.doc,fO=d4(fN.options,fS.first+fS.size-1),fR=fN.display;if(fO.length!=fR.lineNumChars){var fT=fR.measure.appendChild(fw("div",[fw("div",fO)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var fP=fT.firstChild.offsetWidth,fQ=fT.offsetWidth-fP;fR.lineGutter.style.width="";fR.lineNumInnerWidth=Math.max(fP,fR.lineGutter.offsetWidth-fQ);fR.lineNumWidth=fR.lineNumInnerWidth+fQ;fR.lineNumChars=fR.lineNumInnerWidth?fO.length:-1;fR.lineGutter.style.width=fR.lineNumWidth+"px";cN(fN);return true}return false}function d4(fN,fO){return String(fN.lineNumberFormatter(fO+fN.firstLineNumber))}function dA(fN){return fN.scroller.getBoundingClientRect().left-fN.sizer.getBoundingClientRect().left}function dp(fS,fV,fW){var fU=fS.display.viewFrom,fT=fS.display.viewTo,fQ;var fN=bT(fS.display,fS.doc,fV);for(var fP=true;;fP=false){var fO=fS.display.scroller.clientWidth;if(!cZ(fS,fN,fW)){break}fQ=true;if(fS.display.maxLineChanged&&!fS.options.lineWrapping){b(fS)}var fR=df(fS);br(fS);de(fS,fR);eB(fS,fR);if(cJ&&fS.options.lineWrapping){fz(fS,fR)}if(fP&&fS.options.lineWrapping&&fO!=fS.display.scroller.clientWidth){fW=true;continue}fW=false;if(fV&&fV.top!=null){fV={top:Math.min(fR.docHeight-ba-fR.clientHeight,fV.top)}}fN=bT(fS.display,fS.doc,fV);if(fN.from>=fS.display.viewFrom&&fN.to<=fS.display.viewTo){break}}fS.display.updateLineNumbers=null;if(fQ){ac(fS,"update",fS);if(fS.display.viewFrom!=fU||fS.display.viewTo!=fT){ac(fS,"viewportChange",fS,fS.display.viewFrom,fS.display.viewTo)}}return fQ}function cZ(fX,fP,fY){var fR=fX.display,fW=fX.doc;if(!fR.wrapper.offsetWidth){d9(fX);return}if(!fY&&fP.from>=fR.viewFrom&&fP.to<=fR.viewTo&&cU(fX)==0){return}if(dI(fX)){d9(fX)}var fV=eM(fX);var fQ=fW.first+fW.size;var fU=Math.max(fP.from-fX.options.viewportMargin,fW.first);var fT=Math.min(fQ,fP.to+fX.options.viewportMargin);if(fR.viewFrom<fU&&fU-fR.viewFrom<20){fU=Math.max(fW.first,fR.viewFrom)}if(fR.viewTo>fT&&fR.viewTo-fT<20){fT=Math.min(fQ,fR.viewTo)}if(aX){fU=aM(fX.doc,fU);fT=dG(fX.doc,fT)}var fO=fU!=fR.viewFrom||fT!=fR.viewTo||fR.lastSizeC!=fR.wrapper.clientHeight;cD(fX,fU,fT);fR.viewOffset=bB(eP(fX.doc,fR.viewFrom));fX.display.mover.style.top=fR.viewOffset+"px";var fN=cU(fX);if(!fO&&fN==0&&!fY){return}var fS=ds();if(fN>4){fR.lineDiv.style.display="none"}cc(fX,fR.updateLineNumbers,fV);if(fN>4){fR.lineDiv.style.display=""}if(fS&&ds()!=fS&&fS.offsetHeight){fS.focus()}dE(fR.cursorDiv);dE(fR.selectionDiv);if(fO){fR.lastSizeC=fR.wrapper.clientHeight;dR(fX,400)}aZ(fX);return true}function b(fN){var fR=fN.display;var fP=dT(fN,fR.maxLine,fR.maxLine.text.length).left;fR.maxLineChanged=false;var fO=Math.max(0,fP+3);var fQ=Math.max(0,fR.sizer.offsetLeft+fO+ba-fR.scroller.clientWidth);fR.sizer.style.minWidth=fO+"px";if(fQ<fN.doc.scrollLeft){bt(fN,Math.min(fR.scroller.scrollLeft,fQ),true)}}function de(fN,fO){fN.display.sizer.style.minHeight=fN.display.heightForcer.style.top=fO.docHeight+"px";fN.display.gutters.style.height=Math.max(fO.docHeight,fO.clientHeight-ba)+"px"}function fz(fN,fO){if(fN.display.sizer.offsetWidth+fN.display.gutters.offsetWidth<fN.display.scroller.clientWidth-1){fN.display.sizer.style.minHeight=fN.display.heightForcer.style.top="0px";fN.display.gutters.style.height=fO.docHeight+"px"}}function aZ(fU){var fS=fU.display;var fO=fS.lineDiv.offsetTop;for(var fP=0;fP<fS.view.length;fP++){var fV=fS.view[fP],fW;if(fV.hidden){continue}if(b1){var fR=fV.node.offsetTop+fV.node.offsetHeight;fW=fR-fO;fO=fR}else{var fQ=fV.node.getBoundingClientRect();fW=fQ.bottom-fQ.top}var fT=fV.line.height-fW;if(fW<2){fW=aN(fS)}if(fT>0.001||fT<-0.001){fA(fV.line,fW);b0(fV.line);if(fV.rest){for(var fN=0;fN<fV.rest.length;fN++){b0(fV.rest[fN])}}}}}function b0(fN){if(fN.widgets){for(var fO=0;fO<fN.widgets.length;++fO){fN.widgets[fO].height=fN.widgets[fO].node.offsetHeight}}}function eM(fN){var fR=fN.display,fQ={},fP={};for(var fS=fR.gutters.firstChild,fO=0;fS;fS=fS.nextSibling,++fO){fQ[fN.options.gutters[fO]]=fS.offsetLeft;fP[fN.options.gutters[fO]]=fS.offsetWidth}return{fixedPos:dA(fR),gutterTotalWidth:fR.gutters.offsetWidth,gutterLeft:fQ,gutterWidth:fP,wrapperWidth:fR.wrapper.clientWidth}}function cc(fY,fP,fX){var fU=fY.display,f0=fY.options.lineNumbers;var fN=fU.lineDiv,fZ=fN.firstChild;function fT(f2){var f1=f2.nextSibling;if(cJ&&bU&&fY.display.currentWheelTarget==f2){f2.style.display="none"}else{f2.parentNode.removeChild(f2)}return f1}var fV=fU.view,fS=fU.viewFrom;for(var fQ=0;fQ<fV.length;fQ++){var fR=fV[fQ];if(fR.hidden){}else{if(!fR.node){var fO=aA(fY,fR,fS,fX);fN.insertBefore(fO,fZ)}else{while(fZ!=fR.node){fZ=fT(fZ)}var fW=f0&&fP!=null&&fP<=fS&&fR.lineNumber;if(fR.changes){if(c1(fR.changes,"gutter")>-1){fW=false}Z(fY,fR,fS,fX)}if(fW){dE(fR.lineNumber);fR.lineNumber.appendChild(document.createTextNode(d4(fY.options,fS)))}fZ=fR.node.nextSibling}}fS+=fR.size}while(fZ){fZ=fT(fZ)}}function Z(fN,fP,fR,fS){for(var fO=0;fO<fP.changes.length;fO++){var fQ=fP.changes[fO];if(fQ=="text"){eV(fN,fP)}else{if(fQ=="gutter"){cY(fN,fP,fR,fS)}else{if(fQ=="class"){dl(fP)}else{if(fQ=="widget"){al(fP,fS)}}}}}fP.changes=null}function fi(fN){if(fN.node==fN.text){fN.node=fw("div",null,null,"position: relative");if(fN.text.parentNode){fN.text.parentNode.replaceChild(fN.node,fN.text)}fN.node.appendChild(fN.text);if(b1){fN.node.style.zIndex=2}}return fN.node}function d6(fO){var fN=fO.bgClass?fO.bgClass+" "+(fO.line.bgClass||""):fO.line.bgClass;if(fN){fN+=" CodeMirror-linebackground"}if(fO.background){if(fN){fO.background.className=fN}else{fO.background.parentNode.removeChild(fO.background);fO.background=null}}else{if(fN){var fP=fi(fO);fO.background=fP.insertBefore(fw("div",null,fN),fP.firstChild)}}}function dy(fN,fO){var fP=fN.display.externalMeasured;if(fP&&fP.line==fO.line){fN.display.externalMeasured=null;fO.measure=fP.measure;return fP.built}return ev(fN,fO)}function eV(fN,fQ){var fO=fQ.text.className;var fP=dy(fN,fQ);if(fQ.text==fQ.node){fQ.node=fP.pre}fQ.text.parentNode.replaceChild(fP.pre,fQ.text);fQ.text=fP.pre;if(fP.bgClass!=fQ.bgClass||fP.textClass!=fQ.textClass){fQ.bgClass=fP.bgClass;fQ.textClass=fP.textClass;dl(fQ)}else{if(fO){fQ.text.className=fO}}}function dl(fO){d6(fO);if(fO.line.wrapClass){fi(fO).className=fO.line.wrapClass}else{if(fO.node!=fO.text){fO.node.className=""}}var fN=fO.textClass?fO.textClass+" "+(fO.line.textClass||""):fO.line.textClass;fO.text.className=fN||""}function cY(fV,fT,fS,fU){if(fT.gutter){fT.node.removeChild(fT.gutter);fT.gutter=null}var fQ=fT.line.gutterMarkers;if(fV.options.lineNumbers||fQ){var fO=fi(fT);var fR=fT.gutter=fO.insertBefore(fw("div",null,"CodeMirror-gutter-wrapper","position: absolute; left: "+(fV.options.fixedGutter?fU.fixedPos:-fU.gutterTotalWidth)+"px"),fT.text);if(fV.options.lineNumbers&&(!fQ||!fQ["CodeMirror-linenumbers"])){fT.lineNumber=fR.appendChild(fw("div",d4(fV.options,fS),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fU.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+fV.display.lineNumInnerWidth+"px"))}if(fQ){for(var fP=0;fP<fV.options.gutters.length;++fP){var fN=fV.options.gutters[fP],fW=fQ.hasOwnProperty(fN)&&fQ[fN];if(fW){fR.appendChild(fw("div",[fW],"CodeMirror-gutter-elt","left: "+fU.gutterLeft[fN]+"px; width: "+fU.gutterWidth[fN]+"px"))}}}}}function al(fN,fQ){if(fN.alignable){fN.alignable=null}for(var fP=fN.node.firstChild,fO;fP;fP=fO){var fO=fP.nextSibling;if(fP.className=="CodeMirror-linewidget"){fN.node.removeChild(fP)}}e4(fN,fQ)}function aA(fN,fP,fQ,fR){var fO=dy(fN,fP);fP.text=fP.node=fO.pre;if(fO.bgClass){fP.bgClass=fO.bgClass}if(fO.textClass){fP.textClass=fO.textClass}dl(fP);cY(fN,fP,fQ,fR);e4(fP,fR);return fP.node}function e4(fO,fP){fB(fO.line,fO,fP,true);if(fO.rest){for(var fN=0;fN<fO.rest.length;fN++){fB(fO.rest[fN],fO,fP,false)}}}function fB(fV,fS,fU,fQ){if(!fV.widgets){return}var fN=fi(fS);for(var fP=0,fT=fV.widgets;fP<fT.length;++fP){var fR=fT[fP],fO=fw("div",[fR.node],"CodeMirror-linewidget");if(!fR.handleMouseEvents){fO.ignoreEvents=true}bu(fR,fO,fS,fU);if(fQ&&fR.above){fN.insertBefore(fO,fS.gutter||fS.text)}else{fN.appendChild(fO)}ac(fR,"redraw")}}function bu(fQ,fP,fN,fR){if(fQ.noHScroll){(fN.alignable||(fN.alignable=[])).push(fP);var fO=fR.wrapperWidth;fP.style.left=fR.fixedPos+"px";if(!fQ.coverGutter){fO-=fR.gutterTotalWidth;fP.style.paddingLeft=fR.gutterTotalWidth+"px"}fP.style.width=fO+"px"}if(fQ.coverGutter){fP.style.zIndex=5;fP.style.position="relative";if(!fQ.noHScroll){fP.style.marginLeft=-fR.gutterTotalWidth+"px"}}}var W=I.Pos=function(fN,fO){if(!(this instanceof W)){return new W(fN,fO)}this.line=fN;this.ch=fO};var b5=I.cmpPos=function(fO,fN){return fO.line-fN.line||fO.ch-fN.ch};function b9(fN){return W(fN.line,fN.ch)}function bn(fO,fN){return b5(fO,fN)<0?fN:fO}function am(fO,fN){return b5(fO,fN)<0?fO:fN}function fx(fN,fO){this.ranges=fN;this.primIndex=fO}fx.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(fN){if(fN==this){return true}if(fN.primIndex!=this.primIndex||fN.ranges.length!=this.ranges.length){return false}for(var fP=0;fP<this.ranges.length;fP++){var fO=this.ranges[fP],fQ=fN.ranges[fP];if(b5(fO.anchor,fQ.anchor)!=0||b5(fO.head,fQ.head)!=0){return false}}return true},deepCopy:function(){for(var fN=[],fO=0;fO<this.ranges.length;fO++){fN[fO]=new dB(b9(this.ranges[fO].anchor),b9(this.ranges[fO].head))}return new fx(fN,this.primIndex)},somethingSelected:function(){for(var fN=0;fN<this.ranges.length;fN++){if(!this.ranges[fN].empty()){return true}}return false},contains:function(fQ,fN){if(!fN){fN=fQ}for(var fP=0;fP<this.ranges.length;fP++){var fO=this.ranges[fP];if(b5(fN,fO.from())>=0&&b5(fQ,fO.to())<=0){return fP}}return -1}};function dB(fN,fO){this.anchor=fN;this.head=fO}dB.prototype={from:function(){return am(this.anchor,this.head)},to:function(){return bn(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};function cm(fN,fU){var fP=fN[fU];fN.sort(function(fX,fW){return b5(fX.from(),fW.from())});fU=c1(fN,fP);for(var fR=1;fR<fN.length;fR++){var fV=fN[fR],fO=fN[fR-1];if(b5(fO.to(),fV.from())>=0){var fS=am(fO.from(),fV.from()),fT=bn(fO.to(),fV.to());var fQ=fO.empty()?fV.from()==fV.head:fO.from()==fO.head;if(fR<=fU){--fU}fN.splice(--fR,2,new dB(fQ?fT:fS,fQ?fS:fT))}}return new fx(fN,fU)}function eu(fN,fO){return new fx([new dB(fN,fO||fN)],0)}function cO(fN,fO){return Math.max(fN.first,Math.min(fO,fN.first+fN.size-1))}function fj(fO,fP){if(fP.line<fO.first){return W(fO.first,0)}var fN=fO.first+fO.size-1;if(fP.line>fN){return W(fN,eP(fO,fN).text.length)}return e3(fP,eP(fO,fP.line).text.length)}function e3(fP,fO){var fN=fP.ch;if(fN==null||fN>fO){return W(fP.line,fO)}else{if(fN<0){return W(fP.line,0)}else{return fP}}}function bW(fO,fN){return fN>=fO.first&&fN<fO.first+fO.size}function dC(fP,fQ){for(var fN=[],fO=0;fO<fQ.length;fO++){fN[fO]=fj(fP,fQ[fO])}return fN}function e6(fS,fO,fR,fN){if(fS.cm&&fS.cm.display.shift||fS.extend){var fQ=fO.anchor;if(fN){var fP=b5(fR,fQ)<0;if(fP!=(b5(fN,fQ)<0)){fQ=fR;fR=fN}else{if(fP!=(b5(fR,fN)<0)){fR=fN}}}return new dB(fQ,fR)}else{return new dB(fN||fR,fR)}}function ft(fQ,fP,fN,fO){bJ(fQ,new fx([e6(fQ,fQ.sel.primary(),fP,fN)],0),fO)}function at(fS,fR,fP){for(var fO=[],fQ=0;fQ<fS.sel.ranges.length;fQ++){fO[fQ]=e6(fS,fS.sel.ranges[fQ],fR[fQ],null)}var fN=cm(fO,fS.sel.primIndex);bJ(fS,fN,fP)}function f(fR,fQ,fO,fP){var fN=fR.sel.ranges.slice(0);fN[fQ]=fO;bJ(fR,cm(fN,fR.sel.primIndex),fP)}function G(fQ,fO,fP,fN){bJ(fQ,eu(fO,fP),fN)}function d(fP,fN){var fO={ranges:fN.ranges,update:function(fQ){this.ranges=[];for(var fR=0;fR<fQ.length;fR++){this.ranges[fR]=new dB(fj(fP,fQ[fR].anchor),fj(fP,fQ[fR].head))}}};az(fP,"beforeSelectionChange",fP,fO);if(fP.cm){az(fP.cm,"beforeSelectionChange",fP.cm,fO)}if(fO.ranges!=fN.ranges){return cm(fO.ranges,fO.ranges.length-1)}else{return fN}}function eH(fR,fQ,fO){var fN=fR.history.done,fP=fh(fN);if(fP&&fP.ranges){fN[fN.length-1]=fQ;d1(fR,fQ,fO)}else{bJ(fR,fQ,fO)}}function bJ(fP,fO,fN){d1(fP,fO,fN);fG(fP,fP.sel,fP.cm?fP.cm.curOp.id:NaN,fN)}function d1(fQ,fP,fO){if(eS(fQ,"beforeSelectionChange")||fQ.cm&&eS(fQ.cm,"beforeSelectionChange")){fP=d(fQ,fP)}var fN=b5(fP.primary().head,fQ.sel.primary().head)<0?-1:1;cS(fQ,o(fQ,fP,fN,true));if(!(fO&&fO.scroll===false)&&fQ.cm){fg(fQ.cm)}}function cS(fO,fN){if(fN.equals(fO.sel)){return}fO.sel=fN;if(fO.cm){fO.cm.curOp.updateInput=fO.cm.curOp.selectionChanged=true;V(fO.cm)}ac(fO,"cursorActivity",fO)}function ea(fN){cS(fN,o(fN,fN.sel,null,false),Y)}function o(fV,fN,fS,fT){var fP;for(var fQ=0;fQ<fN.ranges.length;fQ++){var fR=fN.ranges[fQ];var fU=bK(fV,fR.anchor,fS,fT);var fO=bK(fV,fR.head,fS,fT);if(fP||fU!=fR.anchor||fO!=fR.head){if(!fP){fP=fN.ranges.slice(0,fQ)}fP[fQ]=new dB(fU,fO)}}return fP?cm(fP,fN.primIndex):fN}function bK(fW,fV,fS,fT){var fX=false,fP=fV;var fQ=fS||1;fW.cantEdit=false;search:for(;;){var fY=eP(fW,fP.line);if(fY.markedSpans){for(var fR=0;fR<fY.markedSpans.length;++fR){var fN=fY.markedSpans[fR],fO=fN.marker;if((fN.from==null||(fO.inclusiveLeft?fN.from<=fP.ch:fN.from<fP.ch))&&(fN.to==null||(fO.inclusiveRight?fN.to>=fP.ch:fN.to>fP.ch))){if(fT){az(fO,"beforeCursorEnter");if(fO.explicitlyCleared){if(!fY.markedSpans){break}else{--fR;continue}}}if(!fO.atomic){continue}var fU=fO.find(fQ<0?-1:1);if(b5(fU,fP)==0){fU.ch+=fQ;if(fU.ch<0){if(fU.line>fW.first){fU=fj(fW,W(fU.line-1))}else{fU=null}}else{if(fU.ch>fY.text.length){if(fU.line<fW.first+fW.size-1){fU=W(fU.line+1,0)}else{fU=null}}}if(!fU){if(fX){if(!fT){return bK(fW,fV,fS,true)}fW.cantEdit=true;return W(fW.first,0)}fX=true;fU=fV;fQ=-fQ}}fP=fU;continue search}}}return fP}}function br(fZ){var fU=fZ.display,fY=fZ.doc;var fW=document.createDocumentFragment();var fQ=document.createDocumentFragment();for(var fS=0;fS<fY.sel.ranges.length;fS++){var fT=fY.sel.ranges[fS];var fR=fT.empty();if(fR||fZ.options.showCursorWhenSelecting){B(fZ,fT,fW)}if(!fR){bs(fZ,fT,fQ)}}if(fZ.options.moveInputWithCursor){var fV=dx(fZ,fY.sel.primary().head,"div");var fN=fU.wrapper.getBoundingClientRect(),fP=fU.lineDiv.getBoundingClientRect();var fX=Math.max(0,Math.min(fU.wrapper.clientHeight-10,fV.top+fP.top-fN.top));var fO=Math.max(0,Math.min(fU.wrapper.clientWidth-10,fV.left+fP.left-fN.left));fU.inputDiv.style.top=fX+"px";fU.inputDiv.style.left=fO+"px"}bG(fU.cursorDiv,fW);bG(fU.selectionDiv,fQ)}function B(fN,fQ,fP){var fS=dx(fN,fQ.head,"div");var fR=fP.appendChild(fw("div","\u00a0","CodeMirror-cursor"));fR.style.left=fS.left+"px";fR.style.top=fS.top+"px";fR.style.height=Math.max(0,fS.bottom-fS.top)*fN.options.cursorHeight+"px";if(fS.other){var fO=fP.appendChild(fw("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"));fO.style.display="";fO.style.left=fS.other.left+"px";fO.style.top=fS.other.top+"px";fO.style.height=(fS.other.bottom-fS.other.top)*0.85+"px"}}function bs(fR,fX,fS){var f0=fR.display,f4=fR.doc;var fN=document.createDocumentFragment();var fW=eG(fR.display),fQ=fW.left,f1=f0.lineSpace.offsetWidth-fW.right;function fY(f8,f7,f6,f5){if(f7<0){f7=0}f7=Math.round(f7);f5=Math.round(f5);fN.appendChild(fw("div",null,"CodeMirror-selected","position: absolute; left: "+f8+"px; top: "+f7+"px; width: "+(f6==null?f1-f8:f6)+"px; height: "+(f5-f7)+"px"))}function fO(f6,f8,gb){var f7=eP(f4,f6);var f9=f7.text.length;var gc,f5;function ga(ge,gd){return cx(fR,W(f6,ge),"div",f7,gd)}dH(a(f7),f8||0,gb==null?f9:gb,function(gk,gj,gd){var gg=ga(gk,"left"),gh,gi,gf;if(gk==gj){gh=gg;gi=gf=gg.left}else{gh=ga(gj-1,"right");if(gd=="rtl"){var ge=gg;gg=gh;gh=ge}gi=gg.left;gf=gh.right}if(f8==null&&gk==0){gi=fQ}if(gh.top-gg.top>3){fY(gi,gg.top,null,gg.bottom);gi=fQ;if(gg.bottom<gh.top){fY(gi,gg.bottom,null,gh.top)}}if(gb==null&&gj==f9){gf=f1}if(!gc||gg.top<gc.top||gg.top==gc.top&&gg.left<gc.left){gc=gg}if(!f5||gh.bottom>f5.bottom||gh.bottom==f5.bottom&&gh.right>f5.right){f5=gh}if(gi<fQ+1){gi=fQ}fY(gi,gh.top,gf-gi,gh.bottom)});return{start:gc,end:f5}}var f3=fX.from(),f2=fX.to();if(f3.line==f2.line){fO(f3.line,f3.ch,f2.ch)}else{var fP=eP(f4,f3.line),fU=eP(f4,f2.line);var fT=z(fP)==z(fU);var fV=fO(f3.line,f3.ch,fT?fP.text.length+1:null).end;var fZ=fO(f2.line,fT?0:null,f2.ch).start;if(fT){if(fV.top<fZ.top-2){fY(fV.right,fV.top,null,fV.bottom);fY(fQ,fZ.top,fZ.left,fZ.bottom)}else{fY(fV.right,fV.top,fZ.left-fV.right,fV.bottom)}}if(fV.bottom<fZ.top){fY(fQ,fV.bottom,null,fZ.top)}}fS.appendChild(fN)}function p(fN){if(!fN.state.focused){return}var fP=fN.display;clearInterval(fP.blinker);var fO=true;fP.cursorDiv.style.visibility="";if(fN.options.cursorBlinkRate>0){fP.blinker=setInterval(function(){fP.cursorDiv.style.visibility=(fO=!fO)?"":"hidden"},fN.options.cursorBlinkRate)}}function dR(fN,fO){if(fN.doc.mode.startState&&fN.doc.frontier<fN.display.viewTo){fN.state.highlight.set(fO,cl(cC,fN))}}function cC(fN){var fQ=fN.doc;if(fQ.frontier<fQ.first){fQ.frontier=fQ.first}if(fQ.frontier>=fN.display.viewTo){return}var fO=+new Date+fN.options.workTime;var fP=bR(fQ.mode,dg(fN,fQ.frontier));cz(fN,function(){fQ.iter(fQ.frontier,Math.min(fQ.first+fQ.size,fN.display.viewTo+500),function(fR){if(fQ.frontier>=fN.display.viewFrom){var fT=fR.styles;var fU=fa(fN,fR,fP,true);fR.styles=fU.styles;if(fU.classes){fR.styleClasses=fU.classes}else{if(fR.styleClasses){fR.styleClasses=null}}var fV=!fT||fT.length!=fR.styles.length;for(var fS=0;!fV&&fS<fT.length;++fS){fV=fT[fS]!=fR.styles[fS]}if(fV){R(fN,fQ.frontier,"text")}fR.stateAfter=bR(fQ.mode,fP)}else{dc(fN,fR.text,fP);fR.stateAfter=fQ.frontier%5==0?bR(fQ.mode,fP):null}++fQ.frontier;if(+new Date>fO){dR(fN,fN.options.workDelay);return true}})})}function co(fT,fN,fQ){var fO,fR,fS=fT.doc;var fP=fQ?-1:fN-(fT.doc.mode.innerMode?1000:100);for(var fW=fN;fW>fP;--fW){if(fW<=fS.first){return fS.first}var fV=eP(fS,fW-1);if(fV.stateAfter&&(!fQ||fW<=fS.frontier)){return fW}var fU=bI(fV.text,null,fT.options.tabSize);if(fR==null||fO>fU){fR=fW-1;fO=fU}}return fR}function dg(fN,fT,fO){var fR=fN.doc,fQ=fN.display;if(!fR.mode.startState){return true}var fS=co(fN,fT,fO),fP=fS>fR.first&&eP(fR,fS-1).stateAfter;if(!fP){fP=bP(fR.mode)}else{fP=bR(fR.mode,fP)}fR.iter(fS,fT,function(fU){dc(fN,fU.text,fP);var fV=fS==fT-1||fS%5==0||fS>=fQ.viewFrom&&fS<fQ.viewTo;fU.stateAfter=fV?bR(fR.mode,fP):null;++fS});if(fO){fR.frontier=fS}return fP}function eI(fN){return fN.lineSpace.offsetTop}function bx(fN){return fN.mover.offsetHeight-fN.lineSpace.offsetHeight}function eG(fQ){if(fQ.cachedPaddingH){return fQ.cachedPaddingH}var fP=bG(fQ.measure,fw("pre","x"));var fN=window.getComputedStyle?window.getComputedStyle(fP):fP.currentStyle;var fO={left:parseInt(fN.paddingLeft),right:parseInt(fN.paddingRight)};if(!isNaN(fO.left)&&!isNaN(fO.right)){fQ.cachedPaddingH=fO}return fO}function b8(fU,fQ,fT){var fP=fU.options.lineWrapping;var fR=fP&&fU.display.scroller.clientWidth;if(!fQ.measure.heights||fP&&fQ.measure.width!=fR){var fS=fQ.measure.heights=[];if(fP){fQ.measure.width=fR;var fW=fQ.text.firstChild.getClientRects();for(var fN=0;fN<fW.length-1;fN++){var fV=fW[fN],fO=fW[fN+1];if(Math.abs(fV.bottom-fO.bottom)>2){fS.push((fV.bottom+fO.top)/2-fT.top)}}}fS.push(fT.bottom-fT.top)}}function cj(fP,fN,fQ){if(fP.line==fN){return{map:fP.measure.map,cache:fP.measure.cache}}for(var fO=0;fO<fP.rest.length;fO++){if(fP.rest[fO]==fN){return{map:fP.measure.maps[fO],cache:fP.measure.caches[fO]}}}for(var fO=0;fO<fP.rest.length;fO++){if(bC(fP.rest[fO])>fQ){return{map:fP.measure.maps[fO],cache:fP.measure.caches[fO],before:true}}}}function cK(fN,fP){fP=z(fP);var fR=bC(fP);var fO=fN.display.externalMeasured=new bl(fN.doc,fP,fR);fO.lineN=fR;var fQ=fO.built=ev(fN,fO);fO.text=fQ.pre;bG(fN.display.lineMeasure,fQ.pre);return fO}function dT(fN,fO,fQ,fP){return D(fN,aU(fN,fO),fQ,fP)}function eL(fN,fP){if(fP>=fN.display.viewFrom&&fP<fN.display.viewTo){return fN.display.view[c7(fN,fP)]}var fO=fN.display.externalMeasured;if(fO&&fP>=fO.lineN&&fP<fO.lineN+fO.size){return fO}}function aU(fN,fP){var fQ=bC(fP);var fO=eL(fN,fQ);if(fO&&!fO.text){fO=null}else{if(fO&&fO.changes){Z(fN,fO,fQ,eM(fN))}}if(!fO){fO=cK(fN,fP)}var fR=cj(fO,fP,fQ);return{line:fP,view:fO,rect:null,map:fR.map,cache:fR.cache,before:fR.before,hasHeights:false}}function D(fN,fS,fQ,fO){if(fS.before){fQ=-1}var fP=fQ+(fO||""),fR;if(fS.cache.hasOwnProperty(fP)){fR=fS.cache[fP]}else{if(!fS.rect){fS.rect=fS.view.text.getBoundingClientRect()}if(!fS.hasHeights){b8(fN,fS.view,fS.rect);fS.hasHeights=true}fR=k(fN,fS,fQ,fO);if(!fR.bogus){fS.cache[fP]=fR}}return{left:fR.left,right:fR.right,top:fR.top,bottom:fR.bottom}}var ee={left:0,right:0,top:0,bottom:0};function k(fU,f2,fW,fS){var f5=f2.map;var fZ,fR,fQ,fN;for(var f1=0;f1<f5.length;f1+=3){var f4=f5[f1],f0=f5[f1+1];if(fW<f4){fR=0;fQ=1;fN="left"}else{if(fW<f0){fR=fW-f4;fQ=fR+1}else{if(f1==f5.length-3||fW==f0&&f5[f1+3]>fW){fQ=f0-f4;fR=fQ-1;if(fW>=f0){fN="right"}}}}if(fR!=null){fZ=f5[f1+2];if(f4==f0&&fS==(fZ.insertLeft?"left":"right")){fN=fS}if(fS=="left"&&fR==0){while(f1&&f5[f1-2]==f5[f1-3]&&f5[f1-1].insertLeft){fZ=f5[(f1-=3)+2];fN="left"}}if(fS=="right"&&fR==f0-f4){while(f1<f5.length-3&&f5[f1+3]==f5[f1+4]&&!f5[f1+5].insertLeft){fZ=f5[(f1+=3)+2];fN="right"}}break}}var fO;if(fZ.nodeType==3){while(fR&&e0(f2.line.text.charAt(f4+fR))){--fR}while(f4+fQ<f0&&e0(f2.line.text.charAt(f4+fQ))){++fQ}if(bY&&fR==0&&fQ==f0-f4){fO=fZ.parentNode.getBoundingClientRect()}else{if(dn&&fU.options.lineWrapping){var fP=cb(fZ,fR,fQ).getClientRects();if(fP.length){fO=fP[fS=="right"?fP.length-1:0]}else{fO=ee}}else{fO=cb(fZ,fR,fQ).getBoundingClientRect()||ee}}}else{if(fR>0){fN=fS="right"}var fP;if(fU.options.lineWrapping&&(fP=fZ.getClientRects()).length>1){fO=fP[fS=="right"?fP.length-1:0]}else{fO=fZ.getBoundingClientRect()}}if(bY&&!fR&&(!fO||!fO.left&&!fO.right)){var fT=fZ.parentNode.getClientRects()[0];if(fT){fO={left:fT.left,right:fT.left+di(fU.display),top:fT.top,bottom:fT.bottom}}else{fO=ee}}var fY,fX=(fO.bottom+fO.top)/2-f2.rect.top;var f3=f2.view.measure.heights;for(var f1=0;f1<f3.length-1;f1++){if(fX<f3[f1]){break}}fY=f1?f3[f1-1]:0;fX=f3[f1];var fV={left:(fN=="right"?fO.right:fO.left)-f2.rect.left,right:(fN=="left"?fO.left:fO.right)-f2.rect.left,top:fY,bottom:fX};if(!fO.left&&!fO.right){fV.bogus=true}return fV}function ap(fO){if(fO.measure){fO.measure.cache={};fO.measure.heights=null;if(fO.rest){for(var fN=0;fN<fO.rest.length;fN++){fO.measure.caches[fN]={}}}}}function aF(fN){fN.display.externalMeasure=null;dE(fN.display.lineMeasure);for(var fO=0;fO<fN.display.view.length;fO++){ap(fN.display.view[fO])}}function ai(fN){aF(fN);fN.display.cachedCharWidth=fN.display.cachedTextHeight=fN.display.cachedPaddingH=null;if(!fN.options.lineWrapping){fN.display.maxLineChanged=true}fN.display.lineNumChars=null}function ck(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ci(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function et(fT,fQ,fS,fO){if(fQ.widgets){for(var fP=0;fP<fQ.widgets.length;++fP){if(fQ.widgets[fP].above){var fV=cH(fQ.widgets[fP]);fS.top+=fV;fS.bottom+=fV}}}if(fO=="line"){return fS}if(!fO){fO="local"}var fR=bB(fQ);if(fO=="local"){fR+=eI(fT.display)}else{fR-=fT.display.viewOffset}if(fO=="page"||fO=="window"){var fN=fT.display.lineSpace.getBoundingClientRect();fR+=fN.top+(fO=="window"?0:ci());var fU=fN.left+(fO=="window"?0:ck());fS.left+=fU;fS.right+=fU}fS.top+=fR;fS.bottom+=fR;return fS}function fJ(fO,fR,fP){if(fP=="div"){return fR}var fT=fR.left,fS=fR.top;if(fP=="page"){fT-=ck();fS-=ci()}else{if(fP=="local"||!fP){var fQ=fO.display.sizer.getBoundingClientRect();fT+=fQ.left;fS+=fQ.top}}var fN=fO.display.lineSpace.getBoundingClientRect();return{left:fT-fN.left,top:fS-fN.top}}function cx(fN,fR,fQ,fP,fO){if(!fP){fP=eP(fN.doc,fR.line)}return et(fN,fP,dT(fN,fP,fR.ch,fO),fQ)}function dx(fV,fU,fP,fT,fX){fT=fT||eP(fV.doc,fU.line);if(!fX){fX=aU(fV,fT)}function fR(f0,fZ){var fY=D(fV,fX,f0,fZ?"right":"left");if(fZ){fY.left=fY.right}else{fY.right=fY.left}return et(fV,fT,fY,fP)}function fW(f1,fY){var fZ=fS[fY],f0=fZ.level%2;if(f1==dd(fZ)&&fY&&fZ.level<fS[fY-1].level){fZ=fS[--fY];f1=fI(fZ)-(fZ.level%2?0:1);f0=true}else{if(f1==fI(fZ)&&fY<fS.length-1&&fZ.level<fS[fY+1].level){fZ=fS[++fY];f1=dd(fZ)-fZ.level%2;f0=false}}if(f0&&f1==fZ.to&&f1>fZ.from){return fR(f1-1)}return fR(f1,f0)}var fS=a(fT),fN=fU.ch;if(!fS){return fR(fN)}var fO=aB(fS,fN);var fQ=fW(fN,fO);if(eE!=null){fQ.other=fW(fN,eE)}return fQ}function dm(fN,fR){var fQ=0,fR=fj(fN.doc,fR);if(!fN.options.lineWrapping){fQ=di(fN.display)*fR.ch}var fO=eP(fN.doc,fR.line);var fP=bB(fO)+eI(fN.display);return{left:fQ,right:fQ,top:fP,bottom:fP+fO.height}}function fv(fN,fO,fP,fR){var fQ=W(fN,fO);fQ.xRel=fR;if(fP){fQ.outside=true}return fQ}function fo(fU,fR,fQ){var fT=fU.doc;fQ+=fU.display.viewOffset;if(fQ<0){return fv(fT.first,0,true,-1)}var fP=bv(fT,fQ),fV=fT.first+fT.size-1;if(fP>fV){return fv(fT.first+fT.size-1,eP(fT,fV).text.length,true,1)}if(fR<0){fR=0}var fO=eP(fT,fP);for(;;){var fW=cI(fU,fO,fP,fR,fQ);var fS=d7(fO);var fN=fS&&fS.find(0,true);if(fS&&(fW.ch>fN.from.ch||fW.ch==fN.from.ch&&fW.xRel>0)){fP=bC(fO=fN.to.line)}else{return fW}}}function cI(fX,fP,f0,fZ,fY){var fW=fY-bB(fP);var fT=false,f6=2*fX.display.wrapper.clientWidth;var f3=aU(fX,fP);function ga(gc){var gd=dx(fX,W(f0,gc),"line",fP,f3);fT=true;if(fW>gd.bottom){return gd.left-f6}else{if(fW<gd.top){return gd.left+f6}else{fT=false}}return gd.left}var f2=a(fP),f5=fP.text.length;var f7=ct(fP),fQ=cE(fP);var f4=ga(f7),fN=fT,fO=ga(fQ),fS=fT;if(fZ>fO){return fv(f0,fQ,fS,1)}for(;;){if(f2?fQ==f7||fQ==v(fP,f7,1):fQ-f7<=1){var f1=fZ<f4||fZ-f4<=fO-fZ?f7:fQ;var f9=fZ-(f1==f7?f4:fO);while(e0(fP.text.charAt(f1))){++f1}var fV=fv(f0,f1,f1==f7?fN:fS,f9<-1?-1:f9>1?1:0);return fV}var fU=Math.ceil(f5/2),gb=f7+fU;if(f2){gb=f7;for(var f8=0;f8<fU;++f8){gb=v(fP,gb,1)}}var fR=ga(gb);if(fR>fZ){fQ=gb;fO=fR;if(fS=fT){fO+=1000}f5=fU}else{f7=gb;f4=fR;fN=fT;f5-=fU}}}var aC;function aN(fP){if(fP.cachedTextHeight!=null){return fP.cachedTextHeight}if(aC==null){aC=fw("pre");for(var fO=0;fO<49;++fO){aC.appendChild(document.createTextNode("x"));aC.appendChild(fw("br"))}aC.appendChild(document.createTextNode("x"))}bG(fP.measure,aC);var fN=aC.offsetHeight/50;if(fN>3){fP.cachedTextHeight=fN}dE(fP.measure);return fN||1}function di(fR){if(fR.cachedCharWidth!=null){return fR.cachedCharWidth}var fN=fw("span","xxxxxxxxxx");var fQ=fw("pre",[fN]);bG(fR.measure,fQ);var fP=fN.getBoundingClientRect(),fO=(fP.right-fP.left)/10;if(fO>2){fR.cachedCharWidth=fO}return fO||10}var dL=0;function cw(fN){fN.curOp={viewChanged:false,startHeight:fN.doc.height,forceUpdate:false,updateInput:null,typing:false,changeObjs:null,cursorActivityHandlers:null,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++dL};if(!ch++){be=[]}}function aj(fY){var fT=fY.curOp,fX=fY.doc,fU=fY.display;fY.curOp=null;if(fT.updateMaxLine){h(fY)}if(fT.viewChanged||fT.forceUpdate||fT.scrollTop!=null||fT.scrollToPos&&(fT.scrollToPos.from.line<fU.viewFrom||fT.scrollToPos.to.line>=fU.viewTo)||fU.maxLineChanged&&fY.options.lineWrapping){var fR=dp(fY,{top:fT.scrollTop,ensure:fT.scrollToPos},fT.forceUpdate);if(fY.display.scroller.offsetHeight){fY.doc.scrollTop=fY.display.scroller.scrollTop}}if(!fR&&fT.selectionChanged){br(fY)}if(!fR&&fT.startHeight!=fY.doc.height){eB(fY)}if(fT.scrollTop!=null&&fU.scroller.scrollTop!=fT.scrollTop){var fV=Math.max(0,Math.min(fU.scroller.scrollHeight-fU.scroller.clientHeight,fT.scrollTop));fU.scroller.scrollTop=fU.scrollbarV.scrollTop=fX.scrollTop=fV}if(fT.scrollLeft!=null&&fU.scroller.scrollLeft!=fT.scrollLeft){var fO=Math.max(0,Math.min(fU.scroller.scrollWidth-fU.scroller.clientWidth,fT.scrollLeft));fU.scroller.scrollLeft=fU.scrollbarH.scrollLeft=fX.scrollLeft=fO;ei(fY)}if(fT.scrollToPos){var fW=E(fY,fj(fY.doc,fT.scrollToPos.from),fj(fY.doc,fT.scrollToPos.to),fT.scrollToPos.margin);if(fT.scrollToPos.isCursor&&fY.state.focused){dJ(fY,fW)}}if(fT.selectionChanged){p(fY)}if(fY.state.focused&&fT.updateInput){eZ(fY,fT.typing)}var fS=fT.maybeHiddenMarkers,fN=fT.maybeUnhiddenMarkers;if(fS){for(var fQ=0;fQ<fS.length;++fQ){if(!fS[fQ].lines.length){az(fS[fQ],"hide")}}}if(fN){for(var fQ=0;fQ<fN.length;++fQ){if(fN[fQ].lines.length){az(fN[fQ],"unhide")}}}var fP;if(!--ch){fP=be;be=null}if(fT.changeObjs){az(fY,"changes",fY,fT.changeObjs)}if(fP){for(var fQ=0;fQ<fP.length;++fQ){fP[fQ]()}}if(fT.cursorActivityHandlers){for(var fQ=0;fQ<fT.cursorActivityHandlers.length;fQ++){fT.cursorActivityHandlers[fQ](fY)}}}function cz(fN,fO){if(fN.curOp){return fO()}cw(fN);try{return fO()}finally{aj(fN)}}function cL(fN,fO){return function(){if(fN.curOp){return fO.apply(fN,arguments)}cw(fN);try{return fO.apply(fN,arguments)}finally{aj(fN)}}}function cR(fN){return function(){if(this.curOp){return fN.apply(this,arguments)}cw(this);try{return fN.apply(this,arguments)}finally{aj(this)}}}function cs(fN){return function(){var fO=this.cm;if(!fO||fO.curOp){return fN.apply(this,arguments)}cw(fO);try{return fN.apply(this,arguments)}finally{aj(fO)}}}function bl(fP,fN,fO){this.line=fN;this.rest=i(fN);this.size=this.rest?bC(fh(this.rest))-fO+1:1;this.node=this.text=null;this.hidden=e7(fP,fN)}function ey(fN,fT,fS){var fR=[],fP;for(var fQ=fT;fQ<fS;fQ=fP){var fO=new bl(fN.doc,eP(fN.doc,fQ),fQ);fP=fQ+fO.size;fR.push(fO)}return fR}function af(fU,fS,fT,fV){if(fS==null){fS=fU.doc.first}if(fT==null){fT=fU.doc.first+fU.doc.size}if(!fV){fV=0}var fP=fU.display;if(fV&&fT<fP.viewTo&&(fP.updateLineNumbers==null||fP.updateLineNumbers>fS)){fP.updateLineNumbers=fS}fU.curOp.viewChanged=true;if(fS>=fP.viewTo){if(aX&&aM(fU.doc,fS)<fP.viewTo){d9(fU)}}else{if(fT<=fP.viewFrom){if(aX&&dG(fU.doc,fT+fV)>fP.viewFrom){d9(fU)}else{fP.viewFrom+=fV;fP.viewTo+=fV}}else{if(fS<=fP.viewFrom&&fT>=fP.viewTo){d9(fU)}else{if(fS<=fP.viewFrom){var fR=cX(fU,fT,fT+fV,1);if(fR){fP.view=fP.view.slice(fR.index);fP.viewFrom=fR.lineN;fP.viewTo+=fV}else{d9(fU)}}else{if(fT>=fP.viewTo){var fR=cX(fU,fS,fS,-1);if(fR){fP.view=fP.view.slice(0,fR.index);fP.viewTo=fR.lineN}else{d9(fU)}}else{var fQ=cX(fU,fS,fS,-1);var fO=cX(fU,fT,fT+fV,1);if(fQ&&fO){fP.view=fP.view.slice(0,fQ.index).concat(ey(fU,fQ.lineN,fO.lineN)).concat(fP.view.slice(fO.index));fP.viewTo+=fV}else{d9(fU)}}}}}}var fN=fP.externalMeasured;if(fN){if(fT<fN.lineN){fN.lineN+=fV}else{if(fS<fN.lineN+fN.size){fP.externalMeasured=null}}}}function R(fO,fP,fS){fO.curOp.viewChanged=true;var fT=fO.display,fR=fO.display.externalMeasured;if(fR&&fP>=fR.lineN&&fP<fR.lineN+fR.size){fT.externalMeasured=null}if(fP<fT.viewFrom||fP>=fT.viewTo){return}var fQ=fT.view[c7(fO,fP)];if(fQ.node==null){return}var fN=fQ.changes||(fQ.changes=[]);if(c1(fN,fS)==-1){fN.push(fS)}}function d9(fN){fN.display.viewFrom=fN.display.viewTo=fN.doc.first;fN.display.view=[];fN.display.viewOffset=0}function c7(fN,fQ){if(fQ>=fN.display.viewTo){return null}fQ-=fN.display.viewFrom;if(fQ<0){return null}var fO=fN.display.view;for(var fP=0;fP<fO.length;fP++){fQ-=fO[fP].size;if(fQ<0){return fP}}}function cX(fV,fP,fR,fO){var fS=c7(fV,fP),fU,fT=fV.display.view;if(!aX){return{index:fS,lineN:fR}}for(var fQ=0,fN=fV.display.viewFrom;fQ<fS;fQ++){fN+=fT[fQ].size}if(fN!=fP){if(fO>0){if(fS==fT.length-1){return null}fU=(fN+fT[fS].size)-fP;fS++}else{fU=fN-fP}fP+=fU;fR+=fU}while(aM(fV.doc,fR)!=fR){if(fS==(fO<0?0:fT.length-1)){return null}fR+=fO*fT[fS-(fO<0?1:0)].size;fS+=fO}return{index:fS,lineN:fR}}function cD(fN,fR,fQ){var fP=fN.display,fO=fP.view;if(fO.length==0||fR>=fP.viewTo||fQ<=fP.viewFrom){fP.view=ey(fN,fR,fQ);fP.viewFrom=fR}else{if(fP.viewFrom>fR){fP.view=ey(fN,fR,fP.viewFrom).concat(fP.view)}else{if(fP.viewFrom<fR){fP.view=fP.view.slice(c7(fN,fR))}}fP.viewFrom=fR;if(fP.viewTo<fQ){fP.view=fP.view.concat(ey(fN,fP.viewTo,fQ))}else{if(fP.viewTo>fQ){fP.view=fP.view.slice(0,c7(fN,fQ))}}}fP.viewTo=fQ}function cU(fN){var fO=fN.display.view,fR=0;for(var fQ=0;fQ<fO.length;fQ++){var fP=fO[fQ];if(!fP.hidden&&(!fP.node||fP.changes)){++fR}}return fR}function bc(fN){if(fN.display.pollingFast){return}fN.display.poll.set(fN.options.pollInterval,function(){b7(fN);if(fN.state.focused){bc(fN)}})}function C(fN){var fO=false;fN.display.pollingFast=true;function fP(){var fQ=b7(fN);if(!fQ&&!fO){fO=true;fN.display.poll.set(60,fP)}else{fN.display.pollingFast=false;bc(fN)}}fN.display.poll.set(20,fP)}function b7(fR){var fS=fR.display.input,fV=fR.display.prevInput,f6=fR.doc;if(!fR.state.focused||(bi(fS)&&!fV)||ah(fR)||fR.options.disableInput){return false}if(fR.state.pasteIncoming&&fR.state.fakedLastChar){fS.value=fS.value.substring(0,fS.value.length-1);fR.state.fakedLastChar=false}var fU=fS.value;if(fU==fV&&!fR.somethingSelected()){return false}if(dn&&!bY&&fR.display.inputHasSelection===fU){eZ(fR);return false}var f2=!fR.curOp;if(f2){cw(fR)}fR.display.shift=false;if(fU.charCodeAt(0)==8203&&f6.sel==fR.display.selForContextMenu&&!fV){fV="\u200b"}var f1=0,fY=Math.min(fV.length,fU.length);while(f1<fY&&fV.charCodeAt(f1)==fU.charCodeAt(f1)){++f1}var fO=fU.slice(f1),fW=aQ(fO);var f5=fR.state.pasteIncoming&&fW.length>1&&f6.sel.ranges.length==fW.length;for(var f3=f6.sel.ranges.length-1;f3>=0;f3--){var fX=f6.sel.ranges[f3];var fZ=fX.from(),fN=fX.to();if(f1<fV.length){fZ=W(fZ.line,fZ.ch-(fV.length-f1))}else{if(fR.state.overwrite&&fX.empty()&&!fR.state.pasteIncoming){fN=W(fN.line,Math.min(eP(f6,fN.line).text.length,fN.ch+fh(fW).length))}}var fQ=fR.curOp.updateInput;var f4={from:fZ,to:fN,text:f5?[fW[f3]]:fW,origin:fR.state.pasteIncoming?"paste":fR.state.cutIncoming?"cut":"+input"};a5(fR.doc,f4);ac(fR,"inputRead",fR,f4);if(fO&&!fR.state.pasteIncoming&&fR.options.electricChars&&fR.options.smartIndent&&fX.head.ch<100&&(!f3||f6.sel.ranges[f3-1].head.line!=fX.head.line)){var fT=fR.getModeAt(fX.head);if(fT.electricChars){for(var f0=0;f0<fT.electricChars.length;f0++){if(fO.indexOf(fT.electricChars.charAt(f0))>-1){ab(fR,fX.head.line,"smart");break}}}else{if(fT.electricInput){var fP=cG(f4);if(fT.electricInput.test(eP(f6,fP.line).text.slice(0,fP.ch))){ab(fR,fX.head.line,"smart")}}}}}fg(fR);fR.curOp.updateInput=fQ;fR.curOp.typing=true;if(fU.length>1000||fU.indexOf("\n")>-1){fS.value=fR.display.prevInput=""}else{fR.display.prevInput=fU}if(f2){aj(fR)}fR.state.pasteIncoming=fR.state.cutIncoming=false;return true}function eZ(fN,fR){var fO,fQ,fT=fN.doc;if(fN.somethingSelected()){fN.display.prevInput="";var fP=fT.sel.primary();fO=cT&&(fP.to().line-fP.from().line>100||(fQ=fN.getSelection()).length>1000);var fS=fO?"-":fQ||fN.getSelection();fN.display.input.value=fS;if(fN.state.focused){dq(fN.display.input)}if(dn&&!bY){fN.display.inputHasSelection=fS}}else{if(!fR){fN.display.prevInput=fN.display.input.value="";if(dn&&!bY){fN.display.inputHasSelection=null}}}fN.display.inaccurateSelection=fO}function ed(fN){if(fN.options.readOnly!="nocursor"&&(!dS||ds()!=fN.display.input)){fN.display.input.focus()}}function s(fN){if(!fN.state.focused){ed(fN);cq(fN)}}function ah(fN){return fN.options.readOnly||fN.doc.cantEdit}function fp(fN){var fP=fN.display;bM(fP.scroller,"mousedown",cL(fN,d5));if(eo){bM(fP.scroller,"dblclick",cL(fN,function(fT){if(aI(fN,fT)){return}var fU=cd(fN,fT);if(!fU||m(fN,fT)||a0(fN.display,fT)){return}cu(fT);var fS=ar(fN.doc,fU);ft(fN.doc,fS.anchor,fS.head)}))}else{bM(fP.scroller,"dblclick",function(fS){aI(fN,fS)||cu(fS)})}bM(fP.lineSpace,"selectstart",function(fS){if(!a0(fP,fS)){cu(fS)}});if(!fE){bM(fP.scroller,"contextmenu",function(fS){av(fN,fS)})}bM(fP.scroller,"scroll",function(){if(fP.scroller.clientHeight){N(fN,fP.scroller.scrollTop);bt(fN,fP.scroller.scrollLeft,true);az(fN,"scroll",fN)}});bM(fP.scrollbarV,"scroll",function(){if(fP.scroller.clientHeight){N(fN,fP.scrollbarV.scrollTop)}});bM(fP.scrollbarH,"scroll",function(){if(fP.scroller.clientHeight){bt(fN,fP.scrollbarH.scrollLeft)}});bM(fP.scroller,"mousewheel",function(fS){c(fN,fS)});bM(fP.scroller,"DOMMouseScroll",function(fS){c(fN,fS)});function fR(){if(fN.state.focused){setTimeout(cl(ed,fN),0)}}bM(fP.scrollbarH,"mousedown",fR);bM(fP.scrollbarV,"mousedown",fR);bM(fP.wrapper,"scroll",function(){fP.wrapper.scrollTop=fP.wrapper.scrollLeft=0});bM(fP.input,"keyup",cL(fN,a7));bM(fP.input,"input",function(){if(dn&&!bY&&fN.display.inputHasSelection){fN.display.inputHasSelection=null}C(fN)});bM(fP.input,"keydown",cL(fN,q));bM(fP.input,"keypress",cL(fN,cn));bM(fP.input,"focus",cl(cq,fN));bM(fP.input,"blur",cl(aL,fN));function fO(fS){if(!aI(fN,fS)){d3(fS)}}if(fN.options.dragDrop){bM(fP.scroller,"dragstart",function(fS){Q(fN,fS)});bM(fP.scroller,"dragenter",fO);bM(fP.scroller,"dragover",fO);bM(fP.scroller,"drop",cL(fN,a9))}bM(fP.scroller,"paste",function(fS){if(a0(fP,fS)){return}fN.state.pasteIncoming=true;ed(fN);C(fN)});bM(fP.input,"paste",function(){if(cJ&&!fN.state.fakedLastChar&&!(new Date-fN.state.lastMiddleDown<200)){var fT=fP.input.selectionStart,fS=fP.input.selectionEnd;fP.input.value+="$";fP.input.selectionStart=fT;fP.input.selectionEnd=fS;fN.state.fakedLastChar=true}fN.state.pasteIncoming=true;C(fN)});function fQ(fW){if(fN.somethingSelected()){if(fP.inaccurateSelection){fP.prevInput="";fP.inaccurateSelection=false;fP.input.value=fN.getSelection();dq(fP.input)}}else{var fX="",fT=[];for(var fU=0;fU<fN.doc.sel.ranges.length;fU++){var fS=fN.doc.sel.ranges[fU].head.line;var fV={anchor:W(fS,0),head:W(fS+1,0)};fT.push(fV);fX+=fN.getRange(fV.anchor,fV.head)}if(fW.type=="cut"){fN.setSelections(fT,null,Y)}else{fP.prevInput="";fP.input.value=fX;dq(fP.input)}}if(fW.type=="cut"){fN.state.cutIncoming=true}}bM(fP.input,"cut",fQ);bM(fP.input,"copy",fQ);if(a1){bM(fP.sizer,"mouseup",function(){if(ds()==fP.input){fP.input.blur()}ed(fN)})}}function aK(fN){var fO=fN.display;fO.cachedCharWidth=fO.cachedTextHeight=fO.cachedPaddingH=null;fN.setSize()}function a0(fO,fN){for(var fP=L(fN);fP!=fO.wrapper;fP=fP.parentNode){if(!fP||fP.ignoreEvents||fP.parentNode==fO.sizer&&fP!=fO.mover){return true}}}function cd(fX,fR,fO,fP){var fT=fX.display;if(!fO){var fS=L(fR);if(fS==fT.scrollbarH||fS==fT.scrollbarV||fS==fT.scrollbarFiller||fS==fT.gutterFiller){return null}}var fW,fU,fN=fT.lineSpace.getBoundingClientRect();try{fW=fR.clientX-fN.left;fU=fR.clientY-fN.top}catch(fR){return null}var fV=fo(fX,fW,fU),fY;if(fP&&fV.xRel==1&&(fY=eP(fX.doc,fV.line).text).length==fV.ch){var fQ=bI(fY,fY.length,fX.options.tabSize)-fY.length;fV=W(fV.line,Math.max(0,Math.round((fW-eG(fX.display).left)/di(fX.display))-fQ))}return fV}function d5(fP){if(aI(this,fP)){return}var fN=this,fO=fN.display;fO.shift=fP.shiftKey;if(a0(fO,fP)){if(!cJ){fO.scroller.draggable=false;setTimeout(function(){fO.scroller.draggable=true},100)}return}if(m(fN,fP)){return}var fQ=cd(fN,fP);window.focus();switch(fn(fP)){case 1:if(fQ){au(fN,fP,fQ)}else{if(L(fP)==fO.scroller){cu(fP)}}break;case 2:if(cJ){fN.state.lastMiddleDown=+new Date}if(fQ){ft(fN.doc,fQ)}setTimeout(cl(ed,fN),20);cu(fP);break;case 3:if(fE){av(fN,fP)}break}}var c4,cW;function au(fN,fS,fT){setTimeout(cl(s,fN),0);var fO=+new Date,fP;if(cW&&cW.time>fO-400&&b5(cW.pos,fT)==0){fP="triple"}else{if(c4&&c4.time>fO-400&&b5(c4.pos,fT)==0){fP="double";cW={time:fO,pos:fT}}else{fP="single";c4={time:fO,pos:fT}}}var fQ=fN.doc.sel,fR=bU?fS.metaKey:fS.ctrlKey;if(fN.options.dragDrop&&ep&&!fR&&!ah(fN)&&fP=="single"&&fQ.contains(fT)>-1&&fQ.somethingSelected()){aT(fN,fS,fT)}else{n(fN,fS,fT,fP,fR)}}function aT(fO,fQ,fR){var fP=fO.display;var fN=cL(fO,function(fS){if(cJ){fP.scroller.draggable=false}fO.state.draggingText=false;dP(document,"mouseup",fN);dP(fP.scroller,"drop",fN);if(Math.abs(fQ.clientX-fS.clientX)+Math.abs(fQ.clientY-fS.clientY)<10){cu(fS);ft(fO.doc,fR);ed(fO);if(eo&&!bY){setTimeout(function(){document.body.focus();ed(fO)},20)}}});if(cJ){fP.scroller.draggable=true}fO.state.draggingText=fN;if(fP.scroller.dragDrop){fP.scroller.dragDrop()}bM(document,"mouseup",fN);bM(fP.scroller,"drop",fN)}function n(fQ,f4,fP,fN,fS){var f1=fQ.display,f6=fQ.doc;cu(f4);var fO,f5,fR=f6.sel;if(fS&&!f4.shiftKey){f5=f6.sel.contains(fP);if(f5>-1){fO=f6.sel.ranges[f5]}else{fO=new dB(fP,fP)}}else{fO=f6.sel.primary()}if(f4.altKey){fN="rect";if(!fS){fO=new dB(fP,fP)}fP=cd(fQ,f4,true,true);f5=-1}else{if(fN=="double"){var f2=ar(f6,fP);if(fQ.display.shift||f6.extend){fO=e6(f6,fO,f2.anchor,f2.head)}else{fO=f2}}else{if(fN=="triple"){var fV=new dB(W(fP.line,0),fj(f6,W(fP.line+1,0)));if(fQ.display.shift||f6.extend){fO=e6(f6,fO,fV.anchor,fV.head)}else{fO=fV}}else{fO=e6(f6,fO,fP)}}}if(!fS){f5=0;bJ(f6,new fx([fO],0),M);fR=f6.sel}else{if(f5>-1){f(f6,f5,fO,M)}else{f5=f6.sel.ranges.length;bJ(f6,cm(f6.sel.ranges.concat([fO]),f5),{scroll:false,origin:"*mouse"})}}var f0=fP;function fZ(gh){if(b5(f0,gh)==0){return}f0=gh;if(fN=="rect"){var f8=[],ge=fQ.options.tabSize;var f7=bI(eP(f6,fP.line).text,fP.ch,ge);var gk=bI(eP(f6,gh.line).text,gh.ch,ge);var f9=Math.min(f7,gk),gi=Math.max(f7,gk);for(var gl=Math.min(fP.line,gh.line),gb=Math.min(fQ.lastLine(),Math.max(fP.line,gh.line));gl<=gb;gl++){var gj=eP(f6,gl).text,ga=d2(gj,f9,ge);if(f9==gi){f8.push(new dB(W(gl,ga),W(gl,ga)))}else{if(gj.length>ga){f8.push(new dB(W(gl,ga),W(gl,d2(gj,gi,ge))))}}}if(!f8.length){f8.push(new dB(fP,fP))}bJ(f6,cm(fR.ranges.slice(0,f5).concat(f8),f5),M)}else{var gf=fO;var gc=gf.anchor,gg=gh;if(fN!="single"){if(fN=="double"){var gd=ar(f6,gh)}else{var gd=new dB(W(gh.line,0),fj(f6,W(gh.line+1,0)))}if(b5(gd.anchor,gc)>0){gg=gd.head;gc=am(gf.from(),gd.anchor)}else{gg=gd.anchor;gc=bn(gf.to(),gd.head)}}var f8=fR.ranges.slice(0);f8[f5]=new dB(fj(f6,gc),gg);bJ(f6,cm(f8,f5),M)}}var fX=f1.wrapper.getBoundingClientRect();var fT=0;function f3(f9){var f7=++fT;var gb=cd(fQ,f9,true,fN=="rect");if(!gb){return}if(b5(gb,f0)!=0){s(fQ);fZ(gb);var ga=bT(f1,f6);if(gb.line>=ga.to||gb.line<ga.from){setTimeout(cL(fQ,function(){if(fT==f7){f3(f9)}}),150)}}else{var f8=f9.clientY<fX.top?-20:f9.clientY>fX.bottom?20:0;if(f8){setTimeout(cL(fQ,function(){if(fT!=f7){return}f1.scroller.scrollTop+=f8;f3(f9)}),50)}}}function fW(f7){fT=Infinity;cu(f7);ed(fQ);dP(document,"mousemove",fY);dP(document,"mouseup",fU);f6.history.lastSelOrigin=null}var fY=cL(fQ,function(f7){if((dn&&!bX)?!f7.buttons:!fn(f7)){fW(f7)}else{f3(f7)}});var fU=cL(fQ,fW);bM(document,"mousemove",fY);bM(document,"mouseup",fU)}function fL(fY,fU,fW,fX,fQ){try{var fO=fU.clientX,fN=fU.clientY}catch(fU){return false}if(fO>=Math.floor(fY.display.gutters.getBoundingClientRect().right)){return false}if(fX){cu(fU)}var fV=fY.display;var fT=fV.lineDiv.getBoundingClientRect();if(fN>fT.bottom||!eS(fY,fW)){return bA(fU)}fN-=fT.top-fV.viewOffset;for(var fR=0;fR<fY.options.gutters.length;++fR){var fS=fV.gutters.childNodes[fR];if(fS&&fS.getBoundingClientRect().right>=fO){var fZ=bv(fY.doc,fN);var fP=fY.options.gutters[fR];fQ(fY,fW,fY,fZ,fP,fU);return bA(fU)}}}function m(fN,fO){return fL(fN,fO,"gutterClick",true,ac)}var ae=0;function a9(fT){var fV=this;if(aI(fV,fT)||a0(fV.display,fT)){return}cu(fT);if(dn){ae=+new Date}var fU=cd(fV,fT,true),fN=fT.dataTransfer.files;if(!fU||ah(fV)){return}if(fN&&fN.length&&window.FileReader&&window.File){var fP=fN.length,fW=Array(fP),fO=0;var fR=function(fZ,fY){var fX=new FileReader;fX.onload=cL(fV,function(){fW[fY]=fX.result;if(++fO==fP){fU=fj(fV.doc,fU);var f0={from:fU,to:fU,text:aQ(fW.join("\n")),origin:"paste"};a5(fV.doc,f0);eH(fV.doc,eu(fU,cG(f0)))}});fX.readAsText(fZ)};for(var fS=0;fS<fP;++fS){fR(fN[fS],fS)}}else{if(fV.state.draggingText&&fV.doc.sel.contains(fU)>-1){fV.state.draggingText(fT);setTimeout(cl(ed,fV),20);return}try{var fW=fT.dataTransfer.getData("Text");if(fW){var fQ=fV.state.draggingText&&fV.listSelections();d1(fV.doc,eu(fU,fU));if(fQ){for(var fS=0;fS<fQ.length;++fS){aR(fV.doc,"",fQ[fS].anchor,fQ[fS].head,"drag")}}fV.replaceSelection(fW,"around","paste");ed(fV)}}catch(fT){}}}function Q(fN,fP){if(dn&&(!fN.state.draggingText||+new Date-ae<100)){d3(fP);return}if(aI(fN,fP)||a0(fN.display,fP)){return}fP.dataTransfer.setData("Text",fN.getSelection());if(fP.dataTransfer.setDragImage&&!ay){var fO=fw("img",null,null,"position: fixed; left: 0; top: 0;");fO.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(dF){fO.width=fO.height=1;fN.display.wrapper.appendChild(fO);fO._top=fO.offsetTop}fP.dataTransfer.setDragImage(fO,0,0);if(dF){fO.parentNode.removeChild(fO)}}}function N(fN,fO){if(Math.abs(fN.doc.scrollTop-fO)<2){return}fN.doc.scrollTop=fO;if(!ce){dp(fN,{top:fO})}if(fN.display.scroller.scrollTop!=fO){fN.display.scroller.scrollTop=fO}if(fN.display.scrollbarV.scrollTop!=fO){fN.display.scrollbarV.scrollTop=fO}if(ce){dp(fN)}dR(fN,100)}function bt(fN,fP,fO){if(fO?fP==fN.doc.scrollLeft:Math.abs(fN.doc.scrollLeft-fP)<2){return}fP=Math.min(fP,fN.display.scroller.scrollWidth-fN.display.scroller.clientWidth);fN.doc.scrollLeft=fP;ei(fN);if(fN.display.scroller.scrollLeft!=fP){fN.display.scroller.scrollLeft=fP}if(fN.display.scrollbarH.scrollLeft!=fP){fN.display.scrollbarH.scrollLeft=fP}}var eW=0,b6=null;if(dn){b6=-0.53}else{if(ce){b6=15}else{if(cV){b6=-0.7}else{if(ay){b6=-1/3}}}}function c(fV,fP){var fY=fP.wheelDeltaX,fX=fP.wheelDeltaY;if(fY==null&&fP.detail&&fP.axis==fP.HORIZONTAL_AXIS){fY=fP.detail}if(fX==null&&fP.detail&&fP.axis==fP.VERTICAL_AXIS){fX=fP.detail}else{if(fX==null){fX=fP.wheelDelta}}var fR=fV.display,fU=fR.scroller;if(!(fY&&fU.scrollWidth>fU.clientWidth||fX&&fU.scrollHeight>fU.clientHeight)){return}if(fX&&bU&&cJ){outer:for(var fW=fP.target,fT=fR.view;fW!=fU;fW=fW.parentNode){for(var fO=0;fO<fT.length;fO++){if(fT[fO].node==fW){fV.display.currentWheelTarget=fW;break outer}}}}if(fY&&!ce&&!dF&&b6!=null){if(fX){N(fV,Math.max(0,Math.min(fU.scrollTop+fX*b6,fU.scrollHeight-fU.clientHeight)))}bt(fV,Math.max(0,Math.min(fU.scrollLeft+fY*b6,fU.scrollWidth-fU.clientWidth)));cu(fP);fR.wheelStartX=null;return}if(fX&&b6!=null){var fN=fX*b6;var fS=fV.doc.scrollTop,fQ=fS+fR.wrapper.clientHeight;if(fN<0){fS=Math.max(0,fS+fN-50)}else{fQ=Math.min(fV.doc.height,fQ+fN+50)}dp(fV,{top:fS,bottom:fQ})}if(eW<20){if(fR.wheelStartX==null){fR.wheelStartX=fU.scrollLeft;fR.wheelStartY=fU.scrollTop;fR.wheelDX=fY;fR.wheelDY=fX;setTimeout(function(){if(fR.wheelStartX==null){return}var fZ=fU.scrollLeft-fR.wheelStartX;var f1=fU.scrollTop-fR.wheelStartY;var f0=(f1&&fR.wheelDY&&f1/fR.wheelDY)||(fZ&&fR.wheelDX&&fZ/fR.wheelDX);fR.wheelStartX=fR.wheelStartY=null;if(!f0){return}b6=(b6*eW+f0)/(eW+1);++eW},200)}else{fR.wheelDX+=fY;fR.wheelDY+=fX}}}function fq(fO,fR,fN){if(typeof fR=="string"){fR=eh[fR];if(!fR){return false}}if(fO.display.pollingFast&&b7(fO)){fO.display.pollingFast=false}var fQ=fO.display.shift,fP=false;try{if(ah(fO)){fO.state.suppressEdits=true}if(fN){fO.display.shift=false}fP=fR(fO)!=bZ}finally{fO.display.shift=fQ;fO.state.suppressEdits=false}return fP}function c9(fN){var fO=fN.state.keyMaps.slice(0);if(fN.options.extraKeys){fO.push(fN.options.extraKeys)}fO.push(fN.options.keyMap);return fO}var an;function eT(fN,fT){var fO=fu(fN.options.keyMap),fR=fO.auto;clearTimeout(an);if(fR&&!eg(fT)){an=setTimeout(function(){if(fu(fN.options.keyMap)==fO){fN.options.keyMap=(fR.call?fR.call(null,fN):fR);fK(fN)}},50)}var fQ=e2(fT,true),fS=false;if(!fQ){return false}var fP=c9(fN);if(fT.shiftKey){fS=j("Shift-"+fQ,fP,function(fU){return fq(fN,fU,true)})||j(fQ,fP,function(fU){if(typeof fU=="string"?/^go[A-Z]/.test(fU):fU.motion){return fq(fN,fU)}})}else{fS=j(fQ,fP,function(fU){return fq(fN,fU)})}if(fS){cu(fT);p(fN);ac(fN,"keyHandled",fN,fQ,fT)}return fS}function dV(fN,fQ,fO){var fP=j("'"+fO+"'",c9(fN),function(fR){return fq(fN,fR,true)});if(fP){cu(fQ);p(fN);ac(fN,"keyHandled",fN,"'"+fO+"'",fQ)}return fP}var c3=null;function q(fQ){var fN=this;s(fN);if(aI(fN,fQ)){return}if(eo&&fQ.keyCode==27){fQ.returnValue=false}var fO=fQ.keyCode;fN.display.shift=fO==16||fQ.shiftKey;var fP=eT(fN,fQ);if(dF){c3=fP?fO:null;if(!fP&&fO==88&&!cT&&(bU?fQ.metaKey:fQ.ctrlKey)){fN.replaceSelection("",null,"cut")}}if(fO==18&&!/\bCodeMirror-crosshair\b/.test(fN.display.lineDiv.className)){aq(fN)}}function aq(fO){var fP=fO.display.lineDiv;fb(fP,"CodeMirror-crosshair");function fN(fQ){if(fQ.keyCode==18||!fQ.altKey){g(fP,"CodeMirror-crosshair");dP(document,"keyup",fN);dP(document,"mouseover",fN)}}bM(document,"keyup",fN);bM(document,"mouseover",fN)}function a7(fN){if(aI(this,fN)){return}if(fN.keyCode==16){this.doc.sel.shift=false}}function cn(fR){var fN=this;if(aI(fN,fR)){return}var fQ=fR.keyCode,fO=fR.charCode;if(dF&&fQ==c3){c3=null;cu(fR);return}if(((dF&&(!fR.which||fR.which<10))||a1)&&eT(fN,fR)){return}var fP=String.fromCharCode(fO==null?fQ:fO);if(dV(fN,fR,fP)){return}if(dn&&!bY){fN.display.inputHasSelection=null}C(fN)}function cq(fN){if(fN.options.readOnly=="nocursor"){return}if(!fN.state.focused){az(fN,"focus",fN);fN.state.focused=true;fb(fN.display.wrapper,"CodeMirror-focused");if(!fN.curOp&&fN.display.selForContextMenu!=fN.doc.sel){eZ(fN);if(cJ){setTimeout(cl(eZ,fN,true),0)}}}bc(fN);p(fN)}function aL(fN){if(fN.state.focused){az(fN,"blur",fN);fN.state.focused=false;g(fN.display.wrapper,"CodeMirror-focused")}clearInterval(fN.display.blinker);setTimeout(function(){if(!fN.state.focused){fN.display.shift=false}},150)}function av(fW,fR){if(aI(fW,fR,"contextmenu")){return}var fT=fW.display;if(a0(fT,fR)||c0(fW,fR)){return}var fV=cd(fW,fR),fN=fT.scroller.scrollTop;if(!fV||dF){return}var fP=fW.options.resetSelectionOnContextMenu;if(fP&&fW.doc.sel.contains(fV)==-1){cL(fW,bJ)(fW.doc,eu(fV),Y)}var fS=fT.input.style.cssText;fT.inputDiv.style.position="absolute";fT.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(fR.clientY-5)+"px; left: "+(fR.clientX-5)+"px; z-index: 1000; background: "+(dn?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";ed(fW);eZ(fW);if(!fW.somethingSelected()){fT.input.value=fT.prevInput=" "}fT.selForContextMenu=fW.doc.sel;clearTimeout(fT.detectingSelectAll);function fQ(){if(fT.input.selectionStart!=null){var fX=fW.somethingSelected();var fY=fT.input.value="\u200b"+(fX?fT.input.value:"");fT.prevInput=fX?"":"\u200b";fT.input.selectionStart=1;fT.input.selectionEnd=fY.length}}function fU(){fT.inputDiv.style.position="relative";fT.input.style.cssText=fS;if(bY){fT.scrollbarV.scrollTop=fT.scroller.scrollTop=fN}bc(fW);if(fT.input.selectionStart!=null){if(!dn||bY){fQ()}var fX=0,fY=function(){if(fT.selForContextMenu==fW.doc.sel&&fT.input.selectionStart==0){cL(fW,eh.selectAll)(fW)}else{if(fX++<10){fT.detectingSelectAll=setTimeout(fY,500)}else{eZ(fW)}}};fT.detectingSelectAll=setTimeout(fY,200)}}if(dn&&!bY){fQ()}if(fE){d3(fR);var fO=function(){dP(window,"mouseup",fO);setTimeout(fU,20)};bM(window,"mouseup",fO)}else{setTimeout(fU,50)}}function c0(fN,fO){if(!eS(fN,"gutterContextMenu")){return false}return fL(fN,fO,"gutterContextMenu",false,az)}var cG=I.changeEnd=function(fN){if(!fN.text){return fN.to}return W(fN.from.line+fN.text.length-1,fh(fN.text).length+(fN.text.length==1?fN.from.ch:0))};function bO(fQ,fP){if(b5(fQ,fP.from)<0){return fQ}if(b5(fQ,fP.to)<=0){return cG(fP)}var fN=fQ.line+fP.text.length-(fP.to.line-fP.from.line)-1,fO=fQ.ch;if(fQ.line==fP.to.line){fO+=cG(fP).ch-fP.to.ch}return W(fN,fO)}function eU(fQ,fR){var fO=[];for(var fP=0;fP<fQ.sel.ranges.length;fP++){var fN=fQ.sel.ranges[fP];fO.push(new dB(bO(fN.anchor,fR),bO(fN.head,fR)))}return cm(fO,fQ.sel.primIndex)}function bk(fP,fO,fN){if(fP.line==fO.line){return W(fN.line,fP.ch-fO.ch+fN.ch)}else{return W(fN.line+(fP.line-fO.line),fP.ch)}}function ad(fX,fU,fO){var fP=[];var fN=W(fX.first,0),fY=fN;for(var fR=0;fR<fU.length;fR++){var fT=fU[fR];var fW=bk(fT.from,fN,fY);var fV=bk(cG(fT),fN,fY);fN=fT.to;fY=fV;if(fO=="around"){var fS=fX.sel.ranges[fR],fQ=b5(fS.head,fS.anchor)<0;fP[fR]=new dB(fQ?fV:fW,fQ?fW:fV)}else{fP[fR]=new dB(fW,fW)}}return new fx(fP,fX.sel.primIndex)}function dv(fO,fQ,fP){var fN={canceled:false,from:fQ.from,to:fQ.to,text:fQ.text,origin:fQ.origin,cancel:function(){this.canceled=true}};if(fP){fN.update=function(fU,fT,fS,fR){if(fU){this.from=fj(fO,fU)}if(fT){this.to=fj(fO,fT)}if(fS){this.text=fS}if(fR!==undefined){this.origin=fR}}}az(fO,"beforeChange",fO,fN);if(fO.cm){az(fO.cm,"beforeChange",fO.cm,fN)}if(fN.canceled){return null}return{from:fN.from,to:fN.to,text:fN.text,origin:fN.origin}}function a5(fQ,fR,fP){if(fQ.cm){if(!fQ.cm.curOp){return cL(fQ.cm,a5)(fQ,fR,fP)}if(fQ.cm.state.suppressEdits){return}}if(eS(fQ,"beforeChange")||fQ.cm&&eS(fQ.cm,"beforeChange")){fR=dv(fQ,fR,true);if(!fR){return}}var fO=fH&&!fP&&cv(fQ,fR.from,fR.to);if(fO){for(var fN=fO.length-1;fN>=0;--fN){K(fQ,{from:fO[fN].from,to:fO[fN].to,text:fN?[""]:fR.text})}}else{K(fQ,fR)}}function K(fP,fQ){if(fQ.text.length==1&&fQ.text[0]==""&&b5(fQ.from,fQ.to)==0){return}var fO=eU(fP,fQ);fm(fP,fQ,fO,fP.cm?fP.cm.curOp.id:NaN);dQ(fP,fQ,fO,dW(fP,fQ));var fN=[];dK(fP,function(fS,fR){if(!fR&&c1(fN,fS.history)==-1){dj(fS.history,fQ);fN.push(fS.history)}dQ(fS,fQ,null,dW(fS,fQ))})}function bV(fY,fW,f0){if(fY.cm&&fY.cm.state.suppressEdits){return}var fV=fY.history,fP,fR=fY.sel;var fN=fW=="undo"?fV.done:fV.undone,fZ=fW=="undo"?fV.undone:fV.done;for(var fS=0;fS<fN.length;fS++){fP=fN[fS];if(f0?fP.ranges&&!fP.equals(fY.sel):!fP.ranges){break}}if(fS==fN.length){return}fV.lastOrigin=fV.lastSelOrigin=null;for(;;){fP=fN.pop();if(fP.ranges){cA(fP,fZ);if(f0&&!fP.equals(fY.sel)){bJ(fY,fP,{clearRedo:false});return}fR=fP}else{break}}var fU=[];cA(fR,fZ);fZ.push({changes:fU,generation:fV.generation});fV.generation=fP.generation||++fV.maxGeneration;var fQ=eS(fY,"beforeChange")||fY.cm&&eS(fY.cm,"beforeChange");for(var fS=fP.changes.length-1;fS>=0;--fS){var fX=fP.changes[fS];fX.origin=fW;if(fQ&&!dv(fY,fX,false)){fN.length=0;return}fU.push(da(fY,fX));var fO=fS?eU(fY,fX,null):fh(fN);dQ(fY,fX,fO,dM(fY,fX));if(!fS&&fY.cm){fY.cm.scrollIntoView(fX)}var fT=[];dK(fY,function(f2,f1){if(!f1&&c1(fT,f2.history)==-1){dj(f2.history,fX);fT.push(f2.history)}dQ(f2,fX,null,dM(f2,fX))})}}function eX(fO,fQ){if(fQ==0){return}fO.first+=fQ;fO.sel=new fx(bH(fO.sel.ranges,function(fR){return new dB(W(fR.anchor.line+fQ,fR.anchor.ch),W(fR.head.line+fQ,fR.head.ch))}),fO.sel.primIndex);if(fO.cm){af(fO.cm,fO.first,fO.first-fQ,fQ);for(var fP=fO.cm.display,fN=fP.viewFrom;fN<fP.viewTo;fN++){R(fO.cm,fN,"gutter")}}}function dQ(fR,fS,fQ,fO){if(fR.cm&&!fR.cm.curOp){return cL(fR.cm,dQ)(fR,fS,fQ,fO)}if(fS.to.line<fR.first){eX(fR,fS.text.length-1-(fS.to.line-fS.from.line));return}if(fS.from.line>fR.lastLine()){return}if(fS.from.line<fR.first){var fN=fS.text.length-1-(fR.first-fS.from.line);eX(fR,fN);fS={from:W(fR.first,0),to:W(fS.to.line+fN,fS.to.ch),text:[fh(fS.text)],origin:fS.origin}}var fP=fR.lastLine();if(fS.to.line>fP){fS={from:fS.from,to:W(fP,eP(fR,fP).text.length),text:[fS.text[0]],origin:fS.origin}}fS.removed=fy(fR,fS.from,fS.to);if(!fQ){fQ=eU(fR,fS,null)}if(fR.cm){aD(fR.cm,fS,fO)}else{e9(fR,fS,fO)}d1(fR,fQ,Y)}function aD(fY,fU,fS){var fX=fY.doc,fT=fY.display,fV=fU.from,fW=fU.to;var fN=false,fR=fV.line;if(!fY.options.lineWrapping){fR=bC(z(eP(fX,fV.line)));fX.iter(fR,fW.line+1,function(f0){if(f0==fT.maxLine){fN=true;return true}})}if(fX.sel.contains(fU.from,fU.to)>-1){V(fY)}e9(fX,fU,fS,a3(fY));if(!fY.options.lineWrapping){fX.iter(fR,fV.line+fU.text.length,function(f1){var f0=dY(f1);if(f0>fT.maxLineLength){fT.maxLine=f1;fT.maxLineLength=f0;fT.maxLineChanged=true;fN=false}});if(fN){fY.curOp.updateMaxLine=true}}fX.frontier=Math.min(fX.frontier,fV.line);dR(fY,400);var fZ=fU.text.length-(fW.line-fV.line)-1;if(fV.line==fW.line&&fU.text.length==1&&!dw(fY.doc,fU)){R(fY,fV.line,"text")}else{af(fY,fV.line,fW.line+1,fZ)}var fP=eS(fY,"changes"),fQ=eS(fY,"change");if(fQ||fP){var fO={from:fV,to:fW,text:fU.text,removed:fU.removed,origin:fU.origin};if(fQ){ac(fY,"change",fY,fO)}if(fP){(fY.curOp.changeObjs||(fY.curOp.changeObjs=[])).push(fO)}}fY.display.selForContextMenu=null}function aR(fQ,fP,fS,fR,fN){if(!fR){fR=fS}if(b5(fR,fS)<0){var fO=fR;fR=fS;fS=fO}if(typeof fP=="string"){fP=aQ(fP)}a5(fQ,{from:fS,to:fR,text:fP,origin:fN})}function dJ(fO,fR){var fS=fO.display,fP=fS.sizer.getBoundingClientRect(),fN=null;if(fR.top+fP.top<0){fN=true}else{if(fR.bottom+fP.top>(window.innerHeight||document.documentElement.clientHeight)){fN=false}}if(fN!=null&&!e5){var fQ=fw("div","\u200b",null,"position: absolute; top: "+(fR.top-fS.viewOffset-eI(fO.display))+"px; height: "+(fR.bottom-fR.top+ba)+"px; left: "+fR.left+"px; width: 2px;");fO.display.lineSpace.appendChild(fQ);fQ.scrollIntoView(fN);fO.display.lineSpace.removeChild(fQ)}}function E(fW,fU,fR,fQ){if(fQ==null){fQ=0}for(;;){var fS=false,fV=dx(fW,fU);var fN=!fR||fR==fU?fV:dx(fW,fR);var fP=H(fW,Math.min(fV.left,fN.left),Math.min(fV.top,fN.top)-fQ,Math.max(fV.left,fN.left),Math.max(fV.bottom,fN.bottom)+fQ);var fT=fW.doc.scrollTop,fO=fW.doc.scrollLeft;if(fP.scrollTop!=null){N(fW,fP.scrollTop);if(Math.abs(fW.doc.scrollTop-fT)>1){fS=true}}if(fP.scrollLeft!=null){bt(fW,fP.scrollLeft);if(Math.abs(fW.doc.scrollLeft-fO)>1){fS=true}}if(!fS){return fV}}}function F(fN,fP,fR,fO,fQ){var fS=H(fN,fP,fR,fO,fQ);if(fS.scrollTop!=null){N(fN,fS.scrollTop)}if(fS.scrollLeft!=null){bt(fN,fS.scrollLeft)}}function H(fT,f1,fQ,f0,fP){var fY=fT.display,fX=aN(fT.display);if(fQ<0){fQ=0}var fW=fT.curOp&&fT.curOp.scrollTop!=null?fT.curOp.scrollTop:fY.scroller.scrollTop;var fO=fY.scroller.clientHeight-ba,fV={};var f3=fT.doc.height+bx(fY);var f4=fQ<fX,fZ=fP>f3-fX;if(fQ<fW){fV.scrollTop=f4?0:fQ}else{if(fP>fW+fO){var fU=Math.min(fQ,(fZ?f3:fP)-fO);if(fU!=fW){fV.scrollTop=fU}}}var fN=fT.curOp&&fT.curOp.scrollLeft!=null?fT.curOp.scrollLeft:fY.scroller.scrollLeft;var fS=fY.scroller.clientWidth-ba;f1+=fY.gutters.offsetWidth;f0+=fY.gutters.offsetWidth;var fR=fY.gutters.offsetWidth;var f2=f1<fR+10;if(f1<fN+fR||f2){if(f2){f1=0}fV.scrollLeft=Math.max(0,f1-10-fR)}else{if(f0>fS+fN-3){fV.scrollLeft=f0+10-fS}}return fV}function cy(fN,fP,fO){if(fP!=null||fO!=null){fd(fN)}if(fP!=null){fN.curOp.scrollLeft=(fN.curOp.scrollLeft==null?fN.doc.scrollLeft:fN.curOp.scrollLeft)+fP}if(fO!=null){fN.curOp.scrollTop=(fN.curOp.scrollTop==null?fN.doc.scrollTop:fN.curOp.scrollTop)+fO}}function fg(fN){fd(fN);var fO=fN.getCursor(),fQ=fO,fP=fO;if(!fN.options.lineWrapping){fQ=fO.ch?W(fO.line,fO.ch-1):fO;fP=W(fO.line,fO.ch+1)}fN.curOp.scrollToPos={from:fQ,to:fP,margin:fN.options.cursorScrollMargin,isCursor:true}}function fd(fN){var fP=fN.curOp.scrollToPos;if(fP){fN.curOp.scrollToPos=null;var fR=dm(fN,fP.from),fQ=dm(fN,fP.to);var fO=H(fN,Math.min(fR.left,fQ.left),Math.min(fR.top,fQ.top)-fP.margin,Math.max(fR.right,fQ.right),Math.max(fR.bottom,fQ.bottom)+fP.margin);fN.scrollTo(fO.scrollLeft,fO.scrollTop)}}function ab(f0,fQ,fZ,fP){var fY=f0.doc,fO;if(fZ==null){fZ="add"}if(fZ=="smart"){if(!f0.doc.mode.indent){fZ="prev"}else{fO=dg(f0,fQ)}}var fU=f0.options.tabSize;var f1=eP(fY,fQ),fT=bI(f1.text,null,fU);if(f1.stateAfter){f1.stateAfter=null}var fN=f1.text.match(/^\s*/)[0],fW;if(!fP&&!/\S/.test(f1.text)){fW=0;fZ="not"}else{if(fZ=="smart"){fW=f0.doc.mode.indent(fO,f1.text.slice(fN.length),f1.text);if(fW==bZ){if(!fP){return}fZ="prev"}}}if(fZ=="prev"){if(fQ>fY.first){fW=bI(eP(fY,fQ-1).text,null,fU)}else{fW=0}}else{if(fZ=="add"){fW=fT+f0.options.indentUnit}else{if(fZ=="subtract"){fW=fT-f0.options.indentUnit}else{if(typeof fZ=="number"){fW=fT+fZ}}}}fW=Math.max(0,fW);var fX="",fV=0;if(f0.options.indentWithTabs){for(var fR=Math.floor(fW/fU);fR;--fR){fV+=fU;fX+="\t"}}if(fV<fW){fX+=cf(fW-fV)}if(fX!=fN){aR(f0.doc,fX,W(fQ,0),W(fQ,fN.length),"+input")}else{for(var fR=0;fR<fY.sel.ranges.length;fR++){var fS=fY.sel.ranges[fR];if(fS.head.line==fQ&&fS.head.ch<fN.length){var fV=W(fQ,fN.length);f(fY,fR,new dB(fV,fV));break}}}f1.stateAfter=null}function eb(fO,fQ,fN,fT){var fS=fQ,fP=fQ,fR=fO.doc;if(typeof fQ=="number"){fP=eP(fR,cO(fR,fQ))}else{fS=bC(fQ)}if(fS==null){return null}if(fT(fP,fS)){R(fO,fS,fN)}return fP}function eA(fN,fT){var fO=fN.doc.sel.ranges,fR=[];for(var fQ=0;fQ<fO.length;fQ++){var fP=fT(fO[fQ]);while(fR.length&&b5(fP.from,fh(fR).to)<=0){var fS=fR.pop();if(b5(fS.from,fP.from)<0){fP.from=fS.from;break}}fR.push(fP)}cz(fN,function(){for(var fU=fR.length-1;fU>=0;fU--){aR(fN.doc,"",fR[fU].from,fR[fU].to,"+delete")}fg(fN)})}function bm(f4,fQ,fY,fX,fS){var fV=fQ.line,fW=fQ.ch,f3=fY;var fN=eP(f4,fV);var f1=true;function f2(){var f5=fV+fY;if(f5<f4.first||f5>=f4.first+f4.size){return(f1=false)}fV=f5;return fN=eP(f4,f5)}function f0(f6){var f5=(fS?v:ag)(fN,fW,fY,true);if(f5==null){if(!f6&&f2()){if(fS){fW=(fY<0?cE:ct)(fN)}else{fW=fY<0?fN.text.length:0}}else{return(f1=false)}}else{fW=f5}return true}if(fX=="char"){f0()}else{if(fX=="column"){f0(true)}else{if(fX=="word"||fX=="group"){var fZ=null,fT=fX=="group";for(var fR=true;;fR=false){if(fY<0&&!f0(!fR)){break}var fO=fN.text.charAt(fW)||"\n";var fP=cp(fO)?"w":fT&&fO=="\n"?"n":!fT||/\s/.test(fO)?null:"p";if(fT&&!fR&&!fP){fP="s"}if(fZ&&fZ!=fP){if(fY<0){fY=1;f0()}break}if(fP){fZ=fP}if(fY>0&&!f0(!fR)){break}}}}}var fU=bK(f4,W(fV,fW),f3,true);if(!f1){fU.hitSide=true}return fU}function bg(fV,fQ,fN,fU){var fT=fV.doc,fS=fQ.left,fR;if(fU=="page"){var fP=Math.min(fV.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);fR=fQ.top+fN*(fP-(fN<0?1.5:0.5)*aN(fV.display))}else{if(fU=="line"){fR=fN>0?fQ.bottom+3:fQ.top-3}}for(;;){var fO=fo(fV,fS,fR);if(!fO.outside){break}if(fN<0?fR<=0:fR>=fT.height){fO.hitSide=true;break}fR+=fN*5}return fO}function ar(fR,fT){var fQ=eP(fR,fT.line).text;var fS=fT.ch,fP=fT.ch;if(fQ){if((fT.xRel<0||fP==fQ.length)&&fS){--fS}else{++fP}var fO=fQ.charAt(fS);var fN=cp(fO)?cp:/\s/.test(fO)?function(fU){return/\s/.test(fU)}:function(fU){return !/\s/.test(fU)&&!cp(fU)};while(fS>0&&fN(fQ.charAt(fS-1))){--fS}while(fP<fQ.length&&fN(fQ.charAt(fP))){++fP}}return new dB(W(fT.line,fS),W(fT.line,fP))}I.prototype={constructor:I,focus:function(){window.focus();ed(this);C(this)},setOption:function(fP,fQ){var fO=this.options,fN=fO[fP];if(fO[fP]==fQ&&fP!="mode"){return}fO[fP]=fQ;if(a4.hasOwnProperty(fP)){cL(this,a4[fP])(this,fQ,fN)}},getOption:function(fN){return this.options[fN]},getDoc:function(){return this.doc},addKeyMap:function(fO,fN){this.state.keyMaps[fN?"push":"unshift"](fO)},removeKeyMap:function(fO){var fP=this.state.keyMaps;for(var fN=0;fN<fP.length;++fN){if(fP[fN]==fO||(typeof fP[fN]!="string"&&fP[fN].name==fO)){fP.splice(fN,1);return true}}},addOverlay:cR(function(fN,fO){var fP=fN.token?fN:I.getMode(this.options,fN);if(fP.startState){throw new Error("Overlays may not be stateful.")}this.state.overlays.push({mode:fP,modeSpec:fN,opaque:fO&&fO.opaque});this.state.modeGen++;af(this)}),removeOverlay:cR(function(fN){var fP=this.state.overlays;for(var fO=0;fO<fP.length;++fO){var fQ=fP[fO].modeSpec;if(fQ==fN||typeof fN=="string"&&fQ.name==fN){fP.splice(fO,1);this.state.modeGen++;af(this);return}}}),indentLine:cR(function(fP,fN,fO){if(typeof fN!="string"&&typeof fN!="number"){if(fN==null){fN=this.options.smartIndent?"smart":"prev"}else{fN=fN?"add":"subtract"}}if(bW(this.doc,fP)){ab(this,fP,fN,fO)}}),indentSelection:cR(function(fS){var fO=this.doc.sel.ranges,fN=-1;for(var fR=0;fR<fO.length;fR++){var fP=fO[fR];if(!fP.empty()){var fU=Math.max(fN,fP.from().line);var fT=fP.to();fN=Math.min(this.lastLine(),fT.line-(fT.ch?0:1))+1;for(var fQ=fU;fQ<fN;++fQ){ab(this,fQ,fS)}}else{if(fP.head.line>fN){ab(this,fP.head.line,fS,true);fN=fP.head.line;if(fR==this.doc.sel.primIndex){fg(this)}}}}}),getTokenAt:function(fU,fO){var fR=this.doc;fU=fj(fR,fU);var fQ=dg(this,fU.line,fO),fT=this.doc.mode;var fN=eP(fR,fU.line);var fS=new ew(fN.text,this.options.tabSize);while(fS.pos<fU.ch&&!fS.eol()){fS.start=fS.pos;var fP=ef(fT,fS,fQ)}return{start:fS.start,end:fS.pos,string:fS.current(),type:fP||null,state:fQ}},getTokenTypeAt:function(fU){fU=fj(this.doc,fU);var fQ=cQ(this,eP(this.doc,fU.line));var fS=0,fT=(fQ.length-1)/2,fP=fU.ch;var fO;if(fP==0){fO=fQ[2]}else{for(;;){var fN=(fS+fT)>>1;if((fN?fQ[fN*2-1]:0)>=fP){fT=fN}else{if(fQ[fN*2+1]<fP){fS=fN+1}else{fO=fQ[fN*2+2];break}}}}var fR=fO?fO.indexOf("cm-overlay "):-1;return fR<0?fO:fR==0?null:fO.slice(0,fR-1)},getModeAt:function(fO){var fN=this.doc.mode;if(!fN.innerMode){return fN}return I.innerMode(fN,this.getTokenAt(fO).state).mode},getHelper:function(fO,fN){return this.getHelpers(fO,fN)[0]},getHelpers:function(fU,fP){var fQ=[];if(!eY.hasOwnProperty(fP)){return eY}var fN=eY[fP],fT=this.getModeAt(fU);if(typeof fT[fP]=="string"){if(fN[fT[fP]]){fQ.push(fN[fT[fP]])}}else{if(fT[fP]){for(var fO=0;fO<fT[fP].length;fO++){var fS=fN[fT[fP][fO]];if(fS){fQ.push(fS)}}}else{if(fT.helperType&&fN[fT.helperType]){fQ.push(fN[fT.helperType])}else{if(fN[fT.name]){fQ.push(fN[fT.name])}}}}for(var fO=0;fO<fN._global.length;fO++){var fR=fN._global[fO];if(fR.pred(fT,this)&&c1(fQ,fR.val)==-1){fQ.push(fR.val)}}return fQ},getStateAfter:function(fO,fN){var fP=this.doc;fO=cO(fP,fO==null?fP.first+fP.size-1:fO);return dg(this,fO+1,fN)},cursorCoords:function(fQ,fO){var fP,fN=this.doc.sel.primary();if(fQ==null){fP=fN.head}else{if(typeof fQ=="object"){fP=fj(this.doc,fQ)}else{fP=fQ?fN.from():fN.to()}}return dx(this,fP,fO||"page")},charCoords:function(fO,fN){return cx(this,fj(this.doc,fO),fN||"page")},coordsChar:function(fN,fO){fN=fJ(this,fN,fO||"page");return fo(this,fN.left,fN.top)},lineAtHeight:function(fN,fO){fN=fJ(this,{top:fN,left:0},fO||"page").top;return bv(this.doc,fN+this.display.viewOffset)},heightAtLine:function(fO,fR){var fN=false,fQ=this.doc.first+this.doc.size-1;if(fO<this.doc.first){fO=this.doc.first}else{if(fO>fQ){fO=fQ;fN=true}}var fP=eP(this.doc,fO);return et(this,fP,{top:0,left:0},fR||"page").top+(fN?this.doc.height-bB(fP):0)},defaultTextHeight:function(){return aN(this.display)},defaultCharWidth:function(){return di(this.display)},setGutterMarker:cR(function(fN,fO,fP){return eb(this,fN,"gutter",function(fQ){var fR=fQ.gutterMarkers||(fQ.gutterMarkers={});fR[fO]=fP;if(!fP&&ex(fR)){fQ.gutterMarkers=null}return true})}),clearGutter:cR(function(fP){var fN=this,fQ=fN.doc,fO=fQ.first;fQ.iter(function(fR){if(fR.gutterMarkers&&fR.gutterMarkers[fP]){fR.gutterMarkers[fP]=null;R(fN,fO,"gutter");if(ex(fR.gutterMarkers)){fR.gutterMarkers=null}}++fO})}),addLineClass:cR(function(fP,fO,fN){return eb(this,fP,"class",function(fQ){var fR=fO=="text"?"textClass":fO=="background"?"bgClass":"wrapClass";if(!fQ[fR]){fQ[fR]=fN}else{if(new RegExp("(?:^|\\s)"+fN+"(?:$|\\s)").test(fQ[fR])){return false}else{fQ[fR]+=" "+fN}}return true})}),removeLineClass:cR(function(fP,fO,fN){return eb(this,fP,"class",function(fR){var fU=fO=="text"?"textClass":fO=="background"?"bgClass":"wrapClass";var fT=fR[fU];if(!fT){return false}else{if(fN==null){fR[fU]=null}else{var fS=fT.match(new RegExp("(?:^|\\s+)"+fN+"(?:$|\\s+)"));if(!fS){return false}var fQ=fS.index+fS[0].length;fR[fU]=fT.slice(0,fS.index)+(!fS.index||fQ==fT.length?"":" ")+fT.slice(fQ)||null}}return true})}),addLineWidget:cR(function(fP,fO,fN){return bw(this,fP,fO,fN)}),removeLineWidget:function(fN){fN.clear()},lineInfo:function(fN){if(typeof fN=="number"){if(!bW(this.doc,fN)){return null}var fO=fN;fN=eP(this.doc,fN);if(!fN){return null}}else{var fO=bC(fN);if(fO==null){return null}}return{line:fO,handle:fN,text:fN.text,gutterMarkers:fN.gutterMarkers,textClass:fN.textClass,bgClass:fN.bgClass,wrapClass:fN.wrapClass,widgets:fN.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fS,fP,fU,fQ,fW){var fR=this.display;fS=dx(this,fj(this.doc,fS));var fT=fS.bottom,fO=fS.left;fP.style.position="absolute";fR.sizer.appendChild(fP);if(fQ=="over"){fT=fS.top}else{if(fQ=="above"||fQ=="near"){var fN=Math.max(fR.wrapper.clientHeight,this.doc.height),fV=Math.max(fR.sizer.clientWidth,fR.lineSpace.clientWidth);if((fQ=="above"||fS.bottom+fP.offsetHeight>fN)&&fS.top>fP.offsetHeight){fT=fS.top-fP.offsetHeight}else{if(fS.bottom+fP.offsetHeight<=fN){fT=fS.bottom}}if(fO+fP.offsetWidth>fV){fO=fV-fP.offsetWidth}}}fP.style.top=fT+"px";fP.style.left=fP.style.right="";if(fW=="right"){fO=fR.sizer.clientWidth-fP.offsetWidth;fP.style.right="0px"}else{if(fW=="left"){fO=0}else{if(fW=="middle"){fO=(fR.sizer.clientWidth-fP.offsetWidth)/2}}fP.style.left=fO+"px"}if(fU){F(this,fO,fT,fO+fP.offsetWidth,fT+fP.offsetHeight)}},triggerOnKeyDown:cR(q),triggerOnKeyPress:cR(cn),triggerOnKeyUp:cR(a7),execCommand:function(fN){if(eh.hasOwnProperty(fN)){return eh[fN](this)}},findPosH:function(fT,fQ,fR,fO){var fN=1;if(fQ<0){fN=-1;fQ=-fQ}for(var fP=0,fS=fj(this.doc,fT);fP<fQ;++fP){fS=bm(this.doc,fS,fN,fR,fO);if(fS.hitSide){break}}return fS},moveH:cR(function(fO,fP){var fN=this;fN.extendSelectionsBy(function(fQ){if(fN.display.shift||fN.doc.extend||fQ.empty()){return bm(fN.doc,fQ.head,fO,fP,fN.options.rtlMoveVisually)}else{return fO<0?fQ.from():fQ.to()}},cF)}),deleteH:cR(function(fN,fO){var fP=this.doc.sel,fQ=this.doc;if(fP.somethingSelected()){fQ.replaceSelection("",null,"+delete")}else{eA(this,function(fS){var fR=bm(fQ,fS.head,fN,fO,false);return fN<0?{from:fR,to:fS.head}:{from:fS.head,to:fR}})}}),findPosV:function(fS,fP,fT,fV){var fN=1,fR=fV;if(fP<0){fN=-1;fP=-fP}for(var fO=0,fU=fj(this.doc,fS);fO<fP;++fO){var fQ=dx(this,fU,"div");if(fR==null){fR=fQ.left}else{fQ.left=fR}fU=bg(this,fQ,fN,fT);if(fU.hitSide){break}}return fU},moveV:cR(function(fO,fQ){var fN=this,fS=this.doc,fR=[];var fT=!fN.display.shift&&!fS.extend&&fS.sel.somethingSelected();fS.extendSelectionsBy(function(fU){if(fT){return fO<0?fU.from():fU.to()}var fW=dx(fN,fU.head,"div");if(fU.goalColumn!=null){fW.left=fU.goalColumn}fR.push(fW.left);var fV=bg(fN,fW,fO,fQ);if(fQ=="page"&&fU==fS.sel.primary()){cy(fN,null,cx(fN,fV,"div").top-fW.top)}return fV},cF);if(fR.length){for(var fP=0;fP<fS.sel.ranges.length;fP++){fS.sel.ranges[fP].goalColumn=fR[fP]}}}),toggleOverwrite:function(fN){if(fN!=null&&fN==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){fb(this.display.cursorDiv,"CodeMirror-overwrite")}else{g(this.display.cursorDiv,"CodeMirror-overwrite")}az(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return ds()==this.display.input},scrollTo:cR(function(fN,fO){if(fN!=null||fO!=null){fd(this)}if(fN!=null){this.curOp.scrollLeft=fN}if(fO!=null){this.curOp.scrollTop=fO}}),getScrollInfo:function(){var fN=this.display.scroller,fO=ba;return{left:fN.scrollLeft,top:fN.scrollTop,height:fN.scrollHeight-fO,width:fN.scrollWidth-fO,clientHeight:fN.clientHeight-fO,clientWidth:fN.clientWidth-fO}},scrollIntoView:cR(function(fO,fP){if(fO==null){fO={from:this.doc.sel.primary().head,to:null};if(fP==null){fP=this.options.cursorScrollMargin}}else{if(typeof fO=="number"){fO={from:W(fO,0),to:null}}else{if(fO.from==null){fO={from:fO,to:null}}}}if(!fO.to){fO.to=fO.from}fO.margin=fP||0;if(fO.from.line!=null){fd(this);this.curOp.scrollToPos=fO}else{var fN=H(this,Math.min(fO.from.left,fO.to.left),Math.min(fO.from.top,fO.to.top)-fO.margin,Math.max(fO.from.right,fO.to.right),Math.max(fO.from.bottom,fO.to.bottom)+fO.margin);this.scrollTo(fN.scrollLeft,fN.scrollTop)}}),setSize:cR(function(fP,fN){function fO(fQ){return typeof fQ=="number"||/^\d+$/.test(String(fQ))?fQ+"px":fQ}if(fP!=null){this.display.wrapper.style.width=fO(fP)}if(fN!=null){this.display.wrapper.style.height=fO(fN)}if(this.options.lineWrapping){aF(this)}this.curOp.forceUpdate=true;az(this,"refresh",this)}),operation:function(fN){return cz(this,fN)},refresh:cR(function(){var fN=this.display.cachedTextHeight;af(this);this.curOp.forceUpdate=true;ai(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);cN(this);if(fN==null||Math.abs(fN-aN(this.display))>0.5){X(this)}az(this,"refresh",this)}),swapDoc:cR(function(fO){var fN=this.doc;fN.cm=null;dN(this,fO);ai(this);eZ(this);this.scrollTo(fO.scrollLeft,fO.scrollTop);ac(this,"swapDoc",this,fN);return fN}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};bo(I);var eF=I.defaults={};var a4=I.optionHandlers={};function t(fN,fQ,fP,fO){I.defaults[fN]=fQ;if(fP){a4[fN]=fO?function(fR,fT,fS){if(fS!=b2){fP(fR,fT,fS)}}:fP}}var b2=I.Init={toString:function(){return"CodeMirror.Init"}};t("value","",function(fN,fO){fN.setValue(fO)},true);t("mode",null,function(fN,fO){fN.doc.modeOption=fO;bh(fN)},true);t("indentUnit",2,bh,true);t("indentWithTabs",false);t("smartIndent",true);t("tabSize",4,function(fN){dX(fN);ai(fN);af(fN)},true);t("specialChars",/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g,function(fN,fO){fN.options.specialChars=new RegExp(fO.source+(fO.test("\t")?"":"|\t"),"g");fN.refresh()},true);t("specialCharPlaceholder",eN,function(fN){fN.refresh()},true);t("electricChars",true);t("rtlMoveVisually",!aG);t("wholeLineUpdateBefore",true);t("theme","default",function(fN){cB(fN);db(fN)},true);t("keyMap","default",fK);t("extraKeys",null);t("lineWrapping",false,ek,true);t("gutters",[],function(fN){b4(fN.options);db(fN)},true);t("fixedGutter",true,function(fN,fO){fN.display.gutters.style.left=fO?dA(fN.display)+"px":"0";fN.refresh()},true);t("coverGutterNextToScrollbar",false,eB,true);t("lineNumbers",false,function(fN){b4(fN.options);db(fN)},true);t("firstLineNumber",1,db,true);t("lineNumberFormatter",function(fN){return fN},db,true);t("showCursorWhenSelecting",false,br,true);t("resetSelectionOnContextMenu",true);t("readOnly",false,function(fN,fO){if(fO=="nocursor"){aL(fN);fN.display.input.blur();fN.display.disabled=true}else{fN.display.disabled=false;if(!fO){eZ(fN)}}});t("disableInput",false,function(fN,fO){if(!fO){eZ(fN)}},true);t("dragDrop",true);t("cursorBlinkRate",530);t("cursorScrollMargin",0);t("cursorHeight",1);t("workTime",100);t("workDelay",100);t("flattenSpans",true,dX,true);t("addModeClass",false,dX,true);t("pollInterval",100);t("undoDepth",200,function(fN,fO){fN.doc.history.undoDepth=fO});t("historyEventDelay",1250);t("viewportMargin",10,function(fN){fN.refresh()},true);t("maxHighlightLength",10000,dX,true);t("moveInputWithCursor",true,function(fN,fO){if(!fO){fN.display.inputDiv.style.top=fN.display.inputDiv.style.left=0}});t("tabindex",null,function(fN,fO){fN.display.input.tabIndex=fO||""});t("autofocus",null);var c8=I.modes={},aJ=I.mimeModes={};I.defineMode=function(fN,fP){if(!I.defaults.mode&&fN!="null"){I.defaults.mode=fN}if(arguments.length>2){fP.dependencies=[];for(var fO=2;fO<arguments.length;++fO){fP.dependencies.push(arguments[fO])}}c8[fN]=fP};I.defineMIME=function(fO,fN){aJ[fO]=fN};I.resolveMode=function(fN){if(typeof fN=="string"&&aJ.hasOwnProperty(fN)){fN=aJ[fN]}else{if(fN&&typeof fN.name=="string"&&aJ.hasOwnProperty(fN.name)){var fO=aJ[fN.name];if(typeof fO=="string"){fO={name:fO}}fN=ca(fO,fN);fN.name=fO.name}else{if(typeof fN=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(fN)){return I.resolveMode("application/xml")}}}if(typeof fN=="string"){return{name:fN}}else{return fN||{name:"null"}}};I.getMode=function(fO,fN){var fN=I.resolveMode(fN);var fQ=c8[fN.name];if(!fQ){return I.getMode(fO,"text/plain")}var fR=fQ(fO,fN);if(c5.hasOwnProperty(fN.name)){var fP=c5[fN.name];for(var fS in fP){if(!fP.hasOwnProperty(fS)){continue}if(fR.hasOwnProperty(fS)){fR["_"+fS]=fR[fS]}fR[fS]=fP[fS]}}fR.name=fN.name;if(fN.helperType){fR.helperType=fN.helperType}if(fN.modeProps){for(var fS in fN.modeProps){fR[fS]=fN.modeProps[fS]}}return fR};I.defineMode("null",function(){return{token:function(fN){fN.skipToEnd()}}});I.defineMIME("text/plain","null");var c5=I.modeExtensions={};I.extendMode=function(fP,fO){var fN=c5.hasOwnProperty(fP)?c5[fP]:(c5[fP]={});aE(fO,fN)};I.defineExtension=function(fN,fO){I.prototype[fN]=fO};I.defineDocExtension=function(fN,fO){ao.prototype[fN]=fO};I.defineOption=t;var aY=[];I.defineInitHook=function(fN){aY.push(fN)};var eY=I.helpers={};I.registerHelper=function(fO,fN,fP){if(!eY.hasOwnProperty(fO)){eY[fO]=I[fO]={_global:[]}}eY[fO][fN]=fP};I.registerGlobalHelper=function(fP,fO,fN,fQ){I.registerHelper(fP,fO,fQ);eY[fP]._global.push({pred:fN,val:fQ})};var bR=I.copyState=function(fQ,fN){if(fN===true){return fN}if(fQ.copyState){return fQ.copyState(fN)}var fP={};for(var fR in fN){var fO=fN[fR];if(fO instanceof Array){fO=fO.concat([])}fP[fR]=fO}return fP};var bP=I.startState=function(fP,fO,fN){return fP.startState?fP.startState(fO,fN):true};I.innerMode=function(fP,fN){while(fP.innerMode){var fO=fP.innerMode(fN);if(!fO||fO.mode==fP){break}fN=fO.state;fP=fO.mode}return fO||{mode:fP,state:fN}};var eh=I.commands={selectAll:function(fN){fN.setSelection(W(fN.firstLine(),0),W(fN.lastLine()),Y)},singleSelection:function(fN){fN.setSelection(fN.getCursor("anchor"),fN.getCursor("head"),Y)},killLine:function(fN){eA(fN,function(fP){if(fP.empty()){var fO=eP(fN.doc,fP.head.line).text.length;if(fP.head.ch==fO&&fP.head.line<fN.lastLine()){return{from:fP.head,to:W(fP.head.line+1,0)}}else{return{from:fP.head,to:W(fP.head.line,fO)}}}else{return{from:fP.from(),to:fP.to()}}})},deleteLine:function(fN){eA(fN,function(fO){return{from:W(fO.from().line,0),to:fj(fN.doc,W(fO.to().line+1,0))}})},delLineLeft:function(fN){eA(fN,function(fO){return{from:W(fO.from().line,0),to:fO.from()}})},undo:function(fN){fN.undo()},redo:function(fN){fN.redo()},undoSelection:function(fN){fN.undoSelection()},redoSelection:function(fN){fN.redoSelection()},goDocStart:function(fN){fN.extendSelection(W(fN.firstLine(),0))},goDocEnd:function(fN){fN.extendSelection(W(fN.lastLine()))},goLineStart:function(fN){fN.extendSelectionsBy(function(fO){return bj(fN,fO.head.line)},cF)},goLineStartSmart:function(fN){fN.extendSelectionsBy(function(fQ){var fT=bj(fN,fQ.head.line);var fP=fN.getLineHandle(fT.line);var fO=a(fP);if(!fO||fO[0].level==0){var fS=Math.max(0,fP.text.search(/\S/));var fR=fQ.head.line==fT.line&&fQ.head.ch<=fS&&fQ.head.ch;return W(fT.line,fR?0:fS)}return fT},cF)},goLineEnd:function(fN){fN.extendSelectionsBy(function(fO){return dt(fN,fO.head.line)},cF)},goLineRight:function(fN){fN.extendSelectionsBy(function(fO){var fP=fN.charCoords(fO.head,"div").top+5;return fN.coordsChar({left:fN.display.lineDiv.offsetWidth+100,top:fP},"div")},cF)},goLineLeft:function(fN){fN.extendSelectionsBy(function(fO){var fP=fN.charCoords(fO.head,"div").top+5;return fN.coordsChar({left:0,top:fP},"div")},cF)},goLineUp:function(fN){fN.moveV(-1,"line")},goLineDown:function(fN){fN.moveV(1,"line")},goPageUp:function(fN){fN.moveV(-1,"page")},goPageDown:function(fN){fN.moveV(1,"page")},goCharLeft:function(fN){fN.moveH(-1,"char")},goCharRight:function(fN){fN.moveH(1,"char")},goColumnLeft:function(fN){fN.moveH(-1,"column")},goColumnRight:function(fN){fN.moveH(1,"column")},goWordLeft:function(fN){fN.moveH(-1,"word")},goGroupRight:function(fN){fN.moveH(1,"group")},goGroupLeft:function(fN){fN.moveH(-1,"group")},goWordRight:function(fN){fN.moveH(1,"word")},delCharBefore:function(fN){fN.deleteH(-1,"char")},delCharAfter:function(fN){fN.deleteH(1,"char")},delWordBefore:function(fN){fN.deleteH(-1,"word")},delWordAfter:function(fN){fN.deleteH(1,"word")},delGroupBefore:function(fN){fN.deleteH(-1,"group")},delGroupAfter:function(fN){fN.deleteH(1,"group")},indentAuto:function(fN){fN.indentSelection("smart")},indentMore:function(fN){fN.indentSelection("add")},indentLess:function(fN){fN.indentSelection("subtract")},insertTab:function(fN){fN.replaceSelection("\t")},insertSoftTab:function(fN){var fP=[],fO=fN.listSelections(),fS=fN.options.tabSize;for(var fR=0;fR<fO.length;fR++){var fT=fO[fR].from();var fQ=bI(fN.getLine(fT.line),fT.ch,fS);fP.push(new Array(fS-fQ%fS+1).join(" "))}fN.replaceSelections(fP)},defaultTab:function(fN){if(fN.somethingSelected()){fN.indentSelection("add")}else{fN.execCommand("insertTab")}},transposeChars:function(fN){cz(fN,function(){var fP=fN.listSelections();for(var fQ=0;fQ<fP.length;fQ++){var fR=fP[fQ].head,fO=eP(fN.doc,fR.line).text;if(fR.ch>0&&fR.ch<fO.length-1){fN.replaceRange(fO.charAt(fR.ch)+fO.charAt(fR.ch-1),W(fR.line,fR.ch-1),W(fR.line,fR.ch+1))}}})},newlineAndIndent:function(fN){cz(fN,function(){var fO=fN.listSelections().length;for(var fQ=0;fQ<fO;fQ++){var fP=fN.listSelections()[fQ];fN.replaceRange("\n",fP.anchor,fP.head,"+input");fN.indentLine(fP.from().line+1,null,true);fg(fN)}})},toggleOverwrite:function(fN){fN.toggleOverwrite()}};var eK=I.keyMap={};eK.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"};eK.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-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","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"};eK.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","Cmd-Backspace":"delLineLeft","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection",fallthrough:["basic","emacsy"]};eK.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"};eK["default"]=bU?eK.macDefault:eK.pcDefault;function fu(fN){if(typeof fN=="string"){return eK[fN]}else{return fN}}var j=I.lookupKey=function(fO,fS,fQ){function fR(fX){fX=fu(fX);var fW=fX[fO];if(fW===false){return"stop"}if(fW!=null&&fQ(fW)){return true}if(fX.nofallthrough){return"stop"}var fV=fX.fallthrough;if(fV==null){return false}if(Object.prototype.toString.call(fV)!="[object Array]"){return fR(fV)}for(var fU=0;fU<fV.length;++fU){var fT=fR(fV[fU]);if(fT){return fT}}return false}for(var fP=0;fP<fS.length;++fP){var fN=fR(fS[fP]);if(fN){return fN!="stop"}}};var eg=I.isModifierKey=function(fO){var fN=eQ[fO.keyCode];return fN=="Ctrl"||fN=="Alt"||fN=="Shift"||fN=="Mod"};var e2=I.keyName=function(fO,fP){if(dF&&fO.keyCode==34&&fO["char"]){return false}var fN=eQ[fO.keyCode];if(fN==null||fO.altGraphKey){return false}if(fO.altKey){fN="Alt-"+fN}if(bF?fO.metaKey:fO.ctrlKey){fN="Ctrl-"+fN}if(bF?fO.ctrlKey:fO.metaKey){fN="Cmd-"+fN}if(!fP&&fO.shiftKey){fN="Shift-"+fN}return fN};I.fromTextArea=function(fU,fV){if(!fV){fV={}}fV.value=fU.value;if(!fV.tabindex&&fU.tabindex){fV.tabindex=fU.tabindex}if(!fV.placeholder&&fU.placeholder){fV.placeholder=fU.placeholder}if(fV.autofocus==null){var fN=ds();fV.autofocus=fN==fU||fU.getAttribute("autofocus")!=null&&fN==document.body}function fR(){fU.value=fT.getValue()}if(fU.form){bM(fU.form,"submit",fR);if(!fV.leaveSubmitMethodAlone){var fO=fU.form,fS=fO.submit;try{var fQ=fO.submit=function(){fR();fO.submit=fS;fO.submit();fO.submit=fQ}}catch(fP){}}}fU.style.display="none";var fT=I(function(fW){fU.parentNode.insertBefore(fW,fU.nextSibling)},fV);fT.save=fR;fT.getTextArea=function(){return fU};fT.toTextArea=function(){fR();fU.parentNode.removeChild(fT.getWrapperElement());fU.style.display="";if(fU.form){dP(fU.form,"submit",fR);if(typeof fU.form.submit=="function"){fU.form.submit=fS}}};return fT};var ew=I.StringStream=function(fN,fO){this.pos=this.start=0;this.string=fN;this.tabSize=fO||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0};ew.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},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(fN){var fP=this.string.charAt(this.pos);if(typeof fN=="string"){var fO=fP==fN}else{var fO=fP&&(fN.test?fN.test(fP):fN(fP))}if(fO){++this.pos;return fP}},eatWhile:function(fN){var fO=this.pos;while(this.eat(fN)){}return this.pos>fO},eatSpace:function(){var fN=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>fN},skipToEnd:function(){this.pos=this.string.length},skipTo:function(fN){var fO=this.string.indexOf(fN,this.pos);if(fO>-1){this.pos=fO;return true}},backUp:function(fN){this.pos-=fN},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=bI(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?bI(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return bI(this.string,null,this.tabSize)-(this.lineStart?bI(this.string,this.lineStart,this.tabSize):0)},match:function(fR,fO,fN){if(typeof fR=="string"){var fS=function(fT){return fN?fT.toLowerCase():fT};var fQ=this.string.substr(this.pos,fR.length);if(fS(fQ)==fS(fR)){if(fO!==false){this.pos+=fR.length}return true}}else{var fP=this.string.slice(this.pos).match(fR);if(fP&&fP.index>0){return null}if(fP&&fO!==false){this.pos+=fP[0].length}return fP}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(fO,fN){this.lineStart+=fO;try{return fN()}finally{this.lineStart-=fO}}};var P=I.TextMarker=function(fO,fN){this.lines=[];this.type=fN;this.doc=fO};bo(P);P.prototype.clear=function(){if(this.explicitlyCleared){return}var fU=this.doc.cm,fO=fU&&!fU.curOp;if(fO){cw(fU)}if(eS(this,"clear")){var fV=this.find();if(fV){ac(this,"clear",fV.from,fV.to)}}var fP=null,fS=null;for(var fQ=0;fQ<this.lines.length;++fQ){var fW=this.lines[fQ];var fT=eJ(fW.markedSpans,this);if(fU&&!this.collapsed){R(fU,bC(fW),"text")}else{if(fU){if(fT.to!=null){fS=bC(fW)}if(fT.from!=null){fP=bC(fW)}}}fW.markedSpans=el(fW.markedSpans,fT);if(fT.from==null&&this.collapsed&&!e7(this.doc,fW)&&fU){fA(fW,aN(fU.display))}}if(fU&&this.collapsed&&!fU.options.lineWrapping){for(var fQ=0;fQ<this.lines.length;++fQ){var fN=z(this.lines[fQ]),fR=dY(fN);if(fR>fU.display.maxLineLength){fU.display.maxLine=fN;fU.display.maxLineLength=fR;fU.display.maxLineChanged=true}}}if(fP!=null&&fU&&this.collapsed){af(fU,fP,fS+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(fU){ea(fU.doc)}}if(fU){ac(fU,"markerCleared",fU,this)}if(fO){aj(fU)}if(this.parent){this.parent.clear()}};P.prototype.find=function(fQ,fO){if(fQ==null&&this.type=="bookmark"){fQ=1}var fT,fS;for(var fP=0;fP<this.lines.length;++fP){var fN=this.lines[fP];var fR=eJ(fN.markedSpans,this);if(fR.from!=null){fT=W(fO?fN:bC(fN),fR.from);if(fQ==-1){return fT}}if(fR.to!=null){fS=W(fO?fN:bC(fN),fR.to);if(fQ==1){return fS}}}return fT&&{from:fT,to:fS}};P.prototype.changed=function(){var fP=this.find(-1,true),fO=this,fN=this.doc.cm;if(!fP||!fN){return}cz(fN,function(){var fR=fP.line,fS=bC(fP.line);var fQ=eL(fN,fS);if(fQ){ap(fQ);fN.curOp.selectionChanged=fN.curOp.forceUpdate=true}fN.curOp.updateMaxLine=true;if(!e7(fO.doc,fR)&&fO.height!=null){var fU=fO.height;fO.height=null;var fT=cH(fO)-fU;if(fT){fA(fR,fR.height+fT)}}})};P.prototype.attachLine=function(fN){if(!this.lines.length&&this.doc.cm){var fO=this.doc.cm.curOp;if(!fO.maybeHiddenMarkers||c1(fO.maybeHiddenMarkers,this)==-1){(fO.maybeUnhiddenMarkers||(fO.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(fN)};P.prototype.detachLine=function(fN){this.lines.splice(c1(this.lines,fN),1);if(!this.lines.length&&this.doc.cm){var fO=this.doc.cm.curOp;(fO.maybeHiddenMarkers||(fO.maybeHiddenMarkers=[])).push(this)}};var aV=0;function ej(fV,fT,fU,fX,fR){if(fX&&fX.shared){return O(fV,fT,fU,fX,fR)}if(fV.cm&&!fV.cm.curOp){return cL(fV.cm,ej)(fV,fT,fU,fX,fR)}var fQ=new P(fV,fR),fW=b5(fT,fU);if(fX){aE(fX,fQ,false)}if(fW>0||fW==0&&fQ.clearWhenEmpty!==false){return fQ}if(fQ.replacedWith){fQ.collapsed=true;fQ.widgetNode=fw("span",[fQ.replacedWith],"CodeMirror-widget");if(!fX.handleMouseEvents){fQ.widgetNode.ignoreEvents=true}if(fX.insertLeft){fQ.widgetNode.insertLeft=true}}if(fQ.collapsed){if(A(fV,fT.line,fT,fU,fQ)||fT.line!=fU.line&&A(fV,fU.line,fT,fU,fQ)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}aX=true}if(fQ.addToHistory){fm(fV,{from:fT,to:fU,origin:"markText"},fV.sel,NaN)}var fO=fT.line,fS=fV.cm,fN;fV.iter(fO,fU.line+1,function(fY){if(fS&&fQ.collapsed&&!fS.options.lineWrapping&&z(fY)==fS.display.maxLine){fN=true}if(fQ.collapsed&&fO!=fT.line){fA(fY,0)}b3(fY,new dU(fQ,fO==fT.line?fT.ch:null,fO==fU.line?fU.ch:null));++fO});if(fQ.collapsed){fV.iter(fT.line,fU.line+1,function(fY){if(e7(fV,fY)){fA(fY,0)}})}if(fQ.clearOnEnter){bM(fQ,"beforeCursorEnter",function(){fQ.clear()})}if(fQ.readOnly){fH=true;if(fV.history.done.length||fV.history.undone.length){fV.clearHistory()}}if(fQ.collapsed){fQ.id=++aV;fQ.atomic=true}if(fS){if(fN){fS.curOp.updateMaxLine=true}if(fQ.collapsed){af(fS,fT.line,fU.line+1)}else{if(fQ.className||fQ.title||fQ.startStyle||fQ.endStyle){for(var fP=fT.line;fP<=fU.line;fP++){R(fS,fP,"text")}}}if(fQ.atomic){ea(fS.doc)}ac(fS,"markerAdded",fS,fQ)}return fQ}var y=I.SharedTextMarker=function(fP,fO){this.markers=fP;this.primary=fO;for(var fN=0;fN<fP.length;++fN){fP[fN].parent=this}};bo(y);y.prototype.clear=function(){if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var fN=0;fN<this.markers.length;++fN){this.markers[fN].clear()}ac(this,"clear")};y.prototype.find=function(fO,fN){return this.primary.find(fO,fN)};function O(fR,fU,fT,fN,fP){fN=aE(fN);fN.shared=false;var fS=[ej(fR,fU,fT,fN,fP)],fO=fS[0];var fQ=fN.widgetNode;dK(fR,function(fW){if(fQ){fN.widgetNode=fQ.cloneNode(true)}fS.push(ej(fW,fj(fW,fU),fj(fW,fT),fN,fP));for(var fV=0;fV<fW.linked.length;++fV){if(fW.linked[fV].isParent){return}}fO=fh(fS)});return new y(fS,fO)}function es(fN){return fN.findMarks(W(fN.first,0),fN.clipPos(W(fN.lastLine())),function(fO){return fO.parent})}function dk(fS,fT){for(var fQ=0;fQ<fT.length;fQ++){var fO=fT[fQ],fU=fO.find();var fN=fS.clipPos(fU.from),fR=fS.clipPos(fU.to);if(b5(fN,fR)){var fP=ej(fS,fN,fR,fO.primary,fO.primary.type);fO.markers.push(fP);fP.parent=fO}}}function d0(fQ){for(var fP=0;fP<fQ.length;fP++){var fN=fQ[fP],fS=[fN.primary.doc];dK(fN.primary.doc,function(fT){fS.push(fT)});for(var fO=0;fO<fN.markers.length;fO++){var fR=fN.markers[fO];if(c1(fS,fR.doc)==-1){fR.parent=null;fN.markers.splice(fO--,1)}}}}function dU(fN,fP,fO){this.marker=fN;this.from=fP;this.to=fO}function eJ(fP,fN){if(fP){for(var fO=0;fO<fP.length;++fO){var fQ=fP[fO];if(fQ.marker==fN){return fQ}}}}function el(fO,fP){for(var fQ,fN=0;fN<fO.length;++fN){if(fO[fN]!=fP){(fQ||(fQ=[])).push(fO[fN])}}return fQ}function b3(fN,fO){fN.markedSpans=fN.markedSpans?fN.markedSpans.concat([fO]):[fO];fO.marker.attachLine(fN)}function aH(fO,fP,fT){if(fO){for(var fR=0,fU;fR<fO.length;++fR){var fV=fO[fR],fS=fV.marker;var fN=fV.from==null||(fS.inclusiveLeft?fV.from<=fP:fV.from<fP);if(fN||fV.from==fP&&fS.type=="bookmark"&&(!fT||!fV.marker.insertLeft)){var fQ=fV.to==null||(fS.inclusiveRight?fV.to>=fP:fV.to>fP);(fU||(fU=[])).push(new dU(fS,fV.from,fQ?null:fV.to))}}}return fU}function ax(fO,fQ,fT){if(fO){for(var fR=0,fU;fR<fO.length;++fR){var fV=fO[fR],fS=fV.marker;var fP=fV.to==null||(fS.inclusiveRight?fV.to>=fQ:fV.to>fQ);if(fP||fV.from==fQ&&fS.type=="bookmark"&&(!fT||fV.marker.insertLeft)){var fN=fV.from==null||(fS.inclusiveLeft?fV.from<=fQ:fV.from<fQ);(fU||(fU=[])).push(new dU(fS,fN?null:fV.from-fQ,fV.to==null?null:fV.to-fQ))}}}return fU}function dW(fZ,fW){var fV=bW(fZ,fW.from.line)&&eP(fZ,fW.from.line).markedSpans;var f2=bW(fZ,fW.to.line)&&eP(fZ,fW.to.line).markedSpans;if(!fV&&!f2){return null}var fO=fW.from.ch,fR=fW.to.ch,fU=b5(fW.from,fW.to)==0;var fT=aH(fV,fO,fU);var f1=ax(f2,fR,fU);var f0=fW.text.length==1,fP=fh(fW.text).length+(f0?fO:0);if(fT){for(var fQ=0;fQ<fT.length;++fQ){var fY=fT[fQ];if(fY.to==null){var f3=eJ(f1,fY.marker);if(!f3){fY.to=fO}else{if(f0){fY.to=f3.to==null?null:f3.to+fP}}}}}if(f1){for(var fQ=0;fQ<f1.length;++fQ){var fY=f1[fQ];if(fY.to!=null){fY.to+=fP}if(fY.from==null){var f3=eJ(fT,fY.marker);if(!f3){fY.from=fP;if(f0){(fT||(fT=[])).push(fY)}}}else{fY.from+=fP;if(f0){(fT||(fT=[])).push(fY)}}}}if(fT){fT=r(fT)}if(f1&&f1!=fT){f1=r(f1)}var fS=[fT];if(!f0){var fX=fW.text.length-2,fN;if(fX>0&&fT){for(var fQ=0;fQ<fT.length;++fQ){if(fT[fQ].to==null){(fN||(fN=[])).push(new dU(fT[fQ].marker,null,null))}}}for(var fQ=0;fQ<fX;++fQ){fS.push(fN)}fS.push(f1)}return fS}function r(fO){for(var fN=0;fN<fO.length;++fN){var fP=fO[fN];if(fP.from!=null&&fP.from==fP.to&&fP.marker.clearWhenEmpty!==false){fO.splice(fN--,1)}}if(!fO.length){return null}return fO}function dM(fV,fT){var fN=bS(fV,fT);var fW=dW(fV,fT);if(!fN){return fW}if(!fW){return fN}for(var fQ=0;fQ<fN.length;++fQ){var fR=fN[fQ],fS=fW[fQ];if(fR&&fS){spans:for(var fP=0;fP<fS.length;++fP){var fU=fS[fP];for(var fO=0;fO<fR.length;++fO){if(fR[fO].marker==fU.marker){continue spans}}fR.push(fU)}}else{if(fS){fN[fQ]=fS}}}return fN}function cv(fZ,fX,fY){var fR=null;fZ.iter(fX.line,fY.line+1,function(f0){if(f0.markedSpans){for(var f1=0;f1<f0.markedSpans.length;++f1){var f2=f0.markedSpans[f1].marker;if(f2.readOnly&&(!fR||c1(fR,f2)==-1)){(fR||(fR=[])).push(f2)}}}});if(!fR){return null}var fS=[{from:fX,to:fY}];for(var fT=0;fT<fR.length;++fT){var fU=fR[fT],fP=fU.find(0);for(var fQ=0;fQ<fS.length;++fQ){var fO=fS[fQ];if(b5(fO.to,fP.from)<0||b5(fO.from,fP.to)>0){continue}var fW=[fQ,1],fN=b5(fO.from,fP.from),fV=b5(fO.to,fP.to);if(fN<0||!fU.inclusiveLeft&&!fN){fW.push({from:fO.from,to:fP.from})}if(fV>0||!fU.inclusiveRight&&!fV){fW.push({from:fP.to,to:fO.to})}fS.splice.apply(fS,fW);fQ+=fW.length-1}}return fS}function fD(fN){var fP=fN.markedSpans;if(!fP){return}for(var fO=0;fO<fP.length;++fO){fP[fO].marker.detachLine(fN)}fN.markedSpans=null}function cM(fN,fP){if(!fP){return}for(var fO=0;fO<fP.length;++fO){fP[fO].marker.attachLine(fN)}fN.markedSpans=fP}function w(fN){return fN.inclusiveLeft?-1:0}function bL(fN){return fN.inclusiveRight?1:0}function du(fQ,fO){var fS=fQ.lines.length-fO.lines.length;if(fS!=0){return fS}var fP=fQ.find(),fT=fO.find();var fN=b5(fP.from,fT.from)||w(fQ)-w(fO);if(fN){return -fN}var fR=b5(fP.to,fT.to)||bL(fQ)-bL(fO);if(fR){return fR}return fO.id-fQ.id}function aW(fO,fS){var fN=aX&&fO.markedSpans,fR;if(fN){for(var fQ,fP=0;fP<fN.length;++fP){fQ=fN[fP];if(fQ.marker.collapsed&&(fS?fQ.from:fQ.to)==null&&(!fR||du(fR,fQ.marker)<0)){fR=fQ.marker}}}return fR}function er(fN){return aW(fN,true)}function d7(fN){return aW(fN,false)}function A(fV,fP,fT,fU,fR){var fY=eP(fV,fP);var fN=aX&&fY.markedSpans;if(fN){for(var fQ=0;fQ<fN.length;++fQ){var fO=fN[fQ];if(!fO.marker.collapsed){continue}var fX=fO.marker.find(0);var fW=b5(fX.from,fT)||w(fO.marker)-w(fR);var fS=b5(fX.to,fU)||bL(fO.marker)-bL(fR);if(fW>=0&&fS<=0||fW<=0&&fS>=0){continue}if(fW<=0&&(b5(fX.to,fT)||bL(fO.marker)-w(fR))>0||fW>=0&&(b5(fX.from,fU)||w(fO.marker)-bL(fR))<0){return true}}}}function z(fO){var fN;while(fN=er(fO)){fO=fN.find(-1,true).line}return fO}function i(fP){var fN,fO;while(fN=d7(fP)){fP=fN.find(1,true).line;(fO||(fO=[])).push(fP)}return fO}function aM(fQ,fO){var fN=eP(fQ,fO),fP=z(fN);if(fN==fP){return fO}return bC(fP)}function dG(fQ,fP){if(fP>fQ.lastLine()){return fP}var fO=eP(fQ,fP),fN;if(!e7(fQ,fO)){return fP}while(fN=d7(fO)){fO=fN.find(1,true).line}return bC(fO)+1}function e7(fR,fO){var fN=aX&&fO.markedSpans;if(fN){for(var fQ,fP=0;fP<fN.length;++fP){fQ=fN[fP];if(!fQ.marker.collapsed){continue}if(fQ.from==null){return true}if(fQ.marker.widgetNode){continue}if(fQ.from==0&&fQ.marker.inclusiveLeft&&T(fR,fO,fQ)){return true}}}}function T(fS,fO,fQ){if(fQ.to==null){var fN=fQ.marker.find(1,true);return T(fS,fN.line,eJ(fN.line.markedSpans,fQ.marker))}if(fQ.marker.inclusiveRight&&fQ.to==fO.text.length){return true}for(var fR,fP=0;fP<fO.markedSpans.length;++fP){fR=fO.markedSpans[fP];if(fR.marker.collapsed&&!fR.marker.widgetNode&&fR.from==fQ.to&&(fR.to==null||fR.to!=fQ.from)&&(fR.marker.inclusiveLeft||fQ.marker.inclusiveRight)&&T(fS,fO,fR)){return true}}}var dh=I.LineWidget=function(fN,fQ,fO){if(fO){for(var fP in fO){if(fO.hasOwnProperty(fP)){this[fP]=fO[fP]}}}this.cm=fN;this.node=fQ};bo(dh);function dD(fN,fO,fP){if(bB(fO)<((fN.curOp&&fN.curOp.scrollTop)||fN.doc.scrollTop)){cy(fN,null,fP)}}dh.prototype.clear=function(){var fO=this.cm,fQ=this.line.widgets,fP=this.line,fS=bC(fP);if(fS==null||!fQ){return}for(var fR=0;fR<fQ.length;++fR){if(fQ[fR]==this){fQ.splice(fR--,1)}}if(!fQ.length){fP.widgets=null}var fN=cH(this);cz(fO,function(){dD(fO,fP,-fN);R(fO,fS,"widget");fA(fP,Math.max(0,fP.height-fN))})};dh.prototype.changed=function(){var fO=this.height,fN=this.cm,fP=this.line;this.height=null;var fQ=cH(this)-fO;if(!fQ){return}cz(fN,function(){fN.curOp.forceUpdate=true;dD(fN,fP,fQ);fA(fP,fP.height+fQ)})};function cH(fN){if(fN.height!=null){return fN.height}if(!fF(document.body,fN.node)){bG(fN.cm.display.measure,fw("div",[fN.node],null,"position: relative"))}return fN.height=fN.node.offsetHeight}function bw(fN,fR,fP,fO){var fQ=new dh(fN,fP,fO);if(fQ.noHScroll){fN.display.alignWidgets=true}eb(fN,fR,"widget",function(fT){var fU=fT.widgets||(fT.widgets=[]);if(fQ.insertAt==null){fU.push(fQ)}else{fU.splice(Math.min(fU.length-1,Math.max(0,fQ.insertAt)),0,fQ)}fQ.line=fT;if(!e7(fN.doc,fT)){var fS=bB(fT)<fN.doc.scrollTop;fA(fT,fT.height+cH(fQ));if(fS){cy(fN,null,fQ.height)}fN.curOp.forceUpdate=true}return true});return fQ}var fC=I.Line=function(fP,fO,fN){this.text=fP;cM(this,fO);this.height=fN?fN(this):1};bo(fC);fC.prototype.lineNo=function(){return bC(this)};function dZ(fO,fR,fP,fN){fO.text=fR;if(fO.stateAfter){fO.stateAfter=null}if(fO.styles){fO.styles=null}if(fO.order!=null){fO.order=null}fD(fO);cM(fO,fP);var fQ=fN?fN(fO):1;if(fQ!=fO.height){fA(fO,fQ)}}function bq(fN){fN.parent=null;fD(fN)}function c2(fP,fO){if(fP){for(;;){var fN=fP.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!fN){break}fP=fP.slice(0,fN.index)+fP.slice(fN.index+fN[0].length);var fQ=fN[1]?"bgClass":"textClass";if(fO[fQ]==null){fO[fQ]=fN[2]}else{if(!(new RegExp("(?:^|s)"+fN[2]+"(?:$|s)")).test(fO[fQ])){fO[fQ]+=" "+fN[2]}}}}return fP}function e1(fP,fO){if(fP.blankLine){return fP.blankLine(fO)}if(!fP.innerMode){return}var fN=I.innerMode(fP,fO);if(fN.mode.blankLine){return fN.mode.blankLine(fN.state)}}function ef(fR,fQ,fP){for(var fN=0;fN<10;fN++){var fO=fR.token(fQ,fP);if(fQ.pos>fQ.start){return fO}}throw new Error("Mode "+fR.name+" failed to advance stream.")}function x(fX,fZ,fS,fO,fT,fQ,fR){var fP=fS.flattenSpans;if(fP==null){fP=fX.options.flattenSpans}var fV=0,fU=null;var fY=new ew(fZ,fX.options.tabSize),fN;if(fZ==""){c2(e1(fS,fO),fQ)}while(!fY.eol()){if(fY.pos>fX.options.maxHighlightLength){fP=false;if(fR){dc(fX,fZ,fO,fY.pos)}fY.pos=fZ.length;fN=null}else{fN=c2(ef(fS,fY,fO),fQ)}if(fX.options.addModeClass){var f0=I.innerMode(fS,fO).mode.name;if(f0){fN="m-"+(fN?f0+" "+fN:f0)}}if(!fP||fU!=fN){if(fV<fY.start){fT(fY.start,fU)}fV=fY.start;fU=fN}fY.start=fY.pos}while(fV<fY.pos){var fW=Math.min(fY.pos,fV+50000);fT(fW,fU);fV=fW}}function fa(fU,fW,fN,fR){var fV=[fU.state.modeGen],fQ={};x(fU,fW.text,fU.doc.mode,fN,function(fX,fY){fV.push(fX,fY)},fQ,fR);for(var fO=0;fO<fU.state.overlays.length;++fO){var fS=fU.state.overlays[fO],fT=1,fP=0;x(fU,fW.text,fS.mode,true,function(fX,fZ){var f1=fT;while(fP<fX){var fY=fV[fT];if(fY>fX){fV.splice(fT,1,fX,fV[fT+1],fY)}fT+=2;fP=Math.min(fX,fY)}if(!fZ){return}if(fS.opaque){fV.splice(f1,fT-f1,fX,"cm-overlay "+fZ);fT=f1+2}else{for(;f1<fT;f1+=2){var f0=fV[f1+1];fV[f1+1]=(f0?f0+" ":"")+"cm-overlay "+fZ}}},fQ)}return{styles:fV,classes:fQ.bgClass||fQ.textClass?fQ:null}}function cQ(fO,fP){if(!fP.styles||fP.styles[0]!=fO.state.modeGen){var fN=fa(fO,fP,fP.stateAfter=dg(fO,bC(fP)));fP.styles=fN.styles;if(fN.classes){fP.styleClasses=fN.classes}else{if(fP.styleClasses){fP.styleClasses=null}}}return fP.styles}function dc(fN,fS,fP,fO){var fR=fN.doc.mode;var fQ=new ew(fS,fN.options.tabSize);fQ.start=fQ.pos=fO||0;if(fS==""){e1(fR,fP)}while(!fQ.eol()&&fQ.pos<=fN.options.maxHighlightLength){ef(fR,fQ,fP);fQ.start=fQ.pos}}var dz={},bQ={};function ez(fP,fO){if(!fP||/^\s*$/.test(fP)){return null}var fN=fO.addModeClass?bQ:dz;return fN[fP]||(fN[fP]=fP.replace(/\S+/g,"cm-$&"))}function ev(fO,fS){var fT=fw("span",null,null,cJ?"padding-right: .1px":null);var fQ={pre:fw("pre",[fT]),content:fT,col:0,pos:0,cm:fO};fS.measure={};for(var fR=0;fR<=(fS.rest?fS.rest.length:0);fR++){var fP=fR?fS.rest[fR-1]:fS.line,fN;fQ.pos=0;fQ.addToken=u;if((dn||cJ)&&fO.getOption("lineWrapping")){fQ.addToken=ff(fQ.addToken)}if(bD(fO.display.measure)&&(fN=a(fP))){fQ.addToken=U(fQ.addToken,fN)}fQ.map=[];bf(fP,fQ,cQ(fO,fP));if(fP.styleClasses){if(fP.styleClasses.bgClass){fQ.bgClass=fr(fP.styleClasses.bgClass,fQ.bgClass||"")}if(fP.styleClasses.textClass){fQ.textClass=fr(fP.styleClasses.textClass,fQ.textClass||"")}}if(fQ.map.length==0){fQ.map.push(0,0,fQ.content.appendChild(bd(fO.display.measure)))}if(fR==0){fS.measure.map=fQ.map;fS.measure.cache={}}else{(fS.measure.maps||(fS.measure.maps=[])).push(fQ.map);(fS.measure.caches||(fS.measure.caches=[])).push({})}}az(fO,"renderLine",fO,fS.line,fQ.pre);return fQ}function eN(fO){var fN=fw("span","\u2022","cm-invalidchar");fN.title="\\u"+fO.charCodeAt(0).toString(16);return fN}function u(fS,f2,fN,fQ,f3,f1){if(!f2){return}var fX=fS.cm.options.specialChars,fW=false;if(!fX.test(f2)){fS.col+=f2.length;var fV=document.createTextNode(f2);fS.map.push(fS.pos,fS.pos+f2.length,fV);if(bY){fW=true}fS.pos+=f2.length}else{var fV=document.createDocumentFragment(),fZ=0;while(true){fX.lastIndex=fZ;var fO=fX.exec(f2);var fU=fO?fO.index-fZ:f2.length-fZ;if(fU){var fR=document.createTextNode(f2.slice(fZ,fZ+fU));if(bY){fV.appendChild(fw("span",[fR]))}else{fV.appendChild(fR)}fS.map.push(fS.pos,fS.pos+fU,fR);fS.col+=fU;fS.pos+=fU}if(!fO){break}fZ+=fU+1;if(fO[0]=="\t"){var fT=fS.cm.options.tabSize,fY=fT-fS.col%fT;var fR=fV.appendChild(fw("span",cf(fY),"cm-tab"));fS.col+=fY}else{var fR=fS.cm.options.specialCharPlaceholder(fO[0]);if(bY){fV.appendChild(fw("span",[fR]))}else{fV.appendChild(fR)}fS.col+=1}fS.map.push(fS.pos,fS.pos+1,fR);fS.pos++}}if(fN||fQ||f3||fW){var f0=fN||"";if(fQ){f0+=fQ}if(f3){f0+=f3}var fP=fw("span",[fV],f0);if(f1){fP.title=f1}return fS.content.appendChild(fP)}fS.content.appendChild(fV)}function ff(fN){function fO(fP){var fQ=" ";for(var fR=0;fR<fP.length-2;++fR){fQ+=fR%2?" ":"\u00a0"}fQ+=" ";return fQ}return function(fQ,fU,fR,fP,fT,fS){fN(fQ,fU.replace(/ {3,}/g,fO),fR,fP,fT,fS)}}function U(fO,fN){return function(fV,fX,fP,fT,fY,fW){fP=fP?fP+" cm-force-border":"cm-force-border";var fQ=fV.pos,fS=fQ+fX.length;for(;;){for(var fU=0;fU<fN.length;fU++){var fR=fN[fU];if(fR.to>fQ&&fR.from<=fQ){break}}if(fR.to>=fS){return fO(fV,fX,fP,fT,fY,fW)}fO(fV,fX.slice(0,fR.to-fQ),fP,fT,null,fW);fT=null;fX=fX.slice(fR.to-fQ);fQ=fR.to}}}function aa(fO,fQ,fN,fP){var fR=!fP&&fN.widgetNode;if(fR){fO.map.push(fO.pos,fO.pos+fQ,fR);fO.content.appendChild(fR)}fO.pos+=fQ}function bf(fW,f2,fV){var fS=fW.markedSpans,fU=fW.text,f0=0;if(!fS){for(var f5=1;f5<fV.length;f5+=2){f2.addToken(f2,fU.slice(f0,f0=fV[f5]),ez(fV[f5+1],f2.cm.options))}return}var f6=fU.length,fR=0,f5=1,fY="",f7;var f9=0,fN,f8,fZ,ga,fP;for(;;){if(f9==fR){fN=f8=fZ=ga="";fP=null;f9=Infinity;var fT=[];for(var f3=0;f3<fS.length;++f3){var f4=fS[f3],f1=f4.marker;if(f4.from<=fR&&(f4.to==null||f4.to>fR)){if(f4.to!=null&&f9>f4.to){f9=f4.to;f8=""}if(f1.className){fN+=" "+f1.className}if(f1.startStyle&&f4.from==fR){fZ+=" "+f1.startStyle}if(f1.endStyle&&f4.to==f9){f8+=" "+f1.endStyle}if(f1.title&&!ga){ga=f1.title}if(f1.collapsed&&(!fP||du(fP.marker,f1)<0)){fP=f4}}else{if(f4.from>fR&&f9>f4.from){f9=f4.from}}if(f1.type=="bookmark"&&f4.from==fR&&f1.widgetNode){fT.push(f1)}}if(fP&&(fP.from||0)==fR){aa(f2,(fP.to==null?f6+1:fP.to)-fR,fP.marker,fP.from==null);if(fP.to==null){return}}if(!fP&&fT.length){for(var f3=0;f3<fT.length;++f3){aa(f2,0,fT[f3])}}}if(fR>=f6){break}var fX=Math.min(f6,f9);while(true){if(fY){var fO=fR+fY.length;if(!fP){var fQ=fO>fX?fY.slice(0,fX-fR):fY;f2.addToken(f2,fQ,f7?f7+fN:fN,fZ,fR+fQ.length==f9?f8:"",ga)}if(fO>=fX){fY=fY.slice(fX-fR);fR=fX;break}fR=fO;fZ=""}fY=fU.slice(f0,f0=fV[f5++]);f7=ez(fV[f5++],f2.cm.options)}}}function dw(fN,fO){return fO.from.ch==0&&fO.to.ch==0&&fh(fO.text)==""&&(!fN.cm||fN.cm.options.wholeLineUpdateBefore)}function e9(f0,fV,fN,fR){function f1(f3){return fN?fN[f3]:null}function fO(f3,f5,f4){dZ(f3,f5,f4,fR);ac(f3,"change",f3,fV)}var fY=fV.from,fZ=fV.to,f2=fV.text;var fW=eP(f0,fY.line),fX=eP(f0,fZ.line);var fU=fh(f2),fQ=f1(f2.length-1),fT=fZ.line-fY.line;if(dw(f0,fV)){for(var fP=0,fS=[];fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}fO(fX,fX.text,fQ);if(fT){f0.remove(fY.line,fT)}if(fS.length){f0.insert(fY.line,fS)}}else{if(fW==fX){if(f2.length==1){fO(fW,fW.text.slice(0,fY.ch)+fU+fW.text.slice(fZ.ch),fQ)}else{for(var fS=[],fP=1;fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}fS.push(new fC(fU+fW.text.slice(fZ.ch),fQ,fR));fO(fW,fW.text.slice(0,fY.ch)+f2[0],f1(0));f0.insert(fY.line+1,fS)}}else{if(f2.length==1){fO(fW,fW.text.slice(0,fY.ch)+f2[0]+fX.text.slice(fZ.ch),f1(0));f0.remove(fY.line+1,fT)}else{fO(fW,fW.text.slice(0,fY.ch)+f2[0],f1(0));fO(fX,fU+fX.text.slice(fZ.ch),fQ);for(var fP=1,fS=[];fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}if(fT>1){f0.remove(fY.line+1,fT-1)}f0.insert(fY.line+1,fS)}}}ac(f0,"change",f0,fV)}function eC(fO){this.lines=fO;this.parent=null;for(var fP=0,fN=0;fP<fO.length;++fP){fO[fP].parent=this;fN+=fO[fP].height}this.height=fN}eC.prototype={chunkSize:function(){return this.lines.length},removeInner:function(fN,fR){for(var fP=fN,fQ=fN+fR;fP<fQ;++fP){var fO=this.lines[fP];this.height-=fO.height;bq(fO);ac(fO,"delete")}this.lines.splice(fN,fR)},collapse:function(fN){fN.push.apply(fN,this.lines)},insertInner:function(fO,fP,fN){this.height+=fN;this.lines=this.lines.slice(0,fO).concat(fP).concat(this.lines.slice(fO));for(var fQ=0;fQ<fP.length;++fQ){fP[fQ].parent=this}},iterN:function(fN,fQ,fP){for(var fO=fN+fQ;fN<fO;++fN){if(fP(this.lines[fN])){return true}}}};function e8(fQ){this.children=fQ;var fP=0,fN=0;for(var fO=0;fO<fQ.length;++fO){var fR=fQ[fO];fP+=fR.chunkSize();fN+=fR.height;fR.parent=this}this.size=fP;this.height=fN;this.parent=null}e8.prototype={chunkSize:function(){return this.size},removeInner:function(fN,fU){this.size-=fU;for(var fP=0;fP<this.children.length;++fP){var fT=this.children[fP],fR=fT.chunkSize();if(fN<fR){var fQ=Math.min(fU,fR-fN),fS=fT.height;fT.removeInner(fN,fQ);this.height-=fS-fT.height;if(fR==fQ){this.children.splice(fP--,1);fT.parent=null}if((fU-=fQ)==0){break}fN=0}else{fN-=fR}}if(this.size-fU<25&&(this.children.length>1||!(this.children[0] instanceof eC))){var fO=[];this.collapse(fO);this.children=[new eC(fO)];this.children[0].parent=this}},collapse:function(fN){for(var fO=0;fO<this.children.length;++fO){this.children[fO].collapse(fN)}},insertInner:function(fO,fP,fN){this.size+=fP.length;this.height+=fN;for(var fS=0;fS<this.children.length;++fS){var fU=this.children[fS],fT=fU.chunkSize();if(fO<=fT){fU.insertInner(fO,fP,fN);if(fU.lines&&fU.lines.length>50){while(fU.lines.length>50){var fR=fU.lines.splice(fU.lines.length-25,25);var fQ=new eC(fR);fU.height-=fQ.height;this.children.splice(fS+1,0,fQ);fQ.parent=this}this.maybeSpill()}break}fO-=fT}},maybeSpill:function(){if(this.children.length<=10){return}var fQ=this;do{var fO=fQ.children.splice(fQ.children.length-5,5);var fP=new e8(fO);if(!fQ.parent){var fR=new e8(fQ.children);fR.parent=fQ;fQ.children=[fR,fP];fQ=fR}else{fQ.size-=fP.size;fQ.height-=fP.height;var fN=c1(fQ.parent.children,fQ);fQ.parent.children.splice(fN+1,0,fP)}fP.parent=fQ.parent}while(fQ.children.length>10);fQ.parent.maybeSpill()},iterN:function(fN,fT,fS){for(var fO=0;fO<this.children.length;++fO){var fR=this.children[fO],fQ=fR.chunkSize();if(fN<fQ){var fP=Math.min(fT,fQ-fN);if(fR.iterN(fN,fP,fS)){return true}if((fT-=fP)==0){break}fN=0}else{fN-=fQ}}}};var cg=0;var ao=I.Doc=function(fP,fO,fN){if(!(this instanceof ao)){return new ao(fP,fO,fN)}if(fN==null){fN=0}e8.call(this,[new eC([new fC("",null)])]);this.first=fN;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.frontier=fN;var fQ=W(fN,0);this.sel=eu(fQ);this.history=new fs(null);this.id=++cg;this.modeOption=fO;if(typeof fP=="string"){fP=aQ(fP)}e9(this,{from:fQ,to:fQ,text:fP});bJ(this,eu(fQ),Y)};ao.prototype=ca(e8.prototype,{constructor:ao,iter:function(fP,fO,fN){if(fN){this.iterN(fP-this.first,fO-fP,fN)}else{this.iterN(this.first,this.first+this.size,fP)}},insert:function(fO,fP){var fN=0;for(var fQ=0;fQ<fP.length;++fQ){fN+=fP[fQ].height}this.insertInner(fO-this.first,fP,fN)},remove:function(fN,fO){this.removeInner(fN-this.first,fO)},getValue:function(fO){var fN=aS(this,this.first,this.first+this.size);if(fO===false){return fN}return fN.join(fO||"\n")},setValue:cs(function(fO){var fP=W(this.first,0),fN=this.first+this.size-1;a5(this,{from:fP,to:W(fN,eP(this,fN).text.length),text:aQ(fO),origin:"setValue"},true);bJ(this,eu(fP))}),replaceRange:function(fO,fQ,fP,fN){fQ=fj(this,fQ);fP=fP?fj(this,fP):fQ;aR(this,fO,fQ,fP,fN)},getRange:function(fQ,fP,fO){var fN=fy(this,fj(this,fQ),fj(this,fP));if(fO===false){return fN}return fN.join(fO||"\n")},getLine:function(fO){var fN=this.getLineHandle(fO);return fN&&fN.text},getLineHandle:function(fN){if(bW(this,fN)){return eP(this,fN)}},getLineNumber:function(fN){return bC(fN)},getLineHandleVisualStart:function(fN){if(typeof fN=="number"){fN=eP(this,fN)}return z(fN)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(fN){return fj(this,fN)},getCursor:function(fP){var fN=this.sel.primary(),fO;if(fP==null||fP=="head"){fO=fN.head}else{if(fP=="anchor"){fO=fN.anchor}else{if(fP=="end"||fP=="to"||fP===false){fO=fN.to()}else{fO=fN.from()}}}return fO},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:cs(function(fN,fP,fO){G(this,fj(this,typeof fN=="number"?W(fN,fP||0):fN),null,fO)}),setSelection:cs(function(fO,fP,fN){G(this,fj(this,fO),fj(this,fP||fO),fN)}),extendSelection:cs(function(fP,fN,fO){ft(this,fj(this,fP),fN&&fj(this,fN),fO)}),extendSelections:cs(function(fO,fN){at(this,dC(this,fO,fN))}),extendSelectionsBy:cs(function(fO,fN){at(this,bH(this.sel.ranges,fO),fN)}),setSelections:cs(function(fN,fR,fP){if(!fN.length){return}for(var fQ=0,fO=[];fQ<fN.length;fQ++){fO[fQ]=new dB(fj(this,fN[fQ].anchor),fj(this,fN[fQ].head))}if(fR==null){fR=Math.min(fN.length-1,this.sel.primIndex)}bJ(this,cm(fO,fR),fP)}),addSelection:cs(function(fP,fQ,fO){var fN=this.sel.ranges.slice(0);fN.push(new dB(fj(this,fP),fj(this,fQ||fP)));bJ(this,cm(fN,fN.length-1),fO)}),getSelection:function(fR){var fO=this.sel.ranges,fN;for(var fP=0;fP<fO.length;fP++){var fQ=fy(this,fO[fP].from(),fO[fP].to());fN=fN?fN.concat(fQ):fQ}if(fR===false){return fN}else{return fN.join(fR||"\n")}},getSelections:function(fR){var fQ=[],fN=this.sel.ranges;for(var fO=0;fO<fN.length;fO++){var fP=fy(this,fN[fO].from(),fN[fO].to());if(fR!==false){fP=fP.join(fR||"\n")}fQ[fO]=fP}return fQ},replaceSelection:function(fP,fR,fN){var fQ=[];for(var fO=0;fO<this.sel.ranges.length;fO++){fQ[fO]=fP}this.replaceSelections(fQ,fR,fN||"+input")},replaceSelections:cs(function(fS,fU,fP){var fR=[],fT=this.sel;for(var fQ=0;fQ<fT.ranges.length;fQ++){var fO=fT.ranges[fQ];fR[fQ]={from:fO.from(),to:fO.to(),text:aQ(fS[fQ]),origin:fP}}var fN=fU&&fU!="end"&&ad(this,fR,fU);for(var fQ=fR.length-1;fQ>=0;fQ--){a5(this,fR[fQ])}if(fN){eH(this,fN)}else{if(this.cm){fg(this.cm)}}}),undo:cs(function(){bV(this,"undo")}),redo:cs(function(){bV(this,"redo")}),undoSelection:cs(function(){bV(this,"undo",true)}),redoSelection:cs(function(){bV(this,"redo",true)}),setExtending:function(fN){this.extend=fN},getExtending:function(){return this.extend},historySize:function(){var fQ=this.history,fN=0,fP=0;for(var fO=0;fO<fQ.done.length;fO++){if(!fQ.done[fO].ranges){++fN}}for(var fO=0;fO<fQ.undone.length;fO++){if(!fQ.undone[fO].ranges){++fP}}return{undo:fN,redo:fP}},clearHistory:function(){this.history=new fs(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(fN){if(fN){this.history.lastOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(fN){return this.history.generation==(fN||this.cleanGeneration)},getHistory:function(){return{done:bE(this.history.done),undone:bE(this.history.undone)}},setHistory:function(fO){var fN=this.history=new fs(this.history.maxGeneration);fN.done=bE(fO.done.slice(0),null,true);fN.undone=bE(fO.undone.slice(0),null,true)},markText:function(fP,fO,fN){return ej(this,fj(this,fP),fj(this,fO),fN,"range")},setBookmark:function(fP,fN){var fO={replacedWith:fN&&(fN.nodeType==null?fN.widget:fN),insertLeft:fN&&fN.insertLeft,clearWhenEmpty:false,shared:fN&&fN.shared};fP=fj(this,fP);return ej(this,fP,fP,fO,"bookmark")},findMarksAt:function(fR){fR=fj(this,fR);var fQ=[],fO=eP(this,fR.line).markedSpans;if(fO){for(var fN=0;fN<fO.length;++fN){var fP=fO[fN];if((fP.from==null||fP.from<=fR.ch)&&(fP.to==null||fP.to>=fR.ch)){fQ.push(fP.marker.parent||fP.marker)}}}return fQ},findMarks:function(fR,fQ,fN){fR=fj(this,fR);fQ=fj(this,fQ);var fO=[],fP=fR.line;this.iter(fR.line,fQ.line+1,function(fS){var fU=fS.markedSpans;if(fU){for(var fT=0;fT<fU.length;fT++){var fV=fU[fT];if(!(fP==fR.line&&fR.ch>fV.to||fV.from==null&&fP!=fR.line||fP==fQ.line&&fV.from>fQ.ch)&&(!fN||fN(fV.marker))){fO.push(fV.marker.parent||fV.marker)}}}++fP});return fO},getAllMarks:function(){var fN=[];this.iter(function(fP){var fO=fP.markedSpans;if(fO){for(var fQ=0;fQ<fO.length;++fQ){if(fO[fQ].from!=null){fN.push(fO[fQ].marker)}}}});return fN},posFromIndex:function(fO){var fN,fP=this.first;this.iter(function(fQ){var fR=fQ.text.length+1;if(fR>fO){fN=fO;return true}fO-=fR;++fP});return fj(this,W(fP,fN))},indexFromPos:function(fO){fO=fj(this,fO);var fN=fO.ch;if(fO.line<this.first||fO.ch<0){return 0}this.iter(this.first,fO.line,function(fP){fN+=fP.text.length+1});return fN},copy:function(fN){var fO=new ao(aS(this,this.first,this.first+this.size),this.modeOption,this.first);fO.scrollTop=this.scrollTop;fO.scrollLeft=this.scrollLeft;fO.sel=this.sel;fO.extend=false;if(fN){fO.history.undoDepth=this.history.undoDepth;fO.setHistory(this.getHistory())}return fO},linkedDoc:function(fN){if(!fN){fN={}}var fQ=this.first,fP=this.first+this.size;if(fN.from!=null&&fN.from>fQ){fQ=fN.from}if(fN.to!=null&&fN.to<fP){fP=fN.to}var fO=new ao(aS(this,fQ,fP),fN.mode||this.modeOption,fQ);if(fN.sharedHist){fO.history=this.history}(this.linked||(this.linked=[])).push({doc:fO,sharedHist:fN.sharedHist});fO.linked=[{doc:this,isParent:true,sharedHist:fN.sharedHist}];dk(fO,es(this));return fO},unlinkDoc:function(fO){if(fO instanceof I){fO=fO.doc}if(this.linked){for(var fP=0;fP<this.linked.length;++fP){var fQ=this.linked[fP];if(fQ.doc!=fO){continue}this.linked.splice(fP,1);fO.unlinkDoc(this);d0(es(this));break}}if(fO.history==this.history){var fN=[fO.id];dK(fO,function(fR){fN.push(fR.id)},true);fO.history=new fs(null);fO.history.done=bE(this.history.done,fN);fO.history.undone=bE(this.history.undone,fN)}},iterLinkedDocs:function(fN){dK(this,fN)},getMode:function(){return this.mode},getEditor:function(){return this.cm}});ao.prototype.eachLine=ao.prototype.iter;var e="iter insert remove copy getEditor".split(" ");for(var bz in ao.prototype){if(ao.prototype.hasOwnProperty(bz)&&c1(e,bz)<0){I.prototype[bz]=(function(fN){return function(){return fN.apply(this.doc,arguments)}})(ao.prototype[bz])}}bo(ao);function dK(fQ,fP,fO){function fN(fW,fU,fS){if(fW.linked){for(var fT=0;fT<fW.linked.length;++fT){var fR=fW.linked[fT];if(fR.doc==fU){continue}var fV=fS&&fR.sharedHist;if(fO&&!fV){continue}fP(fR.doc,fV);fN(fR.doc,fW,fV)}}}fN(fQ,null,true)}function dN(fN,fO){if(fO.cm){throw new Error("This document is already in use.")}fN.doc=fO;fO.cm=fN;X(fN);bh(fN);if(!fN.options.lineWrapping){h(fN)}fN.options.mode=fO.modeOption;af(fN)}function eP(fQ,fS){fS-=fQ.first;if(fS<0||fS>=fQ.size){throw new Error("There is no line "+(fS+fQ.first)+" in the document.")}for(var fN=fQ;!fN.lines;){for(var fO=0;;++fO){var fR=fN.children[fO],fP=fR.chunkSize();if(fS<fP){fN=fR;break}fS-=fP}}return fN.lines[fS]}function fy(fP,fR,fN){var fO=[],fQ=fR.line;fP.iter(fR.line,fN.line+1,function(fS){var fT=fS.text;if(fQ==fN.line){fT=fT.slice(0,fN.ch)}if(fQ==fR.line){fT=fT.slice(fR.ch)}fO.push(fT);++fQ});return fO}function aS(fO,fQ,fP){var fN=[];fO.iter(fQ,fP,function(fR){fN.push(fR.text)});return fN}function fA(fO,fN){var fP=fN-fO.height;if(fP){for(var fQ=fO;fQ;fQ=fQ.parent){fQ.height+=fP}}}function bC(fN){if(fN.parent==null){return null}var fR=fN.parent,fQ=c1(fR.lines,fN);for(var fO=fR.parent;fO;fR=fO,fO=fO.parent){for(var fP=0;;++fP){if(fO.children[fP]==fR){break}fQ+=fO.children[fP].chunkSize()}}return fQ+fR.first}function bv(fP,fS){var fU=fP.first;outer:do{for(var fQ=0;fQ<fP.children.length;++fQ){var fT=fP.children[fQ],fR=fT.height;if(fS<fR){fP=fT;continue outer}fS-=fR;fU+=fT.chunkSize()}return fU}while(!fP.lines);for(var fQ=0;fQ<fP.lines.length;++fQ){var fO=fP.lines[fQ],fN=fO.height;if(fS<fN){break}fS-=fN}return fU+fQ}function bB(fP){fP=z(fP);var fR=0,fO=fP.parent;for(var fQ=0;fQ<fO.lines.length;++fQ){var fN=fO.lines[fQ];if(fN==fP){break}else{fR+=fN.height}}for(var fS=fO.parent;fS;fO=fS,fS=fO.parent){for(var fQ=0;fQ<fS.children.length;++fQ){var fT=fS.children[fQ];if(fT==fO){break}else{fR+=fT.height}}}return fR}function a(fO){var fN=fO.order;if(fN==null){fN=fO.order=a6(fO.text)}return fN}function fs(fN){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=fN||1}function da(fN,fP){var fO={from:b9(fP.from),to:cG(fP),text:fy(fN,fP.from,fP.to)};bN(fN,fO,fP.from.line,fP.to.line+1);dK(fN,function(fQ){bN(fQ,fO,fP.from.line,fP.to.line+1)},true);return fO}function fc(fO){while(fO.length){var fN=fh(fO);if(fN.ranges){fO.pop()}else{break}}}function eq(fO,fN){if(fN){fc(fO.done);return fh(fO.done)}else{if(fO.done.length&&!fh(fO.done).ranges){return fh(fO.done)}else{if(fO.done.length>1&&!fO.done[fO.done.length-2].ranges){fO.done.pop();return fh(fO.done)}}}}function fm(fT,fR,fN,fQ){var fP=fT.history;fP.undone.length=0;var fO=+new Date,fU;if((fP.lastOp==fQ||fP.lastOrigin==fR.origin&&fR.origin&&((fR.origin.charAt(0)=="+"&&fT.cm&&fP.lastModTime>fO-fT.cm.options.historyEventDelay)||fR.origin.charAt(0)=="*"))&&(fU=eq(fP,fP.lastOp==fQ))){var fV=fh(fU.changes);if(b5(fR.from,fR.to)==0&&b5(fR.from,fV.to)==0){fV.to=cG(fR)}else{fU.changes.push(da(fT,fR))}}else{var fS=fh(fP.done);if(!fS||!fS.ranges){cA(fT.sel,fP.done)}fU={changes:[da(fT,fR)],generation:fP.generation};fP.done.push(fU);while(fP.done.length>fP.undoDepth){fP.done.shift();if(!fP.done[0].ranges){fP.done.shift()}}}fP.done.push(fN);fP.generation=++fP.maxGeneration;fP.lastModTime=fP.lastSelTime=fO;fP.lastOp=fQ;fP.lastOrigin=fP.lastSelOrigin=fR.origin;if(!fV){az(fT,"historyAdded")}}function bp(fR,fN,fP,fQ){var fO=fN.charAt(0);return fO=="*"||fO=="+"&&fP.ranges.length==fQ.ranges.length&&fP.somethingSelected()==fQ.somethingSelected()&&new Date-fR.history.lastSelTime<=(fR.cm?fR.cm.options.historyEventDelay:500)}function fG(fS,fQ,fN,fP){var fR=fS.history,fO=fP&&fP.origin;if(fN==fR.lastOp||(fO&&fR.lastSelOrigin==fO&&(fR.lastModTime==fR.lastSelTime&&fR.lastOrigin==fO||bp(fS,fO,fh(fR.done),fQ)))){fR.done[fR.done.length-1]=fQ}else{cA(fQ,fR.done)}fR.lastSelTime=+new Date;fR.lastSelOrigin=fO;fR.lastOp=fN;if(fP&&fP.clearRedo!==false){fc(fR.undone)}}function cA(fO,fN){var fP=fh(fN);if(!(fP&&fP.ranges&&fP.equals(fO))){fN.push(fO)}}function bN(fO,fS,fR,fQ){var fN=fS["spans_"+fO.id],fP=0;fO.iter(Math.max(fO.first,fR),Math.min(fO.first+fO.size,fQ),function(fT){if(fT.markedSpans){(fN||(fN=fS["spans_"+fO.id]={}))[fP]=fT.markedSpans}++fP})}function bb(fP){if(!fP){return null}for(var fO=0,fN;fO<fP.length;++fO){if(fP[fO].marker.explicitlyCleared){if(!fN){fN=fP.slice(0,fO)}}else{if(fN){fN.push(fP[fO])}}}return !fN?fP:fN.length?fN:null}function bS(fQ,fR){var fP=fR["spans_"+fQ.id];if(!fP){return null}for(var fO=0,fN=[];fO<fR.text.length;++fO){fN.push(bb(fP[fO]))}return fN}function bE(fY,fQ,fX){for(var fT=0,fO=[];fT<fY.length;++fT){var fP=fY[fT];if(fP.ranges){fO.push(fX?fx.prototype.deepCopy.call(fP):fP);continue}var fV=fP.changes,fW=[];fO.push({changes:fW});for(var fS=0;fS<fV.length;++fS){var fU=fV[fS],fR;fW.push({from:fU.from,to:fU.to,text:fU.text});if(fQ){for(var fN in fU){if(fR=fN.match(/^spans_(\d+)$/)){if(c1(fQ,Number(fR[1]))>-1){fh(fW)[fN]=fU[fN];delete fU[fN]}}}}}}return fO}function J(fQ,fP,fO,fN){if(fO<fQ.line){fQ.line+=fN}else{if(fP<fQ.line){fQ.line=fP;fQ.ch=0}}}function eR(fQ,fS,fT,fU){for(var fP=0;fP<fQ.length;++fP){var fN=fQ[fP],fR=true;if(fN.ranges){if(!fN.copied){fN=fQ[fP]=fN.deepCopy();fN.copied=true}for(var fO=0;fO<fN.ranges.length;fO++){J(fN.ranges[fO].anchor,fS,fT,fU);J(fN.ranges[fO].head,fS,fT,fU)}continue}for(var fO=0;fO<fN.changes.length;++fO){var fV=fN.changes[fO];if(fT<fV.from.line){fV.from=W(fV.from.line+fU,fV.from.ch);fV.to=W(fV.to.line+fU,fV.to.ch)}else{if(fS<=fV.to.line){fR=false;break}}}if(!fR){fQ.splice(0,fP+1);fP=0}}}function dj(fO,fR){var fQ=fR.from.line,fP=fR.to.line,fN=fR.text.length-(fP-fQ)-1;eR(fO.done,fQ,fP,fN);eR(fO.undone,fQ,fP,fN)}var cu=I.e_preventDefault=function(fN){if(fN.preventDefault){fN.preventDefault()}else{fN.returnValue=false}};var c6=I.e_stopPropagation=function(fN){if(fN.stopPropagation){fN.stopPropagation()}else{fN.cancelBubble=true}};function bA(fN){return fN.defaultPrevented!=null?fN.defaultPrevented:fN.returnValue==false}var d3=I.e_stop=function(fN){cu(fN);c6(fN)};function L(fN){return fN.target||fN.srcElement}function fn(fO){var fN=fO.which;if(fN==null){if(fO.button&1){fN=1}else{if(fO.button&2){fN=3}else{if(fO.button&4){fN=2}}}}if(bU&&fO.ctrlKey&&fN==1){fN=3}return fN}var bM=I.on=function(fQ,fO,fP){if(fQ.addEventListener){fQ.addEventListener(fO,fP,false)}else{if(fQ.attachEvent){fQ.attachEvent("on"+fO,fP)}else{var fR=fQ._handlers||(fQ._handlers={});var fN=fR[fO]||(fR[fO]=[]);fN.push(fP)}}};var dP=I.off=function(fR,fP,fQ){if(fR.removeEventListener){fR.removeEventListener(fP,fQ,false)}else{if(fR.detachEvent){fR.detachEvent("on"+fP,fQ)}else{var fN=fR._handlers&&fR._handlers[fP];if(!fN){return}for(var fO=0;fO<fN.length;++fO){if(fN[fO]==fQ){fN.splice(fO,1);break}}}}};var az=I.signal=function(fR,fQ){var fN=fR._handlers&&fR._handlers[fQ];if(!fN){return}var fO=Array.prototype.slice.call(arguments,2);for(var fP=0;fP<fN.length;++fP){fN[fP].apply(null,fO)}};var be,ch=0;function ac(fS,fR){var fN=fS._handlers&&fS._handlers[fR];if(!fN){return}var fP=Array.prototype.slice.call(arguments,2);if(!be){++ch;be=[];setTimeout(ec,0)}function fO(fT){return function(){fT.apply(null,fP)}}for(var fQ=0;fQ<fN.length;++fQ){be.push(fO(fN[fQ]))}}function ec(){--ch;var fN=be;be=null;for(var fO=0;fO<fN.length;++fO){fN[fO]()}}function aI(fN,fP,fO){az(fN,fO||fP.type,fN,fP);return bA(fP)||fP.codemirrorIgnore}function V(fO){var fN=fO._handlers&&fO._handlers.cursorActivity;if(!fN){return}var fQ=fO.curOp.cursorActivityHandlers||(fO.curOp.cursorActivityHandlers=[]);for(var fP=0;fP<fN.length;++fP){if(c1(fQ,fN[fP])==-1){fQ.push(fN[fP])}}}function eS(fP,fO){var fN=fP._handlers&&fP._handlers[fO];return fN&&fN.length>0}function bo(fN){fN.prototype.on=function(fO,fP){bM(this,fO,fP)};fN.prototype.off=function(fO,fP){dP(this,fO,fP)}}var ba=30;var bZ=I.Pass={toString:function(){return"CodeMirror.Pass"}};var Y={scroll:false},M={origin:"*mouse"},cF={origin:"+move"};function fM(){this.id=null}fM.prototype.set=function(fN,fO){clearTimeout(this.id);this.id=setTimeout(fO,fN)};var bI=I.countColumn=function(fQ,fO,fS,fT,fP){if(fO==null){fO=fQ.search(/[^\s\u00a0]/);if(fO==-1){fO=fQ.length}}for(var fR=fT||0,fU=fP||0;;){var fN=fQ.indexOf("\t",fR);if(fN<0||fN>=fO){return fU+(fO-fR)}fU+=fN-fR;fU+=fS-(fU%fS);fR=fN+1}};function d2(fR,fQ,fS){for(var fT=0,fP=0;;){var fO=fR.indexOf("\t",fT);if(fO==-1){fO=fR.length}var fN=fO-fT;if(fO==fR.length||fP+fN>=fQ){return fT+Math.min(fN,fQ-fP)}fP+=fO-fT;fP+=fS-(fP%fS);fT=fO+1;if(fP>=fQ){return fT}}}var aP=[""];function cf(fN){while(aP.length<=fN){aP.push(fh(aP)+" ")}return aP[fN]}function fh(fN){return fN[fN.length-1]}var dq=function(fN){fN.select()};if(eD){dq=function(fN){fN.selectionStart=0;fN.selectionEnd=fN.value.length}}else{if(dn){dq=function(fO){try{fO.select()}catch(fN){}}}}function c1(fP,fN){for(var fO=0;fO<fP.length;++fO){if(fP[fO]==fN){return fO}}return -1}if([].indexOf){c1=function(fO,fN){return fO.indexOf(fN)}}function bH(fQ,fP){var fN=[];for(var fO=0;fO<fQ.length;fO++){fN[fO]=fP(fQ[fO],fO)}return fN}if([].map){bH=function(fO,fN){return fO.map(fN)}}function ca(fQ,fN){var fP;if(Object.create){fP=Object.create(fQ)}else{var fO=function(){};fO.prototype=fQ;fP=new fO()}if(fN){aE(fN,fP)}return fP}function aE(fP,fO,fN){if(!fO){fO={}}for(var fQ in fP){if(fP.hasOwnProperty(fQ)&&(fN!==false||!fO.hasOwnProperty(fQ))){fO[fQ]=fP[fQ]}}return fO}function cl(fO){var fN=Array.prototype.slice.call(arguments,1);return function(){return fO.apply(null,fN)}}var a2=/[\u00df\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;var cp=I.isWordChar=function(fN){return/\w/.test(fN)||fN>"\x80"&&(fN.toUpperCase()!=fN.toLowerCase()||a2.test(fN))};function ex(fN){for(var fO in fN){if(fN.hasOwnProperty(fO)&&fN[fO]){return false}}return true}var en=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function e0(fN){return fN.charCodeAt(0)>=768&&en.test(fN)}function fw(fN,fR,fQ,fP){var fS=document.createElement(fN);if(fQ){fS.className=fQ}if(fP){fS.style.cssText=fP}if(typeof fR=="string"){fS.appendChild(document.createTextNode(fR))}else{if(fR){for(var fO=0;fO<fR.length;++fO){fS.appendChild(fR[fO])}}}return fS}var cb;if(document.createRange){cb=function(fP,fQ,fN){var fO=document.createRange();fO.setEnd(fP,fN);fO.setStart(fP,fQ);return fO}}else{cb=function(fP,fQ,fN){var fO=document.body.createTextRange();fO.moveToElementText(fP.parentNode);fO.collapse(true);fO.moveEnd("character",fN);fO.moveStart("character",fQ);return fO}}function dE(fO){for(var fN=fO.childNodes.length;fN>0;--fN){fO.removeChild(fO.firstChild)}return fO}function bG(fN,fO){return dE(fN).appendChild(fO)}function fF(fN,fO){if(fN.contains){return fN.contains(fO)}while(fO=fO.parentNode){if(fO==fN){return true}}}function ds(){return document.activeElement}if(eo){ds=function(){try{return document.activeElement}catch(fN){return document.body}}}function S(fN){return new RegExp("\\b"+fN+"\\b\\s*")}function g(fO,fN){var fP=S(fN);if(fP.test(fO.className)){fO.className=fO.className.replace(fP,"")}}function fb(fO,fN){if(!S(fN).test(fO.className)){fO.className+=" "+fN}}function fr(fP,fN){var fO=fP.split(" ");for(var fQ=0;fQ<fO.length;fQ++){if(fO[fQ]&&!S(fO[fQ]).test(fN)){fN+=" "+fO[fQ]}}return fN}function aw(fQ){if(!document.body.getElementsByClassName){return}var fP=document.body.getElementsByClassName("CodeMirror");for(var fO=0;fO<fP.length;fO++){var fN=fP[fO].CodeMirror;if(fN){fQ(fN)}}}var cr=false;function a8(){if(cr){return}fe();cr=true}function fe(){var fN;bM(window,"resize",function(){if(fN==null){fN=setTimeout(function(){fN=null;d8=null;aw(aK)},100)}});bM(window,"blur",function(){aw(aL)})}var ep=function(){if(bY){return false}var fN=fw("div");return"draggable" in fN||"dragDrop" in fN}();var d8;function l(fN){if(d8!=null){return d8}var fO=fw("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");bG(fN,fO);if(fO.offsetWidth){d8=fO.offsetHeight-fO.clientHeight}return d8||0}var fl;function bd(fN){if(fl==null){var fO=fw("span","\u200b");bG(fN,fw("span",[fO,document.createTextNode("x")]));if(fN.firstChild.offsetHeight!=0){fl=fO.offsetWidth<=1&&fO.offsetHeight>2&&!b1}}if(fl){return fw("span","\u200b")}else{return fw("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px")}}var fk;function bD(fQ){if(fk!=null){return fk}var fN=bG(fQ,document.createTextNode("A\u062eA"));var fP=cb(fN,0,1).getBoundingClientRect();if(fP.left==fP.right){return false}var fO=cb(fN,1,2).getBoundingClientRect();return fk=(fO.right-fP.right<3)}var aQ=I.splitLines="\n\nb".split(/\n/).length!=3?function(fS){var fT=0,fN=[],fR=fS.length;while(fT<=fR){var fQ=fS.indexOf("\n",fT);if(fQ==-1){fQ=fS.length}var fP=fS.slice(fT,fS.charAt(fQ-1)=="\r"?fQ-1:fQ);var fO=fP.indexOf("\r");if(fO!=-1){fN.push(fP.slice(0,fO));fT+=fO+1}else{fN.push(fP);fT=fQ+1}}return fN}:function(fN){return fN.split(/\r\n?|\n/)};var bi=window.getSelection?function(fO){try{return fO.selectionStart!=fO.selectionEnd}catch(fN){return false}}:function(fP){try{var fN=fP.ownerDocument.selection.createRange()}catch(fO){}if(!fN||fN.parentElement()!=fP){return false}return fN.compareEndPoints("StartToEnd",fN)!=0};var cT=(function(){var fN=fw("div");if("oncopy" in fN){return true}fN.setAttribute("oncopy","return;");return typeof fN.oncopy=="function"})();var eQ={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:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};I.keyNames=eQ;(function(){for(var fN=0;fN<10;fN++){eQ[fN+48]=eQ[fN+96]=String(fN)}for(var fN=65;fN<=90;fN++){eQ[fN]=String.fromCharCode(fN)}for(var fN=1;fN<=12;fN++){eQ[fN+111]=eQ[fN+63235]="F"+fN}})();function dH(fN,fT,fS,fR){if(!fN){return fR(fT,fS,"ltr")}var fQ=false;for(var fP=0;fP<fN.length;++fP){var fO=fN[fP];if(fO.from<fS&&fO.to>fT||fT==fS&&fO.to==fT){fR(Math.max(fO.from,fT),Math.min(fO.to,fS),fO.level==1?"rtl":"ltr");fQ=true}}if(!fQ){fR(fT,fS,"ltr")}}function dd(fN){return fN.level%2?fN.to:fN.from}function fI(fN){return fN.level%2?fN.from:fN.to}function ct(fO){var fN=a(fO);return fN?dd(fN[0]):0}function cE(fO){var fN=a(fO);if(!fN){return fO.text.length}return fI(fh(fN))}function bj(fO,fR){var fP=eP(fO.doc,fR);var fS=z(fP);if(fS!=fP){fR=bC(fS)}var fN=a(fS);var fQ=!fN?0:fN[0].level%2?cE(fS):ct(fS);return W(fR,fQ)}function dt(fP,fS){var fO,fQ=eP(fP.doc,fS);while(fO=d7(fQ)){fQ=fO.find(1,true).line;fS=null}var fN=a(fQ);var fR=!fN?fQ.text.length:fN[0].level%2?ct(fQ):cE(fQ);return W(fS==null?bC(fQ):fS,fR)}function ak(fO,fP,fN){var fQ=fO[0].level;if(fP==fQ){return true}if(fN==fQ){return false}return fP<fN}var eE;function aB(fN,fR){eE=null;for(var fO=0,fP;fO<fN.length;++fO){var fQ=fN[fO];if(fQ.from<fR&&fQ.to>fR){return fO}if((fQ.from==fR||fQ.to==fR)){if(fP==null){fP=fO}else{if(ak(fN,fQ.level,fN[fP].level)){if(fQ.from!=fQ.to){eE=fP}return fO}else{if(fQ.from!=fQ.to){eE=fO}return fP}}}}return fP}function eO(fN,fQ,fO,fP){if(!fP){return fQ+fO}do{fQ+=fO}while(fQ>0&&e0(fN.text.charAt(fQ)));return fQ}function v(fN,fU,fP,fQ){var fR=a(fN);if(!fR){return ag(fN,fU,fP,fQ)}var fT=aB(fR,fU),fO=fR[fT];var fS=eO(fN,fU,fO.level%2?-fP:fP,fQ);for(;;){if(fS>fO.from&&fS<fO.to){return fS}if(fS==fO.from||fS==fO.to){if(aB(fR,fS)==fT){return fS}fO=fR[fT+=fP];return(fP>0)==fO.level%2?fO.to:fO.from}else{fO=fR[fT+=fP];if(!fO){return null}if((fP>0)==fO.level%2){fS=eO(fN,fO.to,-1,fQ)}else{fS=eO(fN,fO.from,1,fQ)}}}}function ag(fN,fR,fO,fP){var fQ=fR+fO;if(fP){while(fQ>0&&e0(fN.text.charAt(fQ))){fQ+=fO}}return fQ<0||fQ>fN.text.length?null:fQ}var a6=(function(){var fT="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var fR="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm";function fQ(fX){if(fX<=247){return fT.charAt(fX)}else{if(1424<=fX&&fX<=1524){return"R"}else{if(1536<=fX&&fX<=1773){return fR.charAt(fX-1536)}else{if(1774<=fX&&fX<=2220){return"r"}else{if(8192<=fX&&fX<=8203){return"w"}else{if(fX==8204){return"b"}else{return"L"}}}}}}}var fN=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var fW=/[stwN]/,fP=/[LRr]/,fO=/[Lb1n]/,fS=/[1n]/;var fV="L";function fU(fZ,fY,fX){this.level=fZ;this.from=fY;this.to=fX}return function(f7){if(!fN.test(f7)){return false}var gd=f7.length,f3=[];for(var gc=0,fZ;gc<gd;++gc){f3.push(fZ=fQ(f7.charCodeAt(gc)))}for(var gc=0,f6=fV;gc<gd;++gc){var fZ=f3[gc];if(fZ=="m"){f3[gc]=f6}else{f6=fZ}}for(var gc=0,fX=fV;gc<gd;++gc){var fZ=f3[gc];if(fZ=="1"&&fX=="r"){f3[gc]="n"}else{if(fP.test(fZ)){fX=fZ;if(fZ=="r"){f3[gc]="R"}}}}for(var gc=1,f6=f3[0];gc<gd-1;++gc){var fZ=f3[gc];if(fZ=="+"&&f6=="1"&&f3[gc+1]=="1"){f3[gc]="1"}else{if(fZ==","&&f6==f3[gc+1]&&(f6=="1"||f6=="n")){f3[gc]=f6}}f6=fZ}for(var gc=0;gc<gd;++gc){var fZ=f3[gc];if(fZ==","){f3[gc]="N"}else{if(fZ=="%"){for(var f0=gc+1;f0<gd&&f3[f0]=="%";++f0){}var ge=(gc&&f3[gc-1]=="!")||(f0<gd&&f3[f0]=="1")?"1":"N";for(var ga=gc;ga<f0;++ga){f3[ga]=ge}gc=f0-1}}}for(var gc=0,fX=fV;gc<gd;++gc){var fZ=f3[gc];if(fX=="L"&&fZ=="1"){f3[gc]="L"}else{if(fP.test(fZ)){fX=fZ}}}for(var gc=0;gc<gd;++gc){if(fW.test(f3[gc])){for(var f0=gc+1;f0<gd&&fW.test(f3[f0]);++f0){}var f4=(gc?f3[gc-1]:fV)=="L";var fY=(f0<gd?f3[f0]:fV)=="L";var ge=f4||fY?"L":"R";for(var ga=gc;ga<f0;++ga){f3[ga]=ge}gc=f0-1}}var gb=[],f8;for(var gc=0;gc<gd;){if(fO.test(f3[gc])){var f1=gc;for(++gc;gc<gd&&fO.test(f3[gc]);++gc){}gb.push(new fU(0,f1,gc))}else{var f2=gc,f5=gb.length;for(++gc;gc<gd&&f3[gc]!="L";++gc){}for(var ga=f2;ga<gc;){if(fS.test(f3[ga])){if(f2<ga){gb.splice(f5,0,new fU(1,f2,ga))}var f9=ga;for(++ga;ga<gc&&fS.test(f3[ga]);++ga){}gb.splice(f5,0,new fU(2,f9,ga));f2=ga}else{++ga}}if(f2<gc){gb.splice(f5,0,new fU(1,f2,gc))}}}if(gb[0].level==1&&(f8=f7.match(/^\s+/))){gb[0].from=f8[0].length;gb.unshift(new fU(0,0,f8[0].length))}if(fh(gb).level==1&&(f8=f7.match(/\s+$/))){fh(gb).to-=f8[0].length;gb.push(new fU(0,gd-f8[0].length,gd))}if(gb[0].level!=fh(gb).level){gb.push(new fU(gb[0].level,gd,gd))}return gb}})();I.version="4.1.1";return I});
3
- // CodeMirror XML.
4
- (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("xml",function(y,k){var p=y.indentUnit;var x=k.multilineTagIndentFactor||1;var d=k.multilineTagIndentPastTag;if(d==null){d=true}var w=k.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};var c=k.alignCDATA;var f,g;function n(F,E){function C(G){E.tokenize=G;return G(F,E)}var D=F.next();if(D=="<"){if(F.eat("!")){if(F.eat("[")){if(F.match("CDATA[")){return C(v("atom","]]>"))}else{return null}}else{if(F.match("--")){return C(v("comment","-->"))}else{if(F.match("DOCTYPE",true,true)){F.eatWhile(/[\w\._\-]/);return C(z(1))}else{return null}}}}else{if(F.eat("?")){F.eatWhile(/[\w\._\-]/);E.tokenize=v("meta","?>");return"meta"}else{f=F.eat("/")?"closeTag":"openTag";E.tokenize=m;return"tag bracket"}}}else{if(D=="&"){var B;if(F.eat("#")){if(F.eat("x")){B=F.eatWhile(/[a-fA-F\d]/)&&F.eat(";")}else{B=F.eatWhile(/[\d]/)&&F.eat(";")}}else{B=F.eatWhile(/[\w\.\-:]/)&&F.eat(";")}return B?"atom":"error"}else{F.eatWhile(/[^&<]/);return null}}}function m(E,D){var C=E.next();if(C==">"||(C=="/"&&E.eat(">"))){D.tokenize=n;f=C==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(C=="="){f="equals";return null}else{if(C=="<"){D.tokenize=n;D.state=l;D.tagName=D.tagStart=null;var B=D.tokenize(E,D);return B?B+" error":"error"}else{if(/[\'\"]/.test(C)){D.tokenize=j(C);D.stringStartCol=E.column();return D.tokenize(E,D)}else{E.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function j(B){var C=function(E,D){while(!E.eol()){if(E.next()==B){D.tokenize=m;break}}return"string"};C.isInAttribute=true;return C}function v(C,B){return function(E,D){while(!E.eol()){if(E.match(B)){D.tokenize=n;break}E.next()}return C}}function z(B){return function(E,D){var C;while((C=E.next())!=null){if(C=="<"){D.tokenize=z(B+1);return D.tokenize(E,D)}else{if(C==">"){if(B==1){D.tokenize=n;break}else{D.tokenize=z(B-1);return D.tokenize(E,D)}}}}return"meta"}}function r(C,B,D){this.prev=C.context;this.tagName=B;this.indent=C.indented;this.startOfLine=D;if(w.doNotIndent.hasOwnProperty(B)||(C.context&&C.context.noIndent)){this.noIndent=true}}function u(B){if(B.context){B.context=B.context.prev}}function q(D,C){var B;while(true){if(!D.context){return}B=D.context.tagName;if(!w.contextGrabbers.hasOwnProperty(B)||!w.contextGrabbers[B].hasOwnProperty(C)){return}u(D)}}function l(B,D,C){if(B=="openTag"){C.tagStart=D.column();return b}else{if(B=="closeTag"){return t}else{return l}}}function b(B,D,C){if(B=="word"){C.tagName=D.current();g="tag";return e}else{g="error";return b}}function t(C,E,D){if(C=="word"){var B=E.current();if(D.context&&D.context.tagName!=B&&w.implicitlyClosed.hasOwnProperty(D.context.tagName)){u(D)}if(D.context&&D.context.tagName==B){g="tag";return s}else{g="tag error";return A}}else{g="error";return A}}function s(C,B,D){if(C!="endTag"){g="error";return s}u(D);return l}function A(B,D,C){g="error";return s(B,D,C)}function e(E,C,F){if(E=="word"){g="attribute";return i}else{if(E=="endTag"||E=="selfcloseTag"){var D=F.tagName,B=F.tagStart;F.tagName=F.tagStart=null;if(E=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(D)){q(F,D)}else{q(F,D);F.context=new r(F,D,B==F.indented)}return l}}g="error";return e}function i(B,D,C){if(B=="equals"){return o}if(!w.allowMissing){g="error"}return e(B,D,C)}function o(B,D,C){if(B=="string"){return h}if(B=="word"&&w.allowUnquoted){g="string";return e}g="error";return e(B,D,C)}function h(B,D,C){if(B=="string"){return h}return e(B,D,C)}return{startState:function(){return{tokenize:n,state:l,indented:0,tagName:null,tagStart:null,context:null}},token:function(D,C){if(!C.tagName&&D.sol()){C.indented=D.indentation()}if(D.eatSpace()){return null}f=null;var B=C.tokenize(D,C);if((B||f)&&B!="comment"){g=null;C.state=C.state(f||B,D,C);if(g){B=g=="error"?B+" error":g}}return B},indent:function(G,C,F){var E=G.context;if(G.tokenize.isInAttribute){if(G.tagStart==G.indented){return G.stringStartCol+1}else{return G.indented+p}}if(E&&E.noIndent){return a.Pass}if(G.tokenize!=m&&G.tokenize!=n){return F?F.match(/^(\s*)/)[0].length:0}if(G.tagName){if(d){return G.tagStart+G.tagName.length+2}else{return G.tagStart+p*x}}if(c&&/<!\[CDATA\[/.test(C)){return 0}var B=C&&/^<(\/)?([\w_:\.-]*)/.exec(C);if(B&&B[1]){while(E){if(E.tagName==B[2]){E=E.prev;break}else{if(w.implicitlyClosed.hasOwnProperty(E.tagName)){E=E.prev}else{break}}}}else{if(B){while(E){var D=w.contextGrabbers[E.tagName];if(D&&D.hasOwnProperty(B[2])){E=E.prev}else{break}}}}while(E&&!E.startOfLine){E=E.prev}if(E){return E.indent+p}else{return 0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml"}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});
5
- // CodeMirror JS.
6
- (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(X,ah){var j=X.indentUnit;var x=ah.statementIndent;var aw=ah.jsonld;var w=ah.json||aw;var f=ah.typescript;var ao=function(){function aM(aO){return{type:aO,style:"keyword"}}var aH=aM("keyword a"),aF=aM("keyword b"),aE=aM("keyword c");var aG=aM("operator"),aK={type:"atom",style:"atom"};var aI={"if":aM("if"),"while":aH,"with":aH,"else":aF,"do":aF,"try":aF,"finally":aF,"return":aE,"break":aE,"continue":aE,"new":aE,"delete":aE,"throw":aE,"debugger":aE,"var":aM("var"),"const":aM("var"),let:aM("var"),"function":aM("function"),"catch":aM("catch"),"for":aM("for"),"switch":aM("switch"),"case":aM("case"),"default":aM("default"),"in":aG,"typeof":aG,"instanceof":aG,"true":aK,"false":aK,"null":aK,"undefined":aK,"NaN":aK,"Infinity":aK,"this":aM("this"),module:aM("module"),"class":aM("class"),"super":aM("atom"),yield:aE,"export":aM("export"),"import":aM("import"),"extends":aE};if(f){var aN={type:"variable",style:"variable-3"};var aJ={"interface":aM("interface"),"extends":aM("extends"),constructor:aM("constructor"),"public":aM("public"),"private":aM("private"),"protected":aM("protected"),"static":aM("static"),string:aN,number:aN,bool:aN,any:aN};for(var aL in aJ){aI[aL]=aJ[aL]}}return aI}();var M=/[+\-*&%=<>!?|~^]/;var an=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function C(aH){var aF=false,aE,aG=false;while((aE=aH.next())!=null){if(!aF){if(aE=="/"&&!aG){return}if(aE=="["){aG=true}else{if(aG&&aE=="]"){aG=false}}}aF=!aF&&aE=="\\"}}var P,D;function I(aG,aF,aE){P=aG;D=aE;return aF}function R(aI,aG){var aE=aI.next();if(aE=='"'||aE=="'"){aG.tokenize=O(aE);return aG.tokenize(aI,aG)}else{if(aE=="."&&aI.match(/^\d+(?:[eE][+\-]?\d+)?/)){return I("number","number")}else{if(aE=="."&&aI.match("..")){return I("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aE)){return I(aE)}else{if(aE=="="&&aI.eat(">")){return I("=>","operator")}else{if(aE=="0"&&aI.eat(/x/i)){aI.eatWhile(/[\da-f]/i);return I("number","number")}else{if(/\d/.test(aE)){aI.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return I("number","number")}else{if(aE=="/"){if(aI.eat("*")){aG.tokenize=av;return av(aI,aG)}else{if(aI.eat("/")){aI.skipToEnd();return I("comment","comment")}else{if(aG.lastType=="operator"||aG.lastType=="keyword c"||aG.lastType=="sof"||/^[\[{}\(,;:]$/.test(aG.lastType)){C(aI);aI.eatWhile(/[gimy]/);return I("regexp","string-2")}else{aI.eatWhile(M);return I("operator","operator",aI.current())}}}}else{if(aE=="`"){aG.tokenize=ax;return ax(aI,aG)}else{if(aE=="#"){aI.skipToEnd();return I("error","error")}else{if(M.test(aE)){aI.eatWhile(M);return I("operator","operator",aI.current())}else{aI.eatWhile(/[\w\$_]/);var aH=aI.current(),aF=ao.propertyIsEnumerable(aH)&&ao[aH];return(aF&&aG.lastType!=".")?I(aF.type,aF.style,aH):I("variable","variable",aH)}}}}}}}}}}}}function O(aE){return function(aI,aG){var aH=false,aF;if(aw&&aI.peek()=="@"&&aI.match(an)){aG.tokenize=R;return I("jsonld-keyword","meta")}while((aF=aI.next())!=null){if(aF==aE&&!aH){break}aH=!aH&&aF=="\\"}if(!aH){aG.tokenize=R}return I("string","string")}}function av(aH,aG){var aE=false,aF;while(aF=aH.next()){if(aF=="/"&&aE){aG.tokenize=R;break}aE=(aF=="*")}return I("comment","comment")}function ax(aH,aF){var aG=false,aE;while((aE=aH.next())!=null){if(!aG&&(aE=="`"||aE=="$"&&aH.eat("{"))){aF.tokenize=R;break}aG=!aG&&aE=="\\"}return I("quasi","string-2",aH.current())}var k="([{}])";function ar(aK,aH){if(aH.fatArrowAt){aH.fatArrowAt=null}var aG=aK.string.indexOf("=>",aK.start);if(aG<0){return}var aJ=0,aF=false;for(var aL=aG-1;aL>=0;--aL){var aE=aK.string.charAt(aL);var aI=k.indexOf(aE);if(aI>=0&&aI<3){if(!aJ){++aL;break}if(--aJ==0){break}}else{if(aI>=3&&aI<6){++aJ}else{if(/[$\w]/.test(aE)){aF=true}else{if(aF&&!aJ){++aL;break}}}}}if(aF&&!aJ){aH.fatArrowAt=aL}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function G(aJ,aF,aE,aI,aG,aH){this.indented=aJ;this.column=aF;this.type=aE;this.prev=aG;this.info=aH;if(aI!=null){this.align=aI}}function p(aH,aG){for(var aF=aH.localVars;aF;aF=aF.next){if(aF.name==aG){return true}}for(var aE=aH.context;aE;aE=aE.prev){for(var aF=aE.vars;aF;aF=aF.next){if(aF.name==aG){return true}}}}function e(aI,aF,aE,aH,aJ){var aK=aI.cc;A.state=aI;A.stream=aJ;A.marked=null,A.cc=aK;if(!aI.lexical.hasOwnProperty("align")){aI.lexical.align=true}while(true){var aG=aK.length?aK.pop():w?al:aC;if(aG(aE,aH)){while(aK.length&&aK[aK.length-1].lex){aK.pop()()}if(A.marked){return A.marked}if(aE=="variable"&&p(aI,aH)){return"variable-2"}return aF}}}var A={state:null,column:null,marked:null,cc:null};function Y(){for(var aE=arguments.length-1;aE>=0;aE--){A.cc.push(arguments[aE])}}function ac(){Y.apply(null,arguments);return true}function aq(aF){function aE(aI){for(var aH=aI;aH;aH=aH.next){if(aH.name==aF){return true}}return false}var aG=A.state;if(aG.context){A.marked="def";if(aE(aG.localVars)){return}aG.localVars={name:aF,next:aG.localVars}}else{if(aE(aG.globalVars)){return}if(ah.globalVars){aG.globalVars={name:aF,next:aG.globalVars}}}}var n={name:"this",next:{name:"arguments"}};function t(){A.state.context={prev:A.state.context,vars:A.state.localVars};A.state.localVars=n}function u(){A.state.localVars=A.state.context.vars;A.state.context=A.state.context.prev}function aA(aF,aG){var aE=function(){var aI=A.state,aH=aI.indented;if(aI.lexical.type=="stat"){aH=aI.lexical.indented}aI.lexical=new G(aH,A.stream.column(),aF,null,aI.lexical,aG)};aE.lex=true;return aE}function g(){var aE=A.state;if(aE.lexical.prev){if(aE.lexical.type==")"){aE.indented=aE.lexical.indented}aE.lexical=aE.lexical.prev}}g.lex=true;function o(aE){function aF(aG){if(aG==aE){return ac()}else{if(aE==";"){return Y()}else{return ac(aF)}}}return aF}function aC(aE,aF){if(aE=="var"){return ac(aA("vardef",aF.length),c,o(";"),g)}if(aE=="keyword a"){return ac(aA("form"),al,aC,g)}if(aE=="keyword b"){return ac(aA("form"),aC,g)}if(aE=="{"){return ac(aA("}"),v,g)}if(aE==";"){return ac()}if(aE=="if"){if(A.state.lexical.info=="else"&&A.state.cc[A.state.cc.length-1]==g){A.state.cc.pop()()}return ac(aA("form"),al,aC,g,d)}if(aE=="function"){return ac(J)}if(aE=="for"){return ac(aA("form"),r,aC,g)}if(aE=="variable"){return ac(aA("stat"),aD)}if(aE=="switch"){return ac(aA("form"),al,aA("}","switch"),o("{"),v,g,g)}if(aE=="case"){return ac(al,o(":"))}if(aE=="default"){return ac(o(":"))}if(aE=="catch"){return ac(aA("form"),t,o("("),ad,o(")"),aC,g,u)}if(aE=="module"){return ac(aA("form"),t,E,u,g)}if(aE=="class"){return ac(aA("form"),T,S,g)}if(aE=="export"){return ac(aA("form"),aB,g)}if(aE=="import"){return ac(aA("form"),ae,g)}return Y(aA("stat"),al,o(";"),g)}function al(aE){return W(aE,false)}function az(aE){return W(aE,true)}function W(aF,aH){if(A.state.fatArrowAt==A.stream.start){var aE=aH?K:U;if(aF=="("){return ac(t,aA(")"),ap(h,")"),g,o("=>"),aE,u)}else{if(aF=="variable"){return Y(t,h,o("=>"),aE,u)}}}var aG=aH?i:Z;if(b.hasOwnProperty(aF)){return ac(aG)}if(aF=="function"){return ac(J,aG)}if(aF=="keyword c"){return ac(aH?ai:ag)}if(aF=="("){return ac(aA(")"),ag,au,o(")"),g,aG)}if(aF=="operator"||aF=="spread"){return ac(aH?az:al)}if(aF=="["){return ac(aA("]"),l,g,aG)}if(aF=="{"){return at(q,"}",null,aG)}if(aF=="quasi"){return Y(N,aG)}return ac()}function ag(aE){if(aE.match(/[;\}\)\],]/)){return Y()}return Y(al)}function ai(aE){if(aE.match(/[;\}\)\],]/)){return Y()}return Y(az)}function Z(aE,aF){if(aE==","){return ac(al)}return i(aE,aF,false)}function i(aE,aG,aI){var aF=aI==false?Z:i;var aH=aI==false?al:az;if(aG=="=>"){return ac(t,aI?K:U,u)}if(aE=="operator"){if(/\+\+|--/.test(aG)){return ac(aF)}if(aG=="?"){return ac(al,o(":"),aH)}return ac(aH)}if(aE=="quasi"){return Y(N,aF)}if(aE==";"){return}if(aE=="("){return at(az,")","call",aF)}if(aE=="."){return ac(aj,aF)}if(aE=="["){return ac(aA("]"),ag,o("]"),g,aF)}}function N(aE,aF){if(aE!="quasi"){return Y()}if(aF.slice(aF.length-2)!="${"){return ac(N)}return ac(al,m)}function m(aE){if(aE=="}"){A.marked="string-2";A.state.tokenize=ax;return ac(N)}}function U(aE){ar(A.stream,A.state);if(aE=="{"){return Y(aC)}return Y(al)}function K(aE){ar(A.stream,A.state);if(aE=="{"){return Y(aC)}return Y(az)}function aD(aE){if(aE==":"){return ac(g,aC)}return Y(Z,o(";"),g)}function aj(aE){if(aE=="variable"){A.marked="property";return ac()}}function q(aE,aF){if(aE=="variable"){A.marked="property";if(aF=="get"||aF=="set"){return ac(F)}}else{if(aE=="number"||aE=="string"){A.marked=aw?"property":(aE+" property")}else{if(aE=="["){return ac(al,o("]"),H)}}}if(b.hasOwnProperty(aE)){return ac(H)}}function F(aE){if(aE!="variable"){return Y(H)}A.marked="property";return ac(J)}function H(aE){if(aE==":"){return ac(az)}if(aE=="("){return Y(J)}}function ap(aG,aE){function aF(aI){if(aI==","){var aH=A.state.lexical;if(aH.info=="call"){aH.pos=(aH.pos||0)+1}return ac(aG,aF)}if(aI==aE){return ac()}return ac(o(aE))}return function(aH){if(aH==aE){return ac()}return Y(aG,aF)}}function at(aH,aE,aG){for(var aF=3;aF<arguments.length;aF++){A.cc.push(arguments[aF])}return ac(aA(aE,aG),ap(aH,aE),g)}function v(aE){if(aE=="}"){return ac()}return Y(aC,v)}function Q(aE){if(f&&aE==":"){return ac(ab)}}function ab(aE){if(aE=="variable"){A.marked="variable-3";return ac()}}function c(){return Y(h,Q,aa,V)}function h(aE,aF){if(aE=="variable"){aq(aF);return ac()}if(aE=="["){return at(h,"]")}if(aE=="{"){return at(ay,"}")}}function ay(aE,aF){if(aE=="variable"&&!A.stream.match(/^\s*:/,false)){aq(aF);return ac(aa)}if(aE=="variable"){A.marked="property"}return ac(o(":"),h,aa)}function aa(aE,aF){if(aF=="="){return ac(az)}}function V(aE){if(aE==","){return ac(c)}}function d(aE,aF){if(aE=="keyword b"&&aF=="else"){return ac(aA("form","else"),aC,g)}}function r(aE){if(aE=="("){return ac(aA(")"),B,o(")"),g)}}function B(aE){if(aE=="var"){return ac(c,o(";"),z)}if(aE==";"){return ac(z)}if(aE=="variable"){return ac(s)}return Y(al,o(";"),z)}function s(aE,aF){if(aF=="in"||aF=="of"){A.marked="keyword";return ac(al)}return ac(Z,z)}function z(aE,aF){if(aE==";"){return ac(y)}if(aF=="in"||aF=="of"){A.marked="keyword";return ac(al)}return Y(al,o(";"),y)}function y(aE){if(aE!=")"){ac(al)}}function J(aE,aF){if(aF=="*"){A.marked="keyword";return ac(J)}if(aE=="variable"){aq(aF);return ac(J)}if(aE=="("){return ac(t,aA(")"),ap(ad,")"),g,aC,u)}}function ad(aE){if(aE=="spread"){return ac(ad)}return Y(h,Q)}function T(aE,aF){if(aE=="variable"){aq(aF);return ac(L)}}function L(aE,aF){if(aF=="extends"){return ac(al)}}function S(aE){if(aE=="{"){return at(q,"}")}}function E(aE,aF){if(aE=="string"){return ac(aC)}if(aE=="variable"){aq(aF);return ac(af)}}function aB(aE,aF){if(aF=="*"){A.marked="keyword";return ac(af,o(";"))}if(aF=="default"){A.marked="keyword";return ac(al,o(";"))}return Y(aC)}function ae(aE){if(aE=="string"){return ac()}return Y(am,af)}function am(aE,aF){if(aE=="{"){return at(am,"}")}if(aE=="variable"){aq(aF)}return ac()}function af(aE,aF){if(aF=="from"){A.marked="keyword";return ac(al)}}function l(aE){if(aE=="]"){return ac()}return Y(az,ak)}function ak(aE){if(aE=="for"){return Y(au,o("]"))}if(aE==","){return ac(ap(az,"]"))}return Y(ap(az,"]"))}function au(aE){if(aE=="for"){return ac(r,au)}if(aE=="if"){return ac(al,au)}}return{startState:function(aF){var aE={tokenize:R,lastType:"sof",cc:[],lexical:new G((aF||0)-j,0,"block",false),localVars:ah.localVars,context:ah.localVars&&{vars:ah.localVars},indented:0};if(ah.globalVars&&typeof ah.globalVars=="object"){aE.globalVars=ah.globalVars}return aE},token:function(aG,aF){if(aG.sol()){if(!aF.lexical.hasOwnProperty("align")){aF.lexical.align=false}aF.indented=aG.indentation();ar(aG,aF)}if(aF.tokenize!=av&&aG.eatSpace()){return null}var aE=aF.tokenize(aG,aF);if(P=="comment"){return aE}aF.lastType=P=="operator"&&(D=="++"||D=="--")?"incdec":P;return e(aF,aE,P,D,aG)},indent:function(aK,aE){if(aK.tokenize==av){return a.Pass}if(aK.tokenize!=R){return 0}var aJ=aE&&aE.charAt(0),aH=aK.lexical;if(!/^\s*else\b/.test(aE)){for(var aG=aK.cc.length-1;aG>=0;--aG){var aL=aK.cc[aG];if(aL==g){aH=aH.prev}else{if(aL!=d){break}}}}if(aH.type=="stat"&&aJ=="}"){aH=aH.prev}if(x&&aH.type==")"&&aH.prev.type=="stat"){aH=aH.prev}var aI=aH.type,aF=aJ==aI;if(aI=="vardef"){return aH.indented+(aK.lastType=="operator"||aK.lastType==","?aH.info+1:0)}else{if(aI=="form"&&aJ=="{"){return aH.indented}else{if(aI=="form"){return aH.indented+j}else{if(aI=="stat"){return aH.indented+(aK.lastType=="operator"||aK.lastType==","?x||j:0)}else{if(aH.info=="switch"&&!aF&&ah.doubleIndentSwitch!=false){return aH.indented+(/^(?:case|default)\b/.test(aE)?j:2*j)}else{if(aH.align){return aH.column+(aF?0:1)}else{return aH.indented+(aF?0:j)}}}}}}},electricChars:":{}",blockCommentStart:w?null:"/*",blockCommentEnd:w?null:"*/",lineComment:w?null:"//",fold:"brace",helperType:w?"json":"javascript",jsonldMode:aw,jsonMode:w}});a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});
7
- // CodeMirror CSS.
8
- (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(m){m.defineMode("css",function(N,B){if(!B.propertyKeywords){B=m.resolveMode("text/css")}var H=N.indentUnit,t=B.tokenHooks,M=B.mediaTypes||{},D=B.mediaFeatures||{},A=B.propertyKeywords||{},u=B.nonStandardPropertyKeywords||{},G=B.colorKeywords||{},J=B.valueKeywords||{},w=B.fontProperties||{},E=B.allowNested;var v,F;function O(R,S){v=S;return R}function Q(U,T){var S=U.next();if(t[S]){var R=t[S](U,T);if(R!==false){return R}}if(S=="@"){U.eatWhile(/[\w\\\-]/);return O("def",U.current())}else{if(S=="="||(S=="~"||S=="|")&&U.eat("=")){return O(null,"compare")}else{if(S=='"'||S=="'"){T.tokenize=C(S);return T.tokenize(U,T)}else{if(S=="#"){U.eatWhile(/[\w\\\-]/);return O("atom","hash")}else{if(S=="!"){U.match(/^\s*\w*/);return O("keyword","important")}else{if(/\d/.test(S)||S=="."&&U.eat(/\d/)){U.eatWhile(/[\w.%]/);return O("number","unit")}else{if(S==="-"){if(/[\d.]/.test(U.peek())){U.eatWhile(/[\w.%]/);return O("number","unit")}else{if(U.match(/^[^-]+-/)){return O("meta","meta")}}}else{if(/[,+>*\/]/.test(S)){return O(null,"select-op")}else{if(S=="."&&U.match(/^-?[_a-z][_a-z0-9-]*/i)){return O("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(S)){return O(null,S)}else{if(S=="u"&&U.match("rl(")){U.backUp(1);T.tokenize=P;return O("property","word")}else{if(/[\w\\\-]/.test(S)){U.eatWhile(/[\w\\\-]/);return O("property","word")}else{return O(null,null)}}}}}}}}}}}}}function C(R){return function(V,T){var U=false,S;while((S=V.next())!=null){if(S==R&&!U){if(R==")"){V.backUp(1)}break}U=!U&&S=="\\"}if(S==R||!U&&R!=")"){T.tokenize=null}return O("string","string")}}function P(S,R){S.next();if(!S.match(/\s*[\"\')]/,false)){R.tokenize=C(")")}else{R.tokenize=null}return O(null,"(")}function I(S,R,T){this.type=S;this.indent=R;this.prev=T}function y(S,T,R){S.context=new I(R,T.indentation()+H,S.context);return R}function K(R){R.context=R.context.prev;return R.context.type}function s(R,T,S){return x[S.context.type](R,T,S)}function L(S,U,T,V){for(var R=V||1;R>0;R--){T.context=T.context.prev}return s(S,U,T)}function z(S){var R=S.current().toLowerCase();if(J.hasOwnProperty(R)){F="atom"}else{if(G.hasOwnProperty(R)){F="keyword"}else{F="variable"}}}var x={};x.top=function(R,T,S){if(R=="{"){return y(S,T,"block")}else{if(R=="}"&&S.context.prev){return K(S)}else{if(R=="@media"){return y(S,T,"media")}else{if(R=="@font-face"){return"font_face_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(R)){return"keyframes"}else{if(R&&R.charAt(0)=="@"){return y(S,T,"at")}else{if(R=="hash"){F="builtin"}else{if(R=="word"){F="tag"}else{if(R=="variable-definition"){return"maybeprop"}else{if(R=="interpolation"){return y(S,T,"interpolation")}else{if(R==":"){return"pseudo"}else{if(E&&R=="("){return y(S,T,"params")}}}}}}}}}}}}return S.context.type};x.block=function(R,U,S){if(R=="word"){var T=U.current().toLowerCase();if(A.hasOwnProperty(T)){F="property";return"maybeprop"}else{if(u.hasOwnProperty(T)){F="string-2";return"maybeprop"}else{if(E){F=U.match(/^\s*:/,false)?"property":"tag";return"block"}else{F+=" error";return"maybeprop"}}}}else{if(R=="meta"){return"block"}else{if(!E&&(R=="hash"||R=="qualifier")){F="error";return"block"}else{return x.top(R,U,S)}}}};x.maybeprop=function(R,T,S){if(R==":"){return y(S,T,"prop")}return s(R,T,S)};x.prop=function(R,T,S){if(R==";"){return K(S)}if(R=="{"&&E){return y(S,T,"propBlock")}if(R=="}"||R=="{"){return L(R,T,S)}if(R=="("){return y(S,T,"parens")}if(R=="hash"&&!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(T.current())){F+=" error"}else{if(R=="word"){z(T)}else{if(R=="interpolation"){return y(S,T,"interpolation")}}}return"prop"};x.propBlock=function(S,R,T){if(S=="}"){return K(T)}if(S=="word"){F="property";return"maybeprop"}return T.context.type};x.parens=function(R,T,S){if(R=="{"||R=="}"){return L(R,T,S)}if(R==")"){return K(S)}return"parens"};x.pseudo=function(R,T,S){if(R=="word"){F="variable-3";return S.context.type}return s(R,T,S)};x.media=function(R,U,S){if(R=="("){return y(S,U,"media_parens")}if(R=="}"){return L(R,U,S)}if(R=="{"){return K(S)&&y(S,U,E?"block":"top")}if(R=="word"){var T=U.current().toLowerCase();if(T=="only"||T=="not"||T=="and"){F="keyword"}else{if(M.hasOwnProperty(T)){F="attribute"}else{if(D.hasOwnProperty(T)){F="property"}else{F="error"}}}}return S.context.type};x.media_parens=function(R,T,S){if(R==")"){return K(S)}if(R=="{"||R=="}"){return L(R,T,S,2)}return x.media(R,T,S)};x.font_face_before=function(R,T,S){if(R=="{"){return y(S,T,"font_face")}return s(R,T,S)};x.font_face=function(R,T,S){if(R=="}"){return K(S)}if(R=="word"){if(!w.hasOwnProperty(T.current().toLowerCase())){F="error"}else{F="property"}return"maybeprop"}return"font_face"};x.keyframes=function(R,T,S){if(R=="word"){F="variable";return"keyframes"}if(R=="{"){return y(S,T,"top")}return s(R,T,S)};x.at=function(R,T,S){if(R==";"){return K(S)}if(R=="{"||R=="}"){return L(R,T,S)}if(R=="word"){F="tag"}else{if(R=="hash"){F="builtin"}}return"at"};x.interpolation=function(R,T,S){if(R=="}"){return K(S)}if(R=="{"||R==";"){return L(R,T,S)}if(R!="variable"){F="error"}return"interpolation"};x.params=function(R,T,S){if(R==")"){return K(S)}if(R=="{"||R=="}"){return L(R,T,S)}if(R=="word"){z(T)}return"params"};return{startState:function(R){return{tokenize:null,state:"top",context:new I("top",R||0,null)}},token:function(T,S){if(!S.tokenize&&T.eatSpace()){return null}var R=(S.tokenize||Q)(T,S);if(R&&typeof R=="object"){v=R[1];R=R[0]}F=R;S.state=x[S.state](v,T,S);return F},indent:function(V,T){var S=V.context,U=T&&T.charAt(0);var R=S.indent;if(S.type=="prop"&&U=="}"){S=S.prev}if(S.prev&&(U=="}"&&(S.type=="block"||S.type=="top"||S.type=="interpolation"||S.type=="font_face")||U==")"&&(S.type=="parens"||S.type=="params"||S.type=="media_parens")||U=="{"&&(S.type=="at"||S.type=="media"))){R=S.indent-H;S=S.prev}return R},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});function f(u){var t={};for(var s=0;s<u.length;++s){t[u[s]]=true}return t}var a=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],p=f(a);var r=["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"],i=f(r);var c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","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","flow-from","flow-into","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","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","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","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-inside","shape-outside","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-overflow","text-shadow","text-size-adjust","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","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=f(c);var d=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],d=f(d);var b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],k=f(b);var j=["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appwor