-
-
Save haifengkao/165e5a77db02d1354f36 to your computer and use it in GitHub Desktop.
Beautified http://www.kimonolabs.com/js/kimono.min.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"indent" : { | |
"value": " ", | |
"ArrayExpression": 1, | |
"AssignmentExpression": 1, | |
"BinaryExpression": 1, | |
"ConditionalExpression": 1, | |
"CallExpression": 1, | |
"CatchClause": 1, | |
"ConditionalExpression": 1, | |
"DoWhileStatement": 1, | |
"ForInStatement": 1, | |
"ForStatement": 1, | |
"FunctionDeclaration": 1, | |
"FunctionExpression": 1, | |
"IfStatement": 1, | |
"MemberExpression": 1, | |
"MultipleVariableDeclaration": 1, | |
"ObjectExpression": 1, | |
"ReturnStatement": 1, | |
"SwitchCase": 1, | |
"SwitchStatement": 1, | |
"TopLevelFunctionBlock": 1, | |
"TryStatement": 1, | |
"VariableDeclaration.LogicalExpression": 1, | |
"WhileStatement": 1 | |
}, | |
"lineBreak" : { | |
"value" : "\n", | |
"before" : { | |
"AssignmentExpression" : ">=1", | |
"AssignmentOperator": 0, | |
"BlockStatement" : 0, | |
"CallExpression" : -1, | |
"ConditionalExpression" : ">=1", | |
"CatchOpeningBrace" : 0, | |
"CatchClosingBrace" : ">=1", | |
"CatchKeyword": 0, | |
"DeleteOperator" : ">=1", | |
"DoWhileStatement" : ">=1", | |
"DoWhileStatementOpeningBrace" : 0, | |
"DoWhileStatementClosingBrace" : ">=1", | |
"EndOfFile" : -1, | |
"EmptyStatement" : -1, | |
"FinallyKeyword" : -1, | |
"FinallyOpeningBrace" : 0, | |
"FinallyClosingBrace" : ">=1", | |
"ForInStatement" : ">=1", | |
"ForInStatementExpressionOpening" : 0, | |
"ForInStatementExpressionClosing" : 0, | |
"ForInStatementOpeningBrace" : 0, | |
"ForInStatementClosingBrace" : ">=1", | |
"ForStatement" : ">=1", | |
"ForStatementExpressionOpening" : 0, | |
"ForStatementExpressionClosing" : "<2", | |
"ForStatementOpeningBrace" : 0, | |
"ForStatementClosingBrace" : ">=1", | |
"FunctionExpression" : 0, | |
"FunctionExpressionOpeningBrace" : 0, | |
"FunctionExpressionClosingBrace" : ">=1", | |
"FunctionDeclaration" : ">=1", | |
"FunctionDeclarationOpeningBrace" : 0, | |
"FunctionDeclarationClosingBrace" : ">=1", | |
"IfStatement" : ">=1", | |
"IfStatementOpeningBrace" : 0, | |
"IfStatementClosingBrace" : ">=1", | |
"ElseIfStatement" : 0, | |
"ElseIfStatementOpeningBrace" : 0, | |
"ElseIfStatementClosingBrace" : ">=1", | |
"ElseStatement" : 0, | |
"ElseStatementOpeningBrace" : 0, | |
"ElseStatementClosingBrace" : ">=1", | |
"LogicalExpression" : 1, | |
"ObjectExpressionClosingBrace" : ">=1", | |
"Property" : ">=1", | |
"ReturnStatement" : 1, | |
"SwitchOpeningBrace" : 0, | |
"SwitchClosingBrace" : ">=1", | |
"ThisExpression" : -1, | |
"ThrowStatement" : ">=1", | |
"TryKeyword": -1, | |
"TryOpeningBrace" : 0, | |
"TryClosingBrace" : ">=1", | |
"VariableName" : ">=1", | |
"VariableValue" : 0, | |
"VariableDeclaration" : ">=1", | |
"VariableDeclarationWithoutInit" : ">=1", | |
"WhileStatement" : ">=1", | |
"WhileStatementOpeningBrace" : 0, | |
"WhileStatementClosingBrace" : ">=1" | |
}, | |
"after" : { | |
"AssignmentExpression" : ">=1", | |
"AssignmentOperator" : 0, | |
"BlockStatement" : 0, | |
"CallExpression" : -1, | |
"CatchOpeningBrace" : ">=1", | |
"CatchClosingBrace" : ">=0", | |
"CatchKeyword": 0, | |
"ConditionalExpression" : ">=1", | |
"DeleteOperator" : ">=1", | |
"DoWhileStatement" : ">=1", | |
"DoWhileStatementOpeningBrace" : ">=1", | |
"DoWhileStatementClosingBrace" : 0, | |
"EmptyStatement" : -1, | |
"FinallyKeyword" : -1, | |
"FinallyOpeningBrace" : ">=1", | |
"FinallyClosingBrace" : ">=1", | |
"ForInStatement" : ">=1", | |
"ForInStatementExpressionOpening" : "<2", | |
"ForInStatementExpressionClosing" : -1, | |
"ForInStatementOpeningBrace" : ">=1", | |
"ForInStatementClosingBrace" : ">=1", | |
"ForStatement" : ">=1", | |
"ForStatementExpressionOpening" : "<2", | |
"ForStatementExpressionClosing" : -1, | |
"ForStatementOpeningBrace" : ">=1", | |
"ForStatementClosingBrace" : ">=1", | |
"FunctionExpression" : ">=1", | |
"FunctionExpressionOpeningBrace" : ">=1", | |
"FunctionExpressionClosingBrace" : -1, | |
"FunctionDeclaration" : ">=1", | |
"FunctionDeclarationOpeningBrace" : ">=1", | |
"FunctionDeclarationClosingBrace" : ">=1", | |
"IfStatement" : ">=1", | |
"IfStatementOpeningBrace" : ">=1", | |
"IfStatementClosingBrace" : ">=1", | |
"ElseIfStatement" : ">=1", | |
"ElseIfStatementOpeningBrace" : ">=1", | |
"ElseIfStatementClosingBrace" : ">=1", | |
"ElseStatement" : ">=1", | |
"ElseStatementOpeningBrace" : ">=1", | |
"ElseStatementClosingBrace" : ">=1", | |
"LogicalExpression" : -1, | |
"ObjectExpressionOpeningBrace" : ">=1", | |
"Property" : 0, | |
"ReturnStatement" : -1, | |
"SwitchOpeningBrace" : ">=1", | |
"SwitchClosingBrace" : ">=1", | |
"UnaryExpression": 1, | |
"ThisExpression" : 0, | |
"ThrowStatement" : ">=1", | |
"TryKeyword": -1, | |
"TryOpeningBrace" : ">=1", | |
"TryClosingBrace" : 0, | |
"VariableDeclaration" : ">=1", | |
"WhileStatement" : ">=1", | |
"WhileStatementOpeningBrace" : ">=1", | |
"WhileStatementClosingBrace" : ">=1" | |
} | |
}, | |
"whiteSpace" : { | |
"value" : " ", | |
"removeTrailing" : 1, | |
"before" : { | |
"ArrayExpressionOpening" : 0, | |
"ArrayExpressionClosing" : 0, | |
"ArrayExpressionComma" : 0, | |
"ArgumentComma" : 0, | |
"ArgumentList" : 0, | |
"ArgumentListArrayExpression" : 0, | |
"ArgumentListFunctionExpression" : 0, | |
"ArgumentListObjectExpression" : 0, | |
"AssignmentOperator" : 1, | |
"BinaryExpression": 0, | |
"BinaryExpressionOperator" : 1, | |
"BlockComment" : 1, | |
"CallExpression" : -1, | |
"CatchParameterList" : 0, | |
"CatchOpeningBrace" : 1, | |
"CatchClosingBrace" : 1, | |
"CatchKeyword" : 1, | |
"CommaOperator" : 0, | |
"ConditionalExpressionConsequent" : 1, | |
"ConditionalExpressionAlternate" : 1, | |
"DoWhileStatementOpeningBrace" : 1, | |
"DoWhileStatementClosingBrace" : 1, | |
"DoWhileStatementConditional" : 1, | |
"EmptyStatement" : 0, | |
"ExpressionClosingParentheses" : 0, | |
"FinallyKeyword" : -1, | |
"FinallyOpeningBrace" : 1, | |
"FinallyClosingBrace" : 1, | |
"ForInStatement" : 1, | |
"ForInStatementExpressionOpening" : 1, | |
"ForInStatementExpressionClosing" : 0, | |
"ForInStatementOpeningBrace" : 1, | |
"ForInStatementClosingBrace" : 1, | |
"ForStatement" : 1, | |
"ForStatementExpressionOpening" : 1, | |
"ForStatementExpressionClosing" : 0, | |
"ForStatementOpeningBrace" : 1, | |
"ForStatementClosingBrace" : 1, | |
"ForStatementSemicolon" : 0, | |
"FunctionDeclarationOpeningBrace" : 1, | |
"FunctionDeclarationClosingBrace" : 1, | |
"FunctionExpressionOpeningBrace" : 1, | |
"FunctionExpressionClosingBrace" : 1, | |
"IfStatementConditionalOpening" : 1, | |
"IfStatementConditionalClosing" : 0, | |
"IfStatementOpeningBrace" : 1, | |
"IfStatementClosingBrace" : 1, | |
"ElseStatementOpeningBrace" : 1, | |
"ElseStatementClosingBrace" : 1, | |
"ElseIfStatementOpeningBrace" : 1, | |
"ElseIfStatementClosingBrace" : 1, | |
"MemberExpressionClosing" : 0, | |
"LineComment" : 1, | |
"LogicalExpressionOperator" : 1, | |
"Property" : 1, | |
"PropertyValue" : 1, | |
"ParameterComma" : 0, | |
"ParameterList" : 0, | |
"SwitchDiscriminantOpening" : 1, | |
"SwitchDiscriminantClosing" : 0, | |
"ThrowKeyword": 1, | |
"TryKeyword": -1, | |
"TryOpeningBrace" : 1, | |
"TryClosingBrace" : 1, | |
"UnaryExpressionOperator": 0, | |
"VariableName" : 1, | |
"VariableValue" : 1, | |
"WhileStatementConditionalOpening" : 1, | |
"WhileStatementConditionalClosing" : 0, | |
"WhileStatementOpeningBrace" : 1, | |
"WhileStatementClosingBrace" : 1 | |
}, | |
"after" : { | |
"ArrayExpressionOpening" : 0, | |
"ArrayExpressionClosing" : 0, | |
"ArrayExpressionComma" : 1, | |
"ArgumentComma" : 1, | |
"ArgumentList" : 0, | |
"ArgumentListArrayExpression" : 0, | |
"ArgumentListFunctionExpression" : 0, | |
"ArgumentListObjectExpression" : 0, | |
"AssignmentOperator" : 1, | |
"BinaryExpression": 0, | |
"BinaryExpressionOperator" : 1, | |
"BlockComment" : 1, | |
"CallExpression" : 0, | |
"CatchParameterList" : 0, | |
"CatchOpeningBrace" : 1, | |
"CatchClosingBrace" : 1, | |
"CatchKeyword" : 1, | |
"CommaOperator" : 1, | |
"ConditionalExpressionConsequent" : 1, | |
"ConditionalExpressionTest" : 1, | |
"DoWhileStatementOpeningBrace" : 1, | |
"DoWhileStatementClosingBrace" : 1, | |
"DoWhileStatementBody" : 1, | |
"EmptyStatement" : 0, | |
"ExpressionOpeningParentheses" : 0, | |
"FinallyKeyword" : -1, | |
"FinallyOpeningBrace" : 1, | |
"FinallyClosingBrace" : 1, | |
"ForInStatement" : 1, | |
"ForInStatementExpressionOpening" : 0, | |
"ForInStatementExpressionClosing" : 1, | |
"ForInStatementOpeningBrace" : 1, | |
"ForInStatementClosingBrace" : 1, | |
"ForStatement" : 1, | |
"ForStatementExpressionOpening" : 0, | |
"ForStatementExpressionClosing" : 1, | |
"ForStatementClosingBrace" : 1, | |
"ForStatementOpeningBrace" : 1, | |
"ForStatementSemicolon" : 1, | |
"FunctionReservedWord": 0, | |
"FunctionName" : 0, | |
"FunctionExpressionOpeningBrace" : 1, | |
"FunctionExpressionClosingBrace" : 0, | |
"FunctionDeclarationOpeningBrace" : 1, | |
"FunctionDeclarationClosingBrace" : 1, | |
"IfStatementConditionalOpening" : 0, | |
"IfStatementConditionalClosing" : 1, | |
"IfStatementOpeningBrace" : 1, | |
"IfStatementClosingBrace" : 1, | |
"ElseStatementOpeningBrace" : 1, | |
"ElseStatementClosingBrace" : 1, | |
"ElseIfStatementOpeningBrace" : 1, | |
"ElseIfStatementClosingBrace" : 1, | |
"MemberExpressionOpening" : 0, | |
"LogicalExpressionOperator" : 1, | |
"ObjectExpressionClosingBrace": 0, | |
"PropertyName" : 0, | |
"PropertyValue" : 0, | |
"ParameterComma" : 1, | |
"ParameterList" : 0, | |
"SwitchDiscriminantOpening" : 0, | |
"SwitchDiscriminantClosing" : 1, | |
"ThrowKeyword": 1, | |
"TryKeyword": -1, | |
"TryOpeningBrace" : 1, | |
"TryClosingBrace" : 1, | |
"UnaryExpressionOperator": 0, | |
"VariableName" : 1, | |
"WhileStatementConditionalOpening" : 0, | |
"WhileStatementConditionalClosing" : 1, | |
"WhileStatementOpeningBrace" : 1, | |
"WhileStatementClosingBrace" : 1 | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/ | |
npm-debug.log | |
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function quepowa(nakroqui) { | |
for (var srajaha = 0; srajaha < nakroqui.length; srajaha++) { | |
var dihucli = nakroqui[srajaha]; | |
if (dihucli.nodeType == nogpotem) { | |
return dihucli; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var giquosha = kihecod('removeClass', kepemin, phikeku(jasiki, '-remove'), function(diblepa) { | |
var boubiscen = kepemin.attr('class'); | |
return kepemin.removeClass(jasiki), diblepa = diblepa(), kepemin.attr('class', boubiscen), diblepa; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('Kimono').factory('Collections', ['Regex', 'Utils', 'Datatypes', 'Common', function(eyimop, fudebep, snosago, reepabit) {}]); | |
angular.module('Kimono').factory('Common', [function() {}]); | |
angular.module('Kimono').factory('Config', [function() {}]); | |
angular.module('Kimono').factory('Datatypes', ['Regex', 'Utils', 'Config', 'Selections', function(pajepis, riboosur, riloge, riletuf) {}]); | |
angular.module('Kimono').factory('Kimono_async', [function() {}]); | |
angular.module('Kimono').factory('Manipulation', ['Kimono_async', 'Utils', function(racefe) {}]); | |
angular.module('Kimono').factory('Regex', ['Utils', function(stupemem) {}]); | |
angular.module('Kimono').factory('Selections', ['Regex', 'Utils', function(bafobu, lehumo) {}]); | |
angular.module('Kimono').factory('Utils', ['Config', 'Common', function(kolienam, orinag) {}]); | |
angular.module('Kimono').animation('.kim-data-dot', ['Utils', function(nibabroun) {}]); | |
angular.module('Kimono').factory('HighlightManager', ['Config', 'Collections', 'Selections', 'Regex', 'Datatypes', 'Utils', function(slupofi, ledaso, trequarnal, trelixek, scickbokeb, leeliga) {}]); | |
angular.module('Kimono').factory('Validation', ['Utils', function(swouluju) {}]); | |
angular.module('Kimono').factory('WebServices', ['Config', '$q', 'Utils', '$location', function(undotug, cocagli) {}]); | |
angular.module('Kimono').controller('apiPanelController', ['$scope', '$timeout', 'Datatypes', 'Utils', 'HighlightManager', 'WebServices', function(oteckil, sustipel, gopisra, trilosed, ukmufoof, elcerep) {}]); | |
angular.module('Kimono').controller('attributesOverlayController', ['$scope', 'Validation', 'Regex', function(lefini, folokueck) {}]); | |
angular.module('Kimono').controller('authOverlayController', ['$scope', 'Validation', 'Regex', 'WebServices', '$timeout', '$location', 'Manipulation', 'HighlightManager', 'Utils', function(briebcukuk, slubalu, saronok, giekegi, hidanee, ripica, cihimu, bejepo, mogufe) {}]); | |
angular.module('Kimono').controller('doneOverlayController', ['$scope', 'Collections', 'WebServices', 'Utils', 'Regex', function(bofomer, onscatid, saquapox, docifu, phoscofal) {}]); | |
angular.module('Kimono').controller('extractorController', ['Config', '$scope', 'Datatypes', 'HighlightManager', 'Collections', 'Utils', 'Selections', '$timeout', function(gudumim, hamijo, fosarnod, karefis, nirogu, potquefab, esayak, sininap) {}]); | |
angular.module('Kimono').controller('illegalOverlayController', ['$scope', function(tedepab) {}]); | |
angular.module('Kimono').controller('largeOverlayController', ['$scope', function(netbrirbul) {}]); | |
angular.module('Kimono').controller('loginOverlayController', ['$scope', 'Validation', 'Regex', 'WebServices', '$timeout', function(doujimo, srekophi, sutafot, duecofay, rubobod) {}]); | |
angular.module('Kimono').controller('mainController', ['Config', '$scope', 'Collections', 'Datatypes', 'HighlightManager', 'WebServices', 'Utils', '$timeout', '$interval', 'Selections', 'Kimono_async', 'Common', function(udenit, duteque, luebolo, blufuta, fesabi, jikagiet, bubloku, gusati, jusnona, isuchig, nefime, fernirink) {}]); | |
angular.module('Kimono').controller('popupController', ['$scope', function(tietatpil) {}]); | |
angular.module('Kimono').controller('rawOverlayController', ['$scope', 'Collections', 'Utils', 'WebServices', 'Common', function(cibefu, sonahe, niefudu, niehesa, lolapfup) {}]); | |
angular.module('Kimono').controller('signupOverlayController', ['$scope', 'Validation', 'Regex', 'WebServices', '$timeout', function(quiquirnan, shupovoo, arlusool, fiklogab, beswopu) {}]); | |
angular.module('Kimono').controller('toolbarController', ['Config', '$scope', 'Datatypes', 'HighlightManager', 'Utils', 'WebServices', '$timeout', 'Common', function(topuzhok, ragoco, lortuguf, rueficu, sedoko, bicuge, ditesog, anesan) {}]); | |
angular.module('Kimono').controller('userCredentialsOverlayController', ['$scope', 'Validation', 'WebServices', 'HighlightManager', 'Manipulation', function(bifisu, lorira, lepukbot, fousedip, coliquo) {}]); | |
angular.module('Kimono').directive('animatedHighlight', ['Utils', function() {}]); | |
angular.module('Kimono').directive('kmDraggable', ['Collections', 'Utils', function() {}]); | |
angular.module('Kimono').directive('kmClickOutside', ['Utils', function() {}]); | |
angular.module('Kimono').directive('kmFade', ['Utils', function() {}]); | |
angular.module('Kimono').directive('kmPages', [function() {}]); | |
angular.module('Kimono').directive('kmPanel', ['Utils', function() {}]); | |
angular.module('Kimono').directive('kmSelector', ['Collections', 'Utils', '$compile', '$timeout', function(quokebe, famoquos, quegugof, guhomu) {}]); | |
angular.module('Kimono').directive('kmShow', [function() {}]); | |
angular.module('Kimono').directive('kmLoading', ['$compile', function() {}]); | |
angular.module('Kimono').directive('kmRepeat', ['$parse', '$animate', '$rootScope', 'kimonoList', function(shocarie, wesouca, jijopus, ukabar) {}]); | |
angular.module('Kimono').directive('kmSticky', ['$timeout', function(gegrielag) {}]); | |
angular.module('Kimono').filter('groupby', ['$filter', function(quanikiey) {}]); | |
angular.module('Kimono').filter('plural', ['$filter', function() {}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{window.angular;} | |
window.angular = {}; | |
var angular = window.angular; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cruquejo.angular.bootstrap && console.log('WARNING: Tried to load angular more than once.'), biltasul(), cuefeyas(pekanonk), baposi(mojequa).ready(function() { | |
obalieng(mojequa, grifuquel); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load in dependencies | |
var fs = require('fs'); | |
var _ = require('underscore'); | |
var rocambole = require('rocambole'); | |
// TODO: Look into: | |
// <div ng-controller="extractorController"></div> | |
// Load in Kimono's source | |
// TODO: We prob don't need rocambole, any walker will work | |
var input = fs.readFileSync('kimono.rename.js', 'utf8'); | |
var kimonoAst = rocambole.parse(input); | |
var kimonoNodes = []; | |
rocambole.recursive(kimonoAst, function saveNode (node) { | |
kimonoNodes.push(node); | |
}); | |
// Walk the kimono nodes and find our match | |
function findSubTree(containerNodes, treeNodes) { | |
var i = 0; | |
var len = containerNodes.length - treeNodes.length; | |
var match = null; | |
for (; i < len; i++) { | |
var j = 0; | |
var len2 = treeNodes.length; | |
for (; j < len2; j++) { | |
var containerNode = containerNodes[i + j]; | |
var treeNode = treeNodes[j]; | |
// TODO: This should also compare things like `kind` and whatnot | |
// console.log(containerNode.type, treeNode.type, containerNode.name, containerNode.value + ''); | |
if (containerNode.type !== treeNode.type) { | |
break; | |
} else if (containerNode.parent.type === 'MemberExpression' && containerNode.parent.property === containerNode) { | |
if (containerNode.name !== treeNode.name) { | |
break; | |
} | |
} | |
} | |
// If we reached the end, save the range of nodes | |
if (j > 2) { | |
// // DEV: We are getting trolled by block statement insertion | |
// console.log(j, len2); | |
// console.log(containerNode.type, treeNode.type, containerNode.name, containerNode.value + ''); | |
// console.log(containerNode.toString()); | |
// console.log(treeNode.toString()); | |
} | |
if (j === len2) { | |
match = { | |
start: i, | |
end: i + j | |
}; | |
break; | |
} | |
} | |
// Return our match | |
return match; | |
} | |
// Helper function to replace libraries with content | |
function replaceStartEnd(params) { | |
// Load in jQuery | |
var startAst = rocambole.parse(params.start); | |
var stopAst = rocambole.parse(params.stop); | |
// Calculate the AST signature for jQuery | |
// TODO: When we break this out, allow for identifiers to be included via an option | |
var startNodes = []; | |
rocambole.recursive(startAst, function saveNode (node) { | |
startNodes.push(node); | |
}); | |
var stopNodes = []; | |
rocambole.recursive(stopAst, function saveNode (node) { | |
stopNodes.push(node); | |
}); | |
// Trim off `Program` | |
startNodes.splice(0, 1); | |
stopNodes.splice(0, 1); | |
// Find the matching positions | |
var startMatch = findSubTree(kimonoNodes, startNodes); | |
var endMatch = findSubTree(kimonoNodes, stopNodes); | |
// console.log(startMatch); | |
// console.log(endMatch); | |
// var startMatch = { start: 86, end: 132 }; | |
// var endMatch = { start: 3823, end: 3835 }; | |
// Calculate where the content starts and ends | |
// DEV: We could work with the token tree but this is much more efficient | |
var input = params.input; | |
var startStr = kimonoNodes[startMatch.start].toString(); | |
var startIndex = input.indexOf(startStr); | |
var endStr = kimonoNodes[endMatch.start].toString(); | |
var endIndex = input.indexOf(endStr); | |
// console.log(startIndex); | |
// console.log(endIndex); | |
// Update the content and write our output | |
return input.substr(0, startIndex) + params.replacement + input.substr(endIndex); | |
} | |
// Replace jQuery, dragabilly, and angular in reverse order | |
var output = input; | |
// https://github.com/angular/code.angularjs.org/blob/3d466e8b56e55b92cb40a89584d0471ca4c159de/1.2.17/angular-animate.js | |
output = replaceStartEnd({ | |
input: output, | |
replacement: '\n\n\n/******* ng-animate 1.2.17 *******/\n\n\n', | |
start: fs.readFileSync('angular-animate-start.js', 'utf8'), | |
stop: fs.readFileSync('angular-animate-stop.js', 'utf8') | |
}); | |
output = replaceStartEnd({ | |
input: output, | |
replacement: '\n\n\n/******* angular 1.2.17 *******/\n\n\n', | |
start: fs.readFileSync('angular-start.js', 'utf8'), | |
stop: fs.readFileSync('angular-stop.js', 'utf8') | |
}); | |
output = replaceStartEnd({ | |
input: output, | |
replacement: '\n\n\n/******* underscore *******/\n\n\n', | |
start: fs.readFileSync('underscore-start.js', 'utf8'), | |
stop: fs.readFileSync('underscore-stop.js', 'utf8') | |
}); | |
output = replaceStartEnd({ | |
input: output, | |
replacement: '\n\n\n/******* draggabilly *******/\n\n\n', | |
start: fs.readFileSync('draggabilly-start.js', 'utf8'), | |
stop: fs.readFileSync('draggabilly-stop.js', 'utf8') | |
}); | |
output = replaceStartEnd({ | |
input: output, | |
replacement: '\n\n\n/******* jQuery 2.1.0 *******/\n\n\n', | |
start: fs.readFileSync('jquery-start.js', 'utf8'), | |
stop: fs.readFileSync('jquery-stop.js', 'utf8') | |
}); | |
fs.writeFileSync('kimono.markup.js', output, 'utf8'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load in dependencies | |
var fs = require('fs'); | |
var _ = require('underscore'); | |
var esformatter = require('esformatter'); | |
// Update the names | |
var input = fs.readFileSync('kimono.style.js', 'utf8'); | |
var output = esformatter.format(input, _.defaults({ | |
plugins: [ | |
// Rename | |
'esformatter-rename' | |
], | |
rename: { | |
variables: _.defaults({ | |
// DEV: Using shortened names and probable names because the minifier is fucking with us | |
// !function(dielistre, mocira, jifusten) { | |
dielistre: 'window', | |
mocira: 'document', | |
jifusten: 'undefined', | |
// return pudadieck.noConflict = function(refona) { | |
// https://github.com/jquery/jquery/blob/2.1.0/src/exports/global.js#L13 | |
pudadieck: 'jQuery', | |
// var kosecun = dielistre.$.noConflict(); | |
// var kosecun = window.$.noConflict(); | |
kosecun: 'jQuery', | |
// We are in jQuery until :3695 | |
// }, scinknamob.getListenersAsObject = function(bothuci) { | |
// https://github.com/Wolfy87/EventEmitter/blob/v4.2.9/EventEmitter.js | |
// TODO: Find out version for markup | |
scinknamob: 'EventEmitter', | |
// }, mikootu.prototype.measureContainment = function() { | |
// https://github.com/desandro/draggabilly/blob/v1.1.1/draggabilly.js#L372-L373 | |
// TODO: Find out version for markup | |
mikootu: 'Draggabilly', | |
// }), ficoje.sortedIndex = function(jemudrey, nadnegstis, manubor, ruroka) { | |
// https://github.com/jashkenas/underscore/blob/1.6.0/underscore.js | |
// 1.6.0 - brelorug.VERSION = '1.6.0'; | |
ficoje: '_', | |
// }(dielistre, mocira), !etalod.$$csp() && etalod.element(mocira).find('head').prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}</style>'), function(gateku, firuree, necido) { | |
// https://github.com/angular/code.angularjs.org/blob/3d466e8/1.2.17/angular.js#L21674 | |
// 1.2.17 - '\nhttp://errors.angularjs.org/1.2.17/' | |
etalod: 'angular', | |
// More items to rename | |
// DEV: These are mostly used by angular | |
// var sloreme = window.Draggabilly; | |
// var ipudquos = window.classie; | |
// var quulutif = window.EventEmitter; | |
// var quinetu = window.eventie; | |
// var batifi = window.getStyleProperty; | |
// var hudapep = window.getSize; | |
// var fajemag = window.Draggabilly; | |
// var gehasi = this; | |
// var vefequa = gehasi._; | |
// var cituji = {}; | |
// var prusiqui = Array.prototype; | |
// var sabige = Object.prototype; | |
// var quahacli = Function.prototype; | |
// var imiyem = prusiqui.push; | |
// var cueceque = prusiqui.slice; | |
// var bilnexep = prusiqui.concat; | |
// var gushuque = sabige.toString; | |
// var fodrufash = sabige.hasOwnProperty; | |
// var kubagsim = prusiqui.forEach; | |
// var nuquiku = prusiqui.map; | |
// var quogache = prusiqui.reduce; | |
// var uruepip = prusiqui.reduceRight; | |
// var niroquo = prusiqui.filter; | |
// var meyoufub = prusiqui.every; | |
// var ridanol = prusiqui.some; | |
// var tenelod = prusiqui.indexOf; | |
// var lopuned = prusiqui.lastIndexOf; | |
// var mugeborn = Array.isArray; | |
// var kobbrooskeb = Object.keys; | |
// var srokale = quahacli.bind; | |
sloreme: 'Draggabilly', | |
ipudquos: 'classie', | |
quulutif: 'EventEmitter', | |
quinetu: 'eventie', | |
batifi: 'getStyleProperty', | |
hudapep: 'getSize', | |
fajemag: 'Draggabilly2', | |
gehasi: 'probWindow', | |
vefequa: '_2', | |
cituji: 'EmptyObject', | |
prusiqui: 'ArrayProto', | |
sabige: 'ObjectProto', | |
quahacli: 'FunctionProto', | |
imiyem: 'ArrayPush', | |
cueceque: 'ArraySlice', | |
bilnexep: 'ArrayConcat', | |
gushuque: 'ObjectToString', | |
fodrufash: 'ObjectHasOwnProperty', | |
kubagsim: 'ArrayForEach', | |
nuquiku: 'ArrayMap', | |
quogache: 'ArrayReduce', | |
uruepip: 'ArrayReduceRight', | |
niroquo: 'ArrayFilter', | |
meyoufub: 'ArrayEvery', | |
ridanol: 'ArraySome', | |
tenelod: 'ArrayIndexOf', | |
lopuned: 'ArrayLastIndexOf', | |
mugeborn: 'isArray', | |
kobbrooskeb: 'ObjectKeys', | |
srokale: 'bind', | |
// r jQuery = '$animate:' + probDoc;_ && _[jQuery] && 0 < _[jQuery].length && delijong(function() { | |
// https://github.com/angular/bower-angular-animate/blob/v1.3.3-build.3558%2Bsha.fbad280/angular-animate.js#L1428 | |
// TODO: Find out version for markup | |
// Kimono's modules run approx from 11049 to EOF with 48 modules | |
// angular.module | |
// var nipope = angular.module('Kimono'); | |
nipope: 'Kimono' | |
}, require('./extract-angular-names.js')) | |
}, | |
}, JSON.parse(fs.readFileSync('.esformatter')))); | |
// Output the result | |
fs.writeFileSync('kimono.rename.js', output); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load in dependencies | |
var fs = require('fs'); | |
var _ = require('underscore'); | |
var esformatter = require('esformatter'); | |
var tokenUtils = require('rocambole-token'); | |
// Add a token for these fucking semicolons | |
esformatter.register({ | |
tokenAfter: function (token) { | |
// If the token is a semicolon and the next is not a new line, insert a new line | |
if (tokenUtils.isSemiColon(token) && !tokenUtils.isBr(token.next)) { | |
tokenUtils.after(token, { | |
type: 'LineBreak', | |
value: '\n' // TODO: Use value from options | |
}); | |
} | |
} | |
}); | |
// Format the content to our liking | |
var input = fs.readFileSync('kimono.min.js', 'utf8'); | |
var output = esformatter.format(input, _.defaults({ | |
plugins: [ | |
// Style and basic name expansion | |
'esformatter-braces', | |
'esformatter-phonetic', | |
'esformatter-quotes', | |
'esformatter-semicolons', | |
'esformatter-var-each' | |
], | |
quotes: { | |
type: 'single', | |
avoidEscape: false | |
}, | |
phonetic: { | |
baseSeed: 1337, | |
renamePerScope: true | |
} | |
}, JSON.parse(fs.readFileSync('.esformatter')))); | |
// Output the result | |
fs.writeFileSync('kimono.style.js', output); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Exit on first error and echo commands | |
set -e | |
set -x | |
# Download our libraries | |
mkdir vendor || true; | |
wget http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js -O vendor/jquery.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mucife(drugubam, mucife) { | |
for (var fuboyhag in mucife) { | |
drugubam[fuboyhag] = mucife[fuboyhag]; | |
} | |
return drugubam; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var teydifuey = (new Date).getTime(); | |
var gejelo = Math.max(0, 16 - (teydifuey - swokihuf)); | |
var snugresi = grisradrer.setTimeout(function() { | |
sotoyun(teydifuey + gejelo); | |
}, gejelo); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load in dependencies | |
var fs = require('fs'); | |
var esprima = require('esprima-fb'); | |
// Load in our names | |
var angularNamesStr = fs.readFileSync('angular-names.js', 'utf8'); | |
var ast = esprima.parse(angularNamesStr); | |
// Traverse the statements | |
// angular.module('Kimono').factory('Collections', ['Regex', 'Utils', 'Datatypes', 'Common', function(eyimop, fudebep, snosago, reepabit) {}]); | |
// angular.module('Kimono').factory('Common', [function() {}]); | |
// angular.module('Kimono').factory('Config', [function() {}]); | |
// angular.module('Kimono').factory('Datatypes', ['Regex', 'Utils', 'Config', 'Selections', function(pajepis, riboosur, riloge, riletuf) {}]); | |
// angular.module('Kimono').controller('apiPanelController', ['$scope', '$timeout', 'Datatypes', 'Utils', 'HighlightManager', 'WebServices', function(oteckil, sustipel, gopisra, trilosed, ukmufoof, elcerep) {}]); | |
var statements = ast.body; | |
// var statements = ast.body.slice(0, 1); | |
var retObj = {}; | |
statements.forEach(function extractIdentifiers (statement) { | |
// angular.module('Kimono').factory('Collections', ['Regex', 'Utils', 'Datatypes', 'Common', function(eyimop, fudebep, snosago, reepabit) {}]); | |
// {'Collections', ['Regex', ...]} (expression.arguments) -> ['Regex', ...] ([1]) | |
var factoryArr = statement.expression.arguments[1]; | |
// Extract the names and their identifiers | |
// 'Regex', ..., fn (elements) | |
var factoryItems = factoryArr.elements; | |
var names = factoryItems.slice(0, -1); | |
var identifiers = factoryItems[factoryItems.length - 1].params; | |
// For each of the identifiers | |
var i = 0; | |
var len = Math.min(names.length, identifiers.length); | |
for (; i < len; i++) { | |
retObj[identifiers[i].name] = names[i].value; | |
} | |
}); | |
// Expose the names | |
module.exports = retObj; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'object' == typeof module && 'object' == typeof module.exports ? module.exports = luloso.document ? eloyhad(luloso, !0) : function(soonietbot) { | |
if (!soonietbot.document) { | |
throw new Error('jQuery requires a window with a document'); | |
} | |
return eloyhad(soonietbot); | |
} : eloyhad(luloso); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hedibu = gosura.jQuery; | |
var diqueque = gosura.$; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-controller="largeOverlayController" id="kim-Large-Overlay" class="kim" km-fade="show" km-in="true" km-out="true" opacity="0.95"> | |
<h1><a href="" ng-click="link('http://kimonolabs.com/')">kimono<span>labs</span></a></h1> | |
<button ng-if="backButton" ng-click="close()" class="kim-close-button kim kim-button" style="display: inline-block;" ng-hide="flags.hideBackButton">Back</button> | |
<!-- Done Overlay --> | |
<div ng-controller="doneOverlayController" id="kim-DoneOverlay" km-enter="enter" km-in="true" km-fade="currentOverlay == 'done'" class="kim-button-container" opacity="0.95"> | |
<div km-fade="doneStep == 1" km-in="true" km-out="true" duration="500" class="kim-step-1"> | |
<p class="kim-done-form-title" style="display: block;">Enter your API details</p> | |
<div id="kim-DoneForm" name="createApiForm" novalidate style="display: block; top: 153px;"> | |
<input type="text" ng-model="apiName" id="kim-APIName" name="apiName" ng-keyup="keyUpInApiNameField($event)" placeholder="API name" ng-keydown="error = false;"> | |
<div class="kim-TagsSelector" km-selector km-items="tags" km-model="apiTags" km-hide="apiTags.length >= 5"> <span ng-hide="apiTags.length || isVisible" class="kim-tags-reminder">Add tags</span> | |
<input type="text" id="kim-APITags" name="apiTag"></input> | |
</div> | |
<div class="kim-api-config"> | |
<select id="kim-Frequency" name="crawlFrequency" ng-model="selectedFrequency" ng-options="i.id as utils.displayFrequency(i.id, flags.hasPagination) for i in frequencies | filter:filterFrequencies"></select> | |
<select ng-show="flags.hasPagination" ng-model="selectedCrawlLimit" ng-options="i.id as utils.displayCrawlLimit(i.id) for i in crawlLimits" id="kim-CrawlLimit" name="limit"></select> | |
</div> | |
<div> | |
<input type="submit" ng-click="createApi()" ng-disabled="loading" class="kim-create-api-button kim kim-button" value="{{createApiButtonLabel()}}"> <span class="kim-spinner" ng-show="loading"></span> </div> | |
<div class="kim-error-container" km-fade="error" km-in="true" km-out="true"> | |
<p class="kim-api-form-error">{{errorMessage}}</p> | |
</div> | |
</div> | |
</div> | |
<div km-fade="doneStep == 2" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> | |
<p class="kim" id="kim-APIResponseMessage">API <span class="kim-created-updated">{{createdOrUpdated()}}</span>, Bam! Check it out at <a class="kim-api-link" href="" ng-click="link(config.KM_HOST_WWW + '/apis/' + apiID)">/apis/{{apiID}}</a>.</p> | |
</div> | |
<div km-fade="doneStep == -1" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> | |
<p class="kim" id="kim-APIResponseMessage">Sorry. Something went wrong and we couldn't create an API from this page. A bug report has been created.</p> | |
</div> | |
</div> | |
<!-- Illegal Overlay --> | |
<div ng-controller="illegalOverlayController" id="kim-IllegalOverlay" km-enter="enter" km-in="true" km-fade="currentOverlay == 'illegal'" class="kim-button-container" opacity="0.95"> | |
<div class="kim-step-2"> | |
<p class="kim" id="kim-APIResponseMessage">Sorry. Due to the policy of this target domain we cannot extract data from this site.</p> | |
</div> | |
</div> | |
<!-- No Support Overlay --> | |
<div id="kim-NoSupportOverlay" km-in="true" km-out="true" km-fade="currentOverlay == 'nosupport'" class="kim-button-container" opacity="0.95"> | |
<div class="kim-step-2"> | |
<p class="kim" id="kim-APIResponseMessage">Sorry. Our auth feature is incompatible with this site, check back often on our <a href="" ng-click="followLink('http://blog.kimonolabs.com/')">blog</a> for updates.</p> | |
</div> | |
</div> | |
<!-- Login Overlay Overlay --> | |
<div ng-controller="loginOverlayController" id="kim-LoginOverlay" km-enter="enter" leave-duration="500" km-in="true" km-out="true" km-fade="currentOverlay == 'login'" class="kim-button-container" opacity="0.95"> | |
<div km-fade="loginStep == 1" km-in="true" km-out="true" duration="500" class="kim-step-1"> | |
<form id="kim-LoginForm" name="kmLoginForm" novalidate> | |
<p>You must log in first:</p> | |
<input ng-model="form.username" ng-keydown="loginError = false;" type="text" name="email" id="kim-LoginEmail" placeholder="email"> | |
<input ng-model="form.password" ng-keydown="loginError = false;" type="password" name="password" id="kim-LoginPassword" placeholder="password"> | |
<button ng-click="login()" class="kim-login-button kim kim-button">Login</button> <span km-fade="loading" ng-show="loading" class="kim-spinner"></span> <span class="kim kim-login-trouble">Having trouble? <a href="" ng-click="link(config.KM_HOST_WWW + '/forgotpassword')">Forgot password</a></span> | |
<div km-fade="loginError" km-in="true" km-out="true" class="kim-error-container"> | |
<p class="kim-login-error">Incorrect email/password combination. Try again.</p> | |
</div> | |
</form> | |
<div> | |
<p>Or you can <span class="kim kim-signup"><a href="" ng-click="showLargeOverlay('signup')">signup here</a></span> | |
</p> | |
</div> | |
</div> | |
<div km-fade="loginStep == 2" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> | |
<p style="text-align:center">Login successful</p> | |
</div> | |
</div> | |
<!-- Signup Overlay --> | |
<div ng-controller="signupOverlayController" id="kim-LoginOverlay" km-enter="enter" km-in="true" delay="500" duration="500" km-fade="currentOverlay == 'signup'" class="kim-button-container" opacity="0.95"> | |
<div km-fade="signupStep == 1" km-in="true" km-out="true" duration="500" class="kim-step-1"> | |
<form id="kim-LoginForm" class="kim-signup" name="kmSignupForm" novalidate> | |
<p>Signup for Kimono<span style="vertical-align:super; font-size:10px;">BETA</span> | |
</p> | |
<input ng-model="form.name" ng-keydown="resetErrors()" type="text" name="name" id="kim-SignupName" placeholder="name"> | |
<input ng-model="form.username" ng-keydown="resetErrors()" type="text" name="email" id="kim-SignupEmail" placeholder="email"> | |
<input ng-model="form.password" ng-keydown="resetErrors()" type="password" name="password" id="kim-SignupPassword" placeholder="password"> | |
<button ng-click="signup()" class="kim-signup-button kim kim-button">Signup</button> | |
<p class="kim-helper-text">By signing up, you are agreeing to our | |
<br/><a href="" ng-click="link(config.KM_HOST_WWW + '/terms')" target="_self">Terms of service</a> and <a href="" ng-click="link(config.KM_HOST_WWW + '/terms')" target="_self">Privacy policy</a> | |
</p> <span km-fade="loading" ng-show="loading" class="kim-spinner"></span> | |
<div km-fade="signupError " km-in="true" duration="300" km-out="true" class="kim-error-container"> | |
<p ng-show="errors.name" class="kim-login-error">Name is required.</p> | |
<p ng-show="errors.email" class="kim-login-error">{{errors.email}}</p> | |
<p ng-show="errors.password" class="kim-login-error">Password must contain 6 characters</p> | |
</div> | |
</form> | |
</div> | |
<div km-fade="signupStep == 2" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> | |
<p style="text-align:center">Signup successful</p> | |
</div> | |
</div> | |
<!-- Auth Overlay --> | |
<div ng-controller="authOverlayController" id="kim-LoginOverlay" km-in="true" km-fade="currentOverlay == 'auth'" class="kim kim-button-container" opacity="0.95"> | |
<div class="kim-step-1"> | |
<form id="kim-LoginForm" name="kmAuthForm" novalidate style="height:290px;"> | |
<p>Please enter your login information:</p> | |
<p class="host-indicator">{{host}}</p> | |
<input ng-model="form.username" type="text" name="email" id="kim-LoginEmail" placeholder="email"> | |
<input ng-model="form.password" type="password" name="password" id="kim-LoginPassword" placeholder="password"> | |
<div class="kim-hint-checkbox"> | |
<input type="checkbox" value="1" ng-model="authAgree" ng-change="agree()" id="AgreeCheckbox" name="" /> | |
<label for="AgreeCheckbox"></label> | |
</div> | |
<p class="auth-agreement" ng-class="agreeError">I agree to store my login information for {{host}} on kimonolabs.com so that this API can automatially login and retrieve data specific to my account.</p> | |
<div> | |
<button ng-click="authLogin()" class="kim-login-button kim kim-button kim-auth-login-button">Login</button> | |
</div> | |
<p class="auth-fineprint">We use the latest secure encryption technologies to ensure safe transport and storage of your credentials. You will have the ability to update or remove your stored credentials at any time. APIs created from sites requiring authentication are automatically set to private and the data can only be accessed by your kimono account through secure authentication.</p> | |
</form> | |
</div> | |
</div> | |
</div> | |
<div class="kim-Overlay kim" km-fade="flags.currentView != 'extractor'" km-in="true" km-out="true" opacity="0.95"> | |
<div class="kim kim-container" ng-controller="dataOverlayController" ng-show="flags.currentView == 'data'"> | |
<div class="col-md-2 collectionsInfo"> | |
<h1>{{collections.length}} {{collectionTitle}}</h1> | |
<div id="kim-ModeSwitch"> | |
<div> | |
<div> <a ng-click="mode = 'simple'" ng-class="{active : mode == 'simple'}" class="kim-type-button kim-button-simple">Simple</a> <a ng-click="mode = 'advanced'" ng-class="{active : mode == 'advanced'}" class="kim-type-button kim-button-advanced">Advanced</a> <a ng-click="mode = 'editor'" ng-class="{active : mode == 'editor', disabled: flags.mode == 'loginMode'}" class="kim-type-button kim-button-edit">Editor</a> </div> | |
<div> <a ng-click="showPopup('rssInfo')" class="kim-action-button kim-button-rssinfo2">Want RSS? Read this</a> </div> | |
</div> | |
</div> | |
</div> | |
<div class="scroll"> | |
<form name="advancedModeForm" ng-submit="update(tmpCollections)"> | |
<div ng-hide="collectionNames[$index] == 'Pagination' && mode == 'editor'" class="collection kim-clearfix" km-repeat="collection in tmpCollections"> | |
<input class="kim kim-data-field kim-collection-name" ng-disabled="collectionNames[$index] == 'Pagination' || flags.mode == 'loginMode'" kimonocollection="$index" ng-model="collectionNames[$index]"> | |
<div class="kim-clearfix datatype" km-repeat="datatype in collection" ng-init="realDatatype = collections[$parent.$index][$index]"> | |
<div km-draggable start="editor.dragStart" end="editor.dragEnd" drag="editor.drag" axis="'y'" datatypeIndex="{{realDatatype.context.index}}" collectionIndex="{{$parent.$index}}" km-fade="mode == 'editor'" display="inline-block" class="kim kim-datatype-avatar kim-datatype-dropzone kim-{{config.colors[realDatatype.context.index]}}">{{realDatatype.name}}</div> | |
<input ng-disabled="realDatatype.context.index == 'pagination' || flags.mode == 'loginMode'" ng-show="mode != 'editor'" class="kim kim-data-field kim-datatype-name kim-{{getColor(realDatatype.context.index)}}" ng-model="realDatatype.name"> | |
<div style="float:left;"> | |
<div ng-show="mode == 'advanced'" class="advancedAttributes" km-repeat="selectorObject in datatype.selectorObjects"> | |
<ng-form name="datatypeForm"> | |
<input name="selectorField" class="kim kim-data-field kim-code-field kim-datatype-selector animate-me-up" ng-model="selectorObject.selector" selector> | |
<input name="regexField" style="display:inline-block;" class="kim kim-data-field kim-code-field kim-datatype-regex animate-me-up" ng-model="selectorObject.regex" regex> </ng-form> <a ng-show="flags.mode != 'loginMode'" ng-click="showAttributes(realDatatype.context.index)" class="kim kim-data-link">Attributes</a> </div> | |
<div ng-show="mode == 'simple'" animated-highlight datatype-index="{{realDatatype.context.index}}" class="animated-highlight"></div> | |
</div> | |
</div> | |
<div ng-show="mode == 'editor'" collectionIndex="{{$index}}" class="kim kim-data-field kim-collection-dropzone kim-show-when-dragging"></div> | |
</div> | |
<input ng-show="mode == 'editor'" disabled class="kim kim-data-field kim-collection-name" value="New Collection"> | |
<div ng-show="mode == 'editor'" collectionIndex="new" class="kim kim-data-field kim-collection-dropzone kim-show-when-dragging"></div> | |
<div ng-show="mode == 'advanced'" id="kim-AdvancedButtons"> | |
<input ng-disabled="isUnchanged(collections, tmpCollections) || advancedModeForm.$invalid" type="submit" class="kim-advanced-button kim-button-apply kim kim-button"> | |
<button ng-disabled="isUnchanged(collections, tmpCollections) || advancedModeForm.$invalid" ng-click="resetAdvancedModeForm()" class="kim-advanced-button kim-button-reset kim kim-button">Reset</button> <span km-fade="advancedModeForm.$invalid" km-in="true" km-out="true" display="inline-block" class="kim-selector-error">{{errorMessage}}</span> </div> | |
</div> | |
</form> | |
</div> | |
<div class="kim kim-container" ng-controller="rawOverlayController" km-fade="flags.currentView == 'raw'" km-enter="enter"> | |
<div class="col-md-2 collectionsInfo"> | |
<h1>{{collections.length}} {{collectionTitle}}</h1> | |
<div id="kim-ModeSwitch"> | |
<div> | |
<div> <a ng-click="mode = 'json'" ng-class="{active : mode == 'json'}" class="kim-type-button kim-button-simple">JSON</a> <a ng-click="mode = 'csv'" ng-class="{active : mode == 'csv'}" class="kim-type-button kim-button-advanced">CSV</a> <a ng-click="mode = 'rss'" ng-class="{active : mode == 'rss'}" class="kim-type-button kim-button-edit">RSS</a> </div> | |
<div> <a ng-click="download()" class="kim-action-button kim-button-download">Download {{mode | uppercase}}</a> <a ng-click="selectText()" ng-hide="mode == 'csv'" class="kim-action-button kim-button-select">Select All Text</a> <a ng-click="selectCurrentTable()" ng-show="mode == 'csv'" class="kim-action-button kim-button-select">Select {{selectedCollection}}</a> <a ng-show="mode == 'rss'" ng-click="showPopup('rssInfo')" class="kim-action-button kim-button-rssinfo2">Want RSS? Read this</a> </div> | |
</div> | |
</div> | |
</div> | |
<div class="scroll"> <pre ng-show="mode == 'json'" class="kim-code json">{{json | json}}</pre> | |
<div ng-show="mode == 'csv'" class="kim-spreadsheet"> | |
<div id="kim-SheetSwitch"> <a ng-repeat="(collection, data) in table" ng-click="clickTableCollection(collection)" ng-class="{active : selectedCollection == collection}">{{collection}}</a> </div> | |
<div> | |
<table> | |
<tr> | |
<th ng-class="'kim-' + config.colors[ table[selectedCollection].datatypeindices[$index] ] + '-color'" ng-repeat="name in table[selectedCollection].colnames">{{name}}</th> | |
</tr> | |
<tr ng-repeat="row in table[selectedCollection].rows"> | |
<td ng-repeat="value in row track by $index">{{value}}</td> | |
</tr> | |
</table> | |
</div> | |
</div> <pre ng-show="mode == 'rss'" class="kim-code rss">{{rss}}</pre> </div> | |
</div> | |
</div> | |
<div ng-controller="popupController" class="kim-Overlay kim" km-fade="show" km-in="true" km-out="true" opacity="0.95"> | |
<div class="kim kim-container" ng-controller="attributesOverlayController" km-fade="currentPopup == 'attributes'" km-in="true" km-out="true" km-enter="enter"> | |
<div class="kim" id="kim-AttributeExtractor" style="opacity: 1;"> | |
<div> | |
<a ng-click="close()" class="kim kim-close-ae"></a> | |
<p>Select the specific attributes you want to extract for the elements matched by this selector.</p> | |
<ul id="kim-AttrList"> | |
<li> | |
<label> | |
<input ng-model="textContent" type="checkbox" id="kim-TextContent"> Text Content</label> | |
</li> | |
<li class="kim-attribute" km-repeat="attribute in attributes"> | |
<label> | |
<input class="kim-regex-check" ng-model="attribute.value" type="checkbox"> {{attribute.attribute}}</label> | |
</li> | |
</ul> | |
<ul class="kim-last"> | |
<li> | |
<label> | |
<input type="checkbox" ng-model="hiddenElements" id="kim-HiddenElements"> Include Hidden Elements</label> | |
</li> | |
</ul> | |
<div class="kim-apply-button-container"> | |
<button class="kim kim-apply-ae kim-button" ng-click="apply()">Apply</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="kim kim-container" ng-click="close()" km-fade="currentPopup == 'rssInfo'" km-in="true" km-out="true"> | |
<div class="kim" id="kim-RSSInfo" style="opacity: 1;"> | |
<div> | |
<a class="kim kim-close-ae"></a> | |
<p>To build an RSS feed with kimono, you must make sure your API has only one collection, and that the collection contains at least a one property. If you want to populate your RSS feed with description, author, pubDate or comments, you must create properties on your API with the appropriate property names.</p> | |
<table> | |
<tbody> | |
<tr> | |
<td>title <span>LINK</span> | |
</td> | |
<td>The title of the item (must also be a link to the content)</td> | |
</tr> | |
<tr> | |
<td>description</td> | |
<td>The item synopsis</td> | |
</tr> | |
<tr> | |
<td>author</td> | |
<td>Author of the item</td> | |
</tr> | |
<tr> | |
<td>category</td> | |
<td>Category for the item</td> | |
</tr> | |
<tr> | |
<td>pubDate</td> | |
<td>When the item was published</td> | |
</tr> | |
<tr> | |
<td>comments <span>LINK</span> | |
</td> | |
<td>Comments URL (must be a link to a comments page)</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
</div> | |
</div> | |
<div class="kim kim-container" ng-click="close()" km-fade="currentPopup == 'incorrectLogin'" km-in="true" km-out="true"> | |
<div class="kim" id="kim-AttributeExtractor" style="opacity: 1;"> | |
<div> | |
<a class="kim kim-close-ae"></a> | |
<p>Can't activate login credential mode.</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!--- Toast Message --> | |
<div class="kim kim-toast-wrapper" km-fade="flags.toasting" km-in="true" km-out="true" translate-vector="(0, 20px, 0)" duration="250"> | |
<p class="kim kim-toast kim-{{flags.toastType}}"> {{flags.toastMessage}} </p> | |
</div> | |
<!-- extractor --> | |
<div ng-controller="extractorController"></div> | |
<!--<div km-fade="flags.showNotificationPanel" km-in="true" km-out="true" id="kim-Notifications"> <div class="kim-notification-wrapper"> <div class="kim-header"> <div class="kim-title">What's New</div> <div class="kim-links"><div class="reject" ng-click="flags.showNotificationPanel = false"></div></div> </div> <div class="kim-notifications"> <div class="kim-notification" ng-class="{'new': new_features[key]}" ng-repeat="(key, notification) in config.data.features | reverse" ng-click="link(notification.link)"> <div class="kim-notification-title"> {{notification.title}} </div> <div class="kim-thumb" ng-class="{'kim-green': notification.type == 'New Feature', 'kim-purple': notification.type == 'News', 'kim-red': notification.type == 'Bug Fix'}"> {{notification.type}} </div> <div class="kim-text">{{notification.message | limit: 30}}</div> <div class="arrow"></div> </div> </div> <a href="" class="kim-more" ng-click="link(config.KM_HOST_WWW+'/blog')">More News</a> </div></div>--> | |
<div km-fade="flags.showNotificationPanel" km-in="true" km-out="true" id="kim-Notifications"> | |
<div class="kim-notification-wrapper"> | |
<div class="kim-notifications"> | |
<div class="kim-notification" ng-class="{'new': new_features[key]}" ng-repeat="(key, notification) in allFeatures | reverse" ng-click="link(notification.link)"> | |
<div class="kim-thumb" ng-class="{'kim-green': notification.type == 'New Feature', 'kim-purple': notification.type == 'News', 'kim-red': notification.type == 'Bug Fix'}"> {{notification.type}} </div> | |
<p class="kim-body">{{notification.message}}</p> | |
<div class="arrow"></div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Api Popup --> | |
<div id="kim-ApiPanel" km-loading message="Loading API data" font-size="18" model="loading" ng-show="flags.showApiPanel" ng-controller="apiPanelController" km-panel show-toggle="open" width="300" height="300" offset="44"> | |
<div ng-click="toggle()" class="panel-header">{{(siteApis.length + ' Existing Kimono APIs') | limit: 40}}</span> | |
<!-- <div ng-click="showHelp = !showHelp" class="question"></div> --> | |
<div ng-class="{open: open}" class="arrow"></div> | |
</div> | |
<div class="panel-list"> | |
<div style="position:relative; z-index:10;" km-repeat="api in siteApis"> | |
<div class="kim-api-item" ng-click="getApi(api)" ng-class="{selected: flags.currentApi.id == api.id}"> <span>{{api.name | limit: 14}}</span> | |
<div class="kim-collection-indicator"> | |
<div class="single_collection" ng-repeat="collection in api.collections"> | |
<div ng-repeat="datatype in collection" class="datatype kim-{{getColor(datatype.context.index)}}"></div> | |
</div> | |
</div> | |
</div> | |
<div class="kim-action-buttons"> | |
<div ng-if="false" ng-click="link(config.KM_HOST + '/apis/' + api.id)" class="accept">Use</div> | |
<div ng-if="false" ng-click="done()" class="clone">Clone</div> | |
<div ng-click="cancel()" class="reject">Unload</div> | |
</div> | |
</div> | |
<div class="kim-othersite-item" ng-click="kimonify(rootDomain + site)" ng-repeat="(site, apis) in otherSites"> {{(apis.length + ' more ' + ('api' | plural: apis.length)) | limit: 40}} <span>{{(rootDomain + site) | limit: 40}}</span> | |
<div class="arrow"></div> | |
</div> | |
</div> | |
<!-- <div class="api-view"> <div class="navbar title"> <div ng-click="back()" class="nav-button left"><div class="arrow left"></div></div> <div class="nav-button right" ng-click="getApi(selectedApi.id)"><div class="download"></div></div> <div class="nav-title center">{{selectedApi.name | limit: 18}}</div> </div> <div style="height:260px; overflow:scroll;"> <div class="collection" ng-repeat="collection in selectedApi.collectionNames"> <div class="collection-title">{{collection | limit: 11}}</div> <div class="datatypes"> <div ng-repeat="datatype in selectedApi.collections[$index]" class="datatype-title"> <div class="border kim-{{getColor(datatype.context.index)}}"></div> {{datatype.name | limit:13}} </div> </div> </div> </div> </div> --></div> | |
<div ng-controller="toolbarController" id="kim-Toolbar" class="kim"> | |
<div class="kim-toolbar-section active"> | |
<h1 style="vertical-align: middle;"><a href="" ng-click="link('http://kimonolabs.com/')">kimono<span>labs</span></a></h1> | |
<a class="kim-new" title="New Features" ng-show="allFeatures.length > 0" ng-class="{'active':flags.showNotificationPanel, 'highlighted': (new_features | size) > 0}" ng-click="openNotifications()"></a> | |
<!-- <span ng-show="(new_features | size) > 0" ng-class="{'kim-dot-sm': new_features.length > 99, 'kim-dot-md': new_features.length > 9, 'kim-dot-xs': new_features.length > 999 }" class="kim-notification-badge">{{new_features | size}}</span> --> | |
<p ng-show="(new_features | size) > 0" class="beta-tag kim-feature-count">{{new_features | size}}</p> | |
<!-- <form role="form" id="kim-UrlForm" action="http://kimonolabs.com/load" method="get"> <input class="kim" type="text" id="kim-ToolbarUrl" name="url" placeholder="any url" value="{{ targetUrl }}"> <a class="kim-toolbar-button kim-urlgo"></a> </form> --> | |
</div> | |
<div class="kim-toolbar-section first" km-fade="!flags.navigate" km-in="true" km-out="true" display="inline-block;"> | |
<input class="kim" type="text" id="kim-ToolbarDataName" name="ToolbarDataName" placeholder="property1" ng-disabled="datatypeIndex == 'pagination' || flags.mode == 'loginMode'" ng-model="datatypes[datatypeIndex].name" ng-keydown="keydown($event)"> </div> | |
<div class="kim-toolbar-section kim-datatypes" km-fade="!flags.navigate" km-in="true" km-out="true" display="inline-block"> <a ng-mouseenter="dataDotHover($index)" ng-mouseleave="dataDotUnhover($index)" km-repeat="datatype in datatypes" km-list="toolbarDatatypes" km-enter="datatypeEnter" type="medium" kimonodatatype="{{$index}}" ng-click="changeDatatype($index)" ng-class="{active : (datatypeIndex == $index)}" class="kim-data-dot kim-{{getColor($index)}}"> <span ng-show="flags.mode != 'loginMode'" ng-class="{'kim-dot-sm': datatype.numElements > 99, 'kim-dot-md': datatype.numElements > 9, 'kim-dot-xs': datatype.numElements > 999}">{{datatype.numElements}}</span> <span ng-show="flags.mode == 'loginMode'" class="kim kim-icon" ng-class="{'kim-user-highlight': $index == 0, 'kim-password-highlight': $index == 1, 'kim-target-highlight': $index == 2}"></span> <span ng-show="flags.mode != 'loginMode'" class="kim-delete-datatype" ng-click="delete($index)"></span> </a> | |
<a class="kim-new-datatype" ng-click="addDatatype()" ng-show="datatypes.length < 50 && flags.mode != 'loginMode'" title="New Datatype"></a> | |
</div> | |
<div class="kim-right"> | |
<div class="kim-toolbar-section" id="kim-PaginationContainer"> | |
<a km-fade="flags.mode != 'loginMode' && flags.mode != 'navigation'" km-in="true" km-out="true" display="inline-block" opacity="0.4" ng-mouseenter="paginationHover('pagination')" ng-mouseleave="dataDotUnhover('pagination')" class="kim kim-toolbar-button kim-pagination kim-data-dot" kimonodatatype="pagination" title="Pagination" ng-click="pagination()" ng-class="{active : (datatypeIndex == 'pagination'), disabled: flags.mode == 'loginMode' || flags.navigate}"> <span ng-show="flags.hasPagination" class="pagination-check"></span> <span class="kim-delete-datatype" ng-click="deletePagination($index)"></span> </a> | |
<a km-fade="flags.mode != 'navigation'" km-in="true" km-out="true" display="inline-block" opacity="0.4" class="kim-toolbar-button kim-undo" ng-class="{disabled: flags.actionHistoryLength == 0}" ng-click="undo()" title="Undo"></a> | |
</div> | |
<div class="kim-toolbar-section" ng-if="config.clientEnv == 'chrome'" id="kim-PaginationContainer"> | |
<a ng-show="flags.currentStep == 'on' || flags.currentStep == 'done'" class="kim-toolbar-button kim-normal" ng-class="{active: flags.mode == 'navigation'}" ng-click="navigateMode()" title="Navigate"></a> | |
<a ng-show="flags.currentStep != 'on' && flags.currentStep != 'done'" class="kim-toolbar-button kim-login" ng-class="{active: flags.mode == 'loginMode', attention: isHttps()}" ng-click="enableLoginMode()" title="Auth mode"></a> | |
</div> | |
<div class="kim-toolbar-section"> | |
<a class="kim-toolbar-button kim-view-button extractor-view" title="Extractor View" ng-click="changeView('extractor')" ng-class="{active : (flags.currentView == 'extractor')}"></a> | |
<a class="kim-toolbar-button kim-view-button data-model-view" title="Data Model View" ng-click="changeView('data')" ng-class="{active : (flags.currentView == 'data'), disabled: flags.navigate}"></a> | |
<a class="kim kim-toolbar-button kim-view-button json-view" title="Raw Data View" ng-click="changeView('raw')" ng-class="{active : (flags.currentView == 'raw'), disabled: flags.mode == 'loginMode' || flags.navigate}"></a> | |
</div> | |
<div class="kim-toolbar-section"> | |
<button ng-class="{disabled: flags.navigate}" class="kim-toolbar-button-primary kim kim-button" id="kim-DoneButton" ng-click="done()" title="{{doneButtonTitle()}} API">{{doneButtonMessage()}}</button> | |
</div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(window, document, undefined) { | |
function okeboup() { | |
quobovu || (jQuery('#habla_beta_container_do_not_rely_on_div_classes_or_names').appendTo('#Kimonify').css({ | |
'z-index': 2147483900, | |
position: 'fixed' | |
}), quobovu = true); | |
} | |
'undefined' == typeof window.$k ? window.$k = { | |
data: {} | |
} : 'undefined' == typeof window.$k.data && (window.$k.data = {}); | |
window.$ || window.jQuery || undefined; | |
!function(luloso, eloyhad) { | |
/******* jQuery 2.1.0 *******/ | |
var hedibu = gosura.jQuery; | |
var diqueque = gosura.$; | |
return jQuery.noConflict = function(refona) { | |
return gosura.$ === jQuery && (gosura.$ = diqueque), refona && gosura.jQuery === jQuery && (gosura.jQuery = hedibu), jQuery; | |
}, typeof perefop === hekicang && (gosura.jQuery = gosura.$ = jQuery), jQuery; | |
});{ | |
var jQuery = window.$.noConflict(); | |
jQuery.noConflict(); | |
}jQuery.fn.extend({ | |
unwrapInner: function(shijasech) { | |
return this.each(function() { | |
var jiesogu = this; | |
var macogo = jQuery(jiesogu).children(shijasech); | |
1 === macogo.length && (macogo.contents().appendTo(jiesogu), macogo.remove()); | |
}); | |
}, | |
textWidth: function() { | |
jQuery(this); | |
jQuery(this).wrapInner('<span id="text-width-calc"></span>'); | |
var notiedi = jQuery(this).find('#text-width-calc').width(); | |
return jQuery(this).unwrapInner(), notiedi; | |
} | |
}), window.analytics = window.analytics || [], window.analytics.methods = ['identify', 'group', 'track', 'page', 'pageview', 'alias', 'ready', 'on', 'once', 'off', 'trackLink', 'trackForm', 'trackClick', 'trackSubmit'], window.analytics.factory = function(swamuli) { | |
return function() { | |
var rofhatern = Array.prototype.slice.call(arguments); | |
return rofhatern.unshift(swamuli), window.analytics.push(rofhatern), window.analytics; | |
}; | |
}; | |
for (var omadip = 0; | |
omadip < window.analytics.methods.length; | |
omadip++) { | |
var feesifi = window.analytics.methods[omadip]; | |
window.analytics[feesifi] = window.analytics.factory(feesifi); | |
} | |
window.analytics.load = function(quakuquo) { | |
if (!document.getElementById('analytics-js')) { | |
var giquupe = document.createElement('script'); | |
giquupe.type = 'text/javascript', giquupe.id = 'analytics-js', giquupe.async = true, giquupe.src = ('https:' === document.location.protocol ? 'https://' : 'http://') + 'cdn.segment.io/analytics.js/v1/' + quakuquo + '/analytics.min.js', document.getElementsByTagName('head')[0].appendChild(giquupe); | |
} | |
}, window.analytics.SNIPPET_VERSION = '2.0.9', 'localhost' === window.location.host || 'localhost:4000' === window.location.host || 'localhost:3000' === window.location.host ? window.analytics.load('tu8x6gusvq') : window.analytics.load('kfah0efv5d'), window.analytics.page();{ | |
var quobovu = false; | |
setTimeout(okeboup, 2e3); | |
}window.analytics.ready(function() { | |
olark('api.box.onShow', okeboup); | |
}), function(monanot) { | |
function quesniesa(fikieneed) { | |
return new RegExp('(^|\\s+)' + fikieneed + '(\\s+|$)'); | |
} | |
function derisak(puhoro, fupulop) { | |
var mouskupuf = fejigag(puhoro, fupulop) ? fuefmeyig : grolakub; | |
mouskupuf(puhoro, fupulop); | |
} | |
var fejigag; | |
var grolakub; | |
var fuefmeyig; | |
'classList' in document.documentElement ? (fejigag = function(lyehi, decubo) { | |
return lyehi.classList.contains(decubo); | |
}, grolakub = function(bekubee, dofoutil) { | |
bekubee.classList.add(dofoutil); | |
}, fuefmeyig = function(otoofor, hiswestru) { | |
otoofor.classList.remove(hiswestru); | |
}) : (fejigag = function(ateyid, kudice) { | |
return quesniesa(kudice).test(ateyid.className); | |
}, grolakub = function(fehusay, sneseda) { | |
fejigag(fehusay, sneseda) || (fehusay.className = fehusay.className + ' ' + sneseda); | |
}, fuefmeyig = function(nululi, keetufi) { | |
nululi.className = nululi.className.replace(quesniesa(keetufi), ' '); | |
}); | |
var fouslokun = { | |
hasClass: fejigag, | |
addClass: grolakub, | |
removeClass: fuefmeyig, | |
toggleClass: derisak, | |
has: fejigag, | |
add: grolakub, | |
remove: fuefmeyig, | |
toggle: derisak | |
}; | |
monanot.classie = fouslokun; | |
}(window), function() { | |
function feyichcut() { | |
} | |
function dukubak(posouju, dukubak) { | |
for (var swotimnak = posouju.length; | |
swotimnak--; | |
) { | |
if (posouju[swotimnak].listener === dukubak) { | |
return swotimnak; | |
} | |
} | |
return -1; | |
} | |
function cubafoub(quorofud) { | |
return function() { | |
return this[quorofud].apply(this, arguments); | |
}; | |
} | |
var EventEmitter = feyichcut.prototype; | |
var yasishu = this; | |
var rebreney = yasishu.EventEmitter; | |
EventEmitter.getListeners = function(chilumin) { | |
var nogumi; | |
var tukamab; | |
var sniquora = this._getEvents(); | |
if (chilumin instanceof RegExp) { | |
nogumi = {}; | |
for (tukamab in sniquora) { | |
sniquora.hasOwnProperty(tukamab) && chilumin.test(tukamab) && (nogumi[tukamab] = sniquora[tukamab]) | |
} | |
} else { | |
nogumi = sniquora[chilumin] || (sniquora[chilumin] = []); | |
} | |
return nogumi; | |
}, EventEmitter.flattenListeners = function(tranosnok) { | |
var depopod; | |
var dibafis = []; | |
for (depopod = 0; | |
depopod < tranosnok.length; | |
depopod += 1) { | |
dibafis.push(tranosnok[depopod].listener); | |
} | |
return dibafis; | |
}, EventEmitter.getListenersAsObject = function(bothuci) { | |
var janibuey; | |
var lejouswi = this.getListeners(bothuci); | |
return lejouswi instanceof Array && (janibuey = {}, janibuey[bothuci] = lejouswi), janibuey || lejouswi; | |
}, EventEmitter.addListener = function(quenayod, kujole) { | |
var gogera; | |
var mipikib = this.getListenersAsObject(quenayod); | |
var secapo = 'object' == typeof kujole; | |
for (gogera in mipikib) { | |
mipikib.hasOwnProperty(gogera) && -1 === scimesap(mipikib[gogera], kujole) && mipikib[gogera].push(secapo ? kujole : { | |
listener: kujole, | |
once: false | |
}); | |
} | |
return this; | |
}, EventEmitter.on = cubafoub('addListener'), EventEmitter.addOnceListener = function(crikapo, sadople) { | |
return this.addListener(crikapo, { | |
listener: sadople, | |
once: true | |
}); | |
}, EventEmitter.once = cubafoub('addOnceListener'), EventEmitter.defineEvent = function(itedquat) { | |
return this.getListeners(itedquat), this; | |
}, EventEmitter.defineEvents = function(bigipho) { | |
for (var ubegnoln = 0; | |
ubegnoln < bigipho.length; | |
ubegnoln += 1) { | |
this.defineEvent(bigipho[ubegnoln]); | |
} | |
return this; | |
}, EventEmitter.removeListener = function(lumasuem, quiguru) { | |
var sayingas; | |
var istoofdar; | |
var nequoti = this.getListenersAsObject(lumasuem); | |
for (istoofdar in nequoti) { | |
nequoti.hasOwnProperty(istoofdar) && (sayingas = scimesap(nequoti[istoofdar], quiguru), -1 !== sayingas && nequoti[istoofdar].splice(sayingas, 1)); | |
} | |
return this; | |
}, EventEmitter.off = cubafoub('removeListener'), EventEmitter.addListeners = function(conequan, kuquepin) { | |
return this.manipulateListeners(false, conequan, kuquepin); | |
}, EventEmitter.removeListeners = function(docroju, geliri) { | |
return this.manipulateListeners(true, docroju, geliri); | |
}, EventEmitter.manipulateListeners = function(kofeedi, unqueckup, meenapsab) { | |
var hahouja; | |
var niemubris; | |
var jusola = kofeedi ? this.removeListener : this.addListener; | |
var fequeno = kofeedi ? this.removeListeners : this.addListeners; | |
if ('object' != typeof unqueckup || unqueckup instanceof RegExp) { | |
for (hahouja = meenapsab.length; | |
hahouja--; | |
) { | |
jusola.call(this, unqueckup, meenapsab[hahouja]); | |
} | |
} else { | |
for (hahouja in unqueckup) { | |
unqueckup.hasOwnProperty(hahouja) && (niemubris = unqueckup[hahouja]) && ('function' == typeof niemubris ? jusola.call(this, hahouja, niemubris) : fequeno.call(this, hahouja, niemubris)); | |
} | |
} | |
return this; | |
}, EventEmitter.removeEvent = function(gafufo) { | |
var hupquetan; | |
var hacluha = typeof gafufo; | |
var nothubusk = this._getEvents(); | |
if ('string' === hacluha) { | |
delete nothubusk[gafufo]; | |
} else if (gafufo instanceof RegExp) { | |
for (hupquetan in nothubusk) { | |
nothubusk.hasOwnProperty(hupquetan) && gafufo.test(hupquetan) && | |
delete nothubusk[hupquetan]; | |
} | |
} else { | |
delete this._events; | |
} | |
return this; | |
}, EventEmitter.removeAllListeners = cubafoub('removeEvent'), EventEmitter.emitEvent = function(jikobag, hequaqui) { | |
var quolielo; | |
var swihastos; | |
var ernuenuk; | |
var fluquaga; | |
var muhefa = this.getListenersAsObject(jikobag); | |
for (ernuenuk in muhefa) { | |
if (muhefa.hasOwnProperty(ernuenuk)) { | |
for (swihastos = muhefa[ernuenuk].length; | |
swihastos--; | |
) { | |
quolielo = muhefa[ernuenuk][swihastos], quolielo.once === true && this.removeListener(jikobag, quolielo.listener), fluquaga = quolielo.listener.apply(this, hequaqui || []), fluquaga === this._getOnceReturnValue() && this.removeListener(jikobag, quolielo.listener); | |
} | |
} | |
} | |
return this; | |
}, EventEmitter.trigger = cubafoub('emitEvent'), EventEmitter.emit = function(fegobap) { | |
var upeycas = Array.prototype.slice.call(arguments, 1); | |
return this.emitEvent(fegobap, upeycas); | |
}, EventEmitter.setOnceReturnValue = function(segukee) { | |
return this._onceReturnValue = segukee, this; | |
}, EventEmitter._getOnceReturnValue = function() { | |
return this.hasOwnProperty('_onceReturnValue') ? this._onceReturnValue : true; | |
}, EventEmitter._getEvents = function() { | |
return this._events || (this._events = {}); | |
}, feyichcut.noConflict = function() { | |
return yasishu.EventEmitter = rebreney, feyichcut; | |
}, this.EventEmitter = feyichcut; | |
}(), function(lecoxouk) { | |
function palikey(ugepul) { | |
var fremupu = lecoxouk.event; | |
return fremupu.target = fremupu.target || fremupu.srcElement || ugepul, fremupu; | |
} | |
var fililosh = document.documentElement; | |
var lehogi = function() {}; | |
fililosh.addEventListener ? lehogi = function(sholeque, cogugre, ilolash) { | |
sholeque.addEventListener(cogugre, ilolash, false); | |
} : fililosh.attachEvent && (lehogi = function(leshogoux, ozulin, cluriha) { | |
leshogoux[ozulin + cluriha] = cluriha.handleEvent ? function() { | |
var kuenaque = palikey(leshogoux); | |
cluriha.handleEvent.call(cluriha, kuenaque); | |
} : function() { | |
var flasescoze = palikey(leshogoux); | |
cluriha.call(leshogoux, flasescoze); | |
}, leshogoux.attachEvent('on' + ozulin, leshogoux[ozulin + cluriha]); | |
}); | |
var amoubib = function() {}; | |
fililosh.removeEventListener ? amoubib = function(nakonis, blokrunoo, joblaki) { | |
nakonis.removeEventListener(blokrunoo, joblaki, false); | |
} : fililosh.detachEvent && (amoubib = function(roquapesk, fefeyiep, durowee) { | |
roquapesk.detachEvent('on' + fefeyiep, roquapesk[fefeyiep + durowee]); | |
try { | |
delete roquapesk[fefeyiep + durowee]; | |
} catch (bipedu) { | |
roquapesk[fefeyiep + durowee] = undefined; | |
} | |
}); | |
var liklikay = { | |
bind: lehogi, | |
unbind: amoubib | |
}; | |
lecoxouk.eventie = liklikay; | |
}(this), function(dimetren) { | |
function unukied(quimine) { | |
if (quimine) { | |
if ('string' == typeof hegrisi[quimine]) { | |
return quimine; | |
} | |
quimine = quimine.charAt(0).toUpperCase() + quimine.slice(1); | |
for (var sciebunaf, unukied = 0, baheluek = quonaka.length; | |
baheluek > unukied; | |
unukied++) { | |
if (sciebunaf = quonaka[unukied] + quimine, 'string' == typeof hegrisi[sciebunaf]) { | |
return sciebunaf | |
} | |
; | |
} | |
} | |
} | |
var quonaka = 'Webkit Moz ms Ms O'.split(' '); | |
var hegrisi = document.documentElement.style; | |
dimetren.getStyleProperty = flugopi; | |
}(window), function(bifelu) { | |
function jefato(dokiha) { | |
var nigcockog = parseFloat(dokiha); | |
var jefato = -1 === dokiha.indexOf('%') && !isNaN(nigcockog); | |
return jefato && nigcockog; | |
} | |
function bustapod() { | |
for (var kodidgag = { | |
width: 0, | |
height: 0, | |
innerWidth: 0, | |
innerHeight: 0, | |
outerWidth: 0, | |
outerHeight: 0 | |
}, enaras = 0, inifik = bigufa.length; | |
inifik > enaras; | |
enaras++) { | |
var bustapod = bigufa[enaras]; | |
kodidgag[bustapod] = 0; | |
} | |
return kodidgag; | |
} | |
function besitor(gruerouna) { | |
function nodafop(slihara) { | |
if ('string' == typeof slihara && (slihara = document.querySelector(slihara)), slihara && 'object' == typeof slihara && slihara.nodeType) { | |
var nodafop = dronirem(slihara); | |
if ('none' === nodafop.display) { | |
return mitobas(); | |
} | |
var farome = {}; | |
farome.width = slihara.offsetWidth, farome.height = slihara.offsetHeight; | |
for (var usoyop = farome.isBorderBox = !(!eyarin || !nodafop[eyarin] || 'border-box' !== nodafop[eyarin]), quebiqua = 0, carapag = bigufa.length; | |
carapag > quebiqua; | |
quebiqua++) { | |
var eskstumbof = bigufa[quebiqua]; | |
var dusravie = nodafop[eskstumbof]; | |
dusravie = baloylem(slihara, dusravie); | |
var lecehi = parseFloat(dusravie); | |
farome[eskstumbof] = isNaN(lecehi) ? 0 : lecehi; | |
} | |
var tilbeepik = farome.paddingLeft + farome.paddingRight; | |
var toungbarir = farome.paddingTop + farome.paddingBottom; | |
var amosar = farome.marginLeft + farome.marginRight; | |
var foneli = farome.marginTop + farome.marginBottom; | |
var kounastud = farome.borderLeftWidth + farome.borderRightWidth; | |
var ikmoolit = farome.borderTopWidth + farome.borderBottomWidth; | |
var jaruemgin = usoyop && roocepi; | |
var ulebul = coudirig(nodafop.width); | |
ulebul !== false && (farome.width = ulebul + (jaruemgin ? 0 : tilbeepik + kounastud)); | |
var gicepu = coudirig(nodafop.height); | |
return gicepu !== false && (farome.height = gicepu + (jaruemgin ? 0 : toungbarir + ikmoolit)), farome.innerWidth = farome.width - (tilbeepik + kounastud), farome.innerHeight = farome.height - (toungbarir + ikmoolit), farome.outerWidth = farome.width + amosar, farome.outerHeight = farome.height + foneli, farome; | |
} | |
} | |
function baloylem(quafojo, higimul) { | |
if (requehop || -1 === higimul.indexOf('%')) { | |
return higimul; | |
} | |
var quemame = quafojo.style; | |
var quekuhe = quemame.left; | |
var saruete = quafojo.runtimeStyle; | |
var gahesee = saruete && saruete.left; | |
return gahesee && (saruete.left = quafojo.currentStyle.left), quemame.left = higimul, higimul = quemame.pixelLeft, quemame.left = quekuhe, gahesee && (saruete.left = gahesee), higimul; | |
} | |
var roocepi; | |
var eyarin = gruerouna('boxSizing'); | |
return function() { | |
if (eyarin) { | |
var gejiscem = document.createElement('div'); | |
gejiscem.style.width = '200px', gejiscem.style.padding = '1px 2px 3px 4px', gejiscem.style.borderStyle = 'solid', gejiscem.style.borderWidth = '1px 2px 3px 4px', gejiscem.style[eyarin] = 'border-box'; | |
var taquerib = document.body || document.documentElement; | |
taquerib.appendChild(gejiscem); | |
var gisonif = dronirem(gejiscem); | |
roocepi = 200 === coudirig(gisonif.width), taquerib.removeChild(gejiscem); | |
} | |
}(), besitor; | |
} | |
var requehop = bifelu.getComputedStyle; | |
var dronirem = requehop ? function(onkoroy) { | |
return requehop(onkoroy, null); | |
} : function(nerahe) { | |
return nerahe.currentStyle; | |
}; | |
var bigufa = ['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth', 'borderBottomWidth']; | |
bifelu.getSize = kastosquot(bifelu.getStyleProperty); | |
}(window), function(grisradrer) { | |
/******* draggabilly *******/ | |
var teydifuey = (new Date).getTime(); | |
var gejelo = Math.max(0, 16 - (teydifuey - swokihuf)); | |
var snugresi = grisradrer.setTimeout(function() { | |
sotoyun(teydifuey + gejelo); | |
}, gejelo); | |
return swokihuf = teydifuey + gejelo, snugresi; | |
}, leshique = function(jipumo) { | |
grisradrer.clearTimeout(jipumo); | |
}), grisradrer.Draggabilly = ridafag(grisradrer.classie, grisradrer.EventEmitter, grisradrer.eventie, grisradrer.getStyleProperty, grisradrer.getSize); | |
}(window);{ | |
var Draggabilly = window.Draggabilly; | |
var classie = window.classie; | |
var EventEmitter = window.EventEmitter; | |
var eventie = window.eventie; | |
var getStyleProperty = window.getStyleProperty; | |
var getSize = window.getSize; | |
var Draggabilly2 = window.Draggabilly; | |
window.classie, window.EventEmitter, window.eventie, window.getStyleProperty, window.getSize; | |
}window.Draggabilly = Draggabilly, window.classie = classie, window.EventEmitter = EventEmitter, window.eventie = eventie, window.getStyleProperty = getStyleProperty, window.getSize = getSize, function() { | |
var probWindow = this; | |
var _2 = probWindow._; | |
var EmptyObject = {}; | |
var ArrayProto = Array.prototype; | |
var ObjectProto = Object.prototype; | |
var FunctionProto = Function.prototype; | |
var ArrayPush = ArrayProto.push; | |
var ArraySlice = ArrayProto.slice; | |
var ArrayConcat = ArrayProto.concat; | |
var ObjectToString = ObjectProto.toString; | |
var ObjectHasOwnProperty = ObjectProto.hasOwnProperty; | |
var ArrayForEach = ArrayProto.forEach; | |
var ArrayMap = ArrayProto.map; | |
var ArrayReduce = ArrayProto.reduce; | |
var ArrayReduceRight = ArrayProto.reduceRight; | |
var ArrayFilter = ArrayProto.filter; | |
var ArrayEvery = ArrayProto.every; | |
var ArraySome = ArrayProto.some; | |
var ArrayIndexOf = ArrayProto.indexOf; | |
var ArrayLastIndexOf = ArrayProto.lastIndexOf; | |
var isArray = Array.isArray; | |
var ObjectKeys = Object.keys; | |
var bind = FunctionProto.bind; | |
/******* underscore *******/ | |
_.prototype[pupame] = function() { | |
return itoudkob.call(this, drikidel.apply(this._wrapped, arguments)); | |
}; | |
}), _.extend(_.prototype, { | |
chain: function() { | |
return this._chain = true, this; | |
}, | |
value: function() { | |
return this._wrapped; | |
} | |
}), 'function' == typeof define && define.amd && define('underscore', [], function() { | |
return _; | |
}); | |
}.call(this), window.$k = window.$k || {}, window.$k.config = window.$k.config || {}, window.$k.loaded = true, window.$k.config.serverEnv = 'prod', window.$k.config.clientEnv = 'angular', jQuery(document).ready(function() { | |
var fleklugouch = jQuery('body')[0]; | |
var jidolo = jQuery('#Kimonify')[0]; | |
if (!(fleklugouch && jidolo && jQuery.contains(fleklugouch, jidolo))) { | |
/******* angular 1.2.17 *******/ | |
cruquejo.angular.bootstrap && console.log('WARNING: Tried to load angular more than once.'), biltasul(), cuefeyas(pekanonk), baposi(mojequa).ready(function() { | |
obalieng(mojequa, grifuquel); | |
}); | |
}(window, document), !angular.$$csp() && angular.element(document).find('head').prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}</style>'), function(gateku, firuree, necido) { | |
'use strict'; | |
firuree.module('ngAnimate', ['ng']).factory('$$animateReflow', ['$$rAF', '$document', function(rekayan) { | |
return function(mapadi) { | |
return rekayan(function() { | |
mapadi(); | |
}); | |
}; | |
}]).config(['$provide', '$animateProvider', function(ticedoo, jotiflo) { | |
/******* ng-animate 1.2.17 *******/ | |
var giquosha = kihecod('removeClass', kepemin, phikeku(jasiki, '-remove'), function(diblepa) { | |
var boubiscen = kepemin.attr('class'); | |
return kepemin.removeClass(jasiki), diblepa = diblepa(), kepemin.attr('class', boubiscen), diblepa; | |
}); | |
return giquosha ? (ibalued(kepemin, function() { | |
lufrigu(kepemin, jasiki), dahari(kepemin), idigon(); | |
}), giquosha) : (idigon(), void 0); | |
}, | |
removeClass: function(goyakest, soubica, soreepun) { | |
return somubraf('removeClass', goyakest, phikeku(soubica, '-remove'), soreepun); | |
} | |
}; | |
}]); | |
}]); | |
}(window, window.angular), angular.module('Kimono', ['ngAnimate']), angular.module('Kimono').factory('Collections', ['Regex', 'Utils', 'Datatypes', 'Common', function(Regex, Utils, Datatypes, Common) { | |
var nukunkul = new function() { | |
this.getEpSelectorComponent = function(gayomoo) { | |
var rirejed = gayomoo.selectorObjects[0].selector.split(' > '); | |
return gayomoo.context.ancestorCounter > rirejed.length - 1 ? '' : rirejed[rirejed.length - 1 - gayomoo.context.ancestorCounter]; | |
}; | |
var slobunan = function(duzjeyus) { | |
var osjonceg = { | |
text: '' | |
}; | |
for (attribute in duzjeyus.context.attributes) { | |
if (duzjeyus.context.attributes.hasOwnProperty(attribute)) { | |
var sopile = duzjeyus.context.attributes[attribute]; | |
('true' == sopile.value || sopile.value === true) && (osjonceg[attribute] = ''); | |
} | |
} | |
return console.log(osjonceg), Object.keys(osjonceg).length > 1 ? osjonceg : ''; | |
}; | |
this.updateDatalists = function(sushodo) { | |
for (var quequobab = 0; | |
quequobab < sushodo.length; | |
quequobab++) { | |
var geneca = sushodo[quequobab]; | |
if (1 == geneca.length) { | |
var afemood = geneca[0]; | |
if (afemood.datalist = [], afemood.context.delta = 0, afemood.context.numberOfTableNormalizers = 0, afemood.selectorObjects[0] && afemood.selectorObjects[0].selector) { | |
for (var kacrido = Utils.querySelectorAll(afemood.getCombinedSelector()), mumogue = 0; | |
mumogue < kacrido.length; | |
mumogue++) { | |
var tulidup = kacrido[mumogue]; | |
Regex.testElForRegex(tulidup, afemood) && (afemood.datalist.push(klakupes(tulidup, afemood)), 'kim-table-normalizer' == tulidup.className && afemood.context.numberOfTableNormalizers++); | |
} | |
} | |
} else { | |
for (var turuqui = 'association', titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
if ('pattern' == geneca[titushut].context.associationType) { | |
turuqui = 'pattern'; | |
break; | |
} | |
if ('forced' == geneca[titushut].context.associationType) { | |
turuqui = 'forced'; | |
break; | |
} | |
if ('single' == geneca[titushut].context.associationType) { | |
turuqui = 'single'; | |
break; | |
} | |
} | |
if ('association' == turuqui) { | |
for (var raquetu = [], tejuho = 0, boquethu = 99999, titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
var afemood = geneca[titushut]; | |
afemood.datalist = [], afemood.context.delta = 0, afemood.context.numberOfTableNormalizers = 0; | |
var kacrido = Utils.querySelectorAll(afemood.getCombinedSelector()); | |
if (raquetu[titushut] = [], afemood.context.forceAssociation) { | |
for (var mumogue = 0; | |
mumogue < kacrido.length; | |
mumogue++) { | |
var tulidup = kacrido[mumogue]; | |
Regex.testElForRegex(tulidup, afemood) && (afemood.datalist.push(klakupes(tulidup, afemood)), 'kim-table-normalizer' == tulidup.className && afemood.context.numberOfTableNormalizers++); | |
} | |
afemood.datalist.length > tejuho && (tejuho = afemood.datalist.length), afemood.datalist.length < boquethu && (boquethu = afemood.datalist.length); | |
} else { | |
for (var mumogue = 0; | |
mumogue < kacrido.length; | |
mumogue++) { | |
Regex.testElForRegex(kacrido[mumogue], afemood) && raquetu[titushut].push({ | |
el: kacrido[mumogue], | |
pairedOff: false, | |
index: raquetu[titushut].length | |
}); | |
} | |
raquetu[titushut].length > tejuho && (tejuho = raquetu[titushut].length), raquetu[titushut].length < boquethu && (boquethu = raquetu[titushut].length); | |
} | |
} | |
for (var esemsep = [], titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
if (!geneca[titushut].context.forceAssociation) { | |
for (var mumogue = 0; | |
mumogue < raquetu[titushut].length; | |
mumogue++) { | |
if (!raquetu[titushut][mumogue].pairedOff) { | |
esemsep.push({ | |
els: [], | |
data: [], | |
sum: 0 | |
}), esemsep[esemsep.length - 1].els[titushut] = raquetu[titushut][mumogue], esemsep[esemsep.length - 1].data[titushut] = klakupes(raquetu[titushut][mumogue].el, geneca[titushut]), esemsep[esemsep.length - 1].sum += mumogue + 1, raquetu[titushut][mumogue].pairedOff = true; | |
for (var jostuser = raquetu[titushut][mumogue].el, nopisud = geneca[titushut].context.ancestorCounters ? geneca[titushut].context.ancestorCounters[geneca[titushut].getSelectorObjectIndexForEl(jostuser)] : geneca[titushut].context.ancestorCounter, wuphima = 0; | |
nopisud > wuphima; | |
wuphima++) { | |
jostuser = jostuser.parentNode; | |
} | |
for (var suzoda = titushut + 1; | |
suzoda < geneca.length; | |
suzoda++) { | |
if (!geneca[suzoda].context.forceAssociation) { | |
esemsep[esemsep.length - 1].data[suzoda] = []; | |
for (var kanueto = 0; | |
kanueto < raquetu[suzoda].length; | |
kanueto++) { | |
if (!raquetu[suzoda][kanueto].pairedOff) { | |
for (var inkoshfueg = raquetu[suzoda][kanueto].el, nopisud = geneca[suzoda].context.ancestorCounters ? geneca[suzoda].context.ancestorCounters[geneca[suzoda].getSelectorObjectIndexForEl(inkoshfueg)] : geneca[suzoda].context.ancestorCounter, wuphima = 0; | |
nopisud > wuphima; | |
wuphima++) { | |
inkoshfueg = inkoshfueg.parentNode; | |
} | |
jostuser === inkoshfueg && (esemsep[esemsep.length - 1].els[suzoda] = raquetu[suzoda][kanueto], esemsep[esemsep.length - 1].data[suzoda].push(klakupes(raquetu[suzoda][kanueto].el, geneca[suzoda])), esemsep[esemsep.length - 1].sum += kanueto + 1, raquetu[suzoda][kanueto].pairedOff = true); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
for (var mumogue = 0; | |
mumogue < esemsep.length; | |
mumogue++) { | |
for (var musudklien = 0, titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
esemsep[mumogue].data[titushut] && 0 != esemsep[mumogue].data[titushut].length || (esemsep[mumogue].data[titushut] = slobunan(geneca[titushut]), musudklien++); | |
} | |
esemsep[mumogue].avg = esemsep[mumogue].sum / geneca.length; | |
} | |
esemsep.sort(function(diguma, kajotmip) { | |
return diguma.avg < kajotmip.avg ? -1 : diguma.avg > kajotmip.avg ? 1 : 0; | |
}); | |
for (var mumogue = 0; | |
mumogue < esemsep.length; | |
mumogue++) { | |
for (var titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
var afemood = geneca[titushut]; | |
1 == esemsep[mumogue].data[titushut].length ? esemsep[mumogue].data[titushut] = esemsep[mumogue].data[titushut][0] : esemsep[mumogue].data[titushut].length > 1 && (afemood.context.delta -= esemsep[mumogue].data[titushut].length - 1), afemood.datalist.push(esemsep[mumogue].data[titushut]), esemsep[mumogue].data[titushut] == slobunan(geneca[titushut]) && afemood.context.delta++, esemsep[mumogue].els[titushut] && 'kim-table-normalizer' == esemsep[mumogue].els[titushut].el.className && afemood.context.numberOfTableNormalizers++; | |
} | |
} | |
for (var titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
for (var afemood = geneca[titushut], mumogue = boquethu; | |
tejuho > mumogue; | |
mumogue++) { | |
afemood.datalist[mumogue] == undefined && (afemood.datalist[mumogue] = slobunan(afemood), afemood.context.delta++) | |
} | |
} | |
} else if ('pattern' == turuqui) { | |
geneca.lowestStart = 999999, geneca.highestEnd = 0; | |
for (var tejuho = 0, boquethu = 99999, titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
var afemood = geneca[titushut]; | |
afemood.datalist = [], afemood.context.delta = 0, afemood.context.numberOfTableNormalizers = 0; | |
var kacrido = Utils.querySelectorAll(afemood.selectorObjects[0].selector); | |
if (afemood.context.forceAssociation) { | |
for (var mumogue = 0; | |
mumogue < kacrido.length; | |
mumogue++) { | |
var tulidup = kacrido[mumogue]; | |
Regex.testElForRegex(tulidup, afemood) && (afemood.datalist.push(klakupes(tulidup, afemood)), 'kim-table-normalizer' == tulidup.className && afemood.context.numberOfTableNormalizers++); | |
} | |
afemood.datalist.length > tejuho && (tejuho = afemood.datalist.length), afemood.datalist.length < boquethu && (boquethu = afemood.datalist.length); | |
} else { | |
for (var mumogue = 0; | |
mumogue < kacrido.length; | |
mumogue++) { | |
if (Regex.testElForRegex(kacrido[mumogue], afemood)) { | |
for (var miphugu = kacrido[mumogue], wuphima = 0; | |
wuphima < afemood.context.ancestorCounter; | |
wuphima++) { | |
miphugu = miphugu.parentNode; | |
} | |
var istupal = jQuery(miphugu).index(); | |
afemood.context.startIndex || (afemood.context.startIndex = istupal), afemood.startIndex < geneca.lowestStart && (geneca.lowestStart = afemood.startIndex), istupal > geneca.highestEnd && (geneca.highestEnd = istupal); | |
} | |
} | |
} | |
} | |
for (var titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
var afemood = geneca[titushut]; | |
if (!afemood.context.forceAssociation) { | |
for (var huhuca, kacrido = Utils.querySelectorAll(afemood.selectorObjects[0].selector), chumema = 0, egdubgest = 0, jechpintek = true, mumogue = 0; | |
mumogue < kacrido.length; | |
mumogue++) { | |
if (Regex.testElForRegex(kacrido[mumogue], afemood)) { | |
for (var miphugu = kacrido[mumogue], suzoda = 0; | |
suzoda < afemood.context.ancestorCounter; | |
suzoda++) { | |
miphugu = miphugu.parentNode; | |
} | |
var istupal = jQuery(miphugu).index() + chumema; | |
if (jechpintek) { | |
var otbofit = 0; | |
jechpintek = false; | |
} else { | |
if (huhuca >= istupal) { | |
var lufaka = huhuca - egdubgest + 1; | |
chumema += lufaka, istupal += lufaka, egdubgest = huhuca + 1; | |
} | |
var otbofit = istupal - huhuca - afemood.context.patternSteps; | |
} | |
afemood.context.patternSteps > 0 && (otbofit /= afemood.context.patternSteps); | |
for (var kanueto = 0; | |
otbofit > kanueto; | |
kanueto++) { | |
afemood.datalist.push(slobunan(afemood)), afemood.context.delta++; | |
} | |
huhuca = istupal, 'kim-table-normalizer' == kacrido[mumogue].className && afemood.context.numberOfTableNormalizers++, afemood.datalist.push(klakupes(kacrido[mumogue], afemood)); | |
} | |
} | |
afemood.context.endIndex = istupal - chumema; | |
} | |
} | |
for (var titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
var afemood = geneca[titushut]; | |
if (!afemood.context.forceAssociation) { | |
if (afemood.context.startIndex - geneca.lowestStart > afemood.context.patternSteps) { | |
var gepone = parseInt((afemood.context.startIndex - geneca.lowestStart) / afemood.context.patternSteps); | |
} else if (geneca.highestEnd - afemood.context.endIndex > afemood.context.patternSteps) { | |
var nimazi = parseInt((geneca.highestEnd - afemood.context.endIndex) / afemood.context.patternSteps); | |
} | |
for (var wuphima = 0; | |
gepone > wuphima; | |
wuphima++) { | |
afemood.datalist.unshift(slobunan(afemood)), afemood.context.delta++; | |
} | |
for (var wuphima = 0; | |
nimazi > wuphima; | |
wuphima++) { | |
afemood.datalist.push(slobunan(afemood)), afemood.context.delta++; | |
} | |
afemood.datalist.length > tejuho && (tejuho = afemood.datalist.length), afemood.datalist.length < boquethu && (boquethu = afemood.datalist.length); | |
} | |
} | |
for (var titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
var afemood = geneca[titushut]; | |
var stenbadoob = afemood.getCombinedSelector(1); | |
if ('' != stenbadoob) { | |
for (var kacrido = Utils.querySelectorAll(stenbadoob), mumogue = 0; | |
mumogue < kacrido.length; | |
mumogue++) { | |
var tulidup = kacrido[mumogue]; | |
Regex.testElForRegex(tulidup, afemood) && (afemood.datalist.push(klakupes(tulidup, afemood)), 'kim-table-normalizer' == tulidup.className && afemood.context.numberOfTableNormalizers++); | |
} | |
afemood.datalist.length > tejuho && (tejuho = afemood.datalist.length), afemood.datalist.length < boquethu && (boquethu = afemood.datalist.length); | |
} | |
} | |
for (var titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
for (var afemood = geneca[titushut], mumogue = boquethu; | |
tejuho > mumogue; | |
mumogue++) { | |
afemood.datalist[mumogue] == undefined && (afemood.datalist[mumogue] = slobunan(afemood), afemood.context.delta++) | |
} | |
} | |
} else if ('forced' == turuqui) { | |
for (var tejuho = 0, boquethu = 99999, titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
var afemood = geneca[titushut]; | |
afemood.datalist = [], afemood.context.delta = 0, afemood.context.numberOfTableNormalizers = 0; | |
for (var kacrido = Utils.querySelectorAll(afemood.getCombinedSelector()), mumogue = 0; | |
mumogue < kacrido.length; | |
mumogue++) { | |
var tulidup = kacrido[mumogue]; | |
Regex.testElForRegex(tulidup, afemood) && (afemood.datalist.push(klakupes(tulidup, afemood)), 'kim-table-normalizer' == tulidup.className && afemood.context.numberOfTableNormalizers++); | |
} | |
afemood.datalist.length > tejuho && (tejuho = afemood.datalist.length), afemood.datalist.length < boquethu && (boquethu = afemood.datalist.length); | |
} | |
for (var titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
for (var afemood = geneca[titushut], mumogue = boquethu; | |
tejuho > mumogue; | |
mumogue++) { | |
afemood.datalist[mumogue] || (afemood.datalist[mumogue] = slobunan(afemood), afemood.context.delta++) | |
} | |
} | |
} else { | |
for (var titushut = 0; | |
titushut < geneca.length; | |
titushut++) { | |
var afemood = geneca[titushut]; | |
afemood.datalist = [], afemood.context.delta = 0, afemood.context.numberOfTableNormalizers = 0; | |
var kacrido = Utils.querySelectorAll(afemood.getCombinedSelector()); | |
kacrido.length > 0 && (afemood.datalist[0] = klakupes(kacrido[0], afemood)); | |
} | |
} | |
} | |
} | |
}, this.checkAssociation = function(niposo, sodumum, sutidhing) { | |
if ('' == niposo.selectorObjects[0].selector || '' == sodumum.selectorObjects[0].selector) { | |
return false; | |
} | |
if (sodumum.context.forceAssociation && sutidhing == sodumum.context.collection) { | |
return { | |
type: niposo.context.associationType || 'forced', | |
ancestorCounter1: niposo.context.ancestorCounter || 0, | |
ancestorCounter2: niposo.context.ancestorCounter || 0, | |
pattern: niposo.context.patternSteps || 1 | |
}; | |
} | |
if (niposo.context.forceAssociation && sutidhing == niposo.context.collection) { | |
return { | |
type: sodumum.context.associationType || 'forced', | |
ancestorCounter1: sodumum.context.ancestorCounter || 0, | |
ancestorCounter2: sodumum.context.ancestorCounter || 0, | |
pattern: sodumum.context.patternSteps || 1 | |
}; | |
} | |
var firudo = Utils.querySelectorAll(niposo.getCombinedSelector()); | |
var clulaha = Utils.querySelectorAll(sodumum.getCombinedSelector()); | |
if (firudo.length <= 1 && clulaha.length <= 1) { | |
return { | |
type: 'single', | |
ancestorCounter1: 0, | |
ancestorCounter2: 0, | |
pattern: 1 | |
}; | |
} | |
for (var akuloux = firudo.length, fiexurey = clulaha.length, kicuefum = [], ligenath = 0; | |
akuloux > ligenath; | |
ligenath++) { | |
Regex.testElForRegex(firudo[ligenath], niposo) && kicuefum.push(firudo[ligenath]); | |
} | |
firudo = kicuefum; | |
for (var hikafet = [], ligenath = 0; | |
fiexurey > ligenath; | |
ligenath++) { | |
Regex.testElForRegex(clulaha[ligenath], sodumum) && hikafet.push(clulaha[ligenath]); | |
} | |
clulaha = hikafet, akuloux = firudo.length, fiexurey = clulaha.length; | |
for (var tiefusla = 0; | |
6 > tiefusla; | |
tiefusla++) { | |
for (var pyeysuch = 0; | |
6 > pyeysuch; | |
pyeysuch++) { | |
for (var dreyogit = 0; | |
akuloux > dreyogit; | |
dreyogit++) { | |
for (var queyfikhack = 0; | |
fiexurey > queyfikhack; | |
queyfikhack++) { | |
for (var rounankup = firudo[dreyogit], clunieger = clulaha[queyfikhack], tahaquu = 0; | |
tiefusla > tahaquu; | |
tahaquu++) { | |
var rounankup = rounankup.parentNode; | |
} | |
for (var giscupud = 0; | |
pyeysuch > giscupud; | |
giscupud++) { | |
var clunieger = clunieger.parentNode; | |
} | |
if (rounankup === clunieger) { | |
for (var rufogo = false, ligenath = 0; | |
ligenath < firudo.length; | |
ligenath++) { | |
if (ligenath != dreyogit) { | |
for (var mikustri = 0; | |
mikustri < clulaha.length; | |
mikustri++) { | |
if (mikustri != queyfikhack) { | |
for (var domapi = firudo[ligenath], cahiha = clulaha[mikustri], tahaquu = 0; | |
tiefusla > tahaquu; | |
tahaquu++) { | |
domapi = domapi.parentNode; | |
} | |
for (var giscupud = 0; | |
pyeysuch > giscupud; | |
giscupud++) { | |
cahiha = cahiha.parentNode; | |
} | |
if (!(akuloux > 1 && rounankup === domapi || fiexurey > 1 && clunieger === cahiha)) { | |
rufogo = true; | |
break; | |
} | |
} | |
} | |
if (rufogo) { | |
break; | |
} | |
} | |
} | |
if (rufogo || (ligenath = dreyogit > 0 ? dreyogit - 1 : akuloux > 1 ? dreyogit + 1 : dreyogit, mikustri = queyfikhack > 0 ? queyfikhack - 1 : fiexurey > 1 ? queyfikhack + 1 : queyfikhack), rufogo) { | |
for (var ebolkif = firudo[dreyogit], napubrir = clulaha[queyfikhack], desaswi = firudo[ligenath], eyidad = clulaha[mikustri], tahaquu = 0; | |
tiefusla > tahaquu; | |
tahaquu++) { | |
ebolkif = ebolkif.parentNode, desaswi = desaswi.parentNode; | |
} | |
for (var giscupud = 0; | |
pyeysuch > giscupud; | |
giscupud++) { | |
napubrir = napubrir.parentNode, eyidad = eyidad.parentNode; | |
} | |
for (var nubukig = 0; | |
10 > nubukig && ebolkif && desaswi && napubrir && eyidad; | |
) { | |
var nigogoy = ebolkif.parentNode; | |
var hizuha = desaswi.parentNode; | |
var roresu = napubrir.parentNode; | |
var wuranisk = eyidad.parentNode; | |
if (nigogoy === hizuha && roresu === wuranisk) { | |
break; | |
} | |
ebolkif = nigogoy, desaswi = hizuha, napubrir = roresu, eyidad = wuranisk, nubukig++; | |
} | |
var quepruclo = Math.abs(jQuery(ebolkif).index() - jQuery(desaswi).index()); | |
var bakugud = Math.abs(jQuery(napubrir).index() - jQuery(eyidad).index()); | |
if (0 == quepruclo) { | |
var tahaquu = bakugud; | |
} else if (0 == bakugud) { | |
var tahaquu = quepruclo; | |
} else { | |
var tahaquu = Math.min(quepruclo, bakugud); | |
} | |
return 0 == tahaquu && (tahaquu = 1), { | |
type: 'association', | |
ancestorCounter1: tiefusla + nubukig, | |
ancestorCounter2: pyeysuch + nubukig, | |
pattern: tahaquu | |
}; | |
} | |
for (var ebolkif = firudo[dreyogit], napubrir = clulaha[queyfikhack], desaswi = firudo[ligenath], eyidad = clulaha[mikustri], tahaquu = 0; | |
tiefusla - 1 > tahaquu; | |
tahaquu++) { | |
ebolkif = ebolkif.parentNode, desaswi = desaswi.parentNode; | |
} | |
for (var giscupud = 0; | |
pyeysuch - 1 > giscupud; | |
giscupud++) { | |
napubrir = napubrir.parentNode, eyidad = eyidad.parentNode; | |
} | |
var quepruclo = Math.abs(jQuery(ebolkif).index() - jQuery(desaswi).index()); | |
var bakugud = Math.abs(jQuery(napubrir).index() - jQuery(eyidad).index()); | |
var tocotue = quepruclo == bakugud && quepruclo > 1 ? true : false; | |
return 0 == tiefusla && 0 == pyeysuch ? (quepruclo = 0 == quepruclo ? bakugud : quepruclo, { | |
type: 'self', | |
ancestorCounter1: tiefusla, | |
ancestorCounter2: pyeysuch, | |
pattern: quepruclo | |
}) : tocotue ? { | |
type: 'pattern', | |
ancestorCounter1: tiefusla - 1, | |
ancestorCounter2: pyeysuch - 1, | |
pattern: quepruclo | |
} : false; | |
} | |
} | |
} | |
} | |
} | |
return false; | |
}; | |
var klakupes = function(honeluem, nascosjid) { | |
var geeploke = 'kimonohref'; | |
'undefined' != typeof window.$k && (geeploke = 'href'); | |
var jeecikol = nascosjid.selectorObjects[0].regex; | |
var irnoloub = {}; | |
var tagiedor = 0; | |
if ('IMG' != honeluem.nodeName && honeluem.textContent.trim().length > 0 && 0 != nascosjid.context.textContent && 'false' != nascosjid.context.textContent ? irnoloub.text = Regex.getMatchedText(honeluem, jeecikol) || '' : ('true' == nascosjid.context.textContent || nascosjid.context.textContent === true) && (irnoloub.text = ''), jQuery.each(nascosjid.context.attributes, function(nefafu, caquestef) { | |
if ('false' != caquestef && 0 != caquestef && caquestef.value && 'false' != caquestef.value) { | |
if ('kimonohref' == nefafu || 'href' == nefafu) { | |
if (honeluem.hasAttribute('href') ? irnoloub.href = Common.relToAbs(honeluem.getAttribute('href'), Utils.getBaseUrl()) : honeluem.hasAttribute('kimonohref') && (irnoloub.href = Common.relToAbs(honeluem.getAttribute('kimonohref'), Utils.getBaseUrl())), 'undefined' == typeof irnoloub.href) { | |
var tucomu = Utils.nearbyLink(honeluem, geeploke); | |
irnoloub.href = tucomu || ''; | |
} | |
} else { | |
'src' == nefafu ? irnoloub.src = honeluem.hasAttribute(nefafu) ? Common.relToAbs(honeluem.getAttribute('src'), Utils.getBaseUrl()) : '' : irnoloub[nefafu] = honeluem.hasAttribute(nefafu) ? honeluem.getAttribute(nefafu) : ''; | |
} | |
tagiedor++; | |
} | |
}), 'undefined' == typeof nascosjid.context.attributes.href || 'false' != nascosjid.context.attributes.href.value && 0 != nascosjid.context.attributes.href.value && 0 != nascosjid.context.attributes.href && 'false' != nascosjid.context.attributes.href && 'undefined' == typeof irnoloub.href) { | |
var lilumun = Utils.nearbyLink(honeluem, geeploke); | |
honeluem.hasAttribute(geeploke) ? irnoloub.href = Common.relToAbs(honeluem.getAttribute(geeploke), Utils.getBaseUrl()) : 'undefined' != typeof lilumun && (irnoloub.href = lilumun); | |
} | |
return jQuery.each(irnoloub, function(iboyip, tuleepam) { | |
'undefined' == typeof tuleepam && (irnoloub[iboyip] = ''); | |
}), Object.keys(irnoloub).length > 1 ? irnoloub : irnoloub[Object.keys(irnoloub)[0]]; | |
}; | |
this.update = function(gomasod, quoheyon, quebliji) { | |
var vojenu = []; | |
var biraque = []; | |
var setalem = false; | |
if (quoheyon) { | |
for (var kisootast = [], lahougit = 0; | |
lahougit < gomasod.length; | |
lahougit++) { | |
var fudugi = gomasod[lahougit].context.collection; | |
gomasod[lahougit].updateAttributes(), kisootast[fudugi] || (kisootast[fudugi] = []), kisootast[fudugi].push(gomasod[lahougit]); | |
} | |
for (var lahougit = 0; | |
lahougit < kisootast.length; | |
lahougit++) { | |
if (kisootast[lahougit]) { | |
vojenu.push(kisootast[lahougit]); | |
for (var coheenue = 0; | |
coheenue < kisootast[lahougit].length; | |
coheenue++) { | |
kisootast[lahougit][coheenue].context.collection = vojenu.length - 1 | |
} | |
} | |
} | |
} else { | |
for (var lahougit = 0; | |
lahougit < gomasod.length; | |
lahougit++) { | |
for (var afamap = false, coheenue = 0; | |
coheenue < vojenu.length; | |
coheenue++) { | |
for (var sunope = 0; | |
sunope < vojenu[coheenue].length; | |
sunope++) { | |
var todonep = this.checkAssociation(gomasod[lahougit], vojenu[coheenue][sunope], coheenue); | |
if (todonep) { | |
gomasod[lahougit].context.ancestorCounter = todonep.ancestorCounter1, vojenu[coheenue][sunope].context.ancestorCounter = todonep.ancestorCounter2, gomasod[lahougit].context.patternSteps = gomasod[lahougit].context.forceAssociation ? 1 : todonep.pattern, vojenu[coheenue][sunope].context.patternSteps = vojenu[coheenue][sunope].context.forceAssociation ? 1 : todonep.pattern, gomasod[lahougit].context.associationType = todonep.type, vojenu[coheenue][sunope].context.associationType = todonep.type, vojenu[coheenue].push(gomasod[lahougit]), gomasod[lahougit].context.collection = vojenu.length - 1, afamap = true; | |
break; | |
} | |
} | |
if (afamap) { | |
break; | |
} | |
} | |
afamap || (vojenu.push([gomasod[lahougit]]), gomasod[lahougit].context.collection = vojenu.length - 1); | |
} | |
} | |
vojenu.forEach(function(tomirier, sajuha) { | |
biraque[sajuha] = quebliji[sajuha] || 'Pagination' == quebliji[sajuha] ? quebliji[sajuha] : 'collection' + parseInt(sajuha + 1); | |
}); | |
for (var lahougit = vojenu.length; | |
lahougit < biraque.length; | |
lahougit++) { | |
biraque.pop(); | |
} | |
return gomasod.pagination && gomasod.pagination.selectorObjects[0] && gomasod.pagination.selectorObjects[0].selections.length > 0 && (setalem = true, vojenu.push([gomasod.pagination]), biraque[vojenu.length - 1] = 'Pagination'), [vojenu, biraque, setalem]; | |
}, this.getCollectionsForExport = function(noflistro) { | |
var tueleca = []; | |
return noflistro.forEach(function(sudgunaf, flatuki) { | |
tueleca[flatuki] = [], sudgunaf.forEach(function(nutrahu, julapu) { | |
tueleca[flatuki][julapu] = nutrahu.objectForExport(); | |
}); | |
}), tueleca; | |
}, this.hasData = function(froquorib) { | |
var bajushuf = false; | |
return froquorib.forEach(function(napesum) { | |
bajushuf || napesum.forEach(function(bitifa) { | |
bajushuf || bitifa.datalist.length > 0 && (bajushuf = true); | |
}); | |
}), bajushuf; | |
}, this.getRowDataFromProcessedCollections = function(jethunop) { | |
var fiebkafel = []; | |
return jethunop.forEach(function(janatu, quefueroy) { | |
if (0 != janatu.length) { | |
for (var nehihe = 0; | |
nehihe < janatu[0].datalist.length; | |
nehihe++) { | |
var igisuk = []; | |
janatu.forEach(function(roorulorn) { | |
'Pagination Link' != roorulorn.name && igisuk.push({ | |
k: roorulorn.name, | |
v: roorulorn.datalist[nehihe] | |
}); | |
}), fiebkafel.push({ | |
c: quefueroy, | |
i: nehihe, | |
d: igisuk | |
}); | |
} | |
} | |
}), fiebkafel; | |
}, 'undefined' != typeof window && (window.$k || (window.$k = {}), window.$k.collections = this); | |
}; | |
return nukunkul; | |
}]), angular.module('Kimono').factory('Common', [function() { | |
var detamog = new function() { | |
function sujoter(nafulag) { | |
return nafulag = nafulag.replace(/[-\/^$*+?.()|[\]{}]/g, '\\$&'), nafulag = nafulag.replace('\n', '\\n').replace(/Â /g, ' '); | |
} | |
var seyadux = this; | |
this.aggregateSelectors = function(hagafud, nagujask) { | |
var mocayef = []; | |
var bruritur = nagujask || {}; | |
return hagafud.forEach(function(kokestre) { | |
kokestre.forEach(function(feegienoop) { | |
if (feegienoop.selectorObjects && feegienoop.selectorObjects[0]) { | |
var esickith = feegienoop.selectorObjects[0].selector; | |
esickith && (bruritur.quotesWrap && (esickith = '"' + esickith + '"'), mocayef.push(esickith)); | |
} | |
}); | |
}), mocayef; | |
}, this.relToAbs = function(nipanel, phirobiep) { | |
var nipanel = nipanel + ''; | |
if (/^(https?|file|ftps?|mailto|javascript|data:image\/[^;]{2,9};):/i.test(nipanel)) { | |
return nipanel; | |
} | |
var bezudue = phirobiep.match(/[^?]*\//)[0]; | |
var nebosa = bezudue.match(/^(.*?):/) ? bezudue.match(/^(.*?):/)[0] : ''; | |
var bulechist = bezudue.replace(nebosa + '//', '').replace(/\/.*$/, ''); | |
if ('?' == nipanel.substring(0, 1)) { | |
var blitoge = phirobiep.split('?')[0]; | |
return blitoge + nipanel; | |
} | |
if ('//' == nipanel.substring(0, 2)) { | |
return nebosa + nipanel; | |
} | |
if ('/' == nipanel.charAt(0)) { | |
return nebosa + '//' + bulechist + nipanel; | |
} | |
if ('./' == nipanel.substring(0, 2)) { | |
console.log('found ./', nipanel); | |
} else if (/^\s*$/.test(nipanel)) { | |
return ''; | |
} | |
var sifese = bezudue.replace(nebosa + '//' + bulechist + '/', ''); | |
var notraqua = sifese.substr(0, sifese.length - 1).split('/'); | |
var geloosom = nipanel.match(/\.\.\//g); | |
nipanel = nipanel.replace(/\.\.\//g, ''); | |
for (var eniloof = 0; | |
geloosom && eniloof < geloosom.length; | |
eniloof++) { | |
notraqua.pop(); | |
} | |
var nokeelo = '/' == bulechist[bulechist.length - 1] ? '' : '/'; | |
return bezudue = nebosa + '//' + bulechist + nokeelo + notraqua.join('/'), notraqua = notraqua.filter(function(niemaram) { | |
return '' == niemaram ? false : true; | |
}), notraqua.length > 0 && (bezudue += '/'), nipanel = bezudue + nipanel, nipanel = nipanel.replace(/\.$/, '').replace(/\/\./g, '').replace(/"/g, '%22').replace(/'/g, '%27').replace(/</g, '%3C').replace(/>/g, '%3E'); | |
}, this.reassembleRegex = function(raramo) { | |
var peruza = { | |
identicalText: 'true' === raramo.identicalText, | |
suffix: raramo.suffix, | |
prefix: raramo.prefix, | |
middlePattern: raramo.middlePattern, | |
rightPattern: raramo.rightPattern, | |
rightHasEnd: 'true' === raramo.rightHasEnd, | |
rightCharClass: raramo.rightCharClass.replace(/[ Â ]/, ' Â '), | |
leftPattern: raramo.leftPattern, | |
leftHasBeginning: 'true' === raramo.leftHasBeginning, | |
leftCharClass: raramo.leftCharClass.replace(/[ Â ]/, ' Â ') | |
}; | |
'' != peruza.leftCharClass ? (peruza.leftPattern = '[' + sujoter(peruza.leftCharClass) + ']', peruza.leftPattern = peruza.leftHasBeginning ? '(^|' + peruza.leftPattern + ')' : '(' + peruza.leftPattern + ')') : peruza.leftPattern = '(' + peruza.leftPattern.replace(/[ Â ]/, '[ Â ]') + ')', '' != peruza.rightCharClass ? (peruza.rightPattern = '[' + sujoter(peruza.rightCharClass) + ']', peruza.rightPattern = peruza.rightHasEnd ? '(' + peruza.rightPattern + '|$)' : '(' + peruza.rightPattern + ')') : peruza.rightPattern = '(' + peruza.rightPattern.replace(/[ Â ]/, '[ Â ]') + ')'; | |
var teceno = [peruza.prefix, peruza.leftPattern, peruza.middlePattern, peruza.rightPattern, peruza.suffix].join(''); | |
try { | |
var texminaf = new RegExp(teceno); | |
return texminaf; | |
} catch (hapiqui) { | |
return /^()(.*?)()$/; | |
} | |
}, this.isEmpty = function(quadefru) { | |
for (var josheleck in quadefru) { | |
if (quadefru.hasOwnProperty(josheleck)) { | |
return false; | |
} | |
} | |
return true; | |
}, this.proccessedRowToRssObject = function(basagu) { | |
var arupat = {}; | |
return basagu.title && basagu.title.text ? (arupat.title = basagu.title.text, arupat.link = basagu.title.href) : basagu.title ? arupat.title = basagu.title : basagu.property1 && basagu.property1.text ? (arupat.title = basagu.property1.text, arupat.link = basagu.property1.href) : basagu.property1 && (arupat.title = basagu.property1), basagu.description && basagu.description.text ? arupat.description = basagu.description.text : basagu.description && (arupat.description = basagu.description), basagu.author && basagu.author.text ? arupat.author = basagu.author.text : basagu.author && (arupat.author = basagu.author), basagu.pubDate && basagu.pubDate.text ? arupat.pubDate = basagu.pubDate.text : basagu.pubDate && (arupat.pubDate = basagu.pubDate), basagu.category && basagu.category.text ? arupat.category = basagu.category.text : basagu.category && (arupat.category = basagu.category), basagu.comments && basagu.comments.href ? arupat.comments = basagu.comments.href : basagu.comments && (arupat.comments = basagu.comments), arupat; | |
}; | |
var tramorim = function(bebscoorar) { | |
return bebscoorar = bebscoorar.replace(/\r\n/g, '\n'); | |
}; | |
var caklebob = function(pucuca) { | |
return pucuca = pucuca.replace(/</g, '<').replace(/&/g, '&'), tramorim(pucuca); | |
}; | |
this.toXml = function(itudis, kifasla, fohuho) { | |
var shajoupue = ''; | |
if (itudis instanceof Array) { | |
for (var gehiba = 0, mitiftis = itudis.length; | |
mitiftis > gehiba; | |
gehiba++) { | |
shajoupue += this.toXml(itudis[gehiba], kifasla, fohuho + ''); | |
} | |
} else if ('object' == typeof itudis) { | |
var poomidig = false; | |
shajoupue += fohuho + '<' + kifasla; | |
for (var hagieve in itudis) { | |
'@' == hagieve.charAt(0) ? shajoupue += ' ' + hagieve.substr(1) + '="' + itudis[hagieve].toString() + '"' : poomidig = true; | |
} | |
if (shajoupue += poomidig ? '>\n' : '/>', poomidig) { | |
for (var hagieve in itudis) { | |
'#text' == hagieve ? shajoupue += caklebob(itudis[hagieve]) : '#cdata' == hagieve ? shajoupue += '<![CDATA[' + tramorim(itudis[hagieve]) + ']]>' : '@' != hagieve.charAt(0) && (shajoupue += this.toXml(itudis[hagieve], hagieve, fohuho + ' ')); | |
} | |
shajoupue += ('\n' == shajoupue.charAt(shajoupue.length - 1) ? fohuho : '') + '</' + kifasla + '>\n'; | |
} | |
} else { | |
itudis && (shajoupue += fohuho + '<' + kifasla + '>' + caklebob(itudis.toString()) + '</' + kifasla + '>\n'); | |
} | |
return shajoupue; | |
}, this.getRSS = function(joclamil, dulopid, kubudu, talafo) { | |
if (joclamil[talafo]) { | |
var jiehodo = []; | |
joclamil[talafo].forEach(function(gomoda) { | |
jiehodo.push(seyadux.proccessedRowToRssObject(gomoda)); | |
}); | |
var nijeebu = { | |
rss: { | |
channel: { | |
title: dulopid, | |
description: 'kimono RSS feed', | |
link: kubudu, | |
item: jiehodo | |
} | |
} | |
}; | |
var jofamup = ''; | |
for (var jinedpit in nijeebu) { | |
jofamup += seyadux.toXml(nijeebu[jinedpit], jinedpit, ''); | |
} | |
return jofamup = jofamup.replace('<rss>', '<rss version="2.0">'); | |
} | |
}, this.flatten = function(jutitod) { | |
var maphiflo = {}; | |
for (var slemuce in jutitod) { | |
if (jutitod.hasOwnProperty(slemuce)) { | |
if ('object' == typeof jutitod[slemuce]) { | |
var quicruce = seyadux.flatten(jutitod[slemuce]); | |
for (var quehigur in quicruce) { | |
quicruce.hasOwnProperty(quehigur) && (maphiflo[slemuce + '.' + quehigur] = quicruce[quehigur]) | |
} | |
} else { | |
maphiflo[slemuce] = jutitod[slemuce]; | |
} | |
} | |
} | |
return maphiflo; | |
}, this.convertToCSV = function(opklaled, chusuli, gimigo) { | |
var dipogu = 'object' != typeof opklaled ? JSON.parse(opklaled) : opklaled; | |
var buropoup = ''; | |
var flonote = ''; | |
if (!chusuli || 2 != parseInt(chusuli)) { | |
var bogiegoln; | |
bogiegoln = gimigo ? { | |
timestamp: 0, | |
value: 0 | |
} : seyadux.flatten(dipogu[0]); | |
for (var bagilet in bogiegoln) { | |
var apupcung = bagilet + ''; | |
flonote += '"' + apupcung.replace(/"/g, '\'') + '",'; | |
} | |
flonote = flonote.slice(0, -1), buropoup += flonote + '\r\n'; | |
} | |
if (gimigo) { | |
for (var preeseko = 0; | |
preeseko < dipogu.length; | |
preeseko++) { | |
var flonote = ''; | |
var udikesk = dipogu[preeseko]; | |
for (var bagilet in udikesk) { | |
if (udikesk[bagilet]) { | |
if (udikesk[bagilet] instanceof Date) { | |
var delicu = udikesk[bagilet]; | |
var apupcung = seyadux.formatDateForCSV(delicu); | |
} else { | |
var apupcung = udikesk[bagilet] + ''; | |
} | |
flonote += '"' + apupcung.replace(/"/g, '\'') + '",'; | |
} else { | |
flonote += '"",'; | |
} | |
} | |
flonote = flonote.slice(0, -1), buropoup += flonote + '\r\n'; | |
} | |
} else { | |
for (var preeseko = 0; | |
preeseko < dipogu.length; | |
preeseko++) { | |
var flonote = ''; | |
var quikode = seyadux.flatten(dipogu[preeseko]); | |
for (var bagilet in quikode) { | |
if (quikode[bagilet]) { | |
var apupcung = quikode[bagilet] + ''; | |
flonote += '"' + apupcung.replace(/"/g, '\'') + '",'; | |
} else { | |
flonote += '"",'; | |
} | |
} | |
flonote = flonote.slice(0, -1), buropoup += flonote + '\r\n'; | |
} | |
} | |
return buropoup; | |
}, this.convertToCSV2 = function(nemeyok) { | |
var jefugi = 'object' != typeof nemeyok ? JSON.parse(nemeyok) : nemeyok; | |
var sinudi = ''; | |
var suduedee = ''; | |
var bidatu = seyadux.flatten(jefugi[0]); | |
for (var loteeque in bidatu) { | |
var cokeyher = loteeque + ''; | |
suduedee += '"' + cokeyher.replace(/"/g, '\'') + '",'; | |
} | |
suduedee = suduedee.slice(0, -1), sinudi += suduedee + '\r\n'; | |
for (var madadan = 0; | |
madadan < jefugi.length; | |
madadan++) { | |
var suduedee = ''; | |
var quedugoln = seyadux.flatten(jefugi[madadan]); | |
for (var loteeque in quedugoln) { | |
if (quedugoln[loteeque]) { | |
var cokeyher = quedugoln[loteeque] + ''; | |
suduedee += '"' + cokeyher.replace(/"/g, '\'') + '",'; | |
} else { | |
suduedee += '"",'; | |
} | |
} | |
suduedee = suduedee.slice(0, -1), sinudi += suduedee + '\r\n'; | |
} | |
return sinudi; | |
}, this.getCSV = function(quodede, mothoopmif, siepiturn, peefmomscab) { | |
var joquepe = this; | |
peefmomscab = peefmomscab || {}, siepiturn && mothoopmif.forEach(function(rugubef, mukquengank) { | |
rugubef.name = siepiturn[mukquengank]; | |
}); | |
var nuquosro = ''; | |
return peefmomscab.series ? mothoopmif.forEach(function(moofooswe, lagatob) { | |
if (0 != moofooswe.length) { | |
var oyilif = moofooswe.name || 'collection' + parseInt(lagatob + 1); | |
peefmomscab.noheaders || (nuquosro += '"' + oyilif + '"\r\n'), quodede[oyilif] && quodede[oyilif].forEach(function(ceefequi, tezuemo) { | |
for (prop in ceefequi) { | |
ceefequi.hasOwnProperty(prop) && (peefmomscab.noheaders || peefmomscab.series || (nuquosro += '"' + prop + '.' + tezuemo + '"\r\n'), quodede[oyilif] && (nuquosro += joquepe.convertToCSV(quodede[oyilif][tezuemo][prop], peefmomscab.noheaders, peefmomscab.series) + '\r\n'), nuquosro += '\r\n') | |
} | |
}); | |
} | |
}) : mothoopmif.forEach(function(loferu, goohige) { | |
if (0 != loferu.length) { | |
var klorilet = loferu.name || 'collection' + parseInt(goohige + 1); | |
peefmomscab.noheaders || (nuquosro += '"' + klorilet + '"\r\n'), quodede[klorilet] && (nuquosro += joquepe.convertToCSV(quodede[klorilet], peefmomscab.noheaders, peefmomscab.series) + '\r\n'); | |
} | |
}), nuquosro; | |
}, this.getTable = function(canasey) { | |
var mugafus = this; | |
if ('object' != typeof canasey || !canasey) { | |
return null; | |
} | |
var judeso = {}; | |
var liseesi = 0; | |
return Object.keys(canasey).forEach(function(tiecati) { | |
judeso[tiecati] = { | |
colnames: [], | |
datatypeindices: [], | |
rows: [] | |
}; | |
var nidute = canasey[tiecati]; | |
if ('object' != typeof nidute[0] || !nidute[0]) { | |
return null; | |
} | |
var pomigog = {}; | |
if (Object.keys(nidute[0]).forEach(function(segithib) { | |
pomigog[segithib] = liseesi++; | |
}), nidute.length > 0) { | |
var gefeja = Object.keys(mugafus.flatten(nidute[0])); | |
judeso[tiecati].colnames = gefeja, gefeja.forEach(function(finagif) { | |
var salirif = finagif.split('.')[0]; | |
judeso[tiecati].datatypeindices.push(pomigog[salirif]); | |
}), nidute.forEach(function(teluco) { | |
var buniji = []; | |
var teluco = mugafus.flatten(teluco); | |
gefeja.forEach(function(cibogla) { | |
buniji.push(teluco[cibogla]); | |
}), judeso[tiecati].rows.push(buniji); | |
}); | |
} | |
}), judeso; | |
}, this.mongoCallback = function(papodis, gagupo) { | |
return function(sufobo, sieroukut) { | |
sufobo ? (papodis.json(500, { | |
status: '500', | |
error: 'Server Error', | |
message: 'Something went wrong on our servers' | |
}), console.log('MongoDB Error' + sufobo)) : gagupo(sieroukut); | |
}; | |
}, this.getJSON = function(uturdrad, mematup) { | |
var scethiter = {}; | |
return uturdrad.forEach(function(lebenoot, jojofu) { | |
if (!(0 == lebenoot.length || 'Pagination' == mematup[jojofu] && lebenoot[0] && 'Pagination Link' == lebenoot[0].name)) { | |
var quehueguk = mematup[jojofu] || 'collection' + (jojofu + 1); | |
scethiter[quehueguk] = []; | |
for (var deheper = 0; | |
deheper < lebenoot[0].datalist.length; | |
deheper++) { | |
scethiter[quehueguk][deheper] = {}; | |
for (var sapuetjam = 0; | |
sapuetjam < lebenoot.length; | |
sapuetjam++) { | |
scethiter[quehueguk][deheper][lebenoot[sapuetjam].name] = lebenoot[sapuetjam].datalist[deheper] | |
} | |
} | |
} | |
}), scethiter; | |
}, this.formatDateForCSV = function(nirepu) { | |
return [nirepu.getMonth() + 1, '/', nirepu.getDate(), '/', nirepu.getFullYear(), ' ', nirepu.toTimeString().split(' ')[0]].join(''); | |
}, this.shortenString = function(comofa, ushabur) { | |
return comofa == undefined ? '' : comofa.length <= ushabur ? comofa : comofa.substr(0, ushabur) + '...'; | |
}, this.blacklist = [/couponcabin\.com/, /greymatter\.com/], this.nosupportlist = [/facebook\.com/], this.problemUrls = [/mercadopago\.com/, /digikey\.nl/, /soundcloud\.com/, /facebook\.com/, /fifa\.com/, /latimes\.com/, /unsplash\.com/, /sks-keyservers\.net/, /arcadebrew\.com/, /abgent\.com/, /char5\.com/, /wykop\.pl/, /community-music\.info/, /mx\.finanzas\.yahoo\.com/, /yelp\.com/, /amazon\.com/, /fitbit\.com/, /myfitnesspal\.com/, /uniqlo\.com/, /brand\.tmall\.com/], 'undefined' != typeof window && (window.$k || (window.$k = {}), window.$k.common = this); | |
}; | |
return detamog; | |
}]), angular.module('Kimono').factory('Config', [function() { | |
var ilirnjesk = new function() { | |
if (this.RED = 'red', this.YELLOW = 'yellow', this.BLUE = 'blue', this.ORANGE = 'orange', this.GREEN = 'green', this.PURPLE = 'purple', this.FUCHSIA = 'fuchsia', this.AQUA = 'aqua', this.SUNSET = 'sunset', this.LIME = 'lime', this.INDIGO = 'indigo', this.AMBER = 'amber', this.TAN = 'tan', this.COFFEE = 'coffee', this.GREY = 'grey', this.SMOKE = 'smoke', this.PAGINATION = 'bluegrey', this.colors = [this.YELLOW, this.AMBER, this.ORANGE, this.SUNSET, this.RED, this.FUCHSIA, this.PURPLE, this.INDIGO, this.BLUE, this.AQUA, this.GREEN, this.LIME, this.TAN, this.COFFEE, this.GREY, this.SMOKE], this.MAX_TIER_ANCESTRY = 4, this.MAX_TIERS = 3, this.REGEX_CLIP = 3, this.normalizeWhitelist = ['news.ycombinator.com'], this.tags = ['food', 'crowdfunding', 'cryptocurrency', 'hockey', 'news', 'reference', 'search', 'community', 'business', 'banking', 'shopping', 'entertainment', 'media', 'sports', 'blogs', 'social networking', 'culture', 'technology', 'aggregator', 'software', 'science', 'movies', 'politics', 'money', 'finance', 'design', 'social', 'art', 'music', 'football', 'soccer', 'web design', 'jobs', 'baseball', 'games', 'basketball', 'computers', 'real estate', 'travel', 'maps', 'entrepreneurship', 'code', 'shoes', 'holidays', 'startups', 'books', 'fashion', 'investing', 'salaries', 'analytics', 'venture capital', 'rugby', 'economics', 'programming', 'auctions', 'weather', 'hotels', 'rentals', 'government', 'mobile', 'international', 'olympics', 'ecommerce'], this.getColor = function(rozulo) { | |
return 'pagination' == rozulo ? this.PAGINATION : this.colors[rozulo % 16]; | |
}, 'undefined' != typeof window && (this.clientEnv = window.$k.config.clientEnv, this.serverEnv = window.$k.config.serverEnv, 'phantom' == this.clientEnv ? (this.KM_HOST = 'https://localhost:4000', this.KM_HOST_WWW = 'https://localhost:4000') : 'dev' == this.serverEnv ? 'chrome' == this.clientEnv ? (this.KM_HOST = 'https://localhost:4000', this.KM_HOST_WWW = 'https://localhost:4000') : (this.KM_HOST = 'http://localhost:3000', this.KM_HOST_WWW = 'http://localhost:3000') : 'stage' == this.serverEnv ? 'chrome' == this.clientEnv ? (this.KM_HOST = 'https://kimstage.com', this.KM_HOST_WWW = 'https://www.kimstage.com') : (this.KM_HOST = 'http://www.kimstage.com', this.KM_HOST_WWW = 'http://www.kimstage.com') : 'prod' == this.serverEnv && ('chrome' == this.clientEnv ? (this.KM_HOST = 'https://kimonolabs.com', this.KM_HOST_WWW = 'https://www.kimonolabs.com') : (this.KM_HOST = 'http://kimonolabs.com', this.KM_HOST_WWW = 'http://www.kimonolabs.com'))), this.whitelist = [this.KM_HOST + '/sandbox.html', this.KM_HOST + '/welcome.html', this.KM_HOST + '/crawlblog', this.KM_HOST_WWW + '/crawlblog', this.KM_HOST_WWW + '/sandbox.html', this.KM_HOST_WWW + '/welcome.html'], this.formAction = this.KM_HOST + '/load', this.data = {}, 'undefined' != typeof window) { | |
window.$k || (window.$k = {}); | |
for (feesifi in window.$k.config) { | |
this[feesifi] = window.$k.config[feesifi]; | |
} | |
window.$k.config = this, this.data = window.$k.data || {}; | |
} | |
}; | |
return ilirnjesk; | |
}]), angular.module('Kimono').factory('Datatypes', ['Regex', 'Utils', 'Config', 'Selections', function(Regex, Utils, Config, Selections) { | |
var bisedey = new function() { | |
var nujefey = 0; | |
this.resetPropertyCounter = function(gujilak) { | |
nujefey = gujilak || 0; | |
}, Datatype = function(magrique, fagiflo, juxudom) { | |
this.name = magrique, this.selectorObjects = [{ | |
selector: '', | |
tiers: [], | |
rejectedTiers: [], | |
regex: Regex.parse(Regex.getGenericRegexString()), | |
selections: [] | |
}], this.highlightMap = {}, this.datalist = [], this.numElements = 0, this.context = { | |
collection: fagiflo, | |
index: juxudom, | |
attributes: {}, | |
textContent: true, | |
hiddenElements: false, | |
numberOfTableNormalizers: 0 | |
}, this.hide = false; | |
}, Datatype.prototype.getNumberOfElements = function(katefa) { | |
if (katefa) { | |
return this.numElements = katefa, katefa; | |
} | |
this.numElements = 0; | |
for (var gibaso = Utils.querySelectorAll(this.getCombinedSelector()), minupe = 0; | |
minupe < gibaso.length; | |
minupe++) { | |
var dacleplo = gibaso[minupe]; | |
Regex.testElForRegex(dacleplo, this) && 'kim-table-normalizer' != dacleplo.className && this.numElements++; | |
} | |
return this.numElements; | |
}, Datatype.prototype.mergeDatatype = function(quofuses, sufufoo) { | |
this.selectorObjects = this.selectorObjects.concat(quofuses.selectorObjects), jQuery.extend(this.highlightMap, quofuses.highlightMap), this.context.ancestorCounters || (this.context.ancestorCounters = [this.context.ancestorCounter]), this.context.ancestorCounters.push(quofuses.context.ancestorCounter || 1), sufufoo.splice(quofuses.context.index, 1); | |
for (var boogtidup = quofuses.context.index; | |
boogtidup < sufufoo.length; | |
boogtidup++) { | |
sufufoo[boogtidup].context.index--; | |
} | |
return this.updateAttributes(), this.getNumberOfElements(), this.context.index; | |
}, Datatype.prototype.numElements = function() { | |
for (var unjernut = 0, derihe = 0; | |
derihe < this.datalist.length; | |
derihe++) { | |
'' != this.datalist[derihe] && unjernut++; | |
} | |
return unjernut; | |
}, Datatype.prototype.acceptTier = function(jiduno, bieyjimup, saquofeg, ekobep) { | |
this.selectorObjects[0].selections.push(jiduno), this.selectorObjects[0].selector = Selections.buildSelectorForN(this.selectorObjects[0].selections, saquofeg, ekobep); | |
for (var klirilum = [this.selectorObjects[0].selector], penapi = 0; | |
penapi < this.selectorObjects[0].tiers.length; | |
penapi++) { | |
Regex.isSuperset(this.selectorObjects[0].tiers[penapi], this.selectorObjects[0].selector) || klirilum.push(this.selectorObjects[0].tiers[penapi]); | |
} | |
this.selectorObjects[0].tiers = klirilum, this.updateAttributes(); | |
}, Datatype.prototype.getCombinedSelector = function(etelem) { | |
var toclooque; | |
if (1 != this.selectorObjects.length || etelem) { | |
for (var nibuswu = [], sieketoom = etelem || 0; | |
sieketoom < this.selectorObjects.length; | |
sieketoom++) { | |
'' != this.selectorObjects[sieketoom].selector && nibuswu.push(this.selectorObjects[sieketoom].selector); | |
} | |
toclooque = nibuswu.join(','); | |
} else { | |
toclooque = this.selectorObjects[0].selector; | |
} | |
return toclooque = '' == toclooque ? '.kimonothisisnotaclassandwonteverbe' : toclooque; | |
}, Datatype.prototype.getRegexForEl = function(mokalif) { | |
if (1 == this.selectorObjects.length) { | |
return this.selectorObjects[0].regex; | |
} | |
for (var masudest = 0; | |
masudest < this.selectorObjects.length; | |
masudest++) { | |
for (var kiduchen = Utils.querySelectorAll(this.selectorObjects[masudest].selector), gekurab = 0; | |
gekurab < kiduchen.length; | |
gekurab++) { | |
if (kiduchen[gekurab] === mokalif) { | |
return this.selectorObjects[masudest].regex | |
} | |
} | |
; | |
} | |
}, Datatype.prototype.getSelectorObjectIndexForEl = function(jagatru) { | |
if (1 == this.selectorObjects.length) { | |
return 0; | |
} | |
for (var batequa = 0; | |
batequa < this.selectorObjects.length; | |
batequa++) { | |
for (var tamaros = Utils.querySelectorAll(this.selectorObjects[batequa].selector), lumoque = 0; | |
lumoque < tamaros.length; | |
lumoque++) { | |
if (tamaros[lumoque] === jagatru) { | |
return batequa | |
} | |
} | |
; | |
} | |
}, Datatype.prototype.removeTierForIndex = function(oriekued, uskasip) { | |
var pustouser = this.selectorObjects[uskasip].tiers.indexOf(oriekued); | |
this.selectorObjects[uskasip].tiers.splice(pustouser, 1), this.selectorObjects[uskasip].rejectedTiers.push(oriekued); | |
for (var deenefup = 0; | |
deenefup < this.selectorObjects[uskasip].tiers.length; | |
deenefup++) { | |
Regex.isSuperset(oriekued, this.selectorObjects[uskasip].tiers[deenefup]) && (this.selectorObjects[uskasip].tiers[deenefup] = this.selectorObjects[uskasip].tiers.slice(0, pustouser)); | |
} | |
this.updateAttributes(); | |
}, Datatype.prototype.initiateWithSelectorForSingleElement = function(klitidap, cidoodou) { | |
var loolafa = Regex.buildGenericRegex(); | |
var suzonas = { | |
selector: cidoodou, | |
tiers: [], | |
rejectedTiers: [], | |
regex: Regex.reassembleRegex(loolafa), | |
selections: [klitidap], | |
regexObj: loolafa | |
}; | |
this.selectorObjects[0] = suzonas, this.selectorObjects[0].tiers = [cidoodou], this.updateAttributes(); | |
}, Datatype.prototype.initiateWithSelectionObj = function(remocen, facaku, jekimab, maty, ronunung, edutat) { | |
var jomonback = Selections.buildSelectorForN([remocen], ronunung, edutat); | |
if (!jomonback) { | |
return 'Error'; | |
} | |
var busofeg = 'dragged' == facaku ? Regex.buildRegexForN([remocen], Config.REGEX_CLIP) : 'pagination' != edutat ? Regex.buildGenericRegex() : Regex.buildPaginationRegex(remocen.selectedText); | |
var racraku = { | |
selector: jomonback, | |
tiers: [], | |
rejectedTiers: [], | |
regex: Regex.reassembleRegex(busofeg), | |
selections: [remocen] | |
}; | |
this.selectorObjects[0] = racraku, this.selectorObjects[0].tiers = 'pagination' != edutat ? Selections.getTierSelectors(jomonback, jekimab, maty) : [jomonback], this.updateAttributes(); | |
}, Datatype.prototype.initiateWithSelectorForSingleElement = function(guepiser, dechogap) { | |
var hebequi = Regex.buildGenericRegex(); | |
var sugorusk = { | |
selector: dechogap, | |
tiers: [], | |
rejectedTiers: [], | |
regex: Regex.reassembleRegex(hebequi), | |
selections: [guepiser], | |
regexObj: hebequi | |
}; | |
this.selectorObjects[0] = sugorusk, this.selectorObjects[0].tiers = [dechogap], this.updateAttributes(); | |
}, Datatype.prototype.clone = function() { | |
var dulagep = new Datatype(datatype.name, datatype.context.collection, datatype.context.index); | |
return dulagep.selectorObjects = jQuery.extend(true, [], datatype.selectorObjects), dulagep.highlightMap = jQuery.extend(true, {}, datatype.highlightMap), dulagep.context = jQuery.extend(true, {}, datatype.context), dulagep; | |
}, Datatype.prototype.updateAttributes = function() { | |
var nivunen = {}; | |
if (this.selectorObjects && this.selectorObjects.length > 0) { | |
for (var trogufsuk = Utils.querySelectorAll(this.getCombinedSelector()), elieyak = 0; | |
elieyak < trogufsuk.length; | |
elieyak++) { | |
if (Regex.testElForRegex(trogufsuk[elieyak], this, 'getattributes')) { | |
var jalagli = Utils.nearbyLink(trogufsuk[elieyak]); | |
if (jalagli && 'undefined' == typeof nivunen.href) { | |
var quatlulstuf = this.context.attributes.href; | |
quatlulstuf = 'undefined' != typeof quatlulstuf ? quatlulstuf.value : true, nivunen.href = { | |
attribute: 'href', | |
regex: Regex.getGenericRegexString(), | |
value: quatlulstuf | |
}; | |
} | |
for (var buquikmok = trogufsuk[elieyak].attributes, frusifu = 0; | |
frusifu < buquikmok.length; | |
frusifu++) { | |
if (!buquikmok[frusifu].name.match(/^kimono[^h]/)) { | |
var opiguf = buquikmok[frusifu].name.replace('kimono', ''); | |
if ('undefined' == typeof nivunen[opiguf]) { | |
var quatlulstuf = this.context.attributes[opiguf]; | |
var quenelok = false; | |
quatlulstuf ? quenelok = this.context.attributes[opiguf].value : 'href' == opiguf && 'A' == trogufsuk[elieyak].nodeName ? quenelok = true : 'src' != opiguf && 'alt' != opiguf || 'IMG' != trogufsuk[elieyak].nodeName || (quenelok = true), nivunen[opiguf] = { | |
attribute: opiguf, | |
regex: Regex.getGenericRegexString(), | |
value: quenelok | |
}; | |
} | |
} | |
} | |
} | |
} | |
} | |
this.context.attributes = nivunen; | |
}, Datatype.prototype.objectForExport = function() { | |
var ruegmimisk = {}; | |
ruegmimisk.name = this.name, ruegmimisk.context = jQuery.extend(true, {}, this.context); | |
var cehuebi = {}; | |
for (attribute in ruegmimisk.context.attributes) { | |
cehuebi[attribute] = { | |
attribute: attribute, | |
value: ruegmimisk.context.attributes[attribute].value, | |
regex: Regex.getGenericRegexString() | |
}; | |
} | |
ruegmimisk.context.attributes = cehuebi; | |
var bafofom = []; | |
return this.selectorObjects.forEach(function(drildibef) { | |
var uloudug = {}; | |
uloudug.selector = drildibef.selector, uloudug.regex = drildibef.regex.toString(), bafofom.push(uloudug); | |
}), ruegmimisk.selectorObjects = bafofom, ruegmimisk; | |
}, this.new = function(quequiho, poflicu, quotama) { | |
return quequiho ? new Datatype(quequiho, poflicu, quotama) : new Datatype('property' + ++nujefey, poflicu, quotama); | |
}, this.getObjectForImport = function(swichaha) { | |
var klinalam = Object.create(Datatype.prototype); | |
for (feesifi in swichaha) { | |
klinalam[feesifi] = swichaha[feesifi]; | |
} | |
for (selectorObjectIndex in klinalam.selectorObjects) { | |
var guteyuk = klinalam.selectorObjects[selectorObjectIndex]; | |
if (guteyuk) { | |
guteyuk.tiers = [guteyuk.selector]; | |
var slequosha = jQuery(guteyuk.selector).first(); | |
guteyuk.selections = [{ | |
element: slequosha, | |
selectedText: slequosha.text(), | |
startIndex: 0, | |
type: 'tier', | |
img: 'IMG' == slequosha.prop('tagName') ? true : false | |
}], guteyuk.rejectedTiers = [], guteyuk.regex = guteyuk.regex ? Regex.parse(guteyuk.regex) : Regex.reassembleRegex(guteyuk.regexObj); | |
} | |
} | |
var grunega = {}; | |
for (index in klinalam.context.attributes) { | |
attributeObject = klinalam.context.attributes[index], grunega[index] = 'true' == attributeObject || 'false' == attributeObject ? { | |
attribute: index, | |
value: 'true' == attributeObject, | |
regex: Regex.getGenericRegexString() | |
} : { | |
attribute: index, | |
value: 'true' == attributeObject.value, | |
regex: Regex.getGenericRegexString() | |
}; | |
} | |
return klinalam.context.attributes = grunega, klinalam.context.textContent = klinalam.context.textContent ? 'true' == klinalam.context.textContent : true, klinalam.context.hiddenElements = klinalam.context.hiddenElements ? 'true' == klinalam.context.hiddenElements : false, 'pagination' != klinalam.context.index && (klinalam.context.index = 'undefined' != typeof klinalam.context.index ? parseInt(klinalam.context.index) : 0, klinalam.context.collection = 'undefined' != typeof klinalam.context.collection ? parseInt(klinalam.context.collection) : 0), window.$k && 'phantom' != window.$k.config.clientEnv && klinalam.updateAttributes(), klinalam; | |
}, this.cloneDatatypes = function(apathfun) { | |
var kikipost = []; | |
if (apathfun.forEach(function(quibuto) { | |
var letrapha = new Datatype(quibuto.name, quibuto.context.collection, quibuto.context.index); | |
letrapha.selectorObjects = jQuery.extend(true, [], quibuto.selectorObjects), letrapha.highlightMap = jQuery.extend(true, {}, quibuto.highlightMap), letrapha.context = jQuery.extend(true, {}, quibuto.context), letrapha.numElements = quibuto.numElements, letrapha.datalist = jQuery.extend(true, {}, quibuto.datalist), letrapha.hide = quibuto.hide, kikipost.push(letrapha); | |
}), apathfun.pagination) { | |
var hujicud = apathfun.pagination; | |
var gebotkob = new Datatype(hujicud.name, 'pagination', 'pagination'); | |
gebotkob.selectorObjects = jQuery.extend(true, [], hujicud.selectorObjects), gebotkob.highlightMap = jQuery.extend(true, {}, hujicud.highlightMap), gebotkob.context = jQuery.extend(true, {}, hujicud.context), kikipost.pagination = gebotkob; | |
} | |
return kikipost; | |
}, this.Datatype = Datatype, 'undefined' != typeof window && (window.$k || (window.$k = {}), window.$k.datatypes = this); | |
}; | |
return bisedey; | |
}]), angular.module('Kimono').factory('Kimono_async', [function () { | |
var Kimono_async = new function() { | |
this.seriesFlow = function(fnArr, callback) { | |
// Define a recursive series iterator | |
var cb = function (err, useless) { | |
// If we have no functions left or there was an error | |
if (0 == fnArr.length || err) { | |
// If there is a callback, callback with our with the error | |
if (callback} { | |
callback(err, useless); | |
} | |
return void 0; | |
// Otherwise, run the next function | |
} else { | |
var fn = fnArr.shift(); | |
fn(cb, useless); | |
return void 0; | |
} | |
}; | |
// Start our recursion | |
cb(); | |
}; | |
// DEV: This isn't how you spell parallel -_-;; | |
this.parralelFlow = function(fnArr, callback) { | |
// Set up callback function for our functions | |
var callbackCount = 0; | |
// When a callback occurs | |
var cb = function() { | |
// If this was the final callback, call the original callback | |
callbackCount++; | |
if (callbackCount == fnArr.length) { | |
if (callback) { | |
callback(); | |
} | |
return void 0; | |
} else { | |
return void 0; | |
} | |
}; | |
// Execute each of the functions | |
var i = 0; | |
for (i < fnArr.length; i++) { | |
fnArr[i](cb); | |
} | |
}; | |
}; | |
return Kimono_async; | |
}]), angular.module('Kimono').factory('Manipulation', ['Kimono_async', 'Utils', function(Kimono_async) { | |
var jiedifru = new function() { | |
this.simulateClick = function(subaftey) { | |
return subaftey.each(function() { | |
if ('createEvent' in document) { | |
var nidabue = this.ownerDocument; | |
var snaquehi = nidabue.createEvent('MouseEvents'); | |
snaquehi.initMouseEvent('click', true, true, nidabue.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null), this.dispatchEvent(snaquehi); | |
} else { | |
this.click(); | |
} | |
}); | |
}, this.animateTextInput = function() { | |
var uliekoup; | |
var gamefe = Array.prototype.slice.call(arguments); | |
var srifralo = gamefe.shift(); | |
var cedaque = gamefe.shift(); | |
var eyafil = gamefe.pop(); | |
var tinaco = gamefe.pop() || {}; | |
var strujunan = tinaco.duration || 1e3; | |
uliekoup = strujunan / cedaque.length; | |
var eyosor = 0; | |
if (srifralo) { | |
this.simulateClick(jQuery(srifralo)), jQuery(srifralo).focus(), srifralo.value = ''; | |
var hejapu = setInterval(function() { | |
srifralo.value = srifralo.value + cedaque.charAt(eyosor), eyosor++, eyosor == cedaque.length && (clearInterval(hejapu), eyafil && eyafil()); | |
}, uliekoup); | |
} | |
}, this.fillLoginForm = function(noogoso, kanifeg, quabstokgan) { | |
var dudepum = this; | |
Kimono_async.seriesFlow([function(sappilid) { | |
dudepum.animateTextInput(noogoso.usernameInput, kanifeg.username, sappilid); | |
}, function(digije) { | |
dudepum.animateTextInput(noogoso.passwordInput, kanifeg.password, digije); | |
}], quabstokgan); | |
}; | |
}; | |
return jiedifru; | |
}]), angular.module('Kimono').factory('Regex', ['Utils', function(Utils) { | |
var chothoujo = new function() { | |
this.escapeEscapeSequences = function(stroquibo) { | |
return stroquibo.replace(/\b/g, '').replace(/\f/g, '').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t'); | |
}, this.parse = function(pirubong) { | |
var nokife = pirubong.match(/(?:^\/)(.+)((?:\/)(?:[a-z])*$)/); | |
var pirubong = new RegExp(nokife[1], nokife[2].substr(1)); | |
return pirubong; | |
}, this.buildRegexForN = function(kusado, libeba) { | |
for (var lidufla = [], sodikay = 0; | |
sodikay < kusado.length; | |
sodikay++) { | |
'actual' == kusado[sodikay].type && lidufla.push(kusado[sodikay]); | |
} | |
var glolumo = []; | |
var nagarus = []; | |
var giquefo = []; | |
var lobaja = []; | |
var gunisal = []; | |
var iginoot = lidufla.length; | |
var napulu = []; | |
var soodubrieg = false; | |
var geedpamit = function(dulugu) { | |
for (var onkquuspod = false, mofunu = 0; | |
mofunu < dulugu.length - 1; | |
) { | |
if (dulugu[mofunu].selectedText.toLowerCase() != dulugu[mofunu + 1].selectedText.toLowerCase()) { | |
onkquuspod = false; | |
break; | |
} | |
onkquuspod = true, mofunu++; | |
} | |
return onkquuspod; | |
}; | |
var memeyo = function(nourepan) { | |
for (var beejomceg = true, ketapie = 0; | |
ketapie < nourepan.length; | |
) { | |
0 != nourepan[ketapie] && (beejomceg = false), ketapie++; | |
} | |
return beejomceg; | |
}; | |
var shageede = function(limefiech) { | |
for (var ruthopi = false, kufeelu = 0; | |
kufeelu < limefiech.length; | |
) { | |
0 == limefiech[kufeelu] && (ruthopi = true), kufeelu++; | |
} | |
return ruthopi; | |
}; | |
var tasotuck = function(epimud, hepiluer) { | |
for (var ugofod = 0; | |
ugofod < hepiluer.length; | |
ugofod++) { | |
hepiluer[ugofod] = epimud(hepiluer[ugofod]); | |
} | |
return hepiluer; | |
}; | |
var foguque = function(tafedbes, akdenom) { | |
for (var nuboje = true, eyomip = 0; | |
eyomip < tafedbes.length; | |
) { | |
if (tafedbes[eyomip] != akdenom[eyomip].length - 1) { | |
return nuboje = false; | |
} | |
eyomip++; | |
} | |
return nuboje; | |
}; | |
var jorube = function(kicoklib, quikeho) { | |
for (var jevique = false, gopuqui = 0; | |
gopuqui < kicoklib.length; | |
) { | |
if (kicoklib[gopuqui] == quikeho[gopuqui].length - 1) { | |
return jevique = true; | |
} | |
gopuqui++; | |
} | |
return jevique; | |
}; | |
var fifescem = function(cecako) { | |
return cecako--, cecako; | |
}; | |
var ofutog = function(supefi) { | |
return supefi++, supefi; | |
}; | |
var kiploquil = function(jerielask, iperey) { | |
for (var lunuegan = true, muhori = 0; | |
muhori < iperey.length - 1; | |
) { | |
if (iperey[muhori][jerielask[muhori]] != iperey[muhori + 1][jerielask[muhori + 1]]) { | |
return lunuegan = false; | |
} | |
muhori++; | |
} | |
return lunuegan; | |
}; | |
if (1 == lidufla.length) { | |
napulu = [lidufla[0], lidufla[0]]; | |
} else { | |
for (var sodikay = 0; | |
iginoot > sodikay; | |
sodikay++) { | |
napulu[sodikay] = lidufla[sodikay]; | |
} | |
} | |
for (var sodikay = 0; | |
iginoot > sodikay; | |
sodikay++) { | |
glolumo[sodikay] = napulu[sodikay].startIndex, nagarus[sodikay] = glolumo[sodikay] + napulu[sodikay].selectedText.length - 1, giquefo[sodikay] = napulu[sodikay].element.text(), lobaja[sodikay] = glolumo[sodikay], gunisal[sodikay] = nagarus[sodikay]; | |
} | |
var gosnooroo = ''; | |
var zascisor = ''; | |
var justrudem = ''; | |
var itockscep = ''; | |
var slokleyhun = ''; | |
var nesedo = '([^]*?)'; | |
var gisusu = ''; | |
var neflejin = false; | |
var fonoscay = false; | |
iginoot > 1 && geedpamit(lidufla) && (nesedo = '(' + lidufla[0].selectedText + ')', soodubrieg = true); | |
for (var cidloomir = true, lasirak = 0; | |
cidloomir && libeba > lasirak; | |
) { | |
if (memeyo(lobaja)) { | |
gosnooroo = '^', cidloomir = false; | |
} else if (shageede(lobaja)) { | |
if (0 == lasirak) { | |
neflejin = true; | |
for (var sodikay = 0; | |
iginoot > sodikay; | |
sodikay++) { | |
0 != lobaja[sodikay] && (slokleyhun += giquefo[sodikay][lobaja[sodikay] - 1]) | |
} | |
} | |
cidloomir = false; | |
} else if (lobaja = tasotuck(fifescem, lobaja), kiploquil(lobaja, giquefo)) { | |
justrudem = giquefo[0][lobaja[0]] + justrudem; | |
} else if (0 == lasirak) { | |
for (var sodikay = 0; | |
iginoot > sodikay; | |
sodikay++) { | |
slokleyhun += giquefo[sodikay][lobaja[sodikay]]; | |
} | |
cidloomir = false; | |
} else { | |
cidloomir = false; | |
} | |
lasirak++; | |
} | |
var pecire = true; | |
for (lasirak = 0; | |
pecire && libeba > lasirak; | |
) { | |
if (foguque(gunisal, giquefo)) { | |
zascisor = '$', pecire = false; | |
} else if (jorube(gunisal, giquefo)) { | |
if (0 == lasirak) { | |
fonoscay = true; | |
for (var sodikay = 0; | |
iginoot > sodikay; | |
sodikay++) { | |
gunisal[sodikay] != giquefo[sodikay].length - 1 && (gisusu += giquefo[sodikay][gunisal[sodikay] + 1]) | |
} | |
} | |
pecire = false; | |
} else if (gunisal = tasotuck(ofutog, gunisal), kiploquil(gunisal, giquefo)) { | |
itockscep += giquefo[0][gunisal[0]]; | |
} else if (0 == lasirak) { | |
for (var sodikay = 0; | |
iginoot > sodikay; | |
sodikay++) { | |
gisusu += giquefo[sodikay][gunisal[sodikay]]; | |
} | |
pecire = false; | |
} else { | |
pecire = false; | |
} | |
lasirak++; | |
} | |
var queforoof = { | |
leftCharClass: slokleyhun.replace(/\\/g, '\\\\'), | |
leftHasBeginning: neflejin, | |
leftPattern: justrudem.replace(/\\/g, '\\\\'), | |
rightCharClass: gisusu.replace(/\\/g, '\\\\'), | |
rightHasEnd: fonoscay, | |
rightPattern: itockscep.replace(/\\/g, '\\\\'), | |
middlePattern: nesedo.replace(/\\/g, '\\\\'), | |
prefix: gosnooroo, | |
suffix: zascisor, | |
identicalText: soodubrieg | |
}; | |
return queforoof; | |
}, this.buildGenericRegex = function() { | |
return { | |
identicalText: false, | |
leftCharClass: '', | |
leftHasBeginning: false, | |
leftPattern: '', | |
middlePattern: '(.*?)', | |
prefix: '^', | |
rightCharClass: '', | |
rightHasEnd: false, | |
rightPattern: '', | |
suffix: '$' | |
}; | |
}, this.buildPaginationRegex = function(dubekim) { | |
var dilatjak = dubekim && '' != dubekim.trim() ? this.escape(dubekim) : '.*?'; | |
return { | |
identicalText: false, | |
leftCharClass: '', | |
leftHasBeginning: false, | |
leftPattern: '', | |
middlePattern: '(' + dilatjak + ')', | |
prefix: '^', | |
rightCharClass: '', | |
rightHasEnd: false, | |
rightPattern: '', | |
suffix: '$' | |
}; | |
}, this.buildRegexObjectFromRegex = function(liglesu) { | |
var rajicha = liglesu.toString(); | |
var meepuscod = rajicha.match(/\/(\^?)\((.*?)\)\((.*?)\)\((.*?)\)(\$?)\//); | |
return { | |
identicalText: false, | |
leftCharClass: '', | |
leftHasBeginning: false, | |
leftPattern: meepuscod[2] || '', | |
middlePattern: '(' + meepuscod[3] + ')', | |
prefix: meepuscod[1] || '', | |
rightCharClass: '', | |
rightHasEnd: false, | |
rightPattern: meepuscod[4] || '', | |
suffix: meepuscod[5] || '' | |
}; | |
}, this.reassembleRegex = function(drurotak) { | |
if (!drurotak) { | |
return null; | |
} | |
var kebepor = jQuery.extend({}, drurotak); | |
'' != kebepor.leftCharClass ? (kebepor.leftPattern = '[' + this.escape(kebepor.leftCharClass) + ']', kebepor.leftPattern = kebepor.leftHasBeginning ? '(^|' + kebepor.leftPattern + ')' : '(' + kebepor.leftPattern + ')') : kebepor.leftPattern = '(' + this.escape(kebepor.leftPattern) + ')', '' != kebepor.rightCharClass ? (kebepor.rightPattern = '[' + this.escape(kebepor.rightCharClass) + ']', kebepor.rightPattern = kebepor.rightHasEnd ? '(' + kebepor.rightPattern + '|$)' : '(' + kebepor.rightPattern + ')') : kebepor.rightPattern = '(' + this.escape(kebepor.rightPattern) + ')'; | |
var quecirraf = kebepor.prefix + kebepor.leftPattern + kebepor.middlePattern + kebepor.rightPattern + kebepor.suffix; | |
return new RegExp(this.escapeEscapeSequences(quecirraf)); | |
}, this.getGenericRegexString = function() { | |
return '/^()(.*?)()$/'; | |
}, this.testElForRegex = function(omiepon, claloquo, cedonu) { | |
var mulinkey = claloquo.getRegexForEl(omiepon); | |
if (0 == omiepon.offsetWidth && 0 == omiepon.offsetHeight && 'kim-table-normalizer' != omiepon.className && 'pagination' != cedonu && 1 != claloquo.context.hiddenElements && 'true' != claloquo.context.hiddenElements) { | |
return false; | |
} | |
if ('IMG' == omiepon.tagName) { | |
return true; | |
} | |
if (Utils.querySelectorAll('img', omiepon).length > 0) { | |
return true; | |
} | |
if (omiepon.textContent.match(/^\s*$/) && 'pagination' != cedonu && 'getattributes' != cedonu && (0 == Utils.size(claloquo.context.attributes) || 'hldraw' == cedonu)) { | |
return false; | |
} | |
if (String(mulinkey) === String(/^()(.*?)()$/)) { | |
return true; | |
} | |
var ketami = Utils.tightMatch(mulinkey, omiepon.textContent); | |
return ketami && ketami[2] ? ketami[2].length > 0 : false; | |
}, this.getMatchedText = function(bamidist, kicuput, opeyuey, ledadu) { | |
if (ledadu = false, kicuput && String(kicuput) !== String(/^()(.*?)()$/) && 'pagination' != opeyuey) { | |
var quenebe = Utils.tightMatch(kicuput, bamidist.textContent); | |
return quenebe ? ledadu ? quenebe[2] : Utils.cleanTrim(quenebe[2]) : ''; | |
} | |
return ledadu ? bamidist.textContent : Utils.cleanTrim(bamidist.textContent); | |
}, this.getStartOffset = function(cuecedey, enkidam, getunas) { | |
if (enkidam && String(enkidam) !== String(/^()(.*?)()$/) && 'pagination' != getunas) { | |
var nikelu = cuecedey.textContent; | |
var luegola = Utils.tightMatch(enkidam, nikelu); | |
return luegola ? nikelu.search(enkidam) + luegola[1].length : 0; | |
} | |
return 0; | |
}, this.getStartNode = function(pocochhub, ofeckjor, pudiewu, sijayut) { | |
for (var sopefor = pocochhub.childNodes, horieda = ofeckjor; | |
horieda < sopefor.length; | |
) { | |
var kuporut = sopefor[horieda]; | |
var huswuswo = 0; | |
if (3 == kuporut.nodeType) { | |
for (; | |
huswuswo < kuporut.nodeValue.length; | |
) { | |
if (sijayut == pudiewu) { | |
return { | |
startNode: kuporut, | |
startOffset: huswuswo, | |
startNodeIndex: horieda, | |
globalCount: sijayut | |
}; | |
} | |
huswuswo++, sijayut++; | |
} | |
} else if (1 == kuporut.nodeType) { | |
var urnerscek = this.getStartNode(kuporut, 0, pudiewu, sijayut); | |
if (urnerscek.startNode) { | |
return urnerscek; | |
} | |
sijayut = urnerscek.globalCount; | |
} | |
horieda++; | |
} | |
return { | |
startNode: undefined, | |
startOffset: undefined, | |
startNodeIndex: null, | |
globalCount: sijayut | |
}; | |
}, this.isSameTier = function(puhebik, claribog) { | |
var erurquog = Array.prototype.slice.call(Utils.querySelectorAll(puhebik)); | |
var repiegri = Array.prototype.slice.call(Utils.querySelectorAll(claribog)); | |
return erurquog.every(function(jerorab) { | |
return repiegri.indexOf(jerorab) >= 0; | |
}) && repiegri.length == erurquog.length ? true : false; | |
}, this.isSuperTier = function(nahakdray, dojuquo, ibiepom) { | |
var sumifid = Array.prototype.slice.call(Utils.querySelectorAll(nahakdray)); | |
var kedathun = Array.prototype.slice.call(Utils.querySelectorAll(dojuquo)); | |
var eyalit = Array.prototype.slice.call(Utils.querySelectorAll(ibiepom)); | |
return sumifid.every(function(cacece) { | |
return eyalit.indexOf(cacece) >= 0; | |
}) && eyalit.length > kedathun.length ? true : false; | |
}, this.isSuperset = function(nadrofjol, ceteno) { | |
var detoogie = Array.prototype.slice.call(Utils.querySelectorAll(nadrofjol)); | |
var wugelu = Array.prototype.slice.call(Utils.querySelectorAll(ceteno)); | |
return detoogie.every(function(quedulu) { | |
return wugelu.indexOf(quedulu) >= 0; | |
}) && wugelu.length > detoogie.length ? true : false; | |
}, this.getStartOffset = function(ekrimhaf, dadofiep, tecequa) { | |
if (dadofiep && String(dadofiep) !== String(/^()(.*?)()$/) && 'pagination' != tecequa) { | |
var daglupip = ekrimhaf.textContent; | |
var cofosloo = Utils.tightMatch(dadofiep, daglupip); | |
return cofosloo ? daglupip.search(dadofiep) + cofosloo[1].length : 0; | |
} | |
return 0; | |
}, this.allMatchRegex = function(falumu, taheji) { | |
for (var dikitee = 0; | |
dikitee < falumu.length; | |
dikitee++) { | |
if (!falumu[dikitee].match(taheji)) { | |
return false; | |
} | |
} | |
return true; | |
}; | |
this.escape = function(quagirob) { | |
return quagirob.replace(/[-\/^$*+?.()|[\]{}]/g, '\\$&'); | |
}, this.unescape = function(soflide) { | |
return soflide.replace(/\\([-\/\\^$*+?.()|[\]{}])/g, '$1'); | |
}, 'undefined' != typeof window && (window.$k || (window.$k = {}), window.$k.regex = this); | |
}; | |
return chothoujo; | |
}]); | |
angular.module('Kimono').factory('Selections', | |
['Regex', 'Utils', | |
function (Regex, Utils) { | |
var SelectionsFn = new function() { | |
var nekstomol = function(abtornul) { | |
for (var swanugou = Utils.querySelectorAll(abtornul), nobohi = 0; | |
nobohi < swanugou.length; | |
nobohi++) { | |
if (Utils.querySelectorAll('li', swanugou[nobohi]).length > 1) { | |
return false; | |
} | |
if (Utils.querySelectorAll('td', swanugou[nobohi]).length > 1) { | |
return false; | |
} | |
if (Utils.querySelectorAll('th', swanugou[nobohi]).length > 1) { | |
return false; | |
} | |
if (Utils.querySelectorAll('tr', swanugou[nobohi]).length > 1) { | |
return false; | |
} | |
if (Utils.querySelectorAll('p', swanugou[nobohi]).length > 1) { | |
return false; | |
} | |
if (Utils.querySelectorAll('div', swanugou[nobohi]).length > 1) { | |
return false; | |
} | |
if (Utils.querySelectorAll('option', swanugou[nobohi]).length > 1) { | |
return false; | |
} | |
} | |
return true; | |
}; | |
var nideyay = function(punudfap, nerednis) { | |
nerednis[nerednis.length - 1] = ''; | |
for (var dapoda = [], oroput = 0; | |
oroput < punudfap.length; | |
oroput++) { | |
dapoda.push(punudfap[oroput].str), dapoda.push(nerednis[oroput]); | |
} | |
return dapoda.join(''); | |
}; | |
var difnirnas = function(quecele, nounkimooy, erufsun) { | |
nounkimooy[nounkimooy.length - 1] = ''; | |
for (var lumiho = [], tofouter = 0; | |
tofouter < quecele.length; | |
tofouter++) { | |
lumiho.push(quecele[tofouter].tagName), erufsun.nthChild[tofouter] && lumiho.push(quecele[tofouter].nthChild), erufsun.id && lumiho.push(quecele[tofouter].id), erufsun.classList[tofouter] && lumiho.push(quecele[tofouter].classList), lumiho.push(nounkimooy[tofouter]); | |
} | |
return lumiho.join(''); | |
}; | |
var borigid = function(sohono) { | |
var celales = sohono.shift(); | |
if (0 == sohono.length) { | |
return celales; | |
} | |
for (var noofofri = [], stepagem = 0; | |
stepagem < celales.length; | |
stepagem++) { | |
for (var senefor = false, ekepab = 0; | |
ekepab < sohono.length; | |
ekepab++) { | |
if (-1 == sohono[ekepab].indexOf(celales[stepagem])) { | |
var senefor = true; | |
break; | |
} | |
} | |
senefor || noofofri.push(celales[stepagem]); | |
} | |
return noofofri; | |
}; | |
var mahiquo = function(goobedi) { | |
for (var nujajoom, irigiek = 0, efusoln = 1; | |
efusoln < goobedi.length; | |
efusoln++) { | |
var isisaf = parseInt(goobedi[efusoln - 1].replace(/:.*?\((\d+)\)/, '$1')); | |
var humuejay = parseInt(goobedi[efusoln].replace(/:.*?\((\d+)\)/, '$1')); | |
if (nujajoom = humuejay - isisaf > 0 ? humuejay - isisaf : nujajoom, nujajoom != irigiek && efusoln > 1 && humuejay - isisaf > 0) { | |
nujajoom = null; | |
break; | |
} | |
} | |
return nujajoom; | |
}; | |
var hasMultipleNames = function (tagNames) { | |
var hasMultipleNames = true; | |
var i = 1; | |
for (; i < tagNames.length; i++) { | |
if (tagNames[0] != tagNames[i]) { | |
hasMultipleNames = false; | |
break; | |
} | |
} | |
return hasMultipleNames; | |
}; | |
var recursionCounter = 0; | |
var findCommonAncestorDistances = function (firstElements, firstElementZeros/*, document*/) { | |
// If we have recursed 1000 times, stop | |
if (1e5 == recursionCounter++) { | |
return false; | |
} | |
// Make a copy of the elements | |
var resolvedElements = []; | |
var len = firstElementZeros.length; | |
var i = 0; | |
for (i < firstElementZeros.length; i++) { | |
resolvedElements[i] = firstElements[i]; | |
} | |
// Walk up each of the elements for its zeroes count | |
for (var i = 0; len > i; i++) { | |
for (var j = 0; j < firstElementZeros[i]; j++) { | |
resolvedElements[i] = resolvedElements[i].parentNode; | |
} | |
} | |
// Determine if there is only one element | |
var thereIsOnlyOneElement = true; | |
var i = 1; | |
for (; len > i; i++) { | |
if (resolvedElements[0] !== resolvedElements[i]) { | |
thereIsOnlyOneElement = false; | |
break; | |
} | |
} | |
// If there is only one element, return the zeroes | |
if (thereIsOnlyOneElement) { | |
return firstElementZeros; | |
} | |
// Walk over each element | |
var stillLowEnough = true; | |
var i = len - 1; | |
for (; i >= 0 && stillLowEnough; i--) { | |
// If we haven't the body and we haven't reached 6 levels, increment our traversal | |
if (resolvedElements[i] !== document.body && 6 != firstElementZeros[i]) { | |
firstElementZeros[i]++; | |
stillLowEnough = false; | |
break; | |
} | |
// If we have walked over all elements, return false | |
if (0 == i) { | |
return false; | |
} | |
// Update the element value to 0 | |
firstElementZeros[i] = 0; | |
stillLowEnough = true; | |
} | |
// Keep on recursing | |
return findCommonAncestorDistances(firstElements, firstElementZeros, document); | |
}; | |
var getNextNode = function(node) { | |
// If the node has children, return the first one | |
if (node.hasChildNodes()) { | |
return node.firstChild; | |
} | |
// Otherwise, find the next parent with a sibling | |
for (; | |
node && !node.nextSibling; | |
) { | |
node = node.parentNode; | |
} | |
// If we have a node, return said sibling or nothing | |
return node ? node.nextSibling : null; | |
}; | |
this.getTierSelectors = function(nofloneet, getibu, detilum) { | |
var duesaci; | |
var flinalen = nofloneet.split(' > '); | |
var kayjubob = []; | |
duesaci = flinalen.length > getibu ? flinalen.length - getibu : 0; | |
for (var suegikal = '', hecomoo = 0; | |
duesaci > hecomoo; | |
hecomoo++) { | |
suegikal += flinalen[hecomoo], suegikal += ' > '; | |
} | |
for (var hecomoo = duesaci; | |
hecomoo < flinalen.length; | |
hecomoo++) { | |
var seedquadel = flinalen[hecomoo].match(/(.*?)(:nth.*?)?(\..*?)?(#.*)?$/); | |
seedquadel && kayjubob.push({ | |
tagname: seedquadel[1], | |
nthchild: seedquadel[2] ? seedquadel[2] : '', | |
classname: seedquadel[3] ? seedquadel[3] : '', | |
idvalue: seedquadel[4] ? seedquadel[4] : '' | |
}); | |
} | |
var kefuroy = []; | |
kefuroy.push(nofloneet); | |
var erofir = 0; | |
var orugun = 0; | |
var poputus = function(gesoba, linufi, scudesjef, beguda) { | |
orugun++, erofir != detilum && (gesoba > 0 && (linufi += ' > '), linufi += kayjubob[gesoba].tagname, scudesjef && beguda ? linufi += kayjubob[gesoba].nthchild + kayjubob[gesoba].classname + kayjubob[gesoba].idvalue : scudesjef && !beguda ? linufi += kayjubob[gesoba].classname + kayjubob[gesoba].idvalue : !scudesjef && beguda && (linufi += kayjubob[gesoba].nthchild), gesoba < kayjubob.length - 1 ? (poputus(gesoba + 1, linufi, true, true), poputus(gesoba + 1, linufi, false, true), kayjubob[gesoba + 1].tagname.match(/(td|th)/) || (poputus(gesoba + 1, linufi, true, false), poputus(gesoba + 1, linufi, false, false))) : (linufi = suegikal + linufi, Regex.isSuperTier(kefuroy[0], kefuroy[kefuroy.length - 1], linufi) && nekstomol(linufi) && (kefuroy.push(linufi), erofir++))); | |
}; | |
return poputus(0, '', true, true), poputus(0, '', false, true), kayjubob[0].tagname.match(/(td|th)/) || (poputus(0, '', false, false), poputus(0, '', true, false)), kefuroy; | |
}; | |
// Helper to collect a depth first array of nodes in a `range` | |
this.getRangeSelectedNodes = function(range) { | |
// Localize the start and end container | |
var startContainer = range.startContainer; | |
var endContainer = range.endContainer; | |
// If the range starts and ends on the same node, return it | |
if (startContainer == endContainer) { | |
return [startContainer]; | |
} | |
// Otherwise, depth first collect each of the nodes | |
for (var retArr = []; | |
startContainer && startContainer != endContainer;) { | |
retArr.push(startContainer = getNextNode(startContainer)); | |
} | |
// Add on missing parent nodes to collection | |
for (startContainer = range.startContainer; | |
startContainer && startContainer != range.commonAncestorContainer;) { | |
retArr.unshift(startContainer); | |
startContainer = startContainer.parentNode; | |
} | |
// Return our collection | |
return retArr; | |
}; | |
this.pruneSelections = function(mobunhip, iparin) { | |
var horyech = []; | |
var rakklipor = iparin.split(' > '); | |
rakklipor.forEach(function(opalus) { | |
var nagnetooy = opalus.split(' '); | |
horyech = horyech.concat(nagnetooy); | |
}); | |
for (var mipuhick = horyech[horyech.length - 1], camegod = mipuhick.substring(0, mipuhick.search(/[:\.#]/)), fubouxar = [], itefney = 0; | |
itefney < mobunhip.length; | |
itefney++) { | |
('*' == camegod || camegod == mobunhip[itefney].element.get(0).tagName.toLowerCase()) && fubouxar.push(mobunhip[itefney]); | |
} | |
return fubouxar; | |
}; | |
this.getSuperSpecificSelector = function(ledeca) { | |
for (var fiklafum, leheve, sadurbrur = [], dihapu = [], bojilu = [], utolnus = []; | |
0 == sadurbrur.length || 'body' != sadurbrur[0].tagName; | |
) { | |
for (var laralu = [], esorey = [], rocegle = [], disinos = [], buquibli = {}, opoonar = false, sagokin = false, bisape = 0; | |
bisape < ledeca.length; | |
bisape++) { | |
laralu[bisape] = ledeca[bisape].tagName.toLowerCase(), esorey[bisape] = ':nth-child(' + parseInt(jQuery(ledeca[bisape]).index() + 1) + ')'; | |
var higoluf = ['']; | |
if (ledeca[bisape].getAttribute('class') != undefined) { | |
for (var ofafan = ledeca[bisape].className.split(/\s+/), efegug = 0; | |
efegug < ofafan.length; | |
efegug++) { | |
!ofafan[efegug].match(/^\s*$/) && ofafan[efegug].match(/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/) && higoluf.push(ofafan[efegug]); | |
} | |
} | |
rocegle[bisape] = higoluf; | |
var pabeyim = ledeca[bisape].id; | |
disinos[bisape] = pabeyim ? '#' + pabeyim : '', disinos[bisape].match(/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/) || (disinos[bisape] = ''); | |
} | |
if (hasMultipleNames(laralu)) { | |
buquibli = { | |
tagName: laralu[0], | |
nthChild: '', | |
classList: '', | |
id: '', | |
str: '' | |
}; | |
} else { | |
if (sadurbrur.length > 0) { | |
sagokin = true; | |
break; | |
} | |
if (Regex.allMatchRegex(laralu, /^(td|th)$/) && (fiklafum = []), !fiklafum) { | |
bojilu = []; | |
for (var cabibot = 0; | |
cabibot < ledeca.length; | |
cabibot++) { | |
bojilu.push(0); | |
} | |
if (fiklafum = findCommonAncestorDistances(ledeca, bojilu, document), !fiklafum) { | |
return null; | |
} | |
for (var satufra = Math.min.apply(null, fiklafum), bisape = 0; | |
bisape < ledeca.length; | |
bisape++) { | |
var posihu = fiklafum[bisape] - satufra; | |
if (posihu > 0 && 3 >= posihu) { | |
for (var efegug = 0; | |
posihu > efegug; | |
efegug++) { | |
ledeca[bisape] = ledeca[bisape].parentNode, opoonar = true; | |
} | |
} else if (posihu > 3) { | |
return null; | |
} | |
} | |
} | |
opoonar || (buquibli = { | |
tagName: '*', | |
nthChild: '', | |
classList: '', | |
id: '', | |
str: '*' | |
}); | |
} | |
if (!opoonar) { | |
hasMultipleNames(esorey) && (buquibli.nthChild = esorey[0]); | |
var yekstab = borigid(rocegle); | |
yekstab.length > 1 && (buquibli.classList = yekstab.join('.')), hasMultipleNames(disinos) && (buquibli.id = disinos[0]), buquibli.str = [buquibli.tagName, buquibli.nthChild, buquibli.classList, buquibli.id].join(''), sadurbrur.unshift(buquibli), dihapu.unshift(leheve); | |
var dusousen = nideyay(sadurbrur, dihapu); | |
if (utolnus.push({ | |
selector: dusousen, | |
selectorComponents: sadurbrur.slice(0), | |
separators: dihapu.slice(0), | |
numResults: Utils.querySelectorAll(dusousen).length | |
}), 'body' != laralu[0]) { | |
for (var bisape = 0; | |
bisape < ledeca.length; | |
bisape++) { | |
ledeca[bisape] = ledeca[bisape].parentNode; | |
} | |
} | |
leheve = ' > '; | |
} | |
if (sagokin) { | |
break; | |
} | |
} | |
for (var satufra = utolnus[0].numResults, bisape = 1; | |
bisape < utolnus.length && (utolnus[bisape].numResults < satufra && (satufra = utolnus[bisape].numResults), 1 != satufra); | |
bisape++) { | |
} | |
for (var hirevi = Math.min(utolnus.length - 1, 4), bisape = hirevi; | |
bisape < utolnus.length; | |
bisape++) { | |
if (utolnus[bisape].numResults == satufra) { | |
var peecoudo = utolnus[bisape].selector; | |
break; | |
} | |
} | |
for (var sadurbrur = utolnus[bisape].selectorComponents, dihapu = utolnus[bisape].separators, cuklutop = [], bisape = 0; | |
bisape < sadurbrur.length + 1; | |
bisape++) { | |
cuklutop[bisape] = []; | |
for (var efegug = 0; | |
efegug < sadurbrur.length; | |
efegug++) { | |
cuklutop[bisape][sadurbrur.length - 1 - efegug] = bisape > efegug | |
} | |
} | |
var nubufood; | |
var iguereb = difnirnas(sadurbrur, dihapu, { | |
id: false, | |
classList: cuklutop[0], | |
nthChild: cuklutop[0] | |
}); | |
if (Regex.isSuperset(peecoudo, iguereb) || (nubufood = iguereb), !nubufood) { | |
var iguereb = difnirnas(sadurbrur, dihapu, { | |
id: true, | |
classList: cuklutop[0], | |
nthChild: cuklutop[0] | |
}); | |
Regex.isSuperset(peecoudo, iguereb) || (nubufood = iguereb); | |
} | |
if (!nubufood) { | |
for (var bisape = 1; | |
bisape < cuklutop.length; | |
bisape++) { | |
var iguereb = difnirnas(sadurbrur, dihapu, { | |
id: true, | |
classList: cuklutop[bisape], | |
nthChild: cuklutop[0] | |
}); | |
if (!Regex.isSuperset(peecoudo, iguereb)) { | |
nubufood = iguereb; | |
break; | |
} | |
} | |
} | |
if (!nubufood) { | |
for (var bisape = 1; | |
bisape < cuklutop.length; | |
bisape++) { | |
var iguereb = difnirnas(sadurbrur, dihapu, { | |
id: true, | |
classList: cuklutop[cuklutop.length - 1], | |
nthChild: cuklutop[bisape] | |
}); | |
if (!Regex.isSuperset(peecoudo, iguereb)) { | |
nubufood = iguereb; | |
break; | |
} | |
} | |
} | |
return nubufood || (nubufood = peecoudo), nekstomol(nubufood, document) ? nubufood : null; | |
}; | |
this.buildSelectorForN = function (selections, datatypes, datatypeIndex) { | |
var commonAncestorDistances, abamum; | |
var lerelod = []; | |
var dofanuef = []; | |
var firstElements = []; | |
var firstElementZeros = []; | |
var giebuquo = []; | |
// Create a collection of first elements from our selections | |
var i = 0; | |
for (i < selections.length; i++) { | |
// If the selection's jquery selection has an element, save it | |
var firstElement = selections[i].firstElement.get(0); | |
if ('undefined' != typeof firstElement && firstElement) { | |
firstElements.push(firstElement); | |
firstElementZeros.push(0); | |
} | |
} | |
// If we have previously rejected tiers | |
var wasRejected = false; | |
var rejectedTierSelectors = datatypes[datatypeIndex].selectorObjects[0] | |
? datatypes[datatypeIndex].selectorObjects[0].rejectedTiers.join(',') | |
: ''; | |
if ('' != rejectedTierSelectors) { | |
// Find out if any of the rejected tiers match our current selection | |
var rejectedTierElements = Utils.querySelectorAll(rejectedTierSelectors); | |
var i = 0; | |
for (i < rejectedTierElements.length; i++) { | |
if (rejectedTierElements[i] === firstElements[firstElements.length - 1]) { | |
wasRejected = true; | |
break; | |
} | |
} | |
} | |
// Loop untin we have no items left or have hit the <body> | |
for (; 0 == lerelod.length || 'body' != lerelod[0].tagName;) { | |
var tagNames = []; | |
var nthChildSelector = []; | |
var classesArr = []; | |
var idSelectors = []; | |
var elaykor = {}; | |
var cephusip = false; | |
var quipoquo = false; | |
// For each of the first elements | |
var i = 0; | |
for (; i < firstElements.length; i++) { | |
// Save the tag name and its index as selector | |
tagNames[i] = firstElements[i].tagName.toLowerCase(); | |
nthChildSelector[i] = ':nth-child(' + parseInt(jQuery(firstElements[i]).index() + 1) + ')'; | |
// If the element has classes, break them up and save | |
var classes = ['']; | |
if (firstElements[i].getAttribute('class') != undefined) { | |
// For each of the classes in the classname | |
var _classes = firstElements[i].className.split(/\s+/); | |
var j = 0; | |
for (; j < _classes.length; j++) { | |
// If the class is more than whitespace/an empty string and only alphanumeric characters or a dash | |
if (!_classes[j].match(/^\s*$/) && _classes[j].match(/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/)) { | |
// Save the class | |
classes.push(_classes[j]); | |
} | |
} | |
} | |
// Save the classes for later | |
classesArr[i] = classes; | |
// If the element has an id, build its selector | |
var id = firstElements[i].id; | |
idSelectors[i] = id ? '#' + id : ''; | |
// If the id isn't alphanumeric/dash, coerce it to an empty string | |
if (!idSelectors[i].match(/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/)) { | |
idSelectors[i] = ''; | |
} | |
} | |
// If we have multiple tag names | |
if (hasMultipleNames(tagNames)) { | |
// Generate parameters for the first one | |
elaykor = { | |
tagName: tagNames[0], | |
nthChild: '', | |
classList: '', | |
id: '', | |
str: '' | |
}; | |
} else { | |
if (lerelod.length > 0) { | |
quipoquo = true; | |
break; | |
} | |
// If any of the tags are table cells, generate an array | |
if (Regex.allMatchRegex(tagNames, /^(td|th)$/){ | |
commonAncestorDistances = []; | |
} | |
// If we don't have an array | |
if (!commonAncestorDistances) { | |
// Generate an array of zeroes for each of the element | |
firstElementZeros = []; | |
var k = 0; | |
for (k < firstElements.length; k++) { | |
firstElementZeros.push(0); | |
} | |
// If we could not find common ancestor distances, return nothing | |
commonAncestorDistances = findCommonAncestorDistances(firstElements, firstElementZeros, document); | |
if (!commonAncestorDistances) { | |
return null; | |
} | |
// Find the lowest distance | |
var minimumDistance = Math.min.apply(null, commonAncestorDistances); | |
// Walk over each of the first elements | |
var i = 0; | |
for (i < firstElements.length; i++) { | |
// If the distance is far but not too far from the minimum | |
var distanceDifference = commonAncestorDistances[i] - minimumDistance; | |
if (distanceDifference > 0 && 3 >= distanceDifference) { | |
// Walk to the same ancestor node | |
// DEV: I don't like this fuzzy matching | |
for (var j = 0; distanceDifference > j; j++) { | |
firstElements[i] = firstElements[i].parentNode; | |
cephusip = true; | |
} | |
// Otherwise, if the element is too far, return null | |
} else if (distanceDifference > 3) { | |
return null; | |
} | |
} | |
} | |
cephusip || (elaykor = { | |
tagName: '*', | |
nthChild: '', | |
classList: '', | |
id: '', | |
str: '*' | |
}); | |
} | |
if (!cephusip) { | |
if (hasMultipleNames(nthChildSelector)) { | |
elaykor.nthChild = nthChildSelector[0]; | |
} else if (wasRejected) { | |
var dikleyax = mahiquo(nthChildSelector); | |
if (dikleyax) { | |
for (var ripugi = parseInt(nthChildSelector[0].replace(/:.*?\((\d+)\)/, '$1')), k = 0; | |
k < nthChildSelector.length; | |
k++) { | |
var quipaquo = parseInt(nthChildSelector[k].replace(/:.*?\((\d+)\)/, '$1')); | |
ripugi > quipaquo && (ripugi = quipaquo); | |
} | |
elaykor.nthChild = [':nth-child(', dikleyax, 'n + ', ripugi, ')'].join(''); | |
} | |
} | |
var oraguep = borigid(classesArr); | |
oraguep.length > 1 && (elaykor.classList = oraguep.join('.')), hasMultipleNames(idSelectors) && (elaykor.id = idSelectors[0]), 'pagination' == datatypeIndex && (elaykor.nthChild = ''), elaykor.str = [elaykor.tagName, elaykor.nthChild, elaykor.classList, elaykor.id].join(''), lerelod.unshift(elaykor), dofanuef.unshift(abamum); | |
var egukut = nideyay(lerelod, dofanuef); | |
if (giebuquo.push({ | |
selector: egukut, | |
selectorComponents: lerelod.slice(0), | |
separators: dofanuef.slice(0), | |
numResults: Utils.querySelectorAll(egukut).length | |
}), 'body' != tagNames[0]) { | |
for (var i = 0; | |
i < firstElements.length; | |
i++) { | |
firstElements[i] = firstElements[i].parentNode; | |
} | |
} | |
abamum = ' > '; | |
} | |
if (quipoquo) { | |
break; | |
} | |
} | |
for (var wuheque = giebuquo[0].numResults, i = 1; | |
i < giebuquo.length && (giebuquo[i].numResults < wuheque && (wuheque = giebuquo[i].numResults), 1 != wuheque); | |
i++) { | |
} | |
for (var ripugi = 'pagination' == datatypeIndex ? 0 : Math.min(giebuquo.length - 1, 4), i = ripugi; | |
i < giebuquo.length; | |
i++) { | |
if (giebuquo[i].numResults == wuheque) { | |
var kakukop = giebuquo[i].selector; | |
break; | |
} | |
} | |
for (var lerelod = giebuquo[i].selectorComponents, dofanuef = giebuquo[i].separators, bemoonet = [], i = 0; | |
i < lerelod.length + 1; | |
i++) { | |
bemoonet[i] = []; | |
for (var j = 0; | |
j < lerelod.length; | |
j++) { | |
bemoonet[i][lerelod.length - 1 - j] = i > j | |
} | |
} | |
var venoosi; | |
var quechagtouf = difnirnas(lerelod, dofanuef, { | |
id: false, | |
classList: bemoonet[0], | |
nthChild: bemoonet[0] | |
}); | |
if (Regex.isSuperset(kakukop, quechagtouf) || (venoosi = quechagtouf), !venoosi) { | |
var quechagtouf = difnirnas(lerelod, dofanuef, { | |
id: true, | |
classList: bemoonet[0], | |
nthChild: bemoonet[0] | |
}); | |
Regex.isSuperset(kakukop, quechagtouf) || (venoosi = quechagtouf); | |
} | |
if (!venoosi) { | |
for (var i = 1; | |
i < bemoonet.length; | |
i++) { | |
var quechagtouf = difnirnas(lerelod, dofanuef, { | |
id: true, | |
classList: bemoonet[i], | |
nthChild: bemoonet[0] | |
}); | |
if (!Regex.isSuperset(kakukop, quechagtouf)) { | |
venoosi = quechagtouf; | |
break; | |
} | |
} | |
} | |
if (!venoosi) { | |
for (var i = 1; | |
i < bemoonet.length; | |
i++) { | |
var quechagtouf = difnirnas(lerelod, dofanuef, { | |
id: true, | |
classList: bemoonet[bemoonet.length - 1], | |
nthChild: bemoonet[i] | |
}); | |
if (!Regex.isSuperset(kakukop, quechagtouf)) { | |
venoosi = quechagtouf; | |
break; | |
} | |
} | |
} | |
return venoosi || (venoosi = kakukop), nekstomol(venoosi, document) ? venoosi : null; | |
}; | |
this.removedNthChildForTableElements = function(lowoquo, sakiekip) { | |
if ('td' == lowoquo.substr(lowoquo.lastIndexOf(':') - 2, 2)) { | |
var dasolue = sakiekip.lastIndexOf('> ') + 2; | |
if ('td' == sakiekip.substr(dasolue, 2) && ':' != sakiekip[dasolue + 2]) { | |
return true; | |
} | |
} else if ('th' == lowoquo.substr(lowoquo.lastIndexOf(':') - 2, 2)) { | |
var dasolue = sakiekip.lastIndexOf('> ') + 2; | |
if ('th' == sakiekip.substr(dasolue, 2) && ':' != sakiekip[dasolue + 2]) { | |
return true; | |
} | |
} else { | |
if ('*' != lowoquo.substr(lowoquo.lastIndexOf(':') - 2, 1)) { | |
return false; | |
} | |
var dasolue = sakiekip.lastIndexOf('> ') + 2; | |
if ('*' == sakiekip.substr(dasolue, 2) && ':' != sakiekip[dasolue + 1]) { | |
return true; | |
} | |
} | |
}; | |
this.normalizeAllTables = function() { | |
var simelum = Array.prototype.slice.call(document.getElementsByTagName('table')); | |
simelum.forEach(function(camoldrof, fephuqui) { | |
var cibamo = camoldrof.id || 'kim-normalized-table-' + fephuqui; | |
cibamo.match(':') && (cibamo = 'kim-normalized-table-' + fephuqui), camoldrof.id = cibamo; | |
var jigijey = Utils.querySelectorAll('tr', camoldrof); | |
if (jigijey.length > 0) { | |
for (var baquejig = jigijey[0].children.length, jobiro = 0; | |
jobiro < jigijey[0].children.length; | |
jobiro++) { | |
var beziha = jigijey[0].children[jobiro]; | |
var dimoymuk = parseInt(beziha.getAttribute('colspan')); | |
dimoymuk && (baquejig += dimoymuk - 1); | |
} | |
for (var gojugu = jigijey[0].children.length, forushie = [], edbernot = [], jobiro = 0; | |
baquejig > jobiro; | |
jobiro++) { | |
forushie[jobiro] = 0, edbernot[jobiro] = ''; | |
} | |
for (var jobiro = 0; | |
jobiro < jigijey.length; | |
jobiro++) { | |
for (var clapiru = jigijey[jobiro], gelasno = 0; | |
gelasno < clapiru.children.length; | |
gelasno++) { | |
var beziha = clapiru.children[gelasno]; | |
var dimoymuk = parseInt(beziha.getAttribute('colspan')); | |
var najatal = beziha.tagName.toLowerCase(); | |
if (dimoymuk) { | |
for (var bamuki = 0; | |
dimoymuk - 1 > bamuki; | |
bamuki++) { | |
var lejejoo = document.createElement(najatal); | |
lejejoo.style.display = 'none', lejejoo.className = 'kim-table-normalizer', lejejoo.innerHTML = beziha.textContent, gelasno + 1 >= clapiru.children.length ? clapiru.appendChild(lejejoo) : clapiru.insertBefore(lejejoo, clapiru.children[gelasno + 1]); | |
} | |
} | |
} | |
for (var gojugu = clapiru.children.length, gelasno = 0; | |
gojugu > gelasno; | |
gelasno++) { | |
if (forushie[gelasno] > 0) { | |
if (clapiru.children.length > 0) { | |
var najatal = clapiru.children[0].tagName.toLowerCase(); | |
} else { | |
var najatal = 'td'; | |
} | |
var wujodu = document.createElement(najatal); | |
wujodu.style.display = 'none', wujodu.className = 'kim-table-normalizer', wujodu.innerHTML = edbernot[gelasno]; | |
var muguba = clapiru.children.length; | |
muguba > gelasno ? clapiru.insertBefore(wujodu, clapiru.children[gelasno]) : clapiru.appendChild(wujodu), forushie[gelasno]--; | |
} | |
} | |
for (var umnoubcoup = clapiru.children, bamuki = 0; | |
bamuki < umnoubcoup.length; | |
bamuki++) { | |
var dotene = umnoubcoup[bamuki].getAttribute('rowspan'); | |
dotene && (forushie[bamuki] += dotene - 1, edbernot[bamuki] = umnoubcoup[bamuki].textContent); | |
} | |
} | |
} | |
}); | |
}, 'undefined' != typeof window && (window.$k || (window.$k = {}), window.$k.selections = this); | |
}; | |
return SelectionsFn; | |
}]), angular.module('Kimono').factory('Utils', ['Config', 'Common', function(Config, Common) { | |
var cookscomat = new function() { | |
this.startsWith = function(str, startStr) { | |
return 0 === str.toLowerCase().indexOf(startStr.toLowerCase()); | |
}; | |
// Detect whether an element is part of kimono or not | |
this.isKimonoChild = function(el, checkClass) { | |
// If there is no element, return false | |
if (!el[0]) { | |
return false; | |
} | |
// If the element is inside of `#Kimonoify`, return true | |
if (jQuery.contains(jQuery('#Kimonify')[0], el[0])) { | |
return true; | |
} | |
// If the element is in a highlighted section, return true | |
// TODO: What is a highlight wrapper | |
for (var dokiphou = jQuery('.kim-highlight-wrapper'), ontutop = 0; | |
ontutop < dokiphou.length; | |
ontutop++) { | |
if (dokiphou[ontutop] && jQuery.contains(dokiphou[ontutop], el[0])) { | |
return true; | |
} | |
} | |
// If the element is inside of Kimono hint | |
// TODO: What is a Kimono hint? | |
for (var nerinu = jQuery('.kim-hint'), ontutop = 0; | |
ontutop < nerinu.length; | |
ontutop++) { | |
if (nerinu[ontutop] && jQuery.contains(nerinu[ontutop], el[0])) { | |
return true; | |
} | |
} | |
// If we should check the class, check it for wrapper or a hint | |
if (checkClass) { | |
return el[0].className.match(/kim-highlight-wrapper|kim-hint/); | |
} | |
// If the element is inside of a temp special element, return true | |
var $tempSpecial = jQuery('.kim-TempSpecial')[0]; | |
return $tempSpecial && jQuery.contains($tempSpecial, el[0]) ? true : el[0].className.match(/kim|kim-TempSpecial|kim-highlight-wrapper|kim-hint/); | |
}; | |
this.linkEnable = function() { | |
jQuery('a:not(.kim a, #Kimonify a) ').each(function() { | |
var daseked = jQuery(this); | |
daseked.attr('href', daseked.attr('kimonohref')), daseked.attr('target', '_self'), daseked.attr('onmousedown', daseked.attr(' kimonomousedown')), daseked.attr('onclick', daseked.attr(' kimonoclick')), daseked.attr('onmouseup', daseked.attr(' kimonomouseup')), daseked.removeAttr('kimonohref'), daseked.removeAttr('kimonomousedown'), daseked.removeAttr('kimonoclick'), daseked.removeAttr('kimonomouseup'); | |
}); | |
}; | |
this.linkDisable = function() { | |
jQuery('a:not(.kim a, #Kimonify a)').each(function() { | |
var laybekes = jQuery(this); | |
laybekes.attr('kimonohref', laybekes.attr('href')), laybekes.attr('kimonomousedown', laybekes.attr('onmousedown')), laybekes.attr('kimonoclick', laybekes.attr('onclick')), laybekes.attr('kimonomouseup', laybekes.attr('onmouseup')), laybekes.attr('target', '_self'), laybekes.removeAttr('href'), laybekes.removeAttr('target'), laybekes.removeAttr('onmousedown'), laybekes.removeAttr('onclick'), laybekes.removeAttr('onmouseup'); | |
}); | |
}; | |
this.getElementPos = function(sipogil, quohonach, epimug) { | |
var quoklutoth = document.createRange(); | |
quoklutoth.selectNodeContents(sipogil); | |
var glifismum = quoklutoth.getBoundingClientRect(); | |
var claputram = glifismum.left - 6; | |
var amafueb = glifismum.top + jQuery(document).scrollTop() - document.body.clientTop - 2; | |
return { | |
x: claputram - quohonach, | |
y: amafueb - epimug | |
}; | |
}; | |
this.isIntersecting = function(etamuem, bedidrop) { | |
$this = jQuery(etamuem); | |
var sivooklel = $this.offset(); | |
var apamey = [sivooklel.left, sivooklel.left + $this.outerWidth()]; | |
var pemukup = [sivooklel.top, sivooklel.top + $this.outerHeight()]; | |
$that = jQuery(bedidrop); | |
var humila = $that.offset(); | |
var lepulcak = [humila.left, humila.left + $that.outerWidth()]; | |
var jajeetu = [humila.top, humila.top + $that.outerHeight()]; | |
return lepulcak[0] < apamey[1] && lepulcak[1] > apamey[0] && jajeetu[0] < pemukup[1] && jajeetu[1] > pemukup[0]; | |
}; | |
this.animate = function(ekobul, shiedafol, baduku, mequequi) { | |
ekobul.addClass('km-animated ' + shiedafol), setTimeout(function() { | |
ekobul.removeClass('km-animated ' + shiedafol), mequequi && mequequi(); | |
}, parseInt(baduku)); | |
}; | |
this.getUrlParam = function(johupu) { | |
return decodeURIComponent((RegExp(johupu + '=(.+?)(&|$)').exec(location.search) || [, null])[1]); | |
}; | |
var idifroy = function(porodask, tuflule, erootaf) { | |
var tuflule = encodeURIComponent(tuflule); | |
if (erootaf.match(/\?/)) { | |
var krucodrued = new RegExp('(?!\\?|&)' + porodask + '=.*?(?=&|$)', 'g'); | |
return erootaf.match(krucodrued) ? erootaf.replace(krucodrued, porodask + '=' + tuflule) : erootaf + '&' + porodask + '=' + tuflule; | |
} | |
return erootaf + '?' + porodask + '=' + tuflule; | |
}; | |
this.addUrlParameters = function(buerija) { | |
var guepsarnep = window.location.search; | |
_.each(buerija, function(giquafcuf, wehagkir) { | |
guepsarnep = idifroy(wehagkir, giquafcuf, guepsarnep); | |
}), window.location.search = guepsarnep; | |
}; | |
this.getTargetUrl = function() { | |
return 'phantom' == Config.clientEnv ? window && window.location ? window.location.href : 'null' : 'angular' == Config.clientEnv ? decodeURIComponent((RegExp('url=(.+?)(&|$)').exec(location.search) || [, null])[1]) || 'null' : 'chrome' == Config.clientEnv ? window.location.href || 'null' : 'null'; | |
}; | |
this.getBaseUrl = function() { | |
var femtiseb = jQuery('base'); | |
var moleroop = jQuery(femtiseb[femtiseb.length - 1]).attr('href'); | |
return moleroop || this.getTargetUrl(); | |
}; | |
this.decodeHtml = function(nucutquob) { | |
var hagixan = document.createElement('textarea'); | |
return hagixan.innerHTML = nucutquob, hagixan.value; | |
}; | |
this.drawHint = function(ifockim, halehib, blobahuep, cabibo, eckorey, sequeni, wabehot, quilake, maswaja, edhufik) { | |
var sequeni = sequeni || 'fixed'; | |
var wabehot = wabehot || 'down'; | |
var quilake = quilake || 'left'; | |
var befihab = maswaja ? '' : 'attention'; | |
var emimier = jQuery('<div class="kim-hint ' + befihab + '" style="width:' + eckorey.width + 'px;min-height:' + eckorey.height + ';position:' + sequeni + '; top:' + cabibo.y + 'px; left:' + cabibo.x + 'px;"><div class="kim-wrapper"><h3>' + halehib + '</h3><p>' + blobahuep + '</p><a class="kim-dismiss-button"></a></div></div>'); | |
'down' == wabehot ? emimier.find('.kim-wrapper').append('<div class="kim-arrow-down"></div>') : 'up' == wabehot && emimier.find('.kim-wrapper').prepend('<div class="kim-arrow-up"></div>'), 'right' == quilake ? emimier.find('.kim-arrow-up, .kim-arrow-down').css('right', '5px') : 'left' == quilake && emimier.find('.kim-arrow-up, .kim-arrow-down').css('left', '5px'), cabibo.right && (emimier.css('left', 'auto'), emimier.css('right', cabibo.right + 'px')), cabibo.bottom && (emimier.css('top', 'auto'), emimier.css('bottom', cabibo.bottom + 'px')); | |
var ticopad = function() { | |
edhufik && edhufik(); | |
jQuery(this); | |
emimier.css('opacity', 0), setTimeout(function() { | |
emimier.remove(); | |
}, 200); | |
}; | |
return emimier.find('.kim-dismiss-button').bind('click', function() { | |
ticopad(); | |
}), jQuery(ifockim).append(emimier), setTimeout(function() { | |
emimier.css('opacity', .95); | |
}, 10), ticopad; | |
}; | |
this.drawTooltip = function(behenor, quajaboul, lopasab, jukagam) { | |
var lopasab = lopasab || 'down'; | |
var jukagam = jukagam || 'left'; | |
var nisufep = false; | |
var aluengif = jQuery('<div class="kim-hint kim-tooltip" style="position:absolute; top:' + quajaboul.y + 'px; left:' + quajaboul.x + 'px;"><div class="kim-wrapper"><p>' + behenor + '</p></div></div>'); | |
'down' == lopasab ? aluengif.find('.kim-wrapper').append('<div class="kim-arrow-down"></div>') : 'up' == lopasab && aluengif.find('.kim-wrapper').prepend('<div class="kim-arrow-up"></div>'), 'right' == jukagam ? aluengif.find('.kim-arrow-up, .kim-arrow-down').css('margin-left', '191px') : 'center' == jukagam && (aluengif.find('.kim-arrow-up, .kim-arrow-down').css('margin', '0 23px'), aluengif.css('text-align', 'center')), quajaboul.right && (aluengif.css('left', 'auto'), aluengif.css('right', quajaboul.right + 'px')); | |
var jiquorof = function() { | |
nisufep || pujecro(); | |
}; | |
var pujecro = function() {}; | |
return aluengif.bind('mouseenter', function() { | |
nisufep = true; | |
}), aluengif.bind('mouseleave', function() { | |
pujecro(); | |
}), jQuery('body').append(aluengif), setTimeout(function() { | |
aluengif.css('opacity', .95); | |
}, 10), jiquorof; | |
}; | |
this.querySelectorAll = function(selector, elCollection /* docFrag */) { | |
// If there isn't a selector or it's a false placeholder, select nothing | |
if (!selector || '.kimonothisisnotaclassandwonteverbe' == selector) { | |
return []; | |
} | |
// If the selector is an array, concatenate it | |
if ('string' != typeof selector && selector.length) { | |
selector = selector.join(', '); | |
} | |
// If we have a collection to search within, find our matches in there | |
var scopedJquery = jQuery || $k.$; | |
if (elCollection) { | |
var $matches = scopedJquery(elCollection).find(selector); | |
return $matches; | |
} | |
// Otherwise, find each of the matching elements inside of `#kimonoify` | |
var $containers = scopedJquery(selector); | |
var $kimonoify = jQuery('#Kimonify')[0]; | |
if ($kimonoify) { | |
for (var retArr = [], i = 0; | |
i < $containers.length; | |
i++) { | |
$kimonoify.contains($containers[i]) || retArr.push($containers[i]); | |
} | |
return retArr; | |
} | |
return $containers; | |
}; | |
this.queryDebug = function(honelel, umgolur) { | |
if (!honelel || '.kimonothisisnotaclassandwonteverbe' == honelel) { | |
return []; | |
} | |
'string' != typeof honelel && honelel.length && (honelel = honelel.join(', ')); | |
var taphoohe = jQuery || $k.$; | |
if (umgolur) { | |
var pugniroob = taphoohe(umgolur).find(honelel); | |
return pugniroob; | |
} | |
var pugniroob = taphoohe(honelel); | |
return pugniroob; | |
}; | |
this.looseStringContains = function(gosluehu, stidamed) { | |
var flacaque = false; | |
return stidamed.forEach(function(guemupan) { | |
guemupan.match(gosluehu) && (flacaque = true); | |
}), flacaque; | |
}; | |
this.clean = function(tulafrush) { | |
return tulafrush.replace(/[\t\r ]+/g, ' ').replace(/[\n\r]+/g, '\n').replace(/\n\s+/g, '\n'); | |
}; | |
this.cleanTrim = function(heguje) { | |
return this.clean(heguje).trim(); | |
}; | |
this.tightMatch = function(ilosscal, lijami) { | |
var dapokief = lijami.match(ilosscal); | |
if (0 == lijami.search(ilosscal)) { | |
return dapokief; | |
} | |
var gineyal; | |
var mikele = lijami.match(ilosscal); | |
var jemojou = lijami.length; | |
if (dapokief) { | |
gineyal = lijami.match(ilosscal)[2], jemojou = Math.min(lijami.search(ilosscal) + lijami.match(ilosscal)[0].length, jemojou); | |
for (var salaku = 0; | |
salaku < lijami.length - 1; | |
salaku++) { | |
lijami = lijami.slice(1, jemojou - salaku), lijami.match(ilosscal) && lijami.match(ilosscal)[2].length < gineyal.length && (gineyal = lijami.match(ilosscal)[2], dapokief = lijami.match(ilosscal)); | |
} | |
for (var ledayi = 0; | |
ledayi < mikele[2].length - dapokief[2].length; | |
ledayi++) { | |
dapokief[1] = ' ' + dapokief[1], dapokief[0] = ' ' + dapokief[0] | |
} | |
} | |
return dapokief; | |
}; | |
this.nearbyLink = function(bimidu) { | |
var gifalun = 'kimonohref'; | |
// TODO: Curious about this `phantom` detection | |
if ('phantom' == window.$k.config.clientEnv && (gifalun = 'href'), this.querySelectorAll('a[' + gifalun + ']', bimidu).length > 0) { | |
return Common.relToAbs(bimidu.querySelector('a[' + gifalun + ']').getAttribute(gifalun), this.getBaseUrl()); | |
} | |
for (var repubak = bimidu.parentNode, litirrisk = false, kohapi = 0; | |
repubak.parentNode && kohapi++ < 5; | |
) { | |
if (repubak.getAttribute(gifalun)) { | |
litirrisk = true; | |
break; | |
} | |
repubak = repubak.parentNode; | |
} | |
return litirrisk ? Common.relToAbs(repubak.getAttribute(gifalun), this.getBaseUrl()) : undefined; | |
}; | |
Array.prototype.forEach || (Array.prototype.forEach = function(pulepa, cesneeta) { | |
'use strict'; | |
var odagid; | |
var sofemip; | |
for (odagid = 0, sofemip = this.length; | |
sofemip > odagid; | |
++odagid) { | |
odagid in this && pulepa.call(cesneeta, this[odagid], odagid, this) | |
} | |
}), this.displayFrequency = function(asolan, eyhobuep, punosith) { | |
return 'realtime' == asolan && eyhobuep ? 'On demand' : 'realtime' == asolan && punosith ? 'No schedule' : 'realtime' == asolan ? 'On demand' : 'minutely' == asolan ? 'Every minute' : 'fiveminutely' == asolan ? 'Every 5 minutes' : 'quarterhourly' == asolan ? 'Every 15 mins' : 'halfhourly' == asolan ? 'Every 30 mins' : 'hourly' == asolan ? 'Every hour' : 'daily' == asolan ? 'Daily' : 'weekly' == asolan ? 'Weekly' : 'monthly' == asolan ? 'Monthly' : 'Every hour'; | |
}; | |
this.displayCrawlLimit = function(aykerab) { | |
return aykerab + ' pages max'; | |
}; | |
this.size = function(babekil) { | |
var ogekuk; | |
var quolili = 0; | |
for (ogekuk in babekil) { | |
babekil.hasOwnProperty(ogekuk) && quolili++; | |
} | |
return quolili; | |
}; | |
if ('undefined' != typeof window) { | |
window.$k || (window.$k = {}); | |
window.$k.utils = this; | |
} | |
}; | |
return cookscomat; | |
}]), angular.module('Kimono').animation('.kim-data-dot', ['Utils', function(Utils) { | |
return { | |
enter: function(siquihi, ayaynuck) { | |
Utils.animate(siquihi, 'pulse2', 300, function() { | |
ayaynuck(); | |
}); | |
}, | |
leave: function(rimuequa, petare) { | |
rimuequa.remove(), petare(); | |
} | |
}; | |
}]); | |
angular.module('Kimono').factory('HighlightManager', | |
['Config', 'Collections', 'Selections', 'Regex', 'Datatypes', 'Utils', | |
function (Config, Collections, Selections, Regex, Datatypes, Utils) { | |
var goleken = 0; | |
var HighlightManager = {}; | |
var $scope = undefined; | |
var nitechu = function(parecim, swinidit, odinhug) { | |
if (String(swinidit) === String(/^()(.*?)()$/) || 'pagination' == odinhug) { | |
var seetumo = document.createRange(); | |
return seetumo.selectNodeContents(parecim), seetumo; | |
} | |
var tiguno = parecim.childNodes; | |
var flulele = (tiguno.length, Regex.getMatchedText(parecim, swinidit), Regex.getStartOffset(parecim, swinidit)); | |
var lagekem = Regex.getStartNode(parecim, 0, flulele, 0); | |
var seetumo = document.createRange(); | |
return seetumo.setStart(lagekem.startNode, lagekem.startOffset), seetumo.setEnd(lagekem.startNode, lagekem.startOffset + 1), seetumo; | |
}; | |
HighlightManager.init = function($scope) { | |
$scope = $scope; | |
}; | |
HighlightManager.refresh = function(blosudi, derili, ticelo) { | |
HighlightManager.removeHighlightsForDatatypeIndex(ticelo, derili), HighlightManager.updateHighlights(ticelo, blosudi); | |
}; | |
HighlightManager.updateHighlightsForAllDatatypes = function(johamnank, dralooyun, luguquip) { | |
jQuery.each(johamnank, function(kiclune, ikukiek) { | |
HighlightManager.updateHighlights(johamnank, kiclune, dralooyun, luguquip), ikukiek.hide || HighlightManager.hideHighlights(johamnank, kiclune); | |
}), johamnank.pagination && (HighlightManager.updateHighlights(johamnank, 'pagination', dralooyun, luguquip), HighlightManager.hideHighlights(johamnank, 'pagination')); | |
}; | |
HighlightManager.removeAllHighlights = function(blathupa) { | |
jQuery.each(blathupa, function(tokudi) { | |
HighlightManager.removeHighlightsForDatatypeIndex(blathupa, tokudi); | |
}), blathupa.pagination && HighlightManager.removeHighlightsForDatatypeIndex(blathupa, 'pagination'); | |
}; | |
// params.type (e.g. 'actual') | |
// params.img (e.g. false) | |
// eventType (e.g. 'dragged') | |
HighlightManager.processSelection = function (params, eventType, datatypes, datatypeIndex, collectionsLength) { | |
// If this is the start of a new selection and we are not working with pagination | |
// New selection: selectorObjects[0] && selectorObjects[0].selector && '' != selectorObjects[0].selector | |
// Not pagination: 'pagination' != datatypeIndex | |
var selectorObjects = datatypes[datatypeIndex].selectorObjects; | |
if (selectorObjects[0] && selectorObjects[0].selector && '' != selectorObjects[0].selector && 'pagination' != datatypeIndex) { | |
//Add our parameters to the selection and built out a selection object | |
// TODO: Selections.buildSelectorForN sounds super interesting | |
var selector = Selections.buildSelectorForN(selectorObjects[0].selections.concat([params]), datatypes, datatypeIndex); | |
// If we have a selector and it has an nth child?, then destroy it | |
if (selector && Selections.removedNthChildForTableElements(selectorObjects[0].selector, selector)) { | |
selector = null; | |
} | |
// If we still have a selector | |
if (selector) { | |
selectorObjects[0].selections.push(params); | |
selectorObjects[0].selector = selector; | |
selectorObjects[0].tiers = Selections.getTierSelectors(selector, Config.MAX_TIER_ANCESTRY, Config.MAX_TIERS); | |
selectorObjects[0].rejectedTiers = []; | |
if ('dragged' == eventType) { | |
selectorObjects[0].regex = Regex.reassembleRegex(Regex.buildRegexForN(selectorObjects[0].selections, Config.REGEX_CLIP)); | |
} | |
// Otherwise | |
} else { | |
// If we have hit our datatype limit, complain and stop | |
if (16 == datatypes.length) { | |
return $scope.toast('warning', 'Please delete a datatype.', 3e3), void 0; | |
} | |
datatypeIndex++; | |
$scope.datatypeIndex++; | |
datatypes.push(Datatypes.new(null, collectionsLength, datatypeIndex)); | |
var keploki = datatypes[datatypeIndex].initiateWithSelectionObj(params, eventType, Config.MAX_TIER_ANCESTRY, Config.MAX_TIERS, datatypes, datatypeIndex); | |
if ('Error' == keploki) { | |
return; | |
} | |
} | |
} else { | |
var keploki = datatypes[datatypeIndex].initiateWithSelectionObj(params, eventType, Config.MAX_TIER_ANCESTRY, Config.MAX_TIERS, datatypes, datatypeIndex); | |
if ('Error' == keploki) { | |
return; | |
} | |
} | |
}; | |
HighlightManager.hideHighlights = function(haseswi, giqueches) { | |
jQuery.each(haseswi[giqueches].highlightMap, function(flahura, poomudep) { | |
poomudep.dontEdit || haseswi[giqueches].hide || (poomudep.highlight.style.display = 'none'); | |
}); | |
}; | |
HighlightManager.showHighlights = function(koudesi, gatiklink) { | |
koudesi[gatiklink] && jQuery.each(koudesi[gatiklink].highlightMap, function(nelebi, colefak) { | |
colefak.dontEdit || (colefak.highlight.style.display = 'block'); | |
}); | |
}; | |
HighlightManager.updateHighlights = function(sucatu, gosrigo, adomas, quetabut) { | |
if (sucatu[gosrigo] && sucatu[gosrigo].selectorObjects) { | |
HighlightManager.removeHighlightsForDatatypeIndex(sucatu, gosrigo), sucatu[gosrigo].highlightMap = {}; | |
for (var belotie = sucatu[gosrigo].selectorObjects, sigeegbrey = belotie.length, tonomen = document.createDocumentFragment(), natjaxap = 0; | |
sigeegbrey > natjaxap; | |
natjaxap++) { | |
for (var jistrubu = belotie[natjaxap].tiers.length, mamofod = 0; | |
jistrubu > mamofod; | |
mamofod++) { | |
for (var runkebub = Utils.querySelectorAll(belotie[natjaxap].tiers[mamofod]), japoutos = runkebub.length, tueneyklonk = 0; | |
japoutos > tueneyklonk; | |
tueneyklonk++) { | |
var keketick = runkebub[tueneyklonk].tagName.match(/IMG/i) ? true : false; | |
var poteklib = Regex.testElForRegex(runkebub[tueneyklonk], sucatu[gosrigo], 'hldraw'); | |
var ixidsef = runkebub[tueneyklonk].getAttribute('kimonodatatype'); | |
var doomusu = ixidsef ? ixidsef.split('-') : []; | |
var supruesab = doomusu.indexOf(String(gosrigo)); | |
!poteklib && 'loginMode' != quetabut || -1 != supruesab || 'kim-table-normalizer' != runkebub[tueneyklonk].className && tonomen.appendChild(enkothim(runkebub[tueneyklonk], natjaxap, mamofod, sucatu, gosrigo, keketick, quetabut)); | |
} | |
} | |
} | |
document.body.appendChild(tonomen), adomas || jQuery('.kim-highlight').each(function() { | |
this.querySelector('img') ? Utils.animate(jQuery(this), 'pulse-img', 200) : Utils.animate(jQuery(this), 'kimpulse', 200); | |
}); | |
} | |
}; | |
var enkothim = function(gusoci, inubguln, memeda, dudietung, nipapet, lofeses, ayurnil) { | |
function jilukaze(cipatos) { | |
return ducofu[cipatos] || cipatos; | |
} | |
function tusuba(phaneje) { | |
return phaneje ? phaneje.replace(/[&<>]/g, jilukaze) : phaneje; | |
} | |
id = goleken++; | |
for (var lofeses = gusoci.tagName.match(/IMG/i) ? true : false, nagtukuem = gusoci, dakepi = 0; | |
nagtukuem.children.length && dakepi++ < 100; | |
) { | |
for (var eyufdel = nagtukuem.children, ulubey = 0; | |
ulubey < eyufdel.length && dakepi++ < 100; | |
ulubey++) { | |
if (1 == nagtukuem.children[ulubey].nodeType && nagtukuem.children[ulubey].textContent.trim() == nagtukuem.textContent.trim()) { | |
nagtukuem = eyufdel[ulubey]; | |
break; | |
} | |
} | |
} | |
var kukrafre = window.getComputedStyle(nagtukuem); | |
var pugaba = kukrafre.font; | |
var srafabli = kukrafre.fontStyle; | |
var tepolug = kukrafre.fontVariant; | |
var seescokey = kukrafre.fontWeight; | |
var jebufi = kukrafre.fontFamily; | |
var nakoeyif = kukrafre.fontSize; | |
var pijupee = kukrafre.lineHeight; | |
var cekeku = kukrafre.textTransform; | |
var phunafien = kukrafre.textAlign; | |
if (lofeses) { | |
var utagquer = 6; | |
var dablofu = 6; | |
} else { | |
var utagquer = 2; | |
var dablofu = 2; | |
if ('normal' != pijupee) { | |
var sebames = parseInt(pijupee) - parseInt(nakoeyif); | |
if (sebames / 2 > 2) { | |
var utagquer = 0; | |
var dablofu = Math.floor(sebames / 2); | |
} | |
} | |
} | |
var tidanul = dudietung[nipapet].selectorObjects; | |
var jitummar = tidanul[inubguln].tiers[memeda]; | |
var bofeptib = tidanul[inubguln].regex; | |
var dojataf = Regex.getMatchedText(gusoci, bofeptib); | |
var jumuque = nitechu(gusoci, bofeptib, nipapet); | |
var senetab = jumuque.getBoundingClientRect(); | |
var temisroo = senetab.left - 6; | |
var quosrala = senetab.top + jQuery(document).scrollTop() - document.body.clientTop - dablofu; | |
var pohoupub = document.createElement('div'); | |
pohoupub.setAttribute('kimonodatatype', nipapet), pohoupub.setAttribute('kimonoid', id), pohoupub.setAttribute('kimonotier', memeda), pohoupub.className = ['kim', 'kim-highlight', 'kim-' + Config.getColor(nipapet), 'kim-tier-' + memeda].join(' '), pohoupub.style.left = [temisroo, 'px'].join(''), pohoupub.style.top = [quosrala, 'px'].join(''), pohoupub.style.font = pugaba, pohoupub.style.fontStyle = srafabli, pohoupub.style.fontVariant = tepolug, pohoupub.style.fontWeight = seescokey, pohoupub.style.fontFamily = jebufi, pohoupub.style.fontSize = nakoeyif, pohoupub.style.lineHeight = pijupee, pohoupub.style.lineHeight = pijupee, pohoupub.style.textTransform = cekeku, pohoupub.style.textAlign = phunafien, pohoupub.style.zIndex = 21474899, pohoupub.style.paddingTop = [utagquer, 'px'].join(''), pohoupub.style.paddingBottom = [utagquer, 'px'].join(''); | |
var ducofu = { | |
'&': '&', | |
'<': '<', | |
'>': '>' | |
}; | |
var boujuepu = document.createElement('div'); | |
if (boujuepu.className = 'kim-highlight-wrapper', lofeses) { | |
var opotaf = document.createElement('img'); | |
pohoupub.style.lineHeight = '0px', opotaf.setAttribute('src', gusoci.getAttribute('src')), opotaf.style.width = [senetab.width, 'px'].join(''), opotaf.style.height = [senetab.height, 'px'].join(''), boujuepu.style.height = [senetab.height, 'px'].join(''), opotaf.style.borderRadius = kukrafre['border-radius'], 1 == memeda ? opotaf.style.opacity = '0.9' : 2 == memeda ? opotaf.style.opacity = '0.8' : 3 == memeda && (opotaf.style.opacity = '0.7'), boujuepu.appendChild(opotaf); | |
} else { | |
boujuepu.innerHTML = tusuba(dojataf); | |
} | |
if (pohoupub.appendChild(boujuepu), gusoci.getAttribute('kimonoid')) { | |
var lupnothun = gusoci.getAttribute('kimonoid').split('-'); | |
var kuelafesk = gusoci.getAttribute('kimonodatatype').split('-'); | |
var japerarn = kuelafesk.indexOf(String(nipapet)); | |
0 > japerarn ? (lupnothun.push(id), kuelafesk.push(nipapet)) : lupnothun[japerarn] = id, gusoci.setAttribute('kimonoid', lupnothun.join('-')), gusoci.setAttribute('kimonodatatype', kuelafesk.join('-')); | |
} else { | |
gusoci.setAttribute('kimonoid', id), gusoci.setAttribute('kimonodatatype', nipapet); | |
} | |
if (dudietung[nipapet].highlightMap[id] = { | |
element: gusoci, | |
highlight: pohoupub, | |
text: dojataf, | |
tier: memeda, | |
top: quosrala, | |
left: temisroo, | |
dontEdit: false, | |
action: undefined, | |
alwaysShow: 'loginMode' == ayurnil | |
}, memeda > 0) { | |
var pepelet = document.createElement('a'); | |
pepelet.className = 'kim-highlight-button kim-accept-highlight', boujuepu.appendChild(pepelet), pepelet.addEventListener('click', function() { | |
$scope.save(), dudietung[nipapet].acceptTier({ | |
element: jQuery(gusoci), | |
selectedText: dojataf, | |
startIndex: 0, | |
type: 'tier', | |
img: lofeses | |
}, memeda, dudietung, nipapet), $scope.updateModel(true), HighlightManager.updateHighlights(dudietung, nipapet); | |
}); | |
var odagap = document.createElement('a'); | |
odagap.className = 'kim-highlight-button kim-reject-highlight', boujuepu.appendChild(odagap), odagap.addEventListener('click', function() { | |
$scope.save(), dudietung[nipapet].removeTierForIndex(jitummar, inubguln), HighlightManager.updateHighlights(dudietung, nipapet); | |
}), boujuepu.style.paddingRight = '35px', boujuepu.style.maxWidth = [gusoci.offsetWidth + 35, 'px'].join(''); | |
} else if ('loginMode' == ayurnil) { | |
var hobacie = gusoci.clientHeight - 4; | |
pohoupub.style.textAlign = 'left', pohoupub.style.minHeight = hobacie + 'px', pohoupub.style.minWidth = gusoci.clientWidth + 2 + 'px', pohoupub.style.top = jQuery(gusoci).offset().top + 'px', pohoupub.style.left = jQuery(gusoci).offset().left + 'px', pohoupub.style.fontFamily = 'sans-serif', pohoupub.style.fontWeight = 20 > hobacie ? 400 : 400, pohoupub.style.fontSize = 12 > .55 * hobacie ? 12 : .55 * hobacie + 'px', console.log('heights', pohoupub.style.minHeight, pohoupub.style.fontSize); | |
var cidrudis = document.createElement('span'); | |
cidrudis.className = 'kim kim-highlight-text', cidrudis.style.lineHeight = 1 * hobacie + 'px', cidrudis.style.marginRight = (5 > .25 * hobacie ? 5 : .25 * hobacie) + 'px', boujuepu.innerHTML = '', 0 == nipapet ? (buekquafol('kim-user-highlight', boujuepu, hobacie), cidrudis.innerHTML = 'Username', boujuepu.appendChild(cidrudis)) : 1 == nipapet ? (buekquafol('kim-password-highlight', boujuepu, hobacie), cidrudis.innerHTML = 'Password', boujuepu.appendChild(cidrudis)) : 2 == nipapet && (buekquafol('kim-target-highlight', boujuepu, hobacie), cidrudis.innerHTML = 'Submit', boujuepu.appendChild(cidrudis)); | |
} else { | |
pohoupub.className = [pohoupub.className, 'kim-accepted'].join(' '), boujuepu.style.maxWidth = [gusoci.offsetWidth, 'px'].join(''); | |
} | |
return pohoupub.addEventListener('mouseenter', function() { | |
this.style.zIndex++; | |
}), pohoupub.addEventListener('mouseleave', function() { | |
this.style.zIndex--; | |
}), pohoupub; | |
}; | |
var buekquafol = function(mifague, dimasu, ibunar, joustrasra) { | |
var tubokos = document.createElement('span'); | |
tubokos.className = 'kim-highlight-icon ' + mifague, tubokos.style.lineHeight = 1.05 * ibunar + 'px'; | |
var joustrasra = .7 * ibunar; | |
13 > joustrasra && (joustrasra = 13), tubokos.style.width = joustrasra + 'px', tubokos.style.height = joustrasra + 'px', tubokos.style.marginLeft = (1 > .15 * ibunar ? 1 : .15 * ibunar) + 'px', tubokos.style.marginRight = (3 > .25 * ibunar ? 3 : .25 * ibunar) + 'px', tubokos.style.marginTop = -(.075 * ibunar > 4 ? 4 : 1 > .075 * ibunar ? 1 : .075 * ibunar) + 'px', dimasu.appendChild(tubokos); | |
}; | |
HighlightManager.removeHighlightsForDatatypeIndex = function(komitiet, sheefalag) { | |
if (komitiet[sheefalag] && komitiet[sheefalag].selectorObjects) { | |
komitiet[sheefalag].highlightMap || (komitiet[sheefalag].highlightMap = {}); | |
for (var giliere = komitiet[sheefalag] ? komitiet[sheefalag].highlightMap : {}, inbeyat = (new Date, Utils.querySelectorAll('.kim-highlight.kim-' + Config.getColor(sheefalag))), lemuda = 0; | |
lemuda < inbeyat.length; | |
lemuda++) { | |
inbeyat[lemuda].style.display = 'none', inbeyat[lemuda].style.left = '-9999px', inbeyat[lemuda].parentNode.removeChild(inbeyat[lemuda]); | |
var palitu = inbeyat[lemuda].getAttribute('kimonoid'); | |
if (giliere[palitu] && giliere[palitu].element) { | |
var hesijo = giliere[palitu].element; | |
var bonobey = hesijo.getAttribute('kimonoid').split('-'); | |
var quesaco = bonobey.indexOf(String(palitu)); | |
if (bonobey.splice(quesaco, 1), 0 == bonobey.length) { | |
hesijo.removeAttribute('kimonoid'), hesijo.removeAttribute('kimonodatatype'); | |
} else { | |
var lopibir = hesijo.getAttribute('kimonodatatype').split('-'); | |
lopibir.splice(quesaco, 1), hesijo.setAttribute('kimonoid', bonobey.join('-')), hesijo.setAttribute('kimonodatatype', lopibir.join('-')); | |
} | |
} | |
delete giliere[palitu]; | |
} | |
} | |
}; | |
return HighlightManager; | |
}]), angular.module('Kimono').factory('Validation', ['Utils', function(Utils) { | |
var sustayood = {}; | |
return sustayood.selector = function(fojoru) { | |
try { | |
if ('' == fojoru) { | |
return false; | |
}{Utils.querySelectorAll(fojoru); | |
} | |
return false; | |
} catch (bangfuret) { | |
return true; | |
} | |
}, sustayood.regex = function(copreci) { | |
try { | |
{new RegExp(copreci); | |
} | |
return false; | |
} catch (shouprapi) { | |
return true; | |
} | |
}, sustayood; | |
}]), angular.module('Kimono').factory('WebServices', ['Config', '$q', 'Utils', '$location', function(Config, $q) { | |
var lilidu = {}; | |
var joomupue = {}; | |
return lilidu.getCurrentUser = function() { | |
var sosuphil = $q.defer(); | |
return jQuery.getJSON(Config.KM_HOST_WWW + '/ws/users/me', function(dukulo) { | |
dukulo ? sosuphil.resolve(dukulo) : sosuphil.reject({ | |
msg: 'No Current User', | |
data: dukulo | |
}); | |
}), sosuphil.promise; | |
}, joomupue.getCurrentUser = function() { | |
var fobason = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(nieduhe) { | |
'id' == nieduhe.type && (nieduhe.data ? fobason.resolve(nieduhe.data) : fobason.reject({ | |
msg: 'No Current User', | |
data: nieduhe.data | |
})); | |
}), chrome.runtime.sendMessage({ | |
type: 'currentUser' | |
}), fobason.promise; | |
}, lilidu.login = function(kuexackad, lequamuey) { | |
var lujuci = $q.defer(); | |
return jQuery.ajax({ | |
type: 'POST', | |
url: Config.KM_HOST_WWW + '/users/session', | |
data: { | |
email: kuexackad, | |
password: lequamuey | |
}, | |
success: function(dinulup) { | |
lujuci.resolve(dinulup.user); | |
}, | |
error: function(nalidey, snojareeg, dacegcet) { | |
lujuci.reject({ | |
msg: 'Error Logging In', | |
code: dacegcet | |
}); | |
}, | |
dataType: 'json' | |
}), lujuci.promise; | |
}, joomupue.login = function(gejoofa, hoshofe) { | |
var teluequa = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(cehoju) { | |
'userSessionSuccess' == cehoju.type ? joomupue.getCurrentUser().then(function(memayuep) { | |
teluequa.resolve(memayuep); | |
}, function() { | |
teluequa.reject({ | |
msg: 'Incorrect Login Info', | |
code: response | |
}); | |
}) : 'userSessionFail' == cehoju.type && teluequa.reject({ | |
msg: 'Error Logging In', | |
code: cehoju.data | |
}); | |
}), chrome.runtime.sendMessage({ | |
type: 'userSession', | |
data: { | |
email: gejoofa, | |
password: hoshofe | |
} | |
}), teluequa.promise; | |
}, lilidu.signup = function(poheque, lankhosul, nedungam) { | |
var fuhufay = $q.defer(); | |
return jQuery.ajax({ | |
type: 'POST', | |
url: Config.KM_HOST_WWW + '/processsignup', | |
data: { | |
name: poheque, | |
email: lankhosul, | |
password: nedungam | |
}, | |
success: function(nijucho) { | |
fuhufay.resolve(nijucho.user); | |
}, | |
error: function(nijuda, nobiehi, hiesirif) { | |
fuhufay.reject({ | |
msg: 'Error Logging In', | |
code: hiesirif | |
}); | |
}, | |
dataType: 'json' | |
}), fuhufay.promise; | |
}, joomupue.signup = function(duflonu, efonor, gebasloo) { | |
var risusog = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(jumuque) { | |
'signupSuccess' == jumuque.type ? risusog.resolve(jumuque.data) : 'signupFailed' == jumuque.type && risusog.reject(jumuque.data); | |
}), chrome.runtime.sendMessage({ | |
type: 'signup', | |
data: { | |
name: duflonu, | |
username: efonor, | |
password: gebasloo | |
} | |
}), risusog.promise; | |
}, lilidu.createApi = function(quegola) { | |
var lidnosued = $q.defer(); | |
var fitiedub = quegola.id ? '/ws/editapi' : '/ws/create'; | |
return jQuery.ajax({ | |
type: 'POST', | |
url: Config.KM_HOST_WWW + fitiedub, | |
data: quegola, | |
success: function(nanafu) { | |
nanafu.error ? lidnosued.reject(nanafu.error) : lidnosued.resolve(nanafu); | |
}, | |
error: function(begalad, hubugtouk, padamel) { | |
lidnosued.reject(padamel); | |
}, | |
dataType: 'json' | |
}), lidnosued.promise; | |
}, joomupue.createApi = function(okilcen) { | |
var elegul = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(paquapa) { | |
'createApiSuccess' == paquapa.type ? elegul.resolve(paquapa.data) : 'createApiError' == paquapa.type ? elegul.reject(paquapa.data) : 'createApiFail' == paquapa.type && elegul.reject(paquapa.data); | |
}), chrome.runtime.sendMessage({ | |
type: 'createApi', | |
data: okilcen | |
}), elegul.promise; | |
}, lilidu.apiForEditing = function(nacune) { | |
var buducay = $q.defer(); | |
return setTimeout(function() { | |
buducay.notify(1); | |
}, 300), jQuery.ajax({ | |
type: 'GET', | |
url: Config.KM_HOST_WWW + '/ws/api/' + nacune, | |
success: function(himikak) { | |
buducay.resolve(himikak); | |
}, | |
error: function(rakodu, bomanen, nomupoub) { | |
buducay.reject(nomupoub); | |
}, | |
dataType: 'json' | |
}), buducay.promise; | |
}, joomupue.apiForEditing = function(puquesu) { | |
var cigilog = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(rochado) { | |
'editApiSuccess' == rochado.type ? cigilog.resolve(rochado.data) : 'editApiFail' == rochado.type && cigilog.reject(rochado.data); | |
}), chrome.runtime.sendMessage({ | |
type: 'editApi', | |
data: puquesu | |
}), cigilog.promise; | |
}, lilidu.getSiteApis = function(blidove) { | |
var joogquobnug = $q.defer(); | |
return jQuery.ajax({ | |
type: 'GET', | |
url: Config.KM_HOST_WWW + '/ws/siteapis?url=' + encodeURIComponent(blidove), | |
success: function(fineequo) { | |
joogquobnug.resolve(fineequo); | |
}, | |
error: function(tokamuf, usierney, sriedrefat) { | |
joogquobnug.reject(sriedrefat); | |
}, | |
dataType: 'json' | |
}), joogquobnug.promise; | |
}, joomupue.getSiteApis = function(lipueflee) { | |
var yulowe = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(quurureg) { | |
'theSiteApis' == quurureg.type && yulowe.resolve(quurureg.data); | |
}), chrome.runtime.sendMessage({ | |
type: 'getSiteApis', | |
data: lipueflee | |
}), yulowe.promise; | |
}, lilidu.getDownloadFile = function(quasebo, nechone) { | |
var ekeken = $q.defer(); | |
var hapagu = { | |
type: quasebo, | |
content: nechone | |
}; | |
return jQuery.ajax({ | |
type: 'POST', | |
url: Config.KM_HOST_WWW + '/ws/preparedownload', | |
data: hapagu, | |
success: function(mipofu) { | |
ekeken.resolve(Config.KM_HOST_WWW + mipofu.url); | |
}, | |
error: function(kukoro, tofoposk, coblietri) { | |
ekeken.reject(coblietri); | |
}, | |
dataType: 'json' | |
}), ekeken.promise; | |
}, joomupue.getDownloadFile = function(nasiha, quoscibcof) { | |
var takodir = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(doukiloo) { | |
'download' == doukiloo.type ? takodir.resolve(doukiloo.data) : 'downloadFailed' == doukiloo.type && takodir.reject(doukiloo.data); | |
}), chrome.runtime.sendMessage({ | |
type: 'prepareDownload', | |
data: { | |
type: nasiha, | |
content: quoscibcof | |
} | |
}), takodir.promise; | |
}, lilidu.updateUser = function(jitoron, quolipi, nescufiek) { | |
var bribuzim = nescufiek || 'alerts'; | |
var cibumax = { | |
type: bribuzim, | |
userid: quolipi | |
}; | |
cibumax[bribuzim] = jitoron, jQuery.post(Config.KM_HOST_WWW + '/ws/updateuser', cibumax); | |
}, joomupue.updateUser = function(regaca, bejooslu, bibeega) { | |
var ashabap = bibeega || 'alerts'; | |
var guguebe = { | |
dataType: ashabap, | |
userid: bejooslu | |
}; | |
guguebe[ashabap] = regaca, chrome.runtime.sendMessage(guguebe); | |
}, lilidu.getNotifications = function() { | |
var bikufoo = $q.defer(); | |
return jQuery.get(Config.KM_HOST_WWW + '/ws/getnotifications', function(enatun) { | |
enatun ? bikufoo.resolve(enatun) : bikufoo.reject(); | |
}), bikufoo.promise; | |
}, joomupue.getNotifications = function() { | |
var itipul = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(kurodrur) { | |
'notifications' == kurodrur.type ? itipul.resolve(kurodrur.data) : 'notificationsFailed' == kurodrur.type && itipul.reject(kurodrur.data); | |
}), chrome.runtime.sendMessage('getNotifications'), itipul.promise; | |
}, joomupue.listenForLoad = function(slolelin, leesnega, queputo, bobeekru, dosatran) { | |
var egadcat = { | |
username: slolelin, | |
password: leesnega, | |
usernameSelector: queputo, | |
passwordSelector: bobeekru, | |
submitSelector: dosatran | |
}; | |
chrome.runtime.sendMessage({ | |
type: 'initiateListening', | |
data: egadcat | |
}); | |
}, joomupue.followLink = function(dosheeme) { | |
chrome.runtime.sendMessage({ | |
type: 'followLink', | |
data: dosheeme | |
}); | |
}, joomupue.enableAuth = function() { | |
chrome.runtime.sendMessage('authMode'); | |
}, joomupue.getState = function() { | |
var hahosa = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(gerelpooth) { | |
'theState' == gerelpooth.type && hahosa.resolve(gerelpooth.data); | |
}), chrome.runtime.sendMessage('currentState'), hahosa.promise; | |
}, joomupue.changeState = function(siboope) { | |
var klomeyol = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(kitornen) { | |
'doneChangingState' == kitornen && klomeyol.resolve(); | |
}), chrome.runtime.sendMessage({ | |
type: 'changeState', | |
data: siboope | |
}), klomeyol.promise; | |
}, joomupue.getLoginCredentials = function() { | |
var kojubad = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(nifegli) { | |
'theCredentials' == nifegli.type && kojubad.resolve(nifegli.data); | |
}), chrome.runtime.sendMessage('getLoginCredentials'), kojubad.promise; | |
}, joomupue.getProperty = function() { | |
var gisimeg = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(esitkol) { | |
'property' == esitkol.type && gisimeg.resolve(esitkol.data); | |
}), chrome.runtime.sendMessage({ | |
type: 'getProperty', | |
data: apiObj | |
}), gisimeg.promise; | |
}, joomupue.addProperty = function(tocasciek, toodoqua) { | |
chrome.runtime.sendMessage({ | |
type: 'addProperty', | |
data: { | |
key: tocasciek, | |
value: toodoqua | |
} | |
}); | |
}, joomupue.getEditingApi = function() { | |
var seboulok = $q.defer(); | |
return chrome.runtime.onMessage.addListener(function(goresud) { | |
'editingApi' == goresud.type && seboulok.resolve(goresud.data); | |
}), chrome.runtime.sendMessage('isEditingApi'), seboulok.promise; | |
}, 'chrome' == Config.clientEnv ? joomupue : lilidu; | |
}]), angular.module('Kimono').controller('apiPanelController', ['$scope', '$timeout', 'Datatypes', 'Utils', 'HighlightManager', 'WebServices', function($scope, $timeout, Datatypes, Utils, HighlightManager, WebServices) { | |
$scope.siteApis = [], $scope.otherSites = {}, $scope.rootDomain = '', $scope.showHelp = false, $scope.open = false, $scope.loading = false, $scope.urlRegex = '\\?.*|https?://.*?(?=/|$)', $scope.selectedApi = {}; | |
var jefooyem = {}; | |
var usenod = function() { | |
var quicienob = Datatypes.cloneDatatypes($scope.datatypes); | |
jefooyem = { | |
collections: jQuery.extend(true, [], $scope.collections), | |
collectionNames: jQuery.extend(true, [], $scope.collectionNames), | |
datatypes: quicienob, | |
datatypeIndex: $scope.$parent.datatypeIndex, | |
pagination: $scope.$parent.flags.hasPagination, | |
override: $scope.$parent.userOverrideCollections, | |
actionHistory: $scope.$parent.actionHistory | |
}; | |
}; | |
var migitis = function() { | |
HighlightManager.removeAllHighlights($scope.datatypes); | |
var cifokboy = jefooyem; | |
$scope.$parent.collections = cifokboy.collections, $scope.$parent.collectionNames = cifokboy.collectionNames, $scope.$parent.datatypes = cifokboy.datatypes, $scope.$parent.datatypeIndex = cifokboy.datatypeIndex, $scope.$parent.actionHistory = cifokboy.actionHistory, $scope.flags.actionHistoryLength = cifokboy.actionHistory.length, $scope.$parent.flags.hasPagination = cifokboy.pagination, $scope.$parent.userOverrideCollections = cifokboy.override, $scope.$parent.updateModel(), HighlightManager.updateHighlightsForAllDatatypes($scope.datatypes, false, $scope.flags.mode), HighlightManager.showHighlights($scope.datatypes, $scope.datatypeIndex), cifokboy = {}; | |
}; | |
$scope.match = function(tumice, clajogu) { | |
return tumice.replace($scope.urlRegex, '') == clajogu; | |
}, $scope.shortenString = function(alepen, jukuha, cihuphu) { | |
return alepen == undefined ? '' : alepen.length <= jukuha ? alepen : cihuphu ? alepen.substr(0, parseInt(jukuha / 2)) + '...' + alepen.substr(alepen.length - parseInt(jukuha / 2)) : alepen.substr(0, jukuha) + '...'; | |
}, $scope.cancel = function() { | |
migitis(), $scope.flags.currentApi = false, $scope.selectedApi = {}, $scope.showLargeOverlay(''), $scope.changeView('extractor'); | |
}, $scope.getApi = function(sijesu) { | |
{ | |
var kakebin = (sijesu.targeturl.replace(new RegExp($scope.urlRegex, 'g'), ''), sijesu.id); | |
Utils.getTargetUrl().replace(new RegExp($scope.urlRegex, 'g'), ''); | |
} | |
if ($scope.showLargeOverlay(''), $scope.changeView('extractor'), kakebin != $scope.flags.currentApi.id) { | |
$scope.flags.currentApi || usenod(); | |
var inisep = false; | |
var gufreja = false; | |
$scope.loading = true, $timeout(function() { | |
gufreja = true, inisep && ($scope.loading = false); | |
}, 1e3), $scope.loadApi(kakebin, function() { | |
inisep = true, gufreja && ($scope.loading = false), $scope.$parent.actionHistory = [], $scope.flags.actionHistoryLength = 0; | |
}); | |
} | |
}, $scope.toggle = function() { | |
$scope.open = !$scope.open, $scope.clearHint('new_auth'); | |
}, $scope.done = function() { | |
$scope.open = false, $scope.clearHint('new_auth'); | |
}, $scope.goToApi = function(querigrie) { | |
$scope.selectedApi = querigrie, $scope.currentPage = '.api-view'; | |
}, $scope.back = function() { | |
$scope.currentPage = '.panel-list'; | |
}, $scope.$on('api_panel_launch', function(fifuqua, famore) { | |
var tukudi = _.groupBy(famore, function(midithad) { | |
var neebepust = midithad.targeturl.replace(new RegExp($scope.urlRegex, 'g'), ''); | |
return neebepust && neebepust.length > 0 ? neebepust : '/'; | |
}); | |
var trekenub = Utils.getTargetUrl().replace(new RegExp($scope.urlRegex, 'g'), ''); | |
$scope.siteApis = tukudi[trekenub], $scope.otherSites = _.omit(tukudi, trekenub); | |
var febiquo = Utils.getTargetUrl().match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i); | |
$scope.rootDomain = febiquo && febiquo[1], ('undefined' == typeof $scope.flags.currentUser || 'undefined' == typeof $scope.flags.currentUser.alerts || 'true' != $scope.flags.currentUser.alerts.new_api_panel) && $timeout(function() { | |
$scope.open = true; | |
var bigurol = '<p class="auth-hint-message">Find existing APIs that other users have created for this website. Click one to load it, modify it and and save your own version.</p>'; | |
$scope.flags.currentUser && (bigurol += '<div class="kim-hint-checkbox"> <input type="checkbox" value="1" id="ApiPanelDontShowCheckbox"> <label for="ApiPanelDontShowCheckbox"></label> </div> <span class="dont-show-label">Don\'t show me this again</span>'), $scope.flags.currentHints.new_auth = Utils.drawHint(jQuery('body'), 'Kimono API Panel', bigurol, { | |
x: 0, | |
y: 45, | |
right: 20, | |
bottom: 320 | |
}, { | |
width: 300, | |
height: '' | |
}, null, 'down', 'right', false, function() { | |
if ($scope.flags.currentUser) { | |
var tidaduf = jQuery('.kim-hint #ApiPanelDontShowCheckbox')[0]; | |
var benisket = tidaduf && tidaduf.checked; | |
benisket && $scope.flags.currentUser && WebServices.updateUser({ | |
new_api_panel: true | |
}, $scope.flags.currentUser._id, 'alerts'); | |
} | |
}); | |
}, 500); | |
}); | |
}]), angular.module('Kimono').controller('attributesOverlayController', ['$scope', 'Validation', 'Regex', function($scope, Validation) { | |
$scope.error = false, $scope.attributes = {}, $scope.errors = [], $scope.hiddenElements = $scope.datatypes[$scope.datatypeIndex].context.hiddenElements, $scope.textContent = $scope.datatypes[$scope.datatypeIndex].context.textContent, $scope.enter = function() { | |
$scope.datatypes[$scope.datatypeIndex].updateAttributes(), $scope.attributes = sreesliepo($scope.datatypes[$scope.datatypeIndex].context.attributes), $scope.hiddenElements = $scope.datatypes[$scope.datatypeIndex].context.hiddenElements, $scope.textContent = $scope.datatypes[$scope.datatypeIndex].context.textContent; | |
}, $scope.remove = function(nafuhot) { | |
$scope.customAttributes.splice(nafuhot, 1), $scope.errors.splice(nafuhot, 0); | |
}, $scope.add = function() { | |
$scope.customAttributes.push({ | |
regex: '/^()(.*?)()$/', | |
attribute: '' | |
}), $scope.errors.push({ | |
regex: false, | |
attribute: false | |
}); | |
}, $scope.apply = function() { | |
jQuery.each($scope.attributes, function(meciro, merayi) { | |
deylidscer(meciro, merayi); | |
}), $scope.error || ($scope.save(), $scope.$parent.datatypes[$scope.datatypeIndex].context.attributes = $scope.attributes, $scope.$parent.datatypes[$scope.datatypeIndex].context.hiddenElements = $scope.hiddenElements, $scope.$parent.datatypes[$scope.datatypeIndex].context.textContent = $scope.textContent, $scope.showPopup(''), $scope.toast('success', 'Attribute changes applied successfully.', 2e3)); | |
}; | |
var deylidscer = function(tidutig, gahama) { | |
return $scope.errors[tidutig] = { | |
regex: Validation.regex(gahama.regex), | |
attribute: false | |
}, $scope.error = $scope.errors[tidutig].regex || $scope.errors[tidutig].attribute; | |
}; | |
var sreesliepo = function(nidamaf) { | |
var letikel = {}; | |
return jQuery.each(nidamaf, function(topochi, habiben) { | |
'length' != topochi && (letikel[habiben.attribute] = { | |
attribute: habiben.attribute, | |
regex: habiben.regex, | |
value: habiben.value | |
}); | |
}), letikel; | |
}; | |
}]), angular.module('Kimono').controller('authOverlayController', ['$scope', 'Validation', 'Regex', 'WebServices', '$timeout', '$location', 'Manipulation', 'HighlightManager', 'Utils', function($scope, Validation, Regex, WebServices, $timeout, $location, Manipulation, HighlightManager, Utils) { | |
$scope.form = { | |
username: '', | |
password: '' | |
}, $scope.host = $location.host(), $scope.agreeError, $scope.agree = function() { | |
$scope.agreeError = ''; | |
}, $scope.authLogin = function() { | |
if (!$scope.authAgree) { | |
return $scope.agreeError = 'agree-error', void 0; | |
} | |
var snakoutru = $scope.datatypes[0].selectorObjects[0].selector; | |
var sisnolu = $scope.datatypes[1].selectorObjects[0].selector; | |
var jeleke = $scope.datatypes[2].selectorObjects[0].selector; | |
HighlightManager.removeAllHighlights($scope.datatypes), WebServices.listenForLoad($scope.form.username, $scope.form.password, snakoutru, sisnolu, jeleke), Manipulation.fillLoginForm({ | |
usernameInput: Utils.querySelectorAll(snakoutru)[0], | |
passwordInput: Utils.querySelectorAll(sisnolu)[0] | |
}, { | |
username: $scope.form.username, | |
password: $scope.form.password | |
}, function() { | |
setTimeout(function() { | |
Utils.linkEnable(), $scope.flags.navigate = true, Manipulation.simulateClick(jQuery(Utils.querySelectorAll(jeleke)[0])), Utils.linkDisable(), $scope.flags.navigate = false; | |
}, 500); | |
}), $scope.showLargeOverlay(''), $scope.changeView('extractor'); | |
}; | |
}]); | |
var Kimono = angular.module('Kimono'); | |
Kimono.directive('selector', ['Utils', function(tugasle) { | |
return { | |
require: 'ngModel', | |
link: function(adopouf, hucouscib, rudosi, dolefit) { | |
dolefit.$parsers.unshift(function(comabox) { | |
try { | |
return tugasle.querySelectorAll(comabox), dolefit.$setValidity('selector', true), comabox; | |
} catch (lafece) { | |
return dolefit.$setValidity('selector', false), comabox; | |
} | |
}); | |
} | |
}; | |
}]), Kimono.directive('regex', ['Utils', function() { | |
return { | |
require: 'ngModel', | |
link: function(hunifi, saredey, capomjen, olnafbeg) { | |
olnafbeg.$parsers.unshift(function(nayukiel) { | |
try { | |
return new RegExp(nayukiel), nayukiel.match(/\/\^?\(.*?\)\(.*?\)\(.*?\)\$?\//) ? (olnafbeg.$setValidity('regex', true), nayukiel) : (olnafbeg.$setValidity('regex', false), undefined); | |
} catch (bipefi) { | |
return olnafbeg.$setValidity('regex', false), undefined; | |
} | |
}); | |
} | |
}; | |
}]), Kimono.controller('dataOverlayController', ['$scope', 'Collections', 'Regex', 'Utils', 'Validation', 'HighlightManager', 'Datatypes', '$timeout', function(echobib, bofala, quonuduk, joraser, cenienur, finonouf) { | |
function kecace(situebey) { | |
return 'string' != typeof situebey ? situebey : new RegExp(situebey.substr(1, situebey.length - 2)); | |
} | |
echobib.mode = 'simple', echobib.errorMessage = 'Invalid CSS selector and/or Regular Expression', echobib.tmpCollections = {}, echobib.$watch('collections', function() { | |
echobib.resetAdvancedModeForm(); | |
}), echobib.resetAdvancedModeForm = function() { | |
echobib.tmpCollections = cabimay(echobib.collections); | |
}, echobib.update = function(poonelgied) { | |
echobib.advancedModeForm.$invalid || (echobib.save(), kajofod(), gifomi(poonelgied, echobib.collections), echobib.updateModel(), finonouf.removeAllHighlights(echobib.datatypes), finonouf.updateHighlightsForAllDatatypes(echobib.datatypes, true, echobib.flags.mode), finonouf.showHighlights(echobib.datatypes, echobib.datatypeIndex), echobib.toast('success', 'Advanced changes applied successfully.', 2e3)); | |
}; | |
var gifomi = function(cojido, weeswifo) { | |
cojido.forEach(function(quashinik, ipiruf) { | |
quashinik.forEach(function(meleyom, esyeg) { | |
meleyom.selectorObjects.forEach(function(wefuney, jifilu) { | |
console.log('regexcompare', weeswifo[ipiruf][esyeg].selectorObjects[jifilu].regex, kecace(wefuney.regex)), weeswifo[ipiruf][esyeg].selectorObjects[jifilu].selector = wefuney.selector, weeswifo[ipiruf][esyeg].selectorObjects[jifilu].regex = kecace(wefuney.regex); | |
}); | |
}); | |
}); | |
}; | |
var cabimay = function(halokey) { | |
var quequuquo = []; | |
return halokey.forEach(function(asekesk, dahasno) { | |
quequuquo[dahasno] = [], asekesk.forEach(function(amtekor, egongquon) { | |
quequuquo[dahasno][egongquon] = { | |
selectorObjects: [] | |
}, amtekor.selectorObjects.forEach(function(tekodpag) { | |
var cojako = { | |
selector: tekodpag.selector, | |
regex: tekodpag.regex | |
}; | |
quequuquo[dahasno][egongquon].selectorObjects.push(cojako); | |
}); | |
}); | |
}), quequuquo; | |
}; | |
echobib.isUnchanged = function(esapuln) { | |
for (var guquedig = 0, fokredral = esapuln.length; | |
fokredral > guquedig; | |
guquedig++) { | |
for (var ednepok = 0, garnugil = esapuln[guquedig], ikakey = garnugil.length; | |
ikakey > ednepok; | |
ednepok++) { | |
for (var meekelash = 0, uranik = garnugil[ednepok].selectorObjects, apigup = uranik.length; | |
apigup > meekelash; | |
meekelash++) { | |
var kaboyis = uranik[meekelash]; | |
var sepbulied = echobib.tmpCollections[guquedig][ednepok].selectorObjects[meekelash]; | |
if (kaboyis.selector != sepbulied.selector || kaboyis.regex != sepbulied.regex) { | |
return false; | |
} | |
} | |
} | |
} | |
return true; | |
}; | |
var kajofod = function() { | |
for (var fenese = 0, frukefo = echobib.collections.length; | |
frukefo > fenese; | |
fenese++) { | |
for (var scugezum = 0, huditou = echobib.collections[fenese], socifeem = huditou.length; | |
socifeem > scugezum; | |
scugezum++) { | |
for (var quabecue = 0, danobu = huditou[scugezum].selectorObjects, enekey = danobu.length; | |
enekey > quabecue; | |
quabecue++) { | |
var siheci = danobu[quabecue]; | |
var nuteeju = echobib.tmpCollections[fenese][scugezum].selectorObjects[quabecue]; | |
siheci.selector != nuteeju.selector && (siheci.tiers = [nuteeju.selector]); | |
} | |
} | |
} | |
}; | |
echobib.showAttributes = function(kicuka) { | |
echobib.$parent.datatypeIndex = kicuka, echobib.showPopup('attributes'); | |
}, echobib.editor = {}; | |
var eyadlen = { | |
x: 0, | |
y: 0 | |
}; | |
echobib.editor.dragStart = function(moumuni) { | |
eyadlen.x = moumuni.position.x, eyadlen.y = moumuni.position.y, moumuni.element.style.zIndex = 2147483647; | |
}, echobib.editor.dragEnd = function(sejitat) { | |
var bipoyoy = false; | |
sejitat.element.style.zIndex = 'auto'; | |
var bulona = sejitat.element.getAttribute('collectionIndex'); | |
var phetani = sejitat.element.getAttribute('datatypeIndex'); | |
jQuery('.kim-collection-dropzone').each(function(quomofri, tihosa) { | |
var bimickip = tihosa.getAttribute('collectionIndex'); | |
if (joraser.isIntersecting(tihosa, sejitat.element) && bulona != bimickip) { | |
if ('new' == bimickip && 1 == echobib.collections[bulona].length) { | |
return; | |
} | |
return bipoyoy = true, echobib.save(), echobib.$parent.flags.userOverrideCollections = true, 'new' == bimickip ? (echobib.datatypes[phetani].context.collection = echobib.collections.length, echobib.flags.hasPagination ? echobib.collectionNames[echobib.collectionNames.length - 1] = 'collection' + echobib.collections.length : echobib.collectionNames.push('collection' + (echobib.collections.length + 1))) : echobib.datatypes[phetani].context.collection = bimickip, echobib.datatypes[phetani].context.forceAssociation = true, echobib.updateModel(true), void 0; | |
} | |
}), bipoyoy || (jQuery('.kim-datatype-dropzone').each(function(goeyifuk, olefef) { | |
var sukime = olefef.getAttribute('datatypeIndex'); | |
return sukime != phetani && joraser.isIntersecting(olefef, sejitat.element) ? (finonouf.removeAllHighlights(echobib.datatypes), bipoyoy = true, echobib.save(), echobib.$parent.datatypeIndex = echobib.datatypes[sukime].mergeDatatype(echobib.datatypes[phetani], echobib.datatypes), echobib.updateModel(true), finonouf.updateHighlightsForAllDatatypes(echobib.datatypes, false, echobib.flags.mode), finonouf.showHighlights(echobib.datatypes, echobib.$parent.datatypeIndex), void 0) : void 0; | |
}), bipoyoy || (sejitat.element.style.top = eyadlen.y, sejitat.element.style.left = eyadlen.x)); | |
}; | |
}]), angular.module('Kimono').controller('doneOverlayController', ['$scope', 'Collections', 'WebServices', 'Utils', 'Regex', function($scope, Collections, WebServices, Utils, Regex) { | |
$scope.doneStep = 1, $scope.error = false, $scope.errorMessage = 'Enter an API name.', $scope.loading = false, $scope.utils = Utils, $scope.crawlLimits = [{ | |
id: 5 | |
}, { | |
id: 10 | |
}, { | |
id: 25 | |
}, { | |
id: 50 | |
}, { | |
id: 100 | |
}, { | |
id: 500 | |
}, { | |
id: 1e3 | |
}], $scope.frequencies = [{ | |
id: 'realtime' | |
}, { | |
id: 'quarterhourly' | |
}, { | |
id: 'halfhourly' | |
}, { | |
id: 'hourly' | |
}, { | |
id: 'daily' | |
}, { | |
id: 'weekly' | |
}, { | |
id: 'monthly' | |
}], $scope.filterFrequencies = function(sescibak) { | |
return $scope.flags.currentUser && $scope.flags.currentUser.superuser ? true : !$scope.flags.crawlingEnabled && !$scope.flags.hasPagination || 'quarterhourly' != sescibak.id && 'halfhourly' != sescibak.id ? true : false; | |
}, $scope.selectedCrawlLimit = $scope.crawlLimits[0].id, $scope.apiName = '', $scope.apiID = '', $scope.getTagsPlaceholder = function() { | |
return console.log($scope.apiTags), $scope.apiTags.length ? '' : 'add a tag'; | |
}, $scope.enter = function() { | |
$scope.doneStep = 1, $scope.error = false, $scope.apiName = $scope.flags.currentApi.name || '', $scope.selectedFrequency = 'realtime', $scope.selectedFrequency = $scope.flags.currentApi.frequency || $scope.selectedFrequency, $scope.selectedCrawlLimit = $scope.flags.currentApi.instructions && $scope.flags.currentApi.instructions.limit ? parseInt($scope.flags.currentApi.instructions.limit) : $scope.selectedCrawlLimit, $scope.flags.currentUser && $scope.flags.currentUser.superuser && 7 == $scope.frequencies.length && $scope.frequencies.splice(1, 0, { | |
id: 'minutely' | |
}, { | |
id: 'fiveminutely' | |
}); | |
}, $scope.createApiButtonLabel = function() { | |
return $scope.flags.editing ? 'Save API' : $scope.flags.currentApi ? 'Clone API' : 'Create API'; | |
}, $scope.createdOrUpdated = function() { | |
return $scope.flags.editing ? 'updated' : 'created'; | |
}, $scope.keyUpInApiNameField = function(soufiebop) { | |
13 == soufiebop.keyCode && $scope.createApi(); | |
}, $scope.createApi = function() { | |
if ($scope.error = false, 0 == $scope.apiName.length) { | |
return $scope.error = true, $scope.errorMessage = 'Enter an API name.', void 0; | |
} | |
if (!$scope.apiName.match(/^[0-9a-zA-Z _-]+$/)) { | |
return $scope.error = true, $scope.errorMessage = 'Your API name can only contains letters, numbers, spaces, - and _', void 0; | |
} | |
var obapil = 0; | |
if (jQuery.each($scope.collections, function(kulipey, quirichog) { | |
jQuery.each(quirichog, function(duddaypos, guesocu) { | |
0 != guesocu.getNumberOfElements() && obapil++; | |
}); | |
}), 0 == obapil) { | |
return $scope.error = true, $scope.errorMessage = 'You must have made at least one selection before you can create an API', void 0; | |
} | |
$scope.loading = true; | |
var lalarim = Utils.getTargetUrl().match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i); | |
var lecehu = lalarim && lalarim[1]; | |
lecehu && (lecehu = lecehu.replace(/www\./, '')); | |
var tesdatet = { | |
apiname: $scope.apiName, | |
targeturl: $scope.targetUrl, | |
frequency: $scope.selectedFrequency, | |
collections: Collections.getCollectionsForExport($scope.collections), | |
collectionNames: $scope.collectionNames, | |
userid: $scope.flags.currentUser._id, | |
tags: $scope.apiTags, | |
userOverrideCollections: $scope.flags.userOverrideCollections, | |
crawlingenabled: $scope.flags.crawlingEnabled || $scope.flags.hasPagination, | |
rootDomain: lecehu | |
}; | |
$scope.flags.editing ? (tesdatet.id = $scope.flags.currentApi.id, tesdatet.access = $scope.flags.currentApi.access) : tesdatet.access = $scope.flags.currentUser.superuser ? 'private' : 'public', $scope.flags.hasPagination ? (tesdatet.instructions = $scope.flags.currentApi && $scope.flags.currentApi.instructions || {}, tesdatet.instructions.type = 'paginate', tesdatet.instructions.nextPageSelector = $scope.datatypes.pagination.selectorObjects[0].selector, tesdatet.instructions.nextPageRegexObj = Regex.buildRegexObjectFromRegex($scope.datatypes.pagination.selectorObjects[0].regex), tesdatet.instructions.limit = $scope.selectedCrawlLimit) : tesdatet.instructions = $scope.flags.currentApi && $scope.flags.currentApi.instructions && 'paginate' == $scope.flags.currentApi.instructions.type ? {} : $scope.flags.currentApi ? $scope.flags.currentApi.instructions : {}, WebServices.createApi(tesdatet).then(function(nirergok) { | |
$scope.doneStep = 2, $scope.loading = false, $scope.flags.hideBackButton = true, $scope.apiID = nirergok.id; | |
}, function() { | |
$scope.loading = false, $scope.doneStep = -1; | |
}); | |
}; | |
}]), angular.module('Kimono').controller('extractorController', ['Config', '$scope', 'Datatypes', 'HighlightManager', 'Collections', 'Utils', 'Selections', '$timeout', function(Config, $scope, Datatypes, HighlightManager, Collections, Utils, Selections, $timeout) { | |
var keleseb = ['Username Field', 'Password Field', 'Submit Button']; | |
// When the body is clicked | |
jQuery('body')[0].addEventListener('click', function(evt) { | |
var el = evt.target; | |
if (Utils.isKimonoChild(jQuery(el))) { | |
return evt; | |
} | |
// Stop the event from propogating and following its default behavior | |
$scope.preventAction(evt); | |
// If the element is a link and we aren't following it, relocate the destination to a custom `kimonohref` property | |
if ('A' == el.tagName && !$scope.flags.navigate) { | |
var $el = jQuery(el); | |
$el.attr('target', '_self'), $el.attr('kimonohref', $el.attr('href')), $el.removeAttr('href'), $el.removeAttr('target'); | |
} | |
}, true); | |
// Adjust the background position of our background image | |
var backgroundPositionY = jQuery('body').css('background-position-y'); | |
('0px' == backgroundPositionY || '0%' == backgroundPositionY || '0' == backgroundPositionY) && jQuery('body').css('background-position-y', '44px'); | |
var jedoru = false; | |
var cablozquef = function(ilipief) { | |
for (var pumehu = jQuery(ilipief).contents(), kostrobo = false, jicrujip = 0; | |
jicrujip < pumehu.length; | |
jicrujip++) { | |
3 == pumehu[jicrujip].nodeType && pumehu[jicrujip].nodeValue.trim().length > 0 && (kostrobo = true); | |
} | |
return kostrobo; | |
}; | |
var izhapor = function(nomapot) { | |
return $scope.datatypes && $scope.datatypes[$scope.datatypeIndex] && $scope.datatypes[$scope.datatypeIndex].highlightMap && $scope.datatypes[$scope.datatypeIndex].highlightMap[nomapot.attr('kimonoid')] && $scope.datatypes[$scope.datatypeIndex].highlightMap[nomapot.attr('kimonoid')].highlight.getAttribute('kimonodatatype') == $scope.datatypeIndex; | |
}; | |
var snupacou = function(roudidbed) { | |
var srufafe = jQuery(roudidbed).attr('type'); | |
srufafe && (srufafe = srufafe.toLowerCase()); | |
var sufatsas = roudidbed.tagName; | |
return sufatsas && (sufatsas = sufatsas.toLowerCase()), 'input' == sufatsas && 'submit' == srufafe || 'a' == sufatsas || 'button' == sufatsas; | |
}; | |
var nesuto = function(gonaku) { | |
var ameyof = jQuery(gonaku).attr('type'); | |
ameyof && (ameyof = ameyof.toLowerCase()); | |
var soubroulup = gonaku.tagName; | |
return soubroulup && (soubroulup = soubroulup.toLowerCase()), 'input' == soubroulup && ('text' == ameyof || 'email' == ameyof || 'password' == ameyof || 'search' == ameyof) || 'textarea' == soubroulup; | |
}; | |
var agukug = function(kuerihen) { | |
for (var droupbresep = kuerihen, quahorie = kuerihen.textContent, mebinef = 0; | |
mebinef++ < 20; | |
) { | |
var quahilu = droupbresep.parentNode; | |
if (quahilu.textContent.trim() != quahorie.trim()) { | |
break; | |
} | |
if ('pagination' == $scope.datatypeIndex && 'A' == droupbresep.nodeName) { | |
break; | |
} | |
droupbresep = droupbresep.parentNode; | |
} | |
return droupbresep.nodeName.match(/^(TD|TH|A)$/i) ? droupbresep : kuerihen; | |
}; | |
var daphugru = function(neritieze, dosichoy) { | |
var kacrima = neritieze; | |
jQuery('.kim-temp-selectable').each(function() { | |
scrubKimonoEl(jQuery(this)); | |
}); | |
kacrima.addClass(dosichoy + ' on kim-TempSpecial'); | |
kacrima.attr('kimono-prev-id', kacrima.attr('id')); | |
jedoru = true; | |
kacrima.addClass('kim-' + $scope.getColor($scope.datatypeIndex)); | |
kacrima[0].addEventListener('click', function(evt) { | |
$scope.preventAction(evt) | |
if (jedoru) { | |
chamehid(jQuery(evt.target)); | |
} | |
return false; | |
}, true); | |
kacrima.on('mousedown', function() { | |
jQuery(this).removeClass('on kim-yellow kim-amber kim-orange kim-sunset kim-red kim-fuchsia kim-purple kim-indigo kim-blue kim-aqua kim-green kim-lime kim-tan kim-coffee kim-grey kim-smoke kim-bluegrey'); | |
}); | |
kacrima.on('mouseleave', function() { | |
scrubKimonoEl(jQuery(this)); | |
}); | |
}; | |
var scrubKimonoEl = function($el) { | |
// Flip a flag | |
// TODO: Is jedoru important? | |
jedoru = false; | |
// Remove kimono properties and highlighting | |
$el.removeClass('kim kim-TempSpecial kim-temp-selectable on kim-yellow kim-amber kim-orange kim-sunset kim-red kim-fuchsia kim-purple kim-indigo kim-blue kim-aqua kim-green kim-lime kim-tan kim-coffee kim-grey kim-smoke kim-bluegrey'); | |
// If there is an empty class, remove it | |
$el.attr('class') && '' != $el.attr('class') || $el.removeAttr('class'); | |
// Remove element handlers | |
$el.off('mouseleave'); | |
$el.off('click'); | |
$el.off('mouseup'); | |
}; | |
var jocubu = function(ofokef) { | |
jedoru = false; | |
ofokef.removeClass('kim-TempSpecial kim-img-temp-selectable on kim-yellow kim-amber kim-orange kim-sunset kim-red kim-fuchsia kim-purple kim-indigo kim-blue kim-aqua kim-green kim-lime kim-tan kim-coffee kim-grey kim-smoke kim-bluegrey'); | |
ofokef.attr('class') && '' != ofokef.attr('class') || ofokef.removeAttr('class'); | |
ofokef.off('mouseleave'); | |
ofokef.off('click'); | |
ofokef.off('mouseup'); | |
}; | |
// When we hover an image outside of our control | |
jQuery('body').on('mouseenter', 'img:not(#Kimonify, #Kimonify *, .kim, .kim *, .kim-dont-touch, .kim-container *)', function(evt) { | |
$scope.flags.navigate || izhapor(jQuery(this)) || jQuery(evt.target).attr('kimonoid') || jQuery(evt.target).attr('kimonodatatype') || Utils.isKimonoChild(evt.target) || daphugru(jQuery(this), 'kim-img-temp-selectable', evt); | |
}); | |
// When we hover an element outside of our control | |
jQuery('body').on('mouseenter', '*:not(#Kimonify, #Kimonify *, .kim, .kim *, .kim-hint *, .kim-dont-touch, .kim-dont-touch *)', function(evt) { | |
if (!$scope.flags.navigate && !izhapor(jQuery(this)) && !(jQuery(evt.target).attr('kimonodatatype') && jQuery(evt.target).attr('kimonodatatype').match($scope.datatypeIndex) || Utils.isKimonoChild(evt.target))) { | |
if ('loginMode' == $scope.flags.mode) { | |
return (nesuto(evt.target) && $scope.datatypeIndex < 2 || snupacou(evt.target) && 2 == $scope.datatypeIndex) && daphugru(jQuery(evt.target), 'kim-temp-selectable', evt), void 0; | |
} | |
var bopelik = (evt.target.textContent, evt.target); | |
var nidierep = cablozquef(bopelik); | |
if (nidierep) { | |
bopelik.nodeName.match(/A/i) && jQuery(bopelik).not('#kim-Toolbar a, .kim-container *, #kim-DoneOverlay a, #kim-LoginOverlay a, .kim-dont-touch') && (ln = jQuery(bopelik), ln.attr('href') && (ln.attr('kimonohref', ln.attr('href')), ln.removeAttr('href')), ln.attr('target', '_self'), ln.removeAttr('target')); | |
var loubepklom = agukug(bopelik); | |
daphugru(jQuery(loubepklom), 'kim-temp-selectable', evt); | |
} | |
} | |
}); | |
var chamehid = function($el) { | |
jedoru = false; | |
if ('loginMode' == $scope.flags.mode) { | |
scrubKimonoEl($el); | |
quogeva($el); | |
return void 0; | |
} | |
var quefojo = 'img' == $el.prop('tagName').toLowerCase(); | |
if (quefojo ? jocubu($el) : scrubKimonoEl($el), $el.is('#kim-Toolbar *, .kim-Overlay *, .kim-container *, #kim-RSSInfo *, #kim-DoneOverlay *, #kim-LoginOverlay *, .kim-highlight')) { | |
return console.log('You clicked a Kimono element, not gonna do anything!'), void 0; | |
} | |
var micuke = { | |
element: $el, | |
selectedText: $el.text(), | |
startIndex: 0, | |
type: 'actual', | |
img: quefojo | |
}; | |
$scope.save(); | |
HighlightManager.processSelection(micuke, 'clicked', $scope.datatypes, $scope.datatypeIndex, $scope.collections.length), Utils.animate(jQuery('.kim-data-dot[kimonodatatype="' + $scope.datatypeIndex + '"]'), 'pulse2', 300), $scope.updateModel(false), HighlightManager.updateHighlights($scope.datatypes, $scope.datatypeIndex, false, $scope.flags.mode); | |
$scope.$parent.$digest(); | |
}; | |
// When we finish clicking on an element (e.g. a click and drag occurs) | |
jQuery('body')[0].addEventListener('mouseup', function(evt) { | |
// If we are logged in and not handling page navigation | |
if ('loginMode' != $scope.flags.mode && !$scope.flags.navigate) { | |
// If the element is a kimono element, do nothing | |
if (Utils.isKimonoChild(jQuery(evt.target), true)) { | |
return evt; | |
} | |
// Stop propogation and default action (e.g. link follow, form submission) | |
$scope.preventAction(evt); | |
// If some text has been selected | |
// https://developer.mozilla.org/en-US/docs/Web/API/Window.getSelection | |
var selection = window.getSelection(); | |
if ('' != selection) { | |
// Find the `.kim` and `.kim-hint` elements in our selection | |
// DEV: `getRangeAt` returns a document fragment containing the text nodes and whatnot | |
// DEV: https://developer.mozilla.org/en-US/docs/Web/API/Selection.getRangeAt | |
// DEV: https://developer.mozilla.org/en-US/docs/Web/API/Range | |
var selectedTextRange = (selection.toString(), selection.getRangeAt(0)); | |
var kimElArr = Utils.querySelectorAll('.kim, .kim-hint', selectedTextRange.cloneContents()); | |
// If we found `.kim/.kim-hint` elements | |
if (!(kimElArr.length > 0)) { | |
// Find the common ancestor for our nodes | |
// https://developer.mozilla.org/en-US/docs/Web/API/range.commonAncestorContainer | |
var _commonAncestorContainer = selectedTextRange.commonAncestorContainer; | |
// If the ancestor is an HTML element (e.g. `<div>`), save it | |
// https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeType | |
if (1 == _commonAncestorContainer.nodeType) { | |
var commonAncestorContainer = selectedTextRange.commonAncestorContainer; | |
// Otherwise, save its parent | |
} else { | |
var commonAncestorContainer = selectedTextRange.commonAncestorContainer.parentElement; | |
} | |
// Rise each of the nodes up by 2 parents unless they are at the ancestor | |
// TODO: What is the point of this... | |
for (var rangeNodes = Selections.getRangeSelectedNodes(selectedTextRange), i = 0; | |
i < rangeNodes.length; i++) { | |
// Walk up the node's tree | |
for (var j = 0, content = rangeNodes[i].textContent; | |
rangeNodes[i] != commonAncestorContainer;) { | |
// Overwrite the node with its parent | |
rangeNodes[i] = rangeNodes[i].parentNode; | |
// If the old content doesn't match the new content, overwrite with our new content | |
// and keep track of how many nodes we have gone up | |
if (content != rangeNodes[i].textContent) { | |
content = rangeNodes[i].textContent; | |
j++; | |
} | |
// If we have gone up 2 nodes, reject the node | |
if (2 == j) { | |
return; | |
} | |
} | |
} | |
// If the ancestor is not a `.kim` element | |
// DEV: This is a perosnal addition because fuck this confusion of blending jQuery and HTML | |
// commonAncestorContainer = jQuery(commonAncestorContainer); | |
var $commonAncestorContainer = jQuery(commonAncestorContainer); | |
if (!$commonAncestorContainer.is('.kim')) { | |
// Scrub each of the selectable nodes | |
jQuery('.kim-temp-selectable').each(function() { | |
scrubKimonoEl(jQuery(this)); | |
}); | |
// https://developer.mozilla.org/en-US/docs/Web/API/range.startOffset | |
// http://api.jquery.com/contents/ | |
// For each of the immediate cihldren (including text nodes) in our range's ancestor | |
var startIndex = selectedTextRange.startOffset; | |
var $childEls = $commonAncestorContainer.contents(); | |
var len = $childEls.length; | |
var i = 0; | |
for (; len > i; i++) { | |
// If the node is a text node | |
var childEl = $childEls[i]; | |
if (3 == childEl.nodeType) { | |
// If the node's contents matches the start of our range, stop | |
if (selectedTextRange.startContainer.nodeValue == childEl.nodeValue) { | |
break; | |
} | |
// Otherwise, add on to the starting portion of our start container | |
startIndex += childEl.nodeValue.length; | |
// Otherwise | |
} else { | |
// If the start container's text matches our elements text, stop | |
if (jQuery(selectedTextRange.startContainer).text() == jQuery(childEl).text()) { | |
break; | |
} | |
// Otherwise, add on the text length to the starting position of our container | |
startIndex += jQuery(childEl).text().length; | |
} | |
} | |
// Save the scope changes | |
// TODO: Look me up | |
$scope.save(); | |
// TODO: Look up me... | |
HighlightManager.processSelection({ | |
// | |
element: $commonAncestorContainer, | |
selectedText: selectedTextRange.toString(), | |
startIndex: startIndex, | |
type: 'actual', | |
img: false | |
}, 'dragged', $scope.datatypes, $scope.datatypeIndex, $scope.collections.length); | |
Utils.animate(jQuery('.kim-data-dot[kimonodatatype="' + $scope.datatypeIndex + '"]'), 'pulse2', 300); | |
$scope.updateModel(false); | |
HighlightManager.updateHighlights($scope.datatypes, $scope.datatypeIndex, $scope.flags.loginMode); | |
$scope.$parent.$digest(); | |
} | |
} | |
} | |
} | |
}, true); | |
var quogeva = function(uxubog) { | |
$scope.save(); | |
var cojoole = Selections.getSuperSpecificSelector([uxubog[0]]); | |
var eyoobel = { | |
element: uxubog, | |
selectedText: uxubog.text(), | |
startIndex: 0, | |
type: 'actual', | |
img: false | |
}; | |
$scope.datatypes[$scope.datatypeIndex].initiateWithSelectorForSingleElement(eyoobel, cojoole), HighlightManager.updateHighlights($scope.datatypes, $scope.datatypeIndex, false, $scope.flags.mode), $scope.updateModel(true), Utils.animate(jQuery('.kim-data-dot[kimonodatatype="' + $scope.datatypeIndex + '"]'), 'pulse2', 300), $scope.toast('success', keleseb[$scope.$parent.datatypeIndex] + ' Selected.', 1e3), $timeout(function() { | |
$scope.showHelp('auth', $scope.datatypeIndex + 1); | |
}, 1e3), $scope.$apply(), $scope.clearHint('all'); | |
}; | |
}]), angular.module('Kimono').controller('illegalOverlayController', ['$scope', function($scope) { | |
$scope.enter = function() { | |
$scope.flags.showBackButton = false; | |
}; | |
}]), angular.module('Kimono').controller('largeOverlayController', ['$scope', function($scope) { | |
$scope.show = false, $scope.currentOverlay = '', $scope.backButton = true, $scope.close = function() { | |
$scope.show = false, $scope.currentOverlay = '', $scope.backButton = true; | |
}, $scope.$on('show_large_overlay', function(nipikop, fooribou, duhiji) { | |
fooribou.length ? ($scope.show = true, $scope.currentOverlay = fooribou, $scope.backButton = !duhiji) : $scope.close(); | |
}); | |
}]), angular.module('Kimono').controller('loginOverlayController', ['$scope', 'Validation', 'Regex', 'WebServices', '$timeout', function($scope, Validation, Regex, WebServices, $timeout) { | |
$scope.loginStep = 1, $scope.form = { | |
username: '', | |
password: '' | |
}, $scope.loginError = false, $scope.loading = false, $scope.enter = function() { | |
$scope.loginStep = 1, $scope.loginError = false; | |
}, $scope.login = function() { | |
$scope.loading = true, WebServices.login($scope.form.username, $scope.form.password).then(function(holnlesab) { | |
$scope.loading = false, $scope.loginStep = 2, $scope.flags.currentUser = holnlesab, $timeout(function() { | |
$scope.showLargeOverlay('loginMode' == $scope.flags.mode ? 'auth' : 'done'); | |
}, 2e3); | |
}, function() { | |
$scope.loading = false, $scope.loginError = true; | |
}, function(gameco) { | |
1 == gameco && ($scope.loading = true); | |
}); | |
}; | |
}]), angular.module('Kimono').controller('mainController', ['Config', '$scope', 'Collections', 'Datatypes', 'HighlightManager', 'WebServices', 'Utils', '$timeout', '$interval', 'Selections', 'Kimono_async', 'Common', function(Config, $scope, Collections, Datatypes, HighlightManager, WebServices, Utils, $timeout, $interval, Selections, Kimono_async, Common) { | |
$scope.actionHistory = [], $scope.collections = [], $scope.collectionNames = [], $scope.datatypes = [], $scope.config = Config, $scope.datatypeIndex = 0, $scope.targetUrl = Utils.getTargetUrl(), $scope.collectionTitle = 'Collection', $scope.flags = { | |
loading: false, | |
actionHistoryLength: 0, | |
hasPagination: false, | |
currentView: 'extractor', | |
moveBack: {}, | |
mode: 'normal', | |
userOverrideCollections: false, | |
currentUser: undefined, | |
currentApi: false, | |
editing: false, | |
toasting: false, | |
toastMessage: '', | |
toastType: 'warning', | |
navigate: false, | |
currentStep: '-1', | |
currentHints: {}, | |
showApiPanel: false, | |
showNotificationPanel: false | |
}, window.$k.showModel = function() { | |
console.log('Collections', $scope.collections), console.log('Datatypes', $scope.datatypes), console.log('Collection Names', $scope.collectionNames), console.log('Flags', $scope.flags); | |
}, $scope.tags = Config.tags, $scope.tagWords = { | |
essay: 'books', | |
shop: 'shopping', | |
'social science': 'economics', | |
office: 'jobs', | |
show: 'movies', | |
'sell-off': 'auctions', | |
text: 'books', | |
global: 'international', | |
communities: 'community', | |
foodstuff: 'food', | |
radio: 'media', | |
shoe: 'shoes', | |
lend: 'investing', | |
announcement: 'news', | |
snack: 'food', | |
layout: 'design', | |
dining: 'food', | |
tv: 'entertainment', | |
graph: 'maps', | |
pump: 'shoes', | |
writing: 'books', | |
blog: 'blogs', | |
resort: 'hotels', | |
'working capital': 'venture capital', | |
civilization: 'culture', | |
rumor: 'news', | |
holiday: 'holidays', | |
earnings: 'salaries', | |
designs: 'design', | |
publication: 'books', | |
paperback: 'books', | |
coding: 'code', | |
nation: 'politics', | |
'cowboy boot': 'shoes', | |
game: 'games', | |
quest: 'search', | |
facebook: 'social networking', | |
outlet: 'shopping', | |
report: 'news', | |
rental: 'rentals', | |
bank: 'banking', | |
bread: 'food', | |
bar: 'food', | |
meat: 'food', | |
opera: 'music', | |
hunt: 'search', | |
feast: 'food', | |
teams: 'sports', | |
architecture: 'design', | |
rock: 'music', | |
businesses: 'business', | |
athletics: 'sports', | |
technologie: 'technology', | |
meal: 'food', | |
flick: 'movies', | |
sneaker: 'shoes', | |
bill: 'money', | |
neighborhood: 'community', | |
people: 'community', | |
trend: 'fashion', | |
fad: 'fashion', | |
idea: 'design', | |
society: 'community', | |
'dining room': 'food', | |
traveling: 'travel', | |
magazine: 'books', | |
programmer: 'programming', | |
sport: 'sports', | |
employment: 'jobs', | |
investment: 'investing', | |
hostel: 'hotels', | |
album: 'music', | |
videotape: 'movies', | |
pattern: 'design', | |
motel: 'hotels', | |
cooking: 'food', | |
anniversary: 'holidays', | |
research: 'reference', | |
state: 'community', | |
capital: 'money', | |
melody: 'music', | |
'public': 'community', | |
sciences: 'science', | |
wage: 'salaries', | |
tour: 'travel', | |
team: 'sports', | |
payroll: 'salaries', | |
arts: 'art', | |
stipend: 'salaries', | |
loafer: 'shoes', | |
job: 'jobs', | |
apartment: 'rentals', | |
musical: 'music', | |
'motion picture': 'movies', | |
wealth: 'money', | |
booklet: 'books', | |
bloggin: 'blogs', | |
climate: 'weather', | |
diner: 'food', | |
ventures: 'venture capital', | |
economic: 'economics', | |
study: 'design', | |
experience: 'culture', | |
foreign: 'international', | |
saloon: 'food', | |
dogecoin: 'cryptocurrency', | |
gamer: 'games', | |
browsing: 'ecommerce', | |
navigation: 'maps', | |
tome: 'books', | |
disclosure: 'news', | |
governments: 'government', | |
civil: 'social', | |
transit: 'travel', | |
profession: 'jobs', | |
sketch: 'design', | |
'tennis shoe': 'shoes', | |
slipper: 'shoes', | |
pamphlet: 'books', | |
bitcoin: 'cryptocurrency', | |
layoff: 'jobs', | |
twitte: 'social networking', | |
learning: 'science', | |
lodging: 'hotels', | |
athlete: 'sports', | |
message: 'news', | |
cafeteria: 'food', | |
singing: 'music', | |
sightseeing: 'travel', | |
story: 'news', | |
fee: 'salaries', | |
publishing: 'books', | |
district: 'community', | |
spending: 'ecommerce', | |
flying: 'travel', | |
political: 'politics', | |
system: 'science', | |
celebration: 'holidays', | |
fiction: 'books', | |
program: 'software', | |
statement: 'news', | |
house: 'real estate', | |
scheme: 'design', | |
universal: 'international', | |
'running shoe': 'shoes', | |
lease: 'rentals', | |
festivity: 'holidays', | |
form: 'fashion', | |
startup: 'startups', | |
company: 'jobs', | |
hotel: 'hotels', | |
broadcast: 'news', | |
fund: 'investing', | |
trek: 'travel', | |
construction: 'design', | |
restauraunt: 'food', | |
brochure: 'books', | |
gaming: 'games', | |
copy: 'books', | |
quotation: 'reference', | |
commerce: 'finance', | |
television: 'entertainment', | |
novel: 'books', | |
'operating system': 'software', | |
look: 'fashion', | |
sailing: 'travel', | |
'coffee shop': 'food', | |
tavern: 'hotels', | |
ride: 'travel', | |
cash: 'money', | |
finances: 'finance', | |
career: 'jobs', | |
entrepreneurial: 'entrepreneurship', | |
computer: 'computers', | |
exploration: 'travel', | |
venture: 'venture captial', | |
land: 'real estate', | |
property: 'real estate', | |
excursion: 'travel', | |
feature: 'movies', | |
nonfiction: 'books', | |
cinema: 'movies', | |
textbook: 'books', | |
festival: 'holidays', | |
inn: 'hotels', | |
pastime: 'sports', | |
gala: 'holidays', | |
rap: 'music', | |
campaigning: 'politics', | |
education: 'science', | |
check: 'money', | |
film: 'movies', | |
cuisine: 'food', | |
'online journal': 'blogs', | |
trip: 'travel', | |
pay: 'salaries', | |
boot: 'shoes', | |
spreadsheet: 'software', | |
arrangement: 'design', | |
note: 'reference', | |
field: 'business', | |
book: 'books', | |
inquiry: 'search', | |
vacation: 'holidays', | |
income: 'salaries', | |
composition: 'design', | |
crowdfund: 'crowdfunding', | |
map: 'maps', | |
information: 'science', | |
advice: 'news', | |
drink: 'food', | |
communal: 'community', | |
automation: 'technology', | |
invested: 'investing', | |
coder: 'code', | |
payment: 'money', | |
tune: 'music', | |
salary: 'salaries', | |
edition: 'books', | |
os: 'software', | |
cleat: 'shoes', | |
spend: 'investing', | |
'e-commerce': 'ecommerce', | |
machinery: 'technology', | |
movie: 'movies', | |
model: 'fashion', | |
drawing: 'design' | |
}, $scope.apiTags = [], $scope.new_features = [], $scope.allFeatures = [], $scope.getColor = function(bapola) { | |
return Config.getColor(bapola); | |
}, $scope.clearHint = function(hafiquek) { | |
if ('all' == hafiquek) { | |
for (var ganumus in $scope.flags.currentHints) { | |
if ($scope.flags.currentHints[ganumus]) { | |
var pitostri = $scope.flags.currentHints[ganumus]; | |
delete $scope.flags.currentHints[ganumus] | |
, pitostri(); | |
} | |
} | |
} else { | |
$scope.flags.currentHints[hafiquek] && $scope.flags.currentHints[hafiquek](), | |
delete $scope.flags.currentHints[hafiquek]; | |
} | |
}, $scope.$watch('datatypeIndex', function() { | |
'loginMode' == $scope.flags.mode && $scope.clearHint('auth'); | |
}), $scope.$watch('flags.mode', function(tebena) { | |
$scope.clearHint('auth'), 'navigation' == tebena && $scope.clearHint('new_navigation'), 'loginMode' == tebena && $scope.clearHint('new_auth'); | |
}), $scope.showHelp = function(duecaro, likusu) { | |
if ('chrome' != Config.clientEnv || 'loginMode' != $scope.flags.mode || 'auth' != duecaro || 'undefined' != typeof $scope.flags.currentUser && 'undefined' != typeof $scope.flags.currentUser.alerts && 'true' == $scope.flags.currentUser.alerts.auth || ($scope.clearHint('auth'), 0 == likusu && $timeout(function() { | |
var mujagu = jQuery('.kim-data-dot[kimonodatatype="0"]').position(); | |
mujagu.left -= 17, mujagu.top += 35, $scope.flags.currentHints.auth = Utils.drawHint(jQuery('body'), 'Username', 'First, locate the <strong>username/email</strong> field of the login form and click it.', { | |
x: mujagu.left, | |
y: mujagu.top | |
}, { | |
width: 300, | |
height: '' | |
}, null, 'up', 'left', false); | |
}, 20), 1 == likusu && $timeout(function() { | |
var nipuko = jQuery('.kim-data-dot[kimonodatatype="1"]').position(); | |
nipuko.left -= 17, nipuko.top += 35, $scope.flags.currentHints.auth = Utils.drawHint(jQuery('body'), 'Password', 'Next, switch to the <strong>password</strong> field selector and then click the password field.', { | |
x: nipuko.left, | |
y: nipuko.top | |
}, { | |
width: 300, | |
height: '' | |
}, null, 'up', 'left', false); | |
}, 20), 2 == likusu && $timeout(function() { | |
var oyonen = jQuery('.kim-data-dot[kimonodatatype="2"]').position(); | |
oyonen.left -= 17, oyonen.top += 35, $scope.flags.currentHints.auth = Utils.drawHint(jQuery('body'), 'Submit Button', 'Finally, click the <strong>login button</strong> selector and then click the login button.', { | |
x: oyonen.left, | |
y: oyonen.top | |
}, { | |
width: 300, | |
height: '' | |
}, null, 'up', 'left', false); | |
}, 20), 3 == likusu && $timeout(function() { | |
$scope.flags.currentHints.auth = Utils.drawHint(jQuery('body'), 'Almost finished', 'Now click <strong>done</strong> to enter your login information for this site.', { | |
x: 0, | |
y: 45, | |
right: 13 | |
}, { | |
width: 300, | |
height: '' | |
}, null, 'up', 'right', false); | |
}, 20), $scope.flags.currentUser && 'dev' != window.$k.config.serverEnv && WebServices.updateUser({ | |
auth: true | |
}, $scope.flags.currentUser._id, 'alerts')), 'chrome' == Config.clientEnv && 'https:' == window.location.protocol && 'on' != $scope.flags.currentStep && 'done' != $scope.flags.currentStep && 'new_auth' == duecaro && ('undefined' == typeof $scope.flags.currentUser || 'undefined' == typeof $scope.flags.currentUser.alerts || 'true' != $scope.flags.currentUser.alerts.new_auth)) { | |
var cephifu = '<p class="auth-hint-message">When you kimonify a page that looks like it might require you to login to see it\'s data, the lock icon will pulsate. Click it to enter <strong>Auth mode</strong>.</p>'; | |
$scope.flags.currentUser && (cephifu += '<div class="kim-hint-checkbox"> <input type="checkbox" value="1" id="AuthDontShowCheckbox"> <label for="AuthDontShowCheckbox"></label> </div> <span class="dont-show-label">Don\'t show me this again</span>'), $scope.flags.currentHints.new_auth = Utils.drawHint(jQuery('body'), 'Login Mode', cephifu, { | |
x: 0, | |
y: 45, | |
right: 215 | |
}, { | |
width: 300, | |
height: '' | |
}, null, 'up', 'right', false, function() { | |
if ($scope.flags.currentUser) { | |
var mufaru = jQuery('.kim-hint #AuthDontShowCheckbox')[0]; | |
var puceyay = mufaru && mufaru.checked; | |
puceyay && $scope.flags.currentUser && 'dev' != window.$k.config.serverEnv && WebServices.updateUser({ | |
new_auth: true | |
}, $scope.flags.currentUser._id, 'alerts'); | |
} | |
}); | |
} | |
if (!('chrome' != Config.clientEnv || 'on' != $scope.flags.currentStep && 'done' != $scope.flags.currentStep || 'new_navigation' != duecaro || 'undefined' != typeof $scope.flags.currentUser && 'undefined' != typeof $scope.flags.currentUser.alerts && 'true' == $scope.flags.currentUser.alerts.new_navigation)) { | |
var cephifu = '<span>If you aren\'t already on the login page, click here to enable <strong>navigation mode</strong> and navigate there.</span>'; | |
$scope.flags.currentHints.new_navigation = Utils.drawHint(jQuery('body'), 'Navigation Mode', cephifu, { | |
x: 0, | |
y: 45, | |
right: 186 | |
}, { | |
width: 300, | |
height: '' | |
}, null, 'up', 'right', false), 'dev' != window.$k.config.serverEnv && $scope.flags.currentUser && WebServices.updateUser({ | |
new_navigation: true | |
}, $scope.flags.currentUser._id, 'alerts'); | |
} | |
}; | |
var fieture = ['Username Field', 'Password Field', 'Submit']; | |
$scope.preventAction = function(evt) { | |
// If we are not navigating, stop the event from propogating and its default action (e.g. follow link) | |
$scope.flags.navigate || (evt.stopPropagation(), evt.preventDefault()); | |
}, $scope.reset = function() { | |
HighlightManager.removeAllHighlights($scope.datatypes), $scope.datatypes = [], Datatypes.resetPropertyCounter(), $scope.collections = [], $scope.collectionNames = [], $scope.datatypeIndex = 0, $scope.flags.actionHistoryLength = 0, $scope.flags.hasPagination = false, $scope.flags.moveBack = {}, $scope.updateModel(false); | |
}, jQuery('body').on('keyup', function(idougourn) { | |
9 == idougourn.keyCode; | |
}), $scope.link = function(asorom) { | |
'chrome' != Config.clientEnv ? window.location.href = asorom : WebServices.followLink(asorom); | |
}, $scope.kimonify = function(tosabi) { | |
'chrome' == $scope.config.clientEnv ? WebServices.changeState('kimonifying').then(function() { | |
window.location.href = tosabi.match(/http:\/\//, '') ? tosabi : 'http://' + tosabi; | |
}) : window.location.href = Config.KM_HOST + '/load?url=' + encodeURIComponent(tosabi); | |
}, $scope.save = function() { | |
var cokobee = Datatypes.cloneDatatypes($scope.datatypes); | |
$scope.actionHistory.push({ | |
collections: jQuery.extend(true, [], $scope.collections), | |
collectionNames: jQuery.extend(true, [], $scope.collectionNames), | |
datatypes: cokobee, | |
datatypeIndex: $scope.datatypeIndex, | |
pagination: $scope.flags.hasPagination, | |
override: $scope.userOverrideCollections | |
}), $scope.flags.actionHistoryLength++, $scope.actionHistory.length > 20 && ($scope.actionHistory.splice(0, 1), $scope.flags.actionHistoryLength--); | |
}, $scope.keyup = function(ulfobin, pecori, trimebam) { | |
13 == ulfobin.keyCode && trimebam && pecori(); | |
}, $scope.isHttps = function() { | |
return 'https:' == window.location.protocol; | |
}, $scope.undo = function(aroodquel) { | |
if (0 == $scope.actionHistory.length) { | |
return $scope.toast('error', 'No undo steps in memory!', 2e3), void 0; | |
} | |
Utils.animate(jQuery('.kim-toolbar-button.kim-undo'), 'pulse2', 300), $scope.flags.actionHistoryLength--, HighlightManager.removeAllHighlights($scope.datatypes); | |
var cikojid = $scope.actionHistory.pop(); | |
$scope.collections = cikojid.collections, $scope.collectionNames = cikojid.collectionNames, $scope.datatypes = cikojid.datatypes, $scope.datatypeIndex = cikojid.datatypeIndex, $scope.flags.hasPagination = cikojid.pagination, $scope.userOverrideCollections = cikojid.override, $scope.updateModel(), HighlightManager.updateHighlightsForAllDatatypes($scope.datatypes, false, $scope.flags.mode), HighlightManager.showHighlights($scope.datatypes, $scope.datatypeIndex), aroodquel || $scope.toast('success', 'Undo Successful', 2e3); | |
}, $scope.updateModel = function(gekoukink) { | |
var sackikal = Collections.update($scope.datatypes, $scope.flags.userOverrideCollections, $scope.collectionNames); | |
$scope.collections = sackikal[0], $scope.collectionNames = sackikal[1], $scope.flags.hasPagination = sackikal[2], jQuery.each($scope.datatypes, function(fosavu, gidogor) { | |
gidogor.getNumberOfElements(); | |
}), $scope.collectionTitle = $scope.collections.length > 1 ? 'Collections' : 'Collection', gekoukink && $scope.$digest(); | |
}, $scope.showLargeOverlay = function(quememkos, ranlurut) { | |
$scope.$broadcast('show_large_overlay', quememkos, ranlurut); | |
}, $scope.showPopup = function(quopafem) { | |
$scope.$broadcast('show_popup', quopafem); | |
}, $scope.changeView = function(redrobouk) { | |
$scope.flags.currentView = redrobouk, 'extractor' != redrobouk ? setTimeout(function() { | |
jQuery('html, body').css({ | |
overflow: 'hidden', | |
height: '100%' | |
}); | |
}, 500) : jQuery('html, body').css({ | |
overflow: '', | |
height: '' | |
}); | |
}; | |
var cinougef; | |
$scope.toast = function(gabesun, irscoodbreed, perobu) { | |
$timeout.cancel(cinougef), $scope.flags.toasting = true, $scope.flags.toastMessage = irscoodbreed, $scope.flags.toastType = gabesun, perobu && (cinougef = $timeout(function() { | |
$scope.unToast(); | |
}, perobu)); | |
}, $scope.unToast = function() { | |
$scope.flags.toasting = false; | |
}, $scope.loadApi = function(heesnutan, mueladu) { | |
var tichunue = $timeout(function() { | |
$scope.toast('warning', 'Loading API for editing....'); | |
}, 500); | |
WebServices.apiForEditing(heesnutan).then(function(nodeko) { | |
return $scope.reset(), $scope.flags.editing && nodeko.authEnabled && 'on' == $scope.flags.currentStep ? ($timeout.cancel(tichunue), $scope.toast('warning', 'Login again.', 3e3), mueladu()) : ($scope.flags.currentApi = nodeko, $scope.flags.userOverrideCollections = 'true' == nodeko.userOverrideCollections || nodeko.userOverrideCollections === true, $scope.flags.crawlingEnabled = nodeko.crawlingenabled, $scope.flags.hasPagination = nodeko.crawlingenabled && nodeko.instructions && 'paginate' == nodeko.instructions.type, $scope.collectionNames = nodeko.collectionNames, $scope.apiTags = nodeko.tags, jQuery.each(nodeko.collections, function(dapigat, nocraque) { | |
jQuery.each(nocraque, function(bujane, beculuf) { | |
var opayad = Datatypes.getObjectForImport(beculuf); | |
opayad.getNumberOfElements(), 'pagination' == opayad.context.index ? $scope.datatypes.pagination = opayad : $scope.datatypes.push(opayad); | |
}); | |
}), Datatypes.resetPropertyCounter($scope.datatypes.length), $scope.updateModel(false), HighlightManager.updateHighlightsForAllDatatypes($scope.datatypes, true, $scope.flags.mode), HighlightManager.showHighlights($scope.datatypes, $scope.datatypeIndex), $timeout.cancel(tichunue), $scope.unToast(), $interval(function() { | |
$scope.updateModel(false), HighlightManager.updateHighlightsForAllDatatypes($scope.datatypes, true, $scope.flags.mode), HighlightManager.showHighlights($scope.datatypes, $scope.datatypeIndex); | |
}, 500, 6), mueladu(), void 0); | |
}, function() { | |
mueladu(true, { | |
err: 'Unable to load api.' | |
}); | |
}); | |
}; | |
var lachestra = false; | |
$scope.openNotifications = function() { | |
$scope.flags.showNotificationPanel = !$scope.flags.showNotificationPanel, $scope.flags.showNotificationPanel && !lachestra && (lachestra = true, WebServices.updateUser($scope.new_features, $scope.flags.currentUser._id, 'new_features'), $scope.new_features = {}); | |
}, $scope.setTags = function() { | |
var bluporo = {}; | |
var giboki = jQuery('body').clone(); | |
giboki.find('form, script, #Kimonify, .kim-hint, .kim-datatypes').remove(), giboki = giboki.text().toLowerCase().replace(/\W\s/g, ''), giboki.split(' ').forEach(function(heyafem) { | |
var ibisied = 0; | |
var jeelinpuf = ''; | |
heyafem = heyafem.replace(/[ \t\r]+/g, '').trim(), heyafem && ($scope.tagWords[heyafem] ? (ibisied = 1, jeelinpuf = $scope.tagWords[heyafem]) : $scope.tags.indexOf(heyafem) > -1 && (ibisied = 5, jeelinpuf = heyafem), ibisied && (bluporo[jeelinpuf] = bluporo[jeelinpuf] ? bluporo[jeelinpuf] + ibisied : ibisied)); | |
}); | |
var selade = Object.keys(bluporo).sort(function(roohigu, fomoyok) { | |
return bluporo[fomoyok] - bluporo[roohigu]; | |
}); | |
$scope.apiTags = selade.filter(function(flafoflo) { | |
return bluporo[flafoflo] > 5; | |
}).slice(0, 3); | |
}; | |
var dikafos = $timeout(function() { | |
$scope.flags.loading = true; | |
}, 1e3); | |
// In series | |
Kimono_async.seriesFlow([ | |
function (cb) { | |
if (!Utils.looseStringContains(Utils.getTargetUrl(), Config.normalizeWhitelist)) { | |
setTimeout(function() { | |
Selections.normalizeAllTables(); | |
}, 700); | |
} | |
Utils.linkDisable(); | |
$scope.datatypes.push(Datatypes.new(null, 0, 0)); | |
// Initialize the highlight manager to a global scope | |
HighlightManager.init($scope); | |
$scope.datatypeIndex = 0; | |
$scope.updateModel(false); | |
jQuery('div').each(function(quonamue, quebedo) { | |
var nokorat = jQuery(quebedo).css('position'); | |
if ('fixed' == nokorat) { | |
var cluefaqui = parseInt(jQuery(quebedo).css('top')); | |
jQuery(quebedo).css('top', cluefaqui + 45); | |
} | |
}); | |
cb(); | |
}, | |
function (cehokas) { | |
'chrome' == Config.clientEnv ? WebServices.getState().then(function(umaset) { | |
$scope.flags.currentStep = umaset, cehokas(); | |
}, function() { | |
cehokas(true, { | |
err: 'Unable to connect with chrome extension' | |
}); | |
}) : cehokas(); | |
}, | |
function (sugeki) { | |
WebServices.getCurrentUser().then(function(fegosle) { | |
$scope.flags.currentUser = fegosle, sugeki(); | |
}, function() { | |
sugeki(); | |
}); | |
}, | |
function (jukoure) { | |
if ('chrome' == Config.clientEnv) { | |
WebServices.getEditingApi().then(function(shuhishay) { | |
jukoure(false, { | |
activeApi: shuhishay | |
}); | |
}, function() { | |
jukoure(true, { | |
err: 'Unable to connect with chrome extension' | |
}); | |
}); | |
} else { | |
var sotogup = Utils.getUrlParam('editapi'); | |
var nafleela = Utils.getUrlParam('selectedapi'); | |
jukoure(false, { | |
activeApi: sotogup, | |
selectedApi: nafleela | |
}); | |
} | |
}, function(tisrorab, taylaney) { | |
var swipoko = taylaney.activeApi; | |
var disoxieth = taylaney.selectedApi; | |
swipoko && 'null' != swipoko ? ($scope.flags.editing = true, $scope.loadApi(swipoko, tisrorab)) : disoxieth && 'null' != disoxieth ? $scope.loadApi(disoxieth, tisrorab) : tisrorab(); | |
}, function(sihouteet) { | |
'on' == $scope.flags.currentStep && ($scope.reset(), $scope.flags.mode = 'loginMode', $scope.flags.userOverrideCollections = true, $scope.datatypes.push(Datatypes.new(fieture[0], 0, 0)), $scope.datatypes.push(Datatypes.new(fieture[1], 0, 1)), $scope.datatypes.push(Datatypes.new(fieture[2], 0, 2)), $scope.datatypes[0].hide = true, $scope.datatypes[1].hide = true, $scope.datatypes[2].hide = true, $scope.collectionNames[0] = 'Login Info', $scope.updateModel(false)), $scope.showHelp('new_auth'), $scope.showHelp('auth', 0), $scope.showHelp('new_navigation'), sihouteet(); | |
}, function(nulofen) { | |
_.each(Common.blacklist, function(carappak) { | |
Utils.getTargetUrl().match(carappak) && scope.showLargeOverlay('illegal', true); | |
}), nulofen(); | |
}, function(berogfab) { | |
$scope.flags.editing || $scope.setTags(), berogfab(); | |
}, function(cufinu) { | |
$scope.new_features = {}, $scope.allFeatures = [], WebServices.getNotifications().then(function(deetasuep) { | |
if ($scope.allFeatures = deetasuep, $scope.flags.currentUser && $scope.flags.currentUser.new_features) { | |
for (feesifi in $scope.allFeatures) { | |
var banica = $scope.allFeatures[feesifi]._id; | |
'true' != $scope.flags.currentUser.new_features[banica] && $scope.flags.currentUser.new_features[banica] !== true && ($scope.new_features[banica] = true); | |
} | |
} else if ($scope.flags.currentUser) { | |
for (feesifi in $scope.allFeatures) { | |
$scope.new_features[$scope.allFeatures[feesifi]._id] = true; | |
} | |
} | |
cufinu(); | |
}, function() { | |
cufinu(); | |
}); | |
}], function(memakjad, quojoro) { | |
memakjad && console.log('error', quojoro), $timeout.cancel(dikafos), $scope.flags.loading = false, $scope.flags.editing || Utils.getTargetUrl().match(Config.KM_HOST) || Utils.getTargetUrl().match(Config.KM_HOST_WWW) || WebServices.getSiteApis($scope.targetUrl).then(function(sequiru) { | |
sequiru && sequiru.length && '-1' == $scope.flags.currentStep && ($scope.$broadcast('api_panel_launch', sequiru), $scope.flags.showApiPanel = true); | |
}, function() { | |
console.log('Could not load existing APIs'); | |
}); | |
}); | |
}]), angular.module('Kimono').controller('popupController', ['$scope', function($scope) { | |
$scope.show = false, $scope.currentPopup = '', $scope.close = function() { | |
$scope.show = false, $scope.currentPopup = ''; | |
}, $scope.$on('show_popup', function(kooquomi, shuquino) { | |
shuquino.length ? ($scope.show = true, $scope.currentPopup = shuquino) : $scope.close(); | |
}); | |
}]), angular.module('Kimono').controller('rawOverlayController', ['$scope', 'Collections', 'Utils', 'WebServices', 'Common', function($scope, Collections, Utils, WebServices, Common) { | |
$scope.mode = 'json', $scope.enter = function() { | |
$scope.selectedCollection = $scope.collectionNames[0], Collections.updateDatalists($scope.collections), $scope.updateData(); | |
}, $scope.updateData = function() { | |
var cadankul = Common.getJSON($scope.collections, $scope.collectionNames); | |
$scope.json = cadankul, $scope.rss = Common.getRSS(cadankul, 'API Name', Utils.getTargetUrl(), $scope.collectionNames[0]), $scope.csv = Common.getCSV(cadankul, $scope.collections), $scope.table = Common.getTable(cadankul, $scope.collections); | |
}, $scope.clickTableCollection = function(siroyap) { | |
$scope.selectedCollection = siroyap; | |
}, $scope.selectText = function() { | |
var suhito = window.getSelection(); | |
var romukum = document.createRange(); | |
romukum.selectNodeContents(document.getElementsByClassName('kim-code ' + $scope.mode)[0]), suhito.removeAllRanges(), suhito.addRange(romukum); | |
}, $scope.selectCurrentTable = function() { | |
var ikutquul = window.getSelection(); | |
var quegura = document.createRange(); | |
quegura.selectNodeContents(document.querySelectorAll('.kim-container .kim-spreadsheet table')[0]), ikutquul.removeAllRanges(), ikutquul.addRange(quegura); | |
}, $scope.download = function() { | |
var utcetib; | |
utcetib = 'json' == $scope.mode ? JSON.stringify($scope[$scope.mode], null, 2) : $scope[$scope.mode], WebServices.getDownloadFile('rss' == $scope.mode ? 'xml' : $scope.mode, utcetib).then(function(somigog) { | |
window.location.href = somigog; | |
}); | |
}, $scope.openRssInfo = function() { | |
$scope.flags.currentPopup = 'rssInfo'; | |
}, $scope.updateData(); | |
}]), angular.module('Kimono').controller('signupOverlayController', ['$scope', 'Validation', 'Regex', 'WebServices', '$timeout', function($scope, Validation, Regex, WebServices, $timeout) { | |
$scope.signupStep = 1, $scope.form = { | |
name: '', | |
username: '', | |
password: '' | |
}, $scope.signupError = false, $scope.loading = false, $scope.errors = { | |
name: false, | |
username: false, | |
password: false | |
}, $scope.enter = function() { | |
$scope.signupStep = 1, $scope.signupError = false, $scope.errors = { | |
name: false, | |
username: false, | |
password: false | |
}; | |
}, $scope.resetErrors = function() { | |
$scope.signupError = false, $timeout(function() { | |
$scope.errors = { | |
name: false, | |
username: false, | |
password: false | |
}; | |
}, 300); | |
}, $scope.signup = function() { | |
$scope.loading = true; | |
var jademep = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/gim; | |
return '' == $scope.form.name.trim() && ($scope.errors.name = 'Name is required', $scope.signupError = true), '' == $scope.form.username.trim() ? ($scope.errors.email = 'Email is required', $scope.signupError = true) : $scope.form.username.match(jademep) || ($scope.errors.email = 'Please enter a valid email', $scope.signupError = true), '' == $scope.form.password.trim() ? ($scope.errors.password = 'A password is required', $scope.signupError = true) : $scope.form.password.match(/......+/) || ($scope.errors.password = 'Password must be at least 6 characters', $scope.signupError = true), $scope.signupError ? ($scope.loading = false, void 0) : (WebServices.signup($scope.form.name, $scope.form.username, $scope.form.password).then(function(quequeflie) { | |
$scope.loading = false, $scope.signupStep = 2, $scope.flags.currentUser = quequeflie, $timeout(function() { | |
$scope.showLargeOverlay('loginMode' == $scope.flags.mode ? 'auth' : 'done'); | |
}, 2e3); | |
}, function() { | |
$scope.loading = false, $scope.signupError = true; | |
}, function(quiderad) { | |
1 == quiderad && ($scope.loading = true); | |
}), void 0); | |
}; | |
}]), angular.module('Kimono').controller('toolbarController', ['Config', '$scope', 'Datatypes', 'HighlightManager', 'Utils', 'WebServices', '$timeout', 'Common', function(Config, $scope, Datatypes, HighlightManager, Utils, WebServices, $timeout, Common) { | |
var conuedu = ['Username Field', 'Password Field', 'Submit']; | |
$scope.$watch(function() { | |
return $scope.datatypeIndex; | |
}, function(gokehi, flabungar) { | |
Utils.animate(jQuery('.kim-data-dot[kimonodatatype="' + gokehi + '"]'), 'pulse2', 300), $scope.datatypes[flabungar] && $scope.datatypes[gokehi] && 'loginMode' != $scope.flags.mode && (HighlightManager.hideHighlights($scope.datatypes, flabungar), HighlightManager.showHighlights($scope.datatypes, gokehi)); | |
}), $scope.enableLoginMode = function() { | |
'chrome' == Config.clientEnv && (_.each(Common.nosupportlist, function(enkakim) { | |
Utils.getTargetUrl().match(enkakim) && $scope.showLargeOverlay('nosupport', true); | |
}), WebServices.enableAuth()); | |
}, $scope.loginMode = function() { | |
'loginMode' != $scope.flags.mode ? ($scope.reset(), $scope.flags.navigate = false, Utils.linkDisable(), WebServices.changeState('loggingIn'), $scope.flags.currentStep = 'loggingIn', $scope.flags.mode = 'loginMode', $scope.flags.userOverrideCollections = true, $scope.datatypes.push(Datatypes.new(conuedu[0], 0, 0)), $scope.datatypes.push(Datatypes.new(conuedu[1], 0, 1)), $scope.datatypes.push(Datatypes.new(conuedu[2], 0, 2)), $scope.collectionNames[0] = 'Login Info', $scope.changeView('extractor'), $scope.updateModel(false)) : $scope.extractMode(); | |
}, $scope.navigateMode = function() { | |
$scope.flags.navigate ? window.location.reload() : ($scope.flags.mode = 'navigation', Utils.linkEnable(), $scope.flags.navigate = true, HighlightManager.removeAllHighlights($scope.datatypes)); | |
}, $scope.extractMode = function() { | |
'normal' != $scope.flags.mode && ($scope.reset(), $scope.collectionNames[0] = 'collection1', $scope.datatypes.push(Datatypes.new('property1', 0, 0)), $scope.flags.userOverrideCollections = false, $scope.flags.mode = 'normal', WebServices.changeState('-1'), $scope.flags.currentStep = '-1', $scope.changeView('extractor'), $scope.updateModel(false), Utils.linkEnable(), $scope.flags.navigate = false); | |
}, $scope.config = Config, $scope.addDatatype = function() { | |
HighlightManager.hideHighlights($scope.datatypes, $scope.datatypeIndex), Utils.animate(jQuery('.kim-new-datatype'), 'rotateAndMove', 300, function() { | |
$scope.save(), $scope.datatypes.push(Datatypes.new(null, $scope.collections.length, $scope.$parent.datatypes.length)), $scope.changeDatatype($scope.datatypes.length - 1), $scope.updateModel(true); | |
}); | |
}, $scope.keydown = function(jequemil) { | |
9 == jequemil.keyCode && ($scope.changeDatatype(($scope.datatypeIndex + 1) % $scope.datatypes.length), jQuery(jequemil.target).focus(), jequemil.preventDefault(), jequemil.stopPropagation()); | |
}, $scope.doneButtonMessage = function() { | |
return $scope.flags.editing && 'loginMode' != $scope.flags.mode ? 'Save' : 'Done'; | |
}, $scope.doneButtonTitle = function() { | |
return $scope.flags.editing && 'loginMode' != !$scope.flags.mode ? 'Save' : 'Create'; | |
}, $scope.changeDatatype = function(najarpek) { | |
$scope.$parent.datatypeIndex = najarpek; | |
}, $scope.pagination = function() { | |
$scope.datatypes.pagination || ($scope.datatypes.pagination = Datatypes.new('Pagination Link', 'pagination', 'pagination')), $scope.$parent.datatypeIndex = 'pagination'; | |
}, $scope.delete = function(stalokay) { | |
$scope.dataDotUnhover(stalokay), $scope.save(), HighlightManager.removeAllHighlights($scope.datatypes, $scope.datatypeIndex), $scope.$parent.datatypes.splice(stalokay, 1); | |
for (var kugopa = stalokay; | |
kugopa < $scope.datatypes.length; | |
kugopa++) { | |
$scope.$parent.datatypes[kugopa].context.index--; | |
} | |
$scope.$parent.datatypeIndex = $scope.datatypes.length - 1, HighlightManager.updateHighlightsForAllDatatypes($scope.datatypes, true, $scope.flags.mode), HighlightManager.showHighlights($scope.datatypes, $scope.datatypeIndex), $scope.updateModel(false); | |
}, $scope.deletePagination = function() { | |
$scope.flags.hasPagination && ($scope.save(), HighlightManager.removeHighlightsForDatatypeIndex($scope.datatypes, 'pagination'), $scope.$parent.collections.splice($scope.$parent.collections.length - 1, 1), $scope.$parent.collectionNames.splice($scope.$parent.collectionNames.length - 1, 1), $scope.$parent.datatypes.pagination = undefined, $scope.flags.hasPagination = false, $scope.flags.crawlingEnabled = false, $scope.updateModel(), $scope.dataDotUnhover('pagination'), Utils.animate(jQuery('.kim-pagination'), 'pulse2', 300)); | |
}, $scope.done = function() { | |
var hokeque = ''; | |
hokeque = 'loginMode' == $scope.flags.mode ? 'auth' : 'done', $scope.currentUser ? $scope.showLargeOverlay(hokeque) : WebServices.getCurrentUser().then(function(kenekem) { | |
$scope.currentUser = kenekem, $scope.showLargeOverlay(hokeque); | |
}, function() { | |
$scope.showLargeOverlay('login'); | |
}); | |
}; | |
var gidorik; | |
$scope.dataDotHover = function(nupickur) { | |
var dotokan = jQuery('.kim-data-dot[kimonodatatype="' + nupickur + '"]').find('.kim-delete-datatype'); | |
clearTimeout(gidorik), $scope.datatypes.length > 1 && (gidorik = setTimeout(function() { | |
dotokan.css('display', 'block'), setTimeout(function() { | |
dotokan.addClass('visible'); | |
}, 10); | |
}, 400)); | |
}, $scope.paginationHover = function(siesouna) { | |
var nofubit = jQuery('.kim-data-dot[kimonodatatype="' + siesouna + '"]').find('.kim-delete-datatype'); | |
clearTimeout(gidorik), $scope.flags.hasPagination && (gidorik = setTimeout(function() { | |
nofubit.css('display', 'block'), setTimeout(function() { | |
nofubit.addClass('visible'); | |
}, 10); | |
}, 400)); | |
}, $scope.dataDotUnhover = function(kupuque) { | |
clearTimeout(gidorik); | |
var shurege = jQuery('.kim-data-dot[kimonodatatype="' + kupuque + '"]').find('.kim-delete-datatype'); | |
shurege.css('display', 'none'), shurege.removeClass('visible'); | |
}; | |
}]), angular.module('Kimono').controller('userCredentialsOverlayController', ['$scope', 'Validation', 'WebServices', 'HighlightManager', 'Manipulation', function($scope, Validation, WebServices, HighlightManager, Manipulation) { | |
$scope.loginStep = 1, $scope.form = { | |
username: '', | |
password: '' | |
}, $scope.loginError = false, $scope.loading = false, $scope.enter = function() { | |
$scope.loginStep = 1, $scope.loginError = false; | |
}, $scope.login = function() { | |
var nepemam; | |
var phudalee; | |
3 == $scope.datatypes.length && (WebServices.listenForLoad($scope.form.username, $scope.form.password, $scope.datatypes[0].selectorObjects[0].selector, $scope.datatypes[1].selectorObjects[0].selector, $scope.datatypes[2].selectorObjects[0].selector), $scope.showLargeOverlay(''), HighlightManager.removeAllHighlights($scope.datatypes), $scope.flags.clickThroughOverride = true, nepemam = { | |
usernameInput: $scope.datatypes[0].selectorObjects[0].selections[0].element[0], | |
passwordInput: $scope.datatypes[1].selectorObjects[0].selections[0].element[0], | |
submitButton: $scope.datatypes[2].selectorObjects[0].selections[0].element[0] | |
}, phudalee = { | |
username: $scope.form.username, | |
password: $scope.form.password | |
}, callback = function() { | |
$scope.flags.clickThroughOverride = false; | |
}, Manipulation.fillLoginForm(nepemam, phudalee, callback)); | |
}; | |
}]), angular.module('Kimono').directive('animatedHighlight', ['Utils', function() { | |
return { | |
restrict: 'EA', | |
scope: true, | |
link: function(johuklob, marjumarn, deeboku) { | |
var dulcebab = function(satubek) { | |
var bugegis = satubek.clone(); | |
return marjumarn.html(''), bugegis.attr('kimonodatatype', ''), bugegis.attr('kimonotier', ''), bugegis[0].style.opacity = 1, bugegis[0].style.display = 'inline-block', bugegis[0].style.top = 'auto', bugegis[0].style.left = 'auto', bugegis[0].style.position = 'inherit', bugegis[0].style.paddingLeft = '6px', bugegis[0].style.paddingRight = '6px', bugegis.css('transform', ''), bugegis.css('transition-duration', ''), marjumarn.append(bugegis), bugegis; | |
}; | |
var koquidkob = function(cimifo, nekasoo, srohogif) { | |
nekasoo[0].style.opacity = 0, cimifo[0].style.display = 'block', cimifo[0].style.zIndex = 2147483400, setTimeout(function() { | |
var quifila = nekasoo.offset(); | |
var habibo = quifila.top - srohogif.top; | |
var strapouhe = quifila.left - srohogif.left; | |
return 0 == strapouhe && 0 == habibo ? (cimifo.css('opacity', 1), callback(), void 0) : (setTimeout(function() { | |
cimifo.css('transition-duration', '0.4s'), cimifo.css('transform', 'translate3d(' + strapouhe + 'px,' + habibo + 'px, 0px)'), cimifo[0].style.opacity = 1, srohogif.action = setTimeout(function() { | |
cimifo.css('transition-duration', ''), nekasoo[0].style.opacity = 1, cimifo[0].style.display = 'none', cimifo[0].style.zIndex = 21474899; | |
}, 400); | |
}, 0), void 0); | |
}, 0); | |
}; | |
var gadeloo = function(jihege, jefueku, dobeyuf) { | |
setTimeout(function() { | |
var tagotom = jefueku.offset(); | |
var samajoor = tagotom.top - dobeyuf.top; | |
var nekane = tagotom.left - dobeyuf.left; | |
jihege.css('transform', 'translate3d(' + nekane + 'px,' + samajoor + 'px, 0px)'); | |
}, 0); | |
}; | |
var enapcan = function(gouquesan, deeciquen, mojamal) { | |
var tanamuk = 0; | |
(johuklob.datatypeIndex == deeboku.datatypeIndex || johuklob.datatypes[deeboku.datatypeIndex].hide) && (tanamuk = 1), deeciquen[0].style.opacity = 0, gouquesan[0].style.display = 'block', gouquesan[0].style.zIndex = 21474899, setTimeout(function() { | |
gouquesan.css('transition-duration', '0.4s'), gouquesan.css('transform', 'translate3d(0px,0px, 0px)'), gouquesan[0].style.opacity = tanamuk, mojamal.action = setTimeout(function() { | |
gouquesan.css('transition-duration', ''), gouquesan[0].style.opacity = 1, tanamuk || (gouquesan[0].style.display = 'none'), gouquesan[0].style.zIndex = 21474899; | |
}, 400); | |
}, 0); | |
}; | |
johuklob.$watch(function() { | |
return johuklob.flags.currentView; | |
}, function(temifok, sepugot) { | |
if ((temifok != sepugot || 'data' == temifok) && 'raw' != temifok) { | |
var froojebu = jQuery('.kim-highlight[kimonodatatype="' + deeboku.datatypeIndex + '"][kimonotier="0"]').first(); | |
if (froojebu && 0 !== froojebu.length && froojebu.offset()) { | |
var quesbubsas = johuklob.datatypes[deeboku.datatypeIndex].highlightMap[froojebu.attr('kimonoid')]; | |
quesbubsas.action && clearTimeout(quesbubsas.action); | |
var deslinoo = dulcebab(froojebu); | |
johuklob.flags.moveBack[deeboku.datatypeIndex] && !quesbubsas.dontEdit && 'extractor' != temifok && 'simple' == johuklob.mode ? (gadeloo(froojebu, deslinoo, quesbubsas), quesbubsas.dontEdit = true) : quesbubsas.dontEdit || 'data' != temifok || 'simple' != johuklob.mode ? 'extractor' == temifok && quesbubsas.dontEdit && (enapcan(froojebu, deslinoo, quesbubsas), quesbubsas.dontEdit = false, johuklob.flags.moveBack[deeboku.datatypeIndex] = false) : (johuklob.flags.moveBack[deeboku.datatypeIndex] = true, koquidkob(froojebu, deslinoo, quesbubsas), quesbubsas.dontEdit = true); | |
} | |
} | |
}), johuklob.$watch(function() { | |
return johuklob.mode; | |
}, function(jobudif, osmuerub) { | |
if (jobudif != osmuerub && 'data' == johuklob.flags.currentView && 'simple' == jobudif) { | |
var bodosha = jQuery('.kim-highlight[kimonodatatype="' + deeboku.datatypeIndex + '"][kimonotier="0"]').first(); | |
if (bodosha && 0 !== bodosha.length && bodosha.offset()) { | |
var ebastam = johuklob.datatypes[deeboku.datatypeIndex].highlightMap[bodosha.attr('kimonoid')]; | |
ebastam.action && clearTimeout(ebastam.action); | |
var madusur = dulcebab(bodosha); | |
johuklob.flags.moveBack[deeboku.datatypeIndex] = true, koquidkob(bodosha, madusur, ebastam), ebastam.dontEdit || (ebastam.dontEdit = true); | |
} | |
} | |
}); | |
} | |
}; | |
}]), angular.module('Kimono').directive('kmDraggable', ['Collections', 'Utils', function() { | |
return { | |
scope: { | |
axis: '=', | |
start: '=', | |
end: '=', | |
drag: '=' | |
}, | |
restrict: 'EA', | |
link: function(nanojed, strefufo) { | |
var reehathtoul = new Draggabilly2(strefufo[0], { | |
axis: nanojed.axis | |
}); | |
reehathtoul.on('dragStart', nanojed.start || function() {}), reehathtoul.on('dragEnd', nanojed.end || function() {}), reehathtoul.on('dragMove', nanojed.drag || function() {}); | |
} | |
}; | |
}]), angular.module('Kimono').directive('kmClickOutside', ['Utils', function() { | |
return { | |
restrict: 'A', | |
link: function(cudalem, quenihe, quesheyar) { | |
quenihe.bind('click', function(demeque) { | |
demeque.stopPropagation(), demeque.preventDefault(); | |
}), jQuery(document).on('click', function() { | |
cudalem.$apply(quesheyar.kmClickOutside); | |
}); | |
} | |
}; | |
}]), angular.module('Kimono').directive('kmFade', ['Utils', function() { | |
return { | |
replace: true, | |
restrict: 'A', | |
link: function(daluqua, moukohif, raribeck) { | |
moukohif.css('display', 'none'); | |
var ceguco = parseFloat(raribeck.opacity) || 1; | |
var suehube = raribeck.delay || '0'; | |
var kikobop = raribeck.duration || raribeck.enterDuration || '100'; | |
var rerojoy = raribeck.duration || raribeck.leaveDuration || '100'; | |
var edetep = raribeck.translateVector || '(0, 0, 0)'; | |
var socifep = (moukohif.width(), edetep || raribeck.transition ? 'all' : 'opacity'); | |
daluqua.$watch(raribeck.kmFade, function(bimefo) { | |
return bimefo && raribeck.kmEnter && daluqua[raribeck.kmEnter](), !bimefo && raribeck.kmLeave && daluqua[raribeck.kmLeave](), bimefo && raribeck.kmIn ? (setTimeout(function() { | |
moukohif.css('opacity', '0'), moukohif.css('display', raribeck.display || 'block'), setTimeout(function() { | |
moukohif.css('transition-duration', kikobop + 'ms'), moukohif.css('transition-property', socifep), moukohif.css('opacity', ceguco), edetep && (moukohif.css('transition-timing-function', 'ease-out'), moukohif.css('-webkit-transform', 'translate3d' + edetep), moukohif.css('transform', 'translate3d' + edetep)), 'slide-left' == raribeck.transition && moukohif.css('margin-left', '0'), setTimeout(function() { | |
moukohif.css('opacity', ''), moukohif.css('margin', ''), moukohif.css('transition-duration', ''), moukohif.css('transition-timing-function', ''), moukohif.css('transition-property', ''); | |
}, parseInt(kikobop)); | |
}, 25); | |
}, parseInt(suehube)), void 0) : !bimefo && raribeck.kmOut ? (moukohif.css('transition-duration', rerojoy + 'ms'), moukohif.css('transition-property', socifep), moukohif.css('opacity', '0'), edetep && (moukohif.css('-webkit-transform', 'translate3d(0,0,0)'), moukohif.css('transform', 'translate3d(0,0,0)')), 'slide-left' == raribeck.transition && moukohif.css('margin-left', '-30px'), setTimeout(function() { | |
moukohif.css('display', 'none'), moukohif.css('opacity', ''), moukohif.css('transition-duration', ''), edetep && (moukohif.css('-webkit-transform', ''), moukohif.css('transform', '')), moukohif.css('transition-property', ''); | |
}, parseInt(rerojoy)), void 0) : (moukohif.css('display', bimefo ? '' : 'none'), void 0); | |
}); | |
} | |
}; | |
}]), angular.module('Kimono').directive('kmPages', [function() { | |
return { | |
compile: function(saquoque, boopema) { | |
var boruruk = boopema.duration || '300ms'; | |
var jaseshik = boopema.width || 0; | |
var rujeklik = function(hufifil) { | |
hufifil.css({ | |
'-webkit-transform': 'translate3d(-' + jaseshik + 'px, 0, 0)', | |
transform: 'translate3d(0, 0, 0)', | |
transition: 'all ' + boruruk, | |
'-webkit-transition': 'all ' + boruruk | |
}), setTimeout(function() { | |
hufifil.css({ | |
'-webkit-transform': '', | |
transform: '', | |
transition: '', | |
'-webkit-transition': '' | |
}); | |
}, parseInt(boruruk)); | |
}; | |
var yafitha = function(hoolhabdror, cadazuek) { | |
hoolhabdror.css({ | |
'-webkit-transform': 'translate3d(-' + jaseshik + 'px, 0, 0)', | |
transform: 'translate3d(-' + jaseshik + 'px, 0, 0)' | |
}), cadazuek && (hoolhabdror.css({ | |
transition: 'all ' + boruruk, | |
'-webkit-transition': 'all ' + boruruk | |
}), setTimeout(function() { | |
hoolhabdror.css({ | |
transition: '' | |
}); | |
}, parseInt(boruruk))); | |
}; | |
var orubom = {}; | |
return _.each(boopema.pages.split(/\s*,\s*/), function(jefnoustam, koragin) { | |
orubom[jefnoustam] = { | |
element: saquoque.find(jefnoustam), | |
index: koragin | |
}, orubom[jefnoustam].element.css({ | |
position: 'absolute', | |
left: jaseshik, | |
'-webkit-transform': 'translate3d(' + (koragin > 0 ? 0 : -1 * jaseshik) + 'px, 0, 0)', | |
transform: 'translate3d(' + (koragin > 0 ? 0 : -1 * jaseshik) + 'px, 0, 0)' | |
}); | |
}), function(padopa) { | |
padopa[boopema.currentPage] = _.keys(orubom)[0], padopa.$watch(boopema.currentPage, function(dilode, quacebuek) { | |
dilode != quacebuek && 'undefined' != typeof orubom[dilode] && (orubom[dilode].index > orubom[quacebuek].index ? (yafitha(orubom[dilode].element, true), setTimeout(function() { | |
rujeklik(orubom[quacebuek].element); | |
}, parseInt(boruruk))) : (yafitha(orubom[dilode].element), rujeklik(orubom[quacebuek].element))); | |
}); | |
}; | |
} | |
}; | |
}]), angular.module('Kimono').directive('kmPanel', ['Utils', function() { | |
return { | |
compile: function(quajamo, jubouji) { | |
var kederu = jubouji.width || 300; | |
var rikayek = jubouji.height || 500; | |
var igonad = jubouji.offset || 0; | |
var cetojop = jubouji.duration || '0.3s'; | |
var odoyoup = jubouji.translate || '(0, ' + (-1 * rikayek + parseInt(igonad)) + 'px, 0)'; | |
var fateguk = jubouji.showToggle; | |
var ayubay = {}; | |
jubouji.pages && _.each(jubouji.pages.split(/\s*,\s*/), function(pukuloo, reyutu) { | |
ayubay[pukuloo] = { | |
elem: quajamo.find(pukuloo), | |
index: reyutu | |
}; | |
var gidopuk = jubouji.intialPageCss || {}; | |
gidopuk.width = kederu, gidopuk.position = 'absolute', ayubay[pukuloo].elem.css(gidopuk); | |
}); | |
var medida = function(dajiro) { | |
return dajiro ? dajiro + 'px' : void 0; | |
}; | |
return quajamo.css({ | |
transition: 'all ' + cetojop, | |
'-webkit-transition': 'all ' + cetojop, | |
width: kederu || '300', | |
height: rikayek || '500', | |
position: jubouji.position || 'fixed', | |
left: medida(jubouji.left) || '', | |
right: medida(jubouji.right) || '20px', | |
top: medida(jubouji.top) || '', | |
bottom: medida(jubouji.bottom) || medida(-1 * rikayek + parseInt(igonad)), | |
transform: 'translate3d(0, 0, 0)', | |
'-webkit-transform': 'translate3d(0, 0, 0)' | |
}), { | |
post: function(boluploo, bikoke) { | |
boluploo.$watch(fateguk, function(limedoog) { | |
limedoog ? bikoke.css({ | |
transform: 'translate3d' + odoyoup, | |
'-webkit-transform': 'translate3d' + odoyoup | |
}) : bikoke.css({ | |
transform: 'translate3d(0, 0, 0)', | |
'-webkit-transform': 'translate3d(0, 0, 0)' | |
}); | |
}); | |
} | |
}; | |
} | |
}; | |
}]), angular.module('Kimono').directive('kmSelector', ['Collections', 'Utils', '$compile', '$timeout', function(Collections, Utils, $compile, $timeout) { | |
return { | |
restrict: 'A', | |
replace: true, | |
link: function(linupu, jujeja, galugi) { | |
var etedes = 'filter:kmCurrentInput:startsWith | filter:notSelectedTag | orderBy:\'toString()\''; | |
var nakequa = jujeja.find('input').clone(); | |
var resolo = jQuery('<div></div>'); | |
linupu.currentInput = '', linupu.kmSelectedItems = [], linupu.itemIdx = 0, linupu.isVisible = false, linupu.startsWith = Utils.startsWith, galugi.kmModel && (linupu.$watch(galugi.kmModel, function() { | |
linupu.kmSelectedItems = linupu[galugi.kmModel]; | |
}), linupu.$watch(linupu.kmSelectedItems, function() { | |
linupu.kmSelectedItems.length && (linupu[galugi.kmModel] = linupu.kmSelectedItems); | |
})), linupu.notSelectedTag = function(mamuli) { | |
return -1 == linupu.kmSelectedItems.indexOf(mamuli); | |
}, linupu.toggleVisible = function(ilnekrun) { | |
ilnekrun ? (jujeja.find('input').addClass('open'), $timeout(function() { | |
linupu.isVisible = ilnekrun; | |
}, 300)) : ($timeout(function() { | |
jujeja.find('input').removeClass('open'); | |
}, 300), linupu.isVisible = ilnekrun); | |
}, linupu.getStyles = function(pojuka) { | |
var batapon = ['#f2ea00', '#ebce13', '#f0aa14', '#f08630', '#f07a60', '#ee78f0', '#bd90f0', '#9092f0', '#7fbadc', '#90f0e3', '#91d271', '#c5f060', '#ccaa73', '#a28057', '#c0c1c7', '#939499']; | |
return pojuka == linupu.itemIdx ? { | |
color: 'black', | |
background: batapon[linupu.kmSelectedItems.length % batapon.length] | |
} : {}; | |
}, linupu.getListLength = function() { | |
return jQuery('.km-selector-scroller').find('li').length - 1; | |
}, linupu.getItemContent = function(bebetgour) { | |
return bebetgour.find('span').html(); | |
}, linupu.handleMouseOver = function(lekaypel) { | |
linupu.itemIdx = lekaypel; | |
}, linupu.handleKeyDown = function(aletap) { | |
var farikag = [9, 13, 38, 40]; | |
farikag.indexOf(aletap.keyCode) >= 0 ? 13 == aletap.keyCode || 9 == aletap.keyCode ? (selected = jujeja.find('.selectedItem'), selected.length && (linupu.addItem(selected), linupu.itemIdx = 0, linupu.kmCurrentInput = '')) : 38 == aletap.keyCode && linupu.itemIdx > 0 ? (linupu.itemIdx -= 1, linupu.adjustScrollPos()) : 40 == aletap.keyCode && linupu.itemIdx < linupu.getListLength() && (linupu.itemIdx += 1, linupu.adjustScrollPos()) : linupu.itemIdx = 0; | |
}, linupu.adjustScrollPos = function() { | |
var udinon = jujeja.find('.km-selector-scroller'); | |
var rutiftog = udinon.scrollTop(); | |
var magine = udinon.outerHeight(); | |
var jiswooko = udinon.find('li').first(); | |
var brekoklel = jiswooko.outerHeight(); | |
var lesisu = parseInt(jiswooko.parent().css('marginTop')); | |
var cuhaho = linupu.itemIdx * brekoklel + lesisu; | |
cuhaho >= magine + rutiftog ? udinon[0].scrollTop += brekoklel : rutiftog >= cuhaho && (udinon[0].scrollTop -= brekoklel); | |
var lisigi = jujeja[0].style.display; | |
jujeja[0].style.display = 'none'; | |
jujeja[0].offsetHeight; | |
jujeja[0].style.display = lisigi; | |
}, linupu.handleItemClick = function(rerquober) { | |
linupu.addItem(jQuery(rerquober.currentTarget)); | |
}, linupu.focusInput = function() { | |
jujeja.find('input').first().focus(); | |
}, linupu.blurInput = function() { | |
jujeja.find('input').first().blur(); | |
}, linupu.addItem = function(lepikug) { | |
-1 == linupu.kmSelectedItems.indexOf(linupu.getItemContent(lepikug)) && linupu.kmSelectedItems.push(linupu.getItemContent(lepikug)), linupu.blurInput(), linupu.toggleVisible(false); | |
}, linupu.removeItem = function(dasieku) { | |
var hepoolu = linupu.kmSelectedItems.indexOf(dasieku); | |
hepoolu > -1 && linupu.kmSelectedItems.splice(hepoolu, 1); | |
}, jujeja.find('input').remove(); | |
var resolo = jQuery('<div></div>'); | |
resolo.css({ | |
position: 'relative', | |
outline: 'none', | |
clear: 'both' | |
}); | |
var meepruelum = jQuery('<ul class="km-selector-scrollitems" style="display: block; overflow:hidden"></ul>'); | |
var quequodeb = jQuery('<div class="km-selector-scroller" ng-class="{ open:isVisible }"></div>'); | |
quequodeb.css({ | |
position: 'absolute', | |
left: 0, | |
top: '22px', | |
width: '100%', | |
'overflow-y': 'scroll', | |
margin: 0, | |
outline: 'none' | |
}); | |
var igubonk = jQuery('<li><span style="padding: 8px 10px;">{{ item }}</span></li>'); | |
igubonk.attr({ | |
'ng-repeat': 'item in ' + galugi.kmItems + ' | ' + etedes, | |
'ng-style': 'getStyles($index)', | |
'ng-class': '{ selectedItem:$index == itemIdx }', | |
'ng-click': 'handleItemClick($event)', | |
'ng-mouseover': 'handleMouseOver($index)' | |
}), meepruelum.append(igubonk), quequodeb.append(meepruelum); | |
var dipelob = jQuery('<div></div>'); | |
dipelob.css({ | |
display: 'inline-block', | |
position: 'absolute', | |
margin: 0, | |
width: '150px' | |
}), dipelob.attr({ | |
'km-click-outside': 'toggleVisible(false)', | |
'ng-hide': galugi.kmHide | |
}); | |
var nulanfik = jQuery('<div class="km-selector-selected-container"></div>'); | |
var nelesie = jQuery('<div><a href="" ng-click="removeItem(item)" class="km-selector-remove-item" ></a>{{ item }}</div>'); | |
nelesie.attr({ | |
'class': 'km-selector-selected kim-{{ getColor($index) }}', | |
'ng-repeat': 'item in kmSelectedItems' | |
}), nulanfik.append(nelesie), nakequa.attr({ | |
'ng-model': 'kmCurrentInput', | |
'ng-class': '{ \'no-items\':kmSelectedItems.length == 0}', | |
'ng-click': 'toggleVisible(true)', | |
'ng-keydown': 'handleKeyDown($event)' | |
}), nakequa.css({ | |
display: 'inline-block', | |
'min-width': 0 | |
}), dipelob.append(nakequa), dipelob.append(quequodeb), nulanfik.append(dipelob), resolo.append(nulanfik), $compile(resolo)(linupu), resolo.appendTo(jujeja); | |
} | |
}; | |
}]), angular.module('Kimono').directive('kmShow', [function() { | |
return { | |
replace: true, | |
restrict: 'A', | |
link: function(edoshem, querike, ugabquik) { | |
edoshem.$watch(ugabquik.kmShow, function(queguni) { | |
queguni && ugabquik.kmBeforeEnter && edoshem[ugabquik.kmBeforeEnter](querike), !queguni && ugabquik.kmBeforeLeave && edoshem[ugabquik.kmBeforeLeave](querike), querike.css('display', queguni ? '' : 'none'), queguni && ugabquik.kmAfterEnter && edoshem[ugabquik.kmAfterEnter](querike), !queguni && ugabquik.kmAfterLeave && edoshem[ugabquik.kmAfterLeave](querike); | |
}); | |
} | |
}; | |
}]), angular.module('Kimono').directive('kmLoading', ['$compile', function() { | |
return { | |
compile: function(gugineze, sehasep) { | |
var deektafob = Math.min(sehasep.width, 500) / 20; | |
var dislohou = 2 * deektafob / 3; | |
var ficrujoo = deektafob / 3; | |
var baredi = sehasep.top || '30%'; | |
var lechingek = sehasep.fontSize || '18'; | |
var cucuetap = sehasep.message || 'Loading Awesomeness'; | |
var dateque = '<div km-fade="' + sehasep.model + '" km-in="true" km-out="true" enter-duration="0" leave-duration="300" class="kim-loading"> <div style="top:' + baredi + ';" class="dot-container"> <div style="font-size:' + lechingek + 'px;" class="kim-message">' + cucuetap + '</div> <div class="dot dot1 kim-yellow"></div> <div class="dot dot2 kim-amber"></div> <div class="dot dot3 kim-orange"></div> <div class="dot dot4 kim-sunset"></div> <div class="dot dot5 kim-red"></div> <div class="dot dot6 kim-fuchsia"></div> <div class="dot dot7 kim-purple"></div> <div class="dot dot8 kim-indigo"></div> <div class="dot dot9 kim-blue"></div> <div class="dot dot10 kim-green"></div> </div> </div>'; | |
return gugineze.append(dateque), gugineze.find('.dot').css({ | |
width: dislohou + 'px', | |
height: dislohou + 'px', | |
margin: '0 ' + ficrujoo + 'px 0 0' | |
}), function() {}; | |
} | |
}; | |
}]), angular.module('Kimono').value('kimonoList', {}), angular.module('Kimono').directive('kmRepeat', ['$parse', '$animate', '$rootScope', 'kimonoList', function($parse, $animate, $rootScope, kimonoList) { | |
function hufrenof(siboga) { | |
var kecena; | |
var lepigu = typeof siboga; | |
return 'object' == lepigu && null !== siboga ? 'function' == typeof (kecena = siboga.$$hashKey) ? kecena = siboga.$$hashKey() : kecena === undefined && (kecena = siboga.$$hashKey = lupechuf()) : kecena = siboga, lepigu + ':' + kecena; | |
} | |
function jidethfenk(ukuflek) { | |
return ukuflek && ukuflek.document && ukuflek.location && ukuflek.alert && ukuflek.setInterval; | |
} | |
function lupechuf() { | |
for (var tupacu, gabehoo = kriquebap.length; | |
gabehoo; | |
) { | |
if (gabehoo--, tupacu = kriquebap[gabehoo].charCodeAt(0), 57 == tupacu) { | |
return kriquebap[gabehoo] = 'A', kriquebap.join(''); | |
} | |
if (90 != tupacu) { | |
return kriquebap[gabehoo] = String.fromCharCode(tupacu + 1), kriquebap.join(''); | |
} | |
kriquebap[gabehoo] = '0'; | |
} | |
return kriquebap.unshift('0'), kriquebap.join(''); | |
} | |
function hueyhigon(hofpelusk) { | |
if (null == hofpelusk || jidethfenk(hofpelusk)) { | |
return false; | |
} | |
var butado = hofpelusk.length; | |
return 1 === hofpelusk.nodeType && butado ? true : angular.isArray(hofpelusk) || !angular.isFunction(hofpelusk) && (0 === butado || 'number' == typeof butado && butado > 0 && butado - 1 in hofpelusk); | |
} | |
var flipedu = '$$NG_REMOVED'; | |
var prieveefe = 'err'; | |
var kriquebap = ['0', '0', '0']; | |
var kooreeglu = window.list_id = function() { | |
var fesnate = 0; | |
return function() { | |
return 'list_' + ++fesnate; | |
}; | |
}(); | |
return { | |
transclude: 'element', | |
priority: 1e3, | |
terminal: true, | |
compile: function(yieboudrag, kilace, lefafri) { | |
return function(bistackat, cusuco, quogiteer) { | |
var shacite; | |
var quifukra; | |
var susabus; | |
var flomabo; | |
var gamurmeg; | |
var meemupoum; | |
var lufugar; | |
var quifemod; | |
var quetarnmos; | |
var simura = quogiteer.kmRepeat; | |
var nucuba = simura.match(/^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/); | |
var jososgeeg = { | |
$id: hufrenof | |
}; | |
if (!nucuba) { | |
throw prieveefe('iexp', 'Expected expression in form of \'_item_ in _collection_[ track by _id_]\' but got \'{0}\'.', simura); | |
} | |
if (meemupoum = nucuba[1], lufugar = nucuba[2], shacite = nucuba[4], shacite ? (quifukra = $parse(shacite), susabus = function(piepino, decrase, jeprieru) { | |
return quetarnmos && (jososgeeg[quetarnmos] = piepino), jososgeeg[quifemod] = decrase, jososgeeg.$index = jeprieru, quifukra(bistackat, jososgeeg); | |
}) : (flomabo = function(guequaswa, gemupu) { | |
return hufrenof(gemupu); | |
}, gamurmeg = function(apimin) { | |
return apimin; | |
}), nucuba = meemupoum.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/), !nucuba) { | |
throw prieveefe('iidexp', '\'_item_\' in \'_item_ in _collection_\' should be an identifier or \'(_key_, _value_)\' expression, but got \'{0}\'.', meemupoum); | |
} | |
quifemod = nucuba[3] || nucuba[1], quetarnmos = nucuba[2]; | |
var safisir = {}; | |
var pelorun = quogiteer.kmList || kooreeglu(); | |
var nofili = function(gogedouk) { | |
var dusoquo; | |
var rayolal; | |
var kodadi; | |
var usoboom; | |
var lasesle; | |
var cafila; | |
var pekuxep; | |
var pugeli; | |
var drighoblus; | |
var leesulu; | |
var bakikro = cusuco[0]; | |
var ganoque = {}; | |
var ekonep = []; | |
if (hueyhigon(gogedouk)) { | |
drighoblus = gogedouk, susabus = susabus || flomabo; | |
} else { | |
susabus = susabus || gamurmeg, drighoblus = []; | |
for (cafila in gogedouk) { | |
gogedouk.hasOwnProperty(cafila) && '$' != cafila.charAt(0) && drighoblus.push(cafila); | |
} | |
drighoblus.sort(); | |
} | |
for (usoboom = drighoblus.length, rayolal = ekonep.length = drighoblus.length, dusoquo = 0; | |
rayolal > dusoquo; | |
dusoquo++) { | |
if (cafila = gogedouk === drighoblus ? dusoquo : drighoblus[dusoquo], pekuxep = gogedouk[cafila], pugeli = susabus(cafila, pekuxep, dusoquo), safisir.hasOwnProperty(pugeli)) { | |
leesulu = safisir[pugeli], | |
delete safisir[pugeli] | |
, ganoque[pugeli] = leesulu, ekonep[dusoquo] = leesulu; | |
} else { | |
if (ganoque.hasOwnProperty(pugeli)) { | |
throw angular.forEach(ekonep, function(bafrogenk) { | |
bafrogenk && bafrogenk.startNode && (safisir[bafrogenk.id] = bafrogenk); | |
}), prieveefe('dupes', 'Duplicates in a repeater are not allowed. Use \'track by\' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}', simura, pugeli); | |
} | |
ekonep[dusoquo] = { | |
id: pugeli | |
}, ganoque[pugeli] = false; | |
} | |
} | |
for (cafila in safisir) { | |
safisir.hasOwnProperty(cafila) && (leesulu = safisir[cafila], $animate.leave(leesulu.elements), bistackat[kilace.kmLeave] && bistackat[kilace.kmLeave](leesulu.elements), angular.forEach(leesulu.elements, function(matieho) { | |
matieho[flipedu] = true; | |
}), leesulu.scope.$destroy()); | |
} | |
for (dusoquo = 0, rayolal = drighoblus.length; | |
rayolal > dusoquo; | |
dusoquo++) { | |
if (cafila = gogedouk === drighoblus ? dusoquo : drighoblus[dusoquo], pekuxep = gogedouk[cafila], leesulu = ekonep[dusoquo], leesulu.startNode) { | |
lasesle = leesulu.scope, kodadi = bakikro; | |
do { | |
kodadi = kodadi.nextSibling; | |
} while (kodadi && kodadi[flipedu]); | |
leesulu.startNode == kodadi || ($animate.move(leesulu.elements, null, angular.element(bakikro)), bistackat[kilace.kmMove] && bistackat[kilace.kmMove](leesulu.elements, null, angular.element(bakikro))), bakikro = leesulu.endNode; | |
} else { | |
lasesle = bistackat.$new(); | |
} | |
lasesle[quifemod] = pekuxep, quetarnmos && (lasesle[quetarnmos] = cafila), lasesle.$index = dusoquo, lasesle.$first = 0 === dusoquo, lasesle.$last = dusoquo === usoboom - 1, lasesle.$middle = !(lasesle.$first || lasesle.$last), lasesle.$odd = !(lasesle.$even = dusoquo % 2 == 0), leesulu.startNode || (lefafri(lasesle, function(cupatquad) { | |
$animate.enter(cupatquad, null, angular.element(bakikro)), bistackat[kilace.kmEnter] && bistackat[kilace.kmEnter](cupatquad), bakikro = cupatquad, leesulu.scope = lasesle, leesulu.startNode = cupatquad[0], leesulu.elements = cupatquad, leesulu.endNode = cupatquad[cupatquad.length - 1], ganoque[leesulu.id] = leesulu; | |
}), '$digest' !== $rootScope.$$phase && '$digest' !== lasesle.$$phase && lasesle.$digest()); | |
} | |
safisir = ganoque; | |
}; | |
kimonoList[pelorun] = nofili, 'medium' == kilace.type && bistackat.$watchCollection(lufugar, nofili), bistackat.$watch(lufugar, nofili); | |
}; | |
} | |
}; | |
}]), angular.module('Kimono').directive('kmSticky', ['$timeout', function($timeout) { | |
return { | |
link: function(nutaped, sotepa, dakibried) { | |
$timeout(function() { | |
var fuqueri = dakibried.scrollableArea || '#Kimonify'; | |
var uminkfad = jQuery(fuqueri); | |
var ulniguck = sotepa.parent(); | |
var janopmask = parseInt(dakibried.offset) || 0; | |
sotepa.css({ | |
position: 'absolute', | |
top: '0px', | |
width: '100%' | |
}), ulniguck.css({ | |
position: 'relative', | |
paddingTop: sotepa.height() + 4 + 'px' | |
}), uminkfad.on('scroll', function() { | |
var soulnigast = { | |
top: ulniguck.position().top - janopmask | |
}; | |
soulnigast.bottom = soulnigast.top + ulniguck.height(), sotepa.css('-webkit-transform', 'translate3d(0, ' + Math.min(Math.max(-1 * soulnigast.top, 0), ulniguck.height()) + 'px, 0)'), sotepa.css('transform', 'translate3d(0, ' + Math.min(Math.max(-1 * soulnigast.top, 0), ulniguck.height()) + 'px, 0)'); | |
}); | |
}, 0); | |
} | |
}; | |
}]), angular.module('Kimono').filter('groupby', ['$filter', function($filter) { | |
return function() { | |
var args = Array.prototype.slice.call(arguments, 0); | |
var cististur = args.shift(); | |
var tuneskur = args.shift(); | |
return _.keys(_.groupBy(cististur, function(arklemig) { | |
return _.reduce(args, function(zeliru, nametep) { | |
var kevogi = nametep.slice(1); | |
return kevogi.unshift(zeliru), $filter(nametep[0]).apply(this, kevogi); | |
}, arklemig[tuneskur]); | |
})); | |
}; | |
}]), angular.module('Kimono').filter('keys', function() { | |
return function(obj) { | |
return _.keys(obj); | |
}; | |
}), angular.module('Kimono').filter('limit', function() { | |
return function(bufati, rupoeyut) { | |
return 'undefined' == typeof bufati ? '' : bufati.length > rupoeyut ? bufati.substring(0, rupoeyut) + '...' : bufati; | |
}; | |
}), angular.module('Kimono').filter('plural', ['$filter', function() { | |
return function(cokumaln, ackackrum) { | |
return ackackrum > 1 && 's' == _.last(cokumaln) ? cokumaln + '\'' : ackackrum > 1 ? cokumaln + 's' : cokumaln; | |
}; | |
}]), angular.module('Kimono').filter('replace', function() { | |
return function(str, regexStr, replacement) { | |
if ('string' == typeof regexString) { | |
var regex = new RegExp(regexString, 'g'); | |
} else { | |
var regex = regexStr; | |
} | |
return str.replace(regex, replacement); | |
}; | |
}), angular.module('Kimono').filter('reverse', function() { | |
return function(arr) { | |
return arr.slice().reverse(); | |
}; | |
}), angular.module('Kimono').filter('size', function() { | |
return function(arr) { | |
return _.size(arr); | |
}; | |
}), jQuery('.kim-script, .kim-link').appendTo('head'); | |
var $mainController = jQuery([ | |
'<div id="Kimonify" dir="ltr" class="xs-hidden" ng-controller="mainController" km-loading font-size="28" model="flags.loading">', | |
'</div>' | |
].join('')); | |
$mainController.append('<div ng-controller="largeOverlayController" id="kim-Large-Overlay" class="kim" km-fade="show" km-in="true" km-out="true" opacity="0.95"> <h1><a href="" ng-click="link(\'http://kimonolabs.com/\')">kimono<span>labs</span></a></h1> <button ng-if="backButton" ng-click="close()" class="kim-close-button kim kim-button" style="display: inline-block;" ng-hide="flags.hideBackButton">Back</button> <!-- Done Overlay --> <div ng-controller="doneOverlayController" id="kim-DoneOverlay" km-enter="enter" km-in="true" km-fade="currentOverlay == \'done\'" class="kim-button-container" opacity="0.95"> <div km-fade="doneStep == 1" km-in="true" km-out="true" duration="500" class="kim-step-1"> <p class="kim-done-form-title" style="display: block;">Enter your API details</p> <div id="kim-DoneForm" name="createApiForm" novalidate style="display: block; top: 153px;"> <input type="text" ng-model="apiName" id="kim-APIName" name="apiName" ng-keyup="keyUpInApiNameField($event)" placeholder="API name" ng-keydown="error = false;"> <div class="kim-TagsSelector" km-selector km-items="tags" km-model="apiTags" km-hide="apiTags.length >= 5" > <span ng-hide="apiTags.length || isVisible" class="kim-tags-reminder">Add tags</span> <input type="text" id="kim-APITags" name="apiTag"></input> </div> <div class="kim-api-config"> <select id="kim-Frequency" name="crawlFrequency" ng-model="selectedFrequency" ng-options="i.id as utils.displayFrequency(i.id, flags.hasPagination) for i in frequencies | filter:filterFrequencies"></select> <select ng-show="flags.hasPagination" ng-model="selectedCrawlLimit" ng-options="i.id as utils.displayCrawlLimit(i.id) for i in crawlLimits" id="kim-CrawlLimit" name="limit"></select> </div> <div> <input type="submit" ng-click="createApi()" ng-disabled="loading" class="kim-create-api-button kim kim-button" value="{{createApiButtonLabel()}}"> <span class="kim-spinner" ng-show="loading"></span> </div> <div class="kim-error-container" km-fade="error" km-in="true" km-out="true"> <p class="kim-api-form-error">{{errorMessage}}</p> </div> </div> </div> <div km-fade="doneStep == 2" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> <p class="kim" id="kim-APIResponseMessage">API <span class="kim-created-updated">{{createdOrUpdated()}}</span>, Bam! Check it out at <a class="kim-api-link" href="" ng-click="link(config.KM_HOST_WWW + \'/apis/\' + apiID)">/apis/{{apiID}}</a>.</p> </div> <div km-fade="doneStep == -1" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> <p class="kim" id="kim-APIResponseMessage">Sorry. Something went wrong and we couldn\'t create an API from this page. A bug report has been created.</p> </div> </div> <!-- Illegal Overlay --> <div ng-controller="illegalOverlayController" id="kim-IllegalOverlay" km-enter="enter" km-in="true" km-fade="currentOverlay == \'illegal\'" class="kim-button-container" opacity="0.95"> <div class="kim-step-2"> <p class="kim" id="kim-APIResponseMessage">Sorry. Due to the policy of this target domain we cannot extract data from this site.</p> </div> </div> <!-- No Support Overlay --> <div id="kim-NoSupportOverlay" km-in="true" km-out="true" km-fade="currentOverlay == \'nosupport\'" class="kim-button-container" opacity="0.95"> <div class="kim-step-2"> <p class="kim" id="kim-APIResponseMessage">Sorry. Our auth feature is incompatible with this site, check back often on our <a href="" ng-click="followLink(\'http://blog.kimonolabs.com/\')" >blog</a> for updates.</p> </div> </div> <!-- Login Overlay Overlay --> <div ng-controller="loginOverlayController" id="kim-LoginOverlay" km-enter="enter" leave-duration="500" km-in="true" km-out="true" km-fade="currentOverlay == \'login\'" class="kim-button-container" opacity="0.95"> <div km-fade="loginStep == 1" km-in="true" km-out="true" duration="500" class="kim-step-1"> <form id="kim-LoginForm" name="kmLoginForm" novalidate> <p>You must log in first:</p> <input ng-model="form.username" ng-keydown="loginError = false;" type="text" name="email" id="kim-LoginEmail" placeholder="email"> <input ng-model="form.password" ng-keydown="loginError = false;" type="password" name="password" id="kim-LoginPassword" placeholder="password"> <button ng-click="login()" class="kim-login-button kim kim-button">Login</button> <span km-fade="loading" ng-show="loading" class="kim-spinner"></span> <span class="kim kim-login-trouble">Having trouble? <a href="" ng-click="link(config.KM_HOST_WWW + \'/forgotpassword\')">Forgot password</a></span> <div km-fade="loginError" km-in="true" km-out="true" class="kim-error-container"> <p class="kim-login-error">Incorrect email/password combination. Try again.</p> </div> </form> <div><p>Or you can <span class="kim kim-signup"><a href="" ng-click="showLargeOverlay(\'signup\')">signup here</a></span></p></div> </div> <div km-fade="loginStep == 2" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> <p style="text-align:center">Login successful</p> </div> </div> <!-- Signup Overlay --> <div ng-controller="signupOverlayController" id="kim-LoginOverlay" km-enter="enter" km-in="true" delay="500" duration="500" km-fade="currentOverlay == \'signup\'" class="kim-button-container" opacity="0.95"> <div km-fade="signupStep == 1" km-in="true" km-out="true" duration="500" class="kim-step-1"> <form id="kim-LoginForm" class="kim-signup" name="kmSignupForm" novalidate> <p>Signup for Kimono<span style="vertical-align:super; font-size:10px;">BETA</span></p> <input ng-model="form.name" ng-keydown="resetErrors()" type="text" name="name" id="kim-SignupName" placeholder="name"> <input ng-model="form.username" ng-keydown="resetErrors()" type="text" name="email" id="kim-SignupEmail" placeholder="email"> <input ng-model="form.password" ng-keydown="resetErrors()" type="password" name="password" id="kim-SignupPassword" placeholder="password"> <button ng-click="signup()" class="kim-signup-button kim kim-button">Signup</button> <p class="kim-helper-text">By signing up, you are agreeing to our <br/><a href="" ng-click="link(config.KM_HOST_WWW + \'/terms\')" target="_self">Terms of service</a> and <a href="" ng-click="link(config.KM_HOST_WWW + \'/terms\')" target="_self">Privacy policy</a></p> <span km-fade="loading" ng-show="loading" class="kim-spinner"></span> <div km-fade="signupError " km-in="true" duration="300" km-out="true" class="kim-error-container"> <p ng-show="errors.name" class="kim-login-error">Name is required.</p> <p ng-show="errors.email" class="kim-login-error">{{errors.email}}</p> <p ng-show="errors.password" class="kim-login-error">Password must contain 6 characters</p> </div> </form> </div> <div km-fade="signupStep == 2" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> <p style="text-align:center">Signup successful</p> </div> </div> <!-- Auth Overlay --> <div ng-controller="authOverlayController" id="kim-LoginOverlay" km-in="true" km-fade="currentOverlay == \'auth\'" class="kim kim-button-container" opacity="0.95"> <div class="kim-step-1"> <form id="kim-LoginForm" name="kmAuthForm" novalidate style="height:290px;"> <p>Please enter your login information:</p> <p class="host-indicator">{{host}}</p> <input ng-model="form.username" type="text" name="email" id="kim-LoginEmail" placeholder="email"> <input ng-model="form.password" type="password" name="password" id="kim-LoginPassword" placeholder="password"> <div class="kim-hint-checkbox"> <input type="checkbox" value="1" ng-model="authAgree" ng-change="agree()" id="AgreeCheckbox" name="" /> <label for="AgreeCheckbox"></label> </div> <p class="auth-agreement" ng-class="agreeError">I agree to store my login information for {{host}} on kimonolabs.com so that this API can automatially login and retrieve data specific to my account.</p> <div> <button ng-click="authLogin()" class="kim-login-button kim kim-button kim-auth-login-button">Login</button> </div> <p class="auth-fineprint">We use the latest secure encryption technologies to ensure safe transport and storage of your credentials. You will have the ability to update or remove your stored credentials at any time. APIs created from sites requiring authentication are automatically set to private and the data can only be accessed by your kimono account through secure authentication.</p> </form> </div> </div></div><div class="kim-Overlay kim" km-fade="flags.currentView != \'extractor\'" km-in="true" km-out="true" opacity="0.95"> <div class="kim kim-container" ng-controller="dataOverlayController" ng-show="flags.currentView == \'data\'"> <div class="col-md-2 collectionsInfo"> <h1>{{collections.length}} {{collectionTitle}}</h1> <div id="kim-ModeSwitch"> <div> <div> <a ng-click="mode = \'simple\'" ng-class="{active : mode == \'simple\'}" class="kim-type-button kim-button-simple">Simple</a> <a ng-click="mode = \'advanced\'" ng-class="{active : mode == \'advanced\'}" class="kim-type-button kim-button-advanced">Advanced</a> <a ng-click="mode = \'editor\'" ng-class="{active : mode == \'editor\', disabled: flags.mode == \'loginMode\'}" class="kim-type-button kim-button-edit">Editor</a> </div> <div> <a ng-click="showPopup(\'rssInfo\')" class="kim-action-button kim-button-rssinfo2">Want RSS? Read this</a> </div> </div> </div> </div> <div class="scroll"> <form name="advancedModeForm" ng-submit="update(tmpCollections)"> <div ng-hide="collectionNames[$index] == \'Pagination\' && mode == \'editor\'" class="collection kim-clearfix" km-repeat="collection in tmpCollections"> <input class="kim kim-data-field kim-collection-name" ng-disabled="collectionNames[$index] == \'Pagination\' || flags.mode == \'loginMode\'" kimonocollection="$index" ng-model="collectionNames[$index]"> <div class="kim-clearfix datatype" km-repeat="datatype in collection" ng-init="realDatatype = collections[$parent.$index][$index]"> <div km-draggable start="editor.dragStart" end="editor.dragEnd" drag="editor.drag" axis="\'y\'" datatypeIndex="{{realDatatype.context.index}}" collectionIndex="{{$parent.$index}}" km-fade="mode == \'editor\'" display="inline-block" class="kim kim-datatype-avatar kim-datatype-dropzone kim-{{config.colors[realDatatype.context.index]}}">{{realDatatype.name}}</div> <input ng-disabled="realDatatype.context.index == \'pagination\' || flags.mode == \'loginMode\'" ng-show="mode != \'editor\'" class="kim kim-data-field kim-datatype-name kim-{{getColor(realDatatype.context.index)}}" ng-model="realDatatype.name"> <div style="float:left;"> <div ng-show="mode == \'advanced\'" class="advancedAttributes" km-repeat="selectorObject in datatype.selectorObjects"> <ng-form name="datatypeForm"> <input name="selectorField" class="kim kim-data-field kim-code-field kim-datatype-selector animate-me-up" ng-model="selectorObject.selector" selector> <input name="regexField" style="display:inline-block;" class="kim kim-data-field kim-code-field kim-datatype-regex animate-me-up" ng-model="selectorObject.regex" regex> </ng-form> <a ng-show="flags.mode != \'loginMode\'" ng-click="showAttributes(realDatatype.context.index)" class="kim kim-data-link">Attributes</a> </div> <div ng-show="mode == \'simple\'" animated-highlight datatype-index="{{realDatatype.context.index}}" class="animated-highlight"></div> </div> </div> <div ng-show="mode == \'editor\'" collectionIndex="{{$index}}" class="kim kim-data-field kim-collection-dropzone kim-show-when-dragging"></div> </div> <input ng-show="mode == \'editor\'" disabled class="kim kim-data-field kim-collection-name" value="New Collection"> <div ng-show="mode == \'editor\'" collectionIndex="new" class="kim kim-data-field kim-collection-dropzone kim-show-when-dragging"></div> <div ng-show="mode == \'advanced\'" id="kim-AdvancedButtons"> <input ng-disabled="isUnchanged(collections, tmpCollections) || advancedModeForm.$invalid" type="submit" class="kim-advanced-button kim-button-apply kim kim-button"> <button ng-disabled="isUnchanged(collections, tmpCollections) || advancedModeForm.$invalid" ng-click="resetAdvancedModeForm()" class="kim-advanced-button kim-button-reset kim kim-button">Reset</button> <span km-fade="advancedModeForm.$invalid" km-in="true" km-out="true" display="inline-block" class="kim-selector-error">{{errorMessage}}</span> </div> </div> </form> </div> <div class="kim kim-container" ng-controller="rawOverlayController" km-fade="flags.currentView == \'raw\'" km-enter="enter"> <div class="col-md-2 collectionsInfo"> <h1>{{collections.length}} {{collectionTitle}}</h1> <div id="kim-ModeSwitch"> <div> <div> <a ng-click="mode = \'json\'" ng-class="{active : mode == \'json\'}" class="kim-type-button kim-button-simple">JSON</a> <a ng-click="mode = \'csv\'" ng-class="{active : mode == \'csv\'}" class="kim-type-button kim-button-advanced">CSV</a> <a ng-click="mode = \'rss\'" ng-class="{active : mode == \'rss\'}" class="kim-type-button kim-button-edit">RSS</a> </div> <div> <a ng-click="download()" class="kim-action-button kim-button-download">Download {{mode | uppercase}}</a> <a ng-click="selectText()" ng-hide="mode == \'csv\'" class="kim-action-button kim-button-select">Select All Text</a> <a ng-click="selectCurrentTable()" ng-show="mode == \'csv\'" class="kim-action-button kim-button-select">Select {{selectedCollection}}</a> <a ng-show="mode == \'rss\'" ng-click="showPopup(\'rssInfo\')" class="kim-action-button kim-button-rssinfo2">Want RSS? Read this</a> </div> </div> </div> </div> <div class="scroll"> <pre ng-show="mode == \'json\'" class="kim-code json">{{json | json}}</pre> <div ng-show="mode == \'csv\'" class="kim-spreadsheet"> <div id="kim-SheetSwitch"> <a ng-repeat="(collection, data) in table" ng-click="clickTableCollection(collection)" ng-class="{active : selectedCollection == collection}">{{collection}}</a> </div> <div> <table> <tr> <th ng-class="\'kim-\' + config.colors[ table[selectedCollection].datatypeindices[$index] ] + \'-color\'" ng-repeat="name in table[selectedCollection].colnames">{{name}}</th> </tr> <tr ng-repeat="row in table[selectedCollection].rows"> <td ng-repeat="value in row track by $index">{{value}}</td> </tr> </table> </div> </div> <pre ng-show="mode == \'rss\'" class="kim-code rss">{{rss}}</pre> </div> </div></div><div ng-controller="popupController" class="kim-Overlay kim" km-fade="show" km-in="true" km-out="true" opacity="0.95"> <div class="kim kim-container" ng-controller="attributesOverlayController" km-fade="currentPopup == \'attributes\'" km-in="true" km-out="true" km-enter="enter"> <div class="kim" id="kim-AttributeExtractor" style="opacity: 1;"> <div> <a ng-click="close()" class="kim kim-close-ae"></a> <p>Select the specific attributes you want to extract for the elements matched by this selector.</p> <ul id="kim-AttrList"> <li><label><input ng-model="textContent" type="checkbox" id="kim-TextContent"> Text Content</label></li> <li class="kim-attribute" km-repeat="attribute in attributes"> <label><input class="kim-regex-check" ng-model="attribute.value" type="checkbox"> {{attribute.attribute}}</label> </li> </ul> <ul class="kim-last"> <li><label><input type="checkbox" ng-model="hiddenElements" id="kim-HiddenElements"> Include Hidden Elements</label></li> </ul> <div class="kim-apply-button-container"><button class="kim kim-apply-ae kim-button" ng-click="apply()">Apply</button></div> </div> </div> </div> <div class="kim kim-container" ng-click="close()" km-fade="currentPopup == \'rssInfo\'" km-in="true" km-out="true"> <div class="kim" id="kim-RSSInfo" style="opacity: 1;"> <div> <a class="kim kim-close-ae"></a> <p>To build an RSS feed with kimono, you must make sure your API has only one collection, and that the collection contains at least a one property. If you want to populate your RSS feed with description, author, pubDate or comments, you must create properties on your API with the appropriate property names.</p> <table> <tbody> <tr> <td>title <span>LINK</span></td> <td>The title of the item (must also be a link to the content)</td> </tr> <tr><td>description</td><td>The item synopsis</td></tr> <tr><td>author</td><td>Author of the item</td></tr> <tr><td>category</td><td>Category for the item</td></tr> <tr><td>pubDate</td><td>When the item was published</td></tr> <tr><td>comments <span>LINK</span></td><td>Comments URL (must be a link to a comments page)</td></tr> </tbody> </table> </div> </div> </div> <div class="kim kim-container" ng-click="close()" km-fade="currentPopup == \'incorrectLogin\'" km-in="true" km-out="true"> <div class="kim" id="kim-AttributeExtractor" style="opacity: 1;"> <div> <a class="kim kim-close-ae"></a> <p>Can\'t activate login credential mode.</p> </div> </div> </div></div><!--- Toast Message --><div class="kim kim-toast-wrapper" km-fade="flags.toasting" km-in="true" km-out="true" translate-vector="(0, 20px, 0)" duration="250"> <p class="kim kim-toast kim-{{flags.toastType}}"> {{flags.toastMessage}} </p></div><!-- extractor --><div ng-controller="extractorController" ></div><!--<div km-fade="flags.showNotificationPanel" km-in="true" km-out="true" id="kim-Notifications"> <div class="kim-notification-wrapper"> <div class="kim-header"> <div class="kim-title">What\'s New</div> <div class="kim-links"><div class="reject" ng-click="flags.showNotificationPanel = false"></div></div> </div> <div class="kim-notifications"> <div class="kim-notification" ng-class="{\'new\': new_features[key]}" ng-repeat="(key, notification) in config.data.features | reverse" ng-click="link(notification.link)"> <div class="kim-notification-title"> {{notification.title}} </div> <div class="kim-thumb" ng-class="{\'kim-green\': notification.type == \'New Feature\', \'kim-purple\': notification.type == \'News\', \'kim-red\': notification.type == \'Bug Fix\'}"> {{notification.type}} </div> <div class="kim-text">{{notification.message | limit: 30}}</div> <div class="arrow"></div> </div> </div> <a href="" class="kim-more" ng-click="link(config.KM_HOST_WWW+\'/blog\')">More News</a> </div></div>--><div km-fade="flags.showNotificationPanel" km-in="true" km-out="true" id="kim-Notifications"> <div class="kim-notification-wrapper"> <div class="kim-notifications"> <div class="kim-notification" ng-class="{\'new\': new_features[key]}" ng-repeat="(key, notification) in allFeatures | reverse" ng-click="link(notification.link)"> <div class="kim-thumb" ng-class="{\'kim-green\': notification.type == \'New Feature\', \'kim-purple\': notification.type == \'News\', \'kim-red\': notification.type == \'Bug Fix\'}"> {{notification.type}} </div> <p class="kim-body">{{notification.message}}</p> <div class="arrow"></div> </div> </div> </div></div><!-- Api Popup --><div id="kim-ApiPanel" km-loading message="Loading API data" font-size="18" model="loading" ng-show="flags.showApiPanel" ng-controller="apiPanelController" km-panel show-toggle="open" width="300" height="300" offset="44"> <div ng-click="toggle()" class="panel-header">{{(siteApis.length + \' Existing Kimono APIs\') | limit: 40}}</span> <!-- <div ng-click="showHelp = !showHelp" class="question"></div> --> <div ng-class="{open: open}" class="arrow"></div> </div> <div class="panel-list"> <div style="position:relative; z-index:10;" km-repeat="api in siteApis"> <div class="kim-api-item" ng-click="getApi(api)" ng-class="{selected: flags.currentApi.id == api.id}"> <span>{{api.name | limit: 14}}</span> <div class="kim-collection-indicator"> <div class="single_collection" ng-repeat="collection in api.collections"> <div ng-repeat="datatype in collection" class="datatype kim-{{getColor(datatype.context.index)}}"></div> </div> </div> </div> <div class="kim-action-buttons"> <div ng-if="false" ng-click="link(config.KM_HOST + \'/apis/\' + api.id)" class="accept">Use</div> <div ng-if="false" ng-click="done()" class="clone">Clone</div> <div ng-click="cancel()" class="reject">Unload</div> </div> </div> <div class="kim-othersite-item" ng-click="kimonify(rootDomain + site)" ng-repeat="(site, apis) in otherSites"> {{(apis.length + \' more \' + (\'api\' | plural: apis.length)) | limit: 40}} <span>{{(rootDomain + site) | limit: 40}}</span> <div class="arrow"></div> </div> </div> <!-- <div class="api-view"> <div class="navbar title"> <div ng-click="back()" class="nav-button left"><div class="arrow left"></div></div> <div class="nav-button right" ng-click="getApi(selectedApi.id)"><div class="download"></div></div> <div class="nav-title center">{{selectedApi.name | limit: 18}}</div> </div> <div style="height:260px; overflow:scroll;"> <div class="collection" ng-repeat="collection in selectedApi.collectionNames"> <div class="collection-title">{{collection | limit: 11}}</div> <div class="datatypes"> <div ng-repeat="datatype in selectedApi.collections[$index]" class="datatype-title"> <div class="border kim-{{getColor(datatype.context.index)}}"></div> {{datatype.name | limit:13}} </div> </div> </div> </div> </div> --></div><div ng-controller="toolbarController" id="kim-Toolbar" class="kim"> <div class="kim-toolbar-section active"> <h1 style="vertical-align: middle;"><a href="" ng-click="link(\'http://kimonolabs.com/\')">kimono<span>labs</span></a></h1> <a class="kim-new" title="New Features" ng-show="allFeatures.length > 0" ng-class="{\'active\':flags.showNotificationPanel, \'highlighted\': (new_features | size) > 0}" ng-click="openNotifications()"></a> <!-- <span ng-show="(new_features | size) > 0" ng-class="{\'kim-dot-sm\': new_features.length > 99, \'kim-dot-md\': new_features.length > 9, \'kim-dot-xs\': new_features.length > 999 }" class="kim-notification-badge">{{new_features | size}}</span> --> <p ng-show="(new_features | size) > 0" class="beta-tag kim-feature-count">{{new_features | size}}</p><!-- <form role="form" id="kim-UrlForm" action="http://kimonolabs.com/load" method="get"> <input class="kim" type="text" id="kim-ToolbarUrl" name="url" placeholder="any url" value="{{ targetUrl }}"> <a class="kim-toolbar-button kim-urlgo"></a> </form> --> </div> <div class="kim-toolbar-section first" km-fade="!flags.navigate" km-in="true" km-out="true" display="inline-block;"> <input class="kim" type="text" id="kim-ToolbarDataName" name="ToolbarDataName" placeholder="property1" ng-disabled="datatypeIndex == \'pagination\' || flags.mode == \'loginMode\'" ng-model="datatypes[datatypeIndex].name" ng-keydown="keydown($event)"> </div> <div class="kim-toolbar-section kim-datatypes" km-fade="!flags.navigate" km-in="true" km-out="true" display="inline-block"> <a ng-mouseenter="dataDotHover($index)" ng-mouseleave="dataDotUnhover($index)" km-repeat="datatype in datatypes" km-list="toolbarDatatypes" km-enter="datatypeEnter" type="medium" kimonodatatype="{{$index}}" ng-click="changeDatatype($index)" ng-class="{active : (datatypeIndex == $index)}" class="kim-data-dot kim-{{getColor($index)}}"> <span ng-show="flags.mode != \'loginMode\'" ng-class="{\'kim-dot-sm\': datatype.numElements > 99, \'kim-dot-md\': datatype.numElements > 9, \'kim-dot-xs\': datatype.numElements > 999}">{{datatype.numElements}}</span> <span ng-show="flags.mode == \'loginMode\'" class="kim kim-icon" ng-class="{\'kim-user-highlight\': $index == 0, \'kim-password-highlight\': $index == 1, \'kim-target-highlight\': $index == 2}"></span> <span ng-show="flags.mode != \'loginMode\'" class="kim-delete-datatype" ng-click="delete($index)"></span> </a> <a class="kim-new-datatype" ng-click="addDatatype()" ng-show="datatypes.length < 50 && flags.mode != \'loginMode\'" title="New Datatype"></a> </div> <div class="kim-right"> <div class="kim-toolbar-section" id="kim-PaginationContainer"> <a km-fade="flags.mode != \'loginMode\' && flags.mode != \'navigation\'" km-in="true" km-out="true" display="inline-block" opacity="0.4" ng-mouseenter="paginationHover(\'pagination\')" ng-mouseleave="dataDotUnhover(\'pagination\')" class="kim kim-toolbar-button kim-pagination kim-data-dot" kimonodatatype="pagination" title="Pagination" ng-click="pagination()" ng-class="{active : (datatypeIndex == \'pagination\'), disabled: flags.mode == \'loginMode\' || flags.navigate}"> <span ng-show="flags.hasPagination" class="pagination-check"></span> <span class="kim-delete-datatype" ng-click="deletePagination($index)"></span> </a> <a km-fade="flags.mode != \'navigation\'" km-in="true" km-out="true" display="inline-block" opacity="0.4" class="kim-toolbar-button kim-undo" ng-class="{disabled: flags.actionHistoryLength == 0}" ng-click="undo()" title="Undo"></a> </div> <div class="kim-toolbar-section" ng-if="config.clientEnv == \'chrome\'" id="kim-PaginationContainer"> <a ng-show="flags.currentStep == \'on\' || flags.currentStep == \'done\'" class="kim-toolbar-button kim-normal" ng-class="{active: flags.mode == \'navigation\'}" ng-click="navigateMode()" title="Navigate"></a> <a ng-show="flags.currentStep != \'on\' && flags.currentStep != \'done\'" class="kim-toolbar-button kim-login" ng-class="{active: flags.mode == \'loginMode\', attention: isHttps()}" ng-click="enableLoginMode()" title="Auth mode"></a> </div> <div class="kim-toolbar-section"> <a class="kim-toolbar-button kim-view-button extractor-view" title="Extractor View" ng-click="changeView(\'extractor\')" ng-class="{active : (flags.currentView == \'extractor\')}"></a> <a class="kim-toolbar-button kim-view-button data-model-view" title="Data Model View" ng-click="changeView(\'data\')" ng-class="{active : (flags.currentView == \'data\'), disabled: flags.navigate}"></a> <a class="kim kim-toolbar-button kim-view-button json-view" title="Raw Data View" ng-click="changeView(\'raw\')" ng-class="{active : (flags.currentView == \'raw\'), disabled: flags.mode == \'loginMode\' || flags.navigate}"></a> </div> <div class="kim-toolbar-section"> <button ng-class="{disabled: flags.navigate}" class="kim-toolbar-button-primary kim kim-button" id="kim-DoneButton" ng-click="done()" title="{{doneButtonTitle()}} API">{{doneButtonMessage()}}</button> </div> </div></div>'), angular.bootstrap($mainController, ['Kimono']), $mainController.appendTo('body'); | |
} | |
}); | |
}(window, document); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(e,t,n){function r(){s||(i("#habla_beta_container_do_not_rely_on_div_classes_or_names").appendTo("#Kimonify").css({"z-index":2147483900,position:"fixed"}),s=!0)}"undefined"==typeof e.$k?e.$k={data:{}}:"undefined"==typeof e.$k.data&&(e.$k.data={});e.$||e.jQuery||n;!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof e?e:this,function(e,t){function n(e){var t=e.length,n=et.type(e);return"function"===n||et.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(et.isFunction(t))return et.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return et.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return et.filter(t,e,n);t=et.filter(t,e)}return et.grep(e,function(e){return z.call(t,e)>=0!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=ht[e]={};return et.each(e.match(pt)||[],function(e,n){t[n]=!0}),t}function a(){Q.removeEventListener("DOMContentLoaded",a,!1),e.removeEventListener("load",a,!1),et.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=et.expando+Math.random()}function l(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(xt,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:bt.test(n)?et.parseJSON(n):n}catch(i){}yt.set(e,t,n)}else n=void 0;return n}function c(){return!0}function u(){return!1}function f(){try{return Q.activeElement}catch(e){}}function d(e,t){return et.nodeName(e,"table")&&et.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=Lt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,r=e.length;r>n;n++)vt.set(e[n],"globalEval",!t||vt.get(t[n],"globalEval"))}function m(e,t){var n,r,i,o,a,s,l,c;if(1===t.nodeType){if(vt.hasData(e)&&(o=vt.access(e),a=vt.set(t,o),c=o.events)){delete a.handle,a.events={};for(i in c)for(n=0,r=c[i].length;r>n;n++)et.event.add(t,i,c[i][n])}yt.hasData(e)&&(s=yt.access(e),l=et.extend({},s),yt.set(t,l))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&et.nodeName(e,t)?et.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ct.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function b(t,n){var r=et(n.createElement(t)).appendTo(n.body),i=e.getDefaultComputedStyle?e.getDefaultComputedStyle(r[0]).display:et.css(r[0],"display");return r.detach(),i}function x(e){var t=Q,n=Ft[e];return n||(n=b(e,t),"none"!==n&&n||(_t=(_t||et("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=_t[0].contentDocument,t.write(),t.close(),n=b(e,t),_t.detach()),Ft[e]=n),n}function $(e,t,n){var r,i,o,a,s=e.style;return n=n||Wt(e),n&&(a=n.getPropertyValue(t)||n[t]),n&&(""!==a||et.contains(e.ownerDocument,e)||(a=et.style(e,t)),Ut.test(a)&&qt.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function k(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function w(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),r=t,i=Gt.length;i--;)if(t=Gt[i]+n,t in e)return t;return r}function C(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function S(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=et.css(e,n+kt[o],!0,i)),r?("content"===n&&(a-=et.css(e,"padding"+kt[o],!0,i)),"margin"!==n&&(a-=et.css(e,"border"+kt[o]+"Width",!0,i))):(a+=et.css(e,"padding"+kt[o],!0,i),"padding"!==n&&(a+=et.css(e,"border"+kt[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Wt(e),a="border-box"===et.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=$(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ut.test(i))return i;r=a&&(J.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+S(e,t,n||(a?"border":"content"),r,o)+"px"}function A(e,t){for(var n,r,i,o=[],a=0,s=e.length;s>a;a++)r=e[a],r.style&&(o[a]=vt.get(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&wt(r)&&(o[a]=vt.access(r,"olddisplay",x(r.nodeName)))):o[a]||(i=wt(r),(n&&"none"!==n||!i)&&vt.set(r,"olddisplay",i?n:et.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function T(e,t,n,r,i){return new T.prototype.init(e,t,n,r,i)}function O(){return setTimeout(function(){Yt=void 0}),Yt=et.now()}function N(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)n=kt[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function j(e,t,n){for(var r,i=(nn[t]||[]).concat(nn["*"]),o=0,a=i.length;a>o;o++)if(r=i[o].call(n,t,e))return r}function M(e,t,n){var r,i,o,a,s,l,c,u=this,f={},d=e.style,p=e.nodeType&&wt(e),h=vt.get(e,"fxshow");n.queue||(s=et._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,et.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],c=et.css(e,"display"),"none"===c&&(c=x(e.nodeName)),"inline"===c&&"none"===et.css(e,"float")&&(d.display="inline-block")),n.overflow&&(d.overflow="hidden",u.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Qt.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!h||void 0===h[r])continue;p=!0}f[r]=h&&h[r]||et.style(e,r)}if(!et.isEmptyObject(f)){h?"hidden"in h&&(p=h.hidden):h=vt.access(e,"fxshow",{}),o&&(h.hidden=!p),p?et(e).show():u.done(function(){et(e).hide()}),u.done(function(){var t;vt.remove(e,"fxshow");for(t in f)et.style(e,t,f[t])});for(r in f)a=j(p?h[r]:0,r,u),r in h||(h[r]=a.start,p&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function I(e,t){var n,r,i,o,a;for(n in e)if(r=et.camelCase(n),i=t[r],o=e[n],et.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=et.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function D(e,t,n){var r,i,o=0,a=tn.length,s=et.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=Yt||O(),n=Math.max(0,c.startTime+c.duration-t),r=n/c.duration||0,o=1-r,a=0,l=c.tweens.length;l>a;a++)c.tweens[a].run(o);return s.notifyWith(e,[c,o,n]),1>o&&l?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:et.extend({},t),opts:et.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Yt||O(),duration:n.duration,tweens:[],createTween:function(t,n){var r=et.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)c.tweens[n].run(1);return t?s.resolveWith(e,[c,t]):s.rejectWith(e,[c,t]),this}}),u=c.props;for(I(u,c.opts.specialEasing);a>o;o++)if(r=tn[o].call(c,e,u,c.opts))return r;return et.map(u,j,c),et.isFunction(c.opts.start)&&c.opts.start.call(e,c),et.fx.timer(et.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function P(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(pt)||[];if(et.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function L(e,t,n,r){function i(s){var l;return o[s]=!0,et.each(e[s]||[],function(e,s){var c=s(t,n,r);return"string"!=typeof c||a||o[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),i(c),!1)}),l}var o={},a=e===kn;return i(t.dataTypes[0])||!o["*"]&&i("*")}function H(e,t){var n,r,i=et.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&et.extend(!0,e,r),e}function R(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function _(e,t,n,r){var i,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=c[l+" "+o]||c["* "+o],!a)for(i in c)if(s=i.split(" "),s[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[i]:c[i]!==!0&&(o=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function F(e,t,n,r){var i;if(et.isArray(t))et.each(t,function(t,i){n||En.test(e)?r(e,i):F(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==et.type(t))r(e,t);else for(i in t)F(e+"["+i+"]",t[i],n,r)}function q(e){return et.isWindow(e)?e:9===e.nodeType&&e.defaultView}var U=[],W=U.slice,B=U.concat,V=U.push,z=U.indexOf,K={},X=K.toString,G=K.hasOwnProperty,Y="".trim,J={},Q=e.document,Z="2.1.0",et=function(e,t){return new et.fn.init(e,t)},tt=/^-ms-/,nt=/-([\da-z])/gi,rt=function(e,t){return t.toUpperCase()};et.fn=et.prototype={jquery:Z,constructor:et,selector:"",length:0,toArray:function(){return W.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:W.call(this)},pushStack:function(e){var t=et.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return et.each(this,e,t)},map:function(e){return this.pushStack(et.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(W.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:V,sort:U.sort,splice:U.splice},et.extend=et.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||et.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],a!==r&&(c&&r&&(et.isPlainObject(r)||(i=et.isArray(r)))?(i?(i=!1,o=n&&et.isArray(n)?n:[]):o=n&&et.isPlainObject(n)?n:{},a[t]=et.extend(c,o,r)):void 0!==r&&(a[t]=r));return a},et.extend({expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===et.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return e-parseFloat(e)>=0},isPlainObject:function(e){if("object"!==et.type(e)||e.nodeType||et.isWindow(e))return!1;try{if(e.constructor&&!G.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?K[X.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=et.trim(e),e&&(1===e.indexOf("use strict")?(t=Q.createElement("script"),t.text=e,Q.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(tt,"ms-").replace(nt,rt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,a=e.length,s=n(e);if(r){if(s)for(;a>o&&(i=t.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=t.apply(e[o],r),i===!1)break}else if(s)for(;a>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=t.call(e[o],o,e[o]),i===!1)break;return e},trim:function(e){return null==e?"":Y.call(e)},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?et.merge(r,"string"==typeof e?[e]:e):V.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:z.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;a>o;o++)r=!t(e[o],o),r!==s&&i.push(e[o]);return i},map:function(e,t,r){var i,o=0,a=e.length,s=n(e),l=[];if(s)for(;a>o;o++)i=t(e[o],o,r),null!=i&&l.push(i);else for(o in e)i=t(e[o],o,r),null!=i&&l.push(i);return B.apply([],l)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),et.isFunction(e)?(r=W.call(arguments,2),i=function(){return e.apply(t||this,r.concat(W.call(arguments)))},i.guid=e.guid=e.guid||et.guid++,i):void 0},now:Date.now,support:J}),et.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){K["[object "+t+"]"]=t.toLowerCase()});var it=function(e){function t(e,t,n,r){var i,o,a,s,l,c,f,h,g,m;if((t?t.ownerDocument||t:F)!==M&&j(t),t=t||M,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(D&&!r){if(i=yt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&R(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&w.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(w.qsa&&(!P||!P.test(e))){if(h=f=_,g=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=d(e),(f=t.getAttribute("id"))?h=f.replace(xt,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=c.length;l--;)c[l]=h+p(c[l]);g=bt.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return Z.apply(n,g.querySelectorAll(m)),n}catch(v){}finally{f||t.removeAttribute("id")}}}return $(e.replace(lt,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[_]=!0,e}function i(e){var t=M.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)C.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==K&&e}function f(){}function d(e,n){var r,i,o,a,s,l,c,u=B[e+" "];if(u)return n?0:u.slice(0);for(s=e,l=[],c=C.preFilter;s;){(!r||(i=ct.exec(s)))&&(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=ut.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(lt," ")}),s=s.slice(r.length));for(a in C.filter)!(i=ht[a].exec(s))||c[a]&&!(i=c[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):B(e,l).slice(0)}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=U++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c=[q,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[_]||(t[_]={}),(s=l[r])&&s[0]===q&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function g(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),c&&t.push(s));return a}function v(e,t,n,i,o,a){return i&&!i[_]&&(i=v(i)),o&&!o[_]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,f,d=[],p=[],h=a.length,g=r||x(t||"*",s.nodeType?[s]:s,[]),v=!e||!r&&t?g:m(g,d,e,s,l),y=n?o||(r?e:h||i)?[]:a:v;if(n&&n(v,y,s,l),i)for(c=m(y,p),i(c,[],s,l),u=c.length;u--;)(f=c[u])&&(y[p[u]]=!(v[p[u]]=f));if(r){if(o||e){if(o){for(c=[],u=y.length;u--;)(f=y[u])&&c.push(v[u]=f);o(null,y=[],c,l)}for(u=y.length;u--;)(f=y[u])&&(c=o?tt.call(r,f):d[u])>-1&&(r[c]=!(a[c]=f))}}else y=m(y===a?y.splice(h,y.length):y),o?o(null,a,y,l):Z.apply(a,y)})}function y(e){for(var t,n,r,i=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return tt.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=C.relative[e[s].type])u=[h(g(u),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[_]){for(r=++s;i>r&&!C.relative[e[r].type];r++);return v(s>1&&g(u),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(lt,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&p(e))}u.push(n)}return g(u)}function b(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,l,c){var u,f,d,p=0,h="0",g=r&&[],v=[],y=T,b=r||o&&C.find.TAG("*",c),x=q+=null==y?1:Math.random()||.1,$=b.length;for(c&&(T=a!==M&&a);h!==$&&null!=(u=b[h]);h++){if(o&&u){for(f=0;d=e[f++];)if(d(u,a,s)){l.push(u);break}c&&(q=x)}i&&((u=!d&&u)&&p--,r&&g.push(u))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,v,a,s);if(r){if(p>0)for(;h--;)g[h]||v[h]||(v[h]=J.call(l));v=m(v)}Z.apply(l,v),c&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(l)}return c&&(q=x,T=y),g};return i?r(a):a}function x(e,n,r){for(var i=0,o=n.length;o>i;i++)t(e,n[i],r);return r}function $(e,t,n,r){var i,o,a,s,l,c=d(e);if(!r&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&D&&C.relative[o[1].type]){if(t=(C.find.ID(a.matches[0].replace($t,kt),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=ht.needsContext.test(e)?0:o.length;i--&&(a=o[i],!C.relative[s=a.type]);)if((l=C.find[s])&&(r=l(a.matches[0].replace($t,kt),bt.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return Z.apply(n,r),n;break}}return A(e,c)(r,t,!D,n,bt.test(e)&&u(t.parentNode)||t),n}var k,w,C,S,E,A,T,O,N,j,M,I,D,P,L,H,R,_="sizzle"+-new Date,F=e.document,q=0,U=0,W=n(),B=n(),V=n(),z=function(e,t){return e===t&&(N=!0),0},K="undefined",X=1<<31,G={}.hasOwnProperty,Y=[],J=Y.pop,Q=Y.push,Z=Y.push,et=Y.slice,tt=Y.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},nt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",rt="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot=it.replace("w","w#"),at="\\["+rt+"*("+it+")"+rt+"*(?:([*^$|!~]?=)"+rt+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ot+")|)|)"+rt+"*\\]",st=":("+it+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+at.replace(3,8)+")*)|.*)\\)|)",lt=new RegExp("^"+rt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+rt+"+$","g"),ct=new RegExp("^"+rt+"*,"+rt+"*"),ut=new RegExp("^"+rt+"*([>+~]|"+rt+")"+rt+"*"),ft=new RegExp("="+rt+"*([^\\]'\"]*?)"+rt+"*\\]","g"),dt=new RegExp(st),pt=new RegExp("^"+ot+"$"),ht={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it.replace("w","w*")+")"),ATTR:new RegExp("^"+at),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+rt+"*(even|odd|(([+-]|)(\\d*)n|)"+rt+"*(?:([+-]|)"+rt+"*(\\d+)|))"+rt+"*\\)|)","i"),bool:new RegExp("^(?:"+nt+")$","i"),needsContext:new RegExp("^"+rt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+rt+"*((?:-\\d)?\\d*)"+rt+"*\\)|)(?=[^-]|$)","i")},gt=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,yt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,bt=/[+~]/,xt=/'|\\/g,$t=new RegExp("\\\\([\\da-f]{1,6}"+rt+"?|("+rt+")|.)","ig"),kt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(Y=et.call(F.childNodes),F.childNodes),Y[F.childNodes.length].nodeType}catch(wt){Z={apply:Y.length?function(e,t){Q.apply(e,et.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},j=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:F,r=n.defaultView;return n!==M&&9===n.nodeType&&n.documentElement?(M=n,I=n.documentElement,D=!E(n),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){j()},!1):r.attachEvent&&r.attachEvent("onunload",function(){j()})),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=vt.test(n.getElementsByClassName)&&i(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),w.getById=i(function(e){return I.appendChild(e).id=_,!n.getElementsByName||!n.getElementsByName(_).length}),w.getById?(C.find.ID=function(e,t){if(typeof t.getElementById!==K&&D){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace($t,kt);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace($t,kt);return function(e){var n=typeof e.getAttributeNode!==K&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=w.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==K?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},C.find.CLASS=w.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==K&&D?t.getElementsByClassName(e):void 0},L=[],P=[],(w.qsa=vt.test(n.querySelectorAll))&&(i(function(e){e.innerHTML="<select t=''><option selected=''></option></select>",e.querySelectorAll("[t^='']").length&&P.push("[*^$]="+rt+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+rt+"*(?:value|"+nt+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),i(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+rt+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(w.matchesSelector=vt.test(H=I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&i(function(e){w.disconnectedMatch=H.call(e,"div"),H.call(e,"[s!='']:x"),L.push("!=",st)}),P=P.length&&new RegExp(P.join("|")),L=L.length&&new RegExp(L.join("|")),t=vt.test(I.compareDocumentPosition),R=t||vt.test(I.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return N=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!w.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===F&&R(F,e)?-1:t===n||t.ownerDocument===F&&R(F,t)?1:O?tt.call(O,e)-tt.call(O,t):0:4&r?-1:1)}:function(e,t){if(e===t)return N=!0,0;var r,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:O?tt.call(O,e)-tt.call(O,t):0;if(o===s)return a(e,t);for(r=e;r=r.parentNode;)l.unshift(r);for(r=t;r=r.parentNode;)c.unshift(r);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===F?-1:c[i]===F?1:0},n):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&j(e),n=n.replace(ft,"='$1']"),!(!w.matchesSelector||!D||L&&L.test(n)||P&&P.test(n)))try{var r=H.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&j(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&j(e);var n=C.attrHandle[t.toLowerCase()],r=n&&G.call(C.attrHandle,t.toLowerCase())?n(e,t,!D):void 0;return void 0!==r?r:w.attributes||!D?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(N=!w.detectDuplicates,O=!w.sortStable&&e.slice(0),e.sort(z),N){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return O=null,e},S=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=S(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=S(t);return n},C=t.selectors={cacheLength:50,createPseudo:r,match:ht,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($t,kt),e[3]=(e[4]||e[5]||"").replace($t,kt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return ht.CHILD.test(e[0])?null:(e[3]&&void 0!==e[4]?e[2]=e[4]:n&&dt.test(n)&&(t=d(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace($t,kt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+rt+")"+e+"("+rt+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==K&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(u=m[_]||(m[_]={}),c=u[e]||[],p=c[0]===q&&c[1],d=c[0]===q&&c[2],f=p&&m.childNodes[p];f=++p&&f&&f[g]||(d=p=0)||h.pop();)if(1===f.nodeType&&++d&&f===t){u[e]=[q,p,d];break}}else if(y&&(c=(t[_]||(t[_]={}))[e])&&c[0]===q)d=c[1];else for(;(f=++p&&f&&f[g]||(d=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++d||(y&&((f[_]||(f[_]={}))[e]=[q,d]),f!==t)););return d-=i,d===r||d%r===0&&d/r>=0}}},PSEUDO:function(e,n){var i,o=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[_]?o(n):o.length>1?(i=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=tt.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=A(e.replace(lt,"$1"));return i[_]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||S(t)).indexOf(e)>-1}}),lang:r(function(e){return pt.test(e||"")||t.error("unsupported lang: "+e),e=e.replace($t,kt).toLowerCase(),function(t){var n;do if(n=D?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===I},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return mt.test(e.nodeName)},input:function(e){return gt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},C.pseudos.nth=C.pseudos.eq;for(k in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[k]=s(k);for(k in{submit:!0,reset:!0})C.pseudos[k]=l(k);return f.prototype=C.filters=C.pseudos,C.setFilters=new f,A=t.compile=function(e,t){var n,r=[],i=[],o=V[e+" "];if(!o){for(t||(t=d(e)),n=t.length;n--;)o=y(t[n]),o[_]?r.push(o):i.push(o);o=V(e,b(i,r))}return o},w.sortStable=_.split("").sort(z).join("")===_,w.detectDuplicates=!!N,j(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(nt,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);et.find=it,et.expr=it.selectors,et.expr[":"]=et.expr.pseudos,et.unique=it.uniqueSort,et.text=it.getText,et.isXMLDoc=it.isXML,et.contains=it.contains;var ot=et.expr.match.needsContext,at=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,st=/^.[^:#\[\.,]*$/;et.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?et.find.matchesSelector(r,e)?[r]:[]:et.find.matches(e,et.grep(t,function(e){return 1===e.nodeType}))},et.fn.extend({find:function(e){var t,n=this.length,r=[],i=this; | |
if("string"!=typeof e)return this.pushStack(et(e).filter(function(){for(t=0;n>t;t++)if(et.contains(i[t],this))return!0}));for(t=0;n>t;t++)et.find(e,i[t],r);return r=this.pushStack(n>1?et.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&ot.test(e)?et(e):e||[],!1).length}});var lt,ct=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ut=et.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ct.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||lt).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof et?t[0]:t,et.merge(this,et.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Q,!0)),at.test(n[1])&&et.isPlainObject(t))for(n in t)et.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=Q.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=Q,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):et.isFunction(e)?"undefined"!=typeof lt.ready?lt.ready(e):e(et):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),et.makeArray(e,this))};ut.prototype=et.fn,lt=et(Q);var ft=/^(?:parents|prev(?:Until|All))/,dt={children:!0,contents:!0,next:!0,prev:!0};et.extend({dir:function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&et(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),et.fn.extend({has:function(e){var t=et(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(et.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=ot.test(e)||"string"!=typeof e?et(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&et.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?et.unique(o):o)},index:function(e){return e?"string"==typeof e?z.call(et(e),this[0]):z.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(et.unique(et.merge(this.get(),et(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),et.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return et.dir(e,"parentNode")},parentsUntil:function(e,t,n){return et.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return et.dir(e,"nextSibling")},prevAll:function(e){return et.dir(e,"previousSibling")},nextUntil:function(e,t,n){return et.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return et.dir(e,"previousSibling",n)},siblings:function(e){return et.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return et.sibling(e.firstChild)},contents:function(e){return e.contentDocument||et.merge([],e.childNodes)}},function(e,t){et.fn[e]=function(n,r){var i=et.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=et.filter(r,i)),this.length>1&&(dt[e]||et.unique(i),ft.test(e)&&i.reverse()),this.pushStack(i)}});var pt=/\S+/g,ht={};et.Callbacks=function(e){e="string"==typeof e?ht[e]||o(e):et.extend({},e);var t,n,r,i,a,s,l=[],c=!e.once&&[],u=function(o){for(t=e.memory&&o,n=!0,s=i||0,i=0,a=l.length,r=!0;l&&a>s;s++)if(l[s].apply(o[0],o[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,l&&(c?c.length&&u(c.shift()):t?l=[]:f.disable())},f={add:function(){if(l){var n=l.length;!function o(t){et.each(t,function(t,n){var r=et.type(n);"function"===r?e.unique&&f.has(n)||l.push(n):n&&n.length&&"string"!==r&&o(n)})}(arguments),r?a=l.length:t&&(i=n,u(t))}return this},remove:function(){return l&&et.each(arguments,function(e,t){for(var n;(n=et.inArray(t,l,n))>-1;)l.splice(n,1),r&&(a>=n&&a--,s>=n&&s--)}),this},has:function(e){return e?et.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=c=t=void 0,this},disabled:function(){return!l},lock:function(){return c=void 0,t||f.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!l||n&&!c||(t=t||[],t=[e,t.slice?t.slice():t],r?c.push(t):u(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},et.extend({Deferred:function(e){var t=[["resolve","done",et.Callbacks("once memory"),"resolved"],["reject","fail",et.Callbacks("once memory"),"rejected"],["notify","progress",et.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return et.Deferred(function(n){et.each(t,function(t,o){var a=et.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&et.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?et.extend(e,r):r}},i={};return r.pipe=r.then,et.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=W.call(arguments),a=o.length,s=1!==a||e&&et.isFunction(e.promise)?a:0,l=1===s?e:et.Deferred(),c=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?W.call(arguments):i,r===t?l.notifyWith(n,r):--s||l.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);a>i;i++)o[i]&&et.isFunction(o[i].promise)?o[i].promise().done(c(i,r,o)).fail(l.reject).progress(c(i,n,t)):--s;return s||l.resolveWith(r,o),l.promise()}});var gt;et.fn.ready=function(e){return et.ready.promise().done(e),this},et.extend({isReady:!1,readyWait:1,holdReady:function(e){e?et.readyWait++:et.ready(!0)},ready:function(e){(e===!0?--et.readyWait:et.isReady)||(et.isReady=!0,e!==!0&&--et.readyWait>0||(gt.resolveWith(Q,[et]),et.fn.trigger&&et(Q).trigger("ready").off("ready")))}}),et.ready.promise=function(t){return gt||(gt=et.Deferred(),"complete"===Q.readyState?setTimeout(et.ready):(Q.addEventListener("DOMContentLoaded",a,!1),e.addEventListener("load",a,!1))),gt.promise(t)},et.ready.promise();var mt=et.access=function(e,t,n,r,i,o,a){var s=0,l=e.length,c=null==n;if("object"===et.type(n)){i=!0;for(s in n)et.access(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,et.isFunction(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(et(e),n)})),t))for(;l>s;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:c?t.call(e):l?t(e[0],n):o};et.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},s.uid=1,s.accepts=et.acceptData,s.prototype={key:function(e){if(!s.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=s.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,et.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(et.isEmptyObject(o))et.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,et.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),a=this.cache[o];if(void 0===t)this.cache[o]={};else{et.isArray(t)?r=t.concat(t.map(et.camelCase)):(i=et.camelCase(t),t in a?r=[t,i]:(r=i,r=r in a?[r]:r.match(pt)||[])),n=r.length;for(;n--;)delete a[r[n]]}},hasData:function(e){return!et.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var vt=new s,yt=new s,bt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,xt=/([A-Z])/g;et.extend({hasData:function(e){return yt.hasData(e)||vt.hasData(e)},data:function(e,t,n){return yt.access(e,t,n)},removeData:function(e,t){yt.remove(e,t)},_data:function(e,t,n){return vt.access(e,t,n)},_removeData:function(e,t){vt.remove(e,t)}}),et.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=yt.get(o),1===o.nodeType&&!vt.get(o,"hasDataAttrs"))){for(n=a.length;n--;)r=a[n].name,0===r.indexOf("data-")&&(r=et.camelCase(r.slice(5)),l(o,r,i[r]));vt.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){yt.set(this,e)}):mt(this,function(t){var n,r=et.camelCase(e);if(o&&void 0===t){if(n=yt.get(o,e),void 0!==n)return n;if(n=yt.get(o,r),void 0!==n)return n;if(n=l(o,r,void 0),void 0!==n)return n}else this.each(function(){var n=yt.get(this,r);yt.set(this,r,t),-1!==e.indexOf("-")&&void 0!==n&&yt.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){yt.remove(this,e)})}}),et.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=vt.get(e,t),n&&(!r||et.isArray(n)?r=vt.access(e,t,et.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=et.queue(e,t),r=n.length,i=n.shift(),o=et._queueHooks(e,t),a=function(){et.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return vt.get(e,n)||vt.access(e,n,{empty:et.Callbacks("once memory").add(function(){vt.remove(e,[t+"queue",n])})})}}),et.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?et.queue(this[0],e):void 0===t?this:this.each(function(){var n=et.queue(this,e,t);et._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&et.dequeue(this,e)})},dequeue:function(e){return this.each(function(){et.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=et.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=vt.get(o[a],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var $t=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,kt=["Top","Right","Bottom","Left"],wt=function(e,t){return e=t||e,"none"===et.css(e,"display")||!et.contains(e.ownerDocument,e)},Ct=/^(?:checkbox|radio)$/i;!function(){var e=Q.createDocumentFragment(),t=e.appendChild(Q.createElement("div"));t.innerHTML="<input type='radio' checked='checked' name='t'/>",J.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",J.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var St="undefined";J.focusinBubbles="onfocusin"in e;var Et=/^key/,At=/^(?:mouse|contextmenu)|click/,Tt=/^(?:focusinfocus|focusoutblur)$/,Ot=/^([^.]*)(?:\.(.+)|)$/;et.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,c,u,f,d,p,h,g,m=vt.get(e);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=et.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return typeof et!==St&&et.event.triggered!==t.type?et.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(pt)||[""],c=t.length;c--;)s=Ot.exec(t[c])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=et.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=et.event.special[p]||{},u=et.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&et.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=l[p])||(d=l[p]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,h,a)!==!1||e.addEventListener&&e.addEventListener(p,a,!1)),f.add&&(f.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,u):d.push(u),et.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,c,u,f,d,p,h,g,m=vt.hasData(e)&&vt.get(e);if(m&&(l=m.events)){for(t=(t||"").match(pt)||[""],c=t.length;c--;)if(s=Ot.exec(t[c])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=et.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=l[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)u=d[o],!i&&g!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,f.remove&&f.remove.call(e,u));a&&!d.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||et.removeEvent(e,p,m.handle),delete l[p])}else for(p in l)et.event.remove(e,p+t[c],n,r,!0);et.isEmptyObject(l)&&(delete m.handle,vt.remove(e,"events"))}},trigger:function(t,n,r,i){var o,a,s,l,c,u,f,d=[r||Q],p=G.call(t,"type")?t.type:t,h=G.call(t,"namespace")?t.namespace.split("."):[];if(a=s=r=r||Q,3!==r.nodeType&&8!==r.nodeType&&!Tt.test(p+et.event.triggered)&&(p.indexOf(".")>=0&&(h=p.split("."),p=h.shift(),h.sort()),c=p.indexOf(":")<0&&"on"+p,t=t[et.expando]?t:new et.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:et.makeArray(n,[t]),f=et.event.special[p]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!et.isWindow(r)){for(l=f.delegateType||p,Tt.test(l+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||Q)&&d.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)t.type=o>1?l:f.bindType||p,u=(vt.get(a,"events")||{})[t.type]&&vt.get(a,"handle"),u&&u.apply(a,n),u=c&&a[c],u&&u.apply&&et.acceptData(a)&&(t.result=u.apply(a,n),t.result===!1&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),n)!==!1||!et.acceptData(r)||c&&et.isFunction(r[p])&&!et.isWindow(r)&&(s=r[c],s&&(r[c]=null),et.event.triggered=p,r[p](),et.event.triggered=void 0,s&&(r[c]=s)),t.result}},dispatch:function(e){e=et.event.fix(e);var t,n,r,i,o,a=[],s=W.call(arguments),l=(vt.get(this,"events")||{})[e.type]||[],c=et.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(a=et.event.handlers.call(this,e,l),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((et.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!==this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(r=[],n=0;s>n;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?et(i,this).index(l)>=0:et.find(i,this,null,[l]).length),r[i]&&r.push(o);r.length&&a.push({elem:l,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Q,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[et.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=At.test(i)?this.mouseHooks:Et.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new et.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=Q),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==f()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&et.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return et.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=et.extend(new et.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?et.event.trigger(i,null,t):et.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},et.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},et.Event=function(e,t){return this instanceof et.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.getPreventDefault&&e.getPreventDefault()?c:u):this.type=e,t&&et.extend(this,t),this.timeStamp=e&&e.timeStamp||et.now(),void(this[et.expando]=!0)):new et.Event(e,t)},et.Event.prototype={isDefaultPrevented:u,isPropagationStopped:u,isImmediatePropagationStopped:u,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=c,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=c,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=c,this.stopPropagation()}},et.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){et.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!et.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),J.focusinBubbles||et.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){et.event.simulate(t,e.target,et.event.fix(e),!0)};et.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=vt.access(r,t);i||r.addEventListener(e,n,!0),vt.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=vt.access(r,t)-1;i?vt.access(r,t,i):(r.removeEventListener(e,n,!0),vt.remove(r,t))}}}),et.fn.extend({on:function(e,t,n,r,i){var o,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(a in e)this.on(a,t,n,e[a],i);return this}if(null==n&&null==r?(r=t,n=t=void 0):null==r&&("string"==typeof t?(r=n,n=void 0):(r=n,n=t,t=void 0)),r===!1)r=u;else if(!r)return this;return 1===i&&(o=r,r=function(e){return et().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=et.guid++)),this.each(function(){et.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,et(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=u),this.each(function(){et.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){et.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?et.event.trigger(e,t,n,!0):void 0}});var Nt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jt=/<([\w:]+)/,Mt=/<|&#?\w+;/,It=/<(?:script|style|link)/i,Dt=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^$|\/(?:java|ecma)script/i,Lt=/^true\/(.*)/,Ht=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Rt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Rt.optgroup=Rt.option,Rt.tbody=Rt.tfoot=Rt.colgroup=Rt.caption=Rt.thead,Rt.th=Rt.td,et.extend({clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=et.contains(e.ownerDocument,e);if(!(J.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||et.isXMLDoc(e)))for(a=v(s),o=v(e),r=0,i=o.length;i>r;r++)y(o[r],a[r]);if(t)if(n)for(o=o||v(e),a=a||v(s),r=0,i=o.length;i>r;r++)m(o[r],a[r]);else m(e,s);return a=v(s,"script"),a.length>0&&g(a,!l&&v(e,"script")),s},buildFragment:function(e,t,n,r){for(var i,o,a,s,l,c,u=t.createDocumentFragment(),f=[],d=0,p=e.length;p>d;d++)if(i=e[d],i||0===i)if("object"===et.type(i))et.merge(f,i.nodeType?[i]:i);else if(Mt.test(i)){for(o=o||u.appendChild(t.createElement("div")),a=(jt.exec(i)||["",""])[1].toLowerCase(),s=Rt[a]||Rt._default,o.innerHTML=s[1]+i.replace(Nt,"<$1></$2>")+s[2],c=s[0];c--;)o=o.lastChild;et.merge(f,o.childNodes),o=u.firstChild,o.textContent=""}else f.push(t.createTextNode(i));for(u.textContent="",d=0;i=f[d++];)if((!r||-1===et.inArray(i,r))&&(l=et.contains(i.ownerDocument,i),o=v(u.appendChild(i),"script"),l&&g(o),n))for(c=0;i=o[c++];)Pt.test(i.type||"")&&n.push(i);return u},cleanData:function(e){for(var t,n,r,i,o,a,s=et.event.special,l=0;void 0!==(n=e[l]);l++){if(et.acceptData(n)&&(o=n[vt.expando],o&&(t=vt.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(a=0;void 0!==(i=r[a]);a++)s[i]?et.event.remove(n,i):et.removeEvent(n,i,t.handle);vt.cache[o]&&delete vt.cache[o]}delete yt.cache[n[yt.expando]]}}}),et.fn.extend({text:function(e){return mt(this,function(e){return void 0===e?et.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=d(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=d(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?et.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||et.cleanData(v(n)),n.parentNode&&(t&&et.contains(n.ownerDocument,n)&&g(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(et.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return et.clone(this,e,t)})},html:function(e){return mt(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!It.test(e)&&!Rt[(jt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Nt,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(et.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,et.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=B.apply([],e);var n,r,i,o,a,s,l=0,c=this.length,u=this,f=c-1,d=e[0],g=et.isFunction(d);if(g||c>1&&"string"==typeof d&&!J.checkClone&&Dt.test(d))return this.each(function(n){var r=u.eq(n);g&&(e[0]=d.call(this,n,r.html())),r.domManip(e,t)});if(c&&(n=et.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(i=et.map(v(n,"script"),p),o=i.length;c>l;l++)a=n,l!==f&&(a=et.clone(a,!0,!0),o&&et.merge(i,v(a,"script"))),t.call(this[l],a,l);if(o)for(s=i[i.length-1].ownerDocument,et.map(i,h),l=0;o>l;l++)a=i[l],Pt.test(a.type||"")&&!vt.access(a,"globalEval")&&et.contains(s,a)&&(a.src?et._evalUrl&&et._evalUrl(a.src):et.globalEval(a.textContent.replace(Ht,"")))}return this}}),et.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){et.fn[e]=function(e){for(var n,r=[],i=et(e),o=i.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),et(i[a])[t](n),V.apply(r,n.get());return this.pushStack(r)}});var _t,Ft={},qt=/^margin/,Ut=new RegExp("^("+$t+")(?!px)[a-z%]+$","i"),Wt=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};!function(){function t(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",o.appendChild(a);var t=e.getComputedStyle(s,null);n="1%"!==t.top,r="4px"===t.width,o.removeChild(a)}var n,r,i="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",o=Q.documentElement,a=Q.createElement("div"),s=Q.createElement("div");s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",J.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(s),e.getComputedStyle&&et.extend(J,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},reliableMarginRight:function(){var t,n=s.appendChild(Q.createElement("div"));return n.style.cssText=s.style.cssText=i,n.style.marginRight=n.style.width="0",s.style.width="1px",o.appendChild(a),t=!parseFloat(e.getComputedStyle(n,null).marginRight),o.removeChild(a),s.innerHTML="",t}})}(),et.swap=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};var Bt=/^(none|table(?!-c[ea]).+)/,Vt=new RegExp("^("+$t+")(.*)$","i"),zt=new RegExp("^([+-])=("+$t+")","i"),Kt={position:"absolute",visibility:"hidden",display:"block"},Xt={letterSpacing:0,fontWeight:400},Gt=["Webkit","O","Moz","ms"];et.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=$(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=et.camelCase(t),l=e.style;return t=et.cssProps[s]||(et.cssProps[s]=w(l,s)),a=et.cssHooks[t]||et.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t]:(o=typeof n,"string"===o&&(i=zt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(et.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||et.cssNumber[s]||(n+="px"),J.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l[t]="",l[t]=n)),void 0)}},css:function(e,t,n,r){var i,o,a,s=et.camelCase(t);return t=et.cssProps[s]||(et.cssProps[s]=w(e.style,s)),a=et.cssHooks[t]||et.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=$(e,t,r)),"normal"===i&&t in Xt&&(i=Xt[t]),""===n||n?(o=parseFloat(i),n===!0||et.isNumeric(o)?o||0:i):i}}),et.each(["height","width"],function(e,t){et.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&Bt.test(et.css(e,"display"))?et.swap(e,Kt,function(){return E(e,t,r)}):E(e,t,r):void 0},set:function(e,n,r){var i=r&&Wt(e);return C(e,n,r?S(e,t,r,"border-box"===et.css(e,"boxSizing",!1,i),i):0)}}}),et.cssHooks.marginRight=k(J.reliableMarginRight,function(e,t){return t?et.swap(e,{display:"inline-block"},$,[e,"marginRight"]):void 0}),et.each({margin:"",padding:"",border:"Width"},function(e,t){et.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+kt[r]+t]=o[r]||o[r-2]||o[0];return i}},qt.test(e)||(et.cssHooks[e+t].set=C)}),et.fn.extend({css:function(e,t){return mt(this,function(e,t,n){var r,i,o={},a=0;if(et.isArray(t)){for(r=Wt(e),i=t.length;i>a;a++)o[t[a]]=et.css(e,t[a],!1,r);return o}return void 0!==n?et.style(e,t,n):et.css(e,t)},e,t,arguments.length>1)},show:function(){return A(this,!0)},hide:function(){return A(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){wt(this)?et(this).show():et(this).hide()})}}),et.Tween=T,T.prototype={constructor:T,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(et.cssNumber[n]?"":"px")},cur:function(){var e=T.propHooks[this.prop];return e&&e.get?e.get(this):T.propHooks._default.get(this)},run:function(e){var t,n=T.propHooks[this.prop];return this.pos=t=this.options.duration?et.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):T.propHooks._default.set(this),this}},T.prototype.init.prototype=T.prototype,T.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=et.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){et.fx.step[e.prop]?et.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[et.cssProps[e.prop]]||et.cssHooks[e.prop])?et.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},T.propHooks.scrollTop=T.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},et.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},et.fx=T.prototype.init,et.fx.step={};var Yt,Jt,Qt=/^(?:toggle|show|hide)$/,Zt=new RegExp("^(?:([+-])=|)("+$t+")([a-z%]*)$","i"),en=/queueHooks$/,tn=[M],nn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Zt.exec(t),o=i&&i[3]||(et.cssNumber[e]?"":"px"),a=(et.cssNumber[e]||"px"!==o&&+r)&&Zt.exec(et.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,et.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};et.Animation=et.extend(D,{tweener:function(e,t){et.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],nn[n]=nn[n]||[],nn[n].unshift(t)},prefilter:function(e,t){t?tn.unshift(e):tn.push(e)}}),et.speed=function(e,t,n){var r=e&&"object"==typeof e?et.extend({},e):{complete:n||!n&&t||et.isFunction(e)&&e,duration:e,easing:n&&t||t&&!et.isFunction(t)&&t};return r.duration=et.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in et.fx.speeds?et.fx.speeds[r.duration]:et.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){et.isFunction(r.old)&&r.old.call(this),r.queue&&et.dequeue(this,r.queue)},r},et.fn.extend({fadeTo:function(e,t,n,r){return this.filter(wt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=et.isEmptyObject(e),o=et.speed(t,n,r),a=function(){var t=D(this,et.extend({},e),o);(i||vt.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=et.timers,a=vt.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&en.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&et.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=vt.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=et.timers,a=r?r.length:0;for(n.finish=!0,et.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1)); | |
for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),et.each(["toggle","show","hide"],function(e,t){var n=et.fn[t];et.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(N(t,!0),e,r,i)}}),et.each({slideDown:N("show"),slideUp:N("hide"),slideToggle:N("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){et.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),et.timers=[],et.fx.tick=function(){var e,t=0,n=et.timers;for(Yt=et.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||et.fx.stop(),Yt=void 0},et.fx.timer=function(e){et.timers.push(e),e()?et.fx.start():et.timers.pop()},et.fx.interval=13,et.fx.start=function(){Jt||(Jt=setInterval(et.fx.tick,et.fx.interval))},et.fx.stop=function(){clearInterval(Jt),Jt=null},et.fx.speeds={slow:600,fast:200,_default:400},et.fn.delay=function(e,t){return e=et.fx?et.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e=Q.createElement("input"),t=Q.createElement("select"),n=t.appendChild(Q.createElement("option"));e.type="checkbox",J.checkOn=""!==e.value,J.optSelected=n.selected,t.disabled=!0,J.optDisabled=!n.disabled,e=Q.createElement("input"),e.value="t",e.type="radio",J.radioValue="t"===e.value}();var rn,on,an=et.expr.attrHandle;et.fn.extend({attr:function(e,t){return mt(this,et.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){et.removeAttr(this,e)})}}),et.extend({attr:function(e,t,n){var r,i,o=e.nodeType;return e&&3!==o&&8!==o&&2!==o?typeof e.getAttribute===St?et.prop(e,t,n):(1===o&&et.isXMLDoc(e)||(t=t.toLowerCase(),r=et.attrHooks[t]||(et.expr.match.bool.test(t)?on:rn)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=et.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void et.removeAttr(e,t)):void 0},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(pt);if(o&&1===e.nodeType)for(;n=o[i++];)r=et.propFix[n]||n,et.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!J.radioValue&&"radio"===t&&et.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),on={set:function(e,t,n){return t===!1?et.removeAttr(e,n):e.setAttribute(n,n),n}},et.each(et.expr.match.bool.source.match(/\w+/g),function(e,t){var n=an[t]||et.find.attr;an[t]=function(e,t,r){var i,o;return r||(o=an[t],an[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,an[t]=o),i}});var sn=/^(?:input|select|textarea|button)$/i;et.fn.extend({prop:function(e,t){return mt(this,et.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[et.propFix[e]||e]})}}),et.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,a=e.nodeType;return e&&3!==a&&8!==a&&2!==a?(o=1!==a||!et.isXMLDoc(e),o&&(t=et.propFix[t]||t,i=et.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]):void 0},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||sn.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),J.optSelected||(et.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),et.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){et.propFix[this.toLowerCase()]=this});var ln=/[\t\r\n\f]/g;et.fn.extend({addClass:function(e){var t,n,r,i,o,a,s="string"==typeof e&&e,l=0,c=this.length;if(et.isFunction(e))return this.each(function(t){et(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(pt)||[];c>l;l++)if(n=this[l],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ln," "):" ")){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a=et.trim(r),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,r,i,o,a,s=0===arguments.length||"string"==typeof e&&e,l=0,c=this.length;if(et.isFunction(e))return this.each(function(t){et(this).removeClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(pt)||[];c>l;l++)if(n=this[l],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ln," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");a=e?et.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(et.isFunction(e)?function(n){et(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,r=0,i=et(this),o=e.match(pt)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(n===St||"boolean"===n)&&(this.className&&vt.set(this,"__className__",this.className),this.className=this.className||e===!1?"":vt.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(ln," ").indexOf(t)>=0)return!0;return!1}});var cn=/\r/g;et.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=et.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,et(this).val()):e,null==i?i="":"number"==typeof i?i+="":et.isArray(i)&&(i=et.map(i,function(e){return null==e?"":e+""})),t=et.valHooks[this.type]||et.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=et.valHooks[i.type]||et.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(cn,""):null==n?"":n)):void 0}}),et.extend({valHooks:{select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(J.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&et.nodeName(n.parentNode,"optgroup"))){if(t=et(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=et.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=et.inArray(et(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),et.each(["radio","checkbox"],function(){et.valHooks[this]={set:function(e,t){return et.isArray(t)?e.checked=et.inArray(et(e).val(),t)>=0:void 0}},J.checkOn||(et.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),et.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){et.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),et.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var un=et.now(),fn=/\?/;et.parseJSON=function(e){return JSON.parse(e+"")},et.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&et.error("Invalid XML: "+e),t};var dn,pn,hn=/#.*$/,gn=/([?&])_=[^&]*/,mn=/^(.*?):[ \t]*([^\r\n]*)$/gm,vn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,yn=/^(?:GET|HEAD)$/,bn=/^\/\//,xn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,$n={},kn={},wn="*/".concat("*");try{pn=location.href}catch(Cn){pn=Q.createElement("a"),pn.href="",pn=pn.href}dn=xn.exec(pn.toLowerCase())||[],et.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:pn,type:"GET",isLocal:vn.test(dn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":wn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":et.parseJSON,"text xml":et.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?H(H(e,et.ajaxSettings),t):H(et.ajaxSettings,e)},ajaxPrefilter:P($n),ajaxTransport:P(kn),ajax:function(e,t){function n(e,t,n,a){var l,u,v,y,x,k=t;2!==b&&(b=2,s&&clearTimeout(s),r=void 0,o=a||"",$.readyState=e>0?4:0,l=e>=200&&300>e||304===e,n&&(y=R(f,$,n)),y=_(f,y,$,l),l?(f.ifModified&&(x=$.getResponseHeader("Last-Modified"),x&&(et.lastModified[i]=x),x=$.getResponseHeader("etag"),x&&(et.etag[i]=x)),204===e||"HEAD"===f.type?k="nocontent":304===e?k="notmodified":(k=y.state,u=y.data,v=y.error,l=!v)):(v=k,(e||!k)&&(k="error",0>e&&(e=0))),$.status=e,$.statusText=(t||k)+"",l?h.resolveWith(d,[u,k,$]):h.rejectWith(d,[$,k,v]),$.statusCode(m),m=void 0,c&&p.trigger(l?"ajaxSuccess":"ajaxError",[$,f,l?u:v]),g.fireWith(d,[$,k]),c&&(p.trigger("ajaxComplete",[$,f]),--et.active||et.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,l,c,u,f=et.ajaxSetup({},t),d=f.context||f,p=f.context&&(d.nodeType||d.jquery)?et(d):et.event,h=et.Deferred(),g=et.Callbacks("once memory"),m=f.statusCode||{},v={},y={},b=0,x="canceled",$={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!a)for(a={};t=mn.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else $.always(e[$.status]);return this},abort:function(e){var t=e||x;return r&&r.abort(t),n(0,t),this}};if(h.promise($).complete=g.add,$.success=$.done,$.error=$.fail,f.url=((e||f.url||pn)+"").replace(hn,"").replace(bn,dn[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=et.trim(f.dataType||"*").toLowerCase().match(pt)||[""],null==f.crossDomain&&(l=xn.exec(f.url.toLowerCase()),f.crossDomain=!(!l||l[1]===dn[1]&&l[2]===dn[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(dn[3]||("http:"===dn[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=et.param(f.data,f.traditional)),L($n,f,t,$),2===b)return $;c=f.global,c&&0===et.active++&&et.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!yn.test(f.type),i=f.url,f.hasContent||(f.data&&(i=f.url+=(fn.test(i)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=gn.test(i)?i.replace(gn,"$1_="+un++):i+(fn.test(i)?"&":"?")+"_="+un++)),f.ifModified&&(et.lastModified[i]&&$.setRequestHeader("If-Modified-Since",et.lastModified[i]),et.etag[i]&&$.setRequestHeader("If-None-Match",et.etag[i])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&$.setRequestHeader("Content-Type",f.contentType),$.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+wn+"; q=0.01":""):f.accepts["*"]);for(u in f.headers)$.setRequestHeader(u,f.headers[u]);if(f.beforeSend&&(f.beforeSend.call(d,$,f)===!1||2===b))return $.abort();x="abort";for(u in{success:1,error:1,complete:1})$[u](f[u]);if(r=L(kn,f,t,$)){$.readyState=1,c&&p.trigger("ajaxSend",[$,f]),f.async&&f.timeout>0&&(s=setTimeout(function(){$.abort("timeout")},f.timeout));try{b=1,r.send(v,n)}catch(k){if(!(2>b))throw k;n(-1,k)}}else n(-1,"No Transport");return $},getJSON:function(e,t,n){return et.get(e,t,n,"json")},getScript:function(e,t){return et.get(e,void 0,t,"script")}}),et.each(["get","post"],function(e,t){et[t]=function(e,n,r,i){return et.isFunction(n)&&(i=i||r,r=n,n=void 0),et.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),et.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){et.fn[t]=function(e){return this.on(t,e)}}),et._evalUrl=function(e){return et.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},et.fn.extend({wrapAll:function(e){var t;return et.isFunction(e)?this.each(function(t){et(this).wrapAll(e.call(this,t))}):(this[0]&&(t=et(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return this.each(et.isFunction(e)?function(t){et(this).wrapInner(e.call(this,t))}:function(){var t=et(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=et.isFunction(e);return this.each(function(n){et(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){et.nodeName(this,"body")||et(this).replaceWith(this.childNodes)}).end()}}),et.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},et.expr.filters.visible=function(e){return!et.expr.filters.hidden(e)};var Sn=/%20/g,En=/\[\]$/,An=/\r?\n/g,Tn=/^(?:submit|button|image|reset|file)$/i,On=/^(?:input|select|textarea|keygen)/i;et.param=function(e,t){var n,r=[],i=function(e,t){t=et.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=et.ajaxSettings&&et.ajaxSettings.traditional),et.isArray(e)||e.jquery&&!et.isPlainObject(e))et.each(e,function(){i(this.name,this.value)});else for(n in e)F(n,e[n],t,i);return r.join("&").replace(Sn,"+")},et.fn.extend({serialize:function(){return et.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=et.prop(this,"elements");return e?et.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!et(this).is(":disabled")&&On.test(this.nodeName)&&!Tn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=et(this).val();return null==n?null:et.isArray(n)?et.map(n,function(e){return{name:t.name,value:e.replace(An,"\r\n")}}):{name:t.name,value:n.replace(An,"\r\n")}}).get()}}),et.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Nn=0,jn={},Mn={0:200,1223:204},In=et.ajaxSettings.xhr();e.ActiveXObject&&et(e).on("unload",function(){for(var e in jn)jn[e]()}),J.cors=!!In&&"withCredentials"in In,J.ajax=In=!!In,et.ajaxTransport(function(e){var t;return J.cors||In&&!e.crossDomain?{send:function(n,r){var i,o=e.xhr(),a=++Nn;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)o.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete jn[a],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?r(o.status,o.statusText):r(Mn[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=jn[a]=t("abort"),o.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}:void 0}),et.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return et.globalEval(e),e}}}),et.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),et.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=et("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),Q.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Dn=[],Pn=/(=)\?(?=&|$)|\?\?/;et.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Dn.pop()||et.expando+"_"+un++;return this[e]=!0,e}}),et.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(Pn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Pn.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=et.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Pn,"$1"+i):t.jsonp!==!1&&(t.url+=(fn.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||et.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Dn.push(i)),a&&et.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),et.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Q;var r=at.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=et.buildFragment([e],t,i),i&&i.length&&et(i).remove(),et.merge([],r.childNodes))};var Ln=et.fn.load;et.fn.load=function(e,t,n){if("string"!=typeof e&&Ln)return Ln.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>=0&&(r=e.slice(s),e=e.slice(0,s)),et.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&et.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?et("<div>").append(et.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){a.each(n,o||[e.responseText,t,e])}),this},et.expr.filters.animated=function(e){return et.grep(et.timers,function(t){return e===t.elem}).length};var Hn=e.document.documentElement;et.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,c,u=et.css(e,"position"),f=et(e),d={};"static"===u&&(e.style.position="relative"),s=f.offset(),o=et.css(e,"top"),l=et.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1,c?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),et.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},et.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){et.offset.setOffset(this,e,t)});var t,n,r=this[0],i={top:0,left:0},o=r&&r.ownerDocument;return o?(t=o.documentElement,et.contains(t,r)?(typeof r.getBoundingClientRect!==St&&(i=r.getBoundingClientRect()),n=q(o),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i):void 0},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===et.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),et.nodeName(e[0],"html")||(r=e.offset()),r.top+=et.css(e[0],"borderTopWidth",!0),r.left+=et.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-et.css(n,"marginTop",!0),left:t.left-r.left-et.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Hn;e&&!et.nodeName(e,"html")&&"static"===et.css(e,"position");)e=e.offsetParent;return e||Hn})}}),et.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;et.fn[t]=function(i){return mt(this,function(t,i,o){var a=q(t);return void 0===o?a?a[n]:t[i]:void(a?a.scrollTo(r?e.pageXOffset:o,r?o:e.pageYOffset):t[i]=o)},t,i,arguments.length,null)}}),et.each(["top","left"],function(e,t){et.cssHooks[t]=k(J.pixelPosition,function(e,n){return n?(n=$(e,t),Ut.test(n)?et(e).position()[t]+"px":n):void 0})}),et.each({Height:"height",Width:"width"},function(e,t){et.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){et.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return mt(this,function(t,n,r){var i;return et.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?et.css(t,n,a):et.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),et.fn.size=function(){return this.length},et.fn.andSelf=et.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return et});var Rn=e.jQuery,_n=e.$;return et.noConflict=function(t){return e.$===et&&(e.$=_n),t&&e.jQuery===et&&(e.jQuery=Rn),et},typeof t===St&&(e.jQuery=e.$=et),et});{var i=e.$.noConflict();i.noConflict()}i.fn.extend({unwrapInner:function(e){return this.each(function(){var t=this,n=i(t).children(e);1===n.length&&(n.contents().appendTo(t),n.remove())})},textWidth:function(){i(this);i(this).wrapInner('<span id="text-width-calc"></span>');var e=i(this).find("#text-width-calc").width();return i(this).unwrapInner(),e}}),e.analytics=e.analytics||[],e.analytics.methods=["identify","group","track","page","pageview","alias","ready","on","once","off","trackLink","trackForm","trackClick","trackSubmit"],e.analytics.factory=function(t){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(t),e.analytics.push(n),e.analytics}};for(var o=0;o<e.analytics.methods.length;o++){var a=e.analytics.methods[o];e.analytics[a]=e.analytics.factory(a)}e.analytics.load=function(e){if(!t.getElementById("analytics-js")){var n=t.createElement("script");n.type="text/javascript",n.id="analytics-js",n.async=!0,n.src=("https:"===t.location.protocol?"https://":"http://")+"cdn.segment.io/analytics.js/v1/"+e+"/analytics.min.js",t.getElementsByTagName("head")[0].appendChild(n)}},e.analytics.SNIPPET_VERSION="2.0.9","localhost"===e.location.host||"localhost:4000"===e.location.host||"localhost:3000"===e.location.host?e.analytics.load("tu8x6gusvq"):e.analytics.load("kfah0efv5d"),e.analytics.page();{var s=!1;setTimeout(r,2e3)}e.analytics.ready(function(){olark("api.box.onShow",r)}),function(e){function n(e){return new RegExp("(^|\\s+)"+e+"(\\s+|$)")}function r(e,t){var n=i(e,t)?a:o;n(e,t)}var i,o,a;"classList"in t.documentElement?(i=function(e,t){return e.classList.contains(t)},o=function(e,t){e.classList.add(t)},a=function(e,t){e.classList.remove(t)}):(i=function(e,t){return n(t).test(e.className)},o=function(e,t){i(e,t)||(e.className=e.className+" "+t)},a=function(e,t){e.className=e.className.replace(n(t)," ")});var s={hasClass:i,addClass:o,removeClass:a,toggleClass:r,has:i,add:o,remove:a,toggle:r};e.classie=s}(e),function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var r=e.prototype,i=this,o=i.EventEmitter;r.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},r.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},r.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},r.addListener=function(e,n){var r,i=this.getListenersAsObject(e),o="object"==typeof n;for(r in i)i.hasOwnProperty(r)&&-1===t(i[r],n)&&i[r].push(o?n:{listener:n,once:!1});return this},r.on=n("addListener"),r.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},r.once=n("addOnceListener"),r.defineEvent=function(e){return this.getListeners(e),this},r.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},r.removeListener=function(e,n){var r,i,o=this.getListenersAsObject(e);for(i in o)o.hasOwnProperty(i)&&(r=t(o[i],n),-1!==r&&o[i].splice(r,1));return this},r.off=n("removeListener"),r.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},r.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},r.manipulateListeners=function(e,t,n){var r,i,o=e?this.removeListener:this.addListener,a=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)o.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(i=t[r])&&("function"==typeof i?o.call(this,r,i):a.call(this,r,i));return this},r.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},r.removeAllListeners=n("removeEvent"),r.emitEvent=function(e,t){var n,r,i,o,a=this.getListenersAsObject(e);for(i in a)if(a.hasOwnProperty(i))for(r=a[i].length;r--;)n=a[i][r],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},r.trigger=n("emitEvent"),r.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},r.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},r._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},r._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return i.EventEmitter=o,e},this.EventEmitter=e}(),function(e){function r(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var i=t.documentElement,o=function(){};i.addEventListener?o=function(e,t,n){e.addEventListener(t,n,!1)}:i.attachEvent&&(o=function(e,t,n){e[t+n]=n.handleEvent?function(){var t=r(e);n.handleEvent.call(n,t)}:function(){var t=r(e);n.call(e,t)},e.attachEvent("on"+t,e[t+n])});var a=function(){};i.removeEventListener?a=function(e,t,n){e.removeEventListener(t,n,!1)}:i.detachEvent&&(a=function(e,t,r){e.detachEvent("on"+t,e[t+r]);try{delete e[t+r]}catch(i){e[t+r]=n}});var s={bind:o,unbind:a};e.eventie=s}(this),function(e){function n(e){if(e){if("string"==typeof i[e])return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var t,n=0,o=r.length;o>n;n++)if(t=r[n]+e,"string"==typeof i[t])return t}}var r="Webkit Moz ms Ms O".split(" "),i=t.documentElement.style;e.getStyleProperty=n}(e),function(e){function n(e){var t=parseFloat(e),n=-1===e.indexOf("%")&&!isNaN(t);return n&&t}function r(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0,n=s.length;n>t;t++){var r=s[t];e[r]=0}return e}function i(e){function i(e){if("string"==typeof e&&(e=t.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var i=a(e);if("none"===i.display)return r();var o={};o.width=e.offsetWidth,o.height=e.offsetHeight;for(var f=o.isBorderBox=!(!u||!i[u]||"border-box"!==i[u]),d=0,p=s.length;p>d;d++){var h=s[d],g=i[h];g=l(e,g);var m=parseFloat(g);o[h]=isNaN(m)?0:m}var v=o.paddingLeft+o.paddingRight,y=o.paddingTop+o.paddingBottom,b=o.marginLeft+o.marginRight,x=o.marginTop+o.marginBottom,$=o.borderLeftWidth+o.borderRightWidth,k=o.borderTopWidth+o.borderBottomWidth,w=f&&c,C=n(i.width);C!==!1&&(o.width=C+(w?0:v+$));var S=n(i.height);return S!==!1&&(o.height=S+(w?0:y+k)),o.innerWidth=o.width-(v+$),o.innerHeight=o.height-(y+k),o.outerWidth=o.width+b,o.outerHeight=o.height+x,o}}function l(e,t){if(o||-1===t.indexOf("%"))return t;var n=e.style,r=n.left,i=e.runtimeStyle,a=i&&i.left;return a&&(i.left=e.currentStyle.left),n.left=t,t=n.pixelLeft,n.left=r,a&&(i.left=a),t}var c,u=e("boxSizing");return function(){if(u){var e=t.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[u]="border-box";var r=t.body||t.documentElement;r.appendChild(e);var i=a(e);c=200===n(i.width),r.removeChild(e)}}(),i}var o=e.getComputedStyle,a=o?function(e){return o(e,null)}:function(e){return e.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];e.getSize=i(e.getStyleProperty)}(e),function(e){function t(e,t){for(var n in t)e[n]=t[n];return e}function r(){}function i(i,o,s,u,f){function p(e,n){this.element="string"==typeof e?a.querySelector(e):e,this.options=t({},this.options),t(this.options,n),this._create()}function h(){return!1}function g(e,t){e.x=t.pageX!==n?t.pageX:t.clientX,e.y=t.pageY!==n?t.pageY:t.clientY}function m(e,t,n){return n=n||"round",t?Math[n](e/t)*t:e}var v=u("transform"),y=!!u("perspective");t(p.prototype,o.prototype),p.prototype.options={},p.prototype._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition=t({},this.position);var e=l(this.element);"relative"!==e.position&&"absolute"!==e.position&&(this.element.style.position="relative"),this.enable(),this.setHandles()},p.prototype.setHandles=function(){this.handles=this.options.handle?this.element.querySelectorAll(this.options.handle):[this.element];for(var t=0,n=this.handles.length;n>t;t++){var r=this.handles[t];e.navigator.pointerEnabled?(s.bind(r,"pointerdown",this),r.style.touchAction="none"):e.navigator.msPointerEnabled?(s.bind(r,"MSPointerDown",this),r.style.msTouchAction="none"):(s.bind(r,"mousedown",this),s.bind(r,"touchstart",this),x(r))}};var b="attachEvent"in a.documentElement,x=b?function(e){"IMG"===e.nodeName&&(e.ondragstart=h);for(var t=e.querySelectorAll("img"),n=0,r=t.length;r>n;n++){var i=t[n];i.ondragstart=h}}:r;p.prototype._getPosition=function(){var e=l(this.element),t=parseInt(e.left,10),n=parseInt(e.top,10);this.position.x=isNaN(t)?0:t,this.position.y=isNaN(n)?0:n,this._addTransformPosition(e)},p.prototype._addTransformPosition=function(e){if(v){var t=e[v];if(0===t.indexOf("matrix")){var n=t.split(","),r=0===t.indexOf("matrix3d")?12:4,i=parseInt(n[r],10),o=parseInt(n[r+1],10);this.position.x+=i,this.position.y+=o}}},p.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},p.prototype.getTouch=function(e){for(var t=0,n=e.length;n>t;t++){var r=e[t];if(r.identifier===this.pointerIdentifier)return r}},p.prototype.onmousedown=function(e){var t=e.button;t&&0!==t&&1!==t||this.dragStart(e,e)},p.prototype.ontouchstart=function(e){this.isDragging||this.dragStart(e,e.changedTouches[0])},p.prototype.onMSPointerDown=p.prototype.onpointerdown=function(e){this.isDragging||this.dragStart(e,e)};var $={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"],MSPointerDown:["MSPointerMove","MSPointerUp","MSPointerCancel"]};p.prototype.dragStart=function(t,r){this.isEnabled&&(t.preventDefault?t.preventDefault():t.returnValue=!1,this.pointerIdentifier=r.pointerId!==n?r.pointerId:r.identifier,this._getPosition(),this.measureContainment(),g(this.startPoint,r),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this._bindEvents({events:$[t.type],node:t.preventDefault?e:a}),i.add(this.element,"is-dragging"),this.isDragging=!0,this.emitEvent("dragStart",[this,t,r]),this.animate())},p.prototype._bindEvents=function(e){for(var t=0,n=e.events.length;n>t;t++){var r=e.events[t];s.bind(e.node,r,this)}this._boundEvents=e},p.prototype._unbindEvents=function(){var e=this._boundEvents;if(e&&e.events){for(var t=0,n=e.events.length;n>t;t++){var r=e.events[t];s.unbind(e.node,r,this)}delete this._boundEvents}},p.prototype.measureContainment=function(){var e=this.options.containment;if(e){this.size=f(this.element);var t=this.element.getBoundingClientRect(),n=c(e)?e:"string"==typeof e?a.querySelector(e):this.element.parentNode;this.containerSize=f(n);var r=n.getBoundingClientRect();this.relativeStartPosition={x:t.left-r.left,y:t.top-r.top}}},p.prototype.onmousemove=function(e){this.dragMove(e,e)},p.prototype.onMSPointerMove=p.prototype.onpointermove=function(e){e.pointerId===this.pointerIdentifier&&this.dragMove(e,e)},p.prototype.ontouchmove=function(e){var t=this.getTouch(e.changedTouches);t&&this.dragMove(e,t)},p.prototype.dragMove=function(e,t){g(this.dragPoint,t);var n=this.dragPoint.x-this.startPoint.x,r=this.dragPoint.y-this.startPoint.y,i=this.options.grid,o=i&&i[0],a=i&&i[1];n=m(n,o),r=m(r,a),n=this.containDrag("x",n,o),r=this.containDrag("y",r,a),n="y"===this.options.axis?0:n,r="x"===this.options.axis?0:r,this.position.x=this.startPosition.x+n,this.position.y=this.startPosition.y+r,this.dragPoint.x=n,this.dragPoint.y=r,this.emitEvent("dragMove",[this,e,t]) | |
},p.prototype.containDrag=function(e,t,n){if(!this.options.containment)return t;var r="x"===e?"width":"height",i=this.relativeStartPosition[e],o=m(-i,n,"ceil"),a=this.containerSize[r]-i-this.size[r];return a=m(a,n,"floor"),Math.min(a,Math.max(o,t))},p.prototype.onmouseup=function(e){this.dragEnd(e,e)},p.prototype.onMSPointerUp=p.prototype.onpointerup=function(e){e.pointerId===this.pointerIdentifier&&this.dragEnd(e,e)},p.prototype.ontouchend=function(e){var t=this.getTouch(e.changedTouches);t&&this.dragEnd(e,t)},p.prototype.dragEnd=function(e,t){this.isDragging=!1,delete this.pointerIdentifier,v&&(this.element.style[v]="",this.setLeftTop()),this._unbindEvents(),i.remove(this.element,"is-dragging"),this.emitEvent("dragEnd",[this,e,t])},p.prototype.onMSPointerCancel=p.prototype.onpointercancel=function(e){e.pointerId===this.pointerIdentifier&&this.dragEnd(e,e)},p.prototype.ontouchcancel=function(e){var t=this.getTouch(e.changedTouches);this.dragEnd(e,t)},p.prototype.animate=function(){if(this.isDragging){this.positionDrag();var e=this;d(function(){e.animate()})}};var k=y?function(e,t){return"translate3d( "+e+"px, "+t+"px, 0)"}:function(e,t){return"translate( "+e+"px, "+t+"px)"};return p.prototype.setLeftTop=function(){this.element.style.left=this.position.x+"px",this.element.style.top=this.position.y+"px"},p.prototype.positionDrag=v?function(){this.element.style[v]=k(this.dragPoint.x,this.dragPoint.y)}:p.prototype.setLeftTop,p.prototype.enable=function(){this.isEnabled=!0},p.prototype.disable=function(){this.isEnabled=!1,this.isDragging&&this.dragEnd()},p}for(var o,a=e.document,s=a.defaultView,l=s&&s.getComputedStyle?function(e){return s.getComputedStyle(e,null)}:function(e){return e.currentStyle},c="object"==typeof HTMLElement?function(e){return e instanceof HTMLElement}:function(e){return e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},u=0,f="webkit moz ms o".split(" "),d=e.requestAnimationFrame,p=e.cancelAnimationFrame,h=0;h<f.length&&(!d||!p);h++)o=f[h],d=d||e[o+"RequestAnimationFrame"],p=p||e[o+"CancelAnimationFrame"]||e[o+"CancelRequestAnimationFrame"];d&&p||(d=function(t){var n=(new Date).getTime(),r=Math.max(0,16-(n-u)),i=e.setTimeout(function(){t(n+r)},r);return u=n+r,i},p=function(t){e.clearTimeout(t)}),e.Draggabilly=i(e.classie,e.EventEmitter,e.eventie,e.getStyleProperty,e.getSize)}(e);{var l=e.Draggabilly,c=e.classie,u=e.EventEmitter,f=e.eventie,d=e.getStyleProperty,p=e.getSize,h=e.Draggabilly;e.classie,e.EventEmitter,e.eventie,e.getStyleProperty,e.getSize}e.Draggabilly=l,e.classie=c,e.EventEmitter=u,e.eventie=f,e.getStyleProperty=d,e.getSize=p,function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,o=Function.prototype,a=r.push,s=r.slice,l=r.concat,c=i.toString,u=i.hasOwnProperty,f=r.forEach,d=r.map,p=r.reduce,h=r.reduceRight,g=r.filter,m=r.every,v=r.some,y=r.indexOf,b=r.lastIndexOf,x=Array.isArray,$=Object.keys,k=o.bind,w=function(e){return e instanceof w?e:this instanceof w?void(this._wrapped=e):new w(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):e._=w,w.VERSION="1.6.0";var C=w.each=w.forEach=function(e,t,r){if(null==e)return e;if(f&&e.forEach===f)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,o=e.length;o>i;i++)if(t.call(r,e[i],i,e)===n)return}else for(var a=w.keys(e),i=0,o=a.length;o>i;i++)if(t.call(r,e[a[i]],a[i],e)===n)return;return e};w.map=w.collect=function(e,t,n){var r=[];return null==e?r:d&&e.map===d?e.map(t,n):(C(e,function(e,i,o){r.push(t.call(n,e,i,o))}),r)};var S="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(e,t,n,r){var i=arguments.length>2;if(null==e&&(e=[]),p&&e.reduce===p)return r&&(t=w.bind(t,r)),i?e.reduce(t,n):e.reduce(t);if(C(e,function(e,o,a){i?n=t.call(r,n,e,o,a):(n=e,i=!0)}),!i)throw new TypeError(S);return n},w.reduceRight=w.foldr=function(e,t,n,r){var i=arguments.length>2;if(null==e&&(e=[]),h&&e.reduceRight===h)return r&&(t=w.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var o=e.length;if(o!==+o){var a=w.keys(e);o=a.length}if(C(e,function(s,l,c){l=a?a[--o]:--o,i?n=t.call(r,n,e[l],l,c):(n=e[l],i=!0)}),!i)throw new TypeError(S);return n},w.find=w.detect=function(e,t,n){var r;return E(e,function(e,i,o){return t.call(n,e,i,o)?(r=e,!0):void 0}),r},w.filter=w.select=function(e,t,n){var r=[];return null==e?r:g&&e.filter===g?e.filter(t,n):(C(e,function(e,i,o){t.call(n,e,i,o)&&r.push(e)}),r)},w.reject=function(e,t,n){return w.filter(e,function(e,r,i){return!t.call(n,e,r,i)},n)},w.every=w.all=function(e,t,r){t||(t=w.identity);var i=!0;return null==e?i:m&&e.every===m?e.every(t,r):(C(e,function(e,o,a){return(i=i&&t.call(r,e,o,a))?void 0:n}),!!i)};var E=w.some=w.any=function(e,t,r){t||(t=w.identity);var i=!1;return null==e?i:v&&e.some===v?e.some(t,r):(C(e,function(e,o,a){return i||(i=t.call(r,e,o,a))?n:void 0}),!!i)};w.contains=w.include=function(e,t){return null==e?!1:y&&e.indexOf===y?-1!=e.indexOf(t):E(e,function(e){return e===t})},w.invoke=function(e,t){var n=s.call(arguments,2),r=w.isFunction(t);return w.map(e,function(e){return(r?t:e[t]).apply(e,n)})},w.pluck=function(e,t){return w.map(e,w.property(t))},w.where=function(e,t){return w.filter(e,w.matches(t))},w.findWhere=function(e,t){return w.find(e,w.matches(t))},w.max=function(e,t,n){if(!t&&w.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);var r=-1/0,i=-1/0;return C(e,function(e,o,a){var s=t?t.call(n,e,o,a):e;s>i&&(r=e,i=s)}),r},w.min=function(e,t,n){if(!t&&w.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);var r=1/0,i=1/0;return C(e,function(e,o,a){var s=t?t.call(n,e,o,a):e;i>s&&(r=e,i=s)}),r},w.shuffle=function(e){var t,n=0,r=[];return C(e,function(e){t=w.random(n++),r[n-1]=r[t],r[t]=e}),r},w.sample=function(e,t,n){return null==t||n?(e.length!==+e.length&&(e=w.values(e)),e[w.random(e.length-1)]):w.shuffle(e).slice(0,Math.max(0,t))};var A=function(e){return null==e?w.identity:w.isFunction(e)?e:w.property(e)};w.sortBy=function(e,t,n){return t=A(t),w.pluck(w.map(e,function(e,r,i){return{value:e,index:r,criteria:t.call(n,e,r,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return e.index-t.index}),"value")};var T=function(e){return function(t,n,r){var i={};return n=A(n),C(t,function(o,a){var s=n.call(r,o,a,t);e(i,s,o)}),i}};w.groupBy=T(function(e,t,n){w.has(e,t)?e[t].push(n):e[t]=[n]}),w.indexBy=T(function(e,t,n){e[t]=n}),w.countBy=T(function(e,t){w.has(e,t)?e[t]++:e[t]=1}),w.sortedIndex=function(e,t,n,r){n=A(n);for(var i=n.call(r,t),o=0,a=e.length;a>o;){var s=o+a>>>1;n.call(r,e[s])<i?o=s+1:a=s}return o},w.toArray=function(e){return e?w.isArray(e)?s.call(e):e.length===+e.length?w.map(e,w.identity):w.values(e):[]},w.size=function(e){return null==e?0:e.length===+e.length?e.length:w.keys(e).length},w.first=w.head=w.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:0>t?[]:s.call(e,0,t)},w.initial=function(e,t,n){return s.call(e,0,e.length-(null==t||n?1:t))},w.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:s.call(e,Math.max(e.length-t,0))},w.rest=w.tail=w.drop=function(e,t,n){return s.call(e,null==t||n?1:t)},w.compact=function(e){return w.filter(e,w.identity)};var O=function(e,t,n){return t&&w.every(e,w.isArray)?l.apply(n,e):(C(e,function(e){w.isArray(e)||w.isArguments(e)?t?a.apply(n,e):O(e,t,n):n.push(e)}),n)};w.flatten=function(e,t){return O(e,t,[])},w.without=function(e){return w.difference(e,s.call(arguments,1))},w.partition=function(e,t){var n=[],r=[];return C(e,function(e){(t(e)?n:r).push(e)}),[n,r]},w.uniq=w.unique=function(e,t,n,r){w.isFunction(t)&&(r=n,n=t,t=!1);var i=n?w.map(e,n,r):e,o=[],a=[];return C(i,function(n,r){(t?r&&a[a.length-1]===n:w.contains(a,n))||(a.push(n),o.push(e[r]))}),o},w.union=function(){return w.uniq(w.flatten(arguments,!0))},w.intersection=function(e){var t=s.call(arguments,1);return w.filter(w.uniq(e),function(e){return w.every(t,function(t){return w.contains(t,e)})})},w.difference=function(e){var t=l.apply(r,s.call(arguments,1));return w.filter(e,function(e){return!w.contains(t,e)})},w.zip=function(){for(var e=w.max(w.pluck(arguments,"length").concat(0)),t=new Array(e),n=0;e>n;n++)t[n]=w.pluck(arguments,""+n);return t},w.object=function(e,t){if(null==e)return{};for(var n={},r=0,i=e.length;i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},w.indexOf=function(e,t,n){if(null==e)return-1;var r=0,i=e.length;if(n){if("number"!=typeof n)return r=w.sortedIndex(e,t),e[r]===t?r:-1;r=0>n?Math.max(0,i+n):n}if(y&&e.indexOf===y)return e.indexOf(t,n);for(;i>r;r++)if(e[r]===t)return r;return-1},w.lastIndexOf=function(e,t,n){if(null==e)return-1;var r=null!=n;if(b&&e.lastIndexOf===b)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);for(var i=r?n:e.length;i--;)if(e[i]===t)return i;return-1},w.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=0,o=new Array(r);r>i;)o[i++]=e,e+=n;return o};var N=function(){};w.bind=function(e,t){var n,r;if(k&&e.bind===k)return k.apply(e,s.call(arguments,1));if(!w.isFunction(e))throw new TypeError;return n=s.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(s.call(arguments)));N.prototype=e.prototype;var i=new N;N.prototype=null;var o=e.apply(i,n.concat(s.call(arguments)));return Object(o)===o?o:i}},w.partial=function(e){var t=s.call(arguments,1);return function(){for(var n=0,r=t.slice(),i=0,o=r.length;o>i;i++)r[i]===w&&(r[i]=arguments[n++]);for(;n<arguments.length;)r.push(arguments[n++]);return e.apply(this,r)}},w.bindAll=function(e){var t=s.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return C(t,function(t){e[t]=w.bind(e[t],e)}),e},w.memoize=function(e,t){var n={};return t||(t=w.identity),function(){var r=t.apply(this,arguments);return w.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},w.delay=function(e,t){var n=s.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},w.defer=function(e){return w.delay.apply(w,[e,1].concat(s.call(arguments,1)))},w.throttle=function(e,t,n){var r,i,o,a=null,s=0;n||(n={});var l=function(){s=n.leading===!1?0:w.now(),a=null,o=e.apply(r,i),r=i=null};return function(){var c=w.now();s||n.leading!==!1||(s=c);var u=t-(c-s);return r=this,i=arguments,0>=u?(clearTimeout(a),a=null,s=c,o=e.apply(r,i),r=i=null):a||n.trailing===!1||(a=setTimeout(l,u)),o}},w.debounce=function(e,t,n){var r,i,o,a,s,l=function(){var c=w.now()-a;t>c?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(o,i),o=i=null))};return function(){o=this,i=arguments,a=w.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(o,i),o=i=null),s}},w.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},w.wrap=function(e,t){return w.partial(t,e)},w.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},w.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},w.keys=function(e){if(!w.isObject(e))return[];if($)return $(e);var t=[];for(var n in e)w.has(e,n)&&t.push(n);return t},w.values=function(e){for(var t=w.keys(e),n=t.length,r=new Array(n),i=0;n>i;i++)r[i]=e[t[i]];return r},w.pairs=function(e){for(var t=w.keys(e),n=t.length,r=new Array(n),i=0;n>i;i++)r[i]=[t[i],e[t[i]]];return r},w.invert=function(e){for(var t={},n=w.keys(e),r=0,i=n.length;i>r;r++)t[e[n[r]]]=n[r];return t},w.functions=w.methods=function(e){var t=[];for(var n in e)w.isFunction(e[n])&&t.push(n);return t.sort()},w.extend=function(e){return C(s.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},w.pick=function(e){var t={},n=l.apply(r,s.call(arguments,1));return C(n,function(n){n in e&&(t[n]=e[n])}),t},w.omit=function(e){var t={},n=l.apply(r,s.call(arguments,1));for(var i in e)w.contains(n,i)||(t[i]=e[i]);return t},w.defaults=function(e){return C(s.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e},w.clone=function(e){return w.isObject(e)?w.isArray(e)?e.slice():w.extend({},e):e},w.tap=function(e,t){return t(e),e};var j=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof w&&(e=e._wrapped),t instanceof w&&(t=t._wrapped);var i=c.call(e);if(i!=c.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;for(var o=n.length;o--;)if(n[o]==e)return r[o]==t;var a=e.constructor,s=t.constructor;if(a!==s&&!(w.isFunction(a)&&a instanceof a&&w.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1;n.push(e),r.push(t);var l=0,u=!0;if("[object Array]"==i){if(l=e.length,u=l==t.length)for(;l--&&(u=j(e[l],t[l],n,r)););}else{for(var f in e)if(w.has(e,f)&&(l++,!(u=w.has(t,f)&&j(e[f],t[f],n,r))))break;if(u){for(f in t)if(w.has(t,f)&&!l--)break;u=!l}}return n.pop(),r.pop(),u};w.isEqual=function(e,t){return j(e,t,[],[])},w.isEmpty=function(e){if(null==e)return!0;if(w.isArray(e)||w.isString(e))return 0===e.length;for(var t in e)if(w.has(e,t))return!1;return!0},w.isElement=function(e){return!(!e||1!==e.nodeType)},w.isArray=x||function(e){return"[object Array]"==c.call(e)},w.isObject=function(e){return e===Object(e)},C(["Arguments","Function","String","Number","Date","RegExp"],function(e){w["is"+e]=function(t){return c.call(t)=="[object "+e+"]"}}),w.isArguments(arguments)||(w.isArguments=function(e){return!(!e||!w.has(e,"callee"))}),"function"!=typeof/./&&(w.isFunction=function(e){return"function"==typeof e}),w.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},w.isNaN=function(e){return w.isNumber(e)&&e!=+e},w.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==c.call(e)},w.isNull=function(e){return null===e},w.isUndefined=function(e){return void 0===e},w.has=function(e,t){return u.call(e,t)},w.noConflict=function(){return e._=t,this},w.identity=function(e){return e},w.constant=function(e){return function(){return e}},w.property=function(e){return function(t){return t[e]}},w.matches=function(e){return function(t){if(t===e)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0}},w.times=function(e,t,n){for(var r=Array(Math.max(0,e)),i=0;e>i;i++)r[i]=t.call(n,i);return r},w.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},w.now=Date.now||function(){return(new Date).getTime()};var M={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};M.unescape=w.invert(M.escape);var I={escape:new RegExp("["+w.keys(M.escape).join("")+"]","g"),unescape:new RegExp("("+w.keys(M.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(e){w[e]=function(t){return null==t?"":(""+t).replace(I[e],function(t){return M[e][t]})}}),w.result=function(e,t){if(null==e)return void 0;var n=e[t];return w.isFunction(n)?n.call(e):n},w.mixin=function(e){C(w.functions(e),function(t){var n=w[t]=e[t];w.prototype[t]=function(){var e=[this._wrapped];return a.apply(e,arguments),R.call(this,n.apply(w,e))}})};var D=0;w.uniqueId=function(e){var t=++D+"";return e?e+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var P=/(.)^/,L={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},H=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(e,t,n){var r;n=w.defaults({},n,w.templateSettings);var i=new RegExp([(n.escape||P).source,(n.interpolate||P).source,(n.evaluate||P).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(i,function(t,n,r,i,s){return a+=e.slice(o,s).replace(H,function(e){return"\\"+L[e]}),n&&(a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(a+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(a+="';\n"+i+"\n__p+='"),o=s+t.length,t}),a+="';\n",n.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(n.variable||"obj","_",a)}catch(s){throw s.source=a,s}if(t)return r(t,w);var l=function(e){return r.call(this,e,w)};return l.source="function("+(n.variable||"obj")+"){\n"+a+"}",l},w.chain=function(e){return w(e).chain()};var R=function(e){return this._chain?w(e).chain():e};w.mixin(w),C(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];w.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!=e&&"splice"!=e||0!==n.length||delete n[0],R.call(this,n)}}),C(["concat","join","slice"],function(e){var t=r[e];w.prototype[e]=function(){return R.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return w})}.call(this),e.$k=e.$k||{},e.$k.config=e.$k.config||{},e.$k.loaded=!0,e.$k.config.serverEnv="prod",e.$k.config.clientEnv="angular",i(t).ready(function(){var r=i("body")[0],o=i("#Kimonify")[0];if(!(r&&o&&i.contains(r,o))){{e.angular}e.angular={};var s=e.angular;!function(e,t,n){"use strict";function r(e){return function(){var t,n,r=arguments[0],i="["+(e?e+":":"")+r+"] ",o=arguments[1],a=arguments,s=function(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e};for(t=i+o.replace(/\{\d+\}/g,function(e){var t,n=+e.slice(1,-1);return n+2<a.length?(t=a[n+2],"function"==typeof t?t.toString().replace(/ ?\{[\s\S]*$/,""):"undefined"==typeof t?"undefined":"string"!=typeof t?W(t):t):e}),t=t+"\nhttp://errors.angularjs.org/1.2.17/"+(e?e+"/":"")+r,n=2;n<arguments.length;n++)t=t+(2==n?"?":"&")+"p"+(n-2)+"="+encodeURIComponent(s(arguments[n]));return new Error(t)}}function i(e){if(null==e||E(e))return!1;var t=e.length;return 1===e.nodeType&&t?!0:x(e)||w(e)||0===t||"number"==typeof t&&t>0&&t-1 in e}function o(e,t,n){var r;if(e)if(C(e))for(r in e)"prototype"==r||"length"==r||"name"==r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r);else if(e.forEach&&e.forEach!==o)e.forEach(t,n);else if(i(e))for(r=0;r<e.length;r++)t.call(n,e[r],r);else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r);return e}function a(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function s(e,t,n){for(var r=a(e),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function l(e){return function(t,n){e(n,t)}}function c(){for(var e,t=Tr.length;t;){if(t--,e=Tr[t].charCodeAt(0),57==e)return Tr[t]="A",Tr.join("");if(90!=e)return Tr[t]=String.fromCharCode(e+1),Tr.join("");Tr[t]="0"}return Tr.unshift("0"),Tr.join("")}function u(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function f(e){var t=e.$$hashKey;return o(arguments,function(t){t!==e&&o(t,function(t,n){e[n]=t})}),u(e,t),e}function d(e){return parseInt(e,10)}function p(e,t){return f(new(f(function(){},{prototype:e})),t)}function h(){}function g(e){return e}function m(e){return function(){return e}}function v(e){return"undefined"==typeof e}function y(e){return"undefined"!=typeof e}function b(e){return null!=e&&"object"==typeof e}function x(e){return"string"==typeof e}function $(e){return"number"==typeof e}function k(e){return"[object Date]"===Sr.call(e)}function w(e){return"[object Array]"===Sr.call(e)}function C(e){return"function"==typeof e}function S(e){return"[object RegExp]"===Sr.call(e)}function E(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function A(e){return e&&e.$evalAsync&&e.$watch}function T(e){return"[object File]"===Sr.call(e)}function O(e){return"[object Blob]"===Sr.call(e)}function N(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function j(e,t,n){var r=[];return o(e,function(e,i,o){r.push(t.call(n,e,i,o))}),r}function M(e,t){return-1!=I(e,t)}function I(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1}function D(e,t){var n=I(e,t);return n>=0&&e.splice(n,1),t}function P(e,t,n,r){if(E(e)||A(e))throw Er("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(t){if(e===t)throw Er("cpi","Can't copy! Source and destination are identical.");if(n=n||[],r=r||[],b(e)){var i=I(n,e);if(-1!==i)return r[i];n.push(e),r.push(t)}var a;if(w(e)){t.length=0;for(var s=0;s<e.length;s++)a=P(e[s],null,n,r),b(e[s])&&(n.push(e[s]),r.push(a)),t.push(a)}else{var l=t.$$hashKey;o(t,function(e,n){delete t[n]});for(var c in e)a=P(e[c],null,n,r),b(e[c])&&(n.push(e[c]),r.push(a)),t[c]=a;u(t,l)}}else t=e,e&&(w(e)?t=P(e,[],n,r):k(e)?t=new Date(e.getTime()):S(e)?t=new RegExp(e.source):b(e)&&(t=P(e,{},n,r)));return t}function L(e,t){if(w(e)){t=t||[];for(var n=0;n<e.length;n++)t[n]=e[n]}else if(b(e)){t=t||{};for(var r in e)!hr.call(e,r)||"$"===r.charAt(0)&&"$"===r.charAt(1)||(t[r]=e[r])}return t||e}function H(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var r,i,o,a=typeof e,s=typeof t;if(a==s&&"object"==a){if(!w(e)){if(k(e))return k(t)&&e.getTime()==t.getTime();if(S(e)&&S(t))return e.toString()==t.toString();if(A(e)||A(t)||E(e)||E(t)||w(t))return!1;o={};for(i in e)if("$"!==i.charAt(0)&&!C(e[i])){if(!H(e[i],t[i]))return!1;o[i]=!0}for(i in t)if(!o.hasOwnProperty(i)&&"$"!==i.charAt(0)&&t[i]!==n&&!C(t[i]))return!1;return!0}if(!w(t))return!1;if((r=e.length)==t.length){for(i=0;r>i;i++)if(!H(e[i],t[i]))return!1;return!0}}return!1}function R(){return t.securityPolicy&&t.securityPolicy.isActive||t.querySelector&&!(!t.querySelector("[ng-csp]")&&!t.querySelector("[data-ng-csp]"))}function _(e,t,n){return e.concat(wr.call(t,n))}function F(e,t){return wr.call(e,t||0)}function q(e,t){var n=arguments.length>2?F(arguments,2):[];return!C(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(wr.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function U(e,r){var i=r;return"string"==typeof e&&"$"===e.charAt(0)?i=n:E(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":A(r)&&(i="$SCOPE"),i}function W(e,t){return"undefined"==typeof e?n:JSON.stringify(e,U,t?" ":null)}function B(e){return x(e)?JSON.parse(e):e}function V(e){if("function"==typeof e)e=!0;else if(e&&0!==e.length){var t=pr(""+e);e=!("f"==t||"0"==t||"false"==t||"no"==t||"n"==t||"[]"==t)}else e=!1;return e}function z(e){e=br(e).clone();try{e.empty()}catch(t){}var n=3,r=br("<div>").append(e).html();try{return e[0].nodeType===n?pr(r):r.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+pr(t)})}catch(t){return pr(r)}}function K(e){try{return decodeURIComponent(e)}catch(t){}}function X(e){var t,n,r={};return o((e||"").split("&"),function(e){if(e&&(t=e.split("="),n=K(t[0]),y(n))){var i=y(t[1])?K(t[1]):!0;r[n]?w(r[n])?r[n].push(i):r[n]=[r[n],i]:r[n]=i}}),r}function G(e){var t=[];return o(e,function(e,n){w(e)?o(e,function(e){t.push(J(n,!0)+(e===!0?"":"="+J(e,!0)))}):t.push(J(n,!0)+(e===!0?"":"="+J(e,!0)))}),t.length?t.join("&"):""}function Y(e){return J(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function J(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function Q(e,n){function r(e){e&&s.push(e)}var i,a,s=[e],l=["ng:app","ng-app","x-ng-app","data-ng-app"],c=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;o(l,function(n){l[n]=!0,r(t.getElementById(n)),n=n.replace(":","\\:"),e.querySelectorAll&&(o(e.querySelectorAll("."+n),r),o(e.querySelectorAll("."+n+"\\:"),r),o(e.querySelectorAll("["+n+"]"),r))}),o(s,function(e){if(!i){var t=" "+e.className+" ",n=c.exec(t);n?(i=e,a=(n[2]||"").replace(/\s+/g,",")):o(e.attributes,function(t){!i&&l[t.name]&&(i=e,a=t.value)})}}),i&&n(i,a?[a]:[])}function Z(n,r){var i=function(){if(n=br(n),n.injector()){var e=n[0]===t?"document":z(n);throw Er("btstrpd","App Already Bootstrapped with this Element '{0}'",e)}r=r||[],r.unshift(["$provide",function(e){e.value("$rootElement",n)}]),r.unshift("ng");var i=Dt(r);return i.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),i},a=/^NG_DEFER_BOOTSTRAP!/;return e&&!a.test(e.name)?i():(e.name=e.name.replace(a,""),Ar.resumeBootstrap=function(e){o(e,function(e){r.push(e)}),i()},void 0)}function et(e,t){return t=t||"_",e.replace(Nr,function(e,n){return(n?t:"")+e.toLowerCase()})}function tt(){xr=e.jQuery,xr&&xr.fn.on?(br=xr,f(xr.fn,{scope:Vr.scope,isolateScope:Vr.isolateScope,controller:Vr.controller,injector:Vr.injector,inheritedData:Vr.inheritedData}),ft("remove",!0,!0,!1),ft("empty",!1,!1,!1),ft("html",!1,!1,!0)):br=gt,Ar.element=br}function nt(e,t,n){if(!e)throw Er("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function rt(e,t,n){return n&&w(e)&&(e=e[e.length-1]),nt(C(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function it(e,t){if("hasOwnProperty"===e)throw Er("badname","hasOwnProperty is not a valid {0} name",t)}function ot(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;a>s;s++)r=i[s],e&&(e=(o=e)[r]);return!n&&C(e)?q(o,e):e}function at(e){var t=e[0],n=e[e.length-1];if(t===n)return br(t);var r=t,i=[r];do{if(r=r.nextSibling,!r)break;i.push(r)}while(r!==n);return br(i)}function st(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=r("$injector"),i=r("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||r,t(o,"module",function(){var e={};return function(r,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)};return s(r,"module"),o&&e.hasOwnProperty(r)&&(e[r]=null),t(e,r,function(){function e(e,n,r){return function(){return t[r||"push"]([e,n,arguments]),l}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var t=[],i=[],s=e("$injector","invoke"),l={_invokeQueue:t,_runBlocks:i,requires:o,name:r,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:s,run:function(e){return i.push(e),this}};return a&&s(a),l})}})}function lt(t){f(t,{bootstrap:Z,copy:P,extend:f,equals:H,element:br,forEach:o,injector:Dt,noop:h,bind:q,toJson:W,fromJson:B,identity:g,isUndefined:v,isDefined:y,isString:x,isFunction:C,isObject:b,isNumber:$,isElement:N,isArray:w,version:jr,isDate:k,lowercase:pr,uppercase:gr,callbacks:{counter:0},$$minErr:r,$$csp:R}),$r=st(e);try{$r("ngLocale")}catch(n){$r("ngLocale",[]).provider("$locale",rn)}$r("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:jn}),e.provider("$compile",qt).directive({a:Si,input:Pi,textarea:Pi,form:Oi,script:vo,select:xo,style:ko,option:$o,ngBind:Ki,ngBindHtml:Gi,ngBindTemplate:Xi,ngClass:Yi,ngClassEven:Qi,ngClassOdd:Ji,ngCloak:Zi,ngController:eo,ngForm:Ni,ngHide:uo,ngIf:no,ngInclude:ro,ngInit:oo,ngNonBindable:ao,ngPluralize:so,ngRepeat:lo,ngShow:co,ngStyle:fo,ngSwitch:po,ngSwitchWhen:ho,ngSwitchDefault:go,ngOptions:bo,ngTransclude:mo,ngModel:qi,ngList:Bi,ngChange:Ui,required:Wi,ngRequired:Wi,ngValue:zi}).directive({ngInclude:io}).directive(Ei).directive(to),e.provider({$anchorScroll:Pt,$animate:ei,$browser:Rt,$cacheFactory:_t,$controller:Bt,$document:Vt,$exceptionHandler:zt,$filter:Un,$interpolate:tn,$interval:nn,$http:Jt,$httpBackend:Zt,$location:vn,$log:yn,$parse:En,$rootScope:Nn,$q:An,$sce:Ln,$sceDelegate:Pn,$sniffer:Hn,$templateCache:Ft,$timeout:Rn,$window:qn,$$rAF:On,$$asyncCallback:Lt})}])}function ct(){return++Dr}function ut(e){return e.replace(Hr,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Rr,"Moz$1")}function ft(e,t,n,r){function i(e){var i,a,s,l,c,u,f,d=n&&e?[this.filter(e)]:[this],p=t;if(!r||null!=e)for(;d.length;)for(i=d.shift(),a=0,s=i.length;s>a;a++)for(l=br(i[a]),p?l.triggerHandler("$destroy"):p=!p,c=0,u=(f=l.children()).length;u>c;c++)d.push(xr(f[c]));return o.apply(this,arguments)}var o=xr.fn[e];o=o.$original||o,i.$original=o,xr.fn[e]=i}function dt(e){return!qr.test(e)}function pt(e,t){var n,r,i,o,a,s,l=t.createDocumentFragment(),c=[];if(dt(e))c.push(t.createTextNode(e));else{for(n=l.appendChild(t.createElement("div")),r=(Ur.exec(e)||["",""])[1].toLowerCase(),i=Br[r]||Br._default,n.innerHTML="<div> </div>"+i[1]+e.replace(Wr,"<$1></$2>")+i[2],n.removeChild(n.firstChild),o=i[0];o--;)n=n.lastChild;for(a=0,s=n.childNodes.length;s>a;++a)c.push(n.childNodes[a]);n=l.firstChild,n.textContent=""}return l.textContent="",l.innerHTML="",c}function ht(e,n){n=n||t;var r;return(r=Fr.exec(e))?[n.createElement(r[1])]:pt(e,n)}function gt(e){if(e instanceof gt)return e;if(x(e)&&(e=Or(e)),!(this instanceof gt)){if(x(e)&&"<"!=e.charAt(0))throw _r("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new gt(e)}if(x(e)){St(this,ht(e));var n=br(t.createDocumentFragment());n.append(this)}else St(this,e)}function mt(e){return e.cloneNode(!0)}function vt(e){bt(e);for(var t=0,n=e.childNodes||[];t<n.length;t++)vt(n[t])}function yt(e,t,n,r){if(y(r))throw _r("offargs","jqLite#off() does not support the `selector` argument");var i=xt(e,"events"),a=xt(e,"handle");a&&(v(t)?o(i,function(t,n){Lr(e,n,t),delete i[n]}):o(t.split(" "),function(t){v(n)?(Lr(e,t,i[t]),delete i[t]):D(i[t]||[],n)}))}function bt(e,t){var r=e[Ir],i=Mr[r];if(i){if(t)return delete Mr[r].data[t],void 0;i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),yt(e)),delete Mr[r],e[Ir]=n}}function xt(e,t,n){var r=e[Ir],i=Mr[r||-1];return y(n)?(i||(e[Ir]=r=ct(),i=Mr[r]={}),i[t]=n,void 0):i&&i[t]}function $t(e,t,n){var r=xt(e,"data"),i=y(n),o=!i&&y(t),a=o&&!b(t);if(r||a||xt(e,"data",r={}),i)r[t]=n;else{if(!o)return r;if(a)return r&&r[t];f(r,t)}}function kt(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function wt(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",Or((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Or(t)+" "," ")))})}function Ct(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=Or(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Or(n))}}function St(e,t){if(t){t=t.nodeName||!y(t.length)||E(t)?[t]:t;for(var n=0;n<t.length;n++)e.push(t[n])}}function Et(e,t){return At(e,"$"+(t||"ngController")+"Controller")}function At(e,t,r){e=br(e),9==e[0].nodeType&&(e=e.find("html"));for(var i=w(t)?t:[t];e.length;){for(var o=e[0],a=0,s=i.length;s>a;a++)if((r=e.data(i[a]))!==n)return r;e=br(o.parentNode||11===o.nodeType&&o.host)}}function Tt(e){for(var t=0,n=e.childNodes;t<n.length;t++)vt(n[t]);for(;e.firstChild;)e.removeChild(e.firstChild)}function Ot(e,t){var n=zr[t.toLowerCase()];return n&&Kr[e.nodeName]&&n}function Nt(e,n){var r=function(r,i){if(r.preventDefault||(r.preventDefault=function(){r.returnValue=!1}),r.stopPropagation||(r.stopPropagation=function(){r.cancelBubble=!0}),r.target||(r.target=r.srcElement||t),v(r.defaultPrevented)){var a=r.preventDefault;r.preventDefault=function(){r.defaultPrevented=!0,a.call(r)},r.defaultPrevented=!1}r.isDefaultPrevented=function(){return r.defaultPrevented||r.returnValue===!1};var s=L(n[i||r.type]||[]);o(s,function(t){t.call(e,r)}),8>=yr?(r.preventDefault=null,r.stopPropagation=null,r.isDefaultPrevented=null):(delete r.preventDefault,delete r.stopPropagation,delete r.isDefaultPrevented)};return r.elem=e,r}function jt(e){var t,r=typeof e;return"object"==r&&null!==e?"function"==typeof(t=e.$$hashKey)?t=e.$$hashKey():t===n&&(t=e.$$hashKey=c()):t=e,r+":"+t | |
}function Mt(e){o(e,this.put,this)}function It(e){var t,n,r,i;return"function"==typeof e?(t=e.$inject)||(t=[],e.length&&(n=e.toString().replace(Jr,""),r=n.match(Xr),o(r[1].split(Gr),function(e){e.replace(Yr,function(e,n,r){t.push(r)})})),e.$inject=t):w(e)?(i=e.length-1,rt(e[i],"fn"),t=e.slice(0,i)):rt(e,"fn",!0),t}function Dt(e){function t(e){return function(t,n){return b(t)?(o(t,l(e)),void 0):e(t,n)}}function n(e,t){if(it(e,"service"),(C(t)||w(t))&&(t=$.instantiate(t)),!t.$get)throw Qr("pget","Provider '{0}' must define $get factory method.",e);return y[e+p]=t}function r(e,t){return n(e,{$get:t})}function i(e,t){return r(e,["$injector",function(e){return e.instantiate(t)}])}function a(e,t){return r(e,m(t))}function s(e,t){it(e,"constant"),y[e]=t,k[e]=t}function c(e,t){var n=$.get(e+p),r=n.$get;n.$get=function(){var e=S.invoke(r,n);return S.invoke(t,null,{$delegate:e})}}function u(e){var t,n,r,i,a=[];return o(e,function(e){if(!v.get(e)){v.put(e,!0);try{if(x(e))for(t=$r(e),a=a.concat(u(t.requires)).concat(t._runBlocks),n=t._invokeQueue,r=0,i=n.length;i>r;r++){var o=n[r],s=$.get(o[0]);s[o[1]].apply(s,o[2])}else C(e)?a.push($.invoke(e)):w(e)?a.push($.invoke(e)):rt(e,"module")}catch(l){throw w(e)&&(e=e[e.length-1]),l.message&&l.stack&&-1==l.stack.indexOf(l.message)&&(l=l.message+"\n"+l.stack),Qr("modulerr","Failed to instantiate module {0} due to:\n{1}",e,l.stack||l.message||l)}}}),a}function f(e,t){function n(n){if(e.hasOwnProperty(n)){if(e[n]===d)throw Qr("cdep","Circular dependency found: {0}",g.join(" <- "));return e[n]}try{return g.unshift(n),e[n]=d,e[n]=t(n)}catch(r){throw e[n]===d&&delete e[n],r}finally{g.shift()}}function r(e,t,r){var i,o,a,s=[],l=It(e);for(o=0,i=l.length;i>o;o++){if(a=l[o],"string"!=typeof a)throw Qr("itkn","Incorrect injection token! Expected service name as string, got {0}",a);s.push(r&&r.hasOwnProperty(a)?r[a]:n(a))}return e.$inject||(e=e[i]),e.apply(t,s)}function i(e,t){var n,i,o=function(){};return o.prototype=(w(e)?e[e.length-1]:e).prototype,n=new o,i=r(e,n,t),b(i)||C(i)?i:n}return{invoke:r,instantiate:i,get:n,annotate:It,has:function(t){return y.hasOwnProperty(t+p)||e.hasOwnProperty(t)}}}var d={},p="Provider",g=[],v=new Mt,y={$provide:{provider:t(n),factory:t(r),service:t(i),value:t(a),constant:t(s),decorator:c}},$=y.$injector=f(y,function(){throw Qr("unpr","Unknown provider: {0}",g.join(" <- "))}),k={},S=k.$injector=f(k,function(e){var t=$.get(e+p);return S.invoke(t.$get,t)});return o(u(e),function(e){S.invoke(e||h)}),S}function Pt(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return o(e,function(e){t||"a"!==pr(e.nodeName)||(t=e)}),t}function a(){var e,r=n.hash();r?(e=s.getElementById(r))?e.scrollIntoView():(e=i(s.getElementsByName(r)))?e.scrollIntoView():"top"===r&&t.scrollTo(0,0):t.scrollTo(0,0)}var s=t.document;return e&&r.$watch(function(){return n.hash()},function(){r.$evalAsync(a)}),a}]}function Lt(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function Ht(e,t,r,i){function a(e){try{e.apply(null,F(arguments,1))}finally{if(y--,0===y)for(;b.length;)try{b.pop()()}catch(t){r.error(t)}}}function s(e,t){!function n(){o(k,function(e){e()}),$=t(n,e)}()}function l(){S=null,w!=c.url()&&(w=c.url(),o(E,function(e){e(c.url())}))}var c=this,u=t[0],f=e.location,d=e.history,p=e.setTimeout,g=e.clearTimeout,m={};c.isMock=!1;var y=0,b=[];c.$$completeOutstandingRequest=a,c.$$incOutstandingRequestCount=function(){y++},c.notifyWhenNoOutstandingRequests=function(e){o(k,function(e){e()}),0===y?e():b.push(e)};var $,k=[];c.addPollFn=function(e){return v($)&&s(100,p),k.push(e),e};var w=f.href,C=t.find("base"),S=null;c.url=function(t,n){if(f!==e.location&&(f=e.location),d!==e.history&&(d=e.history),t){if(w==t)return;return w=t,i.history?n?d.replaceState(null,"",t):(d.pushState(null,"",t),C.attr("href",C.attr("href"))):(S=t,n?f.replace(t):f.href=t),c}return S||f.href.replace(/%27/g,"'")};var E=[],A=!1;c.onUrlChange=function(t){return A||(i.history&&br(e).on("popstate",l),i.hashchange?br(e).on("hashchange",l):c.addPollFn(l),A=!0),E.push(t),t},c.baseHref=function(){var e=C.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var T={},O="",N=c.baseHref();c.cookies=function(e,t){var i,o,a,s,l;if(!e){if(u.cookie!==O)for(O=u.cookie,o=O.split("; "),T={},s=0;s<o.length;s++)a=o[s],l=a.indexOf("="),l>0&&(e=unescape(a.substring(0,l)),T[e]===n&&(T[e]=unescape(a.substring(l+1))));return T}t===n?u.cookie=escape(e)+"=;path="+N+";expires=Thu, 01 Jan 1970 00:00:00 GMT":x(t)&&(i=(u.cookie=escape(e)+"="+escape(t)+";path="+N).length+1,i>4096&&r.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+i+" > 4096 bytes)!"))},c.defer=function(e,t){var n;return y++,n=p(function(){delete m[n],a(e)},t||0),m[n]=!0,n},c.defer.cancel=function(e){return m[e]?(delete m[e],g(e),a(h),!0):!1}}function Rt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new Ht(e,r,t,n)}]}function _t(){this.$get=function(){function e(e,n){function i(e){e!=d&&(p?p==e&&(p=e.n):p=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=f({},n,{id:e}),l={},c=n&&n.capacity||Number.MAX_VALUE,u={},d=null,p=null;return t[e]={put:function(e,t){if(c<Number.MAX_VALUE){var n=u[e]||(u[e]={key:e});i(n)}if(!v(t))return e in l||a++,l[e]=t,a>c&&this.remove(p.key),t},get:function(e){if(c<Number.MAX_VALUE){var t=u[e];if(!t)return;i(t)}return l[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=u[e];if(!t)return;t==d&&(d=t.p),t==p&&(p=t.n),o(t.n,t.p),delete u[e]}delete l[e],a--},removeAll:function(){l={},a=0,u={},d=p=null},destroy:function(){l=null,s=null,u=null,delete t[e]},info:function(){return f({},s,{size:a})}}}var t={};return e.info=function(){var e={};return o(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function Ft(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function qt(e,r){var i={},a="Directive",s=/^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,c=/(([\d\w_\-]+)(?:\:([^;]+))?;?)/,u=/^(on[a-z]+|formaction)$/;this.directive=function d(t,n){return it(t,"directive"),x(t)?(nt(n,"directiveFactory"),i.hasOwnProperty(t)||(i[t]=[],e.factory(t+a,["$injector","$exceptionHandler",function(e,n){var r=[];return o(i[t],function(i,o){try{var a=e.invoke(i);C(a)?a={compile:m(a)}:!a.compile&&a.link&&(a.compile=m(a.link)),a.priority=a.priority||0,a.index=o,a.name=a.name||t,a.require=a.require||a.controller&&a.name,a.restrict=a.restrict||"A",r.push(a)}catch(s){n(s)}}),r}])),i[t].push(n)):o(t,l(d)),this},this.aHrefSanitizationWhitelist=function(e){return y(e)?(r.aHrefSanitizationWhitelist(e),this):r.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(r.imgSrcSanitizationWhitelist(e),this):r.imgSrcSanitizationWhitelist()},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(e,r,l,d,h,v,y,$,k,S,E,A){function T(e,t,n,r,i){e instanceof br||(e=br(e)),o(e,function(t,n){3==t.nodeType&&t.nodeValue.match(/\S+/)&&(e[n]=t=br(t).wrap("<span></span>").parent()[0])});var a=N(e,t,e,n,r,i);return O(e,"ng-scope"),function(t,n,r){nt(t,"scope");var i=n?Vr.clone.call(e):e;o(r,function(e,t){i.data("$"+t+"Controller",e)});for(var s=0,l=i.length;l>s;s++){var c=i[s],u=c.nodeType;(1===u||9===u)&&i.eq(s).data("$scope",t)}return n&&n(i,t),a&&a(t,i,i),i}}function O(e,t){try{e.addClass(t)}catch(n){}}function N(e,t,r,i,o,a){function s(e,r,i,o){var a,s,l,c,u,f,d,p,g,m=r.length,v=new Array(m);for(d=0;m>d;d++)v[d]=r[d];for(d=0,g=0,p=h.length;p>d;g++)l=v[g],a=h[d++],s=h[d++],c=br(l),a?(a.scope?(u=e.$new(),c.data("$scope",u)):u=e,f=a.transclude,f||!o&&t?a(s,u,l,i,j(e,f||t)):a(s,u,l,i,o)):s&&s(e,l.childNodes,n,o)}for(var l,c,u,f,d,p,h=[],g=0;g<e.length;g++)l=new Q,c=M(e[g],[],l,0===g?i:n,o),u=c.length?P(c,e[g],l,t,r,null,[],[],a):null,u&&u.scope&&O(br(e[g]),"ng-scope"),d=u&&u.terminal||!(f=e[g].childNodes)||!f.length?null:N(f,u?u.transclude:t),h.push(u,d),p=p||u||d,a=null;return p?s:null}function j(e,t){return function(n,r,i){var o=!1;n||(n=e.$new(),n.$$transcluded=!0,o=!0);var a=t(n,r,i);return o&&a.on("$destroy",q(n,n.$destroy)),a}}function M(e,t,n,r,i){var o,a,l=e.nodeType,u=n.$attr;switch(l){case 1:_(t,Ut(kr(e).toLowerCase()),"E",r,i);for(var f,d,p,h,g,m=e.attributes,v=0,y=m&&m.length;y>v;v++){var b=!1,$=!1;if(f=m[v],!yr||yr>=8||f.specified){d=f.name,h=Ut(d),it.test(h)&&(d=et(h.substr(6),"-"));var k=h.replace(/(Start|End)$/,"");h===k+"Start"&&(b=d,$=d.substr(0,d.length-5)+"end",d=d.substr(0,d.length-6)),p=Ut(d.toLowerCase()),u[p]=d,n[p]=g=Or(f.value),Ot(e,p)&&(n[p]=!0),G(e,t,g,p),_(t,p,"A",r,i,b,$)}}if(a=e.className,x(a)&&""!==a)for(;o=c.exec(a);)p=Ut(o[2]),_(t,p,"C",r,i)&&(n[p]=Or(o[3])),a=a.substr(o.index+o[0].length);break;case 3:K(t,e.nodeValue);break;case 8:try{o=s.exec(e.nodeValue),o&&(p=Ut(o[1]),_(t,p,"M",r,i)&&(n[p]=Or(o[2])))}catch(w){}}return t.sort(B),t}function I(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw ti("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);1==e.nodeType&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return br(r)}function D(e,t,n){return function(r,i,o,a,s){return i=I(i[0],t,n),e(r,i,o,a,s)}}function P(e,i,a,s,c,u,f,d,p){function h(e,t,n,r){e&&(n&&(e=D(e,n,r)),e.require=k.require,e.directiveName=S,(_===k||k.$$isolateScope)&&(e=J(e,{isolateScope:!0})),f.push(e)),t&&(n&&(t=D(t,n,r)),t.require=k.require,t.directiveName=S,(_===k||k.$$isolateScope)&&(t=J(t,{isolateScope:!0})),d.push(t))}function g(e,t,n,r){var i,a="data",s=!1;if(x(t)){for(;"^"==(i=t.charAt(0))||"?"==i;)t=t.substr(1),"^"==i&&(a="inheritedData"),s=s||"?"==i;if(i=null,r&&"data"===a&&(i=r[t]),i=i||n[a]("$"+t+"Controller"),!i&&!s)throw ti("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return i}return w(t)&&(i=[],o(t,function(t){i.push(g(e,t,n,r))})),i}function m(e,t,s,c,u){function p(e,t){var r;return arguments.length<2&&(t=e,e=n),X&&(r=S),u(e,t,r)}var h,m,b,x,$,k,w,C,S={};if(h=i===s?a:L(a,new Q(br(s),a.$attr)),m=h.$$element,_){var E=/^\s*([@=&])(\??)\s*(\w*)\s*$/,A=br(s);w=t.$new(!0),!q||q!==_&&q!==_.$$originalDirective?A.data("$isolateScopeNoTemplate",w):A.data("$isolateScope",w),O(A,"ng-isolate-scope"),o(_.scope,function(e,n){var i,o,a,s,l=e.match(E)||[],c=l[3]||n,u="?"==l[2],f=l[1];switch(w.$$isolateBindings[n]=f+c,f){case"@":h.$observe(c,function(e){w[n]=e}),h.$$observers[c].$$scope=t,h[c]&&(w[n]=r(h[c])(t));break;case"=":if(u&&!h[c])return;o=v(h[c]),s=o.literal?H:function(e,t){return e===t},a=o.assign||function(){throw i=w[n]=o(t),ti("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",h[c],_.name)},i=w[n]=o(t),w.$watch(function(){var e=o(t);return s(e,w[n])||(s(e,i)?a(t,e=w[n]):w[n]=e),i=e},null,o.literal);break;case"&":o=v(h[c]),w[n]=function(e){return o(t,e)};break;default:throw ti("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",_.name,n,e)}})}for(C=u&&p,P&&o(P,function(e){var n,r={$scope:e===_||e.$$isolateScope?w:t,$element:m,$attrs:h,$transclude:C};k=e.controller,"@"==k&&(k=h[e.name]),n=y(k,r),S[e.name]=n,X||m.data("$"+e.name+"Controller",n),e.controllerAs&&(r.$scope[e.controllerAs]=n)}),b=0,x=f.length;x>b;b++)try{$=f[b],$($.isolateScope?w:t,m,h,$.require&&g($.directiveName,$.require,m,S),C)}catch(T){l(T,z(m))}var N=t;for(_&&(_.template||null===_.templateUrl)&&(N=w),e&&e(N,s.childNodes,n,u),b=d.length-1;b>=0;b--)try{$=d[b],$($.isolateScope?w:t,m,h,$.require&&g($.directiveName,$.require,m,S),C)}catch(T){l(T,z(m))}}p=p||{};for(var $,k,S,E,A,N,j=-Number.MAX_VALUE,P=p.controllerDirectives,_=p.newIsolateScopeDirective,q=p.templateDirective,B=p.nonTlbTranscludeDirective,K=!1,X=p.hasElementTranscludeDirective,G=a.$$element=br(i),Z=u,et=s,tt=0,nt=e.length;nt>tt;tt++){k=e[tt];var it=k.$$start,ot=k.$$end;if(it&&(G=I(i,it,ot)),E=n,j>k.priority)break;if((N=k.scope)&&($=$||k,k.templateUrl||(V("new/isolated scope",_,k,G),b(N)&&(_=k))),S=k.name,!k.templateUrl&&k.controller&&(N=k.controller,P=P||{},V("'"+S+"' controller",P[S],k,G),P[S]=k),(N=k.transclude)&&(K=!0,k.$$tlb||(V("transclusion",B,k,G),B=k),"element"==N?(X=!0,j=k.priority,E=I(i,it,ot),G=a.$$element=br(t.createComment(" "+S+": "+a[S]+" ")),i=G[0],Y(c,br(F(E)),i),et=T(E,s,j,Z&&Z.name,{nonTlbTranscludeDirective:B})):(E=br(mt(i)).contents(),G.empty(),et=T(E,s))),k.template)if(V("template",q,k,G),q=k,N=C(k.template)?k.template(G,a):k.template,N=rt(N),k.replace){if(Z=k,E=dt(N)?[]:br(Or(N)),i=E[0],1!=E.length||1!==i.nodeType)throw ti("tplrt","Template for directive '{0}' must have exactly one root element. {1}",S,"");Y(c,G,i);var at={$attr:{}},st=M(i,[],at),lt=e.splice(tt+1,e.length-(tt+1));_&&R(st),e=e.concat(st).concat(lt),U(a,at),nt=e.length}else G.html(N);if(k.templateUrl)V("template",q,k,G),q=k,k.replace&&(Z=k),m=W(e.splice(tt,e.length-tt),G,a,c,et,f,d,{controllerDirectives:P,newIsolateScopeDirective:_,templateDirective:q,nonTlbTranscludeDirective:B}),nt=e.length;else if(k.compile)try{A=k.compile(G,a,et),C(A)?h(null,A,it,ot):A&&h(A.pre,A.post,it,ot)}catch(ct){l(ct,z(G))}k.terminal&&(m.terminal=!0,j=Math.max(j,k.priority))}return m.scope=$&&$.scope===!0,m.transclude=K&&et,p.hasElementTranscludeDirective=X,m}function R(e){for(var t=0,n=e.length;n>t;t++)e[t]=p(e[t],{$$isolateScope:!0})}function _(t,r,o,s,c,u,f){if(r===c)return null;var d=null;if(i.hasOwnProperty(r))for(var h,g=e.get(r+a),m=0,v=g.length;v>m;m++)try{h=g[m],(s===n||s>h.priority)&&-1!=h.restrict.indexOf(o)&&(u&&(h=p(h,{$$start:u,$$end:f})),t.push(h),d=h)}catch(y){l(y)}return d}function U(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;o(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),o(t,function(t,o){"class"==o?(O(i,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(i.attr("style",i.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,r[o]=n[o])})}function W(e,t,n,r,i,a,s,l){var c,u,p=[],g=t[0],m=e.shift(),v=f({},m,{templateUrl:null,transclude:null,replace:null,$$originalDirective:m}),y=C(m.templateUrl)?m.templateUrl(t,n):m.templateUrl;return t.empty(),d.get(S.getTrustedResourceUrl(y),{cache:h}).success(function(f){var d,h,x,$;if(f=rt(f),m.replace){if(x=dt(f)?[]:br(Or(f)),d=x[0],1!=x.length||1!==d.nodeType)throw ti("tplrt","Template for directive '{0}' must have exactly one root element. {1}",m.name,y);h={$attr:{}},Y(r,t,d);var k=M(d,[],h);b(m.scope)&&R(k),e=k.concat(e),U(n,h)}else d=g,t.html(f);for(e.unshift(v),c=P(e,d,n,i,t,m,a,s,l),o(r,function(e,n){e==d&&(r[n]=t[0])}),u=N(t[0].childNodes,i);p.length;){var w=p.shift(),C=p.shift(),S=p.shift(),E=p.shift(),A=t[0];if(C!==g){var T=C.className;l.hasElementTranscludeDirective&&m.replace||(A=mt(d)),Y(S,br(C),A),O(br(A),T)}$=c.transclude?j(w,c.transclude):E,c(u,w,A,r,$)}p=null}).error(function(e,t,n,r){throw ti("tpload","Failed to load template: {0}",r.url)}),function(e,t,n,r,i){p?(p.push(t),p.push(n),p.push(r),p.push(i)):c(u,t,n,r,i)}}function B(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function V(e,t,n,r){if(t)throw ti("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",t.name,n.name,e,z(r))}function K(e,t){var n=r(t,!0);n&&e.push({priority:0,compile:m(function(e,t){var r=t.parent(),i=r.data("$binding")||[];i.push(n),O(r.data("$binding",i),"ng-binding"),e.$watch(n,function(e){t[0].nodeValue=e})})})}function X(e,t){if("srcdoc"==t)return S.HTML;var n=kr(e);return"xlinkHref"==t||"FORM"==n&&"action"==t||"IMG"!=n&&("src"==t||"ngSrc"==t)?S.RESOURCE_URL:void 0}function G(e,t,n,i){var o=r(n,!0);if(o){if("multiple"===i&&"SELECT"===kr(e))throw ti("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",z(e));t.push({priority:100,compile:function(){return{pre:function(t,n,a){var s=a.$$observers||(a.$$observers={});if(u.test(i))throw ti("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");o=r(a[i],!0,X(e,i)),o&&(a[i]=o(t),(s[i]||(s[i]=[])).$$inter=!0,(a.$$observers&&a.$$observers[i].$$scope||t).$watch(o,function(e,t){"class"===i&&e!=t?a.$updateClass(e,t):a.$set(i,e)}))}}}})}}function Y(e,n,r){var i,o,a=n[0],s=n.length,l=a.parentNode;if(e)for(i=0,o=e.length;o>i;i++)if(e[i]==a){e[i++]=r;for(var c=i,u=c+s-1,f=e.length;f>c;c++,u++)f>u?e[c]=e[u]:delete e[c];e.length-=s-1;break}l&&l.replaceChild(r,a);var d=t.createDocumentFragment();d.appendChild(a),r[br.expando]=a[br.expando];for(var p=1,h=n.length;h>p;p++){var g=n[p];br(g).remove(),d.appendChild(g),delete n[p]}n[0]=r,n.length=1}function J(e,t){return f(function(){return e.apply(null,arguments)},e,t)}var Q=function(e,t){this.$$element=e,this.$attr=t||{}};Q.prototype={$normalize:Ut,$addClass:function(e){e&&e.length>0&&E.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&E.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Wt(e,t),r=Wt(t,e);0===n.length?E.removeClass(this.$$element,r):0===r.length?E.addClass(this.$$element,n):E.setClass(this.$$element,n,r)},$set:function(e,t,r,i){var a,s=Ot(this.$$element[0],e);s&&(this.$$element.prop(e,t),i=s),this[e]=t,i?this.$attr[e]=i:(i=this.$attr[e],i||(this.$attr[e]=i=et(e,"-"))),a=kr(this.$$element),("A"===a&&"href"===e||"IMG"===a&&"src"===e)&&(this[e]=t=A(t,"src"===e)),r!==!1&&(null===t||t===n?this.$$element.removeAttr(i):this.$$element.attr(i,t));var c=this.$$observers;c&&o(c[e],function(e){try{e(t)}catch(n){l(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers={}),i=r[e]||(r[e]=[]);return i.push(t),$.$evalAsync(function(){i.$$inter||t(n[e])}),t}};var Z=r.startSymbol(),tt=r.endSymbol(),rt="{{"==Z||"}}"==tt?g:function(e){return e.replace(/\{\{/g,Z).replace(/}}/g,tt)},it=/^ngAttr[A-Z]/;return T}]}function Ut(e){return ut(e.replace(ni,""))}function Wt(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o<r.length;o++){for(var a=r[o],s=0;s<i.length;s++)if(a==i[s])continue e;n+=(n.length>0?" ":"")+a}return n}function Bt(){var e={},t=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){it(t,"controller"),b(t)?f(e,t):e[t]=n},this.$get=["$injector","$window",function(n,i){return function(o,a){var s,l,c,u;if(x(o)&&(l=o.match(t),c=l[1],u=l[3],o=e.hasOwnProperty(c)?e[c]:ot(a.$scope,c,!0)||ot(i,c,!0),rt(o,c,!0)),s=n.instantiate(o,a),u){if(!a||"object"!=typeof a.$scope)throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",c||o.name,u);a.$scope[u]=s}return s}}]}function Vt(){this.$get=["$window",function(e){return br(e.document)}]}function zt(){this.$get=["$log",function(e){return function(){e.error.apply(e,arguments)}}]}function Kt(e){var t,n,r,i={};return e?(o(e.split("\n"),function(e){r=e.indexOf(":"),t=pr(Or(e.substr(0,r))),n=Or(e.substr(r+1)),t&&(i[t]?i[t]+=", "+n:i[t]=n)}),i):i}function Xt(e){var t=b(e)?e:n;return function(n){return t||(t=Kt(e)),n?t[pr(n)]||null:t}}function Gt(e,t,n){return C(n)?n(e,t):(o(n,function(n){e=n(e,t)}),e)}function Yt(e){return e>=200&&300>e}function Jt(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,r=/^\)\]\}',?\n/,i={"Content-Type":"application/json;charset=utf-8"},a=this.defaults={transformResponse:[function(n){return x(n)&&(n=n.replace(r,""),e.test(n)&&t.test(n)&&(n=B(n))),n}],transformRequest:[function(e){return!b(e)||T(e)||O(e)?e:W(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:L(i),put:L(i),patch:L(i)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},l=this.interceptors=[],c=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,r,i,u,d){function p(e){function r(e){var t=f({},e,{data:Gt(e.data,e.headers,s.transformResponse)});return Yt(e.status)?t:u.reject(t)}function i(e){function t(e){var t;o(e,function(n,r){C(n)&&(t=n(),null!=t?e[r]=t:delete e[r])})}var n,r,i,s=a.headers,l=f({},e.headers);s=f({},s.common,s[pr(e.method)]),t(s),t(l);e:for(n in s){r=pr(n);for(i in l)if(pr(i)===r)continue e;l[n]=s[n]}return l}var s={method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse},l=i(e);f(s,e),s.headers=l,s.method=gr(s.method);var c=Fn(s.url)?t.cookies()[s.xsrfCookieName||a.xsrfCookieName]:n;c&&(l[s.xsrfHeaderName||a.xsrfHeaderName]=c);var d=function(e){l=e.headers;var t=Gt(e.data,Xt(l),e.transformRequest);return v(e.data)&&o(l,function(e,t){"content-type"===pr(t)&&delete l[t]}),v(e.withCredentials)&&!v(a.withCredentials)&&(e.withCredentials=a.withCredentials),m(e,t,l).then(r,r)},p=[d,n],h=u.when(s);for(o(S,function(e){(e.request||e.requestError)&&p.unshift(e.request,e.requestError),(e.response||e.responseError)&&p.push(e.response,e.responseError)});p.length;){var g=p.shift(),y=p.shift();h=h.then(g,y)}return h.success=function(e){return h.then(function(t){e(t.data,t.status,t.headers,s)}),h},h.error=function(e){return h.then(null,function(t){e(t.data,t.status,t.headers,s)}),h},h}function h(){o(arguments,function(e){p[e]=function(t,n){return p(f(n||{},{method:e,url:t}))}})}function g(){o(arguments,function(e){p[e]=function(t,n,r){return p(f(r||{},{method:e,url:t,data:n}))}})}function m(t,n,r){function o(e,t,n,r){c&&(Yt(e)?c.put(g,[e,t,Kt(n),r]):c.remove(g)),s(t,e,n,r),i.$$phase||i.$apply()}function s(e,n,r,i){n=Math.max(n,0),(Yt(n)?d.resolve:d.reject)({data:e,status:n,headers:Xt(r),config:t,statusText:i})}function l(){var e=I(p.pendingRequests,t);-1!==e&&p.pendingRequests.splice(e,1)}var c,f,d=u.defer(),h=d.promise,g=$(t.url,t.params);if(p.pendingRequests.push(t),h.then(l,l),(t.cache||a.cache)&&t.cache!==!1&&"GET"==t.method&&(c=b(t.cache)?t.cache:b(a.cache)?a.cache:k),c)if(f=c.get(g),y(f)){if(f.then)return f.then(l,l),f;w(f)?s(f[1],f[0],L(f[2]),f[3]):s(f,200,{},"OK")}else c.put(g,h);return v(f)&&e(t.method,g,n,o,r,t.timeout,t.withCredentials,t.responseType),h}function $(e,t){if(!t)return e;var n=[];return s(t,function(e,t){null===e||v(e)||(w(e)||(e=[e]),o(e,function(e){b(e)&&(e=W(e)),n.push(J(t)+"="+J(e))}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}var k=r("$http"),S=[];return o(l,function(e){S.unshift(x(e)?d.get(e):d.invoke(e))}),o(c,function(e,t){var n=x(e)?d.get(e):d.invoke(e);S.splice(t,0,{response:function(e){return n(u.when(e))},responseError:function(e){return n(u.reject(e))}})}),p.pendingRequests=[],h("get","delete","head","jsonp"),g("post","put"),p.defaults=a,p}]}function Qt(t){if(8>=yr&&(!t.match(/^(get|post|head|put|delete|options)$/i)||!e.XMLHttpRequest))return new e.ActiveXObject("Microsoft.XMLHTTP");if(e.XMLHttpRequest)return new e.XMLHttpRequest;throw r("$httpBackend")("noxhr","This browser does not support XMLHttpRequest.")}function Zt(){this.$get=["$browser","$window","$document",function(e,t,n){return en(e,Qt,e.defer,t.angular.callbacks,n[0])}]}function en(e,t,n,r,i){function a(e,t,n){var o=i.createElement("script"),a=null;return o.type="text/javascript",o.src=e,o.async=!0,a=function(e){Lr(o,"load",a),Lr(o,"error",a),i.body.removeChild(o),o=null;var s=-1,l="unknown";e&&("load"!==e.type||r[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},Pr(o,"load",a),Pr(o,"error",a),8>=yr&&(o.onreadystatechange=function(){x(o.readyState)&&/loaded|complete/.test(o.readyState)&&(o.onreadystatechange=null,a({type:"load"}))}),i.body.appendChild(o),a}var s=-1;return function(i,l,c,u,f,d,p,g){function m(){b=s,$&&$(),k&&k.abort()}function v(t,r,i,o,a){C&&n.cancel(C),$=k=null,0===r&&(r=i?200:"file"==_n(l).protocol?404:0),r=1223===r?204:r,a=a||"",t(r,i,o,a),e.$$completeOutstandingRequest(h)}var b;if(e.$$incOutstandingRequestCount(),l=l||e.url(),"jsonp"==pr(i)){var x="_"+(r.counter++).toString(36);r[x]=function(e){r[x].data=e,r[x].called=!0};var $=a(l.replace("JSON_CALLBACK","angular.callbacks."+x),x,function(e,t){v(u,e,r[x].data,"",t),r[x]=h})}else{var k=t(i);if(k.open(i,l,!0),o(f,function(e,t){y(e)&&k.setRequestHeader(t,e)}),k.onreadystatechange=function(){if(k&&4==k.readyState){var e=null,t=null;b!==s&&(e=k.getAllResponseHeaders(),t="response"in k?k.response:k.responseText),v(u,b||k.status,t,e,k.statusText||"")}},p&&(k.withCredentials=!0),g)try{k.responseType=g}catch(w){if("json"!==g)throw w}k.send(c||null)}if(d>0)var C=n(m,d);else d&&d.then&&d.then(m)}}function tn(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(o,l,c){for(var u,f,d,p,h=0,g=[],m=o.length,v=!1,y=[];m>h;)-1!=(u=o.indexOf(e,h))&&-1!=(f=o.indexOf(t,u+a))?(h!=u&&g.push(o.substring(h,u)),g.push(d=n(p=o.substring(u+a,f))),d.exp=p,h=f+s,v=!0):(h!=m&&g.push(o.substring(h)),h=m);if((m=g.length)||(g.push(""),m=1),c&&g.length>1)throw ri("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",o);return!l||v?(y.length=m,d=function(e){try{for(var t,n=0,a=m;a>n;n++){if("function"==typeof(t=g[n]))if(t=t(e),t=c?i.getTrusted(c,t):i.valueOf(t),null==t)t="";else switch(typeof t){case"string":break;case"number":t=""+t;break;default:t=W(t)}y[n]=t}return y.join("")}catch(s){var l=ri("interr","Can't interpolate: {0}\n{1}",o,s.toString());r(l)}},d.exp=o,d.parts=g,d):void 0}var a=e.length,s=t.length;return o.startSymbol=function(){return e},o.endSymbol=function(){return t},o}]}function nn(){this.$get=["$rootScope","$window","$q",function(e,t,n){function r(r,o,a,s){var l=t.setInterval,c=t.clearInterval,u=n.defer(),f=u.promise,d=0,p=y(s)&&!s;return a=y(a)?a:0,f.then(null,null,r),f.$$intervalId=l(function(){u.notify(d++),a>0&&d>=a&&(u.resolve(d),c(f.$$intervalId),delete i[f.$$intervalId]),p||e.$apply()},o),i[f.$$intervalId]=u,f}var i={};return r.cancel=function(e){return e&&e.$$intervalId in i?(i[e.$$intervalId].reject("canceled"),clearInterval(e.$$intervalId),delete i[e.$$intervalId],!0):!1},r}]}function rn(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(e){return 1===e?"one":"other"}}}}function on(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=Y(t[n]);return t.join("/")}function an(e,t,n){var r=_n(e,n);t.$$protocol=r.protocol,t.$$host=r.hostname,t.$$port=d(r.port)||oi[r.protocol]||null}function sn(e,t,n){var r="/"!==e.charAt(0);r&&(e="/"+e);var i=_n(e,n);t.$$path=decodeURIComponent(r&&"/"===i.pathname.charAt(0)?i.pathname.substring(1):i.pathname),t.$$search=X(i.search),t.$$hash=decodeURIComponent(i.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function ln(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function cn(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function un(e){return e.substr(0,cn(e).lastIndexOf("/")+1)}function fn(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function dn(e,t){this.$$html5=!0,t=t||"";var r=un(e);an(e,this,e),this.$$parse=function(t){var n=ln(r,t);if(!x(n))throw ai("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,r);sn(n,this,e),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=G(this.$$search),t=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=on(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+this.$$url.substr(1)},this.$$rewrite=function(i){var o,a;return(o=ln(e,i))!==n?(a=o,(o=ln(t,o))!==n?r+(ln("/",o)||o):e+a):(o=ln(r,i))!==n?r+o:r==i+"/"?r:void 0}}function pn(e,t){var n=un(e);an(e,this,e),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o=ln(e,r)||ln(n,r),a="#"==o.charAt(0)?ln(t,o):this.$$html5?o:"";if(!x(a))throw ai("ihshprfx",'Invalid url "{0}", missing hash prefix "{1}".',r,t);sn(a,this,e),this.$$path=i(this.$$path,a,e),this.$$compose()},this.$$compose=function(){var n=G(this.$$search),r=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=on(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$rewrite=function(t){return cn(e)==cn(t)?t:void 0}}function hn(e,t){this.$$html5=!0,pn.apply(this,arguments);var n=un(e);this.$$rewrite=function(r){var i;return e==cn(r)?r:(i=ln(n,r))?e+t+i:n===r+"/"?n:void 0},this.$$compose=function(){var n=G(this.$$search),r=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=on(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+t+this.$$url}}function gn(e){return function(){return this[e]}}function mn(e,t){return function(n){return v(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function vn(){var t="",n=!1;this.hashPrefix=function(e){return y(e)?(t=e,this):t},this.html5Mode=function(e){return y(e)?(n=e,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(r,i,o,a){function s(e){r.$broadcast("$locationChangeSuccess",l.absUrl(),e)}var l,c,u,f=i.baseHref(),d=i.url();n?(u=fn(d)+(f||"/"),c=o.history?dn:hn):(u=cn(d),c=pn),l=new c(u,"#"+t),l.$$parse(l.$$rewrite(d)),a.on("click",function(n){if(!n.ctrlKey&&!n.metaKey&&2!=n.which){for(var o=br(n.target);"a"!==pr(o[0].nodeName);)if(o[0]===a[0]||!(o=o.parent())[0])return;var s=o.prop("href");if(b(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=_n(s.animVal).href),c===hn){var f=o.attr("href")||o.attr("xlink:href");if(f.indexOf("://")<0){var d="#"+t;if("/"==f[0])s=u+d+f;else if("#"==f[0])s=u+d+(l.path()||"/")+f;else{for(var p=l.path().split("/"),h=f.split("/"),g=0;g<h.length;g++)"."!=h[g]&&(".."==h[g]?p.pop():h[g].length&&p.push(h[g]));s=u+d+p.join("/")}}}var m=l.$$rewrite(s);s&&!o.attr("target")&&m&&!n.isDefaultPrevented()&&(n.preventDefault(),m!=i.url()&&(l.$$parse(m),r.$apply(),e.angular["ff-684208-preventDefault"]=!0))}}),l.absUrl()!=d&&i.url(l.absUrl(),!0),i.onUrlChange(function(e){l.absUrl()!=e&&(r.$evalAsync(function(){var t=l.absUrl();l.$$parse(e),r.$broadcast("$locationChangeStart",e,t).defaultPrevented?(l.$$parse(t),i.url(t)):s(t)}),r.$$phase||r.$digest())});var p=0;return r.$watch(function(){var e=i.url(),t=l.$$replace;return p&&e==l.absUrl()||(p++,r.$evalAsync(function(){r.$broadcast("$locationChangeStart",l.absUrl(),e).defaultPrevented?l.$$parse(e):(i.url(l.absUrl(),t),s(e))})),l.$$replace=!1,p}),l}]}function yn(){var e=!0,t=this;this.debugEnabled=function(t){return y(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function i(e){var t=n.console||{},i=t[e]||t.log||h,a=!1;try{a=!!i.apply}catch(s){}return a?function(){var e=[];return o(arguments,function(t){e.push(r(t))}),i.apply(t,e)}:function(e,t){i(e,null==t?"":t)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function bn(e,t){if("constructor"===e)throw li("isecfld",'Referencing "constructor" field in Angular expressions is disallowed! Expression: {0}',t); | |
return e}function xn(e,t){if(e){if(e.constructor===e)throw li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.document&&e.location&&e.alert&&e.setInterval)throw li("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw li("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t)}return e}function $n(e,t,r,i,o){o=o||{};for(var a,s=t.split("."),l=0;s.length>1;l++){a=bn(s.shift(),i);var c=e[a];c||(c={},e[a]=c),e=c,e.then&&o.unwrapPromises&&(si(i),"$$v"in e||!function(e){e.then(function(t){e.$$v=t})}(e),e.$$v===n&&(e.$$v={}),e=e.$$v)}return a=bn(s.shift(),i),e[a]=r,r}function kn(e,t,r,i,o,a,s){return bn(e,a),bn(t,a),bn(r,a),bn(i,a),bn(o,a),s.unwrapPromises?function(s,l){var c,u=l&&l.hasOwnProperty(e)?l:s;return null==u?u:(u=u[e],u&&u.then&&(si(a),"$$v"in u||(c=u,c.$$v=n,c.then(function(e){c.$$v=e})),u=u.$$v),t?null==u?n:(u=u[t],u&&u.then&&(si(a),"$$v"in u||(c=u,c.$$v=n,c.then(function(e){c.$$v=e})),u=u.$$v),r?null==u?n:(u=u[r],u&&u.then&&(si(a),"$$v"in u||(c=u,c.$$v=n,c.then(function(e){c.$$v=e})),u=u.$$v),i?null==u?n:(u=u[i],u&&u.then&&(si(a),"$$v"in u||(c=u,c.$$v=n,c.then(function(e){c.$$v=e})),u=u.$$v),o?null==u?n:(u=u[o],u&&u.then&&(si(a),"$$v"in u||(c=u,c.$$v=n,c.then(function(e){c.$$v=e})),u=u.$$v),u):u):u):u):u)}:function(a,s){var l=s&&s.hasOwnProperty(e)?s:a;return null==l?l:(l=l[e],t?null==l?n:(l=l[t],r?null==l?n:(l=l[r],i?null==l?n:(l=l[i],o?null==l?n:l=l[o]:l):l):l):l)}}function wn(e,t){return bn(e,t),function(t,r){return null==t?n:(r&&r.hasOwnProperty(e)?r:t)[e]}}function Cn(e,t,r){return bn(e,r),bn(t,r),function(r,i){return null==r?n:(r=(i&&i.hasOwnProperty(e)?i:r)[e],null==r?n:r[t])}}function Sn(e,t,r){if(hi.hasOwnProperty(e))return hi[e];var i,a=e.split("."),s=a.length;if(t.unwrapPromises||1!==s)if(t.unwrapPromises||2!==s)if(t.csp)i=6>s?kn(a[0],a[1],a[2],a[3],a[4],r,t):function(e,i){var o,l=0;do o=kn(a[l++],a[l++],a[l++],a[l++],a[l++],r,t)(e,i),i=n,e=o;while(s>l);return o};else{var l="var p;\n";o(a,function(e,n){bn(e,r),l+="if(s == null) return undefined;\ns="+(n?"s":'((k&&k.hasOwnProperty("'+e+'"))?k:s)')+'["'+e+'"];\n'+(t.unwrapPromises?'if (s && s.then) {\n pw("'+r.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':"")}),l+="return s;";var c=new Function("s","k","pw",l);c.toString=m(l),i=t.unwrapPromises?function(e,t){return c(e,t,si)}:c}else i=Cn(a[0],a[1],r);else i=wn(a[0],r);return"hasOwnProperty"!==e&&(hi[e]=i),i}function En(){var e={},t={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=function(e){return y(e)?(t.unwrapPromises=!!e,this):t.unwrapPromises},this.logPromiseWarnings=function(e){return y(e)?(t.logPromiseWarnings=e,this):t.logPromiseWarnings},this.$get=["$filter","$sniffer","$log",function(n,r,i){return t.csp=r.csp,si=function(e){t.logPromiseWarnings&&!ci.hasOwnProperty(e)&&(ci[e]=!0,i.warn("[$parse] Promise found in the expression `"+e+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))},function(r){var i;switch(typeof r){case"string":if(e.hasOwnProperty(r))return e[r];var o=new di(t),a=new pi(o,n,t);return i=a.parse(r),"hasOwnProperty"!==r&&(e[r]=i),i;case"function":return r;default:return h}}}]}function An(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Tn(function(t){e.$evalAsync(t)},t)}]}function Tn(e,t){function r(e){return e}function i(e){return c(e)}function a(e){var t=s(),n=0,r=w(e)?[]:{};return o(e,function(e,i){n++,l(e).then(function(e){r.hasOwnProperty(i)||(r[i]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(i)||t.reject(e)})}),0===n&&t.resolve(r),t.promise}var s=function(){var o,a,c=[];return a={resolve:function(t){if(c){var r=c;c=n,o=l(t),r.length&&e(function(){for(var e,t=0,n=r.length;n>t;t++)e=r[t],o.then(e[0],e[1],e[2])})}},reject:function(e){a.resolve(u(e))},notify:function(t){if(c){var n=c;c.length&&e(function(){for(var e,r=0,i=n.length;i>r;r++)e=n[r],e[2](t)})}},promise:{then:function(e,n,a){var l=s(),u=function(n){try{l.resolve((C(e)?e:r)(n))}catch(i){l.reject(i),t(i)}},f=function(e){try{l.resolve((C(n)?n:i)(e))}catch(r){l.reject(r),t(r)}},d=function(e){try{l.notify((C(a)?a:r)(e))}catch(n){t(n)}};return c?c.push([u,f,d]):o.then(u,f,d),l.promise},"catch":function(e){return this.then(null,e)},"finally":function(e){function t(e,t){var n=s();return t?n.resolve(e):n.reject(e),n.promise}function n(n,i){var o=null;try{o=(e||r)()}catch(a){return t(a,!1)}return o&&C(o.then)?o.then(function(){return t(n,i)},function(e){return t(e,!1)}):t(n,i)}return this.then(function(e){return n(e,!0)},function(e){return n(e,!1)})}}}},l=function(t){return t&&C(t.then)?t:{then:function(n){var r=s();return e(function(){r.resolve(n(t))}),r.promise}}},c=function(e){var t=s();return t.reject(e),t.promise},u=function(n){return{then:function(r,o){var a=s();return e(function(){try{a.resolve((C(o)?o:i)(n))}catch(e){a.reject(e),t(e)}}),a.promise}}},f=function(n,o,a,u){var f,d=s(),p=function(e){try{return(C(o)?o:r)(e)}catch(n){return t(n),c(n)}},h=function(e){try{return(C(a)?a:i)(e)}catch(n){return t(n),c(n)}},g=function(e){try{return(C(u)?u:r)(e)}catch(n){t(n)}};return e(function(){l(n).then(function(e){f||(f=!0,d.resolve(l(e).then(p,h,g)))},function(e){f||(f=!0,d.resolve(h(e)))},function(e){f||d.notify(g(e))})}),d.promise};return{defer:s,reject:c,when:f,all:a}}function On(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,o=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=i,o}]}function Nn(){var e=10,t=r("$rootScope"),n=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,a,s,l){function u(){this.$id=c(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.$$asyncQueue=[],this.$$postDigestQueue=[],this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings={}}function f(e){if(v.$$phase)throw t("inprog","{0} already in progress",v.$$phase);v.$$phase=e}function d(){v.$$phase=null}function p(e,t){var n=s(e);return rt(n,t),n}function g(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function m(){}u.prototype={constructor:u,$new:function(e){var t;return e?(t=new u,t.$root=this.$root,t.$$asyncQueue=this.$$asyncQueue,t.$$postDigestQueue=this.$$postDigestQueue):(this.$$childScopeClass||(this.$$childScopeClass=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=c(),this.$$childScopeClass=null},this.$$childScopeClass.prototype=this),t=new this.$$childScopeClass),t["this"]=t,t.$parent=this,t.$$prevSibling=this.$$childTail,this.$$childHead?(this.$$childTail.$$nextSibling=t,this.$$childTail=t):this.$$childHead=this.$$childTail=t,t},$watch:function(e,t,r){var i=this,o=p(e,"watch"),a=i.$$watchers,s={fn:t,last:m,get:o,exp:e,eq:!!r};if(n=null,!C(t)){var l=p(t||h,"listener");s.fn=function(e,t,n){l(n)}}if("string"==typeof e&&o.constant){var c=s.fn;s.fn=function(e,t,n){c.call(this,e,t,n),D(a,s)}}return a||(a=i.$$watchers=[]),a.unshift(s),function(){D(a,s),n=null}},$watchCollection:function(e,t){function n(){o=d(c);var e,t;if(b(o))if(i(o)){a!==p&&(a=p,m=a.length=0,f++),e=o.length,m!==e&&(f++,a.length=m=e);for(var n=0;e>n;n++){var r=a[n]!==a[n]&&o[n]!==o[n];r||a[n]===o[n]||(f++,a[n]=o[n])}}else{a!==h&&(a=h={},m=0,f++),e=0;for(t in o)o.hasOwnProperty(t)&&(e++,a.hasOwnProperty(t)?a[t]!==o[t]&&(f++,a[t]=o[t]):(m++,a[t]=o[t],f++));if(m>e){f++;for(t in a)a.hasOwnProperty(t)&&!o.hasOwnProperty(t)&&(m--,delete a[t])}}else a!==o&&(a=o,f++);return f}function r(){if(g?(g=!1,t(o,o,c)):t(o,l,c),u)if(b(o))if(i(o)){l=new Array(o.length);for(var e=0;e<o.length;e++)l[e]=o[e]}else{l={};for(var n in o)hr.call(o,n)&&(l[n]=o[n])}else l=o}var o,a,l,c=this,u=t.length>1,f=0,d=s(e),p=[],h={},g=!0,m=0;return this.$watch(n,r)},$digest:function(){var r,i,o,s,l,c,u,p,h,g,v,y=this.$$asyncQueue,b=this.$$postDigestQueue,x=e,$=this,k=[];f("$digest"),n=null;do{for(c=!1,p=$;y.length;){try{v=y.shift(),v.scope.$eval(v.expression)}catch(w){d(),a(w)}n=null}e:do{if(s=p.$$watchers)for(l=s.length;l--;)try{if(r=s[l])if((i=r.get(p))===(o=r.last)||(r.eq?H(i,o):"number"==typeof i&&"number"==typeof o&&isNaN(i)&&isNaN(o))){if(r===n){c=!1;break e}}else c=!0,n=r,r.last=r.eq?P(i,null):i,r.fn(i,o===m?i:o,p),5>x&&(h=4-x,k[h]||(k[h]=[]),g=C(r.exp)?"fn: "+(r.exp.name||r.exp.toString()):r.exp,g+="; newVal: "+W(i)+"; oldVal: "+W(o),k[h].push(g))}catch(w){d(),a(w)}if(!(u=p.$$childHead||p!==$&&p.$$nextSibling))for(;p!==$&&!(u=p.$$nextSibling);)p=p.$parent}while(p=u);if((c||y.length)&&!x--)throw d(),t("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,W(k))}while(c||y.length);for(d();b.length;)try{b.shift()()}catch(w){a(w)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this!==v&&(o(this.$$listenerCount,q(null,g,this)),e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=null,this.$$listeners={},this.$$watchers=this.$$asyncQueue=this.$$postDigestQueue=[],this.$destroy=this.$digest=this.$apply=h,this.$on=this.$watch=function(){return h})}},$eval:function(e,t){return s(e)(this,t)},$evalAsync:function(e){v.$$phase||v.$$asyncQueue.length||l.defer(function(){v.$$asyncQueue.length&&v.$digest()}),this.$$asyncQueue.push({scope:this,expression:e})},$$postDigest:function(e){this.$$postDigestQueue.push(e)},$apply:function(e){try{return f("$apply"),this.$eval(e)}catch(t){a(t)}finally{d();try{v.$digest()}catch(t){throw a(t),t}}},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this;return function(){n[I(n,t)]=null,g(i,1,e)}},$emit:function(e){var t,n,r,i=[],o=this,s=!1,l={name:e,targetScope:o,stopPropagation:function(){s=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=_([l],arguments,1);do{for(t=o.$$listeners[e]||i,l.currentScope=o,n=0,r=t.length;r>n;n++)if(t[n])try{t[n].apply(null,c)}catch(u){a(u)}else t.splice(n,1),n--,r--;if(s)return l;o=o.$parent}while(o);return l},$broadcast:function(e){for(var t,n,r,i=this,o=i,s=i,l={name:e,targetScope:i,preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=_([l],arguments,1);o=s;){for(l.currentScope=o,t=o.$$listeners[e]||[],n=0,r=t.length;r>n;n++)if(t[n])try{t[n].apply(null,c)}catch(u){a(u)}else t.splice(n,1),n--,r--;if(!(s=o.$$listenerCount[e]&&o.$$childHead||o!==i&&o.$$nextSibling))for(;o!==i&&!(s=o.$$nextSibling);)o=o.$parent}return l}};var v=new u;return v}]}function jn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*(https?|ftp|file):|data:image\//;this.aHrefSanitizationWhitelist=function(t){return y(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return yr&&!(yr>=8)||(i=_n(n).href,""===i||i.match(o))?n:"unsafe:"+i}}}function Mn(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")}function In(e){if("self"===e)return e;if(x(e)){if(e.indexOf("***")>-1)throw gi("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Mn(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(S(e))return new RegExp("^"+e.source+"$");throw gi("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Dn(e){var t=[];return y(e)&&o(e,function(e){t.push(In(e))}),t}function Pn(){this.SCE_CONTEXTS=mi;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Dn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Dn(e)),t},this.$get=["$injector",function(r){function i(e,t){return"self"===e?Fn(t):!!e.exec(t.href)}function o(n){var r,o,a=_n(n.toString()),s=!1;for(r=0,o=e.length;o>r;r++)if(i(e[r],a)){s=!0;break}if(s)for(r=0,o=t.length;o>r;r++)if(i(t[r],a)){s=!1;break}return s}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function s(e,t){var r=d.hasOwnProperty(e)?d[e]:null;if(!r)throw gi("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw gi("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new r(t)}function l(e){return e instanceof f?e.$$unwrapTrustedValue():e}function c(e,t){if(null===t||t===n||""===t)return t;var r=d.hasOwnProperty(e)?d[e]:null;if(r&&t instanceof r)return t.$$unwrapTrustedValue();if(e===mi.RESOURCE_URL){if(o(t))return t;throw gi("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===mi.HTML)return u(t);throw gi("unsafe","Attempting to use an unsafe value in a safe context.")}var u=function(){throw gi("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(u=r.get("$sanitize"));var f=a(),d={};return d[mi.HTML]=a(f),d[mi.CSS]=a(f),d[mi.URL]=a(f),d[mi.JS]=a(f),d[mi.RESOURCE_URL]=a(d[mi.URL]),{trustAs:s,getTrusted:c,valueOf:l}}]}function Ln(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sniffer","$sceDelegate",function(t,n,r){if(e&&n.msie&&n.msieDocumentMode<8)throw gi("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var i=L(mi);i.isEnabled=function(){return e},i.trustAs=r.trustAs,i.getTrusted=r.getTrusted,i.valueOf=r.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=g),i.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:function(t,n){return i.getTrusted(e,r(t,n))}};var a=i.parseAs,s=i.getTrusted,l=i.trustAs;return o(mi,function(e,t){var n=pr(t);i[ut("parse_as_"+n)]=function(t){return a(e,t)},i[ut("get_trusted_"+n)]=function(t){return s(e,t)},i[ut("trust_as_"+n)]=function(t){return l(e,t)}}),i}]}function Hn(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=d((/android (\d+)/.exec(pr((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=s.documentMode,c=/^(Moz|webkit|O|ms)(?=[A-Z])/,u=s.body&&s.body.style,f=!1,p=!1;if(u){for(var h in u)if(r=c.exec(h)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),f=!!("transition"in u||n+"Transition"in u),p=!!("animation"in u||n+"Animation"in u),!o||f&&p||(f=x(s.body.style.webkitTransition),p=x(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>o||a),hashchange:"onhashchange"in e&&(!l||l>7),hasEvent:function(e){if("input"==e&&9==yr)return!1;if(v(i[e])){var t=s.createElement("div");i[e]="on"+e in t}return i[e]},csp:R(),vendorPrefix:n,transitions:f,animations:p,android:o,msie:yr,msieDocumentMode:l}}]}function Rn(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(e,t,n,r){function i(i,a,s){var l,c=n.defer(),u=c.promise,f=y(s)&&!s;return l=t.defer(function(){try{c.resolve(i())}catch(t){c.reject(t),r(t)}finally{delete o[u.$$timeoutId]}f||e.$apply()},a),u.$$timeoutId=l,o[l]=c,u}var o={};return i.cancel=function(e){return e&&e.$$timeoutId in o?(o[e.$$timeoutId].reject("canceled"),delete o[e.$$timeoutId],t.defer.cancel(e.$$timeoutId)):!1},i}]}function _n(e){var t=e;return yr&&(vi.setAttribute("href",t),t=vi.href),vi.setAttribute("href",t),{href:vi.href,protocol:vi.protocol?vi.protocol.replace(/:$/,""):"",host:vi.host,search:vi.search?vi.search.replace(/^\?/,""):"",hash:vi.hash?vi.hash.replace(/^#/,""):"",hostname:vi.hostname,port:vi.port,pathname:"/"===vi.pathname.charAt(0)?vi.pathname:"/"+vi.pathname}}function Fn(e){var t=x(e)?_n(e):e;return t.protocol===yi.protocol&&t.host===yi.host}function qn(){this.$get=m(e)}function Un(e){function t(r,i){if(b(r)){var a={};return o(r,function(e,n){a[n]=t(n,e)}),a}return e.factory(r+n,i)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Bn),t("date",Qn),t("filter",Wn),t("json",Zn),t("limitTo",er),t("lowercase",wi),t("number",Vn),t("orderBy",tr),t("uppercase",Ci)}function Wn(){return function(e,t,n){if(!w(e))return e;var r=typeof n,i=[];i.check=function(e){for(var t=0;t<i.length;t++)if(!i[t](e))return!1;return!0},"function"!==r&&(n="boolean"===r&&n?function(e,t){return Ar.equals(e,t)}:function(e,t){if(e&&t&&"object"==typeof e&&"object"==typeof t){for(var r in e)if("$"!==r.charAt(0)&&hr.call(e,r)&&n(e[r],t[r]))return!0;return!1}return t=(""+t).toLowerCase(),(""+e).toLowerCase().indexOf(t)>-1});var o=function(e,t){if("string"==typeof t&&"!"===t.charAt(0))return!o(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return n(e,t);case"object":switch(typeof t){case"object":return n(e,t);default:for(var r in e)if("$"!==r.charAt(0)&&o(e[r],t))return!0}return!1;case"array":for(var i=0;i<e.length;i++)if(o(e[i],t))return!0;return!1;default:return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var a in t)!function(e){"undefined"!=typeof t[e]&&i.push(function(n){return o("$"==e?n:n&&n[e],t[e])})}(a);break;case"function":i.push(t);break;default:return e}for(var s=[],l=0;l<e.length;l++){var c=e[l];i.check(c)&&s.push(c)}return s}}function Bn(e){var t=e.NUMBER_FORMATS;return function(e,n){return v(n)&&(n=t.CURRENCY_SYM),zn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,2).replace(/\u00A4/g,n)}}function Vn(e){var t=e.NUMBER_FORMATS;return function(e,n){return zn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function zn(e,t,n,r,i){if(null==e||!isFinite(e)||b(e))return"";var o=0>e;e=Math.abs(e);var a=e+"",s="",l=[],c=!1;if(-1!==a.indexOf("e")){var u=a.match(/([\d\.]+)e(-?)(\d+)/);u&&"-"==u[2]&&u[3]>i+1?a="0":(s=a,c=!0)}if(c)i>0&&e>-1&&1>e&&(s=e.toFixed(i));else{var f=(a.split(bi)[1]||"").length;v(i)&&(i=Math.min(Math.max(t.minFrac,f),t.maxFrac));var d=Math.pow(10,i+1);e=Math.floor(e*d+5)/d;var p=(""+e).split(bi),h=p[0];p=p[1]||"";var g,m=0,y=t.lgSize,x=t.gSize;if(h.length>=y+x)for(m=h.length-y,g=0;m>g;g++)(m-g)%x===0&&0!==g&&(s+=n),s+=h.charAt(g);for(g=m;g<h.length;g++)(h.length-g)%y===0&&0!==g&&(s+=n),s+=h.charAt(g);for(;p.length<i;)p+="0";i&&"0"!==i&&(s+=r+p.substr(0,i))}return l.push(o?t.negPre:t.posPre),l.push(s),l.push(o?t.negSuf:t.posSuf),l.join("")}function Kn(e,t,n){var r="";for(0>e&&(r="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function Xn(e,t,n,r){return n=n||0,function(i){var o=i["get"+e]();return(n>0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),Kn(o,t,r)}}function Gn(e,t){return function(n,r){var i=n["get"+e](),o=gr(t?"SHORT"+e:e);return r[o][i]}}function Yn(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=Kn(Math[t>0?"floor":"ceil"](t/60),2)+Kn(Math.abs(t%60),2)}function Jn(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function Qn(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=d(t[9]+t[10]),o=d(t[9]+t[11])),a.call(r,d(t[1]),d(t[2])-1,d(t[3]));var l=d(t[4]||0)-i,c=d(t[5]||0)-o,u=d(t[6]||0),f=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,l,c,u,f),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r){var i,a,s="",l=[];if(r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,x(n)&&(n=ki.test(n)?d(n):t(n)),$(n)&&(n=new Date(n)),!k(n))return n;for(;r;)a=$i.exec(r),a?(l=_(l,a,1),r=l.pop()):(l.push(r),r=null);return o(l,function(t){i=xi[t],s+=i?i(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}}function Zn(){return function(e){return W(e,!0)}}function er(){return function(e,t){if(!w(e)&&!x(e))return e;if(t=1/0===Math.abs(Number(t))?Number(t):d(t),x(e))return t?t>=0?e.slice(0,t):e.slice(t,e.length):"";var n,r,i=[];for(t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(n=0,r=t):(n=e.length+t,r=e.length);r>n;n++)i.push(e[n]);return i}}function tr(e){return function(t,n,r){function i(e,t){for(var r=0;r<n.length;r++){var i=n[r](e,t);if(0!==i)return i}return 0}function o(e,t){return V(t)?function(t,n){return e(n,t)}:e}function a(e,t){var n=typeof e,r=typeof t;return n==r?("string"==n&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t?0:t>e?-1:1):r>n?-1:1}if(!w(t))return t;if(!n)return t;n=w(n)?n:[n],n=j(n,function(t){var n=!1,r=t||g;if(x(t)&&(("+"==t.charAt(0)||"-"==t.charAt(0))&&(n="-"==t.charAt(0),t=t.substring(1)),r=e(t),r.constant)){var i=r();return o(function(e,t){return a(e[i],t[i])},n)}return o(function(e,t){return a(r(e),r(t))},n)});for(var s=[],l=0;l<t.length;l++)s.push(t[l]);return s.sort(o(i,r))}}function nr(e){return C(e)&&(e={link:e}),e.restrict=e.restrict||"AC",m(e)}function rr(e,t,n,r){function i(t,n){n=n?"-"+et(n,"-"):"",r.removeClass(e,(t?Hi:Li)+n),r.addClass(e,(t?Li:Hi)+n)}var a=this,s=e.parent().controller("form")||Ai,l=0,c=a.$error={},u=[];a.$name=t.name||t.ngForm,a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,s.$addControl(a),e.addClass(Ri),i(!0),a.$addControl=function(e){it(e.$name,"input"),u.push(e),e.$name&&(a[e.$name]=e)},a.$removeControl=function(e){e.$name&&a[e.$name]===e&&delete a[e.$name],o(c,function(t,n){a.$setValidity(n,!0,e)}),D(u,e)},a.$setValidity=function(e,t,n){var r=c[e];if(t)r&&(D(r,n),r.length||(l--,l||(i(t),a.$valid=!0,a.$invalid=!1),c[e]=!1,i(!0,e),s.$setValidity(e,!0,a)));else{if(l||i(t),r){if(M(r,n))return}else c[e]=r=[],l++,i(!1,e),s.$setValidity(e,!1,a);r.push(n),a.$valid=!1,a.$invalid=!0}},a.$setDirty=function(){r.removeClass(e,Ri),r.addClass(e,_i),a.$dirty=!0,a.$pristine=!1,s.$setDirty()},a.$setPristine=function(){r.removeClass(e,_i),r.addClass(e,Ri),a.$dirty=!1,a.$pristine=!0,o(u,function(e){e.$setPristine()})}}function ir(e,t,r,i){return e.$setValidity(t,r),r?i:n}function or(e,t,n){var r=n.prop("validity");if(b(r)){var i=function(n){return e.$error[t]||!(r.badInput||r.customError||r.typeMismatch)||r.valueMissing?n:(e.$setValidity(t,!1),void 0)};e.$parsers.push(i)}}function ar(e,t,n,i,o,a){var s=t.prop("validity"),l=t[0].placeholder,c={};if(!o.android){var u=!1;t.on("compositionstart",function(){u=!0}),t.on("compositionend",function(){u=!1,f()})}var f=function(r){if(!u){var o=t.val();if(yr&&"input"===(r||c).type&&t[0].placeholder!==l)return l=t[0].placeholder,void 0;V(n.ngTrim||"T")&&(o=Or(o)),(i.$viewValue!==o||s&&""===o&&!s.valueMissing)&&(e.$$phase?i.$setViewValue(o):e.$apply(function(){i.$setViewValue(o)}))}};if(o.hasEvent("input"))t.on("input",f);else{var p,h=function(){p||(p=a.defer(function(){f(),p=null}))};t.on("keydown",function(e){var t=e.keyCode;91===t||t>15&&19>t||t>=37&&40>=t||h()}),o.hasEvent("paste")&&t.on("paste cut",h)}t.on("change",f),i.$render=function(){t.val(i.$isEmpty(i.$viewValue)?"":i.$viewValue)};var g,m,v=n.ngPattern;if(v){var y=function(e,t){return ir(i,"pattern",i.$isEmpty(t)||e.test(t),t)};m=v.match(/^\/(.*)\/([gim]*)$/),m?(v=new RegExp(m[1],m[2]),g=function(e){return y(v,e)}):g=function(n){var i=e.$eval(v);if(!i||!i.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",v,i,z(t));return y(i,n)},i.$formatters.push(g),i.$parsers.push(g)}if(n.ngMinlength){var b=d(n.ngMinlength),x=function(e){return ir(i,"minlength",i.$isEmpty(e)||e.length>=b,e)};i.$parsers.push(x),i.$formatters.push(x)}if(n.ngMaxlength){var $=d(n.ngMaxlength),k=function(e){return ir(i,"maxlength",i.$isEmpty(e)||e.length<=$,e)};i.$parsers.push(k),i.$formatters.push(k)}}function sr(e,t,r,i,o,a){if(ar(e,t,r,i,o,a),i.$parsers.push(function(e){var t=i.$isEmpty(e);return t||Ii.test(e)?(i.$setValidity("number",!0),""===e?null:t?e:parseFloat(e)):(i.$setValidity("number",!1),n)}),or(i,"number",t),i.$formatters.push(function(e){return i.$isEmpty(e)?"":""+e}),r.min){var s=function(e){var t=parseFloat(r.min);return ir(i,"min",i.$isEmpty(e)||e>=t,e)};i.$parsers.push(s),i.$formatters.push(s)}if(r.max){var l=function(e){var t=parseFloat(r.max);return ir(i,"max",i.$isEmpty(e)||t>=e,e)};i.$parsers.push(l),i.$formatters.push(l)}i.$formatters.push(function(e){return ir(i,"number",i.$isEmpty(e)||$(e),e)})}function lr(e,t,n,r,i,o){ar(e,t,n,r,i,o);var a=function(e){return ir(r,"url",r.$isEmpty(e)||ji.test(e),e)};r.$formatters.push(a),r.$parsers.push(a)}function cr(e,t,n,r,i,o){ar(e,t,n,r,i,o);var a=function(e){return ir(r,"email",r.$isEmpty(e)||Mi.test(e),e)};r.$formatters.push(a),r.$parsers.push(a)}function ur(e,t,n,r){v(n.name)&&t.attr("name",c()),t.on("click",function(){t[0].checked&&e.$apply(function(){r.$setViewValue(n.value)})}),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function fr(e,t,n,r){var i=n.ngTrueValue,o=n.ngFalseValue;x(i)||(i=!0),x(o)||(o=!1),t.on("click",function(){e.$apply(function(){r.$setViewValue(t[0].checked)})}),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e!==i},r.$formatters.push(function(e){return e===i}),r.$parsers.push(function(e){return e?i:o})}function dr(e,t){return e="ngClass"+e,["$animate",function(n){function r(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var i=e[r],o=0;o<t.length;o++)if(i==t[o])continue e;n.push(i)}return n}function i(e){if(w(e))return e;if(x(e))return e.split(" ");if(b(e)){var t=[];return o(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t}return e}return{restrict:"AC",link:function(a,s,l){function c(e){var t=f(e,1);l.$addClass(t)}function u(e){var t=f(e,-1);l.$removeClass(t)}function f(e,t){var n=s.data("$classCounts")||{},r=[];return o(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e))}),s.data("$classCounts",n),r.join(" ")}function d(e,t){var i=r(t,e),o=r(e,t);o=f(o,-1),i=f(i,1),0===i.length?n.removeClass(s,o):0===o.length?n.addClass(s,i):n.setClass(s,i,o)}function p(e){if(t===!0||a.$index%2===t){var n=i(e||[]);if(h){if(!H(e,h)){var r=i(h);d(r,n)}}else c(n)}h=L(e)}var h;a.$watch(l[e],p,!0),l.$observe("class",function(){p(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var o=1&n;if(o!==(1&r)){var s=i(a.$eval(l[e]));o===t?c(s):u(s)}})}}}]}var pr=function(e){return x(e)?e.toLowerCase():e},hr=Object.prototype.hasOwnProperty,gr=function(e){return x(e)?e.toUpperCase():e},mr=function(e){return x(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},vr=function(e){return x(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(pr=mr,gr=vr);var yr,br,xr,$r,kr,wr=[].slice,Cr=[].push,Sr=Object.prototype.toString,Er=r("ng"),Ar=e.angular||(e.angular={}),Tr=["0","0","0"];yr=d((/msie (\d+)/.exec(pr(navigator.userAgent))||[])[1]),isNaN(yr)&&(yr=d((/trident\/.*; rv:(\d+)/.exec(pr(navigator.userAgent))||[])[1])),h.$inject=[],g.$inject=[];var Or=function(){return String.prototype.trim?function(e){return x(e)?e.trim():e}:function(e){return x(e)?e.replace(/^\s\s*/,"").replace(/\s\s*$/,""):e}}();kr=9>yr?function(e){return e=e.nodeName?e:e[0],e.scopeName&&"HTML"!=e.scopeName?gr(e.scopeName+":"+e.nodeName):e.nodeName}:function(e){return e.nodeName?e.nodeName:e[0].nodeName};var Nr=/[A-Z]/g,jr={full:"1.2.17",major:1,minor:2,dot:17,codeName:"quantum-disentanglement"},Mr=gt.cache={},Ir=gt.expando="ng"+(new Date).getTime(),Dr=1,Pr=e.document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t,n)},Lr=e.document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},Hr=(gt._data=function(e){return this.cache[e[this.expando]]||{}},/([\:\-\_]+(.))/g),Rr=/^moz([A-Z])/,_r=r("jqLite"),Fr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,qr=/<|&#?\w+;/,Ur=/<([\w:]+)/,Wr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Br={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Br.optgroup=Br.option,Br.tbody=Br.tfoot=Br.colgroup=Br.caption=Br.thead,Br.th=Br.td;var Vr=gt.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===t.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),gt(e).on("load",r))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return e>=0?br(this[e]):br(this[this.length+e])},length:0,push:Cr,sort:[].sort,splice:[].splice},zr={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){zr[pr(e)]=e});var Kr={};o("input,select,option,textarea,button,form,details".split(","),function(e){Kr[gr(e)]=!0}),o({data:$t,inheritedData:At,scope:function(e){return br(e).data("$scope")||At(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return br(e).data("$isolateScope")||br(e).data("$isolateScopeNoTemplate")},controller:Et,injector:function(e){return At(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:kt,css:function(e,t,r){if(t=ut(t),!y(r)){var i;return 8>=yr&&(i=e.currentStyle&&e.currentStyle[t],""===i&&(i="auto")),i=i||e.style[t],8>=yr&&(i=""===i?n:i),i}e.style[t]=r},attr:function(e,t,r){var i=pr(t);if(zr[i]){if(!y(r))return e[t]||(e.attributes.getNamedItem(t)||h).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(y(r))e.setAttribute(t,r);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?n:o}},prop:function(e,t,n){return y(n)?(e[t]=n,void 0):e[t]},text:function(){function e(e,n){var r=t[e.nodeType];return v(n)?r?e[r]:"":(e[r]=n,void 0)}var t=[];return 9>yr?(t[1]="innerText",t[3]="nodeValue"):t[1]=t[3]="textContent",e.$dv="",e}(),val:function(e,t){if(v(t)){if("SELECT"===kr(e)&&e.multiple){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(v(t))return e.innerHTML;for(var n=0,r=e.childNodes;n<r.length;n++)vt(r[n]);e.innerHTML=t},empty:Tt},function(e,t){gt.prototype[t]=function(t,r){var i,o;if(e!==Tt&&(2==e.length&&e!==kt&&e!==Et?t:r)===n){if(b(t)){for(i=0;i<this.length;i++)if(e===$t)e(this[i],t);else for(o in t)e(this[i],o,t[o]);return this}for(var a=e.$dv,s=a===n?Math.min(this.length,1):this.length,l=0;s>l;l++){var c=e(this[l],t,r);a=a?a+c:c}return a}for(i=0;i<this.length;i++)e(this[i],t,r);return this}}),o({removeData:bt,dealoc:vt,on:function wo(e,n,r,i){if(y(i))throw _r("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");var a=xt(e,"events"),s=xt(e,"handle");a||xt(e,"events",a={}),s||xt(e,"handle",s=Nt(e,a)),o(n.split(" "),function(n){var i=a[n];if(!i){if("mouseenter"==n||"mouseleave"==n){var o=t.body.contains||t.body.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r))) | |
}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1};a[n]=[];var l={mouseleave:"mouseout",mouseenter:"mouseover"};wo(e,l[n],function(e){var t=this,r=e.relatedTarget;(!r||r!==t&&!o(t,r))&&s(e,n)})}else Pr(e,n,s),a[n]=[];i=a[n]}i.push(r)})},off:yt,one:function(e,t,n){e=br(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;vt(e),o(new gt(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){1===e.nodeType&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){o(new gt(t),function(t){(1===e.nodeType||11===e.nodeType)&&e.appendChild(t)})},prepend:function(e,t){if(1===e.nodeType){var n=e.firstChild;o(new gt(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=br(t)[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:function(e){vt(e);var t=e.parentNode;t&&t.removeChild(e)},after:function(e,t){var n=e,r=e.parentNode;o(new gt(t),function(e){r.insertBefore(e,n.nextSibling),n=e})},addClass:Ct,removeClass:wt,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var r=n;v(r)&&(r=!kt(e,t)),(r?Ct:wt)(e,t)})},parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},next:function(e){if(e.nextElementSibling)return e.nextElementSibling;for(var t=e.nextSibling;null!=t&&1!==t.nodeType;)t=t.nextSibling;return t},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:mt,triggerHandler:function(e,t,n){var r=(xt(e,"events")||{})[t];n=n||[];var i=[{preventDefault:h,stopPropagation:h}];o(r,function(t){t.apply(e,i.concat(n))})}},function(e,t){gt.prototype[t]=function(t,n,r){for(var i,o=0;o<this.length;o++)v(i)?(i=e(this[o],t,n,r),y(i)&&(i=br(i))):St(i,e(this[o],t,n,r));return y(i)?i:this},gt.prototype.bind=gt.prototype.on,gt.prototype.unbind=gt.prototype.off}),Mt.prototype={put:function(e,t){this[jt(e)]=t},get:function(e){return this[jt(e)]},remove:function(e){var t=this[e=jt(e)];return delete this[e],t}};var Xr=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Gr=/,/,Yr=/^\s*(_?)(\S+?)\1\s*$/,Jr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Qr=r("$injector"),Zr=r("$animate"),ei=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var r=t+"-animation";if(t&&"."!=t.charAt(0))throw Zr("notcsel","Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=r,e.factory(r,n)},this.classNameFilter=function(e){return 1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$timeout","$$asyncCallback",function(e,t){function n(e){e&&t(e)}return{enter:function(e,t,r,i){r?r.after(e):(t&&t[0]||(t=r.parent()),t.append(e)),n(i)},leave:function(e,t){e.remove(),n(t)},move:function(e,t,n,r){this.enter(e,t,n,r)},addClass:function(e,t,r){t=x(t)?t:w(t)?t.join(" "):"",o(e,function(e){Ct(e,t)}),n(r)},removeClass:function(e,t,r){t=x(t)?t:w(t)?t.join(" "):"",o(e,function(e){wt(e,t)}),n(r)},setClass:function(e,t,r,i){o(e,function(e){Ct(e,t),wt(e,r)}),n(i)},enabled:h}}]}],ti=r("$compile");qt.$inject=["$provide","$$sanitizeUriProvider"];var ni=/^(x[\:\-_]|data[\:\-_])/i,ri=r("$interpolate"),ii=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,oi={http:80,https:443,ftp:21},ai=r("$location");hn.prototype=pn.prototype=dn.prototype={$$html5:!1,$$replace:!1,absUrl:gn("$$absUrl"),url:function(e,t){if(v(e))return this.$$url;var n=ii.exec(e);return n[1]&&this.path(decodeURIComponent(n[1])),(n[2]||n[1])&&this.search(n[3]||""),this.hash(n[5]||"",t),this},protocol:gn("$$protocol"),host:gn("$$host"),port:gn("$$port"),path:mn("$$path",function(e){return"/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(x(e))this.$$search=X(e);else{if(!b(e))throw ai("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");this.$$search=e}break;default:v(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:mn("$$hash",g),replace:function(){return this.$$replace=!0,this}};var si,li=r("$parse"),ci={},ui={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:h,"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),y(r)?y(i)?r+i:r:y(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(y(n)?n:0)-(y(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"^":function(e,t,n,r){return n(e,t)^r(e,t)},"=":h,"===":function(e,t,n,r){return n(e,t)===r(e,t)},"!==":function(e,t,n,r){return n(e,t)!==r(e,t)},"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)<r(e,t)},">":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"&":function(e,t,n,r){return n(e,t)&r(e,t)},"|":function(e,t,n,r){return r(e,t)(e,t,n(e,t))},"!":function(e,t,n){return!n(e,t)}},fi={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},di=function(e){this.options=e};di.prototype={constructor:di,lex:function(e){for(this.text=e,this.index=0,this.ch=n,this.lastCh=":",this.tokens=[];this.index<this.text.length;){if(this.ch=this.text.charAt(this.index),this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent();else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch}),this.index++;else{if(this.isWhitespace(this.ch)){this.index++;continue}var t=this.ch+this.peek(),r=t+this.peek(2),i=ui[this.ch],o=ui[t],a=ui[r];a?(this.tokens.push({index:this.index,text:r,fn:a}),this.index+=3):o?(this.tokens.push({index:this.index,text:t,fn:o}),this.index+=2):i?(this.tokens.push({index:this.index,text:this.ch,fn:i}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(e){return-1!==e.indexOf(this.ch)},was:function(e){return-1!==e.indexOf(this.lastCh)},peek:function(e){var t=e||1;return this.index+t<this.text.length?this.text.charAt(this.index+t):!1},isNumber:function(e){return e>="0"&&"9">=e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||""===e||"Â "===e},isIdent:function(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=y(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw li("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=pr(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}e=1*e,this.tokens.push({index:t,text:e,literal:!0,constant:!0,fn:function(){return e}})},readIdent:function(){for(var e,t,n,r,i=this,o="",a=this.index;this.index<this.text.length&&(r=this.text.charAt(this.index),"."===r||this.isIdent(r)||this.isNumber(r));)"."===r&&(e=this.index),o+=r,this.index++;if(e)for(t=this.index;t<this.text.length;){if(r=this.text.charAt(t),"("===r){n=o.substr(e-a+1),o=o.substr(0,e-a),this.index=t;break}if(!this.isWhitespace(r))break;t++}var s={index:a,text:o};if(ui.hasOwnProperty(o))s.fn=ui[o],s.literal=!0,s.constant=!0;else{var l=Sn(o,this.options,this.text);s.fn=f(function(e,t){return l(e,t)},{assign:function(e,t){return $n(e,o,t,i.text,i.options)}})}this.tokens.push(s),n&&(this.tokens.push({index:e,text:"."}),this.tokens.push({index:e+1,text:n}))},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=fi[o];n+=s?s:o}i=!1}else if("\\"===o)i=!0;else{if(o===e)return this.index++,this.tokens.push({index:t,text:r,string:n,literal:!0,constant:!0,fn:function(){return n}}),void 0;n+=o}this.index++}this.throwError("Unterminated quote",t)}};var pi=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n};pi.ZERO=f(function(){return 0},{constant:!0}),pi.prototype={constructor:pi,parse:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t.literal=!!t.literal,t.constant=!!t.constant,t},primary:function(){var e;if(this.expect("("))e=this.filterChain(),this.consume(")");else if(this.expect("["))e=this.arrayDeclaration();else if(this.expect("{"))e=this.object();else{var t=this.expect();e=t.fn,e||this.throwError("not a primary expression",t),e.literal=!!t.literal,e.constant=!!t.constant}for(var n,r;n=this.expect("(","[",".");)"("===n.text?(e=this.functionCall(e,r),r=null):"["===n.text?(r=e,e=this.objectIndex(e)):"."===n.text?(r=e,e=this.fieldAccess(e)):this.throwError("IMPOSSIBLE");return e},throwError:function(e,t){throw li("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},peekToken:function(){if(0===this.tokens.length)throw li("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){if(this.tokens.length>0){var i=this.tokens[0],o=i.text;if(o===e||o===t||o===n||o===r||!e&&!t&&!n&&!r)return i}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return i?(this.tokens.shift(),i):!1},consume:function(e){this.expect(e)||this.throwError("is unexpected, expecting ["+e+"]",this.peek())},unaryFn:function(e,t){return f(function(n,r){return e(n,r,t)},{constant:t.constant})},ternaryFn:function(e,t,n){return f(function(r,i){return e(r,i)?t(r,i):n(r,i)},{constant:e.constant&&t.constant&&n.constant})},binaryFn:function(e,t,n){return f(function(r,i){return t(r,i,e,n)},{constant:e.constant&&n.constant})},statements:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var r,i=0;i<e.length;i++){var o=e[i];o&&(r=o(t,n))}return r}},filterChain:function(){for(var e,t=this.expression();;){if(!(e=this.expect("|")))return t;t=this.binaryFn(t,e.fn,this.filter())}},filter:function(){for(var e=this.expect(),t=this.$filter(e.text),n=[];;){if(!(e=this.expect(":"))){var r=function(e,r,i){for(var o=[i],a=0;a<n.length;a++)o.push(n[a](e,r));return t.apply(e,o)};return function(){return r}}n.push(this.expression())}},expression:function(){return this.assignment()},assignment:function(){var e,t,n=this.ternary();return(t=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,t.index)+"] can not be assigned to",t),e=this.ternary(),function(t,r){return n.assign(t,e(t,r),r)}):n},ternary:function(){var e,t,n=this.logicalOR();return(t=this.expect("?"))?(e=this.ternary(),(t=this.expect(":"))?this.ternaryFn(n,e,this.ternary()):(this.throwError("expected :",t),void 0)):n},logicalOR:function(){for(var e,t=this.logicalAND();;){if(!(e=this.expect("||")))return t;t=this.binaryFn(t,e.fn,this.logicalAND())}},logicalAND:function(){var e,t=this.equality();return(e=this.expect("&&"))&&(t=this.binaryFn(t,e.fn,this.logicalAND())),t},equality:function(){var e,t=this.relational();return(e=this.expect("==","!=","===","!=="))&&(t=this.binaryFn(t,e.fn,this.equality())),t},relational:function(){var e,t=this.additive();return(e=this.expect("<",">","<=",">="))&&(t=this.binaryFn(t,e.fn,this.relational())),t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t=this.binaryFn(t,e.fn,this.multiplicative());return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t=this.binaryFn(t,e.fn,this.unary());return t},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(pi.ZERO,e.fn,this.unary()):(e=this.expect("!"))?this.unaryFn(e.fn,this.unary()):this.primary()},fieldAccess:function(e){var t=this,n=this.expect().text,r=Sn(n,this.options,this.text);return f(function(t,n,i){return r(i||e(t,n))},{assign:function(r,i,o){return $n(e(r,o),n,i,t.text,t.options)}})},objectIndex:function(e){var t=this,r=this.expression();return this.consume("]"),f(function(i,o){var a,s,l=e(i,o),c=r(i,o);return l?(a=xn(l[c],t.text),a&&a.then&&t.options.unwrapPromises&&(s=a,"$$v"in a||(s.$$v=n,s.then(function(e){s.$$v=e})),a=a.$$v),a):n},{assign:function(n,i,o){var a=r(n,o),s=xn(e(n,o),t.text);return s[a]=i}})},functionCall:function(e,t){var n=[];if(")"!==this.peekToken().text)do n.push(this.expression());while(this.expect(","));this.consume(")");var r=this;return function(i,o){for(var a=[],s=t?t(i,o):i,l=0;l<n.length;l++)a.push(n[l](i,o));var c=e(i,o,s)||h;xn(s,r.text),xn(c,r.text);var u=c.apply?c.apply(s,a):c(a[0],a[1],a[2],a[3],a[4]);return xn(u,r.text)}},arrayDeclaration:function(){var e=[],t=!0;if("]"!==this.peekToken().text)do{if(this.peek("]"))break;var n=this.expression();e.push(n),n.constant||(t=!1)}while(this.expect(","));return this.consume("]"),f(function(t,n){for(var r=[],i=0;i<e.length;i++)r.push(e[i](t,n));return r},{literal:!0,constant:t})},object:function(){var e=[],t=!0;if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.expect(),r=n.string||n.text;this.consume(":");var i=this.expression();e.push({key:r,value:i}),i.constant||(t=!1)}while(this.expect(","));return this.consume("}"),f(function(t,n){for(var r={},i=0;i<e.length;i++){var o=e[i];r[o.key]=o.value(t,n)}return r},{literal:!0,constant:t})}};var hi={},gi=r("$sce"),mi={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},vi=t.createElement("a"),yi=_n(e.location.href,!0);Un.$inject=["$provide"],Bn.$inject=["$locale"],Vn.$inject=["$locale"];var bi=".",xi={yyyy:Xn("FullYear",4),yy:Xn("FullYear",2,0,!0),y:Xn("FullYear",1),MMMM:Gn("Month"),MMM:Gn("Month",!0),MM:Xn("Month",2,1),M:Xn("Month",1,1),dd:Xn("Date",2),d:Xn("Date",1),HH:Xn("Hours",2),H:Xn("Hours",1),hh:Xn("Hours",2,-12),h:Xn("Hours",1,-12),mm:Xn("Minutes",2),m:Xn("Minutes",1),ss:Xn("Seconds",2),s:Xn("Seconds",1),sss:Xn("Milliseconds",3),EEEE:Gn("Day"),EEE:Gn("Day",!0),a:Jn,Z:Yn},$i=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,ki=/^\-?\d+$/;Qn.$inject=["$locale"];var wi=m(pr),Ci=m(gr);tr.$inject=["$parse"];var Si=m({restrict:"E",compile:function(e,n){return 8>=yr&&(n.href||n.name||n.$set("href",""),e.append(t.createComment("IE fix"))),n.href||n.xlinkHref||n.name?void 0:function(e,t){var n="[object SVGAnimatedString]"===Sr.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}),Ei={};o(zr,function(e,t){if("multiple"!=e){var n=Ut("ng-"+t);Ei[n]=function(){return{priority:100,link:function(e,r,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}}}}}),o(["src","srcset","href"],function(e){var t=Ut("ng-"+e);Ei[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===Sr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,function(e){e&&(i.$set(a,e),yr&&o&&r.prop(o,i[a]))})}}}});var Ai={$addControl:h,$removeControl:h,$setValidity:h,$setDirty:h,$setPristine:h};rr.$inject=["$element","$attrs","$scope","$animate"];var Ti=function(e){return["$timeout",function(t){var r={name:"form",restrict:e?"EAC":"E",controller:rr,compile:function(){return{pre:function(e,r,i,o){if(!i.action){var a=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1};Pr(r[0],"submit",a),r.on("$destroy",function(){t(function(){Lr(r[0],"submit",a)},0,!1)})}var s=r.parent().controller("form"),l=i.name||i.ngForm;l&&$n(e,l,o,l),s&&r.on("$destroy",function(){s.$removeControl(o),l&&$n(e,l,n,l),f(o,Ai)})}}}};return r}]},Oi=Ti(),Ni=Ti(!0),ji=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Mi=/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i,Ii=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Di={text:ar,number:sr,url:lr,email:cr,radio:ur,checkbox:fr,hidden:h,button:h,submit:h,reset:h,file:h},Pi=["$browser","$sniffer",function(e,t){return{restrict:"E",require:"?ngModel",link:function(n,r,i,o){o&&(Di[pr(i.type)]||Di.text)(n,r,i,o,t,e)}}}],Li="ng-valid",Hi="ng-invalid",Ri="ng-pristine",_i="ng-dirty",Fi=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate",function(e,t,n,i,a,s){function l(e,t){t=t?"-"+et(t,"-"):"",s.removeClass(i,(e?Hi:Li)+t),s.addClass(i,(e?Li:Hi)+t)}this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=n.name;var c=a(n.ngModel),u=c.assign;if(!u)throw r("ngModel")("nonassign","Expression '{0}' is non-assignable. Element: {1}",n.ngModel,z(i));this.$render=h,this.$isEmpty=function(e){return v(e)||""===e||null===e||e!==e};var f=i.inheritedData("$formController")||Ai,d=0,p=this.$error={};i.addClass(Ri),l(!0),this.$setValidity=function(e,t){p[e]!==!t&&(t?(p[e]&&d--,d||(l(!0),this.$valid=!0,this.$invalid=!1)):(l(!1),this.$invalid=!0,this.$valid=!1,d++),p[e]=!t,l(t,e),f.$setValidity(e,t,this))},this.$setPristine=function(){this.$dirty=!1,this.$pristine=!0,s.removeClass(i,_i),s.addClass(i,Ri)},this.$setViewValue=function(n){this.$viewValue=n,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,s.removeClass(i,Ri),s.addClass(i,_i),f.$setDirty()),o(this.$parsers,function(e){n=e(n)}),this.$modelValue!==n&&(this.$modelValue=n,u(e,n),o(this.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}}))};var g=this;e.$watch(function(){var t=c(e);if(g.$modelValue!==t){var n=g.$formatters,r=n.length;for(g.$modelValue=t;r--;)t=n[r](t);g.$viewValue!==t&&(g.$viewValue=t,g.$render())}return t})}],qi=function(){return{require:["ngModel","^?form"],controller:Fi,link:function(e,t,n,r){var i=r[0],o=r[1]||Ai;o.$addControl(i),e.$on("$destroy",function(){o.$removeControl(i)})}}},Ui=m({require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Wi=function(){return{require:"?ngModel",link:function(e,t,n,r){if(r){n.required=!0;var i=function(e){return n.required&&r.$isEmpty(e)?(r.$setValidity("required",!1),void 0):(r.$setValidity("required",!0),e)};r.$formatters.push(i),r.$parsers.unshift(i),n.$observe("required",function(){i(r.$viewValue)})}}}},Bi=function(){return{require:"ngModel",link:function(e,t,r,i){var a=/\/(.*)\//.exec(r.ngList),s=a&&new RegExp(a[1])||r.ngList||",",l=function(e){if(!v(e)){var t=[];return e&&o(e.split(s),function(e){e&&t.push(Or(e))}),t}};i.$parsers.push(l),i.$formatters.push(function(e){return w(e)?e.join(", "):n}),i.$isEmpty=function(e){return!e||!e.length}}}},Vi=/^(true|false|\d+)$/,zi=function(){return{priority:100,compile:function(e,t){return Vi.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Ki=nr(function(e,t,r){t.addClass("ng-binding").data("$binding",r.ngBind),e.$watch(r.ngBind,function(e){t.text(e==n?"":e)})}),Xi=["$interpolate",function(e){return function(t,n,r){var i=e(n.attr(r.$attr.ngBindTemplate));n.addClass("ng-binding").data("$binding",i),r.$observe("ngBindTemplate",function(e){n.text(e)})}}],Gi=["$sce","$parse",function(e,t){return function(n,r,i){function o(){return(a(n)||"").toString()}r.addClass("ng-binding").data("$binding",i.ngBindHtml);var a=t(i.ngBindHtml);n.$watch(o,function(){r.html(e.getTrustedHtml(a(n))||"")})}}],Yi=dr("",!0),Ji=dr("Odd",0),Qi=dr("Even",1),Zi=nr({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),eo=[function(){return{scope:!0,controller:"@",priority:500}}],to={};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=Ut("ng-"+e);to[t]=["$parse",function(n){return{compile:function(r,i){var o=n(i[t]);return function(t,n){n.on(pr(e),function(e){t.$apply(function(){o(t,{$event:e})})})}}}}]});var no=["$animate",function(e){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,l,c;n.$watch(i.ngIf,function(o){V(o)?l||(l=n.$new(),a(l,function(n){n[n.length++]=t.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},e.enter(n,r.parent(),r)})):(c&&(c.remove(),c=null),l&&(l.$destroy(),l=null),s&&(c=at(s.clone),e.leave(c,function(){c=null}),s=null))})}}}],ro=["$http","$templateCache","$anchorScroll","$animate","$sce",function(e,t,n,r,i){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ar.noop,compile:function(o,a){var s=a.ngInclude||a.src,l=a.onload||"",c=a.autoscroll;return function(o,a,u,f,d){var p,h,g,m=0,v=function(){h&&(h.remove(),h=null),p&&(p.$destroy(),p=null),g&&(r.leave(g,function(){h=null}),h=g,g=null)};o.$watch(i.parseAsResourceUrl(s),function(i){var s=function(){!y(c)||c&&!o.$eval(c)||n()},u=++m;i?(e.get(i,{cache:t}).success(function(e){if(u===m){var t=o.$new();f.template=e;var n=d(t,function(e){v(),r.enter(e,null,a,s)});p=t,g=n,p.$emit("$includeContentLoaded"),o.$eval(l)}}).error(function(){u===m&&v()}),o.$emit("$includeContentRequested")):(v(),f.template=null)})}}}}],io=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(t,n,r,i){n.html(i.template),e(n.contents())(t)}}}],oo=nr({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),ao=nr({terminal:!0,priority:1e3}),so=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(r,i,a){var s=a.count,l=a.$attr.when&&i.attr(a.$attr.when),c=a.offset||0,u=r.$eval(l)||{},f={},d=t.startSymbol(),p=t.endSymbol(),h=/^when(Minus)?(.+)$/;o(a,function(e,t){h.test(t)&&(u[pr(t.replace("when","").replace("Minus","-"))]=i.attr(a.$attr[t]))}),o(u,function(e,r){f[r]=t(e.replace(n,d+s+"-"+c+p))}),r.$watch(function(){var t=parseFloat(r.$eval(s));return isNaN(t)?"":(t in u||(t=e.pluralCat(t-c)),f[t](r,i,!0))},function(e){i.text(e)})}}}],lo=["$parse","$animate",function(e,n){function a(e){return e.clone[0]}function s(e){return e.clone[e.clone.length-1]}var l="$$NG_REMOVED",c=r("ngRepeat");return{transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,link:function(r,u,f,d,p){var h,g,m,v,y,b,x,$,k,w=f.ngRepeat,C=w.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),S={$id:jt};if(!C)throw c("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",w);if(b=C[1],x=C[2],h=C[3],h?(g=e(h),m=function(e,t,n){return k&&(S[k]=e),S[$]=t,S.$index=n,g(r,S)}):(v=function(e,t){return jt(t)},y=function(e){return e}),C=b.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/),!C)throw c("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",b);$=C[3]||C[1],k=C[2];var E={};r.$watchCollection(x,function(e){var f,d,h,g,b,x,C,S,A,T,O,N,j=u[0],M={},I=[];if(i(e))T=e,A=m||v;else{A=m||y,T=[];for(x in e)e.hasOwnProperty(x)&&"$"!=x.charAt(0)&&T.push(x);T.sort()}for(g=T.length,d=I.length=T.length,f=0;d>f;f++)if(x=e===T?f:T[f],C=e[x],S=A(x,C,f),it(S,"`track by` id"),E.hasOwnProperty(S))O=E[S],delete E[S],M[S]=O,I[f]=O;else{if(M.hasOwnProperty(S))throw o(I,function(e){e&&e.scope&&(E[e.id]=e)}),c("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}",w,S);I[f]={id:S},M[S]=!1}for(x in E)E.hasOwnProperty(x)&&(O=E[x],N=at(O.clone),n.leave(N),o(N,function(e){e[l]=!0}),O.scope.$destroy());for(f=0,d=T.length;d>f;f++){if(x=e===T?f:T[f],C=e[x],O=I[f],I[f-1]&&(j=s(I[f-1])),O.scope){b=O.scope,h=j;do h=h.nextSibling;while(h&&h[l]);a(O)!=h&&n.move(at(O.clone),null,br(j)),j=s(O)}else b=r.$new();b[$]=C,k&&(b[k]=x),b.$index=f,b.$first=0===f,b.$last=f===g-1,b.$middle=!(b.$first||b.$last),b.$odd=!(b.$even=0===(1&f)),O.scope||p(b,function(e){e[e.length++]=t.createComment(" end ngRepeat: "+w+" "),n.enter(e,null,br(j)),j=e,O.scope=b,O.clone=e,M[O.id]=O})}E=M})}}}],co=["$animate",function(e){return function(t,n,r){t.$watch(r.ngShow,function(t){e[V(t)?"removeClass":"addClass"](n,"ng-hide")})}}],uo=["$animate",function(e){return function(t,n,r){t.$watch(r.ngHide,function(t){e[V(t)?"addClass":"removeClass"](n,"ng-hide")})}}],fo=nr(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),po=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(t,n,r,i){var a=r.ngSwitch||r.on,s=[],l=[],c=[],u=[];t.$watch(a,function(n){var a,f;for(a=0,f=c.length;f>a;++a)c[a].remove();for(c.length=0,a=0,f=u.length;f>a;++a){var d=l[a];u[a].$destroy(),c[a]=d,e.leave(d,function(){c.splice(a,1)})}l.length=0,u.length=0,(s=i.cases["!"+n]||i.cases["?"])&&(t.$eval(r.change),o(s,function(n){var r=t.$new();u.push(r),n.transclude(r,function(t){var r=n.element;l.push(t),e.enter(t,r.parent(),r)})}))})}}}],ho=nr({transclude:"element",priority:800,require:"^ngSwitch",link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),go=nr({transclude:"element",priority:800,require:"^ngSwitch",link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),mo=nr({link:function(e,t,n,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",z(t));o(function(e){t.empty(),t.append(e)})}}),vo=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],yo=r("ngOptions"),bo=m({terminal:!0}),xo=["$compile","$parse",function(e,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:h};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r,i,o=this,a={},l=s;o.databound=n.ngModel,o.init=function(e,t,n){l=e,r=t,i=n},o.addOption=function(t){it(t,'"option value"'),a[t]=!0,l.$viewValue==t&&(e.val(t),i.parent()&&i.remove())},o.removeOption=function(e){this.hasOption(e)&&(delete a[e],l.$viewValue==e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){var n="? "+jt(t)+" ?";i.val(n),e.prepend(i),e.val(n),i.prop("selected",!0)},o.hasOption=function(e){return a.hasOwnProperty(e)},t.$on("$destroy",function(){o.renderUnknownOption=h})}],link:function(s,l,c,u){function f(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(S.parent()&&S.remove(),t.val(e),""===e&&h.prop("selected",!0)):v(e)&&h?t.val(""):r.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){S.parent()&&S.remove(),n.$setViewValue(t.val())})})}function d(e,t,n){var r;n.$render=function(){var e=new Mt(n.$viewValue);o(t.find("option"),function(t){t.selected=y(e.get(t.value))})},e.$watch(function(){H(r,n.$viewValue)||(r=L(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];o(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function p(t,o,s){function l(){var e,n,r,i,l,c,m,x,E,A,T,O,N,j,M,I={"":[]},D=[""],P=s.$modelValue,L=g(t)||[],H=d?a(L):L,R={},_=!1;if(b)if(v&&w(P)){_=new Mt([]);for(var F=0;F<P.length;F++)R[f]=P[F],_.put(v(t,R),P[F])}else _=new Mt(P);for(T=0;E=H.length,E>T;T++){if(m=T,d){if(m=H[T],"$"===m.charAt(0))continue;R[d]=m}if(R[f]=L[m],e=p(t,R)||"",(n=I[e])||(n=I[e]=[],D.push(e)),b)O=y(_.remove(v?v(t,R):h(t,R)));else{if(v){var q={};q[f]=P,O=v(t,q)===v(t,R)}else O=P===h(t,R);_=_||O}M=u(t,R),M=y(M)?M:"",n.push({id:v?v(t,R):d?H[T]:T,label:M,selected:O})}for(b||($||null===P?I[""].unshift({id:"",label:"",selected:!_}):_||I[""].unshift({id:"?",label:"",selected:!0})),A=0,x=D.length;x>A;A++){for(e=D[A],n=I[e],S.length<=A?(i={element:C.clone().attr("label",e),label:n.label},l=[i],S.push(l),o.append(i.element)):(l=S[A],i=l[0],i.label!=e&&i.element.attr("label",i.label=e)),N=null,T=0,E=n.length;E>T;T++)r=n[T],(c=l[T+1])?(N=c.element,c.label!==r.label&&N.text(c.label=r.label),c.id!==r.id&&N.val(c.id=r.id),c.selected!==r.selected&&N.prop("selected",c.selected=r.selected)):(""===r.id&&$?j=$:(j=k.clone()).val(r.id).attr("selected",r.selected).text(r.label),l.push(c={element:j,label:r.label,id:r.id,selected:r.selected}),N?N.after(j):i.element.append(j),N=j);for(T++;l.length>T;)l.pop().element.remove()}for(;S.length>A;)S.pop()[0].element.remove()}var c;if(!(c=x.match(i)))throw yo("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",x,z(o));var u=r(c[2]||c[1]),f=c[4]||c[6],d=c[5],p=r(c[3]||""),h=r(c[2]?c[1]:f),g=r(c[7]),m=c[8],v=m?r(c[8]):null,S=[[{element:o,label:""}]];$&&(e($)(t),$.removeClass("ng-scope"),$.remove()),o.empty(),o.on("change",function(){t.$apply(function(){var e,r,i,a,l,c,u,p,m,y=g(t)||[],x={};if(b){for(i=[],c=0,p=S.length;p>c;c++)for(e=S[c],l=1,u=e.length;u>l;l++)if((a=e[l].element)[0].selected){if(r=a.val(),d&&(x[d]=r),v)for(m=0;m<y.length&&(x[f]=y[m],v(t,x)!=r);m++);else x[f]=y[r];i.push(h(t,x))}}else{if(r=o.val(),"?"==r)i=n;else if(""===r)i=null;else if(v){for(m=0;m<y.length;m++)if(x[f]=y[m],v(t,x)==r){i=h(t,x);break}}else x[f]=y[r],d&&(x[d]=r),i=h(t,x);S[0].length>1&&S[0][1].id!==r&&(S[0][1].selected=!1)}s.$setViewValue(i)})}),s.$render=l,t.$watch(l)}if(u[1]){for(var h,g=u[0],m=u[1],b=c.multiple,x=c.ngOptions,$=!1,k=br(t.createElement("option")),C=br(t.createElement("optgroup")),S=k.clone(),E=0,A=l.children(),T=A.length;T>E;E++)if(""===A[E].value){h=$=A.eq(E);break}g.init(m,$,S),b&&(m.$isEmpty=function(e){return!e||0===e.length}),x?p(s,l,m):b?d(s,l,m):f(s,l,m,g)}}}}],$o=["$interpolate",function(e){var t={addOption:h,removeOption:h};return{restrict:"E",priority:100,compile:function(n,r){if(v(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound?n.prop("selected",!1):s=t,i?e.$watch(i,function(e,t){r.$set("value",e),e!==t&&s.removeOption(t),s.addOption(e)}):s.addOption(r.value),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],ko=m({restrict:"E",terminal:!0});e.angular.bootstrap&&console.log("WARNING: Tried to load angular more than once."),tt(),lt(Ar),br(t).ready(function(){Q(t,Z)})}(e,t),!s.$$csp()&&s.element(t).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}</style>'),function(e,t,n){"use strict";t.module("ngAnimate",["ng"]).factory("$$animateReflow",["$$rAF","$document",function(e){return function(t){return e(function(){t()})}}]).config(["$provide","$animateProvider",function(r,i){function o(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==u)return n}}function a(e){return t.element(o(e))}var s=t.noop,l=t.forEach,c=i.$$selectors,u=1,f="$$ngAnimateState",d="ng-animate",p={running:!0};r.decorator("$animate",["$delegate","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document",function(e,n,r,u,h,g){function m(e){if(e){var t=[],i={}; | |
e=e.substr(1).split("."),(r.transitions||r.animations)&&t.push(n.get(c[""]));for(var o=0;o<e.length;o++){var a=e[o],s=c[a];s&&!i[a]&&(t.push(n.get(s)),i[a]=!0)}return t}}function v(e,n,r){function i(e,t){var n=e[t],r=e["before"+t.charAt(0).toUpperCase()+t.substr(1)];return n||r?("leave"==t&&(r=n,n=null),x.push({event:t,fn:n}),v.push({event:t,fn:r}),!0):void 0}function o(t,n,i){var o=[];l(t,function(e){e.fn&&o.push(e)});var a=0;l(o,function(t,l){var f=function(){e:{if(n){if((n[l]||s)(),++a<o.length)break e;n=null}i()}};switch(t.event){case"setClass":n.push(t.fn(e,c,u,f));break;case"addClass":n.push(t.fn(e,c||r,f));break;case"removeClass":n.push(t.fn(e,u||r,f));break;default:n.push(t.fn(e,f))}}),n&&0===n.length&&i()}var a=e[0];if(a){var c,u,f="setClass"==n,d=f||"addClass"==n||"removeClass"==n;t.isArray(r)&&(c=r[0],u=r[1],r=c+" "+u);var p=e.attr("class")+" "+r;if(C(p)){var h=s,g=[],v=[],y=s,b=[],x=[],p=(" "+p).replace(/\s+/g,".");return l(m(p),function(e){!i(e,n)&&f&&(i(e,"addClass"),i(e,"removeClass"))}),{node:a,event:n,className:r,isClassBased:d,isSetClassOperation:f,before:function(e){h=e,o(v,g,function(){h=s,e()})},after:function(e){y=e,o(x,b,function(){y=s,e()})},cancel:function(){g&&(l(g,function(e){(e||s)(!0)}),h(!0)),b&&(l(b,function(e){(e||s)(!0)}),y(!0))}}}}}function y(e,n,r,i,o,a,s){function c(t){var i="$animate:"+t;w&&w[i]&&0<w[i].length&&h(function(){r.triggerHandler(i,{event:e,className:n})})}function u(){c("before")}function p(){c("after")}function g(){c("close"),s&&h(function(){s()})}function m(){m.hasBeenRun||(m.hasBeenRun=!0,a())}function y(){if(!y.hasBeenRun){y.hasBeenRun=!0;var t=r.data(f);t&&(b&&b.isClassBased?x(r,n):(h(function(){var t=r.data(f)||{};T==t.index&&x(r,n,e)}),r.data(f,t))),g()}}var b=v(r,e,n);if(b){n=b.className;var w=t.element._data(b.node),w=w&&w.events;i||(i=o?o.parent():r.parent());var C=r.data(f)||{};o=C.active||{};var S=C.totalActive||0,E=C.last;if(b.isClassBased&&(C.disabled||E&&!E.isClassBased)||$(r,i))m(),u(),p(),y();else{if(i=!1,S>0){if(C=[],b.isClassBased)"setClass"==E.event?(C.push(E),x(r,n)):o[n]&&(A=o[n],A.event==e?i=!0:(C.push(A),x(r,n)));else if("leave"==e&&o["ng-leave"])i=!0;else{for(var A in o)C.push(o[A]),x(r,A);o={},S=0}0<C.length&&l(C,function(e){e.cancel()})}if(!b.isClassBased||b.isSetClassOperation||i||(i="addClass"==e==r.hasClass(n)),i)u(),p(),g();else{"leave"==e&&r.one("$destroy",function(e){e=t.element(this);var n=e.data(f);n&&(n=n.active["ng-leave"])&&(n.cancel(),x(e,"ng-leave"))}),r.addClass(d);var T=k++;S++,o[n]=b,r.data(f,{last:b,active:o,index:T,totalActive:S}),u(),b.before(function(t){var i=r.data(f);t=t||!i||!i.active[n]||b.isClassBased&&i.active[n].event!=e,m(),!0===t?y():(p(),b.after(y))})}}}else m(),u(),p(),y()}function b(e){(e=o(e))&&(e=t.isFunction(e.getElementsByClassName)?e.getElementsByClassName(d):e.querySelectorAll("."+d),l(e,function(e){e=t.element(e),(e=e.data(f))&&e.active&&l(e.active,function(e){e.cancel()})}))}function x(e,t){if(o(e)==o(u))p.disabled||(p.running=!1,p.structural=!1);else if(t){var n=e.data(f)||{},r=!0===t;!r&&n.active&&n.active[t]&&(n.totalActive--,delete n.active[t]),(r||!n.totalActive)&&(e.removeClass(d),e.removeData(f))}}function $(e,t){if(p.disabled)return!0;if(o(e)==o(u))return p.disabled||p.running;do{if(0===t.length)break;var n=o(t)==o(u),r=n?p:t.data(f),r=r&&(!!r.disabled||r.running||0<r.totalActive);if(n||r)return r;if(n)break}while(t=t.parent());return!0}var k=0;u.data(f,p),g.$$postDigest(function(){g.$$postDigest(function(){p.running=!1})});var w=i.classNameFilter(),C=w?function(e){return w.test(e)}:function(){return!0};return{enter:function(t,n,r,i){this.enabled(!1,t),e.enter(t,n,r),g.$$postDigest(function(){t=a(t),y("enter","ng-enter",t,n,r,s,i)})},leave:function(t,n){b(t),this.enabled(!1,t),g.$$postDigest(function(){y("leave","ng-leave",a(t),null,null,function(){e.leave(t)},n)})},move:function(t,n,r,i){b(t),this.enabled(!1,t),e.move(t,n,r),g.$$postDigest(function(){t=a(t),y("move","ng-move",t,n,r,s,i)})},addClass:function(t,n,r){t=a(t),y("addClass",n,t,null,null,function(){e.addClass(t,n)},r)},removeClass:function(t,n,r){t=a(t),y("removeClass",n,t,null,null,function(){e.removeClass(t,n)},r)},setClass:function(t,n,r,i){t=a(t),y("setClass",[n,r],t,null,null,function(){e.setClass(t,n,r)},i)},enabled:function(e,t){switch(arguments.length){case 2:if(e)x(t);else{var n=t.data(f)||{};n.disabled=!0,t.data(f,n)}break;case 1:p.disabled=!e;break;default:e=!p.disabled}return!!e}}}]),i.register("",["$window","$sniffer","$timeout","$$animateReflow",function(r,i,a,c){function f(e,t){I&&I(),z.push(t),I=c(function(){l(z,function(e){e()}),z=[],I=null,B={}})}function d(e,n){var r=o(e);e=t.element(r),G.push(e),r=Date.now()+n,X>=r||(a.cancel(K),X=r,K=a(function(){p(G),G=[]},n,!1))}function p(e){l(e,function(e){(e=e.data(_))&&(e.closeAnimationFn||s)()})}function h(e,t){var n=t?B[t]:null;if(!n){var i,o,a,s,c=0,f=0,d=0,p=0;l(e,function(e){if(e.nodeType==u){e=r.getComputedStyle(e)||{},a=e[T+D],c=Math.max(g(a),c),s=e[T+P],i=e[T+L],f=Math.max(g(i),f),o=e[N+L],p=Math.max(g(o),p);var t=g(e[N+D]);t>0&&(t*=parseInt(e[N+H],10)||1),d=Math.max(t,d)}}),n={total:0,transitionPropertyStyle:s,transitionDurationStyle:a,transitionDelayStyle:i,transitionDelay:f,transitionDuration:c,animationDelayStyle:o,animationDelay:p,animationDuration:d},t&&(B[t]=n)}return n}function g(e){var n=0;return e=t.isString(e)?e.split(/\s*,\s*/):[],l(e,function(e){n=Math.max(parseFloat(e)||0,n)}),n}function m(e){var t=e.parent(),n=t.data(R);return n||(t.data(R,++V),n=V),n+"-"+o(e).getAttribute("class")}function v(e,t,n,r){var i=m(t),a=i+" "+n,l=B[a]?++B[a].total:0,c={};if(l>0){var u=n+"-stagger",c=i+" "+u;(i=!B[c])&&t.addClass(u),c=h(t,c),i&&t.removeClass(u)}r=r||function(e){return e()},t.addClass(n);var u=t.data(_)||{},f=r(function(){return h(t,a)});return r=f.transitionDuration,i=f.animationDuration,0===r&&0===i?(t.removeClass(n),!1):(t.data(_,{running:u.running||0,itemIndex:l,stagger:c,timings:f,closeAnimationFn:s}),e=0<u.running||"setClass"==e,r>0&&y(t,n,e),i>0&&0<c.animationDelay&&0===c.animationDuration&&(o(t).style[N]="none 0s"),!0)}function y(e,t,n){"ng-enter"!=t&&"ng-move"!=t&&"ng-leave"!=t&&n?e.addClass(F):o(e).style[T+P]="none"}function b(e){var t=T+P,n=o(e);n.style[t]&&0<n.style[t].length&&(n.style[t]=""),e.removeClass(F)}function x(e){var t=N;e=o(e),e.style[t]&&0<e.style[t].length&&(e.style[t]="")}function $(e,t,n,r){function i(e){t.off(y,a),t.removeClass(c),E(t,n),e=o(t);for(var r in x)e.style.removeProperty(x[r])}function a(e){e.stopPropagation();var t=e.originalEvent||e;e=t.$manualTimeStamp||t.timeStamp||Date.now(),t=parseFloat(t.elapsedTime.toFixed(q)),Math.max(e-v,0)>=m&&t>=h&&r()}var s=o(t);if(e=t.data(_),-1!=s.getAttribute("class").indexOf(n)&&e){var c="";l(n.split(" "),function(e,t){c+=(t>0?" ":"")+e+"-active"});var u=e.stagger,f=e.timings,p=e.itemIndex,h=Math.max(f.transitionDuration,f.animationDuration),g=Math.max(f.transitionDelay,f.animationDelay),m=g*W,v=Date.now(),y=j+" "+O,b="",x=[];if(0<f.transitionDuration){var $=f.transitionPropertyStyle;-1==$.indexOf("all")&&(b+=M+"transition-property: "+$+";",b+=M+"transition-duration: "+f.transitionDurationStyle+";",x.push(M+"transition-property"),x.push(M+"transition-duration"))}return p>0&&(0<u.transitionDelay&&0===u.transitionDuration&&(b+=M+"transition-delay: "+k(f.transitionDelayStyle,u.transitionDelay,p)+"; ",x.push(M+"transition-delay")),0<u.animationDelay&&0===u.animationDuration&&(b+=M+"animation-delay: "+k(f.animationDelayStyle,u.animationDelay,p)+"; ",x.push(M+"animation-delay"))),0<x.length&&(f=s.getAttribute("style")||"",s.setAttribute("style",f+" "+b)),t.on(y,a),t.addClass(c),e.closeAnimationFn=function(){i(),r()},s=(p*(Math.max(u.animationDelay,u.transitionDelay)||0)+(g+h)*U)*W,e.running++,d(t,s),i}r()}function k(e,t,n){var r="";return l(e.split(","),function(e,i){r+=(i>0?",":"")+(n*t+parseInt(e,10))+"s"}),r}function w(e,t,n,r){return v(e,t,n,r)?function(e){e&&E(t,n)}:void 0}function C(e,t,n,r){return t.data(_)?$(e,t,n,r):(E(t,n),r(),void 0)}function S(e,t,n,r){var i=w(e,t,n);if(i){var o=i;return f(t,function(){b(t,n),x(t),o=C(e,t,n,r)}),function(e){(o||s)(e)}}r()}function E(e,t){e.removeClass(t);var n=e.data(_);n&&(n.running&&n.running--,n.running&&0!==n.running||e.removeData(_))}function A(e,n){var r="";return e=t.isArray(e)?e:e.split(/\s+/),l(e,function(e,t){e&&0<e.length&&(r+=(t>0?" ":"")+e+n)}),r}var T,O,N,j,M="";e.ontransitionend===n&&e.onwebkittransitionend!==n?(M="-webkit-",T="WebkitTransition",O="webkitTransitionEnd transitionend"):(T="transition",O="transitionend"),e.onanimationend===n&&e.onwebkitanimationend!==n?(M="-webkit-",N="WebkitAnimation",j="webkitAnimationEnd animationend"):(N="animation",j="animationend");var I,D="Duration",P="Property",L="Delay",H="IterationCount",R="$$ngAnimateKey",_="$$ngAnimateCSS3Data",F="ng-animate-block-transitions",q=3,U=1.5,W=1e3,B={},V=0,z=[],K=null,X=0,G=[];return{enter:function(e,t){return S("enter",e,"ng-enter",t)},leave:function(e,t){return S("leave",e,"ng-leave",t)},move:function(e,t){return S("move",e,"ng-move",t)},beforeSetClass:function(e,t,n,r){var i=A(n,"-remove")+" "+A(t,"-add"),o=w("setClass",e,i,function(r){var i=e.attr("class");return e.removeClass(n),e.addClass(t),r=r(),e.attr("class",i),r});return o?(f(e,function(){b(e,i),x(e),r()}),o):(r(),void 0)},beforeAddClass:function(e,t,n){var r=w("addClass",e,A(t,"-add"),function(n){return e.addClass(t),n=n(),e.removeClass(t),n});return r?(f(e,function(){b(e,t),x(e),n()}),r):(n(),void 0)},setClass:function(e,t,n,r){return n=A(n,"-remove"),t=A(t,"-add"),C("setClass",e,n+" "+t,r)},addClass:function(e,t,n){return C("addClass",e,A(t,"-add"),n)},beforeRemoveClass:function(e,t,n){var r=w("removeClass",e,A(t,"-remove"),function(n){var r=e.attr("class");return e.removeClass(t),n=n(),e.attr("class",r),n});return r?(f(e,function(){b(e,t),x(e),n()}),r):(n(),void 0)},removeClass:function(e,t,n){return C("removeClass",e,A(t,"-remove"),n)}}}])}])}(e,e.angular),s.module("Kimono",["ngAnimate"]),s.module("Kimono").factory("Collections",["Regex","Utils","Datatypes","Common",function(t,r,o,a){var s=new function(){this.getEpSelectorComponent=function(e){var t=e.selectorObjects[0].selector.split(" > ");return e.context.ancestorCounter>t.length-1?"":t[t.length-1-e.context.ancestorCounter]};var o=function(e){var t={text:""};for(attribute in e.context.attributes)if(e.context.attributes.hasOwnProperty(attribute)){var n=e.context.attributes[attribute];("true"==n.value||n.value===!0)&&(t[attribute]="")}return console.log(t),Object.keys(t).length>1?t:""};this.updateDatalists=function(e){for(var a=0;a<e.length;a++){var l=e[a];if(1==l.length){var c=l[0];if(c.datalist=[],c.context.delta=0,c.context.numberOfTableNormalizers=0,c.selectorObjects[0]&&c.selectorObjects[0].selector)for(var u=r.querySelectorAll(c.getCombinedSelector()),f=0;f<u.length;f++){var d=u[f];t.testElForRegex(d,c)&&(c.datalist.push(s(d,c)),"kim-table-normalizer"==d.className&&c.context.numberOfTableNormalizers++)}}else{for(var p="association",h=0;h<l.length;h++){if("pattern"==l[h].context.associationType){p="pattern";break}if("forced"==l[h].context.associationType){p="forced";break}if("single"==l[h].context.associationType){p="single";break}}if("association"==p){for(var g=[],m=0,v=99999,h=0;h<l.length;h++){var c=l[h];c.datalist=[],c.context.delta=0,c.context.numberOfTableNormalizers=0;var u=r.querySelectorAll(c.getCombinedSelector());if(g[h]=[],c.context.forceAssociation){for(var f=0;f<u.length;f++){var d=u[f];t.testElForRegex(d,c)&&(c.datalist.push(s(d,c)),"kim-table-normalizer"==d.className&&c.context.numberOfTableNormalizers++)}c.datalist.length>m&&(m=c.datalist.length),c.datalist.length<v&&(v=c.datalist.length)}else{for(var f=0;f<u.length;f++)t.testElForRegex(u[f],c)&&g[h].push({el:u[f],pairedOff:!1,index:g[h].length});g[h].length>m&&(m=g[h].length),g[h].length<v&&(v=g[h].length)}}for(var y=[],h=0;h<l.length;h++)if(!l[h].context.forceAssociation)for(var f=0;f<g[h].length;f++)if(!g[h][f].pairedOff){y.push({els:[],data:[],sum:0}),y[y.length-1].els[h]=g[h][f],y[y.length-1].data[h]=s(g[h][f].el,l[h]),y[y.length-1].sum+=f+1,g[h][f].pairedOff=!0;for(var b=g[h][f].el,x=l[h].context.ancestorCounters?l[h].context.ancestorCounters[l[h].getSelectorObjectIndexForEl(b)]:l[h].context.ancestorCounter,$=0;x>$;$++)b=b.parentNode;for(var k=h+1;k<l.length;k++)if(!l[k].context.forceAssociation){y[y.length-1].data[k]=[];for(var w=0;w<g[k].length;w++)if(!g[k][w].pairedOff){for(var C=g[k][w].el,x=l[k].context.ancestorCounters?l[k].context.ancestorCounters[l[k].getSelectorObjectIndexForEl(C)]:l[k].context.ancestorCounter,$=0;x>$;$++)C=C.parentNode;b===C&&(y[y.length-1].els[k]=g[k][w],y[y.length-1].data[k].push(s(g[k][w].el,l[k])),y[y.length-1].sum+=w+1,g[k][w].pairedOff=!0)}}}for(var f=0;f<y.length;f++){for(var S=0,h=0;h<l.length;h++)y[f].data[h]&&0!=y[f].data[h].length||(y[f].data[h]=o(l[h]),S++);y[f].avg=y[f].sum/l.length}y.sort(function(e,t){return e.avg<t.avg?-1:e.avg>t.avg?1:0});for(var f=0;f<y.length;f++)for(var h=0;h<l.length;h++){var c=l[h];1==y[f].data[h].length?y[f].data[h]=y[f].data[h][0]:y[f].data[h].length>1&&(c.context.delta-=y[f].data[h].length-1),c.datalist.push(y[f].data[h]),y[f].data[h]==o(l[h])&&c.context.delta++,y[f].els[h]&&"kim-table-normalizer"==y[f].els[h].el.className&&c.context.numberOfTableNormalizers++}for(var h=0;h<l.length;h++)for(var c=l[h],f=v;m>f;f++)c.datalist[f]==n&&(c.datalist[f]=o(c),c.context.delta++)}else if("pattern"==p){l.lowestStart=999999,l.highestEnd=0;for(var m=0,v=99999,h=0;h<l.length;h++){var c=l[h];c.datalist=[],c.context.delta=0,c.context.numberOfTableNormalizers=0;var u=r.querySelectorAll(c.selectorObjects[0].selector);if(c.context.forceAssociation){for(var f=0;f<u.length;f++){var d=u[f];t.testElForRegex(d,c)&&(c.datalist.push(s(d,c)),"kim-table-normalizer"==d.className&&c.context.numberOfTableNormalizers++)}c.datalist.length>m&&(m=c.datalist.length),c.datalist.length<v&&(v=c.datalist.length)}else for(var f=0;f<u.length;f++)if(t.testElForRegex(u[f],c)){for(var E=u[f],$=0;$<c.context.ancestorCounter;$++)E=E.parentNode;var A=i(E).index();c.context.startIndex||(c.context.startIndex=A),c.startIndex<l.lowestStart&&(l.lowestStart=c.startIndex),A>l.highestEnd&&(l.highestEnd=A)}}for(var h=0;h<l.length;h++){var c=l[h];if(!c.context.forceAssociation){for(var T,u=r.querySelectorAll(c.selectorObjects[0].selector),O=0,N=0,j=!0,f=0;f<u.length;f++)if(t.testElForRegex(u[f],c)){for(var E=u[f],k=0;k<c.context.ancestorCounter;k++)E=E.parentNode;var A=i(E).index()+O;if(j){var M=0;j=!1}else{if(T>=A){var I=T-N+1;O+=I,A+=I,N=T+1}var M=A-T-c.context.patternSteps}c.context.patternSteps>0&&(M/=c.context.patternSteps);for(var w=0;M>w;w++)c.datalist.push(o(c)),c.context.delta++;T=A,"kim-table-normalizer"==u[f].className&&c.context.numberOfTableNormalizers++,c.datalist.push(s(u[f],c))}c.context.endIndex=A-O}}for(var h=0;h<l.length;h++){var c=l[h];if(!c.context.forceAssociation){if(c.context.startIndex-l.lowestStart>c.context.patternSteps)var D=parseInt((c.context.startIndex-l.lowestStart)/c.context.patternSteps);else if(l.highestEnd-c.context.endIndex>c.context.patternSteps)var P=parseInt((l.highestEnd-c.context.endIndex)/c.context.patternSteps);for(var $=0;D>$;$++)c.datalist.unshift(o(c)),c.context.delta++;for(var $=0;P>$;$++)c.datalist.push(o(c)),c.context.delta++;c.datalist.length>m&&(m=c.datalist.length),c.datalist.length<v&&(v=c.datalist.length)}}for(var h=0;h<l.length;h++){var c=l[h],L=c.getCombinedSelector(1);if(""!=L){for(var u=r.querySelectorAll(L),f=0;f<u.length;f++){var d=u[f];t.testElForRegex(d,c)&&(c.datalist.push(s(d,c)),"kim-table-normalizer"==d.className&&c.context.numberOfTableNormalizers++)}c.datalist.length>m&&(m=c.datalist.length),c.datalist.length<v&&(v=c.datalist.length)}}for(var h=0;h<l.length;h++)for(var c=l[h],f=v;m>f;f++)c.datalist[f]==n&&(c.datalist[f]=o(c),c.context.delta++)}else if("forced"==p){for(var m=0,v=99999,h=0;h<l.length;h++){var c=l[h];c.datalist=[],c.context.delta=0,c.context.numberOfTableNormalizers=0;for(var u=r.querySelectorAll(c.getCombinedSelector()),f=0;f<u.length;f++){var d=u[f];t.testElForRegex(d,c)&&(c.datalist.push(s(d,c)),"kim-table-normalizer"==d.className&&c.context.numberOfTableNormalizers++)}c.datalist.length>m&&(m=c.datalist.length),c.datalist.length<v&&(v=c.datalist.length)}for(var h=0;h<l.length;h++)for(var c=l[h],f=v;m>f;f++)c.datalist[f]||(c.datalist[f]=o(c),c.context.delta++)}else for(var h=0;h<l.length;h++){var c=l[h];c.datalist=[],c.context.delta=0,c.context.numberOfTableNormalizers=0;var u=r.querySelectorAll(c.getCombinedSelector());u.length>0&&(c.datalist[0]=s(u[0],c))}}}},this.checkAssociation=function(e,n,o){if(""==e.selectorObjects[0].selector||""==n.selectorObjects[0].selector)return!1;if(n.context.forceAssociation&&o==n.context.collection)return{type:e.context.associationType||"forced",ancestorCounter1:e.context.ancestorCounter||0,ancestorCounter2:e.context.ancestorCounter||0,pattern:e.context.patternSteps||1};if(e.context.forceAssociation&&o==e.context.collection)return{type:n.context.associationType||"forced",ancestorCounter1:n.context.ancestorCounter||0,ancestorCounter2:n.context.ancestorCounter||0,pattern:n.context.patternSteps||1};var a=r.querySelectorAll(e.getCombinedSelector()),s=r.querySelectorAll(n.getCombinedSelector());if(a.length<=1&&s.length<=1)return{type:"single",ancestorCounter1:0,ancestorCounter2:0,pattern:1};for(var l=a.length,c=s.length,u=[],f=0;l>f;f++)t.testElForRegex(a[f],e)&&u.push(a[f]);a=u;for(var d=[],f=0;c>f;f++)t.testElForRegex(s[f],n)&&d.push(s[f]);s=d,l=a.length,c=s.length;for(var p=0;6>p;p++)for(var h=0;6>h;h++)for(var g=0;l>g;g++)for(var m=0;c>m;m++){for(var v=a[g],y=s[m],b=0;p>b;b++)var v=v.parentNode;for(var x=0;h>x;x++)var y=y.parentNode;if(v===y){for(var $=!1,f=0;f<a.length;f++)if(f!=g){for(var k=0;k<s.length;k++)if(k!=m){for(var w=a[f],C=s[k],b=0;p>b;b++)w=w.parentNode;for(var x=0;h>x;x++)C=C.parentNode;if(!(l>1&&v===w||c>1&&y===C)){$=!0;break}}if($)break}if($||(f=g>0?g-1:l>1?g+1:g,k=m>0?m-1:c>1?m+1:m),$){for(var S=a[g],E=s[m],A=a[f],T=s[k],b=0;p>b;b++)S=S.parentNode,A=A.parentNode;for(var x=0;h>x;x++)E=E.parentNode,T=T.parentNode;for(var O=0;10>O&&S&&A&&E&&T;){var N=S.parentNode,j=A.parentNode,M=E.parentNode,I=T.parentNode;if(N===j&&M===I)break;S=N,A=j,E=M,T=I,O++}var D=Math.abs(i(S).index()-i(A).index()),P=Math.abs(i(E).index()-i(T).index());if(0==D)var b=P;else if(0==P)var b=D;else var b=Math.min(D,P);return 0==b&&(b=1),{type:"association",ancestorCounter1:p+O,ancestorCounter2:h+O,pattern:b}}for(var S=a[g],E=s[m],A=a[f],T=s[k],b=0;p-1>b;b++)S=S.parentNode,A=A.parentNode;for(var x=0;h-1>x;x++)E=E.parentNode,T=T.parentNode;var D=Math.abs(i(S).index()-i(A).index()),P=Math.abs(i(E).index()-i(T).index()),L=D==P&&D>1?!0:!1;return 0==p&&0==h?(D=0==D?P:D,{type:"self",ancestorCounter1:p,ancestorCounter2:h,pattern:D}):L?{type:"pattern",ancestorCounter1:p-1,ancestorCounter2:h-1,pattern:D}:!1}}return!1};var s=function(n,o){var s="kimonohref";"undefined"!=typeof e.$k&&(s="href");var l=o.selectorObjects[0].regex,c={},u=0;if("IMG"!=n.nodeName&&n.textContent.trim().length>0&&0!=o.context.textContent&&"false"!=o.context.textContent?c.text=t.getMatchedText(n,l)||"":("true"==o.context.textContent||o.context.textContent===!0)&&(c.text=""),i.each(o.context.attributes,function(e,t){if("false"!=t&&0!=t&&t.value&&"false"!=t.value){if("kimonohref"==e||"href"==e){if(n.hasAttribute("href")?c.href=a.relToAbs(n.getAttribute("href"),r.getBaseUrl()):n.hasAttribute("kimonohref")&&(c.href=a.relToAbs(n.getAttribute("kimonohref"),r.getBaseUrl())),"undefined"==typeof c.href){var i=r.nearbyLink(n,s);c.href=i||""}}else"src"==e?c.src=n.hasAttribute(e)?a.relToAbs(n.getAttribute("src"),r.getBaseUrl()):"":c[e]=n.hasAttribute(e)?n.getAttribute(e):"";u++}}),"undefined"==typeof o.context.attributes.href||"false"!=o.context.attributes.href.value&&0!=o.context.attributes.href.value&&0!=o.context.attributes.href&&"false"!=o.context.attributes.href&&"undefined"==typeof c.href){var f=r.nearbyLink(n,s);n.hasAttribute(s)?c.href=a.relToAbs(n.getAttribute(s),r.getBaseUrl()):"undefined"!=typeof f&&(c.href=f)}return i.each(c,function(e,t){"undefined"==typeof t&&(c[e]="")}),Object.keys(c).length>1?c:c[Object.keys(c)[0]]};this.update=function(e,t,n){var r=[],i=[],o=!1;if(t){for(var a=[],s=0;s<e.length;s++){var l=e[s].context.collection;e[s].updateAttributes(),a[l]||(a[l]=[]),a[l].push(e[s])}for(var s=0;s<a.length;s++)if(a[s]){r.push(a[s]);for(var c=0;c<a[s].length;c++)a[s][c].context.collection=r.length-1}}else for(var s=0;s<e.length;s++){for(var u=!1,c=0;c<r.length;c++){for(var f=0;f<r[c].length;f++){var d=this.checkAssociation(e[s],r[c][f],c);if(d){e[s].context.ancestorCounter=d.ancestorCounter1,r[c][f].context.ancestorCounter=d.ancestorCounter2,e[s].context.patternSteps=e[s].context.forceAssociation?1:d.pattern,r[c][f].context.patternSteps=r[c][f].context.forceAssociation?1:d.pattern,e[s].context.associationType=d.type,r[c][f].context.associationType=d.type,r[c].push(e[s]),e[s].context.collection=r.length-1,u=!0;break}}if(u)break}u||(r.push([e[s]]),e[s].context.collection=r.length-1)}r.forEach(function(e,t){i[t]=n[t]||"Pagination"==n[t]?n[t]:"collection"+parseInt(t+1)});for(var s=r.length;s<i.length;s++)i.pop();return e.pagination&&e.pagination.selectorObjects[0]&&e.pagination.selectorObjects[0].selections.length>0&&(o=!0,r.push([e.pagination]),i[r.length-1]="Pagination"),[r,i,o]},this.getCollectionsForExport=function(e){var t=[];return e.forEach(function(e,n){t[n]=[],e.forEach(function(e,r){t[n][r]=e.objectForExport()})}),t},this.hasData=function(e){var t=!1;return e.forEach(function(e){t||e.forEach(function(e){t||e.datalist.length>0&&(t=!0)})}),t},this.getRowDataFromProcessedCollections=function(e){var t=[];return e.forEach(function(e,n){if(0!=e.length)for(var r=0;r<e[0].datalist.length;r++){var i=[];e.forEach(function(e){"Pagination Link"!=e.name&&i.push({k:e.name,v:e.datalist[r]})}),t.push({c:n,i:r,d:i})}}),t},"undefined"!=typeof e&&(e.$k||(e.$k={}),e.$k.collections=this)};return s}]),s.module("Kimono").factory("Common",[function(){var t=new function(){function t(e){return e=e.replace(/[-\/^$*+?.()|[\]{}]/g,"\\$&"),e=e.replace("\n","\\n").replace(/Â /g," ")}var r=this;this.aggregateSelectors=function(e,t){var n=[],r=t||{};return e.forEach(function(e){e.forEach(function(e){if(e.selectorObjects&&e.selectorObjects[0]){var t=e.selectorObjects[0].selector;t&&(r.quotesWrap&&(t='"'+t+'"'),n.push(t))}})}),n},this.relToAbs=function(e,t){var e=e+"";if(/^(https?|file|ftps?|mailto|javascript|data:image\/[^;]{2,9};):/i.test(e))return e;var n=t.match(/[^?]*\//)[0],r=n.match(/^(.*?):/)?n.match(/^(.*?):/)[0]:"",i=n.replace(r+"//","").replace(/\/.*$/,"");if("?"==e.substring(0,1)){var o=t.split("?")[0];return o+e}if("//"==e.substring(0,2))return r+e;if("/"==e.charAt(0))return r+"//"+i+e;if("./"==e.substring(0,2))console.log("found ./",e);else if(/^\s*$/.test(e))return"";var a=n.replace(r+"//"+i+"/",""),s=a.substr(0,a.length-1).split("/"),l=e.match(/\.\.\//g);e=e.replace(/\.\.\//g,"");for(var c=0;l&&c<l.length;c++)s.pop();var u="/"==i[i.length-1]?"":"/";return n=r+"//"+i+u+s.join("/"),s=s.filter(function(e){return""==e?!1:!0}),s.length>0&&(n+="/"),e=n+e,e=e.replace(/\.$/,"").replace(/\/\./g,"").replace(/"/g,"%22").replace(/'/g,"%27").replace(/</g,"%3C").replace(/>/g,"%3E")},this.reassembleRegex=function(e){var n={identicalText:"true"===e.identicalText,suffix:e.suffix,prefix:e.prefix,middlePattern:e.middlePattern,rightPattern:e.rightPattern,rightHasEnd:"true"===e.rightHasEnd,rightCharClass:e.rightCharClass.replace(/[ Â ]/," Â "),leftPattern:e.leftPattern,leftHasBeginning:"true"===e.leftHasBeginning,leftCharClass:e.leftCharClass.replace(/[ Â ]/," Â ")};""!=n.leftCharClass?(n.leftPattern="["+t(n.leftCharClass)+"]",n.leftPattern=n.leftHasBeginning?"(^|"+n.leftPattern+")":"("+n.leftPattern+")"):n.leftPattern="("+n.leftPattern.replace(/[ Â ]/,"[ Â ]")+")",""!=n.rightCharClass?(n.rightPattern="["+t(n.rightCharClass)+"]",n.rightPattern=n.rightHasEnd?"("+n.rightPattern+"|$)":"("+n.rightPattern+")"):n.rightPattern="("+n.rightPattern.replace(/[ Â ]/,"[ Â ]")+")";var r=[n.prefix,n.leftPattern,n.middlePattern,n.rightPattern,n.suffix].join("");try{var i=new RegExp(r);return i}catch(i){return/^()(.*?)()$/}},this.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},this.proccessedRowToRssObject=function(e){var t={};return e.title&&e.title.text?(t.title=e.title.text,t.link=e.title.href):e.title?t.title=e.title:e.property1&&e.property1.text?(t.title=e.property1.text,t.link=e.property1.href):e.property1&&(t.title=e.property1),e.description&&e.description.text?t.description=e.description.text:e.description&&(t.description=e.description),e.author&&e.author.text?t.author=e.author.text:e.author&&(t.author=e.author),e.pubDate&&e.pubDate.text?t.pubDate=e.pubDate.text:e.pubDate&&(t.pubDate=e.pubDate),e.category&&e.category.text?t.category=e.category.text:e.category&&(t.category=e.category),e.comments&&e.comments.href?t.comments=e.comments.href:e.comments&&(t.comments=e.comments),t};var i=function(e){return e=e.replace(/\r\n/g,"\n")},o=function(e){return e=e.replace(/</g,"<").replace(/&/g,"&"),i(e)};this.toXml=function(e,t,n){var r="";if(e instanceof Array)for(var a=0,s=e.length;s>a;a++)r+=this.toXml(e[a],t,n+"");else if("object"==typeof e){var l=!1;r+=n+"<"+t;for(var c in e)"@"==c.charAt(0)?r+=" "+c.substr(1)+'="'+e[c].toString()+'"':l=!0;if(r+=l?">\n":"/>",l){for(var c in e)"#text"==c?r+=o(e[c]):"#cdata"==c?r+="<![CDATA["+i(e[c])+"]]>":"@"!=c.charAt(0)&&(r+=this.toXml(e[c],c,n+" "));r+=("\n"==r.charAt(r.length-1)?n:"")+"</"+t+">\n"}}else e&&(r+=n+"<"+t+">"+o(e.toString())+"</"+t+">\n");return r},this.getRSS=function(e,t,n,i){if(e[i]){var o=[];e[i].forEach(function(e){o.push(r.proccessedRowToRssObject(e))});var a={rss:{channel:{title:t,description:"kimono RSS feed",link:n,item:o}}},s="";for(var l in a)s+=r.toXml(a[l],l,"");return s=s.replace("<rss>",'<rss version="2.0">')}},this.flatten=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n))if("object"==typeof e[n]){var i=r.flatten(e[n]);for(var o in i)i.hasOwnProperty(o)&&(t[n+"."+o]=i[o])}else t[n]=e[n];return t},this.convertToCSV=function(e,t,n){var i="object"!=typeof e?JSON.parse(e):e,o="",a="";if(!t||2!=parseInt(t)){var s;s=n?{timestamp:0,value:0}:r.flatten(i[0]);for(var l in s){var c=l+"";a+='"'+c.replace(/"/g,"'")+'",'}a=a.slice(0,-1),o+=a+"\r\n"}if(n)for(var u=0;u<i.length;u++){var a="",f=i[u];for(var l in f)if(f[l]){if(f[l]instanceof Date)var d=f[l],c=r.formatDateForCSV(d);else var c=f[l]+"";a+='"'+c.replace(/"/g,"'")+'",'}else a+='"",';a=a.slice(0,-1),o+=a+"\r\n"}else for(var u=0;u<i.length;u++){var a="",p=r.flatten(i[u]);for(var l in p)if(p[l]){var c=p[l]+"";a+='"'+c.replace(/"/g,"'")+'",'}else a+='"",';a=a.slice(0,-1),o+=a+"\r\n"}return o},this.convertToCSV2=function(e){var t="object"!=typeof e?JSON.parse(e):e,n="",i="",o=r.flatten(t[0]);for(var a in o){var s=a+"";i+='"'+s.replace(/"/g,"'")+'",'}i=i.slice(0,-1),n+=i+"\r\n";for(var l=0;l<t.length;l++){var i="",c=r.flatten(t[l]);for(var a in c)if(c[a]){var s=c[a]+"";i+='"'+s.replace(/"/g,"'")+'",'}else i+='"",';i=i.slice(0,-1),n+=i+"\r\n"}return n},this.getCSV=function(e,t,n,r){var i=this;r=r||{},n&&t.forEach(function(e,t){e.name=n[t]});var o="";return r.series?t.forEach(function(t,n){if(0!=t.length){var a=t.name||"collection"+parseInt(n+1);r.noheaders||(o+='"'+a+'"\r\n'),e[a]&&e[a].forEach(function(t,n){for(prop in t)t.hasOwnProperty(prop)&&(r.noheaders||r.series||(o+='"'+prop+"."+n+'"\r\n'),e[a]&&(o+=i.convertToCSV(e[a][n][prop],r.noheaders,r.series)+"\r\n"),o+="\r\n")})}}):t.forEach(function(t,n){if(0!=t.length){var a=t.name||"collection"+parseInt(n+1);r.noheaders||(o+='"'+a+'"\r\n'),e[a]&&(o+=i.convertToCSV(e[a],r.noheaders,r.series)+"\r\n")}}),o},this.getTable=function(e){var t=this;if("object"!=typeof e||!e)return null;var n={},r=0;return Object.keys(e).forEach(function(i){n[i]={colnames:[],datatypeindices:[],rows:[]};var o=e[i];if("object"!=typeof o[0]||!o[0])return null;var a={};if(Object.keys(o[0]).forEach(function(e){a[e]=r++}),o.length>0){var s=Object.keys(t.flatten(o[0]));n[i].colnames=s,s.forEach(function(e){var t=e.split(".")[0];n[i].datatypeindices.push(a[t])}),o.forEach(function(e){var r=[],e=t.flatten(e);s.forEach(function(t){r.push(e[t])}),n[i].rows.push(r)})}}),n},this.mongoCallback=function(e,t){return function(n,r){n?(e.json(500,{status:"500",error:"Server Error",message:"Something went wrong on our servers"}),console.log("MongoDB Error"+n)):t(r)}},this.getJSON=function(e,t){var n={};return e.forEach(function(e,r){if(!(0==e.length||"Pagination"==t[r]&&e[0]&&"Pagination Link"==e[0].name)){var i=t[r]||"collection"+(r+1);n[i]=[];for(var o=0;o<e[0].datalist.length;o++){n[i][o]={};for(var a=0;a<e.length;a++)n[i][o][e[a].name]=e[a].datalist[o]}}}),n},this.formatDateForCSV=function(e){return[e.getMonth()+1,"/",e.getDate(),"/",e.getFullYear()," ",e.toTimeString().split(" ")[0]].join("")},this.shortenString=function(e,t){return e==n?"":e.length<=t?e:e.substr(0,t)+"..."},this.blacklist=[/couponcabin\.com/,/greymatter\.com/],this.nosupportlist=[/facebook\.com/],this.problemUrls=[/mercadopago\.com/,/digikey\.nl/,/soundcloud\.com/,/facebook\.com/,/fifa\.com/,/latimes\.com/,/unsplash\.com/,/sks-keyservers\.net/,/arcadebrew\.com/,/abgent\.com/,/char5\.com/,/wykop\.pl/,/community-music\.info/,/mx\.finanzas\.yahoo\.com/,/yelp\.com/,/amazon\.com/,/fitbit\.com/,/myfitnesspal\.com/,/uniqlo\.com/,/brand\.tmall\.com/],"undefined"!=typeof e&&(e.$k||(e.$k={}),e.$k.common=this)};return t}]),s.module("Kimono").factory("Config",[function(){var t=new function(){if(this.RED="red",this.YELLOW="yellow",this.BLUE="blue",this.ORANGE="orange",this.GREEN="green",this.PURPLE="purple",this.FUCHSIA="fuchsia",this.AQUA="aqua",this.SUNSET="sunset",this.LIME="lime",this.INDIGO="indigo",this.AMBER="amber",this.TAN="tan",this.COFFEE="coffee",this.GREY="grey",this.SMOKE="smoke",this.PAGINATION="bluegrey",this.colors=[this.YELLOW,this.AMBER,this.ORANGE,this.SUNSET,this.RED,this.FUCHSIA,this.PURPLE,this.INDIGO,this.BLUE,this.AQUA,this.GREEN,this.LIME,this.TAN,this.COFFEE,this.GREY,this.SMOKE],this.MAX_TIER_ANCESTRY=4,this.MAX_TIERS=3,this.REGEX_CLIP=3,this.normalizeWhitelist=["news.ycombinator.com"],this.tags=["food","crowdfunding","cryptocurrency","hockey","news","reference","search","community","business","banking","shopping","entertainment","media","sports","blogs","social networking","culture","technology","aggregator","software","science","movies","politics","money","finance","design","social","art","music","football","soccer","web design","jobs","baseball","games","basketball","computers","real estate","travel","maps","entrepreneurship","code","shoes","holidays","startups","books","fashion","investing","salaries","analytics","venture capital","rugby","economics","programming","auctions","weather","hotels","rentals","government","mobile","international","olympics","ecommerce"],this.getColor=function(e){return"pagination"==e?this.PAGINATION:this.colors[e%16]},"undefined"!=typeof e&&(this.clientEnv=e.$k.config.clientEnv,this.serverEnv=e.$k.config.serverEnv,"phantom"==this.clientEnv?(this.KM_HOST="https://localhost:4000",this.KM_HOST_WWW="https://localhost:4000"):"dev"==this.serverEnv?"chrome"==this.clientEnv?(this.KM_HOST="https://localhost:4000",this.KM_HOST_WWW="https://localhost:4000"):(this.KM_HOST="http://localhost:3000",this.KM_HOST_WWW="http://localhost:3000"):"stage"==this.serverEnv?"chrome"==this.clientEnv?(this.KM_HOST="https://kimstage.com",this.KM_HOST_WWW="https://www.kimstage.com"):(this.KM_HOST="http://www.kimstage.com",this.KM_HOST_WWW="http://www.kimstage.com"):"prod"==this.serverEnv&&("chrome"==this.clientEnv?(this.KM_HOST="https://kimonolabs.com",this.KM_HOST_WWW="https://www.kimonolabs.com"):(this.KM_HOST="http://kimonolabs.com",this.KM_HOST_WWW="http://www.kimonolabs.com"))),this.whitelist=[this.KM_HOST+"/sandbox.html",this.KM_HOST+"/welcome.html",this.KM_HOST+"/crawlblog",this.KM_HOST_WWW+"/crawlblog",this.KM_HOST_WWW+"/sandbox.html",this.KM_HOST_WWW+"/welcome.html"],this.formAction=this.KM_HOST+"/load",this.data={},"undefined"!=typeof e){e.$k||(e.$k={}); | |
for(a in e.$k.config)this[a]=e.$k.config[a];e.$k.config=this,this.data=e.$k.data||{}}};return t}]),s.module("Kimono").factory("Datatypes",["Regex","Utils","Config","Selections",function(t,n,r,o){var s=new function(){var s=0;this.resetPropertyCounter=function(e){s=e||0},Datatype=function(e,n,r){this.name=e,this.selectorObjects=[{selector:"",tiers:[],rejectedTiers:[],regex:t.parse(t.getGenericRegexString()),selections:[]}],this.highlightMap={},this.datalist=[],this.numElements=0,this.context={collection:n,index:r,attributes:{},textContent:!0,hiddenElements:!1,numberOfTableNormalizers:0},this.hide=!1},Datatype.prototype.getNumberOfElements=function(e){if(e)return this.numElements=e,e;this.numElements=0;for(var r=n.querySelectorAll(this.getCombinedSelector()),i=0;i<r.length;i++){var o=r[i];t.testElForRegex(o,this)&&"kim-table-normalizer"!=o.className&&this.numElements++}return this.numElements},Datatype.prototype.mergeDatatype=function(e,t){this.selectorObjects=this.selectorObjects.concat(e.selectorObjects),i.extend(this.highlightMap,e.highlightMap),this.context.ancestorCounters||(this.context.ancestorCounters=[this.context.ancestorCounter]),this.context.ancestorCounters.push(e.context.ancestorCounter||1),t.splice(e.context.index,1);for(var n=e.context.index;n<t.length;n++)t[n].context.index--;return this.updateAttributes(),this.getNumberOfElements(),this.context.index},Datatype.prototype.numElements=function(){for(var e=0,t=0;t<this.datalist.length;t++)""!=this.datalist[t]&&e++;return e},Datatype.prototype.acceptTier=function(e,n,r,i){this.selectorObjects[0].selections.push(e),this.selectorObjects[0].selector=o.buildSelectorForN(this.selectorObjects[0].selections,r,i);for(var a=[this.selectorObjects[0].selector],s=0;s<this.selectorObjects[0].tiers.length;s++)t.isSuperset(this.selectorObjects[0].tiers[s],this.selectorObjects[0].selector)||a.push(this.selectorObjects[0].tiers[s]);this.selectorObjects[0].tiers=a,this.updateAttributes()},Datatype.prototype.getCombinedSelector=function(e){var t;if(1!=this.selectorObjects.length||e){for(var n=[],r=e||0;r<this.selectorObjects.length;r++)""!=this.selectorObjects[r].selector&&n.push(this.selectorObjects[r].selector);t=n.join(",")}else t=this.selectorObjects[0].selector;return t=""==t?".kimonothisisnotaclassandwonteverbe":t},Datatype.prototype.getRegexForEl=function(e){if(1==this.selectorObjects.length)return this.selectorObjects[0].regex;for(var t=0;t<this.selectorObjects.length;t++)for(var r=n.querySelectorAll(this.selectorObjects[t].selector),i=0;i<r.length;i++)if(r[i]===e)return this.selectorObjects[t].regex},Datatype.prototype.getSelectorObjectIndexForEl=function(e){if(1==this.selectorObjects.length)return 0;for(var t=0;t<this.selectorObjects.length;t++)for(var r=n.querySelectorAll(this.selectorObjects[t].selector),i=0;i<r.length;i++)if(r[i]===e)return t},Datatype.prototype.removeTierForIndex=function(e,n){var r=this.selectorObjects[n].tiers.indexOf(e);this.selectorObjects[n].tiers.splice(r,1),this.selectorObjects[n].rejectedTiers.push(e);for(var i=0;i<this.selectorObjects[n].tiers.length;i++)t.isSuperset(e,this.selectorObjects[n].tiers[i])&&(this.selectorObjects[n].tiers[i]=this.selectorObjects[n].tiers.slice(0,r));this.updateAttributes()},Datatype.prototype.initiateWithSelectorForSingleElement=function(e,n){var r=t.buildGenericRegex(),i={selector:n,tiers:[],rejectedTiers:[],regex:t.reassembleRegex(r),selections:[e],regexObj:r};this.selectorObjects[0]=i,this.selectorObjects[0].tiers=[n],this.updateAttributes()},Datatype.prototype.initiateWithSelectionObj=function(e,n,i,a,s,l){var c=o.buildSelectorForN([e],s,l);if(!c)return"Error";var u="dragged"==n?t.buildRegexForN([e],r.REGEX_CLIP):"pagination"!=l?t.buildGenericRegex():t.buildPaginationRegex(e.selectedText),f={selector:c,tiers:[],rejectedTiers:[],regex:t.reassembleRegex(u),selections:[e]};this.selectorObjects[0]=f,this.selectorObjects[0].tiers="pagination"!=l?o.getTierSelectors(c,i,a):[c],this.updateAttributes()},Datatype.prototype.initiateWithSelectorForSingleElement=function(e,n){var r=t.buildGenericRegex(),i={selector:n,tiers:[],rejectedTiers:[],regex:t.reassembleRegex(r),selections:[e],regexObj:r};this.selectorObjects[0]=i,this.selectorObjects[0].tiers=[n],this.updateAttributes()},Datatype.prototype.clone=function(){var e=new Datatype(datatype.name,datatype.context.collection,datatype.context.index);return e.selectorObjects=i.extend(!0,[],datatype.selectorObjects),e.highlightMap=i.extend(!0,{},datatype.highlightMap),e.context=i.extend(!0,{},datatype.context),e},Datatype.prototype.updateAttributes=function(){var e={};if(this.selectorObjects&&this.selectorObjects.length>0)for(var r=n.querySelectorAll(this.getCombinedSelector()),i=0;i<r.length;i++)if(t.testElForRegex(r[i],this,"getattributes")){var o=n.nearbyLink(r[i]);if(o&&"undefined"==typeof e.href){var a=this.context.attributes.href;a="undefined"!=typeof a?a.value:!0,e.href={attribute:"href",regex:t.getGenericRegexString(),value:a}}for(var s=r[i].attributes,l=0;l<s.length;l++)if(!s[l].name.match(/^kimono[^h]/)){var c=s[l].name.replace("kimono","");if("undefined"==typeof e[c]){var a=this.context.attributes[c],u=!1;a?u=this.context.attributes[c].value:"href"==c&&"A"==r[i].nodeName?u=!0:"src"!=c&&"alt"!=c||"IMG"!=r[i].nodeName||(u=!0),e[c]={attribute:c,regex:t.getGenericRegexString(),value:u}}}}this.context.attributes=e},Datatype.prototype.objectForExport=function(){var e={};e.name=this.name,e.context=i.extend(!0,{},this.context);var n={};for(attribute in e.context.attributes)n[attribute]={attribute:attribute,value:e.context.attributes[attribute].value,regex:t.getGenericRegexString()};e.context.attributes=n;var r=[];return this.selectorObjects.forEach(function(e){var t={};t.selector=e.selector,t.regex=e.regex.toString(),r.push(t)}),e.selectorObjects=r,e},this.new=function(e,t,n){return e?new Datatype(e,t,n):new Datatype("property"+ ++s,t,n)},this.getObjectForImport=function(n){var r=Object.create(Datatype.prototype);for(a in n)r[a]=n[a];for(selectorObjectIndex in r.selectorObjects){var o=r.selectorObjects[selectorObjectIndex];if(o){o.tiers=[o.selector];var s=i(o.selector).first();o.selections=[{element:s,selectedText:s.text(),startIndex:0,type:"tier",img:"IMG"==s.prop("tagName")?!0:!1}],o.rejectedTiers=[],o.regex=o.regex?t.parse(o.regex):t.reassembleRegex(o.regexObj)}}var l={};for(index in r.context.attributes)attributeObject=r.context.attributes[index],l[index]="true"==attributeObject||"false"==attributeObject?{attribute:index,value:"true"==attributeObject,regex:t.getGenericRegexString()}:{attribute:index,value:"true"==attributeObject.value,regex:t.getGenericRegexString()};return r.context.attributes=l,r.context.textContent=r.context.textContent?"true"==r.context.textContent:!0,r.context.hiddenElements=r.context.hiddenElements?"true"==r.context.hiddenElements:!1,"pagination"!=r.context.index&&(r.context.index="undefined"!=typeof r.context.index?parseInt(r.context.index):0,r.context.collection="undefined"!=typeof r.context.collection?parseInt(r.context.collection):0),e.$k&&"phantom"!=e.$k.config.clientEnv&&r.updateAttributes(),r},this.cloneDatatypes=function(e){var t=[];if(e.forEach(function(e){var n=new Datatype(e.name,e.context.collection,e.context.index);n.selectorObjects=i.extend(!0,[],e.selectorObjects),n.highlightMap=i.extend(!0,{},e.highlightMap),n.context=i.extend(!0,{},e.context),n.numElements=e.numElements,n.datalist=i.extend(!0,{},e.datalist),n.hide=e.hide,t.push(n)}),e.pagination){var n=e.pagination,r=new Datatype(n.name,"pagination","pagination");r.selectorObjects=i.extend(!0,[],n.selectorObjects),r.highlightMap=i.extend(!0,{},n.highlightMap),r.context=i.extend(!0,{},n.context),t.pagination=r}return t},this.Datatype=Datatype,"undefined"!=typeof e&&(e.$k||(e.$k={}),e.$k.datatypes=this)};return s}]),s.module("Kimono").factory("Kimono_async",[function(){var e=new function(){this.seriesFlow=function(e,t){var n=function(r,i){return 0==e.length||r?(t&&t(r,i),void 0):(e.shift()(n,i),void 0)};n()},this.parralelFlow=function(e,t){for(var n=0,r=function(){return n++,n==e.length?(t&&t(),void 0):void 0},i=0;i<e.length;i++)e[i](r)}};return e}]),s.module("Kimono").factory("Manipulation",["Kimono_async","Utils",function(e){var n=new function(){this.simulateClick=function(e){return e.each(function(){if("createEvent"in t){var e=this.ownerDocument,n=e.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,e.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null),this.dispatchEvent(n)}else this.click()})},this.animateTextInput=function(){var e,t=Array.prototype.slice.call(arguments),n=t.shift(),r=t.shift(),o=t.pop(),a=t.pop()||{},s=a.duration||1e3;e=s/r.length;var l=0;if(n){this.simulateClick(i(n)),i(n).focus(),n.value="";var c=setInterval(function(){n.value=n.value+r.charAt(l),l++,l==r.length&&(clearInterval(c),o&&o())},e)}},this.fillLoginForm=function(t,n,r){var i=this;e.seriesFlow([function(e){i.animateTextInput(t.usernameInput,n.username,e)},function(e){i.animateTextInput(t.passwordInput,n.password,e)}],r)}};return n}]),s.module("Kimono").factory("Regex",["Utils",function(t){var r=new function(){this.escapeEscapeSequences=function(e){return e.replace(/\b/g,"").replace(/\f/g,"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")},this.parse=function(e){var t=e.match(/(?:^\/)(.+)((?:\/)(?:[a-z])*$)/),e=new RegExp(t[1],t[2].substr(1));return e},this.buildRegexForN=function(e,t){for(var n=[],r=0;r<e.length;r++)"actual"==e[r].type&&n.push(e[r]);var i=[],o=[],a=[],s=[],l=[],c=n.length,u=[],f=!1,d=function(e){for(var t=!1,n=0;n<e.length-1;){if(e[n].selectedText.toLowerCase()!=e[n+1].selectedText.toLowerCase()){t=!1;break}t=!0,n++}return t},p=function(e){for(var t=!0,n=0;n<e.length;)0!=e[n]&&(t=!1),n++;return t},h=function(e){for(var t=!1,n=0;n<e.length;)0==e[n]&&(t=!0),n++;return t},g=function(e,t){for(var n=0;n<t.length;n++)t[n]=e(t[n]);return t},m=function(e,t){for(var n=!0,r=0;r<e.length;){if(e[r]!=t[r].length-1)return n=!1;r++}return n},v=function(e,t){for(var n=!1,r=0;r<e.length;){if(e[r]==t[r].length-1)return n=!0;r++}return n},y=function(e){return e--,e},b=function(e){return e++,e},x=function(e,t){for(var n=!0,r=0;r<t.length-1;){if(t[r][e[r]]!=t[r+1][e[r+1]])return n=!1;r++}return n};if(1==n.length)u=[n[0],n[0]];else for(var r=0;c>r;r++)u[r]=n[r];for(var r=0;c>r;r++)i[r]=u[r].startIndex,o[r]=i[r]+u[r].selectedText.length-1,a[r]=u[r].element.text(),s[r]=i[r],l[r]=o[r];var $="",k="",w="",C="",S="",E="([^]*?)",A="",T=!1,O=!1;c>1&&d(n)&&(E="("+n[0].selectedText+")",f=!0);for(var N=!0,j=0;N&&t>j;){if(p(s))$="^",N=!1;else if(h(s)){if(0==j){T=!0;for(var r=0;c>r;r++)0!=s[r]&&(S+=a[r][s[r]-1])}N=!1}else if(s=g(y,s),x(s,a))w=a[0][s[0]]+w;else if(0==j){for(var r=0;c>r;r++)S+=a[r][s[r]];N=!1}else N=!1;j++}var M=!0;for(j=0;M&&t>j;){if(m(l,a))k="$",M=!1;else if(v(l,a)){if(0==j){O=!0;for(var r=0;c>r;r++)l[r]!=a[r].length-1&&(A+=a[r][l[r]+1])}M=!1}else if(l=g(b,l),x(l,a))C+=a[0][l[0]];else if(0==j){for(var r=0;c>r;r++)A+=a[r][l[r]];M=!1}else M=!1;j++}var I={leftCharClass:S.replace(/\\/g,"\\\\"),leftHasBeginning:T,leftPattern:w.replace(/\\/g,"\\\\"),rightCharClass:A.replace(/\\/g,"\\\\"),rightHasEnd:O,rightPattern:C.replace(/\\/g,"\\\\"),middlePattern:E.replace(/\\/g,"\\\\"),prefix:$,suffix:k,identicalText:f};return I},this.buildGenericRegex=function(){return{identicalText:!1,leftCharClass:"",leftHasBeginning:!1,leftPattern:"",middlePattern:"(.*?)",prefix:"^",rightCharClass:"",rightHasEnd:!1,rightPattern:"",suffix:"$"}},this.buildPaginationRegex=function(e){var t=e&&""!=e.trim()?this.escape(e):".*?";return{identicalText:!1,leftCharClass:"",leftHasBeginning:!1,leftPattern:"",middlePattern:"("+t+")",prefix:"^",rightCharClass:"",rightHasEnd:!1,rightPattern:"",suffix:"$"}},this.buildRegexObjectFromRegex=function(e){var t=e.toString(),n=t.match(/\/(\^?)\((.*?)\)\((.*?)\)\((.*?)\)(\$?)\//);return{identicalText:!1,leftCharClass:"",leftHasBeginning:!1,leftPattern:n[2]||"",middlePattern:"("+n[3]+")",prefix:n[1]||"",rightCharClass:"",rightHasEnd:!1,rightPattern:n[4]||"",suffix:n[5]||""}},this.reassembleRegex=function(e){if(!e)return null;var t=i.extend({},e);""!=t.leftCharClass?(t.leftPattern="["+this.escape(t.leftCharClass)+"]",t.leftPattern=t.leftHasBeginning?"(^|"+t.leftPattern+")":"("+t.leftPattern+")"):t.leftPattern="("+this.escape(t.leftPattern)+")",""!=t.rightCharClass?(t.rightPattern="["+this.escape(t.rightCharClass)+"]",t.rightPattern=t.rightHasEnd?"("+t.rightPattern+"|$)":"("+t.rightPattern+")"):t.rightPattern="("+this.escape(t.rightPattern)+")";var n=t.prefix+t.leftPattern+t.middlePattern+t.rightPattern+t.suffix;return new RegExp(this.escapeEscapeSequences(n))},this.getGenericRegexString=function(){return"/^()(.*?)()$/"},this.testElForRegex=function(e,n,r){var i=n.getRegexForEl(e);if(0==e.offsetWidth&&0==e.offsetHeight&&"kim-table-normalizer"!=e.className&&"pagination"!=r&&1!=n.context.hiddenElements&&"true"!=n.context.hiddenElements)return!1;if("IMG"==e.tagName)return!0;if(t.querySelectorAll("img",e).length>0)return!0;if(e.textContent.match(/^\s*$/)&&"pagination"!=r&&"getattributes"!=r&&(0==t.size(n.context.attributes)||"hldraw"==r))return!1;if(String(i)===String(/^()(.*?)()$/))return!0;var o=t.tightMatch(i,e.textContent);return o&&o[2]?o[2].length>0:!1},this.getMatchedText=function(e,n,r,i){if(i=!1,n&&String(n)!==String(/^()(.*?)()$/)&&"pagination"!=r){var o=t.tightMatch(n,e.textContent);return o?i?o[2]:t.cleanTrim(o[2]):""}return i?e.textContent:t.cleanTrim(e.textContent)},this.getStartOffset=function(e,n,r){if(n&&String(n)!==String(/^()(.*?)()$/)&&"pagination"!=r){var i=e.textContent,o=t.tightMatch(n,i);return o?i.search(n)+o[1].length:0}return 0},this.getStartNode=function(e,t,r,i){for(var o=e.childNodes,a=t;a<o.length;){var s=o[a],l=0;if(3==s.nodeType)for(;l<s.nodeValue.length;){if(i==r)return{startNode:s,startOffset:l,startNodeIndex:a,globalCount:i};l++,i++}else if(1==s.nodeType){var c=this.getStartNode(s,0,r,i);if(c.startNode)return c;i=c.globalCount}a++}return{startNode:n,startOffset:n,startNodeIndex:null,globalCount:i}},this.isSameTier=function(e,n){var r=Array.prototype.slice.call(t.querySelectorAll(e)),i=Array.prototype.slice.call(t.querySelectorAll(n));return r.every(function(e){return i.indexOf(e)>=0})&&i.length==r.length?!0:!1},this.isSuperTier=function(e,n,r){var i=Array.prototype.slice.call(t.querySelectorAll(e)),o=Array.prototype.slice.call(t.querySelectorAll(n)),a=Array.prototype.slice.call(t.querySelectorAll(r));return i.every(function(e){return a.indexOf(e)>=0})&&a.length>o.length?!0:!1},this.isSuperset=function(e,n){var r=Array.prototype.slice.call(t.querySelectorAll(e)),i=Array.prototype.slice.call(t.querySelectorAll(n));return r.every(function(e){return i.indexOf(e)>=0})&&i.length>r.length?!0:!1},this.getStartOffset=function(e,n,r){if(n&&String(n)!==String(/^()(.*?)()$/)&&"pagination"!=r){var i=e.textContent,o=t.tightMatch(n,i);return o?i.search(n)+o[1].length:0}return 0},this.allMatchRegex=function(e,t){for(var n=0;n<e.length;n++)if(!e[n].match(t))return!1;return!0};this.escape=function(e){return e.replace(/[-\/^$*+?.()|[\]{}]/g,"\\$&")},this.unescape=function(e){return e.replace(/\\([-\/\\^$*+?.()|[\]{}])/g,"$1")},"undefined"!=typeof e&&(e.$k||(e.$k={}),e.$k.regex=this)};return r}]),s.module("Kimono").factory("Selections",["Regex","Utils",function(r,o){var a=new function(){var a=function(e){for(var t=o.querySelectorAll(e),n=0;n<t.length;n++){if(o.querySelectorAll("li",t[n]).length>1)return!1;if(o.querySelectorAll("td",t[n]).length>1)return!1;if(o.querySelectorAll("th",t[n]).length>1)return!1;if(o.querySelectorAll("tr",t[n]).length>1)return!1;if(o.querySelectorAll("p",t[n]).length>1)return!1;if(o.querySelectorAll("div",t[n]).length>1)return!1;if(o.querySelectorAll("option",t[n]).length>1)return!1}return!0},s=function(e,t){t[t.length-1]="";for(var n=[],r=0;r<e.length;r++)n.push(e[r].str),n.push(t[r]);return n.join("")},l=function(e,t,n){t[t.length-1]="";for(var r=[],i=0;i<e.length;i++)r.push(e[i].tagName),n.nthChild[i]&&r.push(e[i].nthChild),n.id&&r.push(e[i].id),n.classList[i]&&r.push(e[i].classList),r.push(t[i]);return r.join("")},c=function(e){var t=e.shift();if(0==e.length)return t;for(var n=[],r=0;r<t.length;r++){for(var i=!1,o=0;o<e.length;o++)if(-1==e[o].indexOf(t[r])){var i=!0;break}i||n.push(t[r])}return n},u=function(e){for(var t,n=0,r=1;r<e.length;r++){var i=parseInt(e[r-1].replace(/:.*?\((\d+)\)/,"$1")),o=parseInt(e[r].replace(/:.*?\((\d+)\)/,"$1"));if(t=o-i>0?o-i:t,t!=n&&r>1&&o-i>0){t=null;break}}return t},f=function(e){for(var t=!0,n=1;n<e.length;n++)if(e[0]!=e[n]){t=!1;break}return t},d=0,p=function(e,n){if(1e5==d++)return!1;for(var r=[],i=n.length,o=0;o<n.length;o++)r[o]=e[o];for(var o=0;i>o;o++)for(var a=0;a<n[o];a++)r[o]=r[o].parentNode;for(var s=!0,o=1;i>o;o++)if(r[0]!==r[o]){s=!1;break}if(s)return n;for(var l=!0,o=i-1;o>=0&&l;o--){if(r[o]!==t.body&&6!=n[o]){n[o]++,l=!1;break}if(0==o)return!1;n[o]=0,l=!0}return p(e,n,t)},h=function(e){if(e.hasChildNodes())return e.firstChild;for(;e&&!e.nextSibling;)e=e.parentNode;return e?e.nextSibling:null};this.getTierSelectors=function(e,t,n){var i,o=e.split(" > "),s=[];i=o.length>t?o.length-t:0;for(var l="",c=0;i>c;c++)l+=o[c],l+=" > ";for(var c=i;c<o.length;c++){var u=o[c].match(/(.*?)(:nth.*?)?(\..*?)?(#.*)?$/);u&&s.push({tagname:u[1],nthchild:u[2]?u[2]:"",classname:u[3]?u[3]:"",idvalue:u[4]?u[4]:""})}var f=[];f.push(e);var d=0,p=0,h=function(e,t,i,o){p++,d!=n&&(e>0&&(t+=" > "),t+=s[e].tagname,i&&o?t+=s[e].nthchild+s[e].classname+s[e].idvalue:i&&!o?t+=s[e].classname+s[e].idvalue:!i&&o&&(t+=s[e].nthchild),e<s.length-1?(h(e+1,t,!0,!0),h(e+1,t,!1,!0),s[e+1].tagname.match(/(td|th)/)||(h(e+1,t,!0,!1),h(e+1,t,!1,!1))):(t=l+t,r.isSuperTier(f[0],f[f.length-1],t)&&a(t)&&(f.push(t),d++)))};return h(0,"",!0,!0),h(0,"",!1,!0),s[0].tagname.match(/(td|th)/)||(h(0,"",!1,!1),h(0,"",!0,!1)),f},this.getRangeSelectedNodes=function(e){var t=e.startContainer,n=e.endContainer;if(t==n)return[t];for(var r=[];t&&t!=n;)r.push(t=h(t));for(t=e.startContainer;t&&t!=e.commonAncestorContainer;)r.unshift(t),t=t.parentNode;return r},this.pruneSelections=function(e,t){var n=[],r=t.split(" > ");r.forEach(function(e){var t=e.split(" ");n=n.concat(t)});for(var i=n[n.length-1],o=i.substring(0,i.search(/[:\.#]/)),a=[],s=0;s<e.length;s++)("*"==o||o==e[s].element.get(0).tagName.toLowerCase())&&a.push(e[s]);return a},this.getSuperSpecificSelector=function(e){for(var u,d,h=[],g=[],m=[],v=[];0==h.length||"body"!=h[0].tagName;){for(var y=[],b=[],x=[],$=[],k={},w=!1,C=!1,S=0;S<e.length;S++){y[S]=e[S].tagName.toLowerCase(),b[S]=":nth-child("+parseInt(i(e[S]).index()+1)+")";var E=[""];if(e[S].getAttribute("class")!=n)for(var A=e[S].className.split(/\s+/),T=0;T<A.length;T++)!A[T].match(/^\s*$/)&&A[T].match(/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/)&&E.push(A[T]);x[S]=E;var O=e[S].id;$[S]=O?"#"+O:"",$[S].match(/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/)||($[S]="")}if(f(y))k={tagName:y[0],nthChild:"",classList:"",id:"",str:""};else{if(h.length>0){C=!0;break}if(r.allMatchRegex(y,/^(td|th)$/)&&(u=[]),!u){m=[];for(var N=0;N<e.length;N++)m.push(0);if(u=p(e,m,t),!u)return null;for(var j=Math.min.apply(null,u),S=0;S<e.length;S++){var M=u[S]-j;if(M>0&&3>=M)for(var T=0;M>T;T++)e[S]=e[S].parentNode,w=!0;else if(M>3)return null}}w||(k={tagName:"*",nthChild:"",classList:"",id:"",str:"*"})}if(!w){f(b)&&(k.nthChild=b[0]);var I=c(x);I.length>1&&(k.classList=I.join(".")),f($)&&(k.id=$[0]),k.str=[k.tagName,k.nthChild,k.classList,k.id].join(""),h.unshift(k),g.unshift(d);var D=s(h,g);if(v.push({selector:D,selectorComponents:h.slice(0),separators:g.slice(0),numResults:o.querySelectorAll(D).length}),"body"!=y[0])for(var S=0;S<e.length;S++)e[S]=e[S].parentNode;d=" > "}if(C)break}for(var j=v[0].numResults,S=1;S<v.length&&(v[S].numResults<j&&(j=v[S].numResults),1!=j);S++);for(var P=Math.min(v.length-1,4),S=P;S<v.length;S++)if(v[S].numResults==j){var L=v[S].selector;break}for(var h=v[S].selectorComponents,g=v[S].separators,H=[],S=0;S<h.length+1;S++){H[S]=[];for(var T=0;T<h.length;T++)H[S][h.length-1-T]=S>T}var R,_=l(h,g,{id:!1,classList:H[0],nthChild:H[0]});if(r.isSuperset(L,_)||(R=_),!R){var _=l(h,g,{id:!0,classList:H[0],nthChild:H[0]});r.isSuperset(L,_)||(R=_)}if(!R)for(var S=1;S<H.length;S++){var _=l(h,g,{id:!0,classList:H[S],nthChild:H[0]});if(!r.isSuperset(L,_)){R=_;break}}if(!R)for(var S=1;S<H.length;S++){var _=l(h,g,{id:!0,classList:H[H.length-1],nthChild:H[S]});if(!r.isSuperset(L,_)){R=_;break}}return R||(R=L),a(R,t)?R:null},this.buildSelectorForN=function(e,d,h){for(var g,m,v=[],y=[],b=[],x=[],$=[],k=0;k<e.length;k++){var w=e[k].element.get(0);"undefined"!=typeof w&&w&&(b.push(w),x.push(0))}var C=!1,S=d[h].selectorObjects[0]?d[h].selectorObjects[0].rejectedTiers.join(","):"";if(""!=S)for(var E=o.querySelectorAll(S),k=0;k<E.length;k++)if(E[k]===b[b.length-1]){C=!0;break}for(;0==v.length||"body"!=v[0].tagName;){for(var A=[],T=[],O=[],N=[],j={},M=!1,I=!1,k=0;k<b.length;k++){A[k]=b[k].tagName.toLowerCase(),T[k]=":nth-child("+parseInt(i(b[k]).index()+1)+")";var D=[""];if(b[k].getAttribute("class")!=n)for(var P=b[k].className.split(/\s+/),L=0;L<P.length;L++)!P[L].match(/^\s*$/)&&P[L].match(/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/)&&D.push(P[L]);O[k]=D;var H=b[k].id;N[k]=H?"#"+H:"",N[k].match(/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/)||(N[k]="")}if(f(A))j={tagName:A[0],nthChild:"",classList:"",id:"",str:""};else{if(v.length>0){I=!0;break}if(r.allMatchRegex(A,/^(td|th)$/)&&(g=[]),!g){x=[];for(var R=0;R<b.length;R++)x.push(0);if(g=p(b,x,t),!g)return null;for(var _=Math.min.apply(null,g),k=0;k<b.length;k++){var F=g[k]-_;if(F>0&&3>=F)for(var L=0;F>L;L++)b[k]=b[k].parentNode,M=!0;else if(F>3)return null}}M||(j={tagName:"*",nthChild:"",classList:"",id:"",str:"*"})}if(!M){if(f(T))j.nthChild=T[0];else if(C){var q=u(T);if(q){for(var U=parseInt(T[0].replace(/:.*?\((\d+)\)/,"$1")),R=0;R<T.length;R++){var W=parseInt(T[R].replace(/:.*?\((\d+)\)/,"$1"));U>W&&(U=W)}j.nthChild=[":nth-child(",q,"n + ",U,")"].join("")}}var B=c(O);B.length>1&&(j.classList=B.join(".")),f(N)&&(j.id=N[0]),"pagination"==h&&(j.nthChild=""),j.str=[j.tagName,j.nthChild,j.classList,j.id].join(""),v.unshift(j),y.unshift(m);var V=s(v,y);if($.push({selector:V,selectorComponents:v.slice(0),separators:y.slice(0),numResults:o.querySelectorAll(V).length}),"body"!=A[0])for(var k=0;k<b.length;k++)b[k]=b[k].parentNode;m=" > "}if(I)break}for(var _=$[0].numResults,k=1;k<$.length&&($[k].numResults<_&&(_=$[k].numResults),1!=_);k++);for(var U="pagination"==h?0:Math.min($.length-1,4),k=U;k<$.length;k++)if($[k].numResults==_){var z=$[k].selector;break}for(var v=$[k].selectorComponents,y=$[k].separators,K=[],k=0;k<v.length+1;k++){K[k]=[];for(var L=0;L<v.length;L++)K[k][v.length-1-L]=k>L}var X,G=l(v,y,{id:!1,classList:K[0],nthChild:K[0]});if(r.isSuperset(z,G)||(X=G),!X){var G=l(v,y,{id:!0,classList:K[0],nthChild:K[0]});r.isSuperset(z,G)||(X=G)}if(!X)for(var k=1;k<K.length;k++){var G=l(v,y,{id:!0,classList:K[k],nthChild:K[0]});if(!r.isSuperset(z,G)){X=G;break}}if(!X)for(var k=1;k<K.length;k++){var G=l(v,y,{id:!0,classList:K[K.length-1],nthChild:K[k]});if(!r.isSuperset(z,G)){X=G;break}}return X||(X=z),a(X,t)?X:null},this.removedNthChildForTableElements=function(e,t){if("td"==e.substr(e.lastIndexOf(":")-2,2)){var n=t.lastIndexOf("> ")+2;if("td"==t.substr(n,2)&&":"!=t[n+2])return!0}else if("th"==e.substr(e.lastIndexOf(":")-2,2)){var n=t.lastIndexOf("> ")+2;if("th"==t.substr(n,2)&&":"!=t[n+2])return!0}else{if("*"!=e.substr(e.lastIndexOf(":")-2,1))return!1;var n=t.lastIndexOf("> ")+2;if("*"==t.substr(n,2)&&":"!=t[n+1])return!0}},this.normalizeAllTables=function(){var e=Array.prototype.slice.call(t.getElementsByTagName("table"));e.forEach(function(e,n){var r=e.id||"kim-normalized-table-"+n;r.match(":")&&(r="kim-normalized-table-"+n),e.id=r;var i=o.querySelectorAll("tr",e);if(i.length>0){for(var a=i[0].children.length,s=0;s<i[0].children.length;s++){var l=i[0].children[s],c=parseInt(l.getAttribute("colspan"));c&&(a+=c-1)}for(var u=i[0].children.length,f=[],d=[],s=0;a>s;s++)f[s]=0,d[s]="";for(var s=0;s<i.length;s++){for(var p=i[s],h=0;h<p.children.length;h++){var l=p.children[h],c=parseInt(l.getAttribute("colspan")),g=l.tagName.toLowerCase();if(c)for(var m=0;c-1>m;m++){var v=t.createElement(g);v.style.display="none",v.className="kim-table-normalizer",v.innerHTML=l.textContent,h+1>=p.children.length?p.appendChild(v):p.insertBefore(v,p.children[h+1])}}for(var u=p.children.length,h=0;u>h;h++)if(f[h]>0){if(p.children.length>0)var g=p.children[0].tagName.toLowerCase();else var g="td";var y=t.createElement(g);y.style.display="none",y.className="kim-table-normalizer",y.innerHTML=d[h];var b=p.children.length;b>h?p.insertBefore(y,p.children[h]):p.appendChild(y),f[h]--}for(var x=p.children,m=0;m<x.length;m++){var $=x[m].getAttribute("rowspan");$&&(f[m]+=$-1,d[m]=x[m].textContent)}}}})},"undefined"!=typeof e&&(e.$k||(e.$k={}),e.$k.selections=this)};return a}]),s.module("Kimono").factory("Utils",["Config","Common",function(r,o){var a=new function(){this.startsWith=function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())},this.isKimonoChild=function(e,t){if(!e[0])return!1;if(i.contains(i("#Kimonify")[0],e[0]))return!0;for(var n=i(".kim-highlight-wrapper"),r=0;r<n.length;r++)if(n[r]&&i.contains(n[r],e[0]))return!0;for(var o=i(".kim-hint"),r=0;r<o.length;r++)if(o[r]&&i.contains(o[r],e[0]))return!0;if(t)return e[0].className.match(/kim-highlight-wrapper|kim-hint/);var a=i(".kim-TempSpecial")[0];return a&&i.contains(a,e[0])?!0:e[0].className.match(/kim|kim-TempSpecial|kim-highlight-wrapper|kim-hint/)},this.linkEnable=function(){i("a:not(.kim a, #Kimonify a) ").each(function(){var e=i(this);e.attr("href",e.attr("kimonohref")),e.attr("target","_self"),e.attr("onmousedown",e.attr(" kimonomousedown")),e.attr("onclick",e.attr(" kimonoclick")),e.attr("onmouseup",e.attr(" kimonomouseup")),e.removeAttr("kimonohref"),e.removeAttr("kimonomousedown"),e.removeAttr("kimonoclick"),e.removeAttr("kimonomouseup")})},this.linkDisable=function(){i("a:not(.kim a, #Kimonify a)").each(function(){var e=i(this);e.attr("kimonohref",e.attr("href")),e.attr("kimonomousedown",e.attr("onmousedown")),e.attr("kimonoclick",e.attr("onclick")),e.attr("kimonomouseup",e.attr("onmouseup")),e.attr("target","_self"),e.removeAttr("href"),e.removeAttr("target"),e.removeAttr("onmousedown"),e.removeAttr("onclick"),e.removeAttr("onmouseup")})},this.getElementPos=function(e,n,r){var o=t.createRange();o.selectNodeContents(e);var a=o.getBoundingClientRect(),s=a.left-6,l=a.top+i(t).scrollTop()-t.body.clientTop-2;return{x:s-n,y:l-r}},this.isIntersecting=function(e,t){$this=i(e);var n=$this.offset(),r=[n.left,n.left+$this.outerWidth()],o=[n.top,n.top+$this.outerHeight()];$that=i(t);var a=$that.offset(),s=[a.left,a.left+$that.outerWidth()],l=[a.top,a.top+$that.outerHeight()];return s[0]<r[1]&&s[1]>r[0]&&l[0]<o[1]&&l[1]>o[0]},this.animate=function(e,t,n,r){e.addClass("km-animated "+t),setTimeout(function(){e.removeClass("km-animated "+t),r&&r()},parseInt(n))},this.getUrlParam=function(e){return decodeURIComponent((RegExp(e+"=(.+?)(&|$)").exec(location.search)||[,null])[1])};var a=function(e,t,n){var t=encodeURIComponent(t);if(n.match(/\?/)){var r=new RegExp("(?!\\?|&)"+e+"=.*?(?=&|$)","g");return n.match(r)?n.replace(r,e+"="+t):n+"&"+e+"="+t}return n+"?"+e+"="+t};this.addUrlParameters=function(t){var n=e.location.search;_.each(t,function(e,t){n=a(t,e,n)}),e.location.search=n},this.getTargetUrl=function(){return"phantom"==r.clientEnv?e&&e.location?e.location.href:"null":"angular"==r.clientEnv?decodeURIComponent((RegExp("url=(.+?)(&|$)").exec(location.search)||[,null])[1])||"null":"chrome"==r.clientEnv?e.location.href||"null":"null"},this.getBaseUrl=function(){var e=i("base"),t=i(e[e.length-1]).attr("href");return t||this.getTargetUrl()},this.decodeHtml=function(e){var n=t.createElement("textarea");return n.innerHTML=e,n.value},this.drawHint=function(e,t,n,r,o,a,s,l,c,u){var a=a||"fixed",s=s||"down",l=l||"left",f=c?"":"attention",d=i('<div class="kim-hint '+f+'" style="width:'+o.width+"px;min-height:"+o.height+";position:"+a+"; top:"+r.y+"px; left:"+r.x+'px;"><div class="kim-wrapper"><h3>'+t+"</h3><p>"+n+'</p><a class="kim-dismiss-button"></a></div></div>');"down"==s?d.find(".kim-wrapper").append('<div class="kim-arrow-down"></div>'):"up"==s&&d.find(".kim-wrapper").prepend('<div class="kim-arrow-up"></div>'),"right"==l?d.find(".kim-arrow-up, .kim-arrow-down").css("right","5px"):"left"==l&&d.find(".kim-arrow-up, .kim-arrow-down").css("left","5px"),r.right&&(d.css("left","auto"),d.css("right",r.right+"px")),r.bottom&&(d.css("top","auto"),d.css("bottom",r.bottom+"px"));var p=function(){u&&u();i(this);d.css("opacity",0),setTimeout(function(){d.remove()},200)};return d.find(".kim-dismiss-button").bind("click",function(){p()}),i(e).append(d),setTimeout(function(){d.css("opacity",.95)},10),p},this.drawTooltip=function(e,t,n,r){var n=n||"down",r=r||"left",o=!1,a=i('<div class="kim-hint kim-tooltip" style="position:absolute; top:'+t.y+"px; left:"+t.x+'px;"><div class="kim-wrapper"><p>'+e+"</p></div></div>");"down"==n?a.find(".kim-wrapper").append('<div class="kim-arrow-down"></div>'):"up"==n&&a.find(".kim-wrapper").prepend('<div class="kim-arrow-up"></div>'),"right"==r?a.find(".kim-arrow-up, .kim-arrow-down").css("margin-left","191px"):"center"==r&&(a.find(".kim-arrow-up, .kim-arrow-down").css("margin","0 23px"),a.css("text-align","center")),t.right&&(a.css("left","auto"),a.css("right",t.right+"px"));var s=function(){o||l()},l=function(){};return a.bind("mouseenter",function(){o=!0}),a.bind("mouseleave",function(){l()}),i("body").append(a),setTimeout(function(){a.css("opacity",.95)},10),s},this.querySelectorAll=function(e,t){if(!e||".kimonothisisnotaclassandwonteverbe"==e)return[];"string"!=typeof e&&e.length&&(e=e.join(", "));var n=i||$k.$;if(t){var r=n(t).find(e);return r}var o=n(e),a=i("#Kimonify")[0];if(a){for(var s=[],l=0;l<o.length;l++)a.contains(o[l])||s.push(o[l]);return s}return o},this.queryDebug=function(e,t){if(!e||".kimonothisisnotaclassandwonteverbe"==e)return[];"string"!=typeof e&&e.length&&(e=e.join(", "));var n=i||$k.$;if(t){var r=n(t).find(e);return r}var r=n(e);return r},this.looseStringContains=function(e,t){var n=!1;return t.forEach(function(t){t.match(e)&&(n=!0)}),n},this.clean=function(e){return e.replace(/[\t\r ]+/g," ").replace(/[\n\r]+/g,"\n").replace(/\n\s+/g,"\n")},this.cleanTrim=function(e){return this.clean(e).trim()},this.tightMatch=function(e,t){var n=t.match(e);if(0==t.search(e))return n;var r,i=t.match(e),o=t.length;if(n){r=t.match(e)[2],o=Math.min(t.search(e)+t.match(e)[0].length,o);for(var a=0;a<t.length-1;a++)t=t.slice(1,o-a),t.match(e)&&t.match(e)[2].length<r.length&&(r=t.match(e)[2],n=t.match(e));for(var s=0;s<i[2].length-n[2].length;s++)n[1]=" "+n[1],n[0]=" "+n[0]}return n},this.nearbyLink=function(t){var r="kimonohref";if("phantom"==e.$k.config.clientEnv&&(r="href"),this.querySelectorAll("a["+r+"]",t).length>0)return o.relToAbs(t.querySelector("a["+r+"]").getAttribute(r),this.getBaseUrl());for(var i=t.parentNode,a=!1,s=0;i.parentNode&&s++<5;){if(i.getAttribute(r)){a=!0;break}i=i.parentNode}return a?o.relToAbs(i.getAttribute(r),this.getBaseUrl()):n},Array.prototype.forEach||(Array.prototype.forEach=function(e,t){"use strict";var n,r;for(n=0,r=this.length;r>n;++n)n in this&&e.call(t,this[n],n,this)}),this.displayFrequency=function(e,t,n){return"realtime"==e&&t?"On demand":"realtime"==e&&n?"No schedule":"realtime"==e?"On demand":"minutely"==e?"Every minute":"fiveminutely"==e?"Every 5 minutes":"quarterhourly"==e?"Every 15 mins":"halfhourly"==e?"Every 30 mins":"hourly"==e?"Every hour":"daily"==e?"Daily":"weekly"==e?"Weekly":"monthly"==e?"Monthly":"Every hour"},this.displayCrawlLimit=function(e){return e+" pages max"},this.size=function(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&n++;return n},"undefined"!=typeof e&&(e.$k||(e.$k={}),e.$k.utils=this)};return a}]),s.module("Kimono").animation(".kim-data-dot",["Utils",function(e){return{enter:function(t,n){e.animate(t,"pulse2",300,function(){n() | |
})},leave:function(e,t){e.remove(),t()}}}]),s.module("Kimono").factory("HighlightManager",["Config","Collections","Selections","Regex","Datatypes","Utils",function(r,o,a,s,l,c){var u=0,f={},d=n,p=function(e,n,r){if(String(n)===String(/^()(.*?)()$/)||"pagination"==r){var i=t.createRange();return i.selectNodeContents(e),i}var o=e.childNodes,a=(o.length,s.getMatchedText(e,n),s.getStartOffset(e,n)),l=s.getStartNode(e,0,a,0),i=t.createRange();return i.setStart(l.startNode,l.startOffset),i.setEnd(l.startNode,l.startOffset+1),i};f.init=function(e){d=e},f.refresh=function(e,t,n){f.removeHighlightsForDatatypeIndex(n,t),f.updateHighlights(n,e)},f.updateHighlightsForAllDatatypes=function(e,t,n){i.each(e,function(r,i){f.updateHighlights(e,r,t,n),i.hide||f.hideHighlights(e,r)}),e.pagination&&(f.updateHighlights(e,"pagination",t,n),f.hideHighlights(e,"pagination"))},f.removeAllHighlights=function(e){i.each(e,function(t){f.removeHighlightsForDatatypeIndex(e,t)}),e.pagination&&f.removeHighlightsForDatatypeIndex(e,"pagination")},f.processSelection=function(e,t,n,i,o){var c=n[i].selectorObjects;if(c[0]&&c[0].selector&&""!=c[0].selector&&"pagination"!=i){var u=a.buildSelectorForN(c[0].selections.concat([e]),n,i);if(u&&a.removedNthChildForTableElements(c[0].selector,u)&&(u=null),u)c[0].selections.push(e),c[0].selector=u,c[0].tiers=a.getTierSelectors(u,r.MAX_TIER_ANCESTRY,r.MAX_TIERS),c[0].rejectedTiers=[],"dragged"==t&&(c[0].regex=s.reassembleRegex(s.buildRegexForN(c[0].selections,r.REGEX_CLIP)));else{if(16==n.length)return d.toast("warning","Please delete a datatype.",3e3),void 0;i++,d.datatypeIndex++,n.push(l.new(null,o,i));var f=n[i].initiateWithSelectionObj(e,t,r.MAX_TIER_ANCESTRY,r.MAX_TIERS,n,i);if("Error"==f)return}}else{var f=n[i].initiateWithSelectionObj(e,t,r.MAX_TIER_ANCESTRY,r.MAX_TIERS,n,i);if("Error"==f)return}},f.hideHighlights=function(e,t){i.each(e[t].highlightMap,function(n,r){r.dontEdit||e[t].hide||(r.highlight.style.display="none")})},f.showHighlights=function(e,t){e[t]&&i.each(e[t].highlightMap,function(e,t){t.dontEdit||(t.highlight.style.display="block")})},f.updateHighlights=function(e,n,r,o){if(e[n]&&e[n].selectorObjects){f.removeHighlightsForDatatypeIndex(e,n),e[n].highlightMap={};for(var a=e[n].selectorObjects,l=a.length,u=t.createDocumentFragment(),d=0;l>d;d++)for(var p=a[d].tiers.length,g=0;p>g;g++)for(var m=c.querySelectorAll(a[d].tiers[g]),v=m.length,y=0;v>y;y++){var b=m[y].tagName.match(/IMG/i)?!0:!1,x=s.testElForRegex(m[y],e[n],"hldraw"),$=m[y].getAttribute("kimonodatatype"),k=$?$.split("-"):[],w=k.indexOf(String(n));!x&&"loginMode"!=o||-1!=w||"kim-table-normalizer"!=m[y].className&&u.appendChild(h(m[y],d,g,e,n,b,o))}t.body.appendChild(u),r||i(".kim-highlight").each(function(){this.querySelector("img")?c.animate(i(this),"pulse-img",200):c.animate(i(this),"kimpulse",200)})}};var h=function(o,a,l,c,h,m,v){function y(e){return z[e]||e}function b(e){return e?e.replace(/[&<>]/g,y):e}id=u++;for(var m=o.tagName.match(/IMG/i)?!0:!1,x=o,$=0;x.children.length&&$++<100;)for(var k=x.children,w=0;w<k.length&&$++<100;w++)if(1==x.children[w].nodeType&&x.children[w].textContent.trim()==x.textContent.trim()){x=k[w];break}var C=e.getComputedStyle(x),S=C.font,E=C.fontStyle,A=C.fontVariant,T=C.fontWeight,O=C.fontFamily,N=C.fontSize,j=C.lineHeight,M=C.textTransform,I=C.textAlign;if(m)var D=6,P=6;else{var D=2,P=2;if("normal"!=j){var L=parseInt(j)-parseInt(N);if(L/2>2)var D=0,P=Math.floor(L/2)}}var H=c[h].selectorObjects,R=H[a].tiers[l],_=H[a].regex,F=s.getMatchedText(o,_),q=p(o,_,h),U=q.getBoundingClientRect(),W=U.left-6,B=U.top+i(t).scrollTop()-t.body.clientTop-P,V=t.createElement("div");V.setAttribute("kimonodatatype",h),V.setAttribute("kimonoid",id),V.setAttribute("kimonotier",l),V.className=["kim","kim-highlight","kim-"+r.getColor(h),"kim-tier-"+l].join(" "),V.style.left=[W,"px"].join(""),V.style.top=[B,"px"].join(""),V.style.font=S,V.style.fontStyle=E,V.style.fontVariant=A,V.style.fontWeight=T,V.style.fontFamily=O,V.style.fontSize=N,V.style.lineHeight=j,V.style.lineHeight=j,V.style.textTransform=M,V.style.textAlign=I,V.style.zIndex=21474899,V.style.paddingTop=[D,"px"].join(""),V.style.paddingBottom=[D,"px"].join("");var z={"&":"&","<":"<",">":">"},K=t.createElement("div");if(K.className="kim-highlight-wrapper",m){var X=t.createElement("img");V.style.lineHeight="0px",X.setAttribute("src",o.getAttribute("src")),X.style.width=[U.width,"px"].join(""),X.style.height=[U.height,"px"].join(""),K.style.height=[U.height,"px"].join(""),X.style.borderRadius=C["border-radius"],1==l?X.style.opacity="0.9":2==l?X.style.opacity="0.8":3==l&&(X.style.opacity="0.7"),K.appendChild(X)}else K.innerHTML=b(F);if(V.appendChild(K),o.getAttribute("kimonoid")){var G=o.getAttribute("kimonoid").split("-"),Y=o.getAttribute("kimonodatatype").split("-"),J=Y.indexOf(String(h));0>J?(G.push(id),Y.push(h)):G[J]=id,o.setAttribute("kimonoid",G.join("-")),o.setAttribute("kimonodatatype",Y.join("-"))}else o.setAttribute("kimonoid",id),o.setAttribute("kimonodatatype",h);if(c[h].highlightMap[id]={element:o,highlight:V,text:F,tier:l,top:B,left:W,dontEdit:!1,action:n,alwaysShow:"loginMode"==v},l>0){var Q=t.createElement("a");Q.className="kim-highlight-button kim-accept-highlight",K.appendChild(Q),Q.addEventListener("click",function(){d.save(),c[h].acceptTier({element:i(o),selectedText:F,startIndex:0,type:"tier",img:m},l,c,h),d.updateModel(!0),f.updateHighlights(c,h)});var Z=t.createElement("a");Z.className="kim-highlight-button kim-reject-highlight",K.appendChild(Z),Z.addEventListener("click",function(){d.save(),c[h].removeTierForIndex(R,a),f.updateHighlights(c,h)}),K.style.paddingRight="35px",K.style.maxWidth=[o.offsetWidth+35,"px"].join("")}else if("loginMode"==v){var et=o.clientHeight-4;V.style.textAlign="left",V.style.minHeight=et+"px",V.style.minWidth=o.clientWidth+2+"px",V.style.top=i(o).offset().top+"px",V.style.left=i(o).offset().left+"px",V.style.fontFamily="sans-serif",V.style.fontWeight=20>et?400:400,V.style.fontSize=12>.55*et?12:.55*et+"px",console.log("heights",V.style.minHeight,V.style.fontSize);var tt=t.createElement("span");tt.className="kim kim-highlight-text",tt.style.lineHeight=1*et+"px",tt.style.marginRight=(5>.25*et?5:.25*et)+"px",K.innerHTML="",0==h?(g("kim-user-highlight",K,et),tt.innerHTML="Username",K.appendChild(tt)):1==h?(g("kim-password-highlight",K,et),tt.innerHTML="Password",K.appendChild(tt)):2==h&&(g("kim-target-highlight",K,et),tt.innerHTML="Submit",K.appendChild(tt))}else V.className=[V.className,"kim-accepted"].join(" "),K.style.maxWidth=[o.offsetWidth,"px"].join("");return V.addEventListener("mouseenter",function(){this.style.zIndex++}),V.addEventListener("mouseleave",function(){this.style.zIndex--}),V},g=function(e,n,r,i){var o=t.createElement("span");o.className="kim-highlight-icon "+e,o.style.lineHeight=1.05*r+"px";var i=.7*r;13>i&&(i=13),o.style.width=i+"px",o.style.height=i+"px",o.style.marginLeft=(1>.15*r?1:.15*r)+"px",o.style.marginRight=(3>.25*r?3:.25*r)+"px",o.style.marginTop=-(.075*r>4?4:1>.075*r?1:.075*r)+"px",n.appendChild(o)};return f.removeHighlightsForDatatypeIndex=function(e,t){if(e[t]&&e[t].selectorObjects){e[t].highlightMap||(e[t].highlightMap={});for(var n=e[t]?e[t].highlightMap:{},i=(new Date,c.querySelectorAll(".kim-highlight.kim-"+r.getColor(t))),o=0;o<i.length;o++){i[o].style.display="none",i[o].style.left="-9999px",i[o].parentNode.removeChild(i[o]);var a=i[o].getAttribute("kimonoid");if(n[a]&&n[a].element){var s=n[a].element,l=s.getAttribute("kimonoid").split("-"),u=l.indexOf(String(a));if(l.splice(u,1),0==l.length)s.removeAttribute("kimonoid"),s.removeAttribute("kimonodatatype");else{var f=s.getAttribute("kimonodatatype").split("-");f.splice(u,1),s.setAttribute("kimonoid",l.join("-")),s.setAttribute("kimonodatatype",f.join("-"))}}delete n[a]}}},f}]),s.module("Kimono").factory("Validation",["Utils",function(e){var t={};return t.selector=function(t){try{if(""==t)return!1;{e.querySelectorAll(t)}return!1}catch(n){return!0}},t.regex=function(e){try{{new RegExp(e)}return!1}catch(t){return!0}},t}]),s.module("Kimono").factory("WebServices",["Config","$q","Utils","$location",function(e,t){var n={},r={};return n.getCurrentUser=function(){var n=t.defer();return i.getJSON(e.KM_HOST_WWW+"/ws/users/me",function(e){e?n.resolve(e):n.reject({msg:"No Current User",data:e})}),n.promise},r.getCurrentUser=function(){var e=t.defer();return chrome.runtime.onMessage.addListener(function(t){"id"==t.type&&(t.data?e.resolve(t.data):e.reject({msg:"No Current User",data:t.data}))}),chrome.runtime.sendMessage({type:"currentUser"}),e.promise},n.login=function(n,r){var o=t.defer();return i.ajax({type:"POST",url:e.KM_HOST_WWW+"/users/session",data:{email:n,password:r},success:function(e){o.resolve(e.user)},error:function(e,t,n){o.reject({msg:"Error Logging In",code:n})},dataType:"json"}),o.promise},r.login=function(e,n){var i=t.defer();return chrome.runtime.onMessage.addListener(function(e){"userSessionSuccess"==e.type?r.getCurrentUser().then(function(e){i.resolve(e)},function(){i.reject({msg:"Incorrect Login Info",code:response})}):"userSessionFail"==e.type&&i.reject({msg:"Error Logging In",code:e.data})}),chrome.runtime.sendMessage({type:"userSession",data:{email:e,password:n}}),i.promise},n.signup=function(n,r,o){var a=t.defer();return i.ajax({type:"POST",url:e.KM_HOST_WWW+"/processsignup",data:{name:n,email:r,password:o},success:function(e){a.resolve(e.user)},error:function(e,t,n){a.reject({msg:"Error Logging In",code:n})},dataType:"json"}),a.promise},r.signup=function(e,n,r){var i=t.defer();return chrome.runtime.onMessage.addListener(function(e){"signupSuccess"==e.type?i.resolve(e.data):"signupFailed"==e.type&&i.reject(e.data)}),chrome.runtime.sendMessage({type:"signup",data:{name:e,username:n,password:r}}),i.promise},n.createApi=function(n){var r=t.defer(),o=n.id?"/ws/editapi":"/ws/create";return i.ajax({type:"POST",url:e.KM_HOST_WWW+o,data:n,success:function(e){e.error?r.reject(e.error):r.resolve(e)},error:function(e,t,n){r.reject(n)},dataType:"json"}),r.promise},r.createApi=function(e){var n=t.defer();return chrome.runtime.onMessage.addListener(function(e){"createApiSuccess"==e.type?n.resolve(e.data):"createApiError"==e.type?n.reject(e.data):"createApiFail"==e.type&&n.reject(e.data)}),chrome.runtime.sendMessage({type:"createApi",data:e}),n.promise},n.apiForEditing=function(n){var r=t.defer();return setTimeout(function(){r.notify(1)},300),i.ajax({type:"GET",url:e.KM_HOST_WWW+"/ws/api/"+n,success:function(e){r.resolve(e)},error:function(e,t,n){r.reject(n)},dataType:"json"}),r.promise},r.apiForEditing=function(e){var n=t.defer();return chrome.runtime.onMessage.addListener(function(e){"editApiSuccess"==e.type?n.resolve(e.data):"editApiFail"==e.type&&n.reject(e.data)}),chrome.runtime.sendMessage({type:"editApi",data:e}),n.promise},n.getSiteApis=function(n){var r=t.defer();return i.ajax({type:"GET",url:e.KM_HOST_WWW+"/ws/siteapis?url="+encodeURIComponent(n),success:function(e){r.resolve(e)},error:function(e,t,n){r.reject(n)},dataType:"json"}),r.promise},r.getSiteApis=function(e){var n=t.defer();return chrome.runtime.onMessage.addListener(function(e){"theSiteApis"==e.type&&n.resolve(e.data)}),chrome.runtime.sendMessage({type:"getSiteApis",data:e}),n.promise},n.getDownloadFile=function(n,r){var o=t.defer(),a={type:n,content:r};return i.ajax({type:"POST",url:e.KM_HOST_WWW+"/ws/preparedownload",data:a,success:function(t){o.resolve(e.KM_HOST_WWW+t.url)},error:function(e,t,n){o.reject(n)},dataType:"json"}),o.promise},r.getDownloadFile=function(e,n){var r=t.defer();return chrome.runtime.onMessage.addListener(function(e){"download"==e.type?r.resolve(e.data):"downloadFailed"==e.type&&r.reject(e.data)}),chrome.runtime.sendMessage({type:"prepareDownload",data:{type:e,content:n}}),r.promise},n.updateUser=function(t,n,r){var o=r||"alerts",a={type:o,userid:n};a[o]=t,i.post(e.KM_HOST_WWW+"/ws/updateuser",a)},r.updateUser=function(e,t,n){var r=n||"alerts",i={dataType:r,userid:t};i[r]=e,chrome.runtime.sendMessage(i)},n.getNotifications=function(){var n=t.defer();return i.get(e.KM_HOST_WWW+"/ws/getnotifications",function(e){e?n.resolve(e):n.reject()}),n.promise},r.getNotifications=function(){var e=t.defer();return chrome.runtime.onMessage.addListener(function(t){"notifications"==t.type?e.resolve(t.data):"notificationsFailed"==t.type&&e.reject(t.data)}),chrome.runtime.sendMessage("getNotifications"),e.promise},r.listenForLoad=function(e,t,n,r,i){var o={username:e,password:t,usernameSelector:n,passwordSelector:r,submitSelector:i};chrome.runtime.sendMessage({type:"initiateListening",data:o})},r.followLink=function(e){chrome.runtime.sendMessage({type:"followLink",data:e})},r.enableAuth=function(){chrome.runtime.sendMessage("authMode")},r.getState=function(){var e=t.defer();return chrome.runtime.onMessage.addListener(function(t){"theState"==t.type&&e.resolve(t.data)}),chrome.runtime.sendMessage("currentState"),e.promise},r.changeState=function(e){var n=t.defer();return chrome.runtime.onMessage.addListener(function(e){"doneChangingState"==e&&n.resolve()}),chrome.runtime.sendMessage({type:"changeState",data:e}),n.promise},r.getLoginCredentials=function(){var e=t.defer();return chrome.runtime.onMessage.addListener(function(t){"theCredentials"==t.type&&e.resolve(t.data)}),chrome.runtime.sendMessage("getLoginCredentials"),e.promise},r.getProperty=function(){var e=t.defer();return chrome.runtime.onMessage.addListener(function(t){"property"==t.type&&e.resolve(t.data)}),chrome.runtime.sendMessage({type:"getProperty",data:apiObj}),e.promise},r.addProperty=function(e,t){chrome.runtime.sendMessage({type:"addProperty",data:{key:e,value:t}})},r.getEditingApi=function(){var e=t.defer();return chrome.runtime.onMessage.addListener(function(t){"editingApi"==t.type&&e.resolve(t.data)}),chrome.runtime.sendMessage("isEditingApi"),e.promise},"chrome"==e.clientEnv?r:n}]),s.module("Kimono").controller("apiPanelController",["$scope","$timeout","Datatypes","Utils","HighlightManager","WebServices",function(e,t,r,o,a,s){e.siteApis=[],e.otherSites={},e.rootDomain="",e.showHelp=!1,e.open=!1,e.loading=!1,e.urlRegex="\\?.*|https?://.*?(?=/|$)",e.selectedApi={};var l={},c=function(){var t=r.cloneDatatypes(e.datatypes);l={collections:i.extend(!0,[],e.collections),collectionNames:i.extend(!0,[],e.collectionNames),datatypes:t,datatypeIndex:e.$parent.datatypeIndex,pagination:e.$parent.flags.hasPagination,override:e.$parent.userOverrideCollections,actionHistory:e.$parent.actionHistory}},u=function(){a.removeAllHighlights(e.datatypes);var t=l;e.$parent.collections=t.collections,e.$parent.collectionNames=t.collectionNames,e.$parent.datatypes=t.datatypes,e.$parent.datatypeIndex=t.datatypeIndex,e.$parent.actionHistory=t.actionHistory,e.flags.actionHistoryLength=t.actionHistory.length,e.$parent.flags.hasPagination=t.pagination,e.$parent.userOverrideCollections=t.override,e.$parent.updateModel(),a.updateHighlightsForAllDatatypes(e.datatypes,!1,e.flags.mode),a.showHighlights(e.datatypes,e.datatypeIndex),t={}};e.match=function(t,n){return t.replace(e.urlRegex,"")==n},e.shortenString=function(e,t,r){return e==n?"":e.length<=t?e:r?e.substr(0,parseInt(t/2))+"..."+e.substr(e.length-parseInt(t/2)):e.substr(0,t)+"..."},e.cancel=function(){u(),e.flags.currentApi=!1,e.selectedApi={},e.showLargeOverlay(""),e.changeView("extractor")},e.getApi=function(n){{var r=(n.targeturl.replace(new RegExp(e.urlRegex,"g"),""),n.id);o.getTargetUrl().replace(new RegExp(e.urlRegex,"g"),"")}if(e.showLargeOverlay(""),e.changeView("extractor"),r!=e.flags.currentApi.id){e.flags.currentApi||c();var i=!1,a=!1;e.loading=!0,t(function(){a=!0,i&&(e.loading=!1)},1e3),e.loadApi(r,function(){i=!0,a&&(e.loading=!1),e.$parent.actionHistory=[],e.flags.actionHistoryLength=0})}},e.toggle=function(){e.open=!e.open,e.clearHint("new_auth")},e.done=function(){e.open=!1,e.clearHint("new_auth")},e.goToApi=function(t){e.selectedApi=t,e.currentPage=".api-view"},e.back=function(){e.currentPage=".panel-list"},e.$on("api_panel_launch",function(n,r){var a=_.groupBy(r,function(t){var n=t.targeturl.replace(new RegExp(e.urlRegex,"g"),"");return n&&n.length>0?n:"/"}),l=o.getTargetUrl().replace(new RegExp(e.urlRegex,"g"),"");e.siteApis=a[l],e.otherSites=_.omit(a,l);var c=o.getTargetUrl().match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);e.rootDomain=c&&c[1],("undefined"==typeof e.flags.currentUser||"undefined"==typeof e.flags.currentUser.alerts||"true"!=e.flags.currentUser.alerts.new_api_panel)&&t(function(){e.open=!0;var t='<p class="auth-hint-message">Find existing APIs that other users have created for this website. Click one to load it, modify it and and save your own version.</p>';e.flags.currentUser&&(t+='<div class="kim-hint-checkbox"> <input type="checkbox" value="1" id="ApiPanelDontShowCheckbox"> <label for="ApiPanelDontShowCheckbox"></label> </div> <span class="dont-show-label">Don\'t show me this again</span>'),e.flags.currentHints.new_auth=o.drawHint(i("body"),"Kimono API Panel",t,{x:0,y:45,right:20,bottom:320},{width:300,height:""},null,"down","right",!1,function(){if(e.flags.currentUser){var t=i(".kim-hint #ApiPanelDontShowCheckbox")[0],n=t&&t.checked;n&&e.flags.currentUser&&s.updateUser({new_api_panel:!0},e.flags.currentUser._id,"alerts")}})},500)})}]),s.module("Kimono").controller("attributesOverlayController",["$scope","Validation","Regex",function(e,t){e.error=!1,e.attributes={},e.errors=[],e.hiddenElements=e.datatypes[e.datatypeIndex].context.hiddenElements,e.textContent=e.datatypes[e.datatypeIndex].context.textContent,e.enter=function(){e.datatypes[e.datatypeIndex].updateAttributes(),e.attributes=r(e.datatypes[e.datatypeIndex].context.attributes),e.hiddenElements=e.datatypes[e.datatypeIndex].context.hiddenElements,e.textContent=e.datatypes[e.datatypeIndex].context.textContent},e.remove=function(t){e.customAttributes.splice(t,1),e.errors.splice(t,0)},e.add=function(){e.customAttributes.push({regex:"/^()(.*?)()$/",attribute:""}),e.errors.push({regex:!1,attribute:!1})},e.apply=function(){i.each(e.attributes,function(e,t){n(e,t)}),e.error||(e.save(),e.$parent.datatypes[e.datatypeIndex].context.attributes=e.attributes,e.$parent.datatypes[e.datatypeIndex].context.hiddenElements=e.hiddenElements,e.$parent.datatypes[e.datatypeIndex].context.textContent=e.textContent,e.showPopup(""),e.toast("success","Attribute changes applied successfully.",2e3))};var n=function(n,r){return e.errors[n]={regex:t.regex(r.regex),attribute:!1},e.error=e.errors[n].regex||e.errors[n].attribute},r=function(e){var t={};return i.each(e,function(e,n){"length"!=e&&(t[n.attribute]={attribute:n.attribute,regex:n.regex,value:n.value})}),t}}]),s.module("Kimono").controller("authOverlayController",["$scope","Validation","Regex","WebServices","$timeout","$location","Manipulation","HighlightManager","Utils",function(e,t,n,r,o,a,s,l,c){e.form={username:"",password:""},e.host=a.host(),e.agreeError,e.agree=function(){e.agreeError=""},e.authLogin=function(){if(!e.authAgree)return e.agreeError="agree-error",void 0;var t=e.datatypes[0].selectorObjects[0].selector,n=e.datatypes[1].selectorObjects[0].selector,o=e.datatypes[2].selectorObjects[0].selector;l.removeAllHighlights(e.datatypes),r.listenForLoad(e.form.username,e.form.password,t,n,o),s.fillLoginForm({usernameInput:c.querySelectorAll(t)[0],passwordInput:c.querySelectorAll(n)[0]},{username:e.form.username,password:e.form.password},function(){setTimeout(function(){c.linkEnable(),e.flags.navigate=!0,s.simulateClick(i(c.querySelectorAll(o)[0])),c.linkDisable(),e.flags.navigate=!1},500)}),e.showLargeOverlay(""),e.changeView("extractor")}}]);var l=s.module("Kimono");l.directive("selector",["Utils",function(e){return{require:"ngModel",link:function(t,n,r,i){i.$parsers.unshift(function(t){try{return e.querySelectorAll(t),i.$setValidity("selector",!0),t}catch(n){return i.$setValidity("selector",!1),t}})}}}]),l.directive("regex",["Utils",function(){return{require:"ngModel",link:function(e,t,r,i){i.$parsers.unshift(function(e){try{return new RegExp(e),e.match(/\/\^?\(.*?\)\(.*?\)\(.*?\)\$?\//)?(i.$setValidity("regex",!0),e):(i.$setValidity("regex",!1),n)}catch(t){return i.$setValidity("regex",!1),n}})}}}]),l.controller("dataOverlayController",["$scope","Collections","Regex","Utils","Validation","HighlightManager","Datatypes","$timeout",function(e,t,n,r,o,a){function s(e){return"string"!=typeof e?e:new RegExp(e.substr(1,e.length-2))}e.mode="simple",e.errorMessage="Invalid CSS selector and/or Regular Expression",e.tmpCollections={},e.$watch("collections",function(){e.resetAdvancedModeForm()}),e.resetAdvancedModeForm=function(){e.tmpCollections=c(e.collections)},e.update=function(t){e.advancedModeForm.$invalid||(e.save(),u(),l(t,e.collections),e.updateModel(),a.removeAllHighlights(e.datatypes),a.updateHighlightsForAllDatatypes(e.datatypes,!0,e.flags.mode),a.showHighlights(e.datatypes,e.datatypeIndex),e.toast("success","Advanced changes applied successfully.",2e3))};var l=function(e,t){e.forEach(function(e,n){e.forEach(function(e,r){e.selectorObjects.forEach(function(e,i){console.log("regexcompare",t[n][r].selectorObjects[i].regex,s(e.regex)),t[n][r].selectorObjects[i].selector=e.selector,t[n][r].selectorObjects[i].regex=s(e.regex)})})})},c=function(e){var t=[];return e.forEach(function(e,n){t[n]=[],e.forEach(function(e,r){t[n][r]={selectorObjects:[]},e.selectorObjects.forEach(function(e){var i={selector:e.selector,regex:e.regex};t[n][r].selectorObjects.push(i)})})}),t};e.isUnchanged=function(t){for(var n=0,r=t.length;r>n;n++)for(var i=0,o=t[n],a=o.length;a>i;i++)for(var s=0,l=o[i].selectorObjects,c=l.length;c>s;s++){var u=l[s],f=e.tmpCollections[n][i].selectorObjects[s];if(u.selector!=f.selector||u.regex!=f.regex)return!1}return!0};var u=function(){for(var t=0,n=e.collections.length;n>t;t++)for(var r=0,i=e.collections[t],o=i.length;o>r;r++)for(var a=0,s=i[r].selectorObjects,l=s.length;l>a;a++){var c=s[a],u=e.tmpCollections[t][r].selectorObjects[a];c.selector!=u.selector&&(c.tiers=[u.selector])}};e.showAttributes=function(t){e.$parent.datatypeIndex=t,e.showPopup("attributes")},e.editor={};var f={x:0,y:0};e.editor.dragStart=function(e){f.x=e.position.x,f.y=e.position.y,e.element.style.zIndex=2147483647},e.editor.dragEnd=function(t){var n=!1;t.element.style.zIndex="auto";var o=t.element.getAttribute("collectionIndex"),s=t.element.getAttribute("datatypeIndex");i(".kim-collection-dropzone").each(function(i,a){var l=a.getAttribute("collectionIndex");if(r.isIntersecting(a,t.element)&&o!=l){if("new"==l&&1==e.collections[o].length)return;return n=!0,e.save(),e.$parent.flags.userOverrideCollections=!0,"new"==l?(e.datatypes[s].context.collection=e.collections.length,e.flags.hasPagination?e.collectionNames[e.collectionNames.length-1]="collection"+e.collections.length:e.collectionNames.push("collection"+(e.collections.length+1))):e.datatypes[s].context.collection=l,e.datatypes[s].context.forceAssociation=!0,e.updateModel(!0),void 0}}),n||(i(".kim-datatype-dropzone").each(function(i,o){var l=o.getAttribute("datatypeIndex");return l!=s&&r.isIntersecting(o,t.element)?(a.removeAllHighlights(e.datatypes),n=!0,e.save(),e.$parent.datatypeIndex=e.datatypes[l].mergeDatatype(e.datatypes[s],e.datatypes),e.updateModel(!0),a.updateHighlightsForAllDatatypes(e.datatypes,!1,e.flags.mode),a.showHighlights(e.datatypes,e.$parent.datatypeIndex),void 0):void 0}),n||(t.element.style.top=f.y,t.element.style.left=f.x))}}]),s.module("Kimono").controller("doneOverlayController",["$scope","Collections","WebServices","Utils","Regex",function(e,t,n,r,o){e.doneStep=1,e.error=!1,e.errorMessage="Enter an API name.",e.loading=!1,e.utils=r,e.crawlLimits=[{id:5},{id:10},{id:25},{id:50},{id:100},{id:500},{id:1e3}],e.frequencies=[{id:"realtime"},{id:"quarterhourly"},{id:"halfhourly"},{id:"hourly"},{id:"daily"},{id:"weekly"},{id:"monthly"}],e.filterFrequencies=function(t){return e.flags.currentUser&&e.flags.currentUser.superuser?!0:!e.flags.crawlingEnabled&&!e.flags.hasPagination||"quarterhourly"!=t.id&&"halfhourly"!=t.id?!0:!1},e.selectedCrawlLimit=e.crawlLimits[0].id,e.apiName="",e.apiID="",e.getTagsPlaceholder=function(){return console.log(e.apiTags),e.apiTags.length?"":"add a tag"},e.enter=function(){e.doneStep=1,e.error=!1,e.apiName=e.flags.currentApi.name||"",e.selectedFrequency="realtime",e.selectedFrequency=e.flags.currentApi.frequency||e.selectedFrequency,e.selectedCrawlLimit=e.flags.currentApi.instructions&&e.flags.currentApi.instructions.limit?parseInt(e.flags.currentApi.instructions.limit):e.selectedCrawlLimit,e.flags.currentUser&&e.flags.currentUser.superuser&&7==e.frequencies.length&&e.frequencies.splice(1,0,{id:"minutely"},{id:"fiveminutely"})},e.createApiButtonLabel=function(){return e.flags.editing?"Save API":e.flags.currentApi?"Clone API":"Create API"},e.createdOrUpdated=function(){return e.flags.editing?"updated":"created"},e.keyUpInApiNameField=function(t){13==t.keyCode&&e.createApi()},e.createApi=function(){if(e.error=!1,0==e.apiName.length)return e.error=!0,e.errorMessage="Enter an API name.",void 0;if(!e.apiName.match(/^[0-9a-zA-Z _-]+$/))return e.error=!0,e.errorMessage="Your API name can only contains letters, numbers, spaces, - and _",void 0;var a=0;if(i.each(e.collections,function(e,t){i.each(t,function(e,t){0!=t.getNumberOfElements()&&a++})}),0==a)return e.error=!0,e.errorMessage="You must have made at least one selection before you can create an API",void 0;e.loading=!0;var s=r.getTargetUrl().match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i),l=s&&s[1];l&&(l=l.replace(/www\./,""));var c={apiname:e.apiName,targeturl:e.targetUrl,frequency:e.selectedFrequency,collections:t.getCollectionsForExport(e.collections),collectionNames:e.collectionNames,userid:e.flags.currentUser._id,tags:e.apiTags,userOverrideCollections:e.flags.userOverrideCollections,crawlingenabled:e.flags.crawlingEnabled||e.flags.hasPagination,rootDomain:l};e.flags.editing?(c.id=e.flags.currentApi.id,c.access=e.flags.currentApi.access):c.access=e.flags.currentUser.superuser?"private":"public",e.flags.hasPagination?(c.instructions=e.flags.currentApi&&e.flags.currentApi.instructions||{},c.instructions.type="paginate",c.instructions.nextPageSelector=e.datatypes.pagination.selectorObjects[0].selector,c.instructions.nextPageRegexObj=o.buildRegexObjectFromRegex(e.datatypes.pagination.selectorObjects[0].regex),c.instructions.limit=e.selectedCrawlLimit):c.instructions=e.flags.currentApi&&e.flags.currentApi.instructions&&"paginate"==e.flags.currentApi.instructions.type?{}:e.flags.currentApi?e.flags.currentApi.instructions:{},n.createApi(c).then(function(t){e.doneStep=2,e.loading=!1,e.flags.hideBackButton=!0,e.apiID=t.id},function(){e.loading=!1,e.doneStep=-1})}}]),s.module("Kimono").controller("extractorController",["Config","$scope","Datatypes","HighlightManager","Collections","Utils","Selections","$timeout",function(t,n,r,o,a,s,l,c){var u=["Username Field","Password Field","Submit Button"];i("body")[0].addEventListener("click",function(e){var t=e.target;if(s.isKimonoChild(i(t)))return e;if(n.preventAction(e),"A"==t.tagName&&!n.flags.navigate){var r=i(t);r.attr("target","_self"),r.attr("kimonohref",r.attr("href")),r.removeAttr("href"),r.removeAttr("target")}},!0);var f=i("body").css("background-position-y");("0px"==f||"0%"==f||"0"==f)&&i("body").css("background-position-y","44px");var d=!1,p=function(e){for(var t=i(e).contents(),n=!1,r=0;r<t.length;r++)3==t[r].nodeType&&t[r].nodeValue.trim().length>0&&(n=!0);return n},h=function(e){return n.datatypes&&n.datatypes[n.datatypeIndex]&&n.datatypes[n.datatypeIndex].highlightMap&&n.datatypes[n.datatypeIndex].highlightMap[e.attr("kimonoid")]&&n.datatypes[n.datatypeIndex].highlightMap[e.attr("kimonoid")].highlight.getAttribute("kimonodatatype")==n.datatypeIndex},g=function(e){var t=i(e).attr("type");t&&(t=t.toLowerCase());var n=e.tagName;return n&&(n=n.toLowerCase()),"input"==n&&"submit"==t||"a"==n||"button"==n},m=function(e){var t=i(e).attr("type");t&&(t=t.toLowerCase());var n=e.tagName;return n&&(n=n.toLowerCase()),"input"==n&&("text"==t||"email"==t||"password"==t||"search"==t)||"textarea"==n},v=function(e){for(var t=e,r=e.textContent,i=0;i++<20;){var o=t.parentNode;if(o.textContent.trim()!=r.trim())break;if("pagination"==n.datatypeIndex&&"A"==t.nodeName)break;t=t.parentNode}return t.nodeName.match(/^(TD|TH|A)$/i)?t:e},y=function(e,t){var r=e;i(".kim-temp-selectable").each(function(){b(i(this))}),r.addClass(t+" on kim-TempSpecial"),r.attr("kimono-prev-id",r.attr("id")),d=!0,r.addClass("kim-"+n.getColor(n.datatypeIndex)),r[0].addEventListener("click",function(e){return n.preventAction(e),d&&$(i(e.target)),!1},!0),r.on("mousedown",function(){i(this).removeClass("on kim-yellow kim-amber kim-orange kim-sunset kim-red kim-fuchsia kim-purple kim-indigo kim-blue kim-aqua kim-green kim-lime kim-tan kim-coffee kim-grey kim-smoke kim-bluegrey")}),r.on("mouseleave",function(){b(i(this))})},b=function(e){d=!1,e.removeClass("kim kim-TempSpecial kim-temp-selectable on kim-yellow kim-amber kim-orange kim-sunset kim-red kim-fuchsia kim-purple kim-indigo kim-blue kim-aqua kim-green kim-lime kim-tan kim-coffee kim-grey kim-smoke kim-bluegrey"),e.attr("class")&&""!=e.attr("class")||e.removeAttr("class"),e.off("mouseleave"),e.off("click"),e.off("mouseup")},x=function(e){d=!1,e.removeClass("kim-TempSpecial kim-img-temp-selectable on kim-yellow kim-amber kim-orange kim-sunset kim-red kim-fuchsia kim-purple kim-indigo kim-blue kim-aqua kim-green kim-lime kim-tan kim-coffee kim-grey kim-smoke kim-bluegrey"),e.attr("class")&&""!=e.attr("class")||e.removeAttr("class"),e.off("mouseleave"),e.off("click"),e.off("mouseup")};i("body").on("mouseenter","img:not(#Kimonify, #Kimonify *, .kim, .kim *, .kim-dont-touch, .kim-container *)",function(e){n.flags.navigate||h(i(this))||i(e.target).attr("kimonoid")||i(e.target).attr("kimonodatatype")||s.isKimonoChild(e.target)||y(i(this),"kim-img-temp-selectable",e)}),i("body").on("mouseenter","*:not(#Kimonify, #Kimonify *, .kim, .kim *, .kim-hint *, .kim-dont-touch, .kim-dont-touch *)",function(e){if(!n.flags.navigate&&!h(i(this))&&!(i(e.target).attr("kimonodatatype")&&i(e.target).attr("kimonodatatype").match(n.datatypeIndex)||s.isKimonoChild(e.target))){if("loginMode"==n.flags.mode)return(m(e.target)&&n.datatypeIndex<2||g(e.target)&&2==n.datatypeIndex)&&y(i(e.target),"kim-temp-selectable",e),void 0;var t=(e.target.textContent,e.target),r=p(t);if(r){t.nodeName.match(/A/i)&&i(t).not("#kim-Toolbar a, .kim-container *, #kim-DoneOverlay a, #kim-LoginOverlay a, .kim-dont-touch")&&(ln=i(t),ln.attr("href")&&(ln.attr("kimonohref",ln.attr("href")),ln.removeAttr("href")),ln.attr("target","_self"),ln.removeAttr("target"));var o=v(t);y(i(o),"kim-temp-selectable",e)}}});var $=function(e){if(d=!1,"loginMode"==n.flags.mode)return b(e),k(e),void 0;var t="img"==e.prop("tagName").toLowerCase();if(t?x(e):b(e),e.is("#kim-Toolbar *, .kim-Overlay *, .kim-container *, #kim-RSSInfo *, #kim-DoneOverlay *, #kim-LoginOverlay *, .kim-highlight"))return console.log("You clicked a Kimono element, not gonna do anything!"),void 0;var r={element:e,selectedText:e.text(),startIndex:0,type:"actual",img:t};n.save(),o.processSelection(r,"clicked",n.datatypes,n.datatypeIndex,n.collections.length),s.animate(i('.kim-data-dot[kimonodatatype="'+n.datatypeIndex+'"]'),"pulse2",300),n.updateModel(!1),o.updateHighlights(n.datatypes,n.datatypeIndex,!1,n.flags.mode),n.$parent.$digest()};i("body")[0].addEventListener("mouseup",function(t){if("loginMode"!=n.flags.mode&&!n.flags.navigate){if(s.isKimonoChild(i(t.target),!0))return t;n.preventAction(t);var r=e.getSelection();if(""!=r){var a=(r.toString(),r.getRangeAt(0)),c=s.querySelectorAll(".kim, .kim-hint",a.cloneContents());if(!(c.length>0)){var u=a.commonAncestorContainer;if(1==u.nodeType)var f=a.commonAncestorContainer;else var f=a.commonAncestorContainer.parentElement;for(var d=l.getRangeSelectedNodes(a),p=0;p<d.length;p++)for(var h=0,g=d[p].textContent;d[p]!=f;)if(d[p]=d[p].parentNode,g!=d[p].textContent&&(g=d[p].textContent,h++),2==h)return; | |
if(f=i(f),!f.is(".kim")){i(".kim-temp-selectable").each(function(){b(i(this))});for(var m=a.startOffset,d=f.contents(),v=d.length,p=0;v>p;p++){var y=d[p];if(3==y.nodeType){if(a.startContainer.nodeValue==y.nodeValue)break;m+=y.nodeValue.length}else{if(i(a.startContainer).text()==i(y).text())break;m+=i(y).text().length}}n.save(),o.processSelection({element:f,selectedText:a.toString(),startIndex:m,type:"actual",img:!1},"dragged",n.datatypes,n.datatypeIndex,n.collections.length),s.animate(i('.kim-data-dot[kimonodatatype="'+n.datatypeIndex+'"]'),"pulse2",300),n.updateModel(!1),o.updateHighlights(n.datatypes,n.datatypeIndex,n.flags.loginMode),n.$parent.$digest()}}}}},!0);var k=function(e){n.save();var t=l.getSuperSpecificSelector([e[0]]),r={element:e,selectedText:e.text(),startIndex:0,type:"actual",img:!1};n.datatypes[n.datatypeIndex].initiateWithSelectorForSingleElement(r,t),o.updateHighlights(n.datatypes,n.datatypeIndex,!1,n.flags.mode),n.updateModel(!0),s.animate(i('.kim-data-dot[kimonodatatype="'+n.datatypeIndex+'"]'),"pulse2",300),n.toast("success",u[n.$parent.datatypeIndex]+" Selected.",1e3),c(function(){n.showHelp("auth",n.datatypeIndex+1)},1e3),n.$apply(),n.clearHint("all")}}]),s.module("Kimono").controller("illegalOverlayController",["$scope",function(e){e.enter=function(){e.flags.showBackButton=!1}}]),s.module("Kimono").controller("largeOverlayController",["$scope",function(e){e.show=!1,e.currentOverlay="",e.backButton=!0,e.close=function(){e.show=!1,e.currentOverlay="",e.backButton=!0},e.$on("show_large_overlay",function(t,n,r){n.length?(e.show=!0,e.currentOverlay=n,e.backButton=!r):e.close()})}]),s.module("Kimono").controller("loginOverlayController",["$scope","Validation","Regex","WebServices","$timeout",function(e,t,n,r,i){e.loginStep=1,e.form={username:"",password:""},e.loginError=!1,e.loading=!1,e.enter=function(){e.loginStep=1,e.loginError=!1},e.login=function(){e.loading=!0,r.login(e.form.username,e.form.password).then(function(t){e.loading=!1,e.loginStep=2,e.flags.currentUser=t,i(function(){e.showLargeOverlay("loginMode"==e.flags.mode?"auth":"done")},2e3)},function(){e.loading=!1,e.loginError=!0},function(t){1==t&&(e.loading=!0)})}}]),s.module("Kimono").controller("mainController",["Config","$scope","Collections","Datatypes","HighlightManager","WebServices","Utils","$timeout","$interval","Selections","Kimono_async","Common",function(t,r,o,s,l,c,u,f,d,p,h,g){r.actionHistory=[],r.collections=[],r.collectionNames=[],r.datatypes=[],r.config=t,r.datatypeIndex=0,r.targetUrl=u.getTargetUrl(),r.collectionTitle="Collection",r.flags={loading:!1,actionHistoryLength:0,hasPagination:!1,currentView:"extractor",moveBack:{},mode:"normal",userOverrideCollections:!1,currentUser:n,currentApi:!1,editing:!1,toasting:!1,toastMessage:"",toastType:"warning",navigate:!1,currentStep:"-1",currentHints:{},showApiPanel:!1,showNotificationPanel:!1},e.$k.showModel=function(){console.log("Collections",r.collections),console.log("Datatypes",r.datatypes),console.log("Collection Names",r.collectionNames),console.log("Flags",r.flags)},r.tags=t.tags,r.tagWords={essay:"books",shop:"shopping","social science":"economics",office:"jobs",show:"movies","sell-off":"auctions",text:"books",global:"international",communities:"community",foodstuff:"food",radio:"media",shoe:"shoes",lend:"investing",announcement:"news",snack:"food",layout:"design",dining:"food",tv:"entertainment",graph:"maps",pump:"shoes",writing:"books",blog:"blogs",resort:"hotels","working capital":"venture capital",civilization:"culture",rumor:"news",holiday:"holidays",earnings:"salaries",designs:"design",publication:"books",paperback:"books",coding:"code",nation:"politics","cowboy boot":"shoes",game:"games",quest:"search",facebook:"social networking",outlet:"shopping",report:"news",rental:"rentals",bank:"banking",bread:"food",bar:"food",meat:"food",opera:"music",hunt:"search",feast:"food",teams:"sports",architecture:"design",rock:"music",businesses:"business",athletics:"sports",technologie:"technology",meal:"food",flick:"movies",sneaker:"shoes",bill:"money",neighborhood:"community",people:"community",trend:"fashion",fad:"fashion",idea:"design",society:"community","dining room":"food",traveling:"travel",magazine:"books",programmer:"programming",sport:"sports",employment:"jobs",investment:"investing",hostel:"hotels",album:"music",videotape:"movies",pattern:"design",motel:"hotels",cooking:"food",anniversary:"holidays",research:"reference",state:"community",capital:"money",melody:"music","public":"community",sciences:"science",wage:"salaries",tour:"travel",team:"sports",payroll:"salaries",arts:"art",stipend:"salaries",loafer:"shoes",job:"jobs",apartment:"rentals",musical:"music","motion picture":"movies",wealth:"money",booklet:"books",bloggin:"blogs",climate:"weather",diner:"food",ventures:"venture capital",economic:"economics",study:"design",experience:"culture",foreign:"international",saloon:"food",dogecoin:"cryptocurrency",gamer:"games",browsing:"ecommerce",navigation:"maps",tome:"books",disclosure:"news",governments:"government",civil:"social",transit:"travel",profession:"jobs",sketch:"design","tennis shoe":"shoes",slipper:"shoes",pamphlet:"books",bitcoin:"cryptocurrency",layoff:"jobs",twitte:"social networking",learning:"science",lodging:"hotels",athlete:"sports",message:"news",cafeteria:"food",singing:"music",sightseeing:"travel",story:"news",fee:"salaries",publishing:"books",district:"community",spending:"ecommerce",flying:"travel",political:"politics",system:"science",celebration:"holidays",fiction:"books",program:"software",statement:"news",house:"real estate",scheme:"design",universal:"international","running shoe":"shoes",lease:"rentals",festivity:"holidays",form:"fashion",startup:"startups",company:"jobs",hotel:"hotels",broadcast:"news",fund:"investing",trek:"travel",construction:"design",restauraunt:"food",brochure:"books",gaming:"games",copy:"books",quotation:"reference",commerce:"finance",television:"entertainment",novel:"books","operating system":"software",look:"fashion",sailing:"travel","coffee shop":"food",tavern:"hotels",ride:"travel",cash:"money",finances:"finance",career:"jobs",entrepreneurial:"entrepreneurship",computer:"computers",exploration:"travel",venture:"venture captial",land:"real estate",property:"real estate",excursion:"travel",feature:"movies",nonfiction:"books",cinema:"movies",textbook:"books",festival:"holidays",inn:"hotels",pastime:"sports",gala:"holidays",rap:"music",campaigning:"politics",education:"science",check:"money",film:"movies",cuisine:"food","online journal":"blogs",trip:"travel",pay:"salaries",boot:"shoes",spreadsheet:"software",arrangement:"design",note:"reference",field:"business",book:"books",inquiry:"search",vacation:"holidays",income:"salaries",composition:"design",crowdfund:"crowdfunding",map:"maps",information:"science",advice:"news",drink:"food",communal:"community",automation:"technology",invested:"investing",coder:"code",payment:"money",tune:"music",salary:"salaries",edition:"books",os:"software",cleat:"shoes",spend:"investing","e-commerce":"ecommerce",machinery:"technology",movie:"movies",model:"fashion",drawing:"design"},r.apiTags=[],r.new_features=[],r.allFeatures=[],r.getColor=function(e){return t.getColor(e)},r.clearHint=function(e){if("all"==e){for(var t in r.flags.currentHints)if(r.flags.currentHints[t]){var n=r.flags.currentHints[t];delete r.flags.currentHints[t],n()}}else r.flags.currentHints[e]&&r.flags.currentHints[e](),delete r.flags.currentHints[e]},r.$watch("datatypeIndex",function(){"loginMode"==r.flags.mode&&r.clearHint("auth")}),r.$watch("flags.mode",function(e){r.clearHint("auth"),"navigation"==e&&r.clearHint("new_navigation"),"loginMode"==e&&r.clearHint("new_auth")}),r.showHelp=function(n,o){if("chrome"!=t.clientEnv||"loginMode"!=r.flags.mode||"auth"!=n||"undefined"!=typeof r.flags.currentUser&&"undefined"!=typeof r.flags.currentUser.alerts&&"true"==r.flags.currentUser.alerts.auth||(r.clearHint("auth"),0==o&&f(function(){var e=i('.kim-data-dot[kimonodatatype="0"]').position();e.left-=17,e.top+=35,r.flags.currentHints.auth=u.drawHint(i("body"),"Username","First, locate the <strong>username/email</strong> field of the login form and click it.",{x:e.left,y:e.top},{width:300,height:""},null,"up","left",!1)},20),1==o&&f(function(){var e=i('.kim-data-dot[kimonodatatype="1"]').position();e.left-=17,e.top+=35,r.flags.currentHints.auth=u.drawHint(i("body"),"Password","Next, switch to the <strong>password</strong> field selector and then click the password field.",{x:e.left,y:e.top},{width:300,height:""},null,"up","left",!1)},20),2==o&&f(function(){var e=i('.kim-data-dot[kimonodatatype="2"]').position();e.left-=17,e.top+=35,r.flags.currentHints.auth=u.drawHint(i("body"),"Submit Button","Finally, click the <strong>login button</strong> selector and then click the login button.",{x:e.left,y:e.top},{width:300,height:""},null,"up","left",!1)},20),3==o&&f(function(){r.flags.currentHints.auth=u.drawHint(i("body"),"Almost finished","Now click <strong>done</strong> to enter your login information for this site.",{x:0,y:45,right:13},{width:300,height:""},null,"up","right",!1)},20),r.flags.currentUser&&"dev"!=e.$k.config.serverEnv&&c.updateUser({auth:!0},r.flags.currentUser._id,"alerts")),"chrome"==t.clientEnv&&"https:"==e.location.protocol&&"on"!=r.flags.currentStep&&"done"!=r.flags.currentStep&&"new_auth"==n&&("undefined"==typeof r.flags.currentUser||"undefined"==typeof r.flags.currentUser.alerts||"true"!=r.flags.currentUser.alerts.new_auth)){var a='<p class="auth-hint-message">When you kimonify a page that looks like it might require you to login to see it\'s data, the lock icon will pulsate. Click it to enter <strong>Auth mode</strong>.</p>';r.flags.currentUser&&(a+='<div class="kim-hint-checkbox"> <input type="checkbox" value="1" id="AuthDontShowCheckbox"> <label for="AuthDontShowCheckbox"></label> </div> <span class="dont-show-label">Don\'t show me this again</span>'),r.flags.currentHints.new_auth=u.drawHint(i("body"),"Login Mode",a,{x:0,y:45,right:215},{width:300,height:""},null,"up","right",!1,function(){if(r.flags.currentUser){var t=i(".kim-hint #AuthDontShowCheckbox")[0],n=t&&t.checked;n&&r.flags.currentUser&&"dev"!=e.$k.config.serverEnv&&c.updateUser({new_auth:!0},r.flags.currentUser._id,"alerts")}})}if(!("chrome"!=t.clientEnv||"on"!=r.flags.currentStep&&"done"!=r.flags.currentStep||"new_navigation"!=n||"undefined"!=typeof r.flags.currentUser&&"undefined"!=typeof r.flags.currentUser.alerts&&"true"==r.flags.currentUser.alerts.new_navigation)){var a="<span>If you aren't already on the login page, click here to enable <strong>navigation mode</strong> and navigate there.</span>";r.flags.currentHints.new_navigation=u.drawHint(i("body"),"Navigation Mode",a,{x:0,y:45,right:186},{width:300,height:""},null,"up","right",!1),"dev"!=e.$k.config.serverEnv&&r.flags.currentUser&&c.updateUser({new_navigation:!0},r.flags.currentUser._id,"alerts")}};var m=["Username Field","Password Field","Submit"];r.preventAction=function(e){r.flags.navigate||(e.stopPropagation(),e.preventDefault())},r.reset=function(){l.removeAllHighlights(r.datatypes),r.datatypes=[],s.resetPropertyCounter(),r.collections=[],r.collectionNames=[],r.datatypeIndex=0,r.flags.actionHistoryLength=0,r.flags.hasPagination=!1,r.flags.moveBack={},r.updateModel(!1)},i("body").on("keyup",function(e){9==e.keyCode}),r.link=function(n){"chrome"!=t.clientEnv?e.location.href=n:c.followLink(n)},r.kimonify=function(n){"chrome"==r.config.clientEnv?c.changeState("kimonifying").then(function(){e.location.href=n.match(/http:\/\//,"")?n:"http://"+n}):e.location.href=t.KM_HOST+"/load?url="+encodeURIComponent(n)},r.save=function(){var e=s.cloneDatatypes(r.datatypes);r.actionHistory.push({collections:i.extend(!0,[],r.collections),collectionNames:i.extend(!0,[],r.collectionNames),datatypes:e,datatypeIndex:r.datatypeIndex,pagination:r.flags.hasPagination,override:r.userOverrideCollections}),r.flags.actionHistoryLength++,r.actionHistory.length>20&&(r.actionHistory.splice(0,1),r.flags.actionHistoryLength--)},r.keyup=function(e,t,n){13==e.keyCode&&n&&t()},r.isHttps=function(){return"https:"==e.location.protocol},r.undo=function(e){if(0==r.actionHistory.length)return r.toast("error","No undo steps in memory!",2e3),void 0;u.animate(i(".kim-toolbar-button.kim-undo"),"pulse2",300),r.flags.actionHistoryLength--,l.removeAllHighlights(r.datatypes);var t=r.actionHistory.pop();r.collections=t.collections,r.collectionNames=t.collectionNames,r.datatypes=t.datatypes,r.datatypeIndex=t.datatypeIndex,r.flags.hasPagination=t.pagination,r.userOverrideCollections=t.override,r.updateModel(),l.updateHighlightsForAllDatatypes(r.datatypes,!1,r.flags.mode),l.showHighlights(r.datatypes,r.datatypeIndex),e||r.toast("success","Undo Successful",2e3)},r.updateModel=function(e){var t=o.update(r.datatypes,r.flags.userOverrideCollections,r.collectionNames);r.collections=t[0],r.collectionNames=t[1],r.flags.hasPagination=t[2],i.each(r.datatypes,function(e,t){t.getNumberOfElements()}),r.collectionTitle=r.collections.length>1?"Collections":"Collection",e&&r.$digest()},r.showLargeOverlay=function(e,t){r.$broadcast("show_large_overlay",e,t)},r.showPopup=function(e){r.$broadcast("show_popup",e)},r.changeView=function(e){r.flags.currentView=e,"extractor"!=e?setTimeout(function(){i("html, body").css({overflow:"hidden",height:"100%"})},500):i("html, body").css({overflow:"",height:""})};var v;r.toast=function(e,t,n){f.cancel(v),r.flags.toasting=!0,r.flags.toastMessage=t,r.flags.toastType=e,n&&(v=f(function(){r.unToast()},n))},r.unToast=function(){r.flags.toasting=!1},r.loadApi=function(e,t){var n=f(function(){r.toast("warning","Loading API for editing....")},500);c.apiForEditing(e).then(function(e){return r.reset(),r.flags.editing&&e.authEnabled&&"on"==r.flags.currentStep?(f.cancel(n),r.toast("warning","Login again.",3e3),t()):(r.flags.currentApi=e,r.flags.userOverrideCollections="true"==e.userOverrideCollections||e.userOverrideCollections===!0,r.flags.crawlingEnabled=e.crawlingenabled,r.flags.hasPagination=e.crawlingenabled&&e.instructions&&"paginate"==e.instructions.type,r.collectionNames=e.collectionNames,r.apiTags=e.tags,i.each(e.collections,function(e,t){i.each(t,function(e,t){var n=s.getObjectForImport(t);n.getNumberOfElements(),"pagination"==n.context.index?r.datatypes.pagination=n:r.datatypes.push(n)})}),s.resetPropertyCounter(r.datatypes.length),r.updateModel(!1),l.updateHighlightsForAllDatatypes(r.datatypes,!0,r.flags.mode),l.showHighlights(r.datatypes,r.datatypeIndex),f.cancel(n),r.unToast(),d(function(){r.updateModel(!1),l.updateHighlightsForAllDatatypes(r.datatypes,!0,r.flags.mode),l.showHighlights(r.datatypes,r.datatypeIndex)},500,6),t(),void 0)},function(){t(!0,{err:"Unable to load api."})})};var y=!1;r.openNotifications=function(){r.flags.showNotificationPanel=!r.flags.showNotificationPanel,r.flags.showNotificationPanel&&!y&&(y=!0,c.updateUser(r.new_features,r.flags.currentUser._id,"new_features"),r.new_features={})},r.setTags=function(){var e={},t=i("body").clone();t.find("form, script, #Kimonify, .kim-hint, .kim-datatypes").remove(),t=t.text().toLowerCase().replace(/\W\s/g,""),t.split(" ").forEach(function(t){var n=0,i="";t=t.replace(/[ \t\r]+/g,"").trim(),t&&(r.tagWords[t]?(n=1,i=r.tagWords[t]):r.tags.indexOf(t)>-1&&(n=5,i=t),n&&(e[i]=e[i]?e[i]+n:n))});var n=Object.keys(e).sort(function(t,n){return e[n]-e[t]});r.apiTags=n.filter(function(t){return e[t]>5}).slice(0,3)};var b=f(function(){r.flags.loading=!0},1e3);h.seriesFlow([function(e){u.looseStringContains(u.getTargetUrl(),t.normalizeWhitelist)||setTimeout(function(){p.normalizeAllTables()},700),u.linkDisable(),r.datatypes.push(s.new(null,0,0)),l.init(r),r.datatypeIndex=0,r.updateModel(!1),i("div").each(function(e,t){var n=i(t).css("position");if("fixed"==n){var r=parseInt(i(t).css("top"));i(t).css("top",r+45)}}),e()},function(e){"chrome"==t.clientEnv?c.getState().then(function(t){r.flags.currentStep=t,e()},function(){e(!0,{err:"Unable to connect with chrome extension"})}):e()},function(e){c.getCurrentUser().then(function(t){r.flags.currentUser=t,e()},function(){e()})},function(e){if("chrome"==t.clientEnv)c.getEditingApi().then(function(t){e(!1,{activeApi:t})},function(){e(!0,{err:"Unable to connect with chrome extension"})});else{var n=u.getUrlParam("editapi"),r=u.getUrlParam("selectedapi");e(!1,{activeApi:n,selectedApi:r})}},function(e,t){var n=t.activeApi,i=t.selectedApi;n&&"null"!=n?(r.flags.editing=!0,r.loadApi(n,e)):i&&"null"!=i?r.loadApi(i,e):e()},function(e){"on"==r.flags.currentStep&&(r.reset(),r.flags.mode="loginMode",r.flags.userOverrideCollections=!0,r.datatypes.push(s.new(m[0],0,0)),r.datatypes.push(s.new(m[1],0,1)),r.datatypes.push(s.new(m[2],0,2)),r.datatypes[0].hide=!0,r.datatypes[1].hide=!0,r.datatypes[2].hide=!0,r.collectionNames[0]="Login Info",r.updateModel(!1)),r.showHelp("new_auth"),r.showHelp("auth",0),r.showHelp("new_navigation"),e()},function(e){_.each(g.blacklist,function(e){u.getTargetUrl().match(e)&&scope.showLargeOverlay("illegal",!0)}),e()},function(e){r.flags.editing||r.setTags(),e()},function(e){r.new_features={},r.allFeatures=[],c.getNotifications().then(function(t){if(r.allFeatures=t,r.flags.currentUser&&r.flags.currentUser.new_features)for(a in r.allFeatures){var n=r.allFeatures[a]._id;"true"!=r.flags.currentUser.new_features[n]&&r.flags.currentUser.new_features[n]!==!0&&(r.new_features[n]=!0)}else if(r.flags.currentUser)for(a in r.allFeatures)r.new_features[r.allFeatures[a]._id]=!0;e()},function(){e()})}],function(e,n){e&&console.log("error",n),f.cancel(b),r.flags.loading=!1,r.flags.editing||u.getTargetUrl().match(t.KM_HOST)||u.getTargetUrl().match(t.KM_HOST_WWW)||c.getSiteApis(r.targetUrl).then(function(e){e&&e.length&&"-1"==r.flags.currentStep&&(r.$broadcast("api_panel_launch",e),r.flags.showApiPanel=!0)},function(){console.log("Could not load existing APIs")})})}]),s.module("Kimono").controller("popupController",["$scope",function(e){e.show=!1,e.currentPopup="",e.close=function(){e.show=!1,e.currentPopup=""},e.$on("show_popup",function(t,n){n.length?(e.show=!0,e.currentPopup=n):e.close()})}]),s.module("Kimono").controller("rawOverlayController",["$scope","Collections","Utils","WebServices","Common",function(n,r,i,o,a){n.mode="json",n.enter=function(){n.selectedCollection=n.collectionNames[0],r.updateDatalists(n.collections),n.updateData()},n.updateData=function(){var e=a.getJSON(n.collections,n.collectionNames);n.json=e,n.rss=a.getRSS(e,"API Name",i.getTargetUrl(),n.collectionNames[0]),n.csv=a.getCSV(e,n.collections),n.table=a.getTable(e,n.collections)},n.clickTableCollection=function(e){n.selectedCollection=e},n.selectText=function(){var r=e.getSelection(),i=t.createRange();i.selectNodeContents(t.getElementsByClassName("kim-code "+n.mode)[0]),r.removeAllRanges(),r.addRange(i)},n.selectCurrentTable=function(){var n=e.getSelection(),r=t.createRange();r.selectNodeContents(t.querySelectorAll(".kim-container .kim-spreadsheet table")[0]),n.removeAllRanges(),n.addRange(r)},n.download=function(){var t;t="json"==n.mode?JSON.stringify(n[n.mode],null,2):n[n.mode],o.getDownloadFile("rss"==n.mode?"xml":n.mode,t).then(function(t){e.location.href=t})},n.openRssInfo=function(){n.flags.currentPopup="rssInfo"},n.updateData()}]),s.module("Kimono").controller("signupOverlayController",["$scope","Validation","Regex","WebServices","$timeout",function(e,t,n,r,i){e.signupStep=1,e.form={name:"",username:"",password:""},e.signupError=!1,e.loading=!1,e.errors={name:!1,username:!1,password:!1},e.enter=function(){e.signupStep=1,e.signupError=!1,e.errors={name:!1,username:!1,password:!1}},e.resetErrors=function(){e.signupError=!1,i(function(){e.errors={name:!1,username:!1,password:!1}},300)},e.signup=function(){e.loading=!0;var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/gim;return""==e.form.name.trim()&&(e.errors.name="Name is required",e.signupError=!0),""==e.form.username.trim()?(e.errors.email="Email is required",e.signupError=!0):e.form.username.match(t)||(e.errors.email="Please enter a valid email",e.signupError=!0),""==e.form.password.trim()?(e.errors.password="A password is required",e.signupError=!0):e.form.password.match(/......+/)||(e.errors.password="Password must be at least 6 characters",e.signupError=!0),e.signupError?(e.loading=!1,void 0):(r.signup(e.form.name,e.form.username,e.form.password).then(function(t){e.loading=!1,e.signupStep=2,e.flags.currentUser=t,i(function(){e.showLargeOverlay("loginMode"==e.flags.mode?"auth":"done")},2e3)},function(){e.loading=!1,e.signupError=!0},function(t){1==t&&(e.loading=!0)}),void 0)}}]),s.module("Kimono").controller("toolbarController",["Config","$scope","Datatypes","HighlightManager","Utils","WebServices","$timeout","Common",function(t,r,o,a,s,l,c,u){var f=["Username Field","Password Field","Submit"];r.$watch(function(){return r.datatypeIndex},function(e,t){s.animate(i('.kim-data-dot[kimonodatatype="'+e+'"]'),"pulse2",300),r.datatypes[t]&&r.datatypes[e]&&"loginMode"!=r.flags.mode&&(a.hideHighlights(r.datatypes,t),a.showHighlights(r.datatypes,e))}),r.enableLoginMode=function(){"chrome"==t.clientEnv&&(_.each(u.nosupportlist,function(e){s.getTargetUrl().match(e)&&r.showLargeOverlay("nosupport",!0)}),l.enableAuth())},r.loginMode=function(){"loginMode"!=r.flags.mode?(r.reset(),r.flags.navigate=!1,s.linkDisable(),l.changeState("loggingIn"),r.flags.currentStep="loggingIn",r.flags.mode="loginMode",r.flags.userOverrideCollections=!0,r.datatypes.push(o.new(f[0],0,0)),r.datatypes.push(o.new(f[1],0,1)),r.datatypes.push(o.new(f[2],0,2)),r.collectionNames[0]="Login Info",r.changeView("extractor"),r.updateModel(!1)):r.extractMode()},r.navigateMode=function(){r.flags.navigate?e.location.reload():(r.flags.mode="navigation",s.linkEnable(),r.flags.navigate=!0,a.removeAllHighlights(r.datatypes))},r.extractMode=function(){"normal"!=r.flags.mode&&(r.reset(),r.collectionNames[0]="collection1",r.datatypes.push(o.new("property1",0,0)),r.flags.userOverrideCollections=!1,r.flags.mode="normal",l.changeState("-1"),r.flags.currentStep="-1",r.changeView("extractor"),r.updateModel(!1),s.linkEnable(),r.flags.navigate=!1)},r.config=t,r.addDatatype=function(){a.hideHighlights(r.datatypes,r.datatypeIndex),s.animate(i(".kim-new-datatype"),"rotateAndMove",300,function(){r.save(),r.datatypes.push(o.new(null,r.collections.length,r.$parent.datatypes.length)),r.changeDatatype(r.datatypes.length-1),r.updateModel(!0)})},r.keydown=function(e){9==e.keyCode&&(r.changeDatatype((r.datatypeIndex+1)%r.datatypes.length),i(e.target).focus(),e.preventDefault(),e.stopPropagation())},r.doneButtonMessage=function(){return r.flags.editing&&"loginMode"!=r.flags.mode?"Save":"Done"},r.doneButtonTitle=function(){return r.flags.editing&&"loginMode"!=!r.flags.mode?"Save":"Create"},r.changeDatatype=function(e){r.$parent.datatypeIndex=e},r.pagination=function(){r.datatypes.pagination||(r.datatypes.pagination=o.new("Pagination Link","pagination","pagination")),r.$parent.datatypeIndex="pagination"},r.delete=function(e){r.dataDotUnhover(e),r.save(),a.removeAllHighlights(r.datatypes,r.datatypeIndex),r.$parent.datatypes.splice(e,1);for(var t=e;t<r.datatypes.length;t++)r.$parent.datatypes[t].context.index--;r.$parent.datatypeIndex=r.datatypes.length-1,a.updateHighlightsForAllDatatypes(r.datatypes,!0,r.flags.mode),a.showHighlights(r.datatypes,r.datatypeIndex),r.updateModel(!1)},r.deletePagination=function(){r.flags.hasPagination&&(r.save(),a.removeHighlightsForDatatypeIndex(r.datatypes,"pagination"),r.$parent.collections.splice(r.$parent.collections.length-1,1),r.$parent.collectionNames.splice(r.$parent.collectionNames.length-1,1),r.$parent.datatypes.pagination=n,r.flags.hasPagination=!1,r.flags.crawlingEnabled=!1,r.updateModel(),r.dataDotUnhover("pagination"),s.animate(i(".kim-pagination"),"pulse2",300))},r.done=function(){var e="";e="loginMode"==r.flags.mode?"auth":"done",r.currentUser?r.showLargeOverlay(e):l.getCurrentUser().then(function(t){r.currentUser=t,r.showLargeOverlay(e)},function(){r.showLargeOverlay("login")})};var d;r.dataDotHover=function(e){var t=i('.kim-data-dot[kimonodatatype="'+e+'"]').find(".kim-delete-datatype");clearTimeout(d),r.datatypes.length>1&&(d=setTimeout(function(){t.css("display","block"),setTimeout(function(){t.addClass("visible")},10)},400))},r.paginationHover=function(e){var t=i('.kim-data-dot[kimonodatatype="'+e+'"]').find(".kim-delete-datatype");clearTimeout(d),r.flags.hasPagination&&(d=setTimeout(function(){t.css("display","block"),setTimeout(function(){t.addClass("visible")},10)},400))},r.dataDotUnhover=function(e){clearTimeout(d);var t=i('.kim-data-dot[kimonodatatype="'+e+'"]').find(".kim-delete-datatype");t.css("display","none"),t.removeClass("visible")}}]),s.module("Kimono").controller("userCredentialsOverlayController",["$scope","Validation","WebServices","HighlightManager","Manipulation",function(e,t,n,r,i){e.loginStep=1,e.form={username:"",password:""},e.loginError=!1,e.loading=!1,e.enter=function(){e.loginStep=1,e.loginError=!1},e.login=function(){var t,o;3==e.datatypes.length&&(n.listenForLoad(e.form.username,e.form.password,e.datatypes[0].selectorObjects[0].selector,e.datatypes[1].selectorObjects[0].selector,e.datatypes[2].selectorObjects[0].selector),e.showLargeOverlay(""),r.removeAllHighlights(e.datatypes),e.flags.clickThroughOverride=!0,t={usernameInput:e.datatypes[0].selectorObjects[0].selections[0].element[0],passwordInput:e.datatypes[1].selectorObjects[0].selections[0].element[0],submitButton:e.datatypes[2].selectorObjects[0].selections[0].element[0]},o={username:e.form.username,password:e.form.password},callback=function(){e.flags.clickThroughOverride=!1},i.fillLoginForm(t,o,callback))}}]),s.module("Kimono").directive("animatedHighlight",["Utils",function(){return{restrict:"EA",scope:!0,link:function(e,t,n){var r=function(e){var n=e.clone();return t.html(""),n.attr("kimonodatatype",""),n.attr("kimonotier",""),n[0].style.opacity=1,n[0].style.display="inline-block",n[0].style.top="auto",n[0].style.left="auto",n[0].style.position="inherit",n[0].style.paddingLeft="6px",n[0].style.paddingRight="6px",n.css("transform",""),n.css("transition-duration",""),t.append(n),n},o=function(e,t,n){t[0].style.opacity=0,e[0].style.display="block",e[0].style.zIndex=2147483400,setTimeout(function(){var r=t.offset(),i=r.top-n.top,o=r.left-n.left;return 0==o&&0==i?(e.css("opacity",1),callback(),void 0):(setTimeout(function(){e.css("transition-duration","0.4s"),e.css("transform","translate3d("+o+"px,"+i+"px, 0px)"),e[0].style.opacity=1,n.action=setTimeout(function(){e.css("transition-duration",""),t[0].style.opacity=1,e[0].style.display="none",e[0].style.zIndex=21474899},400)},0),void 0)},0)},a=function(e,t,n){setTimeout(function(){var r=t.offset(),i=r.top-n.top,o=r.left-n.left;e.css("transform","translate3d("+o+"px,"+i+"px, 0px)")},0)},s=function(t,r,i){var o=0;(e.datatypeIndex==n.datatypeIndex||e.datatypes[n.datatypeIndex].hide)&&(o=1),r[0].style.opacity=0,t[0].style.display="block",t[0].style.zIndex=21474899,setTimeout(function(){t.css("transition-duration","0.4s"),t.css("transform","translate3d(0px,0px, 0px)"),t[0].style.opacity=o,i.action=setTimeout(function(){t.css("transition-duration",""),t[0].style.opacity=1,o||(t[0].style.display="none"),t[0].style.zIndex=21474899},400)},0)};e.$watch(function(){return e.flags.currentView},function(t,l){if((t!=l||"data"==t)&&"raw"!=t){var c=i('.kim-highlight[kimonodatatype="'+n.datatypeIndex+'"][kimonotier="0"]').first();if(c&&0!==c.length&&c.offset()){var u=e.datatypes[n.datatypeIndex].highlightMap[c.attr("kimonoid")];u.action&&clearTimeout(u.action);var f=r(c);e.flags.moveBack[n.datatypeIndex]&&!u.dontEdit&&"extractor"!=t&&"simple"==e.mode?(a(c,f,u),u.dontEdit=!0):u.dontEdit||"data"!=t||"simple"!=e.mode?"extractor"==t&&u.dontEdit&&(s(c,f,u),u.dontEdit=!1,e.flags.moveBack[n.datatypeIndex]=!1):(e.flags.moveBack[n.datatypeIndex]=!0,o(c,f,u),u.dontEdit=!0)}}}),e.$watch(function(){return e.mode},function(t,a){if(t!=a&&"data"==e.flags.currentView&&"simple"==t){var s=i('.kim-highlight[kimonodatatype="'+n.datatypeIndex+'"][kimonotier="0"]').first();if(s&&0!==s.length&&s.offset()){var l=e.datatypes[n.datatypeIndex].highlightMap[s.attr("kimonoid")];l.action&&clearTimeout(l.action);var c=r(s);e.flags.moveBack[n.datatypeIndex]=!0,o(s,c,l),l.dontEdit||(l.dontEdit=!0)}}})}}}]),s.module("Kimono").directive("kmDraggable",["Collections","Utils",function(){return{scope:{axis:"=",start:"=",end:"=",drag:"="},restrict:"EA",link:function(e,t){var n=new h(t[0],{axis:e.axis});n.on("dragStart",e.start||function(){}),n.on("dragEnd",e.end||function(){}),n.on("dragMove",e.drag||function(){})}}}]),s.module("Kimono").directive("kmClickOutside",["Utils",function(){return{restrict:"A",link:function(e,n,r){n.bind("click",function(e){e.stopPropagation(),e.preventDefault()}),i(t).on("click",function(){e.$apply(r.kmClickOutside)})}}}]),s.module("Kimono").directive("kmFade",["Utils",function(){return{replace:!0,restrict:"A",link:function(e,t,n){t.css("display","none");var r=parseFloat(n.opacity)||1,i=n.delay||"0",o=n.duration||n.enterDuration||"100",a=n.duration||n.leaveDuration||"100",s=n.translateVector||"(0, 0, 0)",l=(t.width(),s||n.transition?"all":"opacity");e.$watch(n.kmFade,function(c){return c&&n.kmEnter&&e[n.kmEnter](),!c&&n.kmLeave&&e[n.kmLeave](),c&&n.kmIn?(setTimeout(function(){t.css("opacity","0"),t.css("display",n.display||"block"),setTimeout(function(){t.css("transition-duration",o+"ms"),t.css("transition-property",l),t.css("opacity",r),s&&(t.css("transition-timing-function","ease-out"),t.css("-webkit-transform","translate3d"+s),t.css("transform","translate3d"+s)),"slide-left"==n.transition&&t.css("margin-left","0"),setTimeout(function(){t.css("opacity",""),t.css("margin",""),t.css("transition-duration",""),t.css("transition-timing-function",""),t.css("transition-property","")},parseInt(o))},25)},parseInt(i)),void 0):!c&&n.kmOut?(t.css("transition-duration",a+"ms"),t.css("transition-property",l),t.css("opacity","0"),s&&(t.css("-webkit-transform","translate3d(0,0,0)"),t.css("transform","translate3d(0,0,0)")),"slide-left"==n.transition&&t.css("margin-left","-30px"),setTimeout(function(){t.css("display","none"),t.css("opacity",""),t.css("transition-duration",""),s&&(t.css("-webkit-transform",""),t.css("transform","")),t.css("transition-property","")},parseInt(a)),void 0):(t.css("display",c?"":"none"),void 0)})}}}]),s.module("Kimono").directive("kmPages",[function(){return{compile:function(e,t){var n=t.duration||"300ms",r=t.width||0,i=function(e){e.css({"-webkit-transform":"translate3d(-"+r+"px, 0, 0)",transform:"translate3d(0, 0, 0)",transition:"all "+n,"-webkit-transition":"all "+n}),setTimeout(function(){e.css({"-webkit-transform":"",transform:"",transition:"","-webkit-transition":""})},parseInt(n))},o=function(e,t){e.css({"-webkit-transform":"translate3d(-"+r+"px, 0, 0)",transform:"translate3d(-"+r+"px, 0, 0)"}),t&&(e.css({transition:"all "+n,"-webkit-transition":"all "+n}),setTimeout(function(){e.css({transition:""})},parseInt(n)))},a={};return _.each(t.pages.split(/\s*,\s*/),function(t,n){a[t]={element:e.find(t),index:n},a[t].element.css({position:"absolute",left:r,"-webkit-transform":"translate3d("+(n>0?0:-1*r)+"px, 0, 0)",transform:"translate3d("+(n>0?0:-1*r)+"px, 0, 0)"})}),function(e){e[t.currentPage]=_.keys(a)[0],e.$watch(t.currentPage,function(e,t){e!=t&&"undefined"!=typeof a[e]&&(a[e].index>a[t].index?(o(a[e].element,!0),setTimeout(function(){i(a[t].element)},parseInt(n))):(o(a[e].element),i(a[t].element)))})}}}}]),s.module("Kimono").directive("kmPanel",["Utils",function(){return{compile:function(e,t){var n=t.width||300,r=t.height||500,i=t.offset||0,o=t.duration||"0.3s",a=t.translate||"(0, "+(-1*r+parseInt(i))+"px, 0)",s=t.showToggle,l={};t.pages&&_.each(t.pages.split(/\s*,\s*/),function(r,i){l[r]={elem:e.find(r),index:i}; | |
var o=t.intialPageCss||{};o.width=n,o.position="absolute",l[r].elem.css(o)});var c=function(e){return e?e+"px":void 0};return e.css({transition:"all "+o,"-webkit-transition":"all "+o,width:n||"300",height:r||"500",position:t.position||"fixed",left:c(t.left)||"",right:c(t.right)||"20px",top:c(t.top)||"",bottom:c(t.bottom)||c(-1*r+parseInt(i)),transform:"translate3d(0, 0, 0)","-webkit-transform":"translate3d(0, 0, 0)"}),{post:function(e,t){e.$watch(s,function(e){e?t.css({transform:"translate3d"+a,"-webkit-transform":"translate3d"+a}):t.css({transform:"translate3d(0, 0, 0)","-webkit-transform":"translate3d(0, 0, 0)"})})}}}}}]),s.module("Kimono").directive("kmSelector",["Collections","Utils","$compile","$timeout",function(e,t,n,r){return{restrict:"A",replace:!0,link:function(e,o,a){var s="filter:kmCurrentInput:startsWith | filter:notSelectedTag | orderBy:'toString()'",l=o.find("input").clone(),c=i("<div></div>");e.currentInput="",e.kmSelectedItems=[],e.itemIdx=0,e.isVisible=!1,e.startsWith=t.startsWith,a.kmModel&&(e.$watch(a.kmModel,function(){e.kmSelectedItems=e[a.kmModel]}),e.$watch(e.kmSelectedItems,function(){e.kmSelectedItems.length&&(e[a.kmModel]=e.kmSelectedItems)})),e.notSelectedTag=function(t){return-1==e.kmSelectedItems.indexOf(t)},e.toggleVisible=function(t){t?(o.find("input").addClass("open"),r(function(){e.isVisible=t},300)):(r(function(){o.find("input").removeClass("open")},300),e.isVisible=t)},e.getStyles=function(t){var n=["#f2ea00","#ebce13","#f0aa14","#f08630","#f07a60","#ee78f0","#bd90f0","#9092f0","#7fbadc","#90f0e3","#91d271","#c5f060","#ccaa73","#a28057","#c0c1c7","#939499"];return t==e.itemIdx?{color:"black",background:n[e.kmSelectedItems.length%n.length]}:{}},e.getListLength=function(){return i(".km-selector-scroller").find("li").length-1},e.getItemContent=function(e){return e.find("span").html()},e.handleMouseOver=function(t){e.itemIdx=t},e.handleKeyDown=function(t){var n=[9,13,38,40];n.indexOf(t.keyCode)>=0?13==t.keyCode||9==t.keyCode?(selected=o.find(".selectedItem"),selected.length&&(e.addItem(selected),e.itemIdx=0,e.kmCurrentInput="")):38==t.keyCode&&e.itemIdx>0?(e.itemIdx-=1,e.adjustScrollPos()):40==t.keyCode&&e.itemIdx<e.getListLength()&&(e.itemIdx+=1,e.adjustScrollPos()):e.itemIdx=0},e.adjustScrollPos=function(){var t=o.find(".km-selector-scroller"),n=t.scrollTop(),r=t.outerHeight(),i=t.find("li").first(),a=i.outerHeight(),s=parseInt(i.parent().css("marginTop")),l=e.itemIdx*a+s;l>=r+n?t[0].scrollTop+=a:n>=l&&(t[0].scrollTop-=a);var c=o[0].style.display;o[0].style.display="none";o[0].offsetHeight;o[0].style.display=c},e.handleItemClick=function(t){e.addItem(i(t.currentTarget))},e.focusInput=function(){o.find("input").first().focus()},e.blurInput=function(){o.find("input").first().blur()},e.addItem=function(t){-1==e.kmSelectedItems.indexOf(e.getItemContent(t))&&e.kmSelectedItems.push(e.getItemContent(t)),e.blurInput(),e.toggleVisible(!1)},e.removeItem=function(t){var n=e.kmSelectedItems.indexOf(t);n>-1&&e.kmSelectedItems.splice(n,1)},o.find("input").remove();var c=i("<div></div>");c.css({position:"relative",outline:"none",clear:"both"});var u=i('<ul class="km-selector-scrollitems" style="display: block; overflow:hidden"></ul>'),f=i('<div class="km-selector-scroller" ng-class="{ open:isVisible }"></div>');f.css({position:"absolute",left:0,top:"22px",width:"100%","overflow-y":"scroll",margin:0,outline:"none"});var d=i('<li><span style="padding: 8px 10px;">{{ item }}</span></li>');d.attr({"ng-repeat":"item in "+a.kmItems+" | "+s,"ng-style":"getStyles($index)","ng-class":"{ selectedItem:$index == itemIdx }","ng-click":"handleItemClick($event)","ng-mouseover":"handleMouseOver($index)"}),u.append(d),f.append(u);var p=i("<div></div>");p.css({display:"inline-block",position:"absolute",margin:0,width:"150px"}),p.attr({"km-click-outside":"toggleVisible(false)","ng-hide":a.kmHide});var h=i('<div class="km-selector-selected-container"></div>'),g=i('<div><a href="" ng-click="removeItem(item)" class="km-selector-remove-item" ></a>{{ item }}</div>');g.attr({"class":"km-selector-selected kim-{{ getColor($index) }}","ng-repeat":"item in kmSelectedItems"}),h.append(g),l.attr({"ng-model":"kmCurrentInput","ng-class":"{ 'no-items':kmSelectedItems.length == 0}","ng-click":"toggleVisible(true)","ng-keydown":"handleKeyDown($event)"}),l.css({display:"inline-block","min-width":0}),p.append(l),p.append(f),h.append(p),c.append(h),n(c)(e),c.appendTo(o)}}}]),s.module("Kimono").directive("kmShow",[function(){return{replace:!0,restrict:"A",link:function(e,t,n){e.$watch(n.kmShow,function(r){r&&n.kmBeforeEnter&&e[n.kmBeforeEnter](t),!r&&n.kmBeforeLeave&&e[n.kmBeforeLeave](t),t.css("display",r?"":"none"),r&&n.kmAfterEnter&&e[n.kmAfterEnter](t),!r&&n.kmAfterLeave&&e[n.kmAfterLeave](t)})}}}]),s.module("Kimono").directive("kmLoading",["$compile",function(){return{compile:function(e,t){var n=Math.min(t.width,500)/20,r=2*n/3,i=n/3,o=t.top||"30%",a=t.fontSize||"18",s=t.message||"Loading Awesomeness",l='<div km-fade="'+t.model+'" km-in="true" km-out="true" enter-duration="0" leave-duration="300" class="kim-loading"> <div style="top:'+o+';" class="dot-container"> <div style="font-size:'+a+'px;" class="kim-message">'+s+'</div> <div class="dot dot1 kim-yellow"></div> <div class="dot dot2 kim-amber"></div> <div class="dot dot3 kim-orange"></div> <div class="dot dot4 kim-sunset"></div> <div class="dot dot5 kim-red"></div> <div class="dot dot6 kim-fuchsia"></div> <div class="dot dot7 kim-purple"></div> <div class="dot dot8 kim-indigo"></div> <div class="dot dot9 kim-blue"></div> <div class="dot dot10 kim-green"></div> </div> </div>';return e.append(l),e.find(".dot").css({width:r+"px",height:r+"px",margin:"0 "+i+"px 0 0"}),function(){}}}}]),s.module("Kimono").value("kimonoList",{}),s.module("Kimono").directive("kmRepeat",["$parse","$animate","$rootScope","kimonoList",function(t,r,i,o){function a(e){var t,r=typeof e;return"object"==r&&null!==e?"function"==typeof(t=e.$$hashKey)?t=e.$$hashKey():t===n&&(t=e.$$hashKey=c()):t=e,r+":"+t}function l(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function c(){for(var e,t=p.length;t;){if(t--,e=p[t].charCodeAt(0),57==e)return p[t]="A",p.join("");if(90!=e)return p[t]=String.fromCharCode(e+1),p.join("");p[t]="0"}return p.unshift("0"),p.join("")}function u(e){if(null==e||l(e))return!1;var t=e.length;return 1===e.nodeType&&t?!0:s.isArray(e)||!s.isFunction(e)&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}var f="$$NG_REMOVED",d="err",p=["0","0","0"],h=e.list_id=function(){var e=0;return function(){return"list_"+ ++e}}();return{transclude:"element",priority:1e3,terminal:!0,compile:function(e,n,l){return function(e,c,p){var g,m,v,y,b,x,$,k,w,C=p.kmRepeat,S=C.match(/^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/),E={$id:a};if(!S)throw d("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",C);if(x=S[1],$=S[2],g=S[4],g?(m=t(g),v=function(t,n,r){return w&&(E[w]=t),E[k]=n,E.$index=r,m(e,E)}):(y=function(e,t){return a(t)},b=function(e){return e}),S=x.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/),!S)throw d("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",x);k=S[3]||S[1],w=S[2];var A={},T=p.kmList||h(),O=function(t){var o,a,p,h,g,m,x,$,S,E,T=c[0],O={},N=[];if(u(t))S=t,v=v||y;else{v=v||b,S=[];for(m in t)t.hasOwnProperty(m)&&"$"!=m.charAt(0)&&S.push(m);S.sort()}for(h=S.length,a=N.length=S.length,o=0;a>o;o++)if(m=t===S?o:S[o],x=t[m],$=v(m,x,o),A.hasOwnProperty($))E=A[$],delete A[$],O[$]=E,N[o]=E;else{if(O.hasOwnProperty($))throw s.forEach(N,function(e){e&&e.startNode&&(A[e.id]=e)}),d("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}",C,$);N[o]={id:$},O[$]=!1}for(m in A)A.hasOwnProperty(m)&&(E=A[m],r.leave(E.elements),e[n.kmLeave]&&e[n.kmLeave](E.elements),s.forEach(E.elements,function(e){e[f]=!0}),E.scope.$destroy());for(o=0,a=S.length;a>o;o++){if(m=t===S?o:S[o],x=t[m],E=N[o],E.startNode){g=E.scope,p=T;do p=p.nextSibling;while(p&&p[f]);E.startNode==p||(r.move(E.elements,null,s.element(T)),e[n.kmMove]&&e[n.kmMove](E.elements,null,s.element(T))),T=E.endNode}else g=e.$new();g[k]=x,w&&(g[w]=m),g.$index=o,g.$first=0===o,g.$last=o===h-1,g.$middle=!(g.$first||g.$last),g.$odd=!(g.$even=o%2==0),E.startNode||(l(g,function(t){r.enter(t,null,s.element(T)),e[n.kmEnter]&&e[n.kmEnter](t),T=t,E.scope=g,E.startNode=t[0],E.elements=t,E.endNode=t[t.length-1],O[E.id]=E}),"$digest"!==i.$$phase&&"$digest"!==g.$$phase&&g.$digest())}A=O};o[T]=O,"medium"==n.type&&e.$watchCollection($,O),e.$watch($,O)}}}}]),s.module("Kimono").directive("kmSticky",["$timeout",function(e){return{link:function(t,n,r){e(function(){var e=r.scrollableArea||"#Kimonify",t=i(e),o=n.parent(),a=parseInt(r.offset)||0;n.css({position:"absolute",top:"0px",width:"100%"}),o.css({position:"relative",paddingTop:n.height()+4+"px"}),t.on("scroll",function(){var e={top:o.position().top-a};e.bottom=e.top+o.height(),n.css("-webkit-transform","translate3d(0, "+Math.min(Math.max(-1*e.top,0),o.height())+"px, 0)"),n.css("transform","translate3d(0, "+Math.min(Math.max(-1*e.top,0),o.height())+"px, 0)")})},0)}}}]),s.module("Kimono").filter("groupby",["$filter",function(e){return function(){var t=Array.prototype.slice.call(arguments,0),n=t.shift(),r=t.shift();return _.keys(_.groupBy(n,function(n){return _.reduce(t,function(t,n){var r=n.slice(1);return r.unshift(t),e(n[0]).apply(this,r)},n[r])}))}}]),s.module("Kimono").filter("keys",function(){return function(e){return _.keys(e)}}),s.module("Kimono").filter("limit",function(){return function(e,t){return"undefined"==typeof e?"":e.length>t?e.substring(0,t)+"...":e}}),s.module("Kimono").filter("plural",["$filter",function(){return function(e,t){return t>1&&"s"==_.last(e)?e+"'":t>1?e+"s":e}}]),s.module("Kimono").filter("replace",function(){return function(e,t,n){if("string"==typeof regexString)var r=new RegExp(regexString,"g");else var r=t;return e.replace(r,n)}}),s.module("Kimono").filter("reverse",function(){return function(e){return e.slice().reverse()}}),s.module("Kimono").filter("size",function(){return function(e){return _.size(e)}}),i(".kim-script, .kim-link").appendTo("head");var c=i('<div id="Kimonify" dir="ltr" class="xs-hidden" ng-controller="mainController" km-loading font-size="28" model="flags.loading"></div>');c.append('<div ng-controller="largeOverlayController" id="kim-Large-Overlay" class="kim" km-fade="show" km-in="true" km-out="true" opacity="0.95"> <h1><a href="" ng-click="link(\'http://kimonolabs.com/\')">kimono<span>labs</span></a></h1> <button ng-if="backButton" ng-click="close()" class="kim-close-button kim kim-button" style="display: inline-block;" ng-hide="flags.hideBackButton">Back</button> <!-- Done Overlay --> <div ng-controller="doneOverlayController" id="kim-DoneOverlay" km-enter="enter" km-in="true" km-fade="currentOverlay == \'done\'" class="kim-button-container" opacity="0.95"> <div km-fade="doneStep == 1" km-in="true" km-out="true" duration="500" class="kim-step-1"> <p class="kim-done-form-title" style="display: block;">Enter your API details</p> <div id="kim-DoneForm" name="createApiForm" novalidate style="display: block; top: 153px;"> <input type="text" ng-model="apiName" id="kim-APIName" name="apiName" ng-keyup="keyUpInApiNameField($event)" placeholder="API name" ng-keydown="error = false;"> <div class="kim-TagsSelector" km-selector km-items="tags" km-model="apiTags" km-hide="apiTags.length >= 5" > <span ng-hide="apiTags.length || isVisible" class="kim-tags-reminder">Add tags</span> <input type="text" id="kim-APITags" name="apiTag"></input> </div> <div class="kim-api-config"> <select id="kim-Frequency" name="crawlFrequency" ng-model="selectedFrequency" ng-options="i.id as utils.displayFrequency(i.id, flags.hasPagination) for i in frequencies | filter:filterFrequencies"></select> <select ng-show="flags.hasPagination" ng-model="selectedCrawlLimit" ng-options="i.id as utils.displayCrawlLimit(i.id) for i in crawlLimits" id="kim-CrawlLimit" name="limit"></select> </div> <div> <input type="submit" ng-click="createApi()" ng-disabled="loading" class="kim-create-api-button kim kim-button" value="{{createApiButtonLabel()}}"> <span class="kim-spinner" ng-show="loading"></span> </div> <div class="kim-error-container" km-fade="error" km-in="true" km-out="true"> <p class="kim-api-form-error">{{errorMessage}}</p> </div> </div> </div> <div km-fade="doneStep == 2" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> <p class="kim" id="kim-APIResponseMessage">API <span class="kim-created-updated">{{createdOrUpdated()}}</span>, Bam! Check it out at <a class="kim-api-link" href="" ng-click="link(config.KM_HOST_WWW + \'/apis/\' + apiID)">/apis/{{apiID}}</a>.</p> </div> <div km-fade="doneStep == -1" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> <p class="kim" id="kim-APIResponseMessage">Sorry. Something went wrong and we couldn\'t create an API from this page. A bug report has been created.</p> </div> </div> <!-- Illegal Overlay --> <div ng-controller="illegalOverlayController" id="kim-IllegalOverlay" km-enter="enter" km-in="true" km-fade="currentOverlay == \'illegal\'" class="kim-button-container" opacity="0.95"> <div class="kim-step-2"> <p class="kim" id="kim-APIResponseMessage">Sorry. Due to the policy of this target domain we cannot extract data from this site.</p> </div> </div> <!-- No Support Overlay --> <div id="kim-NoSupportOverlay" km-in="true" km-out="true" km-fade="currentOverlay == \'nosupport\'" class="kim-button-container" opacity="0.95"> <div class="kim-step-2"> <p class="kim" id="kim-APIResponseMessage">Sorry. Our auth feature is incompatible with this site, check back often on our <a href="" ng-click="followLink(\'http://blog.kimonolabs.com/\')" >blog</a> for updates.</p> </div> </div> <!-- Login Overlay Overlay --> <div ng-controller="loginOverlayController" id="kim-LoginOverlay" km-enter="enter" leave-duration="500" km-in="true" km-out="true" km-fade="currentOverlay == \'login\'" class="kim-button-container" opacity="0.95"> <div km-fade="loginStep == 1" km-in="true" km-out="true" duration="500" class="kim-step-1"> <form id="kim-LoginForm" name="kmLoginForm" novalidate> <p>You must log in first:</p> <input ng-model="form.username" ng-keydown="loginError = false;" type="text" name="email" id="kim-LoginEmail" placeholder="email"> <input ng-model="form.password" ng-keydown="loginError = false;" type="password" name="password" id="kim-LoginPassword" placeholder="password"> <button ng-click="login()" class="kim-login-button kim kim-button">Login</button> <span km-fade="loading" ng-show="loading" class="kim-spinner"></span> <span class="kim kim-login-trouble">Having trouble? <a href="" ng-click="link(config.KM_HOST_WWW + \'/forgotpassword\')">Forgot password</a></span> <div km-fade="loginError" km-in="true" km-out="true" class="kim-error-container"> <p class="kim-login-error">Incorrect email/password combination. Try again.</p> </div> </form> <div><p>Or you can <span class="kim kim-signup"><a href="" ng-click="showLargeOverlay(\'signup\')">signup here</a></span></p></div> </div> <div km-fade="loginStep == 2" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> <p style="text-align:center">Login successful</p> </div> </div> <!-- Signup Overlay --> <div ng-controller="signupOverlayController" id="kim-LoginOverlay" km-enter="enter" km-in="true" delay="500" duration="500" km-fade="currentOverlay == \'signup\'" class="kim-button-container" opacity="0.95"> <div km-fade="signupStep == 1" km-in="true" km-out="true" duration="500" class="kim-step-1"> <form id="kim-LoginForm" class="kim-signup" name="kmSignupForm" novalidate> <p>Signup for Kimono<span style="vertical-align:super; font-size:10px;">BETA</span></p> <input ng-model="form.name" ng-keydown="resetErrors()" type="text" name="name" id="kim-SignupName" placeholder="name"> <input ng-model="form.username" ng-keydown="resetErrors()" type="text" name="email" id="kim-SignupEmail" placeholder="email"> <input ng-model="form.password" ng-keydown="resetErrors()" type="password" name="password" id="kim-SignupPassword" placeholder="password"> <button ng-click="signup()" class="kim-signup-button kim kim-button">Signup</button> <p class="kim-helper-text">By signing up, you are agreeing to our <br/><a href="" ng-click="link(config.KM_HOST_WWW + \'/terms\')" target="_self">Terms of service</a> and <a href="" ng-click="link(config.KM_HOST_WWW + \'/terms\')" target="_self">Privacy policy</a></p> <span km-fade="loading" ng-show="loading" class="kim-spinner"></span> <div km-fade="signupError " km-in="true" duration="300" km-out="true" class="kim-error-container"> <p ng-show="errors.name" class="kim-login-error">Name is required.</p> <p ng-show="errors.email" class="kim-login-error">{{errors.email}}</p> <p ng-show="errors.password" class="kim-login-error">Password must contain 6 characters</p> </div> </form> </div> <div km-fade="signupStep == 2" km-in="true" km-out="true" duration="500" delay="700" class="kim-step-2"> <p style="text-align:center">Signup successful</p> </div> </div> <!-- Auth Overlay --> <div ng-controller="authOverlayController" id="kim-LoginOverlay" km-in="true" km-fade="currentOverlay == \'auth\'" class="kim kim-button-container" opacity="0.95"> <div class="kim-step-1"> <form id="kim-LoginForm" name="kmAuthForm" novalidate style="height:290px;"> <p>Please enter your login information:</p> <p class="host-indicator">{{host}}</p> <input ng-model="form.username" type="text" name="email" id="kim-LoginEmail" placeholder="email"> <input ng-model="form.password" type="password" name="password" id="kim-LoginPassword" placeholder="password"> <div class="kim-hint-checkbox"> <input type="checkbox" value="1" ng-model="authAgree" ng-change="agree()" id="AgreeCheckbox" name="" /> <label for="AgreeCheckbox"></label> </div> <p class="auth-agreement" ng-class="agreeError">I agree to store my login information for {{host}} on kimonolabs.com so that this API can automatially login and retrieve data specific to my account.</p> <div> <button ng-click="authLogin()" class="kim-login-button kim kim-button kim-auth-login-button">Login</button> </div> <p class="auth-fineprint">We use the latest secure encryption technologies to ensure safe transport and storage of your credentials. You will have the ability to update or remove your stored credentials at any time. APIs created from sites requiring authentication are automatically set to private and the data can only be accessed by your kimono account through secure authentication.</p> </form> </div> </div></div><div class="kim-Overlay kim" km-fade="flags.currentView != \'extractor\'" km-in="true" km-out="true" opacity="0.95"> <div class="kim kim-container" ng-controller="dataOverlayController" ng-show="flags.currentView == \'data\'"> <div class="col-md-2 collectionsInfo"> <h1>{{collections.length}} {{collectionTitle}}</h1> <div id="kim-ModeSwitch"> <div> <div> <a ng-click="mode = \'simple\'" ng-class="{active : mode == \'simple\'}" class="kim-type-button kim-button-simple">Simple</a> <a ng-click="mode = \'advanced\'" ng-class="{active : mode == \'advanced\'}" class="kim-type-button kim-button-advanced">Advanced</a> <a ng-click="mode = \'editor\'" ng-class="{active : mode == \'editor\', disabled: flags.mode == \'loginMode\'}" class="kim-type-button kim-button-edit">Editor</a> </div> <div> <a ng-click="showPopup(\'rssInfo\')" class="kim-action-button kim-button-rssinfo2">Want RSS? Read this</a> </div> </div> </div> </div> <div class="scroll"> <form name="advancedModeForm" ng-submit="update(tmpCollections)"> <div ng-hide="collectionNames[$index] == \'Pagination\' && mode == \'editor\'" class="collection kim-clearfix" km-repeat="collection in tmpCollections"> <input class="kim kim-data-field kim-collection-name" ng-disabled="collectionNames[$index] == \'Pagination\' || flags.mode == \'loginMode\'" kimonocollection="$index" ng-model="collectionNames[$index]"> <div class="kim-clearfix datatype" km-repeat="datatype in collection" ng-init="realDatatype = collections[$parent.$index][$index]"> <div km-draggable start="editor.dragStart" end="editor.dragEnd" drag="editor.drag" axis="\'y\'" datatypeIndex="{{realDatatype.context.index}}" collectionIndex="{{$parent.$index}}" km-fade="mode == \'editor\'" display="inline-block" class="kim kim-datatype-avatar kim-datatype-dropzone kim-{{config.colors[realDatatype.context.index]}}">{{realDatatype.name}}</div> <input ng-disabled="realDatatype.context.index == \'pagination\' || flags.mode == \'loginMode\'" ng-show="mode != \'editor\'" class="kim kim-data-field kim-datatype-name kim-{{getColor(realDatatype.context.index)}}" ng-model="realDatatype.name"> <div style="float:left;"> <div ng-show="mode == \'advanced\'" class="advancedAttributes" km-repeat="selectorObject in datatype.selectorObjects"> <ng-form name="datatypeForm"> <input name="selectorField" class="kim kim-data-field kim-code-field kim-datatype-selector animate-me-up" ng-model="selectorObject.selector" selector> <input name="regexField" style="display:inline-block;" class="kim kim-data-field kim-code-field kim-datatype-regex animate-me-up" ng-model="selectorObject.regex" regex> </ng-form> <a ng-show="flags.mode != \'loginMode\'" ng-click="showAttributes(realDatatype.context.index)" class="kim kim-data-link">Attributes</a> </div> <div ng-show="mode == \'simple\'" animated-highlight datatype-index="{{realDatatype.context.index}}" class="animated-highlight"></div> </div> </div> <div ng-show="mode == \'editor\'" collectionIndex="{{$index}}" class="kim kim-data-field kim-collection-dropzone kim-show-when-dragging"></div> </div> <input ng-show="mode == \'editor\'" disabled class="kim kim-data-field kim-collection-name" value="New Collection"> <div ng-show="mode == \'editor\'" collectionIndex="new" class="kim kim-data-field kim-collection-dropzone kim-show-when-dragging"></div> <div ng-show="mode == \'advanced\'" id="kim-AdvancedButtons"> <input ng-disabled="isUnchanged(collections, tmpCollections) || advancedModeForm.$invalid" type="submit" class="kim-advanced-button kim-button-apply kim kim-button"> <button ng-disabled="isUnchanged(collections, tmpCollections) || advancedModeForm.$invalid" ng-click="resetAdvancedModeForm()" class="kim-advanced-button kim-button-reset kim kim-button">Reset</button> <span km-fade="advancedModeForm.$invalid" km-in="true" km-out="true" display="inline-block" class="kim-selector-error">{{errorMessage}}</span> </div> </div> </form> </div> <div class="kim kim-container" ng-controller="rawOverlayController" km-fade="flags.currentView == \'raw\'" km-enter="enter"> <div class="col-md-2 collectionsInfo"> <h1>{{collections.length}} {{collectionTitle}}</h1> <div id="kim-ModeSwitch"> <div> <div> <a ng-click="mode = \'json\'" ng-class="{active : mode == \'json\'}" class="kim-type-button kim-button-simple">JSON</a> <a ng-click="mode = \'csv\'" ng-class="{active : mode == \'csv\'}" class="kim-type-button kim-button-advanced">CSV</a> <a ng-click="mode = \'rss\'" ng-class="{active : mode == \'rss\'}" class="kim-type-button kim-button-edit">RSS</a> </div> <div> <a ng-click="download()" class="kim-action-button kim-button-download">Download {{mode | uppercase}}</a> <a ng-click="selectText()" ng-hide="mode == \'csv\'" class="kim-action-button kim-button-select">Select All Text</a> <a ng-click="selectCurrentTable()" ng-show="mode == \'csv\'" class="kim-action-button kim-button-select">Select {{selectedCollection}}</a> <a ng-show="mode == \'rss\'" ng-click="showPopup(\'rssInfo\')" class="kim-action-button kim-button-rssinfo2">Want RSS? Read this</a> </div> </div> </div> </div> <div class="scroll"> <pre ng-show="mode == \'json\'" class="kim-code json">{{json | json}}</pre> <div ng-show="mode == \'csv\'" class="kim-spreadsheet"> <div id="kim-SheetSwitch"> <a ng-repeat="(collection, data) in table" ng-click="clickTableCollection(collection)" ng-class="{active : selectedCollection == collection}">{{collection}}</a> </div> <div> <table> <tr> <th ng-class="\'kim-\' + config.colors[ table[selectedCollection].datatypeindices[$index] ] + \'-color\'" ng-repeat="name in table[selectedCollection].colnames">{{name}}</th> </tr> <tr ng-repeat="row in table[selectedCollection].rows"> <td ng-repeat="value in row track by $index">{{value}}</td> </tr> </table> </div> </div> <pre ng-show="mode == \'rss\'" class="kim-code rss">{{rss}}</pre> </div> </div></div><div ng-controller="popupController" class="kim-Overlay kim" km-fade="show" km-in="true" km-out="true" opacity="0.95"> <div class="kim kim-container" ng-controller="attributesOverlayController" km-fade="currentPopup == \'attributes\'" km-in="true" km-out="true" km-enter="enter"> <div class="kim" id="kim-AttributeExtractor" style="opacity: 1;"> <div> <a ng-click="close()" class="kim kim-close-ae"></a> <p>Select the specific attributes you want to extract for the elements matched by this selector.</p> <ul id="kim-AttrList"> <li><label><input ng-model="textContent" type="checkbox" id="kim-TextContent"> Text Content</label></li> <li class="kim-attribute" km-repeat="attribute in attributes"> <label><input class="kim-regex-check" ng-model="attribute.value" type="checkbox"> {{attribute.attribute}}</label> </li> </ul> <ul class="kim-last"> <li><label><input type="checkbox" ng-model="hiddenElements" id="kim-HiddenElements"> Include Hidden Elements</label></li> </ul> <div class="kim-apply-button-container"><button class="kim kim-apply-ae kim-button" ng-click="apply()">Apply</button></div> </div> </div> </div> <div class="kim kim-container" ng-click="close()" km-fade="currentPopup == \'rssInfo\'" km-in="true" km-out="true"> <div class="kim" id="kim-RSSInfo" style="opacity: 1;"> <div> <a class="kim kim-close-ae"></a> <p>To build an RSS feed with kimono, you must make sure your API has only one collection, and that the collection contains at least a one property. If you want to populate your RSS feed with description, author, pubDate or comments, you must create properties on your API with the appropriate property names.</p> <table> <tbody> <tr> <td>title <span>LINK</span></td> <td>The title of the item (must also be a link to the content)</td> </tr> <tr><td>description</td><td>The item synopsis</td></tr> <tr><td>author</td><td>Author of the item</td></tr> <tr><td>category</td><td>Category for the item</td></tr> <tr><td>pubDate</td><td>When the item was published</td></tr> <tr><td>comments <span>LINK</span></td><td>Comments URL (must be a link to a comments page)</td></tr> </tbody> </table> </div> </div> </div> <div class="kim kim-container" ng-click="close()" km-fade="currentPopup == \'incorrectLogin\'" km-in="true" km-out="true"> <div class="kim" id="kim-AttributeExtractor" style="opacity: 1;"> <div> <a class="kim kim-close-ae"></a> <p>Can\'t activate login credential mode.</p> </div> </div> </div></div><!--- Toast Message --><div class="kim kim-toast-wrapper" km-fade="flags.toasting" km-in="true" km-out="true" translate-vector="(0, 20px, 0)" duration="250"> <p class="kim kim-toast kim-{{flags.toastType}}"> {{flags.toastMessage}} </p></div><!-- extractor --><div ng-controller="extractorController" ></div><!--<div km-fade="flags.showNotificationPanel" km-in="true" km-out="true" id="kim-Notifications"> <div class="kim-notification-wrapper"> <div class="kim-header"> <div class="kim-title">What\'s New</div> <div class="kim-links"><div class="reject" ng-click="flags.showNotificationPanel = false"></div></div> </div> <div class="kim-notifications"> <div class="kim-notification" ng-class="{\'new\': new_features[key]}" ng-repeat="(key, notification) in config.data.features | reverse" ng-click="link(notification.link)"> <div class="kim-notification-title"> {{notification.title}} </div> <div class="kim-thumb" ng-class="{\'kim-green\': notification.type == \'New Feature\', \'kim-purple\': notification.type == \'News\', \'kim-red\': notification.type == \'Bug Fix\'}"> {{notification.type}} </div> <div class="kim-text">{{notification.message | limit: 30}}</div> <div class="arrow"></div> </div> </div> <a href="" class="kim-more" ng-click="link(config.KM_HOST_WWW+\'/blog\')">More News</a> </div></div>--><div km-fade="flags.showNotificationPanel" km-in="true" km-out="true" id="kim-Notifications"> <div class="kim-notification-wrapper"> <div class="kim-notifications"> <div class="kim-notification" ng-class="{\'new\': new_features[key]}" ng-repeat="(key, notification) in allFeatures | reverse" ng-click="link(notification.link)"> <div class="kim-thumb" ng-class="{\'kim-green\': notification.type == \'New Feature\', \'kim-purple\': notification.type == \'News\', \'kim-red\': notification.type == \'Bug Fix\'}"> {{notification.type}} </div> <p class="kim-body">{{notification.message}}</p> <div class="arrow"></div> </div> </div> </div></div><!-- Api Popup --><div id="kim-ApiPanel" km-loading message="Loading API data" font-size="18" model="loading" ng-show="flags.showApiPanel" ng-controller="apiPanelController" km-panel show-toggle="open" width="300" height="300" offset="44"> <div ng-click="toggle()" class="panel-header">{{(siteApis.length + \' Existing Kimono APIs\') | limit: 40}}</span> <!-- <div ng-click="showHelp = !showHelp" class="question"></div> --> <div ng-class="{open: open}" class="arrow"></div> </div> <div class="panel-list"> <div style="position:relative; z-index:10;" km-repeat="api in siteApis"> <div class="kim-api-item" ng-click="getApi(api)" ng-class="{selected: flags.currentApi.id == api.id}"> <span>{{api.name | limit: 14}}</span> <div class="kim-collection-indicator"> <div class="single_collection" ng-repeat="collection in api.collections"> <div ng-repeat="datatype in collection" class="datatype kim-{{getColor(datatype.context.index)}}"></div> </div> </div> </div> <div class="kim-action-buttons"> <div ng-if="false" ng-click="link(config.KM_HOST + \'/apis/\' + api.id)" class="accept">Use</div> <div ng-if="false" ng-click="done()" class="clone">Clone</div> <div ng-click="cancel()" class="reject">Unload</div> </div> </div> <div class="kim-othersite-item" ng-click="kimonify(rootDomain + site)" ng-repeat="(site, apis) in otherSites"> {{(apis.length + \' more \' + (\'api\' | plural: apis.length)) | limit: 40}} <span>{{(rootDomain + site) | limit: 40}}</span> <div class="arrow"></div> </div> </div> <!-- <div class="api-view"> <div class="navbar title"> <div ng-click="back()" class="nav-button left"><div class="arrow left"></div></div> <div class="nav-button right" ng-click="getApi(selectedApi.id)"><div class="download"></div></div> <div class="nav-title center">{{selectedApi.name | limit: 18}}</div> </div> <div style="height:260px; overflow:scroll;"> <div class="collection" ng-repeat="collection in selectedApi.collectionNames"> <div class="collection-title">{{collection | limit: 11}}</div> <div class="datatypes"> <div ng-repeat="datatype in selectedApi.collections[$index]" class="datatype-title"> <div class="border kim-{{getColor(datatype.context.index)}}"></div> {{datatype.name | limit:13}} </div> </div> </div> </div> </div> --></div><div ng-controller="toolbarController" id="kim-Toolbar" class="kim"> <div class="kim-toolbar-section active"> <h1 style="vertical-align: middle;"><a href="" ng-click="link(\'http://kimonolabs.com/\')">kimono<span>labs</span></a></h1> <a class="kim-new" title="New Features" ng-show="allFeatures.length > 0" ng-class="{\'active\':flags.showNotificationPanel, \'highlighted\': (new_features | size) > 0}" ng-click="openNotifications()"></a> <!-- <span ng-show="(new_features | size) > 0" ng-class="{\'kim-dot-sm\': new_features.length > 99, \'kim-dot-md\': new_features.length > 9, \'kim-dot-xs\': new_features.length > 999 }" class="kim-notification-badge">{{new_features | size}}</span> --> <p ng-show="(new_features | size) > 0" class="beta-tag kim-feature-count">{{new_features | size}}</p><!-- <form role="form" id="kim-UrlForm" action="http://kimonolabs.com/load" method="get"> <input class="kim" type="text" id="kim-ToolbarUrl" name="url" placeholder="any url" value="{{ targetUrl }}"> <a class="kim-toolbar-button kim-urlgo"></a> </form> --> </div> <div class="kim-toolbar-section first" km-fade="!flags.navigate" km-in="true" km-out="true" display="inline-block;"> <input class="kim" type="text" id="kim-ToolbarDataName" name="ToolbarDataName" placeholder="property1" ng-disabled="datatypeIndex == \'pagination\' || flags.mode == \'loginMode\'" ng-model="datatypes[datatypeIndex].name" ng-keydown="keydown($event)"> </div> <div class="kim-toolbar-section kim-datatypes" km-fade="!flags.navigate" km-in="true" km-out="true" display="inline-block"> <a ng-mouseenter="dataDotHover($index)" ng-mouseleave="dataDotUnhover($index)" km-repeat="datatype in datatypes" km-list="toolbarDatatypes" km-enter="datatypeEnter" type="medium" kimonodatatype="{{$index}}" ng-click="changeDatatype($index)" ng-class="{active : (datatypeIndex == $index)}" class="kim-data-dot kim-{{getColor($index)}}"> <span ng-show="flags.mode != \'loginMode\'" ng-class="{\'kim-dot-sm\': datatype.numElements > 99, \'kim-dot-md\': datatype.numElements > 9, \'kim-dot-xs\': datatype.numElements > 999}">{{datatype.numElements}}</span> <span ng-show="flags.mode == \'loginMode\'" class="kim kim-icon" ng-class="{\'kim-user-highlight\': $index == 0, \'kim-password-highlight\': $index == 1, \'kim-target-highlight\': $index == 2}"></span> <span ng-show="flags.mode != \'loginMode\'" class="kim-delete-datatype" ng-click="delete($index)"></span> </a> <a class="kim-new-datatype" ng-click="addDatatype()" ng-show="datatypes.length < 50 && flags.mode != \'loginMode\'" title="New Datatype"></a> </div> <div class="kim-right"> <div class="kim-toolbar-section" id="kim-PaginationContainer"> <a km-fade="flags.mode != \'loginMode\' && flags.mode != \'navigation\'" km-in="true" km-out="true" display="inline-block" opacity="0.4" ng-mouseenter="paginationHover(\'pagination\')" ng-mouseleave="dataDotUnhover(\'pagination\')" class="kim kim-toolbar-button kim-pagination kim-data-dot" kimonodatatype="pagination" title="Pagination" ng-click="pagination()" ng-class="{active : (datatypeIndex == \'pagination\'), disabled: flags.mode == \'loginMode\' || flags.navigate}"> <span ng-show="flags.hasPagination" class="pagination-check"></span> <span class="kim-delete-datatype" ng-click="deletePagination($index)"></span> </a> <a km-fade="flags.mode != \'navigation\'" km-in="true" km-out="true" display="inline-block" opacity="0.4" class="kim-toolbar-button kim-undo" ng-class="{disabled: flags.actionHistoryLength == 0}" ng-click="undo()" title="Undo"></a> </div> <div class="kim-toolbar-section" ng-if="config.clientEnv == \'chrome\'" id="kim-PaginationContainer"> <a ng-show="flags.currentStep == \'on\' || flags.currentStep == \'done\'" class="kim-toolbar-button kim-normal" ng-class="{active: flags.mode == \'navigation\'}" ng-click="navigateMode()" title="Navigate"></a> <a ng-show="flags.currentStep != \'on\' && flags.currentStep != \'done\'" class="kim-toolbar-button kim-login" ng-class="{active: flags.mode == \'loginMode\', attention: isHttps()}" ng-click="enableLoginMode()" title="Auth mode"></a> </div> <div class="kim-toolbar-section"> <a class="kim-toolbar-button kim-view-button extractor-view" title="Extractor View" ng-click="changeView(\'extractor\')" ng-class="{active : (flags.currentView == \'extractor\')}"></a> <a class="kim-toolbar-button kim-view-button data-model-view" title="Data Model View" ng-click="changeView(\'data\')" ng-class="{active : (flags.currentView == \'data\'), disabled: flags.navigate}"></a> <a class="kim kim-toolbar-button kim-view-button json-view" title="Raw Data View" ng-click="changeView(\'raw\')" ng-class="{active : (flags.currentView == \'raw\'), disabled: flags.mode == \'loginMode\' || flags.navigate}"></a> </div> <div class="kim-toolbar-section"> <button ng-class="{disabled: flags.navigate}" class="kim-toolbar-button-primary kim kim-button" id="kim-DoneButton" ng-click="done()" title="{{doneButtonTitle()}} API">{{doneButtonMessage()}}</button> </div> </div></div>'),s.bootstrap(c,["Kimono"]),c.appendTo("body") | |
}})}(window,document); |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(window, document, undefined) { | |
function okeboup() { | |
quobovu || (jQuery('#habla_beta_container_do_not_rely_on_div_classes_or_names').appendTo('#Kimonify').css({ | |
'z-index': 2147483900, | |
position: 'fixed' | |
}), quobovu = !0); | |
} | |
'undefined' == typeof window.$k ? window.$k = { | |
data: {} | |
} : 'undefined' == typeof window.$k.data && (window.$k.data = {}); | |
window.$ || window.jQuery || undefined; | |
!function(luloso, eloyhad) { | |
'object' == typeof module && 'object' == typeof module.exports ? module.exports = luloso.document ? eloyhad(luloso, !0) : function(soonietbot) { | |
if (!soonietbot.document) { | |
throw new Error('jQuery requires a window with a document'); | |
} | |
return eloyhad(soonietbot); | |
} : eloyhad(luloso); | |
}('undefined' != typeof window ? window : this, function(gosura, perefop) { | |
function yeladi(quecadi) { | |
var kilikan = quecadi.length; | |
var yeladi = jQuery.type(quecadi); | |
return 'function' === yeladi || jQuery.isWindow(quecadi) ? !1 : 1 === quecadi.nodeType && kilikan ? !0 : 'array' === yeladi || 0 === kilikan || 'number' == typeof kilikan && kilikan > 0 && kilikan - 1 in quecadi; | |
} | |
function cropuba(pimeydrank, soquega, munitoth) { | |
if (jQuery.isFunction(soquega)) { | |
return jQuery.grep(pimeydrank, function(strilanu, moderub) { | |
return !!soquega.call(strilanu, moderub, strilanu) !== munitoth; | |
}); | |
} | |
if (soquega.nodeType) { | |
return jQuery.grep(pimeydrank, function(nestifet) { | |
return nestifet === soquega !== munitoth; | |
}); | |
} | |
if ('string' == typeof soquega) { | |
if (kubuley.test(soquega)) { | |
return jQuery.filter(soquega, pimeydrank, munitoth); | |
} | |
soquega = jQuery.filter(soquega, pimeydrank); | |
} | |
return jQuery.grep(pimeydrank, function(nesayey) { | |
return kekegaf.call(soquega, nesayey) >= 0 !== munitoth; | |
}); | |
} | |
function gedisip(tobebfam, saqualo) { | |
for (; | |
(tobebfam = tobebfam[saqualo]) && 1 !== tobebfam.nodeType; | |
) { | |
} | |
return tobebfam; | |
} | |
function scinedloup(muroruch) { | |
var toroupek = mafinize[muroruch] = {}; | |
return jQuery.each(muroruch.match(nikisi) || [], function(saferi, chajuhog) { | |
toroupek[chajuhog] = !0; | |
}), toroupek; | |
} | |
function gupopey() { | |
soyengack.removeEventListener('DOMContentLoaded', gupopey, !1), gosura.removeEventListener('load', gupopey, !1), jQuery.ready(); | |
} | |
function hahatool() { | |
Object.defineProperty(this.cache = {}, 0, { | |
get: function() { | |
return {}; | |
} | |
}), this.expando = jQuery.expando + Math.random(); | |
} | |
function framogi(chomeelas, mofoje, nisuban) { | |
var clomefi; | |
if (void 0 === nisuban && 1 === chomeelas.nodeType) { | |
if (clomefi = 'data-' + mofoje.replace(heenefi, '-$1').toLowerCase(), nisuban = chomeelas.getAttribute(clomefi), 'string' == typeof nisuban) { | |
try { | |
nisuban = 'true' === nisuban ? !0 : 'false' === nisuban ? !1 : 'null' === nisuban ? null : +nisuban + '' === nisuban ? +nisuban : lirequa.test(nisuban) ? jQuery.parseJSON(nisuban) : nisuban; | |
} catch (fruhese) {} vupequa.set(chomeelas, mofoje, nisuban); | |
} else { | |
nisuban = void 0; | |
} | |
} | |
return nisuban; | |
} | |
function basefe() { | |
return !0; | |
} | |
function hedungal() { | |
return !1; | |
} | |
function neyidet() { | |
try { | |
return soyengack.activeElement; | |
} catch (festruetes) {} | |
} | |
function dobakath(olopif, sruecates) { | |
return jQuery.nodeName(olopif, 'table') && jQuery.nodeName(11 !== sruecates.nodeType ? sruecates : sruecates.firstChild, 'tr') ? olopif.getElementsByTagName('tbody')[0] || olopif.appendChild(olopif.ownerDocument.createElement('tbody')) : olopif; | |
} | |
function deegastub(shicupiel) { | |
return shicupiel.type = (null !== shicupiel.getAttribute('type')) + '/' + shicupiel.type, shicupiel; | |
} | |
function depepag(ufhiled) { | |
var yubooji = wukomi.exec(ufhiled.type); | |
return yubooji ? ufhiled.type = yubooji[1] : ufhiled.removeAttribute('type'), ufhiled; | |
} | |
function cagogtek(grequepooch, kakarom) { | |
for (var estackup = 0, ropeji = grequepooch.length; | |
ropeji > estackup; | |
estackup++) { | |
diskayos.set(grequepooch[estackup], 'globalEval', !kakarom || diskayos.get(kakarom[estackup], 'globalEval')) | |
} | |
} | |
function henuqui(loujobap, byelay) { | |
var majelay; | |
var slakubu; | |
var nujobo; | |
var joquapur; | |
var gorebrach; | |
var quohufi; | |
var hedrefef; | |
var buenaldrit; | |
if (1 === byelay.nodeType) { | |
if (diskayos.hasData(loujobap) && (joquapur = diskayos.access(loujobap), gorebrach = diskayos.set(byelay, joquapur), buenaldrit = joquapur.events)) { | |
delete gorebrach.handle | |
, gorebrach.events = {}; | |
for (nujobo in buenaldrit) { | |
for (majelay = 0, slakubu = buenaldrit[nujobo].length; | |
slakubu > majelay; | |
majelay++) { | |
jQuery.event.add(byelay, nujobo, buenaldrit[nujobo][majelay]) | |
} | |
} | |
} | |
vupequa.hasData(loujobap) && (quohufi = vupequa.access(loujobap), hedrefef = jQuery.extend({}, quohufi), vupequa.set(byelay, hedrefef)); | |
} | |
} | |
function radobu(setareg, tuepubek) { | |
var lesemi = setareg.getElementsByTagName ? setareg.getElementsByTagName(tuepubek || '*') : setareg.querySelectorAll ? setareg.querySelectorAll(tuepubek || '*') : []; | |
return void 0 === tuepubek || tuepubek && jQuery.nodeName(setareg, tuepubek) ? jQuery.merge([setareg], lesemi) : lesemi; | |
} | |
function gojooje(poreswi, rutipi) { | |
var tobujee = rutipi.nodeName.toLowerCase(); | |
'input' === tobujee && butiquab.test(poreswi.type) ? rutipi.checked = poreswi.checked : ('input' === tobujee || 'textarea' === tobujee) && (rutipi.defaultValue = poreswi.defaultValue); | |
} | |
function wacosa(ketefo, tudtobtem) { | |
var klexosid = jQuery(tudtobtem.createElement(ketefo)).appendTo(tudtobtem.body); | |
var angpigoy = gosura.getDefaultComputedStyle ? gosura.getDefaultComputedStyle(klexosid[0]).display : jQuery.css(klexosid[0], 'display'); | |
return klexosid.detach(), angpigoy; | |
} | |
function huklutas(kadepa) { | |
var lilieka = soyengack; | |
var jablimom = jifiho[kadepa]; | |
return jablimom || (jablimom = wacosa(kadepa, lilieka), 'none' !== jablimom && jablimom || (fuemobo = (fuemobo || jQuery('<iframe frameborder=\'0\' width=\'0\' height=\'0\'/>')).appendTo(lilieka.documentElement), lilieka = fuemobo[0].contentDocument, lilieka.write(), lilieka.close(), jablimom = wacosa(kadepa, lilieka), fuemobo.detach()), jifiho[kadepa] = jablimom), jablimom; | |
} | |
function bomaje(etumik, ipupak, diloostoos) { | |
var demifoze; | |
var irooded; | |
var sidahaf; | |
var quijora; | |
var grejerpar = etumik.style; | |
return diloostoos = diloostoos || paliquo(etumik), diloostoos && (quijora = diloostoos.getPropertyValue(ipupak) || diloostoos[ipupak]), diloostoos && ('' !== quijora || jQuery.contains(etumik.ownerDocument, etumik) || (quijora = jQuery.style(etumik, ipupak)), estruted.test(quijora) && gofroju.test(ipupak) && (demifoze = grejerpar.width, irooded = grejerpar.minWidth, sidahaf = grejerpar.maxWidth, grejerpar.minWidth = grejerpar.maxWidth = grejerpar.width = quijora, quijora = diloostoos.width, grejerpar.width = demifoze, grejerpar.minWidth = irooded, grejerpar.maxWidth = sidahaf)), void 0 !== quijora ? quijora + '' : quijora; | |
} | |
function fibofey(adebfab, jesesi) { | |
return { | |
get: function() { | |
return adebfab() ? void | |
delete this.get | |
: (this.get = jesesi).apply(this, arguments); | |
} | |
}; | |
} | |
function tuluque(kaquoti, ceiyoudied) { | |
if (ceiyoudied in kaquoti) { | |
return ceiyoudied; | |
} | |
for (var sisegou = ceiyoudied[0].toUpperCase() + ceiyoudied.slice(1), bojuse = ceiyoudied, quebradey = judaco.length; | |
quebradey--; | |
) { | |
if (ceiyoudied = judaco[quebradey] + sisegou, ceiyoudied in kaquoti) { | |
return ceiyoudied; | |
} | |
} | |
return bojuse; | |
} | |
function nibilu(dafeebo, torofu, queliskey) { | |
var toorehi = joscerib.exec(torofu); | |
return toorehi ? Math.max(0, toorehi[1] - (queliskey || 0)) + (toorehi[2] || 'px') : torofu; | |
} | |
function lokucu(inonat, kaloqua, quequaki, vousimock, fucoqui) { | |
for (var paselup = quequaki === (vousimock ? 'border' : 'content') ? 4 : 'width' === kaloqua ? 1 : 0, phoniref = 0; | |
4 > paselup; | |
paselup += 2) { | |
'margin' === quequaki && (phoniref += jQuery.css(inonat, quequaki + aluerer[paselup], !0, fucoqui)), vousimock ? ('content' === quequaki && (phoniref -= jQuery.css(inonat, 'padding' + aluerer[paselup], !0, fucoqui)), 'margin' !== quequaki && (phoniref -= jQuery.css(inonat, 'border' + aluerer[paselup] + 'Width', !0, fucoqui))) : (phoniref += jQuery.css(inonat, 'padding' + aluerer[paselup], !0, fucoqui), 'padding' !== quequaki && (phoniref += jQuery.css(inonat, 'border' + aluerer[paselup] + 'Width', !0, fucoqui))); | |
} | |
return phoniref; | |
} | |
function ibomiln(remigoof, chabufue, kaxhekaf) { | |
var nobeksab = !0; | |
var tedufen = 'width' === chabufue ? remigoof.offsetWidth : remigoof.offsetHeight; | |
var dujokee = paliquo(remigoof); | |
var nistolop = 'border-box' === jQuery.css(remigoof, 'boxSizing', !1, dujokee); | |
if (0 >= tedufen || null == tedufen) { | |
if (tedufen = bomaje(remigoof, chabufue, dujokee), (0 > tedufen || null == tedufen) && (tedufen = remigoof.style[chabufue]), estruted.test(tedufen)) { | |
return tedufen; | |
} | |
nobeksab = nistolop && (sasona.boxSizingReliable() || tedufen === remigoof.style[chabufue]), tedufen = parseFloat(tedufen) || 0; | |
} | |
return tedufen + lokucu(remigoof, chabufue, kaxhekaf || (nistolop ? 'border' : 'content'), nobeksab, dujokee) + 'px'; | |
} | |
function sosnubrog(lacabe, wunohu) { | |
for (var gaware, peperu, dugoran, kechbisok = [], gedezi = 0, catodu = lacabe.length; | |
catodu > gedezi; | |
gedezi++) { | |
peperu = lacabe[gedezi], peperu.style && (kechbisok[gedezi] = diskayos.get(peperu, 'olddisplay'), gaware = peperu.style.display, wunohu ? (kechbisok[gedezi] || 'none' !== gaware || (peperu.style.display = ''), '' === peperu.style.display && lufufi(peperu) && (kechbisok[gedezi] = diskayos.access(peperu, 'olddisplay', huklutas(peperu.nodeName)))) : kechbisok[gedezi] || (dugoran = lufufi(peperu), (gaware && 'none' !== gaware || !dugoran) && diskayos.set(peperu, 'olddisplay', dugoran ? gaware : jQuery.css(peperu, 'display')))); | |
} | |
for (gedezi = 0; | |
catodu > gedezi; | |
gedezi++) { | |
peperu = lacabe[gedezi], peperu.style && (wunohu && 'none' !== peperu.style.display && '' !== peperu.style.display || (peperu.style.display = wunohu ? kechbisok[gedezi] || '' : 'none')); | |
} | |
return lacabe; | |
} | |
function goofepi(romemfey, jonijo, ruresaf, trodranus, quegetu) { | |
return new goofepi.prototype.init(romemfey, jonijo, ruresaf, trodranus, quegetu); | |
} | |
function boniekuel() { | |
return setTimeout(function() { | |
sepafi = void 0; | |
}), sepafi = jQuery.now(); | |
} | |
function cosolor(fehise, kakepi) { | |
var junoyul; | |
var numedoub = 0; | |
var dosochop = { | |
height: fehise | |
}; | |
for (kakepi = kakepi ? 1 : 0; | |
4 > numedoub; | |
numedoub += 2 - kakepi) { | |
junoyul = aluerer[numedoub], dosochop['margin' + junoyul] = dosochop['padding' + junoyul] = fehise; | |
} | |
return kakepi && (dosochop.opacity = dosochop.width = fehise), dosochop; | |
} | |
function sorojut(bonloolos, denale, cacegis) { | |
for (var vosuepo, fobeta = (sagekeg[denale] || []).concat(sagekeg['*']), demema = 0, osokuep = fobeta.length; | |
osokuep > demema; | |
demema++) { | |
if (vosuepo = fobeta[demema].call(cacegis, denale, bonloolos)) { | |
return vosuepo | |
} | |
; | |
} | |
} | |
function hucosu(jayjothex, rifiju, bookigkluk) { | |
var eyudhol; | |
var tololcich; | |
var quelipo; | |
var tokafo; | |
var bosaran; | |
var sumubek; | |
var ibpingoun; | |
var exdrotoog = this; | |
var snacofa = {}; | |
var mugakre = jayjothex.style; | |
var elgopum = jayjothex.nodeType && lufufi(jayjothex); | |
var miquifor = diskayos.get(jayjothex, 'fxshow'); | |
bookigkluk.queue || (bosaran = jQuery._queueHooks(jayjothex, 'fx'), null == bosaran.unqueued && (bosaran.unqueued = 0, sumubek = bosaran.empty.fire, bosaran.empty.fire = function() { | |
bosaran.unqueued || sumubek(); | |
}), bosaran.unqueued++, exdrotoog.always(function() { | |
exdrotoog.always(function() { | |
bosaran.unqueued--, jQuery.queue(jayjothex, 'fx').length || bosaran.empty.fire(); | |
}); | |
})), 1 === jayjothex.nodeType && ('height' in rifiju || 'width' in rifiju) && (bookigkluk.overflow = [mugakre.overflow, mugakre.overflowX, mugakre.overflowY], ibpingoun = jQuery.css(jayjothex, 'display'), 'none' === ibpingoun && (ibpingoun = huklutas(jayjothex.nodeName)), 'inline' === ibpingoun && 'none' === jQuery.css(jayjothex, 'float') && (mugakre.display = 'inline-block')), bookigkluk.overflow && (mugakre.overflow = 'hidden', exdrotoog.always(function() { | |
mugakre.overflow = bookigkluk.overflow[0], mugakre.overflowX = bookigkluk.overflow[1], mugakre.overflowY = bookigkluk.overflow[2]; | |
})); | |
for (eyudhol in rifiju) { | |
if (tololcich = rifiju[eyudhol], dehasloung.exec(tololcich)) { | |
if ( | |
delete rifiju[eyudhol] | |
, quelipo = quelipo || 'toggle' === tololcich, tololcich === (elgopum ? 'hide' : 'show')) { | |
if ('show' !== tololcich || !miquifor || void 0 === miquifor[eyudhol]) { | |
continue; | |
} | |
elgopum = !0; | |
} | |
snacofa[eyudhol] = miquifor && miquifor[eyudhol] || jQuery.style(jayjothex, eyudhol); | |
} | |
} | |
if (!jQuery.isEmptyObject(snacofa)) { | |
miquifor ? 'hidden' in miquifor && (elgopum = miquifor.hidden) : miquifor = diskayos.access(jayjothex, 'fxshow', {}), quelipo && (miquifor.hidden = !elgopum), elgopum ? jQuery(jayjothex).show() : exdrotoog.done(function() { | |
jQuery(jayjothex).hide(); | |
}), exdrotoog.done(function() { | |
var nuheso; | |
diskayos.remove(jayjothex, 'fxshow'); | |
for (nuheso in snacofa) { | |
jQuery.style(jayjothex, nuheso, snacofa[nuheso]) | |
} | |
}); | |
for (eyudhol in snacofa) { | |
tokafo = sorojut(elgopum ? miquifor[eyudhol] : 0, eyudhol, exdrotoog), eyudhol in miquifor || (miquifor[eyudhol] = tokafo.start, elgopum && (tokafo.end = tokafo.start, tokafo.start = 'width' === eyudhol || 'height' === eyudhol ? 1 : 0)) | |
} | |
} | |
} | |
function gitube(rerapi, joosnesru) { | |
var yemay; | |
var hideyud; | |
var igfounkel; | |
var damoho; | |
var mijiebe; | |
for (yemay in rerapi) { | |
if (hideyud = jQuery.camelCase(yemay), igfounkel = joosnesru[hideyud], damoho = rerapi[yemay], jQuery.isArray(damoho) && (igfounkel = damoho[1], damoho = rerapi[yemay] = damoho[0]), yemay !== hideyud && (rerapi[hideyud] = damoho, | |
delete rerapi[yemay] | |
), mijiebe = jQuery.cssHooks[hideyud], mijiebe && 'expand' in mijiebe) { | |
damoho = mijiebe.expand(damoho), | |
delete rerapi[hideyud]; | |
for (yemay in damoho) { | |
yemay in rerapi || (rerapi[yemay] = damoho[yemay], joosnesru[yemay] = igfounkel) | |
} | |
} else { | |
joosnesru[hideyud] = igfounkel | |
} | |
; | |
} | |
} | |
function anulis(narelpuk, jufcamil, jemadok) { | |
var esofir; | |
var shekeemi; | |
var fopufuer = 0; | |
var clestulif = moosefip.length; | |
var firorieze = jQuery.Deferred().always(function() { | |
delete leboto.elem; | |
}); | |
var leboto = function() { | |
if (shekeemi) { | |
return !1; | |
} | |
for (var dudursif = sepafi || boniekuel(), quephofa = Math.max(0, sebeder.startTime + sebeder.duration - dudursif), fapace = quephofa / sebeder.duration || 0, faluthcod = 1 - fapace, goseca = 0, soristey = sebeder.tweens.length; | |
soristey > goseca; | |
goseca++) { | |
sebeder.tweens[goseca].run(faluthcod); | |
} | |
return firorieze.notifyWith(narelpuk, [sebeder, faluthcod, quephofa]), 1 > faluthcod && soristey ? quephofa : (firorieze.resolveWith(narelpuk, [sebeder]), !1); | |
}; | |
var sebeder = firorieze.promise({ | |
elem: narelpuk, | |
props: jQuery.extend({}, jufcamil), | |
opts: jQuery.extend(!0, { | |
specialEasing: {} | |
}, jemadok), | |
originalProperties: jufcamil, | |
originalOptions: jemadok, | |
startTime: sepafi || boniekuel(), | |
duration: jemadok.duration, | |
tweens: [], | |
createTween: function(bepreecin, rusami) { | |
var istusscor = jQuery.Tween(narelpuk, sebeder.opts, bepreecin, rusami, sebeder.opts.specialEasing[bepreecin] || sebeder.opts.easing); | |
return sebeder.tweens.push(istusscor), istusscor; | |
}, | |
stop: function(cahidu) { | |
var kanpielod = 0; | |
var ritifid = cahidu ? sebeder.tweens.length : 0; | |
if (shekeemi) { | |
return this; | |
} | |
for (shekeemi = !0; | |
ritifid > kanpielod; | |
kanpielod++) { | |
sebeder.tweens[kanpielod].run(1); | |
} | |
return cahidu ? firorieze.resolveWith(narelpuk, [sebeder, cahidu]) : firorieze.rejectWith(narelpuk, [sebeder, cahidu]), this; | |
} | |
}); | |
var roguhe = sebeder.props; | |
for (gitube(roguhe, sebeder.opts.specialEasing); | |
clestulif > fopufuer; | |
fopufuer++) { | |
if (esofir = moosefip[fopufuer].call(sebeder, narelpuk, roguhe, sebeder.opts)) { | |
return esofir; | |
} | |
} | |
return jQuery.map(roguhe, sorojut, sebeder), jQuery.isFunction(sebeder.opts.start) && sebeder.opts.start.call(narelpuk, sebeder), jQuery.fx.timer(jQuery.extend(leboto, { | |
elem: narelpuk, | |
anim: sebeder, | |
queue: sebeder.opts.queue | |
})), sebeder.progress(sebeder.opts.progress).done(sebeder.opts.done, sebeder.opts.complete).fail(sebeder.opts.fail).always(sebeder.opts.always); | |
} | |
function nayesot(casige) { | |
return function(utebas, boudichuck) { | |
'string' != typeof utebas && (boudichuck = utebas, utebas = '*'); | |
var sequelo; | |
var josaful = 0; | |
var fufkiepog = utebas.toLowerCase().match(nikisi) || []; | |
if (jQuery.isFunction(boudichuck)) { | |
for (; | |
sequelo = fufkiepog[josaful++]; | |
) { | |
'+' === sequelo[0] ? (sequelo = sequelo.slice(1) || '*', (casige[sequelo] = casige[sequelo] || []).unshift(boudichuck)) : (casige[sequelo] = casige[sequelo] || []).push(boudichuck) | |
} | |
} | |
}; | |
} | |
function quetafub(nuletab, quemicho, etilbrag, urunkag) { | |
function beengtukjom(dujogo) { | |
var gekostop; | |
return herala[dujogo] = !0, jQuery.each(nuletab[dujogo] || [], function(dumufo, posnulech) { | |
var depimuf = posnulech(quemicho, etilbrag, urunkag); | |
return 'string' != typeof depimuf || tisostick || herala[depimuf] ? tisostick ? !(gekostop = depimuf) : void 0 : (quemicho.dataTypes.unshift(depimuf), beengtukjom(depimuf), !1); | |
}), gekostop; | |
} | |
var herala = {}; | |
var tisostick = nuletab === jipigbir; | |
return beengtukjom(quemicho.dataTypes[0]) || !herala['*'] && beengtukjom('*'); | |
} | |
function sasasu(ithotap, eynenrim) { | |
var runudhep; | |
var finorul; | |
var ristefit = jQuery.ajaxSettings.flatOptions || {}; | |
for (runudhep in eynenrim) { | |
void 0 !== eynenrim[runudhep] && ((ristefit[runudhep] ? ithotap : finorul || (finorul = {}))[runudhep] = eynenrim[runudhep]); | |
} | |
return finorul && jQuery.extend(!0, ithotap, finorul), ithotap; | |
} | |
function pedotash(kefeco, tucisa, quebebup) { | |
for (var ustebik, jalncoker, sufenu, bayecu, frekunol = kefeco.contents, lamaxey = kefeco.dataTypes; | |
'*' === lamaxey[0]; | |
) { | |
lamaxey.shift(), void 0 === ustebik && (ustebik = kefeco.mimeType || tucisa.getResponseHeader('Content-Type')); | |
} | |
if (ustebik) { | |
for (jalncoker in frekunol) { | |
if (frekunol[jalncoker] && frekunol[jalncoker].test(ustebik)) { | |
lamaxey.unshift(jalncoker); | |
break; | |
} | |
} | |
} | |
if (lamaxey[0] in quebebup) { | |
sufenu = lamaxey[0]; | |
} else { | |
for (jalncoker in quebebup) { | |
if (!lamaxey[0] || kefeco.converters[jalncoker + ' ' + lamaxey[0]]) { | |
sufenu = jalncoker; | |
break; | |
} | |
bayecu || (bayecu = jalncoker); | |
} | |
sufenu = sufenu || bayecu; | |
} | |
return sufenu ? (sufenu !== lamaxey[0] && lamaxey.unshift(sufenu), quebebup[sufenu]) : void 0; | |
} | |
function jidadrub(stapason, jifimuf, difohoon, olhutbak) { | |
var doquaro; | |
var rususiey; | |
var sumati; | |
var jicono; | |
var eburul; | |
var bidaci = {}; | |
var ukmechmup = stapason.dataTypes.slice(); | |
if (ukmechmup[1]) { | |
for (sumati in stapason.converters) { | |
bidaci[sumati.toLowerCase()] = stapason.converters[sumati]; | |
} | |
} | |
for (rususiey = ukmechmup.shift(); | |
rususiey; | |
) { | |
if (stapason.responseFields[rususiey] && (difohoon[stapason.responseFields[rususiey]] = jifimuf), !eburul && olhutbak && stapason.dataFilter && (jifimuf = stapason.dataFilter(jifimuf, stapason.dataType)), eburul = rususiey, rususiey = ukmechmup.shift()) { | |
if ('*' === rususiey) { | |
rususiey = eburul; | |
} else if ('*' !== eburul && eburul !== rususiey) { | |
if (sumati = bidaci[eburul + ' ' + rususiey] || bidaci['* ' + rususiey], !sumati) { | |
for (doquaro in bidaci) { | |
if (jicono = doquaro.split(' '), jicono[1] === rususiey && (sumati = bidaci[eburul + ' ' + jicono[0]] || bidaci['* ' + jicono[0]])) { | |
sumati === !0 ? sumati = bidaci[doquaro] : bidaci[doquaro] !== !0 && (rususiey = jicono[0], ukmechmup.unshift(jicono[1])); | |
break; | |
} | |
} | |
} | |
if (sumati !== !0) { | |
if (sumati && stapason['throws']) { | |
jifimuf = sumati(jifimuf); | |
} else { | |
try { | |
jifimuf = sumati(jifimuf); | |
} catch (larigo) { | |
return { | |
state: 'parsererror', | |
error: sumati ? larigo : 'No conversion from ' + eburul + ' to ' + rususiey | |
}; | |
} | |
} | |
} | |
} | |
} | |
} | |
return { | |
state: 'success', | |
data: jifimuf | |
}; | |
} | |
function jihili(muchehoo, usmurnib, larateg, edlidog) { | |
var culuetreey; | |
if (jQuery.isArray(usmurnib)) { | |
jQuery.each(usmurnib, function(queceijou, frirupos) { | |
larateg || misadu.test(muchehoo) ? edlidog(muchehoo, frirupos) : jihili(muchehoo + '[' + ('object' == typeof frirupos ? queceijou : '') + ']', frirupos, larateg, edlidog); | |
}); | |
} else if (larateg || 'object' !== jQuery.type(usmurnib)) { | |
edlidog(muchehoo, usmurnib); | |
} else { | |
for (culuetreey in usmurnib) { | |
jihili(muchehoo + '[' + culuetreey + ']', usmurnib[culuetreey], larateg, edlidog) | |
} | |
} | |
} | |
function askackat(luquica) { | |
return jQuery.isWindow(luquica) ? luquica : 9 === luquica.nodeType && luquica.defaultView; | |
} | |
var kogabsem = []; | |
var calatquey = kogabsem.slice; | |
var cogugok = kogabsem.concat; | |
var quekibo = kogabsem.push; | |
var kekegaf = kogabsem.indexOf; | |
var rusedon = {}; | |
var obusrong = rusedon.toString; | |
var betifas = rusedon.hasOwnProperty; | |
var hihido = ''.trim; | |
var sasona = {}; | |
var soyengack = gosura.document; | |
var quonufas = '2.1.0'; | |
var jQuery = function(butoswue, nisalag) { | |
return new jQuery.fn.init(butoswue, nisalag); | |
}; | |
var beenefa = /^-ms-/; | |
var quegupi = /-([\da-z])/gi; | |
var hipluvu = function(trosesbek, rodaru) { | |
return rodaru.toUpperCase(); | |
}; | |
jQuery.fn = jQuery.prototype = { | |
jquery: quonufas, | |
constructor: jQuery, | |
selector: '', | |
length: 0, | |
toArray: function() { | |
return calatquey.call(this); | |
}, | |
get: function(gojiror) { | |
return null != gojiror ? 0 > gojiror ? this[gojiror + this.length] : this[gojiror] : calatquey.call(this); | |
}, | |
pushStack: function(gojenon) { | |
var sobeyol = jQuery.merge(this.constructor(), gojenon); | |
return sobeyol.prevObject = this, sobeyol.context = this.context, sobeyol; | |
}, | |
each: function(guequibay, jukrode) { | |
return jQuery.each(this, guequibay, jukrode); | |
}, | |
map: function(hibougi) { | |
return this.pushStack(jQuery.map(this, function(gigouhi, bayotheb) { | |
return hibougi.call(gigouhi, bayotheb, gigouhi); | |
})); | |
}, | |
slice: function() { | |
return this.pushStack(calatquey.apply(this, arguments)); | |
}, | |
first: function() { | |
return this.eq(0); | |
}, | |
last: function() { | |
return this.eq(-1); | |
}, | |
eq: function(cayolid) { | |
var hisuelak = this.length; | |
var kohueka = +cayolid + (0 > cayolid ? hisuelak : 0); | |
return this.pushStack(kohueka >= 0 && hisuelak > kohueka ? [this[kohueka]] : []); | |
}, | |
end: function() { | |
return this.prevObject || this.constructor(null); | |
}, | |
push: quekibo, | |
sort: kogabsem.sort, | |
splice: kogabsem.splice | |
}, jQuery.extend = jQuery.fn.extend = function() { | |
var flopucom; | |
var felolu; | |
var foduepa; | |
var tidojo; | |
var tekoseg; | |
var musheyix; | |
var mifimus = arguments[0] || {}; | |
var lacloko = 1; | |
var roseju = arguments.length; | |
var bipuref = !1; | |
for ('boolean' == typeof mifimus && (bipuref = mifimus, mifimus = arguments[lacloko] || {}, lacloko++), 'object' == typeof mifimus || jQuery.isFunction(mifimus) || (mifimus = {}), lacloko === roseju && (mifimus = this, lacloko--); | |
roseju > lacloko; | |
lacloko++) { | |
if (null != (flopucom = arguments[lacloko])) { | |
for (felolu in flopucom) { | |
foduepa = mifimus[felolu], tidojo = flopucom[felolu], mifimus !== tidojo && (bipuref && tidojo && (jQuery.isPlainObject(tidojo) || (tekoseg = jQuery.isArray(tidojo))) ? (tekoseg ? (tekoseg = !1, musheyix = foduepa && jQuery.isArray(foduepa) ? foduepa : []) : musheyix = foduepa && jQuery.isPlainObject(foduepa) ? foduepa : {}, mifimus[felolu] = jQuery.extend(bipuref, musheyix, tidojo)) : void 0 !== tidojo && (mifimus[felolu] = tidojo)); | |
} | |
} | |
} | |
return mifimus; | |
}, jQuery.extend({ | |
expando: 'jQuery' + (quonufas + Math.random()).replace(/\D/g, ''), | |
isReady: !0, | |
error: function(dipdukoom) { | |
throw new Error(dipdukoom) | |
}, | |
noop: function() {}, | |
isFunction: function(obulsten) { | |
return 'function' === jQuery.type(obulsten); | |
}, | |
isArray: Array.isArray, | |
isWindow: function(tihunif) { | |
return null != tihunif && tihunif === tihunif.window; | |
}, | |
isNumeric: function(gejufob) { | |
return gejufob - parseFloat(gejufob) >= 0; | |
}, | |
isPlainObject: function(shocori) { | |
if ('object' !== jQuery.type(shocori) || shocori.nodeType || jQuery.isWindow(shocori)) { | |
return !1; | |
} | |
try { | |
if (shocori.constructor && !betifas.call(shocori.constructor.prototype, 'isPrototypeOf')) { | |
return !1; | |
} | |
} catch (uspuskek) { | |
return !1; | |
} | |
return !0; | |
}, | |
isEmptyObject: function(glieridu) { | |
var fistidoul; | |
for (fistidoul in glieridu) { | |
return !1; | |
} | |
return !0; | |
}, | |
type: function(babofek) { | |
return null == babofek ? babofek + '' : 'object' == typeof babofek || 'function' == typeof babofek ? rusedon[obusrong.call(babofek)] || 'object' : typeof babofek; | |
}, | |
globalEval: function(juhusol) { | |
var bipida; | |
var hufara = eval; | |
juhusol = jQuery.trim(juhusol), juhusol && (1 === juhusol.indexOf('use strict') ? (bipida = soyengack.createElement('script'), bipida.text = juhusol, soyengack.head.appendChild(bipida).parentNode.removeChild(bipida)) : hufara(juhusol)); | |
}, | |
camelCase: function(utiftist) { | |
return utiftist.replace(beenefa, 'ms-').replace(quegupi, hipluvu); | |
}, | |
nodeName: function(azafok, ufdufsug) { | |
return azafok.nodeName && azafok.nodeName.toLowerCase() === ufdufsug.toLowerCase(); | |
}, | |
each: function(talaqui, jasecup, bumeda) { | |
var sequenuem; | |
var hetapi = 0; | |
var cafofep = talaqui.length; | |
var nadice = docadu(talaqui); | |
if (bumeda) { | |
if (nadice) { | |
for (; | |
cafofep > hetapi && (sequenuem = jasecup.apply(talaqui[hetapi], bumeda), sequenuem !== !1); | |
hetapi++) { | |
} | |
} else { | |
for (hetapi in talaqui) { | |
if (sequenuem = jasecup.apply(talaqui[hetapi], bumeda), sequenuem === !1) { | |
break | |
} | |
} | |
; | |
} | |
} else if (nadice) { | |
for (; | |
cafofep > hetapi && (sequenuem = jasecup.call(talaqui[hetapi], hetapi, talaqui[hetapi]), sequenuem !== !1); | |
hetapi++) { | |
} | |
} else { | |
for (hetapi in talaqui) { | |
if (sequenuem = jasecup.call(talaqui[hetapi], hetapi, talaqui[hetapi]), sequenuem === !1) { | |
break; | |
} | |
} | |
} | |
return talaqui; | |
}, | |
trim: function(tedriras) { | |
return null == tedriras ? '' : hihido.call(tedriras); | |
}, | |
makeArray: function(bicielo, rodournsun) { | |
var puhisu = rodournsun || []; | |
return null != bicielo && (docadu(Object(bicielo)) ? jQuery.merge(puhisu, 'string' == typeof bicielo ? [bicielo] : bicielo) : quekibo.call(puhisu, bicielo)), puhisu; | |
}, | |
inArray: function(hishedtob, sceyaney, segerud) { | |
return null == sceyaney ? -1 : kekegaf.call(sceyaney, hishedtob, segerud); | |
}, | |
merge: function(foloobi, urnierat) { | |
for (var truestrije = +urnierat.length, dimaque = 0, butejuk = foloobi.length; | |
truestrije > dimaque; | |
dimaque++) { | |
foloobi[butejuk++] = urnierat[dimaque]; | |
} | |
return foloobi.length = butejuk, foloobi; | |
}, | |
grep: function(paneflu, gerishu, sonouho) { | |
for (var quogacu, lagkafoup = [], katobeg = 0, lolooyos = paneflu.length, ipemjoud = !sonouho; | |
lolooyos > katobeg; | |
katobeg++) { | |
quogacu = !gerishu(paneflu[katobeg], katobeg), quogacu !== ipemjoud && lagkafoup.push(paneflu[katobeg]); | |
} | |
return lagkafoup; | |
}, | |
map: function(beefuna, alsigog, draroftof) { | |
var nuejuqua; | |
var robunouf = 0; | |
var josripa = beefuna.length; | |
var lepornook = docadu(beefuna); | |
var pockokof = []; | |
if (lepornook) { | |
for (; | |
josripa > robunouf; | |
robunouf++) { | |
nuejuqua = alsigog(beefuna[robunouf], robunouf, draroftof), null != nuejuqua && pockokof.push(nuejuqua); | |
} | |
} else { | |
for (robunouf in beefuna) { | |
nuejuqua = alsigog(beefuna[robunouf], robunouf, draroftof), null != nuejuqua && pockokof.push(nuejuqua); | |
} | |
} | |
return cogugok.apply([], pockokof); | |
}, | |
guid: 1, | |
proxy: function(afayir, kukpoupom) { | |
var feloje; | |
var doyofeb; | |
var besumush; | |
return 'string' == typeof kukpoupom && (feloje = afayir[kukpoupom], kukpoupom = afayir, afayir = feloje), jQuery.isFunction(afayir) ? (doyofeb = calatquey.call(arguments, 2), besumush = function() { | |
return afayir.apply(kukpoupom || this, doyofeb.concat(calatquey.call(arguments))); | |
}, besumush.guid = afayir.guid = afayir.guid || jQuery.guid++, besumush) : void 0; | |
}, | |
now: Date.now, | |
support: sasona | |
}), jQuery.each('Boolean Number String Function Array Date RegExp Object Error'.split(' '), function(mogundit, feslere) { | |
rusedon['[object ' + feslere + ']'] = feslere.toLowerCase(); | |
}); | |
var palubul = function(hirilin) { | |
function gudrogoy(nufadu, gudrogoy, sasruso, oguthquen) { | |
var fucipu; | |
var origut; | |
var nogoonut; | |
var hofjemish; | |
var beyodof; | |
var thoofema; | |
var pooquethey; | |
var politol; | |
var ochudak; | |
var bieltukag; | |
if ((gudrogoy ? gudrogoy.ownerDocument || gudrogoy : nahupa) !== kayetaf && kehojo(gudrogoy), gudrogoy = gudrogoy || kayetaf, sasruso = sasruso || [], !nufadu || 'string' != typeof nufadu) { | |
return sasruso; | |
} | |
if (1 !== (hofjemish = gudrogoy.nodeType) && 9 !== hofjemish) { | |
return []; | |
} | |
if (jeebopan && !oguthquen) { | |
if (fucipu = gosatub.exec(nufadu)) { | |
if (nogoonut = fucipu[1]) { | |
if (9 === hofjemish) { | |
if (origut = gudrogoy.getElementById(nogoonut), !origut || !origut.parentNode) { | |
return sasruso; | |
} | |
if (origut.id === nogoonut) { | |
return sasruso.push(origut), sasruso; | |
} | |
} else if (gudrogoy.ownerDocument && (origut = gudrogoy.ownerDocument.getElementById(nogoonut)) && quegeke(gudrogoy, origut) && origut.id === nogoonut) { | |
return sasruso.push(origut), sasruso; | |
} | |
} else { | |
if (fucipu[2]) { | |
return kegruqua.apply(sasruso, gudrogoy.getElementsByTagName(nufadu)), sasruso; | |
} | |
if ((nogoonut = fucipu[3]) && eduefoom.getElementsByClassName && gudrogoy.getElementsByClassName) { | |
return kegruqua.apply(sasruso, gudrogoy.getElementsByClassName(nogoonut)), sasruso; | |
} | |
} | |
} | |
if (eduefoom.qsa && (!imiepeb || !imiepeb.test(nufadu))) { | |
if (politol = pooquethey = drafugon, ochudak = gudrogoy, bieltukag = 9 === hofjemish && nufadu, 1 === hofjemish && 'object' !== gudrogoy.nodeName.toLowerCase()) { | |
for (thoofema = tinifmieg(nufadu), (pooquethey = gudrogoy.getAttribute('id')) ? politol = pooquethey.replace(truebadun, '\\$&') : gudrogoy.setAttribute('id', politol), politol = '[id=\'' + politol + '\'] ', beyodof = thoofema.length; | |
beyodof--; | |
) { | |
thoofema[beyodof] = politol + jitifri(thoofema[beyodof]); | |
} | |
ochudak = nopbugan.test(nufadu) && kloobodtey(gudrogoy.parentNode) || gudrogoy, bieltukag = thoofema.join(','); | |
} | |
if (bieltukag) { | |
try { | |
return kegruqua.apply(sasruso, ochudak.querySelectorAll(bieltukag)), sasruso; | |
} catch (bluglabi) {} finally { | |
pooquethey || gudrogoy.removeAttribute('id'); | |
} | |
} | |
} | |
} | |
return renire(nufadu.replace(athiged, '$1'), gudrogoy, sasruso, oguthquen); | |
} | |
function scutuegab() { | |
function bibloben(thutosu, noleja) { | |
return goquogo.push(thutosu + ' ') > prucoqua.cacheLength && | |
delete bibloben[goquogo.shift()] | |
, bibloben[thutosu + ' '] = noleja; | |
} | |
var goquogo = []; | |
return bibloben; | |
} | |
function tiehocu(kompikim) { | |
return kompikim[drafugon] = !0, kompikim; | |
} | |
function quolklutif(jeesisquin) { | |
var doumika = kayetaf.createElement('div'); | |
try { | |
return !!jeesisquin(doumika); | |
} catch (foubajat) { | |
return !1; | |
} finally { | |
doumika.parentNode && doumika.parentNode.removeChild(doumika), doumika = null; | |
} | |
} | |
function igibof(moruco, quequeley) { | |
for (var afieshies = moruco.split('|'), ornorog = moruco.length; | |
ornorog--; | |
) { | |
prucoqua.attrHandle[afieshies[ornorog]] = quequeley | |
} | |
} | |
function juhosoo(swatephu, fuceju) { | |
var sekife = fuceju && swatephu; | |
var kuneje = sekife && 1 === swatephu.nodeType && 1 === fuceju.nodeType && (~fuceju.sourceIndex || madreyung) - (~swatephu.sourceIndex || madreyung); | |
if (kuneje) { | |
return kuneje; | |
} | |
if (sekife) { | |
for (; | |
sekife = sekife.nextSibling; | |
) { | |
if (sekife === fuceju) { | |
return -1; | |
} | |
} | |
} | |
return swatephu ? 1 : -1; | |
} | |
function finufef(quicheho) { | |
return function(huhidi) { | |
var dafogi = huhidi.nodeName.toLowerCase(); | |
return 'input' === dafogi && huhidi.type === quicheho; | |
}; | |
} | |
function foflire(asomop) { | |
return function(kipisi) { | |
var klurigook = kipisi.nodeName.toLowerCase(); | |
return ('input' === klurigook || 'button' === klurigook) && kipisi.type === asomop; | |
}; | |
} | |
function gepesuern(fehuede) { | |
return tiehocu(function(gloleti) { | |
return gloleti = +gloleti, tiehocu(function(quehimi, streruho) { | |
for (var ubcatam, fipeque = fehuede([], quehimi.length, gloleti), gayares = fipeque.length; | |
gayares--; | |
) { | |
quehimi[ubcatam = fipeque[gayares]] && (quehimi[ubcatam] = !(streruho[ubcatam] = quehimi[ubcatam])) | |
} | |
}); | |
}); | |
} | |
function kloobodtey(quequicru) { | |
return quequicru && typeof quequicru.getElementsByTagName !== jeflehas && quequicru; | |
} | |
function obeyal() { | |
} | |
function tinifmieg(jolumut, danigin) { | |
var deyamit; | |
var natninkol; | |
var eshisas; | |
var inadik; | |
var susique; | |
var sookusor; | |
var dumougee; | |
var poderoo = sistroho[jolumut + ' ']; | |
if (poderoo) { | |
return danigin ? 0 : poderoo.slice(0); | |
} | |
for (susique = jolumut, sookusor = [], dumougee = prucoqua.preFilter; | |
susique; | |
) { | |
(!deyamit || (natninkol = upupur.exec(susique))) && (natninkol && (susique = susique.slice(natninkol[0].length) || susique), sookusor.push(eshisas = [])), deyamit = !1, (natninkol = epuelrul.exec(susique)) && (deyamit = natninkol.shift(), eshisas.push({ | |
value: deyamit, | |
type: natninkol[0].replace(athiged, ' ') | |
}), susique = susique.slice(deyamit.length)); | |
for (inadik in prucoqua.filter) { | |
!(natninkol = majure[inadik].exec(susique)) || dumougee[inadik] && !(natninkol = dumougee[inadik](natninkol)) || (deyamit = natninkol.shift(), eshisas.push({ | |
value: deyamit, | |
type: inadik, | |
matches: natninkol | |
}), susique = susique.slice(deyamit.length)); | |
} | |
if (!deyamit) { | |
break; | |
} | |
} | |
return danigin ? susique.length : susique ? comefu.error(jolumut) : sistroho(jolumut, sookusor).slice(0); | |
} | |
function jitifri(dasilu) { | |
for (var unquifooy = 0, duquocri = dasilu.length, osirun = ''; | |
duquocri > unquifooy; | |
unquifooy++) { | |
osirun += dasilu[unquifooy].value; | |
} | |
return osirun; | |
} | |
function quaniswi(lugihe, erlundoy, ornornes) { | |
var lotalnlub = erlundoy.dir; | |
var fluguteb = ornornes && 'parentNode' === lotalnlub; | |
var cisening = picotiel++; | |
return erlundoy.first ? function(diplefi, podika, agounbot) { | |
for (; | |
diplefi = diplefi[lotalnlub]; | |
) { | |
if (1 === diplefi.nodeType || fluguteb) { | |
return lugihe(diplefi, podika, agounbot) | |
} | |
; | |
} | |
} : function(fenforan, huedrerud, kelooro) { | |
var gefahoo; | |
var bropuepid; | |
var deyarab = [urekos, cisening]; | |
if (kelooro) { | |
for (; | |
fenforan = fenforan[lotalnlub]; | |
) { | |
if ((1 === fenforan.nodeType || fluguteb) && lugihe(fenforan, huedrerud, kelooro)) { | |
return !0 | |
} | |
; | |
} | |
} else { | |
for (; | |
fenforan = fenforan[lotalnlub]; | |
) { | |
if (1 === fenforan.nodeType || fluguteb) { | |
if (bropuepid = fenforan[drafugon] || (fenforan[drafugon] = {}), (gefahoo = bropuepid[lotalnlub]) && gefahoo[0] === urekos && gefahoo[1] === cisening) { | |
return deyarab[2] = gefahoo[2]; | |
} | |
if (bropuepid[lotalnlub] = deyarab, deyarab[2] = lugihe(fenforan, huedrerud, kelooro)) { | |
return !0; | |
} | |
} | |
} | |
} | |
}; | |
} | |
function seguhu(jobeyklus) { | |
return jobeyklus.length > 1 ? function(amufuf, blisugle, blugreli) { | |
for (var lideju = jobeyklus.length; | |
lideju--; | |
) { | |
if (!jobeyklus[lideju](amufuf, blisugle, blugreli)) { | |
return !1; | |
} | |
} | |
return !0; | |
} : jobeyklus[0]; | |
} | |
function paderuk(samirub, supado, ritbeypay, duhole, aghoufieb) { | |
for (var tojudrep, brabuchhey = [], ochepust = 0, queborag = samirub.length, oypefquel = null != supado; | |
queborag > ochepust; | |
ochepust++) { | |
(tojudrep = samirub[ochepust]) && (!ritbeypay || ritbeypay(tojudrep, duhole, aghoufieb)) && (brabuchhey.push(tojudrep), oypefquel && supado.push(ochepust)); | |
} | |
return brabuchhey; | |
} | |
function keerigo(flifeque, gupayan, leclabe, hapamoze, kogorut, kretiegscout) { | |
return hapamoze && !hapamoze[drafugon] && (hapamoze = keerigo(hapamoze)), kogorut && !kogorut[drafugon] && (kogorut = keerigo(kogorut, kretiegscout)), tiehocu(function(lagufe, cuclogid, nulomik, sabigo) { | |
var shusopat; | |
var beykliemes; | |
var dutitug; | |
var omepem = []; | |
var swuguklis = []; | |
var simanu = cuclogid.length; | |
var oyofag = lagufe || jidoswou(gupayan || '*', nulomik.nodeType ? [nulomik] : nulomik, []); | |
var burebu = !flifeque || !lagufe && gupayan ? oyofag : paderuk(oyofag, omepem, flifeque, nulomik, sabigo); | |
var tobiekop = leclabe ? kogorut || (lagufe ? flifeque : simanu || hapamoze) ? [] : cuclogid : burebu; | |
if (leclabe && leclabe(burebu, tobiekop, nulomik, sabigo), hapamoze) { | |
for (shusopat = paderuk(tobiekop, swuguklis), hapamoze(shusopat, [], nulomik, sabigo), beykliemes = shusopat.length; | |
beykliemes--; | |
) { | |
(dutitug = shusopat[beykliemes]) && (tobiekop[swuguklis[beykliemes]] = !(burebu[swuguklis[beykliemes]] = dutitug)); | |
} | |
} | |
if (lagufe) { | |
if (kogorut || flifeque) { | |
if (kogorut) { | |
for (shusopat = [], beykliemes = tobiekop.length; | |
beykliemes--; | |
) { | |
(dutitug = tobiekop[beykliemes]) && shusopat.push(burebu[beykliemes] = dutitug); | |
} | |
kogorut(null, tobiekop = [], shusopat, sabigo); | |
} | |
for (beykliemes = tobiekop.length; | |
beykliemes--; | |
) { | |
(dutitug = tobiekop[beykliemes]) && (shusopat = kogorut ? gerooyuk.call(lagufe, dutitug) : omepem[beykliemes]) > -1 && (lagufe[shusopat] = !(cuclogid[shusopat] = dutitug)) | |
} | |
} | |
} else { | |
tobiekop = paderuk(tobiekop === cuclogid ? tobiekop.splice(simanu, tobiekop.length) : tobiekop), kogorut ? kogorut(null, cuclogid, tobiekop, sabigo) : kegruqua.apply(cuclogid, tobiekop); | |
} | |
}); | |
} | |
function kajitim(toshoupmik) { | |
for (var futounup, nolote, hamoril, cenifu = toshoupmik.length, kiequosu = prucoqua.relative[toshoupmik[0].type], neefafaf = kiequosu || prucoqua.relative[' '], aptigim = kiequosu ? 1 : 0, odixur = quaniswi(function(japuecip) { | |
return japuecip === futounup; | |
}, neefafaf, !0), munonup = quaniswi(function(fojescub) { | |
return gerooyuk.call(futounup, fojescub) > -1; | |
}, neefafaf, !0), fruligri = [function(geternis, gopeeque, riebefi) { | |
return !kiequosu && (riebefi || gopeeque !== basafo) || ((futounup = gopeeque).nodeType ? odixur(geternis, gopeeque, riebefi) : munonup(geternis, gopeeque, riebefi)); | |
}]; | |
cenifu > aptigim; | |
aptigim++) { | |
if (nolote = prucoqua.relative[toshoupmik[aptigim].type]) { | |
fruligri = [quaniswi(seguhu(fruligri), nolote)]; | |
} else { | |
if (nolote = prucoqua.filter[toshoupmik[aptigim].type].apply(null, toshoupmik[aptigim].matches), nolote[drafugon]) { | |
for (hamoril = ++aptigim; | |
cenifu > hamoril && !prucoqua.relative[toshoupmik[hamoril].type]; | |
hamoril++) { | |
} | |
return keerigo(aptigim > 1 && seguhu(fruligri), aptigim > 1 && jitifri(toshoupmik.slice(0, aptigim - 1).concat({ | |
value: ' ' === toshoupmik[aptigim - 2].type ? '*' : '' | |
})).replace(athiged, '$1'), nolote, hamoril > aptigim && kajitim(toshoupmik.slice(aptigim, hamoril)), cenifu > hamoril && kajitim(toshoupmik = toshoupmik.slice(hamoril)), cenifu > hamoril && jitifri(toshoupmik)); | |
} | |
fruligri.push(nolote); | |
} | |
} | |
return seguhu(fruligri); | |
} | |
function jabolip(buquige, nilakern) { | |
var kebaked = nilakern.length > 0; | |
var rubrogos = buquige.length > 0; | |
var quomuerum = function(barifstam, scyefrer, nazirix, cokesno, foplelee) { | |
var oxonim; | |
var lekere; | |
var neyimum; | |
var piscumeb = 0; | |
var gogola = '0'; | |
var quageje = barifstam && []; | |
var camescug = []; | |
var lokifod = basafo; | |
var bosilrieck = barifstam || rubrogos && prucoqua.find.TAG('*', foplelee); | |
var idougip = urekos += null == lokifod ? 1 : Math.random() || .1; | |
var larabon = bosilrieck.length; | |
for (foplelee && (basafo = scyefrer !== kayetaf && scyefrer); | |
gogola !== larabon && null != (oxonim = bosilrieck[gogola]); | |
gogola++) { | |
if (rubrogos && oxonim) { | |
for (lekere = 0; | |
neyimum = buquige[lekere++]; | |
) { | |
if (neyimum(oxonim, scyefrer, nazirix)) { | |
cokesno.push(oxonim); | |
break; | |
} | |
} | |
foplelee && (urekos = idougip); | |
} | |
kebaked && ((oxonim = !neyimum && oxonim) && piscumeb--, barifstam && quageje.push(oxonim)); | |
} | |
if (piscumeb += gogola, kebaked && gogola !== piscumeb) { | |
for (lekere = 0; | |
neyimum = nilakern[lekere++]; | |
) { | |
neyimum(quageje, camescug, scyefrer, nazirix); | |
} | |
if (barifstam) { | |
if (piscumeb > 0) { | |
for (; | |
gogola--; | |
) { | |
quageje[gogola] || camescug[gogola] || (camescug[gogola] = lucokack.call(cokesno)); | |
} | |
} | |
camescug = paderuk(camescug); | |
} | |
kegruqua.apply(cokesno, camescug), foplelee && !barifstam && camescug.length > 0 && piscumeb + nilakern.length > 1 && comefu.uniqueSort(cokesno); | |
} | |
return foplelee && (urekos = idougip, basafo = lokifod), quageje; | |
}; | |
return kebaked ? tiehocu(quomuerum) : quomuerum; | |
} | |
function jidoswou(pedapra, pusanue, elueyster) { | |
for (var afurquex = 0, cecivo = pusanue.length; | |
cecivo > afurquex; | |
afurquex++) { | |
comefu(pedapra, pusanue[afurquex], elueyster); | |
} | |
return elueyster; | |
} | |
function renire(buebiphif, potice, notatoum, tocaquo) { | |
var nihoga; | |
var defbubaln; | |
var quotakun; | |
var kapureb; | |
var snithida; | |
var blorova = tinifmieg(buebiphif); | |
if (!tocaquo && 1 === blorova.length) { | |
if (defbubaln = blorova[0] = blorova[0].slice(0), defbubaln.length > 2 && 'ID' === (quotakun = defbubaln[0]).type && eduefoom.getById && 9 === potice.nodeType && jeebopan && prucoqua.relative[defbubaln[1].type]) { | |
if (potice = (prucoqua.find.ID(quotakun.matches[0].replace(ramefri, nolided), potice) || [])[0], !potice) { | |
return notatoum; | |
} | |
buebiphif = buebiphif.slice(defbubaln.shift().value.length); | |
} | |
for (nihoga = majure.needsContext.test(buebiphif) ? 0 : defbubaln.length; | |
nihoga-- && (quotakun = defbubaln[nihoga], !prucoqua.relative[kapureb = quotakun.type]); | |
) { | |
if ((snithida = prucoqua.find[kapureb]) && (tocaquo = snithida(quotakun.matches[0].replace(ramefri, nolided), nopbugan.test(defbubaln[0].type) && kloobodtey(potice.parentNode) || potice))) { | |
if (defbubaln.splice(nihoga, 1), buebiphif = tocaquo.length && jitifri(defbubaln), !buebiphif) { | |
return kegruqua.apply(notatoum, tocaquo), notatoum; | |
} | |
break; | |
} | |
} | |
} | |
return amidak(buebiphif, blorova)(tocaquo, potice, !jeebopan, notatoum, nopbugan.test(buebiphif) && kloobodtey(potice.parentNode) || potice), notatoum; | |
} | |
var quonitus; | |
var eduefoom; | |
var prucoqua; | |
var napecu; | |
var swemugak; | |
var amidak; | |
var basafo; | |
var joloce; | |
var snobagou; | |
var kehojo; | |
var kayetaf; | |
var napukbis; | |
var jeebopan; | |
var imiepeb; | |
var riginat; | |
var kriduswu; | |
var quegeke; | |
var drafugon = 'sizzle' + -new Date; | |
var nahupa = hirilin.document; | |
var urekos = 0; | |
var picotiel = 0; | |
var hideta = scutuegab(); | |
var sistroho = scutuegab(); | |
var goonkester = scutuegab(); | |
var tudolo = function(nenulloln, gugulbaf) { | |
return nenulloln === gugulbaf && (snobagou = !0), 0; | |
}; | |
var jeflehas = 'undefined'; | |
var madreyung = 1 << 31; | |
var quapifi = {}.hasOwnProperty; | |
var papootof = []; | |
var lucokack = papootof.pop; | |
var dufeju = papootof.push; | |
var kegruqua = papootof.push; | |
var pogoronk = papootof.slice; | |
var gerooyuk = papootof.indexOf || function(ginukum) { | |
for (var strisaquosk = 0, kusora = this.length; | |
kusora > strisaquosk; | |
strisaquosk++) { | |
if (this[strisaquosk] === ginukum) { | |
return strisaquosk; | |
} | |
} | |
return -1; | |
}; | |
var ilithon = 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped'; | |
var povipo = '[\\x20\\t\\r\\n\\f]'; | |
var noufatosh = '(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+'; | |
var ethumom = noufatosh.replace('w', 'w#'); | |
var lasare = '\\[' + povipo + '*(' + noufatosh + ')' + povipo + '*(?:([*^$|!~]?=)' + povipo + '*(?:([\'"])((?:\\\\.|[^\\\\])*?)\\3|(' + ethumom + ')|)|)' + povipo + '*\\]'; | |
var buquemo = ':(' + noufatosh + ')(?:\\((([\'"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|' + lasare.replace(3, 8) + ')*)|.*)\\)|)'; | |
var athiged = new RegExp('^' + povipo + '+|((?:^|[^\\\\])(?:\\\\.)*)' + povipo + '+$', 'g'); | |
var upupur = new RegExp('^' + povipo + '*,' + povipo + '*'); | |
var epuelrul = new RegExp('^' + povipo + '*([>+~]|' + povipo + ')' + povipo + '*'); | |
var tugibul = new RegExp('=' + povipo + '*([^\\]\'"]*?)' + povipo + '*\\]', 'g'); | |
var gabutu = new RegExp(buquemo); | |
var trosciskstop = new RegExp('^' + ethumom + '$'); | |
var majure = { | |
ID: new RegExp('^#(' + noufatosh + ')'), | |
CLASS: new RegExp('^\\.(' + noufatosh + ')'), | |
TAG: new RegExp('^(' + noufatosh.replace('w', 'w*') + ')'), | |
ATTR: new RegExp('^' + lasare), | |
PSEUDO: new RegExp('^' + buquemo), | |
CHILD: new RegExp('^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' + povipo + '*(even|odd|(([+-]|)(\\d*)n|)' + povipo + '*(?:([+-]|)' + povipo + '*(\\d+)|))' + povipo + '*\\)|)', 'i'), | |
bool: new RegExp('^(?:' + ilithon + ')$', 'i'), | |
needsContext: new RegExp('^' + povipo + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + povipo + '*((?:-\\d)?\\d*)' + povipo + '*\\)|)(?=[^-]|$)', 'i') | |
}; | |
var scufbrifook = /^(?:input|select|textarea|button)$/i; | |
var oyieskruze = /^h\d$/i; | |
var riepuso = /^[^{]+\{\s*\[native \w/; | |
var gosatub = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/; | |
var nopbugan = /[+~]/; | |
var truebadun = /'|\\/g; | |
var ramefri = new RegExp('\\\\([\\da-f]{1,6}' + povipo + '?|(' + povipo + ')|.)', 'ig'); | |
var nolided = function(snoukakil, iliroop, krurouko) { | |
var bimoune = '0x' + iliroop - 65536; | |
return bimoune !== bimoune || krurouko ? iliroop : 0 > bimoune ? String.fromCharCode(bimoune + 65536) : String.fromCharCode(bimoune >> 10 | 55296, 1023 & bimoune | 56320); | |
}; | |
try { | |
kegruqua.apply(papootof = pogoronk.call(nahupa.childNodes), nahupa.childNodes), papootof[nahupa.childNodes.length].nodeType; | |
} catch (kofocu) { | |
kegruqua = { | |
apply: papootof.length ? function(enufef, kodeklef) { | |
dufeju.apply(enufef, pogoronk.call(kodeklef)); | |
} : function(dubepla, nushiema) { | |
for (var ofabem = dubepla.length, blafecu = 0; | |
dubepla[ofabem++] = nushiema[blafecu++]; | |
) { | |
} | |
dubepla.length = ofabem - 1; | |
} | |
}; | |
} eduefoom = comefu.support = {}, swemugak = comefu.isXML = function(kladiden) { | |
var kifika = kladiden && (kladiden.ownerDocument || kladiden).documentElement; | |
return kifika ? 'HTML' !== kifika.nodeName : !1; | |
}, kehojo = comefu.setDocument = function(mabietal) { | |
var gononkin; | |
var kirhuenum = mabietal ? mabietal.ownerDocument || mabietal : nahupa; | |
var teeyumin = kirhuenum.defaultView; | |
return kirhuenum !== kayetaf && 9 === kirhuenum.nodeType && kirhuenum.documentElement ? (kayetaf = kirhuenum, napukbis = kirhuenum.documentElement, jeebopan = !swemugak(kirhuenum), teeyumin && teeyumin !== teeyumin.top && (teeyumin.addEventListener ? teeyumin.addEventListener('unload', function() { | |
kehojo(); | |
}, !1) : teeyumin.attachEvent && teeyumin.attachEvent('onunload', function() { | |
kehojo(); | |
})), eduefoom.attributes = quolklutif(function(bisukklom) { | |
return bisukklom.className = 'i', !bisukklom.getAttribute('className'); | |
}), eduefoom.getElementsByTagName = quolklutif(function(dupefop) { | |
return dupefop.appendChild(kirhuenum.createComment('')), !dupefop.getElementsByTagName('*').length; | |
}), eduefoom.getElementsByClassName = riepuso.test(kirhuenum.getElementsByClassName) && quolklutif(function(linounir) { | |
return linounir.innerHTML = '<div class=\'a\'></div><div class=\'a i\'></div>', linounir.firstChild.className = 'i', 2 === linounir.getElementsByClassName('i').length; | |
}), eduefoom.getById = quolklutif(function(rugosru) { | |
return napukbis.appendChild(rugosru).id = drafugon, !kirhuenum.getElementsByName || !kirhuenum.getElementsByName(drafugon).length; | |
}), eduefoom.getById ? (prucoqua.find.ID = function(sogoku, ledrubob) { | |
if (typeof ledrubob.getElementById !== jeflehas && jeebopan) { | |
var hukinay = ledrubob.getElementById(sogoku); | |
return hukinay && hukinay.parentNode ? [hukinay] : []; | |
} | |
}, prucoqua.filter.ID = function(gabaray) { | |
var uzeycoon = gabaray.replace(ramefri, nolided); | |
return function(agufeb) { | |
return agufeb.getAttribute('id') === uzeycoon; | |
}; | |
}) : ( | |
delete prucoqua.find.ID | |
, prucoqua.filter.ID = function(etstoskey) { | |
var tridule = etstoskey.replace(ramefri, nolided); | |
return function(geboluf) { | |
var wodumof = typeof geboluf.getAttributeNode !== jeflehas && geboluf.getAttributeNode('id'); | |
return wodumof && wodumof.value === tridule; | |
}; | |
}), prucoqua.find.TAG = eduefoom.getElementsByTagName ? function(semeti, kululik) { | |
return typeof kululik.getElementsByTagName !== jeflehas ? kululik.getElementsByTagName(semeti) : void 0; | |
} : function(abpooduep, teciquaf) { | |
var engotul; | |
var clooquuku = []; | |
var quonayom = 0; | |
var behesle = teciquaf.getElementsByTagName(abpooduep); | |
if ('*' === abpooduep) { | |
for (; | |
engotul = behesle[quonayom++]; | |
) { | |
1 === engotul.nodeType && clooquuku.push(engotul); | |
} | |
return clooquuku; | |
} | |
return behesle; | |
}, prucoqua.find.CLASS = eduefoom.getElementsByClassName && function(blakuce, tuneros) { | |
return typeof tuneros.getElementsByClassName !== jeflehas && jeebopan ? tuneros.getElementsByClassName(blakuce) : void 0; | |
}, riginat = [], imiepeb = [], (eduefoom.qsa = riepuso.test(kirhuenum.querySelectorAll)) && (quolklutif(function(fohayeg) { | |
fohayeg.innerHTML = '<select t=\'\'><option selected=\'\'></option></select>', fohayeg.querySelectorAll('[t^=\'\']').length && imiepeb.push('[*^$]=' + povipo + '*(?:\'\'|"")'), fohayeg.querySelectorAll('[selected]').length || imiepeb.push('\\[' + povipo + '*(?:value|' + ilithon + ')'), fohayeg.querySelectorAll(':checked').length || imiepeb.push(':checked'); | |
}), quolklutif(function(gagaydroze) { | |
var pilirup = kirhuenum.createElement('input'); | |
pilirup.setAttribute('type', 'hidden'), gagaydroze.appendChild(pilirup).setAttribute('name', 'D'), gagaydroze.querySelectorAll('[name=d]').length && imiepeb.push('name' + povipo + '*[*^$|!~]?='), gagaydroze.querySelectorAll(':enabled').length || imiepeb.push(':enabled', ':disabled'), gagaydroze.querySelectorAll('*,:x'), imiepeb.push(',.*:'); | |
})), (eduefoom.matchesSelector = riepuso.test(kriduswu = napukbis.webkitMatchesSelector || napukbis.mozMatchesSelector || napukbis.oMatchesSelector || napukbis.msMatchesSelector)) && quolklutif(function(focukab) { | |
eduefoom.disconnectedMatch = kriduswu.call(focukab, 'div'), kriduswu.call(focukab, '[s!=\'\']:x'), riginat.push('!=', buquemo); | |
}), imiepeb = imiepeb.length && new RegExp(imiepeb.join('|')), riginat = riginat.length && new RegExp(riginat.join('|')), gononkin = riepuso.test(napukbis.compareDocumentPosition), quegeke = gononkin || riepuso.test(napukbis.contains) ? function(ficute, bigicu) { | |
var desupo = 9 === ficute.nodeType ? ficute.documentElement : ficute; | |
var facufu = bigicu && bigicu.parentNode; | |
return ficute === facufu || !(!facufu || 1 !== facufu.nodeType || !(desupo.contains ? desupo.contains(facufu) : ficute.compareDocumentPosition && 16 & ficute.compareDocumentPosition(facufu))); | |
} : function(keklagest, luktetop) { | |
if (luktetop) { | |
for (; | |
luktetop = luktetop.parentNode; | |
) { | |
if (luktetop === keklagest) { | |
return !0; | |
} | |
} | |
} | |
return !1; | |
}, tudolo = gononkin ? function(fafopbud, domikas) { | |
if (fafopbud === domikas) { | |
return snobagou = !0, 0; | |
} | |
var naniloof = !fafopbud.compareDocumentPosition - !domikas.compareDocumentPosition; | |
return naniloof ? naniloof : (naniloof = (fafopbud.ownerDocument || fafopbud) === (domikas.ownerDocument || domikas) ? fafopbud.compareDocumentPosition(domikas) : 1, 1 & naniloof || !eduefoom.sortDetached && domikas.compareDocumentPosition(fafopbud) === naniloof ? fafopbud === kirhuenum || fafopbud.ownerDocument === nahupa && quegeke(nahupa, fafopbud) ? -1 : domikas === kirhuenum || domikas.ownerDocument === nahupa && quegeke(nahupa, domikas) ? 1 : joloce ? gerooyuk.call(joloce, fafopbud) - gerooyuk.call(joloce, domikas) : 0 : 4 & naniloof ? -1 : 1); | |
} : function(naceque, shanutri) { | |
if (naceque === shanutri) { | |
return snobagou = !0, 0; | |
} | |
var cocoobe; | |
var kilige = 0; | |
var eyundip = naceque.parentNode; | |
var sikikur = shanutri.parentNode; | |
var behupra = [naceque]; | |
var urosay = [shanutri]; | |
if (!eyundip || !sikikur) { | |
return naceque === kirhuenum ? -1 : shanutri === kirhuenum ? 1 : eyundip ? -1 : sikikur ? 1 : joloce ? gerooyuk.call(joloce, naceque) - gerooyuk.call(joloce, shanutri) : 0; | |
} | |
if (eyundip === sikikur) { | |
return juhosoo(naceque, shanutri); | |
} | |
for (cocoobe = naceque; | |
cocoobe = cocoobe.parentNode; | |
) { | |
behupra.unshift(cocoobe); | |
} | |
for (cocoobe = shanutri; | |
cocoobe = cocoobe.parentNode; | |
) { | |
urosay.unshift(cocoobe); | |
} | |
for (; | |
behupra[kilige] === urosay[kilige]; | |
) { | |
kilige++; | |
} | |
return kilige ? juhosoo(behupra[kilige], urosay[kilige]) : behupra[kilige] === nahupa ? -1 : urosay[kilige] === nahupa ? 1 : 0; | |
}, kirhuenum) : kayetaf; | |
}, comefu.matches = function(saqueli, juquefue) { | |
return comefu(saqueli, null, null, juquefue); | |
}, comefu.matchesSelector = function(ifpuktay, jedodu) { | |
if ((ifpuktay.ownerDocument || ifpuktay) !== kayetaf && kehojo(ifpuktay), jedodu = jedodu.replace(tugibul, '=\'$1\']'), !(!eduefoom.matchesSelector || !jeebopan || riginat && riginat.test(jedodu) || imiepeb && imiepeb.test(jedodu))) { | |
try { | |
var lolobou = kriduswu.call(ifpuktay, jedodu); | |
if (lolobou || eduefoom.disconnectedMatch || ifpuktay.document && 11 !== ifpuktay.document.nodeType) { | |
return lolobou; | |
} | |
} catch (ubener) {} | |
} | |
return comefu(jedodu, kayetaf, null, [ifpuktay]).length > 0; | |
}, comefu.contains = function(fusoupo, mahilap) { | |
return (fusoupo.ownerDocument || fusoupo) !== kayetaf && kehojo(fusoupo), quegeke(fusoupo, mahilap); | |
}, comefu.attr = function(apimek, phietakuen) { | |
(apimek.ownerDocument || apimek) !== kayetaf && kehojo(apimek); | |
var etapur = prucoqua.attrHandle[phietakuen.toLowerCase()]; | |
var laluku = etapur && quapifi.call(prucoqua.attrHandle, phietakuen.toLowerCase()) ? etapur(apimek, phietakuen, !jeebopan) : void 0; | |
return void 0 !== laluku ? laluku : eduefoom.attributes || !jeebopan ? apimek.getAttribute(phietakuen) : (laluku = apimek.getAttributeNode(phietakuen)) && laluku.specified ? laluku.value : null; | |
}, comefu.error = function(goladu) { | |
throw new Error('Syntax error, unrecognized expression: ' + goladu) | |
}, comefu.uniqueSort = function(foogulur) { | |
var dujogi; | |
var fesuje = []; | |
var gahora = 0; | |
var hujocli = 0; | |
if (snobagou = !eduefoom.detectDuplicates, joloce = !eduefoom.sortStable && foogulur.slice(0), foogulur.sort(tudolo), snobagou) { | |
for (; | |
dujogi = foogulur[hujocli++]; | |
) { | |
dujogi === foogulur[hujocli] && (gahora = fesuje.push(hujocli)); | |
} | |
for (; | |
gahora--; | |
) { | |
foogulur.splice(fesuje[gahora], 1) | |
} | |
} | |
return joloce = null, foogulur; | |
}, napecu = comefu.getText = function(jemonot) { | |
var rukotik; | |
var gefatquef = ''; | |
var jekeyot = 0; | |
var queybridin = jemonot.nodeType; | |
if (queybridin) { | |
if (1 === queybridin || 9 === queybridin || 11 === queybridin) { | |
if ('string' == typeof jemonot.textContent) { | |
return jemonot.textContent; | |
} | |
for (jemonot = jemonot.firstChild; | |
jemonot; | |
jemonot = jemonot.nextSibling) { | |
gefatquef += napecu(jemonot) | |
} | |
} else if (3 === queybridin || 4 === queybridin) { | |
return jemonot.nodeValue; | |
} | |
} else { | |
for (; | |
rukotik = jemonot[jekeyot++]; | |
) { | |
gefatquef += napecu(rukotik); | |
} | |
} | |
return gefatquef; | |
}, prucoqua = comefu.selectors = { | |
cacheLength: 50, | |
createPseudo: tiehocu, | |
match: majure, | |
attrHandle: {}, | |
find: {}, | |
relative: { | |
'>': { | |
dir: 'parentNode', | |
first: !0 | |
}, | |
' ': { | |
dir: 'parentNode' | |
}, | |
'+': { | |
dir: 'previousSibling', | |
first: !0 | |
}, | |
'~': { | |
dir: 'previousSibling' | |
} | |
}, | |
preFilter: { | |
ATTR: function(gimisey) { | |
return gimisey[1] = gimisey[1].replace(ramefri, nolided), gimisey[3] = (gimisey[4] || gimisey[5] || '').replace(ramefri, nolided), '~=' === gimisey[2] && (gimisey[3] = ' ' + gimisey[3] + ' '), gimisey.slice(0, 4); | |
}, | |
CHILD: function(stinanob) { | |
return stinanob[1] = stinanob[1].toLowerCase(), 'nth' === stinanob[1].slice(0, 3) ? (stinanob[3] || comefu.error(stinanob[0]), stinanob[4] = +(stinanob[4] ? stinanob[5] + (stinanob[6] || 1) : 2 * ('even' === stinanob[3] || 'odd' === stinanob[3])), stinanob[5] = +(stinanob[7] + stinanob[8] || 'odd' === stinanob[3])) : stinanob[3] && comefu.error(stinanob[0]), stinanob; | |
}, | |
PSEUDO: function(lourame) { | |
var nidijee; | |
var fadatot = !lourame[5] && lourame[2]; | |
return majure.CHILD.test(lourame[0]) ? null : (lourame[3] && void 0 !== lourame[4] ? lourame[2] = lourame[4] : fadatot && gabutu.test(fadatot) && (nidijee = tinifmieg(fadatot, !0)) && (nidijee = fadatot.indexOf(')', fadatot.length - nidijee) - fadatot.length) && (lourame[0] = lourame[0].slice(0, nidijee), lourame[2] = fadatot.slice(0, nidijee)), lourame.slice(0, 3)); | |
} | |
}, | |
filter: { | |
TAG: function(nameyoup) { | |
var bonubes = nameyoup.replace(ramefri, nolided).toLowerCase(); | |
return '*' === nameyoup ? function() { | |
return !0; | |
} : function(ugockquaf) { | |
return ugockquaf.nodeName && ugockquaf.nodeName.toLowerCase() === bonubes; | |
}; | |
}, | |
CLASS: function(hafosri) { | |
var micogoo = hideta[hafosri + ' ']; | |
return micogoo || (micogoo = new RegExp('(^|' + povipo + ')' + hafosri + '(' + povipo + '|$)')) && hideta(hafosri, function(bagoguep) { | |
return micogoo.test('string' == typeof bagoguep.className && bagoguep.className || typeof bagoguep.getAttribute !== jeflehas && bagoguep.getAttribute('class') || ''); | |
}); | |
}, | |
ATTR: function(pameyris, tatamay, pisaran) { | |
return function(quarode) { | |
var gesawoo = comefu.attr(quarode, pameyris); | |
return null == gesawoo ? '!=' === tatamay : tatamay ? (gesawoo += '', '=' === tatamay ? gesawoo === pisaran : '!=' === tatamay ? gesawoo !== pisaran : '^=' === tatamay ? pisaran && 0 === gesawoo.indexOf(pisaran) : '*=' === tatamay ? pisaran && gesawoo.indexOf(pisaran) > -1 : '$=' === tatamay ? pisaran && gesawoo.slice(-pisaran.length) === pisaran : '~=' === tatamay ? (' ' + gesawoo + ' ').indexOf(pisaran) > -1 : '|=' === tatamay ? gesawoo === pisaran || gesawoo.slice(0, pisaran.length + 1) === pisaran + '-' : !1) : !0; | |
}; | |
}, | |
CHILD: function(ogetos, jelomed, cohoji, jusaloo, askekim) { | |
var jiebipok = 'nth' !== ogetos.slice(0, 3); | |
var lushorep = 'last' !== ogetos.slice(-4); | |
var krimoge = 'of-type' === jelomed; | |
return 1 === jusaloo && 0 === askekim ? function(nibmousik) { | |
return !!nibmousik.parentNode; | |
} : function(disuepik, tufidey, decope) { | |
var plemubi; | |
var miriju; | |
var cigimfak; | |
var laleyag; | |
var gugewu; | |
var goofofik; | |
var robodruk = jiebipok !== lushorep ? 'nextSibling' : 'previousSibling'; | |
var dehicul = disuepik.parentNode; | |
var pizusha = krimoge && disuepik.nodeName.toLowerCase(); | |
var toeyurin = !decope && !krimoge; | |
if (dehicul) { | |
if (jiebipok) { | |
for (; | |
robodruk; | |
) { | |
for (cigimfak = disuepik; | |
cigimfak = cigimfak[robodruk]; | |
) { | |
if (krimoge ? cigimfak.nodeName.toLowerCase() === pizusha : 1 === cigimfak.nodeType) { | |
return !1; | |
} | |
} | |
goofofik = robodruk = 'only' === ogetos && !goofofik && 'nextSibling'; | |
} | |
return !0; | |
} | |
if (goofofik = [lushorep ? dehicul.firstChild : dehicul.lastChild], lushorep && toeyurin) { | |
for (miriju = dehicul[drafugon] || (dehicul[drafugon] = {}), plemubi = miriju[ogetos] || [], gugewu = plemubi[0] === urekos && plemubi[1], laleyag = plemubi[0] === urekos && plemubi[2], cigimfak = gugewu && dehicul.childNodes[gugewu]; | |
cigimfak = ++gugewu && cigimfak && cigimfak[robodruk] || (laleyag = gugewu = 0) || goofofik.pop(); | |
) { | |
if (1 === cigimfak.nodeType && ++laleyag && cigimfak === disuepik) { | |
miriju[ogetos] = [urekos, gugewu, laleyag]; | |
break; | |
} | |
} | |
} else if (toeyurin && (plemubi = (disuepik[drafugon] || (disuepik[drafugon] = {}))[ogetos]) && plemubi[0] === urekos) { | |
laleyag = plemubi[1]; | |
} else { | |
for (; | |
(cigimfak = ++gugewu && cigimfak && cigimfak[robodruk] || (laleyag = gugewu = 0) || goofofik.pop()) && ((krimoge ? cigimfak.nodeName.toLowerCase() !== pizusha : 1 !== cigimfak.nodeType) || !++laleyag || (toeyurin && ((cigimfak[drafugon] || (cigimfak[drafugon] = {}))[ogetos] = [urekos, laleyag]), cigimfak !== disuepik)); | |
) { | |
} | |
} | |
return laleyag -= askekim, laleyag === jusaloo || laleyag % jusaloo === 0 && laleyag / jusaloo >= 0; | |
} | |
}; | |
}, | |
PSEUDO: function(fufochi, apnasgeg) { | |
var disupog; | |
var gadurug = prucoqua.pseudos[fufochi] || prucoqua.setFilters[fufochi.toLowerCase()] || comefu.error('unsupported pseudo: ' + fufochi); | |
return gadurug[drafugon] ? gadurug(apnasgeg) : gadurug.length > 1 ? (disupog = [fufochi, fufochi, '', apnasgeg], prucoqua.setFilters.hasOwnProperty(fufochi.toLowerCase()) ? tiehocu(function(pekojeb, pupobey) { | |
for (var cumuso, rubecha = gadurug(pekojeb, apnasgeg), pepator = rubecha.length; | |
pepator--; | |
) { | |
cumuso = gerooyuk.call(pekojeb, rubecha[pepator]), pekojeb[cumuso] = !(pupobey[cumuso] = rubecha[pepator]) | |
} | |
}) : function(jacumo) { | |
return gadurug(jacumo, 0, disupog); | |
}) : gadurug; | |
} | |
}, | |
pseudos: { | |
not: tiehocu(function(luridqueck) { | |
var sujiede = []; | |
var exaphim = []; | |
var nitoppep = amidak(luridqueck.replace(athiged, '$1')); | |
return nitoppep[drafugon] ? tiehocu(function(kegeso, blasosi, gretuha, jecaca) { | |
for (var risooyeg, deproju = nitoppep(kegeso, null, jecaca, []), powupo = kegeso.length; | |
powupo--; | |
) { | |
(risooyeg = deproju[powupo]) && (kegeso[powupo] = !(blasosi[powupo] = risooyeg)) | |
} | |
}) : function(mubeve, segofu, bukotom) { | |
return sujiede[0] = mubeve, nitoppep(sujiede, null, bukotom, exaphim), !exaphim.pop(); | |
}; | |
}), | |
has: tiehocu(function(keerasnef) { | |
return function(tathibi) { | |
return comefu(keerasnef, tathibi).length > 0; | |
}; | |
}), | |
contains: tiehocu(function(coufomey) { | |
return function(lemigit) { | |
return (lemigit.textContent || lemigit.innerText || napecu(lemigit)).indexOf(coufomey) > -1; | |
}; | |
}), | |
lang: tiehocu(function(oshemkey) { | |
return trosciskstop.test(oshemkey || '') || comefu.error('unsupported lang: ' + oshemkey), oshemkey = oshemkey.replace(ramefri, nolided).toLowerCase(), function(quocudras) { | |
var ernexer; | |
do { | |
if (ernexer = jeebopan ? quocudras.lang : quocudras.getAttribute('xml:lang') || quocudras.getAttribute('lang')) { | |
return ernexer = ernexer.toLowerCase(), ernexer === oshemkey || 0 === ernexer.indexOf(oshemkey + '-'); | |
} | |
} while ((quocudras = quocudras.parentNode) && 1 === quocudras.nodeType); | |
return !1; | |
}; | |
}), | |
target: function(quiribok) { | |
var lukotru = hirilin.location && hirilin.location.hash; | |
return lukotru && lukotru.slice(1) === quiribok.id; | |
}, | |
root: function(feliklif) { | |
return feliklif === napukbis; | |
}, | |
focus: function(lihoka) { | |
return lihoka === kayetaf.activeElement && (!kayetaf.hasFocus || kayetaf.hasFocus()) && !!(lihoka.type || lihoka.href || ~lihoka.tabIndex); | |
}, | |
enabled: function(esakir) { | |
return esakir.disabled === !1; | |
}, | |
disabled: function(jupisi) { | |
return jupisi.disabled === !0; | |
}, | |
checked: function(diribar) { | |
var poothoca = diribar.nodeName.toLowerCase(); | |
return 'input' === poothoca && !!diribar.checked || 'option' === poothoca && !!diribar.selected; | |
}, | |
selected: function(defeque) { | |
return defeque.parentNode && defeque.parentNode.selectedIndex, defeque.selected === !0; | |
}, | |
empty: function(bethace) { | |
for (bethace = bethace.firstChild; | |
bethace; | |
bethace = bethace.nextSibling) { | |
if (bethace.nodeType < 6) { | |
return !1; | |
} | |
} | |
return !0; | |
}, | |
parent: function(hecure) { | |
return !prucoqua.pseudos.empty(hecure); | |
}, | |
header: function(lowasa) { | |
return oyieskruze.test(lowasa.nodeName); | |
}, | |
input: function(sejafup) { | |
return scufbrifook.test(sejafup.nodeName); | |
}, | |
button: function(quigurie) { | |
var jalouka = quigurie.nodeName.toLowerCase(); | |
return 'input' === jalouka && 'button' === quigurie.type || 'button' === jalouka; | |
}, | |
text: function(lonako) { | |
var pudonof; | |
return 'input' === lonako.nodeName.toLowerCase() && 'text' === lonako.type && (null == (pudonof = lonako.getAttribute('type')) || 'text' === pudonof.toLowerCase()); | |
}, | |
first: gepesuern(function() { | |
return [0]; | |
}), | |
last: gepesuern(function(duecedu, omarnes) { | |
return [omarnes - 1]; | |
}), | |
eq: gepesuern(function(aboput, gesiba, doboda) { | |
return [0 > doboda ? doboda + gesiba : doboda]; | |
}), | |
even: gepesuern(function(quifidab, layalek) { | |
for (var haslata = 0; | |
layalek > haslata; | |
haslata += 2) { | |
quifidab.push(haslata); | |
} | |
return quifidab; | |
}), | |
odd: gepesuern(function(sapoclo, klanturan) { | |
for (var subofid = 1; | |
klanturan > subofid; | |
subofid += 2) { | |
sapoclo.push(subofid); | |
} | |
return sapoclo; | |
}), | |
lt: gepesuern(function(carocru, drubabirn, kubuethlak) { | |
for (var rimapueb = 0 > kubuethlak ? kubuethlak + drubabirn : kubuethlak; | |
--rimapueb >= 0; | |
) { | |
carocru.push(rimapueb); | |
} | |
return carocru; | |
}), | |
gt: gepesuern(function(gotleyul, frihoopach, butineb) { | |
for (var dojedes = 0 > butineb ? butineb + frihoopach : butineb; | |
++dojedes < frihoopach; | |
) { | |
gotleyul.push(dojedes); | |
} | |
return gotleyul; | |
}) | |
} | |
}, prucoqua.pseudos.nth = prucoqua.pseudos.eq; | |
for (quonitus in {radio: !0, checkbox: !0, file: !0, password: !0, image: !0}) { | |
prucoqua.pseudos[quonitus] = finufef(quonitus); | |
} | |
for (quonitus in {submit: !0, reset: !0}) { | |
prucoqua.pseudos[quonitus] = foflire(quonitus); | |
} | |
return obeyal.prototype = prucoqua.filters = prucoqua.pseudos, prucoqua.setFilters = new obeyal, amidak = comefu.compile = function(fofrege, ferouhe) { | |
var duhoda; | |
var mubofoo = []; | |
var quebobo = []; | |
var dufepbrib = goonkester[fofrege + ' ']; | |
if (!dufepbrib) { | |
for (ferouhe || (ferouhe = tinifmieg(fofrege)), duhoda = ferouhe.length; | |
duhoda--; | |
) { | |
dufepbrib = kajitim(ferouhe[duhoda]), dufepbrib[drafugon] ? mubofoo.push(dufepbrib) : quebobo.push(dufepbrib); | |
} | |
dufepbrib = goonkester(fofrege, jabolip(quebobo, mubofoo)); | |
} | |
return dufepbrib; | |
}, eduefoom.sortStable = drafugon.split('').sort(tudolo).join('') === drafugon, eduefoom.detectDuplicates = !!snobagou, kehojo(), eduefoom.sortDetached = quolklutif(function(quekormum) { | |
return 1 & quekormum.compareDocumentPosition(kayetaf.createElement('div')); | |
}), quolklutif(function(duquatid) { | |
return duquatid.innerHTML = '<a href=\'#\'></a>', '#' === duquatid.firstChild.getAttribute('href'); | |
}) || igibof('type|href|height|width', function(sutuquo, kibimet, nifidof) { | |
return nifidof ? void 0 : sutuquo.getAttribute(kibimet, 'type' === kibimet.toLowerCase() ? 1 : 2); | |
}), eduefoom.attributes && quolklutif(function(bribelof) { | |
return bribelof.innerHTML = '<input/>', bribelof.firstChild.setAttribute('value', ''), '' === bribelof.firstChild.getAttribute('value'); | |
}) || igibof('value', function(fodobun, niekulus, roonutbem) { | |
return roonutbem || 'input' !== fodobun.nodeName.toLowerCase() ? void 0 : fodobun.defaultValue; | |
}), quolklutif(function(quefoeyiy) { | |
return null == quefoeyiy.getAttribute('disabled'); | |
}) || igibof(ilithon, function(nuseho, usayir, uckeybral) { | |
var pugufle; | |
return uckeybral ? void 0 : nuseho[usayir] === !0 ? usayir.toLowerCase() : (pugufle = nuseho.getAttributeNode(usayir)) && pugufle.specified ? pugufle.value : null; | |
}), comefu; | |
}(gosura); | |
jQuery.find = palubul, jQuery.expr = palubul.selectors, jQuery.expr[':'] = jQuery.expr.pseudos, jQuery.unique = palubul.uniqueSort, jQuery.text = palubul.getText, jQuery.isXMLDoc = palubul.isXML, jQuery.contains = palubul.contains; | |
var curnesey = jQuery.expr.match.needsContext; | |
var suesunueb = /^<(\w+)\s*\/?>(?:<\/\1>|)$/; | |
var kubuley = /^.[^:#\[\.,]*$/; | |
jQuery.filter = function(houdoja, igibop, misato) { | |
var quiviquo = igibop[0]; | |
return misato && (houdoja = ':not(' + houdoja + ')'), 1 === igibop.length && 1 === quiviquo.nodeType ? jQuery.find.matchesSelector(quiviquo, houdoja) ? [quiviquo] : [] : jQuery.find.matches(houdoja, jQuery.grep(igibop, function(grihipef) { | |
return 1 === grihipef.nodeType; | |
})); | |
}, jQuery.fn.extend({ | |
find: function(kegubu) { | |
var pethife; | |
var gigtosur = this.length; | |
var nehudop = []; | |
var egurin = this; | |
if ('string' != typeof kegubu) { | |
return this.pushStack(jQuery(kegubu).filter(function() { | |
for (pethife = 0; | |
gigtosur > pethife; | |
pethife++) { | |
if (jQuery.contains(egurin[pethife], this)) { | |
return !0 | |
} | |
; | |
} | |
})); | |
} | |
for (pethife = 0; | |
gigtosur > pethife; | |
pethife++) { | |
jQuery.find(kegubu, egurin[pethife], nehudop); | |
} | |
return nehudop = this.pushStack(gigtosur > 1 ? jQuery.unique(nehudop) : nehudop), nehudop.selector = this.selector ? this.selector + ' ' + kegubu : kegubu, nehudop; | |
}, | |
filter: function(tupgunam) { | |
return this.pushStack(cropuba(this, tupgunam || [], !1)); | |
}, | |
not: function(masegim) { | |
return this.pushStack(cropuba(this, masegim || [], !0)); | |
}, | |
is: function(fibimo) { | |
return !!cropuba(this, 'string' == typeof fibimo && curnesey.test(fibimo) ? jQuery(fibimo) : fibimo || [], !1).length; | |
} | |
}); | |
var anineng; | |
var asulgank = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/; | |
var papepal = jQuery.fn.init = function(niphuga, youjecra) { | |
var giejomo; | |
var toreboor; | |
if (!niphuga) { | |
return this; | |
} | |
if ('string' == typeof niphuga) { | |
if (giejomo = '<' === niphuga[0] && '>' === niphuga[niphuga.length - 1] && niphuga.length >= 3 ? [null, niphuga, null] : asulgank.exec(niphuga), !giejomo || !giejomo[1] && youjecra) { | |
return !youjecra || youjecra.jquery ? (youjecra || anineng).find(niphuga) : this.constructor(youjecra).find(niphuga); | |
} | |
if (giejomo[1]) { | |
if (youjecra = youjecra instanceof jQuery ? youjecra[0] : youjecra, jQuery.merge(this, jQuery.parseHTML(giejomo[1], youjecra && youjecra.nodeType ? youjecra.ownerDocument || youjecra : soyengack, !0)), suesunueb.test(giejomo[1]) && jQuery.isPlainObject(youjecra)) { | |
for (giejomo in youjecra) { | |
jQuery.isFunction(this[giejomo]) ? this[giejomo](youjecra[giejomo]) : this.attr(giejomo, youjecra[giejomo]); | |
} | |
} | |
return this; | |
} | |
return toreboor = soyengack.getElementById(giejomo[2]), toreboor && toreboor.parentNode && (this.length = 1, this[0] = toreboor), this.context = soyengack, this.selector = niphuga, this; | |
} | |
return niphuga.nodeType ? (this.context = this[0] = niphuga, this.length = 1, this) : jQuery.isFunction(niphuga) ? 'undefined' != typeof anineng.ready ? anineng.ready(niphuga) : niphuga(jQuery) : (void 0 !== niphuga.selector && (this.selector = niphuga.selector, this.context = niphuga.context), jQuery.makeArray(niphuga, this)); | |
}; | |
papepal.prototype = jQuery.fn, anineng = jQuery(soyengack); | |
var snuenuba = /^(?:parents|prev(?:Until|All))/; | |
var siboco = { | |
children: !0, | |
contents: !0, | |
next: !0, | |
prev: !0 | |
}; | |
jQuery.extend({ | |
dir: function(rofuepra, bupofub, cohocob) { | |
for (var gudaruch = [], maqueru = void 0 !== cohocob; | |
(rofuepra = rofuepra[bupofub]) && 9 !== rofuepra.nodeType; | |
) { | |
if (1 === rofuepra.nodeType) { | |
if (maqueru && jQuery(rofuepra).is(cohocob)) { | |
break; | |
} | |
gudaruch.push(rofuepra); | |
} | |
} | |
return gudaruch; | |
}, | |
sibling: function(ungegan, ruhatey) { | |
for (var hilade = []; | |
ungegan; | |
ungegan = ungegan.nextSibling) { | |
1 === ungegan.nodeType && ungegan !== ruhatey && hilade.push(ungegan); | |
} | |
return hilade; | |
} | |
}), jQuery.fn.extend({ | |
has: function(dahorin) { | |
var bokique = jQuery(dahorin, this); | |
var scunushor = bokique.length; | |
return this.filter(function() { | |
for (var lubamud = 0; | |
scunushor > lubamud; | |
lubamud++) { | |
if (jQuery.contains(this, bokique[lubamud])) { | |
return !0 | |
} | |
; | |
} | |
}); | |
}, | |
closest: function(pupepey, ukackus) { | |
for (var bapoten, bagonar = 0, duquesa = this.length, bikofue = [], seprekob = curnesey.test(pupepey) || 'string' != typeof pupepey ? jQuery(pupepey, ukackus || this.context) : 0; | |
duquesa > bagonar; | |
bagonar++) { | |
for (bapoten = this[bagonar]; | |
bapoten && bapoten !== ukackus; | |
bapoten = bapoten.parentNode) { | |
if (bapoten.nodeType < 11 && (seprekob ? seprekob.index(bapoten) > -1 : 1 === bapoten.nodeType && jQuery.find.matchesSelector(bapoten, pupepey))) { | |
bikofue.push(bapoten); | |
break; | |
} | |
} | |
} | |
return this.pushStack(bikofue.length > 1 ? jQuery.unique(bikofue) : bikofue); | |
}, | |
index: function(nuquoso) { | |
return nuquoso ? 'string' == typeof nuquoso ? kekegaf.call(jQuery(nuquoso), this[0]) : kekegaf.call(this, nuquoso.jquery ? nuquoso[0] : nuquoso) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1; | |
}, | |
add: function(rosimo, udunir) { | |
return this.pushStack(jQuery.unique(jQuery.merge(this.get(), jQuery(rosimo, udunir)))); | |
}, | |
addBack: function(frougobeth) { | |
return this.add(null == frougobeth ? this.prevObject : this.prevObject.filter(frougobeth)); | |
} | |
}), jQuery.each({ | |
parent: function(quageco) { | |
var daxipousk = quageco.parentNode; | |
return daxipousk && 11 !== daxipousk.nodeType ? daxipousk : null; | |
}, | |
parents: function(oreloob) { | |
return jQuery.dir(oreloob, 'parentNode'); | |
}, | |
parentsUntil: function(kunepi, puscubed, dofuqua) { | |
return jQuery.dir(kunepi, 'parentNode', dofuqua); | |
}, | |
next: function(vomuga) { | |
return gedisip(vomuga, 'nextSibling'); | |
}, | |
prev: function(quunofook) { | |
return gedisip(quunofook, 'previousSibling'); | |
}, | |
nextAll: function(nestoopdab) { | |
return jQuery.dir(nestoopdab, 'nextSibling'); | |
}, | |
prevAll: function(egumam) { | |
return jQuery.dir(egumam, 'previousSibling'); | |
}, | |
nextUntil: function(kabumut, najasu, cinkobib) { | |
return jQuery.dir(kabumut, 'nextSibling', cinkobib); | |
}, | |
prevUntil: function(quinupe, nabiha, oskeydron) { | |
return jQuery.dir(quinupe, 'previousSibling', oskeydron); | |
}, | |
siblings: function(swekolang) { | |
return jQuery.sibling((swekolang.parentNode || {}).firstChild, swekolang); | |
}, | |
children: function(flerimi) { | |
return jQuery.sibling(flerimi.firstChild); | |
}, | |
contents: function(doopoma) { | |
return doopoma.contentDocument || jQuery.merge([], doopoma.childNodes); | |
} | |
}, function(ibedoosh, githabla) { | |
jQuery.fn[ibedoosh] = function(najojous, biepufnap) { | |
var jolidu = jQuery.map(this, githabla, najojous); | |
return 'Until' !== ibedoosh.slice(-5) && (biepufnap = najojous), biepufnap && 'string' == typeof biepufnap && (jolidu = jQuery.filter(biepufnap, jolidu)), this.length > 1 && (siboco[ibedoosh] || jQuery.unique(jolidu), snuenuba.test(ibedoosh) && jolidu.reverse()), this.pushStack(jolidu); | |
}; | |
}); | |
var nikisi = /\S+/g; | |
var mafinize = {}; | |
jQuery.Callbacks = function(roneyul) { | |
roneyul = 'string' == typeof roneyul ? mafinize[roneyul] || scinedloup(roneyul) : jQuery.extend({}, roneyul); | |
var pucirop; | |
var ikumod; | |
var geporuen; | |
var jisumos; | |
var mesnenar; | |
var isilun; | |
var ligalip = []; | |
var tisaci = !roneyul.once && []; | |
var isolor = function(lewouquock) { | |
for (pucirop = roneyul.memory && lewouquock, ikumod = !0, isilun = jisumos || 0, jisumos = 0, mesnenar = ligalip.length, geporuen = !0; | |
ligalip && mesnenar > isilun; | |
isilun++) { | |
if (ligalip[isilun].apply(lewouquock[0], lewouquock[1]) === !1 && roneyul.stopOnFalse) { | |
pucirop = !1; | |
break; | |
} | |
} | |
geporuen = !1, ligalip && (tisaci ? tisaci.length && isolor(tisaci.shift()) : pucirop ? ligalip = [] : maquebob.disable()); | |
}; | |
var maquebob = { | |
add: function() { | |
if (ligalip) { | |
var bekoque = ligalip.length; | |
!function juswuru(jisemag) { | |
jQuery.each(jisemag, function(hopodrey, kijenis) { | |
var quenimi = jQuery.type(kijenis); | |
'function' === quenimi ? roneyul.unique && maquebob.has(kijenis) || ligalip.push(kijenis) : kijenis && kijenis.length && 'string' !== quenimi && juswuru(kijenis); | |
}); | |
}(arguments), geporuen ? mesnenar = ligalip.length : pucirop && (jisumos = bekoque, isolor(pucirop)); | |
} | |
return this; | |
}, | |
remove: function() { | |
return ligalip && jQuery.each(arguments, function(ulnquenod, buditu) { | |
for (var tikriti; | |
(tikriti = jQuery.inArray(buditu, ligalip, tikriti)) > -1; | |
) { | |
ligalip.splice(tikriti, 1), geporuen && (mesnenar >= tikriti && mesnenar--, isilun >= tikriti && isilun--) | |
} | |
}), this; | |
}, | |
has: function(negige) { | |
return negige ? jQuery.inArray(negige, ligalip) > -1 : !(!ligalip || !ligalip.length); | |
}, | |
empty: function() { | |
return ligalip = [], mesnenar = 0, this; | |
}, | |
disable: function() { | |
return ligalip = tisaci = pucirop = void 0, this; | |
}, | |
disabled: function() { | |
return !ligalip; | |
}, | |
lock: function() { | |
return tisaci = void 0, pucirop || maquebob.disable(), this; | |
}, | |
locked: function() { | |
return !tisaci; | |
}, | |
fireWith: function(mistroga, itquiftak) { | |
return !ligalip || ikumod && !tisaci || (itquiftak = itquiftak || [], itquiftak = [mistroga, itquiftak.slice ? itquiftak.slice() : itquiftak], geporuen ? tisaci.push(itquiftak) : isolor(itquiftak)), this; | |
}, | |
fire: function() { | |
return maquebob.fireWith(this, arguments), this; | |
}, | |
fired: function() { | |
return !!ikumod; | |
} | |
}; | |
return maquebob; | |
}, jQuery.extend({ | |
Deferred: function(frelaque) { | |
var gouhunad = [['resolve', 'done', jQuery.Callbacks('once memory'), 'resolved'], ['reject', 'fail', jQuery.Callbacks('once memory'), 'rejected'], ['notify', 'progress', jQuery.Callbacks('memory')]]; | |
var kolidil = 'pending'; | |
var kulihi = { | |
state: function() { | |
return kolidil; | |
}, | |
always: function() { | |
return usickab.done(arguments).fail(arguments), this; | |
}, | |
then: function() { | |
var obugnot = arguments; | |
return jQuery.Deferred(function(datiquay) { | |
jQuery.each(gouhunad, function(wuerapa, edokef) { | |
var sekrome = jQuery.isFunction(obugnot[wuerapa]) && obugnot[wuerapa]; | |
usickab[edokef[1]](function() { | |
var pidurhim = sekrome && sekrome.apply(this, arguments); | |
pidurhim && jQuery.isFunction(pidurhim.promise) ? pidurhim.promise().done(datiquay.resolve).fail(datiquay.reject).progress(datiquay.notify) : datiquay[edokef[0] + 'With'](this === kulihi ? datiquay.promise() : this, sekrome ? [pidurhim] : arguments); | |
}); | |
}), obugnot = null; | |
}).promise(); | |
}, | |
promise: function(drapufub) { | |
return null != drapufub ? jQuery.extend(drapufub, kulihi) : kulihi; | |
} | |
}; | |
var usickab = {}; | |
return kulihi.pipe = kulihi.then, jQuery.each(gouhunad, function(ragumad, kihirad) { | |
var rupuquey = kihirad[2]; | |
var yihuekup = kihirad[3]; | |
kulihi[kihirad[1]] = rupuquey.add, yihuekup && rupuquey.add(function() { | |
kolidil = yihuekup; | |
}, gouhunad[1 ^ ragumad][2].disable, gouhunad[2][2].lock), usickab[kihirad[0]] = function() { | |
return usickab[kihirad[0] + 'With'](this === usickab ? kulihi : this, arguments), this; | |
}, usickab[kihirad[0] + 'With'] = rupuquey.fireWith; | |
}), kulihi.promise(usickab), frelaque && frelaque.call(usickab, usickab), usickab; | |
}, | |
when: function(culasor) { | |
var jalinol; | |
var jabeyier; | |
var godigle; | |
var criplute = 0; | |
var goojooje = calatquey.call(arguments); | |
var juhida = goojooje.length; | |
var dirugul = 1 !== juhida || culasor && jQuery.isFunction(culasor.promise) ? juhida : 0; | |
var queshotu = 1 === dirugul ? culasor : jQuery.Deferred(); | |
var jotoudroof = function(nagafi, statestish, epanik) { | |
return function(snopufi) { | |
statestish[nagafi] = this, epanik[nagafi] = arguments.length > 1 ? calatquey.call(arguments) : snopufi, epanik === jalinol ? queshotu.notifyWith(statestish, epanik) : --dirugul || queshotu.resolveWith(statestish, epanik); | |
}; | |
}; | |
if (juhida > 1) { | |
for (jalinol = new Array(juhida), jabeyier = new Array(juhida), godigle = new Array(juhida); | |
juhida > criplute; | |
criplute++) { | |
goojooje[criplute] && jQuery.isFunction(goojooje[criplute].promise) ? goojooje[criplute].promise().done(jotoudroof(criplute, godigle, goojooje)).fail(queshotu.reject).progress(jotoudroof(criplute, jabeyier, jalinol)) : --dirugul; | |
} | |
} | |
return dirugul || queshotu.resolveWith(godigle, goojooje), queshotu.promise(); | |
} | |
}); | |
var chudoco; | |
jQuery.fn.ready = function(omletim) { | |
return jQuery.ready.promise().done(omletim), this; | |
}, jQuery.extend({ | |
isReady: !1, | |
readyWait: 1, | |
holdReady: function(imkatom) { | |
imkatom ? jQuery.readyWait++ : jQuery.ready(!0); | |
}, | |
ready: function(dafienen) { | |
(dafienen === !0 ? --jQuery.readyWait : jQuery.isReady) || (jQuery.isReady = !0, dafienen !== !0 && --jQuery.readyWait > 0 || (chudoco.resolveWith(soyengack, [jQuery]), jQuery.fn.trigger && jQuery(soyengack).trigger('ready').off('ready'))); | |
} | |
}), jQuery.ready.promise = function(lubatug) { | |
return chudoco || (chudoco = jQuery.Deferred(), 'complete' === soyengack.readyState ? setTimeout(jQuery.ready) : (soyengack.addEventListener('DOMContentLoaded', gupopey, !1), gosura.addEventListener('load', gupopey, !1))), chudoco.promise(lubatug); | |
}, jQuery.ready.promise(); | |
var toupiki = jQuery.access = function(tafiko, sokogus, cupuphu, qualtarur, ipampab, jajuhu, receso) { | |
var nietistin = 0; | |
var wimope = tafiko.length; | |
var krojifueg = null == cupuphu; | |
if ('object' === jQuery.type(cupuphu)) { | |
ipampab = !0; | |
for (nietistin in cupuphu) { | |
jQuery.access(tafiko, sokogus, nietistin, cupuphu[nietistin], !0, jajuhu, receso) | |
} | |
} else if (void 0 !== qualtarur && (ipampab = !0, jQuery.isFunction(qualtarur) || (receso = !0), krojifueg && (receso ? (sokogus.call(tafiko, qualtarur), sokogus = null) : (krojifueg = sokogus, sokogus = function(onumip, nojuesra, dueredan) { | |
return krojifueg.call(jQuery(onumip), dueredan); | |
})), sokogus)) { | |
for (; | |
wimope > nietistin; | |
nietistin++) { | |
sokogus(tafiko[nietistin], cupuphu, receso ? qualtarur : qualtarur.call(tafiko[nietistin], nietistin, sokogus(tafiko[nietistin], cupuphu))); | |
} | |
} | |
return ipampab ? tafiko : krojifueg ? sokogus.call(tafiko) : wimope ? sokogus(tafiko[0], cupuphu) : jajuhu; | |
}; | |
jQuery.acceptData = function(cusunal) { | |
return 1 === cusunal.nodeType || 9 === cusunal.nodeType || !+cusunal.nodeType; | |
}, hahatool.uid = 1, hahatool.accepts = jQuery.acceptData, hahatool.prototype = { | |
key: function(nidaloy) { | |
if (!hahatool.accepts(nidaloy)) { | |
return 0; | |
} | |
var eririf = {}; | |
var naqueter = nidaloy[this.expando]; | |
if (!naqueter) { | |
naqueter = hahatool.uid++; | |
try { | |
eririf[this.expando] = { | |
value: naqueter | |
}, Object.defineProperties(nidaloy, eririf); | |
} catch (bohicho) { | |
eririf[this.expando] = naqueter, jQuery.extend(nidaloy, eririf); | |
} | |
} | |
return this.cache[naqueter] || (this.cache[naqueter] = {}), naqueter; | |
}, | |
set: function(naquepro, gilugep, erornus) { | |
var nemumu; | |
var boumoltal = this.key(naquepro); | |
var hoyotir = this.cache[boumoltal]; | |
if ('string' == typeof gilugep) { | |
hoyotir[gilugep] = erornus; | |
} else if (jQuery.isEmptyObject(hoyotir)) { | |
jQuery.extend(this.cache[boumoltal], gilugep); | |
} else { | |
for (nemumu in gilugep) { | |
hoyotir[nemumu] = gilugep[nemumu]; | |
} | |
} | |
return hoyotir; | |
}, | |
get: function(fatreta, uripon) { | |
var usabith = this.cache[this.key(fatreta)]; | |
return void 0 === uripon ? usabith : usabith[uripon]; | |
}, | |
access: function(igayek, drebegog, jenquepak) { | |
var mamuti; | |
return void 0 === drebegog || drebegog && 'string' == typeof drebegog && void 0 === jenquepak ? (mamuti = this.get(igayek, drebegog), void 0 !== mamuti ? mamuti : this.get(igayek, jQuery.camelCase(drebegog))) : (this.set(igayek, drebegog, jenquepak), void 0 !== jenquepak ? jenquepak : drebegog); | |
}, | |
remove: function(srunibusk, tojise) { | |
var vifadi; | |
var hafisuf; | |
var jecaca; | |
var strokire = this.key(srunibusk); | |
var nuenece = this.cache[strokire]; | |
if (void 0 === tojise) { | |
this.cache[strokire] = {}; | |
} else { | |
jQuery.isArray(tojise) ? hafisuf = tojise.concat(tojise.map(jQuery.camelCase)) : (jecaca = jQuery.camelCase(tojise), tojise in nuenece ? hafisuf = [tojise, jecaca] : (hafisuf = jecaca, hafisuf = hafisuf in nuenece ? [hafisuf] : hafisuf.match(nikisi) || [])), vifadi = hafisuf.length; | |
for (; | |
vifadi--; | |
) { | |
delete nuenece[hafisuf[vifadi]] | |
} | |
} | |
}, | |
hasData: function(jugorim) { | |
return !jQuery.isEmptyObject(this.cache[jugorim[this.expando]] || {}); | |
}, | |
discard: function(codoglof) { | |
codoglof[this.expando] && | |
delete this.cache[codoglof[this.expando]]; | |
} | |
}; | |
var diskayos = new hahatool; | |
var vupequa = new hahatool; | |
var lirequa = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/; | |
var heenefi = /([A-Z])/g; | |
jQuery.extend({ | |
hasData: function(jajuti) { | |
return vupequa.hasData(jajuti) || diskayos.hasData(jajuti); | |
}, | |
data: function(olobod, cusiso, lisubi) { | |
return vupequa.access(olobod, cusiso, lisubi); | |
}, | |
removeData: function(higangup, budati) { | |
vupequa.remove(higangup, budati); | |
}, | |
_data: function(janirey, gowostrie, difoko) { | |
return diskayos.access(janirey, gowostrie, difoko); | |
}, | |
_removeData: function(dinular, ruedoshu) { | |
diskayos.remove(dinular, ruedoshu); | |
} | |
}), jQuery.fn.extend({ | |
data: function(ramiji, phoodouco) { | |
var nugegut; | |
var jurambut; | |
var flaprepod; | |
var huheltop = this[0]; | |
var nagoheb = huheltop && huheltop.attributes; | |
if (void 0 === ramiji) { | |
if (this.length && (flaprepod = vupequa.get(huheltop), 1 === huheltop.nodeType && !diskayos.get(huheltop, 'hasDataAttrs'))) { | |
for (nugegut = nagoheb.length; | |
nugegut--; | |
) { | |
jurambut = nagoheb[nugegut].name, 0 === jurambut.indexOf('data-') && (jurambut = jQuery.camelCase(jurambut.slice(5)), framogi(huheltop, jurambut, flaprepod[jurambut])); | |
} | |
diskayos.set(huheltop, 'hasDataAttrs', !0); | |
} | |
return flaprepod; | |
} | |
return 'object' == typeof ramiji ? this.each(function() { | |
vupequa.set(this, ramiji); | |
}) : toupiki(this, function(pirooyuln) { | |
var dobulag; | |
var dacoti = jQuery.camelCase(ramiji); | |
if (huheltop && void 0 === pirooyuln) { | |
if (dobulag = vupequa.get(huheltop, ramiji), void 0 !== dobulag) { | |
return dobulag; | |
} | |
if (dobulag = vupequa.get(huheltop, dacoti), void 0 !== dobulag) { | |
return dobulag; | |
} | |
if (dobulag = framogi(huheltop, dacoti, void 0), void 0 !== dobulag) { | |
return dobulag; | |
} | |
} else { | |
this.each(function() { | |
var ugipit = vupequa.get(this, dacoti); | |
vupequa.set(this, dacoti, pirooyuln), -1 !== ramiji.indexOf('-') && void 0 !== ugipit && vupequa.set(this, ramiji, pirooyuln); | |
}); | |
} | |
}, null, phoodouco, arguments.length > 1, null, !0); | |
}, | |
removeData: function(dikoleb) { | |
return this.each(function() { | |
vupequa.remove(this, dikoleb); | |
}); | |
} | |
}), jQuery.extend({ | |
queue: function(osekhaf, talibrik, hestakun) { | |
var osukob; | |
return osekhaf ? (talibrik = (talibrik || 'fx') + 'queue', osukob = diskayos.get(osekhaf, talibrik), hestakun && (!osukob || jQuery.isArray(hestakun) ? osukob = diskayos.access(osekhaf, talibrik, jQuery.makeArray(hestakun)) : osukob.push(hestakun)), osukob || []) : void 0; | |
}, | |
dequeue: function(strugoudip, sigenkiln) { | |
sigenkiln = sigenkiln || 'fx'; | |
var lotooda = jQuery.queue(strugoudip, sigenkiln); | |
var losohin = lotooda.length; | |
var othenkgip = lotooda.shift(); | |
var trukafa = jQuery._queueHooks(strugoudip, sigenkiln); | |
var bukoji = function() { | |
jQuery.dequeue(strugoudip, sigenkiln); | |
}; | |
'inprogress' === othenkgip && (othenkgip = lotooda.shift(), losohin--), othenkgip && ('fx' === sigenkiln && lotooda.unshift('inprogress'), | |
delete trukafa.stop | |
, othenkgip.call(strugoudip, bukoji, trukafa)), !losohin && trukafa && trukafa.empty.fire(); | |
}, | |
_queueHooks: function(nokuke, sitoyob) { | |
var gotodu = sitoyob + 'queueHooks'; | |
return diskayos.get(nokuke, gotodu) || diskayos.access(nokuke, gotodu, { | |
empty: jQuery.Callbacks('once memory').add(function() { | |
diskayos.remove(nokuke, [sitoyob + 'queue', gotodu]); | |
}) | |
}); | |
} | |
}), jQuery.fn.extend({ | |
queue: function(suniedoy, bobremad) { | |
var oyolug = 2; | |
return 'string' != typeof suniedoy && (bobremad = suniedoy, suniedoy = 'fx', oyolug--), arguments.length < oyolug ? jQuery.queue(this[0], suniedoy) : void 0 === bobremad ? this : this.each(function() { | |
var riloju = jQuery.queue(this, suniedoy, bobremad); | |
jQuery._queueHooks(this, suniedoy), 'fx' === suniedoy && 'inprogress' !== riloju[0] && jQuery.dequeue(this, suniedoy); | |
}); | |
}, | |
dequeue: function(bechamu) { | |
return this.each(function() { | |
jQuery.dequeue(this, bechamu); | |
}); | |
}, | |
clearQueue: function(kraquome) { | |
return this.queue(kraquome || 'fx', []); | |
}, | |
promise: function(leynobleb, homamnol) { | |
var cokcemen; | |
var udopoln = 1; | |
var jitume = jQuery.Deferred(); | |
var betheeda = this; | |
var chugoga = this.length; | |
var umakin = function() { | |
--udopoln || jitume.resolveWith(betheeda, [betheeda]); | |
}; | |
for ('string' != typeof leynobleb && (homamnol = leynobleb, leynobleb = void 0), leynobleb = leynobleb || 'fx'; | |
chugoga--; | |
) { | |
cokcemen = diskayos.get(betheeda[chugoga], leynobleb + 'queueHooks'), cokcemen && cokcemen.empty && (udopoln++, cokcemen.empty.add(umakin)); | |
} | |
return umakin(), jitume.promise(homamnol); | |
} | |
}); | |
var sheduhu = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source; | |
var aluerer = ['Top', 'Right', 'Bottom', 'Left']; | |
var lufufi = function(mirike, recriko) { | |
return mirike = recriko || mirike, 'none' === jQuery.css(mirike, 'display') || !jQuery.contains(mirike.ownerDocument, mirike); | |
}; | |
var butiquab = /^(?:checkbox|radio)$/i; | |
!function() { | |
var kemubo = soyengack.createDocumentFragment(); | |
var fliniscaf = kemubo.appendChild(soyengack.createElement('div')); | |
fliniscaf.innerHTML = '<input type=\'radio\' checked=\'checked\' name=\'t\'/>', sasona.checkClone = fliniscaf.cloneNode(!0).cloneNode(!0).lastChild.checked, fliniscaf.innerHTML = '<textarea>x</textarea>', sasona.noCloneChecked = !!fliniscaf.cloneNode(!0).lastChild.defaultValue; | |
}(); | |
var hekicang = 'undefined'; | |
sasona.focusinBubbles = 'onfocusin' in gosura; | |
var remubfim = /^key/; | |
var getura = /^(?:mouse|contextmenu)|click/; | |
var tejoosur = /^(?:focusinfocus|focusoutblur)$/; | |
var higuegoud = /^([^.]*)(?:\.(.+)|)$/; | |
jQuery.event = { | |
global: {}, | |
add: function(geslele, umesup, paymopieg, pegubap, fonufi) { | |
var keboliep; | |
var quasceblef; | |
var tacuemu; | |
var rapbiboom; | |
var rucroti; | |
var teelisuel; | |
var bujetro; | |
var quithibut; | |
var majooje; | |
var quesufee; | |
var meequisost; | |
var gamekin = diskayos.get(geslele); | |
if (game |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment