├── fixtures ├── 1 │ ├── code.txt │ └── ast.txt ├── 2 │ ├── code.txt │ └── ast.txt └── 3 │ ├── code.txt │ └── ast.txt ├── README.md ├── LICENSE ├── js ├── Travel.js ├── Examples.js ├── Output.js ├── script.js ├── utils.js └── vendor │ └── jquery.js ├── index.html └── styles.css /fixtures/2/code.txt: -------------------------------------------------------------------------------- 1 | {value} -------------------------------------------------------------------------------- /fixtures/1/code.txt: -------------------------------------------------------------------------------- 1 | function isNumber (thing) { 2 | return typeof thing === 'number'; 3 | }; -------------------------------------------------------------------------------- /fixtures/3/code.txt: -------------------------------------------------------------------------------- 1 | E ~ F { 2 | color: #000; 3 | background: #F00; 4 | } 5 | E > F { 6 | color: #000; 7 | } 8 | E + F { 9 | color: #000; 10 | background: #F00; 11 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AST chopper 2 | 3 | 4 | 5 | ## AST requirements 6 | 7 | Should be in the following format: 8 | 9 | ``` 10 | { 11 | "type": "File", 12 | "start": 0, 13 | "end": 50, 14 | "loc": { 15 | "start": { 16 | "line": 1, 17 | "column": 0 18 | }, 19 | "end": { 20 | "line": 4, 21 | "column": 1 22 | } 23 | }, 24 | "program": {...}, 25 | "comments": [...], 26 | "tokens": [...] 27 | } 28 | ``` 29 | 30 | *Notes* 31 | 32 | * The AST should contain `start`, `end` and `loc` properties in its nodes. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Krasimir Tsonev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /js/Travel.js: -------------------------------------------------------------------------------- 1 | function Travel (getNodesWithLoc, getRawSourceCode, createSelection) { 2 | var next = el('.js-travel-next'); 3 | var reset = el('.js-travel-reset'); 4 | var status = el('.js-travel-status'); 5 | var output = el('.js-output'); 6 | var pos = 0; 7 | var obj, nodes, currentNode; 8 | 9 | next.addEventListener('click', select); 10 | reset.addEventListener('click', resetTravel); 11 | 12 | function select (obj) { 13 | nodes = getNodesWithLoc(); 14 | obj = nodes[pos++]; 15 | if (!obj) obj = nodes[pos = 0]; 16 | createSelection(getRawSourceCode(), obj.node.loc.start, obj.node.loc.end); 17 | blink(el('#node' + obj.id)); 18 | if (typeof obj.node.type === 'string') { 19 | setStatus(obj.node.type); 20 | } 21 | }; 22 | 23 | function resetTravel () { 24 | pos = 0; 25 | select(); 26 | }; 27 | 28 | function setStatus (str) { 29 | status.innerHTML = str; 30 | } 31 | 32 | function blink(node) { 33 | if (currentNode) { 34 | currentNode.setAttribute('style', currentNode.defaultStyles); 35 | } 36 | if (!node) return; 37 | if (!node.defaultStyles) node.defaultStyles = node.getAttribute('style'); 38 | node.setAttribute('style', node.defaultStyles + ';background:#000'); 39 | if (node.scrollIntoView) node.scrollIntoView(); 40 | currentNode = node; 41 | } 42 | 43 | }; -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AST Chopper 6 | 7 | 8 | 9 | 29 |
30 |
31 | 32 | 33 |
34 |
35 |
36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /js/Examples.js: -------------------------------------------------------------------------------- 1 | function Examples () { 2 | var path = './fixtures/'; 3 | var select = el('.js-select-examples'); 4 | var query = queryString(); 5 | var fetch = function (url, el) { 6 | $.ajax({ 7 | url: url, 8 | context: document.body, 9 | dataType: 'text' 10 | }).done(function(res) { 11 | el.innerHTML = res; 12 | }) 13 | .fail(function(err) { 14 | console.log(err); 15 | }) 16 | }; 17 | var showExample = function (folderName) { 18 | fetch(path + folderName + '/code.txt', el('#js-source')) 19 | fetch(path + folderName + '/ast.txt', el('#js-ast')) 20 | }; 21 | 22 | select.addEventListener('change', function (e) { 23 | var example; 24 | 25 | if (e.target.value !== '') { 26 | showExample(e.target.value); 27 | } 28 | }); 29 | 30 | if (query.example) { 31 | showExample(query.example); 32 | } 33 | }; 34 | 35 | var queryString = function () { 36 | var query_string = {}; 37 | var query = window.location.search.substring(1); 38 | var vars = query.split("&"); 39 | for (var i=0;i'] 30 | )); 31 | }, 32 | link: function (label, func, classes, inline) { 33 | var funcName = '__func' + this.id(); 34 | 35 | window[funcName] = func; 36 | return '' + label + ''; 37 | }, 38 | linkMouseOver: function (label, funcOver, funcOut, classes, inline, tag) { 39 | var funcOverName = '__funcOver' + this.id(); 40 | var funcOutName = '__funcOut' + this.id(); 41 | 42 | tag = tag || ['']; 43 | window[funcOverName] = funcOver; 44 | window[funcOutName] = funcOut; 45 | 46 | return tag[0] + ' ' + 47 | 'onmouseover="javascript:' + funcOverName + '()" ' + 48 | 'onmouseout="javascript:' + funcOutName + '()" ' + 49 | 'class="' + classes + '" style="' + inline + '">' + label + tag[1]; 50 | }, 51 | addTitle: function (str) { 52 | return this.add(this.div(str, 'title')); 53 | }, 54 | publish: function () { 55 | outputEl.innerHTML = this._content; 56 | return this; 57 | }, 58 | div: function (str, classes, inline) { 59 | return '
' + str + '
'; 60 | }, 61 | error: function (str) { 62 | this 63 | .clear() 64 | .add(this.div(str, 'error')); 65 | }, 66 | id: function () { 67 | return ++this._id; 68 | }, 69 | }; 70 | }; -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | width: 100%; 4 | height: 100%; 5 | font-size: 16px; 6 | } 7 | *, *:before, *:after { 8 | box-sizing: inherit; 9 | } 10 | body { 11 | margin: 0; 12 | padding: 0; 13 | width: 100%; 14 | height: 100%; 15 | font-family: Arial, Verdana; 16 | color: #B0B0B0; 17 | background: #3F3F3F; 18 | } 19 | nav { 20 | height: 40px; 21 | border-bottom: solid 2px #999; 22 | overflow: hidden; 23 | } 24 | nav ul, nav li { 25 | margin: 0; 26 | padding: 0; 27 | } 28 | nav ul { 29 | list-style: none; 30 | } 31 | nav li { 32 | float: left; 33 | border-right: 1px solid #888; 34 | padding: 10px; 35 | } 36 | nav:after { 37 | clear: both; 38 | content: " "; 39 | display: table; 40 | } 41 | .container { 42 | width: 100%; 43 | height: calc(100% - 40px); 44 | position: relative; 45 | } 46 | .left, .right { 47 | width: 50%; 48 | height: 100%; 49 | } 50 | .left { 51 | float: left; 52 | border-right: 1px solid #999; 53 | } 54 | .right { 55 | float: right; 56 | padding: 1em; 57 | overflow-y: auto; 58 | overflow-x: hidden; 59 | } 60 | textarea { 61 | display: block; 62 | font-size: 0.8em; 63 | font-family: Arial; 64 | border: none; 65 | outline: none; 66 | resize: none; 67 | padding: 0.5em; 68 | color: #FFF; 69 | background: #3F3F3F; 70 | } 71 | textarea[name="source"] { 72 | width: 100%; 73 | height: 60%; 74 | border-bottom: 1px solid #999; 75 | } 76 | textarea[name="source"]::selection { 77 | background: #ffcc66; 78 | color: #000; 79 | border: solid 1px #000; 80 | } 81 | textarea[name="ast"] { 82 | width: 100%; 83 | height: 40% 84 | } 85 | .error { 86 | color: #f00; 87 | font-weight: bold; 88 | background: #FFF; 89 | } 90 | .title { 91 | border-bottom: 1px dotted #999; 92 | margin-bottom: 0.2em; 93 | padding-bottom: 0.2em; 94 | } 95 | .node { 96 | background: #3F3F3F; 97 | font-size: 0.8em; 98 | margin-bottom: 0.1em; 99 | padding-bottom: 0.1em; 100 | } 101 | .node:hover { 102 | color: #FFF; 103 | background: #000; 104 | border-right: 3px solid #999; 105 | transition: background 800ms ease-out; 106 | -webkit-transition: background 800ms ease-out; 107 | } 108 | .node pre { 109 | display: block; 110 | font-size: 0.8em; 111 | font-family: "Courier New"; 112 | font-weight: bold; 113 | border-left: 1px solid #ddd; 114 | margin: 0.1em 0 0 0.2em; 115 | color: #aaa; 116 | padding: 0.2em; 117 | } 118 | .node .node-attr { 119 | display: block; 120 | font-size: 0.8em; 121 | color: #999; 122 | } 123 | .source-cursor { 124 | position: absolute; 125 | top: 2px; 126 | left: 50%; 127 | margin-left: -72px; 128 | width: 50px; 129 | font-size: 0.8em; 130 | color: #bbb; 131 | text-align: right; 132 | } 133 | .soft { 134 | color: #bbb; 135 | } 136 | .props-link { 137 | color: #999; 138 | display: inline-block; 139 | margin-left: 0.2em; 140 | font-size: 0.9em; 141 | } 142 | .props-link:hover { 143 | color: #fff; 144 | } 145 | .selection-link { 146 | color: #FFF; 147 | text-decoration: none; 148 | } 149 | .positions-mismatch { 150 | display: inline-block; 151 | color: #FFF; 152 | background: #F00; 153 | padding: 0 0.4em; 154 | margin: 0 0.4em; 155 | } 156 | .travel { 157 | float: right; 158 | font-size: 0.8em; 159 | padding: 3px 10px 0 0; 160 | } 161 | .travel a { 162 | color: #fff; 163 | } 164 | .travel a:hover { 165 | color: #B0B0B0; 166 | } 167 | .travel-status { 168 | display: inline-block; 169 | font-size: 0.9em; 170 | color: #A0A0A0; 171 | text-align: right; 172 | width: 100%; 173 | } -------------------------------------------------------------------------------- /js/script.js: -------------------------------------------------------------------------------- 1 | window.onload = function () { 2 | 3 | var sourceEl = el('#js-source'); 4 | var astEl = el('#js-ast'); 5 | var outputEl = el('#js-output'); 6 | var sourceCursor = el('#js-source-cursor'); 7 | var source, ast; 8 | var output = Output(outputEl); 9 | var json; 10 | var nodesWithLoc = []; 11 | 12 | var readNode = function (node, nesting, prop) { 13 | if (!node) return; 14 | 15 | var type, sourceCode, padding, props, id, attrLinkPlaceholder; 16 | 17 | type = readType(node) || output.safe(prop); 18 | padding = 'padding-left:' + (nesting*10) + 'px;'; 19 | props = []; 20 | id = output.id(); 21 | attrLinkPlaceholder = ''; 22 | 23 | // check for arrays 24 | if (Array.isArray(node)) { 25 | output.addNode((node.length > 0 ? arrow() : '') + output.safe(type), padding); 26 | node.forEach(function (n) { 27 | readNode(n, nesting+1, prop); 28 | }); 29 | return; 30 | } 31 | 32 | if (node.loc) { 33 | nodesWithLoc.push({ node: node, id: id }); 34 | sourceCode = getSourceCode(node.loc, source); 35 | output.addNodeMouseOver( 36 | [ 37 | arrow(), 38 | output.safe(type), 39 | formatLocString(node, source), 40 | attrLinkPlaceholder, 41 | (sourceCode !== '' ? '
' + output.safe(sourceCode) + '
' : '') 42 | ].join(''), 43 | function () { 44 | createSelection(sourceEl, source, node.loc.start, node.loc.end); 45 | }, 46 | function () { 47 | clearSelection(sourceEl); 48 | }, 49 | 'selection-link', 50 | padding, 51 | id 52 | ); 53 | } else { 54 | if (hasChildren(node)) { 55 | output.addNode(arrow() + output.safe(type) + attrLinkPlaceholder, padding); 56 | } else { 57 | return; 58 | } 59 | } 60 | 61 | // deeper and deeper 62 | for(var prop in node) { 63 | if (prop !== 'loc' && typeof node[prop] === 'object' && node[prop] !== null) { 64 | readNode(node[prop], nesting+1, prop); 65 | } else { 66 | props.push({ name: prop, value: node[prop] }); 67 | } 68 | } 69 | 70 | placePropertiesLink(id, output, props); 71 | }; 72 | 73 | var parse = function () { 74 | var currentSource = sourceEl.value; 75 | var currentAST = astEl.value; 76 | 77 | if (!!currentSource && !!currentAST && (source !== sourceEl.value || ast !== astEl.value)) { 78 | source = sourceEl.value; 79 | ast = astEl.value; 80 | nodesWithLoc = []; 81 | try { 82 | json = JSON.parse(ast); 83 | } catch(err) { 84 | console.log(err); 85 | output.error('AST should be a valid JSON.'); 86 | return; 87 | } 88 | 89 | output.clear(); 90 | readNode(json, 0, ''); 91 | output.publish(); 92 | } 93 | }; 94 | 95 | var displaySourceCursorPosition = function () { 96 | var cursor = currentSelectionToLoc(sourceEl); 97 | 98 | sourceCursor.innerHTML = [ 99 | sourceEl.selectionStart, 100 | '
', 101 | cursor.line + ':' + cursor.column 102 | ].join(''); 103 | }; 104 | var getRawSourceCode = function () { 105 | return source; 106 | }; 107 | var getNodesWithLoc = function () { 108 | return nodesWithLoc; 109 | }; 110 | 111 | setInterval(parse, 500); 112 | setInterval(displaySourceCursorPosition, 10); 113 | 114 | Examples(); 115 | Travel( 116 | getNodesWithLoc, 117 | getRawSourceCode, 118 | createSelection.bind(this, sourceEl) 119 | ); 120 | 121 | }; 122 | -------------------------------------------------------------------------------- /js/utils.js: -------------------------------------------------------------------------------- 1 | var el = function (selector) { 2 | return document.querySelector(selector); 3 | }; 4 | 5 | function placePropertiesLink (id, output, props) { 6 | // ATTENTION! dirty hacking ... 7 | setTimeout(function () { 8 | el('#props-link-id-' + id).innerHTML = output.link('properties', function () { 9 | alert(props.reduce(function (result, prop) { 10 | var value; 11 | 12 | try { 13 | value = prop.value !== null && typeof prop.value === 'object' ? 14 | JSON.stringify(prop.value, null, 2) : 15 | prop.value; 16 | } catch(err) { 17 | console.log(err); 18 | value = prop.value; 19 | } 20 | 21 | return result += prop.name + '=' + value + '\n'; 22 | }, '')); 23 | }, 'props-link'); 24 | }, 200); 25 | } 26 | 27 | function readType (node) { 28 | if (node.type && typeof node.type === 'string') return node.type; 29 | if (node.type && typeof node.type === 'object') return node.type.label; 30 | return false; 31 | }; 32 | 33 | function isNumber (thing) { 34 | return typeof thing === 'number'; 35 | }; 36 | 37 | function hasChildren (ob) { 38 | var result = false; 39 | for (var prop in ob) { 40 | if (ob[prop] !== null && typeof ob[prop] === 'object') result = true; 41 | } 42 | return result; 43 | }; 44 | 45 | function arrow () { 46 | return ''; 47 | }; 48 | 49 | function getSourceCode (loc, input) { 50 | var lines = input.split('\n'); 51 | var content = [], from, to, line; 52 | var startLine = loc.start.line-1; 53 | var endLine = loc.end.line-1; 54 | 55 | for (var i=startLine; i<=endLine; i++) { 56 | line = lines[i]; 57 | if (typeof line === 'undefined') return content.join('\n'); 58 | if (i === startLine) { 59 | from = loc.start.column; 60 | to = i === endLine ? loc.end.column : line.length; 61 | } else if (i === endLine) { 62 | from = 0; 63 | to = loc.end.column; 64 | } else { 65 | from = 0; 66 | to = line.length; 67 | } 68 | content.push(line.substr(from, to-from)); 69 | } 70 | return content.join('\n'); 71 | }; 72 | 73 | function formatLocString (node, input) { 74 | var loc = node.loc; 75 | var positions = locToPos(input, loc.start, loc.end); 76 | var alertStr = ''; 77 | var compareLocWithPoss = function (node, input) { 78 | if ( 79 | typeof node.start !== 'undefined' && 80 | typeof node.end !== 'undefined' && 81 | (node.start !== positions.start || 82 | node.end !== positions.end) 83 | ) { 84 | alertStr = 'Expected:\\n'; 85 | alertStr += ' node.start (' + node.start + ') = loc.start.column (' + positions.start + ')\\n'; 86 | alertStr += ' node.end (' + node.end + ') = loc.end.column (' + positions.end + ')'; 87 | return '
!' 88 | } 89 | return ''; 90 | }; 91 | 92 | return [ 93 | ' ', 94 | loc.start.line + ':', 95 | loc.start.column + '-', 96 | loc.end.line + ':', 97 | loc.end.column, 98 | compareLocWithPoss(node, input), 99 | '' 100 | ].join(''); 101 | }; 102 | 103 | function currentSelectionToLoc (area) { 104 | var textLines = area.value.substr(0, area.selectionStart).split("\n"); 105 | var currentLineNumber = textLines.length; 106 | var currentColumnIndex = textLines[textLines.length-1].length; 107 | 108 | return { line: currentLineNumber, column: currentColumnIndex }; 109 | }; 110 | 111 | function createSelection (area, input, startLoc, endLoc) { 112 | var positions = locToPos(input, startLoc, endLoc); 113 | 114 | area.selectionStart = positions.start; 115 | area.selectionEnd = positions.end; 116 | }; 117 | 118 | function locToPos (input, startLoc, endLoc) { 119 | var line = 0, linePos = 0, startPos, endPos, newLine = false; 120 | 121 | for (var i=0; i<=input.length; i++) { 122 | if (input.charAt(i) === '\n') { 123 | newLine = true; 124 | } 125 | if (line === startLoc.line-1 && linePos === startLoc.column) { 126 | startPos = i; 127 | } 128 | if (line === endLoc.line-1 && linePos === endLoc.column) { 129 | endPos = i; 130 | } 131 | if (newLine) { 132 | newLine = false; 133 | linePos = 0; 134 | ++line; 135 | } else { 136 | ++linePos; 137 | } 138 | } 139 | return { start: startPos, end: endPos }; 140 | }; 141 | 142 | function clearSelection (area) { 143 | area.selectionStart = area.selectionEnd = 0; 144 | }; -------------------------------------------------------------------------------- /fixtures/1/ast.txt: -------------------------------------------------------------------------------- 1 | { 2 | "loc": { 3 | "start": { 4 | "line": 1, 5 | "column": 0 6 | }, 7 | "end": { 8 | "line": 3, 9 | "column": 2 10 | } 11 | }, 12 | "type": "Program", 13 | "body": [ 14 | { 15 | "loc": { 16 | "start": { 17 | "line": 1, 18 | "column": 0 19 | }, 20 | "end": { 21 | "line": 3, 22 | "column": 1 23 | } 24 | }, 25 | "type": "FunctionDeclaration", 26 | "id": { 27 | "loc": { 28 | "start": { 29 | "line": 1, 30 | "column": 9 31 | }, 32 | "end": { 33 | "line": 1, 34 | "column": 17 35 | } 36 | }, 37 | "type": "Identifier", 38 | "name": "isNumber" 39 | }, 40 | "params": [ 41 | { 42 | "loc": { 43 | "start": { 44 | "line": 1, 45 | "column": 19 46 | }, 47 | "end": { 48 | "line": 1, 49 | "column": 24 50 | } 51 | }, 52 | "type": "Identifier", 53 | "name": "thing" 54 | } 55 | ], 56 | "defaults": [], 57 | "body": { 58 | "loc": { 59 | "start": { 60 | "line": 1, 61 | "column": 26 62 | }, 63 | "end": { 64 | "line": 3, 65 | "column": 1 66 | } 67 | }, 68 | "type": "BlockStatement", 69 | "body": [ 70 | { 71 | "loc": { 72 | "start": { 73 | "line": 2, 74 | "column": 2 75 | }, 76 | "end": { 77 | "line": 2, 78 | "column": 35 79 | } 80 | }, 81 | "type": "ReturnStatement", 82 | "argument": { 83 | "loc": { 84 | "start": { 85 | "line": 2, 86 | "column": 9 87 | }, 88 | "end": { 89 | "line": 2, 90 | "column": 34 91 | } 92 | }, 93 | "type": "BinaryExpression", 94 | "operator": "===", 95 | "left": { 96 | "loc": { 97 | "start": { 98 | "line": 2, 99 | "column": 9 100 | }, 101 | "end": { 102 | "line": 2, 103 | "column": 21 104 | } 105 | }, 106 | "type": "UnaryExpression", 107 | "operator": "typeof", 108 | "argument": { 109 | "loc": { 110 | "start": { 111 | "line": 2, 112 | "column": 16 113 | }, 114 | "end": { 115 | "line": 2, 116 | "column": 21 117 | } 118 | }, 119 | "type": "Identifier", 120 | "name": "thing" 121 | }, 122 | "prefix": true 123 | }, 124 | "right": { 125 | "loc": { 126 | "start": { 127 | "line": 2, 128 | "column": 26 129 | }, 130 | "end": { 131 | "line": 2, 132 | "column": 34 133 | } 134 | }, 135 | "type": "Literal", 136 | "value": "number", 137 | "raw": "'number'" 138 | } 139 | } 140 | } 141 | ] 142 | }, 143 | "generator": false, 144 | "expression": false 145 | }, 146 | { 147 | "loc": { 148 | "start": { 149 | "line": 3, 150 | "column": 1 151 | }, 152 | "end": { 153 | "line": 3, 154 | "column": 2 155 | } 156 | }, 157 | "type": "EmptyStatement" 158 | } 159 | ], 160 | "sourceType": "script" 161 | } -------------------------------------------------------------------------------- /fixtures/2/ast.txt: -------------------------------------------------------------------------------- 1 | { 2 | "type": "File", 3 | "start": 0, 4 | "end": 40, 5 | "loc": { 6 | "start": { 7 | "line": 1, 8 | "column": 0 9 | }, 10 | "end": { 11 | "line": 1, 12 | "column": 40 13 | } 14 | }, 15 | "program": { 16 | "type": "Program", 17 | "start": 0, 18 | "end": 40, 19 | "loc": { 20 | "start": { 21 | "line": 1, 22 | "column": 0 23 | }, 24 | "end": { 25 | "line": 1, 26 | "column": 40 27 | } 28 | }, 29 | "sourceType": "script", 30 | "body": [ 31 | { 32 | "type": "ExpressionStatement", 33 | "start": 0, 34 | "end": 40, 35 | "loc": { 36 | "start": { 37 | "line": 1, 38 | "column": 0 39 | }, 40 | "end": { 41 | "line": 1, 42 | "column": 40 43 | } 44 | }, 45 | "expression": { 46 | "type": "JSXElement", 47 | "start": 0, 48 | "end": 40, 49 | "loc": { 50 | "start": { 51 | "line": 1, 52 | "column": 0 53 | }, 54 | "end": { 55 | "line": 1, 56 | "column": 40 57 | } 58 | }, 59 | "openingElement": { 60 | "type": "JSXOpeningElement", 61 | "start": 0, 62 | "end": 15, 63 | "loc": { 64 | "start": { 65 | "line": 1, 66 | "column": 0 67 | }, 68 | "end": { 69 | "line": 1, 70 | "column": 15 71 | } 72 | }, 73 | "attributes": [ 74 | { 75 | "type": "JSXAttribute", 76 | "start": 3, 77 | "end": 14, 78 | "loc": { 79 | "start": { 80 | "line": 1, 81 | "column": 3 82 | }, 83 | "end": { 84 | "line": 1, 85 | "column": 14 86 | } 87 | }, 88 | "name": { 89 | "type": "JSXNamespacedName", 90 | "start": 3, 91 | "end": 8, 92 | "loc": { 93 | "start": { 94 | "line": 1, 95 | "column": 3 96 | }, 97 | "end": { 98 | "line": 1, 99 | "column": 8 100 | } 101 | }, 102 | "namespace": { 103 | "type": "JSXIdentifier", 104 | "start": 3, 105 | "end": 4, 106 | "loc": { 107 | "start": { 108 | "line": 1, 109 | "column": 3 110 | }, 111 | "end": { 112 | "line": 1, 113 | "column": 4 114 | } 115 | }, 116 | "name": "n" 117 | }, 118 | "name": { 119 | "type": "JSXIdentifier", 120 | "start": 5, 121 | "end": 8, 122 | "loc": { 123 | "start": { 124 | "line": 1, 125 | "column": 5 126 | }, 127 | "end": { 128 | "line": 1, 129 | "column": 8 130 | } 131 | }, 132 | "name": "foo" 133 | } 134 | }, 135 | "value": { 136 | "type": "StringLiteral", 137 | "start": 9, 138 | "end": 14, 139 | "loc": { 140 | "start": { 141 | "line": 1, 142 | "column": 9 143 | }, 144 | "end": { 145 | "line": 1, 146 | "column": 14 147 | } 148 | }, 149 | "extra": null, 150 | "value": "bar" 151 | } 152 | } 153 | ], 154 | "name": { 155 | "type": "JSXIdentifier", 156 | "start": 1, 157 | "end": 2, 158 | "loc": { 159 | "start": { 160 | "line": 1, 161 | "column": 1 162 | }, 163 | "end": { 164 | "line": 1, 165 | "column": 2 166 | } 167 | }, 168 | "name": "a" 169 | }, 170 | "selfClosing": false 171 | }, 172 | "closingElement": { 173 | "type": "JSXClosingElement", 174 | "start": 36, 175 | "end": 40, 176 | "loc": { 177 | "start": { 178 | "line": 1, 179 | "column": 36 180 | }, 181 | "end": { 182 | "line": 1, 183 | "column": 40 184 | } 185 | }, 186 | "name": { 187 | "type": "JSXIdentifier", 188 | "start": 38, 189 | "end": 39, 190 | "loc": { 191 | "start": { 192 | "line": 1, 193 | "column": 38 194 | }, 195 | "end": { 196 | "line": 1, 197 | "column": 39 198 | } 199 | }, 200 | "name": "a" 201 | } 202 | }, 203 | "children": [ 204 | { 205 | "type": "JSXText", 206 | "start": 15, 207 | "end": 16, 208 | "loc": { 209 | "start": { 210 | "line": 1, 211 | "column": 15 212 | }, 213 | "end": { 214 | "line": 1, 215 | "column": 16 216 | } 217 | }, 218 | "extra": null, 219 | "value": " " 220 | }, 221 | { 222 | "type": "JSXExpressionContainer", 223 | "start": 16, 224 | "end": 23, 225 | "loc": { 226 | "start": { 227 | "line": 1, 228 | "column": 16 229 | }, 230 | "end": { 231 | "line": 1, 232 | "column": 23 233 | } 234 | }, 235 | "expression": { 236 | "type": "Identifier", 237 | "start": 17, 238 | "end": 22, 239 | "loc": { 240 | "start": { 241 | "line": 1, 242 | "column": 17 243 | }, 244 | "end": { 245 | "line": 1, 246 | "column": 22 247 | } 248 | }, 249 | "name": "value" 250 | } 251 | }, 252 | { 253 | "type": "JSXText", 254 | "start": 23, 255 | "end": 24, 256 | "loc": { 257 | "start": { 258 | "line": 1, 259 | "column": 23 260 | }, 261 | "end": { 262 | "line": 1, 263 | "column": 24 264 | } 265 | }, 266 | "extra": null, 267 | "value": " " 268 | }, 269 | { 270 | "type": "JSXElement", 271 | "start": 24, 272 | "end": 36, 273 | "loc": { 274 | "start": { 275 | "line": 1, 276 | "column": 24 277 | }, 278 | "end": { 279 | "line": 1, 280 | "column": 36 281 | } 282 | }, 283 | "openingElement": { 284 | "type": "JSXOpeningElement", 285 | "start": 24, 286 | "end": 27, 287 | "loc": { 288 | "start": { 289 | "line": 1, 290 | "column": 24 291 | }, 292 | "end": { 293 | "line": 1, 294 | "column": 27 295 | } 296 | }, 297 | "attributes": [], 298 | "name": { 299 | "type": "JSXIdentifier", 300 | "start": 25, 301 | "end": 26, 302 | "loc": { 303 | "start": { 304 | "line": 1, 305 | "column": 25 306 | }, 307 | "end": { 308 | "line": 1, 309 | "column": 26 310 | } 311 | }, 312 | "name": "b" 313 | }, 314 | "selfClosing": false 315 | }, 316 | "closingElement": { 317 | "type": "JSXClosingElement", 318 | "start": 32, 319 | "end": 36, 320 | "loc": { 321 | "start": { 322 | "line": 1, 323 | "column": 32 324 | }, 325 | "end": { 326 | "line": 1, 327 | "column": 36 328 | } 329 | }, 330 | "name": { 331 | "type": "JSXIdentifier", 332 | "start": 34, 333 | "end": 35, 334 | "loc": { 335 | "start": { 336 | "line": 1, 337 | "column": 34 338 | }, 339 | "end": { 340 | "line": 1, 341 | "column": 35 342 | } 343 | }, 344 | "name": "b" 345 | } 346 | }, 347 | "children": [ 348 | { 349 | "type": "JSXElement", 350 | "start": 27, 351 | "end": 32, 352 | "loc": { 353 | "start": { 354 | "line": 1, 355 | "column": 27 356 | }, 357 | "end": { 358 | "line": 1, 359 | "column": 32 360 | } 361 | }, 362 | "openingElement": { 363 | "type": "JSXOpeningElement", 364 | "start": 27, 365 | "end": 32, 366 | "loc": { 367 | "start": { 368 | "line": 1, 369 | "column": 27 370 | }, 371 | "end": { 372 | "line": 1, 373 | "column": 32 374 | } 375 | }, 376 | "attributes": [], 377 | "name": { 378 | "type": "JSXIdentifier", 379 | "start": 28, 380 | "end": 29, 381 | "loc": { 382 | "start": { 383 | "line": 1, 384 | "column": 28 385 | }, 386 | "end": { 387 | "line": 1, 388 | "column": 29 389 | } 390 | }, 391 | "name": "c" 392 | }, 393 | "selfClosing": true 394 | }, 395 | "closingElement": null, 396 | "children": [] 397 | } 398 | ] 399 | } 400 | ] 401 | } 402 | } 403 | ], 404 | "directives": [] 405 | } 406 | } -------------------------------------------------------------------------------- /fixtures/3/ast.txt: -------------------------------------------------------------------------------- 1 | { 2 | "type": "File", 3 | "start": 0, 4 | "end": 114, 5 | "loc": { 6 | "start": { 7 | "line": 1, 8 | "column": 0 9 | }, 10 | "end": { 11 | "line": 11, 12 | "column": 1 13 | } 14 | }, 15 | "program": { 16 | "type": "Program", 17 | "start": 0, 18 | "end": 114, 19 | "loc": { 20 | "start": { 21 | "line": 1, 22 | "column": 0 23 | }, 24 | "end": { 25 | "line": 11, 26 | "column": 1 27 | } 28 | }, 29 | "sourceType": "script", 30 | "body": [ 31 | { 32 | "type": "CSSXElement", 33 | "start": 0, 34 | "end": 44, 35 | "loc": { 36 | "start": { 37 | "line": 1, 38 | "column": 0 39 | }, 40 | "end": { 41 | "line": 4, 42 | "column": 1 43 | } 44 | }, 45 | "selector": { 46 | "type": "CSSXSelector", 47 | "start": 0, 48 | "end": 5, 49 | "loc": { 50 | "start": { 51 | "line": 1, 52 | "column": 0 53 | }, 54 | "end": { 55 | "line": 1, 56 | "column": 5 57 | } 58 | }, 59 | "value": "E ~ F" 60 | }, 61 | "body": { 62 | "type": "CSSXRules", 63 | "start": 6, 64 | "end": 44, 65 | "loc": { 66 | "start": { 67 | "line": 1, 68 | "column": 6 69 | }, 70 | "end": { 71 | "line": 4, 72 | "column": 1 73 | } 74 | }, 75 | "body": [ 76 | { 77 | "type": "CSSXRule", 78 | "start": 10, 79 | "end": 22, 80 | "loc": { 81 | "start": { 82 | "line": 2, 83 | "column": 2 84 | }, 85 | "end": { 86 | "line": 2, 87 | "column": 14 88 | } 89 | }, 90 | "label": { 91 | "type": "CSSXProperty", 92 | "start": 10, 93 | "end": 15, 94 | "loc": { 95 | "start": { 96 | "line": 2, 97 | "column": 2 98 | }, 99 | "end": { 100 | "line": 2, 101 | "column": 7 102 | } 103 | }, 104 | "name": "color" 105 | }, 106 | "body": { 107 | "type": "CSSXValue", 108 | "start": 17, 109 | "end": 21, 110 | "loc": { 111 | "start": { 112 | "line": 2, 113 | "column": 9 114 | }, 115 | "end": { 116 | "line": 2, 117 | "column": 13 118 | } 119 | }, 120 | "name": "#000" 121 | } 122 | }, 123 | { 124 | "type": "CSSXRule", 125 | "start": 25, 126 | "end": 42, 127 | "loc": { 128 | "start": { 129 | "line": 3, 130 | "column": 2 131 | }, 132 | "end": { 133 | "line": 3, 134 | "column": 19 135 | } 136 | }, 137 | "label": { 138 | "type": "CSSXProperty", 139 | "start": 25, 140 | "end": 35, 141 | "loc": { 142 | "start": { 143 | "line": 3, 144 | "column": 2 145 | }, 146 | "end": { 147 | "line": 3, 148 | "column": 12 149 | } 150 | }, 151 | "name": "background" 152 | }, 153 | "body": { 154 | "type": "CSSXValue", 155 | "start": 37, 156 | "end": 41, 157 | "loc": { 158 | "start": { 159 | "line": 3, 160 | "column": 14 161 | }, 162 | "end": { 163 | "line": 3, 164 | "column": 18 165 | } 166 | }, 167 | "name": "#F00" 168 | } 169 | } 170 | ] 171 | } 172 | }, 173 | { 174 | "type": "CSSXElement", 175 | "start": 45, 176 | "end": 69, 177 | "loc": { 178 | "start": { 179 | "line": 5, 180 | "column": 0 181 | }, 182 | "end": { 183 | "line": 7, 184 | "column": 1 185 | } 186 | }, 187 | "selector": { 188 | "type": "CSSXSelector", 189 | "start": 45, 190 | "end": 50, 191 | "loc": { 192 | "start": { 193 | "line": 5, 194 | "column": 0 195 | }, 196 | "end": { 197 | "line": 5, 198 | "column": 5 199 | } 200 | }, 201 | "value": "E > F" 202 | }, 203 | "body": { 204 | "type": "CSSXRules", 205 | "start": 51, 206 | "end": 69, 207 | "loc": { 208 | "start": { 209 | "line": 5, 210 | "column": 6 211 | }, 212 | "end": { 213 | "line": 7, 214 | "column": 1 215 | } 216 | }, 217 | "body": [ 218 | { 219 | "type": "CSSXRule", 220 | "start": 55, 221 | "end": 67, 222 | "loc": { 223 | "start": { 224 | "line": 6, 225 | "column": 2 226 | }, 227 | "end": { 228 | "line": 6, 229 | "column": 14 230 | } 231 | }, 232 | "label": { 233 | "type": "CSSXProperty", 234 | "start": 55, 235 | "end": 60, 236 | "loc": { 237 | "start": { 238 | "line": 6, 239 | "column": 2 240 | }, 241 | "end": { 242 | "line": 6, 243 | "column": 7 244 | } 245 | }, 246 | "name": "color" 247 | }, 248 | "body": { 249 | "type": "CSSXValue", 250 | "start": 62, 251 | "end": 66, 252 | "loc": { 253 | "start": { 254 | "line": 6, 255 | "column": 9 256 | }, 257 | "end": { 258 | "line": 6, 259 | "column": 13 260 | } 261 | }, 262 | "name": "#000" 263 | } 264 | } 265 | ] 266 | } 267 | }, 268 | { 269 | "type": "CSSXElement", 270 | "start": 70, 271 | "end": 114, 272 | "loc": { 273 | "start": { 274 | "line": 8, 275 | "column": 0 276 | }, 277 | "end": { 278 | "line": 11, 279 | "column": 1 280 | } 281 | }, 282 | "selector": { 283 | "type": "CSSXSelector", 284 | "start": 70, 285 | "end": 75, 286 | "loc": { 287 | "start": { 288 | "line": 8, 289 | "column": 0 290 | }, 291 | "end": { 292 | "line": 8, 293 | "column": 5 294 | } 295 | }, 296 | "value": "E + F" 297 | }, 298 | "body": { 299 | "type": "CSSXRules", 300 | "start": 76, 301 | "end": 114, 302 | "loc": { 303 | "start": { 304 | "line": 8, 305 | "column": 6 306 | }, 307 | "end": { 308 | "line": 11, 309 | "column": 1 310 | } 311 | }, 312 | "body": [ 313 | { 314 | "type": "CSSXRule", 315 | "start": 80, 316 | "end": 92, 317 | "loc": { 318 | "start": { 319 | "line": 9, 320 | "column": 2 321 | }, 322 | "end": { 323 | "line": 9, 324 | "column": 14 325 | } 326 | }, 327 | "label": { 328 | "type": "CSSXProperty", 329 | "start": 80, 330 | "end": 85, 331 | "loc": { 332 | "start": { 333 | "line": 9, 334 | "column": 2 335 | }, 336 | "end": { 337 | "line": 9, 338 | "column": 7 339 | } 340 | }, 341 | "name": "color" 342 | }, 343 | "body": { 344 | "type": "CSSXValue", 345 | "start": 87, 346 | "end": 91, 347 | "loc": { 348 | "start": { 349 | "line": 9, 350 | "column": 9 351 | }, 352 | "end": { 353 | "line": 9, 354 | "column": 13 355 | } 356 | }, 357 | "name": "#000" 358 | } 359 | }, 360 | { 361 | "type": "CSSXRule", 362 | "start": 95, 363 | "end": 112, 364 | "loc": { 365 | "start": { 366 | "line": 10, 367 | "column": 2 368 | }, 369 | "end": { 370 | "line": 10, 371 | "column": 19 372 | } 373 | }, 374 | "label": { 375 | "type": "CSSXProperty", 376 | "start": 95, 377 | "end": 105, 378 | "loc": { 379 | "start": { 380 | "line": 10, 381 | "column": 2 382 | }, 383 | "end": { 384 | "line": 10, 385 | "column": 12 386 | } 387 | }, 388 | "name": "background" 389 | }, 390 | "body": { 391 | "type": "CSSXValue", 392 | "start": 107, 393 | "end": 111, 394 | "loc": { 395 | "start": { 396 | "line": 10, 397 | "column": 14 398 | }, 399 | "end": { 400 | "line": 10, 401 | "column": 18 402 | } 403 | }, 404 | "name": "#F00" 405 | } 406 | } 407 | ] 408 | } 409 | } 410 | ], 411 | "directives": [] 412 | }, 413 | "comments": [], 414 | "tokens": [ 415 | { 416 | "type": { 417 | "label": "cssxSelector", 418 | "beforeExpr": false, 419 | "startsExpr": false, 420 | "rightAssociative": false, 421 | "isLoop": false, 422 | "isAssign": false, 423 | "prefix": false, 424 | "postfix": false, 425 | "binop": null 426 | }, 427 | "value": "E ~ F", 428 | "start": 0, 429 | "end": 5, 430 | "loc": { 431 | "start": { 432 | "line": 1, 433 | "column": 0 434 | }, 435 | "end": { 436 | "line": 1, 437 | "column": 5 438 | } 439 | } 440 | }, 441 | { 442 | "type": { 443 | "label": "cssxRulesStart", 444 | "beforeExpr": false, 445 | "startsExpr": false, 446 | "rightAssociative": false, 447 | "isLoop": false, 448 | "isAssign": false, 449 | "prefix": false, 450 | "postfix": false, 451 | "binop": null 452 | }, 453 | "start": 6, 454 | "end": 7, 455 | "loc": { 456 | "start": { 457 | "line": 1, 458 | "column": 6 459 | }, 460 | "end": { 461 | "line": 1, 462 | "column": 7 463 | } 464 | } 465 | }, 466 | { 467 | "type": { 468 | "label": "cssxProperty", 469 | "beforeExpr": false, 470 | "startsExpr": false, 471 | "rightAssociative": false, 472 | "isLoop": false, 473 | "isAssign": false, 474 | "prefix": false, 475 | "postfix": false, 476 | "binop": null, 477 | "updateContext": null 478 | }, 479 | "value": "color", 480 | "start": 10, 481 | "end": 15, 482 | "loc": { 483 | "start": { 484 | "line": 2, 485 | "column": 2 486 | }, 487 | "end": { 488 | "line": 2, 489 | "column": 7 490 | } 491 | } 492 | }, 493 | { 494 | "type": { 495 | "label": ":", 496 | "beforeExpr": true, 497 | "startsExpr": false, 498 | "rightAssociative": false, 499 | "isLoop": false, 500 | "isAssign": false, 501 | "prefix": false, 502 | "postfix": false, 503 | "binop": null, 504 | "updateContext": null 505 | }, 506 | "start": 15, 507 | "end": 16, 508 | "loc": { 509 | "start": { 510 | "line": 2, 511 | "column": 7 512 | }, 513 | "end": { 514 | "line": 2, 515 | "column": 8 516 | } 517 | } 518 | }, 519 | { 520 | "type": { 521 | "label": "cssxValue", 522 | "beforeExpr": false, 523 | "startsExpr": false, 524 | "rightAssociative": false, 525 | "isLoop": false, 526 | "isAssign": false, 527 | "prefix": false, 528 | "postfix": false, 529 | "binop": null, 530 | "updateContext": null 531 | }, 532 | "value": "#000", 533 | "start": 17, 534 | "end": 21, 535 | "loc": { 536 | "start": { 537 | "line": 2, 538 | "column": 9 539 | }, 540 | "end": { 541 | "line": 2, 542 | "column": 13 543 | } 544 | } 545 | }, 546 | { 547 | "type": { 548 | "label": ";", 549 | "beforeExpr": true, 550 | "startsExpr": false, 551 | "rightAssociative": false, 552 | "isLoop": false, 553 | "isAssign": false, 554 | "prefix": false, 555 | "postfix": false, 556 | "binop": null, 557 | "updateContext": null 558 | }, 559 | "start": 21, 560 | "end": 22, 561 | "loc": { 562 | "start": { 563 | "line": 2, 564 | "column": 13 565 | }, 566 | "end": { 567 | "line": 2, 568 | "column": 14 569 | } 570 | } 571 | }, 572 | { 573 | "type": { 574 | "label": "cssxProperty", 575 | "beforeExpr": false, 576 | "startsExpr": false, 577 | "rightAssociative": false, 578 | "isLoop": false, 579 | "isAssign": false, 580 | "prefix": false, 581 | "postfix": false, 582 | "binop": null, 583 | "updateContext": null 584 | }, 585 | "value": "background", 586 | "start": 25, 587 | "end": 35, 588 | "loc": { 589 | "start": { 590 | "line": 3, 591 | "column": 2 592 | }, 593 | "end": { 594 | "line": 3, 595 | "column": 12 596 | } 597 | } 598 | }, 599 | { 600 | "type": { 601 | "label": ":", 602 | "beforeExpr": true, 603 | "startsExpr": false, 604 | "rightAssociative": false, 605 | "isLoop": false, 606 | "isAssign": false, 607 | "prefix": false, 608 | "postfix": false, 609 | "binop": null, 610 | "updateContext": null 611 | }, 612 | "start": 35, 613 | "end": 36, 614 | "loc": { 615 | "start": { 616 | "line": 3, 617 | "column": 12 618 | }, 619 | "end": { 620 | "line": 3, 621 | "column": 13 622 | } 623 | } 624 | }, 625 | { 626 | "type": { 627 | "label": "cssxValue", 628 | "beforeExpr": false, 629 | "startsExpr": false, 630 | "rightAssociative": false, 631 | "isLoop": false, 632 | "isAssign": false, 633 | "prefix": false, 634 | "postfix": false, 635 | "binop": null, 636 | "updateContext": null 637 | }, 638 | "value": "#F00", 639 | "start": 37, 640 | "end": 41, 641 | "loc": { 642 | "start": { 643 | "line": 3, 644 | "column": 14 645 | }, 646 | "end": { 647 | "line": 3, 648 | "column": 18 649 | } 650 | } 651 | }, 652 | { 653 | "type": { 654 | "label": ";", 655 | "beforeExpr": true, 656 | "startsExpr": false, 657 | "rightAssociative": false, 658 | "isLoop": false, 659 | "isAssign": false, 660 | "prefix": false, 661 | "postfix": false, 662 | "binop": null, 663 | "updateContext": null 664 | }, 665 | "start": 41, 666 | "end": 42, 667 | "loc": { 668 | "start": { 669 | "line": 3, 670 | "column": 18 671 | }, 672 | "end": { 673 | "line": 3, 674 | "column": 19 675 | } 676 | } 677 | }, 678 | { 679 | "type": { 680 | "label": "cssxRulesEnd", 681 | "beforeExpr": false, 682 | "startsExpr": false, 683 | "rightAssociative": false, 684 | "isLoop": false, 685 | "isAssign": false, 686 | "prefix": false, 687 | "postfix": false, 688 | "binop": null 689 | }, 690 | "start": 43, 691 | "end": 44, 692 | "loc": { 693 | "start": { 694 | "line": 4, 695 | "column": 0 696 | }, 697 | "end": { 698 | "line": 4, 699 | "column": 1 700 | } 701 | } 702 | }, 703 | { 704 | "type": { 705 | "label": "cssxSelector", 706 | "beforeExpr": false, 707 | "startsExpr": false, 708 | "rightAssociative": false, 709 | "isLoop": false, 710 | "isAssign": false, 711 | "prefix": false, 712 | "postfix": false, 713 | "binop": null 714 | }, 715 | "value": "E > F", 716 | "start": 45, 717 | "end": 50, 718 | "loc": { 719 | "start": { 720 | "line": 5, 721 | "column": 0 722 | }, 723 | "end": { 724 | "line": 5, 725 | "column": 5 726 | } 727 | } 728 | }, 729 | { 730 | "type": { 731 | "label": "cssxRulesStart", 732 | "beforeExpr": false, 733 | "startsExpr": false, 734 | "rightAssociative": false, 735 | "isLoop": false, 736 | "isAssign": false, 737 | "prefix": false, 738 | "postfix": false, 739 | "binop": null 740 | }, 741 | "start": 51, 742 | "end": 52, 743 | "loc": { 744 | "start": { 745 | "line": 5, 746 | "column": 6 747 | }, 748 | "end": { 749 | "line": 5, 750 | "column": 7 751 | } 752 | } 753 | }, 754 | { 755 | "type": { 756 | "label": "cssxProperty", 757 | "beforeExpr": false, 758 | "startsExpr": false, 759 | "rightAssociative": false, 760 | "isLoop": false, 761 | "isAssign": false, 762 | "prefix": false, 763 | "postfix": false, 764 | "binop": null, 765 | "updateContext": null 766 | }, 767 | "value": "color", 768 | "start": 55, 769 | "end": 60, 770 | "loc": { 771 | "start": { 772 | "line": 6, 773 | "column": 2 774 | }, 775 | "end": { 776 | "line": 6, 777 | "column": 7 778 | } 779 | } 780 | }, 781 | { 782 | "type": { 783 | "label": ":", 784 | "beforeExpr": true, 785 | "startsExpr": false, 786 | "rightAssociative": false, 787 | "isLoop": false, 788 | "isAssign": false, 789 | "prefix": false, 790 | "postfix": false, 791 | "binop": null, 792 | "updateContext": null 793 | }, 794 | "start": 60, 795 | "end": 61, 796 | "loc": { 797 | "start": { 798 | "line": 6, 799 | "column": 7 800 | }, 801 | "end": { 802 | "line": 6, 803 | "column": 8 804 | } 805 | } 806 | }, 807 | { 808 | "type": { 809 | "label": "cssxValue", 810 | "beforeExpr": false, 811 | "startsExpr": false, 812 | "rightAssociative": false, 813 | "isLoop": false, 814 | "isAssign": false, 815 | "prefix": false, 816 | "postfix": false, 817 | "binop": null, 818 | "updateContext": null 819 | }, 820 | "value": "#000", 821 | "start": 62, 822 | "end": 66, 823 | "loc": { 824 | "start": { 825 | "line": 6, 826 | "column": 9 827 | }, 828 | "end": { 829 | "line": 6, 830 | "column": 13 831 | } 832 | } 833 | }, 834 | { 835 | "type": { 836 | "label": ";", 837 | "beforeExpr": true, 838 | "startsExpr": false, 839 | "rightAssociative": false, 840 | "isLoop": false, 841 | "isAssign": false, 842 | "prefix": false, 843 | "postfix": false, 844 | "binop": null, 845 | "updateContext": null 846 | }, 847 | "start": 66, 848 | "end": 67, 849 | "loc": { 850 | "start": { 851 | "line": 6, 852 | "column": 13 853 | }, 854 | "end": { 855 | "line": 6, 856 | "column": 14 857 | } 858 | } 859 | }, 860 | { 861 | "type": { 862 | "label": "cssxRulesEnd", 863 | "beforeExpr": false, 864 | "startsExpr": false, 865 | "rightAssociative": false, 866 | "isLoop": false, 867 | "isAssign": false, 868 | "prefix": false, 869 | "postfix": false, 870 | "binop": null 871 | }, 872 | "start": 68, 873 | "end": 69, 874 | "loc": { 875 | "start": { 876 | "line": 7, 877 | "column": 0 878 | }, 879 | "end": { 880 | "line": 7, 881 | "column": 1 882 | } 883 | } 884 | }, 885 | { 886 | "type": { 887 | "label": "cssxSelector", 888 | "beforeExpr": false, 889 | "startsExpr": false, 890 | "rightAssociative": false, 891 | "isLoop": false, 892 | "isAssign": false, 893 | "prefix": false, 894 | "postfix": false, 895 | "binop": null 896 | }, 897 | "value": "E + F", 898 | "start": 70, 899 | "end": 75, 900 | "loc": { 901 | "start": { 902 | "line": 8, 903 | "column": 0 904 | }, 905 | "end": { 906 | "line": 8, 907 | "column": 5 908 | } 909 | } 910 | }, 911 | { 912 | "type": { 913 | "label": "cssxRulesStart", 914 | "beforeExpr": false, 915 | "startsExpr": false, 916 | "rightAssociative": false, 917 | "isLoop": false, 918 | "isAssign": false, 919 | "prefix": false, 920 | "postfix": false, 921 | "binop": null 922 | }, 923 | "start": 76, 924 | "end": 77, 925 | "loc": { 926 | "start": { 927 | "line": 8, 928 | "column": 6 929 | }, 930 | "end": { 931 | "line": 8, 932 | "column": 7 933 | } 934 | } 935 | }, 936 | { 937 | "type": { 938 | "label": "cssxProperty", 939 | "beforeExpr": false, 940 | "startsExpr": false, 941 | "rightAssociative": false, 942 | "isLoop": false, 943 | "isAssign": false, 944 | "prefix": false, 945 | "postfix": false, 946 | "binop": null, 947 | "updateContext": null 948 | }, 949 | "value": "color", 950 | "start": 80, 951 | "end": 85, 952 | "loc": { 953 | "start": { 954 | "line": 9, 955 | "column": 2 956 | }, 957 | "end": { 958 | "line": 9, 959 | "column": 7 960 | } 961 | } 962 | }, 963 | { 964 | "type": { 965 | "label": ":", 966 | "beforeExpr": true, 967 | "startsExpr": false, 968 | "rightAssociative": false, 969 | "isLoop": false, 970 | "isAssign": false, 971 | "prefix": false, 972 | "postfix": false, 973 | "binop": null, 974 | "updateContext": null 975 | }, 976 | "start": 85, 977 | "end": 86, 978 | "loc": { 979 | "start": { 980 | "line": 9, 981 | "column": 7 982 | }, 983 | "end": { 984 | "line": 9, 985 | "column": 8 986 | } 987 | } 988 | }, 989 | { 990 | "type": { 991 | "label": "cssxValue", 992 | "beforeExpr": false, 993 | "startsExpr": false, 994 | "rightAssociative": false, 995 | "isLoop": false, 996 | "isAssign": false, 997 | "prefix": false, 998 | "postfix": false, 999 | "binop": null, 1000 | "updateContext": null 1001 | }, 1002 | "value": "#000", 1003 | "start": 87, 1004 | "end": 91, 1005 | "loc": { 1006 | "start": { 1007 | "line": 9, 1008 | "column": 9 1009 | }, 1010 | "end": { 1011 | "line": 9, 1012 | "column": 13 1013 | } 1014 | } 1015 | }, 1016 | { 1017 | "type": { 1018 | "label": ";", 1019 | "beforeExpr": true, 1020 | "startsExpr": false, 1021 | "rightAssociative": false, 1022 | "isLoop": false, 1023 | "isAssign": false, 1024 | "prefix": false, 1025 | "postfix": false, 1026 | "binop": null, 1027 | "updateContext": null 1028 | }, 1029 | "start": 91, 1030 | "end": 92, 1031 | "loc": { 1032 | "start": { 1033 | "line": 9, 1034 | "column": 13 1035 | }, 1036 | "end": { 1037 | "line": 9, 1038 | "column": 14 1039 | } 1040 | } 1041 | }, 1042 | { 1043 | "type": { 1044 | "label": "cssxProperty", 1045 | "beforeExpr": false, 1046 | "startsExpr": false, 1047 | "rightAssociative": false, 1048 | "isLoop": false, 1049 | "isAssign": false, 1050 | "prefix": false, 1051 | "postfix": false, 1052 | "binop": null, 1053 | "updateContext": null 1054 | }, 1055 | "value": "background", 1056 | "start": 95, 1057 | "end": 105, 1058 | "loc": { 1059 | "start": { 1060 | "line": 10, 1061 | "column": 2 1062 | }, 1063 | "end": { 1064 | "line": 10, 1065 | "column": 12 1066 | } 1067 | } 1068 | }, 1069 | { 1070 | "type": { 1071 | "label": ":", 1072 | "beforeExpr": true, 1073 | "startsExpr": false, 1074 | "rightAssociative": false, 1075 | "isLoop": false, 1076 | "isAssign": false, 1077 | "prefix": false, 1078 | "postfix": false, 1079 | "binop": null, 1080 | "updateContext": null 1081 | }, 1082 | "start": 105, 1083 | "end": 106, 1084 | "loc": { 1085 | "start": { 1086 | "line": 10, 1087 | "column": 12 1088 | }, 1089 | "end": { 1090 | "line": 10, 1091 | "column": 13 1092 | } 1093 | } 1094 | }, 1095 | { 1096 | "type": { 1097 | "label": "cssxValue", 1098 | "beforeExpr": false, 1099 | "startsExpr": false, 1100 | "rightAssociative": false, 1101 | "isLoop": false, 1102 | "isAssign": false, 1103 | "prefix": false, 1104 | "postfix": false, 1105 | "binop": null, 1106 | "updateContext": null 1107 | }, 1108 | "value": "#F00", 1109 | "start": 107, 1110 | "end": 111, 1111 | "loc": { 1112 | "start": { 1113 | "line": 10, 1114 | "column": 14 1115 | }, 1116 | "end": { 1117 | "line": 10, 1118 | "column": 18 1119 | } 1120 | } 1121 | }, 1122 | { 1123 | "type": { 1124 | "label": ";", 1125 | "beforeExpr": true, 1126 | "startsExpr": false, 1127 | "rightAssociative": false, 1128 | "isLoop": false, 1129 | "isAssign": false, 1130 | "prefix": false, 1131 | "postfix": false, 1132 | "binop": null, 1133 | "updateContext": null 1134 | }, 1135 | "start": 111, 1136 | "end": 112, 1137 | "loc": { 1138 | "start": { 1139 | "line": 10, 1140 | "column": 18 1141 | }, 1142 | "end": { 1143 | "line": 10, 1144 | "column": 19 1145 | } 1146 | } 1147 | }, 1148 | { 1149 | "type": { 1150 | "label": "cssxRulesEnd", 1151 | "beforeExpr": false, 1152 | "startsExpr": false, 1153 | "rightAssociative": false, 1154 | "isLoop": false, 1155 | "isAssign": false, 1156 | "prefix": false, 1157 | "postfix": false, 1158 | "binop": null 1159 | }, 1160 | "start": 113, 1161 | "end": 114, 1162 | "loc": { 1163 | "start": { 1164 | "line": 11, 1165 | "column": 0 1166 | }, 1167 | "end": { 1168 | "line": 11, 1169 | "column": 1 1170 | } 1171 | } 1172 | }, 1173 | { 1174 | "type": { 1175 | "label": "eof", 1176 | "beforeExpr": false, 1177 | "startsExpr": false, 1178 | "rightAssociative": false, 1179 | "isLoop": false, 1180 | "isAssign": false, 1181 | "prefix": false, 1182 | "postfix": false, 1183 | "binop": null, 1184 | "updateContext": null 1185 | }, 1186 | "start": 114, 1187 | "end": 114, 1188 | "loc": { 1189 | "start": { 1190 | "line": 11, 1191 | "column": 1 1192 | }, 1193 | "end": { 1194 | "line": 11, 1195 | "column": 1 1196 | } 1197 | } 1198 | } 1199 | ] 1200 | } -------------------------------------------------------------------------------- /js/vendor/jquery.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v1.12.0 | (c) jQuery Foundation | jquery.org/license */ 2 | !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; 3 | return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="
a",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:l.htmlSerialize?[0,"",""]:[1,"X
","
"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?""!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.rnamespace||a.rnamespace.test(g.namespace))&&(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("