treport 0.2.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/connect.rb +12 -10
- data/app/models/db.rb +52 -0
- data/app/models/map.rb +25 -0
- data/app/models/map_requirement.rb +54 -0
- data/app/models/report.rb +40 -14
- data/app/models/requirement.rb +17 -5
- data/app/views/layouts/report_admin.html.erb +177 -0
- data/db/migrate/_create_reports.rb +70 -0
- data/lib/generators/treport/install_generator.rb +23 -0
- data/lib/treport/engine.rb +4 -0
- data/lib/treport.rb +3 -2
- data/public/{report → treport}/css/AdminLTE.min.css +0 -0
- data/public/treport/css/ace-ie.min.css +1 -0
- data/public/treport/css/ace-part2.min.css +1 -0
- data/public/treport/css/ace-rtl.min.css +1 -0
- data/public/treport/css/ace-skins.min.css +1 -0
- data/public/treport/css/ace.min.css +1 -0
- data/public/treport/css/blue.css +62 -0
- data/public/treport/css/blue.png +0 -0
- data/public/treport/css/blue@2x.png +0 -0
- data/public/treport/css/bootstrap-colorpicker.min.css +9 -0
- data/public/treport/css/bootstrap-datepicker3.min.css +7 -0
- data/public/treport/css/bootstrap-datetimepicker.min.css +5 -0
- data/public/treport/css/bootstrap-duallistbox.min.css +1 -0
- data/public/treport/css/bootstrap-editable.min.css +12 -0
- data/public/treport/css/bootstrap-multiselect.min.css +1 -0
- data/public/treport/css/bootstrap-timepicker.min.css +10 -0
- data/public/treport/css/bootstrap.min.css +5 -0
- data/public/treport/css/chosen.min.css +11 -0
- data/public/treport/css/colorbox.min.css +1 -0
- data/public/treport/css/daterangepicker.min.css +1 -0
- data/public/treport/css/dropzone.min.css +1 -0
- data/public/treport/css/font-awesome.min.css +4 -0
- data/public/treport/css/fonts.googleapis.com.css +12 -0
- data/public/treport/css/fullcalendar.min.css +5 -0
- data/public/treport/css/ionicons.min.css +11 -0
- data/public/treport/css/jquery-ui.custom.min.css +4 -0
- data/public/treport/css/jquery-ui.min.css +4 -0
- data/public/treport/css/jquery.gritter.min.css +1 -0
- data/public/treport/css/lkmain.css +1 -0
- data/public/treport/css/prettify.min.css +1 -0
- data/public/treport/css/select2.min.css +1 -0
- data/public/treport/css/test.html +221 -0
- data/public/treport/css/ui.jqgrid.min.css +1 -0
- data/public/treport/font-awesome/4.5.0/css/font-awesome.min.css +4 -0
- data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.eot +0 -0
- data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.svg +655 -0
- data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.ttf +0 -0
- data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.woff +0 -0
- data/public/treport/font-awesome/4.5.0/fonts/fontawesome-webfont.woff2 +0 -0
- data/public/treport/fonts/glyphicons-halflings-regular.eot +0 -0
- data/public/treport/fonts/glyphicons-halflings-regular.svg +288 -0
- data/public/treport/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/public/treport/fonts/glyphicons-halflings-regular.woff +0 -0
- data/public/treport/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/public/treport/images/avatars/avatar.png +0 -0
- data/public/treport/images/avatars/avatar1.png +0 -0
- data/public/treport/images/avatars/avatar2.png +0 -0
- data/public/treport/images/avatars/avatar3.png +0 -0
- data/public/treport/images/avatars/avatar4.png +0 -0
- data/public/treport/images/avatars/avatar5.png +0 -0
- data/public/treport/images/avatars/profile-pic.jpg +0 -0
- data/public/treport/images/avatars/user.jpg +0 -0
- data/public/treport/images/bootstrap-colorpicker/alpha-horizontal.png +0 -0
- data/public/treport/images/bootstrap-colorpicker/alpha.png +0 -0
- data/public/treport/images/bootstrap-colorpicker/hue-horizontal.png +0 -0
- data/public/treport/images/bootstrap-colorpicker/hue.png +0 -0
- data/public/treport/images/bootstrap-colorpicker/saturation.png +0 -0
- data/public/treport/images/email/email1.png +0 -0
- data/public/treport/images/email/email2.png +0 -0
- data/public/treport/images/email/email3.png +0 -0
- data/public/treport/images/email/email4.png +0 -0
- data/public/treport/images/gallery/image-1.jpg +0 -0
- data/public/treport/images/gallery/image-2.jpg +0 -0
- data/public/treport/images/gallery/image-3.jpg +0 -0
- data/public/treport/images/gallery/image-4.jpg +0 -0
- data/public/treport/images/gallery/image-5.jpg +0 -0
- data/public/treport/images/gallery/image-6.jpg +0 -0
- data/public/treport/images/gallery/thumb-1.jpg +0 -0
- data/public/treport/images/gallery/thumb-2.jpg +0 -0
- data/public/treport/images/gallery/thumb-3.jpg +0 -0
- data/public/treport/images/gallery/thumb-4.jpg +0 -0
- data/public/treport/images/gallery/thumb-5.jpg +0 -0
- data/public/treport/images/gallery/thumb-6.jpg +0 -0
- data/public/treport/images/placeholder/165x90.png +0 -0
- data/public/treport/images/placeholder/255x150.png +0 -0
- data/public/treport/images/placeholder/530x270.png +0 -0
- data/public/treport/images/placeholder/550x280.png +0 -0
- data/public/treport/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/treport/js/ace-editable.min.js +4 -0
- data/public/treport/js/ace-elements.min.js +5 -0
- data/public/treport/js/ace-extra.min.js +1 -0
- data/public/treport/js/ace.min.js +5 -0
- data/public/treport/js/autosize.min.js +6 -0
- data/public/treport/js/bootbox.js +6 -0
- data/public/treport/js/bootstrap-colorpicker.min.js +11 -0
- data/public/treport/js/bootstrap-datepicker.min.js +9 -0
- data/public/treport/js/bootstrap-datetimepicker.min.js +9 -0
- data/public/treport/js/bootstrap-editable.min.js +6 -0
- data/public/treport/js/bootstrap-markdown.min.js +19 -0
- data/public/treport/js/bootstrap-multiselect.min.js +44 -0
- data/public/treport/js/bootstrap-tag.min.js +19 -0
- data/public/treport/js/bootstrap-timepicker.min.js +11 -0
- data/public/treport/js/bootstrap-wysiwyg.min.js +2 -0
- data/public/treport/js/bootstrap.min.js +7 -0
- data/public/treport/js/buttons.colVis.min.js +5 -0
- data/public/treport/js/buttons.flash.min.js +8 -0
- data/public/treport/js/buttons.html5.min.js +8 -0
- data/public/treport/js/buttons.print.min.js +5 -0
- data/public/treport/js/chosen.jquery.min.js +1 -0
- data/public/treport/js/dataTables.buttons.min.js +4 -0
- data/public/treport/js/dataTables.select.min.js +4 -0
- data/public/treport/js/daterangepicker.min.js +9 -0
- data/public/treport/js/dropzone.min.js +2 -0
- data/public/{report → treport}/js/echarts.min.js +0 -0
- data/public/treport/js/excanvas.min.js +1 -0
- data/public/treport/js/fullcalendar.min.js +9 -0
- data/public/treport/js/grid.locale-en.js +1 -0
- data/public/treport/js/holder.min.js +13 -0
- data/public/treport/js/html5shiv.min.js +4 -0
- data/public/treport/js/jquery-1.11.3.min.js +6 -0
- data/public/treport/js/jquery-2.1.4.min.js +5 -0
- data/public/treport/js/jquery-additional-methods.min.js +9 -0
- data/public/treport/js/jquery-typeahead.js +6 -0
- data/public/treport/js/jquery-ui.custom.min.js +8 -0
- data/public/treport/js/jquery-ui.min.js +12 -0
- data/public/treport/js/jquery.bootstrap-duallistbox.min.js +9 -0
- data/public/treport/js/jquery.colorbox.min.js +6 -0
- data/public/treport/js/jquery.dataTables.bootstrap.min.js +2 -0
- data/public/treport/js/jquery.dataTables.min.js +6 -0
- data/public/treport/js/jquery.easypiechart.min.js +9 -0
- data/public/treport/js/jquery.flot.min.js +8 -0
- data/public/treport/js/jquery.flot.pie.min.js +57 -0
- data/public/treport/js/jquery.flot.resize.min.js +13 -0
- data/public/treport/js/jquery.gritter.min.js +11 -0
- data/public/treport/js/jquery.hotkeys.index.min.js +3 -0
- data/public/treport/js/jquery.inputlimiter.min.js +28 -0
- data/public/treport/js/jquery.jqGrid.min.js +17 -0
- data/public/treport/js/jquery.knob.min.js +1 -0
- data/public/treport/js/jquery.maskedinput.min.js +7 -0
- data/public/treport/js/jquery.mobile.custom.min.js +10 -0
- data/public/treport/js/jquery.nestable.min.js +5 -0
- data/public/treport/js/jquery.raty.min.js +11 -0
- data/public/treport/js/jquery.sparkline.index.min.js +203 -0
- data/public/treport/js/jquery.ui.touch-punch.min.js +11 -0
- data/public/treport/js/jquery.validate.min.js +9 -0
- data/public/treport/js/markdown.min.js +3 -0
- data/public/treport/js/moment.min.js +5 -0
- data/public/treport/js/prettify.min.js +30 -0
- data/public/treport/js/respond.min.js +5 -0
- data/public/treport/js/select2.min.js +9 -0
- data/public/treport/js/spin.js +32 -0
- data/public/treport/js/spinbox.min.js +8 -0
- data/public/treport/js/tree.min.js +8 -0
- data/public/treport/js/wizard.min.js +8 -0
- data/public/treport/plugins/datePicker/My97DatePicker.htm +49 -0
- data/public/treport/plugins/datePicker/WdatePicker.js +53 -0
- data/public/treport/plugins/datePicker/calendar.js +5 -0
- data/public/treport/plugins/datePicker/config.js +17 -0
- data/public/treport/plugins/datePicker/lang/en.js +14 -0
- data/public/treport/plugins/datePicker/lang/zh-cn.js +14 -0
- data/public/treport/plugins/datePicker/lang/zh-tw.js +14 -0
- data/public/treport/plugins/datePicker/skin/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/WdatePicker.css +10 -0
- data/public/treport/plugins/datePicker/skin/areo/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/areo/datepicker.css +302 -0
- data/public/treport/plugins/datePicker/skin/areo/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/areo/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/areo/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/areo/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/areo/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/areo/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/areo/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/areo/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/armyGreen/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/armyGreen/datepicker.css +302 -0
- data/public/treport/plugins/datePicker/skin/armyGreen/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/armyGreen/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/armyGreen/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/armyGreen/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/armyGreen/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/armyGreen/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/armyGreen/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/armyGreen/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blue/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/blue/bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blue/datepicker.css +115 -0
- data/public/treport/plugins/datePicker/skin/blue/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blue/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blue/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blue/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blue/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blue/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blue/qs.jpg +0 -0
- data/public/treport/plugins/datePicker/skin/blue/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blue/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blueGreen/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/blueGreen/datepicker.css +302 -0
- data/public/treport/plugins/datePicker/skin/blueGreen/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blueGreen/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blueGreen/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blueGreen/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blueGreen/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blueGreen/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blueGreen/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/blueGreen/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/darkBlue/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/darkBlue/datepicker.css +309 -0
- data/public/treport/plugins/datePicker/skin/darkBlue/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/darkBlue/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/darkBlue/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/darkBlue/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/darkBlue/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/darkBlue/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/darkBlue/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/darkBlue/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/darkYellow/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/darkYellow/bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/darkYellow/datepicker.css +115 -0
- data/public/treport/plugins/datePicker/skin/darkYellow/qs.jpg +0 -0
- data/public/treport/plugins/datePicker/skin/datePicker.gif +0 -0
- data/public/treport/plugins/datePicker/skin/deepBlue/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/deepBlue/datepicker.css +301 -0
- data/public/treport/plugins/datePicker/skin/deepBlue/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/deepBlue/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/deepBlue/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/deepBlue/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/deepBlue/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/deepBlue/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/deepBlue/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/deepBlue/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/default/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/default/datepicker.css +246 -0
- data/public/treport/plugins/datePicker/skin/default/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/green/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/green/bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/green/datepicker.css +115 -0
- data/public/treport/plugins/datePicker/skin/green/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/green/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/green/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/green/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/green/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/green/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/green/qs.jpg +0 -0
- data/public/treport/plugins/datePicker/skin/green/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/green/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/btn.jpg +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/datepicker.css +115 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/qs.jpg +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/lightBlue/titlebar.jpg +0 -0
- data/public/treport/plugins/datePicker/skin/modernBlue/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/modernBlue/datepicker.css +302 -0
- data/public/treport/plugins/datePicker/skin/modernBlue/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/modernBlue/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/modernBlue/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/modernBlue/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/modernBlue/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/modernBlue/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/modernBlue/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/modernBlue/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/orange/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/orange/datepicker.css +115 -0
- data/public/treport/plugins/datePicker/skin/orange/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/orange/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/orange/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/orange/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/orange/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/orange/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/orange/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/orange/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/red/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/red/bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/red/datepicker.css +115 -0
- data/public/treport/plugins/datePicker/skin/red/dateselect.gif +0 -0
- data/public/treport/plugins/datePicker/skin/red/glass-bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/red/hd-sprite.gif +0 -0
- data/public/treport/plugins/datePicker/skin/red/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/red/left-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/red/left-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/red/qs.jpg +0 -0
- data/public/treport/plugins/datePicker/skin/red/right-btn.gif +0 -0
- data/public/treport/plugins/datePicker/skin/red/right-btn2.gif +0 -0
- data/public/treport/plugins/datePicker/skin/whyGreen/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/whyGreen/bg.jpg +0 -0
- data/public/treport/plugins/datePicker/skin/whyGreen/datepicker.css +256 -0
- data/public/treport/plugins/datePicker/skin/whyGreen/img.gif +0 -0
- data/public/treport/plugins/datePicker/skin/yellowGreen/Thumbs.db +0 -0
- data/public/treport/plugins/datePicker/skin/yellowGreen/bg.gif +0 -0
- data/public/treport/plugins/datePicker/skin/yellowGreen/datepicker.css +115 -0
- data/public/treport/plugins/datePicker/skin/yellowGreen/qs.jpg +0 -0
- data/public/treport/plugins/datePicker//351/222/203/346/277/212/345/243/212/351/220/250/356/206/277/345/201/206/351/217/200/347/221/260/345/217/276/346/265/240/346/240/255/356/227/223/351/217/215_txt +1 -0
- data/public/treport/plugins/heandlebars/handlebars-v4.0.5.js +4608 -0
- data/public/treport/plugins/jquery-ui/iframeTab.js +42 -0
- data/public/treport/plugins/jquery-ui/images/ui-icons_444444_256x240.png +0 -0
- data/public/treport/plugins/jquery-ui/images/ui-icons_555555_256x240.png +0 -0
- data/public/treport/plugins/jquery-ui/images/ui-icons_777620_256x240.png +0 -0
- data/public/treport/plugins/jquery-ui/images/ui-icons_777777_256x240.png +0 -0
- data/public/treport/plugins/jquery-ui/images/ui-icons_cc0000_256x240.png +0 -0
- data/public/treport/plugins/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/treport/plugins/jquery-ui/jquery-ui.css +1312 -0
- data/public/treport/plugins/jquery-ui/jquery-ui.js +18706 -0
- data/public/treport/plugins/layer/layer.js +2 -0
- data/public/treport/plugins/layer/mobile/layer.js +2 -0
- data/public/treport/plugins/layer/mobile/need/layer.css +1 -0
- data/public/treport/plugins/layer/skin/default/icon-ext.png +0 -0
- data/public/treport/plugins/layer/skin/default/icon.png +0 -0
- data/public/treport/plugins/layer/skin/default/layer.css +1 -0
- data/public/treport/plugins/layer/skin/default/loading-0.gif +0 -0
- data/public/treport/plugins/layer/skin/default/loading-1.gif +0 -0
- data/public/treport/plugins/layer/skin/default/loading-2.gif +0 -0
- data/public/treport/plugins/selectize/css/selectize.bootstrap2.css +494 -0
- data/public/treport/plugins/selectize/css/selectize.bootstrap3.css +408 -0
- data/public/treport/plugins/selectize/css/selectize.css +324 -0
- data/public/treport/plugins/selectize/css/selectize.default.css +394 -0
- data/public/treport/plugins/selectize/css/selectize.legacy.css +371 -0
- data/public/treport/plugins/selectize/js/selectize.js +3193 -0
- data/public/treport/plugins/selectize/js/selectize.min.js +3 -0
- data/public/treport/plugins/selectize/js/standalone/selectize.js +3829 -0
- data/public/treport/plugins/selectize/js/standalone/selectize.min.js +3 -0
- data/public/treport/plugins/selectize/less/plugins/drag_drop.less +16 -0
- data/public/treport/plugins/selectize/less/plugins/dropdown_header.less +20 -0
- data/public/treport/plugins/selectize/less/plugins/optgroup_columns.less +17 -0
- data/public/treport/plugins/selectize/less/plugins/remove_button.less +43 -0
- data/public/treport/plugins/selectize/less/selectize.bootstrap2.less +161 -0
- data/public/treport/plugins/selectize/less/selectize.bootstrap3.less +150 -0
- data/public/treport/plugins/selectize/less/selectize.default.less +84 -0
- data/public/treport/plugins/selectize/less/selectize.legacy.less +75 -0
- data/public/treport/plugins/selectize/less/selectize.less +296 -0
- data/public/treport/plugins/tools/tab_enter.js +30 -0
- data/public/treport/plugins/typeahead/typeahead.bundle.js +2451 -0
- data/public/treport/plugins/validationEngine/jquery.validationEngine-zh_CN.js +181 -0
- data/public/treport/plugins/validationEngine/jquery.validationEngine.js +2160 -0
- data/public/treport/plugins/validationEngine/template.css +125 -0
- data/public/treport/plugins/validationEngine/validationEngine.jquery.css +182 -0
- data/public/treport/plugins/zDialog/dialog.js +1313 -0
- data/public/treport/plugins/zDialog/drag.js +92 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_bg.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_cb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_cb.png +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_closebtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_closebtn_over.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_ct.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_ct.png +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_lb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_lb.png +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_lt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_lt.png +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_mlm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_mlm.png +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_mrm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_mrm.png +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_rb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_rb.png +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_rt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dialog_rt.png +0 -0
- data/public/treport/plugins/zDialog/skins/blue/dir.txt +24 -0
- data/public/treport/plugins/zDialog/skins/blue/icon_alert.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/icon_dialog.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/icon_query.gif +0 -0
- data/public/treport/plugins/zDialog/skins/blue/window.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_bg.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_cb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_cb.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_closebtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_closebtn_over.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_ct.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_ct.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lb.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_lt.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mlm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mlm.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mrm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_mrm.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rb.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dialog_rt.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/dir.txt +24 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/icon_alert.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/icon_dialog.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/icon_query.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkBlue/window.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_bg.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_cb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_cb.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_closebtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_closebtn_over.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_ct.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_ct.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lb.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_lt.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mlm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mlm.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mrm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_mrm.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rb.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dialog_rt.png +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/dir.txt +24 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/icon_alert.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/icon_dialog.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/icon_query.gif +0 -0
- data/public/treport/plugins/zDialog/skins/darkYellow/window.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_bg.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_cb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_cb.png +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_closebtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_closebtn_over.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_ct.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_ct.png +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_lb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_lb.png +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_lt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_lt.png +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_mlm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_mlm.png +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_mrm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_mrm.png +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_rb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_rb.png +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_rt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/dialog_rt.png +0 -0
- data/public/treport/plugins/zDialog/skins/green/dir.txt +24 -0
- data/public/treport/plugins/zDialog/skins/green/icon_alert.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/icon_dialog.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/icon_query.gif +0 -0
- data/public/treport/plugins/zDialog/skins/green/window.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_bg.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_cb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_cb.png +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_closebtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_closebtn_over.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_ct.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_ct.png +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lb.png +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_lt.png +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mlm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mlm.png +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mrm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_mrm.png +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rb.png +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dialog_rt.png +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/dir.txt +24 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/icon_alert.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/icon_dialog.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/icon_query.gif +0 -0
- data/public/treport/plugins/zDialog/skins/lightBlue/window.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_bg.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_cb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_cb.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_closebtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_closebtn_over.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_ct.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_ct.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_decreasebtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_lb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_lb.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_lt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_lt.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_maxbtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_minbtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_mlm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_mlm.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_mrm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_mrm.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_rb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_rb.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_rt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/dialog_rt.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/icon_alert.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/icon_dialog.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/icon_dialog.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/icon_query.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/item_leftBtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/item_rightBtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_cb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_cb.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_ct.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_lb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_lb.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_lm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_lt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_rb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_rb.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_rm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/shadow_rt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/simple_bottomLine.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/simple_close.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/simple_tip.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/simple_tip.png +0 -0
- data/public/treport/plugins/zDialog/skins/orange/taskBar.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/orange/taskItemLeft.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/orange/taskItemLeftCurrent.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/orange/taskItemRight.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/orange/taskItemRightCurrent.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/orange/trans.gif +0 -0
- data/public/treport/plugins/zDialog/skins/orange/window.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_bg.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_cb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_cb.png +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_closebtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_closebtn_over.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_ct.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_ct.png +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_lb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_lb.png +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_lt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_lt.png +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_mlm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_mlm.png +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_mrm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_mrm.png +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_rb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_rb.png +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_rt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/dialog_rt.png +0 -0
- data/public/treport/plugins/zDialog/skins/red/dir.txt +24 -0
- data/public/treport/plugins/zDialog/skins/red/icon_alert.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/icon_dialog.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/icon_query.gif +0 -0
- data/public/treport/plugins/zDialog/skins/red/window.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_bg.jpg +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_cb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_cb.png +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_closebtn.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_closebtn_over.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_ct.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_ct.png +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lb.png +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_lt.png +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mlm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mlm.png +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mrm.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_mrm.png +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rb.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rb.png +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rt.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dialog_rt.png +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/dir.txt +24 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/icon_alert.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/icon_dialog.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/icon_query.gif +0 -0
- data/public/treport/plugins/zDialog/skins/yellowGreen/window.gif +0 -0
- data/public/treport/plugins/zDialog/zDialog.js +764 -0
- data/public/treport/plugins/zDialog/zDrag.js +1 -0
- data/public/treport/src-noconflict/ace.js +18673 -0
- data/public/treport/src-noconflict/ext-beautify.js +334 -0
- data/public/treport/src-noconflict/ext-chromevox.js +540 -0
- data/public/treport/src-noconflict/ext-elastic_tabstops_lite.js +274 -0
- data/public/treport/src-noconflict/ext-emmet.js +1218 -0
- data/public/treport/src-noconflict/ext-error_marker.js +6 -0
- data/public/treport/src-noconflict/ext-keybinding_menu.js +170 -0
- data/public/treport/src-noconflict/ext-language_tools.js +1938 -0
- data/public/treport/src-noconflict/ext-linking.js +52 -0
- data/public/treport/src-noconflict/ext-modelist.js +201 -0
- data/public/treport/src-noconflict/ext-old_ie.js +501 -0
- data/public/treport/src-noconflict/ext-searchbox.js +416 -0
- data/public/treport/src-noconflict/ext-settings_menu.js +653 -0
- data/public/treport/src-noconflict/ext-spellcheck.js +71 -0
- data/public/treport/src-noconflict/ext-split.js +246 -0
- data/public/treport/src-noconflict/ext-static_highlight.js +161 -0
- data/public/treport/src-noconflict/ext-statusbar.js +53 -0
- data/public/treport/src-noconflict/ext-textarea.js +559 -0
- data/public/treport/src-noconflict/ext-themelist.js +60 -0
- data/public/treport/src-noconflict/ext-whitespace.js +185 -0
- data/public/treport/src-noconflict/keybinding-emacs.js +1181 -0
- data/public/treport/src-noconflict/keybinding-vim.js +5580 -0
- data/public/treport/src-noconflict/mode-abap.js +214 -0
- data/public/treport/src-noconflict/mode-abc.js +260 -0
- data/public/treport/src-noconflict/mode-actionscript.js +266 -0
- data/public/treport/src-noconflict/mode-ada.js +87 -0
- data/public/treport/src-noconflict/mode-apache_conf.js +355 -0
- data/public/treport/src-noconflict/mode-applescript.js +271 -0
- data/public/treport/src-noconflict/mode-asciidoc.js +342 -0
- data/public/treport/src-noconflict/mode-assembly_x86.js +185 -0
- data/public/treport/src-noconflict/mode-autohotkey.js +234 -0
- data/public/treport/src-noconflict/mode-batchfile.js +222 -0
- data/public/treport/src-noconflict/mode-c9search.js +275 -0
- data/public/treport/src-noconflict/mode-c_cpp.js +845 -0
- data/public/treport/src-noconflict/mode-cirru.js +202 -0
- data/public/treport/src-noconflict/mode-clojure.js +306 -0
- data/public/treport/src-noconflict/mode-cobol.js +94 -0
- data/public/treport/src-noconflict/mode-coffee.js +393 -0
- data/public/treport/src-noconflict/mode-coldfusion.js +2867 -0
- data/public/treport/src-noconflict/mode-csharp.js +853 -0
- data/public/treport/src-noconflict/mode-css.js +1008 -0
- data/public/treport/src-noconflict/mode-curly.js +2836 -0
- data/public/treport/src-noconflict/mode-d.js +512 -0
- data/public/treport/src-noconflict/mode-dart.js +1049 -0
- data/public/treport/src-noconflict/mode-diff.js +139 -0
- data/public/treport/src-noconflict/mode-django.js +2870 -0
- data/public/treport/src-noconflict/mode-dockerfile.js +849 -0
- data/public/treport/src-noconflict/mode-dot.js +412 -0
- data/public/treport/src-noconflict/mode-eiffel.js +128 -0
- data/public/treport/src-noconflict/mode-ejs.js +3294 -0
- data/public/treport/src-noconflict/mode-elixir.js +493 -0
- data/public/treport/src-noconflict/mode-elm.js +296 -0
- data/public/treport/src-noconflict/mode-erlang.js +1001 -0
- data/public/treport/src-noconflict/mode-forth.js +289 -0
- data/public/treport/src-noconflict/mode-ftl.js +1137 -0
- data/public/treport/src-noconflict/mode-gcode.js +85 -0
- data/public/treport/src-noconflict/mode-gherkin.js +162 -0
- data/public/treport/src-noconflict/mode-gitignore.js +51 -0
- data/public/treport/src-noconflict/mode-glsl.js +922 -0
- data/public/treport/src-noconflict/mode-gobstones.js +1273 -0
- data/public/treport/src-noconflict/mode-golang.js +763 -0
- data/public/treport/src-noconflict/mode-groovy.js +1332 -0
- data/public/treport/src-noconflict/mode-haml.js +1482 -0
- data/public/treport/src-noconflict/mode-handlebars.js +2895 -0
- data/public/treport/src-noconflict/mode-haskell.js +371 -0
- data/public/treport/src-noconflict/mode-haxe.js +737 -0
- data/public/treport/src-noconflict/mode-html.js +2780 -0
- data/public/treport/src-noconflict/mode-html_elixir.js +3358 -0
- data/public/treport/src-noconflict/mode-html_ruby.js +3311 -0
- data/public/treport/src-noconflict/mode-ini.js +154 -0
- data/public/treport/src-noconflict/mode-io.js +246 -0
- data/public/treport/src-noconflict/mode-jack.js +696 -0
- data/public/treport/src-noconflict/mode-jade.js +2066 -0
- data/public/treport/src-noconflict/mode-java.js +1287 -0
- data/public/treport/src-noconflict/mode-javascript.js +1140 -0
- data/public/treport/src-noconflict/mode-json.js +668 -0
- data/public/treport/src-noconflict/mode-jsoniq.js +2956 -0
- data/public/treport/src-noconflict/mode-jsp.js +1701 -0
- data/public/treport/src-noconflict/mode-jsx.js +762 -0
- data/public/treport/src-noconflict/mode-julia.js +295 -0
- data/public/treport/src-noconflict/mode-latex.js +223 -0
- data/public/treport/src-noconflict/mode-lean.js +281 -0
- data/public/treport/src-noconflict/mode-less.js +1129 -0
- data/public/treport/src-noconflict/mode-liquid.js +1139 -0
- data/public/treport/src-noconflict/mode-lisp.js +104 -0
- data/public/treport/src-noconflict/mode-live_script.js +481 -0
- data/public/treport/src-noconflict/mode-livescript.js +271 -0
- data/public/treport/src-noconflict/mode-logiql.js +667 -0
- data/public/treport/src-noconflict/mode-lsl.js +692 -0
- data/public/treport/src-noconflict/mode-lua.js +423 -0
- data/public/treport/src-noconflict/mode-luapage.js +3277 -0
- data/public/treport/src-noconflict/mode-lucene.js +69 -0
- data/public/treport/src-noconflict/mode-makefile.js +403 -0
- data/public/treport/src-noconflict/mode-markdown.js +3165 -0
- data/public/treport/src-noconflict/mode-mask.js +2099 -0
- data/public/treport/src-noconflict/mode-matlab.js +256 -0
- data/public/treport/src-noconflict/mode-mavens_mate_log.js +160 -0
- data/public/treport/src-noconflict/mode-maze.js +283 -0
- data/public/treport/src-noconflict/mode-mel.js +613 -0
- data/public/treport/src-noconflict/mode-mips_assembler.js +235 -0
- data/public/treport/src-noconflict/mode-mipsassembler.js +196 -0
- data/public/treport/src-noconflict/mode-mushcode.js +673 -0
- data/public/treport/src-noconflict/mode-mysql.js +160 -0
- data/public/treport/src-noconflict/mode-nix.js +989 -0
- data/public/treport/src-noconflict/mode-nsis.js +304 -0
- data/public/treport/src-noconflict/mode-objectivec.js +726 -0
- data/public/treport/src-noconflict/mode-ocaml.js +414 -0
- data/public/treport/src-noconflict/mode-pascal.js +197 -0
- data/public/treport/src-noconflict/mode-perl.js +373 -0
- data/public/treport/src-noconflict/mode-pgsql.js +1489 -0
- data/public/treport/src-noconflict/mode-php.js +13328 -0
- data/public/treport/src-noconflict/mode-plain_text.js +25 -0
- data/public/treport/src-noconflict/mode-powershell.js +768 -0
- data/public/treport/src-noconflict/mode-praat.js +468 -0
- data/public/treport/src-noconflict/mode-prolog.js +363 -0
- data/public/treport/src-noconflict/mode-properties.js +72 -0
- data/public/treport/src-noconflict/mode-protobuf.js +936 -0
- data/public/treport/src-noconflict/mode-python.js +264 -0
- data/public/treport/src-noconflict/mode-r.js +302 -0
- data/public/treport/src-noconflict/mode-razor.js +3136 -0
- data/public/treport/src-noconflict/mode-rdoc.js +205 -0
- data/public/treport/src-noconflict/mode-rhtml.js +3079 -0
- data/public/treport/src-noconflict/mode-rst.js +249 -0
- data/public/treport/src-noconflict/mode-ruby.js +843 -0
- data/public/treport/src-noconflict/mode-rust.js +270 -0
- data/public/treport/src-noconflict/mode-sass.js +412 -0
- data/public/treport/src-noconflict/mode-scad.js +766 -0
- data/public/treport/src-noconflict/mode-scala.js +1329 -0
- data/public/treport/src-noconflict/mode-scheme.js +224 -0
- data/public/treport/src-noconflict/mode-scss.js +922 -0
- data/public/treport/src-noconflict/mode-sh.js +798 -0
- data/public/treport/src-noconflict/mode-sjs.js +1357 -0
- data/public/treport/src-noconflict/mode-smarty.js +2906 -0
- data/public/treport/src-noconflict/mode-snippets.js +198 -0
- data/public/treport/src-noconflict/mode-soy_template.js +3119 -0
- data/public/treport/src-noconflict/mode-space.js +159 -0
- data/public/treport/src-noconflict/mode-sql.js +100 -0
- data/public/treport/src-noconflict/mode-sqlserver.js +437 -0
- data/public/treport/src-noconflict/mode-stylus.js +414 -0
- data/public/treport/src-noconflict/mode-svg.js +1916 -0
- data/public/treport/src-noconflict/mode-swift.js +738 -0
- data/public/treport/src-noconflict/mode-swig.js +1099 -0
- data/public/treport/src-noconflict/mode-tcl.js +375 -0
- data/public/treport/src-noconflict/mode-tex.js +151 -0
- data/public/treport/src-noconflict/mode-text.js +1 -0
- data/public/treport/src-noconflict/mode-textile.js +141 -0
- data/public/treport/src-noconflict/mode-toml.js +145 -0
- data/public/treport/src-noconflict/mode-twig.js +2964 -0
- data/public/treport/src-noconflict/mode-typescript.js +1223 -0
- data/public/treport/src-noconflict/mode-vala.js +1026 -0
- data/public/treport/src-noconflict/mode-vbscript.js +226 -0
- data/public/treport/src-noconflict/mode-velocity.js +3062 -0
- data/public/treport/src-noconflict/mode-verilog.js +103 -0
- data/public/treport/src-noconflict/mode-vhdl.js +110 -0
- data/public/treport/src-noconflict/mode-wollok.js +1256 -0
- data/public/treport/src-noconflict/mode-xml.js +661 -0
- data/public/treport/src-noconflict/mode-xquery.js +2968 -0
- data/public/treport/src-noconflict/mode-yaml.js +256 -0
- data/public/treport/src-noconflict/snippets/abap.js +7 -0
- data/public/treport/src-noconflict/snippets/abc.js +38 -0
- data/public/treport/src-noconflict/snippets/actionscript.js +164 -0
- data/public/treport/src-noconflict/snippets/ada.js +7 -0
- data/public/treport/src-noconflict/snippets/apache_conf.js +7 -0
- data/public/treport/src-noconflict/snippets/applescript.js +7 -0
- data/public/treport/src-noconflict/snippets/asciidoc.js +7 -0
- data/public/treport/src-noconflict/snippets/assembly_x86.js +7 -0
- data/public/treport/src-noconflict/snippets/autohotkey.js +7 -0
- data/public/treport/src-noconflict/snippets/batchfile.js +7 -0
- data/public/treport/src-noconflict/snippets/c9search.js +7 -0
- data/public/treport/src-noconflict/snippets/c_cpp.js +138 -0
- data/public/treport/src-noconflict/snippets/cirru.js +7 -0
- data/public/treport/src-noconflict/snippets/clojure.js +97 -0
- data/public/treport/src-noconflict/snippets/cobol.js +7 -0
- data/public/treport/src-noconflict/snippets/coffee.js +102 -0
- data/public/treport/src-noconflict/snippets/coldfusion.js +7 -0
- data/public/treport/src-noconflict/snippets/csharp.js +7 -0
- data/public/treport/src-noconflict/snippets/css.js +974 -0
- data/public/treport/src-noconflict/snippets/curly.js +7 -0
- data/public/treport/src-noconflict/snippets/d.js +7 -0
- data/public/treport/src-noconflict/snippets/dart.js +90 -0
- data/public/treport/src-noconflict/snippets/diff.js +18 -0
- data/public/treport/src-noconflict/snippets/django.js +115 -0
- data/public/treport/src-noconflict/snippets/dockerfile.js +7 -0
- data/public/treport/src-noconflict/snippets/dot.js +7 -0
- data/public/treport/src-noconflict/snippets/eiffel.js +7 -0
- data/public/treport/src-noconflict/snippets/ejs.js +7 -0
- data/public/treport/src-noconflict/snippets/elixir.js +7 -0
- data/public/treport/src-noconflict/snippets/elm.js +7 -0
- data/public/treport/src-noconflict/snippets/erlang.js +167 -0
- data/public/treport/src-noconflict/snippets/forth.js +7 -0
- data/public/treport/src-noconflict/snippets/ftl.js +7 -0
- data/public/treport/src-noconflict/snippets/gcode.js +7 -0
- data/public/treport/src-noconflict/snippets/gherkin.js +7 -0
- data/public/treport/src-noconflict/snippets/gitignore.js +7 -0
- data/public/treport/src-noconflict/snippets/glsl.js +7 -0
- data/public/treport/src-noconflict/snippets/gobstones.js +41 -0
- data/public/treport/src-noconflict/snippets/golang.js +7 -0
- data/public/treport/src-noconflict/snippets/groovy.js +7 -0
- data/public/treport/src-noconflict/snippets/haml.js +27 -0
- data/public/treport/src-noconflict/snippets/handlebars.js +7 -0
- data/public/treport/src-noconflict/snippets/haskell.js +89 -0
- data/public/treport/src-noconflict/snippets/haxe.js +7 -0
- data/public/treport/src-noconflict/snippets/html.js +835 -0
- data/public/treport/src-noconflict/snippets/html_elixir.js +7 -0
- data/public/treport/src-noconflict/snippets/html_ruby.js +7 -0
- data/public/treport/src-noconflict/snippets/ini.js +7 -0
- data/public/treport/src-noconflict/snippets/io.js +69 -0
- data/public/treport/src-noconflict/snippets/jack.js +7 -0
- data/public/treport/src-noconflict/snippets/jade.js +7 -0
- data/public/treport/src-noconflict/snippets/java.js +247 -0
- data/public/treport/src-noconflict/snippets/javascript.js +202 -0
- data/public/treport/src-noconflict/snippets/json.js +7 -0
- data/public/treport/src-noconflict/snippets/jsoniq.js +68 -0
- data/public/treport/src-noconflict/snippets/jsp.js +106 -0
- data/public/treport/src-noconflict/snippets/jsx.js +7 -0
- data/public/treport/src-noconflict/snippets/julia.js +7 -0
- data/public/treport/src-noconflict/snippets/latex.js +7 -0
- data/public/treport/src-noconflict/snippets/lean.js +7 -0
- data/public/treport/src-noconflict/snippets/less.js +7 -0
- data/public/treport/src-noconflict/snippets/liquid.js +7 -0
- data/public/treport/src-noconflict/snippets/lisp.js +7 -0
- data/public/treport/src-noconflict/snippets/live_script.js +7 -0
- data/public/treport/src-noconflict/snippets/livescript.js +7 -0
- data/public/treport/src-noconflict/snippets/logiql.js +7 -0
- data/public/treport/src-noconflict/snippets/lsl.js +1239 -0
- data/public/treport/src-noconflict/snippets/lua.js +28 -0
- data/public/treport/src-noconflict/snippets/luapage.js +7 -0
- data/public/treport/src-noconflict/snippets/lucene.js +7 -0
- data/public/treport/src-noconflict/snippets/makefile.js +11 -0
- data/public/treport/src-noconflict/snippets/markdown.js +95 -0
- data/public/treport/src-noconflict/snippets/mask.js +7 -0
- data/public/treport/src-noconflict/snippets/matlab.js +7 -0
- data/public/treport/src-noconflict/snippets/maze.js +16 -0
- data/public/treport/src-noconflict/snippets/mel.js +7 -0
- data/public/treport/src-noconflict/snippets/mips_assembler.js +7 -0
- data/public/treport/src-noconflict/snippets/mipsassembler.js +7 -0
- data/public/treport/src-noconflict/snippets/mushcode.js +7 -0
- data/public/treport/src-noconflict/snippets/mysql.js +7 -0
- data/public/treport/src-noconflict/snippets/nix.js +7 -0
- data/public/treport/src-noconflict/snippets/nsis.js +7 -0
- data/public/treport/src-noconflict/snippets/objectivec.js +7 -0
- data/public/treport/src-noconflict/snippets/ocaml.js +7 -0
- data/public/treport/src-noconflict/snippets/pascal.js +7 -0
- data/public/treport/src-noconflict/snippets/perl.js +354 -0
- data/public/treport/src-noconflict/snippets/pgsql.js +7 -0
- data/public/treport/src-noconflict/snippets/php.js +384 -0
- data/public/treport/src-noconflict/snippets/plain_text.js +7 -0
- data/public/treport/src-noconflict/snippets/powershell.js +7 -0
- data/public/treport/src-noconflict/snippets/praat.js +7 -0
- data/public/treport/src-noconflict/snippets/prolog.js +7 -0
- data/public/treport/src-noconflict/snippets/properties.js +7 -0
- data/public/treport/src-noconflict/snippets/protobuf.js +7 -0
- data/public/treport/src-noconflict/snippets/python.js +165 -0
- data/public/treport/src-noconflict/snippets/r.js +128 -0
- data/public/treport/src-noconflict/snippets/razor.js +10 -0
- data/public/treport/src-noconflict/snippets/rdoc.js +7 -0
- data/public/treport/src-noconflict/snippets/rhtml.js +7 -0
- data/public/treport/src-noconflict/snippets/rst.js +7 -0
- data/public/treport/src-noconflict/snippets/ruby.js +935 -0
- data/public/treport/src-noconflict/snippets/rust.js +7 -0
- data/public/treport/src-noconflict/snippets/sass.js +7 -0
- data/public/treport/src-noconflict/snippets/scad.js +7 -0
- data/public/treport/src-noconflict/snippets/scala.js +7 -0
- data/public/treport/src-noconflict/snippets/scheme.js +7 -0
- data/public/treport/src-noconflict/snippets/scss.js +7 -0
- data/public/treport/src-noconflict/snippets/sh.js +90 -0
- data/public/treport/src-noconflict/snippets/sjs.js +7 -0
- data/public/treport/src-noconflict/snippets/smarty.js +7 -0
- data/public/treport/src-noconflict/snippets/snippets.js +16 -0
- data/public/treport/src-noconflict/snippets/soy_template.js +7 -0
- data/public/treport/src-noconflict/snippets/space.js +7 -0
- data/public/treport/src-noconflict/snippets/sql.js +33 -0
- data/public/treport/src-noconflict/snippets/sqlserver.js +76 -0
- data/public/treport/src-noconflict/snippets/stylus.js +7 -0
- data/public/treport/src-noconflict/snippets/svg.js +7 -0
- data/public/treport/src-noconflict/snippets/swift.js +7 -0
- data/public/treport/src-noconflict/snippets/swig.js +7 -0
- data/public/treport/src-noconflict/snippets/tcl.js +99 -0
- data/public/treport/src-noconflict/snippets/tex.js +197 -0
- data/public/treport/src-noconflict/snippets/text.js +7 -0
- data/public/treport/src-noconflict/snippets/textile.js +37 -0
- data/public/treport/src-noconflict/snippets/toml.js +7 -0
- data/public/treport/src-noconflict/snippets/twig.js +7 -0
- data/public/treport/src-noconflict/snippets/typescript.js +7 -0
- data/public/treport/src-noconflict/snippets/vala.js +193 -0
- data/public/treport/src-noconflict/snippets/vbscript.js +7 -0
- data/public/treport/src-noconflict/snippets/velocity.js +36 -0
- data/public/treport/src-noconflict/snippets/verilog.js +7 -0
- data/public/treport/src-noconflict/snippets/vhdl.js +7 -0
- data/public/treport/src-noconflict/snippets/wollok.js +91 -0
- data/public/treport/src-noconflict/snippets/xml.js +7 -0
- data/public/treport/src-noconflict/snippets/xquery.js +68 -0
- data/public/treport/src-noconflict/snippets/yaml.js +7 -0
- data/public/treport/src-noconflict/theme-ambiance.js +182 -0
- data/public/treport/src-noconflict/theme-chaos.js +156 -0
- data/public/treport/src-noconflict/theme-chrome.js +128 -0
- data/public/treport/src-noconflict/theme-clouds.js +95 -0
- data/public/treport/src-noconflict/theme-clouds_midnight.js +96 -0
- data/public/treport/src-noconflict/theme-cobalt.js +113 -0
- data/public/treport/src-noconflict/theme-crimson_editor.js +118 -0
- data/public/treport/src-noconflict/theme-dawn.js +108 -0
- data/public/treport/src-noconflict/theme-dreamweaver.js +141 -0
- data/public/treport/src-noconflict/theme-eclipse.js +98 -0
- data/public/treport/src-noconflict/theme-github.js +103 -0
- data/public/treport/src-noconflict/theme-idle_fingers.js +96 -0
- data/public/treport/src-noconflict/theme-iplastic.js +121 -0
- data/public/treport/src-noconflict/theme-katzenmilch.js +121 -0
- data/public/treport/src-noconflict/theme-kr_theme.js +104 -0
- data/public/treport/src-noconflict/theme-kuroir.js +61 -0
- data/public/treport/src-noconflict/theme-merbivore.js +95 -0
- data/public/treport/src-noconflict/theme-merbivore_soft.js +96 -0
- data/public/treport/src-noconflict/theme-mono_industrial.js +107 -0
- data/public/treport/src-noconflict/theme-monokai.js +105 -0
- data/public/treport/src-noconflict/theme-pastel_on_dark.js +108 -0
- data/public/treport/src-noconflict/theme-solarized_dark.js +88 -0
- data/public/treport/src-noconflict/theme-solarized_light.js +91 -0
- data/public/treport/src-noconflict/theme-sqlserver.js +138 -0
- data/public/treport/src-noconflict/theme-terminal.js +114 -0
- data/public/treport/src-noconflict/theme-textmate.js +129 -0
- data/public/treport/src-noconflict/theme-tomorrow.js +108 -0
- data/public/treport/src-noconflict/theme-tomorrow_night.js +108 -0
- data/public/treport/src-noconflict/theme-tomorrow_night_blue.js +106 -0
- data/public/treport/src-noconflict/theme-tomorrow_night_bright.js +121 -0
- data/public/treport/src-noconflict/theme-tomorrow_night_eighties.js +108 -0
- data/public/treport/src-noconflict/theme-twilight.js +109 -0
- data/public/treport/src-noconflict/theme-vibrant_ink.js +94 -0
- data/public/treport/src-noconflict/theme-xcode.js +88 -0
- data/public/treport/src-noconflict/worker-coffee.js +2159 -0
- data/public/treport/src-noconflict/worker-css.js +8762 -0
- data/public/treport/src-noconflict/worker-html.js +11607 -0
- data/public/treport/src-noconflict/worker-javascript.js +12530 -0
- data/public/treport/src-noconflict/worker-json.js +2398 -0
- data/public/treport/src-noconflict/worker-lua.js +3634 -0
- data/public/treport/src-noconflict/worker-php.js +7021 -0
- data/public/treport/src-noconflict/worker-xml.js +3889 -0
- data/public/treport/src-noconflict/worker-xquery.js +49612 -0
- data/public/treport/swf/flashExport.swf +0 -0
- metadata +906 -54
- data/app/controllers/connects_controller.rb +0 -56
- data/app/controllers/dictionaries_controller.rb +0 -56
- data/app/controllers/reports_controller.rb +0 -62
- data/app/controllers/requirements_controller.rb +0 -60
- data/app/controllers/series_controller.rb +0 -60
- data/app/models/.keep +0 -0
- data/app/models/dictionary.rb +0 -4
- data/app/models/series.rb +0 -4
- data/app/views/connects/_form.html.erb +0 -68
- data/app/views/connects/edit.html.erb +0 -1
- data/app/views/connects/index.html.erb +0 -48
- data/app/views/connects/new.html.erb +0 -1
- data/app/views/dictionaries/_form.html.erb +0 -49
- data/app/views/dictionaries/edit.html.erb +0 -1
- data/app/views/dictionaries/index.html.erb +0 -42
- data/app/views/dictionaries/new.html.erb +0 -1
- data/app/views/layouts/report.html.erb +0 -54
- data/app/views/reports/_form.html.erb +0 -65
- data/app/views/reports/edit.html.erb +0 -1
- data/app/views/reports/index.html.erb +0 -50
- data/app/views/reports/new.html.erb +0 -1
- data/app/views/requirements/_form.html.erb +0 -72
- data/app/views/requirements/edit.html.erb +0 -1
- data/app/views/requirements/index.html.erb +0 -51
- data/app/views/requirements/new.html.erb +0 -1
- data/app/views/series/_form.html.erb +0 -47
- data/app/views/series/edit.html.erb +0 -1
- data/app/views/series/index.html.erb +0 -40
- data/app/views/series/new.html.erb +0 -1
- data/app/views/templates/public_one.html.erb +0 -75
- data/app/views/templates/public_two.html.erb +0 -76
- data/app/views/templates/text.html.erb +0 -9
- data/db/migrate/20160607002137_create_connects.rb +0 -15
- data/db/migrate/20160608123333_create_reports.rb +0 -15
- data/db/migrate/20160608124539_create_requirements.rb +0 -16
- data/db/migrate/20160608124549_create_dictionaries.rb +0 -12
- data/db/migrate/20160608124602_create_series.rb +0 -11
- data/lib/generators/report/install_generator.rb +0 -26
- data/lib/treport/db.rb +0 -49
- data/public/report/css/AdminLTE.css +0 -4906
- data/public/report/css/bootstrap.min.css +0 -6
- data/public/report/css/skins/_all-skins.css +0 -1799
- data/public/report/css/skins/_all-skins.min.css +0 -1
- data/public/report/js/app.js +0 -44
- data/treport.gemspec +0 -12
@@ -0,0 +1,2398 @@
|
|
1
|
+
"no use strict";
|
2
|
+
;(function(window) {
|
3
|
+
if (typeof window.window != "undefined" && window.document)
|
4
|
+
return;
|
5
|
+
if (window.require && window.define)
|
6
|
+
return;
|
7
|
+
|
8
|
+
if (!window.console) {
|
9
|
+
window.console = function() {
|
10
|
+
var msgs = Array.prototype.slice.call(arguments, 0);
|
11
|
+
postMessage({type: "log", data: msgs});
|
12
|
+
};
|
13
|
+
window.console.error =
|
14
|
+
window.console.warn =
|
15
|
+
window.console.log =
|
16
|
+
window.console.trace = window.console;
|
17
|
+
}
|
18
|
+
window.window = window;
|
19
|
+
window.ace = window;
|
20
|
+
|
21
|
+
window.onerror = function(message, file, line, col, err) {
|
22
|
+
postMessage({type: "error", data: {
|
23
|
+
message: message,
|
24
|
+
data: err.data,
|
25
|
+
file: file,
|
26
|
+
line: line,
|
27
|
+
col: col,
|
28
|
+
stack: err.stack
|
29
|
+
}});
|
30
|
+
};
|
31
|
+
|
32
|
+
window.normalizeModule = function(parentId, moduleName) {
|
33
|
+
// normalize plugin requires
|
34
|
+
if (moduleName.indexOf("!") !== -1) {
|
35
|
+
var chunks = moduleName.split("!");
|
36
|
+
return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
|
37
|
+
}
|
38
|
+
// normalize relative requires
|
39
|
+
if (moduleName.charAt(0) == ".") {
|
40
|
+
var base = parentId.split("/").slice(0, -1).join("/");
|
41
|
+
moduleName = (base ? base + "/" : "") + moduleName;
|
42
|
+
|
43
|
+
while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
|
44
|
+
var previous = moduleName;
|
45
|
+
moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
return moduleName;
|
50
|
+
};
|
51
|
+
|
52
|
+
window.require = function require(parentId, id) {
|
53
|
+
if (!id) {
|
54
|
+
id = parentId;
|
55
|
+
parentId = null;
|
56
|
+
}
|
57
|
+
if (!id.charAt)
|
58
|
+
throw new Error("worker.js require() accepts only (parentId, id) as arguments");
|
59
|
+
|
60
|
+
id = window.normalizeModule(parentId, id);
|
61
|
+
|
62
|
+
var module = window.require.modules[id];
|
63
|
+
if (module) {
|
64
|
+
if (!module.initialized) {
|
65
|
+
module.initialized = true;
|
66
|
+
module.exports = module.factory().exports;
|
67
|
+
}
|
68
|
+
return module.exports;
|
69
|
+
}
|
70
|
+
|
71
|
+
if (!window.require.tlns)
|
72
|
+
return console.log("unable to load " + id);
|
73
|
+
|
74
|
+
var path = resolveModuleId(id, window.require.tlns);
|
75
|
+
if (path.slice(-3) != ".js") path += ".js";
|
76
|
+
|
77
|
+
window.require.id = id;
|
78
|
+
window.require.modules[id] = {}; // prevent infinite loop on broken modules
|
79
|
+
importScripts(path);
|
80
|
+
return window.require(parentId, id);
|
81
|
+
};
|
82
|
+
function resolveModuleId(id, paths) {
|
83
|
+
var testPath = id, tail = "";
|
84
|
+
while (testPath) {
|
85
|
+
var alias = paths[testPath];
|
86
|
+
if (typeof alias == "string") {
|
87
|
+
return alias + tail;
|
88
|
+
} else if (alias) {
|
89
|
+
return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
|
90
|
+
} else if (alias === false) {
|
91
|
+
return "";
|
92
|
+
}
|
93
|
+
var i = testPath.lastIndexOf("/");
|
94
|
+
if (i === -1) break;
|
95
|
+
tail = testPath.substr(i) + tail;
|
96
|
+
testPath = testPath.slice(0, i);
|
97
|
+
}
|
98
|
+
return id;
|
99
|
+
}
|
100
|
+
window.require.modules = {};
|
101
|
+
window.require.tlns = {};
|
102
|
+
|
103
|
+
window.define = function(id, deps, factory) {
|
104
|
+
if (arguments.length == 2) {
|
105
|
+
factory = deps;
|
106
|
+
if (typeof id != "string") {
|
107
|
+
deps = id;
|
108
|
+
id = window.require.id;
|
109
|
+
}
|
110
|
+
} else if (arguments.length == 1) {
|
111
|
+
factory = id;
|
112
|
+
deps = [];
|
113
|
+
id = window.require.id;
|
114
|
+
}
|
115
|
+
|
116
|
+
if (typeof factory != "function") {
|
117
|
+
window.require.modules[id] = {
|
118
|
+
exports: factory,
|
119
|
+
initialized: true
|
120
|
+
};
|
121
|
+
return;
|
122
|
+
}
|
123
|
+
|
124
|
+
if (!deps.length)
|
125
|
+
// If there is no dependencies, we inject "require", "exports" and
|
126
|
+
// "module" as dependencies, to provide CommonJS compatibility.
|
127
|
+
deps = ["require", "exports", "module"];
|
128
|
+
|
129
|
+
var req = function(childId) {
|
130
|
+
return window.require(id, childId);
|
131
|
+
};
|
132
|
+
|
133
|
+
window.require.modules[id] = {
|
134
|
+
exports: {},
|
135
|
+
factory: function() {
|
136
|
+
var module = this;
|
137
|
+
var returnExports = factory.apply(this, deps.map(function(dep) {
|
138
|
+
switch (dep) {
|
139
|
+
// Because "require", "exports" and "module" aren't actual
|
140
|
+
// dependencies, we must handle them seperately.
|
141
|
+
case "require": return req;
|
142
|
+
case "exports": return module.exports;
|
143
|
+
case "module": return module;
|
144
|
+
// But for all other dependencies, we can just go ahead and
|
145
|
+
// require them.
|
146
|
+
default: return req(dep);
|
147
|
+
}
|
148
|
+
}));
|
149
|
+
if (returnExports)
|
150
|
+
module.exports = returnExports;
|
151
|
+
return module;
|
152
|
+
}
|
153
|
+
};
|
154
|
+
};
|
155
|
+
window.define.amd = {};
|
156
|
+
require.tlns = {};
|
157
|
+
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
|
158
|
+
for (var i in topLevelNamespaces)
|
159
|
+
require.tlns[i] = topLevelNamespaces[i];
|
160
|
+
};
|
161
|
+
|
162
|
+
window.initSender = function initSender() {
|
163
|
+
|
164
|
+
var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
|
165
|
+
var oop = window.require("ace/lib/oop");
|
166
|
+
|
167
|
+
var Sender = function() {};
|
168
|
+
|
169
|
+
(function() {
|
170
|
+
|
171
|
+
oop.implement(this, EventEmitter);
|
172
|
+
|
173
|
+
this.callback = function(data, callbackId) {
|
174
|
+
postMessage({
|
175
|
+
type: "call",
|
176
|
+
id: callbackId,
|
177
|
+
data: data
|
178
|
+
});
|
179
|
+
};
|
180
|
+
|
181
|
+
this.emit = function(name, data) {
|
182
|
+
postMessage({
|
183
|
+
type: "event",
|
184
|
+
name: name,
|
185
|
+
data: data
|
186
|
+
});
|
187
|
+
};
|
188
|
+
|
189
|
+
}).call(Sender.prototype);
|
190
|
+
|
191
|
+
return new Sender();
|
192
|
+
};
|
193
|
+
|
194
|
+
var main = window.main = null;
|
195
|
+
var sender = window.sender = null;
|
196
|
+
|
197
|
+
window.onmessage = function(e) {
|
198
|
+
var msg = e.data;
|
199
|
+
if (msg.event && sender) {
|
200
|
+
sender._signal(msg.event, msg.data);
|
201
|
+
}
|
202
|
+
else if (msg.command) {
|
203
|
+
if (main[msg.command])
|
204
|
+
main[msg.command].apply(main, msg.args);
|
205
|
+
else if (window[msg.command])
|
206
|
+
window[msg.command].apply(window, msg.args);
|
207
|
+
else
|
208
|
+
throw new Error("Unknown command:" + msg.command);
|
209
|
+
}
|
210
|
+
else if (msg.init) {
|
211
|
+
window.initBaseUrls(msg.tlns);
|
212
|
+
require("ace/lib/es5-shim");
|
213
|
+
sender = window.sender = window.initSender();
|
214
|
+
var clazz = require(msg.module)[msg.classname];
|
215
|
+
main = window.main = new clazz(sender);
|
216
|
+
}
|
217
|
+
};
|
218
|
+
})(this);
|
219
|
+
|
220
|
+
ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
|
221
|
+
"use strict";
|
222
|
+
|
223
|
+
exports.inherits = function(ctor, superCtor) {
|
224
|
+
ctor.super_ = superCtor;
|
225
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
226
|
+
constructor: {
|
227
|
+
value: ctor,
|
228
|
+
enumerable: false,
|
229
|
+
writable: true,
|
230
|
+
configurable: true
|
231
|
+
}
|
232
|
+
});
|
233
|
+
};
|
234
|
+
|
235
|
+
exports.mixin = function(obj, mixin) {
|
236
|
+
for (var key in mixin) {
|
237
|
+
obj[key] = mixin[key];
|
238
|
+
}
|
239
|
+
return obj;
|
240
|
+
};
|
241
|
+
|
242
|
+
exports.implement = function(proto, mixin) {
|
243
|
+
exports.mixin(proto, mixin);
|
244
|
+
};
|
245
|
+
|
246
|
+
});
|
247
|
+
|
248
|
+
ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
|
249
|
+
"use strict";
|
250
|
+
var comparePoints = function(p1, p2) {
|
251
|
+
return p1.row - p2.row || p1.column - p2.column;
|
252
|
+
};
|
253
|
+
var Range = function(startRow, startColumn, endRow, endColumn) {
|
254
|
+
this.start = {
|
255
|
+
row: startRow,
|
256
|
+
column: startColumn
|
257
|
+
};
|
258
|
+
|
259
|
+
this.end = {
|
260
|
+
row: endRow,
|
261
|
+
column: endColumn
|
262
|
+
};
|
263
|
+
};
|
264
|
+
|
265
|
+
(function() {
|
266
|
+
this.isEqual = function(range) {
|
267
|
+
return this.start.row === range.start.row &&
|
268
|
+
this.end.row === range.end.row &&
|
269
|
+
this.start.column === range.start.column &&
|
270
|
+
this.end.column === range.end.column;
|
271
|
+
};
|
272
|
+
this.toString = function() {
|
273
|
+
return ("Range: [" + this.start.row + "/" + this.start.column +
|
274
|
+
"] -> [" + this.end.row + "/" + this.end.column + "]");
|
275
|
+
};
|
276
|
+
|
277
|
+
this.contains = function(row, column) {
|
278
|
+
return this.compare(row, column) == 0;
|
279
|
+
};
|
280
|
+
this.compareRange = function(range) {
|
281
|
+
var cmp,
|
282
|
+
end = range.end,
|
283
|
+
start = range.start;
|
284
|
+
|
285
|
+
cmp = this.compare(end.row, end.column);
|
286
|
+
if (cmp == 1) {
|
287
|
+
cmp = this.compare(start.row, start.column);
|
288
|
+
if (cmp == 1) {
|
289
|
+
return 2;
|
290
|
+
} else if (cmp == 0) {
|
291
|
+
return 1;
|
292
|
+
} else {
|
293
|
+
return 0;
|
294
|
+
}
|
295
|
+
} else if (cmp == -1) {
|
296
|
+
return -2;
|
297
|
+
} else {
|
298
|
+
cmp = this.compare(start.row, start.column);
|
299
|
+
if (cmp == -1) {
|
300
|
+
return -1;
|
301
|
+
} else if (cmp == 1) {
|
302
|
+
return 42;
|
303
|
+
} else {
|
304
|
+
return 0;
|
305
|
+
}
|
306
|
+
}
|
307
|
+
};
|
308
|
+
this.comparePoint = function(p) {
|
309
|
+
return this.compare(p.row, p.column);
|
310
|
+
};
|
311
|
+
this.containsRange = function(range) {
|
312
|
+
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
|
313
|
+
};
|
314
|
+
this.intersects = function(range) {
|
315
|
+
var cmp = this.compareRange(range);
|
316
|
+
return (cmp == -1 || cmp == 0 || cmp == 1);
|
317
|
+
};
|
318
|
+
this.isEnd = function(row, column) {
|
319
|
+
return this.end.row == row && this.end.column == column;
|
320
|
+
};
|
321
|
+
this.isStart = function(row, column) {
|
322
|
+
return this.start.row == row && this.start.column == column;
|
323
|
+
};
|
324
|
+
this.setStart = function(row, column) {
|
325
|
+
if (typeof row == "object") {
|
326
|
+
this.start.column = row.column;
|
327
|
+
this.start.row = row.row;
|
328
|
+
} else {
|
329
|
+
this.start.row = row;
|
330
|
+
this.start.column = column;
|
331
|
+
}
|
332
|
+
};
|
333
|
+
this.setEnd = function(row, column) {
|
334
|
+
if (typeof row == "object") {
|
335
|
+
this.end.column = row.column;
|
336
|
+
this.end.row = row.row;
|
337
|
+
} else {
|
338
|
+
this.end.row = row;
|
339
|
+
this.end.column = column;
|
340
|
+
}
|
341
|
+
};
|
342
|
+
this.inside = function(row, column) {
|
343
|
+
if (this.compare(row, column) == 0) {
|
344
|
+
if (this.isEnd(row, column) || this.isStart(row, column)) {
|
345
|
+
return false;
|
346
|
+
} else {
|
347
|
+
return true;
|
348
|
+
}
|
349
|
+
}
|
350
|
+
return false;
|
351
|
+
};
|
352
|
+
this.insideStart = function(row, column) {
|
353
|
+
if (this.compare(row, column) == 0) {
|
354
|
+
if (this.isEnd(row, column)) {
|
355
|
+
return false;
|
356
|
+
} else {
|
357
|
+
return true;
|
358
|
+
}
|
359
|
+
}
|
360
|
+
return false;
|
361
|
+
};
|
362
|
+
this.insideEnd = function(row, column) {
|
363
|
+
if (this.compare(row, column) == 0) {
|
364
|
+
if (this.isStart(row, column)) {
|
365
|
+
return false;
|
366
|
+
} else {
|
367
|
+
return true;
|
368
|
+
}
|
369
|
+
}
|
370
|
+
return false;
|
371
|
+
};
|
372
|
+
this.compare = function(row, column) {
|
373
|
+
if (!this.isMultiLine()) {
|
374
|
+
if (row === this.start.row) {
|
375
|
+
return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
|
376
|
+
}
|
377
|
+
}
|
378
|
+
|
379
|
+
if (row < this.start.row)
|
380
|
+
return -1;
|
381
|
+
|
382
|
+
if (row > this.end.row)
|
383
|
+
return 1;
|
384
|
+
|
385
|
+
if (this.start.row === row)
|
386
|
+
return column >= this.start.column ? 0 : -1;
|
387
|
+
|
388
|
+
if (this.end.row === row)
|
389
|
+
return column <= this.end.column ? 0 : 1;
|
390
|
+
|
391
|
+
return 0;
|
392
|
+
};
|
393
|
+
this.compareStart = function(row, column) {
|
394
|
+
if (this.start.row == row && this.start.column == column) {
|
395
|
+
return -1;
|
396
|
+
} else {
|
397
|
+
return this.compare(row, column);
|
398
|
+
}
|
399
|
+
};
|
400
|
+
this.compareEnd = function(row, column) {
|
401
|
+
if (this.end.row == row && this.end.column == column) {
|
402
|
+
return 1;
|
403
|
+
} else {
|
404
|
+
return this.compare(row, column);
|
405
|
+
}
|
406
|
+
};
|
407
|
+
this.compareInside = function(row, column) {
|
408
|
+
if (this.end.row == row && this.end.column == column) {
|
409
|
+
return 1;
|
410
|
+
} else if (this.start.row == row && this.start.column == column) {
|
411
|
+
return -1;
|
412
|
+
} else {
|
413
|
+
return this.compare(row, column);
|
414
|
+
}
|
415
|
+
};
|
416
|
+
this.clipRows = function(firstRow, lastRow) {
|
417
|
+
if (this.end.row > lastRow)
|
418
|
+
var end = {row: lastRow + 1, column: 0};
|
419
|
+
else if (this.end.row < firstRow)
|
420
|
+
var end = {row: firstRow, column: 0};
|
421
|
+
|
422
|
+
if (this.start.row > lastRow)
|
423
|
+
var start = {row: lastRow + 1, column: 0};
|
424
|
+
else if (this.start.row < firstRow)
|
425
|
+
var start = {row: firstRow, column: 0};
|
426
|
+
|
427
|
+
return Range.fromPoints(start || this.start, end || this.end);
|
428
|
+
};
|
429
|
+
this.extend = function(row, column) {
|
430
|
+
var cmp = this.compare(row, column);
|
431
|
+
|
432
|
+
if (cmp == 0)
|
433
|
+
return this;
|
434
|
+
else if (cmp == -1)
|
435
|
+
var start = {row: row, column: column};
|
436
|
+
else
|
437
|
+
var end = {row: row, column: column};
|
438
|
+
|
439
|
+
return Range.fromPoints(start || this.start, end || this.end);
|
440
|
+
};
|
441
|
+
|
442
|
+
this.isEmpty = function() {
|
443
|
+
return (this.start.row === this.end.row && this.start.column === this.end.column);
|
444
|
+
};
|
445
|
+
this.isMultiLine = function() {
|
446
|
+
return (this.start.row !== this.end.row);
|
447
|
+
};
|
448
|
+
this.clone = function() {
|
449
|
+
return Range.fromPoints(this.start, this.end);
|
450
|
+
};
|
451
|
+
this.collapseRows = function() {
|
452
|
+
if (this.end.column == 0)
|
453
|
+
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
|
454
|
+
else
|
455
|
+
return new Range(this.start.row, 0, this.end.row, 0)
|
456
|
+
};
|
457
|
+
this.toScreenRange = function(session) {
|
458
|
+
var screenPosStart = session.documentToScreenPosition(this.start);
|
459
|
+
var screenPosEnd = session.documentToScreenPosition(this.end);
|
460
|
+
|
461
|
+
return new Range(
|
462
|
+
screenPosStart.row, screenPosStart.column,
|
463
|
+
screenPosEnd.row, screenPosEnd.column
|
464
|
+
);
|
465
|
+
};
|
466
|
+
this.moveBy = function(row, column) {
|
467
|
+
this.start.row += row;
|
468
|
+
this.start.column += column;
|
469
|
+
this.end.row += row;
|
470
|
+
this.end.column += column;
|
471
|
+
};
|
472
|
+
|
473
|
+
}).call(Range.prototype);
|
474
|
+
Range.fromPoints = function(start, end) {
|
475
|
+
return new Range(start.row, start.column, end.row, end.column);
|
476
|
+
};
|
477
|
+
Range.comparePoints = comparePoints;
|
478
|
+
|
479
|
+
Range.comparePoints = function(p1, p2) {
|
480
|
+
return p1.row - p2.row || p1.column - p2.column;
|
481
|
+
};
|
482
|
+
|
483
|
+
|
484
|
+
exports.Range = Range;
|
485
|
+
});
|
486
|
+
|
487
|
+
ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
|
488
|
+
"use strict";
|
489
|
+
|
490
|
+
function throwDeltaError(delta, errorText){
|
491
|
+
console.log("Invalid Delta:", delta);
|
492
|
+
throw "Invalid Delta: " + errorText;
|
493
|
+
}
|
494
|
+
|
495
|
+
function positionInDocument(docLines, position) {
|
496
|
+
return position.row >= 0 && position.row < docLines.length &&
|
497
|
+
position.column >= 0 && position.column <= docLines[position.row].length;
|
498
|
+
}
|
499
|
+
|
500
|
+
function validateDelta(docLines, delta) {
|
501
|
+
if (delta.action != "insert" && delta.action != "remove")
|
502
|
+
throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
|
503
|
+
if (!(delta.lines instanceof Array))
|
504
|
+
throwDeltaError(delta, "delta.lines must be an Array");
|
505
|
+
if (!delta.start || !delta.end)
|
506
|
+
throwDeltaError(delta, "delta.start/end must be an present");
|
507
|
+
var start = delta.start;
|
508
|
+
if (!positionInDocument(docLines, delta.start))
|
509
|
+
throwDeltaError(delta, "delta.start must be contained in document");
|
510
|
+
var end = delta.end;
|
511
|
+
if (delta.action == "remove" && !positionInDocument(docLines, end))
|
512
|
+
throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
|
513
|
+
var numRangeRows = end.row - start.row;
|
514
|
+
var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
|
515
|
+
if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
|
516
|
+
throwDeltaError(delta, "delta.range must match delta lines");
|
517
|
+
}
|
518
|
+
|
519
|
+
exports.applyDelta = function(docLines, delta, doNotValidate) {
|
520
|
+
|
521
|
+
var row = delta.start.row;
|
522
|
+
var startColumn = delta.start.column;
|
523
|
+
var line = docLines[row] || "";
|
524
|
+
switch (delta.action) {
|
525
|
+
case "insert":
|
526
|
+
var lines = delta.lines;
|
527
|
+
if (lines.length === 1) {
|
528
|
+
docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
|
529
|
+
} else {
|
530
|
+
var args = [row, 1].concat(delta.lines);
|
531
|
+
docLines.splice.apply(docLines, args);
|
532
|
+
docLines[row] = line.substring(0, startColumn) + docLines[row];
|
533
|
+
docLines[row + delta.lines.length - 1] += line.substring(startColumn);
|
534
|
+
}
|
535
|
+
break;
|
536
|
+
case "remove":
|
537
|
+
var endColumn = delta.end.column;
|
538
|
+
var endRow = delta.end.row;
|
539
|
+
if (row === endRow) {
|
540
|
+
docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
|
541
|
+
} else {
|
542
|
+
docLines.splice(
|
543
|
+
row, endRow - row + 1,
|
544
|
+
line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
|
545
|
+
);
|
546
|
+
}
|
547
|
+
break;
|
548
|
+
}
|
549
|
+
}
|
550
|
+
});
|
551
|
+
|
552
|
+
ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
|
553
|
+
"use strict";
|
554
|
+
|
555
|
+
var EventEmitter = {};
|
556
|
+
var stopPropagation = function() { this.propagationStopped = true; };
|
557
|
+
var preventDefault = function() { this.defaultPrevented = true; };
|
558
|
+
|
559
|
+
EventEmitter._emit =
|
560
|
+
EventEmitter._dispatchEvent = function(eventName, e) {
|
561
|
+
this._eventRegistry || (this._eventRegistry = {});
|
562
|
+
this._defaultHandlers || (this._defaultHandlers = {});
|
563
|
+
|
564
|
+
var listeners = this._eventRegistry[eventName] || [];
|
565
|
+
var defaultHandler = this._defaultHandlers[eventName];
|
566
|
+
if (!listeners.length && !defaultHandler)
|
567
|
+
return;
|
568
|
+
|
569
|
+
if (typeof e != "object" || !e)
|
570
|
+
e = {};
|
571
|
+
|
572
|
+
if (!e.type)
|
573
|
+
e.type = eventName;
|
574
|
+
if (!e.stopPropagation)
|
575
|
+
e.stopPropagation = stopPropagation;
|
576
|
+
if (!e.preventDefault)
|
577
|
+
e.preventDefault = preventDefault;
|
578
|
+
|
579
|
+
listeners = listeners.slice();
|
580
|
+
for (var i=0; i<listeners.length; i++) {
|
581
|
+
listeners[i](e, this);
|
582
|
+
if (e.propagationStopped)
|
583
|
+
break;
|
584
|
+
}
|
585
|
+
|
586
|
+
if (defaultHandler && !e.defaultPrevented)
|
587
|
+
return defaultHandler(e, this);
|
588
|
+
};
|
589
|
+
|
590
|
+
|
591
|
+
EventEmitter._signal = function(eventName, e) {
|
592
|
+
var listeners = (this._eventRegistry || {})[eventName];
|
593
|
+
if (!listeners)
|
594
|
+
return;
|
595
|
+
listeners = listeners.slice();
|
596
|
+
for (var i=0; i<listeners.length; i++)
|
597
|
+
listeners[i](e, this);
|
598
|
+
};
|
599
|
+
|
600
|
+
EventEmitter.once = function(eventName, callback) {
|
601
|
+
var _self = this;
|
602
|
+
callback && this.addEventListener(eventName, function newCallback() {
|
603
|
+
_self.removeEventListener(eventName, newCallback);
|
604
|
+
callback.apply(null, arguments);
|
605
|
+
});
|
606
|
+
};
|
607
|
+
|
608
|
+
|
609
|
+
EventEmitter.setDefaultHandler = function(eventName, callback) {
|
610
|
+
var handlers = this._defaultHandlers
|
611
|
+
if (!handlers)
|
612
|
+
handlers = this._defaultHandlers = {_disabled_: {}};
|
613
|
+
|
614
|
+
if (handlers[eventName]) {
|
615
|
+
var old = handlers[eventName];
|
616
|
+
var disabled = handlers._disabled_[eventName];
|
617
|
+
if (!disabled)
|
618
|
+
handlers._disabled_[eventName] = disabled = [];
|
619
|
+
disabled.push(old);
|
620
|
+
var i = disabled.indexOf(callback);
|
621
|
+
if (i != -1)
|
622
|
+
disabled.splice(i, 1);
|
623
|
+
}
|
624
|
+
handlers[eventName] = callback;
|
625
|
+
};
|
626
|
+
EventEmitter.removeDefaultHandler = function(eventName, callback) {
|
627
|
+
var handlers = this._defaultHandlers
|
628
|
+
if (!handlers)
|
629
|
+
return;
|
630
|
+
var disabled = handlers._disabled_[eventName];
|
631
|
+
|
632
|
+
if (handlers[eventName] == callback) {
|
633
|
+
var old = handlers[eventName];
|
634
|
+
if (disabled)
|
635
|
+
this.setDefaultHandler(eventName, disabled.pop());
|
636
|
+
} else if (disabled) {
|
637
|
+
var i = disabled.indexOf(callback);
|
638
|
+
if (i != -1)
|
639
|
+
disabled.splice(i, 1);
|
640
|
+
}
|
641
|
+
};
|
642
|
+
|
643
|
+
EventEmitter.on =
|
644
|
+
EventEmitter.addEventListener = function(eventName, callback, capturing) {
|
645
|
+
this._eventRegistry = this._eventRegistry || {};
|
646
|
+
|
647
|
+
var listeners = this._eventRegistry[eventName];
|
648
|
+
if (!listeners)
|
649
|
+
listeners = this._eventRegistry[eventName] = [];
|
650
|
+
|
651
|
+
if (listeners.indexOf(callback) == -1)
|
652
|
+
listeners[capturing ? "unshift" : "push"](callback);
|
653
|
+
return callback;
|
654
|
+
};
|
655
|
+
|
656
|
+
EventEmitter.off =
|
657
|
+
EventEmitter.removeListener =
|
658
|
+
EventEmitter.removeEventListener = function(eventName, callback) {
|
659
|
+
this._eventRegistry = this._eventRegistry || {};
|
660
|
+
|
661
|
+
var listeners = this._eventRegistry[eventName];
|
662
|
+
if (!listeners)
|
663
|
+
return;
|
664
|
+
|
665
|
+
var index = listeners.indexOf(callback);
|
666
|
+
if (index !== -1)
|
667
|
+
listeners.splice(index, 1);
|
668
|
+
};
|
669
|
+
|
670
|
+
EventEmitter.removeAllListeners = function(eventName) {
|
671
|
+
if (this._eventRegistry) this._eventRegistry[eventName] = [];
|
672
|
+
};
|
673
|
+
|
674
|
+
exports.EventEmitter = EventEmitter;
|
675
|
+
|
676
|
+
});
|
677
|
+
|
678
|
+
ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
|
679
|
+
"use strict";
|
680
|
+
|
681
|
+
var oop = require("./lib/oop");
|
682
|
+
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
683
|
+
|
684
|
+
var Anchor = exports.Anchor = function(doc, row, column) {
|
685
|
+
this.$onChange = this.onChange.bind(this);
|
686
|
+
this.attach(doc);
|
687
|
+
|
688
|
+
if (typeof column == "undefined")
|
689
|
+
this.setPosition(row.row, row.column);
|
690
|
+
else
|
691
|
+
this.setPosition(row, column);
|
692
|
+
};
|
693
|
+
|
694
|
+
(function() {
|
695
|
+
|
696
|
+
oop.implement(this, EventEmitter);
|
697
|
+
this.getPosition = function() {
|
698
|
+
return this.$clipPositionToDocument(this.row, this.column);
|
699
|
+
};
|
700
|
+
this.getDocument = function() {
|
701
|
+
return this.document;
|
702
|
+
};
|
703
|
+
this.$insertRight = false;
|
704
|
+
this.onChange = function(delta) {
|
705
|
+
if (delta.start.row == delta.end.row && delta.start.row != this.row)
|
706
|
+
return;
|
707
|
+
|
708
|
+
if (delta.start.row > this.row)
|
709
|
+
return;
|
710
|
+
|
711
|
+
var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
|
712
|
+
this.setPosition(point.row, point.column, true);
|
713
|
+
};
|
714
|
+
|
715
|
+
function $pointsInOrder(point1, point2, equalPointsInOrder) {
|
716
|
+
var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
|
717
|
+
return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
|
718
|
+
}
|
719
|
+
|
720
|
+
function $getTransformedPoint(delta, point, moveIfEqual) {
|
721
|
+
var deltaIsInsert = delta.action == "insert";
|
722
|
+
var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
|
723
|
+
var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
|
724
|
+
var deltaStart = delta.start;
|
725
|
+
var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
|
726
|
+
if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
|
727
|
+
return {
|
728
|
+
row: point.row,
|
729
|
+
column: point.column
|
730
|
+
};
|
731
|
+
}
|
732
|
+
if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
|
733
|
+
return {
|
734
|
+
row: point.row + deltaRowShift,
|
735
|
+
column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
|
736
|
+
};
|
737
|
+
}
|
738
|
+
|
739
|
+
return {
|
740
|
+
row: deltaStart.row,
|
741
|
+
column: deltaStart.column
|
742
|
+
};
|
743
|
+
}
|
744
|
+
this.setPosition = function(row, column, noClip) {
|
745
|
+
var pos;
|
746
|
+
if (noClip) {
|
747
|
+
pos = {
|
748
|
+
row: row,
|
749
|
+
column: column
|
750
|
+
};
|
751
|
+
} else {
|
752
|
+
pos = this.$clipPositionToDocument(row, column);
|
753
|
+
}
|
754
|
+
|
755
|
+
if (this.row == pos.row && this.column == pos.column)
|
756
|
+
return;
|
757
|
+
|
758
|
+
var old = {
|
759
|
+
row: this.row,
|
760
|
+
column: this.column
|
761
|
+
};
|
762
|
+
|
763
|
+
this.row = pos.row;
|
764
|
+
this.column = pos.column;
|
765
|
+
this._signal("change", {
|
766
|
+
old: old,
|
767
|
+
value: pos
|
768
|
+
});
|
769
|
+
};
|
770
|
+
this.detach = function() {
|
771
|
+
this.document.removeEventListener("change", this.$onChange);
|
772
|
+
};
|
773
|
+
this.attach = function(doc) {
|
774
|
+
this.document = doc || this.document;
|
775
|
+
this.document.on("change", this.$onChange);
|
776
|
+
};
|
777
|
+
this.$clipPositionToDocument = function(row, column) {
|
778
|
+
var pos = {};
|
779
|
+
|
780
|
+
if (row >= this.document.getLength()) {
|
781
|
+
pos.row = Math.max(0, this.document.getLength() - 1);
|
782
|
+
pos.column = this.document.getLine(pos.row).length;
|
783
|
+
}
|
784
|
+
else if (row < 0) {
|
785
|
+
pos.row = 0;
|
786
|
+
pos.column = 0;
|
787
|
+
}
|
788
|
+
else {
|
789
|
+
pos.row = row;
|
790
|
+
pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
|
791
|
+
}
|
792
|
+
|
793
|
+
if (column < 0)
|
794
|
+
pos.column = 0;
|
795
|
+
|
796
|
+
return pos;
|
797
|
+
};
|
798
|
+
|
799
|
+
}).call(Anchor.prototype);
|
800
|
+
|
801
|
+
});
|
802
|
+
|
803
|
+
ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
|
804
|
+
"use strict";
|
805
|
+
|
806
|
+
var oop = require("./lib/oop");
|
807
|
+
var applyDelta = require("./apply_delta").applyDelta;
|
808
|
+
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
809
|
+
var Range = require("./range").Range;
|
810
|
+
var Anchor = require("./anchor").Anchor;
|
811
|
+
|
812
|
+
var Document = function(textOrLines) {
|
813
|
+
this.$lines = [""];
|
814
|
+
if (textOrLines.length === 0) {
|
815
|
+
this.$lines = [""];
|
816
|
+
} else if (Array.isArray(textOrLines)) {
|
817
|
+
this.insertMergedLines({row: 0, column: 0}, textOrLines);
|
818
|
+
} else {
|
819
|
+
this.insert({row: 0, column:0}, textOrLines);
|
820
|
+
}
|
821
|
+
};
|
822
|
+
|
823
|
+
(function() {
|
824
|
+
|
825
|
+
oop.implement(this, EventEmitter);
|
826
|
+
this.setValue = function(text) {
|
827
|
+
var len = this.getLength() - 1;
|
828
|
+
this.remove(new Range(0, 0, len, this.getLine(len).length));
|
829
|
+
this.insert({row: 0, column: 0}, text);
|
830
|
+
};
|
831
|
+
this.getValue = function() {
|
832
|
+
return this.getAllLines().join(this.getNewLineCharacter());
|
833
|
+
};
|
834
|
+
this.createAnchor = function(row, column) {
|
835
|
+
return new Anchor(this, row, column);
|
836
|
+
};
|
837
|
+
if ("aaa".split(/a/).length === 0) {
|
838
|
+
this.$split = function(text) {
|
839
|
+
return text.replace(/\r\n|\r/g, "\n").split("\n");
|
840
|
+
};
|
841
|
+
} else {
|
842
|
+
this.$split = function(text) {
|
843
|
+
return text.split(/\r\n|\r|\n/);
|
844
|
+
};
|
845
|
+
}
|
846
|
+
|
847
|
+
|
848
|
+
this.$detectNewLine = function(text) {
|
849
|
+
var match = text.match(/^.*?(\r\n|\r|\n)/m);
|
850
|
+
this.$autoNewLine = match ? match[1] : "\n";
|
851
|
+
this._signal("changeNewLineMode");
|
852
|
+
};
|
853
|
+
this.getNewLineCharacter = function() {
|
854
|
+
switch (this.$newLineMode) {
|
855
|
+
case "windows":
|
856
|
+
return "\r\n";
|
857
|
+
case "unix":
|
858
|
+
return "\n";
|
859
|
+
default:
|
860
|
+
return this.$autoNewLine || "\n";
|
861
|
+
}
|
862
|
+
};
|
863
|
+
|
864
|
+
this.$autoNewLine = "";
|
865
|
+
this.$newLineMode = "auto";
|
866
|
+
this.setNewLineMode = function(newLineMode) {
|
867
|
+
if (this.$newLineMode === newLineMode)
|
868
|
+
return;
|
869
|
+
|
870
|
+
this.$newLineMode = newLineMode;
|
871
|
+
this._signal("changeNewLineMode");
|
872
|
+
};
|
873
|
+
this.getNewLineMode = function() {
|
874
|
+
return this.$newLineMode;
|
875
|
+
};
|
876
|
+
this.isNewLine = function(text) {
|
877
|
+
return (text == "\r\n" || text == "\r" || text == "\n");
|
878
|
+
};
|
879
|
+
this.getLine = function(row) {
|
880
|
+
return this.$lines[row] || "";
|
881
|
+
};
|
882
|
+
this.getLines = function(firstRow, lastRow) {
|
883
|
+
return this.$lines.slice(firstRow, lastRow + 1);
|
884
|
+
};
|
885
|
+
this.getAllLines = function() {
|
886
|
+
return this.getLines(0, this.getLength());
|
887
|
+
};
|
888
|
+
this.getLength = function() {
|
889
|
+
return this.$lines.length;
|
890
|
+
};
|
891
|
+
this.getTextRange = function(range) {
|
892
|
+
return this.getLinesForRange(range).join(this.getNewLineCharacter());
|
893
|
+
};
|
894
|
+
this.getLinesForRange = function(range) {
|
895
|
+
var lines;
|
896
|
+
if (range.start.row === range.end.row) {
|
897
|
+
lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
|
898
|
+
} else {
|
899
|
+
lines = this.getLines(range.start.row, range.end.row);
|
900
|
+
lines[0] = (lines[0] || "").substring(range.start.column);
|
901
|
+
var l = lines.length - 1;
|
902
|
+
if (range.end.row - range.start.row == l)
|
903
|
+
lines[l] = lines[l].substring(0, range.end.column);
|
904
|
+
}
|
905
|
+
return lines;
|
906
|
+
};
|
907
|
+
this.insertLines = function(row, lines) {
|
908
|
+
console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
|
909
|
+
return this.insertFullLines(row, lines);
|
910
|
+
};
|
911
|
+
this.removeLines = function(firstRow, lastRow) {
|
912
|
+
console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
|
913
|
+
return this.removeFullLines(firstRow, lastRow);
|
914
|
+
};
|
915
|
+
this.insertNewLine = function(position) {
|
916
|
+
console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead.");
|
917
|
+
return this.insertMergedLines(position, ["", ""]);
|
918
|
+
};
|
919
|
+
this.insert = function(position, text) {
|
920
|
+
if (this.getLength() <= 1)
|
921
|
+
this.$detectNewLine(text);
|
922
|
+
|
923
|
+
return this.insertMergedLines(position, this.$split(text));
|
924
|
+
};
|
925
|
+
this.insertInLine = function(position, text) {
|
926
|
+
var start = this.clippedPos(position.row, position.column);
|
927
|
+
var end = this.pos(position.row, position.column + text.length);
|
928
|
+
|
929
|
+
this.applyDelta({
|
930
|
+
start: start,
|
931
|
+
end: end,
|
932
|
+
action: "insert",
|
933
|
+
lines: [text]
|
934
|
+
}, true);
|
935
|
+
|
936
|
+
return this.clonePos(end);
|
937
|
+
};
|
938
|
+
|
939
|
+
this.clippedPos = function(row, column) {
|
940
|
+
var length = this.getLength();
|
941
|
+
if (row === undefined) {
|
942
|
+
row = length;
|
943
|
+
} else if (row < 0) {
|
944
|
+
row = 0;
|
945
|
+
} else if (row >= length) {
|
946
|
+
row = length - 1;
|
947
|
+
column = undefined;
|
948
|
+
}
|
949
|
+
var line = this.getLine(row);
|
950
|
+
if (column == undefined)
|
951
|
+
column = line.length;
|
952
|
+
column = Math.min(Math.max(column, 0), line.length);
|
953
|
+
return {row: row, column: column};
|
954
|
+
};
|
955
|
+
|
956
|
+
this.clonePos = function(pos) {
|
957
|
+
return {row: pos.row, column: pos.column};
|
958
|
+
};
|
959
|
+
|
960
|
+
this.pos = function(row, column) {
|
961
|
+
return {row: row, column: column};
|
962
|
+
};
|
963
|
+
|
964
|
+
this.$clipPosition = function(position) {
|
965
|
+
var length = this.getLength();
|
966
|
+
if (position.row >= length) {
|
967
|
+
position.row = Math.max(0, length - 1);
|
968
|
+
position.column = this.getLine(length - 1).length;
|
969
|
+
} else {
|
970
|
+
position.row = Math.max(0, position.row);
|
971
|
+
position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
|
972
|
+
}
|
973
|
+
return position;
|
974
|
+
};
|
975
|
+
this.insertFullLines = function(row, lines) {
|
976
|
+
row = Math.min(Math.max(row, 0), this.getLength());
|
977
|
+
var column = 0;
|
978
|
+
if (row < this.getLength()) {
|
979
|
+
lines = lines.concat([""]);
|
980
|
+
column = 0;
|
981
|
+
} else {
|
982
|
+
lines = [""].concat(lines);
|
983
|
+
row--;
|
984
|
+
column = this.$lines[row].length;
|
985
|
+
}
|
986
|
+
this.insertMergedLines({row: row, column: column}, lines);
|
987
|
+
};
|
988
|
+
this.insertMergedLines = function(position, lines) {
|
989
|
+
var start = this.clippedPos(position.row, position.column);
|
990
|
+
var end = {
|
991
|
+
row: start.row + lines.length - 1,
|
992
|
+
column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
|
993
|
+
};
|
994
|
+
|
995
|
+
this.applyDelta({
|
996
|
+
start: start,
|
997
|
+
end: end,
|
998
|
+
action: "insert",
|
999
|
+
lines: lines
|
1000
|
+
});
|
1001
|
+
|
1002
|
+
return this.clonePos(end);
|
1003
|
+
};
|
1004
|
+
this.remove = function(range) {
|
1005
|
+
var start = this.clippedPos(range.start.row, range.start.column);
|
1006
|
+
var end = this.clippedPos(range.end.row, range.end.column);
|
1007
|
+
this.applyDelta({
|
1008
|
+
start: start,
|
1009
|
+
end: end,
|
1010
|
+
action: "remove",
|
1011
|
+
lines: this.getLinesForRange({start: start, end: end})
|
1012
|
+
});
|
1013
|
+
return this.clonePos(start);
|
1014
|
+
};
|
1015
|
+
this.removeInLine = function(row, startColumn, endColumn) {
|
1016
|
+
var start = this.clippedPos(row, startColumn);
|
1017
|
+
var end = this.clippedPos(row, endColumn);
|
1018
|
+
|
1019
|
+
this.applyDelta({
|
1020
|
+
start: start,
|
1021
|
+
end: end,
|
1022
|
+
action: "remove",
|
1023
|
+
lines: this.getLinesForRange({start: start, end: end})
|
1024
|
+
}, true);
|
1025
|
+
|
1026
|
+
return this.clonePos(start);
|
1027
|
+
};
|
1028
|
+
this.removeFullLines = function(firstRow, lastRow) {
|
1029
|
+
firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
|
1030
|
+
lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
|
1031
|
+
var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
|
1032
|
+
var deleteLastNewLine = lastRow < this.getLength() - 1;
|
1033
|
+
var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
|
1034
|
+
var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
|
1035
|
+
var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
|
1036
|
+
var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
|
1037
|
+
var range = new Range(startRow, startCol, endRow, endCol);
|
1038
|
+
var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
|
1039
|
+
|
1040
|
+
this.applyDelta({
|
1041
|
+
start: range.start,
|
1042
|
+
end: range.end,
|
1043
|
+
action: "remove",
|
1044
|
+
lines: this.getLinesForRange(range)
|
1045
|
+
});
|
1046
|
+
return deletedLines;
|
1047
|
+
};
|
1048
|
+
this.removeNewLine = function(row) {
|
1049
|
+
if (row < this.getLength() - 1 && row >= 0) {
|
1050
|
+
this.applyDelta({
|
1051
|
+
start: this.pos(row, this.getLine(row).length),
|
1052
|
+
end: this.pos(row + 1, 0),
|
1053
|
+
action: "remove",
|
1054
|
+
lines: ["", ""]
|
1055
|
+
});
|
1056
|
+
}
|
1057
|
+
};
|
1058
|
+
this.replace = function(range, text) {
|
1059
|
+
if (!(range instanceof Range))
|
1060
|
+
range = Range.fromPoints(range.start, range.end);
|
1061
|
+
if (text.length === 0 && range.isEmpty())
|
1062
|
+
return range.start;
|
1063
|
+
if (text == this.getTextRange(range))
|
1064
|
+
return range.end;
|
1065
|
+
|
1066
|
+
this.remove(range);
|
1067
|
+
var end;
|
1068
|
+
if (text) {
|
1069
|
+
end = this.insert(range.start, text);
|
1070
|
+
}
|
1071
|
+
else {
|
1072
|
+
end = range.start;
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
return end;
|
1076
|
+
};
|
1077
|
+
this.applyDeltas = function(deltas) {
|
1078
|
+
for (var i=0; i<deltas.length; i++) {
|
1079
|
+
this.applyDelta(deltas[i]);
|
1080
|
+
}
|
1081
|
+
};
|
1082
|
+
this.revertDeltas = function(deltas) {
|
1083
|
+
for (var i=deltas.length-1; i>=0; i--) {
|
1084
|
+
this.revertDelta(deltas[i]);
|
1085
|
+
}
|
1086
|
+
};
|
1087
|
+
this.applyDelta = function(delta, doNotValidate) {
|
1088
|
+
var isInsert = delta.action == "insert";
|
1089
|
+
if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
|
1090
|
+
: !Range.comparePoints(delta.start, delta.end)) {
|
1091
|
+
return;
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
if (isInsert && delta.lines.length > 20000)
|
1095
|
+
this.$splitAndapplyLargeDelta(delta, 20000);
|
1096
|
+
applyDelta(this.$lines, delta, doNotValidate);
|
1097
|
+
this._signal("change", delta);
|
1098
|
+
};
|
1099
|
+
|
1100
|
+
this.$splitAndapplyLargeDelta = function(delta, MAX) {
|
1101
|
+
var lines = delta.lines;
|
1102
|
+
var l = lines.length;
|
1103
|
+
var row = delta.start.row;
|
1104
|
+
var column = delta.start.column;
|
1105
|
+
var from = 0, to = 0;
|
1106
|
+
do {
|
1107
|
+
from = to;
|
1108
|
+
to += MAX - 1;
|
1109
|
+
var chunk = lines.slice(from, to);
|
1110
|
+
if (to > l) {
|
1111
|
+
delta.lines = chunk;
|
1112
|
+
delta.start.row = row + from;
|
1113
|
+
delta.start.column = column;
|
1114
|
+
break;
|
1115
|
+
}
|
1116
|
+
chunk.push("");
|
1117
|
+
this.applyDelta({
|
1118
|
+
start: this.pos(row + from, column),
|
1119
|
+
end: this.pos(row + to, column = 0),
|
1120
|
+
action: delta.action,
|
1121
|
+
lines: chunk
|
1122
|
+
}, true);
|
1123
|
+
} while(true);
|
1124
|
+
};
|
1125
|
+
this.revertDelta = function(delta) {
|
1126
|
+
this.applyDelta({
|
1127
|
+
start: this.clonePos(delta.start),
|
1128
|
+
end: this.clonePos(delta.end),
|
1129
|
+
action: (delta.action == "insert" ? "remove" : "insert"),
|
1130
|
+
lines: delta.lines.slice()
|
1131
|
+
});
|
1132
|
+
};
|
1133
|
+
this.indexToPosition = function(index, startRow) {
|
1134
|
+
var lines = this.$lines || this.getAllLines();
|
1135
|
+
var newlineLength = this.getNewLineCharacter().length;
|
1136
|
+
for (var i = startRow || 0, l = lines.length; i < l; i++) {
|
1137
|
+
index -= lines[i].length + newlineLength;
|
1138
|
+
if (index < 0)
|
1139
|
+
return {row: i, column: index + lines[i].length + newlineLength};
|
1140
|
+
}
|
1141
|
+
return {row: l-1, column: lines[l-1].length};
|
1142
|
+
};
|
1143
|
+
this.positionToIndex = function(pos, startRow) {
|
1144
|
+
var lines = this.$lines || this.getAllLines();
|
1145
|
+
var newlineLength = this.getNewLineCharacter().length;
|
1146
|
+
var index = 0;
|
1147
|
+
var row = Math.min(pos.row, lines.length);
|
1148
|
+
for (var i = startRow || 0; i < row; ++i)
|
1149
|
+
index += lines[i].length + newlineLength;
|
1150
|
+
|
1151
|
+
return index + pos.column;
|
1152
|
+
};
|
1153
|
+
|
1154
|
+
}).call(Document.prototype);
|
1155
|
+
|
1156
|
+
exports.Document = Document;
|
1157
|
+
});
|
1158
|
+
|
1159
|
+
ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
|
1160
|
+
"use strict";
|
1161
|
+
|
1162
|
+
exports.last = function(a) {
|
1163
|
+
return a[a.length - 1];
|
1164
|
+
};
|
1165
|
+
|
1166
|
+
exports.stringReverse = function(string) {
|
1167
|
+
return string.split("").reverse().join("");
|
1168
|
+
};
|
1169
|
+
|
1170
|
+
exports.stringRepeat = function (string, count) {
|
1171
|
+
var result = '';
|
1172
|
+
while (count > 0) {
|
1173
|
+
if (count & 1)
|
1174
|
+
result += string;
|
1175
|
+
|
1176
|
+
if (count >>= 1)
|
1177
|
+
string += string;
|
1178
|
+
}
|
1179
|
+
return result;
|
1180
|
+
};
|
1181
|
+
|
1182
|
+
var trimBeginRegexp = /^\s\s*/;
|
1183
|
+
var trimEndRegexp = /\s\s*$/;
|
1184
|
+
|
1185
|
+
exports.stringTrimLeft = function (string) {
|
1186
|
+
return string.replace(trimBeginRegexp, '');
|
1187
|
+
};
|
1188
|
+
|
1189
|
+
exports.stringTrimRight = function (string) {
|
1190
|
+
return string.replace(trimEndRegexp, '');
|
1191
|
+
};
|
1192
|
+
|
1193
|
+
exports.copyObject = function(obj) {
|
1194
|
+
var copy = {};
|
1195
|
+
for (var key in obj) {
|
1196
|
+
copy[key] = obj[key];
|
1197
|
+
}
|
1198
|
+
return copy;
|
1199
|
+
};
|
1200
|
+
|
1201
|
+
exports.copyArray = function(array){
|
1202
|
+
var copy = [];
|
1203
|
+
for (var i=0, l=array.length; i<l; i++) {
|
1204
|
+
if (array[i] && typeof array[i] == "object")
|
1205
|
+
copy[i] = this.copyObject( array[i] );
|
1206
|
+
else
|
1207
|
+
copy[i] = array[i];
|
1208
|
+
}
|
1209
|
+
return copy;
|
1210
|
+
};
|
1211
|
+
|
1212
|
+
exports.deepCopy = function deepCopy(obj) {
|
1213
|
+
if (typeof obj !== "object" || !obj)
|
1214
|
+
return obj;
|
1215
|
+
var copy;
|
1216
|
+
if (Array.isArray(obj)) {
|
1217
|
+
copy = [];
|
1218
|
+
for (var key = 0; key < obj.length; key++) {
|
1219
|
+
copy[key] = deepCopy(obj[key]);
|
1220
|
+
}
|
1221
|
+
return copy;
|
1222
|
+
}
|
1223
|
+
var cons = obj.constructor;
|
1224
|
+
if (cons === RegExp)
|
1225
|
+
return obj;
|
1226
|
+
|
1227
|
+
copy = cons();
|
1228
|
+
for (var key in obj) {
|
1229
|
+
copy[key] = deepCopy(obj[key]);
|
1230
|
+
}
|
1231
|
+
return copy;
|
1232
|
+
};
|
1233
|
+
|
1234
|
+
exports.arrayToMap = function(arr) {
|
1235
|
+
var map = {};
|
1236
|
+
for (var i=0; i<arr.length; i++) {
|
1237
|
+
map[arr[i]] = 1;
|
1238
|
+
}
|
1239
|
+
return map;
|
1240
|
+
|
1241
|
+
};
|
1242
|
+
|
1243
|
+
exports.createMap = function(props) {
|
1244
|
+
var map = Object.create(null);
|
1245
|
+
for (var i in props) {
|
1246
|
+
map[i] = props[i];
|
1247
|
+
}
|
1248
|
+
return map;
|
1249
|
+
};
|
1250
|
+
exports.arrayRemove = function(array, value) {
|
1251
|
+
for (var i = 0; i <= array.length; i++) {
|
1252
|
+
if (value === array[i]) {
|
1253
|
+
array.splice(i, 1);
|
1254
|
+
}
|
1255
|
+
}
|
1256
|
+
};
|
1257
|
+
|
1258
|
+
exports.escapeRegExp = function(str) {
|
1259
|
+
return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
|
1260
|
+
};
|
1261
|
+
|
1262
|
+
exports.escapeHTML = function(str) {
|
1263
|
+
return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<");
|
1264
|
+
};
|
1265
|
+
|
1266
|
+
exports.getMatchOffsets = function(string, regExp) {
|
1267
|
+
var matches = [];
|
1268
|
+
|
1269
|
+
string.replace(regExp, function(str) {
|
1270
|
+
matches.push({
|
1271
|
+
offset: arguments[arguments.length-2],
|
1272
|
+
length: str.length
|
1273
|
+
});
|
1274
|
+
});
|
1275
|
+
|
1276
|
+
return matches;
|
1277
|
+
};
|
1278
|
+
exports.deferredCall = function(fcn) {
|
1279
|
+
var timer = null;
|
1280
|
+
var callback = function() {
|
1281
|
+
timer = null;
|
1282
|
+
fcn();
|
1283
|
+
};
|
1284
|
+
|
1285
|
+
var deferred = function(timeout) {
|
1286
|
+
deferred.cancel();
|
1287
|
+
timer = setTimeout(callback, timeout || 0);
|
1288
|
+
return deferred;
|
1289
|
+
};
|
1290
|
+
|
1291
|
+
deferred.schedule = deferred;
|
1292
|
+
|
1293
|
+
deferred.call = function() {
|
1294
|
+
this.cancel();
|
1295
|
+
fcn();
|
1296
|
+
return deferred;
|
1297
|
+
};
|
1298
|
+
|
1299
|
+
deferred.cancel = function() {
|
1300
|
+
clearTimeout(timer);
|
1301
|
+
timer = null;
|
1302
|
+
return deferred;
|
1303
|
+
};
|
1304
|
+
|
1305
|
+
deferred.isPending = function() {
|
1306
|
+
return timer;
|
1307
|
+
};
|
1308
|
+
|
1309
|
+
return deferred;
|
1310
|
+
};
|
1311
|
+
|
1312
|
+
|
1313
|
+
exports.delayedCall = function(fcn, defaultTimeout) {
|
1314
|
+
var timer = null;
|
1315
|
+
var callback = function() {
|
1316
|
+
timer = null;
|
1317
|
+
fcn();
|
1318
|
+
};
|
1319
|
+
|
1320
|
+
var _self = function(timeout) {
|
1321
|
+
if (timer == null)
|
1322
|
+
timer = setTimeout(callback, timeout || defaultTimeout);
|
1323
|
+
};
|
1324
|
+
|
1325
|
+
_self.delay = function(timeout) {
|
1326
|
+
timer && clearTimeout(timer);
|
1327
|
+
timer = setTimeout(callback, timeout || defaultTimeout);
|
1328
|
+
};
|
1329
|
+
_self.schedule = _self;
|
1330
|
+
|
1331
|
+
_self.call = function() {
|
1332
|
+
this.cancel();
|
1333
|
+
fcn();
|
1334
|
+
};
|
1335
|
+
|
1336
|
+
_self.cancel = function() {
|
1337
|
+
timer && clearTimeout(timer);
|
1338
|
+
timer = null;
|
1339
|
+
};
|
1340
|
+
|
1341
|
+
_self.isPending = function() {
|
1342
|
+
return timer;
|
1343
|
+
};
|
1344
|
+
|
1345
|
+
return _self;
|
1346
|
+
};
|
1347
|
+
});
|
1348
|
+
|
1349
|
+
ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
|
1350
|
+
"use strict";
|
1351
|
+
|
1352
|
+
var Range = require("../range").Range;
|
1353
|
+
var Document = require("../document").Document;
|
1354
|
+
var lang = require("../lib/lang");
|
1355
|
+
|
1356
|
+
var Mirror = exports.Mirror = function(sender) {
|
1357
|
+
this.sender = sender;
|
1358
|
+
var doc = this.doc = new Document("");
|
1359
|
+
|
1360
|
+
var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
|
1361
|
+
|
1362
|
+
var _self = this;
|
1363
|
+
sender.on("change", function(e) {
|
1364
|
+
var data = e.data;
|
1365
|
+
if (data[0].start) {
|
1366
|
+
doc.applyDeltas(data);
|
1367
|
+
} else {
|
1368
|
+
for (var i = 0; i < data.length; i += 2) {
|
1369
|
+
if (Array.isArray(data[i+1])) {
|
1370
|
+
var d = {action: "insert", start: data[i], lines: data[i+1]};
|
1371
|
+
} else {
|
1372
|
+
var d = {action: "remove", start: data[i], end: data[i+1]};
|
1373
|
+
}
|
1374
|
+
doc.applyDelta(d, true);
|
1375
|
+
}
|
1376
|
+
}
|
1377
|
+
if (_self.$timeout)
|
1378
|
+
return deferredUpdate.schedule(_self.$timeout);
|
1379
|
+
_self.onUpdate();
|
1380
|
+
});
|
1381
|
+
};
|
1382
|
+
|
1383
|
+
(function() {
|
1384
|
+
|
1385
|
+
this.$timeout = 500;
|
1386
|
+
|
1387
|
+
this.setTimeout = function(timeout) {
|
1388
|
+
this.$timeout = timeout;
|
1389
|
+
};
|
1390
|
+
|
1391
|
+
this.setValue = function(value) {
|
1392
|
+
this.doc.setValue(value);
|
1393
|
+
this.deferredUpdate.schedule(this.$timeout);
|
1394
|
+
};
|
1395
|
+
|
1396
|
+
this.getValue = function(callbackId) {
|
1397
|
+
this.sender.callback(this.doc.getValue(), callbackId);
|
1398
|
+
};
|
1399
|
+
|
1400
|
+
this.onUpdate = function() {
|
1401
|
+
};
|
1402
|
+
|
1403
|
+
this.isPending = function() {
|
1404
|
+
return this.deferredUpdate.isPending();
|
1405
|
+
};
|
1406
|
+
|
1407
|
+
}).call(Mirror.prototype);
|
1408
|
+
|
1409
|
+
});
|
1410
|
+
|
1411
|
+
ace.define("ace/mode/json/json_parse",["require","exports","module"], function(require, exports, module) {
|
1412
|
+
"use strict";
|
1413
|
+
|
1414
|
+
var at, // The index of the current character
|
1415
|
+
ch, // The current character
|
1416
|
+
escapee = {
|
1417
|
+
'"': '"',
|
1418
|
+
'\\': '\\',
|
1419
|
+
'/': '/',
|
1420
|
+
b: '\b',
|
1421
|
+
f: '\f',
|
1422
|
+
n: '\n',
|
1423
|
+
r: '\r',
|
1424
|
+
t: '\t'
|
1425
|
+
},
|
1426
|
+
text,
|
1427
|
+
|
1428
|
+
error = function (m) {
|
1429
|
+
|
1430
|
+
throw {
|
1431
|
+
name: 'SyntaxError',
|
1432
|
+
message: m,
|
1433
|
+
at: at,
|
1434
|
+
text: text
|
1435
|
+
};
|
1436
|
+
},
|
1437
|
+
|
1438
|
+
next = function (c) {
|
1439
|
+
|
1440
|
+
if (c && c !== ch) {
|
1441
|
+
error("Expected '" + c + "' instead of '" + ch + "'");
|
1442
|
+
}
|
1443
|
+
|
1444
|
+
ch = text.charAt(at);
|
1445
|
+
at += 1;
|
1446
|
+
return ch;
|
1447
|
+
},
|
1448
|
+
|
1449
|
+
number = function () {
|
1450
|
+
|
1451
|
+
var number,
|
1452
|
+
string = '';
|
1453
|
+
|
1454
|
+
if (ch === '-') {
|
1455
|
+
string = '-';
|
1456
|
+
next('-');
|
1457
|
+
}
|
1458
|
+
while (ch >= '0' && ch <= '9') {
|
1459
|
+
string += ch;
|
1460
|
+
next();
|
1461
|
+
}
|
1462
|
+
if (ch === '.') {
|
1463
|
+
string += '.';
|
1464
|
+
while (next() && ch >= '0' && ch <= '9') {
|
1465
|
+
string += ch;
|
1466
|
+
}
|
1467
|
+
}
|
1468
|
+
if (ch === 'e' || ch === 'E') {
|
1469
|
+
string += ch;
|
1470
|
+
next();
|
1471
|
+
if (ch === '-' || ch === '+') {
|
1472
|
+
string += ch;
|
1473
|
+
next();
|
1474
|
+
}
|
1475
|
+
while (ch >= '0' && ch <= '9') {
|
1476
|
+
string += ch;
|
1477
|
+
next();
|
1478
|
+
}
|
1479
|
+
}
|
1480
|
+
number = +string;
|
1481
|
+
if (isNaN(number)) {
|
1482
|
+
error("Bad number");
|
1483
|
+
} else {
|
1484
|
+
return number;
|
1485
|
+
}
|
1486
|
+
},
|
1487
|
+
|
1488
|
+
string = function () {
|
1489
|
+
|
1490
|
+
var hex,
|
1491
|
+
i,
|
1492
|
+
string = '',
|
1493
|
+
uffff;
|
1494
|
+
|
1495
|
+
if (ch === '"') {
|
1496
|
+
while (next()) {
|
1497
|
+
if (ch === '"') {
|
1498
|
+
next();
|
1499
|
+
return string;
|
1500
|
+
} else if (ch === '\\') {
|
1501
|
+
next();
|
1502
|
+
if (ch === 'u') {
|
1503
|
+
uffff = 0;
|
1504
|
+
for (i = 0; i < 4; i += 1) {
|
1505
|
+
hex = parseInt(next(), 16);
|
1506
|
+
if (!isFinite(hex)) {
|
1507
|
+
break;
|
1508
|
+
}
|
1509
|
+
uffff = uffff * 16 + hex;
|
1510
|
+
}
|
1511
|
+
string += String.fromCharCode(uffff);
|
1512
|
+
} else if (typeof escapee[ch] === 'string') {
|
1513
|
+
string += escapee[ch];
|
1514
|
+
} else {
|
1515
|
+
break;
|
1516
|
+
}
|
1517
|
+
} else {
|
1518
|
+
string += ch;
|
1519
|
+
}
|
1520
|
+
}
|
1521
|
+
}
|
1522
|
+
error("Bad string");
|
1523
|
+
},
|
1524
|
+
|
1525
|
+
white = function () {
|
1526
|
+
|
1527
|
+
while (ch && ch <= ' ') {
|
1528
|
+
next();
|
1529
|
+
}
|
1530
|
+
},
|
1531
|
+
|
1532
|
+
word = function () {
|
1533
|
+
|
1534
|
+
switch (ch) {
|
1535
|
+
case 't':
|
1536
|
+
next('t');
|
1537
|
+
next('r');
|
1538
|
+
next('u');
|
1539
|
+
next('e');
|
1540
|
+
return true;
|
1541
|
+
case 'f':
|
1542
|
+
next('f');
|
1543
|
+
next('a');
|
1544
|
+
next('l');
|
1545
|
+
next('s');
|
1546
|
+
next('e');
|
1547
|
+
return false;
|
1548
|
+
case 'n':
|
1549
|
+
next('n');
|
1550
|
+
next('u');
|
1551
|
+
next('l');
|
1552
|
+
next('l');
|
1553
|
+
return null;
|
1554
|
+
}
|
1555
|
+
error("Unexpected '" + ch + "'");
|
1556
|
+
},
|
1557
|
+
|
1558
|
+
value, // Place holder for the value function.
|
1559
|
+
|
1560
|
+
array = function () {
|
1561
|
+
|
1562
|
+
var array = [];
|
1563
|
+
|
1564
|
+
if (ch === '[') {
|
1565
|
+
next('[');
|
1566
|
+
white();
|
1567
|
+
if (ch === ']') {
|
1568
|
+
next(']');
|
1569
|
+
return array; // empty array
|
1570
|
+
}
|
1571
|
+
while (ch) {
|
1572
|
+
array.push(value());
|
1573
|
+
white();
|
1574
|
+
if (ch === ']') {
|
1575
|
+
next(']');
|
1576
|
+
return array;
|
1577
|
+
}
|
1578
|
+
next(',');
|
1579
|
+
white();
|
1580
|
+
}
|
1581
|
+
}
|
1582
|
+
error("Bad array");
|
1583
|
+
},
|
1584
|
+
|
1585
|
+
object = function () {
|
1586
|
+
|
1587
|
+
var key,
|
1588
|
+
object = {};
|
1589
|
+
|
1590
|
+
if (ch === '{') {
|
1591
|
+
next('{');
|
1592
|
+
white();
|
1593
|
+
if (ch === '}') {
|
1594
|
+
next('}');
|
1595
|
+
return object; // empty object
|
1596
|
+
}
|
1597
|
+
while (ch) {
|
1598
|
+
key = string();
|
1599
|
+
white();
|
1600
|
+
next(':');
|
1601
|
+
if (Object.hasOwnProperty.call(object, key)) {
|
1602
|
+
error('Duplicate key "' + key + '"');
|
1603
|
+
}
|
1604
|
+
object[key] = value();
|
1605
|
+
white();
|
1606
|
+
if (ch === '}') {
|
1607
|
+
next('}');
|
1608
|
+
return object;
|
1609
|
+
}
|
1610
|
+
next(',');
|
1611
|
+
white();
|
1612
|
+
}
|
1613
|
+
}
|
1614
|
+
error("Bad object");
|
1615
|
+
};
|
1616
|
+
|
1617
|
+
value = function () {
|
1618
|
+
|
1619
|
+
white();
|
1620
|
+
switch (ch) {
|
1621
|
+
case '{':
|
1622
|
+
return object();
|
1623
|
+
case '[':
|
1624
|
+
return array();
|
1625
|
+
case '"':
|
1626
|
+
return string();
|
1627
|
+
case '-':
|
1628
|
+
return number();
|
1629
|
+
default:
|
1630
|
+
return ch >= '0' && ch <= '9' ? number() : word();
|
1631
|
+
}
|
1632
|
+
};
|
1633
|
+
|
1634
|
+
return function (source, reviver) {
|
1635
|
+
var result;
|
1636
|
+
|
1637
|
+
text = source;
|
1638
|
+
at = 0;
|
1639
|
+
ch = ' ';
|
1640
|
+
result = value();
|
1641
|
+
white();
|
1642
|
+
if (ch) {
|
1643
|
+
error("Syntax error");
|
1644
|
+
}
|
1645
|
+
|
1646
|
+
return typeof reviver === 'function' ? function walk(holder, key) {
|
1647
|
+
var k, v, value = holder[key];
|
1648
|
+
if (value && typeof value === 'object') {
|
1649
|
+
for (k in value) {
|
1650
|
+
if (Object.hasOwnProperty.call(value, k)) {
|
1651
|
+
v = walk(value, k);
|
1652
|
+
if (v !== undefined) {
|
1653
|
+
value[k] = v;
|
1654
|
+
} else {
|
1655
|
+
delete value[k];
|
1656
|
+
}
|
1657
|
+
}
|
1658
|
+
}
|
1659
|
+
}
|
1660
|
+
return reviver.call(holder, key, value);
|
1661
|
+
}({'': result}, '') : result;
|
1662
|
+
};
|
1663
|
+
});
|
1664
|
+
|
1665
|
+
ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"], function(require, exports, module) {
|
1666
|
+
"use strict";
|
1667
|
+
|
1668
|
+
var oop = require("../lib/oop");
|
1669
|
+
var Mirror = require("../worker/mirror").Mirror;
|
1670
|
+
var parse = require("./json/json_parse");
|
1671
|
+
|
1672
|
+
var JsonWorker = exports.JsonWorker = function(sender) {
|
1673
|
+
Mirror.call(this, sender);
|
1674
|
+
this.setTimeout(200);
|
1675
|
+
};
|
1676
|
+
|
1677
|
+
oop.inherits(JsonWorker, Mirror);
|
1678
|
+
|
1679
|
+
(function() {
|
1680
|
+
|
1681
|
+
this.onUpdate = function() {
|
1682
|
+
var value = this.doc.getValue();
|
1683
|
+
var errors = [];
|
1684
|
+
try {
|
1685
|
+
if (value)
|
1686
|
+
parse(value);
|
1687
|
+
} catch (e) {
|
1688
|
+
var pos = this.doc.indexToPosition(e.at-1);
|
1689
|
+
errors.push({
|
1690
|
+
row: pos.row,
|
1691
|
+
column: pos.column,
|
1692
|
+
text: e.message,
|
1693
|
+
type: "error"
|
1694
|
+
});
|
1695
|
+
}
|
1696
|
+
this.sender.emit("annotate", errors);
|
1697
|
+
};
|
1698
|
+
|
1699
|
+
}).call(JsonWorker.prototype);
|
1700
|
+
|
1701
|
+
});
|
1702
|
+
|
1703
|
+
ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
|
1704
|
+
|
1705
|
+
function Empty() {}
|
1706
|
+
|
1707
|
+
if (!Function.prototype.bind) {
|
1708
|
+
Function.prototype.bind = function bind(that) { // .length is 1
|
1709
|
+
var target = this;
|
1710
|
+
if (typeof target != "function") {
|
1711
|
+
throw new TypeError("Function.prototype.bind called on incompatible " + target);
|
1712
|
+
}
|
1713
|
+
var args = slice.call(arguments, 1); // for normal call
|
1714
|
+
var bound = function () {
|
1715
|
+
|
1716
|
+
if (this instanceof bound) {
|
1717
|
+
|
1718
|
+
var result = target.apply(
|
1719
|
+
this,
|
1720
|
+
args.concat(slice.call(arguments))
|
1721
|
+
);
|
1722
|
+
if (Object(result) === result) {
|
1723
|
+
return result;
|
1724
|
+
}
|
1725
|
+
return this;
|
1726
|
+
|
1727
|
+
} else {
|
1728
|
+
return target.apply(
|
1729
|
+
that,
|
1730
|
+
args.concat(slice.call(arguments))
|
1731
|
+
);
|
1732
|
+
|
1733
|
+
}
|
1734
|
+
|
1735
|
+
};
|
1736
|
+
if(target.prototype) {
|
1737
|
+
Empty.prototype = target.prototype;
|
1738
|
+
bound.prototype = new Empty();
|
1739
|
+
Empty.prototype = null;
|
1740
|
+
}
|
1741
|
+
return bound;
|
1742
|
+
};
|
1743
|
+
}
|
1744
|
+
var call = Function.prototype.call;
|
1745
|
+
var prototypeOfArray = Array.prototype;
|
1746
|
+
var prototypeOfObject = Object.prototype;
|
1747
|
+
var slice = prototypeOfArray.slice;
|
1748
|
+
var _toString = call.bind(prototypeOfObject.toString);
|
1749
|
+
var owns = call.bind(prototypeOfObject.hasOwnProperty);
|
1750
|
+
var defineGetter;
|
1751
|
+
var defineSetter;
|
1752
|
+
var lookupGetter;
|
1753
|
+
var lookupSetter;
|
1754
|
+
var supportsAccessors;
|
1755
|
+
if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
|
1756
|
+
defineGetter = call.bind(prototypeOfObject.__defineGetter__);
|
1757
|
+
defineSetter = call.bind(prototypeOfObject.__defineSetter__);
|
1758
|
+
lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
|
1759
|
+
lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
|
1760
|
+
}
|
1761
|
+
if ([1,2].splice(0).length != 2) {
|
1762
|
+
if(function() { // test IE < 9 to splice bug - see issue #138
|
1763
|
+
function makeArray(l) {
|
1764
|
+
var a = new Array(l+2);
|
1765
|
+
a[0] = a[1] = 0;
|
1766
|
+
return a;
|
1767
|
+
}
|
1768
|
+
var array = [], lengthBefore;
|
1769
|
+
|
1770
|
+
array.splice.apply(array, makeArray(20));
|
1771
|
+
array.splice.apply(array, makeArray(26));
|
1772
|
+
|
1773
|
+
lengthBefore = array.length; //46
|
1774
|
+
array.splice(5, 0, "XXX"); // add one element
|
1775
|
+
|
1776
|
+
lengthBefore + 1 == array.length
|
1777
|
+
|
1778
|
+
if (lengthBefore + 1 == array.length) {
|
1779
|
+
return true;// has right splice implementation without bugs
|
1780
|
+
}
|
1781
|
+
}()) {//IE 6/7
|
1782
|
+
var array_splice = Array.prototype.splice;
|
1783
|
+
Array.prototype.splice = function(start, deleteCount) {
|
1784
|
+
if (!arguments.length) {
|
1785
|
+
return [];
|
1786
|
+
} else {
|
1787
|
+
return array_splice.apply(this, [
|
1788
|
+
start === void 0 ? 0 : start,
|
1789
|
+
deleteCount === void 0 ? (this.length - start) : deleteCount
|
1790
|
+
].concat(slice.call(arguments, 2)))
|
1791
|
+
}
|
1792
|
+
};
|
1793
|
+
} else {//IE8
|
1794
|
+
Array.prototype.splice = function(pos, removeCount){
|
1795
|
+
var length = this.length;
|
1796
|
+
if (pos > 0) {
|
1797
|
+
if (pos > length)
|
1798
|
+
pos = length;
|
1799
|
+
} else if (pos == void 0) {
|
1800
|
+
pos = 0;
|
1801
|
+
} else if (pos < 0) {
|
1802
|
+
pos = Math.max(length + pos, 0);
|
1803
|
+
}
|
1804
|
+
|
1805
|
+
if (!(pos+removeCount < length))
|
1806
|
+
removeCount = length - pos;
|
1807
|
+
|
1808
|
+
var removed = this.slice(pos, pos+removeCount);
|
1809
|
+
var insert = slice.call(arguments, 2);
|
1810
|
+
var add = insert.length;
|
1811
|
+
if (pos === length) {
|
1812
|
+
if (add) {
|
1813
|
+
this.push.apply(this, insert);
|
1814
|
+
}
|
1815
|
+
} else {
|
1816
|
+
var remove = Math.min(removeCount, length - pos);
|
1817
|
+
var tailOldPos = pos + remove;
|
1818
|
+
var tailNewPos = tailOldPos + add - remove;
|
1819
|
+
var tailCount = length - tailOldPos;
|
1820
|
+
var lengthAfterRemove = length - remove;
|
1821
|
+
|
1822
|
+
if (tailNewPos < tailOldPos) { // case A
|
1823
|
+
for (var i = 0; i < tailCount; ++i) {
|
1824
|
+
this[tailNewPos+i] = this[tailOldPos+i];
|
1825
|
+
}
|
1826
|
+
} else if (tailNewPos > tailOldPos) { // case B
|
1827
|
+
for (i = tailCount; i--; ) {
|
1828
|
+
this[tailNewPos+i] = this[tailOldPos+i];
|
1829
|
+
}
|
1830
|
+
} // else, add == remove (nothing to do)
|
1831
|
+
|
1832
|
+
if (add && pos === lengthAfterRemove) {
|
1833
|
+
this.length = lengthAfterRemove; // truncate array
|
1834
|
+
this.push.apply(this, insert);
|
1835
|
+
} else {
|
1836
|
+
this.length = lengthAfterRemove + add; // reserves space
|
1837
|
+
for (i = 0; i < add; ++i) {
|
1838
|
+
this[pos+i] = insert[i];
|
1839
|
+
}
|
1840
|
+
}
|
1841
|
+
}
|
1842
|
+
return removed;
|
1843
|
+
};
|
1844
|
+
}
|
1845
|
+
}
|
1846
|
+
if (!Array.isArray) {
|
1847
|
+
Array.isArray = function isArray(obj) {
|
1848
|
+
return _toString(obj) == "[object Array]";
|
1849
|
+
};
|
1850
|
+
}
|
1851
|
+
var boxedString = Object("a"),
|
1852
|
+
splitString = boxedString[0] != "a" || !(0 in boxedString);
|
1853
|
+
|
1854
|
+
if (!Array.prototype.forEach) {
|
1855
|
+
Array.prototype.forEach = function forEach(fun /*, thisp*/) {
|
1856
|
+
var object = toObject(this),
|
1857
|
+
self = splitString && _toString(this) == "[object String]" ?
|
1858
|
+
this.split("") :
|
1859
|
+
object,
|
1860
|
+
thisp = arguments[1],
|
1861
|
+
i = -1,
|
1862
|
+
length = self.length >>> 0;
|
1863
|
+
if (_toString(fun) != "[object Function]") {
|
1864
|
+
throw new TypeError(); // TODO message
|
1865
|
+
}
|
1866
|
+
|
1867
|
+
while (++i < length) {
|
1868
|
+
if (i in self) {
|
1869
|
+
fun.call(thisp, self[i], i, object);
|
1870
|
+
}
|
1871
|
+
}
|
1872
|
+
};
|
1873
|
+
}
|
1874
|
+
if (!Array.prototype.map) {
|
1875
|
+
Array.prototype.map = function map(fun /*, thisp*/) {
|
1876
|
+
var object = toObject(this),
|
1877
|
+
self = splitString && _toString(this) == "[object String]" ?
|
1878
|
+
this.split("") :
|
1879
|
+
object,
|
1880
|
+
length = self.length >>> 0,
|
1881
|
+
result = Array(length),
|
1882
|
+
thisp = arguments[1];
|
1883
|
+
if (_toString(fun) != "[object Function]") {
|
1884
|
+
throw new TypeError(fun + " is not a function");
|
1885
|
+
}
|
1886
|
+
|
1887
|
+
for (var i = 0; i < length; i++) {
|
1888
|
+
if (i in self)
|
1889
|
+
result[i] = fun.call(thisp, self[i], i, object);
|
1890
|
+
}
|
1891
|
+
return result;
|
1892
|
+
};
|
1893
|
+
}
|
1894
|
+
if (!Array.prototype.filter) {
|
1895
|
+
Array.prototype.filter = function filter(fun /*, thisp */) {
|
1896
|
+
var object = toObject(this),
|
1897
|
+
self = splitString && _toString(this) == "[object String]" ?
|
1898
|
+
this.split("") :
|
1899
|
+
object,
|
1900
|
+
length = self.length >>> 0,
|
1901
|
+
result = [],
|
1902
|
+
value,
|
1903
|
+
thisp = arguments[1];
|
1904
|
+
if (_toString(fun) != "[object Function]") {
|
1905
|
+
throw new TypeError(fun + " is not a function");
|
1906
|
+
}
|
1907
|
+
|
1908
|
+
for (var i = 0; i < length; i++) {
|
1909
|
+
if (i in self) {
|
1910
|
+
value = self[i];
|
1911
|
+
if (fun.call(thisp, value, i, object)) {
|
1912
|
+
result.push(value);
|
1913
|
+
}
|
1914
|
+
}
|
1915
|
+
}
|
1916
|
+
return result;
|
1917
|
+
};
|
1918
|
+
}
|
1919
|
+
if (!Array.prototype.every) {
|
1920
|
+
Array.prototype.every = function every(fun /*, thisp */) {
|
1921
|
+
var object = toObject(this),
|
1922
|
+
self = splitString && _toString(this) == "[object String]" ?
|
1923
|
+
this.split("") :
|
1924
|
+
object,
|
1925
|
+
length = self.length >>> 0,
|
1926
|
+
thisp = arguments[1];
|
1927
|
+
if (_toString(fun) != "[object Function]") {
|
1928
|
+
throw new TypeError(fun + " is not a function");
|
1929
|
+
}
|
1930
|
+
|
1931
|
+
for (var i = 0; i < length; i++) {
|
1932
|
+
if (i in self && !fun.call(thisp, self[i], i, object)) {
|
1933
|
+
return false;
|
1934
|
+
}
|
1935
|
+
}
|
1936
|
+
return true;
|
1937
|
+
};
|
1938
|
+
}
|
1939
|
+
if (!Array.prototype.some) {
|
1940
|
+
Array.prototype.some = function some(fun /*, thisp */) {
|
1941
|
+
var object = toObject(this),
|
1942
|
+
self = splitString && _toString(this) == "[object String]" ?
|
1943
|
+
this.split("") :
|
1944
|
+
object,
|
1945
|
+
length = self.length >>> 0,
|
1946
|
+
thisp = arguments[1];
|
1947
|
+
if (_toString(fun) != "[object Function]") {
|
1948
|
+
throw new TypeError(fun + " is not a function");
|
1949
|
+
}
|
1950
|
+
|
1951
|
+
for (var i = 0; i < length; i++) {
|
1952
|
+
if (i in self && fun.call(thisp, self[i], i, object)) {
|
1953
|
+
return true;
|
1954
|
+
}
|
1955
|
+
}
|
1956
|
+
return false;
|
1957
|
+
};
|
1958
|
+
}
|
1959
|
+
if (!Array.prototype.reduce) {
|
1960
|
+
Array.prototype.reduce = function reduce(fun /*, initial*/) {
|
1961
|
+
var object = toObject(this),
|
1962
|
+
self = splitString && _toString(this) == "[object String]" ?
|
1963
|
+
this.split("") :
|
1964
|
+
object,
|
1965
|
+
length = self.length >>> 0;
|
1966
|
+
if (_toString(fun) != "[object Function]") {
|
1967
|
+
throw new TypeError(fun + " is not a function");
|
1968
|
+
}
|
1969
|
+
if (!length && arguments.length == 1) {
|
1970
|
+
throw new TypeError("reduce of empty array with no initial value");
|
1971
|
+
}
|
1972
|
+
|
1973
|
+
var i = 0;
|
1974
|
+
var result;
|
1975
|
+
if (arguments.length >= 2) {
|
1976
|
+
result = arguments[1];
|
1977
|
+
} else {
|
1978
|
+
do {
|
1979
|
+
if (i in self) {
|
1980
|
+
result = self[i++];
|
1981
|
+
break;
|
1982
|
+
}
|
1983
|
+
if (++i >= length) {
|
1984
|
+
throw new TypeError("reduce of empty array with no initial value");
|
1985
|
+
}
|
1986
|
+
} while (true);
|
1987
|
+
}
|
1988
|
+
|
1989
|
+
for (; i < length; i++) {
|
1990
|
+
if (i in self) {
|
1991
|
+
result = fun.call(void 0, result, self[i], i, object);
|
1992
|
+
}
|
1993
|
+
}
|
1994
|
+
|
1995
|
+
return result;
|
1996
|
+
};
|
1997
|
+
}
|
1998
|
+
if (!Array.prototype.reduceRight) {
|
1999
|
+
Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
|
2000
|
+
var object = toObject(this),
|
2001
|
+
self = splitString && _toString(this) == "[object String]" ?
|
2002
|
+
this.split("") :
|
2003
|
+
object,
|
2004
|
+
length = self.length >>> 0;
|
2005
|
+
if (_toString(fun) != "[object Function]") {
|
2006
|
+
throw new TypeError(fun + " is not a function");
|
2007
|
+
}
|
2008
|
+
if (!length && arguments.length == 1) {
|
2009
|
+
throw new TypeError("reduceRight of empty array with no initial value");
|
2010
|
+
}
|
2011
|
+
|
2012
|
+
var result, i = length - 1;
|
2013
|
+
if (arguments.length >= 2) {
|
2014
|
+
result = arguments[1];
|
2015
|
+
} else {
|
2016
|
+
do {
|
2017
|
+
if (i in self) {
|
2018
|
+
result = self[i--];
|
2019
|
+
break;
|
2020
|
+
}
|
2021
|
+
if (--i < 0) {
|
2022
|
+
throw new TypeError("reduceRight of empty array with no initial value");
|
2023
|
+
}
|
2024
|
+
} while (true);
|
2025
|
+
}
|
2026
|
+
|
2027
|
+
do {
|
2028
|
+
if (i in this) {
|
2029
|
+
result = fun.call(void 0, result, self[i], i, object);
|
2030
|
+
}
|
2031
|
+
} while (i--);
|
2032
|
+
|
2033
|
+
return result;
|
2034
|
+
};
|
2035
|
+
}
|
2036
|
+
if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
|
2037
|
+
Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
|
2038
|
+
var self = splitString && _toString(this) == "[object String]" ?
|
2039
|
+
this.split("") :
|
2040
|
+
toObject(this),
|
2041
|
+
length = self.length >>> 0;
|
2042
|
+
|
2043
|
+
if (!length) {
|
2044
|
+
return -1;
|
2045
|
+
}
|
2046
|
+
|
2047
|
+
var i = 0;
|
2048
|
+
if (arguments.length > 1) {
|
2049
|
+
i = toInteger(arguments[1]);
|
2050
|
+
}
|
2051
|
+
i = i >= 0 ? i : Math.max(0, length + i);
|
2052
|
+
for (; i < length; i++) {
|
2053
|
+
if (i in self && self[i] === sought) {
|
2054
|
+
return i;
|
2055
|
+
}
|
2056
|
+
}
|
2057
|
+
return -1;
|
2058
|
+
};
|
2059
|
+
}
|
2060
|
+
if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
|
2061
|
+
Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
|
2062
|
+
var self = splitString && _toString(this) == "[object String]" ?
|
2063
|
+
this.split("") :
|
2064
|
+
toObject(this),
|
2065
|
+
length = self.length >>> 0;
|
2066
|
+
|
2067
|
+
if (!length) {
|
2068
|
+
return -1;
|
2069
|
+
}
|
2070
|
+
var i = length - 1;
|
2071
|
+
if (arguments.length > 1) {
|
2072
|
+
i = Math.min(i, toInteger(arguments[1]));
|
2073
|
+
}
|
2074
|
+
i = i >= 0 ? i : length - Math.abs(i);
|
2075
|
+
for (; i >= 0; i--) {
|
2076
|
+
if (i in self && sought === self[i]) {
|
2077
|
+
return i;
|
2078
|
+
}
|
2079
|
+
}
|
2080
|
+
return -1;
|
2081
|
+
};
|
2082
|
+
}
|
2083
|
+
if (!Object.getPrototypeOf) {
|
2084
|
+
Object.getPrototypeOf = function getPrototypeOf(object) {
|
2085
|
+
return object.__proto__ || (
|
2086
|
+
object.constructor ?
|
2087
|
+
object.constructor.prototype :
|
2088
|
+
prototypeOfObject
|
2089
|
+
);
|
2090
|
+
};
|
2091
|
+
}
|
2092
|
+
if (!Object.getOwnPropertyDescriptor) {
|
2093
|
+
var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
|
2094
|
+
"non-object: ";
|
2095
|
+
Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
|
2096
|
+
if ((typeof object != "object" && typeof object != "function") || object === null)
|
2097
|
+
throw new TypeError(ERR_NON_OBJECT + object);
|
2098
|
+
if (!owns(object, property))
|
2099
|
+
return;
|
2100
|
+
|
2101
|
+
var descriptor, getter, setter;
|
2102
|
+
descriptor = { enumerable: true, configurable: true };
|
2103
|
+
if (supportsAccessors) {
|
2104
|
+
var prototype = object.__proto__;
|
2105
|
+
object.__proto__ = prototypeOfObject;
|
2106
|
+
|
2107
|
+
var getter = lookupGetter(object, property);
|
2108
|
+
var setter = lookupSetter(object, property);
|
2109
|
+
object.__proto__ = prototype;
|
2110
|
+
|
2111
|
+
if (getter || setter) {
|
2112
|
+
if (getter) descriptor.get = getter;
|
2113
|
+
if (setter) descriptor.set = setter;
|
2114
|
+
return descriptor;
|
2115
|
+
}
|
2116
|
+
}
|
2117
|
+
descriptor.value = object[property];
|
2118
|
+
return descriptor;
|
2119
|
+
};
|
2120
|
+
}
|
2121
|
+
if (!Object.getOwnPropertyNames) {
|
2122
|
+
Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
|
2123
|
+
return Object.keys(object);
|
2124
|
+
};
|
2125
|
+
}
|
2126
|
+
if (!Object.create) {
|
2127
|
+
var createEmpty;
|
2128
|
+
if (Object.prototype.__proto__ === null) {
|
2129
|
+
createEmpty = function () {
|
2130
|
+
return { "__proto__": null };
|
2131
|
+
};
|
2132
|
+
} else {
|
2133
|
+
createEmpty = function () {
|
2134
|
+
var empty = {};
|
2135
|
+
for (var i in empty)
|
2136
|
+
empty[i] = null;
|
2137
|
+
empty.constructor =
|
2138
|
+
empty.hasOwnProperty =
|
2139
|
+
empty.propertyIsEnumerable =
|
2140
|
+
empty.isPrototypeOf =
|
2141
|
+
empty.toLocaleString =
|
2142
|
+
empty.toString =
|
2143
|
+
empty.valueOf =
|
2144
|
+
empty.__proto__ = null;
|
2145
|
+
return empty;
|
2146
|
+
}
|
2147
|
+
}
|
2148
|
+
|
2149
|
+
Object.create = function create(prototype, properties) {
|
2150
|
+
var object;
|
2151
|
+
if (prototype === null) {
|
2152
|
+
object = createEmpty();
|
2153
|
+
} else {
|
2154
|
+
if (typeof prototype != "object")
|
2155
|
+
throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
|
2156
|
+
var Type = function () {};
|
2157
|
+
Type.prototype = prototype;
|
2158
|
+
object = new Type();
|
2159
|
+
object.__proto__ = prototype;
|
2160
|
+
}
|
2161
|
+
if (properties !== void 0)
|
2162
|
+
Object.defineProperties(object, properties);
|
2163
|
+
return object;
|
2164
|
+
};
|
2165
|
+
}
|
2166
|
+
|
2167
|
+
function doesDefinePropertyWork(object) {
|
2168
|
+
try {
|
2169
|
+
Object.defineProperty(object, "sentinel", {});
|
2170
|
+
return "sentinel" in object;
|
2171
|
+
} catch (exception) {
|
2172
|
+
}
|
2173
|
+
}
|
2174
|
+
if (Object.defineProperty) {
|
2175
|
+
var definePropertyWorksOnObject = doesDefinePropertyWork({});
|
2176
|
+
var definePropertyWorksOnDom = typeof document == "undefined" ||
|
2177
|
+
doesDefinePropertyWork(document.createElement("div"));
|
2178
|
+
if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
|
2179
|
+
var definePropertyFallback = Object.defineProperty;
|
2180
|
+
}
|
2181
|
+
}
|
2182
|
+
|
2183
|
+
if (!Object.defineProperty || definePropertyFallback) {
|
2184
|
+
var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
|
2185
|
+
var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
|
2186
|
+
var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
|
2187
|
+
"on this javascript engine";
|
2188
|
+
|
2189
|
+
Object.defineProperty = function defineProperty(object, property, descriptor) {
|
2190
|
+
if ((typeof object != "object" && typeof object != "function") || object === null)
|
2191
|
+
throw new TypeError(ERR_NON_OBJECT_TARGET + object);
|
2192
|
+
if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
|
2193
|
+
throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
|
2194
|
+
if (definePropertyFallback) {
|
2195
|
+
try {
|
2196
|
+
return definePropertyFallback.call(Object, object, property, descriptor);
|
2197
|
+
} catch (exception) {
|
2198
|
+
}
|
2199
|
+
}
|
2200
|
+
if (owns(descriptor, "value")) {
|
2201
|
+
|
2202
|
+
if (supportsAccessors && (lookupGetter(object, property) ||
|
2203
|
+
lookupSetter(object, property)))
|
2204
|
+
{
|
2205
|
+
var prototype = object.__proto__;
|
2206
|
+
object.__proto__ = prototypeOfObject;
|
2207
|
+
delete object[property];
|
2208
|
+
object[property] = descriptor.value;
|
2209
|
+
object.__proto__ = prototype;
|
2210
|
+
} else {
|
2211
|
+
object[property] = descriptor.value;
|
2212
|
+
}
|
2213
|
+
} else {
|
2214
|
+
if (!supportsAccessors)
|
2215
|
+
throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
|
2216
|
+
if (owns(descriptor, "get"))
|
2217
|
+
defineGetter(object, property, descriptor.get);
|
2218
|
+
if (owns(descriptor, "set"))
|
2219
|
+
defineSetter(object, property, descriptor.set);
|
2220
|
+
}
|
2221
|
+
|
2222
|
+
return object;
|
2223
|
+
};
|
2224
|
+
}
|
2225
|
+
if (!Object.defineProperties) {
|
2226
|
+
Object.defineProperties = function defineProperties(object, properties) {
|
2227
|
+
for (var property in properties) {
|
2228
|
+
if (owns(properties, property))
|
2229
|
+
Object.defineProperty(object, property, properties[property]);
|
2230
|
+
}
|
2231
|
+
return object;
|
2232
|
+
};
|
2233
|
+
}
|
2234
|
+
if (!Object.seal) {
|
2235
|
+
Object.seal = function seal(object) {
|
2236
|
+
return object;
|
2237
|
+
};
|
2238
|
+
}
|
2239
|
+
if (!Object.freeze) {
|
2240
|
+
Object.freeze = function freeze(object) {
|
2241
|
+
return object;
|
2242
|
+
};
|
2243
|
+
}
|
2244
|
+
try {
|
2245
|
+
Object.freeze(function () {});
|
2246
|
+
} catch (exception) {
|
2247
|
+
Object.freeze = (function freeze(freezeObject) {
|
2248
|
+
return function freeze(object) {
|
2249
|
+
if (typeof object == "function") {
|
2250
|
+
return object;
|
2251
|
+
} else {
|
2252
|
+
return freezeObject(object);
|
2253
|
+
}
|
2254
|
+
};
|
2255
|
+
})(Object.freeze);
|
2256
|
+
}
|
2257
|
+
if (!Object.preventExtensions) {
|
2258
|
+
Object.preventExtensions = function preventExtensions(object) {
|
2259
|
+
return object;
|
2260
|
+
};
|
2261
|
+
}
|
2262
|
+
if (!Object.isSealed) {
|
2263
|
+
Object.isSealed = function isSealed(object) {
|
2264
|
+
return false;
|
2265
|
+
};
|
2266
|
+
}
|
2267
|
+
if (!Object.isFrozen) {
|
2268
|
+
Object.isFrozen = function isFrozen(object) {
|
2269
|
+
return false;
|
2270
|
+
};
|
2271
|
+
}
|
2272
|
+
if (!Object.isExtensible) {
|
2273
|
+
Object.isExtensible = function isExtensible(object) {
|
2274
|
+
if (Object(object) === object) {
|
2275
|
+
throw new TypeError(); // TODO message
|
2276
|
+
}
|
2277
|
+
var name = '';
|
2278
|
+
while (owns(object, name)) {
|
2279
|
+
name += '?';
|
2280
|
+
}
|
2281
|
+
object[name] = true;
|
2282
|
+
var returnValue = owns(object, name);
|
2283
|
+
delete object[name];
|
2284
|
+
return returnValue;
|
2285
|
+
};
|
2286
|
+
}
|
2287
|
+
if (!Object.keys) {
|
2288
|
+
var hasDontEnumBug = true,
|
2289
|
+
dontEnums = [
|
2290
|
+
"toString",
|
2291
|
+
"toLocaleString",
|
2292
|
+
"valueOf",
|
2293
|
+
"hasOwnProperty",
|
2294
|
+
"isPrototypeOf",
|
2295
|
+
"propertyIsEnumerable",
|
2296
|
+
"constructor"
|
2297
|
+
],
|
2298
|
+
dontEnumsLength = dontEnums.length;
|
2299
|
+
|
2300
|
+
for (var key in {"toString": null}) {
|
2301
|
+
hasDontEnumBug = false;
|
2302
|
+
}
|
2303
|
+
|
2304
|
+
Object.keys = function keys(object) {
|
2305
|
+
|
2306
|
+
if (
|
2307
|
+
(typeof object != "object" && typeof object != "function") ||
|
2308
|
+
object === null
|
2309
|
+
) {
|
2310
|
+
throw new TypeError("Object.keys called on a non-object");
|
2311
|
+
}
|
2312
|
+
|
2313
|
+
var keys = [];
|
2314
|
+
for (var name in object) {
|
2315
|
+
if (owns(object, name)) {
|
2316
|
+
keys.push(name);
|
2317
|
+
}
|
2318
|
+
}
|
2319
|
+
|
2320
|
+
if (hasDontEnumBug) {
|
2321
|
+
for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
|
2322
|
+
var dontEnum = dontEnums[i];
|
2323
|
+
if (owns(object, dontEnum)) {
|
2324
|
+
keys.push(dontEnum);
|
2325
|
+
}
|
2326
|
+
}
|
2327
|
+
}
|
2328
|
+
return keys;
|
2329
|
+
};
|
2330
|
+
|
2331
|
+
}
|
2332
|
+
if (!Date.now) {
|
2333
|
+
Date.now = function now() {
|
2334
|
+
return new Date().getTime();
|
2335
|
+
};
|
2336
|
+
}
|
2337
|
+
var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
|
2338
|
+
"\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
|
2339
|
+
"\u2029\uFEFF";
|
2340
|
+
if (!String.prototype.trim || ws.trim()) {
|
2341
|
+
ws = "[" + ws + "]";
|
2342
|
+
var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
|
2343
|
+
trimEndRegexp = new RegExp(ws + ws + "*$");
|
2344
|
+
String.prototype.trim = function trim() {
|
2345
|
+
return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
|
2346
|
+
};
|
2347
|
+
}
|
2348
|
+
|
2349
|
+
function toInteger(n) {
|
2350
|
+
n = +n;
|
2351
|
+
if (n !== n) { // isNaN
|
2352
|
+
n = 0;
|
2353
|
+
} else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
|
2354
|
+
n = (n > 0 || -1) * Math.floor(Math.abs(n));
|
2355
|
+
}
|
2356
|
+
return n;
|
2357
|
+
}
|
2358
|
+
|
2359
|
+
function isPrimitive(input) {
|
2360
|
+
var type = typeof input;
|
2361
|
+
return (
|
2362
|
+
input === null ||
|
2363
|
+
type === "undefined" ||
|
2364
|
+
type === "boolean" ||
|
2365
|
+
type === "number" ||
|
2366
|
+
type === "string"
|
2367
|
+
);
|
2368
|
+
}
|
2369
|
+
|
2370
|
+
function toPrimitive(input) {
|
2371
|
+
var val, valueOf, toString;
|
2372
|
+
if (isPrimitive(input)) {
|
2373
|
+
return input;
|
2374
|
+
}
|
2375
|
+
valueOf = input.valueOf;
|
2376
|
+
if (typeof valueOf === "function") {
|
2377
|
+
val = valueOf.call(input);
|
2378
|
+
if (isPrimitive(val)) {
|
2379
|
+
return val;
|
2380
|
+
}
|
2381
|
+
}
|
2382
|
+
toString = input.toString;
|
2383
|
+
if (typeof toString === "function") {
|
2384
|
+
val = toString.call(input);
|
2385
|
+
if (isPrimitive(val)) {
|
2386
|
+
return val;
|
2387
|
+
}
|
2388
|
+
}
|
2389
|
+
throw new TypeError();
|
2390
|
+
}
|
2391
|
+
var toObject = function (o) {
|
2392
|
+
if (o == null) { // this matches both null and undefined
|
2393
|
+
throw new TypeError("can't convert "+o+" to object");
|
2394
|
+
}
|
2395
|
+
return Object(o);
|
2396
|
+
};
|
2397
|
+
|
2398
|
+
});
|