├── README.md ├── fonts ├── fontawesome-webfont.eot@ ├── fontawesome-webfont.eot@v=4.2.0 ├── fontawesome-webfont.ttf@v=4.2.0 ├── fontawesome-webfont.woff@v=4.2.0 ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.eot@ ├── glyphicons-halflings-regular.ttf └── glyphicons-halflings-regular.woff ├── css ├── jquery.numberedtextarea.css ├── base.css └── font-awesome.min.css ├── js ├── jquery.message.js ├── jquery.numberedtextarea.js ├── jquery.json.js ├── jquery.json2xml.js ├── jquery.xml2json.js ├── json2.js ├── jsonlint.js └── bootstrap.min.js ├── code.html ├── json ├── code.html ├── component.html └── wiki.html ├── component.html ├── index.html └── wiki.html /README.md: -------------------------------------------------------------------------------- 1 | # json 2 | json 在线格式化工具 3 | -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.eot@: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/speed/json/master/fonts/fontawesome-webfont.eot@ -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.eot@v=4.2.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/speed/json/master/fonts/fontawesome-webfont.eot@v=4.2.0 -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.ttf@v=4.2.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/speed/json/master/fonts/fontawesome-webfont.ttf@v=4.2.0 -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff@v=4.2.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/speed/json/master/fonts/fontawesome-webfont.woff@v=4.2.0 -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/speed/json/master/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.eot@: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/speed/json/master/fonts/glyphicons-halflings-regular.eot@ -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/speed/json/master/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/speed/json/master/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /css/jquery.numberedtextarea.css: -------------------------------------------------------------------------------- 1 | 2 | div.numberedtextarea-wrapper { position: relative; } 3 | 4 | div.numberedtextarea-wrapper textarea { 5 | display: block; 6 | -webkit-box-sizing: border-box; 7 | -moz-box-sizing: border-box; 8 | box-sizing: border-box; 9 | } 10 | 11 | div.numberedtextarea-line-numbers { 12 | position: absolute; 13 | display: none; 14 | background-color: #fafafa; 15 | top: 0; 16 | left: 0; 17 | right: 0; 18 | bottom: 0; 19 | width: 40px; 20 | border-right: 1px dashed #eee; 21 | border-bottom:solid 1px #ddd; 22 | color: #999; 23 | overflow: hidden; 24 | } 25 | 26 | div.numberedtextarea-number { 27 | padding-right: 6px; 28 | text-align: center; 29 | } 30 | -------------------------------------------------------------------------------- /css/base.css: -------------------------------------------------------------------------------- 1 | body{ 2 | font-family:Menlo,Monaco,Consolas,"Helvetica Neue",Helvetica,"Courier New",'微软雅黑', monospace, Arial,sans-serif,'黑体'; 3 | color: #555; 4 | } 5 | a{ 6 | display: inline-block; 7 | text-decoration: none; 8 | font-family: Menlo,Monaco,Consolas,'微软雅黑'; 9 | color: #29abe2; 10 | } 11 | .green{ 12 | color:#0fd59d; 13 | } 14 | .red{ 15 | color:#f98280; 16 | } 17 | .blue{ 18 | color:#29abe2; 19 | } 20 | input:focus, textarea:focus { 21 | outline: none; 22 | } 23 | a:hover{ 24 | text-decoration: none; 25 | color: #15b374; 26 | } 27 | .label-success{ 28 | background-color: #0fd59d; 29 | } 30 | .header{ 31 | box-shadow: 0px 0px 1px #e5e5e5; 32 | border-bottom: solid 1px #d5d5d5; 33 | padding: 0px; 34 | } 35 | .logo{ 36 | text-decoration: none; 37 | font-weight: bold; 38 | font-size: 24px; 39 | color: #0fd59d; 40 | padding: 10px; 41 | } 42 | .navi{ 43 | padding:5px 20px; 44 | font-size:14px; 45 | font-weight:bold;font-family:Menlo,Monaco,Consolas,"Courier New",monospace, "Helvetica Neue",Helvetica,Arial,sans-serif,'幼圆' 46 | } 47 | .navi a{ 48 | padding: 0px 20px; 49 | color: #999; 50 | } 51 | .navi a:hover{ 52 | color: #15b374; 53 | } 54 | -------------------------------------------------------------------------------- /js/jquery.message.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Message Plugin (with Transition Definitions) 3 | * Examples and documentation at: http://eadmarket.com/ 4 | * Copyright (c) 2012-2013 China.Ren. 5 | * Version: 1.0.2 (19-OCT-2013) 6 | * Dual licensed under the MIT and GPL licenses. 7 | * http://jquery.malsup.com/license.html 8 | * Requires: jQuery v1.3.1 or later 9 | */ 10 | var container=$('#jquery-beauty-msg'); 11 | if(container.length<=0){ 12 | $("body").append('
'); 13 | container=$('#jquery-beauty-msg'); 14 | } 15 | var containerStyle='color:#e1282b;font-family:"微软雅黑";font-weight:bold;font-size:20px;text-shadow:5px 5px 10px #bbb;' 16 | +'text-align:center;margin:0;padding-top:20%;width:100%;word-break:break-all;z-index:100000;'; 17 | var closeFlag=false; 18 | var timer=0; 19 | var msgContent=''; 20 | $.msg=function(txt,style,obj,delay){ 21 | msgContent=txt; 22 | 23 | if(obj!="undefined"&&obj!=null){ 24 | containerStyle+='position:relative;top:'+$(obj).attr('top')+';left:'+$(obj).attr('left')+';'; 25 | } 26 | else{ 27 | containerStyle+='position:fixed;top:0;left:0;'; 28 | $(container).attr('style',containerStyle+style); 29 | $(container).html(msgContent); 30 | $(container).fadeIn(300,function(){ 31 | $(container).animate({fontSize:'40px'},'300'); 32 | $(container).delay(1000).fadeOut(); 33 | }); 34 | } 35 | } 36 | function addDot(){ 37 | msgContent=msgContent+"."; 38 | $(container).html(msgContent); 39 | timer=timer+1; 40 | if(!closeFlag&&timer>=5){ 41 | $(container).html("操作超时!"); 42 | window.clearInterval(); 43 | } 44 | } 45 | $.loading=function(txt,action){ 46 | msgContent=txt; 47 | containerStyle+='position:fixed;top:0;left:0;'; 48 | $(container).attr('style',containerStyle+"color:blue;"); 49 | $(container).html(msgContent); 50 | if(action!="close"){ 51 | $(container).fadeIn(300,function(){ 52 | $(container).animate({fontSize:'40px'},'300'); 53 | }); 54 | window.setInterval("addDot",1000); 55 | 56 | }else{ 57 | window.clearInterval(); 58 | closeFlag=true; 59 | $(container).fadeOut(); 60 | } 61 | } -------------------------------------------------------------------------------- /js/jquery.numberedtextarea.js: -------------------------------------------------------------------------------- 1 | /* 2 | * NumberedTextarea - jQuery Plugin 3 | * Textarea with line numbering 4 | * 5 | * Copyright (c) 2015 Dariusz Arciszewski 6 | * 7 | * Requires: jQuery v2.0+ 8 | * 9 | * Licensed under the GPL licenses: 10 | * http://www.gnu.org/licenses/gpl.html 11 | */ 12 | 13 | (function ($) { 14 | 15 | $.fn.numberedtextarea = function(options) { 16 | 17 | var settings = $.extend({ 18 | color: null, // Font color 19 | borderColor: null, // Border color 20 | class: null, // Add class to the 'numberedtextarea-wrapper' 21 | allowTabChar: false, // If true Tab key creates indentation 22 | }, options); 23 | 24 | this.each(function() { 25 | if(this.nodeName.toLowerCase() !== "textarea") { 26 | console.log('This is not a 55 | 56 |
57 | 62 |
63 | 66 |
67 |
68 |
69 |
70 |
71 |
72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 192 | 193 | 194 | -------------------------------------------------------------------------------- /js/json2.js: -------------------------------------------------------------------------------- 1 | 2 | /*jslint evil: true, strict: false */ 3 | 4 | /*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, 5 | call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, 6 | getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, 7 | lastIndex, length, parse, prototype, push, replace, slice, stringify, 8 | test, toJSON, toString, valueOf 9 | */ 10 | 11 | 12 | // Create a JSON object only if one does not already exist. We create the 13 | // methods in a closure to avoid creating global variables. 14 | 15 | if (!this.JSON) { 16 | this.JSON = {}; 17 | } 18 | 19 | (function () { 20 | 21 | function f(n) { 22 | // Format integers to have at least two digits. 23 | return n < 10 ? '0' + n : n; 24 | } 25 | 26 | if (typeof Date.prototype.toJSON !== 'function') { 27 | 28 | Date.prototype.toJSON = function (key) { 29 | 30 | return isFinite(this.valueOf()) ? 31 | this.getUTCFullYear() + '-' + 32 | f(this.getUTCMonth() + 1) + '-' + 33 | f(this.getUTCDate()) + 'T' + 34 | f(this.getUTCHours()) + ':' + 35 | f(this.getUTCMinutes()) + ':' + 36 | f(this.getUTCSeconds()) + 'Z' : null; 37 | }; 38 | 39 | String.prototype.toJSON = 40 | Number.prototype.toJSON = 41 | Boolean.prototype.toJSON = function (key) { 42 | return this.valueOf(); 43 | }; 44 | } 45 | 46 | var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, 47 | escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, 48 | gap, 49 | indent, 50 | meta = { // table of character substitutions 51 | '\b': '\\b', 52 | '\t': '\\t', 53 | '\n': '\\n', 54 | '\f': '\\f', 55 | '\r': '\\r', 56 | '"' : '\\"', 57 | '\\': '\\\\' 58 | }, 59 | rep; 60 | 61 | 62 | function quote(string) { 63 | 64 | // If the string contains no control characters, no quote characters, and no 65 | // backslash characters, then we can safely slap some quotes around it. 66 | // Otherwise we must also replace the offending characters with safe escape 67 | // sequences. 68 | 69 | escapable.lastIndex = 0; 70 | return escapable.test(string) ? 71 | '"' + string.replace(escapable, function (a) { 72 | var c = meta[a]; 73 | return typeof c === 'string' ? c : 74 | '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); 75 | }) + '"' : 76 | '"' + string + '"'; 77 | } 78 | 79 | 80 | function str(key, holder) { 81 | 82 | // Produce a string from holder[key]. 83 | 84 | var i, // The loop counter. 85 | k, // The member key. 86 | v, // The member value. 87 | length, 88 | mind = gap, 89 | partial, 90 | value = holder[key]; 91 | 92 | // If the value has a toJSON method, call it to obtain a replacement value. 93 | 94 | if (value && typeof value === 'object' && 95 | typeof value.toJSON === 'function') { 96 | value = value.toJSON(key); 97 | } 98 | 99 | // If we were called with a replacer function, then call the replacer to 100 | // obtain a replacement value. 101 | 102 | if (typeof rep === 'function') { 103 | value = rep.call(holder, key, value); 104 | } 105 | 106 | // What happens next depends on the value's type. 107 | 108 | switch (typeof value) { 109 | case 'string': 110 | return quote(value); 111 | 112 | case 'number': 113 | 114 | // JSON numbers must be finite. Encode non-finite numbers as null. 115 | 116 | return isFinite(value) ? String(value) : 'null'; 117 | 118 | case 'boolean': 119 | case 'null': 120 | 121 | // If the value is a boolean or null, convert it to a string. Note: 122 | // typeof null does not produce 'null'. The case is included here in 123 | // the remote chance that this gets fixed someday. 124 | 125 | return String(value); 126 | 127 | // If the type is 'object', we might be dealing with an object or an array or 128 | // null. 129 | 130 | case 'object': 131 | 132 | // Due to a specification blunder in ECMAScript, typeof null is 'object', 133 | // so watch out for that case. 134 | 135 | if (!value) { 136 | return 'null'; 137 | } 138 | 139 | // Make an array to hold the partial results of stringifying this object value. 140 | 141 | gap += indent; 142 | partial = []; 143 | 144 | // Is the value an array? 145 | 146 | if (Object.prototype.toString.apply(value) === '[object Array]') { 147 | 148 | // The value is an array. Stringify every element. Use null as a placeholder 149 | // for non-JSON values. 150 | 151 | length = value.length; 152 | for (i = 0; i < length; i += 1) { 153 | partial[i] = str(i, value) || 'null'; 154 | } 155 | 156 | // Join all of the elements together, separated with commas, and wrap them in 157 | // brackets. 158 | 159 | v = partial.length === 0 ? '[]' : 160 | gap ? '[\n' + gap + 161 | partial.join(',\n' + gap) + '\n' + 162 | mind + ']' : 163 | '[' + partial.join(',') + ']'; 164 | gap = mind; 165 | return v; 166 | } 167 | 168 | // If the replacer is an array, use it to select the members to be stringified. 169 | 170 | if (rep && typeof rep === 'object') { 171 | length = rep.length; 172 | for (i = 0; i < length; i += 1) { 173 | k = rep[i]; 174 | if (typeof k === 'string') { 175 | v = str(k, value); 176 | if (v) { 177 | partial.push(quote(k) + (gap ? ': ' : ':') + v); 178 | } 179 | } 180 | } 181 | } else { 182 | 183 | // Otherwise, iterate through all of the keys in the object. 184 | 185 | for (k in value) { 186 | if (Object.hasOwnProperty.call(value, k)) { 187 | v = str(k, value); 188 | if (v) { 189 | partial.push(quote(k) + (gap ? ': ' : ':') + v); 190 | } 191 | } 192 | } 193 | } 194 | 195 | // Join all of the member texts together, separated with commas, 196 | // and wrap them in braces. 197 | 198 | v = partial.length === 0 ? '{}' : 199 | gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + 200 | mind + '}' : '{' + partial.join(',') + '}'; 201 | gap = mind; 202 | return v; 203 | } 204 | } 205 | 206 | // If the JSON object does not yet have a stringify method, give it one. 207 | 208 | if (typeof JSON.stringify !== 'function') { 209 | JSON.stringify = function (value, replacer, space) { 210 | 211 | // The stringify method takes a value and an optional replacer, and an optional 212 | // space parameter, and returns a JSON text. The replacer can be a function 213 | // that can replace values, or an array of strings that will select the keys. 214 | // A default replacer method can be provided. Use of the space parameter can 215 | // produce text that is more easily readable. 216 | 217 | var i; 218 | gap = ''; 219 | indent = ''; 220 | 221 | // If the space parameter is a number, make an indent string containing that 222 | // many spaces. 223 | 224 | if (typeof space === 'number') { 225 | for (i = 0; i < space; i += 1) { 226 | indent += ' '; 227 | } 228 | 229 | // If the space parameter is a string, it will be used as the indent string. 230 | 231 | } else if (typeof space === 'string') { 232 | indent = space; 233 | } 234 | 235 | // If there is a replacer, it must be a function or an array. 236 | // Otherwise, throw an error. 237 | 238 | rep = replacer; 239 | if (replacer && typeof replacer !== 'function' && 240 | (typeof replacer !== 'object' || 241 | typeof replacer.length !== 'number')) { 242 | throw new Error('JSON.stringify'); 243 | } 244 | 245 | // Make a fake root object containing our value under the key of ''. 246 | // Return the result of stringifying the value. 247 | 248 | return str('', {'': value}); 249 | }; 250 | } 251 | 252 | 253 | // If the JSON object does not yet have a parse method, give it one. 254 | 255 | if (typeof JSON.parse !== 'function') { 256 | JSON.parse = function (text, reviver) { 257 | 258 | // The parse method takes a text and an optional reviver function, and returns 259 | // a JavaScript value if the text is a valid JSON text. 260 | 261 | var j; 262 | 263 | function walk(holder, key) { 264 | 265 | // The walk method is used to recursively walk the resulting structure so 266 | // that modifications can be made. 267 | 268 | var k, v, value = holder[key]; 269 | if (value && typeof value === 'object') { 270 | for (k in value) { 271 | if (Object.hasOwnProperty.call(value, k)) { 272 | v = walk(value, k); 273 | if (v !== undefined) { 274 | value[k] = v; 275 | } else { 276 | delete value[k]; 277 | } 278 | } 279 | } 280 | } 281 | return reviver.call(holder, key, value); 282 | } 283 | 284 | 285 | // Parsing happens in four stages. In the first stage, we replace certain 286 | // Unicode characters with escape sequences. JavaScript handles many characters 287 | // incorrectly, either silently deleting them, or treating them as line endings. 288 | 289 | cx.lastIndex = 0; 290 | if (cx.test(text)) { 291 | text = text.replace(cx, function (a) { 292 | return '\\u' + 293 | ('0000' + a.charCodeAt(0).toString(16)).slice(-4); 294 | }); 295 | } 296 | 297 | // In the second stage, we run the text against regular expressions that look 298 | // for non-JSON patterns. We are especially concerned with '()' and 'new' 299 | // because they can cause invocation, and '=' because it can cause mutation. 300 | // But just to be safe, we want to reject all unexpected forms. 301 | 302 | // We split the second stage into 4 regexp operations in order to work around 303 | // crippling inefficiencies in IE's and Safari's regexp engines. First we 304 | // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we 305 | // replace all simple value tokens with ']' characters. Third, we delete all 306 | // open brackets that follow a colon or comma or that begin the text. Finally, 307 | // we look to see that the remaining characters are only whitespace or ']' or 308 | // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. 309 | 310 | if (/^[\],:{}\s]*$/. 311 | test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@'). 312 | replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). 313 | replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { 314 | 315 | // In the third stage we use the eval function to compile the text into a 316 | // JavaScript structure. The '{' operator is subject to a syntactic ambiguity 317 | // in JavaScript: it can begin a block or an object literal. We wrap the text 318 | // in parens to eliminate the ambiguity. 319 | 320 | j = eval('(' + text + ')'); 321 | 322 | // In the optional fourth stage, we recursively walk the new structure, passing 323 | // each name/value pair to a reviver function for possible transformation. 324 | 325 | return typeof reviver === 'function' ? 326 | walk({'': j}, '') : j; 327 | } 328 | 329 | // If the text is not JSON parseable, then a SyntaxError is thrown. 330 | 331 | throw new SyntaxError('JSON.parse'); 332 | }; 333 | } 334 | }()); 335 | -------------------------------------------------------------------------------- /wiki.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 什么是Json - Json.cn 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 44 |
45 |
46 |
47 | 48 | 49 | 79 |
80 |
81 |
82 |
83 | JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。它使得人们很容易的进行阅读和编写。同时也方便了机器进行解析和生成。它是基于 JavaScript Programming Language , Standard ECMA-262 3rd Edition - December 1999 的一个子集。 JSON采用完全独立于程序语言的文本格式,但是也使用了类C语言的习惯(包括C, C++, C#, Java, JavaScript, Perl, Python等)。这些特性使JSON成为理想的数据交换语言。 84 |
85 |

JSON基于两种结构:

86 | 87 |

88 | 89 |

JSON[1] 结构有两种结构[2]
90 |
json简单说就是javascript中的对象和数组,所以这两种结构就是对象和数组两种结构,通过这两种结构可以表示各种复杂的结构
91 |
    92 |
  • 1、对象:对象在js中表示为“{}”括起来的内容,数据结构为 {key:value,key:value,...}的键值对的结构,在面向对象的语言中,key为对象的属性,value为对应的属性值,所以很容易理解,取值方法为 对象.key 获取属性值,这个属性值的类型可以是 数字、字符串、数组、对象几种。
  • 93 |
  • 2、数组:数组在js中是中括号“[]”括起来的内容,数据结构为 ["java","javascript","vb",...],取值方式和所有语言中一样,使用索引获取,字段值的类型可以是 数字、字符串、数组、对象几种。
  • 94 | 95 |
96 |

97 |

 98 | {
 99 |     "animals": {
100 |         "dog": [
101 |             {
102 |                 "name": "Rufus",
103 |                 "age":15
104 |             },
105 |             {
106 |                 "name": "Marty",
107 |                 "age": null
108 |             }
109 |         ]
110 | }
111 |

经过对象、数组2种结构就可以组合成复杂的数据结构了。

112 |

113 | “名称/值”对的集合(A collection of name/value pairs)。不同的编程语言中,它被理解为对象(object),纪录(record),结构(struct),字典(dictionary),哈希表(hash table),有键列表(keyed list),或者关联数组 (associative array)。 114 | 值的有序列表(An ordered list of values)。在大部分语言中,它被实现为数组(array),矢量(vector),列表(list),序列(sequence)。 115 |

116 |
117 | 这些都是常见的数据结构。目前,绝大部分编程语言都以某种形式支持它们。这使得在各种编程语言之间交换同样格式的数据成为可能。 118 |
119 |

120 | JSON具有以下这些形式: 121 |

122 |
123 | 对象(object 是一个无序的“‘名称/值’对”集合。一个对象以“{”(左括号)开始,“}”(右括号)结束。每个“名称”后跟一个“:”(冒号);“‘名称/值’ 对”之间使用“,”(逗号)分隔。 124 |
125 | 126 |
127 | 数组(array 是值(value)的有序集合。一个数组以“[”(左中括号)开始,“]”(右中括号)结束。值之间使用“,”(逗号)分隔。 128 |
129 | 130 |
131 | 值(value 可以是双引号括起来的字符串(string)、数值(number)、truefalsenull、对象(object)或者数组(array)。这些结构可以嵌套。 132 |
133 | 134 |
135 | 字符串(string 是由双引号包围的任意数量Unicode字符的集合,使用反斜线转义。一个字符(character)即一个单独的字符串(character string)。 136 |
137 |
138 | JSON的字符串(string)与C或者Java的字符串非常相似。 139 |
140 | 141 |
142 | 数值(number 也与C或者Java的数值非常相似。只是JSON的数值没有使用八进制与十六进制格式。 143 |
144 | 145 |
146 | 同时,可以在任意标记之间添加空白。 147 |
148 |

访问数据

149 | 150 |

尽管看起来不明显,但是上面的长字符串实际上只是一个数组;将这个数组放进 JavaScript变量之后,就可以很轻松地访问它。实际上,只需用点号表示法来表示数组元素。所以,要想访问 programmers 列表的第一个条目的姓氏,只需在 JavaScript 中使用下面这样的代码: 151 |

152 | 153 | people.programmers[0].lastName;
154 | 155 | 注意,数组索引是从零开始的。所以,这行代码首先访问 people变量中的数据;然后移动到称为 programmers的条目,再移动到第一个记录([0]);最后,访问 lastName键的值。结果是字符串值 “McLaughlin”。 156 | 下面是使用同一变量的几个示例。 157 |

158 | 159 | people.authors[1].genre//Valueis"fantasy"
160 | people.musicians[3].lastName//Undefined.Thisreferstothefourthentry,andthereisn'tone
161 | people.programmers[2].firstName//Valueis"Elliotte"
162 |
163 |

164 |

利用这样的语法,可以处理任何 JSON 格式的数据,而不需要使用任何额外的 JavaScript 工具包或 API。

165 |

和XML的比较

166 | 167 |
可读性
168 | JSON和XML的可读性可谓不相上下,一边是简易的语法,一边是规范的标签形式,很难分出胜负。 169 |
可扩展性
170 | XML天生有很好的扩展性,JSON当然也有,没有什么是XML可以扩展而JSON却不能扩展的。不过JSON在Javascript主场作战,可以存储Javascript复合对象,有着xml不可比拟的优势。 171 |
编码难度
172 | XML有丰富的编码工具,比如Dom4j、JDom等,JSON也有提供的工具。无工具的情况下,相信熟练的开发人员一样能很快的写出想要的xml文档和JSON字符串,不过,xml文档要多很多结构上的字符。 173 |
解码难度
174 |
    XML的解析方式有两种: 175 |
  • 一是通过文档模型解析,也就是通过父标签索引出一组标记。例如:xmlData.getElementsByTagName("tagName"),但是这样是要在预先知道文档结构的情况下使用,无法进行通用的封装。 176 |
  • 177 |
  • 另外一种方法是遍历节点(document 以及 childNodes)。这个可以通过递归来实现,不过解析出来的数据仍旧是形式各异,往往也不能满足预先的要求。 178 |
  • 179 |
180 |

凡是这样可扩展的结构数据解析起来一定都很困难。

181 |

JSON也同样如此。如果预先知道JSON结构的情况下,使用JSON进行数据传递简直是太美妙了,可以写出很实用美观可读性强的代码。如果你是纯粹的前台开发人员,一定会非常喜欢JSON。但是如果你是一个应用开发人员,就不是那么喜欢了,毕竟xml才是真正的结构化标记语言,用于进行数据传递。 182 | 183 |

而如果不知道JSON的结构而去解析JSON的话,那简直是噩梦。费时费力不说,代码也会变得冗余拖沓,得到的结果也不尽人意。但是这样也不影响众多前台开发人员选择JSON。因为json.js中的toJSONString()就可以看到JSON的字符串结构。当然不是使用这个字符串,这样仍旧是噩梦。常用JSON的人看到这个字符串之后,就对JSON的结构很明了了,就更容易的操作JSON。 184 |

以上是在Javascript中仅对于数据传递的xml与JSON的解析。在Javascript地盘内,JSON毕竟是主场作战,其优势当然要远远优越于xml。如果JSON中存储Javascript复合对象,而且不知道其结构的话,我相信很多程序员也一样是哭着解析JSON的。 185 |

除了上述之外,JSON和XML还有另外一个很大的区别在于有效数据率。JSON作为数据包格式传输的时候具有更高的效率,这是因为JSON不像XML那样需要有严格的闭合标签,这就让有效数据量与总数据包比大大提升,从而减少同等数据流量的情况下,网络的传输压力。 186 |

187 |
188 |
189 |
190 |

JSON 标准:

191 |

RFC4627:

192 |
The application/json Media Type for JavaScript Object Notation (JSON)
193 |

发布日期:

194 |
2006年7月
195 |

最后修订:

196 |
2010年7月
197 |

作者信息:

198 |
Douglas Crockford
199 |
JSON.org
200 |
EMail: douglas@crockford.com
201 |
202 |
203 |
204 |
205 | 206 |
最新版`RFC4627`下载
207 |
208 | 209 | RFC4627 TXT版 210 | 211 | RFC4627 PDF版 212 |
213 |
214 | 215 |
216 |
217 |
218 | 219 |
220 |
221 | 222 |
223 |
224 |
225 | object 226 |
{}
227 |
{ members }
228 |
229 |
230 | members 231 |
pair
232 |
pair, members
233 |
234 |
235 | pair 236 |
string : value
237 |
238 |
239 | array 240 |
[]
241 |
[ elements ]
242 |
243 |
244 | elements 245 |
value
246 |
value , elements
247 |
248 |
249 | value 250 |
string
251 |
number
252 |
object
253 |
array
254 |
true
255 |
false
256 |
null
257 |
258 | 259 | 260 |
261 | 262 | 263 |
264 | String 265 |
""
266 |
" chars "
267 |
268 |
269 | chars 270 |
char
271 |
char chars
272 |
273 |
274 | char 275 |
any-Unicode-character-
except-"-or-\-or-
control-character
276 |
\"
277 |
\\
278 |
\/
279 |
\b
280 |
\f
281 |
\n
282 |
\r
283 |
\t
284 |
\u four-hex-digits
285 |
286 |
287 | number 288 |
int
289 |
int frac
290 |
int exp
291 |
int frac exp
292 |
293 |
294 | int 295 |
digit
296 |
digit1-9 digits
297 |
- digit
298 |
- digit1-9 digits
299 |
300 |
301 | frac 302 |
. digits
303 |
304 |
305 | exp 306 |
e digits
307 |
308 |
309 | digits 310 |
digit
311 |
digit digits
312 |
313 |
314 | e 315 |
e
316 |
e+
317 |
e-
318 |
E
319 |
E+
320 |
E-
321 |
322 |
323 |
324 |
325 |
326 |
327 | 328 | 329 | -------------------------------------------------------------------------------- /json/wiki.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 什么是Json - Json.cn 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 44 |
45 |
46 |
47 | 48 | 49 | 79 |
80 |
81 |
82 |
83 | JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。它使得人们很容易的进行阅读和编写。同时也方便了机器进行解析和生成。它是基于 JavaScript Programming Language , Standard ECMA-262 3rd Edition - December 1999 的一个子集。 JSON采用完全独立于程序语言的文本格式,但是也使用了类C语言的习惯(包括C, C++, C#, Java, JavaScript, Perl, Python等)。这些特性使JSON成为理想的数据交换语言。 84 |
85 |

JSON基于两种结构:

86 | 87 |

88 | 89 |

JSON[1] 结构有两种结构[2]
90 |
json简单说就是javascript中的对象和数组,所以这两种结构就是对象和数组两种结构,通过这两种结构可以表示各种复杂的结构
91 |
    92 |
  • 1、对象:对象在js中表示为“{}”括起来的内容,数据结构为 {key:value,key:value,...}的键值对的结构,在面向对象的语言中,key为对象的属性,value为对应的属性值,所以很容易理解,取值方法为 对象.key 获取属性值,这个属性值的类型可以是 数字、字符串、数组、对象几种。
  • 93 |
  • 2、数组:数组在js中是中括号“[]”括起来的内容,数据结构为 ["java","javascript","vb",...],取值方式和所有语言中一样,使用索引获取,字段值的类型可以是 数字、字符串、数组、对象几种。
  • 94 | 95 |
96 |

97 |

 98 | {
 99 |     "animals": {
100 |         "dog": [
101 |             {
102 |                 "name": "Rufus",
103 |                 "age":15
104 |             },
105 |             {
106 |                 "name": "Marty",
107 |                 "age": null
108 |             }
109 |         ]
110 | }
111 |

经过对象、数组2种结构就可以组合成复杂的数据结构了。

112 |

113 | “名称/值”对的集合(A collection of name/value pairs)。不同的编程语言中,它被理解为对象(object),纪录(record),结构(struct),字典(dictionary),哈希表(hash table),有键列表(keyed list),或者关联数组 (associative array)。 114 | 值的有序列表(An ordered list of values)。在大部分语言中,它被实现为数组(array),矢量(vector),列表(list),序列(sequence)。 115 |

116 |
117 | 这些都是常见的数据结构。目前,绝大部分编程语言都以某种形式支持它们。这使得在各种编程语言之间交换同样格式的数据成为可能。 118 |
119 |

120 | JSON具有以下这些形式: 121 |

122 |
123 | 对象(object 是一个无序的“‘名称/值’对”集合。一个对象以“{”(左括号)开始,“}”(右括号)结束。每个“名称”后跟一个“:”(冒号);“‘名称/值’ 对”之间使用“,”(逗号)分隔。 124 |
125 | 126 |
127 | 数组(array 是值(value)的有序集合。一个数组以“[”(左中括号)开始,“]”(右中括号)结束。值之间使用“,”(逗号)分隔。 128 |
129 | 130 |
131 | 值(value 可以是双引号括起来的字符串(string)、数值(number)、truefalsenull、对象(object)或者数组(array)。这些结构可以嵌套。 132 |
133 | 134 |
135 | 字符串(string 是由双引号包围的任意数量Unicode字符的集合,使用反斜线转义。一个字符(character)即一个单独的字符串(character string)。 136 |
137 |
138 | JSON的字符串(string)与C或者Java的字符串非常相似。 139 |
140 | 141 |
142 | 数值(number 也与C或者Java的数值非常相似。只是JSON的数值没有使用八进制与十六进制格式。 143 |
144 | 145 |
146 | 同时,可以在任意标记之间添加空白。 147 |
148 |

访问数据

149 | 150 |

尽管看起来不明显,但是上面的长字符串实际上只是一个数组;将这个数组放进 JavaScript变量之后,就可以很轻松地访问它。实际上,只需用点号表示法来表示数组元素。所以,要想访问 programmers 列表的第一个条目的姓氏,只需在 JavaScript 中使用下面这样的代码: 151 |

152 | 153 | people.programmers[0].lastName;
154 | 155 | 注意,数组索引是从零开始的。所以,这行代码首先访问 people变量中的数据;然后移动到称为 programmers的条目,再移动到第一个记录([0]);最后,访问 lastName键的值。结果是字符串值 “McLaughlin”。 156 | 下面是使用同一变量的几个示例。 157 |

158 | 159 | people.authors[1].genre//Valueis"fantasy"
160 | people.musicians[3].lastName//Undefined.Thisreferstothefourthentry,andthereisn'tone
161 | people.programmers[2].firstName//Valueis"Elliotte"
162 |
163 |

164 |

利用这样的语法,可以处理任何 JSON 格式的数据,而不需要使用任何额外的 JavaScript 工具包或 API。

165 |

和XML的比较

166 | 167 |
可读性
168 | JSON和XML的可读性可谓不相上下,一边是简易的语法,一边是规范的标签形式,很难分出胜负。 169 |
可扩展性
170 | XML天生有很好的扩展性,JSON当然也有,没有什么是XML可以扩展而JSON却不能扩展的。不过JSON在Javascript主场作战,可以存储Javascript复合对象,有着xml不可比拟的优势。 171 |
编码难度
172 | XML有丰富的编码工具,比如Dom4j、JDom等,JSON也有提供的工具。无工具的情况下,相信熟练的开发人员一样能很快的写出想要的xml文档和JSON字符串,不过,xml文档要多很多结构上的字符。 173 |
解码难度
174 |
    XML的解析方式有两种: 175 |
  • 一是通过文档模型解析,也就是通过父标签索引出一组标记。例如:xmlData.getElementsByTagName("tagName"),但是这样是要在预先知道文档结构的情况下使用,无法进行通用的封装。 176 |
  • 177 |
  • 另外一种方法是遍历节点(document 以及 childNodes)。这个可以通过递归来实现,不过解析出来的数据仍旧是形式各异,往往也不能满足预先的要求。 178 |
  • 179 |
180 |

凡是这样可扩展的结构数据解析起来一定都很困难。

181 |

JSON也同样如此。如果预先知道JSON结构的情况下,使用JSON进行数据传递简直是太美妙了,可以写出很实用美观可读性强的代码。如果你是纯粹的前台开发人员,一定会非常喜欢JSON。但是如果你是一个应用开发人员,就不是那么喜欢了,毕竟xml才是真正的结构化标记语言,用于进行数据传递。 182 | 183 |

而如果不知道JSON的结构而去解析JSON的话,那简直是噩梦。费时费力不说,代码也会变得冗余拖沓,得到的结果也不尽人意。但是这样也不影响众多前台开发人员选择JSON。因为json.js中的toJSONString()就可以看到JSON的字符串结构。当然不是使用这个字符串,这样仍旧是噩梦。常用JSON的人看到这个字符串之后,就对JSON的结构很明了了,就更容易的操作JSON。 184 |

以上是在Javascript中仅对于数据传递的xml与JSON的解析。在Javascript地盘内,JSON毕竟是主场作战,其优势当然要远远优越于xml。如果JSON中存储Javascript复合对象,而且不知道其结构的话,我相信很多程序员也一样是哭着解析JSON的。 185 |

除了上述之外,JSON和XML还有另外一个很大的区别在于有效数据率。JSON作为数据包格式传输的时候具有更高的效率,这是因为JSON不像XML那样需要有严格的闭合标签,这就让有效数据量与总数据包比大大提升,从而减少同等数据流量的情况下,网络的传输压力。 186 |

187 |
188 |
189 |
190 |

JSON 标准:

191 |

RFC4627:

192 |
The application/json Media Type for JavaScript Object Notation (JSON)
193 |

发布日期:

194 |
2006年7月
195 |

最后修订:

196 |
2010年7月
197 |

作者信息:

198 |
Douglas Crockford
199 |
JSON.org
200 |
EMail: douglas@crockford.com
201 |
202 |
203 |
204 |
205 | 206 |
最新版`RFC4627`下载
207 |
208 | 209 | RFC4627 TXT版 210 | 211 | RFC4627 PDF版 212 |
213 |
214 | 215 |
216 |
217 |
218 | 219 |
220 |
221 | 222 |
223 |
224 |
225 | object 226 |
{}
227 |
{ members }
228 |
229 |
230 | members 231 |
pair
232 |
pair, members
233 |
234 |
235 | pair 236 |
string : value
237 |
238 |
239 | array 240 |
[]
241 |
[ elements ]
242 |
243 |
244 | elements 245 |
value
246 |
value , elements
247 |
248 |
249 | value 250 |
string
251 |
number
252 |
object
253 |
array
254 |
true
255 |
false
256 |
null
257 |
258 | 259 | 260 |
261 | 262 | 263 |
264 | String 265 |
""
266 |
" chars "
267 |
268 |
269 | chars 270 |
char
271 |
char chars
272 |
273 |
274 | char 275 |
any-Unicode-character-
except-"-or-\-or-
control-character
276 |
\"
277 |
\\
278 |
\/
279 |
\b
280 |
\f
281 |
\n
282 |
\r
283 |
\t
284 |
\u four-hex-digits
285 |
286 |
287 | number 288 |
int
289 |
int frac
290 |
int exp
291 |
int frac exp
292 |
293 |
294 | int 295 |
digit
296 |
digit1-9 digits
297 |
- digit
298 |
- digit1-9 digits
299 |
300 |
301 | frac 302 |
. digits
303 |
304 |
305 | exp 306 |
e digits
307 |
308 |
309 | digits 310 |
digit
311 |
digit digits
312 |
313 |
314 | e 315 |
e
316 |
e+
317 |
e-
318 |
E
319 |
E+
320 |
E-
321 |
322 |
323 |
324 |
325 |
326 |
327 | 328 | 329 | -------------------------------------------------------------------------------- /css/font-awesome.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot@v=4.2.0');src:url('../fonts/fontawesome-webfont.eot@') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff@v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf@v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg@v=4.2.0') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} -------------------------------------------------------------------------------- /js/jsonlint.js: -------------------------------------------------------------------------------- 1 | var jsonlint = function() { 2 | var a = !0, 3 | b = !1, 4 | c = {}, 5 | d = function() { 6 | var a = { 7 | trace: function() {}, 8 | yy: {}, 9 | symbols_: { 10 | error: 2, 11 | JSONString: 3, 12 | STRING: 4, 13 | JSONNumber: 5, 14 | NUMBER: 6, 15 | JSONNullLiteral: 7, 16 | NULL: 8, 17 | JSONBooleanLiteral: 9, 18 | TRUE: 10, 19 | FALSE: 11, 20 | JSONText: 12, 21 | JSONValue: 13, 22 | EOF: 14, 23 | JSONObject: 15, 24 | JSONArray: 16, 25 | "{": 17, 26 | "}": 18, 27 | JSONMemberList: 19, 28 | JSONMember: 20, 29 | ":": 21, 30 | ",": 22, 31 | "[": 23, 32 | "]": 24, 33 | JSONElementList: 25, 34 | $accept: 0, 35 | $end: 1 36 | }, 37 | terminals_: { 38 | 2: "error", 39 | 4: "STRING", 40 | 6: "NUMBER", 41 | 8: "NULL", 42 | 10: "TRUE", 43 | 11: "FALSE", 44 | 14: "EOF", 45 | 17: "{", 46 | 18: "}", 47 | 21: ":", 48 | 22: ",", 49 | 23: "[", 50 | 24: "]" 51 | }, 52 | productions_: [0, [3, 1], 53 | [5, 1], 54 | [7, 1], 55 | [9, 1], 56 | [9, 1], 57 | [12, 2], 58 | [13, 1], 59 | [13, 1], 60 | [13, 1], 61 | [13, 1], 62 | [13, 1], 63 | [13, 1], 64 | [15, 2], 65 | [15, 3], 66 | [20, 3], 67 | [19, 1], 68 | [19, 3], 69 | [16, 2], 70 | [16, 3], 71 | [25, 1], 72 | [25, 3] 73 | ], 74 | performAction: function(b, c, d, e, f, g, h) { 75 | var i = g.length - 1; 76 | switch (f) { 77 | case 1: 78 | this.$ = b.replace(/\\(\\|")/g, "$1").replace(/\\n/g, "\n").replace(/\\r/g, "\r").replace(/\\t/g, " ").replace(/\\v/g, " ").replace(/\\f/g, "\f").replace(/\\b/g, "\b"); 79 | break; 80 | case 2: 81 | this.$ = Number(b); 82 | break; 83 | case 3: 84 | this.$ = null; 85 | break; 86 | case 4: 87 | this.$ = !0; 88 | break; 89 | case 5: 90 | this.$ = !1; 91 | break; 92 | case 6: 93 | return this.$ = g[i - 1]; 94 | case 13: 95 | this.$ = {}; 96 | break; 97 | case 14: 98 | this.$ = g[i - 1]; 99 | break; 100 | case 15: 101 | this.$ = [g[i - 2], g[i]]; 102 | break; 103 | case 16: 104 | this.$ = {}, this.$[g[i][0]] = g[i][1]; 105 | break; 106 | case 17: 107 | this.$ = g[i - 2], g[i - 2][g[i][0]] = g[i][1]; 108 | break; 109 | case 18: 110 | this.$ = []; 111 | break; 112 | case 19: 113 | this.$ = g[i - 1]; 114 | break; 115 | case 20: 116 | this.$ = [g[i]]; 117 | break; 118 | case 21: 119 | this.$ = g[i - 2], g[i - 2].push(g[i]) 120 | } 121 | }, 122 | table: [{ 123 | 3: 5, 124 | 4: [1, 12], 125 | 5: 6, 126 | 6: [1, 13], 127 | 7: 3, 128 | 8: [1, 9], 129 | 9: 4, 130 | 10: [1, 10], 131 | 11: [1, 11], 132 | 12: 1, 133 | 13: 2, 134 | 15: 7, 135 | 16: 8, 136 | 17: [1, 14], 137 | 23: [1, 15] 138 | }, { 139 | 1: [3] 140 | }, { 141 | 14: [1, 16] 142 | }, { 143 | 14: [2, 7], 144 | 18: [2, 7], 145 | 22: [2, 7], 146 | 24: [2, 7] 147 | }, { 148 | 14: [2, 8], 149 | 18: [2, 8], 150 | 22: [2, 8], 151 | 24: [2, 8] 152 | }, { 153 | 14: [2, 9], 154 | 18: [2, 9], 155 | 22: [2, 9], 156 | 24: [2, 9] 157 | }, { 158 | 14: [2, 10], 159 | 18: [2, 10], 160 | 22: [2, 10], 161 | 24: [2, 10] 162 | }, { 163 | 14: [2, 11], 164 | 18: [2, 11], 165 | 22: [2, 11], 166 | 24: [2, 11] 167 | }, { 168 | 14: [2, 12], 169 | 18: [2, 12], 170 | 22: [2, 12], 171 | 24: [2, 12] 172 | }, { 173 | 14: [2, 3], 174 | 18: [2, 3], 175 | 22: [2, 3], 176 | 24: [2, 3] 177 | }, { 178 | 14: [2, 4], 179 | 18: [2, 4], 180 | 22: [2, 4], 181 | 24: [2, 4] 182 | }, { 183 | 14: [2, 5], 184 | 18: [2, 5], 185 | 22: [2, 5], 186 | 24: [2, 5] 187 | }, { 188 | 14: [2, 1], 189 | 18: [2, 1], 190 | 21: [2, 1], 191 | 22: [2, 1], 192 | 24: [2, 1] 193 | }, { 194 | 14: [2, 2], 195 | 18: [2, 2], 196 | 22: [2, 2], 197 | 24: [2, 2] 198 | }, { 199 | 3: 20, 200 | 4: [1, 12], 201 | 18: [1, 17], 202 | 19: 18, 203 | 20: 19 204 | }, { 205 | 3: 5, 206 | 4: [1, 12], 207 | 5: 6, 208 | 6: [1, 13], 209 | 7: 3, 210 | 8: [1, 9], 211 | 9: 4, 212 | 10: [1, 10], 213 | 11: [1, 11], 214 | 13: 23, 215 | 15: 7, 216 | 16: 8, 217 | 17: [1, 14], 218 | 23: [1, 15], 219 | 24: [1, 21], 220 | 25: 22 221 | }, { 222 | 1: [2, 6] 223 | }, { 224 | 14: [2, 13], 225 | 18: [2, 13], 226 | 22: [2, 13], 227 | 24: [2, 13] 228 | }, { 229 | 18: [1, 24], 230 | 22: [1, 25] 231 | }, { 232 | 18: [2, 16], 233 | 22: [2, 16] 234 | }, { 235 | 21: [1, 26] 236 | }, { 237 | 14: [2, 18], 238 | 18: [2, 18], 239 | 22: [2, 18], 240 | 24: [2, 18] 241 | }, { 242 | 22: [1, 28], 243 | 24: [1, 27] 244 | }, { 245 | 22: [2, 20], 246 | 24: [2, 20] 247 | }, { 248 | 14: [2, 14], 249 | 18: [2, 14], 250 | 22: [2, 14], 251 | 24: [2, 14] 252 | }, { 253 | 3: 20, 254 | 4: [1, 12], 255 | 20: 29 256 | }, { 257 | 3: 5, 258 | 4: [1, 12], 259 | 5: 6, 260 | 6: [1, 13], 261 | 7: 3, 262 | 8: [1, 9], 263 | 9: 4, 264 | 10: [1, 10], 265 | 11: [1, 11], 266 | 13: 30, 267 | 15: 7, 268 | 16: 8, 269 | 17: [1, 14], 270 | 23: [1, 15] 271 | }, { 272 | 14: [2, 19], 273 | 18: [2, 19], 274 | 22: [2, 19], 275 | 24: [2, 19] 276 | }, { 277 | 3: 5, 278 | 4: [1, 12], 279 | 5: 6, 280 | 6: [1, 13], 281 | 7: 3, 282 | 8: [1, 9], 283 | 9: 4, 284 | 10: [1, 10], 285 | 11: [1, 11], 286 | 13: 31, 287 | 15: 7, 288 | 16: 8, 289 | 17: [1, 14], 290 | 23: [1, 15] 291 | }, { 292 | 18: [2, 17], 293 | 22: [2, 17] 294 | }, { 295 | 18: [2, 15], 296 | 22: [2, 15] 297 | }, { 298 | 22: [2, 21], 299 | 24: [2, 21] 300 | }], 301 | defaultActions: { 302 | 16: [2, 6] 303 | }, 304 | parseError: function(b, c) { 305 | throw new Error(b) 306 | }, 307 | parse: function(b) { 308 | function o(a) { 309 | d.length = d.length - 2 * a, e.length = e.length - a, f.length = f.length - a 310 | } 311 | function p() { 312 | var a; 313 | return a = c.lexer.lex() || 1, typeof a != "number" && (a = c.symbols_[a] || a), a 314 | } 315 | var c = this, 316 | d = [0], 317 | e = [null], 318 | f = [], 319 | g = this.table, 320 | h = "", 321 | i = 0, 322 | j = 0, 323 | k = 0, 324 | l = 2, 325 | m = 1; 326 | this.lexer.setInput(b), this.lexer.yy = this.yy, this.yy.lexer = this.lexer, typeof this.lexer.yylloc == "undefined" && (this.lexer.yylloc = {}); 327 | var n = this.lexer.yylloc; 328 | f.push(n), typeof this.yy.parseError == "function" && (this.parseError = this.yy.parseError); 329 | var q, r, s, t, u, v, w = {}, 330 | x, y, z, A; 331 | for (;;) { 332 | s = d[d.length - 1], this.defaultActions[s] ? t = this.defaultActions[s] : (q == null && (q = p()), t = g[s] && g[s][q]); 333 | if (typeof t == "undefined" || !t.length || !t[0]) { 334 | if (!k) { 335 | A = []; 336 | for (x in g[s]) this.terminals_[x] && x > 2 && A.push("'" + this.terminals_[x] + "'"); 337 | var B = ""; 338 | this.lexer.showPosition ? B = "在第"+ (i + 1)+"行发生解析错误 "+ ":
" + this.lexer.showPosition() + "
此处缺少" + A.join(", ") + "字符, 实际上确是一个 '" + this.terminals_[q] + "'" : B = "在第"+ (i + 1)+"行发生解析错误 " + ": 本应该是 " + (q == 1 ? "结尾输入" : "'" + (this.terminals_[q] || q) + "'"), this.parseError(B, { 339 | text: this.lexer.match, 340 | token: this.terminals_[q] || q, 341 | line: this.lexer.yylineno, 342 | loc: n, 343 | expected: A 344 | }) 345 | } 346 | if (k == 3) { 347 | if (q == m) throw new Error(B || "解析意外终止."); 348 | j = this.lexer.yyleng, h = this.lexer.yytext, i = this.lexer.yylineno, n = this.lexer.yylloc, q = p() 349 | } 350 | for (;;) { 351 | if (l.toString() in g[s]) break; 352 | if (s == 0) throw new Error(B || "解析意外终止."); 353 | o(1), s = d[d.length - 1] 354 | } 355 | r = q, q = l, s = d[d.length - 1], t = g[s] && g[s][l], k = 3 356 | } 357 | if (t[0] instanceof Array && t.length > 1) throw new Error("解析错误: multiple actions possible at state: " + s + ", token: " + q); 358 | switch (t[0]) { 359 | case 1: 360 | d.push(q), e.push(this.lexer.yytext), f.push(this.lexer.yylloc), d.push(t[1]), q = null, r ? (q = r, r = null) : (j = this.lexer.yyleng, h = this.lexer.yytext, i = this.lexer.yylineno, n = this.lexer.yylloc, k > 0 && k--); 361 | break; 362 | case 2: 363 | y = this.productions_[t[1]][1], w.$ = e[e.length - y], w._$ = { 364 | first_line: f[f.length - (y || 1)].first_line, 365 | last_line: f[f.length - 1].last_line, 366 | first_column: f[f.length - (y || 1)].first_column, 367 | last_column: f[f.length - 1].last_column 368 | }, v = this.performAction.call(w, h, j, i, this.yy, t[1], e, f); 369 | if (typeof v != "undefined") return v; 370 | y && (d = d.slice(0, -1 * y * 2), e = e.slice(0, -1 * y), f = f.slice(0, -1 * y)), d.push(this.productions_[t[1]][0]), e.push(w.$), f.push(w._$), z = g[d[d.length - 2]][d[d.length - 1]], d.push(z); 371 | break; 372 | case 3: 373 | return !0 374 | } 375 | } 376 | return !0 377 | } 378 | }, 379 | b = function() { 380 | var a = { 381 | EOF: 1, 382 | parseError: function(b, c) { 383 | if (!this.yy.parseError) throw new Error(b); 384 | this.yy.parseError(b, c) 385 | }, 386 | setInput: function(a) { 387 | return this._input = a, this._more = this._less = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { 388 | first_line: 1, 389 | first_column: 0, 390 | last_line: 1, 391 | last_column: 0 392 | }, this 393 | }, 394 | input: function() { 395 | var a = this._input[0]; 396 | this.yytext += a, this.yyleng++, this.match += a, this.matched += a; 397 | var b = a.match(/\n/); 398 | return b && this.yylineno++, this._input = this._input.slice(1), a 399 | }, 400 | unput: function(a) { 401 | return this._input = a + this._input, this 402 | }, 403 | more: function() { 404 | return this._more = !0, this 405 | }, 406 | less: function(a) { 407 | this._input = this.match.slice(a) + this._input 408 | }, 409 | pastInput: function() { 410 | var a = this.matched.substr(0, this.matched.length - this.match.length); 411 | return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, "") 412 | }, 413 | upcomingInput: function() { 414 | var a = this.match; 415 | return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, "") 416 | }, 417 | showPosition: function() { 418 | var a = this.pastInput(), 419 | b = (new Array(a.length + 1 - 5)).join(" "); 420 | return ""+ a + this.upcomingInput() + "
" + b + '' 421 | }, 422 | next: function() { 423 | if (this.done) return this.EOF; 424 | this._input || (this.done = !0); 425 | var a, b, c, d, e, f; 426 | this._more || (this.yytext = "", this.match = ""); 427 | var g = this._currentRules(); 428 | for (var h = 0; h < g.length; h++) { 429 | c = this._input.match(this.rules[g[h]]); 430 | if (c && (!b || c[0].length > b[0].length)) { 431 | b = c, d = h; 432 | if (!this.options.flex) break 433 | } 434 | } 435 | if (b) { 436 | f = b[0].match(/\n.*/g), f && (this.yylineno += f.length), this.yylloc = { 437 | first_line: this.yylloc.last_line, 438 | last_line: this.yylineno + 1, 439 | first_column: this.yylloc.last_column, 440 | last_column: f ? f[f.length - 1].length - 1 : this.yylloc.last_column + b[0].length 441 | }, this.yytext += b[0], this.match += b[0], this.yyleng = this.yytext.length, this._more = !1, this._input = this._input.slice(b[0].length), this.matched += b[0], a = this.performAction.call(this, this.yy, this, g[d], this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1); 442 | if (a) return a; 443 | return 444 | } 445 | if (this._input === "") return this.EOF; 446 | this.parseError("词汇错误发生在第" + (this.yylineno + 1) + "行. 不能识别的字符.
" + this.showPosition(), { 447 | text: "", 448 | token: null, 449 | line: this.yylineno 450 | }) 451 | }, 452 | lex: function() { 453 | var b = this.next(); 454 | return typeof b != "undefined" ? b : this.lex() 455 | }, 456 | begin: function(b) { 457 | this.conditionStack.push(b) 458 | }, 459 | popState: function() { 460 | return this.conditionStack.pop() 461 | }, 462 | _currentRules: function() { 463 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules 464 | }, 465 | topState: function() { 466 | return this.conditionStack[this.conditionStack.length - 2] 467 | }, 468 | pushState: function(b) { 469 | this.begin(b) 470 | } 471 | }; 472 | return a.options = {}, a.performAction = function(b, c, d, e) { 473 | var f = e; 474 | switch (d) { 475 | case 0: 476 | break; 477 | case 1: 478 | return 6; 479 | case 2: 480 | return c.yytext = c.yytext.substr(1, c.yyleng - 2), 4; 481 | case 3: 482 | return 17; 483 | case 4: 484 | return 18; 485 | case 5: 486 | return 23; 487 | case 6: 488 | return 24; 489 | case 7: 490 | return 22; 491 | case 8: 492 | return 21; 493 | case 9: 494 | return 10; 495 | case 10: 496 | return 11; 497 | case 11: 498 | return 8; 499 | case 12: 500 | return 14; 501 | case 13: 502 | return "INVALID" 503 | } 504 | }, a.rules = [/^(?:\s+)/, /^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/, /^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/, /^(?:\{)/, /^(?:\})/, /^(?:\[)/, /^(?:\])/, /^(?:,)/, /^(?::)/, /^(?:true\b)/, /^(?:false\b)/, /^(?:null\b)/, /^(?:$)/, /^(?:.)/], a.conditions = { 505 | INITIAL: { 506 | rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], 507 | inclusive: !0 508 | } 509 | }, a 510 | }(); 511 | return a.lexer = b, a 512 | }(); 513 | return typeof a != "undefined" && typeof c != "undefined" && (c.parser = d, c.parse = function() { 514 | return d.parse.apply(d, arguments) 515 | }, c.main = function(d) { 516 | if (!d[1]) throw new Error("Usage: " + d[0] + " FILE"); 517 | if (typeof process != "undefined") var e = a("fs").readFileSync(a("path").join(process.cwd(), d[1]), "utf8"); 518 | else var f = a("file").path(a("file").cwd()), 519 | e = f.join(d[1]).read({ 520 | charset: "utf-8" 521 | }); 522 | return c.parser.parse(e) 523 | }, typeof b != "undefined" && a.main === b && c.main(typeof process != "undefined" ? process.argv.slice(1) : a("system").args)), c 524 | }(); -------------------------------------------------------------------------------- /js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.2.0 (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('